From a7465f375aab9ef9a0105765042d1e07fdf72e8d Mon Sep 17 00:00:00 2001 From: Lucian Cristian Date: Tue, 19 Sep 2017 01:13:44 +0300 Subject: [PATCH] sunxi: add Olimex A20-OLinuXino-LIME2-eMMC Signed-off-by: Lucian Cristian [replaced u-boot patch with original version from u-boot git] Signed-off-by: Hauke Mehrtens --- package/boot/uboot-sunxi/Makefile | 7 ++ ...t-for-Olimex-A20-OLinuXino-LIME2-eMM.patch | 75 +++++++++++++++++++ ...ange-node-name-for-pwrseq-pin-on-Oli.patch | 31 ++++++++ target/linux/sunxi/image/cortex-a7.mk | 10 +++ 4 files changed, 123 insertions(+) create mode 100644 package/boot/uboot-sunxi/patches/060-sun7i-Add-support-for-Olimex-A20-OLinuXino-LIME2-eMM.patch create mode 100644 package/boot/uboot-sunxi/patches/061-ARM-dts-sunxi-Change-node-name-for-pwrseq-pin-on-Oli.patch diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile index 2d7f9c5e8f0..8b073497a59 100644 --- a/package/boot/uboot-sunxi/Makefile +++ b/package/boot/uboot-sunxi/Makefile @@ -49,6 +49,12 @@ define U-Boot/A20-OLinuXino-Lime2 BUILD_DEVICES:=sun7i-a20-olinuxino-lime2 endef +define U-Boot/A20-OLinuXino-Lime2-eMMC + BUILD_SUBTARGET:=cortexa7 + NAME:=A20 OLinuXino LIME2 eMMC + BUILD_DEVICES:=sun7i-a20-olinuxino-lime2-emmc +endef + define U-Boot/A20-OLinuXino_MICRO BUILD_SUBTARGET:=cortexa7 NAME:=A20 OLinuXino MICRO @@ -145,6 +151,7 @@ UBOOT_TARGETS := \ A13-OLinuXino \ A20-OLinuXino-Lime \ A20-OLinuXino-Lime2 \ + A20-OLinuXino-Lime2-eMMC \ A20-OLinuXino_MICRO \ Bananapi \ Bananapro \ diff --git a/package/boot/uboot-sunxi/patches/060-sun7i-Add-support-for-Olimex-A20-OLinuXino-LIME2-eMM.patch b/package/boot/uboot-sunxi/patches/060-sun7i-Add-support-for-Olimex-A20-OLinuXino-LIME2-eMM.patch new file mode 100644 index 00000000000..e4fb958850b --- /dev/null +++ b/package/boot/uboot-sunxi/patches/060-sun7i-Add-support-for-Olimex-A20-OLinuXino-LIME2-eMM.patch @@ -0,0 +1,75 @@ +From 335d30050b0d02444c9297f7a9b0cbf75dce847f Mon Sep 17 00:00:00 2001 +From: Olliver Schinagl +Date: Fri, 12 May 2017 11:38:54 +0200 +Subject: sun7i: Add support for Olimex A20-OLinuXino-LIME2-eMMC + +This patch adds support for the Olimex OLinuXino Lime2 with eMMC flash +storage. +https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2-eMMC/ + +It is a assembly variant of the regular Lime2 but featuring eMMC for +storage. + +Signed-off-by: Olliver Schinagl +Signed-off-by: Jagan Teki +Acked-by: Maxime Ripard +Reviewed-by: Jagan Teki +--- + board/sunxi/MAINTAINERS | 5 +++++ + configs/A20-OLinuXino-Lime2-eMMC_defconfig | 36 ++++++++++++++++++++++++++++++ + 2 files changed, 41 insertions(+) + create mode 100644 configs/A20-OLinuXino-Lime2-eMMC_defconfig + +--- a/board/sunxi/MAINTAINERS ++++ b/board/sunxi/MAINTAINERS +@@ -88,6 +88,11 @@ M: Iain Paton + S: Maintained + F: configs/A20-OLinuXino-Lime2_defconfig + ++A20-OLINUXINO-LIME2-EMMC BOARD ++M: Olliver Schinagl ++S: Maintained ++F: configs/A20-OLinuXino-Lime2-eMMC_defconfig ++ + A33-OLINUXINO BOARD + M: Stefan Mavrodiev + S: Maintained +--- /dev/null ++++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig +@@ -0,0 +1,36 @@ ++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_I2C1_ENABLE=y ++CONFIG_SATAPWR="PC3" ++CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2-emmc" ++CONFIG_AHCI=y ++# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set ++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_SPL_DOS_PARTITION is not set ++# CONFIG_SPL_ISO_PARTITION is not set ++# CONFIG_SPL_PARTITION_UUIDS is not set ++CONFIG_DFU_RAM=y ++CONFIG_ETH_DESIGNWARE=y ++CONFIG_RGMII=y ++CONFIG_SUN7I_GMAC=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 diff --git a/package/boot/uboot-sunxi/patches/061-ARM-dts-sunxi-Change-node-name-for-pwrseq-pin-on-Oli.patch b/package/boot/uboot-sunxi/patches/061-ARM-dts-sunxi-Change-node-name-for-pwrseq-pin-on-Oli.patch new file mode 100644 index 00000000000..8db3e67e58a --- /dev/null +++ b/package/boot/uboot-sunxi/patches/061-ARM-dts-sunxi-Change-node-name-for-pwrseq-pin-on-Oli.patch @@ -0,0 +1,31 @@ +From fb7fe04da2187b9853d713cb643d01bd56813e3d Mon Sep 17 00:00:00 2001 +From: Emmanuel Vadot +Date: Fri, 12 May 2017 11:38:53 +0200 +Subject: 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. + +Signed-off-by: Emmanuel Vadot +Signed-off-by: Maxime Ripard +Signed-off-by: Olliver Schinagl +Acked-by: Maxime Ripard +Reviewed-by: Jagan Teki +--- + arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc.dts ++++ b/arch/arm/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 = ; diff --git a/target/linux/sunxi/image/cortex-a7.mk b/target/linux/sunxi/image/cortex-a7.mk index 3fee8b29f13..ecf376fbe4c 100644 --- a/target/linux/sunxi/image/cortex-a7.mk +++ b/target/linux/sunxi/image/cortex-a7.mk @@ -28,6 +28,16 @@ endef TARGET_DEVICES += sun7i-a20-olinuxino-lime2 +define Device/sun7i-a20-olinuxino-lime2-emmc + DEVICE_TITLE:=Olimex A20-OLinuXino-LIME2-eMMC + DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-usb-hid + SUPPORTED_DEVICES:=olimex,a20-olinuxino-lime2-emmc + SUNXI_DTS:=sun7i-a20-olinuxino-lime2-emmc +endef + +TARGET_DEVICES += sun7i-a20-olinuxino-lime2-emmc + + define Device/sun7i-a20-olinuxino-micro DEVICE_TITLE:=Olimex A20-Olinuxino Micro DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi -- 2.30.2