linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Enable DisplayPort over USB-C on SONY Sagami
@ 2023-03-21 22:12 Konrad Dybcio
  2023-03-21 22:12 ` [PATCH 1/4] dt-bindings: usb: gpio-sbu-mux: Add OnSemi NB7VPQ904M mux Konrad Dybcio
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-03-21 22:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Bjorn Andersson, Andy Gross
  Cc: Marijn Suijten, linux-usb, devicetree, linux-kernel,
	linux-arm-msm, Konrad Dybcio

DisplayPort is there before DSI panel, kinda funny!

Depends on:

https://lore.kernel.org/linux-arm-msm/20230130-topic-sm8450-upstream-pmic-glink-v5-0-552f3b721f9e@linaro.org
https://lore.kernel.org/linux-arm-msm/20230206-topic-sm8450-upstream-dp-controller-v6-3-d78313cbc41d@linaro.org

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Konrad Dybcio (4):
      dt-bindings: usb: gpio-sbu-mux: Add OnSemi NB7VPQ904M mux
      arm64: dts: qcom: sm8350-sagami: Add PMIC GLINK
      arm64: dts: qcom: sm8350-sagami: Hook up USB-C Display Port
      arm64: dts: qcom: sm8350-nagara: Unify status property placement

 .../devicetree/bindings/usb/gpio-sbu-mux.yaml      |   1 +
 .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi   | 162 ++++++++++++++++++---
 2 files changed, 146 insertions(+), 17 deletions(-)
---
base-commit: 52581937d6423c3bd15eb3894580ab87fe7308a1
change-id: 20230321-topic-sagami_dp-11f90e38d43c

Best regards,
-- 
Konrad Dybcio <konrad.dybcio@linaro.org>


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

* [PATCH 1/4] dt-bindings: usb: gpio-sbu-mux: Add OnSemi NB7VPQ904M mux
  2023-03-21 22:12 [PATCH 0/4] Enable DisplayPort over USB-C on SONY Sagami Konrad Dybcio
@ 2023-03-21 22:12 ` Konrad Dybcio
  2023-03-30 15:31   ` Rob Herring
  2023-03-21 22:12 ` [PATCH 2/4] arm64: dts: qcom: sm8350-sagami: Add PMIC GLINK Konrad Dybcio
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Konrad Dybcio @ 2023-03-21 22:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Bjorn Andersson, Andy Gross
  Cc: Marijn Suijten, linux-usb, devicetree, linux-kernel,
	linux-arm-msm, Konrad Dybcio

The OnSemi NB7VPQ904M Type-C DP altmode redriver provides SBU signals
that can be used in with the gpio-sbu-mux driver. Document it.

Note that the -mux suffix is there to indicate that the gpio-sbu-mux
driver interacts with the mux part of this otherwise quite sophisticated
chip, leaving the "onnn,nb7vpq904m" compatible free for when a proper
driver taking care of all of the chip's capabilities is introduced.

Ref: https://www.onsemi.com/products/signal-conditioning-control/redrivers/nb7vpq904m

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml b/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml
index bf4b1d016e1f..a7206009b691 100644
--- a/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml
+++ b/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml
@@ -20,6 +20,7 @@ properties:
     items:
       - enum:
           - onnn,fsusb43l10x
+          - onnn,nb7vpq904m-mux
           - pericom,pi3usb102
       - const: gpio-sbu-mux
 

-- 
2.40.0


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

