forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/arch/arm/boot/dts/omap4-sdp.dts
....@@ -1,14 +1,12 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
2
- * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
3
+ * Copyright (C) 2011 Texas Instruments Incorporated - https://www.ti.com/
74 */
85 /dts-v1/;
96
107 #include "omap443x.dtsi"
118 #include "elpida_ecb240abacn.dtsi"
9
+#include "omap4-mcpdm.dtsi"
1210
1311 / {
1412 model = "TI OMAP4 SDP board";
....@@ -26,6 +24,9 @@
2624 };
2725
2826 vdd_eth: fixedregulator-vdd-eth {
27
+ pinctrl-names = "default";
28
+ pinctrl-0 = <&enet_enable_gpio>;
29
+
2930 compatible = "regulator-fixed";
3031 regulator-name = "VDD_ETH";
3132 regulator-min-microvolt = <3300000>;
....@@ -243,16 +244,6 @@
243244 >;
244245 };
245246
246
- mcpdm_pins: pinmux_mcpdm_pins {
247
- pinctrl-single,pins = <
248
- OMAP4_IOPAD(0x106, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_ul_data.abe_pdm_ul_data */
249
- OMAP4_IOPAD(0x108, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_dl_data.abe_pdm_dl_data */
250
- OMAP4_IOPAD(0x10a, PIN_INPUT_PULLUP | MUX_MODE0) /* abe_pdm_frame.abe_pdm_frame */
251
- OMAP4_IOPAD(0x10c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_lb_clk.abe_pdm_lb_clk */
252
- OMAP4_IOPAD(0x10e, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_clks.abe_clks */
253
- >;
254
- };
255
-
256247 dmic_pins: pinmux_dmic_pins {
257248 pinctrl-single,pins = <
258249 OMAP4_IOPAD(0x110, PIN_OUTPUT | MUX_MODE0) /* abe_dmic_clk1.abe_dmic_clk1 */
....@@ -352,6 +343,29 @@
352343 OMAP4_IOPAD(0x152, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat3.sdmmc5_dat3 */
353344 >;
354345 };
346
+
347
+ /* gpio_48 for ENET_ENABLE */
348
+ enet_enable_gpio: pinmux_enet_enable_gpio {
349
+ pinctrl-single,pins = <
350
+ OMAP4_IOPAD(0x070, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* gpmc_a24.gpio_48 */
351
+ >;
352
+ };
353
+
354
+ ks8851_pins: pinmux_ks8851_pins {
355
+ pinctrl-single,pins = <
356
+ /* ENET_INT */
357
+ OMAP4_IOPAD(0x054, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad10.gpio_34 */
358
+ /*
359
+ * Misterious pin which makes the ethernet working
360
+ * The legacy board file requested this pin on boot
361
+ * (ETH_KS8851_QUART) and set it to high, similarly to
362
+ * the ENET_ENABLE pin.
363
+ * We could use gpio-hog to keep it high, but let's use
364
+ * it as a reset GPIO for ks8851.
365
+ */
366
+ OMAP4_IOPAD(0x13a, PIN_OUTPUT_PULLUP | MUX_MODE3) /* mcspi1_cs1.gpio_138 */
367
+ >;
368
+ };
355369 };
356370
357371 &i2c1 {
....@@ -414,7 +428,7 @@
414428
415429 /*
416430 * Temperature Sensor
417
- * http://www.ti.com/lit/ds/symlink/tmp105.pdf
431
+ * https://www.ti.com/lit/ds/symlink/tmp105.pdf
418432 */
419433 tmp105@48 {
420434 compatible = "ti,tmp105";
....@@ -439,7 +453,7 @@
439453
440454 /*
441455 * 3-Axis Digital Compass
442
- * http://www.sparkfun.com/datasheets/Sensors/Magneto/HMC5843.pdf
456
+ * https://www.sparkfun.com/datasheets/Sensors/Magneto/HMC5843.pdf
443457 */
444458 hmc5843@1e {
445459 compatible = "honeywell,hmc5843";
....@@ -452,12 +466,16 @@
452466 pinctrl-0 = <&mcspi1_pins>;
453467
454468 eth@0 {
469
+ pinctrl-names = "default";
470
+ pinctrl-0 = <&ks8851_pins>;
471
+
455472 compatible = "ks8851";
456473 spi-max-frequency = <24000000>;
457474 reg = <0>;
458475 interrupt-parent = <&gpio2>;
459476 interrupts = <2 IRQ_TYPE_LEVEL_LOW>; /* gpio line 34 */
460477 vdd-supply = <&vdd_eth>;
478
+ reset-gpios = <&gpio5 10 GPIO_ACTIVE_HIGH>;
461479 };
462480 };
463481
....@@ -494,7 +512,7 @@
494512 compatible = "ti,wl1281";
495513 reg = <2>;
496514 interrupt-parent = <&gpio1>;
497
- interrupts = <21 IRQ_TYPE_EDGE_RISING>; /* gpio 53 */
515
+ interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio 53 */
498516 ref-clock-frequency = <26000000>;
499517 tcxo-clock-frequency = <26000000>;
500518 };
....@@ -619,16 +637,6 @@
619637 status = "okay";
620638 };
621639
622
-&mcpdm {
623
- pinctrl-names = "default";
624
- pinctrl-0 = <&mcpdm_pins>;
625
-
626
- clocks = <&twl6040>;
627
- clock-names = "pdmclk";
628
-
629
- status = "okay";
630
-};
631
-
632640 &twl_usb_comparator {
633641 usb-supply = <&vusb>;
634642 };
....@@ -640,11 +648,11 @@
640648 };
641649
642650 &dss {
643
- status = "ok";
651
+ status = "okay";
644652 };
645653
646654 &dsi1 {
647
- status = "ok";
655
+ status = "okay";
648656 vdd-supply = <&vcxio>;
649657
650658 port {
....@@ -654,8 +662,9 @@
654662 };
655663 };
656664
657
- lcd0: display {
665
+ lcd0: panel@0 {
658666 compatible = "tpo,taal", "panel-dsi-cm";
667
+ reg = <0>;
659668 label = "lcd0";
660669
661670 reset-gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>; /* 102 */
....@@ -669,7 +678,7 @@
669678 };
670679
671680 &dsi2 {
672
- status = "ok";
681
+ status = "okay";
673682 vdd-supply = <&vcxio>;
674683
675684 port {
....@@ -679,8 +688,9 @@
679688 };
680689 };
681690
682
- lcd1: display {
691
+ lcd1: panel@0 {
683692 compatible = "tpo,taal", "panel-dsi-cm";
693
+ reg = <0>;
684694 label = "lcd1";
685695
686696 reset-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* 104 */
....@@ -694,7 +704,7 @@
694704 };
695705
696706 &hdmi {
697
- status = "ok";
707
+ status = "okay";
698708 vdda-supply = <&vdac>;
699709
700710 port {