All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] SM8350 Sagami PMIC lane names & SLG51000
@ 2022-11-18 15:20 Konrad Dybcio
  2022-11-18 15:20 ` [PATCH 1/2] arm64: dts: qcom: sm8350-sagami: Configure SLG51000 PMIC on PDX215 Konrad Dybcio
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Konrad Dybcio @ 2022-11-18 15:20 UTC (permalink / raw)
  To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
  Cc: patches, Konrad Dybcio

This short series adds PMIC GPIO line names to Sagami devices and
enables Dialog SLG51000 PMIC used for powering some of the camera
hw on PDX215.

Depends on:

[1] https://lore.kernel.org/linux-arm-msm/20221116123612.34302-1-konrad.dybcio@linaro.org/

Konrad Dybcio (2):
  arm64: dts: qcom: sm8350-sagami: Configure SLG51000 PMIC on PDX215
  arm64: dts: qcom: sm8350-sagami: Add GPIO line names for PMIC GPIOs

 .../qcom/sm8350-sony-xperia-sagami-pdx214.dts | 23 +++++
 .../qcom/sm8350-sony-xperia-sagami-pdx215.dts | 87 +++++++++++++++++++
 .../dts/qcom/sm8350-sony-xperia-sagami.dtsi   | 22 ++++-
 3 files changed, 131 insertions(+), 1 deletion(-)

-- 
2.38.1


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

* [PATCH 1/2] arm64: dts: qcom: sm8350-sagami: Configure SLG51000 PMIC on PDX215
  2022-11-18 15:20 [PATCH 0/2] SM8350 Sagami PMIC lane names & SLG51000 Konrad Dybcio
@ 2022-11-18 15:20 ` Konrad Dybcio
  2022-11-18 15:20 ` [PATCH 2/2] arm64: dts: qcom: sm8350-sagami: Add GPIO line names for PMIC GPIOs Konrad Dybcio
  2022-12-28  2:41 ` [PATCH 0/2] SM8350 Sagami PMIC lane names & SLG51000 Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Konrad Dybcio @ 2022-11-18 15:20 UTC (permalink / raw)
  To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
  Cc: patches, Konrad Dybcio, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, devicetree, linux-kernel

Remove the mention of this PMIC from the common DTSI, as it's not
used on PDX214. Add the required nodes to support it on PDX215.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../qcom/sm8350-sony-xperia-sagami-pdx215.dts | 66 +++++++++++++++++++
 .../dts/qcom/sm8350-sony-xperia-sagami.dtsi   |  2 +-
 2 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dts b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dts
index c74c973a69d2..d4afaa393c9a 100644
--- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dts
+++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dts
@@ -12,6 +12,72 @@ / {
 	compatible = "sony,pdx215-generic", "qcom,sm8350";
 };
 
