arm64: dts: sun50i: Add support for A64 OLinuXino (with eMMC)
authorSunil Mohan Adapa <sunil@medhas.org>
Tue, 10 Sep 2019 18:43:40 +0000 (11:43 -0700)
committerJagan Teki <jagan@amarulasolutions.com>
Fri, 25 Oct 2019 08:45:49 +0000 (14:15 +0530)
A64 OLinuXino board from Olimex has three variants with onboard eMMC:
A64-OLinuXino-1Ge16GW, A64-OLinuXino-1Ge4GW and A64-OLinuXino-2Ge8G-IND. In
addition, there are two variants without eMMC. One without eMMC and one with SPI
flash. This suggests the need for separate device tree for the three eMMC
variants.

The Linux kernel upstream has chosen to create and use a separate device tree
for the eMMC variants instead of adding eMMC support existing device tree. These
changes to Linux kernel are queued for Linux 5.4.

commit <02bb66b347ff8115f53948f86b884e008ba385b9> ("arm64: dts:
allwinner: a64: Add A64 OlinuXino board (with eMMC)")

This patch has been tested on A64-OLinuXino-1Ge16GW and is based on Linux
device-tree and a64-olinuxino_defconfig.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
[jagan: updated linux-next commit details]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
arch/arm/dts/Makefile
arch/arm/dts/sun50i-a64-olinuxino-emmc.dts [new file with mode: 0644]
board/sunxi/MAINTAINERS
configs/a64-olinuxino-emmc_defconfig [new file with mode: 0644]

index 3b8dc2f56fd2beaedaaa489055eb9f68f2b0ef1f..24e55266377996d7a5a5b26e768a776614df2963 100644 (file)
@@ -536,6 +536,7 @@ dtb-$(CONFIG_MACH_SUN50I) += \
        sun50i-a64-nanopi-a64.dtb \
        sun50i-a64-oceanic-5205-5inmfd.dtb \
        sun50i-a64-olinuxino.dtb \
+       sun50i-a64-olinuxino-emmc.dtb \
        sun50i-a64-orangepi-win.dtb \
        sun50i-a64-pine64-lts.dtb \
        sun50i-a64-pine64-plus.dtb \
diff --git a/arch/arm/dts/sun50i-a64-olinuxino-emmc.dts b/arch/arm/dts/sun50i-a64-olinuxino-emmc.dts
new file mode 100644 (file)
index 0000000..96ab022
--- /dev/null
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2018 Martin Ayotte <martinayotte@gmail.com>
+ * Copyright (C) 2019 Sunil Mohan Adapa <sunil@medhas.org>
+ */
+
+#include "sun50i-a64-olinuxino.dts"
+
+/ {
+       model = "Olimex A64-Olinuxino-eMMC";
+       compatible = "olimex,a64-olinuxino-emmc", "allwinner,sun50i-a64";
+};
+
+&mmc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc2_pins>;
+       vmmc-supply = <&reg_dcdc1>;
+       vqmmc-supply = <&reg_dcdc1>;
+       bus-width = <8>;
+       non-removable;
+       cap-mmc-hw-reset;
+       status = "okay";
+};
index 88f13533b8852c6355660d2d56b39f0995fb9958..a2adf89b5d56873aba4f3b9d1e671c2824039c3e 100644 (file)
@@ -106,6 +106,11 @@ M: Jagan Teki <jagan@amarulasolutions.com>
 S:     Maintained
 F:     configs/a64-olinuxino_defconfig
 
+A64-OLINUXINO-EMMC BOARD
+M:     Sunil Mohan Adapa <sunil@medhas.org>
+S:     Maintained
+F:     configs/a64-olinuxino-emmc_defconfig
+
 A80 OPTIMUS BOARD
 M:     Chen-Yu Tsai <wens@csie.org>
 S:     Maintained
diff --git a/configs/a64-olinuxino-emmc_defconfig b/configs/a64-olinuxino-emmc_defconfig
new file mode 100644 (file)
index 0000000..56153e3
--- /dev/null
@@ -0,0 +1,17 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_SPL=y
+CONFIG_MACH_SUN50I=y
+CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_USE_PREBOOT=y
+# 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-a64-olinuxino-emmc"
+CONFIG_SUN8I_EMAC=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y