Merge branch 'master' of git://git.denx.de/u-boot-sunxi
authorTom Rini <trini@konsulko.com>
Thu, 28 Feb 2019 19:22:50 +0000 (14:22 -0500)
committerTom Rini <trini@konsulko.com>
Thu, 28 Feb 2019 19:22:50 +0000 (14:22 -0500)
- Various Bananapi fixes

arch/arm/dts/sun50i-h5-bananapi-m2-plus.dts [new file with mode: 0644]
arch/arm/dts/sun8i-h3-bananapi-m2-plus.dts
arch/arm/dts/sunxi-bananapi-m2-plus.dtsi [new file with mode: 0644]
board/sunxi/MAINTAINERS
configs/Sinovoip_BPI_M2_Plus_defconfig [deleted file]
configs/bananapi_m2_plus_h3_defconfig [new file with mode: 0644]
configs/bananapi_m2_plus_h5_defconfig [new file with mode: 0644]

diff --git a/arch/arm/dts/sun50i-h5-bananapi-m2-plus.dts b/arch/arm/dts/sun50i-h5-bananapi-m2-plus.dts
new file mode 100644 (file)
index 0000000..3503767
--- /dev/null
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (C) 2018 Chen-Yu Tsai <wens@csie.org>
+
+/dts-v1/;
+#include "sun50i-h5.dtsi"
+#include <sunxi-bananapi-m2-plus.dtsi>
+
+/ {
+       model = "Banana Pi BPI-M2-Plus H5";
+       compatible = "sinovoip,bpi-m2-plus", "allwinner,sun50i-h5";
+};
index 30540dc8e0c5fd5c5657ca7ad725769e316bd185..195a75da13f1b87f1c571227781f40a27f4ee488 100644 (file)
 
 /dts-v1/;
 #include "sun8i-h3.dtsi"
-#include "sunxi-common-regulators.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "sunxi-bananapi-m2-plus.dtsi"
 
 / {
-       model = "Banana Pi BPI-M2-Plus";
+       model = "Banana Pi BPI-M2-Plus H3";
        compatible = "sinovoip,bpi-m2-plus", "allwinner,sun8i-h3";
-
-       aliases {
-               ethernet0 = &emac;
-               serial0 = &uart0;
-               serial1 = &uart1;
-       };
-
-       chosen {
-               stdout-path = "serial0:115200n8";
-       };
-
-       connector {
-               compatible = "hdmi-connector";
-               type = "a";
-
-               port {
-                       hdmi_con_in: endpoint {
-                               remote-endpoint = <&hdmi_out_con>;
-                       };
-               };
-       };
-
-       leds {
-               compatible = "gpio-leds";
-               pinctrl-names = "default";
-
-               pwr_led {
-                       label = "bananapi-m2-plus:red:pwr";
-                       gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
-                       default-state = "on";
-               };
-       };
-
-       gpio_keys {
-               compatible = "gpio-keys";
-               pinctrl-names = "default";
-
-               sw4 {
-                       label = "power";
-                       linux,code = <BTN_0>;
-                       gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
-               };
-       };
-
-       reg_gmac_3v3: gmac-3v3 {
-                     compatible = "regulator-fixed";
-                     regulator-name = "gmac-3v3";
-                     regulator-min-microvolt = <3300000>;
-                     regulator-max-microvolt = <3300000>;
-                     startup-delay-us = <100000>;
-                     enable-active-high;
-                     gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
-       };
-
-       wifi_pwrseq: wifi_pwrseq {
-               compatible = "mmc-pwrseq-simple";
-               pinctrl-names = "default";
-               reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
-       };
-};
-
-&de {
-       status = "okay";
-};
-
-&ehci0 {
-       status = "okay";
-};
-
-&ehci1 {
-       status = "okay";
-};
-
-&ehci2 {
-       status = "okay";
-};
-
-&emac {
-       pinctrl-names = "default";
-       pinctrl-0 = <&emac_rgmii_pins>;
-       phy-supply = <&reg_gmac_3v3>;
-       phy-handle = <&ext_rgmii_phy>;
-       phy-mode = "rgmii";
-
-       status = "okay";
-};
-
-&external_mdio {
-       ext_rgmii_phy: ethernet-phy@1 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <0>;
-       };
-};
-
-&hdmi {
-       status = "okay";
-};
-
-&hdmi_out {
-       hdmi_out_con: endpoint {
-               remote-endpoint = <&hdmi_con_in>;
-       };
-};
-
-&ir {
-       pinctrl-names = "default";
-       pinctrl-0 = <&ir_pins_a>;
-       status = "okay";
-};
-
-&mmc0 {
-       vmmc-supply = <&reg_vcc3v3>;
-       bus-width = <4>;
-       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
-       status = "okay";
-};
-
-&mmc1 {
-       vmmc-supply = <&reg_vcc3v3>;
-       vqmmc-supply = <&reg_vcc3v3>;
-       mmc-pwrseq = <&wifi_pwrseq>;
-       bus-width = <4>;
-       non-removable;
-       status = "okay";
-
-       brcmf: wifi@1 {
-               reg = <1>;
-               compatible = "brcm,bcm4329-fmac";
-               interrupt-parent = <&pio>;
-               interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
-               interrupt-names = "host-wake";
-       };
-};
-
-&mmc2 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mmc2_8bit_pins>;
-       vmmc-supply = <&reg_vcc3v3>;
-       vqmmc-supply = <&reg_vcc3v3>;
-       bus-width = <8>;
-       non-removable;
-       status = "okay";
-};
-
-&ohci0 {
-       status = "okay";
-};
-
-&ohci1 {
-       status = "okay";
-};
-
-&ohci2 {
-       status = "okay";
-};
-
-&reg_usb0_vbus {
-       gpio = <&pio 3 11 GPIO_ACTIVE_HIGH>; /* PD11 */
-       status = "okay";
-};
-
-&uart0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
-       status = "okay";
-};
-
-&uart1 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
-       status = "okay";
-};
-
-&usb_otg {
-       dr_mode = "otg";
-       status = "okay";
-};
-
-&usbphy {
-       usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
-       usb0_vbus-supply = <&reg_usb0_vbus>;
-       /* USB host VBUS is on as long as VCC-IO is on */
-       status = "okay";
 };
