Purge `s5p6818` board family

The family consists of 4 boards, but hasn't seen any activity in years,
is unmaintained, stuck on EOL Linux 4.14 and the bootloader does
not build.
This commit is contained in:
ColorfulRhino 2024-07-02 23:10:09 +02:00 committed by Igor
parent d9b67b37d5
commit ccf17a20e8
18 changed files with 1 additions and 313232 deletions

View File

@ -1,9 +0,0 @@
# Nexell S5P6818 octa core 1GB RAM SoC GBE WiFi/BT eMMC
BOARD_NAME="NanoPC T3"
BOARDFAMILY="s5p6818"
BOARD_MAINTAINER=""
BOOTCONFIG="nanopim3_defconfig"
MODULES_LEGACY="g_serial"
KERNEL_TARGET="legacy"
SERIALCON="ttySAC0,ttyGS0"
FULL_DESKTOP="yes"

View File

@ -1,9 +0,0 @@
# Nexell S5P6818 octa core 2GB RAM SoC GBE WiFi/BT eMMC
BOARD_NAME="NanoPC T3+"
BOARDFAMILY="s5p6818"
BOARD_MAINTAINER=""
BOOTCONFIG="nanopim3_defconfig"
MODULES_LEGACY="g_serial"
SERIALCON="ttySAC0,ttyGS0"
KERNEL_TARGET="legacy"
FULL_DESKTOP="yes"

View File

@ -1,9 +0,0 @@
# Nexell S5P6818 octa core 1GB RAM SoC GBE
BOARD_NAME="NanoPi Fire3"
BOARDFAMILY="s5p6818"
BOARD_MAINTAINER=""
BOOTCONFIG="nanopifire3_defconfig"
MODULES_NEXT="g_serial"
DEFAULT_CONSOLE="serial"
KERNEL_TARGET="legacy"
SERIALCON="ttySAC0,ttyGS0"

View File

@ -1,8 +0,0 @@
# Nexell S5P6818 octa core 1Gb SoC
BOARD_NAME="NanoPi M3"
BOARDFAMILY="s5p6818"
BOARD_MAINTAINER=""
BOOTCONFIG="nanopim3_defconfig"
MODULES_LEGACY="g_serial"
KERNEL_TARGET="legacy"
SERIALCON="ttySAC0,ttyGS0"

View File

@ -1,3 +0,0 @@
verbosity=1
console=both
bootlogo=false

View File

@ -1,40 +0,0 @@
# DO NOT EDIT THIS FILE
#
# Please edit /boot/armbianEnv.txt to set supported parameters
#
# default values
setenv rootdev "/dev/mmcblk2p1"
setenv rootfstype "ext4"
setenv verbosity "1"
setenv bootlogo "false"
setenv fdt_addr "0x48000000"
setenv ramdisk_addr_r "0x49000000"
setenv kernel_addr_r "0x4a000000"
# fdtfile should come from compile-time u-boot patches
if test -z "${fdtfile}"; then
setenv fdtfile "s5p6818-nanopi-m3.dtb"
fi
echo "Boot script loaded from SD card ${devnum}"
if ext4load mmc ${devnum}:1 ${kernel_addr_r} ${prefix}/armbianEnv.txt; then
env import -t ${kernel_addr_r} ${filesize}
fi
if test "${bootlogo}" = "true"; then
setenv consoleargs "splash plymouth.ignore-serial-consoles ${consoleargs}"
else
setenv consoleargs "splash=verbose ${consoleargs}"
fi
setenv bootargs "console=ttySAC0,115200n8 console=tty1 ${consoleargs} root=${rootdev} rootwait rootfstype=${rootfstype} loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs}"
if ext4load mmc ${devnum}:1 ${fdt_addr} ${prefix}dtb/nexell/${fdtfile} || ext4load mmc 1:1 ${fdt_addr} ${prefix}dtb/nexell/s5p6818-nanopi3-rev07.dtb; then echo "Loading DTB"; fi
ext4load mmc ${devnum}:1 ${ramdisk_addr_r} ${prefix}uInitrd
ext4load mmc ${devnum}:1 ${kernel_addr_r} ${prefix}Image
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr}
# Recompile with:
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

File diff suppressed because it is too large Load Diff

View File

