| 1 |
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/phy/brcm,brcmstb-usb-phy.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Broadcom STB USB PHY |
| 8 |
|
| 9 |
description: Broadcom's PHY that handles EHCI/OHCI and/or XHCI |
| 10 |
|
| 11 |
maintainers: |
| 12 |
- Al Cooper <[email protected]> |
| 13 |
- Rafał Miłecki <[email protected]> |
| 14 |
|
| 15 |
properties: |
| 16 |
compatible: |
| 17 |
enum: |
| 18 |
- brcm,bcm4908-usb-phy |
| 19 |
- brcm,bcm7211-usb-phy |
| 20 |
- brcm,bcm7216-usb-phy |
| 21 |
- brcm,bcm74110-usb-phy |
| 22 |
- brcm,brcmstb-usb-phy |
| 23 |
|
| 24 |
reg: |
| 25 |
minItems: 1 |
| 26 |
items: |
| 27 |
- description: the base CTRL register |
| 28 |
- description: XHCI EC register |
| 29 |
- description: XHCI GBL register |
| 30 |
- description: USB PHY register |
| 31 |
- description: USB MDIO register |
| 32 |
- description: BDC register |
| 33 |
|
| 34 |
reg-names: |
| 35 |
minItems: 1 |
| 36 |
items: |
| 37 |
- const: ctrl |
| 38 |
- const: xhci_ec |
| 39 |
- const: xhci_gbl |
| 40 |
- const: usb_phy |
| 41 |
- const: usb_mdio |
| 42 |
- const: bdc_ec |
| 43 |
|
| 44 |
power-domains: |
| 45 |
maxItems: 1 |
| 46 |
|
| 47 |
clocks: |
| 48 |
minItems: 1 |
| 49 |
maxItems: 2 |
| 50 |
|
| 51 |
clock-names: |
| 52 |
minItems: 1 |
| 53 |
items: |
| 54 |
- const: sw_usb |
| 55 |
- const: sw_usb3 |
| 56 |
|
| 57 |
interrupts: |
| 58 |
description: wakeup interrupt |
| 59 |
|
| 60 |
interrupt-names: |
| 61 |
const: wake |
| 62 |
|
| 63 |
brcm,ipp: |
| 64 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 65 |
description: Invert Port Power |
| 66 |
minimum: 0 |
| 67 |
maximum: 1 |
| 68 |
|
| 69 |
brcm,ioc: |
| 70 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 71 |
description: Invert Over Current detection |
| 72 |
minimum: 0 |
| 73 |
maximum: 1 |
| 74 |
|
| 75 |
dr_mode: |
| 76 |
description: PHY Device mode. If this property is not defined, the PHY will |
| 77 |
default to "host" mode. |
| 78 |
enum: |
| 79 |
- host |
| 80 |
- peripheral |
| 81 |
- drd |
| 82 |
- typec-pd |
| 83 |
|
| 84 |
brcm,syscon-piarbctl: |
| 85 |
description: phandle to syscon for handling config registers |
| 86 |
$ref: /schemas/types.yaml#/definitions/phandle |
| 87 |
|
| 88 |
brcm,has-xhci: |
| 89 |
description: Indicates the PHY has an XHCI PHY. |
| 90 |
type: boolean |
| 91 |
|
| 92 |
brcm,has-eohci: |
| 93 |
description: Indicates the PHY has an EHCI/OHCI PHY. |
| 94 |
type: boolean |
| 95 |
|
| 96 |
"#phy-cells": |
| 97 |
description: | |
| 98 |
Cell allows setting the type of the PHY. Possible values are: |
| 99 |
- PHY_TYPE_USB2 for USB1.1/2.0 PHY |
| 100 |
- PHY_TYPE_USB3 for USB3.x PHY |
| 101 |
const: 1 |
| 102 |
|
| 103 |
required: |
| 104 |
- reg |
| 105 |
- "#phy-cells" |
| 106 |
|
| 107 |
anyOf: |
| 108 |
- required: |
| 109 |
- brcm,has-xhci |
| 110 |
- required: |
| 111 |
- brcm,has-eohci |
| 112 |
|
| 113 |
allOf: |
| 114 |
- if: |
| 115 |
properties: |
| 116 |
compatible: |
| 117 |
contains: |
| 118 |
enum: |
| 119 |
- brcm,bcm4908-usb-phy |
| 120 |
- brcm,brcmstb-usb-phy |
| 121 |
then: |
| 122 |
properties: |
| 123 |
reg: |
| 124 |
minItems: 1 |
| 125 |
maxItems: 2 |
| 126 |
- if: |
| 127 |
properties: |
| 128 |
compatible: |
| 129 |
contains: |
| 130 |
const: brcm,bcm7211-usb-phy |
| 131 |
then: |
| 132 |
properties: |
| 133 |
reg: |
| 134 |
minItems: 5 |
| 135 |
maxItems: 6 |
| 136 |
reg-names: |
| 137 |
minItems: 5 |
| 138 |
maxItems: 6 |
| 139 |
- if: |
| 140 |
properties: |
| 141 |
compatible: |
| 142 |
contains: |
| 143 |
enum: |
| 144 |
- brcm,bcm7216-usb-phy |
| 145 |
- brcm,bcm74110-usb-phy |
| 146 |
then: |
| 147 |
properties: |
| 148 |
reg: |
| 149 |
minItems: 3 |
| 150 |
maxItems: 3 |
| 151 |
reg-names: |
| 152 |
minItems: 3 |
| 153 |
maxItems: 3 |
| 154 |
|
| 155 |
additionalProperties: false |
| 156 |
|
| 157 |
examples: |
| 158 |
- | |
| 159 |
#include <dt-bindings/phy/phy.h> |
| 160 |
|
| 161 |
usb-phy@f0470200 { |
| 162 |
compatible = "brcm,brcmstb-usb-phy"; |
| 163 |
reg = <0xf0470200 0xb8>, |
| 164 |
<0xf0471940 0x6c0>; |
| 165 |
#phy-cells = <1>; |
| 166 |
dr_mode = "host"; |
| 167 |
brcm,ioc = <1>; |
| 168 |
brcm,ipp = <1>; |
| 169 |
brcm,has-xhci; |
| 170 |
brcm,has-eohci; |
| 171 |
clocks = <&usb20>, <&usb30>; |
| 172 |
clock-names = "sw_usb", "sw_usb3"; |
| 173 |
}; |
| 174 |
- | |
| 175 |
#include <dt-bindings/phy/phy.h> |
| 176 |
|
| 177 |
usb-phy@29f0200 { |
| 178 |
compatible = "brcm,bcm7211-usb-phy"; |
| 179 |
reg = <0x29f0200 0x200>, |
| 180 |
<0x29c0880 0x30>, |
| 181 |
<0x29cc100 0x534>, |
| 182 |
<0x2808000 0x24>, |
| 183 |
<0x2980080 0x8>; |
| 184 |
reg-names = "ctrl", |
| 185 |
"xhci_ec", |
| 186 |
"xhci_gbl", |
| 187 |
"usb_phy", |
| 188 |
"usb_mdio"; |
| 189 |
brcm,ioc = <0x0>; |
| 190 |
brcm,ipp = <0x0>; |
| 191 |
interrupts = <0x30>; |
| 192 |
interrupt-parent = <&vpu_intr1_nosec_intc>; |
| 193 |
interrupt-names = "wake"; |
| 194 |
#phy-cells = <0x1>; |
| 195 |
brcm,has-xhci; |
| 196 |
brcm,syscon-piarbctl = <&syscon_piarbctl>; |
| 197 |
clocks = <&scmi_clk 256>; |
| 198 |
clock-names = "sw_usb"; |
| 199 |
}; |