Marketing name: Apple iPod nano (5th generation)
Signed-off-by: Vencislav Atanasov <[email protected]>
---
arch/arm/dts/s5l8730-n33.dts | 26 ++++++++++++++++
arch/arm/dts/s5l8730.dtsi | 42 ++++++++++++++++++++++++++
arch/arm/mach-s5l87xx/Kconfig | 1 +
arch/arm/mach-s5l87xx/Makefile | 5 +++
arch/arm/mach-s5l87xx/s5l8730.c | 18 +++++++++++
arch/arm/mach-s5l87xx/s5l8730/Kconfig | 12 ++++++++
board/apple/n33/Kconfig | 15 +++++++++
board/apple/n33/Makefile | 7 +++++
board/apple/n33/n33.c | 57 +++++++++++++++++++++++++++++++++++
configs/apple_n33_defconfig | 33 ++++++++++++++++++++
include/configs/apple_n33.h | 16 ++++++++++
11 files changed, 232 insertions(+)
diff --git a/arch/arm/dts/s5l8730-n33.dts b/arch/arm/dts/s5l8730-n33.dts
new file mode 100644
index 00000000000..fb2fecedf09
--- /dev/null
+++ b/arch/arm/dts/s5l8730-n33.dts
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * Apple iPod nano (5th generation)
+ *
+ * target-type: N33
+ *
+ * Copyright (C) 2026 The freemyipod team (freemyipod.org)
+ */
+
+/dts-v1/;
+
+#include "s5l8730.dtsi"
+#include "s5l87xx-nxx.dtsi"
+
+/ {
+ compatible = "apple,n33", "samsung,s5l8730", "apple,arm-platform";
+ model = "Apple iPod nano (5th generation)";
+};
+
+&memory {
+ reg = <0x08000000 0x04000000>; /* 64 MiB SDRAM */
+};
+
+&clkref {
+ clock-frequency = <24000000>;
+};
diff --git a/arch/arm/dts/s5l8730.dtsi b/arch/arm/dts/s5l8730.dtsi
new file mode 100644
index 00000000000..902a8ac5dc1
--- /dev/null
+++ b/arch/arm/dts/s5l8730.dtsi
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * Samsung S5L8730 SoC
+ *
+ * Other names: M2
+ *
+ * Copyright (C) 2026 The freemyipod team (freemyipod.org)
+ */
+
+#include "s5l87xx.dtsi"
+#include "s5l8702-common.dtsi"
+
+/ {
+ compatible = "samsung,s5l8730", "apple,arm-platform";
+
+ chosen {
+ stdout-path = &uart0;
+ };
+};
+
+&cpu0 {
+ compatible = "arm,arm1176jzf-s";
+};
+
+&clkgates {
+ /*
+ * Clock-gate name -> {gate, bit} table consumed by
s5l87xx_enable_clkgate().
+ * Each entry is two cells: gate * 32 + bit, with 0xffffffff for an
unused
+ * second gate.
+ */
+ clock-gate-names = "timer0", "timer1", "timer2", "timer3", "timer4",
+ "timer5", "timer6", "timer7",
"timer8",
+ "uart0", "usb-otg", "usb2-phy",
"bootrom";
+ samsung,clock-gates = <37 128>, <55 129>, <56 130>, <57 131>, <58 132>,
+ <59 133>, <60 134>, <69 150>,
<70 151>,
+ <41 135>, <2 0xffffffff>, <35
0xffffffff>,
+ <13 0xffffffff>;
+};
+
+&uart0 {
+ status = "okay";
+};
diff --git a/arch/arm/mach-s5l87xx/Kconfig b/arch/arm/mach-s5l87xx/Kconfig
index f40a340312a..3ec2326de42 100644
--- a/arch/arm/mach-s5l87xx/Kconfig
+++ b/arch/arm/mach-s5l87xx/Kconfig
@@ -61,5 +61,6 @@ source "arch/arm/mach-s5l87xx/s5l8701/Kconfig"
source "arch/arm/mach-s5l87xx/s5l8702/Kconfig"
source "arch/arm/mach-s5l87xx/s5l8720/Kconfig"
source "arch/arm/mach-s5l87xx/s5l8723/Kconfig"
+source "arch/arm/mach-s5l87xx/s5l8730/Kconfig"
endif
diff --git a/arch/arm/mach-s5l87xx/Makefile b/arch/arm/mach-s5l87xx/Makefile
index ff84eff8448..78ea7bc58d0 100644
--- a/arch/arm/mach-s5l87xx/Makefile
+++ b/arch/arm/mach-s5l87xx/Makefile
@@ -24,3 +24,8 @@ obj-$(CONFIG_S5L8723) += relocate.o
obj-$(CONFIG_S5L8723) += s5l8723.o
obj-$(CONFIG_S5L8723) += s5l87xx-otg-phy.o
obj-$(CONFIG_S5L8723) += s5l87xx-timer.o
+
+obj-$(CONFIG_S5L8730) += relocate.o
+obj-$(CONFIG_S5L8730) += s5l8730.o
+obj-$(CONFIG_S5L8730) += s5l87xx-otg-phy.o
+obj-$(CONFIG_S5L8730) += s5l87xx-timer.o
diff --git a/arch/arm/mach-s5l87xx/s5l8730.c b/arch/arm/mach-s5l87xx/s5l8730.c
new file mode 100644
index 00000000000..f0970e21cec
--- /dev/null
+++ b/arch/arm/mach-s5l87xx/s5l8730.c
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2026 The freemyipod team (freemyipod.org)
+ */
+
+#include <init.h>
+
+int print_cpuinfo(void)
+{
+ printf("CPU: Samsung S5L8730 (ARM1176JZF-S)\n");
+ return 0;
+}
+
+ulong get_tbclk(void)
+{
+ // Corresponds to TIMER_F setup from s5l87xx.c.
+ return 1000000;
+}
diff --git a/arch/arm/mach-s5l87xx/s5l8730/Kconfig
b/arch/arm/mach-s5l87xx/s5l8730/Kconfig
new file mode 100644
index 00000000000..4ca87a2f52b
--- /dev/null
+++ b/arch/arm/mach-s5l87xx/s5l8730/Kconfig
@@ -0,0 +1,12 @@
+if S5L8730
+
+config TARGET_N33
+ bool "Apple N33 - iPod nano (5th generation)"
+ default y
+ help
+ Apple iPod nano (5th generation) is a digital audio player,
introduced in
+ September 2009. It has a NAND flash of either 8 or 16 GiB.
+
+source "board/apple/n33/Kconfig"
+
+endif
diff --git a/board/apple/n33/Kconfig b/board/apple/n33/Kconfig
new file mode 100644
index 00000000000..5c9dea9fbb9
--- /dev/null
+++ b/board/apple/n33/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_N33
+
+config SYS_BOARD
+ default "n33"
+
+config SYS_VENDOR
+ default "apple"
+
+config SYS_SOC
+ default "s5l8730"
+
+config SYS_CONFIG_NAME
+ default "apple_n33"
+
+endif
diff --git a/board/apple/n33/Makefile b/board/apple/n33/Makefile
new file mode 100644
index 00000000000..721718361e1
--- /dev/null
+++ b/board/apple/n33/Makefile
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2026 The freemyipod team (freemyipod.org)
+#
+
+obj-y += ../nxx-common/nxx.o
+obj-y += n33.o
diff --git a/board/apple/n33/n33.c b/board/apple/n33/n33.c
new file mode 100644
index 00000000000..ec6dbf01714
--- /dev/null
+++ b/board/apple/n33/n33.c
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2026 The freemyipod team (freemyipod.org)
+ */
+
+#include <asm/io.h>
+#include <asm/arch-s5l87xx/s5l87xx.h>
+#include <asm/arch-s5l87xx/clk.h>
+
+static void board_gpio_init(void)
+{
+ // UART0
+ u32 gpio = readl(S5L87XX_PCON(0));
+
+ gpio &= S5L87XX_PCON_PINS_CLEAR_FN(4, 5);
+ gpio |= S5L87XX_PCON_PINS_SET_FN(4, 5, 0x2);
+ writel(gpio, S5L87XX_PCON(0));
+}
+
+static void board_clock_init(void)
+{
+ s5l87xx_enable_clkgate("uart0");
+ s5l87xx_enable_clkgate("bootrom");
+}
+
+static void board_vic_init(void)
+{
+ // Disable all VIC interrupts.
+ writel(0xffffffff, S5L87XX_VICINTENCLEAR(0));
+ writel(0xffffffff, S5L87XX_VICINTENCLEAR(1));
+}
+
+int board_early_init_f(void)
+{
+ /* Enable GPIO pins */
+ board_gpio_init();
+
+ /* Enable clocking */
+ board_clock_init();
+
+ /* Configure VIC */
+ board_vic_init();
+
+ return 0;
+}
+
+void board_debug_uart_init(void)
+{
+ /* Enable GPIO pins */
+ board_gpio_init();
+
+ /* Enable UART clocking. Runs before the FDT is set up, so ungate uart0
by
+ * raw {gate, bit} ({1,9} + {4,7}) rather than the device-tree name
lookup.
+ */
+ s5l87xx_enable_clkgate_bit(1, 9);
+ s5l87xx_enable_clkgate_bit(4, 7);
+}
diff --git a/configs/apple_n33_defconfig b/configs/apple_n33_defconfig
new file mode 100644
index 00000000000..3a9cb4fe817
--- /dev/null
+++ b/configs/apple_n33_defconfig
@@ -0,0 +1,33 @@
+CONFIG_ARM=y
+CONFIG_SKIP_LOWLEVEL_INIT_ONLY=y
+CONFIG_POSITION_INDEPENDENT=y
+CONFIG_ARCH_S5L87XX=y
+CONFIG_TEXT_BASE=0x08000000
+CONFIG_SYS_MALLOC_LEN=0x00200000
+CONFIG_DEFAULT_DEVICE_TREE="s5l8730-n33"
+CONFIG_S5L8730=y
+CONFIG_SYS_LOAD_ADDR=0x08000000
+CONFIG_DEBUG_UART_BASE=0x3CC00000
+CONFIG_DEBUG_UART_CLOCK=24000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART=y
+CONFIG_STACK_SIZE=0x00100000
+CONFIG_FIT=y
+CONFIG_BOOTDELAY=3
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="dfu 0 ram 0; bootm"
+CONFIG_BOARD_EARLY_INIT_F=y
+CONFIG_CMD_DFU=y
+CONFIG_OF_CONTROL=y
+CONFIG_CLK=y
+CONFIG_DFU_RAM=y
+CONFIG_SET_DFU_ALT_INFO=y
+CONFIG_SYS_DFU_DATA_BUF_SIZE=0x00100000
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_USB=y
+CONFIG_DM_USB_GADGET=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_VENDOR_NUM=0x05ac
+CONFIG_USB_GADGET_PRODUCT_NUM=0xff00
+CONFIG_USB_GADGET_DWC2_OTG=y
+CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/include/configs/apple_n33.h b/include/configs/apple_n33.h
new file mode 100644
index 00000000000..a00e773746f
--- /dev/null
+++ b/include/configs/apple_n33.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2026 The freemyipod team (freemyipod.org)
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define CFG_SYS_UBOOT_BASE CONFIG_TEXT_BASE
+
+// 448K SRAM total, first 64K and the 256K at 0x30000 are the fastest
+// 128K at 0x10000 are slower than DRAM
+#define CFG_SYS_INIT_RAM_ADDR 0x22000000
+#define CFG_SYS_INIT_RAM_SIZE 0x00070000
+
+#endif /* __CONFIG_H */
--
Git-157)