devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs
@ 2024-04-08  2:33 Dmitry Baryshkov
  2024-04-08  2:33 ` [PATCH 1/4] arm64: dts: qcom: sm8350-hdk: add USB-C orientation GPIO Dmitry Baryshkov
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-04-08  2:33 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

Populate orientation GPIOs for some of the PMIC-GLINK-based devices.
This leaves only FairPhone5, RB3Gen2, SC8180X Primus and SC8280XP CRD
without the orientation GPIOs declared.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Dmitry Baryshkov (4):
      arm64: dts: qcom: sm8350-hdk: add USB-C orientation GPIO
      arm64: dts: qcom: sm8450-hdk: add USB-C orientation GPIO
      arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add USB-C orientation GPIOs
      arm64: dts: qcom: sc8180x-lenovo-flex-5g: add USB-C orientation GPIOs

 arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts        | 2 ++
 arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 ++
 arch/arm64/boot/dts/qcom/sm8350-hdk.dts                    | 1 +
 arch/arm64/boot/dts/qcom/sm8450-hdk.dts                    | 1 +
 4 files changed, 6 insertions(+)
---
base-commit: 8568bb2ccc278f344e6ac44af6ed010a90aa88dc
change-id: 20240408-hdk-orientation-gpios-141bc7fd247d

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/4] arm64: dts: qcom: sm8350-hdk: add USB-C orientation GPIO
  2024-04-08  2:33 [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs Dmitry Baryshkov
@ 2024-04-08  2:33 ` Dmitry Baryshkov
  2024-04-08  2:34 ` [PATCH 2/4] arm64: dts: qcom: sm8450-hdk: " Dmitry Baryshkov
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-04-08  2:33 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

Define the USB-C orientation GPIO so that the USB-C port orientation is
known without having to resort to the altmode notifications.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts
index b43d264ed42b..4c25ab2f5670 100644
--- a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts
+++ b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts
@@ -42,6 +42,7 @@ pmic-glink {
 		compatible = "qcom,sm8350-pmic-glink", "qcom,pmic-glink";
 		#address-cells = <1>;
 		#size-cells = <0>;
+		orientation-gpios = <&tlmm 81 GPIO_ACTIVE_HIGH>;
 
 		connector@0 {
 			compatible = "usb-c-connector";

-- 
2.39.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/4] arm64: dts: qcom: sm8450-hdk: add USB-C orientation GPIO
  2024-04-08  2:33 [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs Dmitry Baryshkov
  2024-04-08  2:33 ` [PATCH 1/4] arm64: dts: qcom: sm8350-hdk: add USB-C orientation GPIO Dmitry Baryshkov
@ 2024-04-08  2:34 ` Dmitry Baryshkov
  2024-04-08  2:34 ` [PATCH 3/4] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add USB-C orientation GPIOs Dmitry Baryshkov
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-04-08  2:34 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

