public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233
@ 2026-01-05 19:47 Heiko Stuebner
  2026-01-05 19:47 ` [PATCH 01/12] rockchip: board: qnap-ts433: Fix TPL binary in build-example Heiko Stuebner
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Heiko Stuebner @ 2026-01-05 19:47 UTC (permalink / raw)
  To: sjg, philipp.tomsich, kever.yang; +Cc: heiko, trini, u-boot

This series does a number of cleanups for the existing TS433 NAS,
and also introduces support for a second device.

Right now the code can detect the variant from the I2C eeprom(s) and
set the fdtfile accordingly. Later on (once I figured out what is needed)
this should also select an optional overlay, because later model-variants
do have additional per-disk presence detection and also regulator-handling
that is not present on the earlier versions.

Heiko Stuebner (12):
  rockchip: board: qnap-ts433: Fix TPL binary in build-example
  rockchip: board: qnap-ts433: drop DW_MMC config options
  rockchip: board: qnap-ts433: Fix dir naming to allow build-system to
    find it
  rockchip: board: qnap-ts433: Update documentation to recent tool
    versions
  rockchip: board: qnap-ts433: Add instructions for how to use upstream
    TF-A
  rockchip: board: qnap-ts433: Support multiple models of the TSx33
    family
  arm64: dts: rockchip: move cpu_thermal node to the correct position
  arm64: dts: rockchip: describe mcu eeprom cells on rk3568-ts433
  arm64: dts: rockchip: move common qnap tsx33 parts to dtsi
  arm64: dts: rockchip: add QNAP TS233 devicetree
  rockchip: board: qnap-ts433: Rename the board code to not be TS433
    specific
  rockchip: board: qnap-tsx33: add support for Qnap TS233 devices

 arch/arm/dts/rk3568-qnap-ts233-u-boot.dtsi    |   6 +
 arch/arm/mach-rockchip/rk3568/Kconfig         |  17 +-
 board/qnap/ts433/MAINTAINERS                  |   8 -
 board/qnap/{ts433 => tsx33_rk356x}/Kconfig    |   6 +-
 board/qnap/tsx33_rk356x/MAINTAINERS           |  10 +
 board/qnap/tsx33_rk356x/Makefile              |   7 +
 board/qnap/tsx33_rk356x/board.c               | 261 ++++++++
 configs/qnap-ts233-rk3568_defconfig           |  85 +++
 configs/qnap-ts433-rk3568_defconfig           |   6 +-
 doc/board/qnap/ts233.rst                      |  37 ++
 doc/board/qnap/ts433.rst                      |  34 +-
 .../src/arm64/rockchip/rk3568-qnap-ts233.dts  | 131 ++++
 .../src/arm64/rockchip/rk3568-qnap-ts433.dts  | 604 ++---------------
 .../src/arm64/rockchip/rk3568-qnap-tsx33.dtsi | 608 ++++++++++++++++++
 .../configs/{qnap_ts433.h => tsx33_rk356x.h}  |   0
 15 files changed, 1227 insertions(+), 593 deletions(-)
 create mode 100644 arch/arm/dts/rk3568-qnap-ts233-u-boot.dtsi
 delete mode 100644 board/qnap/ts433/MAINTAINERS
 rename board/qnap/{ts433 => tsx33_rk356x}/Kconfig (52%)
 create mode 100644 board/qnap/tsx33_rk356x/MAINTAINERS
 create mode 100644 board/qnap/tsx33_rk356x/Makefile
 create mode 100644 board/qnap/tsx33_rk356x/board.c
 create mode 100644 configs/qnap-ts233-rk3568_defconfig
 create mode 100644 doc/board/qnap/ts233.rst
 create mode 100644 dts/upstream/src/arm64/rockchip/rk3568-qnap-ts233.dts
 create mode 100644 dts/upstream/src/arm64/rockchip/rk3568-qnap-tsx33.dtsi
 rename include/configs/{qnap_ts433.h => tsx33_rk356x.h} (100%)

-- 
2.47.2


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 01/12] rockchip: board: qnap-ts433: Fix TPL binary in build-example
  2026-01-05 19:47 [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stuebner
@ 2026-01-05 19:47 ` Heiko Stuebner
  2026-01-05 19:47 ` [PATCH 02/12] rockchip: board: qnap-ts433: drop DW_MMC config options Heiko Stuebner
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2026-01-05 19:47 UTC (permalink / raw)
  To: sjg, philipp.tomsich, kever.yang; +Cc: heiko, trini, u-boot, Daniel Bast

In the example on how to modify the serial-console in the TPL binary
we already use the v1.21 of the 1560MHz DDR-init binary.

Yet in the build-example the TPL link goes to v1.13 of the 1056MHz
DDR-init.

Not only will that setup reduce performance but it also will prevent
actual serial output from the DDR init, because someone following the
examples will have modified a different binary.

I've been running the 1560MHz DDR-speed in all my tests on now 3
different devices and never saw any issues with it, so adapt the
build-example to link to the faster binary.

Suggested-by: Daniel Bast <2790401+dbast@users.noreply.github.com>
Fixes: d3cacb79e706 ("board: rockchip: add support for Qnap TS433 devices")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 doc/board/qnap/ts433.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/board/qnap/ts433.rst b/doc/board/qnap/ts433.rst
index 1e1bfbb9190..5e5f0394ada 100644
--- a/doc/board/qnap/ts433.rst
+++ b/doc/board/qnap/ts433.rst
@@ -46,7 +46,7 @@ Building U-Boot
 
     $ export CROSS_COMPILE=aarch64-linux-gnu-
     $ export BL31=../rkbin/bin/rk35/rk3568_bl31_v1.34.elf
-    $ export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3568_ddr_1056MHz_v1.13.bin
+    $ export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3568_ddr_1560MHz_v1.21.bin
     $ make qnap-ts433-rk3568_defconfig
     $ make
 
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 02/12] rockchip: board: qnap-ts433: drop DW_MMC config options
  2026-01-05 19:47 [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stuebner
  2026-01-05 19:47 ` [PATCH 01/12] rockchip: board: qnap-ts433: Fix TPL binary in build-example Heiko Stuebner
@ 2026-01-05 19:47 ` Heiko Stuebner
  2026-01-05 19:47 ` [PATCH 03/12] rockchip: board: qnap-ts433: Fix dir naming to allow build-system to find it Heiko Stuebner
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2026-01-05 19:47 UTC (permalink / raw)
  To: sjg, philipp.tomsich, kever.yang; +Cc: heiko, trini, u-boot

The TS433 does not have a SD-card slot, just the separate SDHCI-controlled
EMMC on the board.

So drop the 2 config options.

Fixes: d3cacb79e706 ("board: rockchip: add support for Qnap TS433 devices")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 configs/qnap-ts433-rk3568_defconfig | 2 --
 1 file changed, 2 deletions(-)

diff --git a/configs/qnap-ts433-rk3568_defconfig b/configs/qnap-ts433-rk3568_defconfig
index 1e494073bc9..ebcd3b69e90 100644
--- a/configs/qnap-ts433-rk3568_defconfig
+++ b/configs/qnap-ts433-rk3568_defconfig
@@ -51,8 +51,6 @@ CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_MISC=y
 CONFIG_SUPPORT_EMMC_RPMB=y
