arm64: dts: qcom: msm8916-samsung-fortuna: Add touchscreen and PWM backlight
v3 cover arm64: dts: qcom: msm8916-samsung-fortuna: Add touchscreen and PWM backlight
Like msm8916-samsung-a3u-eur, the Grand Prime uses a Zinitix BT541 touchscreen. Add it together with the necessary fixed-regulator to the device tree.
Most of the Galaxy Grand Prime use backlight drivers controlled with PWM signal.
To simplify the description, add the backlight with the necessary clk-pwm to the common dtsi.
---
v2: Add &touchscreen. Keep i2c5 enabled
v3: Drop linux,keycodes. Add PWM backlight
PATCH v3 1/2 arm64: dts: qcom: msm8916-samsung-fortuna: Add touchscreen
From: Joe Mason <[email protected]>
Like msm8916-samsung-a3u-eur, the Grand Prime uses a Zinitix BT541 touchscreen. Add it together with the necessary fixed-regulator to the device tree.
--- .../qcom/msm8916-samsung-fortuna-common.dtsi | 47 +++++++++++++++++++ .../qcom/msm8916-samsung-rossa-common.dtsi | 3 ++ 2 files changed, 50 insertions(+)
arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi +47 -0
@@ -66,6 +66,19 @@ reg_motor_vdd: regulator-motor-vdd { pinctrl-0 = <&motor_en_default>; pinctrl-names = "default"; }; + + reg_vdd_tsp_a: regulator-vdd-tsp-a { + compatible = "regulator-fixed"; + regulator-name = "vdd_tsp_a"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + + gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&tsp_en_default>; + pinctrl-names = "default"; + }; }; &blsp_i2c1 {
@@ -94,6 +107,26 @@ fuel-gauge@35 { }; }; +&blsp_i2c5 { + status = "okay"; + + touchscreen: touchscreen@20 { + compatible = "zinitix,bt541"; + reg = <0x20>; + + interrupts-extended = <&tlmm 13 IRQ_TYPE_EDGE_FALLING>; + + touchscreen-size-x = <540>; + touchscreen-size-y = <960>; + + vcca-supply = <®_vdd_tsp_a>; + vdd-supply = <&pm8916_l6>; + + pinctrl-0 = <&tsp_int_default>; + pinctrl-names = "default"; + }; +}; + &blsp_uart2 { status = "okay"; };
@@ -200,4 +233,18 @@ sdc2_cd_default: sdc2-cd-default-state { drive-strength = <2>; bias-disable; }; + + tsp_en_default: tsp-en-default-state { + pins = "gpio73"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + tsp_int_default: tsp-int-default-state { + pins = "gpio13"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; };
arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi +3 -0
@@ -5,6 +5,9 @@ /* SM5504 MUIC instead of SM5502 */ /delete-node/ &muic; +/* Touchscreen varies depending on model variant */ +/delete-node/ &touchscreen; + &blsp_i2c1 { muic: extcon@14 { compatible = "siliconmitus,sm5504-muic";
Signature · 1 line
2.39.2
PATCH v3 2/2 arm64: dts: qcom: msm8916-samsung-fortuna: Add PWM backlight
In reply to Raymond HackleyFrom: Siddharth Manthan <[email protected]>
Most of the Galaxy Grand Prime use backlight drivers controlled with PWM signal.
To simplify the description, add the backlight with the necessary clk-pwm to the common dtsi.
--- .../qcom/msm8916-samsung-fortuna-common.dtsi | 36 +++++++++++++++++++ .../qcom/msm8916-samsung-rossa-common.dtsi | 9 +++++ 2 files changed, 45 insertions(+)
arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi +36 -0
@@ -26,6 +26,30 @@ tz-apps@85a00000 { }; }; + clk_pwm_backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&clk_pwm 0 100000>; + + enable-gpios = <&tlmm 98 GPIO_ACTIVE_HIGH>; + + brightness-levels = <0 255>; + num-interpolated-steps = <255>; + default-brightness-level = <128>; + + pinctrl-0 = <&backlight_en_default>; + pinctrl-names = "default"; + }; + + clk_pwm: pwm { + compatible = "clk-pwm"; + #pwm-cells = <2>; + + clocks = <&gcc GCC_GP2_CLK>; + + pinctrl-0 = <&backlight_pwm_default>; + pinctrl-names = "default"; + }; + gpio-keys { compatible = "gpio-keys";
@@ -199,6 +223,18 @@ &wcnss_mem { }; &tlmm { + backlight_en_default: backlight-en-default-state { + pins = "gpio98"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + backlight_pwm_default: backlight-pwm-default-state { + pins = "gpio50"; + function = "gcc_gp2_clk_a"; + }; + fg_alert_default: fg-alert-default-state { pins = "gpio121"; function = "gpio";
arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi +9 -0
@@ -17,3 +17,12 @@ muic: extcon@14 { pinctrl-names = "default"; }; }; + +/* On rossa backlight is controlled with MIPI DCS commands */ +&clk_pwm { + status = "disabled"; +}; + +&clk_pwm_backlight { + status = "disabled"; +};
Signature · 1 line
2.39.2
Quoted 10 lines · Raymond Hackley
Like msm8916-samsung-a3u-eur, the Grand Prime uses a Zinitix BT541 touchscreen. Add it together with the necessary fixed-regulator to the device tree.
Most of the Galaxy Grand Prime use backlight drivers controlled with PWM signal.
To simplify the description, add the backlight with the necessary clk-pwm to the common dtsi.[...]
Applied, thanks!
[1/2] arm64: dts: qcom: msm8916-samsung-fortuna: Add touchscreen
commit: f8dddefcb90eaa339c77b2cb3f5a87dec8b1e3b5
[2/2] arm64: dts: qcom: msm8916-samsung-fortuna: Add PWM backlight
commit: 05c65922bd58cc3fc057b37628b143f76e524496Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>