@ -1,68 +0,0 @@
#
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2013-2023 Igor Pecovnik, igor@armbian.com
#
# This file is a part of the Armbian Build Framework
# https://github.com/armbian/build/
#
ARCH=arm64
BOOTSOURCE='https://github.com/rafaello7/u-boot-nanopi-m3'
BOOTBRANCH='branch:master'
BOOTDIR='u-boot-s5p6818'
BOOTPATCHDIR='legacy/u-boot-s5p6818'
BOOTSCRIPT='boot-s5p6818.cmd:boot.cmd'
BOOTENV_FILE='s5p6818.txt'
UBOOT_TARGET_MAP=";;boot.img bootemmc.img"
ATF_COMPILE="no"
case $BRANCH in
legacy | current)
KERNELSOURCE='https://github.com/armbian/linux'
declare -g KERNEL_MAJOR_MINOR="4.14" # Major and minor versions of this kernel. See https://github.com/armbian/linux/blob/s5p6818/Makefile
KERNELBRANCH='branch:s5p6818'
;;
esac
CPUMIN="400000"
CPUMAX="1400000"
GOVERNOR=ondemand
write_uboot_platform() {
if [[ "$2" != /dev/mmcblk0 ]]; then
dd if=$1/boot.img of=$2 seek=1 status=noxfer > /dev/null 2>&1
else
dd if=$1/bootemmc.img of=$2 seek=1 status=noxfer > /dev/null 2>&1
fi
}
uboot_custom_postprocess() {
# 2GB differnt bl1 https://github.com/friendlyarm/linux-3.4.y/issues/3#issuecomment-387214487
if [[ $BOARD == nanopct3plus ]]; then
cp $SRC/packages/blobs/nanopi/2g-bl1-nanopi.bin boot.img
else
cp $SRC/packages/blobs/nanopi/1g-bl1-nanopi.bin boot.img
fi
i=0
merge=""
while [ $i -lt 512 ]; do
val="00000000"
[ $i -eq 68 ] && val="00060000" # 0x44 load size
[ $i -eq 72 ] && val="43bffe00" # 0x48 load address
[ $i -eq 76 ] && val="43c00000" # 0x4c launch address
[ $i -eq 504 ] && val="68180300" # 0x1f8 version
[ $i -eq 508 ] && val="4849534E" # 0x1fc "NSIH"
# put in little endian
vallo=${val#????}
valhi=${val%????}
merge=$merge"${vallo#??}${vallo%??}${valhi#??}${valhi%??}"
i=$((i + 4))
done
echo $merge | xxd -r -p | dd of=boot.img seek=63 status=none
cat u-boot.bin >> boot.img
cp boot.img bootemmc.img
printf "\2" | dd of=bootemmc.img bs=1 seek=80 conv=notrunc
}
family_tweaks() {
:
}

View File

@ -184,7 +184,7 @@ InstallOpenMediaVault() {
lsusb | grep -q -i "05e3:0735" && sed -i "/exit\ 0/i echo 20 > /sys/class/block/sda/queue/max_sectors_kb" /etc/rc.local \
/usr/sbin/i2cdetect -y 1 | grep -q "60: 60" && /usr/local/sbin/cloudshell2-support.sh' /usr/lib/armbian/armbian-firstrun
;;
bananapim3|nanopifire3|nanopct3plus|nanopim3)
bananapim3)
HMP_Fix='; taskset -c -p 4-7 $i '
;;
edge*|ficus|firefly-rk3399|nanopct4|nanopim4|nanopineo4|renegade-elite|roc-rk3399-pc|rockpro64|station-p1)

View File

