From 47fe3656854f53c42b20ce9cbd275abed37d82f4 Mon Sep 17 00:00:00 2001 From: Michel-FK Date: Tue, 28 Jul 2020 09:43:24 +0200 Subject: [PATCH] PCBA with working i2c --- PCBA/board/funkey/boot.cmd | 3 +- PCBA/board/funkey/busybox.config | 2 +- PCBA/board/funkey/linux.config | 12 ++---- .../linux/0009-add-cpu-clock-properties.patch | 22 +++++++++++ PCBA/board/funkey/rootfs-overlay/etc/hostname | 1 + PCBA/board/funkey/uboot.config | 37 +++++++++++++++---- 6 files changed, 58 insertions(+), 19 deletions(-) create mode 100644 PCBA/board/funkey/patches/linux/0009-add-cpu-clock-properties.patch create mode 100644 PCBA/board/funkey/rootfs-overlay/etc/hostname diff --git a/PCBA/board/funkey/boot.cmd b/PCBA/board/funkey/boot.cmd index b4b7417..0ac2311 100644 --- a/PCBA/board/funkey/boot.cmd +++ b/PCBA/board/funkey/boot.cmd @@ -1,3 +1,2 @@ -setenv bootargs console=ttyS0,115200 -setenv fdt_high 0xffffffff +setenv bootargs console=ttyS0,115200 panic=5 quiet bootm 0x41000000 - 0x41800000 diff --git a/PCBA/board/funkey/busybox.config b/PCBA/board/funkey/busybox.config index be29616..edf3f26 100644 --- a/PCBA/board/funkey/busybox.config +++ b/PCBA/board/funkey/busybox.config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Busybox version: 1.31.1 -# Mon Jul 27 22:23:18 2020 +# Tue Jul 28 17:23:44 2020 # CONFIG_HAVE_DOT_CONFIG=y diff --git a/PCBA/board/funkey/linux.config b/PCBA/board/funkey/linux.config index 7902cbf..a0a2005 100644 --- a/PCBA/board/funkey/linux.config +++ b/PCBA/board/funkey/linux.config @@ -26,7 +26,6 @@ CONFIG_ARCH_SUNXI=y # CONFIG_MACH_SUN9I is not set CONFIG_SMP=y CONFIG_HAVE_ARM_ARCH_TIMER=y -CONFIG_HOTPLUG_CPU=y CONFIG_ARM_PSCI=y CONFIG_HIGHMEM=y CONFIG_VFP=y @@ -43,6 +42,7 @@ CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_MOUSE is not set CONFIG_INPUT_MISC=y CONFIG_INPUT_UINPUT=y +CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_LEGACY_PTY_COUNT=4 CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y @@ -51,17 +51,15 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=8 CONFIG_SERIAL_8250_DW=y CONFIG_SERIAL_OF_PLATFORM=y # CONFIG_HW_RANDOM is not set +CONFIG_I2C=m +CONFIG_I2C_CHARDEV=m +CONFIG_I2C_MV64XXX=m CONFIG_GPIO_SYSFS=y # CONFIG_HWMON is not set CONFIG_MFD_SYSCON=y # CONFIG_RC_CORE is not set CONFIG_FB=y CONFIG_FB_SIMPLE=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_LOGO=y CONFIG_SOUND=y CONFIG_SND=y # CONFIG_SND_DRIVERS is not set @@ -93,5 +91,3 @@ CONFIG_PRINTK_TIME=y # CONFIG_FTRACE is not set # CONFIG_ARM_UNWIND is not set CONFIG_KEYS=y -CONFIG_CRC16=y -CONFIG_XZ_DEC=y diff --git a/PCBA/board/funkey/patches/linux/0009-add-cpu-clock-properties.patch b/PCBA/board/funkey/patches/linux/0009-add-cpu-clock-properties.patch new file mode 100644 index 0000000..df3bf7c --- /dev/null +++ b/PCBA/board/funkey/patches/linux/0009-add-cpu-clock-properties.patch @@ -0,0 +1,22 @@ +diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi +index 5379f2d7..f9765995 100644 +--- a/arch/arm/boot/dts/sun8i-v3s.dtsi ++++ b/arch/arm/boot/dts/sun8i-v3s.dtsi +@@ -73,6 +73,17 @@ + device_type = "cpu"; + reg = <0>; + clocks = <&ccu CLK_CPU>; ++ clock-latency = <244144>; /* 8 32k periods */ ++ clock-frequency = <1296000>; ++ operating-points = < ++ /* kHz uV */ ++ 1296000 1200000 ++ 1008000 1200000 ++ 864000 1200000 ++ 720000 1100000 ++ 480000 1000000 ++ >; ++ + }; + }; + diff --git a/PCBA/board/funkey/rootfs-overlay/etc/hostname b/PCBA/board/funkey/rootfs-overlay/etc/hostname new file mode 100644 index 0000000..ac6e1d2 --- /dev/null +++ b/PCBA/board/funkey/rootfs-overlay/etc/hostname @@ -0,0 +1 @@ +FunKey PCBA diff --git a/PCBA/board/funkey/uboot.config b/PCBA/board/funkey/uboot.config index bab94d1..7a5d9c9 100644 --- a/PCBA/board/funkey/uboot.config +++ b/PCBA/board/funkey/uboot.config @@ -1,15 +1,20 @@ CONFIG_ARM=y CONFIG_ARCH_SUNXI=y +# CONFIG_SPL_LIBDISK_SUPPORT is not set +# CONFIG_SPL_MMC_SUPPORT is not set +# CONFIG_SPL_POWER_SUPPORT is not set # CONFIG_ARMV7_NONSEC is not set -CONFIG_IDENT_STRING=" FunKey" +CONFIG_IDENT_STRING=" FunKey PCBA" # CONFIG_PRE_CONSOLE_BUFFER is not set CONFIG_MACH_SUN8I_V3S=y CONFIG_DRAM_CLK=360 CONFIG_DRAM_ZQ=14779 +# CONFIG_MMC is not set # CONFIG_VIDEO is not set CONFIG_DEFAULT_DEVICE_TREE="sun8i-v3s-funkey" -CONFIG_LOCALVERSION="-funkey" +CONFIG_LOCALVERSION="-funkey_PCBA" # CONFIG_DISTRO_DEFAULTS is not set +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_BOOTDELAY=0 CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_SYS_STDIO_DEREGISTER=y @@ -17,14 +22,30 @@ CONFIG_SYS_STDIO_DEREGISTER=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y CONFIG_HUSH_PARSER=y -CONFIG_CMD_BOOTZ=y +# CONFIG_CMD_BDI is not set +# CONFIG_CMD_CONSOLE is not set +# CONFIG_CMD_BOOTD is not set +# CONFIG_CMD_ELF is not set +# CONFIG_CMD_GO is not set +# CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set +# CONFIG_CMD_XIMG is not set +# CONFIG_CMD_EXPORTENV is not set +# CONFIG_CMD_IMPORTENV is not set +# CONFIG_CMD_EDITENV is not set +# CONFIG_CMD_SAVEENV is not set +# CONFIG_CMD_ENV_EXISTS is not set +# CONFIG_CMD_MEMORY is not set +# CONFIG_CMD_CRC32 is not set +# CONFIG_CMD_DM is not set +# CONFIG_CMD_LOADB is not set +# CONFIG_CMD_LOADS is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set +# CONFIG_CMD_ITEST is not set +# CONFIG_CMD_SETEXPR is not set # CONFIG_CMD_NET is not set # CONFIG_CMD_NFS is not set -CONFIG_CMD_EXT2=y -CONFIG_CMD_EXT4=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y -CONFIG_REGEX=y +# CONFIG_CMD_MISC is not set +CONFIG_SPL_OF_LIBFDT=y +# CONFIG_EFI_LOADER is not set