linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213
@ 2022-10-30  7:32 Marijn Suijten
  2022-10-30  7:32 ` [PATCH 01/10] arm64: dts: qcom: sm6350: Add resets for SDHCI 1/2 Marijn Suijten
                   ` (10 more replies)
  0 siblings, 11 replies; 28+ messages in thread
From: Marijn Suijten @ 2022-10-30  7:32 UTC (permalink / raw)
  To: phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
	Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Luca Weiss, linux-arm-msm, devicetree, linux-kernel

Enable SD Card for Sony Lena PDX213 on the sm6350 SoC by providing it
the necessary IOMMU stream ID(s) and pinctrl in SoC dtsi, and setting up
the regulators in device/board DT.  Together with regulator support,
power up the touchscreen and import pm6350 dtsi to enable the power and
volume up/down keys.

Marijn Suijten (10):
  arm64: dts: qcom: sm6350: Add resets for SDHCI 1/2
  arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2
  arm64: dts: qcom: sm6350-lena: Add SD Card Detect to sdc2 on/off
    pinctrl
  arm64: dts: qcom: pm6350: Include header for KEY_POWER
  arm64: dts: qcom: sm6350-lena: Include pm6350 and configure buttons
  arm64: dts: qcom: sm6350-lena: Define pm6350 and pm6150l regulators
  arm64: dts: qcom: sm6350-lena: Provide power to SDHCI 2 (SDCard slot)
  arm64: dts: qcom: sm6350-lena: Enable QUP and GPI DMA
  arm64: dts: qcom: sm6350-lena: Configure Samsung touchscreen
  arm64: dts: qcom: sm6350: Add apps_smmu with streamID to SDHCI 1/2
    nodes

 arch/arm64/boot/dts/qcom/pm6350.dtsi          |   1 +
 .../qcom/sm6350-sony-xperia-lena-pdx213.dts   | 337 ++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm6350.dtsi          |  48 +++
 3 files changed, 386 insertions(+)

--
2.38.1


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

* [PATCH 01/10] arm64: dts: qcom: sm6350: Add resets for SDHCI 1/2
  2022-10-30  7:32 [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 Marijn Suijten
@ 2022-10-30  7:32 ` Marijn Suijten
  2022-10-31  8:55   ` Luca Weiss
  2022-10-31 21:12   ` Konrad Dybcio
  2022-10-30  7:32 ` [PATCH 02/10] arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2 Marijn Suijten
                   ` (9 subsequent siblings)
  10 siblings, 2 replies; 28+ messages in thread
From: Marijn Suijten @ 2022-10-30  7:32 UTC (permalink / raw)
  To: phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
	Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Luca Weiss, linux-arm-msm, devicetree, linux-kernel

Make sure the SDHCI hardware is properly reset before interacting with
it, to protect against any possibly indeterminate state left by the
bootloader.

Suggested-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
 arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index c39de7d3ace0..a3ae765d9781 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -490,6 +490,7 @@ sdhc_1: mmc@7c4000 {
 				 <&gcc GCC_SDCC1_APPS_CLK>,
 				 <&rpmhcc RPMH_CXO_CLK>;
 			clock-names = "iface", "core", "xo";
+			resets = <&gcc GCC_SDCC1_BCR>;
 			qcom,dll-config = <0x000f642c>;
 			qcom,ddr-config = <0x80040868>;
 			power-domains = <&rpmhpd SM6350_CX>;
@@ -1068,6 +1069,7 @@ sdhc_2: mmc@8804000 {
 				 <&gcc GCC_SDCC2_APPS_CLK>,
 				 <&rpmhcc RPMH_CXO_CLK>;
 			clock-names = "iface", "core", "xo";
+			resets = <&gcc GCC_SDCC2_BCR>;
 			interconnects = <&aggre2_noc MASTER_SDCC_2 0 &clk_virt SLAVE_EBI_CH0 0>,
 					<&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_SDCC_2 0>;
 			interconnect-names = "sdhc-ddr", "cpu-sdhc";
-- 
2.38.1


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

* [PATCH 02/10] arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2
  2022-10-30  7:32 [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 Marijn Suijten
  2022-10-30  7:32 ` [PATCH 01/10] arm64: dts: qcom: sm6350: Add resets for SDHCI 1/2 Marijn Suijten
@ 2022-10-30  7:32 ` Marijn Suijten
  2022-10-31  8:56   ` Luca Weiss
                     ` (2 more replies)
  2022-10-30  7:32 ` [PATCH 03/10] arm64: dts: qcom: sm6350-lena: Add SD Card Detect to sdc2 on/off pinctrl Marijn Suijten
                   ` (8 subsequent siblings)
  10 siblings, 3 replies; 28+ messages in thread
From: Marijn Suijten @ 2022-10-30  7:32 UTC (permalink / raw)
  To: phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
	Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Luca Weiss, linux-arm-msm, devicetree, linux-kernel

Use the generic pin functions specifically for sdc2.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
 arch/arm64/boot/dts/qcom/sm6350.dtsi | 44 ++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index a3ae765d9781..b98b881ebe7e 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -1074,6 +1074,10 @@ sdhc_2: mmc@8804000 {
 					<&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_SDCC_2 0>;
 			interconnect-names = "sdhc-ddr", "cpu-sdhc";
 
+			pinctrl-0 = <&sdc2_on_state>;
+			pinctrl-1 = <&sdc2_off_state>;
+			pinctrl-names = "default", "sleep";
+
 			qcom,dll-config = <0x0007642c>;
 			qcom,ddr-config = <0x80040868>;
 			power-domains = <&rpmhpd SM6350_CX>;
@@ -1316,6 +1320,46 @@ tlmm: pinctrl@f100000 {
 			#interrupt-cells = <2>;
 			gpio-ranges = <&tlmm 0 0 157>;
 
+			sdc2_off_state: sdc2-off-state {
+				clk-pins {
+					pins = "sdc2_clk";
+					drive-strength = <2>;
+					bias-disable;
+				};
+
+				cmd-pins {
+					pins = "sdc2_cmd";
+					drive-strength = <2>;
+					bias-pull-up;
+				};
+
+				data-pins {
+					pins = "sdc2_data";
+					drive-strength = <2>;
+					bias-pull-up;
+				};
+			};
+
+			sdc2_on_state: sdc2-on-state {
+				clk-pins {
+					pins = "sdc2_clk";
+					drive-strength = <16>;
+					bias-disable;
+				};
+
+				cmd-pins {
+					pins = "sdc2_cmd";
+					drive-strength = <10>;
+					bias-pull-up;
+				};
+
+				data-pins {
+					pins = "sdc2_data";
+					drive-strength = <10>;
+					bias-pull-up;
+				};
+			};
+
 			qup_uart9_default: qup-uart9-default-state {
 				pins = "gpio25", "gpio26";
 				function = "qup13_f2";
-- 
2.38.1


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

* [PATCH 03/10] arm64: dts: qcom: sm6350-lena: Add SD Card Detect to sdc2 on/off pinctrl
  2022-10-30  7:32 [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 Marijn Suijten
  2022-10-30  7:32 ` [PATCH 01/10] arm64: dts: qcom: sm6350: Add resets for SDHCI 1/2 Marijn Suijten
  2022-10-30  7:32 ` [PATCH 02/10] arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2 Marijn Suijten
@ 2022-10-30  7:32 ` Marijn Suijten
  2022-10-31 21:12   ` Konrad Dybcio
  2022-11-02 20:45   ` Krzysztof Kozlowski
  2022-10-30  7:32 ` [PATCH 04/10] arm64: dts: qcom: pm6350: Include header for KEY_POWER Marijn Suijten
                   ` (7 subsequent siblings)
  10 siblings, 2 replies; 28+ messages in thread
From: Marijn Suijten @ 2022-10-30  7:32 UTC (permalink / raw)
  To: phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
	Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Luca Weiss, linux-arm-msm, devicetree, linux-kernel

In addition to the sdc2 pins, set the SD Card Detect pin in a sane state
to be used as an interrupt when an SD Card is slotted in or removed.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
 .../qcom/sm6350-sony-xperia-lena-pdx213.dts    | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
index 36911b9a5c04..9a96000fc95b 100644
--- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
+++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
@@ -30,6 +30,24 @@ framebuffer: framebuffer@a0000000 {
 	};
 };
 