Define the USB-C orientation GPIO so that the USB-C port orientation is
known without having to resort to the altmode notifications.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
index 0786cff07b89..3be46b56c723 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
+++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
@@ -95,6 +95,7 @@ pmic-glink {
 		compatible = "qcom,sm8450-pmic-glink", "qcom,pmic-glink";
 		#address-cells = <1>;
 		#size-cells = <0>;
+		orientation-gpios = <&tlmm 91 GPIO_ACTIVE_HIGH>;
 
 		connector@0 {
 			compatible = "usb-c-connector";

-- 
2.39.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/4] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add USB-C orientation GPIOs
  2024-04-08  2:33 [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs Dmitry Baryshkov
  2024-04-08  2:33 ` [PATCH 1/4] arm64: dts: qcom: sm8350-hdk: add USB-C orientation GPIO Dmitry Baryshkov
  2024-04-08  2:34 ` [PATCH 2/4] arm64: dts: qcom: sm8450-hdk: " Dmitry Baryshkov
@ 2024-04-08  2:34 ` Dmitry Baryshkov
  2024-04-08 14:26   ` Konrad Dybcio
  2024-04-08  2:34 ` [PATCH 4/4] arm64: dts: qcom: sc8180x-lenovo-flex-5g: " Dmitry Baryshkov
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-04-08  2:34 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

Define the USB-C orientation GPIOs so that the USB-C ports orientation
is known without having to resort to the altmode notifications.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index 15ae94c1602d..2806aa8ec497 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -100,6 +100,8 @@ pmic-glink {
 
 		#address-cells = <1>;
 		#size-cells = <0>;
+		orientation-gpios = <&tlmm 166 GPIO_ACTIVE_HIGH>,
+				    <&tlmm 49 GPIO_ACTIVE_HIGH>;
 
 		connector@0 {
 			compatible = "usb-c-connector";

-- 
2.39.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/4] arm64: dts: qcom: sc8180x-lenovo-flex-5g: add USB-C orientation GPIOs
  2024-04-08  2:33 [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs Dmitry Baryshkov
                   ` (2 preceding siblings ...)
  2024-04-08  2:34 ` [PATCH 3/4] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add USB-C orientation GPIOs Dmitry Baryshkov
@ 2024-04-08  2:34 ` Dmitry Baryshkov
  2024-04-08  7:02 ` [PATCH 0/4] arm64: dts: qcom: " Luca Weiss
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-04-08  2:34 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

Define the USB-C orientation GPIOs so that the USB-C ports orientation
is known without having to resort to the altmode notifications.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts b/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts
index 6f2e1c732ed3..6af99116c715 100644
--- a/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts
+++ b/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts
@@ -51,6 +51,8 @@ pmic-glink {
 
 		#address-cells = <1>;
 		#size-cells = <0>;
+		orientation-gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>,
+				    <&tlmm 58 GPIO_ACTIVE_HIGH>;
 
 		connector@0 {
 			compatible = "usb-c-connector";

-- 
2.39.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs
  2024-04-08  2:33 [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs Dmitry Baryshkov
                   ` (3 preceding siblings ...)
  2024-04-08  2:34 ` [PATCH 4/4] arm64: dts: qcom: sc8180x-lenovo-flex-5g: " Dmitry Baryshkov
@ 2024-04-08  7:02 ` Luca Weiss
  2024-04-08  7:03   ` Dmitry Baryshkov
  2024-04-08  7:25 ` neil.armstrong
  2024-04-09 13:38 ` Rob Herring
  6 siblings, 1 reply; 13+ messages in thread
From: Luca Weiss @ 2024-04-08  7:02 UTC (permalink / raw)
  To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On Mon Apr 8, 2024 at 4:33 AM CEST, Dmitry Baryshkov wrote:
> Populate orientation GPIOs for some of the PMIC-GLINK-based devices.
> This leaves only FairPhone5, RB3Gen2, SC8180X Primus and SC8280XP CRD
> without the orientation GPIOs declared.

Hi Dmitry,

How would I find this GPIO on the schematics, or downstream devicetree?
I scanned over some relevant areas but nothing jumped out at me except
for the USB_PHY_PS signal coming from PM7250B CC_OUT and going into
GPIO_140 of the QCM6490 - but I'm guessing this is something else?

Regards
Luca

>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> Dmitry Baryshkov (4):
>       arm64: dts: qcom: sm8350-hdk: add USB-C orientation GPIO
>       arm64: dts: qcom: sm8450-hdk: add USB-C orientation GPIO
>       arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add USB-C orientation GPIOs
>       arm64: dts: qcom: sc8180x-lenovo-flex-5g: add USB-C orientation GPIOs
>
>  arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts        | 2 ++
>  arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 ++
>  arch/arm64/boot/dts/qcom/sm8350-hdk.dts                    | 1 +
>  arch/arm64/boot/dts/qcom/sm8450-hdk.dts                    | 1 +
>  4 files changed, 6 insertions(+)
> ---
> base-commit: 8568bb2ccc278f344e6ac44af6ed010a90aa88dc
> change-id: 20240408-hdk-orientation-gpios-141bc7fd247d
>
> Best regards,


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs
  2024-04-08  7:02 ` [PATCH 0/4] arm64: dts: qcom: " Luca Weiss
@ 2024-04-08  7:03   ` Dmitry Baryshkov
  2024-04-08  7:04     ` Luca Weiss
  0 siblings, 1 reply; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-04-08  7:03 UTC (permalink / raw)
  To: Luca Weiss
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

On Mon, 8 Apr 2024 at 10:02, Luca Weiss <luca.weiss@fairphone.com> wrote:
>
> On Mon Apr 8, 2024 at 4:33 AM CEST, Dmitry Baryshkov wrote:
> > Populate orientation GPIOs for some of the PMIC-GLINK-based devices.
> > This leaves only FairPhone5, RB3Gen2, SC8180X Primus and SC8280XP CRD
> > without the orientation GPIOs declared.
>
> Hi Dmitry,
>
> How would I find this GPIO on the schematics, or downstream devicetree?
> I scanned over some relevant areas but nothing jumped out at me except
> for the USB_PHY_PS signal coming from PM7250B CC_OUT and going into
> GPIO_140 of the QCM6490 - but I'm guessing this is something else?

It is exactly that GPIO.

>
> Regards
> Luca
>
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> > Dmitry Baryshkov (4):
> >       arm64: dts: qcom: sm8350-hdk: add USB-C orientation GPIO
> >       arm64: dts: qcom: sm8450-hdk: add USB-C orientation GPIO
> >       arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add USB-C orientation GPIOs
> >       arm64: dts: qcom: sc8180x-lenovo-flex-5g: add USB-C orientation GPIOs
> >
> >  arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts        | 2 ++
> >  arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 ++
> >  arch/arm64/boot/dts/qcom/sm8350-hdk.dts                    | 1 +
> >  arch/arm64/boot/dts/qcom/sm8450-hdk.dts                    | 1 +
> >  4 files changed, 6 insertions(+)
> > ---
> > base-commit: 8568bb2ccc278f344e6ac44af6ed010a90aa88dc
> > change-id: 20240408-hdk-orientation-gpios-141bc7fd247d
> >
> > Best regards,
>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs
  2024-04-08  7:03   ` Dmitry Baryshkov
@ 2024-04-08  7:04     ` Luca Weiss
  2024-04-08  7:50       ` Luca Weiss
  0 siblings, 1 reply; 13+ messages in thread
From: Luca Weiss @ 2024-04-08  7:04 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

On Mon Apr 8, 2024 at 9:03 AM CEST, Dmitry Baryshkov wrote:
> On Mon, 8 Apr 2024 at 10:02, Luca Weiss <luca.weiss@fairphone.com> wrote:
> >
> > On Mon Apr 8, 2024 at 4:33 AM CEST, Dmitry Baryshkov wrote:
> > > Populate orientation GPIOs for some of the PMIC-GLINK-based devices.
> > > This leaves only FairPhone5, RB3Gen2, SC8180X Primus and SC8280XP CRD
> > > without the orientation GPIOs declared.
> >
> > Hi Dmitry,
> >
> > How would I find this GPIO on the schematics, or downstream devicetree?
> > I scanned over some relevant areas but nothing jumped out at me except
> > for the USB_PHY_PS signal coming from PM7250B CC_OUT and going into
> > GPIO_140 of the QCM6490 - but I'm guessing this is something else?
>
> It is exactly that GPIO.

Great, thanks! The PM7250B datasheet and my limited USB-C knowledge
didn't help me there much ;)

I'll send a patch to add it.

Regards
Luca

>
> >
> > Regards
> > Luca
> >
> > >
> > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > ---
> > > Dmitry Baryshkov (4):
> > >       arm64: dts: qcom: sm8350-hdk: add USB-C orientation GPIO
> > >       arm64: dts: qcom: sm8450-hdk: add USB-C orientation GPIO
> > >       arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add USB-C orientation GPIOs
> > >       arm64: dts: qcom: sc8180x-lenovo-flex-5g: add USB-C orientation GPIOs
> > >
> > >  arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts        | 2 ++
> > >  arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 ++
> > >  arch/arm64/boot/dts/qcom/sm8350-hdk.dts                    | 1 +
> > >  arch/arm64/boot/dts/qcom/sm8450-hdk.dts                    | 1 +
> > >  4 files changed, 6 insertions(+)
> > > ---
> > > base-commit: 8568bb2ccc278f344e6ac44af6ed010a90aa88dc
> > > change-id: 20240408-hdk-orientation-gpios-141bc7fd247d
> > >
> > > Best regards,
> >


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs
  2024-04-08  2:33 [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs Dmitry Baryshkov
                   ` (4 preceding siblings ...)
  2024-04-08  7:02 ` [PATCH 0/4] arm64: dts: qcom: " Luca Weiss
@ 2024-04-08  7:25 ` neil.armstrong
  2024-04-09 13:38 ` Rob Herring
  6 siblings, 0 replies; 13+ messages in thread
From: neil.armstrong @ 2024-04-08  7:25 UTC (permalink / raw)
  To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 08/04/2024 04:33, Dmitry Baryshkov wrote:
> Populate orientation GPIOs for some of the PMIC-GLINK-based devices.
> This leaves only FairPhone5, RB3Gen2, SC8180X Primus and SC8280XP CRD
> without the orientation GPIOs declared.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> Dmitry Baryshkov (4):
>        arm64: dts: qcom: sm8350-hdk: add USB-C orientation GPIO
>        arm64: dts: qcom: sm8450-hdk: add USB-C orientation GPIO
>        arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add USB-C orientation GPIOs
>        arm64: dts: qcom: sc8180x-lenovo-flex-5g: add USB-C orientation GPIOs
> 
>   arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts        | 2 ++
>   arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 ++
>   arch/arm64/boot/dts/qcom/sm8350-hdk.dts                    | 1 +
>   arch/arm64/boot/dts/qcom/sm8450-hdk.dts                    | 1 +
>   4 files changed, 6 insertions(+)
> ---
> base-commit: 8568bb2ccc278f344e6ac44af6ed010a90aa88dc
> change-id: 20240408-hdk-orientation-gpios-141bc7fd247d
> 
> Best regards,

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks !

Neil

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs
  2024-04-08  7:04     ` Luca Weiss
@ 2024-04-08  7:50       ` Luca Weiss
  2024-04-08  7:56         ` Dmitry Baryshkov
  0 siblings, 1 reply; 13+ messages in thread
From: Luca Weiss @ 2024-04-08  7:50 UTC (permalink / raw)
  To: Luca Weiss, Dmitry Baryshkov
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

On Mon Apr 8, 2024 at 9:04 AM CEST, Luca Weiss wrote:
> On Mon Apr 8, 2024 at 9:03 AM CEST, Dmitry Baryshkov wrote:
> > On Mon, 8 Apr 2024 at 10:02, Luca Weiss <luca.weiss@fairphone.com> wrote:
> > >
> > > On Mon Apr 8, 2024 at 4:33 AM CEST, Dmitry Baryshkov wrote:
> > > > Populate orientation GPIOs for some of the PMIC-GLINK-based devices.
> > > > This leaves only FairPhone5, RB3Gen2, SC8180X Primus and SC8280XP CRD
> > > > without the orientation GPIOs declared.
> > >
> > > Hi Dmitry,
> > >
> > > How would I find this GPIO on the schematics, or downstream devicetree?
> > > I scanned over some relevant areas but nothing jumped out at me except
> > > for the USB_PHY_PS signal coming from PM7250B CC_OUT and going into
> > > GPIO_140 of the QCM6490 - but I'm guessing this is something else?
> >
> > It is exactly that GPIO.
>
> Great, thanks! The PM7250B datasheet and my limited USB-C knowledge
> didn't help me there much ;)
>
> I'll send a patch to add it.

One thing I've noticed now is that the dt schema currently explicitly
disallows orientation-gpios for anything that's not sm8450, sm8550 or
x1e80100.

  arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dtb: pmic-glink: orientation-gpios: False schema does not allow [[84, 140, 0]]
          from schema $id: http://devicetree.org/schemas/soc/qcom/qcom,pmic-glink.yaml#

So I'd think also this series will cause some extra validation errors if
the schema is not adjusted? Are you planning to do that?

Regards
Luca

>
> Regards
> Luca
>
> >
> > >
> > > Regards
> > > Luca
> > >
> > > >
> > > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > > ---
> > > > Dmitry Baryshkov (4):
> > > >       arm64: dts: qcom: sm8350-hdk: add USB-C orientation GPIO
> > > >       arm64: dts: qcom: sm8450-hdk: add USB-C orientation GPIO
> > > >       arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add USB-C orientation GPIOs
> > > >       arm64: dts: qcom: sc8180x-lenovo-flex-5g: add USB-C orientation GPIOs
> > > >
> > > >  arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts        | 2 ++
> > > >  arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 ++
> > > >  arch/arm64/boot/dts/qcom/sm8350-hdk.dts                    | 1 +
> > > >  arch/arm64/boot/dts/qcom/sm8450-hdk.dts                    | 1 +
> > > >  4 files changed, 6 insertions(+)
> > > > ---
> > > > base-commit: 8568bb2ccc278f344e6ac44af6ed010a90aa88dc
> > > > change-id: 20240408-hdk-orientation-gpios-141bc7fd247d
> > > >
> > > > Best regards,
> > >


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs
  2024-04-08  7:50       ` Luca Weiss
@ 2024-04-08  7:56         ` Dmitry Baryshkov
  0 siblings, 0 replies; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-04-08  7:56 UTC (permalink / raw)
  To: Luca Weiss
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

On Mon, 8 Apr 2024 at 10:50, Luca Weiss <luca.weiss@fairphone.com> wrote:
>
> On Mon Apr 8, 2024 at 9:04 AM CEST, Luca Weiss wrote:
> > On Mon Apr 8, 2024 at 9:03 AM CEST, Dmitry Baryshkov wrote:
> > > On Mon, 8 Apr 2024 at 10:02, Luca Weiss <luca.weiss@fairphone.com> wrote:
> > > >
> > > > On Mon Apr 8, 2024 at 4:33 AM CEST, Dmitry Baryshkov wrote:
> > > > > Populate orientation GPIOs for some of the PMIC-GLINK-based devices.
> > > > > This leaves only FairPhone5, RB3Gen2, SC8180X Primus and SC8280XP CRD
> > > > > without the orientation GPIOs declared.
> > > >
> > > > Hi Dmitry,
> > > >
> > > > How would I find this GPIO on the schematics, or downstream devicetree?
> > > > I scanned over some relevant areas but nothing jumped out at me except
> > > > for the USB_PHY_PS signal coming from PM7250B CC_OUT and going into
> > > > GPIO_140 of the QCM6490 - but I'm guessing this is something else?
> > >
> > > It is exactly that GPIO.
> >
> > Great, thanks! The PM7250B datasheet and my limited USB-C knowledge
> > didn't help me there much ;)
> >
> > I'll send a patch to add it.
>
> One thing I've noticed now is that the dt schema currently explicitly
> disallows orientation-gpios for anything that's not sm8450, sm8550 or
> x1e80100.
>
>   arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dtb: pmic-glink: orientation-gpios: False schema does not allow [[84, 140, 0]]
>           from schema $id: http://devicetree.org/schemas/soc/qcom/qcom,pmic-glink.yaml#
>
> So I'd think also this series will cause some extra validation errors if
> the schema is not adjusted? Are you planning to do that?

I didn't check it. Yes, I will include it in v2.

>
> Regards
> Luca
>
> >
> > Regards
> > Luca
> >
> > >
> > > >
> > > > Regards
> > > > Luca
> > > >
> > > > >
> > > > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > > > ---
> > > > > Dmitry Baryshkov (4):
> > > > >       arm64: dts: qcom: sm8350-hdk: add USB-C orientation GPIO
> > > > >       arm64: dts: qcom: sm8450-hdk: add USB-C orientation GPIO
> > > > >       arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add USB-C orientation GPIOs
> > > > >       arm64: dts: qcom: sc8180x-lenovo-flex-5g: add USB-C orientation GPIOs
> > > > >
> > > > >  arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts        | 2 ++
> > > > >  arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 ++
> > > > >  arch/arm64/boot/dts/qcom/sm8350-hdk.dts                    | 1 +
> > > > >  arch/arm64/boot/dts/qcom/sm8450-hdk.dts                    | 1 +
> > > > >  4 files changed, 6 insertions(+)
> > > > > ---
> > > > > base-commit: 8568bb2ccc278f344e6ac44af6ed010a90aa88dc
> > > > > change-id: 20240408-hdk-orientation-gpios-141bc7fd247d
> > > > >
> > > > > Best regards,
> > > >
>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/4] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add USB-C orientation GPIOs
  2024-04-08  2:34 ` [PATCH 3/4] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add USB-C orientation GPIOs Dmitry Baryshkov
@ 2024-04-08 14:26   ` Konrad Dybcio
  0 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2024-04-08 14:26 UTC (permalink / raw)
  To: Dmitry Baryshkov, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel



On 4/8/24 04:34, Dmitry Baryshkov wrote:
> Define the USB-C orientation GPIOs so that the USB-C ports orientation
> is known without having to resort to the altmode notifications.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 15ae94c1602d..2806aa8ec497 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -100,6 +100,8 @@ pmic-glink {
>   
>   		#address-cells = <1>;
>   		#size-cells = <0>;
> +		orientation-gpios = <&tlmm 166 GPIO_ACTIVE_HIGH>,
> +				    <&tlmm 49 GPIO_ACTIVE_HIGH>;

These numbers do check out

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs
  2024-04-08  2:33 [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs Dmitry Baryshkov
                   ` (5 preceding siblings ...)
  2024-04-08  7:25 ` neil.armstrong
@ 2024-04-09 13:38 ` Rob Herring
  6 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2024-04-09 13:38 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Conor Dooley, Bjorn Andersson, Konrad Dybcio, Krzysztof Kozlowski,
	linux-kernel, devicetree, linux-arm-msm


On Mon, 08 Apr 2024 05:33:58 +0300, Dmitry Baryshkov wrote:
> Populate orientation GPIOs for some of the PMIC-GLINK-based devices.
> This leaves only FairPhone5, RB3Gen2, SC8180X Primus and SC8280XP CRD
> without the orientation GPIOs declared.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> Dmitry Baryshkov (4):
>       arm64: dts: qcom: sm8350-hdk: add USB-C orientation GPIO
>       arm64: dts: qcom: sm8450-hdk: add USB-C orientation GPIO
>       arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add USB-C orientation GPIOs
>       arm64: dts: qcom: sc8180x-lenovo-flex-5g: add USB-C orientation GPIOs
> 
>  arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts        | 2 ++
>  arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 ++
>  arch/arm64/boot/dts/qcom/sm8350-hdk.dts                    | 1 +
>  arch/arm64/boot/dts/qcom/sm8450-hdk.dts                    | 1 +
>  4 files changed, 6 insertions(+)
> ---
> base-commit: 8568bb2ccc278f344e6ac44af6ed010a90aa88dc
> change-id: 20240408-hdk-orientation-gpios-141bc7fd247d
> 
> Best regards,
> --
> Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


New warnings running 'make CHECK_DTBS=y qcom/sc8180x-lenovo-flex-5g.dtb qcom/sc8280xp-lenovo-thinkpad-x13s.dtb qcom/sm8350-hdk.dtb qcom/sm8450-hdk.dtb' for 20240408-hdk-orientation-gpios-v1-0-8064ba43e52a@linaro.org:

arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dtb: pmic-glink: orientation-gpios: False schema does not allow [[50, 38, 0], [50, 58, 0]]
	from schema $id: http://devicetree.org/schemas/soc/qcom/qcom,pmic-glink.yaml#
arch/arm64/boot/dts/qcom/sm8350-hdk.dtb: pmic-glink: orientation-gpios: False schema does not allow [[52, 81, 0]]
	from schema $id: http://devicetree.org/schemas/soc/qcom/qcom,pmic-glink.yaml#
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dtb: pmic-glink: orientation-gpios: False schema does not allow [[62, 166, 0], [62, 49, 0]]
	from schema $id: http://devicetree.org/schemas/soc/qcom/qcom,pmic-glink.yaml#






^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-04-09 13:38 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-08  2:33 [PATCH 0/4] arm64: dts: qcom: add USB-C orientation GPIOs Dmitry Baryshkov
2024-04-08  2:33 ` [PATCH 1/4] arm64: dts: qcom: sm8350-hdk: add USB-C orientation GPIO Dmitry Baryshkov
2024-04-08  2:34 ` [PATCH 2/4] arm64: dts: qcom: sm8450-hdk: " Dmitry Baryshkov
2024-04-08  2:34 ` [PATCH 3/4] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add USB-C orientation GPIOs Dmitry Baryshkov
2024-04-08 14:26   ` Konrad Dybcio
2024-04-08  2:34 ` [PATCH 4/4] arm64: dts: qcom: sc8180x-lenovo-flex-5g: " Dmitry Baryshkov
2024-04-08  7:02 ` [PATCH 0/4] arm64: dts: qcom: " Luca Weiss
2024-04-08  7:03   ` Dmitry Baryshkov
2024-04-08  7:04     ` Luca Weiss
2024-04-08  7:50       ` Luca Weiss
2024-04-08  7:56         ` Dmitry Baryshkov
2024-04-08  7:25 ` neil.armstrong
2024-04-09 13:38 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).