]> git.baikalelectronics.ru Git - uboot.git/commitdiff
ARM: dts: sun7i: Sync from Linux v5.18-rc1
authorSamuel Holland <samuel@sholland.org>
Wed, 27 Apr 2022 20:31:23 +0000 (15:31 -0500)
committerAndre Przywara <andre.przywara@arm.com>
Sun, 22 May 2022 23:37:50 +0000 (00:37 +0100)
Copy the devicetree source for the A20 SoC and all existing boards
verbatim from the Linux v5.18-rc1 tag.

This commit also adds the following new board devicetrees:
 - sun7i-a20-haoyu-marsboard.dts
 - sun7i-a20-linutronix-testbox-v2.dts
 - sun7i-a20-olinuxino-lime-emmc.dts

This update includes changes to the USB PHY detection GPIO properties
which are needed to convert that driver to use the DM GPIO framework.

Signed-off-by: Samuel Holland <samuel@sholland.org>
[Andre: fix Mele M5 U-Boot only DT]
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
28 files changed:
arch/arm/dts/Makefile
arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts
arch/arm/dts/sun7i-a20-bananapi.dts
arch/arm/dts/sun7i-a20-bananapro.dts
arch/arm/dts/sun7i-a20-cubieboard2.dts
arch/arm/dts/sun7i-a20-cubietruck.dts
arch/arm/dts/sun7i-a20-haoyu-marsboard.dts [new file with mode: 0644]
arch/arm/dts/sun7i-a20-hummingbird.dts
arch/arm/dts/sun7i-a20-i12-tvbox.dts
arch/arm/dts/sun7i-a20-icnova-swac.dts
arch/arm/dts/sun7i-a20-itead-ibox.dts
arch/arm/dts/sun7i-a20-lamobo-r1.dts
arch/arm/dts/sun7i-a20-linutronix-testbox-v2.dts [new file with mode: 0644]
arch/arm/dts/sun7i-a20-m3.dts
arch/arm/dts/sun7i-a20-m5.dts
arch/arm/dts/sun7i-a20-olimex-som-evb.dts
arch/arm/dts/sun7i-a20-olimex-som204-evb.dts
arch/arm/dts/sun7i-a20-olinuxino-lime-emmc.dts [new file with mode: 0644]
arch/arm/dts/sun7i-a20-olinuxino-lime.dts
arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
arch/arm/dts/sun7i-a20-olinuxino-micro.dts
arch/arm/dts/sun7i-a20-orangepi-mini.dts
arch/arm/dts/sun7i-a20-orangepi.dts
arch/arm/dts/sun7i-a20-pcduino3-nano.dts
arch/arm/dts/sun7i-a20-pcduino3.dts
arch/arm/dts/sun7i-a20-wexler-tab7200.dts
arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
arch/arm/dts/sun7i-a20.dtsi

index 83630af4f67bfc8576ef3122cb084f81bc0f2452..08d38fe6e7756af93b1705f1b22f0d4b835f5b66 100644 (file)
@@ -582,11 +582,13 @@ dtb-$(CONFIG_MACH_SUN7I) += \
        sun7i-a20-bananapro.dtb \
        sun7i-a20-cubieboard2.dtb \
        sun7i-a20-cubietruck.dtb \
+       sun7i-a20-haoyu-marsboard.dtb \
        sun7i-a20-hummingbird.dtb \
        sun7i-a20-i12-tvbox.dtb \
        sun7i-a20-icnova-swac.dtb \
        sun7i-a20-itead-ibox.dtb \
        sun7i-a20-lamobo-r1.dtb \
+       sun7i-a20-linutronix-testbox-v2.dtb \
        sun7i-a20-m3.dtb \
        sun7i-a20-m5.dtb \
        sun7i-a20-mk808c.dtb \
@@ -594,6 +596,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
        sun7i-a20-olimex-som204-evb.dtb \
        sun7i-a20-olimex-som204-evb-emmc.dtb \
        sun7i-a20-olinuxino-lime.dtb \
+       sun7i-a20-olinuxino-lime-emmc.dtb \
        sun7i-a20-olinuxino-lime2.dtb \
        sun7i-a20-olinuxino-lime2-emmc.dtb \
        sun7i-a20-olinuxino-micro.dtb \
