dt-bindings: extcon: ptn5150: Describe the USB connector
Subsystems (5)
Fabio Estevam
reviewerPATCH 1/3 dt-bindings: extcon: ptn5150: Describe the USB connector
From: Fabio Estevam <[email protected]>
PTN5150 supports USB Type-C connector, so improve the bindings by allowing to describe the connector like it is done on nxp,ptn5110.yaml.
--- Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +5 -0
@@ -37,6 +37,11 @@ properties: GPIO pin (output) used to control VBUS. If skipped, no such control takes place. + connector: + type: object + $ref: /schemas/connector/usb-connector.yaml# + unevaluatedProperties: false + required: - compatible - interrupts
Signature · 1 line
2.34.1
Fabio Estevam
reviewerPATCH 2/3 arm64: dts: imx8mn-var-som-symphony: Describe the USB-C connector
From: Fabio Estevam <[email protected]>
Describe the PTN5150 USB-C connector to improve the devicetree description and fix the following dt-schema warning:
imx8mn-var-som-symphony.dtb: typec@3d: 'port' does not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/extcon/extcon-ptn5150.yaml#
--- .../boot/dts/freescale/imx8mn-var-som-symphony.dts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dts +8 -3
@@ -128,9 +128,14 @@ extcon_usbotg1: typec@3d { pinctrl-0 = <&pinctrl_ptn5150>; status = "okay"; - port { - typec1_dr_sw: endpoint { - remote-endpoint = <&usb1_drd_sw>; + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + + port { + typec1_dr_sw: endpoint { + remote-endpoint = <&usb1_drd_sw>; + }; }; }; };
Signature · 1 line
2.34.1
Fabio Estevam
reviewerPATCH 3/3 arm64: dts: imx8mp-dhcom-pdk3: Describe the USB-C connector
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Describe the PTN5150 USB-C connector to improve the devicetree description and fix the following dt-schema warning:
imx8mp-dhcom-pdk3.dtb: typec@3d: 'port' does not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/extcon/extcon-ptn5150.yaml#
--- arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk3.dts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk3.dts +8 -4
@@ -175,10 +175,14 @@ typec@3d { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ptn5150>; - port { - - ptn5150_out_ep: endpoint { - remote-endpoint = <&dwc3_0_ep>; + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + + port { + ptn5150_out_ep: endpoint { + remote-endpoint = <&dwc3_0_ep>; + }; }; }; };
Signature · 1 line
2.34.1
Quoted 15 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
PTN5150 supports USB Type-C connector, so improve the bindings by allowing to describe the connector like it is done on nxp,ptn5110.yaml.
Signed-off-by Fabio Estevam <[email protected]>--- Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml | 5 +++++ 1 file changed, 5 insertions(+)Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +0
-0
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml properties: · line 43
Quoted 7 lines
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +4
-0@@ -37,6 +37,11 @@ properties: GPIO pin (output) used to control VBUS. If skipped, no such control takes place. + connector: + type: object + $ref: /schemas/connector/usb-connector.yaml# + unevaluatedProperties: false
FWIW, neither the type nor the uneval properties should be needed here, the referenced schema has additionalProperties: False.
Otherwise,
Cheers,
Conor.
Quoted 7 lines
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +1
-0+ required: - compatible - interruptsSignature · 1 line
2.34.1
Quoted 15 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
PTN5150 supports USB Type-C connector, so improve the bindings by allowing to describe the connector like it is done on nxp,ptn5110.yaml.
Signed-off-by Fabio Estevam <[email protected]>--- Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml | 5 +++++ 1 file changed, 5 insertions(+)Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +0
-0
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml properties: · line 44
Quoted 8 lines
Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml +5
-0@@ -37,6 +37,11 @@ properties: GPIO pin (output) used to control VBUS. If skipped, no such control takes place. + connector: + type: object + $ref: /schemas/connector/usb-connector.yaml# + unevaluatedProperties: false +
If I read drivers/usb/roles/class.c usb_role_switch_get() implementation right, that function is doing an OF graph look up and expects a port {} subnode for that purpose. The drivers/extcon/extcon-ptn5150.c ptn5150_i2c_probe() calls usb_role_switch_get(), so I would expect the ptn5150 DT node should contain a port {} subnode, not a connector subnode.
I think that's what should be done here -- update this PTN5150 binding document and describe the port {} subnode. The two DT patches are not needed and are in fact wrong ; at least the PDK3 one breaks PDK3 USB-C operation as the usb_role_switch_get() look up fails in the PTN5150 driver with that DT patch applied.