arm: boards: Add support for Protonic PRTPUK board
PATCH 1/1 arm: boards: Add support for Protonic PRTPUK board
PRTPUK is a credit-card sized ISOBUS virtual terminal, based on the Rockchip RK3576 SoC, that features a CAN interface and a 100/1000Base-T1 interface for HS-ISOBUS (HSI), as well as a USB-C port for connecting to a touch-screen monitor.
--- arch/arm/boards/Makefile | 1 + arch/arm/boards/protonic-prtpuk/Makefile | 3 + arch/arm/boards/protonic-prtpuk/board.c | 162 ++++++++ arch/arm/boards/protonic-prtpuk/lowlevel.c | 23 + arch/arm/configs/multi_v8_defconfig | 1 + arch/arm/configs/rockchip_v8_defconfig | 1 + arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3576-prtpuk-linux.dts | 462 +++++++++++++++++++++ arch/arm/dts/rk3576-prtpuk.dts | 124 ++++++ arch/arm/mach-rockchip/Kconfig | 6 + dts/Bindings/arm/rockchip.yaml | 5 + images/Makefile.rockchip | 1 + 12 files changed, 790 insertions(+) create mode 100644 arch/arm/boards/protonic-prtpuk/Makefile create mode 100644 arch/arm/boards/protonic-prtpuk/board.c create mode 100644 arch/arm/boards/protonic-prtpuk/lowlevel.c create mode 100644 arch/arm/dts/rk3576-prtpuk-linux.dts create mode 100644 arch/arm/dts/rk3576-prtpuk.dts
arch/arm/boards/Makefile +1 -0
@@ -92,6 +92,7 @@ obj-$(CONFIG_MACH_POLYHEX_DEBIX) += polyhex-debix/ obj-$(CONFIG_MACH_PROTONIC_IMX6) += protonic-imx6/ obj-$(CONFIG_MACH_PROTONIC_IMX8M) += protonic-imx8m/ obj-$(CONFIG_MACH_PROTONIC_MECSBC) += protonic-mecsbc/ +obj-$(CONFIG_MACH_PROTONIC_PRTPUK) += protonic-prtpuk/ obj-$(CONFIG_MACH_PROTONIC_STM32MP1) += protonic-stm32mp1/ obj-$(CONFIG_MACH_PROTONIC_STM32MP13) += protonic-stm32mp13/ obj-$(CONFIG_MACH_QIL_A9260) += qil-a926x/
arch/arm/boards/protonic-prtpuk/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0-only +obj-y += board.o +lwl-y += lowlevel.o
arch/arm/boards/protonic-prtpuk/board.c new file +162 -0
162 lines not on this page · raw message
arch/arm/boards/protonic-prtpuk/lowlevel.c new file +23 -0
@@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include <common.h> +#include <asm/barebox-arm.h> +#include <mach/rockchip/hardware.h> +#include <mach/rockchip/atf.h> +#include <debug_ll.h> + +extern char __dtb_rk3576_prtpuk_start[]; + +ENTRY_FUNCTION(start_prtpuk, r0, r1, r2) +{ +putc_ll ('>' ); + +if (current_el () ==3 ) +relocate_to_adr_full (RK3576_BAREBOX_LOAD_ADDRESS ); +else +relocate_to_current_adr (); + +setup_c (); + +rk3576_barebox_entry (__dtb_rk3576_prtpuk_start); +}
arch/arm/configs/multi_v8_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_MACH_RK3568_BPI_R2PRO=y CONFIG_MACH_PINE64_PINETAB2=y CONFIG_MACH_PINE64_QUARTZ64=y CONFIG_MACH_PROTONIC_MECSBC=y +CONFIG_MACH_PROTONIC_PRTPUK=y CONFIG_MACH_RADXA_ROCK3=y CONFIG_MACH_RADXA_ROCK5=y CONFIG_MACH_RADXA_CM3=y
arch/arm/configs/rockchip_v8_defconfig +1 -0
@@ -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_PROTONIC_PRTPUK=y CONFIG_MACH_RADXA_ROCK3=y CONFIG_MACH_RADXA_ROCK5=y CONFIG_MACH_RADXA_CM3=y
arch/arm/dts/Makefile +1 -0
@@ -112,6 +112,7 @@ lwl-$(CONFIG_MACH_PROTONIC_IMX6) += \ imx6ull-jozacp.dtb.o lwl-$(CONFIG_MACH_PROTONIC_IMX8M) += imx8mm-prt8mm.dtb.o lwl-$(CONFIG_MACH_PROTONIC_MECSBC) += rk3568-mecsbc.dtb.o +lwl-$(CONFIG_MACH_PROTONIC_PRTPUK) += rk3576-prtpuk.dtb.o lwl-$(CONFIG_MACH_PROTONIC_STM32MP1) += \ stm32mp151-prtt1a.dtb.o \ stm32mp151-prtt1c.dtb.o \
arch/arm/dts/rk3576-prtpuk-linux.dts new file +462 -0
462 lines not on this page · raw message
arch/arm/dts/rk3576-prtpuk.dts new file +124 -0
124 lines not on this page · raw message
arch/arm/mach-rockchip/Kconfig +6 -0
@@ -95,6 +95,12 @@ config MACH_PROTONIC_MECSBC help Say Y here if you are using a Protonic MECSBC +config MACH_PROTONIC_PRTPUK + select ARCH_RK3576 + bool "Protonic PRTPUK" + help + Say Y here if you are using a Protonic PRTPUK + config MACH_RADXA_ROCK3 select ARCH_RK3568 bool "Radxa ROCK3"
dts/Bindings/arm/rockchip.yaml +5 -0
@@ -828,6 +828,11 @@ properties: - const: prt,mecsbc - const: rockchip,rk3568 + - description: Protonic PRTPUK board + items: + - const: prt,prtpuk + - const: rockchip,rk3576 + - description: QNAP TS-433-4G 4-Bay NAS items: - const: qnap,ts433
images/Makefile.rockchip +1 -0
@@ -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_PROTONIC_PRTPUK, start_prtpuk, protonic-prtpuk/sdram-init.bin, prtpuk) $(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)
Signature · 1 line
2.47.2
Quoted 4 lines · On Wed, 13 Aug 2025 09:01:49 +0200 David Jander <[email protected]> wrote:
PRTPUK is a credit-card sized ISOBUS virtual terminal, based on the Rockchip RK3576 SoC, that features a CAN interface and a 100/1000Base-T1 interface for HS-ISOBUS (HSI), as well as a USB-C port for connecting to a touch-screen monitor.
Note: This code should apply to next as of today, but next doesn't compile right now. On v2025.07.0 it depends on the RK3576 support patches, but will build (and run) fine when both are applied.
Best regards,
Signature · 1 line
David Jander
Hello David,
Quoted 11 lines · David Jander
Quoted 4 lines · On Wed, 13 Aug 2025 09:01:49 +0200 David Jander <[email protected]> wrote:
PRTPUK is a credit-card sized ISOBUS virtual terminal, based on the Rockchip RK3576 SoC, that features a CAN interface and a 100/1000Base-T1 interface for HS-ISOBUS (HSI), as well as a USB-C port for connecting to a touch-screen monitor.
Note: This code should apply to next as of today, but next doesn't compile right now. On v2025.07.0 it depends on the RK3576 support patches, but will build (and run) fine when both are applied.
Firstly, thanks for your patches!
I'd like to more prominently advertise new hardware support in the future and I am happy about screenshots of new hardware running bfetch[1] or other eye candy to be posted (or reposted if you have a Mastodon account) on @[email protected].
Just saying. :-)
[1]: b4 shazam https://lore.barebox.org/barebox/[email protected]
Cheers,
Ahmad
Quoted 3 lines
Best regards,
Signature · 4 lines
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 |
Hi David,
Quoted 15 lines · David Jander
PRTPUK is a credit-card sized ISOBUS virtual terminal, based on the Rockchip RK3576 SoC, that features a CAN interface and a 100/1000Base-T1 interface for HS-ISOBUS (HSI), as well as a USB-C port for connecting to a touch-screen monitor.
+&sdhci {
arch/arm/dts/rk3576-prtpuk.dts new file +9
-0+ no-sd; + + partitions { + compatible = "barebox,fixed-partitions"; + #address-cells = <2>; + #size-cells = <2>; + + /* eMMC reserved 8MiB for barebox (2 copies?), env and state */ + environment_emmc: partition@7b0000 {
arch/arm/dts/rk3576-prtpuk.dts line 118
Quoted 10 lines
arch/arm/dts/rk3576-prtpuk.dts new file +10
-0+ label = "barebox-environment"; + reg = <0x0 0x7b0000 0x0 0x10000>; + }; + + /* eMMC state after barebox and environment */ + state_backend_emmc: partition@7c0000 { + label = "state"; + reg = <0x0 0x7c0000 0x0 0x40000>; + }; + };
We are trying to get away from hardcoding partitions outside the GPT in the device tree and I think we are there.
A partition with the type UUID PARTITION_BAREBOX_ENVIRONMENT_GUID will be used as environment partition automatically.
A partition with the type UUID BAREBOX_STATE_PARTITION_GUID will be used as state partition provided the state node points to the device containing this partition.
We also have a parted command to create/modify partitions and for further convenience a createnv command which will create a barebox environment partition in case you haven't built a full partition image from a BSP.
It would be great if you could test this and eventually switch over to it.
Sascha
Signature · 4 lines
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 |
Dear Sascha,
Quoted 39 lines · On Thu, 14 Aug 2025 13:26:31 +0200 Sascha Hauer <[email protected]> wrote:
Hi David,
Quoted 15 lines · David Jander
PRTPUK is a credit-card sized ISOBUS virtual terminal, based on the Rockchip RK3576 SoC, that features a CAN interface and a 100/1000Base-T1 interface for HS-ISOBUS (HSI), as well as a USB-C port for connecting to a touch-screen monitor.
+&sdhci {
arch/arm/dts/rk3576-prtpuk.dts new file +9
-0+ no-sd; + + partitions { + compatible = "barebox,fixed-partitions"; + #address-cells = <2>; + #size-cells = <2>; + + /* eMMC reserved 8MiB for barebox (2 copies?), env and state */ + environment_emmc: partition@7b0000 {arch/arm/dts/rk3576-prtpuk.dts line 118
Quoted 10 lines
arch/arm/dts/rk3576-prtpuk.dts new file +10
-0+ label = "barebox-environment"; + reg = <0x0 0x7b0000 0x0 0x10000>; + }; + + /* eMMC state after barebox and environment */ + state_backend_emmc: partition@7c0000 { + label = "state"; + reg = <0x0 0x7c0000 0x0 0x40000>; + }; + };We are trying to get away from hardcoding partitions outside the GPT in the device tree and I think we are there.
A partition with the type UUID
PARTITION_BAREBOX_ENVIRONMENT_GUIDwill be used as environment partition automatically.A partition with the type UUID
BAREBOX_STATE_PARTITION_GUIDwill be used as state partition provided the state node points to the device containing this partition.
Quoted 7 lines
We also have a parted command to create/modify partitions and for further convenience a createnv command which will create a barebox environment partition in case you haven't built a full partition image from a BSP.
It would be great if you could test this and eventually switch over to it.
This was copied over from MECSBC. I didn't know things had changed since.
I agree it is much better to have all storage areas indexed by a GPT, but it will mean that we will need to change every instance of identifying a partition from number-based indexes to UUID or labels. And of course there are a lot more partitions that will have to be included for completeness, specially on Rockchip platforms. See here:
https://opensource.rock-chips.com/wiki_Partitions
This looks like a big mess, but I suppose we should at leas have loader1 (which is the whole of barebox, TF-A and optee). "U-Boot ENV" would be replaced by barebox environment, and loader2 and trust would disappear. On the MECSBC platform we started to use the Vendor Storage partition for storing serial number and MAC address, so unless there is a better place for these, we'd continue adhering to the Rockchip standard... for lack of a better standard.
I'll try to come up with a partition layout that includes everything, including the GUID's you mentioned above. Thanks.
Best regards,
Signature · 1 line
David Jander
Quoted 71 lines · David Jander
Dear Sascha,
Quoted 39 lines · On Thu, 14 Aug 2025 13:26:31 +0200 Sascha Hauer <[email protected]> wrote:
Hi David,
Quoted 15 lines · David Jander
PRTPUK is a credit-card sized ISOBUS virtual terminal, based on the Rockchip RK3576 SoC, that features a CAN interface and a 100/1000Base-T1 interface for HS-ISOBUS (HSI), as well as a USB-C port for connecting to a touch-screen monitor.
+&sdhci {
arch/arm/dts/rk3576-prtpuk.dts new file +9
-0+ no-sd; + + partitions { + compatible = "barebox,fixed-partitions"; + #address-cells = <2>; + #size-cells = <2>; + + /* eMMC reserved 8MiB for barebox (2 copies?), env and state */ + environment_emmc: partition@7b0000 {arch/arm/dts/rk3576-prtpuk.dts line 118
Quoted 10 lines
arch/arm/dts/rk3576-prtpuk.dts new file +10
-0+ label = "barebox-environment"; + reg = <0x0 0x7b0000 0x0 0x10000>; + }; + + /* eMMC state after barebox and environment */ + state_backend_emmc: partition@7c0000 { + label = "state"; + reg = <0x0 0x7c0000 0x0 0x40000>; + }; + };We are trying to get away from hardcoding partitions outside the GPT in the device tree and I think we are there.
A partition with the type UUID
PARTITION_BAREBOX_ENVIRONMENT_GUIDwill be used as environment partition automatically.A partition with the type UUID
BAREBOX_STATE_PARTITION_GUIDwill be used as state partition provided the state node points to the device containing this partition.Quoted 7 lines
We also have a parted command to create/modify partitions and for further convenience a createnv command which will create a barebox environment partition in case you haven't built a full partition image from a BSP.
It would be great if you could test this and eventually switch over to it.
This was copied over from MECSBC. I didn't know things had changed since.
I agree it is much better to have all storage areas indexed by a GPT, but it will mean that we will need to change every instance of identifying a partition from number-based indexes to UUID or labels. And of course there are a lot more partitions that will have to be included for completeness, specially on Rockchip platforms. See here:
https://opensource.rock-chips.com/wiki_Partitions
This looks like a big mess, but I suppose we should at leas have loader1 (which is the whole of barebox, TF-A and optee). "U-Boot ENV" would be replaced by barebox environment, and loader2 and trust would disappear. On the MECSBC platform we started to use the Vendor Storage partition for storing serial number and MAC address, so unless there is a better place for these, we'd continue adhering to the Rockchip standard... for lack of a better standard.
Quoted 2 lines
I'll try to come up with a partition layout that includes everything, including the GUID's you mentioned above. Thanks.
I'm not sure how it helps us to adhere to the partitioning scheme described in your link. If you want to do it, you can do it and still give the barebox environment partition the expected UUID so that barebox detects it.
Anyway, I applied the patch as-is to get some compile coverage for RK3576, you can still change the partitioning later.
Sascha
Signature · 4 lines
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 |
Quoted 72 lines · On Mon, 25 Aug 2025 11:05:00 +0200 Sascha Hauer <[email protected]> wrote:
Quoted 71 lines · David Jander
Dear Sascha,
Quoted 39 lines · On Thu, 14 Aug 2025 13:26:31 +0200 Sascha Hauer <[email protected]> wrote:
Hi David,
Quoted 15 lines · David Jander
PRTPUK is a credit-card sized ISOBUS virtual terminal, based on the Rockchip RK3576 SoC, that features a CAN interface and a 100/1000Base-T1 interface for HS-ISOBUS (HSI), as well as a USB-C port for connecting to a touch-screen monitor.
+&sdhci {
arch/arm/dts/rk3576-prtpuk.dts new file +9
-0+ no-sd; + + partitions { + compatible = "barebox,fixed-partitions"; + #address-cells = <2>; + #size-cells = <2>; + + /* eMMC reserved 8MiB for barebox (2 copies?), env and state */ + environment_emmc: partition@7b0000 {arch/arm/dts/rk3576-prtpuk.dts line 118
Quoted 10 lines
arch/arm/dts/rk3576-prtpuk.dts new file +10
-0+ label = "barebox-environment"; + reg = <0x0 0x7b0000 0x0 0x10000>; + }; + + /* eMMC state after barebox and environment */ + state_backend_emmc: partition@7c0000 { + label = "state"; + reg = <0x0 0x7c0000 0x0 0x40000>; + }; + };We are trying to get away from hardcoding partitions outside the GPT in the device tree and I think we are there.
A partition with the type UUID
PARTITION_BAREBOX_ENVIRONMENT_GUIDwill be used as environment partition automatically.A partition with the type UUID
BAREBOX_STATE_PARTITION_GUIDwill be used as state partition provided the state node points to the device containing this partition.Quoted 7 lines
We also have a parted command to create/modify partitions and for further convenience a createnv command which will create a barebox environment partition in case you haven't built a full partition image from a BSP.
It would be great if you could test this and eventually switch over to it.
This was copied over from MECSBC. I didn't know things had changed since.
I agree it is much better to have all storage areas indexed by a GPT, but it will mean that we will need to change every instance of identifying a partition from number-based indexes to UUID or labels. And of course there are a lot more partitions that will have to be included for completeness, specially on Rockchip platforms. See here:
https://opensource.rock-chips.com/wiki_Partitions
This looks like a big mess, but I suppose we should at leas have loader1 (which is the whole of barebox, TF-A and optee). "U-Boot ENV" would be replaced by barebox environment, and loader2 and trust would disappear. On the MECSBC platform we started to use the Vendor Storage partition for storing serial number and MAC address, so unless there is a better place for these, we'd continue adhering to the Rockchip standard... for lack of a better standard.
Quoted 7 lines
Quoted 2 lines
I'll try to come up with a partition layout that includes everything, including the GUID's you mentioned above. Thanks.
I'm not sure how it helps us to adhere to the partitioning scheme described in your link. If you want to do it, you can do it and still give the barebox environment partition the expected UUID so that barebox detects it.
Sure. The link was more or less informative in case you hadn't seen this.
Quoted 2 lines
Anyway, I applied the patch as-is to get some compile coverage for RK3576, you can still change the partitioning later.
Ok, thanks. Sorry I couldn't find time to resubmit a new version yet. I will look into this later and send incremental patches if needed.
Best regards,
Signature · 1 line
David Jander
Sascha Hauer
AppliedQuoted 6 lines · David Jander
PRTPUK is a credit-card sized ISOBUS virtual terminal, based on the Rockchip RK3576 SoC, that features a CAN interface and a 100/1000Base-T1 interface for HS-ISOBUS (HSI), as well as a USB-C port for connecting to a touch-screen monitor.
Applied, thanks!
[1/1] arm: boards: Add support for Protonic PRTPUK board
https://git.pengutronix.de/cgit/barebox/commit/?id=f6464bb752ba (link may not be stable)
Best regards,
Signature · 1 line
Sascha Hauer <[email protected]>