Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v2 3/6] arm64: dts: qcom: starqltechn: remove wifi
       [not found] <20231024154338.407191-1-dsankouski@gmail.com>
@ 2023-10-24 15:43 ` Dzmitry Sankouski
  2023-10-24 22:04   ` Bryan O'Donoghue
  2023-10-26 19:21   ` Konrad Dybcio
  2023-10-24 15:43 ` [PATCH v2 4/6] arm64: dts: qcom: starqltechn: enable more features Dzmitry Sankouski
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 11+ messages in thread
From: Dzmitry Sankouski @ 2023-10-24 15:43 UTC (permalink / raw)
  Cc: Dzmitry Sankouski, Andy Gross, Bjorn Andersson, Conor Dooley,
	Konrad Dybcio, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-arm-msm

Starqltechn has broadcom chip for wifi, so sdm845 wifi part
can be disabled.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org

---

Changes in v2:
- none

 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index d37a433130b9..6fc30fd1262b 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -418,14 +418,6 @@ &usb_1_qmpphy {
 	status = "okay";
 };
 
-&wifi {
-	vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
-	vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
-	vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
-	vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
-	status = "okay";
-};
-
 &tlmm {
 	gpio-reserved-ranges = <0 4>, <27 4>, <81 4>, <85 4>;
 
-- 
2.30.2


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

* [PATCH v2 4/6] arm64: dts: qcom: starqltechn: enable more features
       [not found] <20231024154338.407191-1-dsankouski@gmail.com>
  2023-10-24 15:43 ` [PATCH v2 3/6] arm64: dts: qcom: starqltechn: remove wifi Dzmitry Sankouski
@ 2023-10-24 15:43 ` Dzmitry Sankouski
  2023-10-26 19:26   ` Konrad Dybcio
  2023-10-24 15:43 ` [PATCH v2 5/6] arm64: dts: qcom: starqltechn: disable crypto Dzmitry Sankouski
  2023-10-24 15:43 ` [PATCH v2 6/6] arm64: dts: qcom: starqltechn: add supply to framebuffer Dzmitry Sankouski
  3 siblings, 1 reply; 11+ messages in thread
From: Dzmitry Sankouski @ 2023-10-24 15:43 UTC (permalink / raw)
  Cc: Dzmitry Sankouski, Andy Gross, Bjorn Andersson, Conor Dooley,
	Konrad Dybcio, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-arm-msm

- enable usb 2.0
- enable debug uart (uart9)
- enable touchscreen
- enable ipa so that we can bring up mobile data

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org

---

Changes in v2:
- hex to decimal in regulator values
- fix dtb_check warnings

 .../dts/qcom/sdm845-samsung-starqltechn.dts   | 173 +++++++++++++++++-
 1 file changed, 171 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 6fc30fd1262b..f2bc3c412a2f 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -11,11 +11,17 @@
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 #include "sdm845.dtsi"
 
+/delete-node/ &rmtfs_mem;
+
 / {
 	chassis-type = "handset";
 	model = "Samsung Galaxy S9 SM-G9600";
 	compatible = "samsung,starqltechn", "qcom,sdm845";
 
+	aliases {
+		serial0 = &uart9;
+	};
+
 	chosen {
 		#address-cells = <2>;
 		#size-cells = <2>;
@@ -68,6 +74,93 @@ memory@a1300000 {
 			ftrace-size = <0x40000>;
 			pmsg-size = <0x40000>;
 		};
+
+		/* The rmtfs_mem needs to be guarded due to "XPU limitations"
+		 * it is otherwise possible for an allocation adjacent to the
+		 * rmtfs_mem region to trigger an XPU violation, causing a crash.
+		 */
+		rmtfs_lower_guard: memory@fde00000 {
+			no-map;
+			reg = <0 0xfde00000 0 0x1000>;
+		};
+
+		rmtfs_mem: rmtfs-mem@fde01000 {
+			compatible = "qcom,rmtfs-mem";
+			reg = <0 0xfde01000 0 0x200000>;
+			no-map;
+
+			qcom,client-id = <1>;
+			qcom,vmid = <15>;
+		};
+
+		rmtfs_upper_guard: rmtfs-upper-guard@fe001000 {
+			no-map;
+			reg = <0 0xfe001000 0 0x1000>;
+		};
+
+		/*
+		 * It seems like reserving the old rmtfs_mem region is also needed to prevent
+		 * random crashes which are most likely modem related, more testing needed.
+		 */
+		removed_region: removed-region@88f00000 {
+			no-map;
+			reg = <0 0x88f00000 0 0x1c00000>;
+		};
+	};
+
+	i2c@21 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&tlmm 127 0x0>;
+		scl-gpios = <&tlmm 128 0x0>;
+		i2c-gpio,delay-us = <0x2>;
+		#address-cells = <0x1>;
+		#size-cells = <0x0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&i2c21_sda_state &i2c21_scl_state>;
+
+		regulator@60 {
+			compatible = "samsung,s2dos05";
+			reg = <0x60>;
+
+			regulators {
+				s2dos05_ldo1: s2dos05-ldo1 {
+					regulator-name = "s2dos05-ldo1";
+					regulator-min-microvolt = <1500000>;
+					regulator-max-microvolt = <2000000>;
+					regulator-active-discharge = <0x1>;
+				};
+
+				s2dos05_ldo2: s2dos05-ldo2 {
+					regulator-name = "s2dos05-ldo2";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-active-discharge = <0x1>;
+					regulator-boot-on;
+				};
+
+				s2dos05_ldo3: s2dos05-ldo3 {
+					regulator-name = "s2dos05-ldo3";
+					regulator-min-microvolt = <3000000>;
+					regulator-max-microvolt = <3000000>;
+					regulator-active-discharge = <0x1>;
+					regulator-boot-on;
+				};
+
+				s2dos05_ldo4: s2dos05-ldo4 {
+					regulator-name = "s2dos05-ldo4";
+					regulator-min-microvolt = <2700000>;
+					regulator-max-microvolt = <3775000>;
+					regulator-active-discharge = <0x1>;
+				};
+
+				s2dos05_buck1: s2dos05-buck1 {
+					regulator-name = "s2dos05-buck1";
+					regulator-min-microvolt = <850000>;
+					regulator-max-microvolt = <2100000>;
+					regulator-active-discharge = <0x1>;
+				};
+			};
+		};
 	};
 };
 
@@ -135,8 +228,6 @@ vdda_pll_cc_ebi23:
 		vdda_sp_sensor:
 		vdda_ufs1_core:
 		vdda_ufs2_core:
-		vdda_usb1_ss_core:
-		vdda_usb2_ss_core:
 		vreg_l1a_0p875: ldo1 {
 			regulator-min-microvolt = <880000>;
 			regulator-max-microvolt = <880000>;
@@ -157,6 +248,7 @@ vreg_l3a_1p0: ldo3 {
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
 		};
 
+		vdda_usb1_ss_core:
 		vdd_wcss_cx:
 		vdd_wcss_mx:
 		vdda_wcss_pll:
@@ -365,6 +457,10 @@ &qupv3_id_1 {
 	status = "okay";
 };
 
+&gpi_dma1 {
+	status = "okay";
+};
+
 &uart9 {
 	status = "okay";
 };
@@ -391,13 +487,50 @@ &sdhc_2 {
 	status = "okay";
 };
 
+&i2c11 {
+	status = "okay";
+	clock-frequency = <400000>;
+
+	touchscreen@48 {
+		compatible = "samsung,s6sy761";
+		reg = <0x48>;
+		interrupt-parent = <&tlmm>;
+		interrupts = <120 0x0>;
+		vdd-supply = <&s2dos05_ldo2>;
+		avdd-supply = <&s2dos05_ldo3>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&touch_irq_state>;
+	};
+};
+
+/* Modem/wifi*/
+&mss_pil {
+	status = "okay";
+	firmware-name = "qcom/sdm845/starqltechn/mba.mbn", "qcom/sdm845/starqltechn/modem.mbn";
+};
+
+&ipa {
+	qcom,gsi-loader = "self";
+	memory-region = <&ipa_fw_mem>;
+	firmware-name = "qcom/sdm845/starqltechn/ipa_fws.mbn";
+	status = "okay";
+};
+
 &usb_1 {
 	status = "okay";
+	/*
+	 * disable USB3 clock requirement as the device only supports
+	 * USB2.
+	 */
+	qcom,select-utmi-as-pipe-clk;
 };
 
 &usb_1_dwc3 {
 	/* Until we have Type C hooked up we'll force this as peripheral. */
 	dr_mode = "peripheral";
+
+	maximum-speed = "high-speed";
 };
 
 &usb_1_hsphy {
@@ -449,4 +582,40 @@ sd_card_det_n_state: sd-card-det-n-state {
 		function = "gpio";
 		bias-pull-up;
 	};
+
+	i2c21_sda_state: i2c-sda-state {
+		pins = "gpio127";
+		function = "gpio";
+		drive-strength = <0x2>;
+		bias-disable;
+	};
+
+	i2c21_scl_state: i2c-scl-state {
+		pins = "gpio128";
+		function = "gpio";
+		drive-strength = <0x2>;
+		bias-disable;
+	};
+
+	touch_irq_state: touch-irq-state {
+		pins = "gpio120";
+		function = "gpio";
+		bias-disable;
+		output-disable;
+	};
+};
+
+&qup_uart9_tx {
+	drive-strength = <0x2>;
+	bias-pull-up;
+};
+
+&qup_uart9_rx {
+	drive-strength = <0x2>;
+	bias-pull-up;
+};
+
+&qup_i2c11_default {
+	drive-strength = <2>;
+	bias-disable;
 };
-- 
2.30.2


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

* [PATCH v2 5/6] arm64: dts: qcom: starqltechn: disable crypto
       [not found] <20231024154338.407191-1-dsankouski@gmail.com>
  2023-10-24 15:43 ` [PATCH v2 3/6] arm64: dts: qcom: starqltechn: remove wifi Dzmitry Sankouski
  2023-10-24 15:43 ` [PATCH v2 4/6] arm64: dts: qcom: starqltechn: enable more features Dzmitry Sankouski
@ 2023-10-24 15:43 ` Dzmitry Sankouski
  2023-10-24 22:09   ` Bryan O'Donoghue
  2023-10-26 19:33   ` Konrad Dybcio
  2023-10-24 15:43 ` [PATCH v2 6/6] arm64: dts: qcom: starqltechn: add supply to framebuffer Dzmitry Sankouski
  3 siblings, 2 replies; 11+ messages in thread
From: Dzmitry Sankouski @ 2023-10-24 15:43 UTC (permalink / raw)
  Cc: Dzmitry Sankouski, Andy Gross, Bjorn Andersson, Conor Dooley,
	Konrad Dybcio, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-arm-msm

Disable the crypto block due to it causing an SError in qce_start() on
the starqltechn, which happens upon every boot when cryptomanager tests are
enabled.

Same problem is on Lenovo C630, see
commit 382e3e0eb6a8 ("arm64: dts: qcom: c630: disable crypto due to serror")

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
Link: https://lore.kernel.org/r/20211105035235.2392-1-steev@kali.org
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org

---

Changes in v2:
- none

 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index f2bc3c412a2f..0e2c7df2baa7 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -504,6 +504,11 @@ touchscreen@48 {
 	};
 };
 
+&crypto {
+	/* FIXME: qce_start triggers an SError */
+	status = "disable";
+};
+
 /* Modem/wifi*/
 &mss_pil {
 	status = "okay";
-- 
2.30.2


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

* [PATCH v2 6/6] arm64: dts: qcom: starqltechn: add supply to framebuffer
       [not found] <20231024154338.407191-1-dsankouski@gmail.com>
                   ` (2 preceding siblings ...)
  2023-10-24 15:43 ` [PATCH v2 5/6] arm64: dts: qcom: starqltechn: disable crypto Dzmitry Sankouski
@ 2023-10-24 15:43 ` Dzmitry Sankouski
  3 siblings, 0 replies; 11+ messages in thread
From: Dzmitry Sankouski @ 2023-10-24 15:43 UTC (permalink / raw)
  Cc: Dzmitry Sankouski, Andy Gross, Bjorn Andersson, Conor Dooley,
	Konrad Dybcio, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-arm-msm

This prevents framebuffer from shutting down.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org

---

Changes in v2:
- none

 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 0e2c7df2baa7..59e770073666 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -33,6 +33,9 @@ framebuffer: framebuffer@9d400000 {
 			height = <2960>;
 			stride = <(1440 * 4)>;
 			format = "a8r8g8b8";
+			vci-supply = <&s2dos05_ldo4>;
+			vddr-supply = <&s2dos05_buck1>;
+			vdd3-supply = <&s2dos05_ldo1>;
 		};
 	};
 
