Skip to content

Commit

Permalink
dts: qcom: vayu: Add touchscreen nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
gixousiyq committed Nov 8, 2024
1 parent 502caca commit 7f76912
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 2 deletions.
5 changes: 4 additions & 1 deletion arch/arm64/boot/dts/qcom/sm8150-xiaomi-vayu-huaxing.dts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@
compatible = "xiaomi,vayu", "qcom,sm8150";
};

&panel { compatible = "huaxing,nt36672c"; };
&panel { compatible = "huaxing,nt36672c"; };


&nt36672c { firmware-name = "j20s_novatek_ts_fw02.bin"; };
4 changes: 3 additions & 1 deletion arch/arm64/boot/dts/qcom/sm8150-xiaomi-vayu-tianma.dts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@
compatible = "xiaomi,vayu", "qcom,sm8150";
};

&panel { compatible = "tianma,nt36672c"; };
&panel { compatible = "tianma,nt36672c"; };

&nt36672c { firmware-name = "j20s_novatek_ts_fw01.bin"; };
83 changes: 83 additions & 0 deletions arch/arm64/boot/dts/qcom/sm8150-xiaomi-vayu.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,18 @@
status = "okay";
};

&gpi_dma0 {
status = "okay";
};

&gpi_dma1 {
status = "okay";
};

&gpi_dma2 {
status = "okay";
};

&gpu {
status = "okay";

Expand Down Expand Up @@ -557,6 +569,10 @@
status = "okay";
};

&qup_spi17_default {
pins = "gpio55", "gpio56", "gpio57";
};

&qupv3_id_0 {
status = "okay";
};
Expand Down Expand Up @@ -601,8 +617,75 @@
cd-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
};

&spi17 {
status = "okay";

nt36672c: touchscreen@0 {
compatible = "novatek,NVT-ts-spi";
reg = <0>;
status = "okay";

spi-max-frequency = <10000000>; // 10M

novatek,reset-gpio = <&tlmm 12 GPIO_ACTIVE_HIGH>;
novatek,irq-gpio = <&tlmm 122 IRQ_TYPE_NONE>;

pinctrl-names = "pmx_ts_active", "pmx_ts_suspend";
pinctrl-0 = <&ts_int_active &ts_reset_active &ts_cs_active>;
pinctrl-1 = <&ts_int_suspend &ts_reset_suspend &ts_cs_suspend>;

/* 672C */
novatek,swrst-n8-addr = <0x03F0FE>;
novatek,spi-rd-fast-addr = <0x03F310>;
};
};

&tlmm {
gpio-reserved-ranges = <0 4>, <126 4>;

ts_int_active: ts_int_active {
pins = "gpio122";
function = "gpio";
drive-strength = <16>;
bias-pull-down;
};

ts_reset_active: ts_reset_active {
pins = "gpio12";
function = "gpio";
drive-strength = <16>;
bias-pull-up;
};

ts_cs_active: ts_cs_active {
pins = "gpio58";
function = "qup17";
drive-strength = <6>;
bias-disable;
};

ts_cs_suspend: ts_cs_suspend {
pins = "gpio58";
function = "gpio";
drive-strength = <6>;
bias-pull-down;
output-low;
};

ts_int_suspend: ts_int_suspend {
pins = "gpio122";
function = "gpio";
drive-strength = <16>;
bias-disable;
input-enable;
};

ts_reset_suspend: ts_reset_suspend {
pins = "gpio12";
function = "gpio";
drive-strength = <16>;
bias-disable;
};

sdc2_on: sdc2-on-state {
clk-pins {
Expand Down

0 comments on commit 7f76912

Please sign in to comment.