Hello,
Like many, our company is finally taking the plunge in moving from a 3.6.9 kernel with no DTS to the latest (4.9.52-linux4sam_5.7-dirty ). Our boards are very similar to the G20 EK boards, with the addition of an FPGPA and removal of a lot of I/O we dont use. In general, we can get a bootable kernel by changing only the RMII mac --> MII Mac and partitioning our NAND flash according to our RFS.
I am unable to get USB to work on either our boards or the G20 EK kit. We have it working fine with our 3.6.9 kernels. I was expecting USB to work if I compiled the default (master branch) kernel with default DTS files for the g20 EK kit. So basically all I do is:
make -j10 ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- LOCALVERSION= at91_dt_defconfig
make -j10 ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- LOCALVERSION= dtbs
make -j10 ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- LOCALVERSION= zImage
I do have to modify the default .config for our appended DTS & enable JFFS2. The DTS file /at91sam9g20ek_common.dtsi is only modified for the NAND flash partition.
I append the dts and create a uImage using the ./scripts/mkuboot.sh. We have a very old version of uboot (1.3.4). System boots fine to RFS (created from Debian Wheezy).
When I insert any kind of USB device (and I tried many) I get:
usb 1-2: new full-speed USB device number 2 using at91_ohci
usb 1-2: device descriptor read/64, error -62
usb 1-2: device descriptor read/64, error -62
usb 1-2: new full-speed USB device number 3 using at91_ohci
usb 1-2: device descriptor read/64, error -62
usb 1-2: device descriptor read/64, error -62
usb 1-2: new full-speed USB device number 4 using at91_ohci
usb 1-2: device not accepting address 4, error -62
usb 1-2: new full-speed USB device number 5 using at91_ohci
usb 1-2: device not accepting address 5, error -62
usb usb1-port2: unable to enumerate USB device
which I believe are timeouts. I see the same behaviour on our G20 designs, which has lots of USB options & drivers turned on.
Should the default Atmel kernel with the EK board not have working USB ? What I am missing here ? My best guess is that the USB DTS definition is incomplete...perhaps a missing clock source or something.
I note the section (in arch/arm/boot/dts/at91sam9260.dtsi) reads:
usb0: ohci@500000 {
compatible = "atmel,at91rm9200-ohci", "usb-ohci";
reg = <0x00500000 0x100000>;
interrupts = <20 IRQ_TYPE_LEVEL_HIGH 2>;
clocks = <&ohci_clk>, <&ohci_clk>, <&uhpck>;
clock-names = "ohci_clk", "hclk", "uhpck";
status = "disabled";
but the binding documentation recommends:
usb0: ohci@00500000 {
compatible = "atmel,at91rm9200-ohci", "usb-ohci";
reg = <0x00500000 0x100000>;
clocks = <&uhphs_clk>, <&uhphs_clk>, <&uhpck>;
clock-names = "ohci_clk", "hclk", "uhpck";
interrupts = <20 4>;
num-ports = <2>;
};
Note that the top level dts file reads:
usb0: ohci@500000 {
num-ports = <2>;
status = "okay";
};
so it should be enabled.
lsusb gives: Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Any thoughts ? What should be trying ?
Much appreciated
Gertjan
No USB on g20 EK board with def at91 kernel
Moderator: nferre
- ghofman
- Location: Vancouver, BC, Canada
Post
Re: No USB on g20 EK board with def at91 kernel
Update:
I tried branches 4.1 and 4.4, all with no changes to except to NAND partition and making sure appended DTS is turned on. All test on the G20 Evaluation Kit board.
linux-4.1-at91 works as expected, USB devices are recognized
linux-4.4-at91 does not and even lsusb just hangs.
This makes me think default USB support hasn't worked by since at least 4.4. If any one has any bi-section tips, please let me know.
Also (but unrelated), with 4.4 reboot fails (hangs at 'restarting'). Noticed the same thing with 4.9, but seem fixable by increasing the wait in the reset function.
I tried branches 4.1 and 4.4, all with no changes to except to NAND partition and making sure appended DTS is turned on. All test on the G20 Evaluation Kit board.
linux-4.1-at91 works as expected, USB devices are recognized
linux-4.4-at91 does not and even lsusb just hangs.
This makes me think default USB support hasn't worked by since at least 4.4. If any one has any bi-section tips, please let me know.
Also (but unrelated), with 4.4 reboot fails (hangs at 'restarting'). Noticed the same thing with 4.9, but seem fixable by increasing the wait in the reset function.
- blue_z
- Location: USA
Post
A `sdiff` of 4.1 versus 4.4 boot logs should make incongruous lines more obvious.
Have you enabled USB debugging (i.e. rebuild the two Atmel USB host drivers with `#define DEBUG`)?
Regards
Re: No USB on g20 EK board with def at91 kernel
The salient part of the syslog is probably the initialization of the host controllers.ghofman wrote:When I insert any kind of USB device (and I tried many) I get:
A `sdiff` of 4.1 versus 4.4 boot logs should make incongruous lines more obvious.
Describe the problem's symptoms, not your guesses.ghofman wrote:My best guess is that the USB DTS definition is incomplete...perhaps a missing clock source or something.
Have you enabled USB debugging (i.e. rebuild the two Atmel USB host drivers with `#define DEBUG`)?
Regards
- ghofman
- Location: Vancouver, BC, Canada
Post
Re: No USB on g20 EK board with def at91 kernel
Took me a while to get any further testing done.
First of all I had made a mistake. I can in fact see USB devices with the 4.4 version, but not with the 4.9 tag.
In any case, comparing the 4.1 v 4.4 v 4.9 boot messages, the only difference related to USB is that in 4.1 and 4.4 I see
at91_ohci 500000.ohci: irq 37, io mem 0x00500000
but in 4.9
at91_ohci 500000.ohci: irq 33, io mem 0x00500000
(interrupt number on two additional serials are also different, by the same shift of 4).
Looking at at91sam9260.dtsi I see the usb0 section:
usb0: ohci@500000 {
compatible = "atmel,at91rm9200-ohci", "usb-ohci";
reg = <0x00500000 0x100000>;
interrupts = <20 IRQ_TYPE_LEVEL_HIGH 2>;
clocks = <&ohci_clk>, <&ohci_clk>, <&uhpck>;
clock-names = "ohci_clk", "hclk", "uhpck";
status = "disabled";
};
(this is unchanged after 4.4)
I am not sure how 0x20 maps onto irq 37 (or 33 for that matter, unless there is an offset of 1 somewhere).
I am not familiar with the AIC controller and how these are assigned. But why the difference ? And does it matter ?
I will enable DEBUG next.
First of all I had made a mistake. I can in fact see USB devices with the 4.4 version, but not with the 4.9 tag.
In any case, comparing the 4.1 v 4.4 v 4.9 boot messages, the only difference related to USB is that in 4.1 and 4.4 I see
at91_ohci 500000.ohci: irq 37, io mem 0x00500000
but in 4.9
at91_ohci 500000.ohci: irq 33, io mem 0x00500000
(interrupt number on two additional serials are also different, by the same shift of 4).
Looking at at91sam9260.dtsi I see the usb0 section:
usb0: ohci@500000 {
compatible = "atmel,at91rm9200-ohci", "usb-ohci";
reg = <0x00500000 0x100000>;
interrupts = <20 IRQ_TYPE_LEVEL_HIGH 2>;
clocks = <&ohci_clk>, <&ohci_clk>, <&uhpck>;
clock-names = "ohci_clk", "hclk", "uhpck";
status = "disabled";
};
(this is unchanged after 4.4)
I am not sure how 0x20 maps onto irq 37 (or 33 for that matter, unless there is an offset of 1 somewhere).
I am not familiar with the AIC controller and how these are assigned. But why the difference ? And does it matter ?
I will enable DEBUG next.
Who is online
Users browsing this forum: Baidu [Spider], Philliptog and 4 guests