blob: 3e61c723cddd5fcb4d4c3c7985a1d523095f1ffa [file] [log] [blame]
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <dt-bindings/regulator/qcom,rpmh-regulator-levels.h>
&pm8150_l13 {
regulator-min-microvolt = <3304000>;
regulator-max-microvolt = <3304000>;
qcom,init-voltage = <3304000>;
qcom,init-mode = <RPMH_REGULATOR_MODE_HPM>;
regulator-always-on;
};
// Keep interrupt pin active at all times
&tlmm {
ts_mux {
ts_active_suspend: ts_active_suspend {
mux {
pins = "gpio9", "gpio5", "gpio35";
function = "gpio";
};
config {
pins = "gpio9", "gpio5", "gpio35";
drive-strength = <2>;
bias-disable;
};
};
ts_bus_active: ts_bus_active {
mux {
pins = "gpio42", "gpio43", "gpio44", "gpio45";
function = "qup00";
};
config {
pins = "gpio42", "gpio43", "gpio44", "gpio45";
drive-strength = <8>;
bias-disable;
};
};
//MOSI,MISO,SS pin: input pull down
ts_bus_sleep: ts_bus_sleep {
mux {
pins = "gpio43", "gpio44";
function = "gpio";
};
config {
pins = "gpio43", "gpio44";
drive-strength = <8>;
input-enable;
bias-pull-down;
};
};
ts_bus_sleep_miso: ts_bus_sleep_miso {
mux {
pins = "gpio42";
function = "gpio";
};
config {
pins = "gpio42";
drive-strength = <8>;
input-enable;
bias-disable;
};
};
//CS pin: input pull up
ts_bus_sleep_cs: ts_bus_sleep_cs {
mux {
pins = "gpio45";
function = "gpio";
};
config {
pins = "gpio45";
drive-strength = <8>;
input-enable;
bias-pull-up;
};
};
};
};
&qupv3_se0_i2c {
status = "disabled";
};
&qupv3_se0_spi {
status = "ok";
pinctrl-0 = <>;
pinctrl-1 = <>;
floral_spitouch: touchscreen@0 {
status = "ok";
compatible = "st,fts";
spi-max-frequency = <10000000>;
reg = <0>;
interrupt-parent = <&tlmm>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
// vdd-supply = <&pm8150_l14>; // 1v8
// avdd-supply = <&pm8150_l13>; // 3v3
pinctrl-names = "pmx_ts_active", "pmx_ts_suspend";
pinctrl-0 = <&ts_active_suspend &ts_bus_active>;
pinctrl-1 = <&ts_active_suspend &ts_bus_sleep &ts_bus_sleep_miso
&ts_bus_sleep_cs>;
st,irq-gpio = <&tlmm 9 0>;
st,reset-gpio = <&tlmm 8 0>;
// st,switch_gpio = <&tlmm 35 0>; // Low: AP, High: SLPI
st,max-coords = <1079 2339>;
st,panel_map = <&dsi_sofef01_sdc_1080p_cmd 0>;
st,force-pi-cfg-ver-map = <1024>; // 0x0400
st,touch_offload_id = [30 30 62 35]; /* '0 '0' 'b' '5' */
//st,disp-rate-gpio = <&tlmm 128 0>;
// st,regulator_dvdd = "vdd";
// st,regulator_avdd = "avdd";
/*
st,panel_map = <&dsi_s6e3hc2_dsc_wqhd_cmd 0>,
<&dsi_nt37280_dsc_fhd_cmd 1>,
<&dsi_nt37280_2a8t_dsc_fhd_cmd 1>,
<&dsi_nt37280_2b8t_dsc_fhd_cmd 1>,
<&dsi_nt37280_7t_dsc_fhd_cmd 1>;
// Override table format:
// panel number, extinfo index, mask, value, firmware index
st,extinfo_override_table = <1 1 0xF0 0x00 2>,
<1 1 0xF0 0x10 2>,
<1 1 0xFC 0x24 3>,
<1 1 0xFC 0x28 4>;
st,firmware_names = "ftm5_fw_c2.ftb",
"ftm5_fw_f2.ftb",
"ftm5_fw_f2_p2.ftb",
"ftm5_fw_f2_evt1.ftb",
"ftm5_fw_f2_evt2.ftb";
st,limits_names = "stm_fts_production_limits_c2.csv",
"stm_fts_production_limits_f2.csv",
"stm_fts_production_limits_f2_p2.csv",
"stm_fts_production_limits_f2_evt1.csv",
"stm_fts_production_limits_f2_evt2.csv";
st,sensor_inverted = <0>, <1>, <1>, <1>, <1>;
*/
tbn,lpi2ap_gpio = <&tlmm 5 0>;
tbn,ap2lpi_gpio = <&tlmm 35 0>;
};
};