-CONFIG_MMC_DW=y
-CONFIG_MMC_DW_ROCKCHIP=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_ROCKCHIP=y
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 03/12] rockchip: board: qnap-ts433: Fix dir naming to allow build-system to find it
  2026-01-05 19:47 [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stuebner
  2026-01-05 19:47 ` [PATCH 01/12] rockchip: board: qnap-ts433: Fix TPL binary in build-example Heiko Stuebner
  2026-01-05 19:47 ` [PATCH 02/12] rockchip: board: qnap-ts433: drop DW_MMC config options Heiko Stuebner
@ 2026-01-05 19:47 ` Heiko Stuebner
  2026-01-05 19:47 ` [PATCH 04/12] rockchip: board: qnap-ts433: Update documentation to recent tool versions Heiko Stuebner
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2026-01-05 19:47 UTC (permalink / raw)
  To: sjg, philipp.tomsich, kever.yang; +Cc: heiko, trini, u-boot

Right now the board directory for the TS433 only contains its Kconfig
which is linked to directly from the main RK3568 Kconfig.

But as the namings are currently set, the build system will never find
the board directory to check if it contains something to build.

So adapt the board naming to a pattern similar to all the other boards
(boardname_rkSoC).

Fixes: d3cacb79e706 ("board: rockchip: add support for Qnap TS433 devices")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/mach-rockchip/rk3568/Kconfig            | 2 +-
 board/qnap/{ts433 => ts433_rk3568}/Kconfig       | 4 ++--
 board/qnap/{ts433 => ts433_rk3568}/MAINTAINERS   | 2 +-
 include/configs/{qnap_ts433.h => ts433_rk3568.h} | 0
 4 files changed, 4 insertions(+), 4 deletions(-)
 rename board/qnap/{ts433 => ts433_rk3568}/Kconfig (70%)
 rename board/qnap/{ts433 => ts433_rk3568}/MAINTAINERS (87%)
 rename include/configs/{qnap_ts433.h => ts433_rk3568.h} (100%)

diff --git a/arch/arm/mach-rockchip/rk3568/Kconfig b/arch/arm/mach-rockchip/rk3568/Kconfig
index 2730220a18e..16e14ee4fa7 100644
--- a/arch/arm/mach-rockchip/rk3568/Kconfig
+++ b/arch/arm/mach-rockchip/rk3568/Kconfig
@@ -76,7 +76,7 @@ source "board/hardkernel/odroid_m1/Kconfig"
 source "board/hardkernel/odroid_m1s/Kconfig"
 source "board/pine64/quartz64_rk3566/Kconfig"
 source "board/powkiddy/x55/Kconfig"
-source "board/qnap/ts433/Kconfig"
+source "board/qnap/ts433_rk3568/Kconfig"
 source "board/radxa/zero3-rk3566/Kconfig"
 source "board/xunlong/orangepi-3b-rk3566/Kconfig"
 
diff --git a/board/qnap/ts433/Kconfig b/board/qnap/ts433_rk3568/Kconfig
similarity index 70%
rename from board/qnap/ts433/Kconfig
rename to board/qnap/ts433_rk3568/Kconfig
index b00e1f9f2ef..c5f9db849f2 100644
--- a/board/qnap/ts433/Kconfig
+++ b/board/qnap/ts433_rk3568/Kconfig
@@ -1,12 +1,12 @@
 if TARGET_QNAP_TS433_RK3568
 
 config SYS_BOARD
-	default "qnap_ts433"
+	default "ts433_rk3568"
 
 config SYS_VENDOR
 	default "qnap"
 
 config SYS_CONFIG_NAME
-	default "qnap_ts433"
+	default "ts433_rk3568"
 
 endif
diff --git a/board/qnap/ts433/MAINTAINERS b/board/qnap/ts433_rk3568/MAINTAINERS
similarity index 87%
rename from board/qnap/ts433/MAINTAINERS
rename to board/qnap/ts433_rk3568/MAINTAINERS
index c2b31ad9794..02ce7ff383c 100644
--- a/board/qnap/ts433/MAINTAINERS
+++ b/board/qnap/ts433_rk3568/MAINTAINERS
@@ -1,7 +1,7 @@
 QNAP-TS433
 M:	Heiko Stuebner <heiko@sntech.de>
 S:	Maintained
-F:	board/qnap/ts433/
+F:	board/qnap/ts433_rk3568/
 F:	doc/board/qnap/
 F:	include/configs/qnap_ts433.h
 F:	configs/qnap-ts433-rk3568_defconfig
diff --git a/include/configs/qnap_ts433.h b/include/configs/ts433_rk3568.h
similarity index 100%
rename from include/configs/qnap_ts433.h
rename to include/configs/ts433_rk3568.h
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 04/12] rockchip: board: qnap-ts433: Update documentation to recent tool versions
  2026-01-05 19:47 [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stuebner
                   ` (2 preceding siblings ...)
  2026-01-05 19:47 ` [PATCH 03/12] rockchip: board: qnap-ts433: Fix dir naming to allow build-system to find it Heiko Stuebner
@ 2026-01-05 19:47 ` Heiko Stuebner
  2026-01-05 19:47 ` [PATCH 05/12] rockchip: board: qnap-ts433: Add instructions for how to use upstream TF-A Heiko Stuebner
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2026-01-05 19:47 UTC (permalink / raw)
  To: sjg, philipp.tomsich, kever.yang; +Cc: heiko, trini, u-boot, Daniel Bast

ddr_tool was migrated from a binary to a python implementation ddr_tool.py
The ddr-init binaries were also upgraded to new versions.

Suggested-by: Daniel Bast <2790401+dbast@users.noreply.github.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 doc/board/qnap/ts433.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/board/qnap/ts433.rst b/doc/board/qnap/ts433.rst
index 5e5f0394ada..2cd7cf13d67 100644
--- a/doc/board/qnap/ts433.rst
+++ b/doc/board/qnap/ts433.rst
@@ -36,7 +36,7 @@ modification and also a new maskrom downloader can be build:
 
 .. code-block:: bash
 
-    $ tools/ddrbin_tool rk3568 tools/ddrbin_param.txt bin/rk35/rk3568_ddr_1560MHz_v1.21.bin
+    $ tools/ddrbin_tool.py rk3568 tools/ddrbin_param.txt bin/rk35/rk3568_ddr_1560MHz_v1.23.bin
     $ tools/boot_merger RKBOOT/RK3568MINIALL.ini
 
 Building U-Boot
@@ -45,8 +45,8 @@ Building U-Boot
 .. code-block:: bash
 
     $ export CROSS_COMPILE=aarch64-linux-gnu-
-    $ export BL31=../rkbin/bin/rk35/rk3568_bl31_v1.34.elf
-    $ export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3568_ddr_1560MHz_v1.21.bin
+    $ export BL31=../rkbin/bin/rk35/rk3568_bl31_v1.45.elf
+    $ export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3568_ddr_1560MHz_v1.23.bin
     $ make qnap-ts433-rk3568_defconfig
     $ make
 
@@ -87,5 +87,5 @@ example as package of that name in Debian-based distributions:
 
 .. code-block:: bash
 
-    $ rkdeveloptool db rk356x_spl_loader_v1.21.113.bin
+    $ rkdeveloptool db rk356x_spl_loader_v1.23.114.bin
     $ rkdeveloptool wl 64 u-boot-rockchip.bin
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 05/12] rockchip: board: qnap-ts433: Add instructions for how to use upstream TF-A
  2026-01-05 19:47 [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stuebner
                   ` (3 preceding siblings ...)
  2026-01-05 19:47 ` [PATCH 04/12] rockchip: board: qnap-ts433: Update documentation to recent tool versions Heiko Stuebner
@ 2026-01-05 19:47 ` Heiko Stuebner
  2026-01-05 19:47 ` [PATCH 06/12] rockchip: board: qnap-ts433: Support multiple models of the TSx33 family Heiko Stuebner
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2026-01-05 19:47 UTC (permalink / raw)
  To: sjg, philipp.tomsich, kever.yang; +Cc: heiko, trini, u-boot

Upstream TF-A has basic support for RK3568 for a while, but only with the
last release finally gained also cpufreq support.

The only known missing piece is enabling the ARM crypto extensions,
but otherwise upstream TF-A is fully usable now.

So steal and adapt Quentin's wording from tiger-rk3588 on how to use
either upstream or vendor TF-A.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 doc/board/qnap/ts433.rst | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/doc/board/qnap/ts433.rst b/doc/board/qnap/ts433.rst
index 2cd7cf13d67..5c81dc953a6 100644
--- a/doc/board/qnap/ts433.rst
+++ b/doc/board/qnap/ts433.rst
@@ -39,17 +39,43 @@ modification and also a new maskrom downloader can be build:
     $ tools/ddrbin_tool.py rk3568 tools/ddrbin_param.txt bin/rk35/rk3568_ddr_1560MHz_v1.23.bin
     $ tools/boot_merger RKBOOT/RK3568MINIALL.ini
 
+Get TF-A
+--------
+
+There are two possible options, pick one or the other.
+
+Prebuilt binary from Rockchip
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. prompt:: bash
+
+   $ export BL31=../rkbin/bin/rk35/rk3568_bl31_v1.45.elf
+
+Upstream
+~~~~~~~~
+
+.. prompt:: bash
+
+   git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git
+   cd trusted-firmware-a
+   make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3568 bl31
+   export BL31=$PWD/build/rk3568/release/bl31/bl31.elf
+
 Building U-Boot
 ---------------
 
 .. code-block:: bash
 
     $ export CROSS_COMPILE=aarch64-linux-gnu-
-    $ export BL31=../rkbin/bin/rk35/rk3568_bl31_v1.45.elf
     $ export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3568_ddr_1560MHz_v1.23.bin
     $ make qnap-ts433-rk3568_defconfig
     $ make
 
+.. note::
+   If using upstream TF-A, one should disable ``SPL_ATF_NO_PLATFORM_PARAM`` symbol in
+   U-Boot config (via e.g. ``make CROSS_COMPILE=aarch64-linux-gnu- menuconfig``) which
+   will, among other things, enable console output in TF-A.
+
 This will build ``u-boot-rockchip.bin`` which can be written to the
 on-board eMMC.
 
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 06/12] rockchip: board: qnap-ts433: Support multiple models of the TSx33 family
  2026-01-05 19:47 [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stuebner
                   ` (4 preceding siblings ...)
  2026-01-05 19:47 ` [PATCH 05/12] rockchip: board: qnap-ts433: Add instructions for how to use upstream TF-A Heiko Stuebner
@ 2026-01-05 19:47 ` Heiko Stuebner
  2026-01-05 19:47 ` [PATCH 07/12] arm64: dts: rockchip: move cpu_thermal node to the correct position Heiko Stuebner
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2026-01-05 19:47 UTC (permalink / raw)
  To: sjg, philipp.tomsich, kever.yang; +Cc: heiko, trini, u-boot

The RK3568-based NAS systems share a common basic structure and mainly
only differ in the number of available hard-drive slots.

They also contain EEPROMs on their mainboard and backplane, that contain
identifying information and therefore make it possible to determine the
model at runtime.

Add that EEPROM reading and model association, to set the correct
devicetree filename for the OS that gets booted. This allows to just
set fdtdir in extlinux and have u-boot then load the correct devicetree.

For u-boot itself, all models are similar enough up to the emmc that
we wouldn't necessarily need to diversify here, especially as reading
the eeproms gets tricky at the stage where embedded_dtb_select would run.

So for now, we'll still need separate configs per model, but can share
the board-code.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 board/qnap/ts433_rk3568/Makefile    |   7 +
 board/qnap/ts433_rk3568/board.c     | 261 ++++++++++++++++++++++++++++
 configs/qnap-ts433-rk3568_defconfig |   2 +
 3 files changed, 270 insertions(+)
 create mode 100644 board/qnap/ts433_rk3568/Makefile
 create mode 100644 board/qnap/ts433_rk3568/board.c

diff --git a/board/qnap/ts433_rk3568/Makefile b/board/qnap/ts433_rk3568/Makefile
new file mode 100644
index 00000000000..d87f916d00b
--- /dev/null
+++ b/board/qnap/ts433_rk3568/Makefile
@@ -0,0 +1,7 @@
+#
+# (C) Copyright 2026 Heiko Stuebner <heiko@sntech.de>
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y	+= board.o
diff --git a/board/qnap/ts433_rk3568/board.c b/board/qnap/ts433_rk3568/board.c
new file mode 100644
index 00000000000..ea43d12942d
--- /dev/null
+++ b/board/qnap/ts433_rk3568/board.c
@@ -0,0 +1,261 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * (C) Copyright 2026 Heiko Stuebner <heiko@sntech.de>
+ */
+
+#include <dm.h>
+#include <env.h>
+#include <i2c_eeprom.h>
+#include <init.h>
+#include <net.h>
+#include <netdev.h>
+#include <vsprintf.h>
+
+#ifndef CONFIG_XPL_BUILD
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define DTB_DIR			"rockchip/"
+
+struct tsx33_model {
+	const char *mb;
+	const u8 mb_pcb;
+	const char *bp;
+	const u8 bp_pcb;
+	const char *name;
+	const char *fdtfile;
+};
+
+/*
+ * gd->board_type is unsigned long, so start at 1 for actual found types
+ * The numeric PCB ids should be matched against the highest available
+ * one for best feature matching. For example Q0AI0_13 gained per-disk
+ * gpios for presence detection and power-control. Similar changes
+ * for the other boards.
+ * So the list should be sorted higest to lowest pcb-id.
+ */
+enum tsx33_device_id {
+	UNKNOWN_TSX33 = 0,
+	Q0AI0_13,
+	Q0AI0_11,
+	Q0AJ0_Q0AM0_12_11,
+	Q0AJ0_Q0AM0_11_10,
+	Q0B20_Q0AW0_12_10,
+	Q0B20_Q0B30_12_10,
+	Q0B20_Q0B30_10_10,
+	QA0110_10,
+	TSX33_MODELS,
+};
+
+/*
+ * All TSx33 devices consist of a mainboard and possible backplane.
+ * Each board has a model identifier and a pcb code written to an eeprom
+ * on it. Later board revisions got per-harddrive presence detection
+ * and power-supply switches, so might need an overlay applied later on
+ * to support those.
+ */
+static const struct tsx33_model tsx33_models[TSX33_MODELS] = {
+	[UNKNOWN_TSX33] = {
+		"UNKNOWN",
+		0,
+		NULL,
+		0,
+		"Unknown TSx33",
+		NULL,
+	},
+	[Q0AI0_13] = {
+		"Q0AI0",
+		13,
+		NULL,
+		0,
+		"TS133",
+		NULL, /* not yet supported */
+	},
+	[Q0AI0_11] = {
+		"Q0AI0",
+		11,
+		NULL,
+		0,
+		"TS133",
+		NULL, /* not yet supported */
+	},
+	[Q0AJ0_Q0AM0_12_11] = {
+		"Q0AJ0",
+		12,
+		"Q0AM0",
+		11,
+		"TS233",
+		NULL, /* not yet supported */
+	},
+	[Q0AJ0_Q0AM0_11_10] = {
+		"Q0AJ0",
+		11,
+		"Q0AM0",
+		10,
+		"TS233",
+		NULL, /* not yet supported */
+	},
+	[Q0B20_Q0AW0_12_10] = {
+		"Q0B20",
+		12,
+		"Q0AW0",
+		10,
+		"TS216G",
+		NULL, /* not yet supported */
+	},
+	[Q0B20_Q0B30_12_10] = {
+		"Q0B20",
+		12,
+		"Q0B30",
+		10,
+		"TS433",
+		DTB_DIR "rk3568-qnap-ts433.dtb",
+	},
+	[Q0B20_Q0B30_10_10] = {
+		"Q0B20",
+		10,
+		"Q0B30",
+		10,
+		"TS433",
+		DTB_DIR "rk3568-qnap-ts433.dtb",
+	},
+	[QA0110_10] = {
+		/*
+		 * The board ident in the original firmware is longer here.
+		 * Likely the field order is different in the ident string.
+		 * So this needs an EEPROM dump to figure out.
+		 */
+		"QA0110",
+		11,
+		NULL,
+		0,
+		"TS433eU",
+		NULL, /* not yet supported */
+	},
+};
+
+/* Field offset and length taken from HAL implementation */
+#define MB_PRODUCT_OFF	0x42
+#define MB_PRODUCT_LEN	32
+#define BP_PRODUCT_OFF	0x6a
+#define BP_PRODUCT_LEN	32
+
+#define PRODUCT_BOARD_OFF	4
+#define PRODUCT_BOARD_LEN	5
+#define PRODUCT_PCB_OFF	9
+#define PRODUCT_PCB_LEN	2
+#define PRODUCT_BOM_OFF	11
+#define PRODUCT_BOM_LEN	1
+
+static void tsx33_decode_product(char *product, char *board, int *pcb)
+{
+	strncpy(board, product + PRODUCT_BOARD_OFF, PRODUCT_BOARD_LEN);
+
+	/* add an artificial end to the PCB string */
+	product[PRODUCT_BOM_OFF] = '\0';
+	*pcb = (int)simple_strtol(product + PRODUCT_PCB_OFF, NULL, 0);
+}
+
+static int tsx33_setup_device(int type, const struct tsx33_model *model)
+{
+	if (!model->bp)
+		printf("Type:  QNAP %s (%s_%d)\n", model->name,
+		       model->mb, model->mb_pcb);
+	else
+		printf("Type:  QNAP %s (%s_%s_%d_%d)\n", model->name, model->mb,
+		       model->bp, model->mb_pcb, model->bp_pcb);
+
+	gd->board_type = type;
+
+	if (!model->fdtfile) {
+		printf("No board-specific devicetree found, functionality might be degraded.\n");
+		return 0;
+	}
+
+	return env_set("fdtfile", model->fdtfile);
+}
+
+static int tsx33_detect_device(void)
+{
+	struct udevice *dev;
+	char product[MB_PRODUCT_LEN];
+	char mb_board[PRODUCT_BOARD_LEN] = { 0 };
+	char bp_board[PRODUCT_BOARD_LEN] = { 0 };
+	int mb_pcb = 0, bp_pcb = 0;
+	int ret, i;
+
+	/*
+	 * Init to 0, for no specific board found.
+	 * This allows us to run on similar devices for initial bringup.
+	 */
+	gd->board_type = 0;
+
+	/* Get mainboard eeprom, this will always be present */
+	ret = uclass_get_device_by_name(UCLASS_I2C_EEPROM, "eeprom@54", &dev);
+	if (ret)
+		return ret;
+
+	ret = i2c_eeprom_read(dev, MB_PRODUCT_OFF, product, MB_PRODUCT_LEN);
+	if (ret)
+		return ret;
+
+	tsx33_decode_product(product, mb_board, &mb_pcb);
+
+	/* Try to get backplane eeprom, only available if a backplane exists */
+	ret = uclass_get_device_by_name(UCLASS_I2C_EEPROM, "eeprom@56", &dev);
+	if (ret)
+		goto search_model;
+
+	ret = i2c_eeprom_read(dev, BP_PRODUCT_OFF, product, BP_PRODUCT_LEN);
+	if (ret)
+		goto search_model;
+
+	tsx33_decode_product(product, bp_board, &bp_pcb);
+
+search_model:
+	for (i = 0; i < TSX33_MODELS; i++) {
+		const struct tsx33_model *model = &tsx33_models[i];
+
+		/*
+		 * Check if mainboard does not match the entry.
+		 * Condition to meet: Either board-name differs or model
+		 * pcb-rev is bigger than the one read from the eeprom.
+		 */
+		if (strncmp(model->mb, mb_board, PRODUCT_BOARD_LEN) ||
+		    model->mb_pcb > mb_pcb)
+			continue;
+
+		/*
+		 * Mainboard matches and there is no backplane found
+		 * nor expected.
+		 */
+		if (!bp_pcb && !model->bp)
+			return tsx33_setup_device(i, model);
+
+		/* we expect a backplane, but the entry does not have one */
+		if (!model->bp)
+			continue;
+
+		if (!strncmp(model->bp, bp_board, PRODUCT_BOARD_LEN) &&
+		    model->bp_pcb <= bp_pcb)
+			return tsx33_setup_device(i, model);
+	}
+
+	printf("Type: No matching type found for %s_%s_%d_%d\n", mb_board,
+	       bp_board, mb_pcb, bp_pcb);
+
+	return -ENODEV;
+}
+
+int rk_board_late_init(void)
+{
+	int ret;
+
+	/* If detection fails, we'll still try to continue */
+	ret = tsx33_detect_device();
+	if (ret)
+		printf("Unable to detect device type: %d\n", ret);
+
+	return 0;
+}
+#endif
diff --git a/configs/qnap-ts433-rk3568_defconfig b/configs/qnap-ts433-rk3568_defconfig
index ebcd3b69e90..dfb240ed70f 100644
--- a/configs/qnap-ts433-rk3568_defconfig
+++ b/configs/qnap-ts433-rk3568_defconfig
@@ -24,6 +24,7 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
 CONFIG_SPL_ATF=y
+CONFIG_BOARD_TYPES=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_I2C=y
@@ -50,6 +51,7 @@ CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
 CONFIG_SUPPORT_EMMC_RPMB=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 07/12] arm64: dts: rockchip: move cpu_thermal node to the correct position
  2026-01-05 19:47 [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stuebner
                   ` (5 preceding siblings ...)
  2026-01-05 19:47 ` [PATCH 06/12] rockchip: board: qnap-ts433: Support multiple models of the TSx33 family Heiko Stuebner
@ 2026-01-05 19:47 ` Heiko Stuebner
  2026-01-05 19:47 ` [PATCH 08/12] arm64: dts: rockchip: describe mcu eeprom cells on rk3568-ts433 Heiko Stuebner
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2026-01-05 19:47 UTC (permalink / raw)
  To: sjg, philipp.tomsich, kever.yang; +Cc: heiko, trini, u-boot

The &cpu_thermal node was added at the wrong position, move it to
the correctly sorted one.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20251112214206.423244-2-heiko@sntech.de

[ upstream commit: 15efa2414602ad4c411ea8d4113b87656ebe0737 ]

(cherry picked from commit 0ac36d180d89464e8dda0287cee633ad71c43211)
---
 .../src/arm64/rockchip/rk3568-qnap-ts433.dts  | 96 +++++++++----------
 1 file changed, 48 insertions(+), 48 deletions(-)

diff --git a/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts b/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts
index 6ae4316761c..5656554ca28 100644
--- a/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts
+++ b/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts
@@ -196,6 +196,54 @@
 	cpu-supply = <&vdd_cpu>;
 };
 
