* [PATCH 0/4] Add support for QNAP's ts-433 4bay NAS
@ 2025-03-01 16:36 Uwe Kleine-König
2025-03-01 16:36 ` [PATCH 1/4] Documentation: rockchip: Update versions of DDR init blobs Uwe Kleine-König
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2025-03-01 16:36 UTC (permalink / raw)
To: barebox
Hello,
this is the result of my quick effort to make barebox run on QNAP's
ts-433 4bay NAS. The first 3 patches are IMHO fine to go in. The last
one adds the new machine. As writting in the commit log the NAS boots
with the resulting image, but neither network nor eMMC work.
I also tried adding
writel(RK_SETBITS(0x50), 0xfdc20140)
in lowlevel.c, but that didn't make a difference. I'm open for other
ideas about what bit is missing.
Best regards
Uwe
Uwe Kleine-König (4):
Documentation: rockchip: Update versions of DDR init blobs
arm64: rockchip: Refresh rockchip_v8_defconfig
arm64: rockchip: Enable rk-usb-loader in rockchip_v8_defconfig
WIP: arm64: rockchip: Add support for QNAP's ts-433 4bay NAS
Documentation/boards/rockchip.rst | 7 ++++---
arch/arm/boards/Makefile | 1 +
arch/arm/boards/qnap-tsx33/.gitignore | 1 +
arch/arm/boards/qnap-tsx33/Makefile | 2 ++
arch/arm/boards/qnap-tsx33/lowlevel.c | 27 ++++++++++++++++++++++++++
arch/arm/configs/rockchip_v8_defconfig | 6 ++----
arch/arm/dts/Makefile | 1 +
arch/arm/dts/rk3568-qnap-ts433.dts | 27 ++++++++++++++++++++++++++
arch/arm/mach-rockchip/Kconfig | 7 +++++++
images/Makefile.rockchip | 1 +
10 files changed, 73 insertions(+), 7 deletions(-)
create mode 100644 arch/arm/boards/qnap-tsx33/.gitignore
create mode 100644 arch/arm/boards/qnap-tsx33/Makefile
create mode 100644 arch/arm/boards/qnap-tsx33/lowlevel.c
create mode 100644 arch/arm/dts/rk3568-qnap-ts433.dts
base-commit: 2afd1a809f1a41f1dd42b95c2bc0ae74853b475b
--
2.47.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/4] Documentation: rockchip: Update versions of DDR init blobs
2025-03-01 16:36 [PATCH 0/4] Add support for QNAP's ts-433 4bay NAS Uwe Kleine-König
@ 2025-03-01 16:36 ` Uwe Kleine-König
2025-03-01 16:36 ` [PATCH 2/4] arm64: rockchip: Refresh rockchip_v8_defconfig Uwe Kleine-König
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2025-03-01 16:36 UTC (permalink / raw)
To: barebox
Update file names as they are currently available
https://github.com/rockchip-linux/rkbin as of today.
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
Documentation/boards/rockchip.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/boards/rockchip.rst b/Documentation/boards/rockchip.rst
index b94c7a78e115..b2b04abb03cd 100644
--- a/Documentation/boards/rockchip.rst
+++ b/Documentation/boards/rockchip.rst
@@ -75,9 +75,9 @@ The build process needs three binary files which have to be copied from the
.. code-block:: sh
- cp $RKBIN/bin/rk35/rk3568_bl31_v1.34.elf firmware/rk3568-bl31.bin
- cp $RKBIN/bin/rk35/rk3568_bl32_v2.08.bin firmware/rk3568-bl32.bin
- cp $RKBIN/bin/rk35/rk3568_ddr_1560MHz_v1.13.bin arch/arm/boards/rockchip-rk3568-evb/sdram-init.bin
+ cp $RKBIN/bin/rk35/rk3568_bl31_v1.44.elf firmware/rk3568-bl31.bin
+ cp $RKBIN/bin/rk35/rk3568_bl32_v2.15.bin firmware/rk3568-bl32.bin
+ cp $RKBIN/bin/rk35/rk3568_ddr_1560MHz_v1.23.bin arch/arm/boards/rockchip-rk3568-evb/sdram-init.bin
With these barebox can be compiled as:
--
2.47.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/4] arm64: rockchip: Refresh rockchip_v8_defconfig
2025-03-01 16:36 [PATCH 0/4] Add support for QNAP's ts-433 4bay NAS Uwe Kleine-König
2025-03-01 16:36 ` [PATCH 1/4] Documentation: rockchip: Update versions of DDR init blobs Uwe Kleine-König
@ 2025-03-01 16:36 ` Uwe Kleine-König
2025-03-01 16:36 ` [PATCH 3/4] arm64: rockchip: Enable rk-usb-loader in rockchip_v8_defconfig Uwe Kleine-König
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2025-03-01 16:36 UTC (permalink / raw)
To: barebox
This is just the result of
make rockchip_v8_defconfig
make savedefconfig
cp defconfig arch/arm/configs/rockchip_v8_defconfig
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
arch/arm/configs/rockchip_v8_defconfig | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/arm/configs/rockchip_v8_defconfig b/arch/arm/configs/rockchip_v8_defconfig
index 83799ac492e7..941625394ccf 100644
--- a/arch/arm/configs/rockchip_v8_defconfig
+++ b/arch/arm/configs/rockchip_v8_defconfig
@@ -7,8 +7,6 @@ CONFIG_MACH_PROTONIC_MECSBC=y
CONFIG_MACH_RADXA_ROCK3=y
CONFIG_MACH_RADXA_ROCK5=y
CONFIG_MACH_RADXA_CM3=y
-CONFIG_BOARD_GENERIC_DT=y
-CONFIG_64BIT=y
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
CONFIG_ARM_PSCI_CLIENT=y
CONFIG_MMU=y
@@ -91,7 +89,6 @@ CONFIG_CMD_TIME=y
CONFIG_NET=y
CONFIG_NET_NFS=y
CONFIG_NET_NETCONSOLE=y
-CONFIG_OFDEVICE=y
CONFIG_OF_BAREBOX_DRIVERS=y
CONFIG_AIODEV=y
CONFIG_ROCKCHIP_SARADC=y
@@ -156,7 +153,6 @@ CONFIG_FS_TFTP=y
CONFIG_FS_NFS=y
CONFIG_FS_FAT=y
CONFIG_FS_FAT_WRITE=y
-CONFIG_FS_FAT_LFN=y
CONFIG_FS_BPKFS=y
CONFIG_FS_UIMAGEFS=y
CONFIG_LZO_DECOMPRESS=y
--
2.47.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/4] arm64: rockchip: Enable rk-usb-loader in rockchip_v8_defconfig
2025-03-01 16:36 [PATCH 0/4] Add support for QNAP's ts-433 4bay NAS Uwe Kleine-König
2025-03-01 16:36 ` [PATCH 1/4] Documentation: rockchip: Update versions of DDR init blobs Uwe Kleine-König
2025-03-01 16:36 ` [PATCH 2/4] arm64: rockchip: Refresh rockchip_v8_defconfig Uwe Kleine-König
@ 2025-03-01 16:36 ` Uwe Kleine-König
2025-03-01 16:36 ` [PATCH 4/4] WIP: arm64: rockchip: Add support for QNAP's ts-433 4bay NAS Uwe Kleine-König
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2025-03-01 16:36 UTC (permalink / raw)
To: barebox
rk-usb-loader is the tool advertised in the rockchip documentation to
bootstrap a machine. So enable it in the defconfig.
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
arch/arm/configs/rockchip_v8_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/rockchip_v8_defconfig b/arch/arm/configs/rockchip_v8_defconfig
index 941625394ccf..f1f418872385 100644
--- a/arch/arm/configs/rockchip_v8_defconfig
+++ b/arch/arm/configs/rockchip_v8_defconfig
@@ -157,3 +157,4 @@ CONFIG_FS_BPKFS=y
CONFIG_FS_UIMAGEFS=y
CONFIG_LZO_DECOMPRESS=y
# CONFIG_MISSING_FIRMWARE_ERROR is not set
+CONFIG_RK_USB_LOADER=y
--
2.47.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 4/4] WIP: arm64: rockchip: Add support for QNAP's ts-433 4bay NAS
2025-03-01 16:36 [PATCH 0/4] Add support for QNAP's ts-433 4bay NAS Uwe Kleine-König
` (2 preceding siblings ...)
2025-03-01 16:36 ` [PATCH 3/4] arm64: rockchip: Enable rk-usb-loader in rockchip_v8_defconfig Uwe Kleine-König
@ 2025-03-01 16:36 ` Uwe Kleine-König
2025-03-04 9:15 ` [PATCH 0/4] " Sascha Hauer
2025-03-04 9:15 ` (subset) " Sascha Hauer
5 siblings, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2025-03-01 16:36 UTC (permalink / raw)
To: barebox
The resulting image boots to a prompt using usb booting. But neither
network nor eMMC work :-\
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
Documentation/boards/rockchip.rst | 1 +
arch/arm/boards/Makefile | 1 +
arch/arm/boards/qnap-tsx33/.gitignore | 1 +
arch/arm/boards/qnap-tsx33/Makefile | 2 ++
arch/arm/boards/qnap-tsx33/lowlevel.c | 27 ++++++++++++++++++++++++++
arch/arm/configs/rockchip_v8_defconfig | 1 +
arch/arm/dts/Makefile | 1 +
arch/arm/dts/rk3568-qnap-ts433.dts | 27 ++++++++++++++++++++++++++
arch/arm/mach-rockchip/Kconfig | 7 +++++++
images/Makefile.rockchip | 1 +
10 files changed, 69 insertions(+)
create mode 100644 arch/arm/boards/qnap-tsx33/.gitignore
create mode 100644 arch/arm/boards/qnap-tsx33/Makefile
create mode 100644 arch/arm/boards/qnap-tsx33/lowlevel.c
create mode 100644 arch/arm/dts/rk3568-qnap-ts433.dts
diff --git a/Documentation/boards/rockchip.rst b/Documentation/boards/rockchip.rst
index b2b04abb03cd..a9499e3560dd 100644
--- a/Documentation/boards/rockchip.rst
+++ b/Documentation/boards/rockchip.rst
@@ -61,6 +61,7 @@ Supported Boards
- Pine64 Quartz64 Model A
- Radxa ROCK3 Model A
- Radxa CM3 (RK3566) IO Board
+- QNAP TS-433 NAS
- Protonic MECSBC
The steps described in the following target the RK3568 and the RK3568 EVB but
diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index c6104d043297..747676056a45 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -94,6 +94,7 @@ obj-$(CONFIG_MACH_PROTONIC_STM32MP1) += protonic-stm32mp1/
obj-$(CONFIG_MACH_PROTONIC_STM32MP13) += protonic-stm32mp13/
obj-$(CONFIG_MACH_QIL_A9260) += qil-a926x/
obj-$(CONFIG_MACH_QIL_A9G20) += qil-a926x/
+obj-$(CONFIG_MACH_QNAP_TSX33) += qnap-tsx33/
obj-$(CONFIG_MACH_RADXA_ROCK) += radxa-rock/
obj-$(CONFIG_MACH_PHYTEC_SOM_RK3288) += phytec-som-rk3288/
obj-$(CONFIG_MACH_REALQ7) += datamodul-edm-qmx6/
diff --git a/arch/arm/boards/qnap-tsx33/.gitignore b/arch/arm/boards/qnap-tsx33/.gitignore
new file mode 100644
index 000000000000..f458f794b54c
--- /dev/null
+++ b/arch/arm/boards/qnap-tsx33/.gitignore
@@ -0,0 +1 @@
+sdram-init.bin
diff --git a/arch/arm/boards/qnap-tsx33/Makefile b/arch/arm/boards/qnap-tsx33/Makefile
new file mode 100644
index 000000000000..9961af02a3ea
--- /dev/null
+++ b/arch/arm/boards/qnap-tsx33/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-only
+lwl-y += lowlevel.o
diff --git a/arch/arm/boards/qnap-tsx33/lowlevel.c b/arch/arm/boards/qnap-tsx33/lowlevel.c
new file mode 100644
index 000000000000..f852e8d00a2b
--- /dev/null
+++ b/arch/arm/boards/qnap-tsx33/lowlevel.c
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include <common.h>
+#include <linux/sizes.h>
+#include <asm/barebox-arm-head.h>
+#include <asm/barebox-arm.h>
+#include <mach/rockchip/hardware.h>
+#include <mach/rockchip/atf.h>
+#include <debug_ll.h>
+#include <mach/rockchip/rockchip.h>
+
+extern char __dtb_rk3568_qnap_ts433_start[];
+
+ENTRY_FUNCTION(start_rk3568_qnap_ts433, r0, r1, r2)
+{
+ /*
+ * Image execution starts at 0x0, but this is used for ATF and
+ * OP-TEE later, so move away from here.
+ */
+ if (current_el() == 3)
+ relocate_to_adr_full(RK3568_BAREBOX_LOAD_ADDRESS);
+ else
+ relocate_to_current_adr();
+
+ setup_c();
+
+ rk3568_barebox_entry(__dtb_rk3568_qnap_ts433_start);
+}
diff --git a/arch/arm/configs/rockchip_v8_defconfig b/arch/arm/configs/rockchip_v8_defconfig
index f1f418872385..86f31affa901 100644
--- a/arch/arm/configs/rockchip_v8_defconfig
+++ b/arch/arm/configs/rockchip_v8_defconfig
@@ -4,6 +4,7 @@ CONFIG_MACH_RK3568_BPI_R2PRO=y
CONFIG_MACH_PINE64_PINETAB2=y
CONFIG_MACH_PINE64_QUARTZ64=y
CONFIG_MACH_PROTONIC_MECSBC=y
+CONFIG_MACH_QNAP_TSX33=y
CONFIG_MACH_RADXA_ROCK3=y
CONFIG_MACH_RADXA_ROCK5=y
CONFIG_MACH_RADXA_CM3=y
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index d2de01927824..b4875cc00c91 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -117,6 +117,7 @@ lwl-$(CONFIG_MACH_PROTONIC_STM32MP1) += \
stm32mp151-mecio1.dtb.o \
stm32mp151-mect1s.dtb.o
lwl-$(CONFIG_MACH_PROTONIC_STM32MP13) += stm32mp133c-prihmb.dtb.o
+lwl-$(CONFIG_MACH_QNAP_TSX33) += rk3568-qnap-ts433.dtb.o
lwl-$(CONFIG_MACH_RADXA_ROCK) += rk3188-radxarock.dtb.o
lwl-$(CONFIG_MACH_RADXA_ROCK3) += rk3568-rock-3a.dtb.o
lwl-$(CONFIG_MACH_RADXA_ROCK5) += rk3588-rock-5b.dtb.o
diff --git a/arch/arm/dts/rk3568-qnap-ts433.dts b/arch/arm/dts/rk3568-qnap-ts433.dts
new file mode 100644
index 000000000000..05876656b4e2
--- /dev/null
+++ b/arch/arm/dts/rk3568-qnap-ts433.dts
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+
+/dts-v1/;
+#include <arm64/rockchip/rk3568-qnap-ts433.dts>
+#include "rk356x.dtsi"
+
+/ {
+ chosen: chosen {
+ environment-emmc {
+ compatible = "barebox,environment";
+ device-path = &environment_emmc;
+ };
+ };
+};
+
+&sdmmc0 {
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ environment_emmc: partition@408000 {
+ label = "barebox-environment";
+ reg = <0x0 0x408000 0x0 0x8000>;
+ };
+ };
+};
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index bfbfa7367a3e..f8b0d5e4ec54 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -106,6 +106,13 @@ config MACH_PROTONIC_MECSBC
help
Say Y here if you are using a Protonic MECSBC
+config MACH_QNAP_TSX33
+ select ARCH_RK3568
+ bool "QNAP TS-433 NAS"
+ help
+ Select this if you are using a QNAP TS-433 NAS.
+ <https://www.qnap.com/en-us/product/ts-433>
+
config MACH_RADXA_ROCK3
select ARCH_RK3568
bool "Radxa ROCK3"
diff --git a/images/Makefile.rockchip b/images/Makefile.rockchip
index 761c6b814989..2e63e554edce 100644
--- a/images/Makefile.rockchip
+++ b/images/Makefile.rockchip
@@ -35,6 +35,7 @@ $(call build_rockchip_image, CONFIG_MACH_PINE64_PINETAB2, start_pinetab2_v0, pin
$(call build_rockchip_image, CONFIG_MACH_PINE64_PINETAB2, start_pinetab2_v2, pine64-pinetab2/sdram-init.bin, pinetab2-v2)
$(call build_rockchip_image, CONFIG_MACH_PINE64_QUARTZ64, start_quartz64a, pine64-quartz64/sdram-init.bin, quartz64a)
$(call build_rockchip_image, CONFIG_MACH_PROTONIC_MECSBC, start_mecsbc, protonic-mecsbc/sdram-init.bin, mecsbc)
+$(call build_rockchip_image, CONFIG_MACH_QNAP_TSX33, start_rk3568_qnap_ts433, qnap-tsx33/sdram-init.bin, qnap-ts433)
$(call build_rockchip_image, CONFIG_MACH_RADXA_ROCK3, start_rock3a, radxa-rock3/sdram-init.bin, rock3a)
$(call build_rockchip_image, CONFIG_MACH_RADXA_ROCK5, start_rock5b, radxa-rock5/sdram-init.bin, rock5b)
$(call build_rockchip_image, CONFIG_MACH_RADXA_CM3, start_radxa_cm3_io, radxa-cm3/sdram-init.bin, radxa-cm3-io)
--
2.47.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/4] Add support for QNAP's ts-433 4bay NAS
2025-03-01 16:36 [PATCH 0/4] Add support for QNAP's ts-433 4bay NAS Uwe Kleine-König
` (3 preceding siblings ...)
2025-03-01 16:36 ` [PATCH 4/4] WIP: arm64: rockchip: Add support for QNAP's ts-433 4bay NAS Uwe Kleine-König
@ 2025-03-04 9:15 ` Sascha Hauer
2025-03-04 9:15 ` (subset) " Sascha Hauer
5 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2025-03-04 9:15 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: barebox
Hi Uwe,
On Sat, Mar 01, 2025 at 05:36:17PM +0100, Uwe Kleine-König wrote:
> Hello,
>
> this is the result of my quick effort to make barebox run on QNAP's
> ts-433 4bay NAS. The first 3 patches are IMHO fine to go in. The last
> one adds the new machine. As writting in the commit log the NAS boots
> with the resulting image, but neither network nor eMMC work.
>
> I also tried adding
>
> writel(RK_SETBITS(0x50), 0xfdc20140)
>
> in lowlevel.c, but that didn't make a difference. I'm open for other
> ideas about what bit is missing.
dts/src/arm64/rockchip/rk3568-qnap-ts433.dts lacks the pinctrl nodes for
the sdhci controller. It might be that it works when booting from eMMC,
but not when booting from USB.
No idea for networking though.
Regards,
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: (subset) [PATCH 0/4] Add support for QNAP's ts-433 4bay NAS
2025-03-01 16:36 [PATCH 0/4] Add support for QNAP's ts-433 4bay NAS Uwe Kleine-König
` (4 preceding siblings ...)
2025-03-04 9:15 ` [PATCH 0/4] " Sascha Hauer
@ 2025-03-04 9:15 ` Sascha Hauer
5 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2025-03-04 9:15 UTC (permalink / raw)
To: barebox, Uwe Kleine-König
On Sat, 01 Mar 2025 17:36:17 +0100, Uwe Kleine-König wrote:
> this is the result of my quick effort to make barebox run on QNAP's
> ts-433 4bay NAS. The first 3 patches are IMHO fine to go in. The last
> one adds the new machine. As writting in the commit log the NAS boots
> with the resulting image, but neither network nor eMMC work.
>
> I also tried adding
>
> [...]
Applied, thanks!
[1/4] Documentation: rockchip: Update versions of DDR init blobs
https://git.pengutronix.de/cgit/barebox/commit/?id=4c0953db0f2d (link may not be stable)
[2/4] arm64: rockchip: Refresh rockchip_v8_defconfig
https://git.pengutronix.de/cgit/barebox/commit/?id=7a94e43d0862 (link may not be stable)
[3/4] arm64: rockchip: Enable rk-usb-loader in rockchip_v8_defconfig
https://git.pengutronix.de/cgit/barebox/commit/?id=12ba84b2a475 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-03-04 10:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-01 16:36 [PATCH 0/4] Add support for QNAP's ts-433 4bay NAS Uwe Kleine-König
2025-03-01 16:36 ` [PATCH 1/4] Documentation: rockchip: Update versions of DDR init blobs Uwe Kleine-König
2025-03-01 16:36 ` [PATCH 2/4] arm64: rockchip: Refresh rockchip_v8_defconfig Uwe Kleine-König
2025-03-01 16:36 ` [PATCH 3/4] arm64: rockchip: Enable rk-usb-loader in rockchip_v8_defconfig Uwe Kleine-König
2025-03-01 16:36 ` [PATCH 4/4] WIP: arm64: rockchip: Add support for QNAP's ts-433 4bay NAS Uwe Kleine-König
2025-03-04 9:15 ` [PATCH 0/4] " Sascha Hauer
2025-03-04 9:15 ` (subset) " Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox