ARM: dts: omap: Add dts data for USB
Subsystems (3)
v2 cover ARM: dts: omap: Add dts data for USB
Hi Benoit,
Here are the dt data patches to get usb device functional in OMAP platforms. This series applies cleanly in both for_3.9/dts and 3.8-rc6.
All the patches deal with modifying arch/arm/boot except one which modifies Documentation/../usb/omap-usb.txt
Changes from v1:
Patch *ARM: dts: omap: Add usb_otg and glue data* has some properties with names that has "_". It's replaced with a "-" here.
This patch is developed on Linux 3.9-rc1.
Kishon Vijay Abraham I (8):
ARM: dts: omap: Add omap control usb data
ARM: dts: omap: Add omap-usb2 dt data
ARM: dts: omap: Add usb_otg and glue data
ARM: dts: omap5: Add omap control usb data
ARM: dts: omap5: Add ocp2scp data
ARM: dts: omap5: Add omap-usb3 and omap-usb2 dt data
ARM: dts: omap5: add dwc3 omap dt data
ARM: dts: omap5: add dwc3 core dt data
Documentation/devicetree/bindings/usb/omap-usb.txt | 1 + arch/arm/boot/dts/omap3-beagle-xm.dts | 6 +++ arch/arm/boot/dts/omap3-evm.dts | 6 +++ arch/arm/boot/dts/omap3-overo.dtsi | 6 +++ arch/arm/boot/dts/omap3.dtsi | 12 +++++ arch/arm/boot/dts/omap4-panda.dts | 6 +++ arch/arm/boot/dts/omap4-sdp.dts | 6 +++ arch/arm/boot/dts/omap4.dtsi | 26 +++++++++++ arch/arm/boot/dts/omap5.dtsi | 48 ++++++++++++++++++++ arch/arm/boot/dts/twl4030.dtsi | 2 +- 10 files changed, 118 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.10.4
PATCH v2 1/8 ARM: dts: omap: Add omap control usb data
Add omap control usb data in omap4 device tree file. This will have the register address of registers to power on the PHY and to write to mailbox. The information about this data node is available @ Documentation/devicetree/bindings/usb/omap-usb.txt
--- arch/arm/boot/dts/omap4.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/omap4.dtsi +8 -0
@@ -529,5 +529,13 @@ ti,hwmods = "timer11"; ti,timer-pwm; }; + + omap_control_usb: omap-control-usb at 4a002300 { + compatible = "ti,omap-control-usb"; + reg = <0x4a002300 0x4>, + <0x4a00233c 0x4>; + reg-names = "control_dev_conf", "otghs_control"; + ti,type = <1>; + }; }; };
Signature · 1 line
1.7.10.4
PATCH v2 2/8 ARM: dts: omap: Add omap-usb2 dt data
In reply to Kishon Vijay Abraham IAdd omap-usb2 data node in omap4 device tree file. Since omap-usb2 is connected to ocp2scp, omap-usb2 dt data is added as a child node of ocp2scp. The information about this data node is availabe @ Documentation/devicetree/bindings/usb/usb-phy.txt
--- arch/arm/boot/dts/omap4.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/omap4.dtsi +5 -0
@@ -438,6 +438,11 @@ #size-cells = <1>; ranges; ti,hwmods = "ocp2scp_usb_phy"; + usb2_phy: usb2phy at 4a0ad080 { + compatible = "ti,omap-usb2"; + reg = <0x4a0ad080 0x58>; + ctrl-module = <&omap_control_usb>; + }; }; timer1: timer at 4a318000 {
Signature · 1 line
1.7.10.4
PATCH v2 3/8 ARM: dts: omap: Add usb_otg and glue data
In reply to Kishon Vijay Abraham IAdd usb otg data node in omap4/omap3 device tree file. Also update the node with board specific setting in omapx-<board>.dts file. The dt data specifies among others the interface type (ULPI or UTMI), mode which is mostly OTG, power that specifies the amount of power this can supply when in host mode.
The information about usb otg node is available @ Documentation/devicetree/bindings/usb/omap-usb.txt
--- Documentation/devicetree/bindings/usb/omap-usb.txt | 1 + arch/arm/boot/dts/omap3-beagle-xm.dts | 6 ++++++ arch/arm/boot/dts/omap3-evm.dts | 6 ++++++ arch/arm/boot/dts/omap3-overo.dtsi | 6 ++++++ arch/arm/boot/dts/omap3.dtsi | 12 ++++++++++++ arch/arm/boot/dts/omap4-panda.dts | 6 ++++++ arch/arm/boot/dts/omap4-sdp.dts | 6 ++++++ arch/arm/boot/dts/omap4.dtsi | 13 +++++++++++++ arch/arm/boot/dts/twl4030.dtsi | 2 +- 9 files changed, 57 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/usb/omap-usb.txt +1 -0
@@ -18,6 +18,7 @@ OMAP MUSB GLUE represents PERIPHERAL. - power : Should be "50". This signifies the controller can supply upto 100mA when operating in host mode. + - usb-phy : the phandle for the PHY device Optional properties: - ctrl-module : phandle of the control module this glue uses to write to
arch/arm/boot/dts/omap3-beagle-xm.dts +6 -0
@@ -107,3 +107,9 @@ */ ti,pulldowns = <0x03a1c4>; }; + +&usb_otg_hs { + interface-type = <0>; + mode = <3>; + power = <50>; +};
arch/arm/boot/dts/omap3-evm.dts +6 -0
@@ -59,3 +59,9 @@ &twl_gpio { ti,use-leds; }; + +&usb_otg_hs { + interface-type = <0>; + mode = <3>; + power = <50>; +};
arch/arm/boot/dts/omap3-overo.dtsi +6 -0
@@ -55,3 +55,9 @@ &twl_gpio { ti,use-leds; }; + +&usb_otg_hs { + interface-type = <0>; + mode = <3>; + power = <50>; +};
arch/arm/boot/dts/omap3.dtsi +12 -0
@@ -397,5 +397,17 @@ ti,timer-alwon; ti,timer-secure; }; + + usb_otg_hs: usb_otg_hs at 480ab000 { + compatible = "ti,omap3-musb"; + reg = <0x480ab000 0x1000>; + interrupts = <0 92 0x4>, <0 93 0x4>; + interrupt-names = "mc", "dma"; + ti,hwmods = "usb_otg_hs"; + usb-phy = <&usb2_phy>; + multipoint = <1>; + num-eps = <16>; + ram-bits = <12>; + }; }; };
arch/arm/boot/dts/omap4-panda.dts +6 -0
@@ -206,3 +206,9 @@ &twl_usb_comparator { usb-supply = <&vusb>; }; + +&usb_otg_hs { + interface-type = <1>; + mode = <3>; + power = <50>; +};
arch/arm/boot/dts/omap4-sdp.dts +6 -0
@@ -428,3 +428,9 @@ &twl_usb_comparator { usb-supply = <&vusb>; }; + +&usb_otg_hs { + interface-type = <1>; + mode = <3>; + power = <50>; +};
arch/arm/boot/dts/omap4.dtsi +13 -0
@@ -542,5 +542,18 @@ reg-names = "control_dev_conf", "otghs_control"; ti,type = <1>; }; + + usb_otg_hs: usb_otg_hs at 4a0ab000 { + compatible = "ti,omap4-musb"; + reg = <0x4a0ab000 0x7ff>; + interrupts = <0 92 0x4>, <0 93 0x4>; + interrupt-names = "mc", "dma"; + ti,hwmods = "usb_otg_hs"; + usb-phy = <&usb2_phy>; + multipoint = <1>; + num-eps = <16>; + ram-bits = <12>; + ti,has-mailbox; + }; }; };
arch/arm/boot/dts/twl4030.dtsi +1 -1
@@ -67,7 +67,7 @@ #interrupt-cells = <1>; }; - twl4030-usb { + usb2_phy: twl4030-usb { compatible = "ti,twl4030-usb"; interrupts = <10>, <4>; usb1v5-supply = <&vusb1v5>;
Signature · 1 line
1.7.10.4
PATCH v2 4/8 ARM: dts: omap5: Add omap control usb data
In reply to Kishon Vijay Abraham IAdd omap control usb data in omap5 device tree file. This will have the register address of registers to power on the USB2 PHY and USB3 PHY. The information for the node added here is available in Documentation/devicetree/bindings/usb/omap-usb.txt
--- arch/arm/boot/dts/omap5.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/omap5.dtsi +8 -0
@@ -496,5 +496,13 @@ hw-caps-ll-interface; hw-caps-temp-alert; }; + + omap_control_usb: omap-control-usb at 4a002300 { + compatible = "ti,omap-control-usb"; + reg = <0x4a002300 0x4>, + <0x4a002370 0x4>; + reg-names = "control_dev_conf", "phy_power_usb"; + ti,type = <2>; + }; }; };
Signature · 1 line
1.7.10.4
PATCH v2 5/8 ARM: dts: omap5: Add ocp2scp data
In reply to Kishon Vijay Abraham IAdd ocp2scp data node in omap5 device tree file. The information for the node added here can be found @ Documentation/devicetree/bindings/bus/omap-ocp2scp.txt
--- arch/arm/boot/dts/omap5.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/omap5.dtsi +8 -0
@@ -504,5 +504,13 @@ reg-names = "control_dev_conf", "phy_power_usb"; ti,type = <2>; }; + + ocp2scp { + compatible = "ti,omap-ocp2scp"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + ti,hwmods = "ocp2scp1"; + }; }; };
Signature · 1 line
1.7.10.4
PATCH v2 6/8 ARM: dts: omap5: Add omap-usb3 and omap-usb2 dt data
In reply to Kishon Vijay Abraham IAdd omap-usb3 and omap-usb2 data node in omap5 device tree file. The information for the node added here is available @ Documentation/devicetree/bindings/usb/usb-phy.txt
--- arch/arm/boot/dts/omap5.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/omap5.dtsi +14 -0
@@ -511,6 +511,20 @@ #size-cells = <1>; ranges; ti,hwmods = "ocp2scp1"; + usb2_phy: usb2phy at 4a084000 { + compatible = "ti,omap-usb2"; + reg = <0x4a084000 0x7c>; + ctrl-module = <&omap_control_usb>; + }; + + usb3_phy: usb3phy at 4a084400 { + compatible = "ti,omap-usb3"; + reg = <0x4a084400 0x80>, + <0x4a084800 0x64>, + <0x4a084c00 0x40>; + reg-names = "phy_rx", "phy_tx", "pll_ctrl"; + ctrl-module = <&omap_control_usb>; + }; }; }; };
Signature · 1 line
1.7.10.4
PATCH v2 7/8 ARM: dts: omap5: add dwc3 omap dt data
In reply to Kishon Vijay Abraham IAdd dwc3 omap glue data to the omap5 dt data file. The information about the dt node added here is available @ Documentation/devicetree/bindings/usb/omap-usb.txt
--- arch/arm/boot/dts/omap5.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm/boot/dts/omap5.dtsi +11 -0
@@ -505,6 +505,17 @@ ti,type = <2>; }; + omap_dwc3 at 4a020000 { + compatible = "ti,dwc3"; + ti,hwmods = "usb_otg_ss"; + reg = <0x4a020000 0x1000>; + interrupts = <0 93 4>; + #address-cells = <1>; + #size-cells = <1>; + utmi-mode = <2>; + ranges; + }; + ocp2scp { compatible = "ti,omap-ocp2scp"; #address-cells = <1>;
Signature · 1 line
1.7.10.4
Re: [PATCH v2 7/8] ARM: dts: omap5: add dwc3 omap dt data
Hello.
Quoted 14 lines · Kishon Vijay Abraham I
Add dwc3 omap glue data to the omap5 dt data file. The information about the dt node added here is available @
Documentation/devicetree/bindings/usb/omap-usb.txtSigned-off-by Kishon Vijay Abraham I <[email protected]>--- arch/arm/boot/dts/omap5.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)arch/arm/boot/dts/omap5.dtsi +0
-0
arch/arm/boot/dts/omap5.dtsi line 514
Quoted 10 lines
arch/arm/boot/dts/omap5.dtsi +7
-0@@ -505,6 +505,17 @@ ti,type = <2>; }; + omap_dwc3 at 4a020000 { + compatible = "ti,dwc3"; + ti,hwmods = "usb_otg_ss"; + reg = <0x4a020000 0x1000>; + interrupts = <0 93 4>; + #address-cells = <1>; + #size-cells = <1>;
Why the above two props? You don't seem to have the subnodes...
WBR, Sergei
Re: [PATCH v2 7/8] ARM: dts: omap5: add dwc3 omap dt data
Hi,
Quoted 21 lines · Sergei Shtylyov
Hello.
Quoted 17 lines · Kishon Vijay Abraham I
Add dwc3 omap glue data to the omap5 dt data file. The information about the dt node added here is available @
Documentation/devicetree/bindings/usb/omap-usb.txtSigned-off-by Kishon Vijay Abraham I <[email protected]>--- arch/arm/boot/dts/omap5.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)arch/arm/boot/dts/omap5.dtsi +0
-0@@ -505,6 +505,17 @@ ti,type = <2>; };
Quoted 9 lines
arch/arm/boot/dts/omap5.dtsi line 514
Quoted 7 lines
arch/arm/boot/dts/omap5.dtsi +7
-0+ omap_dwc3 at 4a020000 { + compatible = "ti,dwc3"; + ti,hwmods = "usb_otg_ss"; + reg = <0x4a020000 0x1000>; + interrupts = <0 93 4>; + #address-cells = <1>; + #size-cells = <1>;Why the above two props? You don't seem to have the subnodes...
It's added in the next patch. Ok, Felipe has already pointed out to merge the two patches.
Thanks
Kishon
PATCH v2 8/8 ARM: dts: omap5: add dwc3 core dt data
In reply to Kishon Vijay Abraham IAdd dwc3 core dt data as a subnode to dwc3 omap glue data in omap5 dt data file. The information for the entered data node is available @ Documentation/devicetree/bindings/usb/dwc3.txt
--- arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/omap5.dtsi +7 -0
@@ -514,6 +514,13 @@ #size-cells = <1>; utmi-mode = <2>; ranges; + dwc3 at 4a030000 { + compatible = "synopsys,dwc3"; + reg = <0x4a030000 0x1000>; + interrupts = <0 92 4>; + usb-phy = <&usb2_phy>, <&usb3_phy>; + tx-fifo-resize; + }; }; ocp2scp {
Signature · 1 line
1.7.10.4
Re: [PATCH v2 8/8] ARM: dts: omap5: add dwc3 core dt data
Hi,
Quoted 14 lines · Kishon Vijay Abraham I
Add dwc3 core dt data as a subnode to dwc3 omap glue data in omap5 dt data file. The information for the entered data node is available @
Documentation/devicetree/bindings/usb/dwc3.txtSigned-off-by Kishon Vijay Abraham I <[email protected]>--- arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)arch/arm/boot/dts/omap5.dtsi +0
-0
arch/arm/boot/dts/omap5.dtsi line 522
Quoted 9 lines
arch/arm/boot/dts/omap5.dtsi +6
-0@@ -514,6 +514,13 @@ #size-cells = <1>; utmi-mode = <2>; ranges; + dwc3 at 4a030000 { + compatible = "synopsys,dwc3"; + reg = <0x4a030000 0x1000>; + interrupts = <0 92 4>; + usb-phy = <&usb2_phy>, <&usb3_phy>; + tx-fifo-resize;
I think this should be merged with previous patch. Also, we need to check whether tx-fifo-resize is needed with ES2 or not ;-)
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130305/fff1b547/attachment.sig>
Re: [PATCH v2 8/8] ARM: dts: omap5: add dwc3 core dt data
Hi,
Quoted 21 lines · Felipe Balbi
Hi,
Quoted 18 lines · Kishon Vijay Abraham I
Add dwc3 core dt data as a subnode to dwc3 omap glue data in omap5 dt data file. The information for the entered data node is available @
Documentation/devicetree/bindings/usb/dwc3.txtSigned-off-by Kishon Vijay Abraham I <[email protected]>--- arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)arch/arm/boot/dts/omap5.dtsi +1
-0@@ -514,6 +514,13 @@ #size-cells = <1>; utmi-mode = <2>; ranges; + dwc3 at 4a030000 {
Quoted 8 lines
arch/arm/boot/dts/omap5.dtsi line 522
Quoted 5 lines
arch/arm/boot/dts/omap5.dtsi +5
-0+ compatible = "synopsys,dwc3"; + reg = <0x4a030000 0x1000>; + interrupts = <0 92 4>; + usb-phy = <&usb2_phy>, <&usb3_phy>; + tx-fifo-resize;I think this should be merged with previous patch. Also, we need to check whether tx-fifo-resize is needed with ES2 or not ;-)
yeah. ES2 works without tx-fifo-resize.
Thanks
Kishon
Re: [PATCH v2 8/8] ARM: dts: omap5: add dwc3 core dt data
Hi,
Quoted 33 lines · kishon
Hi,
Quoted 21 lines · Felipe Balbi
Hi,
Quoted 18 lines · Kishon Vijay Abraham I
Add dwc3 core dt data as a subnode to dwc3 omap glue data in omap5 dt data file. The information for the entered data node is available @
Documentation/devicetree/bindings/usb/dwc3.txtSigned-off-by Kishon Vijay Abraham I <[email protected]>--- arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)arch/arm/boot/dts/omap5.dtsi +1
-0@@ -514,6 +514,13 @@ #size-cells = <1>; utmi-mode = <2>; ranges; + dwc3 at 4a030000 {Quoted 8 lines
arch/arm/boot/dts/omap5.dtsi line 522
Quoted 5 lines
arch/arm/boot/dts/omap5.dtsi +5
-0+ compatible = "synopsys,dwc3"; + reg = <0x4a030000 0x1000>; + interrupts = <0 92 4>; + usb-phy = <&usb2_phy>, <&usb3_phy>; + tx-fifo-resize;I think this should be merged with previous patch. Also, we need to check whether tx-fifo-resize is needed with ES2 or not ;-)
Quoted 1 line
yeah. ES2 works without tx-fifo-resize.
Great, I guess we can deprecate that attribute. Can you check if ES2 still works with:
drivers/usb/dwc3/gadget.c +4 -0
@@ -2029,6 +2029,8 @@ static void dwc3_gadget_usb3_phy_suspend(struct dwc3 *dwc, int suspend) {u32 reg; +return ; + reg =dwc3_readl (dwc->regs,DWC3_GUSB3PIPECTL (0 ));if (suspend)
@@ -2043,6 +2045,8 @@ static void dwc3_gadget_usb2_phy_suspend(struct dwc3 *dwc, int suspend) {u32 reg; +return ; + reg =dwc3_readl (dwc->regs,DWC3_GUSB2PHYCFG (0 ));if (suspend)
starting on 1.94a (IIRC) core was supposed to control PHYs directly and since there's nobody in linux mainline using any version prior to 1.94a, we could drop that too.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130306/8acd200d/attachment.sig>
Re: [PATCH v2 8/8] ARM: dts: omap5: add dwc3 core dt data
Quoted 65 lines · Felipe Balbi
Hi,
Quoted 33 lines · kishon
Hi,
Quoted 21 lines · Felipe Balbi
Hi,
Quoted 18 lines · Kishon Vijay Abraham I
Add dwc3 core dt data as a subnode to dwc3 omap glue data in omap5 dt data file. The information for the entered data node is available @
Documentation/devicetree/bindings/usb/dwc3.txtSigned-off-by Kishon Vijay Abraham I <[email protected]>--- arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)arch/arm/boot/dts/omap5.dtsi +1
-0@@ -514,6 +514,13 @@ #size-cells = <1>; utmi-mode = <2>; ranges; + dwc3 at 4a030000 {Quoted 8 lines
arch/arm/boot/dts/omap5.dtsi line 522
Quoted 5 lines
arch/arm/boot/dts/omap5.dtsi +5
-0+ compatible = "synopsys,dwc3"; + reg = <0x4a030000 0x1000>; + interrupts = <0 92 4>; + usb-phy = <&usb2_phy>, <&usb3_phy>; + tx-fifo-resize;I think this should be merged with previous patch. Also, we need to check whether tx-fifo-resize is needed with ES2 or not ;-)
Quoted 1 line
yeah. ES2 works without tx-fifo-resize.
Great, I guess we can deprecate that attribute. Can you check if ES2 still works with:
drivers/usb/dwc3/gadget.c +4
-0@@ -2029,6 +2029,8 @@ static void dwc3_gadget_usb3_phy_suspend(struct dwc3 *dwc, int suspend) {u32 reg; +return ; + reg =dwc3_readl (dwc->regs,DWC3_GUSB3PIPECTL (0 ));if (suspend)@@ -2043,6 +2045,8 @@ static void dwc3_gadget_usb2_phy_suspend(struct dwc3 *dwc, int suspend) {u32 reg; +return ; + reg =dwc3_readl (dwc->regs,DWC3_GUSB2PHYCFG (0 ));if (suspend)
Quoted 3 lines
starting on 1.94a (IIRC) core was supposed to control PHYs directly and since there's nobody in linux mainline using any version prior to 1.94a, we could drop that too.
Will check that in a while.
Thanks
Kishon