From: Zoltan HERPAI Date: Sun, 25 Aug 2019 20:54:23 +0000 (+0200) Subject: sunxi: add support for NextThing CHIP with Tzatziffy board X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=5d92b1a151878e28c9f5128ca7e9de6b078ae5b6;p=openwrt%2Fstaging%2Fwigyori.git sunxi: add support for NextThing CHIP with Tzatziffy board Signed-off-by: Zoltan HERPAI --- diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile index ae6ec1a603..d8dde8afa1 100644 --- a/package/boot/uboot-sunxi/Makefile +++ b/package/boot/uboot-sunxi/Makefile @@ -73,6 +73,12 @@ define U-Boot/Bananapro BUILD_DEVICES:=sun7i-a20-bananapro endef +define U-Boot/CHIP + BUILD_SUBTARGET:=cortexa8 + NAME:=CHIP + BUILD_DEVICES:=sun5i-r8-chip +endef + define U-Boot/Cubieboard BUILD_SUBTARGET:=cortexa8 NAME:=Cubieboard @@ -274,6 +280,7 @@ UBOOT_TARGETS := \ A20-OLinuXino_MICRO \ Bananapi \ Bananapro \ + CHIP \ Cubieboard \ Cubieboard2 \ Cubietruck \ diff --git a/package/boot/uboot-sunxi/patches/250-add-mmc-to-chip.diff b/package/boot/uboot-sunxi/patches/250-add-mmc-to-chip.diff new file mode 100644 index 0000000000..5e24fc4c4b --- /dev/null +++ b/package/boot/uboot-sunxi/patches/250-add-mmc-to-chip.diff @@ -0,0 +1,43 @@ +diff -ruN a/arch/arm/dts/sun5i-r8-chip.dts b/arch/arm/dts/sun5i-r8-chip.dts +--- a/arch/arm/dts/sun5i-r8-chip.dts 2019-08-20 00:53:42.243401559 +0200 ++++ b/arch/arm/dts/sun5i-r8-chip.dts 2019-08-20 00:34:38.000000000 +0200 +@@ -175,6 +175,16 @@ + status = "okay"; + }; + ++&mmc2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&chip_sdio_pin>; ++ vmmc-supply = <®_vcc3v3>; ++/* mmc-pwrseq = <&mmc2_pwrseq>;*/ ++ bus-width = <4>; ++ broken-cd; ++ status = "okay"; ++}; ++ + &ohci0 { + status = "okay"; + }; +@@ -204,6 +214,11 @@ + function = "gpio_in"; + bias-pull-up; + }; ++ ++ chip_sdio_pin: chip_sdio_pin@0 { ++ pins = "PE4", "PE5", "PE6", "PE7", "PE8", "PE9"; ++ function = "mmc2"; ++ }; + }; + + ®_dcdc2 { +diff -ruN configs.old/CHIP_defconfig configs/CHIP_defconfig +--- a/configs/CHIP_defconfig 2019-01-14 23:02:36.000000000 +0100 ++++ b/configs/CHIP_defconfig 2019-08-20 01:14:47.076936367 +0200 +@@ -13,7 +13,6 @@ + # CONFIG_SPL_EFI_PARTITION is not set + CONFIG_DEFAULT_DEVICE_TREE="sun5i-r8-chip" + CONFIG_DFU_RAM=y +-# CONFIG_MMC is not set + CONFIG_AXP_ALDO3_VOLT=3300 + CONFIG_AXP_ALDO4_VOLT=3300 + CONFIG_CONS_INDEX=2 diff --git a/target/linux/sunxi/image/cortex-a8.mk b/target/linux/sunxi/image/cortex-a8.mk index 4eeaab99d1..9be33dd790 100644 --- a/target/linux/sunxi/image/cortex-a8.mk +++ b/target/linux/sunxi/image/cortex-a8.mk @@ -18,6 +18,17 @@ endef TARGET_DEVICES += sun4i-a10-olinuxino-lime +define Device/sun5i-r8-chip + DEVICE_VENDOR := NextThing + DEVICE_MODEL := CHIP (R8) with Tzatziffy + DEVICE_PACKAGES:=kmod-rtl8192cu + SUPPORTED_DEVICES:=nextthing,r8-chip + SUNXI_DTS:=sun5i-r8-chip +endef + +TARGET_DEVICES += sun5i-r8-chip + + define Device/sun5i-a13-olimex-som DEVICE_VENDOR := Olimex DEVICE_MODEL := A13-SOM