hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/boot/dts/omap3-gta04.dtsi
....@@ -1,19 +1,17 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2013 Marek Belisko <marek@goldelico.com>
34 *
45 * Based on omap3-beagle-xm.dts
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 */
107 /dts-v1/;
118
129 #include "omap36xx.dtsi"
10
+#include <dt-bindings/input/input.h>
1311
1412 / {
1513 model = "OMAP3 GTA04";
16
- compatible = "ti,omap3-gta04", "ti,omap36xx", "ti,omap3";
14
+ compatible = "ti,omap3-gta04", "ti,omap3630", "ti,omap36xx", "ti,omap3";
1715
1816 cpus {
1917 cpu@0 {
....@@ -26,9 +24,23 @@
2624 reg = <0x80000000 0x20000000>; /* 512 MB */
2725 };
2826
27
+ chosen {
28
+ stdout-path = &uart3;
29
+ };
30
+
2931 aliases {
3032 display0 = &lcd;
3133 display1 = &tv0;
34
+ /delete-property/ mmc2;
35
+ /delete-property/ mmc3;
36
+ };
37
+
38
+ ldo_3v3: fixedregulator {
39
+ compatible = "regulator-fixed";
40
+ regulator-name = "ldo_3v3";
41
+ regulator-min-microvolt = <3300000>;
42
+ regulator-max-microvolt = <3300000>;
43
+ regulator-always-on;
3244 };
3345
3446 /* fixed 26MHz oscillator */
....@@ -43,8 +55,23 @@
4355
4456 aux-button {
4557 label = "aux";
46
- linux,code = <169>;
58
+ linux,code = <KEY_PHONE>;
4759 gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
60
+ wakeup-source;
61
+ };
62
+ };
63
+
64
+ antenna-detect {
65
+ compatible = "gpio-keys";
66
+
67
+ gps_antenna_button: gps-antenna-button {
68
+ label = "GPS_EXT_ANT";
69
+ linux,input-type = <EV_SW>;
70
+ linux,code = <SW_LINEIN_INSERT>;
71
+ gpios = <&gpio5 16 GPIO_ACTIVE_HIGH>; /* GPIO144 */
72
+ interrupt-parent = <&gpio5>;
73
+ interrupts = <16 IRQ_TYPE_EDGE_BOTH>;
74
+ debounce-interval = <10>;
4875 wakeup-source;
4976 };
5077 };
....@@ -56,7 +83,7 @@
5683 ti,mcbsp = <&mcbsp2>;
5784 };
5885
59
- /* GSM audio */
86
+ /* GSM audio */
6087 sound_telephony {
6188 compatible = "simple-audio-card";
6289 simple-audio-card,name = "GTA04 voice";
....@@ -89,7 +116,7 @@
89116 gpio-sck = <&gpio1 12 GPIO_ACTIVE_HIGH>;
90117 gpio-miso = <&gpio1 18 GPIO_ACTIVE_HIGH>;
91118 gpio-mosi = <&gpio1 20 GPIO_ACTIVE_HIGH>;
92
- cs-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;
119
+ cs-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
93120 num-chipselects = <1>;
94121
95122 /* lcd panel */
....@@ -100,6 +127,7 @@
100127 spi-cpol;
101128 spi-cpha;
102129
130
+ backlight= <&backlight>;
103131 label = "lcd";
104132 port {
105133 lcd_in: endpoint {
....@@ -109,7 +137,7 @@
109137 };
110138 };
111139
112
- backlight {
140
+ backlight: backlight {
113141 compatible = "pwm-backlight";
114142 pwms = <&pwm11 0 12000000 0>;
115143 pwm-names = "backlight";
....@@ -123,6 +151,7 @@
123151 compatible = "ti,omap-dmtimer-pwm";
124152 ti,timers = <&timer11>;
125153 #pwm-cells = <3>;
154
+ ti,clock-source = <0x01>;
126155 };
127156
128157 hsusb2_phy: hsusb2_phy {
....@@ -169,6 +198,51 @@
169198 wifi_pwrseq: wifi_pwrseq {
170199 compatible = "mmc-pwrseq-simple";
171200 reset-gpios = <&tca6507 0 GPIO_ACTIVE_LOW>; /* W2CBW003 reset through tca6507 */
201
+ };
202
+
203
+ /* devconf0 setup for mcbsp1 clock pins */
204
+ pinmux_mcbsp1@48002274 {
205
+ compatible = "pinctrl-single";
206
+ reg = <0x48002274 4>; /* CONTROL_DEVCONF0 */
207
+ #address-cells = <1>;
208
+ #size-cells = <0>;
209
+ pinctrl-single,bit-per-mux;
210
+ pinctrl-single,register-width = <32>;
211
+ pinctrl-single,function-mask = <0x7>; /* MCBSP1 CLK pinmux */
212
+ #pinctrl-cells = <2>;
213
+ pinctrl-names = "default";
214
+ pinctrl-0 = <&mcbsp1_devconf0_pins>;
215
+ mcbsp1_devconf0_pins: pinmux_mcbsp1_devconf0_pins {
216
+ /* offset bits mask */
217
+ pinctrl-single,bits = <0x00 0x08 0x1c>; /* set MCBSP1_CLKR */
218
+ };
219
+ };
220
+
221
+ /* devconf1 setup for tvout pins */
222
+ pinmux_tv_out@480022d8 {
223
+ compatible = "pinctrl-single";
224
+ reg = <0x480022d8 4>; /* CONTROL_DEVCONF1 */
225
+ #address-cells = <1>;
226
+ #size-cells = <0>;
227
+ pinctrl-single,bit-per-mux;
228
+ pinctrl-single,register-width = <32>;
229
+ pinctrl-single,function-mask = <0x81>; /* TV out pin control */
230
+ #pinctrl-cells = <2>;
231
+ pinctrl-names = "default";
232
+ pinctrl-0 = <&tv_acbias_devconf1_pins>;
233
+ tv_acbias_devconf1_pins: pinmux_tv_acbias_devconf1_pins {
234
+ /* offset bits mask */
235
+ pinctrl-single,bits = <0x00 0x40800 0x40800>; /* set TVOUTBYPASS and TVOUTACEN */
236
+ };
237
+ };
238
+};
239
+
240
+&omap3_pmx_wkup {
241
+ gpio1_pins: pinmux_gpio1_pins {
242
+ pinctrl-single,pins = <
243
+ OMAP3_WKUP_IOPAD(0x2a14, PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot5.gpio_7 */
244
+ OMAP3_WKUP_IOPAD(0x2a1a, PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_clkout.gpio_10 */
245
+ >;
172246 };
173247 };
174248
....@@ -221,14 +295,14 @@
221295 >;
222296 };
223297
224
- backlight_pins: backlight_pins_pimnux {
298
+ backlight_pins: backlight_pins_pinmux {
225299 pinctrl-single,pins = <
226300 OMAP3_CORE1_IOPAD(0x20ba, MUX_MODE3) /* gpt11/gpio57 */
227301 >;
228302 };
229303
230304 dss_dpi_pins: pinmux_dss_dpi_pins {
231
- pinctrl-single,pins = <
305
+ pinctrl-single,pins = <
232306 OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0) /* dss_pclk.dss_pclk */
233307 OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0) /* dss_hsync.dss_hsync */
234308 OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0) /* dss_vsync.dss_vsync */
....@@ -260,9 +334,21 @@
260334 >;
261335 };
262336
337
+ gps_pins: pinmux_gps_pins {
338
+ pinctrl-single,pins = <
339
+ OMAP3_CORE1_IOPAD(0x2176, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* gpio145 */
340
+ >;
341
+ };
342
+
263343 hdq_pins: hdq_pins {
264344 pinctrl-single,pins = <
265345 OMAP3_CORE1_IOPAD(0x21c6, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_sda.hdq */
346
+ >;
347
+ };
348
+
349
+ bmp085_pins: pinmux_bmp085_pins {
350
+ pinctrl-single,pins = <
351
+ OMAP3_CORE1_IOPAD(0x2136, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio113 */
266352 >;
267353 };
268354
....@@ -288,6 +374,71 @@
288374 pinctrl-single,pins = <
289375 /* here we could enable to wakeup the cpu from suspend by a pen touch */
290376 OMAP3_CORE1_IOPAD(0x2194, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio160 */
377
+ >;
378
+ };
379
+
380
+ camera_pins: pinmux_camera_pins {
381
+ pinctrl-single,pins = <
382
+ /* set up parallel camera interface */
383
+ OMAP3_CORE1_IOPAD(0x210c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_hs */
384
+ OMAP3_CORE1_IOPAD(0x210e, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_vs */
385
+ OMAP3_CORE1_IOPAD(0x2110, PIN_OUTPUT | MUX_MODE0) /* cam_xclka */
386
+ OMAP3_CORE1_IOPAD(0x2112, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_pclk */
387
+ OMAP3_CORE1_IOPAD(0x2114, PIN_OUTPUT | MUX_MODE4) /* cam_fld = gpio_98 */
388
+ OMAP3_CORE1_IOPAD(0x2116, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d0 */
389
+ OMAP3_CORE1_IOPAD(0x2118, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d1 */
390
+ OMAP3_CORE1_IOPAD(0x211a, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d2 */
391
+ OMAP3_CORE1_IOPAD(0x211c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d3 */
392
+ OMAP3_CORE1_IOPAD(0x211e, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d4 */
393
+ OMAP3_CORE1_IOPAD(0x2120, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d5 */
394
+ OMAP3_CORE1_IOPAD(0x2122, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d6 */
395
+ OMAP3_CORE1_IOPAD(0x2124, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d7 */
396
+ OMAP3_CORE1_IOPAD(0x2126, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d8 */
397
+ OMAP3_CORE1_IOPAD(0x2128, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d9 */
398
+ OMAP3_CORE1_IOPAD(0x212a, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d10 */
399
+ OMAP3_CORE1_IOPAD(0x212c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d10 */
400
+ OMAP3_CORE1_IOPAD(0x212e, PIN_OUTPUT | MUX_MODE0) /* cam_xclkb */
401
+ OMAP3_CORE1_IOPAD(0x2130, PIN_OUTPUT | MUX_MODE4) /* cam_wen = gpio_167 */
402
+ OMAP3_CORE1_IOPAD(0x2132, PIN_INPUT_PULLDOWN | MUX_MODE4) /* cam_strobe */
403
+ >;
404
+ };
405
+
406
+ mcbsp1_pins: pinmux_mcbsp1_pins {
407
+ pinctrl-single,pins = <
408
+ OMAP3_CORE1_IOPAD(0x218c, PIN_INPUT | MUX_MODE4) /* mcbsp1_clkr.mcbsp1_clkr - gpio_156 FM interrupt */
409
+ OMAP3_CORE1_IOPAD(0x218e, PIN_OUTPUT | MUX_MODE0) /* mcbsp1_clkr.mcbsp1_fsr */
410
+ OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE0) /* mcbsp1_dx.mcbsp1_dx */
411
+ OMAP3_CORE1_IOPAD(0x2192, PIN_INPUT | MUX_MODE0) /* mcbsp1_dx.mcbsp1_dr */
412
+ /* mcbsp_clks is used as PENIRQ */
413
+ /* OMAP3_CORE1_IOPAD(0x2194, PIN_INPUT | MUX_MODE0) mcbsp_clks.mcbsp_clks */
414
+ OMAP3_CORE1_IOPAD(0x2196, PIN_INPUT | MUX_MODE0) /* mcbsp_clks.mcbsp1_fsx */
415
+ OMAP3_CORE1_IOPAD(0x2198, PIN_INPUT | MUX_MODE0) /* mcbsp1_clkx.mcbsp1_clkx */
416
+ >;
417
+ };
418
+
419
+ mcbsp2_pins: pinmux_mcbsp2_pins {
420
+ pinctrl-single,pins = <
421
+ OMAP3_CORE1_IOPAD(0x213c, PIN_INPUT | MUX_MODE0) /* mcbsp2_fsx.mcbsp2_fsx */
422
+ OMAP3_CORE1_IOPAD(0x213e, PIN_INPUT | MUX_MODE0) /* mcbsp2_fsx.mcbsp2_clkx */
423
+ OMAP3_CORE1_IOPAD(0x2140, PIN_INPUT | MUX_MODE0) /* mcbsp2_dr.mcbsp2_dr */
424
+ OMAP3_CORE1_IOPAD(0x2142, PIN_OUTPUT | MUX_MODE0) /* mcbsp2_dr.mcbsp2_dx */
425
+ >;
426
+ };
427
+
428
+ mcbsp3_pins: pinmux_mcbsp3_pins {
429
+ pinctrl-single,pins = <
430
+ OMAP3_CORE1_IOPAD(0x216c, PIN_OUTPUT | MUX_MODE0) /* mcbsp3_dx.mcbsp3_dx */
431
+ OMAP3_CORE1_IOPAD(0x216e, PIN_INPUT | MUX_MODE0) /* mcbsp3_dx.mcbsp3_dr */
432
+ OMAP3_CORE1_IOPAD(0x2170, PIN_INPUT | MUX_MODE0) /* mcbsp3_clkx.mcbsp3_clkx */
433
+ OMAP3_CORE1_IOPAD(0x2172, PIN_INPUT | MUX_MODE0) /* mcbsp3_clkx.mcbsp3_fsx */
434
+ >;
435
+ };
436
+
437
+ mcbsp4_pins: pinmux_mcbsp4_pins {
438
+ pinctrl-single,pins = <
439
+ OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcbsp4_clkx.mcbsp4_clkx */
440
+ OMAP3_CORE1_IOPAD(0x2186, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcbsp4_clkx.mcbsp4_dr */
441
+ OMAP3_CORE1_IOPAD(0x218a, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcbsp4_dx.mcbsp4_fsx */
291442 >;
292443 };
293444 };
....@@ -355,6 +506,8 @@
355506 bmp085@77 {
356507 compatible = "bosch,bmp085";
357508 reg = <0x77>;
509
+ pinctrl-names = "default";
510
+ pinctrl-0 = <&bmp085_pins>;
358511 interrupt-parent = <&gpio4>;
359512 interrupts = <17 IRQ_TYPE_EDGE_RISING>; /* GPIO_113 */
360513 };
....@@ -410,7 +563,7 @@
410563 reg = <0x4>;
411564 };
412565
413
- wifi_reset: wifi_reset@6 {
566
+ wifi_reset: wifi_reset@6 { /* reference as <&tca_gpios 0 0> since it is currently the only GPIO */
414567 reg = <0x6>;
415568 compatible = "gpio";
416569 };
....@@ -479,6 +632,7 @@
479632 vmmc-supply = <&vmmc1>;
480633 bus-width = <4>;
481634 ti,non-removable;
635
+ broken-cd; /* hardware has no CD */
482636 };
483637
484638 &mmc2 {
....@@ -493,8 +647,26 @@
493647 status = "disabled";
494648 };
495649
650
+#define BIT(x) (1 << (x))
651
+&twl_gpio {
652
+ /* pullups: BIT(2) */
653
+ ti,pullups = <BIT(2)>;
654
+ /*
655
+ * pulldowns:
656
+ * BIT(0), BIT(1), BIT(6), BIT(7), BIT(8), BIT(13)
657
+ * BIT(15), BIT(16), BIT(17)
658
+ */
659
+ ti,pulldowns = <(BIT(0) | BIT(1) | BIT(6) | BIT(7) | BIT(8) |
660
+ BIT(13) | BIT(15) | BIT(16) | BIT(17))>;
661
+};
662
+
496663 &twl_keypad {
497664 status = "disabled";
665
+};
666
+
667
+&gpio1 {
668
+ pinctrl-names = "default";
669
+ pinctrl-0 = <&gpio1_pins>;
498670 };
499671
500672 &uart1 {
....@@ -505,11 +677,20 @@
505677 &uart2 {
506678 pinctrl-names = "default";
507679 pinctrl-0 = <&uart2_pins>;
680
+ gnss: gnss {
681
+ compatible = "wi2wi,w2sg0004";
682
+ pinctrl-names = "default";
683
+ pinctrl-0 = <&gps_pins>;
684
+ sirf,onoff-gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>;
685
+ lna-supply = <&vsim>;
686
+ vcc-supply = <&ldo_3v3>;
687
+ };
508688 };
509689
510690 &uart3 {
511691 pinctrl-names = "default";
512692 pinctrl-0 = <&uart3_pins>;
693
+ interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>;
513694 };
514695
515696 &charger {
....@@ -527,7 +708,7 @@
527708 &vaux2 {
528709 regulator-min-microvolt = <2800000>;
529710 regulator-max-microvolt = <2800000>;
530
- regulator-always-on;
711
+ regulator-always-on; /* we should never switch off while vio is on! */
531712 };
532713
533714 /* camera */
....@@ -574,11 +755,7 @@
574755
575756 vdda-supply = <&vdac>;
576757
577
- #address-cells = <1>;
578
- #size-cells = <0>;
579
-
580758 port {
581
- reg = <0>;
582759 venc_out: endpoint {
583760 remote-endpoint = <&opa_in>;
584761 ti,channels = <1>;
....@@ -596,27 +773,27 @@
596773 interrupt-parent = <&gpmc>;
597774 interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
598775 <1 IRQ_TYPE_NONE>; /* termcount */
776
+ ti,nand-ecc-opt = "ham1";
777
+ rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
599778 nand-bus-width = <16>;
600
- ti,nand-ecc-opt = "bch8";
779
+ #address-cells = <1>;
780
+ #size-cells = <1>;
601781
602
- gpmc,sync-clk-ps = <0>;
782
+ gpmc,device-width = <2>;
603783 gpmc,cs-on-ns = <0>;
604784 gpmc,cs-rd-off-ns = <44>;
605785 gpmc,cs-wr-off-ns = <44>;
606786 gpmc,adv-on-ns = <6>;
607787 gpmc,adv-rd-off-ns = <34>;
608788 gpmc,adv-wr-off-ns = <44>;
609
- gpmc,we-off-ns = <40>;
610789 gpmc,oe-off-ns = <54>;
790
+ gpmc,we-off-ns = <40>;
611791 gpmc,access-ns = <64>;
612792 gpmc,rd-cycle-ns = <82>;
613793 gpmc,wr-cycle-ns = <82>;
614794 gpmc,wr-access-ns = <40>;
615795 gpmc,wr-data-mux-bus-ns = <0>;
616
- gpmc,device-width = <2>;
617
-
618
- #address-cells = <1>;
619
- #size-cells = <1>;
796
+ gpmc,sync-clk-ps = <0>;
620797
621798 x-loader@0 {
622799 label = "X-Loader";
....@@ -645,8 +822,31 @@
645822 };
646823 };
647824
648
-&mcbsp2 {
825
+&mcbsp1 { /* FM Transceiver PCM */
649826 status = "okay";
827
+ #sound-dai-cells = <0>;
828
+ pinctrl-names = "default";
829
+ pinctrl-0 = <&mcbsp1_pins>;
830
+};
831
+
832
+&mcbsp2 { /* TPS65950 I2S */
833
+ status = "okay";
834
+ pinctrl-names = "default";
835
+ pinctrl-0 = <&mcbsp2_pins>;
836
+};
837
+
838
+&mcbsp3 { /* Bluetooth PCM */
839
+ status = "okay";
840
+ #sound-dai-cells = <0>;
841
+ pinctrl-names = "default";
842
+ pinctrl-0 = <&mcbsp3_pins>;
843
+};
844
+
845
+&mcbsp4 { /* GSM voice PCM */
846
+ status = "okay";
847
+ #sound-dai-cells = <0>;
848
+ pinctrl-names = "default";
849
+ pinctrl-0 = <&mcbsp4_pins>;
650850 };
651851
652852 &hdqw1w {
....@@ -654,6 +854,22 @@
654854 pinctrl-0 = <&hdq_pins>;
655855 };
656856
657
-&mcbsp4 {
658
- status = "okay";
857
+/* image signal processor within OMAP3 SoC */
858
+&isp {
859
+ ports {
860
+ port@0 {
861
+ reg = <0>;
862
+ parallel_ep: endpoint {
863
+ ti,isp-clock-divisor = <1>;
864
+ ti,strobe-mode;
865
+ bus-width = <8>;/* Used data lines */
866
+ data-shift = <2>; /* Lines 9:2 are used */
867
+ hsync-active = <0>; /* Active low */
868
+ vsync-active = <1>; /* Active high */
869
+ data-active = <1>;/* Active high */
870
+ pclk-sample = <1>;/* Falling */
871
+ };
872
+ };
873
+ /* port@1 and port@2 are not used by GTA04 */
874
+ };
659875 };