+&i2c13 {
+	pmic@75 {
+		compatible = "dlg,slg51000";
+		reg = <0x75>;
+		dlg,cs-gpios = <&pm8350b_gpios 1 GPIO_ACTIVE_HIGH>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&cam_pwr_a_cs>;
+
+		regulators {
+			slg51000_a_ldo1: ldo1 {
+				regulator-name = "slg51000_a_ldo1";
+				regulator-min-microvolt = <2400000>;
+				regulator-max-microvolt = <3300000>;
+			};
+
+			slg51000_a_ldo2: ldo2 {
+				regulator-name = "slg51000_a_ldo2";
+				regulator-min-microvolt = <2400000>;
+				regulator-max-microvolt = <3300000>;
+			};
+
+			slg51000_a_ldo3: ldo3 {
+				regulator-name = "slg51000_a_ldo3";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3750000>;
+			};
+
+			slg51000_a_ldo4: ldo4 {
+				regulator-name = "slg51000_a_ldo4";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3750000>;
+			};
+
+			slg51000_a_ldo5: ldo5 {
+				regulator-name = "slg51000_a_ldo5";
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <1200000>;
+			};
+
+			slg51000_a_ldo6: ldo6 {
+				regulator-name = "slg51000_a_ldo6";
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <1200000>;
+			};
+
+			slg51000_a_ldo7: ldo7 {
+				regulator-name = "slg51000_a_ldo7";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3750000>;
+			};
+		};
+	};
+};
+
+&pm8350b_gpios {
+	cam_pwr_a_cs: cam-pwr-a-cs-state {
+		pins = "gpio1";
+		function = "normal";
+		qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
+		power-source = <1>;
+		drive-push-pull;
+		output-high;
+	};
+};
+
 &tlmm {
 	gpio-line-names = "APPS_I2C_0_SDA", /* GPIO_0 */
 			  "APPS_I2C_0_SCL",
diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
index 6ae700e72d1e..8f32b2799bcb 100644
--- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
@@ -3,6 +3,7 @@
  * Copyright (c) 2021, Konrad Dybcio <konrad.dybcio@somainline.org>
  */
 
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 #include "sm8350.dtsi"
 #include "pm8350.dtsi"
@@ -506,7 +507,6 @@ &i2c13 {
 	clock-frequency = <100000>;
 
 	/* Qualcomm PM8008i/PM8008j (?) @ 8, 9, c, d */
-	/* Dialog SLG51000 CMIC @ 75 */
 };
 
 &i2c15 {
-- 
2.38.1


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

* [PATCH 2/2] arm64: dts: qcom: sm8350-sagami: Add GPIO line names for PMIC GPIOs
  2022-11-18 15:20 [PATCH 0/2] SM8350 Sagami PMIC lane names & SLG51000 Konrad Dybcio
  2022-11-18 15:20 ` [PATCH 1/2] arm64: dts: qcom: sm8350-sagami: Configure SLG51000 PMIC on PDX215 Konrad Dybcio
@ 2022-11-18 15:20 ` Konrad Dybcio
  2022-12-28  2:41 ` [PATCH 0/2] SM8350 Sagami PMIC lane names & SLG51000 Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Konrad Dybcio @ 2022-11-18 15:20 UTC (permalink / raw)
  To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
  Cc: patches, Konrad Dybcio, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, devicetree, linux-kernel

Sony ever so graciously provides GPIO line names in their downstream
kernel (though sometimes they are not 100% accurate and you can judge
that by simply looking at them and with what drivers they are used).

Add these to the PDX213&214 DTSIs to better document the hardware.

Diff between 223 and 224:

pm8350b
< 	gpio-line-names = "NC", /* GPIO_1 */
> 	gpio-line-names = "CAM_PWR_A_CS", /* GPIO_1 */
< 			  "NC",
> 			  "CAM_PWR_LD_EN",

pm8350c
< 			  "NC",
> 			  "WLC_TXPWR_EN",

Which is due to different camera power wiring on 213 and lack of an
additional SLG51000 PMIC on 214.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../qcom/sm8350-sony-xperia-sagami-pdx214.dts | 23 +++++++++++++++++++
 .../qcom/sm8350-sony-xperia-sagami-pdx215.dts | 21 +++++++++++++++++
 .../dts/qcom/sm8350-sony-xperia-sagami.dtsi   | 20 ++++++++++++++++
 3 files changed, 64 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx214.dts b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx214.dts
index cc650508dc2d..e6824c8c2774 100644
--- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx214.dts
+++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx214.dts
@@ -17,3 +17,26 @@ &framebuffer {
 	height = <2520>;
 	stride = <(1080 * 4)>;
 };
+
+&pm8350b_gpios {
+	gpio-line-names = "NC", /* GPIO_1 */
+			  "NC",
+			  "NC",
+			  "NC",
+			  "SNAPSHOT_N",
+			  "NC",
+			  "NC",
+			  "FOCUS_N";
+};
+
+&pm8350c_gpios {
+	gpio-line-names = "FL_STROBE_TRIG_WIDE", /* GPIO_1 */
+			  "FL_STROBE_TRIG_TELE",
+			  "NC",
+			  "NC",
+			  "NC",
+			  "RGBC_IR_PWR_EN",
+			  "NC",
+			  "NC",
+			  "WIDEC_PWR_EN";
+};
diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dts b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dts
index d4afaa393c9a..c6f402c3ef35 100644
--- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dts
+++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dts
@@ -68,6 +68,15 @@ slg51000_a_ldo7: ldo7 {
 };
 
 &pm8350b_gpios {
+	gpio-line-names = "CAM_PWR_A_CS", /* GPIO_1 */
+			  "NC",
+			  "NC",
+			  "NC",
+			  "SNAPSHOT_N",
+			  "CAM_PWR_LD_EN",
+			  "NC",
+			  "FOCUS_N";
+
 	cam_pwr_a_cs: cam-pwr-a-cs-state {
 		pins = "gpio1";
 		function = "normal";
@@ -78,6 +87,18 @@ cam_pwr_a_cs: cam-pwr-a-cs-state {
 	};
 };
 
+&pm8350c_gpios {
+	gpio-line-names = "FL_STROBE_TRIG_WIDE", /* GPIO_1 */
+			  "FL_STROBE_TRIG_TELE",
+			  "NC",
+			  "WLC_TXPWR_EN",
+			  "NC",
+			  "RGBC_IR_PWR_EN",
+			  "NC",
+			  "NC",
+			  "WIDEC_PWR_EN";
+};
+
 &tlmm {
 	gpio-line-names = "APPS_I2C_0_SDA", /* GPIO_0 */
 			  "APPS_I2C_0_SCL",
diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
index 8f32b2799bcb..d73e1f3fa501 100644
--- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
@@ -534,6 +534,26 @@ &mpss {
 	firmware-name = "qcom/sm8350/Sony/sagami/modem.mbn";
 };
 
+&pm8350_gpios {
+	gpio-line-names = "ASSIGN1_THERM", /* GPIO_1 */
+			  "LCD_ID",
+			  "SDR_MMW_THERM",
+			  "RF_ID",
+			  "NC",
+			  "FP_LDO_EN",
+			  "SP_ARI_PWR_ALARM",
+			  "NC",
+			  "G_ASSIST_N",
+			  "PM8350_OPTION"; /* GPIO_10 */
+};
+
+&pmk8350_gpios {
+	gpio-line-names = "NC", /* GPIO_1 */
+			  "NC",
+			  "VOL_DOWN_N",
+			  "PMK8350_OPTION";
+};
+
 &pmk8350_rtc {
 	status = "okay";
 };
-- 
2.38.1


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

* Re: [PATCH 0/2] SM8350 Sagami PMIC lane names & SLG51000
  2022-11-18 15:20 [PATCH 0/2] SM8350 Sagami PMIC lane names & SLG51000 Konrad Dybcio
  2022-11-18 15:20 ` [PATCH 1/2] arm64: dts: qcom: sm8350-sagami: Configure SLG51000 PMIC on PDX215 Konrad Dybcio
  2022-11-18 15:20 ` [PATCH 2/2] arm64: dts: qcom: sm8350-sagami: Add GPIO line names for PMIC GPIOs Konrad Dybcio
@ 2022-12-28  2:41 ` Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2022-12-28  2:41 UTC (permalink / raw)
  To: Konrad Dybcio, krzysztof.kozlowski, linux-arm-msm, agross; +Cc: patches

On Fri, 18 Nov 2022 16:20:26 +0100, Konrad Dybcio wrote:
> This short series adds PMIC GPIO line names to Sagami devices and
> enables Dialog SLG51000 PMIC used for powering some of the camera
> hw on PDX215.
> 
> Depends on:
> 
> [1] https://lore.kernel.org/linux-arm-msm/20221116123612.34302-1-konrad.dybcio@linaro.org/
> 
> [...]

Applied, thanks!

[1/2] arm64: dts: qcom: sm8350-sagami: Configure SLG51000 PMIC on PDX215
      commit: 8875b1d71f112b30e4c7e65ed337096bc0cc396b
[2/2] arm64: dts: qcom: sm8350-sagami: Add GPIO line names for PMIC GPIOs
      commit: 7c679f2a2af84edbec0c28171af8c42c6da9af14

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

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

end of thread, other threads:[~2022-12-28  2:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18 15:20 [PATCH 0/2] SM8350 Sagami PMIC lane names & SLG51000 Konrad Dybcio
2022-11-18 15:20 ` [PATCH 1/2] arm64: dts: qcom: sm8350-sagami: Configure SLG51000 PMIC on PDX215 Konrad Dybcio
2022-11-18 15:20 ` [PATCH 2/2] arm64: dts: qcom: sm8350-sagami: Add GPIO line names for PMIC GPIOs Konrad Dybcio
2022-12-28  2:41 ` [PATCH 0/2] SM8350 Sagami PMIC lane names & SLG51000 Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.