+/*
+ * The MCU can provide system temperature too, but only by polling and of
+ * course also cannot set trip points. So attach to the cpu thermal-zone
+ * instead to control the fan.
+ */
+&cpu_thermal {
+	trips {
+		case_fan0: case-fan0 {
+			hysteresis = <2000>;
+			temperature = <35000>;
+			type = "active";
+		};
+
+		case_fan1: case-fan1 {
+			hysteresis = <2000>;
+			temperature = <45000>;
+			type = "active";
+		};
+
+		case_fan2: case-fan2 {
+			hysteresis = <2000>;
+			temperature = <65000>;
+			type = "active";
+		};
+	};
+
+	cooling-maps {
+		/*
+		 * Always provide some air movement, due to small case
+		 * full of harddrives.
+		 */
+		map1 {
+			cooling-device = <&fan THERMAL_NO_LIMIT 1>;
+			trip = <&case_fan0>;
+		};
+
+		map2 {
+			cooling-device = <&fan 2 3>;
+			trip = <&case_fan1>;
+		};
+
+		map3 {
+			cooling-device = <&fan 4 THERMAL_NO_LIMIT>;
+			trip = <&case_fan2>;
+		};
+	};
+};
+
 &gmac0 {
 	assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
 	assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>;
@@ -492,54 +540,6 @@
 	};
 };
 
-/*
- * The MCU can provide system temperature too, but only by polling and of
- * course also cannot set trip points. So attach to the cpu thermal-zone
- * instead to control the fan.
- */
-&cpu_thermal {
-	trips {
-		case_fan0: case-fan0 {
-			hysteresis = <2000>;
-			temperature = <35000>;
-			type = "active";
-		};
-
-		case_fan1: case-fan1 {
-			hysteresis = <2000>;
-			temperature = <45000>;
-			type = "active";
-		};
-
-		case_fan2: case-fan2 {
-			hysteresis = <2000>;
-			temperature = <65000>;
-			type = "active";
-		};
-	};
-
-	cooling-maps {
-		/*
-		 * Always provide some air movement, due to small case
-		 * full of harddrives.
-		 */
-		map1 {
-			cooling-device = <&fan THERMAL_NO_LIMIT 1>;
-			trip = <&case_fan0>;
-		};
-
-		map2 {
-			cooling-device = <&fan 2 3>;
-			trip = <&case_fan1>;
-		};
-
-		map3 {
-			cooling-device = <&fan 4 THERMAL_NO_LIMIT>;
-			trip = <&case_fan2>;
-		};
-	};
-};
-
 &pcie30phy {
 	data-lanes = <1 2>;
 	status = "okay";
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 08/12] arm64: dts: rockchip: describe mcu eeprom cells on rk3568-ts433
  2026-01-05 19:47 [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stuebner
                   ` (6 preceding siblings ...)
  2026-01-05 19:47 ` [PATCH 07/12] arm64: dts: rockchip: move cpu_thermal node to the correct position Heiko Stuebner
@ 2026-01-05 19:47 ` Heiko Stuebner
  2026-01-05 19:47 ` [PATCH 09/12] arm64: dts: rockchip: move common qnap tsx33 parts to dtsi Heiko Stuebner
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2026-01-05 19:47 UTC (permalink / raw)
  To: sjg, philipp.tomsich, kever.yang; +Cc: heiko, trini, u-boot

The MCU's eeprom contains the unit's serial and a number of slots for
mac-addresses. As the MCU seems to be used in different devices, up to
8 mac addresses can live there and the unused slots are actually
initialized with empty mac-address strings like 00:00:00:00:05:09 .

Interestingly on the TS-433, the PCIe ethernet adapter brings its own
memory to hold its mac, and the gmac0 is supposed to get its mac from
the second mac-slot, while the first one stays empty.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20251112214206.423244-3-heiko@sntech.de

[ upstream commit: 81f116991433d2547d7f350873cb4511ebcd4fec ]

(cherry picked from commit 51b234a762b64dd4d8b1f338b4abbcf7cfc748a4)
---
 .../src/arm64/rockchip/rk3568-qnap-ts433.dts  | 62 +++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts b/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts
index 5656554ca28..224db87973b 100644
--- a/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts
+++ b/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts
@@ -655,6 +655,68 @@
 			#cooling-cells = <2>;
 			cooling-levels = <0 64 89 128 166 204 221 238>;
 		};