diff --git a/arch/arm/dts/sunxi-bananapi-m2-plus.dtsi b/arch/arm/dts/sunxi-bananapi-m2-plus.dtsi
new file mode 100644 (file)
index 0000000..3bed375
--- /dev/null
@@ -0,0 +1,245 @@
+/*
+ * Copyright (C) 2016 Chen-Yu Tsai <wens@csie.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
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       aliases {
+               ethernet0 = &emac;
+               serial0 = &uart0;
+               serial1 = &uart1;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       connector {
+               compatible = "hdmi-connector";
+               type = "a";
+
+               port {
+                       hdmi_con_in: endpoint {
+                               remote-endpoint = <&hdmi_out_con>;
+                       };
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+
+               pwr_led {
+                       label = "bananapi-m2-plus:red:pwr";
+                       gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
+                       default-state = "on";
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+
+               sw4 {
+                       label = "power";
+                       linux,code = <BTN_0>;
+                       gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       reg_gmac_3v3: gmac-3v3 {
+                     compatible = "regulator-fixed";
+                     regulator-name = "gmac-3v3";
+                     regulator-min-microvolt = <3300000>;
+                     regulator-max-microvolt = <3300000>;
+                     startup-delay-us = <100000>;
+                     enable-active-high;
+                     gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi_pwrseq: wifi_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               pinctrl-names = "default";
+               reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
+               clocks = <&rtc 1>;
+               clock-names = "ext_clock";
+       };
+};
+
+&de {
+       status = "okay";
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&ehci2 {
+       status = "okay";
+};
+
+&emac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&emac_rgmii_pins>;
+       phy-supply = <&reg_gmac_3v3>;
+       phy-handle = <&ext_rgmii_phy>;
+       phy-mode = "rgmii";
+
+       status = "okay";
+};
+
+&external_mdio {
+       ext_rgmii_phy: ethernet-phy@1 {
+               compatible = "ethernet-phy-ieee802.3-c22";
+               reg = <1>;
+       };
+};
+
+&hdmi {
+       status = "okay";
+};
+
+&hdmi_out {
+       hdmi_out_con: endpoint {
+               remote-endpoint = <&hdmi_con_in>;
+       };
+};
+
+&ir {
+       pinctrl-names = "default";
+       pinctrl-0 = <&ir_pins_a>;
+       status = "okay";
+};
+
+&mmc0 {
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
+       status = "okay";
+};
+
+&mmc1 {
+       vmmc-supply = <&reg_vcc3v3>;
+       vqmmc-supply = <&reg_vcc3v3>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       brcmf: wifi@1 {
+               reg = <1>;
+               compatible = "brcm,bcm4329-fmac";
+               interrupt-parent = <&pio>;
+               interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
+               interrupt-names = "host-wake";
+       };
+};
+
+&mmc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc2_8bit_pins>;
+       vmmc-supply = <&reg_vcc3v3>;
+       vqmmc-supply = <&reg_vcc3v3>;
+       bus-width = <8>;
+       non-removable;
+       status = "okay";
+};
+
+&ohci0 {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&ohci2 {
+       status = "okay";
+};
+
+&reg_usb0_vbus {
+       gpio = <&pio 3 11 GPIO_ACTIVE_HIGH>; /* PD11 */
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+       uart-has-rtscts;
+       status = "okay";
+
+       bluetooth {
+               compatible = "brcm,bcm43438-bt";
+               clocks = <&rtc 1>;
+               clock-names = "lpo";
+               vbat-supply = <&reg_vcc3v3>;
+               vddio-supply = <&reg_vcc3v3>;
+               device-wakeup-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
+               host-wakeup-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
+               shutdown-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+       };
+};
+
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usbphy {
+       usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
+       /* USB host VBUS is on as long as VCC-IO is on */
+       status = "okay";
+};
index 608a86be4970ff612d93b06c72a31602609fd3f7..8e2f90fc68c394665167c5d1aaad415f8790a95a 100644 (file)
@@ -137,6 +137,13 @@ M: Jagan Teki <jagan@amarulasolutions.com>
 S:     Maintained
 F:     configs/bananapi_m2_berry_defconfig
 