* [PATCH 2/4] arm64: dts: qcom: sm8350-sagami: Add PMIC GLINK
  2023-03-21 22:12 [PATCH 0/4] Enable DisplayPort over USB-C on SONY Sagami Konrad Dybcio
  2023-03-21 22:12 ` [PATCH 1/4] dt-bindings: usb: gpio-sbu-mux: Add OnSemi NB7VPQ904M mux Konrad Dybcio
@ 2023-03-21 22:12 ` Konrad Dybcio
  2023-03-30 16:33   ` Neil Armstrong
  2023-03-21 22:12 ` [PATCH 3/4] arm64: dts: qcom: sm8350-sagami: Hook up USB-C Display Port Konrad Dybcio
  2023-03-21 22:12 ` [PATCH 4/4] arm64: dts: qcom: sm8350-nagara: Unify status property placement Konrad Dybcio
  3 siblings, 1 reply; 11+ messages in thread
From: Konrad Dybcio @ 2023-03-21 22:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Bjorn Andersson, Andy Gross
  Cc: Marijn Suijten, linux-usb, devicetree, linux-kernel,
	linux-arm-msm, Konrad Dybcio

Sagami devices, like other 8350s, uses PMIC GLINK for various
functionality around battery, charging, TCPM etc. Enable it.

Worth noting:
My USB mouse is unimpressed when connected to the device via a
non-powered USB-C dock. Microsoft HD-500 dock refuses to estalish a
PD handshake.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi   | 60 +++++++++++++++++++++-
 1 file changed, 59 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
index 89382ad73133..21462b6de686 100644
--- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
@@ -89,6 +89,42 @@ key-vol-down {
 		};
 	};
 
+	pmic-glink {
+		compatible = "qcom,sm8350-pmic-glink", "qcom,pmic-glink";
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		connector@0 {
+			compatible = "usb-c-connector";
+			reg = <0>;
+			power-role = "dual";
+			data-role = "dual";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					pmic_glink_dwc3_hs_in: endpoint {
+						remote-endpoint = <&usb_1_dwc3_hs>;
+					};
+				};
+
+				port@1 {
+					reg = <1>;
+
+					pmic_glink_dwc3_ss_in: endpoint {
+						remote-endpoint = <&usb_1_dwc3_ss>;
+					};
+				};
+			};
+		};
+	};
+
+
 	reserved-memory {
 		cont_splash_mem: memory@e1000000 {
 			reg = <0 0xe1000000 0 0x2300000>;
@@ -904,7 +940,29 @@ &usb_1 {
 };
 
 &usb_1_dwc3 {
-	dr_mode = "peripheral";
+	dr_mode = "otg";
+	usb-role-switch;
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+
+			usb_1_dwc3_hs: endpoint {
+				remote-endpoint = <&pmic_glink_dwc3_hs_in>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+
+			usb_1_dwc3_ss: endpoint {
+				remote-endpoint = <&pmic_glink_dwc3_ss_in>;
+			};
+		};
+	};
 };
 
 &usb_1_hsphy {

-- 
2.40.0


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

* [PATCH 3/4] arm64: dts: qcom: sm8350-sagami: Hook up USB-C Display Port
  2023-03-21 22:12 [PATCH 0/4] Enable DisplayPort over USB-C on SONY Sagami Konrad Dybcio
  2023-03-21 22:12 ` [PATCH 1/4] dt-bindings: usb: gpio-sbu-mux: Add OnSemi NB7VPQ904M mux Konrad Dybcio
  2023-03-21 22:12 ` [PATCH 2/4] arm64: dts: qcom: sm8350-sagami: Add PMIC GLINK Konrad Dybcio
@ 2023-03-21 22:12 ` Konrad Dybcio
  2023-03-21 22:12 ` [PATCH 4/4] arm64: dts: qcom: sm8350-nagara: Unify status property placement Konrad Dybcio
  3 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-03-21 22:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Bjorn Andersson, Andy Gross
  Cc: Marijn Suijten, linux-usb, devicetree, linux-kernel,
	linux-arm-msm, Konrad Dybcio

Sagami devices feature Display Port on their USB-C port. Add the
necessary nodes to support it.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi   | 72 ++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
index 21462b6de686..b2baa81baf5e 100644
--- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
@@ -120,6 +120,23 @@ pmic_glink_dwc3_ss_in: endpoint {
 						remote-endpoint = <&usb_1_dwc3_ss>;
 					};
 				};
+
+				port@2 {
+					reg = <2>;
+
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					pmic_glink_dp_in: endpoint@0 {
+						reg = <0>;
+						remote-endpoint = <&mdss_dp_altmode>;
+					};
+
+					pmic_glink_sbu_mux_out: endpoint@1 {
+						reg = <1>;
+						remote-endpoint = <&sbu_mux_in>;
+					};
+				};
 			};
 		};
 	};
@@ -140,6 +157,26 @@ ramoops@ffc00000 {
 		};
 	};
 
+	sbu-mux {
+		/* TODO: switch to a proper driver when one gets upstreamed */
+		compatible = "onnn,nb7vpq904m-mux", "gpio-sbu-mux";
+
+		enable-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
+		select-gpios = <&tlmm 55 GPIO_ACTIVE_HIGH>;
+		svid = /bits/ 16 <0xff01>;
+
+		mode-switch;
+		orientation-switch;
+
+		pinctrl-0 = <&sbu_sw_oe &sbu_sw_sel>;
+
+		port {
+			sbu_mux_in: endpoint {
+				remote-endpoint = <&pmic_glink_sbu_mux_out>;
+			};
+		};
+	};
+
 	vph_pwr: vph-pwr-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vph_pwr";
@@ -595,6 +632,25 @@ &ipa {
 	status = "okay";
 };
 
+&mdss {
+	status = "okay";
+};
+
+&mdss_dp {
+	data-lanes = <0 1 2 3>;
+	status = "okay";
+
+	ports {
+		port@1 {
+			reg = <1>;
+
+			mdss_dp_altmode: endpoint {
+				remote-endpoint = <&pmic_glink_dp_in>;
+			};
+		};
+	};
+};
+
 &mpss {
 	status = "okay";
 	firmware-name = "qcom/sm8350/Sony/sagami/modem.mbn";
@@ -916,6 +972,22 @@ ts_int_default: ts-int-default-state {
 		input-enable;
 	};
 
+	sbu_sw_oe: sbu-sw-oe-state {
+		pins = "gpio54";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+		output-low;
+	};
+
+	sbu_sw_sel: sbu-sw-sel-state {
+		pins = "gpio55";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+		output-low;
+	};
+
 	sdc2_card_det_active: sd-card-det-active-state {
 		pins = "gpio92";
 		function = "gpio";

-- 
2.40.0


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

* [PATCH 4/4] arm64: dts: qcom: sm8350-nagara: Unify status property placement
  2023-03-21 22:12 [PATCH 0/4] Enable DisplayPort over USB-C on SONY Sagami Konrad Dybcio
                   ` (2 preceding siblings ...)
  2023-03-21 22:12 ` [PATCH 3/4] arm64: dts: qcom: sm8350-sagami: Hook up USB-C Display Port Konrad Dybcio
@ 2023-03-21 22:12 ` Konrad Dybcio
  2023-03-30 16:32   ` Neil Armstrong
  2023-04-02 15:19   ` Marijn Suijten
  3 siblings, 2 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-03-21 22:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Bjorn Andersson, Andy Gross
  Cc: Marijn Suijten, linux-usb, devicetree, linux-kernel,
	linux-arm-msm, Konrad Dybcio