-- 
2.30.2


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

* Re: [PATCH v2 3/6] arm64: dts: qcom: starqltechn: remove wifi
  2023-10-24 15:43 ` [PATCH v2 3/6] arm64: dts: qcom: starqltechn: remove wifi Dzmitry Sankouski
@ 2023-10-24 22:04   ` Bryan O'Donoghue
  2023-10-26 19:21   ` Konrad Dybcio
  1 sibling, 0 replies; 11+ messages in thread
From: Bryan O'Donoghue @ 2023-10-24 22:04 UTC (permalink / raw)
  To: Dzmitry Sankouski
  Cc: Andy Gross, Bjorn Andersson, Conor Dooley, Konrad Dybcio,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-arm-msm

On 24/10/2023 16:43, Dzmitry Sankouski wrote:
> Starqltechn has broadcom chip for wifi, so sdm845 wifi part
> can be disabled.
> 
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <andersson@kernel.org>
> Cc: Conor Dooley <conor+dt@kernel.org>
> Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Cc: linux-arm-msm@vger.kernel.org
> 
> ---
> 
> Changes in v2:
> - none
> 
>   arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 8 --------
>   1 file changed, 8 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> index d37a433130b9..6fc30fd1262b 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> @@ -418,14 +418,6 @@ &usb_1_qmpphy {
>   	status = "okay";
>   };
>   
> -&wifi {
> -	vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
> -	vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
> -	vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
> -	vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
> -	status = "okay";
> -};
> -
>   &tlmm {
>   	gpio-reserved-ranges = <0 4>, <27 4>, <81 4>, <85 4>;
>   

A good candidate for a Fixes tag.

Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device 
tree for starqltechn")

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

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

* Re: [PATCH v2 5/6] arm64: dts: qcom: starqltechn: disable crypto
  2023-10-24 15:43 ` [PATCH v2 5/6] arm64: dts: qcom: starqltechn: disable crypto Dzmitry Sankouski
