Home › Forums › snickerdoodle Baseboards › • Community Built › USB Host
- AuthorPosts
- Hi Guys.
I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - We have used the generic USB PHY device tree bindings with a USB3315. Try:
usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-Nick
On Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - Yes. You can either build it into the kernel or as a module. The "usb-nop-xceiv" binding corresponds to the driver at drivers/usb/phy/phy-generic.c and is documented at https://github.com/krtkl/snickerdoodle-linux/blob/master/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
Let me know if you are able to get it working or have persistent issues.
On Wednesday, January 18, 2017 at 5:20:09 PM UTC-8, Nick Burkitt wrote:Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-NickOn Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - Interestingly, selecting "NOP USB Transceiver Driver" in the config menu makes "Generic ULPI Tranceiver Driver" appear as well. So I selected that, too. Both are now built-in. But still no joy. We're using your reference design, with the exception of allowing software control (via the FPGA) of the reset line.Here's the full USB devicetree node, reverse compiled from the DTB:usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x4>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;phy0 {compatible = "usb-nop-xceiv";#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};};I've run a test in which I reset the PHY at a rate of 1 Hz (~50 ms reset pulse width) and scoped the data lines. I would expect to see something data-ish as the PHY looks for attached devices, but all I see is the tiniest of blips – maybe 250 mV for 200-300 microseconds. I'm guessing switching noise?I"m not sure what to look at next. Any thoughts you might have would be appreciated.Thanks,-Nick
On Wednesday, January 18, 2017 at 5:34:44 PM UTC-8, Bush wrote:
Yes. You can either build it into the kernel or as a module. The "usb-nop-xceiv" binding corresponds to the driver at drivers/usb/phy/phy-generic.c and is documented at https://github.com/krtkl/snickerdoodle-linux/blob/master/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txtLet me know if you are able to get it working or have persistent issues.
On Wednesday, January 18, 2017 at 5:20:09 PM UTC-8, Nick Burkitt wrote:Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-NickOn Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - Can you confirm that you have enabled the USB peripheral in your hardware project? Also, Can you post a dmsg showing the USB bring-up messages/errors? I know people have had problems placing the phy DTS node within the USB node. I'm not exactly sure why that can be an issue but you may try putting the phy declaration at the "root" level (/) of your DTS. This is a known working config for the piSmasher baseboard (from fdtdump):
/ {
amba {
…
usb@e0002000 {
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
status = "okay";
clocks = <0x00000001 0x000000ba>;
interrupt-parent = <0x00000003>;
interrupts = <0x00000000 0x00000008 0x00000003>;
reg = <0xe0002000 0x000003c4>;
phy_type = "ulpi";
dr_mode = "host";
usb-phy = <0x00000008>;
};
…
};
….
phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x00000000>;
linux,phandle = <0x00000008>;
phandle = <0x00000008>;
};
};On Wednesday, January 18, 2017 at 7:17:07 PM UTC-8, Nick Burkitt wrote:
Interestingly, selecting "NOP USB Transceiver Driver" in the config menu makes "Generic ULPI Tranceiver Driver" appear as well. So I selected that, too. Both are now built-in. But still no joy. We're using your reference design, with the exception of allowing software control (via the FPGA) of the reset line.Here's the full USB devicetree node, reverse compiled from the DTB:usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x4>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;phy0 {compatible = "usb-nop-xceiv";#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};};I've run a test in which I reset the PHY at a rate of 1 Hz (~50 ms reset pulse width) and scoped the data lines. I would expect to see something data-ish as the PHY looks for attached devices, but all I see is the tiniest of blips – maybe 250 mV for 200-300 microseconds. I'm guessing switching noise?I"m not sure what to look at next. Any thoughts you might have would be appreciated.Thanks,-NickOn Wednesday, January 18, 2017 at 5:34:44 PM UTC-8, Bush wrote:
Yes. You can either build it into the kernel or as a module. The "usb-nop-xceiv" binding corresponds to the driver at drivers/usb/phy/phy-generic.c and is documented at https://github.com/krtkl/snickerdoodle-linux/blob/master/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txtLet me know if you are able to get it working or have persistent issues.
On Wednesday, January 18, 2017 at 5:20:09 PM UTC-8, Nick Burkitt wrote:Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-NickOn Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - Hey! That seems to have done the trick. At least I now have a couple of entries in /sys/bus/usb/devices. Thanks!Now – what does it take to mount a USB SD card reader? Or maybe I'll go home now. :-)Thanks again – I'd have been flailing for days!-Nick
On Wednesday, January 18, 2017 at 7:28:48 PM UTC-8, Bush wrote:
Can you confirm that you have enabled the USB peripheral in your hardware project? Also, Can you post a dmsg showing the USB bring-up messages/errors? I know people have had problems placing the phy DTS node within the USB node. I'm not exactly sure why that can be an issue but you may try putting the phy declaration at the "root" level (/) of your DTS. This is a known working config for the piSmasher baseboard (from fdtdump):
/ {
amba {
…
usb@e0002000 {
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
status = "okay";
clocks = <0x00000001 0x000000ba>;
interrupt-parent = <0x00000003>;
interrupts = <0x00000000 0x00000008 0x00000003>;
reg = <0xe0002000 0x000003c4>;
phy_type = "ulpi";
dr_mode = "host";
usb-phy = <0x00000008>;
};
…
};
….
phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x00000000>;
linux,phandle = <0x00000008>;
phandle = <0x00000008>;
};
};On Wednesday, January 18, 2017 at 7:17:07 PM UTC-8, Nick Burkitt wrote:
Interestingly, selecting "NOP USB Transceiver Driver" in the config menu makes "Generic ULPI Tranceiver Driver" appear as well. So I selected that, too. Both are now built-in. But still no joy. We're using your reference design, with the exception of allowing software control (via the FPGA) of the reset line.Here's the full USB devicetree node, reverse compiled from the DTB:usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x4>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;phy0 {compatible = "usb-nop-xceiv";#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};};I've run a test in which I reset the PHY at a rate of 1 Hz (~50 ms reset pulse width) and scoped the data lines. I would expect to see something data-ish as the PHY looks for attached devices, but all I see is the tiniest of blips – maybe 250 mV for 200-300 microseconds. I'm guessing switching noise?I"m not sure what to look at next. Any thoughts you might have would be appreciated.Thanks,-NickOn Wednesday, January 18, 2017 at 5:34:44 PM UTC-8, Bush wrote:
Yes. You can either build it into the kernel or as a module. The "usb-nop-xceiv" binding corresponds to the driver at drivers/usb/phy/phy-generic.c and is documented at https://github.com/krtkl/snickerdoodle-linux/blob/master/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txtLet me know if you are able to get it working or have persistent issues.
On Wednesday, January 18, 2017 at 5:20:09 PM UTC-8, Nick Burkitt wrote:Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-NickOn Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - Quick question: Is this a bad thing?[ 1.306764] e0002000.usb supply vbus not found, using dummy regulator
Thanks,
-NickOn Wednesday, January 18, 2017 at 8:01:31 PM UTC-8, Nick Burkitt wrote:Hey! That seems to have done the trick. At least I now have a couple of entries in /sys/bus/usb/devices. Thanks!Now – what does it take to mount a USB SD card reader? Or maybe I'll go home now. :-)Thanks again – I'd have been flailing for days!-NickOn Wednesday, January 18, 2017 at 7:28:48 PM UTC-8, Bush wrote:
Can you confirm that you have enabled the USB peripheral in your hardware project? Also, Can you post a dmsg showing the USB bring-up messages/errors? I know people have had problems placing the phy DTS node within the USB node. I'm not exactly sure why that can be an issue but you may try putting the phy declaration at the "root" level (/) of your DTS. This is a known working config for the piSmasher baseboard (from fdtdump):
/ {
amba {
…
usb@e0002000 {
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
status = "okay";
clocks = <0x00000001 0x000000ba>;
interrupt-parent = <0x00000003>;
interrupts = <0x00000000 0x00000008 0x00000003>;
reg = <0xe0002000 0x000003c4>;
phy_type = "ulpi";
dr_mode = "host";
usb-phy = <0x00000008>;
};
…
};
….
phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x00000000>;
linux,phandle = <0x00000008>;
phandle = <0x00000008>;
};
};On Wednesday, January 18, 2017 at 7:17:07 PM UTC-8, Nick Burkitt wrote:
Interestingly, selecting "NOP USB Transceiver Driver" in the config menu makes "Generic ULPI Tranceiver Driver" appear as well. So I selected that, too. Both are now built-in. But still no joy. We're using your reference design, with the exception of allowing software control (via the FPGA) of the reset line.Here's the full USB devicetree node, reverse compiled from the DTB:usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x4>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;phy0 {compatible = "usb-nop-xceiv";#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};};I've run a test in which I reset the PHY at a rate of 1 Hz (~50 ms reset pulse width) and scoped the data lines. I would expect to see something data-ish as the PHY looks for attached devices, but all I see is the tiniest of blips – maybe 250 mV for 200-300 microseconds. I'm guessing switching noise?I"m not sure what to look at next. Any thoughts you might have would be appreciated.Thanks,-NickOn Wednesday, January 18, 2017 at 5:34:44 PM UTC-8, Bush wrote:
Yes. You can either build it into the kernel or as a module. The "usb-nop-xceiv" binding corresponds to the driver at drivers/usb/phy/phy-generic.c and is documented at https://github.com/krtkl/snickerdoodle-linux/blob/master/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txtLet me know if you are able to get it working or have persistent issues.
On Wednesday, January 18, 2017 at 5:20:09 PM UTC-8, Nick Burkitt wrote:Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-NickOn Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - I've tracked down the proximate cause of my trouble to the CPEN output of the 3315, which stays low always. Is there some additional magic that needs to be enabled in the kernel configuration? Like ULPI PHY interface support?Thanks,-Nick
On Thursday, January 19, 2017 at 11:17:52 AM UTC-8, Nick Burkitt wrote:
Quick question: Is this a bad thing?[ 1.306764] e0002000.usb supply vbus not found, using dummy regulatorThanks,
-NickOn Wednesday, January 18, 2017 at 8:01:31 PM UTC-8, Nick Burkitt wrote:Hey! That seems to have done the trick. At least I now have a couple of entries in /sys/bus/usb/devices. Thanks!Now – what does it take to mount a USB SD card reader? Or maybe I'll go home now. :-)Thanks again – I'd have been flailing for days!-NickOn Wednesday, January 18, 2017 at 7:28:48 PM UTC-8, Bush wrote:
Can you confirm that you have enabled the USB peripheral in your hardware project? Also, Can you post a dmsg showing the USB bring-up messages/errors? I know people have had problems placing the phy DTS node within the USB node. I'm not exactly sure why that can be an issue but you may try putting the phy declaration at the "root" level (/) of your DTS. This is a known working config for the piSmasher baseboard (from fdtdump):
/ {
amba {
…
usb@e0002000 {
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
status = "okay";
clocks = <0x00000001 0x000000ba>;
interrupt-parent = <0x00000003>;
interrupts = <0x00000000 0x00000008 0x00000003>;
reg = <0xe0002000 0x000003c4>;
phy_type = "ulpi";
dr_mode = "host";
usb-phy = <0x00000008>;
};
…
};
….
phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x00000000>;
linux,phandle = <0x00000008>;
phandle = <0x00000008>;
};
};On Wednesday, January 18, 2017 at 7:17:07 PM UTC-8, Nick Burkitt wrote:
Interestingly, selecting "NOP USB Transceiver Driver" in the config menu makes "Generic ULPI Tranceiver Driver" appear as well. So I selected that, too. Both are now built-in. But still no joy. We're using your reference design, with the exception of allowing software control (via the FPGA) of the reset line.Here's the full USB devicetree node, reverse compiled from the DTB:usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x4>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;phy0 {compatible = "usb-nop-xceiv";#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};};I've run a test in which I reset the PHY at a rate of 1 Hz (~50 ms reset pulse width) and scoped the data lines. I would expect to see something data-ish as the PHY looks for attached devices, but all I see is the tiniest of blips – maybe 250 mV for 200-300 microseconds. I'm guessing switching noise?I"m not sure what to look at next. Any thoughts you might have would be appreciated.Thanks,-NickOn Wednesday, January 18, 2017 at 5:34:44 PM UTC-8, Bush wrote:
Yes. You can either build it into the kernel or as a module. The "usb-nop-xceiv" binding corresponds to the driver at drivers/usb/phy/phy-generic.c and is documented at https://github.com/krtkl/snickerdoodle-linux/blob/master/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txtLet me know if you are able to get it working or have persistent issues.
On Wednesday, January 18, 2017 at 5:20:09 PM UTC-8, Nick Burkitt wrote:Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-NickOn Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - Hey Nick,Just wondering if you ever got this resolved? If not, I'll walk down the hall and throw a flash bang into the snickerdoodle Customer Support Center…-Ryan
On Tuesday, January 24, 2017 at 5:05:30 PM UTC-8, Nick Burkitt wrote:
I've tracked down the proximate cause of my trouble to the CPEN output of the 3315, which stays low always. Is there some additional magic that needs to be enabled in the kernel configuration? Like ULPI PHY interface support?Thanks,-NickOn Thursday, January 19, 2017 at 11:17:52 AM UTC-8, Nick Burkitt wrote:
Quick question: Is this a bad thing?[ 1.306764] e0002000.usb supply vbus not found, using dummy regulatorThanks,
-NickOn Wednesday, January 18, 2017 at 8:01:31 PM UTC-8, Nick Burkitt wrote:Hey! That seems to have done the trick. At least I now have a couple of entries in /sys/bus/usb/devices. Thanks!Now – what does it take to mount a USB SD card reader? Or maybe I'll go home now. :-)Thanks again – I'd have been flailing for days!-NickOn Wednesday, January 18, 2017 at 7:28:48 PM UTC-8, Bush wrote:
Can you confirm that you have enabled the USB peripheral in your hardware project? Also, Can you post a dmsg showing the USB bring-up messages/errors? I know people have had problems placing the phy DTS node within the USB node. I'm not exactly sure why that can be an issue but you may try putting the phy declaration at the "root" level (/) of your DTS. This is a known working config for the piSmasher baseboard (from fdtdump):
/ {
amba {
…
usb@e0002000 {
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
status = "okay";
clocks = <0x00000001 0x000000ba>;
interrupt-parent = <0x00000003>;
interrupts = <0x00000000 0x00000008 0x00000003>;
reg = <0xe0002000 0x000003c4>;
phy_type = "ulpi";
dr_mode = "host";
usb-phy = <0x00000008>;
};
…
};
….
phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x00000000>;
linux,phandle = <0x00000008>;
phandle = <0x00000008>;
};
};On Wednesday, January 18, 2017 at 7:17:07 PM UTC-8, Nick Burkitt wrote:
Interestingly, selecting "NOP USB Transceiver Driver" in the config menu makes "Generic ULPI Tranceiver Driver" appear as well. So I selected that, too. Both are now built-in. But still no joy. We're using your reference design, with the exception of allowing software control (via the FPGA) of the reset line.Here's the full USB devicetree node, reverse compiled from the DTB:usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x4>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;phy0 {compatible = "usb-nop-xceiv";#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};};I've run a test in which I reset the PHY at a rate of 1 Hz (~50 ms reset pulse width) and scoped the data lines. I would expect to see something data-ish as the PHY looks for attached devices, but all I see is the tiniest of blips – maybe 250 mV for 200-300 microseconds. I'm guessing switching noise?I"m not sure what to look at next. Any thoughts you might have would be appreciated.Thanks,-NickOn Wednesday, January 18, 2017 at 5:34:44 PM UTC-8, Bush wrote:
Yes. You can either build it into the kernel or as a module. The "usb-nop-xceiv" binding corresponds to the driver at drivers/usb/phy/phy-generic.c and is documented at https://github.com/krtkl/snickerdoodle-linux/blob/master/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txtLet me know if you are able to get it working or have persistent issues.
On Wednesday, January 18, 2017 at 5:20:09 PM UTC-8, Nick Burkitt wrote:Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-NickOn Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - Hi Ryan.Nope, I haven't found a way forward yet. And now that problem has a little friend – setting the Ethernet MAC address.Thanks,-Nick
On Monday, January 30, 2017 at 9:55:42 AM UTC-8, Cousins wrote:
Hey Nick,Just wondering if you ever got this resolved? If not, I'll walk down the hall and throw a flash bang into the snickerdoodle Customer Support Center…-RyanOn Tuesday, January 24, 2017 at 5:05:30 PM UTC-8, Nick Burkitt wrote:
I've tracked down the proximate cause of my trouble to the CPEN output of the 3315, which stays low always. Is there some additional magic that needs to be enabled in the kernel configuration? Like ULPI PHY interface support?Thanks,-NickOn Thursday, January 19, 2017 at 11:17:52 AM UTC-8, Nick Burkitt wrote:
Quick question: Is this a bad thing?[ 1.306764] e0002000.usb supply vbus not found, using dummy regulatorThanks,
-NickOn Wednesday, January 18, 2017 at 8:01:31 PM UTC-8, Nick Burkitt wrote:Hey! That seems to have done the trick. At least I now have a couple of entries in /sys/bus/usb/devices. Thanks!Now – what does it take to mount a USB SD card reader? Or maybe I'll go home now. :-)Thanks again – I'd have been flailing for days!-NickOn Wednesday, January 18, 2017 at 7:28:48 PM UTC-8, Bush wrote:
Can you confirm that you have enabled the USB peripheral in your hardware project? Also, Can you post a dmsg showing the USB bring-up messages/errors? I know people have had problems placing the phy DTS node within the USB node. I'm not exactly sure why that can be an issue but you may try putting the phy declaration at the "root" level (/) of your DTS. This is a known working config for the piSmasher baseboard (from fdtdump):
/ {
amba {
…
usb@e0002000 {
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
status = "okay";
clocks = <0x00000001 0x000000ba>;
interrupt-parent = <0x00000003>;
interrupts = <0x00000000 0x00000008 0x00000003>;
reg = <0xe0002000 0x000003c4>;
phy_type = "ulpi";
dr_mode = "host";
usb-phy = <0x00000008>;
};
…
};
….
phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x00000000>;
linux,phandle = <0x00000008>;
phandle = <0x00000008>;
};
};On Wednesday, January 18, 2017 at 7:17:07 PM UTC-8, Nick Burkitt wrote:
Interestingly, selecting "NOP USB Transceiver Driver" in the config menu makes "Generic ULPI Tranceiver Driver" appear as well. So I selected that, too. Both are now built-in. But still no joy. We're using your reference design, with the exception of allowing software control (via the FPGA) of the reset line.Here's the full USB devicetree node, reverse compiled from the DTB:usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x4>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;phy0 {compatible = "usb-nop-xceiv";#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};};I've run a test in which I reset the PHY at a rate of 1 Hz (~50 ms reset pulse width) and scoped the data lines. I would expect to see something data-ish as the PHY looks for attached devices, but all I see is the tiniest of blips – maybe 250 mV for 200-300 microseconds. I'm guessing switching noise?I"m not sure what to look at next. Any thoughts you might have would be appreciated.Thanks,-NickOn Wednesday, January 18, 2017 at 5:34:44 PM UTC-8, Bush wrote:
Yes. You can either build it into the kernel or as a module. The "usb-nop-xceiv" binding corresponds to the driver at drivers/usb/phy/phy-generic.c and is documented at https://github.com/krtkl/snickerdoodle-linux/blob/master/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txtLet me know if you are able to get it working or have persistent issues.
On Wednesday, January 18, 2017 at 5:20:09 PM UTC-8, Nick Burkitt wrote:Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-NickOn Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - There are several optional device tree bindings for resets and vbus regulation that can be attached to the phy node. If you have a GPIO from J3 being used to set/reset your supplies, you need to create a node for that GPIO and reference the phy node.
usb_phy0: phy0 { compatible = "usb-nop-xceiv"; #phy-cells = <0>; vbus-regulator = <&usb0_vbus_regulator>; };
usb0_vbus_regulator: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "usb-vbus-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
startup-delay-us = <70000>;
regulator-boot-on;
enable-active-high
gpio = <&gpio0 52 0>;
};As for ethernet, you can add a MAC address specification to your network/interfaces or (preferably) your network/interfaces.d/ file within your ethernet interface specification:
hwaddress ether 02:01:02:03:04:08
On Monday, January 30, 2017 at 1:41:38 PM UTC-8, Nick Burkitt wrote:Hi Ryan.Nope, I haven't found a way forward yet. And now that problem has a little friend – setting the Ethernet MAC address.Thanks,-NickOn Monday, January 30, 2017 at 9:55:42 AM UTC-8, Cousins wrote:
Hey Nick,Just wondering if you ever got this resolved? If not, I'll walk down the hall and throw a flash bang into the snickerdoodle Customer Support Center…-RyanOn Tuesday, January 24, 2017 at 5:05:30 PM UTC-8, Nick Burkitt wrote:
I've tracked down the proximate cause of my trouble to the CPEN output of the 3315, which stays low always. Is there some additional magic that needs to be enabled in the kernel configuration? Like ULPI PHY interface support?Thanks,-NickOn Thursday, January 19, 2017 at 11:17:52 AM UTC-8, Nick Burkitt wrote:
Quick question: Is this a bad thing?[ 1.306764] e0002000.usb supply vbus not found, using dummy regulatorThanks,
-NickOn Wednesday, January 18, 2017 at 8:01:31 PM UTC-8, Nick Burkitt wrote:Hey! That seems to have done the trick. At least I now have a couple of entries in /sys/bus/usb/devices. Thanks!Now – what does it take to mount a USB SD card reader? Or maybe I'll go home now. :-)Thanks again – I'd have been flailing for days!-NickOn Wednesday, January 18, 2017 at 7:28:48 PM UTC-8, Bush wrote:
Can you confirm that you have enabled the USB peripheral in your hardware project? Also, Can you post a dmsg showing the USB bring-up messages/errors? I know people have had problems placing the phy DTS node within the USB node. I'm not exactly sure why that can be an issue but you may try putting the phy declaration at the "root" level (/) of your DTS. This is a known working config for the piSmasher baseboard (from fdtdump):
/ {
amba {
…
usb@e0002000 {
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
status = "okay";
clocks = <0x00000001 0x000000ba>;
interrupt-parent = <0x00000003>;
interrupts = <0x00000000 0x00000008 0x00000003>;
reg = <0xe0002000 0x000003c4>;
phy_type = "ulpi";
dr_mode = "host";
usb-phy = <0x00000008>;
};
…
};
….
phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x00000000>;
linux,phandle = <0x00000008>;
phandle = <0x00000008>;
};
};On Wednesday, January 18, 2017 at 7:17:07 PM UTC-8, Nick Burkitt wrote:
Interestingly, selecting "NOP USB Transceiver Driver" in the config menu makes "Generic ULPI Tranceiver Driver" appear as well. So I selected that, too. Both are now built-in. But still no joy. We're using your reference design, with the exception of allowing software control (via the FPGA) of the reset line.Here's the full USB devicetree node, reverse compiled from the DTB:usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x4>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;phy0 {compatible = "usb-nop-xceiv";#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};};I've run a test in which I reset the PHY at a rate of 1 Hz (~50 ms reset pulse width) and scoped the data lines. I would expect to see something data-ish as the PHY looks for attached devices, but all I see is the tiniest of blips – maybe 250 mV for 200-300 microseconds. I'm guessing switching noise?I"m not sure what to look at next. Any thoughts you might have would be appreciated.Thanks,-NickOn Wednesday, January 18, 2017 at 5:34:44 PM UTC-8, Bush wrote:
Yes. You can either build it into the kernel or as a module. The "usb-nop-xceiv" binding corresponds to the driver at drivers/usb/phy/phy-generic.c and is documented at https://github.com/krtkl/snickerdoodle-linux/blob/master/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txtLet me know if you are able to get it working or have persistent issues.
On Wednesday, January 18, 2017 at 5:20:09 PM UTC-8, Nick Burkitt wrote:Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-NickOn Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - The MAC solution is one that I'd tried before, without success. To be duly diligent, though, I copied and pasted your example – and that worked. So I changed the address to the one I wanted – and it no longer worked. A few experiments later, I finally I discovered magic bit 40 – unicast vs. multicast. With that understanding, I removed the command from interfaces.d/eth0, rebooted to u-boot and set environment variable ethaddr to my (now correct) MAC address, saved it, finished booting…and all is now well.USB will have to wait for a week, until I get back from visiting our customer in DC.Thanks – you guys came through again!-Nick
On Friday, February 3, 2017 at 2:37:06 PM UTC-8, Bush wrote:
There are several optional device tree bindings for resets and vbus regulation that can be attached to the phy node. If you have a GPIO from J3 being used to set/reset your supplies, you need to create a node for that GPIO and reference the phy node.usb_phy0: phy0 { compatible = "usb-nop-xceiv"; #phy-cells = <0>; vbus-regulator = <&usb0_vbus_regulator>; };
usb0_vbus_regulator: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "usb-vbus-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
startup-delay-us = <70000>;
regulator-boot-on;
enable-active-high
gpio = <&gpio0 52 0>;
};As for ethernet, you can add a MAC address specification to your network/interfaces or (preferably) your network/interfaces.d/ file within your ethernet interface specification:
hwaddress ether 02:01:02:03:04:08
On Monday, January 30, 2017 at 1:41:38 PM UTC-8, Nick Burkitt wrote:Hi Ryan.Nope, I haven't found a way forward yet. And now that problem has a little friend – setting the Ethernet MAC address.Thanks,-NickOn Monday, January 30, 2017 at 9:55:42 AM UTC-8, Cousins wrote:
Hey Nick,Just wondering if you ever got this resolved? If not, I'll walk down the hall and throw a flash bang into the snickerdoodle Customer Support Center…-RyanOn Tuesday, January 24, 2017 at 5:05:30 PM UTC-8, Nick Burkitt wrote:
I've tracked down the proximate cause of my trouble to the CPEN output of the 3315, which stays low always. Is there some additional magic that needs to be enabled in the kernel configuration? Like ULPI PHY interface support?Thanks,-NickOn Thursday, January 19, 2017 at 11:17:52 AM UTC-8, Nick Burkitt wrote:
Quick question: Is this a bad thing?[ 1.306764] e0002000.usb supply vbus not found, using dummy regulatorThanks,
-NickOn Wednesday, January 18, 2017 at 8:01:31 PM UTC-8, Nick Burkitt wrote:Hey! That seems to have done the trick. At least I now have a couple of entries in /sys/bus/usb/devices. Thanks!Now – what does it take to mount a USB SD card reader? Or maybe I'll go home now. :-)Thanks again – I'd have been flailing for days!-NickOn Wednesday, January 18, 2017 at 7:28:48 PM UTC-8, Bush wrote:
Can you confirm that you have enabled the USB peripheral in your hardware project? Also, Can you post a dmsg showing the USB bring-up messages/errors? I know people have had problems placing the phy DTS node within the USB node. I'm not exactly sure why that can be an issue but you may try putting the phy declaration at the "root" level (/) of your DTS. This is a known working config for the piSmasher baseboard (from fdtdump):
/ {
amba {
…
usb@e0002000 {
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
status = "okay";
clocks = <0x00000001 0x000000ba>;
interrupt-parent = <0x00000003>;
interrupts = <0x00000000 0x00000008 0x00000003>;
reg = <0xe0002000 0x000003c4>;
phy_type = "ulpi";
dr_mode = "host";
usb-phy = <0x00000008>;
};
…
};
….
phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x00000000>;
linux,phandle = <0x00000008>;
phandle = <0x00000008>;
};
};On Wednesday, January 18, 2017 at 7:17:07 PM UTC-8, Nick Burkitt wrote:
Interestingly, selecting "NOP USB Transceiver Driver" in the config menu makes "Generic ULPI Tranceiver Driver" appear as well. So I selected that, too. Both are now built-in. But still no joy. We're using your reference design, with the exception of allowing software control (via the FPGA) of the reset line.Here's the full USB devicetree node, reverse compiled from the DTB:usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x4>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;phy0 {compatible = "usb-nop-xceiv";#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};};I've run a test in which I reset the PHY at a rate of 1 Hz (~50 ms reset pulse width) and scoped the data lines. I would expect to see something data-ish as the PHY looks for attached devices, but all I see is the tiniest of blips – maybe 250 mV for 200-300 microseconds. I'm guessing switching noise?I"m not sure what to look at next. Any thoughts you might have would be appreciated.Thanks,-NickOn Wednesday, January 18, 2017 at 5:34:44 PM UTC-8, Bush wrote:
Yes. You can either build it into the kernel or as a module. The "usb-nop-xceiv" binding corresponds to the driver at drivers/usb/phy/phy-generic.c and is documented at https://github.com/krtkl/snickerdoodle-linux/blob/master/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txtLet me know if you are able to get it working or have persistent issues.
On Wednesday, January 18, 2017 at 5:20:09 PM UTC-8, Nick Burkitt wrote:Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-NickOn Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - I'm back from DC, and looking at USB again. Our hardware guy has gone over the board and given it his blessing, so it's almost certainly a software/setup issue. We're using your reference design, with one exception – the reset line is controlled directly by the FPGA. But that appears to be functioning properly. I've tried the devicetree source you suggested, with the gpio line commented out. The sysfs files for the hub are present in /sys/bus/usb, but I never get 5 V on the USB Vbus line, and the regulator's EN input is always false.This is what my devicetree.dtb looks like, de-compiled:phy0 {compatible = "usb-nop-xceiv";vbus-regulator = <0x9>;#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};fixedregulator@2 {compatible = "regulator-fixed";regulator-name = "usb-vbus-regulator";regulator-min-microvolt = <0x1b7740>;regulator-max-microvolt = <0x1b7740>;startup-delay-us = <0x11170>;regulator-boot-on;enable-active-high;linux,phandle = <0x9>;phandle = <0x9>;};usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x3>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;};Any ideas of what to try next?Thanks,-Nick
On Friday, February 3, 2017 at 2:37:06 PM UTC-8, Bush wrote:
There are several optional device tree bindings for resets and vbus regulation that can be attached to the phy node. If you have a GPIO from J3 being used to set/reset your supplies, you need to create a node for that GPIO and reference the phy node.usb_phy0: phy0 { compatible = "usb-nop-xceiv"; #phy-cells = <0>; vbus-regulator = <&usb0_vbus_regulator>; };
usb0_vbus_regulator: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "usb-vbus-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
startup-delay-us = <70000>;
regulator-boot-on;
enable-active-high
gpio = <&gpio0 52 0>;
};As for ethernet, you can add a MAC address specification to your network/interfaces or (preferably) your network/interfaces.d/ file within your ethernet interface specification:
hwaddress ether 02:01:02:03:04:08
On Monday, January 30, 2017 at 1:41:38 PM UTC-8, Nick Burkitt wrote:Hi Ryan.Nope, I haven't found a way forward yet. And now that problem has a little friend – setting the Ethernet MAC address.Thanks,-NickOn Monday, January 30, 2017 at 9:55:42 AM UTC-8, Cousins wrote:
Hey Nick,Just wondering if you ever got this resolved? If not, I'll walk down the hall and throw a flash bang into the snickerdoodle Customer Support Center…-RyanOn Tuesday, January 24, 2017 at 5:05:30 PM UTC-8, Nick Burkitt wrote:
I've tracked down the proximate cause of my trouble to the CPEN output of the 3315, which stays low always. Is there some additional magic that needs to be enabled in the kernel configuration? Like ULPI PHY interface support?Thanks,-NickOn Thursday, January 19, 2017 at 11:17:52 AM UTC-8, Nick Burkitt wrote:
Quick question: Is this a bad thing?[ 1.306764] e0002000.usb supply vbus not found, using dummy regulatorThanks,
-NickOn Wednesday, January 18, 2017 at 8:01:31 PM UTC-8, Nick Burkitt wrote:Hey! That seems to have done the trick. At least I now have a couple of entries in /sys/bus/usb/devices. Thanks!Now – what does it take to mount a USB SD card reader? Or maybe I'll go home now. :-)Thanks again – I'd have been flailing for days!-NickOn Wednesday, January 18, 2017 at 7:28:48 PM UTC-8, Bush wrote:
Can you confirm that you have enabled the USB peripheral in your hardware project? Also, Can you post a dmsg showing the USB bring-up messages/errors? I know people have had problems placing the phy DTS node within the USB node. I'm not exactly sure why that can be an issue but you may try putting the phy declaration at the "root" level (/) of your DTS. This is a known working config for the piSmasher baseboard (from fdtdump):
/ {
amba {
…
usb@e0002000 {
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
status = "okay";
clocks = <0x00000001 0x000000ba>;
interrupt-parent = <0x00000003>;
interrupts = <0x00000000 0x00000008 0x00000003>;
reg = <0xe0002000 0x000003c4>;
phy_type = "ulpi";
dr_mode = "host";
usb-phy = <0x00000008>;
};
…
};
….
phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x00000000>;
linux,phandle = <0x00000008>;
phandle = <0x00000008>;
};
};On Wednesday, January 18, 2017 at 7:17:07 PM UTC-8, Nick Burkitt wrote:
Interestingly, selecting "NOP USB Transceiver Driver" in the config menu makes "Generic ULPI Tranceiver Driver" appear as well. So I selected that, too. Both are now built-in. But still no joy. We're using your reference design, with the exception of allowing software control (via the FPGA) of the reset line.Here's the full USB devicetree node, reverse compiled from the DTB:usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x4>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;phy0 {compatible = "usb-nop-xceiv";#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};};I've run a test in which I reset the PHY at a rate of 1 Hz (~50 ms reset pulse width) and scoped the data lines. I would expect to see something data-ish as the PHY looks for attached devices, but all I see is the tiniest of blips – maybe 250 mV for 200-300 microseconds. I'm guessing switching noise?I"m not sure what to look at next. Any thoughts you might have would be appreciated.Thanks,-NickOn Wednesday, January 18, 2017 at 5:34:44 PM UTC-8, Bush wrote:
Yes. You can either build it into the kernel or as a module. The "usb-nop-xceiv" binding corresponds to the driver at drivers/usb/phy/phy-generic.c and is documented at https://github.com/krtkl/snickerdoodle-linux/blob/master/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txtLet me know if you are able to get it working or have persistent issues.
On Wednesday, January 18, 2017 at 5:20:09 PM UTC-8, Nick Burkitt wrote:Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-NickOn Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - And I see this in dmesg:[ 1.741935] usb-vbus-regulator: disabling
That can't be good.
-NickOn Tuesday, February 14, 2017 at 12:17:41 PM UTC-8, Nick Burkitt wrote:I'm back from DC, and looking at USB again. Our hardware guy has gone over the board and given it his blessing, so it's almost certainly a software/setup issue. We're using your reference design, with one exception – the reset line is controlled directly by the FPGA. But that appears to be functioning properly. I've tried the devicetree source you suggested, with the gpio line commented out. The sysfs files for the hub are present in /sys/bus/usb, but I never get 5 V on the USB Vbus line, and the regulator's EN input is always false.This is what my devicetree.dtb looks like, de-compiled:phy0 {compatible = "usb-nop-xceiv";vbus-regulator = <0x9>;#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};fixedregulator@2 {compatible = "regulator-fixed";regulator-name = "usb-vbus-regulator";regulator-min-microvolt = <0x1b7740>;regulator-max-microvolt = <0x1b7740>;startup-delay-us = <0x11170>;regulator-boot-on;enable-active-high;linux,phandle = <0x9>;phandle = <0x9>;};usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x3>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;};Any ideas of what to try next?Thanks,-NickOn Friday, February 3, 2017 at 2:37:06 PM UTC-8, Bush wrote:
There are several optional device tree bindings for resets and vbus regulation that can be attached to the phy node. If you have a GPIO from J3 being used to set/reset your supplies, you need to create a node for that GPIO and reference the phy node.usb_phy0: phy0 { compatible = "usb-nop-xceiv"; #phy-cells = <0>; vbus-regulator = <&usb0_vbus_regulator>; };
usb0_vbus_regulator: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "usb-vbus-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
startup-delay-us = <70000>;
regulator-boot-on;
enable-active-high
gpio = <&gpio0 52 0>;
};As for ethernet, you can add a MAC address specification to your network/interfaces or (preferably) your network/interfaces.d/ file within your ethernet interface specification:
hwaddress ether 02:01:02:03:04:08
On Monday, January 30, 2017 at 1:41:38 PM UTC-8, Nick Burkitt wrote:Hi Ryan.Nope, I haven't found a way forward yet. And now that problem has a little friend – setting the Ethernet MAC address.Thanks,-NickOn Monday, January 30, 2017 at 9:55:42 AM UTC-8, Cousins wrote:
Hey Nick,Just wondering if you ever got this resolved? If not, I'll walk down the hall and throw a flash bang into the snickerdoodle Customer Support Center…-RyanOn Tuesday, January 24, 2017 at 5:05:30 PM UTC-8, Nick Burkitt wrote:
I've tracked down the proximate cause of my trouble to the CPEN output of the 3315, which stays low always. Is there some additional magic that needs to be enabled in the kernel configuration? Like ULPI PHY interface support?Thanks,-NickOn Thursday, January 19, 2017 at 11:17:52 AM UTC-8, Nick Burkitt wrote:
Quick question: Is this a bad thing?[ 1.306764] e0002000.usb supply vbus not found, using dummy regulatorThanks,
-NickOn Wednesday, January 18, 2017 at 8:01:31 PM UTC-8, Nick Burkitt wrote:Hey! That seems to have done the trick. At least I now have a couple of entries in /sys/bus/usb/devices. Thanks!Now – what does it take to mount a USB SD card reader? Or maybe I'll go home now. :-)Thanks again – I'd have been flailing for days!-NickOn Wednesday, January 18, 2017 at 7:28:48 PM UTC-8, Bush wrote:
Can you confirm that you have enabled the USB peripheral in your hardware project? Also, Can you post a dmsg showing the USB bring-up messages/errors? I know people have had problems placing the phy DTS node within the USB node. I'm not exactly sure why that can be an issue but you may try putting the phy declaration at the "root" level (/) of your DTS. This is a known working config for the piSmasher baseboard (from fdtdump):
/ {
amba {
…
usb@e0002000 {
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
status = "okay";
clocks = <0x00000001 0x000000ba>;
interrupt-parent = <0x00000003>;
interrupts = <0x00000000 0x00000008 0x00000003>;
reg = <0xe0002000 0x000003c4>;
phy_type = "ulpi";
dr_mode = "host";
usb-phy = <0x00000008>;
};
…
};
….
phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x00000000>;
linux,phandle = <0x00000008>;
phandle = <0x00000008>;
};
};On Wednesday, January 18, 2017 at 7:17:07 PM UTC-8, Nick Burkitt wrote:
Interestingly, selecting "NOP USB Transceiver Driver" in the config menu makes "Generic ULPI Tranceiver Driver" appear as well. So I selected that, too. Both are now built-in. But still no joy. We're using your reference design, with the exception of allowing software control (via the FPGA) of the reset line.Here's the full USB devicetree node, reverse compiled from the DTB:usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x4>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;phy0 {compatible = "usb-nop-xceiv";#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};};I've run a test in which I reset the PHY at a rate of 1 Hz (~50 ms reset pulse width) and scoped the data lines. I would expect to see something data-ish as the PHY looks for attached devices, but all I see is the tiniest of blips – maybe 250 mV for 200-300 microseconds. I'm guessing switching noise?I"m not sure what to look at next. Any thoughts you might have would be appreciated.Thanks,-NickOn Wednesday, January 18, 2017 at 5:34:44 PM UTC-8, Bush wrote:
Yes. You can either build it into the kernel or as a module. The "usb-nop-xceiv" binding corresponds to the driver at drivers/usb/phy/phy-generic.c and is documented at https://github.com/krtkl/snickerdoodle-linux/blob/master/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txtLet me know if you are able to get it working or have persistent issues.
On Wednesday, January 18, 2017 at 5:20:09 PM UTC-8, Nick Burkitt wrote:Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-NickOn Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - On second thought (and much code spelunking),that's not likely an issue.But – I don't think the PHY is being detected. Do I need to enable additional drivers/kernel features? OTG support? Something else?Thanks,-NickOn Tuesday, February 14, 2017 at 1:42:12 PM UTC-8, Nick Burkitt wrote:And I see this in dmesg:[ 1.741935] usb-vbus-regulator: disabling
That can't be good.
-NickOn Tuesday, February 14, 2017 at 12:17:41 PM UTC-8, Nick Burkitt wrote:I'm back from DC, and looking at USB again. Our hardware guy has gone over the board and given it his blessing, so it's almost certainly a software/setup issue. We're using your reference design, with one exception – the reset line is controlled directly by the FPGA. But that appears to be functioning properly. I've tried the devicetree source you suggested, with the gpio line commented out. The sysfs files for the hub are present in /sys/bus/usb, but I never get 5 V on the USB Vbus line, and the regulator's EN input is always false.This is what my devicetree.dtb looks like, de-compiled:phy0 {compatible = "usb-nop-xceiv";vbus-regulator = <0x9>;#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};fixedregulator@2 {compatible = "regulator-fixed";regulator-name = "usb-vbus-regulator";regulator-min-microvolt = <0x1b7740>;regulator-max-microvolt = <0x1b7740>;startup-delay-us = <0x11170>;regulator-boot-on;enable-active-high;linux,phandle = <0x9>;phandle = <0x9>;};usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x3>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;};Any ideas of what to try next?Thanks,-NickOn Friday, February 3, 2017 at 2:37:06 PM UTC-8, Bush wrote:
There are several optional device tree bindings for resets and vbus regulation that can be attached to the phy node. If you have a GPIO from J3 being used to set/reset your supplies, you need to create a node for that GPIO and reference the phy node.usb_phy0: phy0 { compatible = "usb-nop-xceiv"; #phy-cells = <0>; vbus-regulator = <&usb0_vbus_regulator>; };
usb0_vbus_regulator: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "usb-vbus-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
startup-delay-us = <70000>;
regulator-boot-on;
enable-active-high
gpio = <&gpio0 52 0>;
};As for ethernet, you can add a MAC address specification to your network/interfaces or (preferably) your network/interfaces.d/ file within your ethernet interface specification:
hwaddress ether 02:01:02:03:04:08
On Monday, January 30, 2017 at 1:41:38 PM UTC-8, Nick Burkitt wrote:Hi Ryan.Nope, I haven't found a way forward yet. And now that problem has a little friend – setting the Ethernet MAC address.Thanks,-NickOn Monday, January 30, 2017 at 9:55:42 AM UTC-8, Cousins wrote:
Hey Nick,Just wondering if you ever got this resolved? If not, I'll walk down the hall and throw a flash bang into the snickerdoodle Customer Support Center…-RyanOn Tuesday, January 24, 2017 at 5:05:30 PM UTC-8, Nick Burkitt wrote:
I've tracked down the proximate cause of my trouble to the CPEN output of the 3315, which stays low always. Is there some additional magic that needs to be enabled in the kernel configuration? Like ULPI PHY interface support?Thanks,-NickOn Thursday, January 19, 2017 at 11:17:52 AM UTC-8, Nick Burkitt wrote:
Quick question: Is this a bad thing?[ 1.306764] e0002000.usb supply vbus not found, using dummy regulatorThanks,
-NickOn Wednesday, January 18, 2017 at 8:01:31 PM UTC-8, Nick Burkitt wrote:Hey! That seems to have done the trick. At least I now have a couple of entries in /sys/bus/usb/devices. Thanks!Now – what does it take to mount a USB SD card reader? Or maybe I'll go home now. :-)Thanks again – I'd have been flailing for days!-NickOn Wednesday, January 18, 2017 at 7:28:48 PM UTC-8, Bush wrote:
Can you confirm that you have enabled the USB peripheral in your hardware project? Also, Can you post a dmsg showing the USB bring-up messages/errors? I know people have had problems placing the phy DTS node within the USB node. I'm not exactly sure why that can be an issue but you may try putting the phy declaration at the "root" level (/) of your DTS. This is a known working config for the piSmasher baseboard (from fdtdump):
/ {
amba {
…
usb@e0002000 {
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
status = "okay";
clocks = <0x00000001 0x000000ba>;
interrupt-parent = <0x00000003>;
interrupts = <0x00000000 0x00000008 0x00000003>;
reg = <0xe0002000 0x000003c4>;
phy_type = "ulpi";
dr_mode = "host";
usb-phy = <0x00000008>;
};
…
};
….
phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x00000000>;
linux,phandle = <0x00000008>;
phandle = <0x00000008>;
};
};On Wednesday, January 18, 2017 at 7:17:07 PM UTC-8, Nick Burkitt wrote:
Interestingly, selecting "NOP USB Transceiver Driver" in the config menu makes "Generic ULPI Tranceiver Driver" appear as well. So I selected that, too. Both are now built-in. But still no joy. We're using your reference design, with the exception of allowing software control (via the FPGA) of the reset line.Here's the full USB devicetree node, reverse compiled from the DTB:usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x4>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;phy0 {compatible = "usb-nop-xceiv";#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};};I've run a test in which I reset the PHY at a rate of 1 Hz (~50 ms reset pulse width) and scoped the data lines. I would expect to see something data-ish as the PHY looks for attached devices, but all I see is the tiniest of blips – maybe 250 mV for 200-300 microseconds. I'm guessing switching noise?I"m not sure what to look at next. Any thoughts you might have would be appreciated.Thanks,-NickOn Wednesday, January 18, 2017 at 5:34:44 PM UTC-8, Bush wrote:
Yes. You can either build it into the kernel or as a module. The "usb-nop-xceiv" binding corresponds to the driver at drivers/usb/phy/phy-generic.c and is documented at https://github.com/krtkl/snickerdoodle-linux/blob/master/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txtLet me know if you are able to get it working or have persistent issues.
On Wednesday, January 18, 2017 at 5:20:09 PM UTC-8, Nick Burkitt wrote:Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-NickOn Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - Hi Nick,
Sorry for the late response. Have you had any luck with the USB? I have a couple questions about your setup. Your enable pin for the USB PHY is coming from the FPGA? If so, do you have a devicetree node for the GPIO controlling that FPGA pin? Are you using EMIO or GPIO IP for the FPGA I/O? I think the removal of the gpio property from the regulator is causing the "disabling" message. Are you seeing any other messages about the USB (i.e. dmesg | grep "usb")?On Tuesday, February 14, 2017 at 4:05:55 PM UTC-8, Nick Burkitt wrote:
On second thought (and much code spelunking),that's not likely an issue.But – I don't think the PHY is being detected. Do I need to enable additional drivers/kernel features? OTG support? Something else?Thanks,-NickOn Tuesday, February 14, 2017 at 1:42:12 PM UTC-8, Nick Burkitt wrote:And I see this in dmesg:[ 1.741935] usb-vbus-regulator: disablingThat can't be good.
-NickOn Tuesday, February 14, 2017 at 12:17:41 PM UTC-8, Nick Burkitt wrote:I'm back from DC, and looking at USB again. Our hardware guy has gone over the board and given it his blessing, so it's almost certainly a software/setup issue. We're using your reference design, with one exception – the reset line is controlled directly by the FPGA. But that appears to be functioning properly. I've tried the devicetree source you suggested, with the gpio line commented out. The sysfs files for the hub are present in /sys/bus/usb, but I never get 5 V on the USB Vbus line, and the regulator's EN input is always false.This is what my devicetree.dtb looks like, de-compiled:phy0 {compatible = "usb-nop-xceiv";vbus-regulator = <0x9>;#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};fixedregulator@2 {compatible = "regulator-fixed";regulator-name = "usb-vbus-regulator";regulator-min-microvolt = <0x1b7740>;regulator-max-microvolt = <0x1b7740>;startup-delay-us = <0x11170>;regulator-boot-on;enable-active-high;linux,phandle = <0x9>;phandle = <0x9>;};usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x3>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;};Any ideas of what to try next?Thanks,-NickOn Friday, February 3, 2017 at 2:37:06 PM UTC-8, Bush wrote:
There are several optional device tree bindings for resets and vbus regulation that can be attached to the phy node. If you have a GPIO from J3 being used to set/reset your supplies, you need to create a node for that GPIO and reference the phy node.usb_phy0: phy0 { compatible = "usb-nop-xceiv"; #phy-cells = <0>; vbus-regulator = <&usb0_vbus_regulator>; };
usb0_vbus_regulator: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "usb-vbus-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
startup-delay-us = <70000>;
regulator-boot-on;
enable-active-high
gpio = <&gpio0 52 0>;
};As for ethernet, you can add a MAC address specification to your network/interfaces or (preferably) your network/interfaces.d/ file within your ethernet interface specification:
hwaddress ether 02:01:02:03:04:08
On Monday, January 30, 2017 at 1:41:38 PM UTC-8, Nick Burkitt wrote:Hi Ryan.Nope, I haven't found a way forward yet. And now that problem has a little friend – setting the Ethernet MAC address.Thanks,-NickOn Monday, January 30, 2017 at 9:55:42 AM UTC-8, Cousins wrote:
Hey Nick,Just wondering if you ever got this resolved? If not, I'll walk down the hall and throw a flash bang into the snickerdoodle Customer Support Center…-RyanOn Tuesday, January 24, 2017 at 5:05:30 PM UTC-8, Nick Burkitt wrote:
I've tracked down the proximate cause of my trouble to the CPEN output of the 3315, which stays low always. Is there some additional magic that needs to be enabled in the kernel configuration? Like ULPI PHY interface support?Thanks,-NickOn Thursday, January 19, 2017 at 11:17:52 AM UTC-8, Nick Burkitt wrote:
Quick question: Is this a bad thing?[ 1.306764] e0002000.usb supply vbus not found, using dummy regulatorThanks,
-NickOn Wednesday, January 18, 2017 at 8:01:31 PM UTC-8, Nick Burkitt wrote:Hey! That seems to have done the trick. At least I now have a couple of entries in /sys/bus/usb/devices. Thanks!Now – what does it take to mount a USB SD card reader? Or maybe I'll go home now. :-)Thanks again – I'd have been flailing for days!-NickOn Wednesday, January 18, 2017 at 7:28:48 PM UTC-8, Bush wrote:
Can you confirm that you have enabled the USB peripheral in your hardware project? Also, Can you post a dmsg showing the USB bring-up messages/errors? I know people have had problems placing the phy DTS node within the USB node. I'm not exactly sure why that can be an issue but you may try putting the phy declaration at the "root" level (/) of your DTS. This is a known working config for the piSmasher baseboard (from fdtdump):
/ {
amba {
…
usb@e0002000 {
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
status = "okay";
clocks = <0x00000001 0x000000ba>;
interrupt-parent = <0x00000003>;
interrupts = <0x00000000 0x00000008 0x00000003>;
reg = <0xe0002000 0x000003c4>;
phy_type = "ulpi";
dr_mode = "host";
usb-phy = <0x00000008>;
};
…
};
….
phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x00000000>;
linux,phandle = <0x00000008>;
phandle = <0x00000008>;
};
};On Wednesday, January 18, 2017 at 7:17:07 PM UTC-8, Nick Burkitt wrote:
Interestingly, selecting "NOP USB Transceiver Driver" in the config menu makes "Generic ULPI Tranceiver Driver" appear as well. So I selected that, too. Both are now built-in. But still no joy. We're using your reference design, with the exception of allowing software control (via the FPGA) of the reset line.Here's the full USB devicetree node, reverse compiled from the DTB:usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x4>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;phy0 {compatible = "usb-nop-xceiv";#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};};I've run a test in which I reset the PHY at a rate of 1 Hz (~50 ms reset pulse width) and scoped the data lines. I would expect to see something data-ish as the PHY looks for attached devices, but all I see is the tiniest of blips – maybe 250 mV for 200-300 microseconds. I'm guessing switching noise?I"m not sure what to look at next. Any thoughts you might have would be appreciated.Thanks,-NickOn Wednesday, January 18, 2017 at 5:34:44 PM UTC-8, Bush wrote:
Yes. You can either build it into the kernel or as a module. The "usb-nop-xceiv" binding corresponds to the driver at drivers/usb/phy/phy-generic.c and is documented at https://github.com/krtkl/snickerdoodle-linux/blob/master/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txtLet me know if you are able to get it working or have persistent issues.
On Wednesday, January 18, 2017 at 5:20:09 PM UTC-8, Nick Burkitt wrote:Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-NickOn Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick - Hi Bush.Thanks – the final issue with USB was the most obvious – it wasn't connected to the Zynq's USB controller. All seems well now.We're having trouble, though with Ethernet on the rev. 4.2 board. The change from 1.8 to 3.3 V on J3-P1 caught us out initially, but even after correcting for that change, we can't get Ethernet working. We've only tried one 4.2 board so far. We'll patch and try a second one today and see what happens.Thanks again,-Nick
On Tuesday, February 14, 2017 at 4:05:55 PM UTC-8, Nick Burkitt wrote:
On second thought (and much code spelunking),that's not likely an issue.But – I don't think the PHY is being detected. Do I need to enable additional drivers/kernel features? OTG support? Something else?Thanks,-NickOn Tuesday, February 14, 2017 at 1:42:12 PM UTC-8, Nick Burkitt wrote:And I see this in dmesg:[ 1.741935] usb-vbus-regulator: disablingThat can't be good.
-NickOn Tuesday, February 14, 2017 at 12:17:41 PM UTC-8, Nick Burkitt wrote:I'm back from DC, and looking at USB again. Our hardware guy has gone over the board and given it his blessing, so it's almost certainly a software/setup issue. We're using your reference design, with one exception – the reset line is controlled directly by the FPGA. But that appears to be functioning properly. I've tried the devicetree source you suggested, with the gpio line commented out. The sysfs files for the hub are present in /sys/bus/usb, but I never get 5 V on the USB Vbus line, and the regulator's EN input is always false.This is what my devicetree.dtb looks like, de-compiled:phy0 {compatible = "usb-nop-xceiv";vbus-regulator = <0x9>;#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};fixedregulator@2 {compatible = "regulator-fixed";regulator-name = "usb-vbus-regulator";regulator-min-microvolt = <0x1b7740>;regulator-max-microvolt = <0x1b7740>;startup-delay-us = <0x11170>;regulator-boot-on;enable-active-high;linux,phandle = <0x9>;phandle = <0x9>;};usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x3>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;};Any ideas of what to try next?Thanks,-NickOn Friday, February 3, 2017 at 2:37:06 PM UTC-8, Bush wrote:
There are several optional device tree bindings for resets and vbus regulation that can be attached to the phy node. If you have a GPIO from J3 being used to set/reset your supplies, you need to create a node for that GPIO and reference the phy node.usb_phy0: phy0 { compatible = "usb-nop-xceiv"; #phy-cells = <0>; vbus-regulator = <&usb0_vbus_regulator>; };
usb0_vbus_regulator: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "usb-vbus-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
startup-delay-us = <70000>;
regulator-boot-on;
enable-active-high
gpio = <&gpio0 52 0>;
};As for ethernet, you can add a MAC address specification to your network/interfaces or (preferably) your network/interfaces.d/ file within your ethernet interface specification:
hwaddress ether 02:01:02:03:04:08
On Monday, January 30, 2017 at 1:41:38 PM UTC-8, Nick Burkitt wrote:Hi Ryan.Nope, I haven't found a way forward yet. And now that problem has a little friend – setting the Ethernet MAC address.Thanks,-NickOn Monday, January 30, 2017 at 9:55:42 AM UTC-8, Cousins wrote:
Hey Nick,Just wondering if you ever got this resolved? If not, I'll walk down the hall and throw a flash bang into the snickerdoodle Customer Support Center…-RyanOn Tuesday, January 24, 2017 at 5:05:30 PM UTC-8, Nick Burkitt wrote:
I've tracked down the proximate cause of my trouble to the CPEN output of the 3315, which stays low always. Is there some additional magic that needs to be enabled in the kernel configuration? Like ULPI PHY interface support?Thanks,-NickOn Thursday, January 19, 2017 at 11:17:52 AM UTC-8, Nick Burkitt wrote:
Quick question: Is this a bad thing?[ 1.306764] e0002000.usb supply vbus not found, using dummy regulatorThanks,
-NickOn Wednesday, January 18, 2017 at 8:01:31 PM UTC-8, Nick Burkitt wrote:Hey! That seems to have done the trick. At least I now have a couple of entries in /sys/bus/usb/devices. Thanks!Now – what does it take to mount a USB SD card reader? Or maybe I'll go home now. :-)Thanks again – I'd have been flailing for days!-NickOn Wednesday, January 18, 2017 at 7:28:48 PM UTC-8, Bush wrote:
Can you confirm that you have enabled the USB peripheral in your hardware project? Also, Can you post a dmsg showing the USB bring-up messages/errors? I know people have had problems placing the phy DTS node within the USB node. I'm not exactly sure why that can be an issue but you may try putting the phy declaration at the "root" level (/) of your DTS. This is a known working config for the piSmasher baseboard (from fdtdump):
/ {
amba {
…
usb@e0002000 {
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
status = "okay";
clocks = <0x00000001 0x000000ba>;
interrupt-parent = <0x00000003>;
interrupts = <0x00000000 0x00000008 0x00000003>;
reg = <0xe0002000 0x000003c4>;
phy_type = "ulpi";
dr_mode = "host";
usb-phy = <0x00000008>;
};
…
};
….
phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x00000000>;
linux,phandle = <0x00000008>;
phandle = <0x00000008>;
};
};On Wednesday, January 18, 2017 at 7:17:07 PM UTC-8, Nick Burkitt wrote:
Interestingly, selecting "NOP USB Transceiver Driver" in the config menu makes "Generic ULPI Tranceiver Driver" appear as well. So I selected that, too. Both are now built-in. But still no joy. We're using your reference design, with the exception of allowing software control (via the FPGA) of the reset line.Here's the full USB devicetree node, reverse compiled from the DTB:usb@e0002000 {compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";status = "okay";clocks = <0x1 0x1c>;interrupt-parent = <0x3>;interrupts = <0x0 0x15 0x4>;reg = <0xe0002000 0x1000>;phy_type = "ulpi";dr_mode = "host";usb-phy = <0x8>;phy0 {compatible = "usb-nop-xceiv";#phy-cells = <0x0>;linux,phandle = <0x8>;phandle = <0x8>;};};I've run a test in which I reset the PHY at a rate of 1 Hz (~50 ms reset pulse width) and scoped the data lines. I would expect to see something data-ish as the PHY looks for attached devices, but all I see is the tiniest of blips – maybe 250 mV for 200-300 microseconds. I'm guessing switching noise?I"m not sure what to look at next. Any thoughts you might have would be appreciated.Thanks,-NickOn Wednesday, January 18, 2017 at 5:34:44 PM UTC-8, Bush wrote:
Yes. You can either build it into the kernel or as a module. The "usb-nop-xceiv" binding corresponds to the driver at drivers/usb/phy/phy-generic.c and is documented at https://github.com/krtkl/snickerdoodle-linux/blob/master/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txtLet me know if you are able to get it working or have persistent issues.
On Wednesday, January 18, 2017 at 5:20:09 PM UTC-8, Nick Burkitt wrote:Thanks – I presume I'll need to select "NOP USB Transceiver Driver" in my kernel configuration. Is that correct?-NickOn Wednesday, January 18, 2017 at 4:24:14 PM UTC-8, Bush wrote:
We have used the generic USB PHY device tree bindings with a USB3315. Try:usb_phy0: phy0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0x0>;
};with the USB node parameters same.
On Wednesday, January 18, 2017 at 4:14:42 PM UTC-8, Nick Burkitt wrote:
Hi Guys.I'm trying to bring up USB host on our custom baseboard. It's using a SMSC USB3315 PHY, and the level of documentation on Linux support is terrible, even by Linux standards. I found a Xilinx Wiki entry that looked promising…
Device Drivers USB support <*> Support for Host-side USB <*> EHCI HCD (USB 2.0) support <*> USB Mass Storage support <*> ChipIdea Highspeed Dual Role Controller <*> ChipIdea host controller USB Physical Layer drivers ---> <*> Generic ULPI Transceiver Driver…except that Generic ULPI Tranceiver Driver doesn't exist in USB Physical Layer drivers.Another Xilinx Wiki page shows a "Device Tree node:"usb_0: usb@e0002000 { compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2"; clocks = <&clkc 28> dr_mode = "host"; interrupt-parent = <&intc>; interrupts = <0 21 4>; reg = <0xe0002000 0x1000>; usb-phy = <&usb_phy0>; }; usb_phy0: phy0 { compatible = "ulpi-phy"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port = <0x170>; drv-vbus; }that makes DTC barf. And lacks any explanation of the included parameters.I can't find any specific mention of the PHY in any devicetree documentation, either.Has anyone figured out the magic incantations required to get USB host to work on snickerdoodle? Or any Zynq-7000 board?Thanks,-Nick
- AuthorPosts
- You must be logged in to reply to this topic.