xref: /freebsd/sys/contrib/device-tree/src/arm/ti/omap/omap3-sniper.dts (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-only
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * Copyright (C) 2015-2016 Paul Kocialkowski <contact@paulk.fr>
4*f126890aSEmmanuel Vadot */
5*f126890aSEmmanuel Vadot/dts-v1/;
6*f126890aSEmmanuel Vadot
7*f126890aSEmmanuel Vadot#include "omap36xx.dtsi"
8*f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
9*f126890aSEmmanuel Vadot
10*f126890aSEmmanuel Vadot/ {
11*f126890aSEmmanuel Vadot	model = "LG Optimus Black";
12*f126890aSEmmanuel Vadot	compatible = "lg,omap3-sniper", "ti,omap3630", "ti,omap3";
13*f126890aSEmmanuel Vadot
14*f126890aSEmmanuel Vadot	cpus {
15*f126890aSEmmanuel Vadot		cpu@0 {
16*f126890aSEmmanuel Vadot			cpu0-supply = <&vcc>;
17*f126890aSEmmanuel Vadot		};
18*f126890aSEmmanuel Vadot	};
19*f126890aSEmmanuel Vadot
20*f126890aSEmmanuel Vadot	memory@80000000 {
21*f126890aSEmmanuel Vadot		device_type = "memory";
22*f126890aSEmmanuel Vadot		reg = <0x80000000 0x20000000>; /* 512 MB */
23*f126890aSEmmanuel Vadot	};
24*f126890aSEmmanuel Vadot};
25*f126890aSEmmanuel Vadot
26*f126890aSEmmanuel Vadot&omap3_pmx_core {
27*f126890aSEmmanuel Vadot	pinctrl-names = "default";
28*f126890aSEmmanuel Vadot
29*f126890aSEmmanuel Vadot	uart3_pins: uart3-pins {
30*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
31*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x219e, PIN_INPUT | MUX_MODE0)	/* uart3_rx_irrx */
32*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21a0, PIN_OUTPUT | MUX_MODE0)	/* uart3_tx_irtx */
33*f126890aSEmmanuel Vadot		>;
34*f126890aSEmmanuel Vadot	};
35*f126890aSEmmanuel Vadot
36*f126890aSEmmanuel Vadot	dp3t_sel_pins: dp3t-sel-pins {
37*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
38*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x2196, PIN_OUTPUT | MUX_MODE4)	/* gpio_161 */
39*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x2198, PIN_OUTPUT | MUX_MODE4)	/* gpio_162 */
40*f126890aSEmmanuel Vadot		>;
41*f126890aSEmmanuel Vadot	};
42*f126890aSEmmanuel Vadot
43*f126890aSEmmanuel Vadot	i2c1_pins: i2c1-pins {
44*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
45*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21ba, PIN_INPUT | MUX_MODE0)	/* i2c1_scl */
46*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21bc, PIN_INPUT | MUX_MODE0)	/* i2c1_sda */
47*f126890aSEmmanuel Vadot		>;
48*f126890aSEmmanuel Vadot	};
49*f126890aSEmmanuel Vadot
50*f126890aSEmmanuel Vadot	i2c2_pins: i2c2-pins {
51*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
52*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21be, PIN_INPUT | MUX_MODE0)	/* i2c2_scl */
53*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21c0, PIN_INPUT | MUX_MODE0)	/* i2c2_sda */
54*f126890aSEmmanuel Vadot		>;
55*f126890aSEmmanuel Vadot	};
56*f126890aSEmmanuel Vadot
57*f126890aSEmmanuel Vadot	i2c3_pins: i2c3-pins {
58*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
59*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21c2, PIN_INPUT | MUX_MODE0)	/* i2c3_scl */
60*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21c4, PIN_INPUT | MUX_MODE0)	/* i2c3_sda */
61*f126890aSEmmanuel Vadot		>;
62*f126890aSEmmanuel Vadot	};
63*f126890aSEmmanuel Vadot
64*f126890aSEmmanuel Vadot	lp8720_en_pin: lp8720-en-pins {
65*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
66*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x2080, PIN_OUTPUT | MUX_MODE4)	/* gpio_37 */
67*f126890aSEmmanuel Vadot		>;
68*f126890aSEmmanuel Vadot	};
69*f126890aSEmmanuel Vadot
70*f126890aSEmmanuel Vadot	mmc1_pins: mmc1-pins {
71*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
72*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x2144, PIN_INPUT | MUX_MODE0)	/* sdmmc1_clk */
73*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x2146, PIN_INPUT | MUX_MODE0)	/* sdmmc1_cmd */
74*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x2148, PIN_INPUT | MUX_MODE0)	/* sdmmc1_dat0 */
75*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x214a, PIN_INPUT | MUX_MODE0)	/* sdmmc1_dat1 */
76*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x214c, PIN_INPUT | MUX_MODE0)	/* sdmmc1_dat2 */
77*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x214e, PIN_INPUT | MUX_MODE0)	/* sdmmc1_dat3 */
78*f126890aSEmmanuel Vadot		>;
79*f126890aSEmmanuel Vadot	};
80*f126890aSEmmanuel Vadot
81*f126890aSEmmanuel Vadot	mmc2_pins: mmc2-pins {
82*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
83*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x2158, PIN_INPUT | MUX_MODE0)	/* sdmmc2_clk */
84*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x215a, PIN_INPUT | MUX_MODE0)	/* sdmmc2_cmd */
85*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x215c, PIN_INPUT | MUX_MODE0)	/* sdmmc2_dat0 */
86*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x215e, PIN_INPUT | MUX_MODE0)	/* sdmmc2_dat1 */
87*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x2160, PIN_INPUT | MUX_MODE0)	/* sdmmc2_dat2 */
88*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x2162, PIN_INPUT | MUX_MODE0)	/* sdmmc2_dat3 */
89*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x2164, PIN_INPUT | MUX_MODE0)	/* sdmmc2_dat4 */
90*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x2166, PIN_INPUT | MUX_MODE0)	/* sdmmc2_dat5 */
91*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x2168, PIN_INPUT | MUX_MODE0)	/* sdmmc2_dat6 */
92*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT | MUX_MODE0)	/* sdmmc2_dat7 */
93*f126890aSEmmanuel Vadot		>;
94*f126890aSEmmanuel Vadot	};
95*f126890aSEmmanuel Vadot
96*f126890aSEmmanuel Vadot	usb_otg_hs_pins: usb-otg-hs-pins {
97*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
98*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21a2, PIN_INPUT | MUX_MODE0)	/* hsusb0_clk */
99*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21a4, PIN_OUTPUT | MUX_MODE0)	/* hsusb0_stp */
100*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21a6, PIN_INPUT | MUX_MODE0)	/* hsusb0_dir */
101*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21a8, PIN_INPUT | MUX_MODE0)	/* hsusb0_nxt */
102*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21aa, PIN_INPUT | MUX_MODE0)	/* hsusb0_data0 */
103*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21ac, PIN_INPUT | MUX_MODE0)	/* hsusb0_data1 */
104*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21ae, PIN_INPUT | MUX_MODE0)	/* hsusb0_data2 */
105*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21b0, PIN_INPUT | MUX_MODE0)	/* hsusb0_data3 */
106*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21b2, PIN_INPUT | MUX_MODE0)	/* hsusb0_data4 */
107*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21b4, PIN_INPUT | MUX_MODE0)	/* hsusb0_data5 */
108*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21b6, PIN_INPUT | MUX_MODE0)	/* hsusb0_data6 */
109*f126890aSEmmanuel Vadot			OMAP3_CORE1_IOPAD(0x21b8, PIN_INPUT | MUX_MODE0)	/* hsusb0_data7 */
110*f126890aSEmmanuel Vadot		>;
111*f126890aSEmmanuel Vadot	};
112*f126890aSEmmanuel Vadot};
113*f126890aSEmmanuel Vadot
114*f126890aSEmmanuel Vadot&omap3_pmx_wkup {
115*f126890aSEmmanuel Vadot	pinctrl-names = "default";
116*f126890aSEmmanuel Vadot
117*f126890aSEmmanuel Vadot	mmc1_cd_pin: mmc1-cd-pins {
118*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
119*f126890aSEmmanuel Vadot			OMAP3_WKUP_IOPAD(0x2a1a, PIN_INPUT | MUX_MODE4)		/* gpio_10 */
120*f126890aSEmmanuel Vadot		>;
121*f126890aSEmmanuel Vadot	};
122*f126890aSEmmanuel Vadot};
123*f126890aSEmmanuel Vadot
124*f126890aSEmmanuel Vadot&gpio2 {
125*f126890aSEmmanuel Vadot	ti,no-reset-on-init;
126*f126890aSEmmanuel Vadot};
127*f126890aSEmmanuel Vadot
128*f126890aSEmmanuel Vadot&gpio5 {
129*f126890aSEmmanuel Vadot	ti,no-reset-on-init;
130*f126890aSEmmanuel Vadot};
131*f126890aSEmmanuel Vadot
132*f126890aSEmmanuel Vadot&gpio6 {
133*f126890aSEmmanuel Vadot	ti,no-reset-on-init;
134*f126890aSEmmanuel Vadot};
135*f126890aSEmmanuel Vadot
136*f126890aSEmmanuel Vadot&uart3 {
137*f126890aSEmmanuel Vadot	pinctrl-names = "default";
138*f126890aSEmmanuel Vadot	pinctrl-0 = <&uart3_pins &dp3t_sel_pins>;
139*f126890aSEmmanuel Vadot
140*f126890aSEmmanuel Vadot	interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>;
141*f126890aSEmmanuel Vadot};
142*f126890aSEmmanuel Vadot
143*f126890aSEmmanuel Vadot&i2c1 {
144*f126890aSEmmanuel Vadot	pinctrl-names = "default";
145*f126890aSEmmanuel Vadot	pinctrl-0 = <&i2c1_pins>;
146*f126890aSEmmanuel Vadot
147*f126890aSEmmanuel Vadot	clock-frequency = <2600000>;
148*f126890aSEmmanuel Vadot
149*f126890aSEmmanuel Vadot	twl: twl@48 {
150*f126890aSEmmanuel Vadot		reg = <0x48>;
151*f126890aSEmmanuel Vadot		interrupts = <7>; /* SYS_NIRQ cascaded to intc */
152*f126890aSEmmanuel Vadot		interrupt-parent = <&intc>;
153*f126890aSEmmanuel Vadot
154*f126890aSEmmanuel Vadot		power {
155*f126890aSEmmanuel Vadot			compatible = "ti,twl4030-power";
156*f126890aSEmmanuel Vadot			ti,use_poweroff;
157*f126890aSEmmanuel Vadot		};
158*f126890aSEmmanuel Vadot	};
159*f126890aSEmmanuel Vadot};
160*f126890aSEmmanuel Vadot
161*f126890aSEmmanuel Vadot&i2c2 {
162*f126890aSEmmanuel Vadot	pinctrl-names = "default";
163*f126890aSEmmanuel Vadot	pinctrl-0 = <&i2c2_pins>;
164*f126890aSEmmanuel Vadot
165*f126890aSEmmanuel Vadot	clock-frequency = <400000>;
166*f126890aSEmmanuel Vadot};
167*f126890aSEmmanuel Vadot
168*f126890aSEmmanuel Vadot&i2c3 {
169*f126890aSEmmanuel Vadot	pinctrl-names = "default";
170*f126890aSEmmanuel Vadot	pinctrl-0 = <&i2c3_pins>;
171*f126890aSEmmanuel Vadot
172*f126890aSEmmanuel Vadot	clock-frequency = <400000>;
173*f126890aSEmmanuel Vadot
174*f126890aSEmmanuel Vadot	lp8720@7d {
175*f126890aSEmmanuel Vadot		pinctrl-names = "default";
176*f126890aSEmmanuel Vadot		pinctrl-0 = <&lp8720_en_pin>;
177*f126890aSEmmanuel Vadot
178*f126890aSEmmanuel Vadot		compatible = "ti,lp8720";
179*f126890aSEmmanuel Vadot		reg = <0x7d>;
180*f126890aSEmmanuel Vadot
181*f126890aSEmmanuel Vadot		enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>; /* gpio_37 */
182*f126890aSEmmanuel Vadot
183*f126890aSEmmanuel Vadot		lp8720_ldo1: ldo1 {
184*f126890aSEmmanuel Vadot			regulator-min-microvolt = <3000000>;
185*f126890aSEmmanuel Vadot			regulator-max-microvolt = <3000000>;
186*f126890aSEmmanuel Vadot		};
187*f126890aSEmmanuel Vadot	};
188*f126890aSEmmanuel Vadot};
189*f126890aSEmmanuel Vadot
190*f126890aSEmmanuel Vadot&mmc1 {
191*f126890aSEmmanuel Vadot	pinctrl-names = "default";
192*f126890aSEmmanuel Vadot	pinctrl-0 = <&mmc1_pins &mmc1_cd_pin>;
193*f126890aSEmmanuel Vadot
194*f126890aSEmmanuel Vadot	vmmc-supply = <&lp8720_ldo1>;
195*f126890aSEmmanuel Vadot	cd-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; /* gpio 10 */
196*f126890aSEmmanuel Vadot	bus-width = <4>;
197*f126890aSEmmanuel Vadot};
198*f126890aSEmmanuel Vadot
199*f126890aSEmmanuel Vadot&mmc2 {
200*f126890aSEmmanuel Vadot	pinctrl-names = "default";
201*f126890aSEmmanuel Vadot	pinctrl-0 = <&mmc2_pins>;
202*f126890aSEmmanuel Vadot
203*f126890aSEmmanuel Vadot	vmmc-supply = <&vmmc2>;
204*f126890aSEmmanuel Vadot	ti,non-removable;
205*f126890aSEmmanuel Vadot	bus-width = <8>;
206*f126890aSEmmanuel Vadot};
207*f126890aSEmmanuel Vadot
208*f126890aSEmmanuel Vadot&mmc3 {
209*f126890aSEmmanuel Vadot	status = "disabled";
210*f126890aSEmmanuel Vadot};
211*f126890aSEmmanuel Vadot
212*f126890aSEmmanuel Vadot&usb_otg_hs {
213*f126890aSEmmanuel Vadot	pinctrl-names = "default";
214*f126890aSEmmanuel Vadot	pinctrl-0 = <&usb_otg_hs_pins>;
215*f126890aSEmmanuel Vadot
216*f126890aSEmmanuel Vadot	interface-type = <0>;
217*f126890aSEmmanuel Vadot	usb-phy = <&usb2_phy>;
218*f126890aSEmmanuel Vadot	phys = <&usb2_phy>;
219*f126890aSEmmanuel Vadot	phy-names = "usb2-phy";
220*f126890aSEmmanuel Vadot	mode = <3>;
221*f126890aSEmmanuel Vadot	power = <50>;
222*f126890aSEmmanuel Vadot};
223*f126890aSEmmanuel Vadot
224*f126890aSEmmanuel Vadot#include "twl4030.dtsi"
225*f126890aSEmmanuel Vadot#include "twl4030_omap3.dtsi"
226*f126890aSEmmanuel Vadot
227*f126890aSEmmanuel Vadot&twl_keypad {
228*f126890aSEmmanuel Vadot	linux,keymap = <
229*f126890aSEmmanuel Vadot		MATRIX_KEY(0x00, 0x00, KEY_VOLUMEUP)
230*f126890aSEmmanuel Vadot		MATRIX_KEY(0x01, 0x00, KEY_VOLUMEDOWN)
231*f126890aSEmmanuel Vadot		MATRIX_KEY(0x02, 0x00, KEY_SELECT)
232*f126890aSEmmanuel Vadot	>;
233*f126890aSEmmanuel Vadot};
234*f126890aSEmmanuel Vadot
235*f126890aSEmmanuel Vadot/*
236*f126890aSEmmanuel Vadot * The TWL4030 VAUX2 and VDAC regulators power sensors that are slaves on I2C3.
237*f126890aSEmmanuel Vadot * When not powered, these sensors cause the I2C3 clock to stay low at all times,
238*f126890aSEmmanuel Vadot * making it impossible to reach other devices on I2C3.
239*f126890aSEmmanuel Vadot */
240*f126890aSEmmanuel Vadot
241*f126890aSEmmanuel Vadot&vaux2 {
242*f126890aSEmmanuel Vadot	regulator-min-microvolt = <2800000>;
243*f126890aSEmmanuel Vadot	regulator-max-microvolt = <2800000>;
244*f126890aSEmmanuel Vadot	regulator-always-on;
245*f126890aSEmmanuel Vadot};
246*f126890aSEmmanuel Vadot
247*f126890aSEmmanuel Vadot&vdac {
248*f126890aSEmmanuel Vadot	regulator-min-microvolt = <1800000>;
249*f126890aSEmmanuel Vadot	regulator-max-microvolt = <1800000>;
250*f126890aSEmmanuel Vadot	regulator-always-on;
251*f126890aSEmmanuel Vadot};
252