The Type-C chip know the cable orientation and then normally will set the
switch channel to correctly configure the data path. Some chips itself
support to output the control signal by indicating the capability in
bit[0] of STANDARD_OUTPUT_CAPABILITIES register and do it in
CONFIG_STANDARD_OUTPUT register. For other chips which don't present this
capability currently there are no way to achieve the orientation setting.
Add an optional "orientation-gpio" property to achieve the same purpose.
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml
index 65a8632b4d9e..866b5d033f4e 100644
--- a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml
+++ b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml
@@ -26,6 +26,11 @@ properties:
$ref: /schemas/connector/usb-connector.yaml#
unevaluatedProperties: false
+ orientation-gpio:
+ description: Optional orientation select control if the chip doesn't
+ present "Connector Orientation" bit[0] in STANDARD_OUTPUT_CAPABILITIES
+ register.
+
required:
- compatible
- reg
--
2.34.1
On Tue, Mar 10, 2026 at 04:13:56PM +0800, Xu Yang wrote: > The Type-C chip know the cable orientation and then normally will set the > switch channel to correctly configure the data path. Some chips itself > support to output the control signal by indicating the capability in > bit[0] of STANDARD_OUTPUT_CAPABILITIES register and do it in > CONFIG_STANDARD_OUTPUT register. For other chips which don't present this > capability currently there are no way to achieve the orientation setting. > Add an optional "orientation-gpio" property to achieve the same purpose. > > Signed-off-by: Xu Yang <xu.yang_2@nxp.com> > --- > Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > index 65a8632b4d9e..866b5d033f4e 100644 > --- a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > +++ b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > @@ -26,6 +26,11 @@ properties: > $ref: /schemas/connector/usb-connector.yaml# > unevaluatedProperties: false > > + orientation-gpio: Ah, and you cannot have "gpio" property. It's also typeless and constrain-less, so looks like you create some random code here. :/ From where did you take such syntax? Best regards, Krzysztof
On Wed, Mar 11, 2026 at 02:00:21PM +0100, Krzysztof Kozlowski wrote:
> On Tue, Mar 10, 2026 at 04:13:56PM +0800, Xu Yang wrote:
> > The Type-C chip know the cable orientation and then normally will set the
> > switch channel to correctly configure the data path. Some chips itself
> > support to output the control signal by indicating the capability in
> > bit[0] of STANDARD_OUTPUT_CAPABILITIES register and do it in
> > CONFIG_STANDARD_OUTPUT register. For other chips which don't present this
> > capability currently there are no way to achieve the orientation setting.
> > Add an optional "orientation-gpio" property to achieve the same purpose.
> >
> > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> > ---
> > Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml
> > index 65a8632b4d9e..866b5d033f4e 100644
> > --- a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml
> > +++ b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml
> > @@ -26,6 +26,11 @@ properties:
> > $ref: /schemas/connector/usb-connector.yaml#
> > unevaluatedProperties: false
> >
> > + orientation-gpio:
>
> Ah, and you cannot have "gpio" property. It's also typeless and
> constrain-less, so looks like you create some random code here. :/
Thanks for your correction.
After carefully reading the doc I think it should be:
orientation-gpios:
maxItems: 1
description: ...
>
> >From where did you take such syntax?
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/tree/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml?h=usb-next#n61
It may also need improvement.
Thanks,
Xu Yang
On 11/03/2026 16:19, Xu Yang wrote: > On Wed, Mar 11, 2026 at 02:00:21PM +0100, Krzysztof Kozlowski wrote: >> On Tue, Mar 10, 2026 at 04:13:56PM +0800, Xu Yang wrote: >>> The Type-C chip know the cable orientation and then normally will set the >>> switch channel to correctly configure the data path. Some chips itself >>> support to output the control signal by indicating the capability in >>> bit[0] of STANDARD_OUTPUT_CAPABILITIES register and do it in >>> CONFIG_STANDARD_OUTPUT register. For other chips which don't present this >>> capability currently there are no way to achieve the orientation setting. >>> Add an optional "orientation-gpio" property to achieve the same purpose. >>> >>> Signed-off-by: Xu Yang <xu.yang_2@nxp.com> >>> --- >>> Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml | 5 +++++ >>> 1 file changed, 5 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml >>> index 65a8632b4d9e..866b5d033f4e 100644 >>> --- a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml >>> +++ b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml >>> @@ -26,6 +26,11 @@ properties: >>> $ref: /schemas/connector/usb-connector.yaml# >>> unevaluatedProperties: false >>> >>> + orientation-gpio: >> >> Ah, and you cannot have "gpio" property. It's also typeless and >> constrain-less, so looks like you create some random code here. :/ > > Thanks for your correction. > After carefully reading the doc I think it should be: > > orientation-gpios: > maxItems: 1 > description: ... > >> >> >From where did you take such syntax? > > https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/tree/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml?h=usb-next#n61 > It may also need improvement. And what is written in referenced schema - that's deprecated. Best regards, Krzysztof
On Tue, Mar 10, 2026 at 04:13:56PM +0800, Xu Yang wrote: > The Type-C chip know the cable orientation and then normally will set the > switch channel to correctly configure the data path. Some chips itself > support to output the control signal by indicating the capability in > bit[0] of STANDARD_OUTPUT_CAPABILITIES register and do it in > CONFIG_STANDARD_OUTPUT register. For other chips which don't present this > capability currently there are no way to achieve the orientation setting. > Add an optional "orientation-gpio" property to achieve the same purpose. > > Signed-off-by: Xu Yang <xu.yang_2@nxp.com> > --- > Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > index 65a8632b4d9e..866b5d033f4e 100644 > --- a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > +++ b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > @@ -26,6 +26,11 @@ properties: > $ref: /schemas/connector/usb-connector.yaml# > unevaluatedProperties: false > > + orientation-gpio: > + description: Optional orientation select control if the chip doesn't > + present "Connector Orientation" bit[0] in STANDARD_OUTPUT_CAPABILITIES What do you mean by "if the chip"? There is only one chip, so its registers are fixed. Why would this device sometimes report it and sometimes not? Best regards, Krzysztof
On Wed, Mar 11, 2026 at 01:59:10PM +0100, Krzysztof Kozlowski wrote: > On Tue, Mar 10, 2026 at 04:13:56PM +0800, Xu Yang wrote: > > The Type-C chip know the cable orientation and then normally will set the > > switch channel to correctly configure the data path. Some chips itself > > support to output the control signal by indicating the capability in > > bit[0] of STANDARD_OUTPUT_CAPABILITIES register and do it in > > CONFIG_STANDARD_OUTPUT register. For other chips which don't present this > > capability currently there are no way to achieve the orientation setting. > > Add an optional "orientation-gpio" property to achieve the same purpose. > > > > Signed-off-by: Xu Yang <xu.yang_2@nxp.com> > > --- > > Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > > index 65a8632b4d9e..866b5d033f4e 100644 > > --- a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > > +++ b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > > @@ -26,6 +26,11 @@ properties: > > $ref: /schemas/connector/usb-connector.yaml# > > unevaluatedProperties: false > > > > + orientation-gpio: > > + description: Optional orientation select control if the chip doesn't > > + present "Connector Orientation" bit[0] in STANDARD_OUTPUT_CAPABILITIES > > What do you mean by "if the chip"? There is only one chip, so its > registers are fixed. Why would this device sometimes report it and > sometimes not? Yes, you are right. PTN5110 is the only TCPCI compatible chip in this binding, so its registers are fixed. I forgot this truth and thought it's for all TCPCI compatible chip. I will remove the confused words. Thanks, Xu Yang
© 2016 - 2026 Red Hat, Inc.