USB3 support for Broadcom NS2 SoC
Subsystems (2)
cover USB3 support for Broadcom NS2 SoC
This patch set contains the USB3 support for Broadcom NS2 SoC. The USB3 PHY is connected through the MDIO interface.
Yendapally Reddy Dhananjaya Reddy (3):
dt-bindings: phy: Add documentation for NS2 USB3 PHY
phy: Add USB3 PHY support for Broadcom NS2 SoC
arm64: dts: ns2: Add USB3 Support
.../devicetree/bindings/phy/brcm,ns2-usb3-phy.txt | 82 +++ arch/arm64/boot/dts/broadcom/ns2-svk.dts | 16 + arch/arm64/boot/dts/broadcom/ns2-xmc.dts | 8 + arch/arm64/boot/dts/broadcom/ns2.dtsi | 62 +++ drivers/phy/Kconfig | 9 + drivers/phy/Makefile | 1 + drivers/phy/phy-bcm-ns2-usb3.c | 596 +++++++++++++++++++++ 7 files changed, 774 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt create mode 100644 drivers/phy/phy-bcm-ns2-usb3.c
Signature · 1 line
2.7.4
PATCH 1/3 dt-bindings: phy: Add documentation for NS2 USB3 PHY
From: Yendapally Reddy Dhananjaya Reddy <[email protected]>
Add documentation for USB3 PHY available in NS2 SoC
--- .../devicetree/bindings/phy/brcm,ns2-usb3-phy.txt | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt
Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt new file +82 -0
@@ -0,0 +1,82 @@ +Broadcom USB3 dual port phy for Northstar2 SoC +This is a child bus node of "brcm,mdio-mux-iproc" node. + +Required mdio bus properties: +- reg: MDIO Bus number for the MDIO interface +- #address-cells: must be 1 +- #size-cells: must be 0 + +Required PHY properties: +- compatible: should be "brcm,ns2-usb3-phy" +- reg: Phy address in the MDIO interface +- usb3-ctrl-syscon: handler of syscon node defining physical address + of usb3 control register. +- usb3-phy-cfg-syscon: handler of syscon node defining physical base + address and length of usb3 phy config region. +- usb3-rst-ctrl-syscon: handler of syscon node defining physical base + address and length of idm reset control of two ports. +- #phy-cells: must be 0 +- #address-cells: must be 1 +- #size-cells: must be 0 + +Sub-nodes: + Each port's PHY should be represented as a sub-node. + +Sub-nodes required properties: + - reg: the PHY number + - phy-cells: from the generic PHY bindings, must be 0 + +Required usb3 control properties: +- compatible: should be "brcm,ns2-usb3-ctrl" +- reg: offset and length of the control registers + +Required usb3 phy config properties: +- compatible: should be "brcm,ns2-usb3-phy-cfg" +- reg: offset and length of the phy config registers + +Required usb3 reset control properties: +- compatible: should be "brcm,ns2-usb3-rst-ctrl" +- reg: offset and length of the reset control registers + +Example: + +mdio at 1 { + reg = <0x1>; + #address-cells = <1>; + #size-cells = <0>; + + usb3phy: usb3phy at 0 { + compatible = "brcm,ns2-usb3-phy"; + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + usb3-ctrl-syscon = <&usb3_ctrl>; + usb3-phy-cfg-syscon = <&usb3_phy_cfg>; + usb3-rst-ctrl-syscon = <&usb3_rst_ctrl>; + + usb3phy0: usbphy at 0 { + reg = <0>; + #phy-cells = <0>; + }; + + usb3phy1: usbphy at 1 { + reg = <1>; + #phy-cells = <0>; + }; + }; +}; + +usb3_ctrl: syscon at 6501d144 { + compatible = "brcm,ns2-usb3-ctrl", "syscon"; + reg = <0x6501d144 0x4>; +}; + +usb3_phy_cfg: syscon at 66000910 { + compatible = "brcm,ns2-usb3-phy-cfg", "syscon"; + reg = <0x66000910 0x14>; +}; + +usb3_rst_ctrl: syscon at 67000800 { + compatible = "brcm,ns2-usb3-rst-ctrl", "syscon"; + reg = <0x67000800 0x1808>; +};
Signature · 1 line
2.7.4
PATCH 2/3 phy: Add USB3 PHY support for Broadcom NS2 SoC
In reply to Jon MasonFrom: Yendapally Reddy Dhananjaya Reddy <[email protected]>
This patch adds support for Broadcom NS2 USB3 PHY
--- drivers/phy/Kconfig | 9 + drivers/phy/Makefile | 1 + drivers/phy/phy-bcm-ns2-usb3.c | 596 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 606 insertions(+) create mode 100644 drivers/phy/phy-bcm-ns2-usb3.c
drivers/phy/Kconfig +9 -0
@@ -498,6 +498,15 @@ config PHY_NS2_PCIE Enable this to support the Broadcom Northstar2 PCIe PHY. If unsure, say N. +config PHY_NS2_USB3 + tristate "Broadcom NorthStar2 USB3 PHY driver" + depends on OF && (ARCH_BCM_IPROC || COMPILE_TEST) + select GENERIC_PHY + default ARCH_BCM_IPROC + help + Enable this to support the Broadcom Northstar2 USB3 PHY. + If unsure, say N. + config PHY_MESON8B_USB2 tristate "Meson8b and GXBB USB2 PHY driver" default ARCH_MESON
drivers/phy/Makefile +1 -0
@@ -61,5 +61,6 @@ obj-$(CONFIG_PHY_PISTACHIO_USB) += phy-pistachio-usb.o obj-$(CONFIG_PHY_CYGNUS_PCIE) += phy-bcm-cygnus-pcie.o obj-$(CONFIG_ARCH_TEGRA) += tegra/ obj-$(CONFIG_PHY_NS2_PCIE) += phy-bcm-ns2-pcie.o +obj-$(CONFIG_PHY_NS2_USB3) += phy-bcm-ns2-usb3.o obj-$(CONFIG_PHY_MESON8B_USB2) += phy-meson8b-usb2.o obj-$(CONFIG_PHY_NSP_USB3) += phy-bcm-nsp-usb3.o
drivers/phy/phy-bcm-ns2-usb3.c new file +596 -0
596 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 3/3 arm64: dts: ns2: Add USB3 Support
In reply to Jon MasonFrom: Yendapally Reddy Dhananjaya Reddy <[email protected]>
Add USB3 support to the Northstar2 Device tree files
--- arch/arm64/boot/dts/broadcom/ns2-svk.dts | 16 +++++++++ arch/arm64/boot/dts/broadcom/ns2-xmc.dts | 8 +++++ arch/arm64/boot/dts/broadcom/ns2.dtsi | 62 ++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+)
arch/arm64/boot/dts/broadcom/ns2-svk.dts +16 -0
@@ -234,3 +234,19 @@ }; }; }; + +&usb3_phy0 { + status = "okay"; +}; + +&usb3_phy1 { + status = "okay"; +}; + +&xhci0 { + status = "okay"; +}; + +&xhci1 { + status = "okay"; +};
arch/arm64/boot/dts/broadcom/ns2-xmc.dts +8 -0
@@ -189,3 +189,11 @@ &uart3 { status = "okay"; }; + +&usb3_phy0 { + status = "okay"; +}; + +&xhci0 { + status = "okay"; +};
arch/arm64/boot/dts/broadcom/ns2.dtsi +62 -0
91 lines not on this page · raw message
Signature · 1 line
2.7.4
Rob Herring
maintainerRe: [PATCH 1/3] dt-bindings: phy: Add documentation for NS2 USB3 PHY
In reply to Jon MasonQuoted 24 lines · Jon Mason
From: Yendapally Reddy Dhananjaya Reddy <[email protected]>
Add documentation for USB3 PHY available in NS2 SoC
Signed-off-by Yendapally Reddy Dhananjaya Reddy <[email protected]>Signed-off-by Jon Mason <[email protected]>--- .../devicetree/bindings/phy/brcm,ns2-usb3-phy.txt | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txtDocumentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt new file +7
-0@@ -0,0 +1,82 @@ +Broadcom USB3 dual port phy for Northstar2 SoC +This is a child bus node of "brcm,mdio-mux-iproc" node. + +Required mdio bus properties: +- reg: MDIO Bus number for the MDIO interface +- #address-cells: must be 1 +- #size-cells: must be 0
Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt line 17
Quoted 10 lines
Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt new file +10
-0+ +Required PHY properties: +- compatible: should be "brcm,ns2-usb3-phy" +- reg: Phy address in the MDIO interface +- usb3-ctrl-syscon: handler of syscon node defining physical address + of usb3 control register. +- usb3-phy-cfg-syscon: handler of syscon node defining physical base + address and length of usb3 phy config region. +- usb3-rst-ctrl-syscon: handler of syscon node defining physical base + address and length of idm reset control of two ports.
Can't you use the reset binding here?
Quoted 12 lines
Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt new file +12
-0+- #phy-cells: must be 0 +- #address-cells: must be 1 +- #size-cells: must be 0 + +Sub-nodes: + Each port's PHY should be represented as a sub-node. + +Sub-nodes required properties: + - reg: the PHY number + - phy-cells: from the generic PHY bindings, must be 0 + +Required usb3 control properties:
Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt line 39
Quoted 10 lines
Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt new file +10
-0+- compatible: should be "brcm,ns2-usb3-ctrl" +- reg: offset and length of the control registers + +Required usb3 phy config properties: +- compatible: should be "brcm,ns2-usb3-phy-cfg" +- reg: offset and length of the phy config registers + +Required usb3 reset control properties: +- compatible: should be "brcm,ns2-usb3-rst-ctrl" +- reg: offset and length of the reset control registers
Is there more than one or other registers besides the phy controls in these? If not, you don't need the phandles to these nodes. Just find them by compatible.
Quoted 5 lines
Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt new file +5
-0+ +Example: + +mdio at 1 { + reg = <0x1>;
Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt line 54
Quoted 10 lines
Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt new file +10
-0+ #address-cells = <1>; + #size-cells = <0>; + + usb3phy: usb3phy at 0 { + compatible = "brcm,ns2-usb3-phy"; + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + usb3-ctrl-syscon = <&usb3_ctrl>; + usb3-phy-cfg-syscon = <&usb3_phy_cfg>;
The description says it has register address and length.
Quoted 7 lines
Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt new file +7
-0+ usb3-rst-ctrl-syscon = <&usb3_rst_ctrl>; + + usb3phy0: usbphy at 0 { + reg = <0>; + #phy-cells = <0>; + }; +
Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt line 71
Quoted 10 lines
Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt new file +10
-0+ usb3phy1: usbphy at 1 { + reg = <1>; + #phy-cells = <0>; + }; + }; +}; + +usb3_ctrl: syscon at 6501d144 { + compatible = "brcm,ns2-usb3-ctrl", "syscon"; + reg = <0x6501d144 0x4>;
This isn't part of some larger syscon block? We don't really want to see a node per register.
Quoted 14 lines
Documentation/devicetree/bindings/phy/brcm,ns2-usb3-phy.txt new file +11
-0+}; + +usb3_phy_cfg: syscon at 66000910 { + compatible = "brcm,ns2-usb3-phy-cfg", "syscon"; + reg = <0x66000910 0x14>; +}; + +usb3_rst_ctrl: syscon at 67000800 { + compatible = "brcm,ns2-usb3-rst-ctrl", "syscon"; + reg = <0x67000800 0x1808>; +};Signature · 1 line
2.7.4