0001 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/phy/brcm,brcmstb-usb-phy.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Broadcom STB USB PHY
0008
0009 description: Broadcom's PHY that handles EHCI/OHCI and/or XHCI
0010
0011 maintainers:
0012 - Al Cooper <alcooperx@gmail.com>
0013 - Rafał Miłecki <rafal@milecki.pl>
0014
0015 properties:
0016 compatible:
0017 enum:
0018 - brcm,bcm4908-usb-phy
0019 - brcm,bcm7211-usb-phy
0020 - brcm,bcm7216-usb-phy
0021 - brcm,brcmstb-usb-phy
0022
0023 reg:
0024 minItems: 1
0025 items:
0026 - description: the base CTRL register
0027 - description: XHCI EC register
0028 - description: XHCI GBL register
0029 - description: USB PHY register
0030 - description: USB MDIO register
0031 - description: BDC register
0032
0033 reg-names:
0034 minItems: 1
0035 items:
0036 - const: ctrl
0037 - const: xhci_ec
0038 - const: xhci_gbl
0039 - const: usb_phy
0040 - const: usb_mdio
0041 - const: bdc_ec
0042
0043 power-domains:
0044 maxItems: 1
0045
0046 clocks:
0047 minItems: 1
0048 maxItems: 2
0049
0050 clock-names:
0051 minItems: 1
0052 items:
0053 - const: sw_usb
0054 - const: sw_usb3
0055
0056 interrupts:
0057 description: wakeup interrupt
0058
0059 interrupt-names:
0060 const: wake
0061
0062 brcm,ipp:
0063 $ref: /schemas/types.yaml#/definitions/uint32
0064 description: Invert Port Power
0065 minimum: 0
0066 maximum: 1
0067
0068 brcm,ioc:
0069 $ref: /schemas/types.yaml#/definitions/uint32
0070 description: Invert Over Current detection
0071 minimum: 0
0072 maximum: 1
0073
0074 dr_mode:
0075 description: PHY Device mode. If this property is not defined, the PHY will
0076 default to "host" mode.
0077 enum:
0078 - host
0079 - peripheral
0080 - drd
0081 - typec-pd
0082
0083 brcm,syscon-piarbctl:
0084 description: phandle to syscon for handling config registers
0085 $ref: /schemas/types.yaml#/definitions/phandle
0086
0087 brcm,has-xhci:
0088 description: Indicates the PHY has an XHCI PHY.
0089 type: boolean
0090
0091 brcm,has-eohci:
0092 description: Indicates the PHY has an EHCI/OHCI PHY.
0093 type: boolean
0094
0095 "#phy-cells":
0096 description: |
0097 Cell allows setting the type of the PHY. Possible values are:
0098 - PHY_TYPE_USB2 for USB1.1/2.0 PHY
0099 - PHY_TYPE_USB3 for USB3.x PHY
0100 const: 1
0101
0102 required:
0103 - reg
0104 - "#phy-cells"
0105
0106 anyOf:
0107 - required:
0108 - brcm,has-xhci
0109 - required:
0110 - brcm,has-eohci
0111
0112 allOf:
0113 - if:
0114 properties:
0115 compatible:
0116 contains:
0117 enum:
0118 - const: brcm,bcm4908-usb-phy
0119 - const: brcm,brcmstb-usb-phy
0120 then:
0121 properties:
0122 reg:
0123 minItems: 1
0124 maxItems: 2
0125 - if:
0126 properties:
0127 compatible:
0128 contains:
0129 const: brcm,bcm7211-usb-phy
0130 then:
0131 properties:
0132 reg:
0133 minItems: 5
0134 maxItems: 6
0135 reg-names:
0136 minItems: 5
0137 maxItems: 6
0138 - if:
0139 properties:
0140 compatible:
0141 contains:
0142 const: brcm,bcm7216-usb-phy
0143 then:
0144 properties:
0145 reg:
0146 minItems: 3
0147 maxItems: 3
0148 reg-names:
0149 minItems: 3
0150 maxItems: 3
0151
0152 additionalProperties: false
0153
0154 examples:
0155 - |
0156 #include <dt-bindings/phy/phy.h>
0157
0158 usb-phy@f0470200 {
0159 compatible = "brcm,brcmstb-usb-phy";
0160 reg = <0xf0470200 0xb8>,
0161 <0xf0471940 0x6c0>;
0162 #phy-cells = <1>;
0163 dr_mode = "host";
0164 brcm,ioc = <1>;
0165 brcm,ipp = <1>;
0166 brcm,has-xhci;
0167 brcm,has-eohci;
0168 clocks = <&usb20>, <&usb30>;
0169 clock-names = "sw_usb", "sw_usb3";
0170 };
0171 - |
0172 #include <dt-bindings/phy/phy.h>
0173
0174 usb-phy@29f0200 {
0175 compatible = "brcm,bcm7211-usb-phy";
0176 reg = <0x29f0200 0x200>,
0177 <0x29c0880 0x30>,
0178 <0x29cc100 0x534>,
0179 <0x2808000 0x24>,
0180 <0x2980080 0x8>;
0181 reg-names = "ctrl",
0182 "xhci_ec",
0183 "xhci_gbl",
0184 "usb_phy",
0185 "usb_mdio";
0186 brcm,ioc = <0x0>;
0187 brcm,ipp = <0x0>;
0188 interrupts = <0x30>;
0189 interrupt-parent = <&vpu_intr1_nosec_intc>;
0190 interrupt-names = "wake";
0191 #phy-cells = <0x1>;
0192 brcm,has-xhci;
0193 brcm,syscon-piarbctl = <&syscon_piarbctl>;
0194 clocks = <&scmi_clk 256>;
0195 clock-names = "sw_usb";
0196 };