@ -288,20 +288,6 @@ prepare_board() {
echo 8 > /proc/irq/$(awk -F":" "/ethernet_mac/ {print \$1}" < /proc/interrupts | sed 's/\ //g')/smp_affinity
echo 8 > /proc/irq/$(awk -F":" "/sdcard/ {print \$1}" < /proc/interrupts | sed 's/\ //g')/smp_affinity
;;
s5p6818) # NanoPi M3: dw-mci on cpu1, USB host on cpu2, GbE on cpu3, USB OTG on cpu4, video-codec on cpu5
for i in $(awk -F':' '/dw-mci/{print $1}' < /proc/interrupts | sed 's/\ //g'); do
echo 1 > /proc/irq/$i/smp_affinity_list
done
echo 2 > /proc/irq/$(awk -F":" "/usb3/ {print \$1}" < /proc/interrupts | sed 's/\ //g')/smp_affinity_list
echo 3 > /proc/irq/$(awk -F":" "/eth0/ {print \$1}" < /proc/interrupts | sed 's/\ //g')/smp_affinity_list
echo 4 > /proc/irq/$(awk -F":" "/usb1/ {print \$1}" < /proc/interrupts | sed 's/\ //g')/smp_affinity_list
for i in $(awk -F':' '/c0080000.video-codec/{print $1}' < /proc/interrupts | sed 's/\ //g'); do
echo 5 > /proc/irq/$i/smp_affinity_list
done
echo 7 > /sys/class/net/eth0/queues/rx-0/rps_cpus
echo 32768 > /proc/sys/net/core/rps_sock_flow_entries
echo 32768 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt
;;
sun4i | sun5i | rda8810) # only one core, nothing to improve
:
;;

File diff suppressed because it is too large Load Diff

View File

