From: Petr Benes <petr.benes@ysoft.com>
Diodes Incorporated PI5USB30213A Type-C Controller supports host,
device, and dual-role mode based on voltage levels detected on CC
pin. Supports dual differential channel, 2:1 USB 3.0 Mux/Demux,
USB Type-C specification 1.1.
Signed-off-by: Petr Benes <petr.benes@ysoft.com>
Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
---
.../bindings/usb/diodes,pi5usb30213a.yaml | 95 +++++++++++++++++++
1 file changed, 95 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml
diff --git a/Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml b/Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml
new file mode 100644
index 000000000000..1cae10724152
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml
@@ -0,0 +1,95 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/diodes,pi5usb30213a.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: PI5USB30213A Type-C port controller
+
+description:
+ Diodes Incorporated PI5USB30213A Type-C Controller supports host,
+ device, and dual-role mode based on voltage levels detected on CC
+ pin. Dual differential channel, 2:1 USB 3.0 Mux/Demux, USB Type-C
+ specification 1.1 compliant.
+
+maintainers:
+ - Petr Benes <petr.benes@ysoft.com>
+
+properties:
+ compatible:
+ enum:
+ - diodes,pi5usb30213a
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ connector:
+ type: object
+ $ref: ../connector/usb-connector.yaml#
+ unevaluatedProperties: false
+ description:
+ The managed USB Type-C connector.
+
+ properties:
+ compatible:
+ const: usb-c-connector
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - connector
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pi5usb30213a: tcpc@d {
+ compatible = "diodes,pi5usb30213a";
+ reg = <0xd>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_typec>;
+ interrupts-extended = <&gpio1 5 IRQ_TYPE_LEVEL_LOW>;
+ status = "okay";
+
+ connector {
+ compatible = "usb-c-connector";
+ label = "USB-C";
+ vbus-supply = <®_typec>;
+ power-role = "source";
+ data-role = "dual";
+ typec-power-opmode = "default";
+ pd-disable;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_con_hs: endpoint {
+ remote-endpoint = <&typec_hs>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_con_ss: endpoint {
+ remote-endpoint = <&typec_ss>;
+ };
+ };
+ };
+ };
+ };
+ };
--
2.43.0
On 17/09/2024 17:10, Michal Vokáč wrote: > From: Petr Benes <petr.benes@ysoft.com> > > Diodes Incorporated PI5USB30213A Type-C Controller supports host, > device, and dual-role mode based on voltage levels detected on CC > pin. Supports dual differential channel, 2:1 USB 3.0 Mux/Demux, > USB Type-C specification 1.1. > > Signed-off-by: Petr Benes <petr.benes@ysoft.com> > Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com> > --- > .../bindings/usb/diodes,pi5usb30213a.yaml | 95 +++++++++++++++++++ > 1 file changed, 95 insertions(+) > create mode 100644 Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml > > diff --git a/Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml b/Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml > new file mode 100644 > index 000000000000..1cae10724152 > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml > @@ -0,0 +1,95 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/usb/diodes,pi5usb30213a.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: PI5USB30213A Type-C port controller > + > +description: > + Diodes Incorporated PI5USB30213A Type-C Controller supports host, > + device, and dual-role mode based on voltage levels detected on CC > + pin. Dual differential channel, 2:1 USB 3.0 Mux/Demux, USB Type-C > + specification 1.1 compliant. > + > +maintainers: > + - Petr Benes <petr.benes@ysoft.com> Please put maintainers before description: block. > + > +properties: > + compatible: > + enum: > + - diodes,pi5usb30213a > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + connector: > + type: object > + $ref: ../connector/usb-connector.yaml# Full path, so /schemas/connector/usb-.... > + unevaluatedProperties: false > + description: > + The managed USB Type-C connector. Description should not be needed. > + > + properties: > + compatible: > + const: usb-c-connector Drop, not needed. > + > +required: > + - compatible > + - reg > + - interrupts > + - connector > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/irq.h> > + > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + pi5usb30213a: tcpc@d { typec@d and drop label > + compatible = "diodes,pi5usb30213a"; > + reg = <0xd>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_typec>; > + interrupts-extended = <&gpio1 5 IRQ_TYPE_LEVEL_LOW>; > + status = "okay"; Drop status Best regards, Krzysztof
On 18. 09. 24 15:16, Krzysztof Kozlowski wrote: > On 17/09/2024 17:10, Michal Vokáč wrote: >> From: Petr Benes <petr.benes@ysoft.com> >> >> Diodes Incorporated PI5USB30213A Type-C Controller supports host, >> device, and dual-role mode based on voltage levels detected on CC >> pin. Supports dual differential channel, 2:1 USB 3.0 Mux/Demux, >> USB Type-C specification 1.1. >> >> Signed-off-by: Petr Benes <petr.benes@ysoft.com> >> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com> >> --- >> .../bindings/usb/diodes,pi5usb30213a.yaml | 95 +++++++++++++++++++ >> 1 file changed, 95 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml >> >> diff --git a/Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml b/Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml >> new file mode 100644 >> index 000000000000..1cae10724152 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml >> @@ -0,0 +1,95 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fusb%2Fdiodes%2Cpi5usb30213a.yaml%23&data=05%7C02%7Cmichal.vokac%40ysoft.com%7C925faa72b27547fa80c308dcd7e425f4%7Cb5839965430f4be2b282d7a3149f2b37%7C0%7C0%7C638622622118849100%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=T2NXqovVWUhM4ID1XdytvSaD9yQMKLH9QfQ%2FwFJ9xOs%3D&reserved=0 >> +$schema: https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23&data=05%7C02%7Cmichal.vokac%40ysoft.com%7C925faa72b27547fa80c308dcd7e425f4%7Cb5839965430f4be2b282d7a3149f2b37%7C0%7C0%7C638622622118861671%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=tAR73Ny5eXo1GmO4%2BAqiUhpqLdwEgOrfuzwtY4b7K%2Bs%3D&reserved=0 >> + >> +title: PI5USB30213A Type-C port controller >> + >> +description: >> + Diodes Incorporated PI5USB30213A Type-C Controller supports host, >> + device, and dual-role mode based on voltage levels detected on CC >> + pin. Dual differential channel, 2:1 USB 3.0 Mux/Demux, USB Type-C >> + specification 1.1 compliant. >> + >> +maintainers: >> + - Petr Benes <petr.benes@ysoft.com> > > Please put maintainers before description: block. OK >> + >> +properties: >> + compatible: >> + enum: >> + - diodes,pi5usb30213a >> + >> + reg: >> + maxItems: 1 >> + >> + interrupts: >> + maxItems: 1 >> + >> + connector: >> + type: object >> + $ref: ../connector/usb-connector.yaml# > > Full path, so /schemas/connector/usb-.... OK. >> + unevaluatedProperties: false >> + description: >> + The managed USB Type-C connector. > > Description should not be needed. OK, I will remove it. >> + >> + properties: >> + compatible: >> + const: usb-c-connector > > Drop, not needed. OK. >> + >> +required: >> + - compatible >> + - reg >> + - interrupts >> + - connector >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + #include <dt-bindings/interrupt-controller/irq.h> >> + >> + i2c { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + pi5usb30213a: tcpc@d { > > typec@d > > and drop label OK. >> + compatible = "diodes,pi5usb30213a"; >> + reg = <0xd>; >> + pinctrl-names = "default"; >> + pinctrl-0 = <&pinctrl_typec>; >> + interrupts-extended = <&gpio1 5 IRQ_TYPE_LEVEL_LOW>; >> + status = "okay"; > > Drop status OK. Thank you for the review, Michal
© 2016 - 2024 Red Hat, Inc.