xref: /linux/scripts/dtc/include-prefixes/arm64/mediatek/pumpkin-common.dtsi (revision 9983822c8cf983352ac56f8f9d4b48dd5397d35e)
1*9983822cSFabien Parent// SPDX-License-Identifier: GPL-2.0
2*9983822cSFabien Parent/*
3*9983822cSFabien Parent * Copyright (c) 2019 BayLibre, SAS.
4*9983822cSFabien Parent * Author: Fabien Parent <fparent@baylibre.com>
5*9983822cSFabien Parent */
6*9983822cSFabien Parent
7*9983822cSFabien Parent#include <dt-bindings/gpio/gpio.h>
8*9983822cSFabien Parent
9*9983822cSFabien Parent/ {
10*9983822cSFabien Parent	aliases {
11*9983822cSFabien Parent		serial0 = &uart0;
12*9983822cSFabien Parent	};
13*9983822cSFabien Parent
14*9983822cSFabien Parent	chosen {
15*9983822cSFabien Parent		stdout-path = "serial0:921600n8";
16*9983822cSFabien Parent	};
17*9983822cSFabien Parent
18*9983822cSFabien Parent	firmware {
19*9983822cSFabien Parent		optee: optee@4fd00000 {
20*9983822cSFabien Parent			compatible = "linaro,optee-tz";
21*9983822cSFabien Parent			method = "smc";
22*9983822cSFabien Parent		};
23*9983822cSFabien Parent	};
24*9983822cSFabien Parent
25*9983822cSFabien Parent	gpio-keys {
26*9983822cSFabien Parent		compatible = "gpio-keys";
27*9983822cSFabien Parent		input-name = "gpio-keys";
28*9983822cSFabien Parent		pinctrl-names = "default";
29*9983822cSFabien Parent		pinctrl-0 = <&gpio_keys_default>;
30*9983822cSFabien Parent
31*9983822cSFabien Parent		volume-up {
32*9983822cSFabien Parent			gpios = <&pio 42 GPIO_ACTIVE_LOW>;
33*9983822cSFabien Parent			label = "volume_up";
34*9983822cSFabien Parent			linux,code = <115>;
35*9983822cSFabien Parent			wakeup-source;
36*9983822cSFabien Parent			debounce-interval = <15>;
37*9983822cSFabien Parent		};
38*9983822cSFabien Parent
39*9983822cSFabien Parent		volume-down {
40*9983822cSFabien Parent			gpios = <&pio 43 GPIO_ACTIVE_LOW>;
41*9983822cSFabien Parent			label = "volume_down";
42*9983822cSFabien Parent			linux,code = <114>;
43*9983822cSFabien Parent			wakeup-source;
44*9983822cSFabien Parent			debounce-interval = <15>;
45*9983822cSFabien Parent		};
46*9983822cSFabien Parent	};
47*9983822cSFabien Parent};
48*9983822cSFabien Parent
49*9983822cSFabien Parent&i2c0 {
50*9983822cSFabien Parent	clock-div = <2>;
51*9983822cSFabien Parent	pinctrl-names = "default";
52*9983822cSFabien Parent	pinctrl-0 = <&i2c0_pins_a>;
53*9983822cSFabien Parent	status = "okay";
54*9983822cSFabien Parent
55*9983822cSFabien Parent	tca6416: gpio@20 {
56*9983822cSFabien Parent		compatible = "ti,tca6416";
57*9983822cSFabien Parent		reg = <0x20>;
58*9983822cSFabien Parent		rst-gpio = <&pio 65 GPIO_ACTIVE_HIGH>;
59*9983822cSFabien Parent		pinctrl-names = "default";
60*9983822cSFabien Parent		pinctrl-0 = <&tca6416_pins>;
61*9983822cSFabien Parent
62*9983822cSFabien Parent		gpio-controller;
63*9983822cSFabien Parent		#gpio-cells = <2>;
64*9983822cSFabien Parent
65*9983822cSFabien Parent		eint20_mux_sel0 {
66*9983822cSFabien Parent			gpio-hog;
67*9983822cSFabien Parent			gpios = <0 0>;
68*9983822cSFabien Parent			input;
69*9983822cSFabien Parent			line-name = "eint20_mux_sel0";
70*9983822cSFabien Parent		};
71*9983822cSFabien Parent
72*9983822cSFabien Parent		expcon_mux_sel1 {
73*9983822cSFabien Parent			gpio-hog;
74*9983822cSFabien Parent			gpios = <1 0>;
75*9983822cSFabien Parent			input;
76*9983822cSFabien Parent			line-name = "expcon_mux_sel1";
77*9983822cSFabien Parent		};
78*9983822cSFabien Parent
79*9983822cSFabien Parent		mrg_di_mux_sel2 {
80*9983822cSFabien Parent			gpio-hog;
81*9983822cSFabien Parent			gpios = <2 0>;
82*9983822cSFabien Parent			input;
83*9983822cSFabien Parent			line-name = "mrg_di_mux_sel2";
84*9983822cSFabien Parent		};
85*9983822cSFabien Parent
86*9983822cSFabien Parent		sd_sdio_mux_sel3 {
87*9983822cSFabien Parent			gpio-hog;
88*9983822cSFabien Parent			gpios = <3 0>;
89*9983822cSFabien Parent			input;
90*9983822cSFabien Parent			line-name = "sd_sdio_mux_sel3";
91*9983822cSFabien Parent		};
92*9983822cSFabien Parent
93*9983822cSFabien Parent		sd_sdio_mux_ctrl7 {
94*9983822cSFabien Parent			gpio-hog;
95*9983822cSFabien Parent			gpios = <7 0>;
96*9983822cSFabien Parent			output-low;
97*9983822cSFabien Parent			line-name = "sd_sdio_mux_ctrl7";
98*9983822cSFabien Parent		};
99*9983822cSFabien Parent
100*9983822cSFabien Parent		hw_id0 {
101*9983822cSFabien Parent			gpio-hog;
102*9983822cSFabien Parent			gpios = <8 0>;
103*9983822cSFabien Parent			input;
104*9983822cSFabien Parent			line-name = "hw_id0";
105*9983822cSFabien Parent		};
106*9983822cSFabien Parent
107*9983822cSFabien Parent		hw_id1 {
108*9983822cSFabien Parent			gpio-hog;
109*9983822cSFabien Parent			gpios = <9 0>;
110*9983822cSFabien Parent			input;
111*9983822cSFabien Parent			line-name = "hw_id1";
112*9983822cSFabien Parent		};
113*9983822cSFabien Parent
114*9983822cSFabien Parent		hw_id2 {
115*9983822cSFabien Parent			gpio-hog;
116*9983822cSFabien Parent			gpios = <10 0>;
117*9983822cSFabien Parent			input;
118*9983822cSFabien Parent			line-name = "hw_id2";
119*9983822cSFabien Parent		};
120*9983822cSFabien Parent
121*9983822cSFabien Parent		fg_int_n {
122*9983822cSFabien Parent			gpio-hog;
123*9983822cSFabien Parent			gpios = <11 0>;
124*9983822cSFabien Parent			input;
125*9983822cSFabien Parent			line-name = "fg_int_n";
126*9983822cSFabien Parent		};
127*9983822cSFabien Parent
128*9983822cSFabien Parent		usba_pwr_en {
129*9983822cSFabien Parent			gpio-hog;
130*9983822cSFabien Parent			gpios = <12 0>;
131*9983822cSFabien Parent			output-high;
132*9983822cSFabien Parent			line-name = "usba_pwr_en";
133*9983822cSFabien Parent		};
134*9983822cSFabien Parent
135*9983822cSFabien Parent		wifi_3v3_pg {
136*9983822cSFabien Parent			gpio-hog;
137*9983822cSFabien Parent			gpios = <13 0>;
138*9983822cSFabien Parent			input;
139*9983822cSFabien Parent			line-name = "wifi_3v3_pg";
140*9983822cSFabien Parent		};
141*9983822cSFabien Parent
142*9983822cSFabien Parent		cam_rst {
143*9983822cSFabien Parent			gpio-hog;
144*9983822cSFabien Parent			gpios = <14 0>;
145*9983822cSFabien Parent			output-low;
146*9983822cSFabien Parent			line-name = "cam_rst";
147*9983822cSFabien Parent		};
148*9983822cSFabien Parent
149*9983822cSFabien Parent		cam_pwdn {
150*9983822cSFabien Parent			gpio-hog;
151*9983822cSFabien Parent			gpios = <15 0>;
152*9983822cSFabien Parent			output-low;
153*9983822cSFabien Parent			line-name = "cam_pwdn";
154*9983822cSFabien Parent		};
155*9983822cSFabien Parent	};
156*9983822cSFabien Parent};
157*9983822cSFabien Parent
158*9983822cSFabien Parent&i2c2 {
159*9983822cSFabien Parent	clock-div = <2>;
160*9983822cSFabien Parent	pinctrl-names = "default";
161*9983822cSFabien Parent	pinctrl-0 = <&i2c2_pins_a>;
162*9983822cSFabien Parent	status = "okay";
163*9983822cSFabien Parent};
164*9983822cSFabien Parent
165*9983822cSFabien Parent&uart0 {
166*9983822cSFabien Parent	status = "okay";
167*9983822cSFabien Parent};
168*9983822cSFabien Parent
169*9983822cSFabien Parent&usb0 {
170*9983822cSFabien Parent	status = "okay";
171*9983822cSFabien Parent	dr_mode = "peripheral";
172*9983822cSFabien Parent
173*9983822cSFabien Parent	usb_con: connector {
174*9983822cSFabien Parent		compatible = "usb-c-connector";
175*9983822cSFabien Parent		label = "USB-C";
176*9983822cSFabien Parent	};
177*9983822cSFabien Parent};
178*9983822cSFabien Parent
179*9983822cSFabien Parent&usb0_phy {
180*9983822cSFabien Parent	status = "okay";
181*9983822cSFabien Parent};
182*9983822cSFabien Parent
183*9983822cSFabien Parent&pio {
184*9983822cSFabien Parent	gpio_keys_default: gpiodefault {
185*9983822cSFabien Parent		pins_cmd_dat {
186*9983822cSFabien Parent			pinmux = <MT8516_PIN_42_KPCOL0__FUNC_GPIO42>,
187*9983822cSFabien Parent				 <MT8516_PIN_43_KPCOL1__FUNC_GPIO43>;
188*9983822cSFabien Parent			bias-pull-up;
189*9983822cSFabien Parent			input-enable;
190*9983822cSFabien Parent		};
191*9983822cSFabien Parent	};
192*9983822cSFabien Parent
193*9983822cSFabien Parent	i2c0_pins_a: i2c0@0 {
194*9983822cSFabien Parent		pins1 {
195*9983822cSFabien Parent			pinmux = <MT8516_PIN_58_SDA0__FUNC_SDA0_0>,
196*9983822cSFabien Parent				 <MT8516_PIN_59_SCL0__FUNC_SCL0_0>;
197*9983822cSFabien Parent			bias-disable;
198*9983822cSFabien Parent		};
199*9983822cSFabien Parent	};
200*9983822cSFabien Parent
201*9983822cSFabien Parent	i2c2_pins_a: i2c2@0 {
202*9983822cSFabien Parent		pins1 {
203*9983822cSFabien Parent			pinmux = <MT8516_PIN_60_SDA2__FUNC_SDA2_0>,
204*9983822cSFabien Parent				 <MT8516_PIN_61_SCL2__FUNC_SCL2_0>;
205*9983822cSFabien Parent			bias-disable;
206*9983822cSFabien Parent		};
207*9983822cSFabien Parent	};
208*9983822cSFabien Parent
209*9983822cSFabien Parent	tca6416_pins: pinmux_tca6416_pins {
210*9983822cSFabien Parent		gpio_mux_rst_n_pin {
211*9983822cSFabien Parent			pinmux = <MT8516_PIN_65_UTXD1__FUNC_GPIO65>;
212*9983822cSFabien Parent			output-high;
213*9983822cSFabien Parent		};
214*9983822cSFabien Parent
215*9983822cSFabien Parent		gpio_mux_int_n_pin {
216*9983822cSFabien Parent			pinmux = <MT8516_PIN_64_URXD1__FUNC_GPIO64>;
217*9983822cSFabien Parent			input-enable;
218*9983822cSFabien Parent			bias-pull-up;
219*9983822cSFabien Parent		};
220*9983822cSFabien Parent	};
221*9983822cSFabien Parent};
222