@ -1,28 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Koumes <koumes@centrum.cz>
Date: Sat, 1 Jun 2019 21:20:26 +0000
Subject: si2168: fix cmd timeout
Some demuxer si2168 commands may take 130-140 ms.
(DVB-T/T2 tuner MyGica T230C v2).
Details: https://github.com/CoreELEC/CoreELEC/pull/208
---
drivers/media/dvb-frontends/si2168.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c
index 111111111111..222222222222 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -42,7 +42,7 @@ static int si2168_cmd_execute(struct i2c_client *client, struct si2168_cmd *cmd)
if (cmd->rlen) {
/* wait cmd execution terminate */
- #define TIMEOUT 70
+ #define TIMEOUT 200
timeout = jiffies + msecs_to_jiffies(TIMEOUT);
while (!time_after(jiffies, timeout)) {
ret = i2c_master_recv(client, cmd->args, cmd->rlen);
--
Armbian

File diff suppressed because it is too large Load Diff

View File

@ -1,67 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Igor Pecovnik <igor.pecovnik@gmail.com>
Date: Mon, 21 Aug 2017 08:54:53 +0200
Subject: [ARCHEOLOGY] Increasing DMA block memory allocation to 2048k on all
relevant kernels.
> X-Git-Archeology: > recovered message: > https://forum.armbian.com/index.php?/topic/4811-uas-mainline-kernel-coherent-pool-memory-size
> X-Git-Archeology: - Revision 908bb199ec2defd77f7f05d2016980abf100d627: https://github.com/armbian/build/commit/908bb199ec2defd77f7f05d2016980abf100d627
> X-Git-Archeology: Date: Mon, 21 Aug 2017 08:54:53 +0200
> X-Git-Archeology: From: Igor Pecovnik <igor.pecovnik@gmail.com>
> X-Git-Archeology: Subject: Increasing DMA block memory allocation to 2048k on all relevant kernels.
> X-Git-Archeology:
> X-Git-Archeology: - Revision a3cf7b74858e1f862db8ca238bd44f6406be6662: https://github.com/armbian/build/commit/a3cf7b74858e1f862db8ca238bd44f6406be6662
> X-Git-Archeology: Date: Mon, 21 Aug 2017 17:52:29 +0200
> X-Git-Archeology: From: Igor Pecovnik <igor.pecovnik@gmail.com>
> X-Git-Archeology: Subject: Revert "Increasing DMA block memory allocation to 2048k on all relevant kernels."
> X-Git-Archeology:
> X-Git-Archeology: - Revision 2be21aad5dc965b3bc67e136a1e1170119d60f74: https://github.com/armbian/build/commit/2be21aad5dc965b3bc67e136a1e1170119d60f74
> X-Git-Archeology: Date: Mon, 21 Aug 2017 17:52:48 +0200
> X-Git-Archeology: From: Igor Pecovnik <igor.pecovnik@gmail.com>
> X-Git-Archeology: Subject: Increasing DMA block memory allocation to 2048k on all relevant kernels. https://forum.armbian.com/index.php?/topic/4811-uas-mainline-kernel-coherent-pool-memory-size
> X-Git-Archeology:
> X-Git-Archeology: - Revision b878ee203611c195d7f817966950cec817667250: https://github.com/armbian/build/commit/b878ee203611c195d7f817966950cec817667250
> X-Git-Archeology: Date: Sun, 17 Sep 2017 16:54:06 +0300
> X-Git-Archeology: From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
> X-Git-Archeology: Subject: Clean up and update sunxi-next patches
> X-Git-Archeology:
> X-Git-Archeology: - Revision 13e94e58f04be27db51d18b7dac1d15a1864b79e: https://github.com/armbian/build/commit/13e94e58f04be27db51d18b7dac1d15a1864b79e
> X-Git-Archeology: Date: Fri, 27 Oct 2017 16:14:21 +0300
> X-Git-Archeology: From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
> X-Git-Archeology: Subject: Remove random executable bits from patch files
> X-Git-Archeology:
> X-Git-Archeology: - Revision a134e34af8522a933c701fdbe1151494e79950dc: https://github.com/armbian/build/commit/a134e34af8522a933c701fdbe1151494e79950dc
> X-Git-Archeology: Date: Wed, 06 Dec 2017 22:27:43 +0100
> X-Git-Archeology: From: Igor Pecovnik <igor.pecovnik@gmail.com>
> X-Git-Archeology: Subject: Added FriendlyARM Nanopi M3 mainline target (NEXT). Based on @rafaello7 work - kudos! Tested both CLI http://sprunge.us/bHRO and desktop image: https://www.armbian.com/nanopi-m3 Changed status from CSC to WIP.
> X-Git-Archeology:
> X-Git-Archeology: - Revision 150ac0c2afa147d9e3b036c8ecd8238fe5648cf3: https://github.com/armbian/build/commit/150ac0c2afa147d9e3b036c8ecd8238fe5648cf3
> X-Git-Archeology: Date: Tue, 19 Nov 2019 23:25:39 +0100
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
> X-Git-Archeology: Subject: Remove K<4, change branches, new features (#1586)
> X-Git-Archeology:
> X-Git-Archeology: - Revision 0cdffb29b07305209efb12cf3b5ac6032d3a1153: https://github.com/armbian/build/commit/0cdffb29b07305209efb12cf3b5ac6032d3a1153
> X-Git-Archeology: Date: Wed, 24 Mar 2021 19:01:53 +0100
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
> X-Git-Archeology: Subject: Renaming DEV branch to EDGE (#2704)
> X-Git-Archeology:
---
arch/arm/mm/dma-mapping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 111111111111..222222222222 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -381,7 +381,7 @@ static void __dma_free_remap(void *cpu_addr, size_t size)
VM_ARM_DMA_CONSISTENT | VM_USERMAP);
}
-#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_256K
+#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_2M
static struct gen_pool *atomic_pool;
static size_t atomic_pool_size = DEFAULT_DMA_COHERENT_POOL_SIZE;
--
Armbian

View File

@ -1,15 +0,0 @@
You also need a special bl1 for 2G
---
diff --git a/include/configs/s5p6818_nanopim3.h b/include/configs/s5p6818_nanopim3.h
index b101019..4689d93 100644
--- a/include/configs/s5p6818_nanopim3.h
+++ b/include/configs/s5p6818_nanopim3.h
@@ -53,7 +53,7 @@
/* board_init_f */
#define CONFIG_SYS_SDRAM_BASE 0x40000000
-#define CONFIG_SYS_SDRAM_SIZE 0x40000000
+#define CONFIG_SYS_SDRAM_SIZE 0x80000000
/* dram 1 bank num */
#define CONFIG_NR_DRAM_BANKS 1

View File

@ -1,33 +0,0 @@
diff --git a/include/configs/s5p6818_nanopim3.h b/include/configs/s5p6818_nanopim3.h
index 4175ecc..3bbe990 100644
--- a/include/configs/s5p6818_nanopim3.h
+++ b/include/configs/s5p6818_nanopim3.h
@@ -296,12 +296,23 @@
"stderr=serial,vga"
#define CONFIG_BOOTARGS \
- "console=ttySAC0,115200n8 initrd=0x49000000,0x2000000"
+ "rootdev=/dev/mmcblk2p1\0" \
+ "fdt_addr=0x48000000\0" \
+ "scriptaddr=0x40000000\0" \
+ "ramdisk_addr_r=0x49000000\0" \
+ "kernel_addr_r=0x4a000000\0" \
+ "console=ttySAC0,115200n8 root=${rootdev} console=tty1\0" \
+ "boot_a_script=mw ${scriptaddr} 0x100000; ext4load mmc ${devnum}:1 ${scriptaddr} ${prefix}boot.scr; source ${scriptaddr}\0" \
+ "boot_prefixes=/ /boot/\0" \
+ "boot_targets=1 0\0"\
+ "bootcmd=run distro_bootcmd;\0" \
+ "bootcmd_mmc0=setenv devnum 0; run scan_dev_for_boot;\0" \
+ "bootcmd_mmc1=setenv devnum 1; run scan_dev_for_boot;\0" \
+ "distro_bootcmd=for target in ${boot_targets}; do run bootcmd_mmc${target}; done;\0" \
+ "scan_dev_for_boot=for prefix in ${boot_prefixes}; do run boot_a_script; done;\0"
#define CONFIG_BOOTCOMMAND \
- "echo Waiting for environment...;" \
- "udown 0x48000000; " \
- "env import -t -r 0x48000000; " \
- "run bootcmd2"
+ "echo Booting Armbian...;" \
+ "run bootcmd;"
#endif /* __CONFIG_H__ */

View File

@ -1,334 +0,0 @@
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 83afbe8..cc9f1ee 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -16,7 +16,8 @@ dtb-$(CONFIG_ARCH_S5P4418) += s5p4418-drone.dtb \
dtb-$(CONFIG_ARCH_S5P6818) += s5p6818-drone.dtb \
s5p6818-artik710-raptor.dtb \
- s5p6818-nanopim3.dtb
+ s5p6818-nanopim3.dtb \
+ s5p6818-nanopi-fire3.dtb
dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \
exynos5250-snow.dtb \
diff --git a/arch/arm/dts/s5p6818-nanopi-fire3.dts b/arch/arm/dts/s5p6818-nanopi-fire3.dts
new file mode 100644
index 0000000..189d9b5
--- /dev/null
+++ b/arch/arm/dts/s5p6818-nanopi-fire3.dts
@@ -0,0 +1,87 @@
+/*
+ * (C) Copyright 2016 Nexell
+ * Youngbok, Park <park@nexell.co.kr>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+/dts-v1/;
+#include "s5p6818.dtsi"
+
+/ {
+ model = "NanoPi Fire3 board based on s5p6818";
+ cpu-model = "S5p6818";
+
+ compatible = "nexell,s5p6818";
+
+ mmc0:mmc@c0062000 {
+ frequency = <50000000>;
+ nexell,drive_dly = <0x0>;
+ nexell,drive_shift = <0x02>;
+ nexell,sample_dly = <0x00>;
+ nexell,sample_shift = <0x01>;
+ status = "okay";
+ };
+
+ mmc2:mmc@c0069000 {
+ frequency = <50000000>;
+ nexell,drive_dly = <0x0>;
+ nexell,drive_shift = <0x03>;
+ nexell,sample_dly = <0x00>;
+ nexell,sample_shift = <0x02>;
+ nexell,bus-width = <4>;
+ status = "okay";
+ };
+
+ dp0:dp@c0102800 {
+ lcd-type = "hdmi";
+ status = "okay";
+
+ dp-device {
+ preset = <0>; // 0 - 1280x720, 1 - 1920x1080
+ };
+ dp-planes {
+ layer_top {
+ screen_width = <280>;
+ screen_height = <120>;
+ back_color = <0>;
+ video_prior = <0>;
+ };
+ layer_1 {
+ fb_base = <0x46000000>;
+ left = <30>;
+ top = <20>;
+ width = <1220>;
+ height = <680>;
+ pixel_byte = <2>;
+ /* possible format values for rgb layer:
+ * r5g6b5 0x44320000
+ * b5g6r5 0xc4320000
+ * x1r5g5b5 0x43420000
+ * x1b5g5r5 0xc3420000
+ * x4r4g4b4 0x42110000
+ * x4b4g4r4 0xc2110000
+ * x8r3g3b2 0x41200000
+ * x8b3g3r2 0xc1200000
+ * a1r5g5b5 0x33420000
+ * a1b5g5r5 0xb3420000
+ * a4r4g4b4 0x22110000
+ * a4b4g4r4 0xa2110000
+ * a8r3g3b2 0x11200000
+ * a8b3g3r2 0x91200000
+ * r8g8b8 0x46530000
+ * b8g8r8 0xc6530000
+ * x8r8g8b8 0x46530000
+ * x8b8g8r8 0xc6530000
+ * a8r8g8b8 0x06530000
+ * a8b8g8r8 0x86530000
+ */
+ format = <0x44320000>;
+ };
+ };
+ };
+
+ dwc2otg@c0040000 {
+ status = "okay";
+ };
+};
diff --git a/board/s5p6818/Kconfig b/board/s5p6818/Kconfig
index cee812b..46acb2e 100644
--- a/board/s5p6818/Kconfig
+++ b/board/s5p6818/Kconfig
@@ -16,6 +16,11 @@ config TARGET_S5P6818_NANOPIM3
help
Support for s5p6818 NanoPI M3 platform.
+config TARGET_S5P6818_NANOPIFIRE3
+ bool "S5P6818_NANOPIFIRE3"
+ help
+ Support for the s5p6818 NanoPi Fire3 platform.
+
endchoice
config SYS_VENDOR
@@ -30,4 +35,5 @@ config SYS_CONFIG_NAME
source "board/s5p6818/drone/Kconfig"
source "board/s5p6818/nanopim3/Kconfig"
+source "board/s5p6818/nanopifire3/Kconfig"
source "board/s5p6818/artik710_raptor/Kconfig"
diff --git a/board/s5p6818/nanopifire3/Kconfig b/board/s5p6818/nanopifire3/Kconfig
new file mode 100644
index 0000000..af8dffd
--- /dev/null
+++ b/board/s5p6818/nanopifire3/Kconfig
@@ -0,0 +1,7 @@
+if TARGET_S5P6818_NANOPIFIRE3
+
+config SYS_BOARD
+ default "nanopifire3"
+
+endif
+
diff --git a/board/s5p6818/nanopifire3/Makefile b/board/s5p6818/nanopifire3/Makefile
new file mode 100644
index 0000000..1550b5f
--- /dev/null
+++ b/board/s5p6818/nanopifire3/Makefile
@@ -0,0 +1 @@
+obj-y := board.o
diff --git a/board/s5p6818/nanopifire3/board.c b/board/s5p6818/nanopifire3/board.c
new file mode 100644
index 0000000..5870d76
--- /dev/null
+++ b/board/s5p6818/nanopifire3/board.c
@@ -0,0 +1,151 @@
+/*
+ * (C) Copyright 2016 Nexell
+ * Hyunseok, Jung <hsjung@nexell.co.kr>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <config.h>
+#include <common.h>
+#ifdef CONFIG_PWM_NX
+#include <pwm.h>
+#endif
+#include <asm/io.h>
+
+#include <asm/arch/nexell.h>
+#include <asm/arch/nx_gpio.h>
+#include <u-boot/md5.h>
+
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*------------------------------------------------------------------------------
+ * intialize nexell soc and board status.
+ */
+
+/* call from u-boot */
+int board_early_init_f(void)
+{
+ return 0;
+}
+
+void board_gpio_init(void)
+{
+ nx_gpio_initialize();
+ nx_gpio_set_base_address(0, (void *)PHY_BASEADDR_GPIOA);
+ nx_gpio_set_base_address(1, (void *)PHY_BASEADDR_GPIOB);
+ nx_gpio_set_base_address(2, (void *)PHY_BASEADDR_GPIOC);
+ nx_gpio_set_base_address(3, (void *)PHY_BASEADDR_GPIOD);
+ nx_gpio_set_base_address(4, (void *)PHY_BASEADDR_GPIOE);
+}
+
+#ifdef CONFIG_PWM_NX
+void board_backlight_init(void)
+{
+ pwm_init(CONFIG_BACKLIGHT_CH, CONFIG_BACKLIGHT_DIV,
+ CONFIG_BACKLIGHT_INV);
+ pwm_config(CONFIG_BACKLIGHT_CH, TO_DUTY_NS(CONFIG_BACKLIGHT_DUTY,
+ CONFIG_BACKLIGHT_HZ),
+ TO_PERIOD_NS(CONFIG_BACKLIGHT_HZ));
+}
+#endif
+
+int mmc_get_env_dev(void)
+{
+ static int envDev = -1;
+ int bl1LoadEmmc, ubootLoadPort;
+
+ if( envDev == -1 ) {
+ bl1LoadEmmc = readl(PHY_BASEADDR_CLKPWR + SYSRSTCONFIG) >> 19 & 1;
+ printf("loaded from %s", bl1LoadEmmc ? "emmc" : "SD");
+ ubootLoadPort = readl(SCR_ARM_SECOND_BOOT_REG1);
+ switch( ubootLoadPort ) {
+ case EMMC_PORT_NUM:
+ envDev = 0;
+ if( ! bl1LoadEmmc )
+ printf("+emmc");
+ break;
+ case SD_PORT_NUM:
+ if( bl1LoadEmmc )
+ printf("+SD");
+ envDev = 1;
+ break;
+ default:
+ printf("+unknown(%d)", ubootLoadPort);
+ envDev = 1;
+ break;
+ }
+ printf(", getting env from MMC %d\n", envDev);
+ }
+ return envDev;
+}
+
+int board_init(void)
+{
+ board_gpio_init();
+#ifdef CONFIG_PWM_NX
+ board_backlight_init();
+#endif
+ return 0;
+}
+
+/* u-boot dram initialize */
+int dram_init(void)
+{
+ gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
+ return 0;
+}
+
+/* u-boot dram board specific */
+void dram_init_banksize(void)
+{
+ /* set global data memory */
+ gd->bd->bi_arch_number = machine_arch_type;
+ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x00000100;
+
+ gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
+ gd->bd->bi_dram[0].size = CONFIG_SYS_SDRAM_SIZE;
+}
+
+#define ETHER_MAC_TAG "ethmac"
+
+int board_late_init(void)
+{
+ char dtbname[256];
+
+ strcpy(dtbname, CONFIG_DEFAULT_DEVICE_TREE);
+ strcat(dtbname, ".dtb");
+
+ setenv("fdtfile", dtbname);
+
+ if( getenv("ethaddr") == NULL ) {
+ char tmp[18];
+ unsigned char addr[6];
+ u32 hash[20];
+ u32 *ec2 = (u32*)0xc006705c;
+ u32 *ecid = (u32*)0xc0067000;
+
+ memset(hash, 0, sizeof(hash));
+ memcpy(hash + 12, ETHER_MAC_TAG, sizeof(ETHER_MAC_TAG));
+ while( (readl(ec2) & 0x8000) == 0 )
+ udelay(100);
+ hash[4] = readl(ecid);
+ hash[5] = readl(ecid + 1);
+ hash[6] = readl(ecid + 2);
+ hash[7] = readl(ecid + 3);
+
+ MD5Transform(hash, hash + 4);
+ hash[0] ^= hash[2];
+ hash[1] ^= hash[3];
+
+ memcpy(addr, (char *)hash, 6);
+ addr[0] &= 0xfe; /* clear multicast bit */
+ addr[0] |= 0x02;
+
+ sprintf(tmp, "%02x:%02x:%02x:%02x:%02x:%02x",
+ addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
+ setenv("ethaddr", tmp);
+ }
+ return 0;
+}
+
diff --git a/configs/nanopifire3_defconfig b/configs/nanopifire3_defconfig
new file mode 100644
index 0000000..13ddfd3
--- /dev/null
+++ b/configs/nanopifire3_defconfig
@@ -0,0 +1,22 @@
+CONFIG_ARM=y
+CONFIG_SYS_CONFIG_NAME="s5p6818_nanopim3"
+CONFIG_ARCH_NEXELL=y
+CONFIG_ARCH_S5P6818=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_DEFAULT_DEVICE_TREE="s5p6818-nanopi-fire3"
+CONFIG_TARGET_S5P6818_NANOPIFIRE3=y
+CONFIG_FIT=y
+# CONFIG_CMD_IMI is not set
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+# CONFIG_CMD_SETEXPR is not set
+# CONFIG_CMD_NET is not set
+# CONFIG_CMD_NFS is not set
+CONFIG_CMD_FDISK=y
+CONFIG_CMD_EXT4_IMG_WRITE=y
+CONFIG_CMD_SD_RECOVERY=y
+CONFIG_OF_CONTROL=y
+CONFIG_OF_EMBED=y
+CONFIG_VIDEO_NX=y
+CONFIG_VIDEO_NX_HDMI=y