+
+		nvmem-layout {
+			compatible = "fixed-layout";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			serial-number@0 {
+				reg = <0x0 0x13>;
+			};
+
+			ext-port@22 {
+				reg = <0x22 0x2>;
+			};
+
+			mac0: mac@24 {
+				compatible = "mac-base";
+				reg = <0x24 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac1: mac@35 {
+				compatible = "mac-base";
+				reg = <0x35 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac2: mac@46 {
+				compatible = "mac-base";
+				reg = <0x46 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac3: mac@57 {
+				compatible = "mac-base";
+				reg = <0x57 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac4: mac@68 {
+				compatible = "mac-base";
+				reg = <0x68 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac5: mac@79 {
+				compatible = "mac-base";
+				reg = <0x79 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac6: mac@8a {
+				compatible = "mac-base";
+				reg = <0x8a 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac7: mac@9b {
+				compatible = "mac-base";
+				reg = <0x9b 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+		};
 	};
 };
 
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 09/12] arm64: dts: rockchip: move common qnap tsx33 parts to dtsi
  2026-01-05 19:47 [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stuebner
                   ` (7 preceding siblings ...)
  2026-01-05 19:47 ` [PATCH 08/12] arm64: dts: rockchip: describe mcu eeprom cells on rk3568-ts433 Heiko Stuebner
@ 2026-01-05 19:47 ` Heiko Stuebner
  2026-01-05 19:47 ` [PATCH 10/12] arm64: dts: rockchip: add QNAP TS233 devicetree Heiko Stuebner
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2026-01-05 19:47 UTC (permalink / raw)
  To: sjg, philipp.tomsich, kever.yang; +Cc: heiko, trini, u-boot

The NAS series based around the rk3568 contains a number of models with
1-4 drives, that reuse most of the board structure.

Therefore move the shared parts to a dtsi, to be included by the devices.

As the smallest device is the 1-bay TS133, keep everything > slot1 in
the individual devicetree.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20251112214206.423244-4-heiko@sntech.de

[ upstream commit: 35202606ea08b9ec2b1386ac937a729e25d5beb0 ]

(cherry picked from commit 8cf4cbd14444705137b5129a2acba303eb975fd1)
---
 .../src/arm64/rockchip/rk3568-qnap-ts433.dts  | 666 +-----------------
 .../src/arm64/rockchip/rk3568-qnap-tsx33.dtsi | 608 ++++++++++++++++
 2 files changed, 645 insertions(+), 629 deletions(-)
 create mode 100644 dts/upstream/src/arm64/rockchip/rk3568-qnap-tsx33.dtsi

diff --git a/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts b/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts
index 224db87973b..d1e3b7e7a28 100644
--- a/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts
+++ b/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts
@@ -6,10 +6,7 @@
 
 /dts-v1/;
 
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/leds/common.h>
-#include <dt-bindings/gpio/gpio.h>
-#include "rk3568.dtsi"
+#include "rk3568-qnap-tsx33.dtsi"
 
 / {
 	model = "Qnap TS-433-4G NAS System 4-Bay";
@@ -17,83 +14,6 @@
 
 	aliases {
 		ethernet0 = &gmac0;
-		mmc0 = &sdhci;
-		rtc0 = &rtc_rv8263;
-	};
-
-	chosen {
-		stdout-path = "serial2:115200n8";
-	};
-
-	keys {
-		compatible = "gpio-keys";
-		pinctrl-0 = <&copy_button_pin>, <&reset_button_pin>;
-		pinctrl-names = "default";
-
-		key-copy {
-			label = "copy";
-			gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_COPY>;
-		};
-
-		key-reset {
-			label = "reset";
-			gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RESTART>;
-		};
-	};
-
-	leds {
-		compatible = "gpio-leds";
-
-		led-0 {
-			color = <LED_COLOR_ID_GREEN>;
-			function = LED_FUNCTION_DISK;
-			gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
-			label = "hdd1:green:disk";
-			linux,default-trigger = "disk-activity";
-			pinctrl-names = "default";
-			pinctrl-0 = <&hdd1_led_pin>;
-		};
-
-		led-1 {
-			color = <LED_COLOR_ID_GREEN>;
-			function = LED_FUNCTION_DISK;
-			gpios = <&gpio1 RK_PD6 GPIO_ACTIVE_LOW>;
-			label = "hdd2:green:disk";
-			linux,default-trigger = "disk-activity";
-			pinctrl-names = "default";
-			pinctrl-0 = <&hdd2_led_pin>;
-		};
-
-		led-2 {
-			color = <LED_COLOR_ID_GREEN>;
-			function = LED_FUNCTION_DISK;
-			gpios = <&gpio1 RK_PD7 GPIO_ACTIVE_LOW>;
-			label = "hdd3:green:disk";
-			linux,default-trigger = "disk-activity";
-			pinctrl-names = "default";
-			pinctrl-0 = <&hdd3_led_pin>;
-		};
-
-		led-3 {
-			color = <LED_COLOR_ID_GREEN>;
-			function = LED_FUNCTION_DISK;
-			gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>;
-			label = "hdd4:green:disk";
-			linux,default-trigger = "disk-activity";
-			pinctrl-names = "default";
-			pinctrl-0 = <&hdd4_led_pin>;
-		};
-	};
-
-	dc_12v: regulator-dc-12v {
-		compatible = "regulator-fixed";
-		regulator-name = "dc_12v";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <12000000>;
-		regulator-max-microvolt = <12000000>;
 	};
 
 	vcc3v3_pcie: regulator-vcc3v3-pcie {
@@ -105,74 +25,6 @@
 		gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
 		vin-supply = <&dc_12v>;
 	};
-
-	vcc3v3_sys: regulator-vcc3v3-sys {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc3v3_sys";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
-		vin-supply = <&dc_12v>;
-	};
-
-	vcc5v0_host: regulator-vcc5v0-host {
-		compatible = "regulator-fixed";
-		enable-active-high;
-		pinctrl-names = "default";
-		pinctrl-0 = <&vcc5v0_host_en>;
-		gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
-		regulator-name = "vcc5v0_host";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		vin-supply = <&vcc5v0_usb>;
-	};
-
-	vcc5v0_otg: regulator-vcc5v0-otg {
-		compatible = "regulator-fixed";
-		enable-active-high;
-		gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&vcc5v0_otg_en>;
-		regulator-name = "vcc5v0_otg";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		vin-supply = <&vcc5v0_usb>;
-	};
-
-	vcc5v0_sys: regulator-vcc5v0-sys {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc5v0_sys";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		vin-supply = <&dc_12v>;
-	};
-
-	vcc5v0_usb: regulator-vcc5v0-usb {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc5v0_usb";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		vin-supply = <&dc_12v>;
-	};
-};
-
-/* connected to usb_host0_xhci */
-&combphy0 {
-	status = "okay";
-};
-
-/* connected to sata1 */
-&combphy1 {
-	status = "okay";
 };
 
 /* connected to sata2 */
@@ -180,70 +32,6 @@
 	status = "okay";
 };
 
-&cpu0 {
-	cpu-supply = <&vdd_cpu>;
-};
-
-&cpu1 {
-	cpu-supply = <&vdd_cpu>;
-};
-
-&cpu2 {
-	cpu-supply = <&vdd_cpu>;
-};
-
-&cpu3 {
-	cpu-supply = <&vdd_cpu>;
-};
-
-/*
- * The MCU can provide system temperature too, but only by polling and of
- * course also cannot set trip points. So attach to the cpu thermal-zone
- * instead to control the fan.
- */
-&cpu_thermal {
-	trips {
-		case_fan0: case-fan0 {
-			hysteresis = <2000>;
-			temperature = <35000>;
-			type = "active";
-		};
-
-		case_fan1: case-fan1 {
-			hysteresis = <2000>;
-			temperature = <45000>;
-			type = "active";
-		};
-
-		case_fan2: case-fan2 {
-			hysteresis = <2000>;
-			temperature = <65000>;
-			type = "active";
-		};
-	};
-
-	cooling-maps {
-		/*
-		 * Always provide some air movement, due to small case
-		 * full of harddrives.
-		 */
-		map1 {
-			cooling-device = <&fan THERMAL_NO_LIMIT 1>;
-			trip = <&case_fan0>;
-		};
-
-		map2 {
-			cooling-device = <&fan 2 3>;
-			trip = <&case_fan1>;
-		};
-
-		map3 {
-			cooling-device = <&fan 4 THERMAL_NO_LIMIT>;
-			trip = <&case_fan2>;
-		};
-	};
-};
-
 &gmac0 {
 	assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
 	assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>;
@@ -260,263 +48,7 @@
 	status = "okay";
 };
 
-&gpu {
-	mali-supply = <&vdd_gpu>;
-	status = "okay";
-};
-
-&i2c0 {
-	status = "okay";
-
-	pmic@20 {
-		compatible = "rockchip,rk809";
-		reg = <0x20>;
-		interrupt-parent = <&gpio0>;
-		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
-		#clock-cells = <1>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&pmic_int_l>;
-		system-power-controller;
-		vcc1-supply = <&vcc3v3_sys>;
-		vcc2-supply = <&vcc3v3_sys>;
-		vcc3-supply = <&vcc3v3_sys>;
-		vcc4-supply = <&vcc3v3_sys>;
-		vcc5-supply = <&vcc3v3_sys>;
-		vcc6-supply = <&vcc3v3_sys>;
-		vcc7-supply = <&vcc3v3_sys>;
-		vcc8-supply = <&vcc3v3_sys>;
-		vcc9-supply = <&vcc3v3_sys>;
-		wakeup-source;
-
-		regulators {
-			vdd_logic: DCDC_REG1 {
-				regulator-name = "vdd_logic";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-initial-mode = <0x2>;
-				regulator-min-microvolt = <500000>;
-				regulator-max-microvolt = <1350000>;
-				regulator-ramp-delay = <6001>;
-
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vdd_gpu: DCDC_REG2 {
-				regulator-name = "vdd_gpu";
-				regulator-always-on;
-				regulator-initial-mode = <0x2>;
-				regulator-min-microvolt = <500000>;
-				regulator-max-microvolt = <1350000>;
-				regulator-ramp-delay = <6001>;
-
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc_ddr: DCDC_REG3 {
-				regulator-name = "vcc_ddr";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-initial-mode = <0x2>;
-
-				regulator-state-mem {
-					regulator-on-in-suspend;
-				};
-			};
-
-			vdd_npu: DCDC_REG4 {
-				regulator-name = "vdd_npu";
-				regulator-initial-mode = <0x2>;
-				regulator-min-microvolt = <500000>;
-				regulator-max-microvolt = <1350000>;
-				regulator-ramp-delay = <6001>;
-
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc_1v8: DCDC_REG5 {
-				regulator-name = "vcc_1v8";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vdda0v9_image: LDO_REG1 {
-				regulator-name = "vdda0v9_image";
-				regulator-always-on;
-				regulator-min-microvolt = <900000>;
-				regulator-max-microvolt = <900000>;
-
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vdda_0v9: LDO_REG2 {
-				regulator-name = "vdda_0v9";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <900000>;
-				regulator-max-microvolt = <900000>;
-
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vdda0v9_pmu: LDO_REG3 {
-				regulator-name = "vdda0v9_pmu";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <900000>;
-				regulator-max-microvolt = <900000>;
-
-				regulator-state-mem {
-					regulator-on-in-suspend;
-					regulator-suspend-microvolt = <900000>;
-				};
-			};
-
-			vccio_acodec: LDO_REG4 {
-				regulator-name = "vccio_acodec";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
-
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vccio_sd: LDO_REG5 {
-				regulator-name = "vccio_sd";
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <3300000>;
-
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc3v3_pmu: LDO_REG6 {
-				regulator-name = "vcc3v3_pmu";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
-
-				regulator-state-mem {
-					regulator-on-in-suspend;
-					regulator-suspend-microvolt = <3300000>;
-				};
-			};
-
-			vcca_1v8: LDO_REG7 {
-				regulator-name = "vcca_1v8";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcca1v8_pmu: LDO_REG8 {
-				regulator-name = "vcca1v8_pmu";
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-
-				regulator-state-mem {
-					regulator-on-in-suspend;
-					regulator-suspend-microvolt = <1800000>;
-				};
-			};
-
-			vcca1v8_image: LDO_REG9 {
-				regulator-name = "vcca1v8_image";
-				regulator-always-on;
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc_3v3: SWITCH_REG1 {
-				regulator-name = "vcc_3v3";
-				regulator-always-on;
-				regulator-boot-on;
-
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-
-			vcc3v3_sd: SWITCH_REG2 {
-				regulator-name = "vcc3v3_sd";
-				/*
-				 * turning this off, breaks access to both
-				 * PCIe controllers, refclk generator perhaps
-				 */
-				regulator-always-on;
-				regulator-boot-on;
-
-				regulator-state-mem {
-					regulator-off-in-suspend;
-				};
-			};
-		};
-	};
-
-	vdd_cpu: regulator@40 {
-		compatible = "silergy,syr827";
-		reg = <0x40>;
-		fcs,suspend-voltage-selector = <1>;
-		regulator-name = "vdd_cpu";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <712500>;
-		regulator-max-microvolt = <1390000>;
-		regulator-ramp-delay = <2300>;
-		vin-supply = <&vcc5v0_sys>;
-	};
-};
-
 &i2c1 {
-	status = "okay";
-
-	rtc_rv8263: rtc@51 {
-		compatible = "microcrystal,rv8263";
-		reg = <0x51>;
-		wakeup-source;
-	};
-
-	/* eeprom for vital-product-data on the mainboard */
-	eeprom@54 {
-		compatible = "giantec,gt24c04a", "atmel,24c04";
-		reg = <0x54>;
-		label = "VPD_MB";
-		num-addresses = <2>;
-		pagesize = <16>;
-		read-only;
-	};
-
 	/* eeprom for vital-product-data on the backplane */
 	eeprom@56 {
 		compatible = "giantec,gt24c04a", "atmel,24c04";
@@ -528,6 +60,42 @@
 	};
 };
 
+&leds {
+	led-1 {
+		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_DISK;
+		gpios = <&gpio1 RK_PD6 GPIO_ACTIVE_LOW>;
+		label = "hdd2:green:disk";
+		linux,default-trigger = "disk-activity";
+		pinctrl-names = "default";
+		pinctrl-0 = <&hdd2_led_pin>;
+	};
+
+	led-2 {
+		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_DISK;
+		gpios = <&gpio1 RK_PD7 GPIO_ACTIVE_LOW>;
+		label = "hdd3:green:disk";
+		linux,default-trigger = "disk-activity";
+		pinctrl-names = "default";
+		pinctrl-0 = <&hdd3_led_pin>;
+	};
+
+	led-3 {
+		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_DISK;
+		gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>;
+		label = "hdd4:green:disk";
+		linux,default-trigger = "disk-activity";
+		pinctrl-names = "default";
+		pinctrl-0 = <&hdd4_led_pin>;
+	};
+};
+
+&mcu {
+	compatible = "qnap,ts433-mcu";
+};
+
 &mdio0 {
 	rgmii_phy0: ethernet-phy@3 {
 		/* Motorcomm YT8521 phy */
@@ -567,21 +135,7 @@
 		};
 	};
 
-	keys {
-		copy_button_pin: copy-button-pin {
-			rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>;
-		};
-
-		reset_button_pin: reset-button-pin {
-			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
-		};
-	};
-
 	leds {
-		hdd1_led_pin: hdd1-led-pin {
-			rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
-		};
-
 		hdd2_led_pin: hdd2-led-pin {
 			rockchip,pins = <1 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
 		};
@@ -594,152 +148,12 @@
 			rockchip,pins = <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
 		};
 	};
-
-	pmic {
-		pmic_int_l: pmic-int-l {
-			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
-		};
-	};
-
-	usb {
-		vcc5v0_host_en: vcc5v0-host-en {
-			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-
-		vcc5v0_otg_en: vcc5v0-otg-en {
-			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-	};
-};
-
-&pmu_io_domains {
-	vccio4-supply = <&vcc_1v8>;
-	vccio6-supply = <&vcc_1v8>;
-	status = "okay";
-};
-
-&sata1 {
-	status = "okay";
 };
 
 &sata2 {
 	status = "okay";
 };
 
-&sdhci {
-	bus-width = <8>;
-	max-frequency = <200000000>;
-	non-removable;
-	pinctrl-names = "default";
-	pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
-	status = "okay";
-};
-
-&tsadc {
-	rockchip,hw-tshut-mode = <1>;
-	rockchip,hw-tshut-polarity = <0>;
-	status = "okay";
-};
-
-/*
- * Connected to an MCU, that provides access to more LEDs,
- * buzzer, fan control and more.
- */
-&uart0 {
-	status = "okay";
-
-	mcu {
-		compatible = "qnap,ts433-mcu";
-
-		fan: fan-0 {
-			#cooling-cells = <2>;
-			cooling-levels = <0 64 89 128 166 204 221 238>;
-		};
-
-		nvmem-layout {
-			compatible = "fixed-layout";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			serial-number@0 {
-				reg = <0x0 0x13>;
-			};
-
-			ext-port@22 {
-				reg = <0x22 0x2>;
-			};
-
-			mac0: mac@24 {
-				compatible = "mac-base";
-				reg = <0x24 0x11>;
-				#nvmem-cell-cells = <1>;
-			};
-
-			mac1: mac@35 {
-				compatible = "mac-base";
-				reg = <0x35 0x11>;
-				#nvmem-cell-cells = <1>;
-			};
-
-			mac2: mac@46 {
-				compatible = "mac-base";
-				reg = <0x46 0x11>;
-				#nvmem-cell-cells = <1>;
-			};
-
-			mac3: mac@57 {
-				compatible = "mac-base";
-				reg = <0x57 0x11>;
-				#nvmem-cell-cells = <1>;
-			};
-
-			mac4: mac@68 {
-				compatible = "mac-base";
-				reg = <0x68 0x11>;
-				#nvmem-cell-cells = <1>;
-			};
-
-			mac5: mac@79 {
-				compatible = "mac-base";
-				reg = <0x79 0x11>;
-				#nvmem-cell-cells = <1>;
-			};
-
-			mac6: mac@8a {
-				compatible = "mac-base";
-				reg = <0x8a 0x11>;
-				#nvmem-cell-cells = <1>;
-			};
-
-			mac7: mac@9b {
-				compatible = "mac-base";
-				reg = <0x9b 0x11>;
-				#nvmem-cell-cells = <1>;
-			};
-		};
-	};
-};
-
-/*
- * Pins available on CN3 connector at TTL voltage level (3V3).
- * ,_  _.
- * |1234|  1=TX 2=VCC
- * `----'  3=RX 4=GND
- */
-&uart2 {
-	status = "okay";
-};
-
-&usb2phy0 {
-	status = "okay";
-};
-
-/* connected to usb_host0_xhci */
-&usb2phy0_otg {
-	phy-supply = <&vcc5v0_otg>;
-	status = "okay";
-};
-
 &usb2phy1 {
 	status = "okay";
 };
@@ -765,12 +179,6 @@
 	status = "okay";
 };
 
-/* front port */
-&usb_host0_xhci {
-	dr_mode = "host";
-	status = "okay";
-};
-
 /* left port backside */
 &usb_host1_ehci {
 	status = "okay";
diff --git a/dts/upstream/src/arm64/rockchip/rk3568-qnap-tsx33.dtsi b/dts/upstream/src/arm64/rockchip/rk3568-qnap-tsx33.dtsi
new file mode 100644
index 00000000000..f009275c72c
--- /dev/null
+++ b/dts/upstream/src/arm64/rockchip/rk3568-qnap-tsx33.dtsi
@@ -0,0 +1,608 @@
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/gpio/gpio.h>
+#include "rk3568.dtsi"
+
+/ {
+	aliases {
+		mmc0 = &sdhci;
+		rtc0 = &rtc_rv8263;
+	};
+
+	chosen {
+		stdout-path = "serial2:115200n8";
+	};
+
+	keys {
+		compatible = "gpio-keys";
+		pinctrl-0 = <&copy_button_pin>, <&reset_button_pin>;
+		pinctrl-names = "default";
+
+		key-copy {
+			label = "copy";
+			gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_COPY>;
+		};
+
+		key-reset {
+			label = "reset";
+			gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	leds: leds {
+		compatible = "gpio-leds";
+
+		led-0 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_DISK;
+			gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
+			label = "hdd1:green:disk";
+			linux,default-trigger = "disk-activity";
+			pinctrl-names = "default";
+			pinctrl-0 = <&hdd1_led_pin>;
+		};
+	};
+
+	dc_12v: regulator-dc-12v {
+		compatible = "regulator-fixed";
+		regulator-name = "dc_12v";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+	};
+
+	vcc3v3_sys: regulator-vcc3v3-sys {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc3v3_sys";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&dc_12v>;
+	};
+
+	vcc5v0_host: regulator-vcc5v0-host {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		pinctrl-names = "default";
+		pinctrl-0 = <&vcc5v0_host_en>;
+		gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
+		regulator-name = "vcc5v0_host";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vcc5v0_usb>;
+	};
+
+	vcc5v0_otg: regulator-vcc5v0-otg {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&vcc5v0_otg_en>;
+		regulator-name = "vcc5v0_otg";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vcc5v0_usb>;
+	};
+
+	vcc5v0_sys: regulator-vcc5v0-sys {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc5v0_sys";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&dc_12v>;
+	};
+
+	vcc5v0_usb: regulator-vcc5v0-usb {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc5v0_usb";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&dc_12v>;
+	};
+};
+
+/* connected to usb_host0_xhci */
+&combphy0 {
+	status = "okay";
+};
+
+/* connected to sata1 */
+&combphy1 {
+	status = "okay";
+};
+
+&cpu0 {
+	cpu-supply = <&vdd_cpu>;
+};
+
+&cpu1 {
+	cpu-supply = <&vdd_cpu>;
+};
+
+&cpu2 {
+	cpu-supply = <&vdd_cpu>;
+};
+
+&cpu3 {
+	cpu-supply = <&vdd_cpu>;
+};
+
+/*
+ * The MCU can provide system temperature too, but only by polling and of
+ * course also cannot set trip points. So attach to the cpu thermal-zone
+ * instead to control the fan.
+ */
+&cpu_thermal {
+	trips {
+		case_fan0: case-fan0 {
+			hysteresis = <2000>;
+			temperature = <35000>;
+			type = "active";
+		};
+
+		case_fan1: case-fan1 {
+			hysteresis = <2000>;
+			temperature = <45000>;
+			type = "active";
+		};
+
+		case_fan2: case-fan2 {
+			hysteresis = <2000>;
+			temperature = <65000>;
+			type = "active";
+		};
+	};
+
+	cooling-maps {
+		/*
+		 * Always provide some air movement, due to small case
+		 * full of harddrives.
+		 */
+		map1 {
+			cooling-device = <&fan THERMAL_NO_LIMIT 1>;
+			trip = <&case_fan0>;
+		};
+
+		map2 {
+			cooling-device = <&fan 2 3>;
+			trip = <&case_fan1>;
+		};
+
+		map3 {
+			cooling-device = <&fan 4 THERMAL_NO_LIMIT>;
+			trip = <&case_fan2>;
+		};
+	};
+};
+
+&gpu {
+	mali-supply = <&vdd_gpu>;
+	status = "okay";
+};
+
+&i2c0 {
+	status = "okay";
+
+	pmic@20 {
+		compatible = "rockchip,rk809";
+		reg = <0x20>;
+		interrupt-parent = <&gpio0>;
+		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
+		#clock-cells = <1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pmic_int_l>;
+		system-power-controller;
+		vcc1-supply = <&vcc3v3_sys>;
+		vcc2-supply = <&vcc3v3_sys>;
+		vcc3-supply = <&vcc3v3_sys>;
+		vcc4-supply = <&vcc3v3_sys>;
+		vcc5-supply = <&vcc3v3_sys>;
+		vcc6-supply = <&vcc3v3_sys>;
+		vcc7-supply = <&vcc3v3_sys>;
+		vcc8-supply = <&vcc3v3_sys>;
+		vcc9-supply = <&vcc3v3_sys>;
+		wakeup-source;
+
+		regulators {
+			vdd_logic: DCDC_REG1 {
+				regulator-name = "vdd_logic";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-initial-mode = <0x2>;
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <6001>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vdd_gpu: DCDC_REG2 {
+				regulator-name = "vdd_gpu";
+				regulator-always-on;
+				regulator-initial-mode = <0x2>;
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <6001>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vcc_ddr: DCDC_REG3 {
+				regulator-name = "vcc_ddr";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-initial-mode = <0x2>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+				};
+			};
+
+			vdd_npu: DCDC_REG4 {
+				regulator-name = "vdd_npu";
+				regulator-initial-mode = <0x2>;
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <6001>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vcc_1v8: DCDC_REG5 {
+				regulator-name = "vcc_1v8";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vdda0v9_image: LDO_REG1 {
+				regulator-name = "vdda0v9_image";
+				regulator-always-on;
+				regulator-min-microvolt = <900000>;
+				regulator-max-microvolt = <900000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vdda_0v9: LDO_REG2 {
+				regulator-name = "vdda_0v9";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <900000>;
+				regulator-max-microvolt = <900000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vdda0v9_pmu: LDO_REG3 {
+				regulator-name = "vdda0v9_pmu";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <900000>;
+				regulator-max-microvolt = <900000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <900000>;
+				};
+			};
+
+			vccio_acodec: LDO_REG4 {
+				regulator-name = "vccio_acodec";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vccio_sd: LDO_REG5 {
+				regulator-name = "vccio_sd";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vcc3v3_pmu: LDO_REG6 {
+				regulator-name = "vcc3v3_pmu";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <3300000>;
+				};
+			};
+
+			vcca_1v8: LDO_REG7 {
+				regulator-name = "vcca_1v8";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vcca1v8_pmu: LDO_REG8 {
+				regulator-name = "vcca1v8_pmu";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <1800000>;
+				};
+			};
+
+			vcca1v8_image: LDO_REG9 {
+				regulator-name = "vcca1v8_image";
+				regulator-always-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vcc_3v3: SWITCH_REG1 {
+				regulator-name = "vcc_3v3";
+				regulator-always-on;
+				regulator-boot-on;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vcc3v3_sd: SWITCH_REG2 {
+				regulator-name = "vcc3v3_sd";
+				/*
+				 * turning this off, breaks access to both
+				 * PCIe controllers, refclk generator perhaps
+				 */
+				regulator-always-on;
+				regulator-boot-on;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+		};
+	};
+
+	vdd_cpu: regulator@40 {
+		compatible = "silergy,syr827";
+		reg = <0x40>;
+		fcs,suspend-voltage-selector = <1>;
+		regulator-name = "vdd_cpu";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <712500>;
+		regulator-max-microvolt = <1390000>;
+		regulator-ramp-delay = <2300>;
+		vin-supply = <&vcc5v0_sys>;
+	};
+};
+
+&i2c1 {
+	status = "okay";
+
+	rtc_rv8263: rtc@51 {
+		compatible = "microcrystal,rv8263";
+		reg = <0x51>;
+		wakeup-source;
+	};
+
+	/* eeprom for vital-product-data on the mainboard */
+	eeprom@54 {
+		compatible = "giantec,gt24c04a", "atmel,24c04";
+		reg = <0x54>;
+		label = "VPD_MB";
+		num-addresses = <2>;
+		pagesize = <16>;
+		read-only;
+	};
+};
+
+&pinctrl {
+	keys {
+		copy_button_pin: copy-button-pin {
+			rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+
+		reset_button_pin: reset-button-pin {
+			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
+	leds {
+		hdd1_led_pin: hdd1-led-pin {
+			rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
+	pmic {
+		pmic_int_l: pmic-int-l {
+			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
+	usb {
+		vcc5v0_host_en: vcc5v0-host-en {
+			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		vcc5v0_otg_en: vcc5v0-otg-en {
+			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+};
+
+&pmu_io_domains {
+	vccio4-supply = <&vcc_1v8>;
+	vccio6-supply = <&vcc_1v8>;
+	status = "okay";
+};
+
+&sata1 {
+	status = "okay";
+};
+
+&sdhci {
+	bus-width = <8>;
+	max-frequency = <200000000>;
+	non-removable;
+	pinctrl-names = "default";
+	pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
+	status = "okay";
+};
+
+&tsadc {
+	rockchip,hw-tshut-mode = <1>;
+	rockchip,hw-tshut-polarity = <0>;
+	status = "okay";
+};
+
+/*
+ * Connected to an MCU, that provides access to more LEDs,
+ * buzzer, fan control and more.
+ */
+&uart0 {
+	status = "okay";
+
+	mcu: mcu {
+		fan: fan-0 {
+			#cooling-cells = <2>;
+			cooling-levels = <0 64 89 128 166 204 221 238>;
+		};
+
+		nvmem-layout {
+			compatible = "fixed-layout";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			serial-number@0 {
+				reg = <0x0 0x13>;
+			};
+
+			ext-port@22 {
+				reg = <0x22 0x2>;
+			};
+
+			mac0: mac@24 {
+				compatible = "mac-base";
+				reg = <0x24 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac1: mac@35 {
+				compatible = "mac-base";
+				reg = <0x35 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac2: mac@46 {
+				compatible = "mac-base";
+				reg = <0x46 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac3: mac@57 {
+				compatible = "mac-base";
+				reg = <0x57 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac4: mac@68 {
+				compatible = "mac-base";
+				reg = <0x68 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac5: mac@79 {
+				compatible = "mac-base";
+				reg = <0x79 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac6: mac@8a {
+				compatible = "mac-base";
+				reg = <0x8a 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac7: mac@9b {
+				compatible = "mac-base";
+				reg = <0x9b 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+		};
+	};
+};
+
+/*
+ * Pins available on CN3 connector at TTL voltage level (3V3).
+ * ,_  _.
+ * |1234|  1=TX 2=VCC
+ * `----'  3=RX 4=GND
+ */
+&uart2 {
+	status = "okay";
+};
+
+&usb2phy0 {
+	status = "okay";
+};
+
+/* connected to usb_host0_xhci */
+&usb2phy0_otg {
+	phy-supply = <&vcc5v0_otg>;
+	status = "okay";
+};
+
+/* front port */
+&usb_host0_xhci {
+	dr_mode = "host";
+	status = "okay";
+};
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 10/12] arm64: dts: rockchip: add QNAP TS233 devicetree
  2026-01-05 19:47 [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stuebner
                   ` (8 preceding siblings ...)
  2026-01-05 19:47 ` [PATCH 09/12] arm64: dts: rockchip: move common qnap tsx33 parts to dtsi Heiko Stuebner
@ 2026-01-05 19:47 ` Heiko Stuebner
  2026-01-05 19:47 ` [PATCH 11/12] rockchip: board: qnap-ts433: Rename the board code to not be TS433 specific Heiko Stuebner
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2026-01-05 19:47 UTC (permalink / raw)
  To: sjg, philipp.tomsich, kever.yang; +Cc: heiko, trini, u-boot

The TS233 is a 2 bay NAS similar to the TS433. Architecture-wise it really
seems to be the same minus the additional PCIe connected components the
TS433 has.

So it just uses two of the SoCs SATA ports and the SoC's gigabit ethernet.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20251112214206.423244-6-heiko@sntech.de

[ upstream commit: ce0b84e766ad7b2ec5d2ac7840675f223640f3e3 ]

(cherry picked from commit be3ad0fe4738a324213dcf63efaccfd00fca9918)
---
 .../src/arm64/rockchip/rk3568-qnap-ts233.dts  | 131 ++++++++++++++++++
 1 file changed, 131 insertions(+)
 create mode 100644 dts/upstream/src/arm64/rockchip/rk3568-qnap-ts233.dts

diff --git a/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts233.dts b/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts233.dts
new file mode 100644
index 00000000000..f16d1c62879
--- /dev/null
+++ b/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts233.dts
@@ -0,0 +1,131 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
+ * Copyright (c) 2024 Heiko Stuebner <heiko@sntech.de>
+ */
+
+/dts-v1/;
+
+#include "rk3568-qnap-tsx33.dtsi"
+
+/ {
+	model = "Qnap TS-233-2G NAS System 2-Bay";
+	compatible = "qnap,ts233", "rockchip,rk3568";
+
+	aliases {
+		ethernet0 = &gmac0;
+	};
+};
+
+/* connected to sata2 */
+&combphy2 {
+	status = "okay";
+};
+
+&gmac0 {
+	assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
+	assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>;
+	assigned-clock-rates = <0>, <125000000>;
+	clock_in_out = "output";
+	phy-handle = <&rgmii_phy0>;
+	phy-mode = "rgmii-id";
+	pinctrl-names = "default";
+	pinctrl-0 = <&gmac0_miim
+		     &gmac0_tx_bus2
+		     &gmac0_rx_bus2
+		     &gmac0_rgmii_clk
+		     &gmac0_rgmii_bus>;
+	status = "okay";
+};
+
+&i2c1 {
+	/* eeprom for vital-product-data on the backplane */
+	eeprom@56 {
+		compatible = "giantec,gt24c04a", "atmel,24c04";
+		reg = <0x56>;
+		label = "VPD_BP";
+		num-addresses = <2>;
+		pagesize = <16>;
+		read-only;
+	};
+};
+
+&leds {
+	led-1 {
+		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_DISK;
+		gpios = <&gpio1 RK_PD6 GPIO_ACTIVE_LOW>;
+		label = "hdd2:green:disk";
+		linux,default-trigger = "disk-activity";
+		pinctrl-names = "default";
+		pinctrl-0 = <&hdd2_led_pin>;
+	};
+};
+
+&mcu {
+	compatible = "qnap,ts233-mcu";
+};
+
+&mdio0 {
+	rgmii_phy0: ethernet-phy@3 {
+		/* Motorcomm YT8521 phy */
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <0x3>;
+		pinctrl-0 = <&eth_phy0_reset_pin>;
+		pinctrl-names = "default";
+		reset-assert-us = <10000>;
+		reset-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&pinctrl {
+	gmac0 {
+		eth_phy0_reset_pin: eth-phy0-reset-pin {
+			rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
+	leds {
+		hdd2_led_pin: hdd2-led-pin {
+			rockchip,pins = <1 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+};
+
+&sata2 {
+	status = "okay";
+};
+
+&usb2phy1 {
+	status = "okay";
+};
+
+/* connected to usb_host1_ehci/ohci */
+&usb2phy1_host {
+	phy-supply = <&vcc5v0_host>;
+	status = "okay";
+};
+
+/* connected to usb_host0_ehci/ohci */
+&usb2phy1_otg {
+	phy-supply = <&vcc5v0_host>;
+	status = "okay";
+};
+
+/* right port backside */
+&usb_host0_ehci {
+	status = "okay";
+};
+
+&usb_host0_ohci {
+	status = "okay";
+};
+
+/* left port backside */
+&usb_host1_ehci {
+	status = "okay";
+};
+
+&usb_host1_ohci {
+	status = "okay";
+};
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 11/12] rockchip: board: qnap-ts433: Rename the board code to not be TS433 specific
  2026-01-05 19:47 [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stuebner
                   ` (9 preceding siblings ...)
  2026-01-05 19:47 ` [PATCH 10/12] arm64: dts: rockchip: add QNAP TS233 devicetree Heiko Stuebner
@ 2026-01-05 19:47 ` Heiko Stuebner
  2026-01-05 19:47 ` [PATCH 12/12] rockchip: board: qnap-tsx33: add support for Qnap TS233 devices Heiko Stuebner
  2026-01-14  8:30 ` [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stübner
  12 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2026-01-05 19:47 UTC (permalink / raw)
  To: sjg, philipp.tomsich, kever.yang; +Cc: heiko, trini, u-boot

We can do support at least 2 devices now, so rename the code-side to a
TSx33 form to not read as specific to the TS433 anymore.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/mach-rockchip/rk3568/Kconfig           | 17 +++++++++--------
 .../qnap/{ts433_rk3568 => tsx33_rk356x}/Kconfig |  6 +++---
 .../{ts433_rk3568 => tsx33_rk356x}/MAINTAINERS  |  6 +++---
 .../{ts433_rk3568 => tsx33_rk356x}/Makefile     |  0
 .../qnap/{ts433_rk3568 => tsx33_rk356x}/board.c |  0
 configs/qnap-ts433-rk3568_defconfig             |  2 +-
 .../configs/{ts433_rk3568.h => tsx33_rk356x.h}  |  0
 7 files changed, 16 insertions(+), 15 deletions(-)
 rename board/qnap/{ts433_rk3568 => tsx33_rk356x}/Kconfig (52%)
 rename board/qnap/{ts433_rk3568 => tsx33_rk356x}/MAINTAINERS (68%)
 rename board/qnap/{ts433_rk3568 => tsx33_rk356x}/Makefile (100%)
 rename board/qnap/{ts433_rk3568 => tsx33_rk356x}/board.c (100%)
 rename include/configs/{ts433_rk3568.h => tsx33_rk356x.h} (100%)

diff --git a/arch/arm/mach-rockchip/rk3568/Kconfig b/arch/arm/mach-rockchip/rk3568/Kconfig
index 16e14ee4fa7..725c008795d 100644
--- a/arch/arm/mach-rockchip/rk3568/Kconfig
+++ b/arch/arm/mach-rockchip/rk3568/Kconfig
@@ -31,18 +31,19 @@ config TARGET_POWKIDDY_X55_RK3566
 	help
 	  Powkiddy X55 handheld gaming console with an RK3566 SoC.
 
-config TARGET_QNAP_TS433_RK3568
-	bool "QNAP-TS433"
+config TARGET_QNAP_TSX33_RK356X
+	bool "QNAP-TSx33"
 	help
-	  Qnap TS433 4-bay NAS with a RK3568 SoC.
+	  Qnap TSx33 1-to-4-bay NAS with a RK3566/RK3568 SoC.
 
 	  It provides the following featureset:
-	   * 4GB LPDDR4
+	   * 2-4GB LPDDR4
 	   * 4GB eMMC
-	   * 2 SATA ports connected to two RK3568's SATA controllers
-	   * 2 SATA ports connected to a JMicron JMB58x AHCI SATA controller
+	   * 1-2 SATA ports connected to two RK3568's SATA controllers
+	   * On TS433 2 SATA ports connected to a JMicron JMB58x AHCI SATA
+	     controller
 	   * 1 1G network controller
-	   * 1 2.5G Realtek RTL8125 network controller
+	   * On TS433 1 2.5G Realtek RTL8125 network controller
 
 config TARGET_QUARTZ64_RK3566
 	bool "Pine64 Quartz64"
@@ -76,7 +77,7 @@ source "board/hardkernel/odroid_m1/Kconfig"
 source "board/hardkernel/odroid_m1s/Kconfig"
 source "board/pine64/quartz64_rk3566/Kconfig"
 source "board/powkiddy/x55/Kconfig"
-source "board/qnap/ts433_rk3568/Kconfig"
+source "board/qnap/tsx33_rk356x/Kconfig"
 source "board/radxa/zero3-rk3566/Kconfig"
 source "board/xunlong/orangepi-3b-rk3566/Kconfig"
 
diff --git a/board/qnap/ts433_rk3568/Kconfig b/board/qnap/tsx33_rk356x/Kconfig
similarity index 52%
rename from board/qnap/ts433_rk3568/Kconfig
rename to board/qnap/tsx33_rk356x/Kconfig
index c5f9db849f2..2f64b9be062 100644
--- a/board/qnap/ts433_rk3568/Kconfig
+++ b/board/qnap/tsx33_rk356x/Kconfig
@@ -1,12 +1,12 @@
-if TARGET_QNAP_TS433_RK3568
+if TARGET_QNAP_TSX33_RK356X
 
 config SYS_BOARD
-	default "ts433_rk3568"
+	default "tsx33_rk356x"
 
 config SYS_VENDOR
 	default "qnap"
 
 config SYS_CONFIG_NAME
-	default "ts433_rk3568"
+	default "tsx33_rk356x"
 
 endif
diff --git a/board/qnap/ts433_rk3568/MAINTAINERS b/board/qnap/tsx33_rk356x/MAINTAINERS
similarity index 68%
rename from board/qnap/ts433_rk3568/MAINTAINERS
rename to board/qnap/tsx33_rk356x/MAINTAINERS
index 02ce7ff383c..b91274c7b43 100644
--- a/board/qnap/ts433_rk3568/MAINTAINERS
+++ b/board/qnap/tsx33_rk356x/MAINTAINERS
@@ -1,8 +1,8 @@
-QNAP-TS433
+QNAP-TSX33
 M:	Heiko Stuebner <heiko@sntech.de>
 S:	Maintained
-F:	board/qnap/ts433_rk3568/
+F:	board/qnap/tsx33_rk356x/
 F:	doc/board/qnap/
-F:	include/configs/qnap_ts433.h
+F:	include/configs/qnap_tsx33.h
 F:	configs/qnap-ts433-rk3568_defconfig
 F:	arch/arm/dts/rk3568-qnap-ts433-u-boot.dtsi
diff --git a/board/qnap/ts433_rk3568/Makefile b/board/qnap/tsx33_rk356x/Makefile
similarity index 100%
rename from board/qnap/ts433_rk3568/Makefile
rename to board/qnap/tsx33_rk356x/Makefile
diff --git a/board/qnap/ts433_rk3568/board.c b/board/qnap/tsx33_rk356x/board.c
similarity index 100%
rename from board/qnap/ts433_rk3568/board.c
rename to board/qnap/tsx33_rk356x/board.c
diff --git a/configs/qnap-ts433-rk3568_defconfig b/configs/qnap-ts433-rk3568_defconfig
index dfb240ed70f..475488534cd 100644
--- a/configs/qnap-ts433-rk3568_defconfig
+++ b/configs/qnap-ts433-rk3568_defconfig
@@ -6,7 +6,7 @@ CONFIG_ARCH_ROCKCHIP=y
 CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3568-qnap-ts433"
 CONFIG_ROCKCHIP_RK3568=y
 CONFIG_SPL_SERIAL=y
-CONFIG_TARGET_QNAP_TS433_RK3568=y
+CONFIG_TARGET_QNAP_TSX33_RK356X=y
 CONFIG_SYS_LOAD_ADDR=0xc00800
 CONFIG_DEBUG_UART_BASE=0xFE660000
 CONFIG_DEBUG_UART_CLOCK=24000000
diff --git a/include/configs/ts433_rk3568.h b/include/configs/tsx33_rk356x.h
similarity index 100%
rename from include/configs/ts433_rk3568.h
rename to include/configs/tsx33_rk356x.h
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 12/12] rockchip: board: qnap-tsx33: add support for Qnap TS233 devices
  2026-01-05 19:47 [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stuebner
                   ` (10 preceding siblings ...)
  2026-01-05 19:47 ` [PATCH 11/12] rockchip: board: qnap-ts433: Rename the board code to not be TS433 specific Heiko Stuebner
@ 2026-01-05 19:47 ` Heiko Stuebner
  2026-01-14  8:30 ` [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stübner
  12 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2026-01-05 19:47 UTC (permalink / raw)
  To: sjg, philipp.tomsich, kever.yang; +Cc: heiko, trini, u-boot

The TS233 shares the same basic peripheral setup for
SoC, DDR, EMMC, 3 USB-ports, 1G network interface, SoC-SATA ports,
serial and maskrom access.

It could just share the same U-Boot binary with the TS433, and the type-
selection would take care of loading the right DTB for the operating
system. But right now we can't select the correct DTB for inside U-Boot
itself.

So for the time being, add separate defconfig and documentation for it.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/dts/rk3568-qnap-ts233-u-boot.dtsi |  6 ++
 board/qnap/tsx33_rk356x/MAINTAINERS        |  2 +
 board/qnap/tsx33_rk356x/board.c            |  4 +-
 configs/qnap-ts233-rk3568_defconfig        | 85 ++++++++++++++++++++++
 doc/board/qnap/ts233.rst                   | 37 ++++++++++
 5 files changed, 132 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/dts/rk3568-qnap-ts233-u-boot.dtsi
 create mode 100644 configs/qnap-ts233-rk3568_defconfig
 create mode 100644 doc/board/qnap/ts233.rst

diff --git a/arch/arm/dts/rk3568-qnap-ts233-u-boot.dtsi b/arch/arm/dts/rk3568-qnap-ts233-u-boot.dtsi
new file mode 100644
index 00000000000..19acbceb468
--- /dev/null
+++ b/arch/arm/dts/rk3568-qnap-ts233-u-boot.dtsi
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * (C) Copyright 2024 Heiko Stuebner <heiko@sntech.de>
+ */
+
+#include "rk356x-u-boot.dtsi"
diff --git a/board/qnap/tsx33_rk356x/MAINTAINERS b/board/qnap/tsx33_rk356x/MAINTAINERS
index b91274c7b43..af9bf9fe0c5 100644
--- a/board/qnap/tsx33_rk356x/MAINTAINERS
+++ b/board/qnap/tsx33_rk356x/MAINTAINERS
@@ -4,5 +4,7 @@ S:	Maintained
 F:	board/qnap/tsx33_rk356x/
 F:	doc/board/qnap/
 F:	include/configs/qnap_tsx33.h
+F:	configs/qnap-ts233-rk3568_defconfig
 F:	configs/qnap-ts433-rk3568_defconfig
+F:	arch/arm/dts/rk3568-qnap-ts233-u-boot.dtsi
 F:	arch/arm/dts/rk3568-qnap-ts433-u-boot.dtsi
diff --git a/board/qnap/tsx33_rk356x/board.c b/board/qnap/tsx33_rk356x/board.c
index ea43d12942d..39e20e2ae95 100644
--- a/board/qnap/tsx33_rk356x/board.c
+++ b/board/qnap/tsx33_rk356x/board.c
@@ -85,7 +85,7 @@ static const struct tsx33_model tsx33_models[TSX33_MODELS] = {
 		"Q0AM0",
 		11,
 		"TS233",
-		NULL, /* not yet supported */
+		DTB_DIR "rk3568-qnap-ts233.dtb",
 	},
 	[Q0AJ0_Q0AM0_11_10] = {
 		"Q0AJ0",
@@ -93,7 +93,7 @@ static const struct tsx33_model tsx33_models[TSX33_MODELS] = {
 		"Q0AM0",
 		10,
 		"TS233",
-		NULL, /* not yet supported */
+		DTB_DIR "rk3568-qnap-ts233.dtb",
 	},
 	[Q0B20_Q0AW0_12_10] = {
 		"Q0B20",
diff --git a/configs/qnap-ts233-rk3568_defconfig b/configs/qnap-ts233-rk3568_defconfig
new file mode 100644
index 00000000000..53ac5b25bd0
--- /dev/null
+++ b/configs/qnap-ts233-rk3568_defconfig
@@ -0,0 +1,85 @@
+CONFIG_ARM=y
+CONFIG_SKIP_LOWLEVEL_INIT=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
+CONFIG_COUNTER_FREQUENCY=24000000
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3568-qnap-ts233"
+CONFIG_ROCKCHIP_RK3568=y
+CONFIG_SPL_SERIAL=y
+CONFIG_TARGET_QNAP_TSX33_RK356X=y
+CONFIG_SYS_LOAD_ADDR=0xc00800
+CONFIG_DEBUG_UART_BASE=0xFE660000
+CONFIG_DEBUG_UART_CLOCK=24000000
+CONFIG_PCI=y
+CONFIG_DEBUG_UART=y
+CONFIG_AHCI=y
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_SPL_FIT_SIGNATURE=y
+CONFIG_SPL_LOAD_FIT=y
+CONFIG_LEGACY_IMAGE_FORMAT=y
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-qnap-ts233.dtb"
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_SPL_MAX_SIZE=0x40000
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
+CONFIG_SPL_ATF=y
+CONFIG_BOARD_TYPES=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_PCI=y
+CONFIG_CMD_SATA=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_PMIC=y
+CONFIG_CMD_REGULATOR=y
+# CONFIG_SPL_DOS_PARTITION is not set
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_LIVE=y
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_ENV_RELOC_GD_ENV_ADDR=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_SPL_REGMAP=y
+CONFIG_SPL_SYSCON=y
+CONFIG_AHCI_PCI=y
+CONFIG_DWC_AHCI=y
+CONFIG_SPL_CLK=y
+CONFIG_ROCKCHIP_GPIO=y
+CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_SDMA=y
+CONFIG_MMC_SDHCI_ROCKCHIP=y
+CONFIG_DWC_ETH_QOS=y
+CONFIG_DWC_ETH_QOS_ROCKCHIP=y
+CONFIG_RTL8169=y
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_DM_PMIC=y
+CONFIG_DM_PMIC_FAN53555=y
+CONFIG_PMIC_RK8XX=y
+CONFIG_REGULATOR_RK8XX=y
+CONFIG_PWM_ROCKCHIP=y
+CONFIG_SPL_RAM=y
+CONFIG_SCSI=y
+CONFIG_DEBUG_UART_SHIFT=2
+CONFIG_SYS_NS16550_MEM32=y
+CONFIG_SYSRESET=y
+CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_GENERIC=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_GENERIC=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GENERIC=y
+CONFIG_ERRNO_STR=y
+# CONFIG_SPL_ATF_NO_PLATFORM_PARAM is not set
+CONFIG_OPTEE_LIB=y
diff --git a/doc/board/qnap/ts233.rst b/doc/board/qnap/ts233.rst
new file mode 100644
index 00000000000..b706d97afa0
--- /dev/null
+++ b/doc/board/qnap/ts233.rst
@@ -0,0 +1,37 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+U-Boot for Qnap TS233 Devices
+=============================
+
+This allows U-Boot to boot the Qnap TS233 NAS
+
+The device is similar to the TS433 in terms of its basic peripheral setup
+of SoC, DDR, EMMC, 3 USB-ports, 1G network interface, SoC-SATA ports,
+serial and maskrom access.
+
+Please follow the TS433 steps but with the following changes.
+
+Building U-Boot
+---------------
+
+The TS233 can just run the TS433 U-Boot binary, but if a separate binary
+should be build, the following command will do so:
+
+.. code-block:: bash
+
+    $ export CROSS_COMPILE=aarch64-linux-gnu-
+    $ export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3568_ddr_1560MHz_v1.23.bin
+    $ make qnap-ts233-rk3568_defconfig
+    $ make
+
+This will build ``u-boot-rockchip.bin`` which can be written to the
+on-board eMMC.
+
+Image installation
+------------------
+
+The serial port is located next to the CPU and labeled "SOC_UART", while
+the maskrom jumper header is located in the smaller cutout and
+labeled "MASKROM RECOVERY".
+
+The USB port to use is the one located in the front of the device.
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233
  2026-01-05 19:47 [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stuebner
                   ` (11 preceding siblings ...)
  2026-01-05 19:47 ` [PATCH 12/12] rockchip: board: qnap-tsx33: add support for Qnap TS233 devices Heiko Stuebner
@ 2026-01-14  8:30 ` Heiko Stübner
  12 siblings, 0 replies; 14+ messages in thread
From: Heiko Stübner @ 2026-01-14  8:30 UTC (permalink / raw)
  To: sjg, philipp.tomsich, kever.yang; +Cc: trini, u-boot

Am Montag, 5. Januar 2026, 20:47:11 Mitteleuropäische Normalzeit schrieb Heiko Stuebner:
> This series does a number of cleanups for the existing TS433 NAS,
> and also introduces support for a second device.
> 
> Right now the code can detect the variant from the I2C eeprom(s) and
> set the fdtfile accordingly. Later on (once I figured out what is needed)
> this should also select an optional overlay, because later model-variants
> do have additional per-disk presence detection and also regulator-handling
> that is not present on the earlier versions.
> 
> Heiko Stuebner (12):
>   rockchip: board: qnap-ts433: Fix TPL binary in build-example
>   rockchip: board: qnap-ts433: drop DW_MMC config options
>   rockchip: board: qnap-ts433: Fix dir naming to allow build-system to
>     find it
>   rockchip: board: qnap-ts433: Update documentation to recent tool
>     versions
>   rockchip: board: qnap-ts433: Add instructions for how to use upstream
>     TF-A
>   rockchip: board: qnap-ts433: Support multiple models of the TSx33
>     family

I've updated the board-ident parsing in v2 to support all the types
of identifiers used in the fielt (there are 3 different types)


Heiko



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-01-14  8:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-05 19:47 [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stuebner
2026-01-05 19:47 ` [PATCH 01/12] rockchip: board: qnap-ts433: Fix TPL binary in build-example Heiko Stuebner
2026-01-05 19:47 ` [PATCH 02/12] rockchip: board: qnap-ts433: drop DW_MMC config options Heiko Stuebner
2026-01-05 19:47 ` [PATCH 03/12] rockchip: board: qnap-ts433: Fix dir naming to allow build-system to find it Heiko Stuebner
2026-01-05 19:47 ` [PATCH 04/12] rockchip: board: qnap-ts433: Update documentation to recent tool versions Heiko Stuebner
2026-01-05 19:47 ` [PATCH 05/12] rockchip: board: qnap-ts433: Add instructions for how to use upstream TF-A Heiko Stuebner
2026-01-05 19:47 ` [PATCH 06/12] rockchip: board: qnap-ts433: Support multiple models of the TSx33 family Heiko Stuebner
2026-01-05 19:47 ` [PATCH 07/12] arm64: dts: rockchip: move cpu_thermal node to the correct position Heiko Stuebner
2026-01-05 19:47 ` [PATCH 08/12] arm64: dts: rockchip: describe mcu eeprom cells on rk3568-ts433 Heiko Stuebner
2026-01-05 19:47 ` [PATCH 09/12] arm64: dts: rockchip: move common qnap tsx33 parts to dtsi Heiko Stuebner
2026-01-05 19:47 ` [PATCH 10/12] arm64: dts: rockchip: add QNAP TS233 devicetree Heiko Stuebner
2026-01-05 19:47 ` [PATCH 11/12] rockchip: board: qnap-ts433: Rename the board code to not be TS433 specific Heiko Stuebner
2026-01-05 19:47 ` [PATCH 12/12] rockchip: board: qnap-tsx33: add support for Qnap TS233 devices Heiko Stuebner
2026-01-14  8:30 ` [PATCH 00/12] board: qnap-ts433: Cleanups + add support for TS233 Heiko Stübner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox