Re: [OpenWrt-Devel] AsiaRF AWM002 (ramips) USB and reboot broken at r44044
On 03/02/2015 09:01, Christian Lamparter wrote: On Tue, Feb 3, 2015 at 8:43 AM, John Crispin blo...@openwrt.org wrote: On 03/02/2015 08:36, Christian Lamparter wrote: Thing is: ralink-phy.c can use some more work! elaborate on what needs work Link to github-source: https://github.com/openwrt-mirror/openwrt/blob/master/target/linux/ramips/patches-3.14/0037-USB-phy-add-ralink-SoC-driver.patch#L102 if (OTG_STATE_B_HOST) { rt_sysc_m32(0, RT_SYSCFG1_USB0_HOST_MODE, RT_SYSC_REG_SYSCFG1); if (!IS_ERR(rsthost)) reset_control_deassert(rsthost); } else { ... rt_sysc_m32(RT_SYSCFG1_USB0_HOST_MODE, 0, RT_SYSC_REG_SYSCFG1); if (!IS_ERR(rstdev)) reset_control_deassert(rstdev); } What about OTG, Is it not supported? The constant (OTG_STATE_B_HOST) will always evaluate to true. OTG is not supported and never has until now due to missing drivers. try to make a statement rather than encapsulating what you are trying to say in a question please, because i still don't get what you mean with needs work Note: For the M2M, the vendor disabled the USB DEV (by setting the reset signal in the boot loader). They did this probably to save power (this unit has a battery). And unfortunately: if the USB DEV reset bit is not cleared, then the connected USB device on the USB HOST (of the ramips) is not detected. Regards, Christian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] AsiaRF AWM002 (ramips) USB and reboot broken at r44044
John == John Crispin blo...@openwrt.org writes: John On 03/02/2015 08:36, Christian Lamparter wrote: Thing is: ralink-phy.c can use some more work! John elaborate on what needs work r44248 fixed my problem. Thanks, Christian and John! -- Russell Senior, President russ...@personaltelco.net ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] AsiaRF AWM002 (ramips) USB and reboot broken at r44044
On Tue, Feb 3, 2015 at 9:20 AM, John Crispin blo...@openwrt.org wrote: On 03/02/2015 09:01, Christian Lamparter wrote: On Tue, Feb 3, 2015 at 8:43 AM, John Crispin blo...@openwrt.org wrote: On 03/02/2015 08:36, Christian Lamparter wrote: Thing is: ralink-phy.c can use some more work! elaborate on what needs work What about OTG, Is it not supported? The constant (OTG_STATE_B_HOST) will always evaluate to true. try to make a statement rather than encapsulating what you are trying to say in a question please, because i still don't get what you mean with needs work OTG :-) In the patch (after the --- cut --- bars, but before the diff) I was asking if anyone knows a cheap and easy to get ramips devices with OTG. Since, I was asking/wondered how OTG is/was supposed to work at all ATM. However: OTG is not supported and never has until now due to missing drivers. So, this is all fine then. Regards, Christian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] AsiaRF AWM002 (ramips) USB and reboot broken at r44044
Dear Sir. the fe_reset only used to reset ethernet and switch driver. i think your problem is the old code is wrong. at ethernet driver(soc_rt305x.c) it just clean all reset bit (enable all functions. usb?). but the new code only reset and enable ethernet and switch block. you can see the diff as below. static void rt5350_fe_reset(void) { - rt_sysc_w32(RT305X_RESET_FE | RT305X_RESET_ESW, SYSC_REG_RESET_CTRL); - rt_sysc_w32(0, SYSC_REG_RESET_CTRL); + fe_reset(RT305X_RESET_FE | RT305X_RESET_ESW); } +void fe_reset(u32 reset_bits) +{ + u32 t; + + t = rt_sysc_r32(SYSC_REG_RSTCTRL); + t |= reset_bits; + rt_sysc_w32(t , SYSC_REG_RSTCTRL); + udelay(10); + + t = ~reset_bits; + rt_sysc_w32(t, SYSC_REG_RSTCTRL); + udelay(10); +} Best Regards. 2015-02-03 13:44 GMT+08:00 Russell Senior russ...@personaltelco.net: Russell == Russell Senior russ...@personaltelco.net writes: Russell I just wanted to give a heads up that I built trunk r44245 last Russell night and discovered two problems: reboot no longer works, and Russell USB fails to enumerate a usb-serial device that worked Russell previously (specifically a pl2303). To successfully reset, a Russell power cycle is required. These problems were not evident the Russell last time I built, about 3 weeks ago, r43960. The lsmod output Russell is nearly identical between working/not-working (with some Russell minor fuzz in a few module sizes). Russell I'm planning to try bisecting this, but if someone knows the Russell problem and beats me to it, I'd be grateful. Bisecting is Russell powerful but somewhat tedious. ;-) I bisected the problem. It appears the bad commit is r44044 (r44043 is good). The reset and usb problems appear at the same commit. commit fb038c46afa40edbd37eb9a93468312b287c5aa7 Author: nbd nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73 Date: Sun Jan 18 20:17:07 2015 + ralink: use fe_reset to control all reset Signed-off-by: michael lee igv...@gmail.com git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44044 3c298f89-4303-0410-b956-a3cf2f4a3e73 -- Russell Senior, President russ...@personaltelco.net ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] AsiaRF AWM002 (ramips) USB and reboot broken at r44044
Hello, On Tue, Feb 3, 2015 at 7:48 AM, Mingyu Li igv...@gmail.com wrote: Russell I just wanted to give a heads up that I built trunk r44245 last Russell night and discovered two problems: reboot no longer works, and Russell USB fails to enumerate a usb-serial device that worked Russell previously (specifically a pl2303). To successfully reset, a Russell power cycle is required. These problems were not evident the Russell last time I built, about 3 weeks ago, r43960. The lsmod output Russell is nearly identical between working/not-working (with some Russell minor fuzz in a few module sizes). Russell I'm planning to try bisecting this, but if someone knows the Russell problem and beats me to it, I'd be grateful. Bisecting is Russell powerful but somewhat tedious. ;-) I bisected the problem. It appears the bad commit is r44044 (r44043 is good). The reset and usb problems appear at the same commit. I ran into a similar issue (usb enumeration) with a RT5350 device around that time, but as Mingyu Li said, I traced it down to the USB code and made a patch (It should be pending in blogic queue?): https://patchwork.ozlabs.org/patch/432628/ [PATCH] ralink: fix USB host function for Intenso M2M Thing is: ralink-phy.c can use some more work! Regards, Christian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] AsiaRF AWM002 (ramips) USB and reboot broken at r44044
Russell == Russell Senior russ...@personaltelco.net writes: Russell I just wanted to give a heads up that I built trunk r44245 last Russell night and discovered two problems: reboot no longer works, and Russell USB fails to enumerate a usb-serial device that worked Russell previously (specifically a pl2303). To successfully reset, a Russell power cycle is required. These problems were not evident the Russell last time I built, about 3 weeks ago, r43960. The lsmod output Russell is nearly identical between working/not-working (with some Russell minor fuzz in a few module sizes). Russell I'm planning to try bisecting this, but if someone knows the Russell problem and beats me to it, I'd be grateful. Bisecting is Russell powerful but somewhat tedious. ;-) I bisected the problem. It appears the bad commit is r44044 (r44043 is good). The reset and usb problems appear at the same commit. commit fb038c46afa40edbd37eb9a93468312b287c5aa7 Author: nbd nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73 Date: Sun Jan 18 20:17:07 2015 + ralink: use fe_reset to control all reset Signed-off-by: michael lee igv...@gmail.com git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44044 3c298f89-4303-0410-b956-a3cf2f4a3e73 -- Russell Senior, President russ...@personaltelco.net ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel