Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Fabio Estevam <festevam@gmail.com>, cw00.choi@samsung.com
Cc: myungjoo.ham@samsung.com, robh+dt@kernel.org,
	krzysztof.kozlowski@linaro.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org, shawnguo@kernel.org,
	hvilleneuve@dimonoff.com, linux-arm-kernel@lists.infradead.org,
	Fabio Estevam <festevam@denx.de>
Subject: Re: [PATCH 1/3] dt-bindings: extcon: ptn5150: Describe the USB connector
Date: Sat, 13 Jan 2024 23:06:25 +0100	[thread overview]
Message-ID: <04c11c66-98f6-4d4e-8644-7bdf0443d4d1@denx.de> (raw)
In-Reply-To: <20231212112729.700987-1-festevam@gmail.com>

On 12/12/23 12:27, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> 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 <festevam@denx.de>
> ---
>   Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
> index d5cfa32ea52d..3837da7416e9 100644
> --- a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
> +++ b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
> @@ -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.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      parent reply	other threads:[~2024-01-13 22:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12 11:27 [PATCH 1/3] dt-bindings: extcon: ptn5150: Describe the USB connector Fabio Estevam
2023-12-12 11:27 ` [PATCH 2/3] arm64: dts: imx8mn-var-som-symphony: Describe the USB-C connector Fabio Estevam
2023-12-12 11:27 ` [PATCH 3/3] arm64: dts: imx8mp-dhcom-pdk3: " Fabio Estevam
2023-12-12 17:33 ` [PATCH 1/3] dt-bindings: extcon: ptn5150: Describe the USB connector Conor Dooley
2024-01-13 22:06 ` Marek Vasut [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=04c11c66-98f6-4d4e-8644-7bdf0443d4d1@denx.de \
    --to=marex@denx.de \
    --cc=conor+dt@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@denx.de \
    --cc=festevam@gmail.com \
    --cc=hvilleneuve@dimonoff.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox