Hi Fabio,

On 7/1/26 7:57 PM, Fabio Estevam wrote:
From: Fabio Estevam <[email protected]>

The roc-pc-plus-rk3399 board shares a lot of features with the
existing supported roc-pc-rk3399 board.

Its devicetree is also supported in the upstream kernel.

The plus variant has only a 12V supply. It contains a XMC XM25QH128C
SPI NOR flash.

Add support for the plus variant.

Signed-off-by: Fabio Estevam <[email protected]>
---
Changes since v1:
- None.

  arch/arm/dts/rk3399-roc-pc-plus-u-boot.dtsi | 9 +++++++++
  board/firefly/roc-pc-rk3399/MAINTAINERS     | 1 +
  configs/roc-pc-plus-rk3399_defconfig        | 4 ++++
  doc/board/rockchip/rockchip.rst             | 3 ++-
  4 files changed, 16 insertions(+), 1 deletion(-)
  create mode 100644 arch/arm/dts/rk3399-roc-pc-plus-u-boot.dtsi
  create mode 100644 configs/roc-pc-plus-rk3399_defconfig

diff --git a/arch/arm/dts/rk3399-roc-pc-plus-u-boot.dtsi 
b/arch/arm/dts/rk3399-roc-pc-plus-u-boot.dtsi
new file mode 100644
index 000000000000..7d5af3e234da
--- /dev/null
+++ b/arch/arm/dts/rk3399-roc-pc-plus-u-boot.dtsi
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+#include "rk3399-roc-pc-u-boot.dtsi"
+
+/delete-node/ &vcc_hub_en;
+
+&dc_12v {
+       /delete-property/ vin-supply;
+};

Mmmmmm... I'm wondering if we cannot remove &dc_12v and /vcc_hub_en-regulator from arch/arm/dts/rk3399-roc-pc-u-boot.dtsi instead? dc_12v is already an mps,mp8859 in the upstream DTS so I'm not sure the override does anything (I don't think the compatible property would be actually used). For /vcc_hub_en-regulator, the upstream DTS seems to be using something.... questionable (a pinconf with forced GPIO output high via &hub_rst that is then used in /regulator-vcc5v0-host). So I **think** we should be able to remove this and not have to care about deleting properties or nodes in arch/arm/dts/rk3399-roc-pc-plus-u-boot.dtsi.

diff --git a/board/firefly/roc-pc-rk3399/MAINTAINERS 
b/board/firefly/roc-pc-rk3399/MAINTAINERS
index 2c0de4432fa8..d32b078431ab 100644
--- a/board/firefly/roc-pc-rk3399/MAINTAINERS
+++ b/board/firefly/roc-pc-rk3399/MAINTAINERS
@@ -5,5 +5,6 @@ S:      Maintained
  F:    board/firefly/roc-pc-rk3399
  F:    include/configs/roc-pc-rk3399.h
  F:    configs/roc-pc-rk3399_defconfig
+F:     configs/roc-pc-plus-rk3399_defconfig
  F:    configs/roc-pc-mezzanine-rk3399_defconfig
  F:    arch/arm/dts/rk3399-roc-pc*
diff --git a/configs/roc-pc-plus-rk3399_defconfig 
b/configs/roc-pc-plus-rk3399_defconfig
new file mode 100644
index 000000000000..4ec2f7d44b5f
--- /dev/null
+++ b/configs/roc-pc-plus-rk3399_defconfig
@@ -0,0 +1,4 @@
+#include <configs/roc-pc-rk3399_common.config>
+CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-roc-pc-plus"
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-roc-pc-plus.dtb"
+CONFIG_SPI_FLASH_XMC=y

Is there any way to detect which of ROC-PC-RK3399 or ROC-PC-PLUS-RK3399 is currently running U-Boot? I'm thinking it'd be nice to NOT have a second defconfig for just essentially using a different device tree (and SPI_FLASH_XMC but this could be enabled for ROC-PC-RK3399 as well). See board/radxa/rock5b-rk3588/rock5b-rk3588.c how we handle both Rock 5B/5B+/5T with the same defconfig (configs/rock5b-rk3588_defconfig, specifically CONFIG_OF_LIST).

Cheers,
Quentin

Reply via email to