+&sdc2_off_state {
+	sd-cd-pins {
+		pins = "gpio94";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+};
+
+&sdc2_on_state {
+	sd-cd-pins {
+		pins = "gpio94";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+};
+
 &sdhc_2 {
 	status = "okay";
 
-- 
2.38.1


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

* [PATCH 04/10] arm64: dts: qcom: pm6350: Include header for KEY_POWER
  2022-10-30  7:32 [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 Marijn Suijten
                   ` (2 preceding siblings ...)
  2022-10-30  7:32 ` [PATCH 03/10] arm64: dts: qcom: sm6350-lena: Add SD Card Detect to sdc2 on/off pinctrl Marijn Suijten
@ 2022-10-30  7:32 ` Marijn Suijten
  2022-10-31  8:57   ` Luca Weiss
  2022-10-31 21:12   ` Konrad Dybcio
  2022-10-30  7:32 ` [PATCH 05/10] arm64: dts: qcom: sm6350-lena: Include pm6350 and configure buttons Marijn Suijten
                   ` (6 subsequent siblings)
  10 siblings, 2 replies; 28+ messages in thread
From: Marijn Suijten @ 2022-10-30  7:32 UTC (permalink / raw)
  To: phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
	Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Luca Weiss, linux-arm-msm, devicetree, linux-kernel

Make pm6350.dtsi self-contained by including input.h, needed for the
KEY_POWER constant used to define the power key.

Fixes: d8a3c775d7cd ("arm64: dts: qcom: Add PM6350 PMIC")
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
 arch/arm64/boot/dts/qcom/pm6350.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/qcom/pm6350.dtsi b/arch/arm64/boot/dts/qcom/pm6350.dtsi
index 18c14257e2c1..111f4c1c56ae 100644
--- a/arch/arm64/boot/dts/qcom/pm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm6350.dtsi
@@ -3,6 +3,7 @@
  * Copyright (c) 2021, Luca Weiss <luca@z3ntu.xyz>
  */
 
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/spmi/spmi.h>
 
 &spmi_bus {
-- 
2.38.1


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

* [PATCH 05/10] arm64: dts: qcom: sm6350-lena: Include pm6350 and configure buttons
  2022-10-30  7:32 [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 Marijn Suijten
                   ` (3 preceding siblings ...)
  2022-10-30  7:32 ` [PATCH 04/10] arm64: dts: qcom: pm6350: Include header for KEY_POWER Marijn Suijten
@ 2022-10-30  7:32 ` Marijn Suijten
  2022-10-31 21:13   ` Konrad Dybcio
  2022-10-30  7:32 ` [PATCH 06/10] arm64: dts: qcom: sm6350-lena: Define pm6350 and pm6150l regulators Marijn Suijten
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Marijn Suijten @ 2022-10-30  7:32 UTC (permalink / raw)
  To: phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
	Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Luca Weiss, linux-arm-msm, devicetree, linux-kernel

Include pm6350 to inherit its GPIO and button configuration, and
configure "resin" to serve as volume up, and gpio2 as volume down.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
 .../qcom/sm6350-sony-xperia-lena-pdx213.dts   | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
index 9a96000fc95b..4512b0bf7fe1 100644
--- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
+++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
@@ -4,7 +4,9 @@
  */
 /dts-v1/;
 
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include "sm6350.dtsi"
+#include "pm6350.dtsi"
 
 / {
 	model = "Sony Xperia 10 III";
@@ -28,6 +30,35 @@ framebuffer: framebuffer@a0000000 {
 			clocks = <&gcc GCC_DISP_AXI_CLK>;
 		};
 	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&gpio_keys_state>;
+
+		key-volume-down {
+			label = "volume_down";
+			linux,code = <KEY_VOLUMEDOWN>;
+			gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&pm6350_gpios {
+	gpio_keys_state: gpio-keys-state {
+		key-volume-down-pins {
+			pins = "gpio2";
+			function = PMIC_GPIO_FUNC_NORMAL;
+			power-source = <0>;
+			bias-disable;
+			input-enable;
+		};
+	};
+};
+
+&pm6350_resin {
+	linux,code = <KEY_VOLUMEUP>;
+	status = "okay";
 };
 
 &sdc2_off_state {
-- 
2.38.1


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

* [PATCH 06/10] arm64: dts: qcom: sm6350-lena: Define pm6350 and pm6150l regulators
  2022-10-30  7:32 [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 Marijn Suijten
                   ` (4 preceding siblings ...)
  2022-10-30  7:32 ` [PATCH 05/10] arm64: dts: qcom: sm6350-lena: Include pm6350 and configure buttons Marijn Suijten
@ 2022-10-30  7:32 ` Marijn Suijten
  2022-10-31 21:13   ` Konrad Dybcio
  2022-10-30  7:32 ` [PATCH 07/10] arm64: dts: qcom: sm6350-lena: Provide power to SDHCI 2 (SDCard slot) Marijn Suijten
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Marijn Suijten @ 2022-10-30  7:32 UTC (permalink / raw)
  To: phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
	Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Luca Weiss, linux-arm-msm, devicetree, linux-kernel

This regulator configuration was adopted from downstream, and is
identical to the sm7225 FairPhone 4 configuration bar pm6350_l8a.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
 .../qcom/sm6350-sony-xperia-lena-pdx213.dts   | 218 ++++++++++++++++++
 1 file changed, 218 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
index 4512b0bf7fe1..1aaa9612b061 100644
--- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
+++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
@@ -5,6 +5,7 @@
 /dts-v1/;
 
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 #include "sm6350.dtsi"
 #include "pm6350.dtsi"
 
@@ -44,6 +45,223 @@ key-volume-down {
 	};
 };
 
+&apps_rsc {
+	regulators-0 {
+		compatible = "qcom,pm6350-rpmh-regulators";
+		qcom,pmic-id = "a";
+
+		pm6350_s1: smps1 {
+			regulator-min-microvolt = <1000000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_s2: smps2 {
+			regulator-min-microvolt = <1503000>;
+			regulator-max-microvolt = <2048000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l2: ldo2 {
+			regulator-min-microvolt = <1503000>;
+			regulator-max-microvolt = <1980000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l3: ldo3 {
+			regulator-min-microvolt = <2700000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l4: ldo4 {
+			regulator-min-microvolt = <352000>;
+			regulator-max-microvolt = <801000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l5: ldo5 {
+			regulator-min-microvolt = <1503000>;
+			regulator-max-microvolt = <1980000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l6: ldo6 {
+			regulator-min-microvolt = <1710000>;
+			regulator-max-microvolt = <3544000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l7: ldo7 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <1980000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l8: ldo8 {
+			regulator-min-microvolt = <2500000>;
+			regulator-max-microvolt = <3544000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l9: ldo9 {
+			regulator-min-microvolt = <1650000>;
+			regulator-max-microvolt = <3401000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l11: ldo11 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <2000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l12: ldo12 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <1980000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l13: ldo13 {
+			regulator-min-microvolt = <570000>;
+			regulator-max-microvolt = <650000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l14: ldo14 {
+			regulator-min-microvolt = <1700000>;
+			regulator-max-microvolt = <1900000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l15: ldo15 {
+			regulator-min-microvolt = <1100000>;
+			regulator-max-microvolt = <1305000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l16: ldo16 {
+			regulator-min-microvolt = <830000>;
+			regulator-max-microvolt = <921000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l18: ldo18 {
+			regulator-min-microvolt = <788000>;
+			regulator-max-microvolt = <1049000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l19: ldo19 {
+			regulator-min-microvolt = <1080000>;
+			regulator-max-microvolt = <1305000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l20: ldo20 {
+			regulator-min-microvolt = <530000>;
+			regulator-max-microvolt = <801000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l21: ldo21 {
+			regulator-min-microvolt = <751000>;
+			regulator-max-microvolt = <825000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6350_l22: ldo22 {
+			regulator-min-microvolt = <1080000>;
+			regulator-max-microvolt = <1305000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+	};
+
+	regulators-1 {
+		compatible = "qcom,pm6150l-rpmh-regulators";
+		qcom,pmic-id = "e";
+
+		pm6150l_s8: smps8 {
+			regulator-min-microvolt = <313000>;
+			regulator-max-microvolt = <1395000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6150l_l1: ldo1 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <1980000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6150l_l2: ldo2 {
+			regulator-min-microvolt = <1170000>;
+			regulator-max-microvolt = <1305000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6150l_l3: ldo3 {
+			regulator-min-microvolt = <1100000>;
+			regulator-max-microvolt = <1299000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6150l_l4: ldo4 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6150l_l5: ldo5 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6150l_l6: ldo6 {
+			regulator-min-microvolt = <1700000>;
+			regulator-max-microvolt = <3544000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6150l_l7: ldo7 {
+			regulator-min-microvolt = <2700000>;
+			regulator-max-microvolt = <3544000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6150l_l8: ldo8 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <2000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6150l_l9: ldo9 {
+			regulator-min-microvolt = <2700000>;
+			regulator-max-microvolt = <3544000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6150l_l10: ldo10 {
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3401000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6150l_l11: ldo11 {
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3401000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm6150l_bob: bob {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <5492000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
+			regulator-allow-bypass;
+		};
+	};
+};
+
 &pm6350_gpios {
 	gpio_keys_state: gpio-keys-state {
 		key-volume-down-pins {
-- 
2.38.1


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

* [PATCH 07/10] arm64: dts: qcom: sm6350-lena: Provide power to SDHCI 2 (SDCard slot)
  2022-10-30  7:32 [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 Marijn Suijten
                   ` (5 preceding siblings ...)
  2022-10-30  7:32 ` [PATCH 06/10] arm64: dts: qcom: sm6350-lena: Define pm6350 and pm6150l regulators Marijn Suijten
@ 2022-10-30  7:32 ` Marijn Suijten
  2022-10-31 21:14   ` Konrad Dybcio
  2022-10-30  7:32 ` [PATCH 08/10] arm64: dts: qcom: sm6350-lena: Enable QUP and GPI DMA Marijn Suijten
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Marijn Suijten @ 2022-10-30  7:32 UTC (permalink / raw)
  To: phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
	Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Luca Weiss, linux-arm-msm, devicetree, linux-kernel

Without power the SDCard slot / hardware remains dormant.

Like many other platforms these regulators are used exclusively by
SDHCI, and have their maximum voltage decreased to what downstream sets
on the consumer side.  Additionally the SDHCI driver supports setting a
load, for which the regulator definition is extended much the same.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
 .../dts/qcom/sm6350-sony-xperia-lena-pdx213.dts | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
index 1aaa9612b061..5cb76026ef67 100644
--- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
+++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
@@ -219,8 +219,13 @@ pm6150l_l5: ldo5 {
 
 		pm6150l_l6: ldo6 {
 			regulator-min-microvolt = <1700000>;
-			regulator-max-microvolt = <3544000>;
+			regulator-max-microvolt = <2950000>;
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes =
+			    <RPMH_REGULATOR_MODE_LPM
+			     RPMH_REGULATOR_MODE_HPM>;
+
 		};
 
 		pm6150l_l7: ldo7 {
@@ -237,8 +242,13 @@ pm6150l_l8: ldo8 {
 
 		pm6150l_l9: ldo9 {
 			regulator-min-microvolt = <2700000>;
-			regulator-max-microvolt = <3544000>;
+			regulator-max-microvolt = <2960000>;
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes =
+			    <RPMH_REGULATOR_MODE_LPM
+			     RPMH_REGULATOR_MODE_HPM>;
+
 		};
 
 		pm6150l_l10: ldo10 {
@@ -300,6 +310,9 @@ sd-cd-pins {
 &sdhc_2 {
 	status = "okay";
 
+	vmmc-supply = <&pm6150l_l9>;
+	vqmmc-supply = <&pm6150l_l6>;
+
 	cd-gpios = <&tlmm 94 GPIO_ACTIVE_HIGH>;
 };
 
-- 
2.38.1


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

* [PATCH 08/10] arm64: dts: qcom: sm6350-lena: Enable QUP and GPI DMA
  2022-10-30  7:32 [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 Marijn Suijten
                   ` (6 preceding siblings ...)
  2022-10-30  7:32 ` [PATCH 07/10] arm64: dts: qcom: sm6350-lena: Provide power to SDHCI 2 (SDCard slot) Marijn Suijten
@ 2022-10-30  7:32 ` Marijn Suijten
  2022-10-31 21:14   ` Konrad Dybcio
  2022-10-30  7:32 ` [PATCH 09/10] arm64: dts: qcom: sm6350-lena: Configure Samsung touchscreen Marijn Suijten
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Marijn Suijten @ 2022-10-30  7:32 UTC (permalink / raw)
  To: phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
	Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Luca Weiss, linux-arm-msm, devicetree, linux-kernel

Enable QUP and GPI DMA hardware to be able to add functioning I2C nodes
later.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
 .../dts/qcom/sm6350-sony-xperia-lena-pdx213.dts  | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
index 5cb76026ef67..6eb1d4e5e60f 100644
--- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
+++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
@@ -272,6 +272,14 @@ pm6150l_bob: bob {
 	};
 };
 
+&gpi_dma0 {
+	status = "okay";
+};
+
+&gpi_dma1 {
+	status = "okay";
+};
+
 &pm6350_gpios {
 	gpio_keys_state: gpio-keys-state {
 		key-volume-down-pins {
@@ -289,6 +297,14 @@ &pm6350_resin {
 	status = "okay";
 };
 
+&qupv3_id_0 {
+	status = "okay";
+};
+
+&qupv3_id_1 {
+	status = "okay";
+};
+
 &sdc2_off_state {
 	sd-cd-pins {
 		pins = "gpio94";
-- 
2.38.1


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

* [PATCH 09/10] arm64: dts: qcom: sm6350-lena: Configure Samsung touchscreen
  2022-10-30  7:32 [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 Marijn Suijten
                   ` (7 preceding siblings ...)
  2022-10-30  7:32 ` [PATCH 08/10] arm64: dts: qcom: sm6350-lena: Enable QUP and GPI DMA Marijn Suijten
@ 2022-10-30  7:32 ` Marijn Suijten
  2022-10-31 21:14   ` Konrad Dybcio
  2022-10-30  7:32 ` [PATCH 10/10] arm64: dts: qcom: sm6350: Add apps_smmu with streamID to SDHCI 1/2 nodes Marijn Suijten
  2022-11-08  1:27 ` [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 Bjorn Andersson
  10 siblings, 1 reply; 28+ messages in thread
From: Marijn Suijten @ 2022-10-30  7:32 UTC (permalink / raw)
  To: phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
	Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Luca Weiss, linux-arm-msm, devicetree, linux-kernel

Use the generic samsung,s6sy761 touchscreen driver for this device,
together with a few pins and regulators to power it up correctly.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
 .../qcom/sm6350-sony-xperia-lena-pdx213.dts   | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
index 6eb1d4e5e60f..20f35623d1ef 100644
--- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
+++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
@@ -43,6 +43,15 @@ key-volume-down {
 			gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>;
 		};
 	};
+
+	touch_en_vreg: touch-en-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "touch_en_vreg";
+		gpio = <&tlmm 10 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		vin-supply = <&pm6350_l6>;
+	};
 };
 
 &apps_rsc {
@@ -280,6 +289,23 @@ &gpi_dma1 {
 	status = "okay";
 };
 
+&i2c8 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	touchscreen@48 {
+		compatible = "samsung,s6sy761";
+		reg = <0x48>;
+		interrupt-parent = <&tlmm>;
+		interrupts = <22 0x2008>;
+		vdd-supply = <&pm6350_l11>;
+		avdd-supply = <&touch_en_vreg>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&ts_int_default &ts_active>;
+	};
+};
+
 &pm6350_gpios {
 	gpio_keys_state: gpio-keys-state {
 		key-volume-down-pins {
@@ -334,6 +360,21 @@ &sdhc_2 {
 
 &tlmm {
 	gpio-reserved-ranges = <13 4>, <45 2>, <56 2>;
+
+	ts_active: ts-active-state {
+		pins = "gpio21";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-up;
+	};
+
+	ts_int_default: ts-int-default-state {
+		pins = "gpio22";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+		input-enable;
+	};
 };
 
 &usb_1 {
-- 
2.38.1


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

* [PATCH 10/10] arm64: dts: qcom: sm6350: Add apps_smmu with streamID to SDHCI 1/2 nodes
  2022-10-30  7:32 [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 Marijn Suijten
                   ` (8 preceding siblings ...)
  2022-10-30  7:32 ` [PATCH 09/10] arm64: dts: qcom: sm6350-lena: Configure Samsung touchscreen Marijn Suijten
@ 2022-10-30  7:32 ` Marijn Suijten
  2022-10-31  8:58   ` Luca Weiss
  2022-10-31 21:15   ` Konrad Dybcio
  2022-11-08  1:27 ` [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 Bjorn Andersson
  10 siblings, 2 replies; 28+ messages in thread
From: Marijn Suijten @ 2022-10-30  7:32 UTC (permalink / raw)
  To: phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
	Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Luca Weiss, linux-arm-msm, devicetree, linux-kernel

When enabling the APPS SMMU the mainline driver reconfigures the SMMU
from its bootloader configuration, loosing the stream mapping for (among
which) the SDHCI hardware and breaking its ADMA feature.  This feature
can be disabled with:

    sdhci.debug_quirks=0x40

But it is of course desired to have this feature enabled and working
through the SMMU.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
 arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index b98b881ebe7e..c309a359ded9 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -485,6 +485,7 @@ sdhc_1: mmc@7c4000 {
 			interrupts = <GIC_SPI 641 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 644 IRQ_TYPE_LEVEL_HIGH>;
 			interrupt-names = "hc_irq", "pwr_irq";
+			iommus = <&apps_smmu 0x60 0x0>;
 
 			clocks = <&gcc GCC_SDCC1_AHB_CLK>,
 				 <&gcc GCC_SDCC1_APPS_CLK>,
@@ -1064,6 +1065,7 @@ sdhc_2: mmc@8804000 {
 			interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>;
 			interrupt-names = "hc_irq", "pwr_irq";
+			iommus = <&apps_smmu 0x560 0x0>;
 
 			clocks = <&gcc GCC_SDCC2_AHB_CLK>,
 				 <&gcc GCC_SDCC2_APPS_CLK>,
-- 
2.38.1


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

* Re: [PATCH 01/10] arm64: dts: qcom: sm6350: Add resets for SDHCI 1/2
  2022-10-30  7:32 ` [PATCH 01/10] arm64: dts: qcom: sm6350: Add resets for SDHCI 1/2 Marijn Suijten
@ 2022-10-31  8:55   ` Luca Weiss
  2022-10-31 21:12   ` Konrad Dybcio
  1 sibling, 0 replies; 28+ messages in thread
From: Luca Weiss @ 2022-10-31  8:55 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Luca Weiss,
	linux-arm-msm, devicetree, linux-kernel

On Sun Oct 30, 2022 at 8:32 AM CET, Marijn Suijten wrote:
> Make sure the SDHCI hardware is properly reset before interacting with
> it, to protect against any possibly indeterminate state left by the
> bootloader.
>
> Suggested-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>

Reviewed-by: Luca Weiss <luca.weiss@fairphone.com>
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sm7225-fairphone-fp4

Regards
Luca

> ---
>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> index c39de7d3ace0..a3ae765d9781 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> @@ -490,6 +490,7 @@ sdhc_1: mmc@7c4000 {
>  				 <&gcc GCC_SDCC1_APPS_CLK>,
>  				 <&rpmhcc RPMH_CXO_CLK>;
>  			clock-names = "iface", "core", "xo";
> +			resets = <&gcc GCC_SDCC1_BCR>;
>  			qcom,dll-config = <0x000f642c>;
>  			qcom,ddr-config = <0x80040868>;
>  			power-domains = <&rpmhpd SM6350_CX>;
> @@ -1068,6 +1069,7 @@ sdhc_2: mmc@8804000 {
>  				 <&gcc GCC_SDCC2_APPS_CLK>,
>  				 <&rpmhcc RPMH_CXO_CLK>;
>  			clock-names = "iface", "core", "xo";
> +			resets = <&gcc GCC_SDCC2_BCR>;
>  			interconnects = <&aggre2_noc MASTER_SDCC_2 0 &clk_virt SLAVE_EBI_CH0 0>,
>  					<&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_SDCC_2 0>;
>  			interconnect-names = "sdhc-ddr", "cpu-sdhc";
> -- 
> 2.38.1


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

* Re: [PATCH 02/10] arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2
  2022-10-30  7:32 ` [PATCH 02/10] arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2 Marijn Suijten
@ 2022-10-31  8:56   ` Luca Weiss
  2022-10-31 21:12   ` Konrad Dybcio
  2022-11-02 20:45   ` Krzysztof Kozlowski
  2 siblings, 0 replies; 28+ messages in thread
From: Luca Weiss @ 2022-10-31  8:56 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Luca Weiss,
	linux-arm-msm, devicetree, linux-kernel

On Sun Oct 30, 2022 at 8:32 AM CET, Marijn Suijten wrote:
> Use the generic pin functions specifically for sdc2.
>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>

Reviewed-by: Luca Weiss <luca.weiss@fairphone.com>
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sm7225-fairphone-fp4

Regards
Luca

> ---
>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 44 ++++++++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> index a3ae765d9781..b98b881ebe7e 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> @@ -1074,6 +1074,10 @@ sdhc_2: mmc@8804000 {
>  					<&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_SDCC_2 0>;
>  			interconnect-names = "sdhc-ddr", "cpu-sdhc";
>  
> +			pinctrl-0 = <&sdc2_on_state>;
> +			pinctrl-1 = <&sdc2_off_state>;
> +			pinctrl-names = "default", "sleep";
> +
>  			qcom,dll-config = <0x0007642c>;
>  			qcom,ddr-config = <0x80040868>;
>  			power-domains = <&rpmhpd SM6350_CX>;
> @@ -1316,6 +1320,46 @@ tlmm: pinctrl@f100000 {
>  			#interrupt-cells = <2>;
>  			gpio-ranges = <&tlmm 0 0 157>;
>  
> +			sdc2_off_state: sdc2-off-state {
> +				clk-pins {
> +					pins = "sdc2_clk";
> +					drive-strength = <2>;
> +					bias-disable;
> +				};
> +
> +				cmd-pins {
> +					pins = "sdc2_cmd";
> +					drive-strength = <2>;
> +					bias-pull-up;
> +				};
> +
> +				data-pins {
> +					pins = "sdc2_data";
> +					drive-strength = <2>;
> +					bias-pull-up;
> +				};
> +			};
> +
> +			sdc2_on_state: sdc2-on-state {
> +				clk-pins {
> +					pins = "sdc2_clk";
> +					drive-strength = <16>;
> +					bias-disable;
> +				};
> +
> +				cmd-pins {
> +					pins = "sdc2_cmd";
> +					drive-strength = <10>;
> +					bias-pull-up;
> +				};
> +
> +				data-pins {
> +					pins = "sdc2_data";
> +					drive-strength = <10>;
> +					bias-pull-up;
> +				};
> +			};
> +
>  			qup_uart9_default: qup-uart9-default-state {
>  				pins = "gpio25", "gpio26";
>  				function = "qup13_f2";
> -- 
> 2.38.1


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

* Re: [PATCH 04/10] arm64: dts: qcom: pm6350: Include header for KEY_POWER
  2022-10-30  7:32 ` [PATCH 04/10] arm64: dts: qcom: pm6350: Include header for KEY_POWER Marijn Suijten
@ 2022-10-31  8:57   ` Luca Weiss
  2022-10-31 21:12   ` Konrad Dybcio
  1 sibling, 0 replies; 28+ messages in thread
From: Luca Weiss @ 2022-10-31  8:57 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Luca Weiss,
	linux-arm-msm, devicetree, linux-kernel

On Sun Oct 30, 2022 at 8:32 AM CET, Marijn Suijten wrote:
> Make pm6350.dtsi self-contained by including input.h, needed for the
> KEY_POWER constant used to define the power key.
>
> Fixes: d8a3c775d7cd ("arm64: dts: qcom: Add PM6350 PMIC")
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>

Thanks for fixing!

Reviewed-by: Luca Weiss <luca.weiss@fairphone.com>

Regards
Luca

> ---
>  arch/arm64/boot/dts/qcom/pm6350.dtsi | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/pm6350.dtsi b/arch/arm64/boot/dts/qcom/pm6350.dtsi
> index 18c14257e2c1..111f4c1c56ae 100644
> --- a/arch/arm64/boot/dts/qcom/pm6350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm6350.dtsi
> @@ -3,6 +3,7 @@
>   * Copyright (c) 2021, Luca Weiss <luca@z3ntu.xyz>
>   */
>  
> +#include <dt-bindings/input/input.h>
>  #include <dt-bindings/spmi/spmi.h>
>  
>  &spmi_bus {
> -- 
> 2.38.1


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

* Re: [PATCH 10/10] arm64: dts: qcom: sm6350: Add apps_smmu with streamID to SDHCI 1/2 nodes
  2022-10-30  7:32 ` [PATCH 10/10] arm64: dts: qcom: sm6350: Add apps_smmu with streamID to SDHCI 1/2 nodes Marijn Suijten
@ 2022-10-31  8:58   ` Luca Weiss
  2022-10-31 21:15   ` Konrad Dybcio
  1 sibling, 0 replies; 28+ messages in thread
From: Luca Weiss @ 2022-10-31  8:58 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Luca Weiss,
	linux-arm-msm, devicetree, linux-kernel

On Sun Oct 30, 2022 at 8:32 AM CET, Marijn Suijten wrote:
> When enabling the APPS SMMU the mainline driver reconfigures the SMMU
> from its bootloader configuration, loosing the stream mapping for (among
> which) the SDHCI hardware and breaking its ADMA feature.  This feature
> can be disabled with:
>
>     sdhci.debug_quirks=0x40
>
> But it is of course desired to have this feature enabled and working
> through the SMMU.
>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>

Reviewed-by: Luca Weiss <luca.weiss@fairphone.com>
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sm7225-fairphone-fp4

Regards
Luca

> ---
>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> index b98b881ebe7e..c309a359ded9 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> @@ -485,6 +485,7 @@ sdhc_1: mmc@7c4000 {
>  			interrupts = <GIC_SPI 641 IRQ_TYPE_LEVEL_HIGH>,
>  				     <GIC_SPI 644 IRQ_TYPE_LEVEL_HIGH>;
>  			interrupt-names = "hc_irq", "pwr_irq";
> +			iommus = <&apps_smmu 0x60 0x0>;
>  
>  			clocks = <&gcc GCC_SDCC1_AHB_CLK>,
>  				 <&gcc GCC_SDCC1_APPS_CLK>,
> @@ -1064,6 +1065,7 @@ sdhc_2: mmc@8804000 {
>  			interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
>  				     <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>;
>  			interrupt-names = "hc_irq", "pwr_irq";
> +			iommus = <&apps_smmu 0x560 0x0>;
>  
>  			clocks = <&gcc GCC_SDCC2_AHB_CLK>,
>  				 <&gcc GCC_SDCC2_APPS_CLK>,
> -- 
> 2.38.1


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

* Re: [PATCH 01/10] arm64: dts: qcom: sm6350: Add resets for SDHCI 1/2
  2022-10-30  7:32 ` [PATCH 01/10] arm64: dts: qcom: sm6350: Add resets for SDHCI 1/2 Marijn Suijten
  2022-10-31  8:55   ` Luca Weiss
@ 2022-10-31 21:12   ` Konrad Dybcio
  1 sibling, 0 replies; 28+ messages in thread
From: Konrad Dybcio @ 2022-10-31 21:12 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Andy Gross, Bjorn Andersson,
	Rob Herring, Krzysztof Kozlowski, Luca Weiss, linux-arm-msm,
	devicetree, linux-kernel



On 30.10.2022 08:32, Marijn Suijten wrote:
> Make sure the SDHCI hardware is properly reset before interacting with
> it, to protect against any possibly indeterminate state left by the
> bootloader.
> 
> Suggested-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad
>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> index c39de7d3ace0..a3ae765d9781 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> @@ -490,6 +490,7 @@ sdhc_1: mmc@7c4000 {
>  				 <&gcc GCC_SDCC1_APPS_CLK>,
>  				 <&rpmhcc RPMH_CXO_CLK>;
>  			clock-names = "iface", "core", "xo";
> +			resets = <&gcc GCC_SDCC1_BCR>;
>  			qcom,dll-config = <0x000f642c>;
>  			qcom,ddr-config = <0x80040868>;
>  			power-domains = <&rpmhpd SM6350_CX>;
> @@ -1068,6 +1069,7 @@ sdhc_2: mmc@8804000 {
>  				 <&gcc GCC_SDCC2_APPS_CLK>,
>  				 <&rpmhcc RPMH_CXO_CLK>;
>  			clock-names = "iface", "core", "xo";
> +			resets = <&gcc GCC_SDCC2_BCR>;
>  			interconnects = <&aggre2_noc MASTER_SDCC_2 0 &clk_virt SLAVE_EBI_CH0 0>,
>  					<&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_SDCC_2 0>;
>  			interconnect-names = "sdhc-ddr", "cpu-sdhc";

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

* Re: [PATCH 02/10] arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2
  2022-10-30  7:32 ` [PATCH 02/10] arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2 Marijn Suijten
  2022-10-31  8:56   ` Luca Weiss
@ 2022-10-31 21:12   ` Konrad Dybcio
  2022-11-02 20:45   ` Krzysztof Kozlowski
  2 siblings, 0 replies; 28+ messages in thread
From: Konrad Dybcio @ 2022-10-31 21:12 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Andy Gross, Bjorn Andersson,
	Rob Herring, Krzysztof Kozlowski, Luca Weiss, linux-arm-msm,
	devicetree, linux-kernel



On 30.10.2022 08:32, Marijn Suijten wrote:
> Use the generic pin functions specifically for sdc2.
> 
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad
>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 44 ++++++++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> index a3ae765d9781..b98b881ebe7e 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> @@ -1074,6 +1074,10 @@ sdhc_2: mmc@8804000 {
>  					<&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_SDCC_2 0>;
>  			interconnect-names = "sdhc-ddr", "cpu-sdhc";
>  
> +			pinctrl-0 = <&sdc2_on_state>;
> +			pinctrl-1 = <&sdc2_off_state>;
> +			pinctrl-names = "default", "sleep";
> +
>  			qcom,dll-config = <0x0007642c>;
>  			qcom,ddr-config = <0x80040868>;
>  			power-domains = <&rpmhpd SM6350_CX>;
> @@ -1316,6 +1320,46 @@ tlmm: pinctrl@f100000 {
>  			#interrupt-cells = <2>;
>  			gpio-ranges = <&tlmm 0 0 157>;
>  
> +			sdc2_off_state: sdc2-off-state {
> +				clk-pins {
> +					pins = "sdc2_clk";
> +					drive-strength = <2>;
> +					bias-disable;
> +				};
> +
> +				cmd-pins {
> +					pins = "sdc2_cmd";
> +					drive-strength = <2>;
> +					bias-pull-up;
> +				};
> +
> +				data-pins {
> +					pins = "sdc2_data";
> +					drive-strength = <2>;
> +					bias-pull-up;
> +				};
> +			};
> +
> +			sdc2_on_state: sdc2-on-state {
> +				clk-pins {
> +					pins = "sdc2_clk";
> +					drive-strength = <16>;
> +					bias-disable;
> +				};
> +
> +				cmd-pins {
> +					pins = "sdc2_cmd";
> +					drive-strength = <10>;
> +					bias-pull-up;
> +				};
> +
> +				data-pins {
> +					pins = "sdc2_data";
> +					drive-strength = <10>;
> +					bias-pull-up;
> +				};
> +			};
> +
>  			qup_uart9_default: qup-uart9-default-state {
>  				pins = "gpio25", "gpio26";
>  				function = "qup13_f2";

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

* Re: [PATCH 03/10] arm64: dts: qcom: sm6350-lena: Add SD Card Detect to sdc2 on/off pinctrl
  2022-10-30  7:32 ` [PATCH 03/10] arm64: dts: qcom: sm6350-lena: Add SD Card Detect to sdc2 on/off pinctrl Marijn Suijten
@ 2022-10-31 21:12   ` Konrad Dybcio
  2022-11-02 20:45   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 28+ messages in thread
From: Konrad Dybcio @ 2022-10-31 21:12 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Andy Gross, Bjorn Andersson,
	Rob Herring, Krzysztof Kozlowski, Luca Weiss, linux-arm-msm,
	devicetree, linux-kernel



On 30.10.2022 08:32, Marijn Suijten wrote:
> In addition to the sdc2 pins, set the SD Card Detect pin in a sane state
> to be used as an interrupt when an SD Card is slotted in or removed.
> 
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad
>  .../qcom/sm6350-sony-xperia-lena-pdx213.dts    | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> index 36911b9a5c04..9a96000fc95b 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> @@ -30,6 +30,24 @@ framebuffer: framebuffer@a0000000 {
>  	};
>  };
>  
> +&sdc2_off_state {
> +	sd-cd-pins {
> +		pins = "gpio94";
> +		function = "gpio";
> +		drive-strength = <2>;
> +		bias-disable;
> +	};
> +};
> +
> +&sdc2_on_state {
> +	sd-cd-pins {
> +		pins = "gpio94";
> +		function = "gpio";
> +		drive-strength = <2>;
> +		bias-pull-up;
> +	};
> +};
> +
>  &sdhc_2 {
>  	status = "okay";
>  

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

* Re: [PATCH 04/10] arm64: dts: qcom: pm6350: Include header for KEY_POWER
  2022-10-30  7:32 ` [PATCH 04/10] arm64: dts: qcom: pm6350: Include header for KEY_POWER Marijn Suijten
  2022-10-31  8:57   ` Luca Weiss
@ 2022-10-31 21:12   ` Konrad Dybcio
  1 sibling, 0 replies; 28+ messages in thread
From: Konrad Dybcio @ 2022-10-31 21:12 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Andy Gross, Bjorn Andersson,
	Rob Herring, Krzysztof Kozlowski, Luca Weiss, linux-arm-msm,
	devicetree, linux-kernel



On 30.10.2022 08:32, Marijn Suijten wrote:
> Make pm6350.dtsi self-contained by including input.h, needed for the
> KEY_POWER constant used to define the power key.
> 
> Fixes: d8a3c775d7cd ("arm64: dts: qcom: Add PM6350 PMIC")
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad
>  arch/arm64/boot/dts/qcom/pm6350.dtsi | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/pm6350.dtsi b/arch/arm64/boot/dts/qcom/pm6350.dtsi
> index 18c14257e2c1..111f4c1c56ae 100644
> --- a/arch/arm64/boot/dts/qcom/pm6350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm6350.dtsi
> @@ -3,6 +3,7 @@
>   * Copyright (c) 2021, Luca Weiss <luca@z3ntu.xyz>
>   */
>  
> +#include <dt-bindings/input/input.h>
>  #include <dt-bindings/spmi/spmi.h>
>  
>  &spmi_bus {

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

* Re: [PATCH 05/10] arm64: dts: qcom: sm6350-lena: Include pm6350 and configure buttons
  2022-10-30  7:32 ` [PATCH 05/10] arm64: dts: qcom: sm6350-lena: Include pm6350 and configure buttons Marijn Suijten
@ 2022-10-31 21:13   ` Konrad Dybcio
  0 siblings, 0 replies; 28+ messages in thread
From: Konrad Dybcio @ 2022-10-31 21:13 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Andy Gross, Bjorn Andersson,
	Rob Herring, Krzysztof Kozlowski, Luca Weiss, linux-arm-msm,
	devicetree, linux-kernel



On 30.10.2022 08:32, Marijn Suijten wrote:
> Include pm6350 to inherit its GPIO and button configuration, and
> configure "resin" to serve as volume up, and gpio2 as volume down.
> 
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad
>  .../qcom/sm6350-sony-xperia-lena-pdx213.dts   | 31 +++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> index 9a96000fc95b..4512b0bf7fe1 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> @@ -4,7 +4,9 @@
>   */
>  /dts-v1/;
>  
> +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
>  #include "sm6350.dtsi"
> +#include "pm6350.dtsi"
>  
>  / {
>  	model = "Sony Xperia 10 III";
> @@ -28,6 +30,35 @@ framebuffer: framebuffer@a0000000 {
>  			clocks = <&gcc GCC_DISP_AXI_CLK>;
>  		};
>  	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&gpio_keys_state>;
> +
> +		key-volume-down {
> +			label = "volume_down";
> +			linux,code = <KEY_VOLUMEDOWN>;
> +			gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>;
> +		};
> +	};
> +};
> +
> +&pm6350_gpios {
> +	gpio_keys_state: gpio-keys-state {
> +		key-volume-down-pins {
> +			pins = "gpio2";
> +			function = PMIC_GPIO_FUNC_NORMAL;
> +			power-source = <0>;
> +			bias-disable;
> +			input-enable;
> +		};
> +	};
> +};
> +
> +&pm6350_resin {
> +	linux,code = <KEY_VOLUMEUP>;
> +	status = "okay";
>  };
>  
>  &sdc2_off_state {

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

* Re: [PATCH 06/10] arm64: dts: qcom: sm6350-lena: Define pm6350 and pm6150l regulators
  2022-10-30  7:32 ` [PATCH 06/10] arm64: dts: qcom: sm6350-lena: Define pm6350 and pm6150l regulators Marijn Suijten
@ 2022-10-31 21:13   ` Konrad Dybcio
  0 siblings, 0 replies; 28+ messages in thread
From: Konrad Dybcio @ 2022-10-31 21:13 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Andy Gross, Bjorn Andersson,
	Rob Herring, Krzysztof Kozlowski, Luca Weiss, linux-arm-msm,
	devicetree, linux-kernel



On 30.10.2022 08:32, Marijn Suijten wrote:
> This regulator configuration was adopted from downstream, and is
> identical to the sm7225 FairPhone 4 configuration bar pm6350_l8a.
Because both of them are more or less reused reference designs :P

> 
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad
>  .../qcom/sm6350-sony-xperia-lena-pdx213.dts   | 218 ++++++++++++++++++
>  1 file changed, 218 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> index 4512b0bf7fe1..1aaa9612b061 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> @@ -5,6 +5,7 @@
>  /dts-v1/;
>  
>  #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>  #include "sm6350.dtsi"
>  #include "pm6350.dtsi"
>  
> @@ -44,6 +45,223 @@ key-volume-down {
>  	};
>  };
>  
> +&apps_rsc {
> +	regulators-0 {
> +		compatible = "qcom,pm6350-rpmh-regulators";
> +		qcom,pmic-id = "a";
> +
> +		pm6350_s1: smps1 {
> +			regulator-min-microvolt = <1000000>;
> +			regulator-max-microvolt = <1200000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_s2: smps2 {
> +			regulator-min-microvolt = <1503000>;
> +			regulator-max-microvolt = <2048000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l2: ldo2 {
> +			regulator-min-microvolt = <1503000>;
> +			regulator-max-microvolt = <1980000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l3: ldo3 {
> +			regulator-min-microvolt = <2700000>;
> +			regulator-max-microvolt = <3300000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l4: ldo4 {
> +			regulator-min-microvolt = <352000>;
> +			regulator-max-microvolt = <801000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l5: ldo5 {
> +			regulator-min-microvolt = <1503000>;
> +			regulator-max-microvolt = <1980000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l6: ldo6 {
> +			regulator-min-microvolt = <1710000>;
> +			regulator-max-microvolt = <3544000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l7: ldo7 {
> +			regulator-min-microvolt = <1620000>;
> +			regulator-max-microvolt = <1980000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l8: ldo8 {
> +			regulator-min-microvolt = <2500000>;
> +			regulator-max-microvolt = <3544000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l9: ldo9 {
> +			regulator-min-microvolt = <1650000>;
> +			regulator-max-microvolt = <3401000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l11: ldo11 {
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <2000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l12: ldo12 {
> +			regulator-min-microvolt = <1620000>;
> +			regulator-max-microvolt = <1980000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l13: ldo13 {
> +			regulator-min-microvolt = <570000>;
> +			regulator-max-microvolt = <650000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l14: ldo14 {
> +			regulator-min-microvolt = <1700000>;
> +			regulator-max-microvolt = <1900000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l15: ldo15 {
> +			regulator-min-microvolt = <1100000>;
> +			regulator-max-microvolt = <1305000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l16: ldo16 {
> +			regulator-min-microvolt = <830000>;
> +			regulator-max-microvolt = <921000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l18: ldo18 {
> +			regulator-min-microvolt = <788000>;
> +			regulator-max-microvolt = <1049000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l19: ldo19 {
> +			regulator-min-microvolt = <1080000>;
> +			regulator-max-microvolt = <1305000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l20: ldo20 {
> +			regulator-min-microvolt = <530000>;
> +			regulator-max-microvolt = <801000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l21: ldo21 {
> +			regulator-min-microvolt = <751000>;
> +			regulator-max-microvolt = <825000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6350_l22: ldo22 {
> +			regulator-min-microvolt = <1080000>;
> +			regulator-max-microvolt = <1305000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +	};
> +
> +	regulators-1 {
> +		compatible = "qcom,pm6150l-rpmh-regulators";
> +		qcom,pmic-id = "e";
> +
> +		pm6150l_s8: smps8 {
> +			regulator-min-microvolt = <313000>;
> +			regulator-max-microvolt = <1395000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6150l_l1: ldo1 {
> +			regulator-min-microvolt = <1620000>;
> +			regulator-max-microvolt = <1980000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6150l_l2: ldo2 {
> +			regulator-min-microvolt = <1170000>;
> +			regulator-max-microvolt = <1305000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6150l_l3: ldo3 {
> +			regulator-min-microvolt = <1100000>;
> +			regulator-max-microvolt = <1299000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6150l_l4: ldo4 {
> +			regulator-min-microvolt = <1620000>;
> +			regulator-max-microvolt = <3300000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6150l_l5: ldo5 {
> +			regulator-min-microvolt = <1620000>;
> +			regulator-max-microvolt = <3300000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6150l_l6: ldo6 {
> +			regulator-min-microvolt = <1700000>;
> +			regulator-max-microvolt = <3544000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6150l_l7: ldo7 {
> +			regulator-min-microvolt = <2700000>;
> +			regulator-max-microvolt = <3544000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6150l_l8: ldo8 {
> +			regulator-min-microvolt = <1620000>;
> +			regulator-max-microvolt = <2000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6150l_l9: ldo9 {
> +			regulator-min-microvolt = <2700000>;
> +			regulator-max-microvolt = <3544000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6150l_l10: ldo10 {
> +			regulator-min-microvolt = <3000000>;
> +			regulator-max-microvolt = <3401000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6150l_l11: ldo11 {
> +			regulator-min-microvolt = <3000000>;
> +			regulator-max-microvolt = <3401000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		pm6150l_bob: bob {
> +			regulator-min-microvolt = <1620000>;
> +			regulator-max-microvolt = <5492000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
> +			regulator-allow-bypass;
> +		};
> +	};
> +};
> +
>  &pm6350_gpios {
>  	gpio_keys_state: gpio-keys-state {
>  		key-volume-down-pins {

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

* Re: [PATCH 07/10] arm64: dts: qcom: sm6350-lena: Provide power to SDHCI 2 (SDCard slot)
  2022-10-30  7:32 ` [PATCH 07/10] arm64: dts: qcom: sm6350-lena: Provide power to SDHCI 2 (SDCard slot) Marijn Suijten
@ 2022-10-31 21:14   ` Konrad Dybcio
  0 siblings, 0 replies; 28+ messages in thread
From: Konrad Dybcio @ 2022-10-31 21:14 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Andy Gross, Bjorn Andersson,
	Rob Herring, Krzysztof Kozlowski, Luca Weiss, linux-arm-msm,
	devicetree, linux-kernel



On 30.10.2022 08:32, Marijn Suijten wrote:
> Without power the SDCard slot / hardware remains dormant.
> 
> Like many other platforms these regulators are used exclusively by
> SDHCI, and have their maximum voltage decreased to what downstream sets
> on the consumer side.  Additionally the SDHCI driver supports setting a
> load, for which the regulator definition is extended much the same.
> 
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad
>  .../dts/qcom/sm6350-sony-xperia-lena-pdx213.dts | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> index 1aaa9612b061..5cb76026ef67 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> @@ -219,8 +219,13 @@ pm6150l_l5: ldo5 {
>  
>  		pm6150l_l6: ldo6 {
>  			regulator-min-microvolt = <1700000>;
> -			regulator-max-microvolt = <3544000>;
> +			regulator-max-microvolt = <2950000>;
>  			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +			regulator-allow-set-load;
> +			regulator-allowed-modes =
> +			    <RPMH_REGULATOR_MODE_LPM
> +			     RPMH_REGULATOR_MODE_HPM>;
> +
>  		};
>  
>  		pm6150l_l7: ldo7 {
> @@ -237,8 +242,13 @@ pm6150l_l8: ldo8 {
>  
>  		pm6150l_l9: ldo9 {
>  			regulator-min-microvolt = <2700000>;
> -			regulator-max-microvolt = <3544000>;
> +			regulator-max-microvolt = <2960000>;
>  			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +			regulator-allow-set-load;
> +			regulator-allowed-modes =
> +			    <RPMH_REGULATOR_MODE_LPM
> +			     RPMH_REGULATOR_MODE_HPM>;
> +
>  		};
>  
>  		pm6150l_l10: ldo10 {
> @@ -300,6 +310,9 @@ sd-cd-pins {
>  &sdhc_2 {
>  	status = "okay";
>  
> +	vmmc-supply = <&pm6150l_l9>;
> +	vqmmc-supply = <&pm6150l_l6>;
> +
>  	cd-gpios = <&tlmm 94 GPIO_ACTIVE_HIGH>;
>  };
>  

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

* Re: [PATCH 08/10] arm64: dts: qcom: sm6350-lena: Enable QUP and GPI DMA
  2022-10-30  7:32 ` [PATCH 08/10] arm64: dts: qcom: sm6350-lena: Enable QUP and GPI DMA Marijn Suijten
@ 2022-10-31 21:14   ` Konrad Dybcio
  0 siblings, 0 replies; 28+ messages in thread
From: Konrad Dybcio @ 2022-10-31 21:14 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Andy Gross, Bjorn Andersson,
	Rob Herring, Krzysztof Kozlowski, Luca Weiss, linux-arm-msm,
	devicetree, linux-kernel



On 30.10.2022 08:32, Marijn Suijten wrote:
> Enable QUP and GPI DMA hardware to be able to add functioning I2C nodes
> later.
> 
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad
>  .../dts/qcom/sm6350-sony-xperia-lena-pdx213.dts  | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> index 5cb76026ef67..6eb1d4e5e60f 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> @@ -272,6 +272,14 @@ pm6150l_bob: bob {
>  	};
>  };
>  
> +&gpi_dma0 {
> +	status = "okay";
> +};
> +
> +&gpi_dma1 {
> +	status = "okay";
> +};
> +
>  &pm6350_gpios {
>  	gpio_keys_state: gpio-keys-state {
>  		key-volume-down-pins {
> @@ -289,6 +297,14 @@ &pm6350_resin {
>  	status = "okay";
>  };
>  
> +&qupv3_id_0 {
> +	status = "okay";
> +};
> +
> +&qupv3_id_1 {
> +	status = "okay";
> +};
> +
>  &sdc2_off_state {
>  	sd-cd-pins {
>  		pins = "gpio94";

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

* Re: [PATCH 09/10] arm64: dts: qcom: sm6350-lena: Configure Samsung touchscreen
  2022-10-30  7:32 ` [PATCH 09/10] arm64: dts: qcom: sm6350-lena: Configure Samsung touchscreen Marijn Suijten
@ 2022-10-31 21:14   ` Konrad Dybcio
  0 siblings, 0 replies; 28+ messages in thread
From: Konrad Dybcio @ 2022-10-31 21:14 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Andy Gross, Bjorn Andersson,
	Rob Herring, Krzysztof Kozlowski, Luca Weiss, linux-arm-msm,
	devicetree, linux-kernel



On 30.10.2022 08:32, Marijn Suijten wrote:
> Use the generic samsung,s6sy761 touchscreen driver for this device,
> together with a few pins and regulators to power it up correctly.
> 
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad
>  .../qcom/sm6350-sony-xperia-lena-pdx213.dts   | 41 +++++++++++++++++++
>  1 file changed, 41 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> index 6eb1d4e5e60f..20f35623d1ef 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> @@ -43,6 +43,15 @@ key-volume-down {
>  			gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>;
>  		};
>  	};
> +
> +	touch_en_vreg: touch-en-regulator {
> +		compatible = "regulator-fixed";
> +		regulator-name = "touch_en_vreg";
> +		gpio = <&tlmm 10 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +
> +		vin-supply = <&pm6350_l6>;
> +	};
>  };
>  
>  &apps_rsc {
> @@ -280,6 +289,23 @@ &gpi_dma1 {
>  	status = "okay";
>  };
>  
> +&i2c8 {
> +	clock-frequency = <400000>;
> +	status = "okay";
> +
> +	touchscreen@48 {
> +		compatible = "samsung,s6sy761";
> +		reg = <0x48>;
> +		interrupt-parent = <&tlmm>;
> +		interrupts = <22 0x2008>;
> +		vdd-supply = <&pm6350_l11>;
> +		avdd-supply = <&touch_en_vreg>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&ts_int_default &ts_active>;
> +	};
> +};
> +
>  &pm6350_gpios {
>  	gpio_keys_state: gpio-keys-state {
>  		key-volume-down-pins {
> @@ -334,6 +360,21 @@ &sdhc_2 {
>  
>  &tlmm {
>  	gpio-reserved-ranges = <13 4>, <45 2>, <56 2>;
> +
> +	ts_active: ts-active-state {
> +		pins = "gpio21";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-up;
> +	};
> +
> +	ts_int_default: ts-int-default-state {
> +		pins = "gpio22";
> +		function = "gpio";
> +		drive-strength = <2>;
> +		bias-disable;
> +		input-enable;
> +	};
>  };
>  
>  &usb_1 {

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

* Re: [PATCH 10/10] arm64: dts: qcom: sm6350: Add apps_smmu with streamID to SDHCI 1/2 nodes
  2022-10-30  7:32 ` [PATCH 10/10] arm64: dts: qcom: sm6350: Add apps_smmu with streamID to SDHCI 1/2 nodes Marijn Suijten
  2022-10-31  8:58   ` Luca Weiss
@ 2022-10-31 21:15   ` Konrad Dybcio
  1 sibling, 0 replies; 28+ messages in thread
From: Konrad Dybcio @ 2022-10-31 21:15 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Andy Gross, Bjorn Andersson,
	Rob Herring, Krzysztof Kozlowski, Luca Weiss, linux-arm-msm,
	devicetree, linux-kernel



On 30.10.2022 08:32, Marijn Suijten wrote:
> When enabling the APPS SMMU the mainline driver reconfigures the SMMU
> from its bootloader configuration, loosing the stream mapping for (among
> which) the SDHCI hardware and breaking its ADMA feature.  This feature
> can be disabled with:
> 
>     sdhci.debug_quirks=0x40
> 
> But it is of course desired to have this feature enabled and working
> through the SMMU.
> 
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad
>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> index b98b881ebe7e..c309a359ded9 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> @@ -485,6 +485,7 @@ sdhc_1: mmc@7c4000 {
>  			interrupts = <GIC_SPI 641 IRQ_TYPE_LEVEL_HIGH>,
>  				     <GIC_SPI 644 IRQ_TYPE_LEVEL_HIGH>;
>  			interrupt-names = "hc_irq", "pwr_irq";
> +			iommus = <&apps_smmu 0x60 0x0>;
>  
>  			clocks = <&gcc GCC_SDCC1_AHB_CLK>,
>  				 <&gcc GCC_SDCC1_APPS_CLK>,
> @@ -1064,6 +1065,7 @@ sdhc_2: mmc@8804000 {
>  			interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
>  				     <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>;
>  			interrupt-names = "hc_irq", "pwr_irq";
> +			iommus = <&apps_smmu 0x560 0x0>;
>  
>  			clocks = <&gcc GCC_SDCC2_AHB_CLK>,
>  				 <&gcc GCC_SDCC2_APPS_CLK>,

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

* Re: [PATCH 02/10] arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2
  2022-10-30  7:32 ` [PATCH 02/10] arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2 Marijn Suijten
  2022-10-31  8:56   ` Luca Weiss
  2022-10-31 21:12   ` Konrad Dybcio
@ 2022-11-02 20:45   ` Krzysztof Kozlowski
  2 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-02 20:45 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Luca Weiss,
	linux-arm-msm, devicetree, linux-kernel

On 30/10/2022 03:32, Marijn Suijten wrote:
> Use the generic pin functions specifically for sdc2.
> 
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 44 ++++++++++++++++++++++++++++


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof


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

* Re: [PATCH 03/10] arm64: dts: qcom: sm6350-lena: Add SD Card Detect to sdc2 on/off pinctrl
  2022-10-30  7:32 ` [PATCH 03/10] arm64: dts: qcom: sm6350-lena: Add SD Card Detect to sdc2 on/off pinctrl Marijn Suijten
  2022-10-31 21:12   ` Konrad Dybcio
@ 2022-11-02 20:45   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-02 20:45 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Luca Weiss,
	linux-arm-msm, devicetree, linux-kernel

On 30/10/2022 03:32, Marijn Suijten wrote:
> In addition to the sdc2 pins, set the SD Card Detect pin in a sane state
> to be used as an interrupt when an SD Card is slotted in or removed.
> 
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213
  2022-10-30  7:32 [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 Marijn Suijten
                   ` (9 preceding siblings ...)
  2022-10-30  7:32 ` [PATCH 10/10] arm64: dts: qcom: sm6350: Add apps_smmu with streamID to SDHCI 1/2 nodes Marijn Suijten
@ 2022-11-08  1:27 ` Bjorn Andersson
  10 siblings, 0 replies; 28+ messages in thread
From: Bjorn Andersson @ 2022-11-08  1:27 UTC (permalink / raw)
  To: marijn.suijten, phone-devel
  Cc: devicetree, robh+dt, ~postmarketos/upstreaming, konrad.dybcio,
	krzysztof.kozlowski+dt, martin.botka, agross, luca,
	angelogioacchino.delregno, linux-kernel, jami.kettunen,
	linux-arm-msm

On Sun, 30 Oct 2022 08:32:22 +0100, Marijn Suijten wrote:
> Enable SD Card for Sony Lena PDX213 on the sm6350 SoC by providing it
> the necessary IOMMU stream ID(s) and pinctrl in SoC dtsi, and setting up
> the regulators in device/board DT.  Together with regulator support,
> power up the touchscreen and import pm6350 dtsi to enable the power and
> volume up/down keys.
> 
> Marijn Suijten (10):
>   arm64: dts: qcom: sm6350: Add resets for SDHCI 1/2
>   arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2
>   arm64: dts: qcom: sm6350-lena: Add SD Card Detect to sdc2 on/off
>     pinctrl
>   arm64: dts: qcom: pm6350: Include header for KEY_POWER
>   arm64: dts: qcom: sm6350-lena: Include pm6350 and configure buttons
>   arm64: dts: qcom: sm6350-lena: Define pm6350 and pm6150l regulators
>   arm64: dts: qcom: sm6350-lena: Provide power to SDHCI 2 (SDCard slot)
>   arm64: dts: qcom: sm6350-lena: Enable QUP and GPI DMA
>   arm64: dts: qcom: sm6350-lena: Configure Samsung touchscreen
>   arm64: dts: qcom: sm6350: Add apps_smmu with streamID to SDHCI 1/2
>     nodes
> 
> [...]

Applied, thanks!

[01/10] arm64: dts: qcom: sm6350: Add resets for SDHCI 1/2
        commit: e10d451e10418f12e72ed8564f22fdba8b10a9b0
[02/10] arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2
        commit: a5d0314b9d5166503e99336bb832b3b81b200399
[03/10] arm64: dts: qcom: sm6350-lena: Add SD Card Detect to sdc2 on/off pinctrl
        commit: edf070fcbcec70765fe520d476fd9527b5e96477
[04/10] arm64: dts: qcom: pm6350: Include header for KEY_POWER
        commit: f6e2d6914c7c095660a9c7c503328eebab1e2557
[05/10] arm64: dts: qcom: sm6350-lena: Include pm6350 and configure buttons
        commit: 2b8bbe985659e640fda30435c187432c0f614f81
[06/10] arm64: dts: qcom: sm6350-lena: Define pm6350 and pm6150l regulators
        commit: deaf8c88db7d327ba768ac224e53d29f56027331
[07/10] arm64: dts: qcom: sm6350-lena: Provide power to SDHCI 2 (SDCard slot)
        commit: 85eef5cb65ab7e8905725d13c98c90442bb93dbc
[08/10] arm64: dts: qcom: sm6350-lena: Enable QUP and GPI DMA
        commit: 8bad51c68930eba8b26ce362c7c9bfce5d074a2f
[09/10] arm64: dts: qcom: sm6350-lena: Configure Samsung touchscreen
        commit: 2904a41c50e408c0a1e90da0045400edb6f155fe
[10/10] arm64: dts: qcom: sm6350: Add apps_smmu with streamID to SDHCI 1/2 nodes
        commit: 7372b944a6ba5ac86628eaacc89ed4f103435cb9

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2022-11-08  1:28 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-30  7:32 [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 Marijn Suijten
2022-10-30  7:32 ` [PATCH 01/10] arm64: dts: qcom: sm6350: Add resets for SDHCI 1/2 Marijn Suijten
2022-10-31  8:55   ` Luca Weiss
2022-10-31 21:12   ` Konrad Dybcio
2022-10-30  7:32 ` [PATCH 02/10] arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2 Marijn Suijten
2022-10-31  8:56   ` Luca Weiss
2022-10-31 21:12   ` Konrad Dybcio
2022-11-02 20:45   ` Krzysztof Kozlowski
2022-10-30  7:32 ` [PATCH 03/10] arm64: dts: qcom: sm6350-lena: Add SD Card Detect to sdc2 on/off pinctrl Marijn Suijten
2022-10-31 21:12   ` Konrad Dybcio
2022-11-02 20:45   ` Krzysztof Kozlowski
2022-10-30  7:32 ` [PATCH 04/10] arm64: dts: qcom: pm6350: Include header for KEY_POWER Marijn Suijten
2022-10-31  8:57   ` Luca Weiss
2022-10-31 21:12   ` Konrad Dybcio
2022-10-30  7:32 ` [PATCH 05/10] arm64: dts: qcom: sm6350-lena: Include pm6350 and configure buttons Marijn Suijten
2022-10-31 21:13   ` Konrad Dybcio
2022-10-30  7:32 ` [PATCH 06/10] arm64: dts: qcom: sm6350-lena: Define pm6350 and pm6150l regulators Marijn Suijten
2022-10-31 21:13   ` Konrad Dybcio
2022-10-30  7:32 ` [PATCH 07/10] arm64: dts: qcom: sm6350-lena: Provide power to SDHCI 2 (SDCard slot) Marijn Suijten
2022-10-31 21:14   ` Konrad Dybcio
2022-10-30  7:32 ` [PATCH 08/10] arm64: dts: qcom: sm6350-lena: Enable QUP and GPI DMA Marijn Suijten
2022-10-31 21:14   ` Konrad Dybcio
2022-10-30  7:32 ` [PATCH 09/10] arm64: dts: qcom: sm6350-lena: Configure Samsung touchscreen Marijn Suijten
2022-10-31 21:14   ` Konrad Dybcio
2022-10-30  7:32 ` [PATCH 10/10] arm64: dts: qcom: sm6350: Add apps_smmu with streamID to SDHCI 1/2 nodes Marijn Suijten
2022-10-31  8:58   ` Luca Weiss
2022-10-31 21:15   ` Konrad Dybcio
2022-11-08  1:27 ` [PATCH 00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 Bjorn Andersson

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