diff mbox series

[v4,23/27] arm64: dts: qcom: starqltechn: add display PMIC

Message ID 20240913-starqltechn_integration_upstream-v4-23-2d2efd5c5877@gmail.com
State Superseded
Headers show
Series This is continued work on Samsung S9(SM-9600) starqltechn | expand

Commit Message

Dzmitry Sankouski Sept. 13, 2024, 3:08 p.m. UTC
Add support for s2dos05 display / touchscreen PMIC

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
 .../boot/dts/qcom/sdm845-samsung-starqltechn.dts   | 77 ++++++++++++++++++++++
 1 file changed, 77 insertions(+)

Comments

Krzysztof Kozlowski Sept. 16, 2024, 9:15 a.m. UTC | #1
On Fri, Sep 13, 2024 at 06:08:06PM +0300, Dzmitry Sankouski wrote:
> Add support for s2dos05 display / touchscreen PMIC
> 
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> ---
>  .../boot/dts/qcom/sdm845-samsung-starqltechn.dts   | 77 ++++++++++++++++++++++
>  1 file changed, 77 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> index 865253d8f0c7..5e5684f84ffb 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_buck1>;
> +			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 = "s2dos05-ldo1";

Useless name. Please use rather names from the schematics, but I guess
you might not have them, so maybe downstream has reasonable name?

Best regards,
Krzysztof
Dzmitry Sankouski Sept. 19, 2024, 1:17 p.m. UTC | #2
> > +             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 = "s2dos05-ldo1";
>
> Useless name. Please use rather names from the schematics, but I guess
> you might not have them, so maybe downstream has reasonable name?

Unfortunately, downstream uses that same name.
Krzysztof Kozlowski Sept. 19, 2024, 2 p.m. UTC | #3
On 19/09/2024 15:17, Dzmitry Sankouski wrote:
>>> +             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 = "s2dos05-ldo1";
>>
>> Useless name. Please use rather names from the schematics, but I guess
>> you might not have them, so maybe downstream has reasonable name?
> 
> Unfortunately, downstream uses that same name.

Then "ldo1" is enough.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 865253d8f0c7..5e5684f84ffb 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_buck1>;
+			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 = "s2dos05-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 = "s2dos05-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 = "s2dos05-ldo3";
+				};
+
+				s2dos05_ldo4: ldo4 {
+					regulator-active-discharge = <1>;
+					regulator-enable-ramp-delay = <12000>;
+					regulator-min-microvolt = <2700000>;
+					regulator-max-microvolt = <3775000>;
+					regulator-name = "s2dos05-ldo4";
+				};
+
+				s2dos05_buck1: buck1 {
+					regulator-active-discharge = <1>;
+					regulator-enable-ramp-delay = <12000>;
+					regulator-min-microvolt = <850000>;
+					regulator-max-microvolt = <2100000>;
+					regulator-name = "s2dos05-buck1";
+				};
+			};
+		};
+	};
+
 	vib_regulator: gpio-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "haptic";
@@ -588,4 +651,18 @@  motor_pwm_suspend_state: motor-pwm-suspend-state {
 		bias-disable;
 		output-low;
 	};
+
+	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;
+	};
 };