554 lines
11 KiB
Plaintext
554 lines
11 KiB
Plaintext
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (c) 2019 MediaTek Inc.
|
|
*/
|
|
/dts-v1/;
|
|
/plugin/;
|
|
#include <dt-bindings/interrupt-controller/irq.h>
|
|
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
|
#include <dt-bindings/pinctrl/mt6853-pinfunc.h>
|
|
|
|
&reserved_memory {
|
|
};
|
|
|
|
/* chosen */
|
|
&chosen {
|
|
|
|
atag,videolfb-fb_base_l = <0x7e605000>;
|
|
atag,videolfb-fb_base_h = <0x0>;
|
|
atag,videolfb-islcmfound = <1>;
|
|
atag,videolfb-islcm_inited = <0>;
|
|
atag,videolfb-fps= <6000>;
|
|
atag,videolfb-vramSize= <0x1be0000>;
|
|
atag,videolfb-lcmname=
|
|
"nt35595_fhd_dsi_cmd_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 1 0 0 0>;
|
|
};
|
|
vibrator0:vibrator@0 {
|
|
compatible = "mediatek,vibrator";
|
|
vib_timer = <25>;
|
|
vib_limit = <9>;
|
|
vib_vol= <9>;
|
|
};
|
|
usb_c_pinctrl:usb_c_pinctrl {
|
|
compatible = "mediatek,usb_c_pinctrl";
|
|
};
|
|
};
|
|
|
|
&mt6360_pmu {
|
|
mt6360,intr_gpio_num = <10>; /* direct defined GPIO num */
|
|
mt6360,intr_gpio = <&pio 10 0x0>;
|
|
};
|
|
|
|
&mt6360_pmic {
|
|
pwr_off_seq = [04 00 00 02];
|
|
};
|
|
|
|
&mt6360_typec {
|
|
mt6360pd,intr_gpio_num = <9>; /* direct defined GPIO num */
|
|
mt6360pd,intr_gpio = <&pio 9 0x0>;
|
|
mt6360pd,pcb_gpio = <&pio 57 0x0>;
|
|
mt6360pd,pcb_gpio_num = <57>;
|
|
};
|
|
|
|
/* USB SWITCH GPIO start */
|
|
&pio {
|
|
usb_default: usb_default {
|
|
};
|
|
|
|
gpio_redriver_c1_init: c1_init {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO41__FUNC_GPIO41>;
|
|
slew-rate = <1>;
|
|
output-low;
|
|
};
|
|
};
|
|
|
|
gpio_redriver_c1_low: c1_low {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO41__FUNC_GPIO41>;
|
|
slew-rate = <1>;
|
|
output-low;
|
|
};
|
|
};
|
|
|
|
gpio_redriver_c1_hiz: c1_highz {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO41__FUNC_GPIO41>;
|
|
slew-rate= <0>;
|
|
bias-disable;
|
|
};
|
|
};
|
|
|
|
gpio_redriver_c1_high: c1_high {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO41__FUNC_GPIO41>;
|
|
slew-rate = <1>;
|
|
output-high;
|
|
};
|
|
};
|
|
|
|
gpio_redriver_c2_init: c2_init {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO40__FUNC_GPIO40>;
|
|
slew-rate = <1>;
|
|
output-low;
|
|
};
|
|
};
|
|
|
|
gpio_redriver_c2_low: c2_low {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO40__FUNC_GPIO40>;
|
|
slew-rate = <1>;
|
|
output-low;
|
|
};
|
|
};
|
|
|
|
gpio_redriver_c2_hiz: c2_highz {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO40__FUNC_GPIO40>;
|
|
slew-rate= <0>;
|
|
bias-disable;
|
|
};
|
|
};
|
|
|
|
gpio_redriver_c2_high: c2_high {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO40__FUNC_GPIO40>;
|
|
slew-rate = <1>;
|
|
output-high;
|
|
};
|
|
};
|
|
|
|
gpio_u3_switch_sel1: u3_sw_sel1 {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO11__FUNC_GPIO11>;
|
|
slew-rate = <1>;
|
|
output-low;
|
|
};
|
|
};
|
|
|
|
gpio_u3_switch_sel2: u3_sw_sel2 {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO11__FUNC_GPIO11>;
|
|
slew-rate = <1>;
|
|
output-high;
|
|
};
|
|
};
|
|
|
|
gpio_u3_switch_enable: u3_sw_en {
|
|
};
|
|
|
|
gpio_u3_switch_disable: u3_sw_dis {
|
|
};
|
|
};
|
|
|
|
&usb_c_pinctrl {
|
|
pinctrl-names = "usb_default",
|
|
"redrv_c1_init",
|
|
"redrv_c1_low",
|
|
"redrv_c1_hiz",
|
|
"redrv_c1_high",
|
|
"redrv_c2_init",
|
|
"redrv_c2_low",
|
|
"redrv_c2_hiz",
|
|
"redrv_c2_high",
|
|
"switch_sel1",
|
|
"switch_sel2",
|
|
"switch_enable",
|
|
"switch_disable";
|
|
|
|
pinctrl-0 = <&usb_default>;
|
|
pinctrl-1 = <&gpio_redriver_c1_init>;
|
|
pinctrl-2 = <&gpio_redriver_c1_low>;
|
|
pinctrl-3 = <&gpio_redriver_c1_hiz>;
|
|
pinctrl-4 = <&gpio_redriver_c1_high>;
|
|
pinctrl-5 = <&gpio_redriver_c2_init>;
|
|
pinctrl-6 = <&gpio_redriver_c2_low>;
|
|
pinctrl-7 = <&gpio_redriver_c2_hiz>;
|
|
pinctrl-8 = <&gpio_redriver_c2_high>;
|
|
pinctrl-9 = <&gpio_u3_switch_sel1>;
|
|
pinctrl-10 = <&gpio_u3_switch_sel2>;
|
|
pinctrl-11 = <&gpio_u3_switch_enable>;
|
|
pinctrl-12 = <&gpio_u3_switch_disable>;
|
|
status = "okay";
|
|
|
|
usb_switch-data {
|
|
en_pin_num = <0>;
|
|
en_pin_val = <0>;
|
|
sel_pin_num = <11>;
|
|
sel_pin_val = <1>;
|
|
c1_pin_num = <41>;
|
|
c1_pin_val = <2>;
|
|
c2_pin_num = <40>;
|
|
c2_pin_val = <1>;
|
|
};
|
|
};
|
|
/* USB SWITCH GPIO end */
|
|
|
|
|
|
/* CONSYS GPIO standardization */
|
|
&pio {
|
|
consys_pins_default: consys_default {
|
|
};
|
|
gpslna_pins_init: gpslna@0 {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO87__FUNC_GPIO87>;
|
|
output-low;
|
|
};
|
|
};
|
|
gpslna_pins_oh: gpslna@1 {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO87__FUNC_GPS_L1_ELNA_EN>;
|
|
};
|
|
};
|
|
gpslna_pins_ol: gpslna@2 {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO87__FUNC_GPIO87>;
|
|
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";
|
|
};
|
|
/* CONSYS end */
|
|
|
|
#include "mediatek/cust_mt6853_touch_1080x1920.dtsi"
|
|
#include "mediatek/cust_mt6853_camera.dtsi"
|
|
#include <k6853v1_64_6360_k419/cust.dtsi>
|
|
/* DISPSYS GPIO standardization */
|
|
|
|
#ifndef CONFIG_FPGA_EARLY_PORTING
|
|
&pio {
|
|
mtkfb_pins_lcd_bias_enp1: lcd_bias_enp1_gpio {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO137__FUNC_GPIO137>;
|
|
slew-rate = <1>;
|
|
output-high;
|
|
};
|
|
};
|
|
|
|
mtkfb_pins_lcd_bias_enp0: lcd_bias_enp0_gpio {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO137__FUNC_GPIO137>;
|
|
slew-rate = <1>;
|
|
output-low;
|
|
};
|
|
};
|
|
|
|
mtkfb_pins_lcd_bias_enn1: lcd_bias_enn1_gpio {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO138__FUNC_GPIO138>;
|
|
slew-rate = <1>;
|
|
output-high;
|
|
};
|
|
};
|
|
|
|
mtkfb_pins_lcd_bias_enn0: lcd_bias_enn0_gpio {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO138__FUNC_GPIO138>;
|
|
slew-rate = <1>;
|
|
output-low;
|
|
};
|
|
};
|
|
|
|
mtkfb_pins_lcm_rst_out1_gpio: lcm_rst_out1_gpio {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO86__FUNC_GPIO86>;
|
|
slew-rate = <1>;
|
|
output-high;
|
|
};
|
|
};
|
|
|
|
mtkfb_pins_lcm_rst_out0_gpio: lcm_rst_out0_gpio {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO86__FUNC_GPIO86>;
|
|
slew-rate = <1>;
|
|
output-low;
|
|
};
|
|
};
|
|
mtkfb_pins_lcm_dsi_te: lcm_dsi_te {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO84__FUNC_DSI_TE>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&camera_af_hw_node {
|
|
vcamaf-supply = <&mt_pmic_vcamio_ldo_reg>;
|
|
status = "okay";
|
|
};
|
|
|
|
&mtkfb {
|
|
pinctrl-names = "lcd_bias_enp1_gpio", "lcd_bias_enp0_gpio",
|
|
"lcd_bias_enn1_gpio", "lcd_bias_enn0_gpio",
|
|
"lcm_rst_out1_gpio", "lcm_rst_out0_gpio",
|
|
"mode_te_te";
|
|
pinctrl-0 = <&mtkfb_pins_lcd_bias_enp1>;
|
|
pinctrl-1 = <&mtkfb_pins_lcd_bias_enp0>;
|
|
pinctrl-2 = <&mtkfb_pins_lcd_bias_enn1>;
|
|
pinctrl-3 = <&mtkfb_pins_lcd_bias_enn0>;
|
|
pinctrl-4 = <&mtkfb_pins_lcm_rst_out1_gpio>;
|
|
pinctrl-5 = <&mtkfb_pins_lcm_rst_out0_gpio>;
|
|
pinctrl-6 = <&mtkfb_pins_lcm_dsi_te>;
|
|
status = "okay";
|
|
};
|
|
&dispsys_config {
|
|
pinctrl-names =
|
|
"lcm_rst_out1_gpio", "lcm_rst_out0_gpio",
|
|
"mode_te_te";
|
|
pinctrl-0 = <&mtkfb_pins_lcm_rst_out1_gpio>;
|
|
pinctrl-1 = <&mtkfb_pins_lcm_rst_out0_gpio>;
|
|
pinctrl-2 = <&mtkfb_pins_lcm_dsi_te>;
|
|
status = "okay";
|
|
};
|
|
&dsi0 {
|
|
status = "okay";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
panel1@0 {
|
|
compatible = "nt35695b,auo,vdo";
|
|
reg = <0>;
|
|
pm-enable-gpios = <&pio 41 0>;
|
|
reset-gpios = <&pio 86 0>;
|
|
bias-gpios = <&pio 137 0>,
|
|
<&pio 138 0>;
|
|
pinctrl-names = "default";
|
|
port {
|
|
panel_in1: endpoint {
|
|
remote-endpoint = <&dsi_out>;
|
|
};
|
|
};
|
|
};
|
|
panel2@0 {
|
|
compatible = "nt36672a,rt4801,vdo";
|
|
reg = <1>;
|
|
pm-enable-gpios = <&pio 41 0>;
|
|
reset-gpios = <&pio 86 0>;
|
|
bias-gpios = <&pio 137 0>,
|
|
<&pio 138 0>;
|
|
pinctrl-names = "default";
|
|
port {
|
|
panel_in2: endpoint {
|
|
remote-endpoint = <&dsi_out>;
|
|
};
|
|
};
|
|
};
|
|
panel3@0 {
|
|
compatible = "truly,td4330,vdo";
|
|
reg = <2>;
|
|
pm-enable-gpios = <&pio 41 0>;
|
|
reset-gpios = <&pio 86 0>;
|
|
bias-gpios = <&pio 137 0>,
|
|
<&pio 138 0>;
|
|
pinctrl-names = "default";
|
|
port {
|
|
panel_in3: endpoint {
|
|
remote-endpoint = <&dsi_out>;
|
|
};
|
|
};
|
|
};
|
|
ports {
|
|
port {
|
|
dsi_out: endpoint {
|
|
remote-endpoint = <&panel_in1>;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
/* accdet start */
|
|
&accdet {
|
|
/* accdet micbias voltage: 0x09:2.85v 0x08:2.8v 0x07,
|
|
* 2.7v;0x05,2.5v;0x02,1.9v
|
|
*/
|
|
accdet-mic-vol = <8>;
|
|
/* accdet pwm_width, pwm_thresh, fall_delay, rise_delay
|
|
* debounce0, debounce1, debounce3, debounce4
|
|
* eint pwm_width, eint pwm_thresh
|
|
* eint deb(debounce0, debounce1, debounce2, debounce3), inv_debounce
|
|
*/
|
|
headset-mode-setting = <0x500 0x500 1 0x1f0
|
|
0x800 0x800 0x20 0x44
|
|
0x4 0x1
|
|
0x5 0x3 0x3 0x5 0xe>;
|
|
accdet-plugout-debounce = <1>;
|
|
/*1:ACC mode, 2:low cost without in bias, 6:low cost with in bias*/
|
|
accdet-mic-mode = <2>;
|
|
/*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>;
|
|
|
|
/* select VTH to 2v and 500k, use internal resitance */
|
|
eint_use_ext_res = <0>;
|
|
status = "okay";
|
|
};
|
|
/* accdet end */
|
|
|
|
/* 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@gpio57 {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO57__FUNC_GPIO57>;
|
|
slew-rate = <1>;
|
|
bias-disable;
|
|
output-low;
|
|
input-schmitt-enable = <0>;
|
|
};
|
|
};
|
|
|
|
irtx_gpio_led_set:irtx_gpio_led_set@gpio57 {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO57__FUNC_PWM_3>;
|
|
slew-rate = <1>;
|
|
output-high;
|
|
};
|
|
};
|
|
}; /* IRTX GPIO Settings -End */
|
|
|
|
#endif
|
|
|
|
/* usb typec mux */
|
|
&pio {
|
|
c1_active: c1_high {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO41__FUNC_GPIO41>;
|
|
output-high;
|
|
};
|
|
};
|
|
|
|
c2_active: c2_highz {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO40__FUNC_GPIO40>;
|
|
input-enable;
|
|
bias-disable;
|
|
};
|
|
};
|
|
|
|
c1_sleep: c1_low {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO41__FUNC_GPIO41>;
|
|
output-low;
|
|
};
|
|
};
|
|
|
|
c2_sleep: c2_low {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO40__FUNC_GPIO40>;
|
|
output-low;
|
|
};
|
|
};
|
|
|
|
sel_up: sel_high {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO11__FUNC_GPIO11>;
|
|
output-high;
|
|
};
|
|
};
|
|
|
|
sel_down: sel_low {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO11__FUNC_GPIO11>;
|
|
output-low;
|
|
};
|
|
};
|
|
|
|
sw_enable: sw_enable {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO132__FUNC_GPIO132>;
|
|
output-low;
|
|
};
|
|
};
|
|
|
|
sw_disable: sw_disable {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO132__FUNC_GPIO132>;
|
|
output-low;
|
|
};
|
|
};
|
|
};
|
|
|
|
&ptn36241g {
|
|
pinctrl-names = "c1_active", "c1_sleep",
|
|
"c2_active", "c2_sleep";
|
|
pinctrl-0 = <&c1_active>;
|
|
pinctrl-1 = <&c1_sleep>;
|
|
pinctrl-2 = <&c2_active>;
|
|
pinctrl-3 = <&c2_sleep>;
|
|
status = "okay";
|
|
};
|
|
|
|
&fusb304 {
|
|
pinctrl-names = "sel_up", "sel_down",
|
|
"enable", "disable";
|
|
pinctrl-0 = <&sel_up>;
|
|
pinctrl-1 = <&sel_down>;
|
|
pinctrl-2 = <&sw_enable>;
|
|
pinctrl-3 = <&sw_disable>;
|
|
status = "okay";
|
|
};
|
|
|
|
/*End of this file, DO NOT ADD ANYTHING HERE*/
|
|
|