+BANANAPI M2 PLUS BOARDS
+M:     Icenowy Zheng <icenowy@aosc.io>
+M:     Chen-Yu Tsai <wens@csie.org>
+S:     Maintained
+F:     configs/bananapi_m2_plus_h3_defconfig
+F:     configs/bananapi_m2_plus_h5_defconfig
+
 BANANAPI M2 ULTRA BOARD
 M:     Chen-Yu Tsai <wens@csie.org>
 S:     Maintained
@@ -418,11 +425,6 @@ S: Maintained
 F:     configs/Sinlinx_SinA33_defconfig
 W:     http://linux-sunxi.org/Sinlinx_SinA33
 
-SINOVOIP BPI M2 PLUS H3 BOARD
-M:     Icenowy Zheng <icenowy@aosc.io>
-S:     Maintained
-F:     configs/Sinovoip_BPI_M2_Plus_defconfig
-
 SINOVOIP BPI M3 A83T BOARD
 M:     VishnuPatekar <vishnupatekar0510@gmail.com>
 S:     Maintained
diff --git a/configs/Sinovoip_BPI_M2_Plus_defconfig b/configs/Sinovoip_BPI_M2_Plus_defconfig
deleted file mode 100644 (file)
index 597618f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_SUNXI=y
-CONFIG_SPL=y
-CONFIG_MACH_SUN8I_H3=y
-CONFIG_DRAM_CLK=672
-CONFIG_DRAM_ZQ=3881979
-CONFIG_DRAM_ODT_EN=y
-CONFIG_MACPWR="PD6"
-CONFIG_MMC_SUNXI_SLOT_EXTRA=2
-CONFIG_NR_DRAM_BANKS=1
-# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-# CONFIG_CMD_FLASH is not set
-# CONFIG_SPL_DOS_PARTITION is not set
-# CONFIG_SPL_EFI_PARTITION is not set
-CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-bananapi-m2-plus"
-CONFIG_SUN8I_EMAC=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_OHCI_HCD=y
-CONFIG_USB_MUSB_GADGET=y
-CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
diff --git a/configs/bananapi_m2_plus_h3_defconfig b/configs/bananapi_m2_plus_h3_defconfig
new file mode 100644 (file)
index 0000000..597618f
--- /dev/null
@@ -0,0 +1,20 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SPL=y
+CONFIG_MACH_SUN8I_H3=y
+CONFIG_DRAM_CLK=672
+CONFIG_DRAM_ZQ=3881979
+CONFIG_DRAM_ODT_EN=y
+CONFIG_MACPWR="PD6"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_NR_DRAM_BANKS=1
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-bananapi-m2-plus"
+CONFIG_SUN8I_EMAC=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_MUSB_GADGET=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
diff --git a/configs/bananapi_m2_plus_h5_defconfig b/configs/bananapi_m2_plus_h5_defconfig
new file mode 100644 (file)
index 0000000..e7c10db
--- /dev/null
@@ -0,0 +1,20 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SPL=y
+CONFIG_MACH_SUN50I_H5=y
+CONFIG_DRAM_CLK=672
+CONFIG_DRAM_ZQ=3881979
+CONFIG_DRAM_ODT_EN=y
+CONFIG_MACPWR="PD6"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_NR_DRAM_BANKS=1
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-bananapi-m2-plus"
+CONFIG_SUN8I_EMAC=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_MUSB_GADGET=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y