GNU Linux-libre 5.4.274-gnu1
[releases.git] / arch / arm / boot / dts / logicpd-torpedo-baseboard.dtsi
1 // SPDX-License-Identifier: GPL-2.0-only
2
3 / {
4         gpio_keys {
5                 compatible = "gpio-keys";
6                 pinctrl-names = "default";
7                 pinctrl-0 = <&gpio_key_pins &gpio_key_pins_wkup>;
8
9                 sysboot2 {
10                         label = "sysboot2";
11                         gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;     /* gpio2 */
12                         linux,code = <BTN_0>;
13                         wakeup-source;
14                 };
15
16                 sysboot5 {
17                         label = "sysboot5";
18                         gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;     /* gpio7 */
19                         linux,code = <BTN_1>;
20                         wakeup-source;
21                 };
22
23                 gpio1 {
24                         label = "gpio1";
25                         gpios = <&gpio6 21 GPIO_ACTIVE_LOW>;    /* gpio181 */
26                         linux,code = <BTN_2>;
27                         wakeup-source;
28                 };
29
30                 gpio2 {
31                         label = "gpio2";
32                         gpios = <&gpio6 18 GPIO_ACTIVE_LOW>;    /* gpio178 */
33                         linux,code = <BTN_3>;
34                         wakeup-source;
35                 };
36         };
37
38         sound {
39                 compatible = "ti,omap-twl4030";
40                 ti,model = "omap3logic";
41                 ti,mcbsp = <&mcbsp2>;
42         };
43
44         leds {
45                 compatible = "gpio-leds";
46                 pinctrl-names = "default";
47                 pinctrl-0 = <&led_pins>;
48
49                 led1 {
50                         label = "led1";
51                         gpios = <&gpio6 20 GPIO_ACTIVE_HIGH>;   /* gpio180 */
52                         linux,default-trigger = "cpu0";
53                 };
54
55                 led2 {
56                         label = "led2";
57                         gpios = <&gpio6 19 GPIO_ACTIVE_HIGH>;   /* gpio179 */
58                         linux,default-trigger = "none";
59                 };
60         };
61
62         pwm10: dmtimer-pwm {
63                 compatible = "ti,omap-dmtimer-pwm";
64                 pinctrl-names = "default";
65                 pinctrl-0 = <&pwm_pins>;
66                 ti,timers = <&timer10>;
67                 #pwm-cells = <3>;
68         };
69
70 };
71
72 &vaux1 {
73         regulator-min-microvolt = <3000000>;
74         regulator-max-microvolt = <3000000>;
75 };
76
77 &vaux4 {
78         regulator-min-microvolt = <1800000>;
79         regulator-max-microvolt = <1800000>;
80 };
81
82 &mcbsp2 {
83         pinctrl-names = "default";
84         pinctrl-0 = <&mcbsp2_pins>;
85         status = "okay";
86 };
87
88 &charger {
89         ti,bb-uvolt = <3200000>;
90         ti,bb-uamp = <150>;
91 };
92
93 &gpmc {
94         ranges = <0 0 0x30000000 0x1000000      /* CS0: 16MB for NAND */
95                   1 0 0x2c000000 0x1000000>;    /* CS1: 16MB for LAN9221 */
96
97         ethernet@gpmc {
98                 pinctrl-names = "default";
99                 pinctrl-0 = <&lan9221_pins>;
100                 interrupt-parent = <&gpio5>;
101                 interrupts = <1 IRQ_TYPE_LEVEL_LOW>;            /* gpio129 */
102                 reg = <1 0 0xff>;
103         };
104 };
105
106 &vpll2 {
107         regulator-always-on;
108 };
109
110 &dss {
111         status = "ok";
112         vdds_dsi-supply = <&vpll2>;
113         pinctrl-names = "default";
114         pinctrl-0 = <&dss_dpi_pins1>;
115         port {
116                 dpi_out: endpoint {
117                         remote-endpoint = <&lcd_in>;
118                         data-lines = <16>;
119                 };
120         };
121 };
122
123 / {
124         aliases {
125                 display0 = &lcd0;
126         };
127
128         lcd0: display {
129                 /* This isn't the exact LCD, but the timings meet spec */
130                 /* To make it work, set CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=4 */
131                 compatible = "newhaven,nhd-4.3-480272ef-atxl";
132                 label = "15";
133                 pinctrl-names = "default";
134                 pinctrl-0 = <&panel_pwr_pins>;
135                 backlight = <&bl>;
136                 enable-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>;
137                 port {
138                         lcd_in: endpoint {
139                                 remote-endpoint = <&dpi_out>;
140                         };
141                 };
142         };
143
144         bl: backlight {
145                 compatible = "pwm-backlight";
146                 pinctrl-names = "default";
147                 pinctrl-0 = <&backlight_pins>;
148                 pwms = <&pwm10 0 5000000 0>;
149                 brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
150                 default-brightness-level = <7>;
151                 enable-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH>; /* gpio_154 */
152         };
153 };
154
155 &mmc1 {
156         interrupts-extended = <&intc 83 &omap3_pmx_core 0x11a>;
157         pinctrl-names = "default";
158         pinctrl-0 = <&mmc1_pins &mmc1_cd>;
159         cd-gpios = <&gpio4 31 GPIO_ACTIVE_LOW>;         /* gpio127 */
160         vmmc-supply = <&vmmc1>;
161         bus-width = <4>;
162         cap-power-off-card;
163 };
164
165 &omap3_pmx_core {
166         gpio_key_pins: pinmux_gpio_key_pins {
167                 pinctrl-single,pins = <
168                         OMAP3_CORE1_IOPAD(0x21d6, PIN_INPUT_PULLUP | MUX_MODE4) /* mcspi2_clk.gpio_178 */
169                         OMAP3_CORE1_IOPAD(0x21dc, PIN_INPUT_PULLUP | MUX_MODE4) /* mcspi2_cs0.gpio_181 */
170                 >;
171         };
172
173         pwm_pins: pinmux_pwm_pins {
174                 pinctrl-single,pins = <
175                         OMAP3_CORE1_IOPAD(0x20B8, PIN_OUTPUT | PIN_OFF_OUTPUT_LOW | MUX_MODE3)       /* gpmc_ncs5.gpt_10_pwm_evt */
176                 >;
177         };
178
179         led_pins: pinmux_led_pins {
180                 pinctrl-single,pins = <
181                         OMAP3_CORE1_IOPAD(0x21d8, PIN_OUTPUT | MUX_MODE4)       /* gpio_179 */
182                         OMAP3_CORE1_IOPAD(0x21da, PIN_OUTPUT | MUX_MODE4)       /* gpio_180 */
183                 >;
184         };
185
186         mmc1_pins: pinmux_mmc1_pins {
187                 pinctrl-single,pins = <
188                         OMAP3_CORE1_IOPAD(0x2144, PIN_OUTPUT | MUX_MODE0)       /* sdmmc1_clk.sdmmc1_clk */
189                         OMAP3_CORE1_IOPAD(0x2146, PIN_INPUT | MUX_MODE0)        /* sdmmc1_cmd.sdmmc1_cmd */
190                         OMAP3_CORE1_IOPAD(0x2148, PIN_INPUT | MUX_MODE0)        /* sdmmc1_dat0.sdmmc1_dat0 */
191                         OMAP3_CORE1_IOPAD(0x214a, PIN_INPUT | MUX_MODE0)        /* sdmmc1_dat1.sdmmc1_dat1 */
192                         OMAP3_CORE1_IOPAD(0x214c, PIN_INPUT | MUX_MODE0)        /* sdmmc1_dat2.sdmmc1_dat2 */
193                         OMAP3_CORE1_IOPAD(0x214e, PIN_INPUT | MUX_MODE0)        /* sdmmc1_dat3.sdmmc1_dat3 */
194                 >;
195         };
196
197         tsc2004_pins: pinmux_tsc2004_pins {
198                 pinctrl-single,pins = <
199                         OMAP3_CORE1_IOPAD(0x2186, PIN_INPUT | MUX_MODE4)        /* mcbsp4_dr.gpio_153 */
200                 >;
201         };
202
203         backlight_pins: pinmux_backlight_pins {
204                 pinctrl-single,pins = <
205                         OMAP3_CORE1_IOPAD(0x2188, PIN_OUTPUT | PIN_OFF_OUTPUT_LOW | MUX_MODE4)       /* mcbsp4_dx.gpio_154 */
206                 >;
207         };
208
209         isp_pins: pinmux_isp_pins {
210                 pinctrl-single,pins = <
211                         OMAP3_CORE1_IOPAD(0x210c, PIN_INPUT | MUX_MODE0)   /* cam_hs.cam_hs */
212                         OMAP3_CORE1_IOPAD(0x210e, PIN_INPUT | MUX_MODE0)   /* cam_vs.cam_vs */
213                         OMAP3_CORE1_IOPAD(0x2110, PIN_INPUT | MUX_MODE0)   /* cam_xclka.cam_xclka */
214                         OMAP3_CORE1_IOPAD(0x2112, PIN_INPUT | MUX_MODE0)   /* cam_pclk.cam_pclk */
215
216                         OMAP3_CORE1_IOPAD(0x2116, PIN_INPUT | MUX_MODE0)   /* cam_d0.cam_d0 */
217                         OMAP3_CORE1_IOPAD(0x2118, PIN_INPUT | MUX_MODE0)   /* cam_d1.cam_d1 */
218                         OMAP3_CORE1_IOPAD(0x211a, PIN_INPUT | MUX_MODE0)   /* cam_d2.cam_d2 */
219                         OMAP3_CORE1_IOPAD(0x211c, PIN_INPUT | MUX_MODE0)   /* cam_d3.cam_d3 */
220                         OMAP3_CORE1_IOPAD(0x211e, PIN_INPUT | MUX_MODE0)   /* cam_d4.cam_d4 */
221                         OMAP3_CORE1_IOPAD(0x2120, PIN_INPUT | MUX_MODE0)   /* cam_d5.cam_d5 */
222                         OMAP3_CORE1_IOPAD(0x2122, PIN_INPUT | MUX_MODE0)   /* cam_d6.cam_d6 */
223                         OMAP3_CORE1_IOPAD(0x2124, PIN_INPUT | MUX_MODE0)   /* cam_d7.cam_d7 */
224                 >;
225         };
226
227         panel_pwr_pins: pinmux_panel_pwr_pins {
228                 pinctrl-single,pins = <
229                         OMAP3_CORE1_IOPAD(0x218a, PIN_OUTPUT | PIN_OFF_OUTPUT_LOW | MUX_MODE4)       /* mcbsp4_fs.gpio_155 */
230                 >;
231         };
232
233         dss_dpi_pins1: pinmux_dss_dpi_pins1 {
234                 pinctrl-single,pins = <
235                         OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_pclk.dss_pclk */
236                         OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_hsync.dss_hsync */
237                         OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_vsync.dss_vsync */
238                         OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_acbias.dss_acbias */
239
240                         OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data6.dss_data6 */
241                         OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data7.dss_data7 */
242                         OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data8.dss_data8 */
243                         OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data9.dss_data9 */
244                         OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data10.dss_data10 */
245                         OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data11.dss_data11 */
246                         OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data12.dss_data12 */
247                         OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data13.dss_data13 */
248                         OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data14.dss_data14 */
249                         OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data15.dss_data15 */
250                         OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data16.dss_data16 */
251                         OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data17.dss_data17 */
252
253                         OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE3)   /* dss_data18.dss_data0 */
254                         OMAP3_CORE1_IOPAD(0x2102, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE3)   /* dss_data19.dss_data1 */
255                         OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE3)   /* dss_data20.dss_data2 */
256                         OMAP3_CORE1_IOPAD(0x2106, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE3)   /* dss_data21.dss_data3 */
257                         OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE3)   /* dss_data22.dss_data4 */
258                         OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE3)   /* dss_data23.dss_data5 */
259                 >;
260         };
261 };
262
263 &omap3_pmx_wkup {
264         gpio_key_pins_wkup: pinmux_gpio_key_pins_wkup {
265                 pinctrl-single,pins = <
266                         OMAP3_WKUP_IOPAD(0x2a0a, PIN_INPUT_PULLUP | MUX_MODE4)  /* sys_boot0.gpio_2 */
267                         OMAP3_WKUP_IOPAD(0x2a14, PIN_INPUT_PULLUP | MUX_MODE4)  /* sys_boot5.gpio_7 */
268                 >;
269         };
270
271         lan9221_pins: pinmux_lan9221_pins {
272                 pinctrl-single,pins = <
273                         OMAP3_WKUP_IOPAD(0x2a5a, PIN_INPUT | MUX_MODE4)         /* reserved.gpio_129 */
274                 >;
275         };
276
277         mmc1_cd: pinmux_mmc1_cd {
278                 pinctrl-single,pins = <
279                         OMAP3_WKUP_IOPAD(0x2a54, PIN_INPUT_PULLUP | MUX_MODE4)  /* reserved.gpio_127 */
280                 >;
281         };
282 };
283
284 &i2c2 {
285         mt9p031@48 {
286                 compatible = "aptina,mt9p031";
287                 reg = <0x48>;
288                 clocks = <&isp 0>;
289                 vaa-supply = <&vaux4>;
290                 vdd-supply = <&vaux4>;
291                 vdd_io-supply = <&vaux4>;
292                 port {
293                         mt9p031_out: endpoint {
294                                 input-clock-frequency = <24000000>;
295                                 pixel-clock-frequency = <72000000>;
296                                 remote-endpoint = <&ccdc_ep>;
297                         };
298                 };
299         };
300 };
301
302 &i2c3 {
303         touchscreen: tsc2004@48 {
304                 compatible = "ti,tsc2004";
305                 reg = <0x48>;
306                 vio-supply = <&vaux1>;
307                 pinctrl-names = "default";
308                 pinctrl-0 = <&tsc2004_pins>;
309                 interrupts-extended = <&gpio5 25 IRQ_TYPE_EDGE_RISING>; /* gpio 153 */
310
311                 touchscreen-fuzz-x = <4>;
312                 touchscreen-fuzz-y = <7>;
313                 touchscreen-fuzz-pressure = <2>;
314                 touchscreen-size-x = <4096>;
315                 touchscreen-size-y = <4096>;
316                 touchscreen-max-pressure = <2048>;
317
318                 ti,x-plate-ohms = <280>;
319                 ti,esd-recovery-timeout-ms = <8000>;
320         };
321 };
322
323 &mcspi1 {
324         at25@0 {
325                 compatible = "atmel,at25";
326                 reg = <0>;
327                 spi-max-frequency = <5000000>;
328                 spi-cpha;
329                 spi-cpol;
330
331                 pagesize = <64>;
332                 size = <32768>;
333                 address-width = <16>;
334         };
335 };
336
337 &isp {
338         pinctrl-names = "default";
339         pinctrl-0 = <&isp_pins>;
340         ports {
341                 port@0 {
342                         reg = <0>;
343                         ccdc_ep: endpoint {
344                                 remote-endpoint = <&mt9p031_out>;
345                                 bus-width = <8>;
346                                 hsync-active = <1>;
347                                 vsync-active = <1>;
348                                 pclk-sample = <0>;
349                         };
350                 };
351         };
352 };
353
354 &uart1 {
355         interrupts-extended = <&intc 72 &omap3_pmx_core OMAP3_UART1_RX>;
356 };
357
358 /* Wired to the tps65950 on the SOM, only the USB connector is on the devkit */
359 &usb_otg_hs {
360         pinctrl-names = "default";
361         pinctrl-0 = <&hsusb_otg_pins>;
362         interface-type = <0>;
363         usb-phy = <&usb2_phy>;
364         phys = <&usb2_phy>;
365         phy-names = "usb2-phy";
366         mode = <3>;
367         power = <50>;
368 };