hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
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";
....@@ -119,10 +147,11 @@
119147 pinctrl-0 = <&backlight_pins>;
120148 };
121149
122
- pwm11: dmtimer-pwm {
150
+ pwm11: pwm-11 {
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 */
....@@ -258,11 +332,23 @@
258332 OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT | MUX_MODE0) /* dss_data22.dss_data22 */
259333 OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE0) /* dss_data23.dss_data23 */
260334 >;
261
- };
335
+ };
336
+
337
+ gps_pins: pinmux_gps_pins {
338
+ pinctrl-single,pins = <
339
+ OMAP3_CORE1_IOPAD(0x2176, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* gpio145 */
340
+ >;
341
+ };
262342
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 };
....@@ -456,6 +609,22 @@
456609 clock-frequency = <100000>;
457610 };
458611
612
+&mcspi1 {
613
+ status = "disabled";
614
+};
615
+
616
+&mcspi2 {
617
+ status = "disabled";
618
+};
619
+
620
+&mcspi3 {
621
+ status = "disabled";
622
+};
623
+
624
+&mcspi4 {
625
+ status = "disabled";
626
+};
627
+
459628 &usb_otg_hs {
460629 interface-type = <0>;
461630 usb-phy = <&usb2_phy>;
....@@ -479,6 +648,7 @@
479648 vmmc-supply = <&vmmc1>;
480649 bus-width = <4>;
481650 ti,non-removable;
651
+ broken-cd; /* hardware has no CD */
482652 };
483653
484654 &mmc2 {
....@@ -493,8 +663,26 @@
493663 status = "disabled";
494664 };
495665
666
+#define BIT(x) (1 << (x))
667
+&twl_gpio {
668
+ /* pullups: BIT(2) */
669
+ ti,pullups = <BIT(2)>;
670
+ /*
671
+ * pulldowns:
672
+ * BIT(0), BIT(1), BIT(6), BIT(7), BIT(8), BIT(13)
673
+ * BIT(15), BIT(16), BIT(17)
674
+ */
675
+ ti,pulldowns = <(BIT(0) | BIT(1) | BIT(6) | BIT(7) | BIT(8) |
676
+ BIT(13) | BIT(15) | BIT(16) | BIT(17))>;
677
+};
678
+
496679 &twl_keypad {
497680 status = "disabled";
681
+};
682
+
683
+&gpio1 {
684
+ pinctrl-names = "default";
685
+ pinctrl-0 = <&gpio1_pins>;
498686 };
499687
500688 &uart1 {
....@@ -505,11 +693,20 @@
505693 &uart2 {
506694 pinctrl-names = "default";
507695 pinctrl-0 = <&uart2_pins>;
696
+ gnss: gnss {
697
+ compatible = "wi2wi,w2sg0004";
698
+ pinctrl-names = "default";
699
+ pinctrl-0 = <&gps_pins>;
700
+ sirf,onoff-gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>;
701
+ lna-supply = <&vsim>;
702
+ vcc-supply = <&ldo_3v3>;
703
+ };
508704 };
509705
510706 &uart3 {
511707 pinctrl-names = "default";
512708 pinctrl-0 = <&uart3_pins>;
709
+ interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>;
513710 };
514711
515712 &charger {
....@@ -527,7 +724,7 @@
527724 &vaux2 {
528725 regulator-min-microvolt = <2800000>;
529726 regulator-max-microvolt = <2800000>;
530
- regulator-always-on;
727
+ regulator-always-on; /* we should never switch off while vio is on! */
531728 };
532729
533730 /* camera */
....@@ -574,11 +771,7 @@
574771
575772 vdda-supply = <&vdac>;
576773
577
- #address-cells = <1>;
578
- #size-cells = <0>;
579
-
580774 port {
581
- reg = <0>;
582775 venc_out: endpoint {
583776 remote-endpoint = <&opa_in>;
584777 ti,channels = <1>;
....@@ -596,27 +789,27 @@
596789 interrupt-parent = <&gpmc>;
597790 interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
598791 <1 IRQ_TYPE_NONE>; /* termcount */
792
+ ti,nand-ecc-opt = "ham1";
793
+ rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
599794 nand-bus-width = <16>;
600
- ti,nand-ecc-opt = "bch8";
795
+ #address-cells = <1>;
796
+ #size-cells = <1>;
601797
602
- gpmc,sync-clk-ps = <0>;
798
+ gpmc,device-width = <2>;
603799 gpmc,cs-on-ns = <0>;
604800 gpmc,cs-rd-off-ns = <44>;
605801 gpmc,cs-wr-off-ns = <44>;
606802 gpmc,adv-on-ns = <6>;
607803 gpmc,adv-rd-off-ns = <34>;
608804 gpmc,adv-wr-off-ns = <44>;
609
- gpmc,we-off-ns = <40>;
610805 gpmc,oe-off-ns = <54>;
806
+ gpmc,we-off-ns = <40>;
611807 gpmc,access-ns = <64>;
612808 gpmc,rd-cycle-ns = <82>;
613809 gpmc,wr-cycle-ns = <82>;
614810 gpmc,wr-access-ns = <40>;
615811 gpmc,wr-data-mux-bus-ns = <0>;
616
- gpmc,device-width = <2>;
617
-
618
- #address-cells = <1>;
619
- #size-cells = <1>;
812
+ gpmc,sync-clk-ps = <0>;
620813
621814 x-loader@0 {
622815 label = "X-Loader";
....@@ -645,15 +838,54 @@
645838 };
646839 };
647840
648
-&mcbsp2 {
841
+&mcbsp1 { /* FM Transceiver PCM */
649842 status = "okay";
843
+ #sound-dai-cells = <0>;
844
+ pinctrl-names = "default";
845
+ pinctrl-0 = <&mcbsp1_pins>;
846
+};
847
+
848
+&mcbsp2 { /* TPS65950 I2S */
849
+ status = "okay";
850
+ pinctrl-names = "default";
851
+ pinctrl-0 = <&mcbsp2_pins>;
852
+};
853
+
854
+&mcbsp3 { /* Bluetooth PCM */
855
+ status = "okay";
856
+ #sound-dai-cells = <0>;
857
+ pinctrl-names = "default";
858
+ pinctrl-0 = <&mcbsp3_pins>;
859
+};
860
+
861
+&mcbsp4 { /* GSM voice PCM */
862
+ status = "okay";
863
+ #sound-dai-cells = <0>;
864
+ pinctrl-names = "default";
865
+ pinctrl-0 = <&mcbsp4_pins>;
650866 };
651867
652868 &hdqw1w {
653
- pinctrl-names = "default";
654
- pinctrl-0 = <&hdq_pins>;
869
+ pinctrl-names = "default";
870
+ pinctrl-0 = <&hdq_pins>;
655871 };
656872
657
-&mcbsp4 {
658
- status = "okay";
873
+/* image signal processor within OMAP3 SoC */
874
+&isp {
875
+ ports {
876
+ port@0 {
877
+ reg = <0>;
878
+ parallel_ep: endpoint {
879
+ ti,isp-clock-divisor = <1>;
880
+ ti,strobe-mode;
881
+ bus-width = <8>;/* Used data lines */
882
+ data-shift = <2>; /* Lines 9:2 are used */
883
+ hsync-active = <0>; /* Active low */
884
+ vsync-active = <1>; /* Active high */
885
+ data-active = <1>;/* Active high */
886
+ pclk-sample = <1>;/* Falling */
887
+ };
888
+ };
889
+ /* port@1 and port@2 are not used by GTA04 */
890
+ };
659891 };