Skip to content

Commit

Permalink
arm64: dts: qcom: msm8916-lenovo-phab: add display & touchscreen
Browse files Browse the repository at this point in the history
Add jdi_1080p display panel with pwm and backlight
and FT5336 touchscreen with according pinctrls

Signed-off-by: Oleksandr Knyshuk <kigen745@gmail.com>
  • Loading branch information
k1gen committed Feb 23, 2023
1 parent ba15ad2 commit 8bf794d
Showing 1 changed file with 107 additions and 0 deletions.
107 changes: 107 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-lenovo-phab.dts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
};
};

backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pm8916_pwm 0 100000>;
brightness-levels = <0 255>;
num-interpolated-steps = <255>;
default-brightness-level = <128>;
};

battery: battery {
compatible = "simple-battery";
voltage-min-design-microvolt = <3200000>;
Expand Down Expand Up @@ -123,23 +131,82 @@
};
};

&blsp_i2c5 {
status = "okay";

touchscreen@38 {
/* actually FT5336 */
compatible = "edt,edt-ft5306";
reg = <0x38>;
interrupt-parent = <&msmgpio>;
interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
pinctrl-0 = <&touchscreen_default>;
pinctrl-names = "default";
vcc-supply = <&pm8916_l17>;
iovcc-supply = <&pm8916_l6>;
reset-gpios = <&msmgpio 12 GPIO_ACTIVE_LOW>;
touchscreen-size-x = <720>;
touchscreen-size-y = <1280>;
};
};

&blsp1_uart2 {
status = "okay";
};

&dsi0 {
pinctrl-0 = <&mdss_default>;
pinctrl-1 = <&mdss_sleep>;
pinctrl-names = "default", "sleep";

panel@0 {
compatible = "lenovo,phab-jdi_1080p";
reg = <0>;
backlight = <&backlight>;
reset-gpios = <&msmgpio 25 GPIO_ACTIVE_LOW>;

port {
panel_in: endpoint {
remote-endpoint = <&dsi0_out>;
};
};
};
};

&dsi0_out {
data-lanes = <0 1 2 3>;
qcom,platform-enable-gpio = <&msmgpio 109 GPIO_ACTIVE_HIGH>;
qcom,platform-reset-gpio = <&msmgpio 25 GPIO_ACTIVE_HIGH>;
remote-endpoint = <&panel_in>;
};

&dsi_phy0 {
qcom,dsi-phy-regulator-ldo-mode;
};

&lpass {
dai@3 {
reg = <MI2S_QUATERNARY>;
qcom,playback-sd-lines = <1>;
};
};

&mdss {
status = "okay";
};

&pm8916_bms {
monitored-battery = <&battery>;
//power-supplies = <&charger>;
status = "okay";
};

&pm8916_pwm {
pinctrl-0 = <&pwm_out>;
pinctrl-names = "default";
status = "okay";
};

&pm8916_resin {
linux,code = <KEY_VOLUMEDOWN>;
status = "okay";
Expand Down Expand Up @@ -345,6 +412,36 @@
bias-pull-up;
};

touchscreen_default: touchscreen-default-state {
reset-pins {
pins = "gpio12";
function = "gpio";
drive-strength = <2>;
bias-disable;
};

touchscreen-pins {
pins = "gpio13";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
};

mdss_default: mdss-default-state {
pins = "gpio25";
function = "gpio";
drive-strength = <8>;
bias-disable;
};

mdss_sleep: mdss-sleep-state {
pins = "gpio25";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
};

mpu_default: mpu-default-state {
pins = "gpio115";
function = "gpio";
Expand All @@ -358,3 +455,13 @@
drive-strength = <2>;
};
};

&pm8916_mpps {
pwm_out: mpp4-state {
pins = "mpp4";
function = "digital";
output-low;
qcom,dtest = <1>;
power-source = <PM8916_MPP_VPH>;
};
};

0 comments on commit 8bf794d

Please sign in to comment.