ARM: dts: Keystone II USB nodes
Subsystems (3)
v3 cover ARM: dts: Keystone II USB nodes
Here is the separated dts series which addresses comments from earlier version [1].
Series adds USB host dts nodes for Keystone SOCs. Keystone SOCs uses dwc3 hardware IP implementation. We use no-op phy driver.
Patchset are tested on Keystone II EVM with USB2.0 and USB3.0 flash drives.
WingMan Kwok (3):
ARM: dts: keystone: Add usb phy devicetree bindings
ARM: dts: keystone: Add usb devicetree bindings
ARM: keystone: defconfig: enable USB support
.../devicetree/bindings/usb/keystone-phy.txt | 20 ++++++++++ .../devicetree/bindings/usb/keystone-usb.txt | 42 ++++++++++++++++++++ arch/arm/boot/dts/k2hk-evm.dts | 8 ++++ arch/arm/boot/dts/keystone.dtsi | 27 +++++++++++++ arch/arm/configs/keystone_defconfig | 20 +++++++++- 5 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/usb/keystone-phy.txt create mode 100644 Documentation/devicetree/bindings/usb/keystone-usb.txt
[1] http://www.spinics.net/lists/linux-usb/msg98861.html
Signature · 1 line
1.7.9.5
PATCH v3 1/3 ARM: dts: keystone: Add usb phy devicetree bindings
Added device tree support for TI's Keystone USB PHY driver and updated the Documentation with device tree binding information.
--- .../devicetree/bindings/usb/keystone-phy.txt | 20 ++++++++++++++++++++ arch/arm/boot/dts/keystone.dtsi | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/keystone-phy.txt
Documentation/devicetree/bindings/usb/keystone-phy.txt new file +20 -0
@@ -0,0 +1,20 @@ +TI Keystone USB PHY + +Required properties: + - compatible: should be "ti,keystone-usbphy". + - #address-cells, #size-cells : should be '1' if the device has sub-nodes + with 'reg' property. + - reg : Address and length of the usb phy control register set. + +The main purpose of this PHY driver is to enable the USB PHY reference clock +gate on the Keystone SOC for both the USB2 and USB3 PHY. Otherwise it is just +an NOP PHY driver. Hence this node is referenced as both the usb2 and usb3 +phy node in the USB Glue layer driver node. + +usb_phy: usb_phy at 2620738 { + compatible = "ti,keystone-usbphy"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x2620738 32>; + status = "disabled"; +};
arch/arm/boot/dts/keystone.dtsi +8 -0
@@ -181,5 +181,13 @@ interrupts = <GIC_SPI 300 IRQ_TYPE_EDGE_RISING>; clocks = <&clkspi>; }; + + usb_phy: usb_phy at 2620738 { + compatible = "ti,keystone-usbphy"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x2620738 32>; + status = "disabled"; + }; }; };
Signature · 1 line
1.7.9.5
PATCH v3 2/3 ARM: dts: keystone: Add usb devicetree bindings
In reply to WingMan KwokAdded device tree support for TI's Keystone USB driver and updated the Documentation with device tree binding information.
--- .../devicetree/bindings/usb/keystone-usb.txt | 42 ++++++++++++++++++++ arch/arm/boot/dts/k2hk-evm.dts | 8 ++++ arch/arm/boot/dts/keystone.dtsi | 19 +++++++++ 3 files changed, 69 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/keystone-usb.txt
Documentation/devicetree/bindings/usb/keystone-usb.txt new file +42 -0
@@ -0,0 +1,42 @@ +TI Keystone Soc USB Controller + +DWC3 GLUE + +Required properties: + - compatible: should be "ti,keystone-dwc3". + - #address-cells, #size-cells : should be '1' if the device has sub-nodes + with 'reg' property. + - reg : Address and length of the register set for the USB subsystem on + the SOC. + - interrupts : The irq number of this device that is used to interrupt the + MPU. + - ranges: allows valid 1:1 translation between child's address space and + parent's address space. + - clocks: Clock IDs array as required by the controller. + - clock-names: names of clocks correseponding to IDs in the clock property. + +Sub-nodes: +The dwc3 core should be added as subnode to Keystone DWC3 glue. +- dwc3 : + The binding details of dwc3 can be found in: + Documentation/devicetree/bindings/usb/dwc3.txt + +Example: + usb: usb at 2680000 { + compatible = "ti,keystone-dwc3"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x2680000 0x10000>; + clocks = <&clkusb>; + clock-names = "usb"; + interrupts = <GIC_SPI 393 IRQ_TYPE_EDGE_RISING>; + ranges; + status = "disabled"; + + dwc3 at 2690000 { + compatible = "synopsys,dwc3"; + reg = <0x2690000 0x70000>; + interrupts = <GIC_SPI 393 IRQ_TYPE_EDGE_RISING>; + usb-phy = <&usb_phy>, <&usb_phy>; + }; + };
arch/arm/boot/dts/k2hk-evm.dts +8 -0
@@ -53,3 +53,11 @@ }; }; }; + +&usb_phy { + status = "okay"; +}; + +&usb { + status = "okay"; +};
arch/arm/boot/dts/keystone.dtsi +19 -0
@@ -189,5 +189,24 @@ reg = <0x2620738 32>; status = "disabled"; }; + + usb: usb at 2680000 { + compatible = "ti,keystone-dwc3"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x2680000 0x10000>; + clocks = <&clkusb>; + clock-names = "usb"; + interrupts = <GIC_SPI 393 IRQ_TYPE_EDGE_RISING>; + ranges; + status = "disabled"; + + dwc3 at 2690000 { + compatible = "synopsys,dwc3"; + reg = <0x2690000 0x70000>; + interrupts = <GIC_SPI 393 IRQ_TYPE_EDGE_RISING>; + usb-phy = <&usb_phy>, <&usb_phy>; + }; + }; }; };
Signature · 1 line
1.7.9.5
PATCH v3 3/3 ARM: keystone: defconfig: enable USB support
In reply to WingMan KwokEnable the USB support (Host mode only) on TI's Keystone platform. It also enables the support of usb mass storage, FAT and Ext4 filesystems to test rootfs mount over an USB disk.
--- arch/arm/configs/keystone_defconfig | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
arch/arm/configs/keystone_defconfig +19 -1
@@ -115,6 +115,8 @@ CONFIG_MTD_UBI=y CONFIG_PROC_DEVICETREE=y CONFIG_BLK_DEV_LOOP=y CONFIG_EEPROM_AT24=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y CONFIG_NETDEVICES=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y
@@ -129,10 +131,24 @@ CONFIG_SPI_DAVINCI=y CONFIG_SPI_SPIDEV=y # CONFIG_HWMON is not set CONFIG_WATCHDOG=y -# CONFIG_USB_SUPPORT is not set +CONFIG_USB=y +CONFIG_USB_DEBUG=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_MON=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_DEBUG=y +CONFIG_USB_DWC3_VERBOSE=y +CONFIG_KEYSTONE_USB_PHY=y CONFIG_DMADEVICES=y CONFIG_COMMON_CLK_DEBUG=y CONFIG_MEMORY=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_NTFS_FS=y CONFIG_TMPFS=y CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_WBUF_VERIFY=y
@@ -144,6 +160,8 @@ CONFIG_ROOT_NFS=y CONFIG_NFSD=y CONFIG_NFSD_V3=y CONFIG_NFSD_V3_ACL=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y CONFIG_PRINTK_TIME=y CONFIG_DEBUG_SHIRQ=y CONFIG_DEBUG_INFO=y
Signature · 1 line
1.7.9.5
v3 cover ARM: dts: Keystone II USB nodes
In reply to WingMan KwokQuoted 6 lines · WingMan Kwok
Here is the separated dts series which addresses comments from earlier version [1].
Series adds USB host dts nodes for Keystone SOCs. Keystone SOCs uses dwc3 hardware IP implementation. We use no-op phy driver.
Quoted 9 lines
Patchset are tested on Keystone II EVM with USB2.0 and USB3.0 flash drives.
Cc Santosh Shilimkar <[email protected]>WingMan Kwok (3):
ARM: dts: keystone: Add usb phy devicetree bindings
ARM: dts: keystone: Add usb devicetree bindings
ARM: keystone: defconfig: enable USB support
The USB driver is merged toward 3.14 now so I will take these in my 3.14 queue.
Thanks for the patches.
Regards,
Santosh