Hi Naoki,

On 12/16/24 2:25 PM, FUKAUMI Naoki wrote:
Hi Quentin,

On 12/16/24 21:47, Quentin Schulz wrote:
Hi Naoki,

On 12/16/24 1:39 PM, FUKAUMI Naoki wrote:
Hi Quentin,

On 12/16/24 18:57, Quentin Schulz wrote:
Hi Naoki,

On 12/15/24 2:37 AM, FUKAUMI Naoki wrote:
Hi Quentin,

Thank you very much for your review!

On 12/13/24 22:11, Quentin Schulz wrote:
Hi Naoki,

On 12/11/24 4:39 AM, FUKAUMI Naoki wrote:
Radxa ROCK 5C[1] is a Rockchip RK3588S2 based single board computer.

[1] https://eur02.safelinks.protection.outlook.com/? url=https%3A%2F%2Fradxa.com%2Fproducts%2Frock5%2F5c&data=05%7C02%7Cquentin.schulz%40cherry.de%7Cbe7d810ae88f4203af8208dd1ca921c6%7C5e0e1b5221b54e7b83bb514ec460677e%7C0%7C0%7C638698234938145886%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=8TcHBC2dV1LzouPSR8%2FICOBVshq9RndgMQS3m3XLwFs%3D&reserved=0

Signed-off-by: FUKAUMI Naoki <na...@radxa.com>
---
Changes in v3:
- fix compile error
Changes in v2:
- arch/arm/dts/rk3588s-rock-5-u-boot.dtsi: remove unused node
- include/configs/rock-5-rk3588s.h: fix include order
---
  arch/arm/dts/rk3588s-rock-5-u-boot.dtsi     | 16 ++++
  arch/arm/dts/rk3588s-rock-5c-u-boot.dtsi    |  6 ++
  arch/arm/mach-rockchip/rk3588/Kconfig       |  7 ++
  board/radxa/rock-5-rk3588s/Kconfig          | 12 +++
  board/radxa/rock-5-rk3588s/MAINTAINERS      |  8 ++
  board/radxa/rock-5-rk3588s/Makefile         |  3 +
  board/radxa/rock-5-rk3588s/rock-5-rk3588s.c | 77 +++++++++++++++++
  configs/rock-5-rk3588s_defconfig            | 94 ++++++++++++++ + + + ++++
  doc/board/rockchip/rockchip.rst             |  1 +
  include/configs/rock-5-rk3588s.h            | 15 ++++
  10 files changed, 239 insertions(+)
  create mode 100644 arch/arm/dts/rk3588s-rock-5-u-boot.dtsi
  create mode 100644 arch/arm/dts/rk3588s-rock-5c-u-boot.dtsi
  create mode 100644 board/radxa/rock-5-rk3588s/Kconfig
  create mode 100644 board/radxa/rock-5-rk3588s/MAINTAINERS
  create mode 100644 board/radxa/rock-5-rk3588s/Makefile
  create mode 100644 board/radxa/rock-5-rk3588s/rock-5-rk3588s.c
  create mode 100644 configs/rock-5-rk3588s_defconfig
  create mode 100644 include/configs/rock-5-rk3588s.h

diff --git a/arch/arm/dts/rk3588s-rock-5-u-boot.dtsi b/arch/arm/ dts/ rk3588s-rock-5-u-boot.dtsi
new file mode 100644
index 000000000000..be1a2f9ae7bb
--- /dev/null
+++ b/arch/arm/dts/rk3588s-rock-5-u-boot.dtsi
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2024 Radxa Computer (Shenzhen) Co., Ltd.
+ */
+
+#include "rk3588s-u-boot.dtsi"
+
+&saradc {
+    bootph-pre-ram;
+    vdd-microvolts = <1800000>;
+};
+
+&sdhci {
+    cap-mmc-highspeed;
+    mmc-hs200-1_8v;
+};
diff --git a/arch/arm/dts/rk3588s-rock-5c-u-boot.dtsi b/arch/arm/ dts/ rk3588s-rock-5c-u-boot.dtsi
new file mode 100644
index 000000000000..bb1cc9e4a279
--- /dev/null
+++ b/arch/arm/dts/rk3588s-rock-5c-u-boot.dtsi
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2024 Radxa Computer (Shenzhen) Co., Ltd.
+ */
+
+#include "rk3588s-rock-5-u-boot.dtsi"
diff --git a/arch/arm/mach-rockchip/rk3588/Kconfig b/arch/arm/ mach- rockchip/rk3588/Kconfig
index b5a0e624a532..e1487ecb0464 100644
--- a/arch/arm/mach-rockchip/rk3588/Kconfig
+++ b/arch/arm/mach-rockchip/rk3588/Kconfig
@@ -260,6 +260,12 @@ config TARGET_ROCK_5_ITX_RK3588
        Front-panel connectors for audio and case-power, -leds
        Powered by either 12V, ATX power-supply or PoE
+config TARGET_ROCK_5_RK3588S

This should be TARGET_ROCK_5C_RK3588S?

rock-pi-4-rk3399_defconfig uses CONFIG_TARGET_ROCKPI4_RK3399.
I'm doing same thing.


config TARGET_ROCKPI4_RK3399
    help
      Support for ROCK Pi 4 board family by Radxa.

Here you say this option is for ROCK 5C only.

Because this is first patch which adds support for ROCK 5C.


That's fine, you could say something like:

Support for ROCK 5 board family by Radxa.

More accurately, "RK3588S based ROCK 5" for now. I'm not sure both RK3588 and RK3588S based boards can be supported.


Sounds good to me.

[...]

Is the ROCK 5T going to be supported by that common target, defconfig and board file as well? What are your plans :)?

I'm thinking to add support for 5B+ and 5T too. But for making single

Are you planning to use TARGET_ROCK_5_RK3588S for 5B+ and 5T too?

target, it needs "check SoC variant" code in addition to check "Board ID". I guess following code may be used:

 https://eur02.safelinks.protection.outlook.com/? url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fproject%2Fuboot%2Fpatch%2F20241110005622.1515100-3-jonas%40kwiboo.se%2F&data=05%7C02%7Cquentin.schulz%40cherry.de%7C204a757d4a3045d900a008dd1dd52129%7C5e0e1b5221b54e7b83bb514ec460677e%7C0%7C0%7C638699523428166461%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=CLTAcH08Qzmu00q9KH1PuJuUxnAuFcRKobLhnhFR3nI%3D&reserved=0


or just directly reading the OTP value you're interested in. But yes, that could be an option too. You could also have a target for all RK3588S Radxa boards that you can support with the same code, and another one for RK3588 Radxa boards that can be supported with the same code. You can have common codes in a different directory if you want, we use this for Theobroma boards for example, c.f. https://elixir.bootlin.com/u-boot/v2024.10/source/board/theobroma-systems/common. Plenty of options :)

BTW, unfortunately, Board ID (ADC value) for ROCK 5B is not fixed...


Does this include the ROCK 5B+ as well? It seems SARADC_VIN5_EVB_HW_ID is pulled high for that one though?

Cheers,
Quentin

Reply via email to