Message ID | 20241008-starqltechn_integration_upstream-v6-8-5445365d3052@gmail.com |
---|---|
State | New |
Headers | show |
Series | This is continued work on Samsung S9(SM-9600) starqltechn | expand |
On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote: > Add support for s2dos05 display / touchscreen PMIC > > Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> > --- > Changes in v6: > - refactor: s/starqltechn/sdm845-starqltechn in subject > - refactor: 'i' < 'm', so put tlmm i2c node before motor* Now you have 'i'2c21 before 'g'pio-regulator :/ > > Changes in v5: > - simplify regulator names > - remove single buck index > --- [...] > > + i2c21 { > + compatible = "i2c-gpio"; I'm not sure this has been asked before - is the GENI SE for I2C21 disabled? Or are there reasons to use i2c-gpio instead? Konrad
пн, 4 нояб. 2024 г. в 17:15, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>: > > On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote: > > Add support for s2dos05 display / touchscreen PMIC > > > > Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> > > --- > > Changes in v6: > > - refactor: s/starqltechn/sdm845-starqltechn in subject > > - refactor: 'i' < 'm', so put tlmm i2c node before motor* > > Now you have 'i'2c21 before 'g'pio-regulator :/ That refactor was about tlmm inner nodes. For soc nodes rule `nodes of the same type can be grouped together` should apply I guess. I think I should move it to regulators. > [...] > > > > > + i2c21 { > > + compatible = "i2c-gpio"; > > I'm not sure this has been asked before - is the GENI SE for I2C21 > disabled? Or are there reasons to use i2c-gpio instead? > I2c21 is wired on pins 127, 128, and those pins don't have a GENI SE function. -- Best regards and thanks for review, Dzmitry
пн, 4 нояб. 2024 г. в 17:15, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>: > > On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote: > > Add support for s2dos05 display / touchscreen PMIC > > > > Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> > > --- > > Changes in v6: > > - refactor: s/starqltechn/sdm845-starqltechn in subject > > - refactor: 'i' < 'm', so put tlmm i2c node before motor* > > Now you have 'i'2c21 before 'g'pio-regulator :/ > WIll move i2c21 node before gpio-keys, too -- Best regards and thanks for review, Dzmitry
On 2.12.2024 2:18 PM, Dzmitry Sankouski wrote: > пн, 4 нояб. 2024 г. в 17:15, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>: >> >> On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote: >>> Add support for s2dos05 display / touchscreen PMIC >>> >>> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> >>> --- >>> Changes in v6: >>> - refactor: s/starqltechn/sdm845-starqltechn in subject >>> - refactor: 'i' < 'm', so put tlmm i2c node before motor* >> >> Now you have 'i'2c21 before 'g'pio-regulator :/ > > That refactor was about tlmm inner nodes. For soc nodes > rule `nodes of the same type can be grouped together` should apply I guess. > I think I should move it to regulators. > >> [...] >> >>> >>> + i2c21 { >>> + compatible = "i2c-gpio"; >> >> I'm not sure this has been asked before - is the GENI SE for I2C21 >> disabled? Or are there reasons to use i2c-gpio instead? >> > > I2c21 is wired on pins 127, 128, and those pins don't have a GENI SE function. Right, I was able to confirm that's the case in general, not only in the Linux pinctrl driver Konrad
diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts index 7d1d57f41024..5635f3b088cf 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts @@ -39,6 +39,9 @@ framebuffer: framebuffer@9d400000 { height = <2960>; stride = <(1440 * 4)>; format = "a8r8g8b8"; + vci-supply = <&s2dos05_ldo4>; + vddr-supply = <&s2dos05_buck>; + vdd3-supply = <&s2dos05_ldo1>; }; }; @@ -101,6 +104,66 @@ key-wink { }; }; + i2c21 { + compatible = "i2c-gpio"; + sda-gpios = <&tlmm 127 GPIO_ACTIVE_HIGH>; + scl-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>; + i2c-gpio,delay-us = <2>; + pinctrl-0 = <&i2c21_sda_state &i2c21_scl_state>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + + pmic@60 { + compatible = "samsung,s2dos05"; + reg = <0x60>; + + regulators { + s2dos05_ldo1: ldo1 { + regulator-active-discharge = <1>; + regulator-enable-ramp-delay = <12000>; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <2000000>; + regulator-name = "ldo1"; + }; + + s2dos05_ldo2: ldo2 { + regulator-active-discharge = <1>; + regulator-boot-on; + regulator-enable-ramp-delay = <12000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "ldo2"; + }; + + s2dos05_ldo3: ldo3 { + regulator-active-discharge = <1>; + regulator-boot-on; + regulator-enable-ramp-delay = <12000>; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "ldo3"; + }; + + s2dos05_ldo4: ldo4 { + regulator-active-discharge = <1>; + regulator-enable-ramp-delay = <12000>; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3775000>; + regulator-name = "ldo4"; + }; + + s2dos05_buck: buck { + regulator-active-discharge = <1>; + regulator-enable-ramp-delay = <12000>; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <2100000>; + regulator-name = "buck"; + }; + }; + }; + }; + vib_regulator: gpio-regulator { compatible = "regulator-fixed"; regulator-name = "haptic"; @@ -544,6 +607,20 @@ &tlmm { gpio-reserved-ranges = <27 4>, /* SPI (eSE - embedded Secure Element) */ <85 4>; /* SPI (fingerprint reader) */ + i2c21_sda_state: i2c21-sda-state { + pins = "gpio127"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + i2c21_scl_state: i2c21-scl-state { + pins = "gpio128"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + motor_pwm_default_state: motor-pwm-active-state { pins = "gpio57"; function = "gcc_gp1";
Add support for s2dos05 display / touchscreen PMIC Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> --- Changes in v6: - refactor: s/starqltechn/sdm845-starqltechn in subject - refactor: 'i' < 'm', so put tlmm i2c node before motor* Changes in v5: - simplify regulator names - remove single buck index --- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+)