index 4dbcad1343b5b07e1dc7d692c75e8ea28bd2589f..caa935ca4f190bccf9f8ddac7ab8ddb89bb6633e 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               green {
+               led-0 {
                        label = "bananapi-m1-plus:green:usr";
                        gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
                };
 
-               pwr {
+               led-1 {
                        label = "bananapi-m1-plus:pwr:usr";
                        gpios = <&pio 7 25 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_rgmii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "rgmii-id";
        phy-supply = <&reg_gmac_3v3>;
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &hdmi {
        status = "okay";
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
index 33040c43bce7b454f28008b8b7b0abbb4a2dbdf6..46ecf9db2324c13ceb843fc11643efdea4770089 100644 (file)
@@ -77,7 +77,7 @@
        leds {
                compatible = "gpio-leds";
 
-               green {
+               led {
                        label = "bananapi:green:usr";
                        gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
                };
 
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
-       operating-points = <
+       operating-points =
                /* kHz    uV */
-               960000  1400000
-               912000  1400000
-               864000  1350000
-               720000  1250000
-               528000  1150000
-               312000  1100000
-               144000  1050000
-               >;
+               <960000 1400000>,
+               <912000 1400000>,
+               <864000 1350000>,
+               <720000 1250000>,
+               <528000 1150000>,
+               <312000 1100000>,
+               <144000 1050000>;
 };
 
 &de {
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_rgmii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "rgmii-id";
        phy-supply = <&reg_gmac_3v3>;
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &hdmi {
        status = "okay";
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
                        "SPI-MISO", "SPI-CE1", "",
                "IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "",
                "", "", "", "", "", "", "", "";
-
-       usb0_id_detect_pin: usb0-id-detect-pin {
-               pins = "PH4";
-               function = "gpio_in";
-               bias-pull-up;
-       };
 };
 
 #include "axp209.dtsi"
 };
 
 &usbphy {
-       pinctrl-names = "default";
-       pinctrl-0 = <&usb0_id_detect_pin>;
-       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
        usb0_vbus_power-supply = <&usb_power_supply>;
        usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
index 8a75545e22857c1102bd14a0e555ab3f27bab9d2..e22f0e8bb17a77b1e1f008f2cb533a2ce9d7c60d 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               blue {
+               led-0 {
                        label = "bananapro:blue:usr";
                        gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>;
                };
 
-               green {
+               led-1 {
                        label = "bananapro:green:usr";
                        gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
                };
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_rgmii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "rgmii-id";
        phy-supply = <&reg_gmac_3v3>;
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &i2c0 {
        status = "okay";
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
index 200685b0b1cb2ae30ccf06f81ca7cd0e8eb787f2..e35e6990c4b2d2550f72f167f55ef44e21347940 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               blue {
+               led-0 {
                        label = "cubieboard2:blue:usr";
                        gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
                };
 
-               green {
+               led-1 {
                        label = "cubieboard2:green:usr";
                        gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
                };
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_mii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "mii";
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &hdmi {
        status = "okay";
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &ohci0 {
        status = "okay";
 };
        status = "okay";
 };
 
-&pio {
-       usb0_id_detect_pin: usb0-id-detect-pin {
-               pins = "PH4";
-               function = "gpio_in";
-               bias-pull-up;
-       };
-};
-
 &reg_ahci_5v {
        status = "okay";
 };
 };
 
 &usbphy {
-       pinctrl-names = "default";
-       pinctrl-0 = <&usb0_id_detect_pin>;
-       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index 46a9f4669e143a7ce9d27f7e290edae06dfe0194..52160e3683049aa83e4c106e8506a04a87691fef 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               blue {
+               led-0 {
                        label = "cubietruck:blue:usr";
                        gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
                };
 
-               orange {
+               led-1 {
                        label = "cubietruck:orange:usr";
                        gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
                };
 
-               white {
+               led-2 {
                        label = "cubietruck:white:usr";
                        gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>;
                };
 
-               green {
+               led-3 {
                        label = "cubietruck:green:usr";
                        gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>;
                };
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_rgmii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "rgmii-id";
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &hdmi {
        status = "okay";
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
diff --git a/arch/arm/dts/sun7i-a20-haoyu-marsboard.dts b/arch/arm/dts/sun7i-a20-haoyu-marsboard.dts
new file mode 100644 (file)
index 0000000..097e479
--- /dev/null
@@ -0,0 +1,182 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2021 Conley Lee
+ * Conley Lee <conleylee@foxmail.com>
+ */
+
+/dts-v1/;
+#include "sun7i-a20.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       model = "HAOYU Electronics Marsboard A20";
+       compatible = "haoyu,a20-marsboard", "allwinner,sun7i-a20";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       hdmi-connector {
+               compatible = "hdmi-connector";
+               type = "a";
+
+               port {
+                       hdmi_con_in: endpoint {
+                               remote-endpoint = <&hdmi_out_con>;
+                       };
+               };
+       };
+};
+
+&ahci {
+       target-supply = <&reg_ahci_5v>;
+       status = "okay";
+};
+
+&codec {
+       status = "okay";
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
+
+&de {
+       status = "okay";
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&gmac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&gmac_mii_pins>, <&gmac_txerr>;
+       phy-handle = <&phy0>;
+       phy-mode = "mii";
+       status = "okay";
+};
+
+&hdmi {
+       status = "okay";
+};
+
+&hdmi_out {
+       hdmi_out_con: endpoint {
+               remote-endpoint = <&hdmi_con_in>;
+       };
+};
+
+&i2c0 {
+       status = "okay";
+
+       axp209: pmic@34 {
+               reg = <0x34>;
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+       };
+};
+
+&mmc0 {
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 7 10 GPIO_ACTIVE_LOW>; /* PH10 */
+       status = "okay";
+};
+
+&gmac_mdio {
+       phy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
+&ohci0 {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&otg_sram {
+       status = "okay";
+};
+
+&pio {
+       gmac_txerr: gmac-txerr-pin {
+               pins = "PA17";
+               function = "gmac";
+       };
+};
+
+&reg_ahci_5v {
+       status = "okay";
+};
+
+#include "axp209.dtsi"
+
+&ac_power_supply {
+       status = "okay";
+};
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1450000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
+&reg_usb1_vbus {
+       status = "okay";
+};
+
+&reg_usb2_vbus {
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pb_pins>;
+       status = "okay";
+};
+
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usbphy {
+       usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+       usb1_vbus-supply = <&reg_usb1_vbus>;
+       usb2_vbus-supply = <&reg_usb2_vbus>;
+       status = "okay";
+};
index fd0153f65685618edacc77875d49fb558e3f9f4e..3def2a33059810a3b3e18c4d491aad6c54998ebd 100644 (file)
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_rgmii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "rgmii";
        phy-supply = <&reg_gmac_vdd>;
-       /* phy reset config */
-       snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */
-       snps,reset-active-low;
-       /* wait 1s after reset, otherwise fail to read phy id */
-       snps,reset-delays-us = <0 10000 1000000>;
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &i2c0 {
        status = "okay";
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+               reset-gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
+               reset-assert-us = <10000>;
+               /* wait 1s after reset, otherwise fail to read phy id */
+               reset-deassert-us = <1000000>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v0>;
        bus-width = <4>;
index 5f1c4f573d3eac3cbb3c900014119b97a629a78f..b21ddd0ec1c2218210e4b1ab517976fe7c24b1c9 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               red {
+               led-0 {
                        label = "i12_tvbox:red:usr";
                        gpios = <&pio 7 9 GPIO_ACTIVE_LOW>;
                };
 
-               blue {
+               led-1 {
                        label = "i12_tvbox:blue:usr";
                        gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
                };
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_mii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "mii";
        phy-supply = <&reg_gmac_3v3>;
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &i2c0 {
        status = "okay";
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
index 949494730aee9cfba54624b0cd6b7985481dcef8..413505f45a81e2e5af8b211f538c2ab98580c749 100644 (file)
@@ -49,7 +49,8 @@
 
 / {
        model = "ICnova-A20 SWAC";
-       compatible = "swac,icnova-a20-swac", "incircuit,icnova-a20", "allwinner,sun7i-a20";
+       compatible = "incircuit,icnova-a20-swac", "incircuit,icnova-a20",
+                    "allwinner,sun7i-a20";
 
        aliases {
                serial0 = &uart0;
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_mii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "mii";
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &i2c0 {
        status = "okay";
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
index b90a7607d0699514738ae04bb43f72c1e92b60cd..8ff83016ff5af164dc09c16770baad699e837ac1 100644 (file)
                pinctrl-names = "default";
                pinctrl-0 = <&led_pins_itead_core>;
 
-               green {
+               led-0 {
                        label = "itead_core:green:usr";
                        gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
 
-               blue {
+               led-1 {
                        label = "itead_core:blue:usr";
                        gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_mii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "mii";
        status = "okay";
+};
 
+&gmac_mdio {
        phy1: ethernet-phy@1 {
                reg = <1>;
        };
index f91e1bee44e8c3454d5214f72df87726adfb91a4..97518afe4658af5aac8d1e78c46e4c2c66ce3459 100644 (file)
@@ -75,7 +75,7 @@
        leds {
                compatible = "gpio-leds";
 
-               green {
+               led {
                        label = "lamobo_r1:green:usr";
                        gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
                };
        phy-mode = "rgmii";
        phy-supply = <&reg_gmac_3v3>;
        status = "okay";
-       /delete-property/#address-cells;
-       /delete-property/#size-cells;
 
        fixed-link {
                speed = <1000>;
        status = "okay";
 };
 
-&pio {
-       usb0_id_detect_pin: usb0-id-detect-pin {
-               pins = "PH4";
-               function = "gpio_in";
-               bias-pull-up;
-       };
-};
-
 #include "axp209.dtsi"
 
 &ac_power_supply {
 };
 
 &usbphy {
-       pinctrl-names = "default";
-       pinctrl-0 = <&usb0_id_detect_pin>;
-       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
        usb0_vbus_power-supply = <&usb_power_supply>;
        usb0_vbus-supply = <&reg_usb0_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
diff --git a/arch/arm/dts/sun7i-a20-linutronix-testbox-v2.dts b/arch/arm/dts/sun7i-a20-linutronix-testbox-v2.dts
new file mode 100644 (file)
index 0000000..da5a2ee
--- /dev/null
@@ -0,0 +1,47 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright 2020 Linutronix GmbH
+ * Author: Benedikt Spranger <b.spranger@linutronix.de>
+ */
+
+/dts-v1/;
+#include "sun7i-a20-lamobo-r1.dts"
+
+/ {
+       model = "Lamobo R1";
+       compatible = "linutronix,testbox-v2", "lamobo,lamobo-r1", "allwinner,sun7i-a20";
+
+       leds {
+               led-opto1 {
+                       label = "lamobo_r1:opto:powerswitch";
+                       gpios = <&pio 7 3 GPIO_ACTIVE_HIGH>;
+               };
+
+               led-opto2 {
+                       label = "lamobo_r1:opto:relay";
+                       gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>;
+               };
+       };
+};
+
+&i2c2 {
+       clock-frequency = <100000>;
+       status = "okay";
+
+       eeprom: eeprom@50 {
+               compatible = "atmel,24c08";
+               reg = <0x50>;
+               status = "okay";
+       };
+
+       atecc508a@60 {
+               compatible = "atmel,atecc508a";
+               reg = <0x60>;
+       };
+};
+
+&can0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&can_ph_pins>;
+       status = "okay";
+};
index b8a1aaaf3976527d6bea57966a60f5b3868132a6..f161d523886048380347dcf7f51eda374185d094 100644 (file)
@@ -64,7 +64,7 @@
        leds {
                compatible = "gpio-leds";
 
-               blue {
+               led {
                        label = "m3:blue:usr";
                        gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
                };
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_mii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "mii";
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &i2c0 {
        status = "okay";
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
index 6de52c7c314fb2efa79357ca96aa696682ffb1b8..cfbc50d9e55969d03092298d1f3701b8f824ed55 100644 (file)
@@ -39,7 +39,9 @@
        phy = <&phy1>;
        phy-mode = "mii";
        status = "okay";
+};
 
+&gmac_mdio {
        phy1: ethernet-phy@1 {
                reg = <1>;
        };
index f0e6a96e5785bcd1f1721a97ba15bf9667be4f97..f05ee32bc9cb6abb97bf930738a8a372e1097b89 100644 (file)
@@ -75,7 +75,7 @@
        leds {
                compatible = "gpio-leds";
 
-               green {
+               led {
                        label = "a20-olimex-som-evb:green:usr";
                        gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_rgmii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "rgmii";
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &hdmi {
        };
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
index 823aabce046253fac96dbd92e96771a7c0e40d74..54af6c18075b50dca6f008e0d5f3d61333ddde41 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               stat {
+               led-0 {
                        label = "a20-som204-evb:green:stat";
                        gpios = <&pio 8 0 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
 
-               led1 {
+               led-1 {
                        label = "a20-som204-evb:green:led1";
                        gpios = <&pio 8 10 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
 
-               led2 {
+               led-2 {
                        label = "a20-som204-evb:yellow:led2";
                        gpios = <&pio 8 11 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_rgmii_pins>;
-       phy = <&phy3>;
+       phy-handle = <&phy3>;
        phy-mode = "rgmii";
        phy-supply = <&reg_vcc3v3>;
-
-       snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>;
-       snps,reset-active-low;
-       snps,reset-delays-us = <0 10000 1000000>;
        status = "okay";
-
-       phy3: ethernet-phy@3 {
-               reg = <3>;
-       };
 };
 
 &hdmi {
        status = "okay";
 };
 
+&gmac_mdio {
+       phy3: ethernet-phy@3 {
+               reg = <3>;
+               reset-gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
+               reset-assert-us = <10000>;
+               /* wait 1s after reset, otherwise fail to read phy id */
+               reset-deassert-us = <1000000>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
 };
 
 &usbphy {
-       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-       usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+       usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
        usb0_vbus_power-supply = <&usb_power_supply>;
        usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
diff --git a/arch/arm/dts/sun7i-a20-olinuxino-lime-emmc.dts b/arch/arm/dts/sun7i-a20-olinuxino-lime-emmc.dts
new file mode 100644 (file)
index 0000000..033cab3
--- /dev/null
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2020 Olimex Ltd.
+ *   Author: Stefan Mavrodiev <stefan@olimex.com>
+ */
+
+#include "sun7i-a20-olinuxino-lime.dts"
+
+/ {
+       model = "Olimex A20-OLinuXino-LIME-eMMC";
+       compatible = "olimex,a20-olinuxino-lime-emmc", "allwinner,sun7i-a20";
+
+       mmc2_pwrseq: pwrseq {
+               compatible = "mmc-pwrseq-emmc";
+               reset-gpios = <&pio 2 16 GPIO_ACTIVE_LOW>;
+       };
+};
+
+&mmc2 {
+       vmmc-supply = <&reg_vcc3v3>;
+       vqmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       non-removable;
+       mmc-pwrseq = <&mmc2_pwrseq>;
+       status = "okay";
+
+       emmc: emmc@0 {
+               reg = <0>;
+               compatible = "mmc-card";
+               broken-hpi;
+       };
+};
index 5e411194bf62bbd876176c2e30ecbeea128d82b4..92938d0222956bd320d560ad1701a7e4d1879759 100644 (file)
@@ -78,7 +78,7 @@
                pinctrl-names = "default";
                pinctrl-0 = <&led_pins_olinuxinolime>;
 
-               green {
+               led {
                        label = "a20-olinuxino-lime:green:usr";
                        gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_mii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "mii";
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &hdmi {
        };
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
                function = "gpio_out";
                drive-strength = <20>;
        };
-
-       usb0_id_detect_pin: usb0-id-detect-pin {
-               pins = "PH4";
-               function = "gpio_in";
-               bias-pull-up;
-       };
-
-       usb0_vbus_detect_pin: usb0-vbus-detect-pin {
-               pins = "PH5";
-               function = "gpio_in";
-               bias-pull-down;
-       };
 };
 
 &reg_ahci_5v {
 };
 
 &usbphy {
-       pinctrl-names = "default";
-       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-       usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+       usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+       usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
        usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
index 996201665b7e6b82d92120cd97c8050c57c20610..ecb91fb899ff3db1d1bb0bc54da12ce069be7586 100644 (file)
@@ -75,7 +75,7 @@
                pinctrl-names = "default";
                pinctrl-0 = <&led_pins_olinuxinolime>;
 
-               green {
+               led {
                        label = "a20-olinuxino-lime2:green:usr";
                        gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_rgmii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "rgmii-id";
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &hdmi {
        vref-supply = <&reg_vcc3v0>;
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
 };
 
 &pio {
+       vcc-pa-supply = <&reg_vcc3v3>;
+       vcc-pc-supply = <&reg_vcc3v3>;
+       vcc-pe-supply = <&reg_ldo3>;
+       vcc-pf-supply = <&reg_vcc3v3>;
+       vcc-pg-supply = <&reg_ldo4>;
+
        led_pins_olinuxinolime: led-pins {
                pins = "PH2";
                function = "gpio_out";
                drive-strength = <20>;
        };
-
-       usb0_id_detect_pin: usb0-id-detect-pin {
-               pins = "PH4";
-               function = "gpio_in";
-               bias-pull-up;
-       };
-
-       usb0_vbus_detect_pin: usb0-vbus-detect-pin {
-               pins = "PH5";
-               function = "gpio_in";
-               bias-pull-down;
-       };
 };
 
 &reg_ahci_5v {
 
 #include "axp209.dtsi"
 
+&ac_power_supply {
+       status = "okay";
+};
+
+&battery_power_supply {
+       status = "okay";
+};
+
 &reg_dcdc2 {
        regulator-always-on;
        regulator-min-microvolt = <1000000>;
 };
 
 &usbphy {
-       pinctrl-names = "default";
-       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-       usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+       usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+       usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
        usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
index 840ae1194a66d90bc71f098466ea06a03f95de4a..a1b89b2a2999426a85d42dd312097bd200cd36b8 100644 (file)
@@ -82,7 +82,7 @@
                pinctrl-names = "default";
                pinctrl-0 = <&led_pins_olinuxino>;
 
-               green {
+               led {
                        label = "a20-olinuxino-micro:green:usr";
                        gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_mii_pins>, <&gmac_txerr>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "mii";
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &hdmi {
        };
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
                function = "gpio_out";
                drive-strength = <20>;
        };
-
-       usb0_id_detect_pin: usb0-id-detect-pin {
-               pins = "PH4";
-               function = "gpio_in";
-               bias-pull-up;
-       };
-
-       usb0_vbus_detect_pin: usb0-vbus-detect-pin {
-               pins = "PH5";
-               function = "gpio_in";
-               bias-pull-down;
-       };
 };
 
 #include "axp209.dtsi"
 };
 
 &usbphy {
-       pinctrl-names = "default";
-       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-       usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+       usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+       usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
        usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
index 15881081cac403375ab643ca7594d4ccbf9b3a5b..84efa01e7cba04b9e9d46fe0b519301d413e0986 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               green {
+               led-0 {
                        label = "orangepi:green:usr";
                        gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
                };
 
-               blue {
+               led-1 {
                        label = "orangepi:blue:usr";
                        gpios = <&pio 7 25 GPIO_ACTIVE_HIGH>; /* PH25 */
                };
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_rgmii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "rgmii";
        phy-supply = <&reg_gmac_3v3>;
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &hdmi {
        status = "okay";
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
        status = "okay";
 };
 
-&pio {
-       usb0_id_detect_pin: usb0-id-detect-pin {
-               pins = "PH4";
-               function = "gpio_in";
-               bias-pull-up;
-       };
-};
-
 &reg_dcdc2 {
        regulator-always-on;
        regulator-min-microvolt = <1000000>;
 };
 
 &usbphy {
-       pinctrl-names = "default";
-       pinctrl-0 = <&usb0_id_detect_pin>;
-       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
        usb0_vbus_power-supply = <&usb_power_supply>;
        usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
index d64de2e73a9f5cfcf0126b973660cb82e8f51c59..5d77f1d9818f99bca7ab34672a070dfd7b78c485 100644 (file)
@@ -64,7 +64,7 @@
        leds {
                compatible = "gpio-leds";
 
-               green {
+               led {
                        label = "orangepi:green:usr";
                        gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
                };
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_rgmii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "rgmii";
        phy-supply = <&reg_gmac_3v3>;
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &i2c0 {
        status = "okay";
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
        status = "okay";
 };
 
-&pio {
-       usb0_id_detect_pin: usb0-id-detect-pin {
-               pins = "PH4";
-               function = "gpio_in";
-               bias-pull-up;
-       };
-};
-
 &reg_dcdc2 {
        regulator-always-on;
        regulator-min-microvolt = <1000000>;
 };
 
 &usbphy {
-       pinctrl-names = "default";
-       pinctrl-0 = <&usb0_id_detect_pin>;
-       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
        usb0_vbus_power-supply = <&usb_power_supply>;
        usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
index 205eaae44a039f029d1f6e1dfa2bb0943f30239e..e40ecb48d726e7f09a7defae47419e0c62fb6abc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Adam Sampson <ats@offog.org>
+ * Copyright 2015-2020 Adam Sampson <ats@offog.org>
  *
  * This file is dual-licensed: you can use it either under the terms
  * of the GPL or the X11 license, at your option. Note that this dual
        leds {
                compatible = "gpio-leds";
 
-               /* Marked "LED3" on the PCB. */
-               usr1 {
+               led-3 {
                        label = "pcduino3-nano:green:usr1";
                        gpios = <&pio 7 16 GPIO_ACTIVE_LOW>; /* PH16 */
                };
 
-               /* Marked "LED4" on the PCB. */
-               usr2 {
+               led-4 {
                        label = "pcduino3-nano:green:usr2";
                        gpios = <&pio 7 15 GPIO_ACTIVE_LOW>; /* PH15 */
                };
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_rgmii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "rgmii-id";
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &hdmi {
        status = "okay";
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
        status = "okay";
 };
 
-&pio {
-       usb0_id_detect_pin: usb0-id-detect-pin {
-               pins = "PH4";
-               function = "gpio_in";
-               bias-pull-up;
-       };
-};
-
 &reg_ahci_5v {
        gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
        status = "okay";
 };
 
 &usbphy {
-       pinctrl-names = "default";
-       pinctrl-0 = <&usb0_id_detect_pin>;
-       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb1_vbus>;
        status = "okay";
index a72ed4318d044fc3bc844010777118d6921adf7e..4f8d55d3ba79c73e2f35edbc245908b3df663a24 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               tx {
+               led-0 {
                        label = "pcduino3:green:tx";
                        gpios = <&pio 7 15 GPIO_ACTIVE_LOW>;
                };
 
-               rx {
+               led-1 {
                        label = "pcduino3:green:rx";
                        gpios = <&pio 7 16 GPIO_ACTIVE_LOW>;
                };
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_mii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "mii";
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &i2c0 {
        status = "okay";
 };
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
        status = "okay";
 };
 
-&pio {
-       usb0_id_detect_pin: usb0-id-detect-pin {
-               pins = "PH4";
-               function = "gpio_in";
-               bias-pull-up;
-       };
-};
-
 &reg_ahci_5v {
        gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>;
        status = "okay";
 };
 
 &usbphy {
-       pinctrl-names = "default";
-       pinctrl-0 = <&usb0_id_detect_pin>;
-       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index ffade253d129614f6821040daf6e56db839ec7f7..fef02fcbbdf82c2c4ab5b27855727585ff6c97e7 100644 (file)
@@ -64,6 +64,7 @@
                brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
                default-brightness-level = <8>;
                enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+               power-supply = <&reg_vcc3v3>;
        };
 
        chosen {
        status = "okay";
 };
 
-&pio {
-       usb0_id_detect_pin: usb0-id-detect-pin {
-               pins = "PH4";
-               function = "gpio_in";
-               bias-pull-up;
-       };
-};
-
 &pwm {
        pinctrl-names = "default";
        pinctrl-0 = <&pwm0_pin>;
 };
 
 &usbphy {
-       pinctrl-names = "default";
-       pinctrl-0 = <&usb0_id_detect_pin>;
-       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
        usb0_vbus_power-supply = <&usb_power_supply>;
        usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
index c27e56091fb19cb471b54b735cc2ffa106bcfcdc..3bfae98f3cc3a18e6d312ced1337acb9340e397f 100644 (file)
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_rgmii_pins>;
-       phy = <&phy1>;
+       phy-handle = <&phy1>;
        phy-mode = "rgmii";
        status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
 };
 
 &i2c0 {
 
 #include "axp209.dtsi"
 
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
        status = "okay";
 };
 
-&pio {
-       usb0_id_detect_pin: usb0-id-detect-pin {
-               pins = "PH4";
-               function = "gpio_in";
-               bias-pull-up;
-       };
-};
-
 &reg_dcdc2 {
        regulator-always-on;
        regulator-min-microvolt = <1000000>;
 };
 
 &usbphy {
-       pinctrl-names = "default";
-       pinctrl-0 = <&usb0_id_detect_pin>;
-       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
        usb0_vbus_power-supply = <&usb_power_supply>;
        usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
index 641a8fa6d4289a6d90642def481b82d92a7dee48..5574299685ab5c614fa8aa0df413aec798ea9c94 100644 (file)
@@ -47,6 +47,7 @@
 #include <dt-bindings/dma/sun4i-a10.h>
 #include <dt-bindings/clock/sun7i-a20-ccu.h>
 #include <dt-bindings/reset/sun4i-a10-ccu.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
        interrupt-parent = <&gic>;
                        reg = <0>;
                        clocks = <&ccu CLK_CPU>;
                        clock-latency = <244144>; /* 8 32k periods */
-                       operating-points = <
+                       operating-points =
                                /* kHz    uV */
-                               960000  1400000
-                               912000  1400000
-                               864000  1300000
-                               720000  1200000
-                               528000  1100000
-                               312000  1000000
-                               144000  1000000
-                               >;
+                               <960000 1400000>,
+                               <912000 1400000>,
+                               <864000 1300000>,
+                               <720000 1200000>,
+                               <528000 1100000>,
+                               <312000 1000000>,
+                               <144000 1000000>;
                        #cooling-cells = <2>;
                };
 
                        reg = <1>;
                        clocks = <&ccu CLK_CPU>;
                        clock-latency = <244144>; /* 8 32k periods */
-                       operating-points = <
+                       operating-points =
                                /* kHz    uV */
-                               960000  1400000
-                               912000  1400000
-                               864000  1300000
-                               720000  1200000
-                               528000  1100000
-                               312000  1000000
-                               144000  1000000
-                               >;
+                               <960000 1400000>,
+                               <912000 1400000>,
+                               <864000 1300000>,
+                               <720000 1200000>,
+                               <528000 1100000>,
+                               <312000 1000000>,
+                               <144000 1000000>;
                        #cooling-cells = <2>;
                };
        };
 
        thermal-zones {
-               cpu_thermal {
+               cpu-thermal {
                        /* milliseconds */
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
                default-pool {
                        compatible = "shared-dma-pool";
                        size = <0x6000000>;
-                       alloc-ranges = <0x4a000000 0x6000000>;
+                       alloc-ranges = <0x40000000 0x10000000>;
                        reusable;
                        linux,cma-default;
                };
                        #dma-cells = <2>;
                };
 
-               nfc: nand@1c03000 {
+               nfc: nand-controller@1c03000 {
                        compatible = "allwinner,sun4i-a10-nand";
                        reg = <0x01c03000 0x1000>;
                        interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
                        num-cs = <1>;
                };
 
+               csi0: csi@1c09000 {
+                       compatible = "allwinner,sun7i-a20-csi0";
+                       reg = <0x01c09000 0x1000>;
+                       interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_AHB_CSI0>, <&ccu CLK_CSI_SCLK>, <&ccu CLK_DRAM_CSI0>;
+                       clock-names = "bus", "isp", "ram";
+                       resets = <&ccu RST_CSI0>;
+                       status = "disabled";
+               };
+
                emac: ethernet@1c0b000 {
                        compatible = "allwinner,sun4i-a10-emac";
                        reg = <0x01c0b000 0x1000>;
                };
 
                tcon0: lcd-controller@1c0c000 {
-                       compatible = "allwinner,sun7i-a20-tcon";
+                       compatible = "allwinner,sun7i-a20-tcon0",
+                                    "allwinner,sun7i-a20-tcon";
                        reg = <0x01c0c000 0x1000>;
                        interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
-                       resets = <&ccu RST_TCON0>;
-                       reset-names = "lcd";
+                       resets = <&ccu RST_TCON0>, <&ccu RST_LVDS>;
+                       reset-names = "lcd", "lvds";
                        clocks = <&ccu CLK_AHB_LCD0>,
                                 <&ccu CLK_TCON0_CH0>,
                                 <&ccu CLK_TCON0_CH1>;
                                      "tcon-ch0",
                                      "tcon-ch1";
                        clock-output-names = "tcon0-pixel-clock";
+                       #clock-cells = <0>;
                        dmas = <&dma SUN4I_DMA_DEDICATED 14>;
 
                        ports {
                };
 
                tcon1: lcd-controller@1c0d000 {
-                       compatible = "allwinner,sun7i-a20-tcon";
+                       compatible = "allwinner,sun7i-a20-tcon1",
+                                    "allwinner,sun7i-a20-tcon";
                        reg = <0x01c0d000 0x1000>;
                        interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
                        resets = <&ccu RST_TCON1>;
                                      "tcon-ch0",
                                      "tcon-ch1";
                        clock-output-names = "tcon1-pixel-clock";
+                       #clock-cells = <0>;
                        dmas = <&dma SUN4I_DMA_DEDICATED 15>;
 
                        ports {
                        phy-names = "usb";
                        extcon = <&usbphy 0>;
                        allwinner,sram = <&otg_sram 1>;
+                       dr_mode = "otg";
                        status = "disabled";
                };
 
                usbphy: phy@1c13400 {
                        #phy-cells = <1>;
                        compatible = "allwinner,sun7i-a20-usb-phy";
-                       reg = <0x01c13400 0x10 0x01c14800 0x4 0x01c1c800 0x4>;
+                       reg = <0x01c13400 0x10>, <0x01c14800 0x4>, <0x01c1c800 0x4>;
                        reg-names = "phy_ctrl", "pmu1", "pmu2";
                        clocks = <&ccu CLK_USB_PHY>;
                        clock-names = "usb_phy";
                        status = "disabled";
                };
 
+               csi1: csi@1c1d000 {
+                       compatible = "allwinner,sun7i-a20-csi1",
+                                    "allwinner,sun4i-a10-csi1";
+                       reg = <0x01c1d000 0x1000>;
+                       interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_AHB_CSI1>, <&ccu CLK_DRAM_CSI1>;
+                       clock-names = "bus", "ram";
+                       resets = <&ccu RST_CSI1>;
+                       status = "disabled";
+               };
+
                spi3: spi@1c1f000 {
                        compatible = "allwinner,sun4i-a10-spi";
                        reg = <0x01c1f000 0x1000>;
                        #interrupt-cells = <3>;
                        #gpio-cells = <3>;
 
+                       /omit-if-no-ref/
+                       can_pa_pins: can-pa-pins {
+                               pins = "PA16", "PA17";
+                               function = "can";
+                       };
+
+                       /omit-if-no-ref/
                        can_ph_pins: can-ph-pins {
                                pins = "PH20", "PH21";
                                function = "can";
                        };
 
+                       /omit-if-no-ref/
                        clk_out_a_pin: clk-out-a-pin {
                                pins = "PI12";
                                function = "clk_out_a";
                        };
 
+                       /omit-if-no-ref/
                        clk_out_b_pin: clk-out-b-pin {
                                pins = "PI13";
                                function = "clk_out_b";
                        };
 
+                       /omit-if-no-ref/
+                       csi0_8bits_pins: csi-8bits-pins {
+                               pins = "PE0", "PE2", "PE3", "PE4", "PE5",
+                                      "PE6", "PE7", "PE8", "PE9", "PE10",
+                                      "PE11";
+                               function = "csi0";
+                       };
+
+                       /omit-if-no-ref/
+                       csi0_clk_pin: csi-clk-pin {
+                               pins = "PE1";
+                               function = "csi0";
+                       };
+
+                       /omit-if-no-ref/
+                       csi1_8bits_pg_pins: csi1-8bits-pg-pins {
+                               pins = "PG0", "PG2", "PG3", "PG4", "PG5",
+                                      "PG6", "PG7", "PG8", "PG9", "PG10",
+                                      "PG11";
+                               function = "csi1";
+                       };
+
+                       /omit-if-no-ref/
+                       csi1_24bits_ph_pins: csi1-24bits-ph-pins {
+                               pins = "PH0", "PH1", "PH2", "PH3", "PH4",
+                                      "PH5", "PH6", "PH7", "PH8", "PH9",
+                                      "PH10", "PH11", "PH12", "PH13", "PH14",
+                                      "PH15", "PH16", "PH17", "PH18", "PH19",
+                                      "PH20", "PH21", "PH22", "PH23", "PH24",
+                                      "PH25", "PH26", "PH27";
+                               function = "csi1";
+                       };
+
+                       /omit-if-no-ref/
+                       csi1_clk_pg_pin: csi1-clk-pg-pin {
+                               pins = "PG1";
+                               function = "csi1";
+                       };
+
+                       /omit-if-no-ref/
                        emac_pa_pins: emac-pa-pins {
                                pins = "PA0", "PA1", "PA2",
                                       "PA3", "PA4", "PA5", "PA6",
                                function = "emac";
                        };
 
+                       /omit-if-no-ref/
+                       emac_ph_pins: emac-ph-pins {
+                               pins = "PH8", "PH9", "PH10", "PH11",
+                                      "PH14", "PH15", "PH16", "PH17",
+                                      "PH18", "PH19", "PH20", "PH21",
+                                      "PH22", "PH23", "PH24", "PH25",
+                                      "PH26";
+                               function = "emac";
+                       };
+
+                       /omit-if-no-ref/
                        gmac_mii_pins: gmac-mii-pins {
                                pins = "PA0", "PA1", "PA2",
                                       "PA3", "PA4", "PA5", "PA6",
                                function = "gmac";
                        };
 
+                       /omit-if-no-ref/
                        gmac_rgmii_pins: gmac-rgmii-pins {
                                pins = "PA0", "PA1", "PA2",
                                       "PA3", "PA4", "PA5", "PA6",
                                drive-strength = <40>;
                        };
 
+                       /omit-if-no-ref/
                        i2c0_pins: i2c0-pins {
                                pins = "PB0", "PB1";
                                function = "i2c0";
                        };
 
+                       /omit-if-no-ref/
                        i2c1_pins: i2c1-pins {
                                pins = "PB18", "PB19";
                                function = "i2c1";
                        };
 
+                       /omit-if-no-ref/
                        i2c2_pins: i2c2-pins {
                                pins = "PB20", "PB21";
                                function = "i2c2";
                        };
 
+                       /omit-if-no-ref/
                        i2c3_pins: i2c3-pins {
                                pins = "PI0", "PI1";
                                function = "i2c3";
                        };
 
+                       /omit-if-no-ref/
                        ir0_rx_pin: ir0-rx-pin {
                                pins = "PB4";
                                function = "ir0";
                        };
 
+                       /omit-if-no-ref/
                        ir0_tx_pin: ir0-tx-pin {
                                pins = "PB3";
                                function = "ir0";
                        };
 
+                       /omit-if-no-ref/
                        ir1_rx_pin: ir1-rx-pin {
                                pins = "PB23";
                                function = "ir1";
                        };
 
+                       /omit-if-no-ref/
                        ir1_tx_pin: ir1-tx-pin {
                                pins = "PB22";
                                function = "ir1";
                        };
 
+                       /omit-if-no-ref/
+                       lcd_lvds0_pins: lcd-lvds0-pins {
+                               pins = "PD0", "PD1", "PD2", "PD3", "PD4",
+                                      "PD5", "PD6", "PD7", "PD8", "PD9";
+                               function = "lvds0";
+                       };
+
+                       /omit-if-no-ref/
+                       lcd_lvds1_pins: lcd-lvds1-pins {
+                               pins = "PD10", "PD11", "PD12", "PD13", "PD14",
+                                      "PD15", "PD16", "PD17", "PD18", "PD19";
+                               function = "lvds1";
+                       };
+
+                       /omit-if-no-ref/
                        mmc0_pins: mmc0-pins {
                                pins = "PF0", "PF1", "PF2",
                                       "PF3", "PF4", "PF5";
                                bias-pull-up;
                        };
 
+                       /omit-if-no-ref/
                        mmc2_pins: mmc2-pins {
                                pins = "PC6", "PC7", "PC8",
                                       "PC9", "PC10", "PC11";
                                bias-pull-up;
                        };
 
+                       /omit-if-no-ref/
                        mmc3_pins: mmc3-pins {
                                pins = "PI4", "PI5", "PI6",
                                       "PI7", "PI8", "PI9";
                                bias-pull-up;
                        };
 
+                       /omit-if-no-ref/
                        ps2_0_pins: ps2-0-pins {
                                pins = "PI20", "PI21";
                                function = "ps2";
                        };
 
+                       /omit-if-no-ref/
                        ps2_1_ph_pins: ps2-1-ph-pins {
                                pins = "PH12", "PH13";
                                function = "ps2";
                        };
 
+                       /omit-if-no-ref/
                        pwm0_pin: pwm0-pin {
                                pins = "PB2";
                                function = "pwm";
                        };
 
+                       /omit-if-no-ref/
                        pwm1_pin: pwm1-pin {
                                pins = "PI3";
                                function = "pwm";
                        };
 
+                       /omit-if-no-ref/
                        spdif_tx_pin: spdif-tx-pin {
                                pins = "PB13";
                                function = "spdif";
                                bias-pull-up;
                        };
 
+                       /omit-if-no-ref/
                        spi0_pi_pins: spi0-pi-pins {
                                pins = "PI11", "PI12", "PI13";
                                function = "spi0";
                        };
 
+                       /omit-if-no-ref/
                        spi0_cs0_pi_pin: spi0-cs0-pi-pin {
                                pins = "PI10";
                                function = "spi0";
                        };
 
+                       /omit-if-no-ref/
                        spi0_cs1_pi_pin: spi0-cs1-pi-pin {
                                pins = "PI14";
                                function = "spi0";
                        };
 
+                       /omit-if-no-ref/
                        spi1_pi_pins: spi1-pi-pins {
                                pins = "PI17", "PI18", "PI19";
                                function = "spi1";
                        };
 
+                       /omit-if-no-ref/
                        spi1_cs0_pi_pin: spi1-cs0-pi-pin {
                                pins = "PI16";
                                function = "spi1";
                        };
 
+                       /omit-if-no-ref/
                        spi2_pb_pins: spi2-pb-pins {
                                pins = "PB15", "PB16", "PB17";
                                function = "spi2";
                        };
 
+                       /omit-if-no-ref/
                        spi2_cs0_pb_pin: spi2-cs0-pb-pin {
                                pins = "PB14";
                                function = "spi2";
                        };
 
+                       /omit-if-no-ref/
                        spi2_pc_pins: spi2-pc-pins {
                                pins = "PC20", "PC21", "PC22";
                                function = "spi2";
                        };
 
+                       /omit-if-no-ref/
                        spi2_cs0_pc_pin: spi2-cs0-pc-pin {
                                pins = "PC19";
                                function = "spi2";
                        };
 
+                       /omit-if-no-ref/
                        uart0_pb_pins: uart0-pb-pins {
                                pins = "PB22", "PB23";
                                function = "uart0";
                        };
 
+                       /omit-if-no-ref/
+                       uart0_pf_pins: uart0-pf-pins {
+                               pins = "PF2", "PF4";
+                               function = "uart0";
+                       };
+
+                       /omit-if-no-ref/
+                       uart1_pa_pins: uart1-pa-pins {
+                               pins = "PA10", "PA11";
+                               function = "uart1";
+                       };
+
+                       /omit-if-no-ref/
+                       uart1_cts_rts_pa_pins: uart1-cts-rts-pa-pins {
+                               pins = "PA12", "PA13";
+                               function = "uart1";
+                       };
+
+                       /omit-if-no-ref/
+                       uart2_pa_pins: uart2-pa-pins {
+                               pins = "PA2", "PA3";
+                               function = "uart2";
+                       };
+
+                       /omit-if-no-ref/
+                       uart2_cts_rts_pa_pins: uart2-cts-rts-pa-pins {
+                               pins = "PA0", "PA1";
+                               function = "uart2";
+                       };
+
+                       /omit-if-no-ref/
                        uart2_pi_pins: uart2-pi-pins {
                                pins = "PI18", "PI19";
                                function = "uart2";
                        };
 
+                       /omit-if-no-ref/
                        uart2_cts_rts_pi_pins: uart2-cts-rts-pi-pins {
                                pins = "PI16", "PI17";
                                function = "uart2";
                        };
 
+                       /omit-if-no-ref/
                        uart3_pg_pins: uart3-pg-pins {
                                pins = "PG6", "PG7";
                                function = "uart3";
                        };
 
+                       /omit-if-no-ref/
                        uart3_cts_rts_pg_pins: uart3-cts-rts-pg-pins {
                                pins = "PG8", "PG9";
                                function = "uart3";
                        };
 
+                       /omit-if-no-ref/
                        uart3_ph_pins: uart3-ph-pins {
                                pins = "PH0", "PH1";
                                function = "uart3";
                        };
 
+                       /omit-if-no-ref/
+                       uart3_cts_rts_ph_pins: uart3-cts-rts-ph-pins {
+                               pins = "PH2", "PH3";
+                               function = "uart3";
+                       };
+
+                       /omit-if-no-ref/
                        uart4_pg_pins: uart4-pg-pins {
                                pins = "PG10", "PG11";
                                function = "uart4";
                        };
 
+                       /omit-if-no-ref/
                        uart4_ph_pins: uart4-ph-pins {
                                pins = "PH4", "PH5";
                                function = "uart4";
                        };
 
+                       /omit-if-no-ref/
+                       uart5_ph_pins: uart5-ph-pins {
+                               pins = "PH6", "PH7";
+                               function = "uart5";
+                       };
+
+                       /omit-if-no-ref/
                        uart5_pi_pins: uart5-pi-pins {
                                pins = "PI10", "PI11";
                                function = "uart5";
                        };
 
+                       /omit-if-no-ref/
+                       uart6_pa_pins: uart6-pa-pins {
+                               pins = "PA12", "PA13";
+                               function = "uart6";
+                       };
+
+                       /omit-if-no-ref/
                        uart6_pi_pins: uart6-pi-pins {
                                pins = "PI12", "PI13";
                                function = "uart6";
                        };
 
+                       /omit-if-no-ref/
+                       uart7_pa_pins: uart7-pa-pins {
+                               pins = "PA14", "PA15";
+                               function = "uart7";
+                       };
+
+                       /omit-if-no-ref/
                        uart7_pi_pins: uart7-pi-pins {
                                pins = "PI20", "PI21";
                                function = "uart7";
                wdt: watchdog@1c20c90 {
                        compatible = "allwinner,sun4i-a10-wdt";
                        reg = <0x01c20c90 0x10>;
+                       interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&osc24M>;
                };
 
                rtc: rtc@1c20d00 {
                        snps,fixed-burst;
                        snps,force_sf_dma_mode;
                        status = "disabled";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
+
+                       gmac_mdio: mdio {
+                               compatible = "snps,dwmac-mdio";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                       };
                };
 
                hstimer@1c60000 {
                };
 
                gic: interrupt-controller@1c81000 {
-                       compatible = "arm,gic-400", "arm,cortex-a7-gic", "arm,cortex-a15-gic";
+                       compatible = "arm,gic-400";
                        reg = <0x01c81000 0x1000>,
                              <0x01c82000 0x2000>,
                              <0x01c84000 0x2000>,