xref: /freebsd/sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-handset.dtsi (revision 6580f5c38dd5b01aeeaed16b370f1a12423437f0)
1// SPDX-License-Identifier: GPL-2.0-only
2/dts-v1/;
3
4#include "motorola-mapphone-common.dtsi"
5
6/ {
7	/* FS USB Host PHY on port 1 for mdm6600 */
8	fsusb1_phy: usb-phy@1 {
9		compatible = "motorola,mapphone-mdm6600";
10		pinctrl-0 = <&usb_mdm6600_pins>;
11		pinctrl-1 = <&usb_mdm6600_sleep_pins>;
12		pinctrl-names = "default", "sleep";
13		enable-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;     /* gpio_95 */
14		power-gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>;	/* gpio_54 */
15		reset-gpios = <&gpio2 17 GPIO_ACTIVE_HIGH>;	/* gpio_49 */
16		/* mode: gpio_148 gpio_149 */
17		motorola,mode-gpios = <&gpio5 20 GPIO_ACTIVE_HIGH>,
18				      <&gpio5 21 GPIO_ACTIVE_HIGH>;
19		/* cmd: gpio_103 gpio_104 gpio_142 */
20		motorola,cmd-gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>,
21				     <&gpio4 8 GPIO_ACTIVE_HIGH>,
22				     <&gpio5 14 GPIO_ACTIVE_HIGH>;
23		/* status: gpio_52 gpio_53 gpio_55 */
24		motorola,status-gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>,
25					<&gpio2 21 GPIO_ACTIVE_HIGH>,
26					<&gpio2 23 GPIO_ACTIVE_HIGH>;
27		#phy-cells = <0>;
28	};
29
30	/* HS USB host TLL nop-phy on port 2 for w3glte */
31	hsusb2_phy: usb-phy@2 {
32		compatible = "usb-nop-xceiv";
33		#phy-cells = <0>;
34	};
35
36	pwm8: pwm-8 {
37		pinctrl-names = "default";
38		pinctrl-0 = <&vibrator_direction_pin>;
39
40		compatible = "ti,omap-dmtimer-pwm";
41		#pwm-cells = <3>;
42		ti,timers = <&timer8>;
43		ti,clock-source = <0x01>;
44	};
45
46	pwm9: pwm-9 {
47		pinctrl-names = "default";
48		pinctrl-0 = <&vibrator_enable_pin>;
49
50		compatible = "ti,omap-dmtimer-pwm";
51		#pwm-cells = <3>;
52		ti,timers = <&timer9>;
53		ti,clock-source = <0x01>;
54	};
55
56	vibrator {
57		compatible = "pwm-vibrator";
58		pwms = <&pwm9 0 10000000 0>, <&pwm8 0 10000000 0>;
59		pwm-names = "enable", "direction";
60		direction-duty-cycle-ns = <10000000>;
61	};
62};
63
64/* Battery NVRAM on 1-wire handled by w1_ds250x driver */
65&hdqw1w {
66	pinctrl-0 = <&hdq_pins>;
67	pinctrl-names = "default";
68	ti,mode = "1w";
69};
70
71&i2c2 {
72	touchscreen@4a {
73		compatible = "atmel,maxtouch";
74		reg = <0x4a>;
75		pinctrl-names = "default";
76		pinctrl-0 = <&touchscreen_pins>;
77
78		reset-gpios = <&gpio6 13 GPIO_ACTIVE_LOW>; /* gpio173 */
79
80		/* gpio_183 with sys_nirq2 pad as wakeup */
81		interrupts-extended = <&gpio6 23 IRQ_TYPE_LEVEL_LOW>,
82				      <&omap4_pmx_core 0x160>;
83		interrupt-names = "irq", "wakeup";
84		wakeup-source;
85	};
86
87	isl29030@44 {
88		compatible = "isil,isl29030";
89		reg = <0x44>;
90
91		pinctrl-names = "default";
92		pinctrl-0 = <&als_proximity_pins>;
93
94		interrupt-parent = <&gpio6>;
95		interrupts = <17 IRQ_TYPE_LEVEL_LOW>; /* gpio177 */
96	};
97};
98
99&omap4_pmx_core {
100	hdq_pins: hdq-pins {
101		pinctrl-single,pins = <
102		/* 0x4a100120 hdq_sio.hdq_sio aa27 */
103		OMAP4_IOPAD(0x120, PIN_INPUT | MUX_MODE0)
104		>;
105	};
106
107	/* kpd_row0.gpio_178 */
108	tmp105_irq: tmp105-irq-pins {
109		pinctrl-single,pins = <
110		OMAP4_IOPAD(0x18e, PIN_INPUT_PULLUP | MUX_MODE3)
111		>;
112	};
113
114	touchscreen_pins: touchscreen-pins {
115		pinctrl-single,pins = <
116		OMAP4_IOPAD(0x180, PIN_OUTPUT | MUX_MODE3)
117		OMAP4_IOPAD(0x1a0, PIN_INPUT_PULLUP | MUX_MODE3)
118		>;
119	};
120
121	usb_mdm6600_pins: usb-mdm6600-pins {
122		pinctrl-single,pins = <
123		/* enable 0x4a1000d8 usbb1_ulpitll_dat7.gpio_95 ag16 */
124		OMAP4_IOPAD(0x0d8, PIN_INPUT | MUX_MODE3)
125
126		/* power 0x4a10007c gpmc_nwp.gpio_54 c25 */
127		OMAP4_IOPAD(0x07c, PIN_OUTPUT | MUX_MODE3)
128
129		/* reset 0x4a100072 gpmc_a25.gpio_49 d20 */
130		OMAP4_IOPAD(0x072, PIN_OUTPUT | MUX_MODE3)
131
132		/* mode0/bpwake 0x4a10014e sdmmc5_dat1.gpio_148 af4 */
133		OMAP4_IOPAD(0x14e, PIN_OUTPUT | MUX_MODE3)
134
135		/* mode1/apwake 0x4a100150 sdmmc5_dat2.gpio_149 ag3 */
136		OMAP4_IOPAD(0x150, PIN_OFF_OUTPUT_LOW | PIN_INPUT | MUX_MODE3)
137
138		/* status0 0x4a10007e gpmc_clk.gpio_55 b22 */
139		OMAP4_IOPAD(0x07e, PIN_INPUT | MUX_MODE3)
140
141		/* status1 0x4a10007a gpmc_ncs3.gpio_53 c22 */
142		OMAP4_IOPAD(0x07a, PIN_INPUT | MUX_MODE3)
143
144		/* status2 0x4a100078 gpmc_ncs2.gpio_52 d21 */
145		OMAP4_IOPAD(0x078, PIN_INPUT | MUX_MODE3)
146
147		/* cmd0 0x4a100094 gpmc_ncs6.gpio_103 c24 */
148		OMAP4_IOPAD(0x094, PIN_OUTPUT | MUX_MODE3)
149
150		/* cmd1 0x4a100096 gpmc_ncs7.gpio_104 d24 */
151		OMAP4_IOPAD(0x096, PIN_OUTPUT | MUX_MODE3)
152
153		/* cmd2 0x4a100142 uart3_rts_sd.gpio_142 f28 */
154		OMAP4_IOPAD(0x142, PIN_OUTPUT | MUX_MODE3)
155		>;
156	};
157
158	/* Modem sleep pins to keep gpio_49 high with internal pull */
159	usb_mdm6600_sleep_pins: usb-mdm6600-sleep-pins {
160		pinctrl-single,pins = <
161		OMAP4_IOPAD(0x0d8, PIN_INPUT | MUX_MODE3)
162		OMAP4_IOPAD(0x07c, PIN_OUTPUT | MUX_MODE3)
163		OMAP4_IOPAD(0x072, PIN_INPUT_PULLUP | MUX_MODE7) /* Keep gpio_49 reset high */
164		OMAP4_IOPAD(0x14e, PIN_OUTPUT | MUX_MODE3)
165		OMAP4_IOPAD(0x150, PIN_OFF_OUTPUT_LOW | PIN_INPUT | MUX_MODE3)
166		OMAP4_IOPAD(0x07e, PIN_INPUT | MUX_MODE3)
167		OMAP4_IOPAD(0x07a, PIN_INPUT | MUX_MODE3)
168		OMAP4_IOPAD(0x078, PIN_INPUT | MUX_MODE3)
169		OMAP4_IOPAD(0x094, PIN_OUTPUT | MUX_MODE3)
170		OMAP4_IOPAD(0x096, PIN_OUTPUT | MUX_MODE3)
171		OMAP4_IOPAD(0x142, PIN_OUTPUT | MUX_MODE3)
172		>;
173	};
174
175	als_proximity_pins: als-proximity-pins {
176		pinctrl-single,pins = <
177		OMAP4_IOPAD(0x18c, PIN_INPUT_PULLUP | MUX_MODE3)
178		>;
179	};
180
181	vibrator_direction_pin: vibrator-direction-pins {
182		pinctrl-single,pins = <
183		OMAP4_IOPAD(0x1ce, PIN_OUTPUT | MUX_MODE1)	/* dmtimer8_pwm_evt (gpio_27) */
184		>;
185	};
186
187	vibrator_enable_pin: vibrator-enable-pins {
188		pinctrl-single,pins = <
189		OMAP4_IOPAD(0X1d0, PIN_OUTPUT | MUX_MODE1)	/* dmtimer9_pwm_evt (gpio_28) */
190		>;
191	};
192};
193
194/* Configure pwm clock source for timers 8 & 9 */
195&timer8 {
196	assigned-clocks = <&abe_clkctrl OMAP4_TIMER8_CLKCTRL 24>;
197	assigned-clock-parents = <&sys_32k_ck>;
198};
199
200&timer9 {
201	assigned-clocks = <&l4_per_clkctrl OMAP4_TIMER9_CLKCTRL 24>;
202	assigned-clock-parents = <&sys_32k_ck>;
203};
204
205&usbhsohci {
206	phys = <&fsusb1_phy>;
207	phy-names = "usb";
208};
209
210&usbhsehci {
211	phys = <&hsusb2_phy>;
212};
213
214&usbhshost {
215	port1-mode = "ohci-phy-4pin-dpdm";
216	port2-mode = "ehci-tll";
217};
218
219&i2c4 {
220	ak8975: magnetometer@c {
221		compatible = "asahi-kasei,ak8975";
222		reg = <0x0c>;
223
224		vdd-supply = <&vhvio>;
225
226		interrupt-parent = <&gpio6>;
227		interrupts = <15 IRQ_TYPE_EDGE_RISING>; /* gpio175 */
228
229		rotation-matrix = "-1", "0", "0",
230				  "0", "1", "0",
231				  "0", "0", "-1";
232
233	};
234};
235