sunxi: add support for NextThing CHIP with Tzatziffy board
authorZoltan HERPAI <wigyori@uid0.hu>
Thu, 2 Jul 2020 08:50:31 +0000 (10:50 +0200)
committerZoltan HERPAI <wigyori@uid0.hu>
Thu, 5 Jan 2023 07:46:11 +0000 (08:46 +0100)
Specifications:
SoC     R8 @ 1Ghz
DRAM    512MiB DDR3-800E @ 360MHz
NAND    4GB
Power   DC 5V @ ~1A, 3.7V Li-Ion battery (Not included)
Storage SD-card via Tzatziffy board

Install method:
Standard sunxi method.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
package/boot/uboot-sunxi/Makefile
package/boot/uboot-sunxi/patches/250-add-mmc-to-chip.diff [new file with mode: 0644]
target/linux/sunxi/image/cortexa8.mk

index 483a8cd0345b6b61fdb420aab834b5b475c09de3..c5f4592c2c9f5075797735d5ecd585996585ea5c 100644 (file)
@@ -91,6 +91,12 @@ define U-Boot/Bananapro
   BUILD_DEVICES:=lemaker_bananapro
 endef
 
+define U-Boot/CHIP
+  BUILD_SUBTARGET:=cortexa8
+  NAME:=CHIP
+  BUILD_DEVICES:=chip
+endef
+
 define U-Boot/Cubieboard
   BUILD_SUBTARGET:=cortexa8
   NAME:=Cubieboard
@@ -354,6 +360,7 @@ UBOOT_TARGETS := \
        bananapi_m2_berry \
        Bananapi_M2_Ultra \
        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 (file)
index 0000000..5e24fc4
--- /dev/null
@@ -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 = <&reg_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";
++      };
+ };
+ &reg_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
index eafc2187e84bebe6de508e10d90ee74f4e8d3f88..3fa58b8e5e3f4265398fd4c8d2fed85eaef91d8f 100644 (file)
@@ -3,6 +3,14 @@
 # Copyright (C) 2013-2016 OpenWrt.org
 # Copyright (C) 2016 Yousong Zhou
 
+define Device/chip
+  DEVICE_VENDOR := NextThing
+  DEVICE_MODEL := CHIP
+  DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-rtl8192cu
+  SOC := sun5i-r8
+endef
+TARGET_DEVICES += chip
+
 define Device/cubietech_a10-cubieboard
   DEVICE_VENDOR := Cubietech
   DEVICE_MODEL := Cubieboard