SM8350 Sagami PMIC lane names & SLG51000
cover SM8350 Sagami PMIC lane names & SLG51000
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/[email protected]/
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(-)
Signature · 1 line
2.38.1
PATCH 1/2 arm64: dts: qcom: sm8350-sagami: Configure SLG51000 PMIC on PDX215
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.
--- .../qcom/sm8350-sony-xperia-sagami-pdx215.dts | 66 +++++++++++++++++++ .../dts/qcom/sm8350-sony-xperia-sagami.dtsi | 2 +- 2 files changed, 67 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dts +66 -0
@@ -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",
arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi +1 -1
@@ -3,6 +3,7 @@ * Copyright (c) 2021, Konrad Dybcio <[email protected]> */ +#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 {
Signature · 1 line
2.38.1
PATCH 2/2 arm64: dts: qcom: sm8350-sagami: Add GPIO line names for PMIC GPIOs
In reply to Konrad DybcioSony 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 */
Quoted 1 line
gpio-line-names = "CAM_PWR_A_CS", /* GPIO_1 */
< "NC",
Quoted 1 line
"CAM_PWR_LD_EN",
pm8350c
< "NC",
Quoted 1 line
"WLC_TXPWR_EN",
Which is due to different camera power wiring on 213 and lack of an additional SLG51000 PMIC on 214.
--- .../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(+)
arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx214.dts +23 -0
@@ -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"; +};
arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dts +21 -0
@@ -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",
arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi +20 -0
@@ -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"; };
Signature · 1 line
2.38.1
Quoted 9 lines · 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/[email protected]/
[...]
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: 7c679f2a2af84edbec0c28171af8c42c6da9af14Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>