Merge pull request #175 from Kynetics/master

Add support for eMMC variant of OLinuXino Lime2
This commit is contained in:
Enrico Butera 2017-04-26 14:01:45 +02:00 committed by GitHub
commit 4740d3fe2d
6 changed files with 106 additions and 2 deletions

View File

@ -0,0 +1,10 @@
#@TYPE: Machine
#@NAME: Olimex A20-OLinuXino Lime2 Board with 4GB eMMC
#@DESCRIPTION: Machine configuration for the Olimex A20-OLinuXino Lime2 Board with 4GB eMMC, based on Allwinner A20 CPU
#https://github.com/OLIMEX/OLINUXINO
require conf/machine/include/sun7i.inc
KERNEL_DEVICETREE = "sun7i-a20-olinuxino-lime2-emmc.dtb"
UBOOT_MACHINE = "A20-OLinuXino-Lime2-eMMC_config"
SUNXI_FEX_FILE = "sys_config/a20/a20-olinuxino_lime2.fex"

View File

@ -0,0 +1,49 @@
From f50ee5d9684ddc237d86841fb57a0cc6daaa76e7 Mon Sep 17 00:00:00 2001
From: Diego Rondini <diego.rondini@kynetics.com>
Date: Thu, 13 Apr 2017 06:51:39 +0000
Subject: [PATCH] sunxi: add A20-OLinuXino-Lime2-eMMC defconfig
---
configs/A20-OLinuXino-Lime2-eMMC_defconfig | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100644 configs/A20-OLinuXino-Lime2-eMMC_defconfig
diff --git a/configs/A20-OLinuXino-Lime2-eMMC_defconfig b/configs/A20-OLinuXino-Lime2-eMMC_defconfig
new file mode 100644
index 0000000..b7be1a2
--- /dev/null
+++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig
@@ -0,0 +1,30 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN7I=y
+CONFIG_DRAM_CLK=384
+CONFIG_MMC0_CD_PIN="PH1"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_USB0_VBUS_PIN="PC17"
+CONFIG_USB0_VBUS_DET="PH5"
+CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2-emmc"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SPL=y
+CONFIG_SPL_I2C_SUPPORT=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_DFU=y
+CONFIG_CMD_USB_MASS_STORAGE=y
+# CONFIG_CMD_FPGA is not set
+CONFIG_DFU_RAM=y
+CONFIG_RTL8211X_PHY_FORCE_MASTER=y
+CONFIG_ETH_DESIGNWARE=y
+CONFIG_AXP_ALDO3_VOLT=2800
+CONFIG_AXP_ALDO4_VOLT=2800
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_MUSB_GADGET=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_G_DNL_MANUFACTURER="Allwinner Technology"
+CONFIG_G_DNL_VENDOR_NUM=0x1f3a
+CONFIG_G_DNL_PRODUCT_NUM=0x1010
--
1.9.1

View File

@ -1,4 +1,11 @@
setenv bootargs console=${console} console=tty1 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} # Default to (primary) SD
rootdev=mmcblk0p2
if itest.b *0x28 == 0x02 ; then
# U-Boot loaded from eMMC or secondary SD so use it for rootfs too
echo "U-boot loaded from eMMC or secondary SD"
rootdev=mmcblk1p2
fi
setenv bootargs console=${console} console=tty1 root=/dev/${rootdev} rootwait panic=10 ${extra}
load mmc 0:1 ${fdt_addr_r} ${fdtfile} || load mmc 0:1 ${fdt_addr_r} boot/${fdtfile} load mmc 0:1 ${fdt_addr_r} ${fdtfile} || load mmc 0:1 ${fdt_addr_r} boot/${fdtfile}
load mmc 0:1 ${kernel_addr_r} zImage || load mmc 0:1 ${kernel_addr_r} boot/zImage || load mmc 0:1 ${kernel_addr_r} uImage || load mmc 0:1 ${kernel_addr_r} boot/uImage load mmc 0:1 ${kernel_addr_r} zImage || load mmc 0:1 ${kernel_addr_r} boot/zImage || load mmc 0:1 ${kernel_addr_r} uImage || load mmc 0:1 ${kernel_addr_r} boot/uImage
bootz ${kernel_addr_r} - ${fdt_addr_r} || bootm ${kernel_addr_r} - ${fdt_addr_r} bootz ${kernel_addr_r} - ${fdt_addr_r} || bootm ${kernel_addr_r} - ${fdt_addr_r}

View File

@ -27,7 +27,9 @@ DEFAULT_PREFERENCE_sun7i="1"
DEFAULT_PREFERENCE_sun8i="1" DEFAULT_PREFERENCE_sun8i="1"
SRC_URI = "git://git.denx.de/u-boot.git;branch=master \ SRC_URI = "git://git.denx.de/u-boot.git;branch=master \
file://boot.cmd" file://boot.cmd \
file://0001-sunxi-add-A20-OLinuXino-Lime2-eMMC-defconfig.patch \
"
SRCREV = "8537ddd769f460d7fb7a62a3dcc9669049702e51" SRCREV = "8537ddd769f460d7fb7a62a3dcc9669049702e51"

View File

@ -0,0 +1,35 @@
From 3116d37651d77125bf50f81f859b1278e02ccce6 Mon Sep 17 00:00:00 2001
From: Emmanuel Vadot <manu@bidouilliste.com>
Date: Wed, 14 Dec 2016 15:57:24 +0100
Subject: [PATCH] ARM: dts: sunxi: Change node name for pwrseq pin on
Olinuxino-lime2-emmc
The node name for the power seq pin is mmc2@0 like the mmc2_pins_a one.
This makes the original node (mmc2_pins_a) scrapped out of the dtb and
result in a unusable eMMC if U-Boot didn't configured the pins to the
correct functions.
Upstream-Status: Backport from v4.10
Signed-off-by: Emmanuel Vadot <manu@bidouilliste.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
index 5ea4915..10d3074 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
@@ -56,7 +56,7 @@
};
&pio {
- mmc2_pins_nrst: mmc2@0 {
+ mmc2_pins_nrst: mmc2-rst-pin {
allwinner,pins = "PC16";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
--
2.7.4

View File

@ -21,4 +21,5 @@ SRC_URI[sha256sum] = "48660806dd32fb8dcbcf5932291bf6cc7d29240070372230871e0f56fe
SRC_URI = "https://www.kernel.org/pub/linux/kernel/v4.x/linux-${PV}.tar.xz \ SRC_URI = "https://www.kernel.org/pub/linux/kernel/v4.x/linux-${PV}.tar.xz \
file://defconfig \ file://defconfig \
file://0001-ARM-dts-sunxi-Change-node-name-for-pwrseq-pin-on-Oli.patch \
" "