@ 2023-10-24 22:09   ` Bryan O'Donoghue
  2023-10-26 19:33   ` Konrad Dybcio
  1 sibling, 0 replies; 11+ messages in thread
From: Bryan O'Donoghue @ 2023-10-24 22:09 UTC (permalink / raw)
  To: Dzmitry Sankouski
  Cc: Andy Gross, Bjorn Andersson, Conor Dooley, Konrad Dybcio,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-arm-msm

On 24/10/2023 16:43, Dzmitry Sankouski wrote:
> Disable the crypto block due to it causing an SError in qce_start() on
> the starqltechn, which happens upon every boot when cryptomanager tests are
> enabled.
> 
> Same problem is on Lenovo C630, see
> commit 382e3e0eb6a8 ("arm64: dts: qcom: c630: disable crypto due to serror")
> 
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> Link: https://lore.kernel.org/r/20211105035235.2392-1-steev@kali.org
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <andersson@kernel.org>
> Cc: Conor Dooley <conor+dt@kernel.org>
> Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Cc: linux-arm-msm@vger.kernel.org
> 
> ---
> 
> Changes in v2:
> - none
> 
>   arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> index f2bc3c412a2f..0e2c7df2baa7 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> @@ -504,6 +504,11 @@ touchscreen@48 {
>   	};
>   };
>   
> +&crypto {
> +	/* FIXME: qce_start triggers an SError */
> +	status = "disable";
> +};
> +
>   /* Modem/wifi*/
>   &mss_pil {
>   	status = "okay";

Probably another patch that should have Fixes.

BTW when you do "git send-email" please include a 
"--to=someone@adomain.xyz" your emails appear with a weird red box that 
declares "(no To-header on input)<>" in Thunderbird - I guess because 
you didn't do "git send-email --to="

For preference I do "--to=" for everybody who appears as a 
maintainer/supporter and "--cc=" to the named mailing lists with myself 
last.

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

---
bod

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

* Re: [PATCH v2 3/6] arm64: dts: qcom: starqltechn: remove wifi
  2023-10-24 15:43 ` [PATCH v2 3/6] arm64: dts: qcom: starqltechn: remove wifi Dzmitry Sankouski
  2023-10-24 22:04   ` Bryan O'Donoghue
@ 2023-10-26 19:21   ` Konrad Dybcio
  1 sibling, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-10-26 19:21 UTC (permalink / raw)
  To: Dzmitry Sankouski
  Cc: Andy Gross, Bjorn Andersson, Conor Dooley, Krzysztof Kozlowski,
	Rob Herring, devicetree, linux-arm-msm



On 10/24/23 17:43, Dzmitry Sankouski wrote:
> Starqltechn has broadcom chip for wifi, so sdm845 wifi part
> can be disabled.
> 
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <andersson@kernel.org>
> Cc: Conor Dooley <conor+dt@kernel.org>
> Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Cc: linux-arm-msm@vger.kernel.org
> 
> ---
Fixes?

Konrad

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

* Re: [PATCH v2 4/6] arm64: dts: qcom: starqltechn: enable more features
  2023-10-24 15:43 ` [PATCH v2 4/6] arm64: dts: qcom: starqltechn: enable more features Dzmitry Sankouski
@ 2023-10-26 19:26   ` Konrad Dybcio
  2023-10-28 17:13     ` Dzmitry Sankouski
  0 siblings, 1 reply; 11+ messages in thread
From: Konrad Dybcio @ 2023-10-26 19:26 UTC (permalink / raw)
  To: Dzmitry Sankouski
  Cc: Andy Gross, Bjorn Andersson, Conor Dooley, Krzysztof Kozlowski,
	Rob Herring, devicetree, linux-arm-msm



On 10/24/23 17:43, Dzmitry Sankouski wrote:
> - enable usb 2.0
> - enable debug uart (uart9)
> - enable touchscreen
> - enable ipa so that we can bring up mobile data
> 
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <andersson@kernel.org>
> Cc: Conor Dooley <conor+dt@kernel.org>
> Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Cc: linux-arm-msm@vger.kernel.org
> 
> ---
> 
> Changes in v2:
> - hex to decimal in regulator values
> - fix dtb_check warnings
> 
>   .../dts/qcom/sdm845-samsung-starqltechn.dts   | 173 +++++++++++++++++-
>   1 file changed, 171 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> index 6fc30fd1262b..f2bc3c412a2f 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> @@ -11,11 +11,17 @@
>   #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>   #include "sdm845.dtsi"
>   
> +/delete-node/ &rmtfs_mem;
> +
>   / {
>   	chassis-type = "handset";
>   	model = "Samsung Galaxy S9 SM-G9600";
>   	compatible = "samsung,starqltechn", "qcom,sdm845";
>   
> +	aliases {
> +		serial0 = &uart9;
> +	};
> +
>   	chosen {
>   		#address-cells = <2>;
>   		#size-cells = <2>;
> @@ -68,6 +74,93 @@ memory@a1300000 {
>   			ftrace-size = <0x40000>;
>   			pmsg-size = <0x40000>;
>   		};
> +
> +		/* The rmtfs_mem needs to be guarded due to "XPU limitations"
> +		 * it is otherwise possible for an allocation adjacent to the
> +		 * rmtfs_mem region to trigger an XPU violation, causing a crash.
> +		 */
> +		rmtfs_lower_guard: memory@fde00000 {
> +			no-map;
> +			reg = <0 0xfde00000 0 0x1000>;
> +		};
> +
> +		rmtfs_mem: rmtfs-mem@fde01000 {
> +			compatible = "qcom,rmtfs-mem";
> +			reg = <0 0xfde01000 0 0x200000>;
> +			no-map;
> +
> +			qcom,client-id = <1>;
> +			qcom,vmid = <15>;
> +		};
> +
> +		rmtfs_upper_guard: rmtfs-upper-guard@fe001000 {
> +			no-map;
> +			reg = <0 0xfe001000 0 0x1000>;
> +		};
> +
> +		/*
> +		 * It seems like reserving the old rmtfs_mem region is also needed to prevent
> +		 * random crashes which are most likely modem related, more testing needed.
> +		 */
> +		removed_region: removed-region@88f00000 {
> +			no-map;
> +			reg = <0 0x88f00000 0 0x1c00000>;
> +		};
> +	};
> +
> +	i2c@21 {
> +		compatible = "i2c-gpio";
> +		sda-gpios = <&tlmm 127 0x0>;
GPIO_ACTIVE_HIGH
> +		scl-gpios = <&tlmm 128 0x0>;
GPIO_ACTIVE_HIGH

> +		i2c-gpio,delay-us = <0x2>;
> +		#address-cells = <0x1>;
1

> +		#size-cells = <0x0>;
0

> +		pinctrl-names = "default";
> +		pinctrl-0 = <&i2c21_sda_state &i2c21_scl_state>;
pinctrl-n
pinctrl-names

is prefered

and address/size-cells usually come as the last pair of properties

> +
> +		regulator@60 {
> +			compatible = "samsung,s2dos05";
> +			reg = <0x60>;
> +
> +			regulators {
> +				s2dos05_ldo1: s2dos05-ldo1 {
> +					regulator-name = "s2dos05-ldo1";
> +					regulator-min-microvolt = <1500000>;
> +					regulator-max-microvolt = <2000000>;
> +					regulator-active-discharge = <0x1>;
1

> +				};
> +
> +				s2dos05_ldo2: s2dos05-ldo2 {
> +					regulator-name = "s2dos05-ldo2";
> +					regulator-min-microvolt = <1800000>;
> +					regulator-max-microvolt = <1800000>;
> +					regulator-active-discharge = <0x1>;
1

> +					regulator-boot-on;
> +				};
> +
> +				s2dos05_ldo3: s2dos05-ldo3 {
> +					regulator-name = "s2dos05-ldo3";
> +					regulator-min-microvolt = <3000000>;
> +					regulator-max-microvolt = <3000000>;
> +					regulator-active-discharge = <0x1>;
1

> +					regulator-boot-on;
> +				};
> +
> +				s2dos05_ldo4: s2dos05-ldo4 {
> +					regulator-name = "s2dos05-ldo4";
> +					regulator-min-microvolt = <2700000>;
> +					regulator-max-microvolt = <3775000>;
> +					regulator-active-discharge = <0x1>;
1

> +				};
> +
> +				s2dos05_buck1: s2dos05-buck1 {
> +					regulator-name = "s2dos05-buck1";
> +					regulator-min-microvolt = <850000>;
> +					regulator-max-microvolt = <2100000>;
> +					regulator-active-discharge = <0x1>;
1

> +				};
> +			};
> +		};
>   	};
>   };
>   
> @@ -135,8 +228,6 @@ vdda_pll_cc_ebi23:
>   		vdda_sp_sensor:
>   		vdda_ufs1_core:
>   		vdda_ufs2_core:
> -		vdda_usb1_ss_core:
> -		vdda_usb2_ss_core:
>   		vreg_l1a_0p875: ldo1 {
>   			regulator-min-microvolt = <880000>;
>   			regulator-max-microvolt = <880000>;
> @@ -157,6 +248,7 @@ vreg_l3a_1p0: ldo3 {
>   			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>   		};
>   
> +		vdda_usb1_ss_core:
>   		vdd_wcss_cx:
>   		vdd_wcss_mx:
>   		vdda_wcss_pll:
> @@ -365,6 +457,10 @@ &qupv3_id_1 {
>   	status = "okay";
>   };
>   
> +&gpi_dma1 {
> +	status = "okay";
> +};
> +
>   &uart9 {
>   	status = "okay";
>   };
> @@ -391,13 +487,50 @@ &sdhc_2 {
>   	status = "okay";
>   };
>   
> +&i2c11 {
> +	status = "okay";
> +	clock-frequency = <400000>;
status is preferred to come last

> +
> +	touchscreen@48 {
> +		compatible = "samsung,s6sy761";
> +		reg = <0x48>;
> +		interrupt-parent = <&tlmm>;
> +		interrupts = <120 0x0>;
interrupts-extended with a fixed irq type (not _NONE)

> +		vdd-supply = <&s2dos05_ldo2>;
> +		avdd-supply = <&s2dos05_ldo3>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&touch_irq_state>;
ditto

> +	};
> +};
> +
> +/* Modem/wifi*/
missing space before */

> +&mss_pil {
> +	status = "okay";
> +	firmware-name = "qcom/sdm845/starqltechn/mba.mbn", "qcom/sdm845/starqltechn/modem.mbn";
Can you split these into two lines?

> +};
> +
> +&ipa {
> +	qcom,gsi-loader = "self";
> +	memory-region = <&ipa_fw_mem>;
> +	firmware-name = "qcom/sdm845/starqltechn/ipa_fws.mbn";
> +	status = "okay";
> +};
> +
>   &usb_1 {
>   	status = "okay";
> +	/*
> +	 * disable USB3 clock requirement as the device only supports
> +	 * USB2.
> +	 */
Can this comment fit into a /* single line */?
> +	qcom,select-utmi-as-pipe-clk;
status is supposed to be last

>   };
>   
>   &usb_1_dwc3 {
>   	/* Until we have Type C hooked up we'll force this as peripheral. */
>   	dr_mode = "peripheral";
> +
> +	maximum-speed = "high-speed";
>   };
>   
>   &usb_1_hsphy {
> @@ -449,4 +582,40 @@ sd_card_det_n_state: sd-card-det-n-state {
>   		function = "gpio";
>   		bias-pull-up;
>   	};
> +
> +	i2c21_sda_state: i2c-sda-state {
> +		pins = "gpio127";
> +		function = "gpio";
> +		drive-strength = <0x2>;
2

> +		bias-disable;
> +	};
> +
> +	i2c21_scl_state: i2c-scl-state {
> +		pins = "gpio128";
> +		function = "gpio";
> +		drive-strength = <0x2>;
2

> +		bias-disable;
> +	};
> +
> +	touch_irq_state: touch-irq-state {
> +		pins = "gpio120";
> +		function = "gpio";
> +		bias-disable;
> +		output-disable;
> +	};
> +};
> +
> +&qup_uart9_tx {
> +	drive-strength = <0x2>;
2

> +	bias-pull-up;
> +};
> +
> +&qup_uart9_rx {
> +	drive-strength = <0x2>;
2

> +	bias-pull-up;
> +};
> +
> +&qup_i2c11_default {
> +	drive-strength = <2>;
like here

Konrad

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

* Re: [PATCH v2 5/6] arm64: dts: qcom: starqltechn: disable crypto
  2023-10-24 15:43 ` [PATCH v2 5/6] arm64: dts: qcom: starqltechn: disable crypto Dzmitry Sankouski
  2023-10-24 22:09   ` Bryan O'Donoghue
@ 2023-10-26 19:33   ` Konrad Dybcio
  1 sibling, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-10-26 19:33 UTC (permalink / raw)
  To: Dzmitry Sankouski
  Cc: Andy Gross, Bjorn Andersson, Conor Dooley, Krzysztof Kozlowski,
	Rob Herring, devicetree, linux-arm-msm



On 10/24/23 17:43, Dzmitry Sankouski wrote:
> Disable the crypto block due to it causing an SError in qce_start() on
> the starqltechn, which happens upon every boot when cryptomanager tests are
> enabled.
> 
> Same problem is on Lenovo C630, see
> commit 382e3e0eb6a8 ("arm64: dts: qcom: c630: disable crypto due to serror")
Would that still happen with this change:

diff --git a/drivers/interconnect/qcom/sdm845.c b/drivers/interconnect/qcom/sdm845.c
index b9243c0aa626..dd1a2b679098 100644
--- a/drivers/interconnect/qcom/sdm845.c
+++ b/drivers/interconnect/qcom/sdm845.c
@@ -1805,7 +1805,7 @@ static struct platform_driver qnoc_driver = {
         .driver = {
                 .name = "qnoc-sdm845",
                 .of_match_table = qnoc_of_match,
-               .sync_state = icc_sync_state,
+//             .sync_state = icc_sync_state,
         },
  };
  module_platform_driver(qnoc_driver);

?

Konrad

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

* Re: [PATCH v2 4/6] arm64: dts: qcom: starqltechn: enable more features
  2023-10-26 19:26   ` Konrad Dybcio
@ 2023-10-28 17:13     ` Dzmitry Sankouski
  2023-10-28 20:18       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 11+ messages in thread
From: Dzmitry Sankouski @ 2023-10-28 17:13 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Andy Gross, Bjorn Andersson, Conor Dooley, Krzysztof Kozlowski,
	Rob Herring, devicetree, linux-arm-msm

...
> > +
> > +     touchscreen@48 {
> > +             compatible = "samsung,s6sy761";
> > +             reg = <0x48>;
> > +             interrupt-parent = <&tlmm>;
> > +             interrupts = <120 0x0>;
> interrupts-extended with a fixed irq type (not _NONE)
>
Can you please explain why not _NONE?
Documentation/devicetree/bindings/input/touchscreen/samsung,s6sy761.txt example
says it should be IRQ_TYPE_NONE.
AFAIU this 2 interrupt properties should be changed to one like:
'interrupts-extended = <&tlmm 120 IRQ_TYPE_NONE>;'

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

* Re: [PATCH v2 4/6] arm64: dts: qcom: starqltechn: enable more features
  2023-10-28 17:13     ` Dzmitry Sankouski
@ 2023-10-28 20:18       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2023-10-28 20:18 UTC (permalink / raw)
  To: Dzmitry Sankouski, Konrad Dybcio
  Cc: Andy Gross, Bjorn Andersson, Conor Dooley, Krzysztof Kozlowski,
	Rob Herring, devicetree, linux-arm-msm

On 28/10/2023 19:13, Dzmitry Sankouski wrote:
> ...
>>> +
>>> +     touchscreen@48 {
>>> +             compatible = "samsung,s6sy761";
>>> +             reg = <0x48>;
>>> +             interrupt-parent = <&tlmm>;
>>> +             interrupts = <120 0x0>;
>> interrupts-extended with a fixed irq type (not _NONE)
>>
> Can you please explain why not _NONE?
> Documentation/devicetree/bindings/input/touchscreen/samsung,s6sy761.txt example
> says it should be IRQ_TYPE_NONE.

I don't see the binding saying this And just to be clear: example,
especially incorrect example, means nothing.

There are no hardware interrupts of type NONE. That's why you should not
use it, It just does not exist.


Best regards,
Krzysztof


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

end of thread, other threads:[~2023-10-28 20:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20231024154338.407191-1-dsankouski@gmail.com>
2023-10-24 15:43 ` [PATCH v2 3/6] arm64: dts: qcom: starqltechn: remove wifi Dzmitry Sankouski
2023-10-24 22:04   ` Bryan O'Donoghue
2023-10-26 19:21   ` Konrad Dybcio
2023-10-24 15:43 ` [PATCH v2 4/6] arm64: dts: qcom: starqltechn: enable more features Dzmitry Sankouski
2023-10-26 19:26   ` Konrad Dybcio
2023-10-28 17:13     ` Dzmitry Sankouski
2023-10-28 20:18       ` Krzysztof Kozlowski
2023-10-24 15:43 ` [PATCH v2 5/6] arm64: dts: qcom: starqltechn: disable crypto Dzmitry Sankouski
2023-10-24 22:09   ` Bryan O'Donoghue
2023-10-26 19:33   ` Konrad Dybcio
2023-10-24 15:43 ` [PATCH v2 6/6] arm64: dts: qcom: starqltechn: add supply to framebuffer Dzmitry Sankouski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox