unplugged-kernel/arch/arm/boot/dts/k39tv1_bsp_1g_k419.dts

578 lines
12 KiB
Plaintext

// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2019 MediaTek Inc.
*
*/
#include <generated/autoconf.h>
/dts-v1/;
/plugin/;
#include <dt-bindings/mmc/mt6739-msdc.h>
#include <dt-bindings/pinctrl/mt6739-pinfunc.h>
/* chosen */
&chosen {
/* fpga may has no lk, we need to specify display info here */
/* fb buffer is reserved using this dts by memory node above */
atag,videolfb-fb_base_l = <0x5e605000>;
atag,videolfb-fb_base_h = <0>;
atag,videolfb-islcmfound = <1>;
atag,videolfb-islcm_inited = <0>;
atag,videolfb-fps= <6000>;
atag,videolfb-vramSize= <0x017bb000>;
atag,videolfb-lcmname= "nt35521_hd_dsi_vdo_truly_nt50358_drv";
};
&odm {
led0:led@0 {
compatible = "mediatek,red";
led_mode = <0>;
data = <1>;
pwm_config = <0 0 0 0 0>;
};
led1:led@1 {
compatible = "mediatek,green";
led_mode = <0>;
data = <1>;
pwm_config = <0 0 0 0 0>;
};
led2:led@2 {
compatible = "mediatek,blue";
led_mode = <0>;
data = <1>;
pwm_config = <0 0 0 0 0>;
};
led3:led@3 {
compatible = "mediatek,jogball-backlight";
led_mode = <0>;
data = <1>;
pwm_config = <0 0 0 0 0>;
};
led4:led@4 {
compatible = "mediatek,keyboard-backlight";
led_mode = <0>;
data = <1>;
pwm_config = <0 0 0 0 0>;
};
led5:led@5 {
compatible = "mediatek,button-backlight";
led_mode = <0>;
data = <1>;
pwm_config = <0 0 0 0 0>;
};
led6:led@6 {
compatible = "mediatek,lcd-backlight";
led_mode = <5>;
data = <1>;
pwm_config = <0 2 0 0 0>;
};
vibrator0:vibrator@0 {
compatible = "mediatek,vibrator";
vib_timer = <25>;
vib_limit = <9>;
vib_vol= <9>;
};
};
&i2c1 {
/* start sensor */
gsensor@4c {
i2c_num = <1>;
direction = <6>;
power_id = <0xffff>;
power_vol = <0>;
firlen = <16>;
is_batch_supported = <1>;
};
msensor@0c {
i2c_num = <1>;
i2c_addr = <0x0d 0 0 0>;
direction = <8>;
power_id = <0xffff>;
power_vol = <0>;
is_batch_supported = <0>;
};
gyro@68 {
pinctrl-names = "pin_default", "pin_cfg";
pinctrl-0 = <&gyro_intpin_default>;
pinctrl-1 = <&gyro_intpin_cfg>;
i2c_num = <1>;
i2c_addr = <0x68 0 0 0>;
direction = <5>;
power_id = <0xffff>;
power_vol = <0>;
firlen = <0>;
is_batch_supported = <0>;
};
alsps@51 {
pinctrl-names = "pin_default", "pin_cfg";
pinctrl-0 = <&alsps_intpin_default>;
pinctrl-1 = <&alsps_intpin_cfg>;
status = "okay";
/* customization */
i2c_num = <1>;
i2c_addr = <0x51 0 0 0>;
polling_mode_ps = <0>;
polling_mode_als = <1>;
power_id = <0xffff>;
power_vol = <0>;
als_level = <0 328 861 1377 3125 7721 7767 12621 23062 28430
33274 47116 57694 57694 65535>;
als_value = <0 133 304 502 1004 2005 3058 5005 8008 10010
12000 16000 20000 20000 20000 20000>;
ps_threshold_high = <26>;
ps_threshold_low = <21>;
is_batch_supported_ps = <0>;
is_batch_supported_als = <0>;
};
barometer@77 {
i2c_num = <1>;
i2c_addr = <0x77 0 0 0>;
direction = <0>;
power_id = <0xffff>;
power_vol = <0>;
firlen = <32>;
is_batch_supported = <0>;
};
/* end sensor */
};
/* sensor gpio standization */
&pio {
gyro_intpin_cfg: gyropincfg {
pins_cmd_dat {
pinmux = <PINMUX_GPIO5__FUNC_GPIO5>;
slew-rate = <0>;
bias-pull-down = <00>;
};
};
gyro_intpin_default: gyrodefaultcfg {
};
};
&pio {
alsps_intpin_cfg: alspspincfg {
pins_cmd_dat {
pinmux = <PINMUX_GPIO1__FUNC_GPIO1>;
slew-rate = <0>;
bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
};
};
alsps_intpin_default: alspsdefaultcfg {
};
};
/* sensor end */
/* DISPSYS GPIO standardization */
&pio {
mtkfb_pins_mode_te_gpio: mode_te_gpio {
pins_cmd_dat {
pinmux = <PINMUX_GPIO84__FUNC_DSI_TE>;
};
};
mtkfb_pins_mode_te_te: mode_te_te {
pins_cmd_dat {
pinmux = <PINMUX_GPIO84__FUNC_DSI_TE>;
};
};
mtkfb_pins_lcm_reset0: lcm_rst_out0_gpio {
pins_cmd_dat {
pinmux = <PINMUX_GPIO83__FUNC_LCM_RST>;
slew-rate = <1>;
output-low;
};
};
mtkfb_pins_lcm_reset1: lcm_rst_out1_gpio {
pins_cmd_dat {
pinmux = <PINMUX_GPIO83__FUNC_LCM_RST>;
slew-rate = <1>;
output-high;
};
};
mtkfb_pins_lcd_bias_enp0: lcd_bias_enp0_gpio {
pins_cmd_dat {
pinmux = <PINMUX_GPIO122__FUNC_GPIO122>;
slew-rate = <1>;
output-low;
};
};
mtkfb_pins_lcd_bias_enp1: lcd_bias_enp1_gpio {
pins_cmd_dat {
pinmux = <PINMUX_GPIO122__FUNC_GPIO122>;
slew-rate = <1>;
output-high;
};
};
};
&mtkfb {
pinctrl-names = "mode_te_gpio", "mode_te_te", "lcm_rst_out0_gpio",
"lcm_rst_out1_gpio", "lcd_bias_enp0_gpio", "lcd_bias_enp1_gpio";
pinctrl-0 = <&mtkfb_pins_mode_te_gpio>;
pinctrl-1 = <&mtkfb_pins_mode_te_te>;
pinctrl-2 = <&mtkfb_pins_lcm_reset0>;
pinctrl-3 = <&mtkfb_pins_lcm_reset1>;
pinctrl-4 = <&mtkfb_pins_lcd_bias_enp0>;
pinctrl-5 = <&mtkfb_pins_lcd_bias_enp1>;
status = "okay";
};
/* DISPSYS GPIO standardization end */
/* accdet start */
&accdet {
/* accdet micbias voltage: 0x07,2.7v;0x05,2.5v;0x02,1.9v */
accdet-mic-vol = <6>;
headset-mode-setting = <0x500 0x500 1 0x1f0 0x800 0x800 0x20 0x44>;
accdet-plugout-debounce = <1>;
/*1:ACC mode, 2:low cost without in bias, 6:low cost with in bias*/
accdet-mic-mode = <2>;
/* eint_level_trigger: 8,LEVEL_LOW(default);4,LEVEL_HIGH;others,LEVEL_LOW */
headset-eint-level-pol = <8>;
/*0--MD_MAX--UP_MAX--DW_MAX*/
headset-three-key-threshold = <0 80 220 400>;
headset-three-key-threshold-CDD = <0 121 192 600>;
/*0--MD_MAX--VOICE_MAX--UP_MAX--DW_MAX*/
headset-four-key-threshold = <0 58 121 192 400>;
status = "okay";
};
/* accdet end */
/* keypad start */
&keypad {
pinctrl-names = "default";
pinctrl-0 = <&kpd_pins_default>;
};
&pio {
kpd_pins_default: kpdgpiodefault {
pins_cmd_dat {
pinmux = <PINMUX_GPIO120__FUNC_KP0COL>;
bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
input-enable;
input-schmitt-enable;
};
};
};
/* keypad end */
/* CONSYS GPIO standardization */
&pio {
consys_pins_default: consys_default {
};
gpslna_pins_init: gpslna@0 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO118__FUNC_GPIO118>;
slew-rate = <0>;
bias-disable;
output-low;
};
};
gpslna_pins_oh: gpslna@1 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO118__FUNC_GPIO118>;
slew-rate = <1>;
output-high;
};
};
gpslna_pins_ol: gpslna@2 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO118__FUNC_GPIO118>;
slew-rate = <1>;
output-low;
};
};
};
&consys {
pinctrl-names = "default", "gps_lna_state_init",
"gps_lna_state_oh", "gps_lna_state_ol";
pinctrl-0 = <&consys_pins_default>;
pinctrl-1 = <&gpslna_pins_init>;
pinctrl-2 = <&gpslna_pins_oh>;
pinctrl-3 = <&gpslna_pins_ol>;
status = "okay";
};
&i2c2 {
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <400000>;
mtk-usb@60 {
compatible = "mediatek,mtk-usb";
reg = <0x60>;
status = "okay";
};
};
/* IRTX GPIO Start */
&irtx_pwm {
pinctrl-names = "irtx_gpio_led_default", "irtx_gpio_led_set";
pinctrl-0 = <&irtx_gpio_led_default>;
pinctrl-1 = <&irtx_gpio_led_set>;
status = "okay";
};
&pio {
/* IRTX GPIO Settings -Start */
/* default: GPIO0, output, high */
irtx_gpio_led_default:irtx_gpio_led_def@gpio12 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO12__FUNC_GPIO12>;
slew-rate = <1>;
bias-disable;
output-low;
input-schmitt-enable = <0>;
};
};
irtx_gpio_led_set:irtx_gpio_led_set@gpio12 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO12__FUNC_PWM1>;
slew-rate = <1>;
output-high;
};
};
}; /* IRTX GPIO Settings -End */
/* UART GPIO */
&apuart0 {
pinctrl-names = "uart0_gpio_default",
"uart0_rx_set",
"uart0_rx_clear",
"uart0_tx_set",
"uart0_tx_clear";
pinctrl-0 = <&uart0_gpio_def_cfg>;
pinctrl-1 = <&uart0_rx_set_cfg>;
pinctrl-2 = <&uart0_rx_clr_cfg>;
pinctrl-3 = <&uart0_tx_set_cfg>;
pinctrl-4 = <&uart0_tx_clr_cfg>;
status = "okay";
};
&apuart1 {
pinctrl-names = "uart1_gpio_default";
pinctrl-0 = <&uart1_gpio_def_cfg>;
status = "okay";
};
&pio {
/* UART GPIO Settings - Start */
/* UART0: rx set, rx clear, tx clear, tx clear*/
uart0_gpio_def_cfg:uart0gpiodefault {
};
uart0_rx_set_cfg:uart0_rx_set@gpio20 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO20__FUNC_UART0RX>;
};
};
uart0_rx_clr_cfg:uart0_rx_clear@gpio20 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO20__FUNC_GPIO20>;
slew-rate = <1>;
output-high;
};
};
uart0_tx_set_cfg:uart0_tx_set@gpio21 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO21__FUNC_UART0TX>;
};
};
uart0_tx_clr_cfg:uart0_tx_clear@gpio21 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO21__FUNC_GPIO21>;
slew-rate = <1>;
output-high;
};
};
/* UART1: rx set, rx clear, tx clear, tx clear*/
uart1_gpio_def_cfg:uart1gpiodefault {
};
};/* UART GPIO end */
/* TOUCH start */
&touch {
tpd-resolution = <720 1280>;
use-tpd-button = <0>;
tpd-key-num = <3>;
tpd-key-local= <139 172 158 0>;
tpd-key-dim-local = <90 883 100 40 230 883
100 40 370 883 100 40 0 0 0 0>;
tpd-max-touch-num = <5>;
tpd-filter-enable = <1>;
tpd-filter-pixel-density = <106>;
tpd-filter-custom-prameters = <0 0 0 0 0 0 0 0 0 0 0 0>;
tpd-filter-custom-speed = <0 0 0>;
pinctrl-names = "default", "state_eint_as_int",
"state_eint_output0", "state_eint_output1",
"state_rst_output0", "state_rst_output1";
pinctrl-0 = <&ctp_pins_default>;
pinctrl-1 = <&ctp_pins_eint_as_int>;
pinctrl-2 = <&ctp_pins_eint_output0>;
pinctrl-3 = <&ctp_pins_eint_output1>;
pinctrl-4 = <&ctp_pins_rst_output0>;
pinctrl-5 = <&ctp_pins_rst_output1>;
status = "okay";
};
&pio {
ctp_pins_default: eint0default {
};
ctp_pins_eint_as_int: eint1touch@0 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO6__FUNC_GPIO6>;
slew-rate = <0>;
bias-disable;
};
};
ctp_pins_eint_output0: eintoutput0 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO6__FUNC_GPIO6>;
slew-rate = <1>;
output-low;
};
};
ctp_pins_eint_output1: eintoutput1 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO6__FUNC_GPIO6>;
slew-rate = <1>;
output-high;
};
};
ctp_pins_rst_output0: rstoutput0 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO119__FUNC_GPIO119>;
slew-rate = <1>;
output-low;
};
};
ctp_pins_rst_output1: rstoutput1 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO119__FUNC_GPIO119>;
slew-rate = <1>;
output-high;
};
};
};
/* TOUCH end */
/* NFC start */
&nfc {
compatible = "mediatek,nfc-gpio-v2";
gpio-rst = <7>;
gpio-rst-std = <&pio 7 0x0>;
gpio-irq = <14>;
gpio-irq-std = <&pio 14 0x0>;
};
&irq_nfc {
compatible = "mediatek,irq_nfc-eint";
};
/* NFC end */
/* AUDIO GPIO standardization */
&audgpio {
pinctrl-names = "aud_dat_mosi_off",
"aud_dat_mosi_on",
"aud_dat_miso_off",
"aud_dat_miso_on",
"extamp-pullhigh",
"extamp-pulllow";
pinctrl-0 = <&aud_dat_mosi_off>;
pinctrl-1 = <&aud_dat_mosi_on>;
pinctrl-2 = <&aud_dat_miso_off>;
pinctrl-3 = <&aud_dat_miso_on>;
pinctrl-4 = <&aud_pins_extamp_high>;
pinctrl-5 = <&aud_pins_extamp_low>;
status = "okay";
};
&pio {
aud_dat_mosi_off: aud_dat_mosi_off {
pins_cmd1_dat {
pinmux = <PINMUX_GPIO63__FUNC_GPIO63>;
input-enable;
slew-rate = <0>;
bias-disable;
};
pins_cmd2_dat {
pinmux = <PINMUX_GPIO64__FUNC_GPIO64>;
input-enable;
slew-rate = <0>;
bias-disable;
};
};
aud_dat_mosi_on: aud_dat_mosi_on {
pins_cmd1_dat {
pinmux = <PINMUX_GPIO63__FUNC_AUD_DAT_MOSI0>;
};
pins_cmd2_dat {
pinmux = <PINMUX_GPIO64__FUNC_AUD_DAT_MOSI1>;
};
};
aud_dat_miso_off: aud_dat_miso_off {
pins_cmd1_dat {
pinmux = <PINMUX_GPIO67__FUNC_GPIO67>;
input-enable;
slew-rate = <0>;
bias-disable;
};
pins_cmd2_dat {
pinmux = <PINMUX_GPIO68__FUNC_GPIO68>;
input-enable;
slew-rate = <0>;
bias-disable;
};
};
aud_dat_miso_on: aud_dat_miso_on {
pins_cmd1_dat {
pinmux = <PINMUX_GPIO67__FUNC_AUD_DAT_MISO0>;
};
pins_cmd2_dat {
pinmux = <PINMUX_GPIO68__FUNC_AUD_DAT_MISO1>;
};
};
aud_pins_extamp_high: audexamphigh {
pins_cmd_dat {
pinmux = <PINMUX_GPIO24__FUNC_GPIO24>;
slew-rate = <1>;
output-high;
};
};
aud_pins_extamp_low: audexamplow {
pins_cmd_dat {
pinmux = <PINMUX_GPIO24__FUNC_GPIO24>;
slew-rate = <1>;
output-low;
};
};
};
/* AUDIO end */
#include <k39tv1_bsp_1g_k419/cust.dtsi>
#include "cust_mt6739_camera.dtsi"
/*End of this file, DO NOT ADD ANYTHING HERE*/