1 From b39069a482ade0c5e18c407c3218ba1aeed371b6 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Wed, 6 Jan 2021 21:58:36 +0100
4 Subject: [PATCH] dt-bindings: phy: brcm, brcmstb-usb-phy: convert to the
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 Changes that require mentioning:
12 Name "wakeup" was changed to the "wake". It matches example and what
13 Linux driver looks for in the first place
14 2. brcm,ipp and brcm,ioc
15 Both were described as booleans with 0 / 1 values. In examples they
16 were integers and Linux checks for int as well. Both got uint32.
17 3. Added minimal description
19 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
20 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
21 Reviewed-by: Rob Herring <robh@kernel.org>
22 Link: https://lore.kernel.org/r/20210106205838.10964-1-zajec5@gmail.com
23 Signed-off-by: Vinod Koul <vkoul@kernel.org>
25 .../bindings/phy/brcm,brcmstb-usb-phy.txt | 86 --------
26 .../bindings/phy/brcm,brcmstb-usb-phy.yaml | 193 ++++++++++++++++++
27 2 files changed, 193 insertions(+), 86 deletions(-)
28 delete mode 100644 Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt
29 create mode 100644 Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml
31 --- a/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt
37 -- compatible: should be one of
38 - "brcm,brcmstb-usb-phy"
39 - "brcm,bcm7216-usb-phy"
40 - "brcm,bcm7211-usb-phy"
42 -- reg and reg-names properties requirements are specific to the
44 - "brcm,brcmstb-usb-phy":
45 - - reg: 1 or 2 offset and length pairs. One for the base CTRL registers
46 - and an optional pair for systems with USB 3.x support
47 - - reg-names: not specified
48 - "brcm,bcm7216-usb-phy":
49 - - reg: 3 offset and length pairs for CTRL, XHCI_EC and XHCI_GBL
51 - - reg-names: "ctrl", "xhci_ec", "xhci_gbl"
52 - "brcm,bcm7211-usb-phy":
53 - - reg: 5 offset and length pairs for CTRL, XHCI_EC, XHCI_GBL,
54 - USB_PHY and USB_MDIO registers and an optional pair
55 - for the BDC registers
56 - - reg-names: "ctrl", "xhci_ec", "xhci_gbl", "usb_phy", "usb_mdio", "bdc_ec"
58 -- #phy-cells: Shall be 1 as it expects one argument for setting
59 - the type of the PHY. Possible values are:
60 - - PHY_TYPE_USB2 for USB1.1/2.0 PHY
61 - - PHY_TYPE_USB3 for USB3.x PHY
64 -- clocks : clock phandles.
65 -- clock-names: String, clock name.
66 -- interrupts: wakeup interrupt
67 -- interrupt-names: "wakeup"
68 -- brcm,ipp: Boolean, Invert Port Power.
69 - Possible values are: 0 (Don't invert), 1 (Invert)
70 -- brcm,ioc: Boolean, Invert Over Current detection.
71 - Possible values are: 0 (Don't invert), 1 (Invert)
72 -- dr_mode: String, PHY Device mode.
73 - Possible values are: "host", "peripheral ", "drd" or "typec-pd"
74 - If this property is not defined, the phy will default to "host" mode.
75 -- brcm,syscon-piarbctl: phandle to syscon for handling config registers
76 -NOTE: one or both of the following two properties must be set
77 -- brcm,has-xhci: Boolean indicating the phy has an XHCI phy.
78 -- brcm,has-eohci: Boolean indicating the phy has an EHCI/OHCI phy.
83 -usbphy_0: usb-phy@f0470200 {
84 - reg = <0xf0470200 0xb8>,
86 - compatible = "brcm,brcmstb-usb-phy";
93 - clocks = <&usb20>, <&usb30>;
94 - clock-names = "sw_usb", "sw_usb3";
98 - reg = <0x29f0200 0x200>,
103 - reg-names = "ctrl",
110 - compatible = "brcm,bcm7211-usb-phy";
111 - interrupts = <0x30>;
112 - interrupt-parent = <&vpu_intr1_nosec_intc>;
113 - interrupt-names = "wake";
114 - #phy-cells = <0x1>;
116 - syscon-piarbctl = <&syscon_piarbctl>;
117 - clocks = <&scmi_clk 256>;
118 - clock-names = "sw_usb";
121 +++ b/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml
123 +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
126 +$id: http://devicetree.org/schemas/phy/brcm,brcmstb-usb-phy.yaml#
127 +$schema: http://devicetree.org/meta-schemas/core.yaml#
129 +title: Broadcom STB USB PHY
131 +description: Broadcom's PHY that handles EHCI/OHCI and/or XHCI
134 + - Al Cooper <alcooperx@gmail.com>
135 + - Rafał Miłecki <rafal@milecki.pl>
140 + - brcm,bcm7211-usb-phy
141 + - brcm,bcm7216-usb-phy
142 + - brcm,brcmstb-usb-phy
148 + - description: the base CTRL register
149 + - description: XHCI EC register
150 + - description: XHCI GBL register
151 + - description: USB PHY register
152 + - description: USB MDIO register
153 + - description: BDC register
178 + description: wakeup interrupt
184 + $ref: /schemas/types.yaml#/definitions/uint32
185 + description: Invert Port Power
190 + $ref: /schemas/types.yaml#/definitions/uint32
191 + description: Invert Over Current detection
196 + description: PHY Device mode. If this property is not defined, the PHY will
197 + default to "host" mode.
204 + brcm,syscon-piarbctl:
205 + description: phandle to syscon for handling config registers
206 + $ref: /schemas/types.yaml#/definitions/phandle
209 + description: Indicates the PHY has an XHCI PHY.
213 + description: Indicates the PHY has an EHCI/OHCI PHY.
218 + Cell allows setting the type of the PHY. Possible values are:
219 + - PHY_TYPE_USB2 for USB1.1/2.0 PHY
220 + - PHY_TYPE_USB3 for USB3.x PHY
238 + const: brcm,brcmstb-usb-phy
248 + const: brcm,bcm7211-usb-phy
261 + const: brcm,bcm7216-usb-phy
271 +additionalProperties: false
275 + #include <dt-bindings/phy/phy.h>
278 + compatible = "brcm,brcmstb-usb-phy";
279 + reg = <0xf0470200 0xb8>,
280 + <0xf0471940 0x6c0>;
287 + clocks = <&usb20>, <&usb30>;
288 + clock-names = "sw_usb", "sw_usb3";
291 + #include <dt-bindings/phy/phy.h>
294 + compatible = "brcm,bcm7211-usb-phy";
295 + reg = <0x29f0200 0x200>,
300 + reg-names = "ctrl",
307 + interrupts = <0x30>;
308 + interrupt-parent = <&vpu_intr1_nosec_intc>;
309 + interrupt-names = "wake";
310 + #phy-cells = <0x1>;
312 + brcm,syscon-piarbctl = <&syscon_piarbctl>;
313 + clocks = <&scmi_clk 256>;
314 + clock-names = "sw_usb";