As we're heading towards getting the status property last everywhere,
take care of it for SM8350 SONY Sagami.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi   | 30 ++++++++++------------
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
index b2baa81baf5e..95b1ba4ce470 100644
--- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
@@ -189,8 +189,8 @@ vph_pwr: vph-pwr-regulator {
 };
 
 &adsp {
-	status = "okay";
 	firmware-name = "qcom/sm8350/Sony/sagami/adsp.mbn";
+	status = "okay";
 };
 
 &apps_rsc {
@@ -542,27 +542,27 @@ pmr735a_l7: ldo7 {
 };
 
 &cdsp {
-	status = "okay";
 	firmware-name = "qcom/sm8350/Sony/sagami/cdsp.mbn";
+	status = "okay";
 };
 
 &i2c1 {
-	status = "okay";
 	clock-frequency = <1000000>;
+	status = "okay";
 
 	/* Some subset of SONY IMX663 camera sensor @ 38 */
 };
 
 &i2c4 {
-	status = "okay";
 	clock-frequency = <400000>;
+	status = "okay";
 
 	/* Samsung Touchscreen (needs I2C GPI DMA) @ 48 */
 };
 
 &i2c11 {
-	status = "okay";
 	clock-frequency = <1000000>;
+	status = "okay";
 
 	cs35l41_l: speaker-amp@40 {
 		compatible = "cirrus,cs35l41";
@@ -596,31 +596,31 @@ cs35l41_r: speaker-amp@41 {
 };
 
 &i2c12 {
-	status = "okay";
 	/* Clock frequency was not specified downstream, let's park it to 100 KHz */
 	clock-frequency = <100000>;
+	status = "okay";
 
 	/* AMS TCS3490 RGB+IR color sensor @ 72 */
 };
 
 &i2c13 {
-	status = "okay";
 	/* Clock frequency was not specified downstream, let's park it to 100 KHz */
 	clock-frequency = <100000>;
+	status = "okay";
 
 	/* Qualcomm PM8008i/PM8008j (?) @ 8, 9, c, d */
 };
 
 &i2c15 {
-	status = "okay";
 	clock-frequency = <400000>;
+	status = "okay";
 
 	/* NXP SN1X0 NFC @ 28 */
 };
 
 &i2c17 {
-	status = "okay";
 	clock-frequency = <1000000>;
+	status = "okay";
 
 	/* Cirrus Logic CS40L25A boosted haptics driver @ 40 */
 };
@@ -652,8 +652,8 @@ mdss_dp_altmode: endpoint {
 };
 
 &mpss {
-	status = "okay";
 	firmware-name = "qcom/sm8350/Sony/sagami/modem.mbn";
+	status = "okay";
 };
 
 &pm8350_gpios {
@@ -719,8 +719,8 @@ &pon_pwrkey {
 };
 
 &pon_resin {
-	status = "okay";
 	linux,code = <KEY_VOLUMEUP>;
+	status = "okay";
 };
 
 &qupv3_id_0 {
@@ -748,8 +748,8 @@ &sdhc_2 {
 };
 
 &slpi {
-	status = "okay";
 	firmware-name = "qcom/sm8350/Sony/sagami/slpi.mbn";
+	status = "okay";
 };
 
 &spi14 {
@@ -1038,16 +1038,14 @@ usb_1_dwc3_ss: endpoint {
 };
 
 &usb_1_hsphy {
-	status = "okay";
-
 	vdda-pll-supply = <&pm8350_l5>;
 	vdda18-supply = <&pm8350c_l1>;
 	vdda33-supply = <&pm8350_l2>;
+	status = "okay";
 };
 
 &usb_1_qmpphy {
-	status = "okay";
-
 	vdda-phy-supply = <&pm8350_l6>;
 	vdda-pll-supply = <&pm8350_l1>;
+	status = "okay";
 };

-- 
2.40.0


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

* Re: [PATCH 1/4] dt-bindings: usb: gpio-sbu-mux: Add OnSemi NB7VPQ904M mux
  2023-03-21 22:12 ` [PATCH 1/4] dt-bindings: usb: gpio-sbu-mux: Add OnSemi NB7VPQ904M mux Konrad Dybcio
@ 2023-03-30 15:31   ` Rob Herring
  2023-03-30 23:00     ` Konrad Dybcio
  0 siblings, 1 reply; 11+ messages in thread
From: Rob Herring @ 2023-03-30 15:31 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Greg Kroah-Hartman, Krzysztof Kozlowski, Bjorn Andersson,
	Andy Gross, Marijn Suijten, linux-usb, devicetree, linux-kernel,
	linux-arm-msm

On Tue, Mar 21, 2023 at 11:12:28PM +0100, Konrad Dybcio wrote:
> The OnSemi NB7VPQ904M Type-C DP altmode redriver provides SBU signals
> that can be used in with the gpio-sbu-mux driver. Document it.
> 
> Note that the -mux suffix is there to indicate that the gpio-sbu-mux
> driver interacts with the mux part of this otherwise quite sophisticated
> chip, leaving the "onnn,nb7vpq904m" compatible free for when a proper
> driver taking care of all of the chip's capabilities is introduced.

You should define a proper and complete binding. If you want to bind the 
gpio-sbu-mux driver to it now until you have a proper driver then that's 
fine. When you have such a driver, then you drop the compatible from the 
gpio-sbu-mux driver.

Note that having the fallback "gpio-sbu-mux" is somewhat problematic 
because the kernel has no mechanism to ensure you bind the most specific 
driver. For that to happen, it would have to support (automatically) 
unbinding one driver and binding to the more specific driver since one 
driver could be built-in and the other a module.

Rob

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

* Re: [PATCH 4/4] arm64: dts: qcom: sm8350-nagara: Unify status property placement
  2023-03-21 22:12 ` [PATCH 4/4] arm64: dts: qcom: sm8350-nagara: Unify status property placement Konrad Dybcio
@ 2023-03-30 16:32   ` Neil Armstrong
  2023-04-02 15:19   ` Marijn Suijten
  1 sibling, 0 replies; 11+ messages in thread
From: Neil Armstrong @ 2023-03-30 16:32 UTC (permalink / raw)
  To: Konrad Dybcio, Greg Kroah-Hartman, Rob Herring,
	Krzysztof Kozlowski, Bjorn Andersson, Andy Gross
  Cc: Marijn Suijten, linux-usb, devicetree, linux-kernel, linux-arm-msm

Le 21/03/2023 à 23:12, Konrad Dybcio a écrit :
> As we're heading towards getting the status property last everywhere,
> take care of it for SM8350 SONY Sagami.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>   .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi   | 30 ++++++++++------------
>   1 file changed, 14 insertions(+), 16 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
> index b2baa81baf5e..95b1ba4ce470 100644
> --- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
> @@ -189,8 +189,8 @@ vph_pwr: vph-pwr-regulator {
>   };
>   
>   &adsp {
> -	status = "okay";
>   	firmware-name = "qcom/sm8350/Sony/sagami/adsp.mbn";
> +	status = "okay";
>   };
>   
>   &apps_rsc {
> @@ -542,27 +542,27 @@ pmr735a_l7: ldo7 {
>   };
>   
>   &cdsp {
> -	status = "okay";
>   	firmware-name = "qcom/sm8350/Sony/sagami/cdsp.mbn";
> +	status = "okay";
>   };
>   
>   &i2c1 {
> -	status = "okay";
>   	clock-frequency = <1000000>;
> +	status = "okay";
>   
>   	/* Some subset of SONY IMX663 camera sensor @ 38 */
>   };
>   
>   &i2c4 {
> -	status = "okay";
>   	clock-frequency = <400000>;
> +	status = "okay";
>   
>   	/* Samsung Touchscreen (needs I2C GPI DMA) @ 48 */
>   };
>   
>   &i2c11 {
> -	status = "okay";
>   	clock-frequency = <1000000>;
> +	status = "okay";
>   
>   	cs35l41_l: speaker-amp@40 {
>   		compatible = "cirrus,cs35l41";
> @@ -596,31 +596,31 @@ cs35l41_r: speaker-amp@41 {
>   };
>   
>   &i2c12 {
> -	status = "okay";
>   	/* Clock frequency was not specified downstream, let's park it to 100 KHz */
>   	clock-frequency = <100000>;
> +	status = "okay";
>   
>   	/* AMS TCS3490 RGB+IR color sensor @ 72 */
>   };
>   
>   &i2c13 {
> -	status = "okay";
>   	/* Clock frequency was not specified downstream, let's park it to 100 KHz */
>   	clock-frequency = <100000>;
> +	status = "okay";
>   
>   	/* Qualcomm PM8008i/PM8008j (?) @ 8, 9, c, d */
>   };
>   
>   &i2c15 {
> -	status = "okay";
>   	clock-frequency = <400000>;
> +	status = "okay";
>   
>   	/* NXP SN1X0 NFC @ 28 */
>   };
>   
>   &i2c17 {
> -	status = "okay";
>   	clock-frequency = <1000000>;
> +	status = "okay";
>   
>   	/* Cirrus Logic CS40L25A boosted haptics driver @ 40 */
>   };
> @@ -652,8 +652,8 @@ mdss_dp_altmode: endpoint {
>   };
>   
>   &mpss {
> -	status = "okay";
>   	firmware-name = "qcom/sm8350/Sony/sagami/modem.mbn";
> +	status = "okay";
>   };
>   
>   &pm8350_gpios {
> @@ -719,8 +719,8 @@ &pon_pwrkey {
>   };
>   
>   &pon_resin {
> -	status = "okay";
>   	linux,code = <KEY_VOLUMEUP>;
> +	status = "okay";
>   };
>   
>   &qupv3_id_0 {
> @@ -748,8 +748,8 @@ &sdhc_2 {
>   };
>   
>   &slpi {
> -	status = "okay";
>   	firmware-name = "qcom/sm8350/Sony/sagami/slpi.mbn";
> +	status = "okay";
>   };
>   
>   &spi14 {
> @@ -1038,16 +1038,14 @@ usb_1_dwc3_ss: endpoint {
>   };
>   
>   &usb_1_hsphy {
> -	status = "okay";
> -
>   	vdda-pll-supply = <&pm8350_l5>;
>   	vdda18-supply = <&pm8350c_l1>;
>   	vdda33-supply = <&pm8350_l2>;
> +	status = "okay";
>   };
>   
>   &usb_1_qmpphy {
> -	status = "okay";
> -
>   	vdda-phy-supply = <&pm8350_l6>;
>   	vdda-pll-supply = <&pm8350_l1>;
> +	status = "okay";
>   };
> 

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

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

* Re: [PATCH 2/4] arm64: dts: qcom: sm8350-sagami: Add PMIC GLINK
  2023-03-21 22:12 ` [PATCH 2/4] arm64: dts: qcom: sm8350-sagami: Add PMIC GLINK Konrad Dybcio
@ 2023-03-30 16:33   ` Neil Armstrong
  0 siblings, 0 replies; 11+ messages in thread
From: Neil Armstrong @ 2023-03-30 16:33 UTC (permalink / raw)
  To: Konrad Dybcio, Greg Kroah-Hartman, Rob Herring,
	Krzysztof Kozlowski, Bjorn Andersson, Andy Gross
  Cc: Marijn Suijten, linux-usb, devicetree, linux-kernel, linux-arm-msm

Le 21/03/2023 à 23:12, Konrad Dybcio a écrit :
> Sagami devices, like other 8350s, uses PMIC GLINK for various
> functionality around battery, charging, TCPM etc. Enable it.
> 
> Worth noting:
> My USB mouse is unimpressed when connected to the device via a
> non-powered USB-C dock. Microsoft HD-500 dock refuses to estalish a
> PD handshake.

That's interesting... perhaps UCSI is required here ?

> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>   .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi   | 60 +++++++++++++++++++++-
>   1 file changed, 59 insertions(+), 1 deletion(-)
> 

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

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

* Re: [PATCH 1/4] dt-bindings: usb: gpio-sbu-mux: Add OnSemi NB7VPQ904M mux
  2023-03-30 15:31   ` Rob Herring
@ 2023-03-30 23:00     ` Konrad Dybcio
  0 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-03-30 23:00 UTC (permalink / raw)
  To: Rob Herring
  Cc: Greg Kroah-Hartman, Krzysztof Kozlowski, Bjorn Andersson,
	Andy Gross, Marijn Suijten, linux-usb, devicetree, linux-kernel,
	linux-arm-msm



On 30.03.2023 17:31, Rob Herring wrote:
> On Tue, Mar 21, 2023 at 11:12:28PM +0100, Konrad Dybcio wrote:
>> The OnSemi NB7VPQ904M Type-C DP altmode redriver provides SBU signals
>> that can be used in with the gpio-sbu-mux driver. Document it.
>>
>> Note that the -mux suffix is there to indicate that the gpio-sbu-mux
>> driver interacts with the mux part of this otherwise quite sophisticated
>> chip, leaving the "onnn,nb7vpq904m" compatible free for when a proper
>> driver taking care of all of the chip's capabilities is introduced.
> 
> You should define a proper and complete binding. If you want to bind the 
> gpio-sbu-mux driver to it now until you have a proper driver then that's 
> fine. When you have such a driver, then you drop the compatible from the 
> gpio-sbu-mux driver.
Okay, that makes perfect sense and is good to know. Perhaps even worth
documenting somewhere.

I think I'll delay resending this and get an "actual" driver going.

Konrad
> 
> Note that having the fallback "gpio-sbu-mux" is somewhat problematic 
> because the kernel has no mechanism to ensure you bind the most specific 
> driver. For that to happen, it would have to support (automatically) 
> unbinding one driver and binding to the more specific driver since one 
> driver could be built-in and the other a module.
> 
> Rob

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

* Re: [PATCH 4/4] arm64: dts: qcom: sm8350-nagara: Unify status property placement
  2023-03-21 22:12 ` [PATCH 4/4] arm64: dts: qcom: sm8350-nagara: Unify status property placement Konrad Dybcio
  2023-03-30 16:32   ` Neil Armstrong
@ 2023-04-02 15:19   ` Marijn Suijten
  2023-04-03 10:17     ` Konrad Dybcio
  1 sibling, 1 reply; 11+ messages in thread
From: Marijn Suijten @ 2023-04-02 15:19 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Bjorn Andersson, Andy Gross, linux-usb, devicetree, linux-kernel,
	linux-arm-msm

On 2023-03-21 23:12:31, Konrad Dybcio wrote:

When you get to resending this, change sm8350-nagara in the title to
sm8350-sagami :)

- Marijn

> As we're heading towards getting the status property last everywhere,
> take care of it for SM8350 SONY Sagami.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi   | 30 ++++++++++------------
>  1 file changed, 14 insertions(+), 16 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
> index b2baa81baf5e..95b1ba4ce470 100644
> --- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
> @@ -189,8 +189,8 @@ vph_pwr: vph-pwr-regulator {
>  };
>  
>  &adsp {
> -	status = "okay";
>  	firmware-name = "qcom/sm8350/Sony/sagami/adsp.mbn";
> +	status = "okay";
>  };
>  
>  &apps_rsc {
> @@ -542,27 +542,27 @@ pmr735a_l7: ldo7 {
>  };
>  
>  &cdsp {
> -	status = "okay";
>  	firmware-name = "qcom/sm8350/Sony/sagami/cdsp.mbn";
> +	status = "okay";
>  };
>  
>  &i2c1 {
> -	status = "okay";
>  	clock-frequency = <1000000>;
> +	status = "okay";
>  
>  	/* Some subset of SONY IMX663 camera sensor @ 38 */
>  };
>  
>  &i2c4 {
> -	status = "okay";
>  	clock-frequency = <400000>;
> +	status = "okay";
>  
>  	/* Samsung Touchscreen (needs I2C GPI DMA) @ 48 */
>  };
>  
>  &i2c11 {
> -	status = "okay";
>  	clock-frequency = <1000000>;
> +	status = "okay";
>  
>  	cs35l41_l: speaker-amp@40 {
>  		compatible = "cirrus,cs35l41";
> @@ -596,31 +596,31 @@ cs35l41_r: speaker-amp@41 {
>  };
>  
>  &i2c12 {
> -	status = "okay";
>  	/* Clock frequency was not specified downstream, let's park it to 100 KHz */
>  	clock-frequency = <100000>;
> +	status = "okay";
>  
>  	/* AMS TCS3490 RGB+IR color sensor @ 72 */
>  };
>  
>  &i2c13 {
> -	status = "okay";
>  	/* Clock frequency was not specified downstream, let's park it to 100 KHz */
>  	clock-frequency = <100000>;
> +	status = "okay";
>  
>  	/* Qualcomm PM8008i/PM8008j (?) @ 8, 9, c, d */
>  };
>  
>  &i2c15 {
> -	status = "okay";
>  	clock-frequency = <400000>;
> +	status = "okay";
>  
>  	/* NXP SN1X0 NFC @ 28 */
>  };
>  
>  &i2c17 {
> -	status = "okay";
>  	clock-frequency = <1000000>;
> +	status = "okay";
>  
>  	/* Cirrus Logic CS40L25A boosted haptics driver @ 40 */
>  };
> @@ -652,8 +652,8 @@ mdss_dp_altmode: endpoint {
>  };
>  
>  &mpss {
> -	status = "okay";
>  	firmware-name = "qcom/sm8350/Sony/sagami/modem.mbn";
> +	status = "okay";
>  };
>  
>  &pm8350_gpios {
> @@ -719,8 +719,8 @@ &pon_pwrkey {
>  };
>  
>  &pon_resin {
> -	status = "okay";
>  	linux,code = <KEY_VOLUMEUP>;
> +	status = "okay";
>  };
>  
>  &qupv3_id_0 {
> @@ -748,8 +748,8 @@ &sdhc_2 {
>  };
>  
>  &slpi {
> -	status = "okay";
>  	firmware-name = "qcom/sm8350/Sony/sagami/slpi.mbn";
> +	status = "okay";
>  };
>  
>  &spi14 {
> @@ -1038,16 +1038,14 @@ usb_1_dwc3_ss: endpoint {
>  };
>  
>  &usb_1_hsphy {
> -	status = "okay";
> -
>  	vdda-pll-supply = <&pm8350_l5>;
>  	vdda18-supply = <&pm8350c_l1>;
>  	vdda33-supply = <&pm8350_l2>;
> +	status = "okay";
>  };
>  
>  &usb_1_qmpphy {
> -	status = "okay";
> -
>  	vdda-phy-supply = <&pm8350_l6>;
>  	vdda-pll-supply = <&pm8350_l1>;
> +	status = "okay";
>  };
> 
> -- 
> 2.40.0
> 

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

* Re: [PATCH 4/4] arm64: dts: qcom: sm8350-nagara: Unify status property placement
  2023-04-02 15:19   ` Marijn Suijten
@ 2023-04-03 10:17     ` Konrad Dybcio
  0 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-04-03 10:17 UTC (permalink / raw)
  To: Marijn Suijten
  Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Bjorn Andersson, Andy Gross, linux-usb, devicetree, linux-kernel,
	linux-arm-msm



On 2.04.2023 17:19, Marijn Suijten wrote:
> On 2023-03-21 23:12:31, Konrad Dybcio wrote:
> 
> When you get to resending this, change sm8350-nagara in the title to
> sm8350-sagami :)
Even I confuse them, they just look too alike! ;)

Konrad
> 
> - Marijn
> 
>> As we're heading towards getting the status property last everywhere,
>> take care of it for SM8350 SONY Sagami.
>>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>>  .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi   | 30 ++++++++++------------
>>  1 file changed, 14 insertions(+), 16 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
>> index b2baa81baf5e..95b1ba4ce470 100644
>> --- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
>> @@ -189,8 +189,8 @@ vph_pwr: vph-pwr-regulator {
>>  };
>>  
>>  &adsp {
>> -	status = "okay";
>>  	firmware-name = "qcom/sm8350/Sony/sagami/adsp.mbn";
>> +	status = "okay";
>>  };
>>  
>>  &apps_rsc {
>> @@ -542,27 +542,27 @@ pmr735a_l7: ldo7 {
>>  };
>>  
>>  &cdsp {
>> -	status = "okay";
>>  	firmware-name = "qcom/sm8350/Sony/sagami/cdsp.mbn";
>> +	status = "okay";
>>  };
>>  
>>  &i2c1 {
>> -	status = "okay";
>>  	clock-frequency = <1000000>;
>> +	status = "okay";
>>  
>>  	/* Some subset of SONY IMX663 camera sensor @ 38 */
>>  };
>>  
>>  &i2c4 {
>> -	status = "okay";
>>  	clock-frequency = <400000>;
>> +	status = "okay";
>>  
>>  	/* Samsung Touchscreen (needs I2C GPI DMA) @ 48 */
>>  };
>>  
>>  &i2c11 {
>> -	status = "okay";
>>  	clock-frequency = <1000000>;
>> +	status = "okay";
>>  
>>  	cs35l41_l: speaker-amp@40 {
>>  		compatible = "cirrus,cs35l41";
>> @@ -596,31 +596,31 @@ cs35l41_r: speaker-amp@41 {
>>  };
>>  
>>  &i2c12 {
>> -	status = "okay";
>>  	/* Clock frequency was not specified downstream, let's park it to 100 KHz */
>>  	clock-frequency = <100000>;
>> +	status = "okay";
>>  
>>  	/* AMS TCS3490 RGB+IR color sensor @ 72 */
>>  };
>>  
>>  &i2c13 {
>> -	status = "okay";
>>  	/* Clock frequency was not specified downstream, let's park it to 100 KHz */
>>  	clock-frequency = <100000>;
>> +	status = "okay";
>>  
>>  	/* Qualcomm PM8008i/PM8008j (?) @ 8, 9, c, d */
>>  };
>>  
>>  &i2c15 {
>> -	status = "okay";
>>  	clock-frequency = <400000>;
>> +	status = "okay";
>>  
>>  	/* NXP SN1X0 NFC @ 28 */
>>  };
>>  
>>  &i2c17 {
>> -	status = "okay";
>>  	clock-frequency = <1000000>;
>> +	status = "okay";
>>  
>>  	/* Cirrus Logic CS40L25A boosted haptics driver @ 40 */
>>  };
>> @@ -652,8 +652,8 @@ mdss_dp_altmode: endpoint {
>>  };
>>  
>>  &mpss {
>> -	status = "okay";
>>  	firmware-name = "qcom/sm8350/Sony/sagami/modem.mbn";
>> +	status = "okay";
>>  };
>>  
>>  &pm8350_gpios {
>> @@ -719,8 +719,8 @@ &pon_pwrkey {
>>  };
>>  
>>  &pon_resin {
>> -	status = "okay";
>>  	linux,code = <KEY_VOLUMEUP>;
>> +	status = "okay";
>>  };
>>  
>>  &qupv3_id_0 {
>> @@ -748,8 +748,8 @@ &sdhc_2 {
>>  };
>>  
>>  &slpi {
>> -	status = "okay";
>>  	firmware-name = "qcom/sm8350/Sony/sagami/slpi.mbn";
>> +	status = "okay";
>>  };
>>  
>>  &spi14 {
>> @@ -1038,16 +1038,14 @@ usb_1_dwc3_ss: endpoint {
>>  };
>>  
>>  &usb_1_hsphy {
>> -	status = "okay";
>> -
>>  	vdda-pll-supply = <&pm8350_l5>;
>>  	vdda18-supply = <&pm8350c_l1>;
>>  	vdda33-supply = <&pm8350_l2>;
>> +	status = "okay";
>>  };
>>  
>>  &usb_1_qmpphy {
>> -	status = "okay";
>> -
>>  	vdda-phy-supply = <&pm8350_l6>;
>>  	vdda-pll-supply = <&pm8350_l1>;
>> +	status = "okay";
>>  };
>>
>> -- 
>> 2.40.0
>>

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

end of thread, other threads:[~2023-04-03 10:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 22:12 [PATCH 0/4] Enable DisplayPort over USB-C on SONY Sagami Konrad Dybcio
2023-03-21 22:12 ` [PATCH 1/4] dt-bindings: usb: gpio-sbu-mux: Add OnSemi NB7VPQ904M mux Konrad Dybcio
2023-03-30 15:31   ` Rob Herring
2023-03-30 23:00     ` Konrad Dybcio
2023-03-21 22:12 ` [PATCH 2/4] arm64: dts: qcom: sm8350-sagami: Add PMIC GLINK Konrad Dybcio
2023-03-30 16:33   ` Neil Armstrong
2023-03-21 22:12 ` [PATCH 3/4] arm64: dts: qcom: sm8350-sagami: Hook up USB-C Display Port Konrad Dybcio
2023-03-21 22:12 ` [PATCH 4/4] arm64: dts: qcom: sm8350-nagara: Unify status property placement Konrad Dybcio
2023-03-30 16:32   ` Neil Armstrong
2023-04-02 15:19   ` Marijn Suijten
2023-04-03 10:17     ` Konrad Dybcio

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).