mediatek: Add support for Xiaomi Redmi Router AX6S
[openwrt/staging/dedeckeh.git] / target / linux / bcm4908 / patches-5.4 / 084-v5.6-0006-dt-bindings-Add-Broadcom-STB-USB-PHY-binding-documen.patch
1 From b11df0c9efbbe2b52c5133ca15030f01b43ec6ef Mon Sep 17 00:00:00 2001
2 From: Al Cooper <alcooperx@gmail.com>
3 Date: Fri, 3 Jan 2020 13:18:04 -0500
4 Subject: [PATCH] dt-bindings: Add Broadcom STB USB PHY binding document
5
6 Add support for bcm7216 and bcm7211
7
8 Signed-off-by: Al Cooper <alcooperx@gmail.com>
9 Reviewed-by: Rob Herring <robh@kernel.org>
10 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
11 Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
12 ---
13 .../bindings/phy/brcm,brcmstb-usb-phy.txt | 69 +++++++++++++++----
14 1 file changed, 56 insertions(+), 13 deletions(-)
15
16 --- a/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt
17 +++ b/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt
18 @@ -1,30 +1,49 @@
19 Broadcom STB USB PHY
20
21 Required properties:
22 - - compatible: brcm,brcmstb-usb-phy
23 - - reg: two offset and length pairs.
24 - The first pair specifies a manditory set of memory mapped
25 - registers used for general control of the PHY.
26 - The second pair specifies optional registers used by some of
27 - the SoCs that support USB 3.x
28 - - #phy-cells: Shall be 1 as it expects one argument for setting
29 - the type of the PHY. Possible values are:
30 - - PHY_TYPE_USB2 for USB1.1/2.0 PHY
31 - - PHY_TYPE_USB3 for USB3.x PHY
32 +- compatible: should be one of
33 + "brcm,brcmstb-usb-phy"
34 + "brcm,bcm7216-usb-phy"
35 + "brcm,bcm7211-usb-phy"
36 +
37 +- reg and reg-names properties requirements are specific to the
38 + compatible string.
39 + "brcm,brcmstb-usb-phy":
40 + - reg: 1 or 2 offset and length pairs. One for the base CTRL registers
41 + and an optional pair for systems with USB 3.x support
42 + - reg-names: not specified
43 + "brcm,bcm7216-usb-phy":
44 + - reg: 3 offset and length pairs for CTRL, XHCI_EC and XHCI_GBL
45 + registers
46 + - reg-names: "ctrl", "xhci_ec", "xhci_gbl"
47 + "brcm,bcm7211-usb-phy":
48 + - reg: 5 offset and length pairs for CTRL, XHCI_EC, XHCI_GBL,
49 + USB_PHY and USB_MDIO registers and an optional pair
50 + for the BDC registers
51 + - reg-names: "ctrl", "xhci_ec", "xhci_gbl", "usb_phy", "usb_mdio", "bdc_ec"
52 +
53 +- #phy-cells: Shall be 1 as it expects one argument for setting
54 + the type of the PHY. Possible values are:
55 + - PHY_TYPE_USB2 for USB1.1/2.0 PHY
56 + - PHY_TYPE_USB3 for USB3.x PHY
57
58 Optional Properties:
59 - clocks : clock phandles.
60 - clock-names: String, clock name.
61 +- interrupts: wakeup interrupt
62 +- interrupt-names: "wakeup"
63 - brcm,ipp: Boolean, Invert Port Power.
64 Possible values are: 0 (Don't invert), 1 (Invert)
65 - brcm,ioc: Boolean, Invert Over Current detection.
66 Possible values are: 0 (Don't invert), 1 (Invert)
67 -NOTE: one or both of the following two properties must be set
68 -- brcm,has-xhci: Boolean indicating the phy has an XHCI phy.
69 -- brcm,has-eohci: Boolean indicating the phy has an EHCI/OHCI phy.
70 - dr_mode: String, PHY Device mode.
71 Possible values are: "host", "peripheral ", "drd" or "typec-pd"
72 If this property is not defined, the phy will default to "host" mode.
73 +- brcm,syscon-piarbctl: phandle to syscon for handling config registers
74 +NOTE: one or both of the following two properties must be set
75 +- brcm,has-xhci: Boolean indicating the phy has an XHCI phy.
76 +- brcm,has-eohci: Boolean indicating the phy has an EHCI/OHCI phy.
77 +
78
79 Example:
80
81 @@ -41,3 +60,27 @@ usbphy_0: usb-phy@f0470200 {
82 clocks = <&usb20>, <&usb30>;
83 clock-names = "sw_usb", "sw_usb3";
84 };
85 +
86 +usb-phy@29f0200 {
87 + reg = <0x29f0200 0x200>,
88 + <0x29c0880 0x30>,
89 + <0x29cc100 0x534>,
90 + <0x2808000 0x24>,
91 + <0x2980080 0x8>;
92 + reg-names = "ctrl",
93 + "xhci_ec",
94 + "xhci_gbl",
95 + "usb_phy",
96 + "usb_mdio";
97 + brcm,ioc = <0x0>;
98 + brcm,ipp = <0x0>;
99 + compatible = "brcm,bcm7211-usb-phy";
100 + interrupts = <0x30>;
101 + interrupt-parent = <&vpu_intr1_nosec_intc>;
102 + interrupt-names = "wake";
103 + #phy-cells = <0x1>;
104 + brcm,has-xhci;
105 + syscon-piarbctl = <&syscon_piarbctl>;
106 + clocks = <&scmi_clk 256>;
107 + clock-names = "sw_usb";
108 +};