Skip to contentSkip to conversation

dt-bindings: arm: rockchip: Document Radxa ROCK 4C+

PATCH Superseded Jagan Teki 3 participants 12 messages Aug 24, 2022 – Aug 30, 2022

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH 1/2 dt-bindings: arm: rockchip: Document Radxa ROCK 4C+

Document the dt-bindings for Radxa ROCK 4C+ SBC.

4C+ replaced DP with HDMI and updated FPC connectors for MIPI DSI/CSI compared to 4C revision.

Also, an official naming convention from Radxa mention to remove Pi from board name, so this 4C+ is named as Radxa ROCK 4C+ not Radxa ROCK Pi 4C+.

---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +5 -0
index 7811ba64149c..ec3525fb1e60 100644
@@ -537,6 +537,11 @@ properties:
           - const: radxa,rockpi4
           - const: rockchip,rk3399
 
+      - description: Radxa ROCK 4C+
+        items:
+          - const: radxa,rock-4c-plus
+          - const: rockchip,rk3399
+
       - description: Radxa ROCK Pi E
         items:
           - const: radxa,rockpi-e
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH 2/2 arm64: dts: rockchip: rk3399: Radxa ROCK 4C+

Add support for Radxa ROCK 4C+ SBC.

4C+ replaced DP with HDMI and updated FPC connectors for MIPI DSI/CSI compared to 4C revision.

Also, an official naming convention from Radxa mention to remove Pi from board name, so this 4C+ is named as Radxa ROCK 4C+ not Radxa ROCK Pi 4C+.

---
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../boot/dts/rockchip/rk3399-rock-4c-plus.dts | 641 ++++++++++++++++++
 2 files changed, 642 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
index ef79a672804a..f92637eb6f90 100644
@@ -46,6 +46,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-mezzanine.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-plus.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-4c-plus.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4a.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4a-plus.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4b.dtb
arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts new file +641 -0

641 lines not on this page · raw message

Signature · 1 line
2.25.1
#2 lore raw

Re: [PATCH 2/2] arm64: dts: rockchip: rk3399: Radxa ROCK 4C+

Quoted 66 lines · Jagan Teki

Add support for Radxa ROCK 4C+ SBC.

4C+ replaced DP with HDMI and updated FPC connectors for MIPI DSI/CSI compared to 4C revision.

Also, an official naming convention from Radxa mention to remove Pi from board name, so this 4C+ is named as Radxa ROCK 4C+ not Radxa ROCK Pi 4C+.

---
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../boot/dts/rockchip/rk3399-rock-4c-plus.dts | 641 ++++++++++++++++++
 2 files changed, 642 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
index ef79a672804a..f92637eb6f90 100644
@@ -46,6 +46,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-mezzanine.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-plus.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-4c-plus.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4a.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4a-plus.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4b.dtb
arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts new file +30 -0
new file mode 100644
index 000000000000..cf9997c011d2
@@ -0,0 +1,641 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
+ * Copyright (c) 2019 Radxa Limited
+ * Copyright (c) 2022 Amarula Solutions(India)
+ */
+
+/dts-v1/;
+#include "rk3399.dtsi"
+#include "rk3399-opp.dtsi"
+
+/ {
+	model = "Radxa ROCK 4C+";
+	compatible = "radxa,rock-4c-plus", "rockchip,rk3399";
+
+	aliases {
+		mmc0 = &sdmmc;
+	};
+
+	chosen {
+		stdout-path = "serial2:1500000n8";
+	};
+
+	sdio_pwrseq: sdio-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		clocks = <&rk809 1>;
+		clock-names = "ext_clock";
+		pinctrl-names = "default";
+		pinctrl-0 = <&wifi_enable_h>;
+		reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;

arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts line 40

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts new file +10 -0
+	};
+
+	clkin_gmac: external-gmac-clock {
+		compatible = "fixed-clock";
+		clock-frequency = <125000000>;
+		clock-output-names = "clkin_gmac";
+		#clock-cells = <0>;
+	};
+
+	vcc5v0_sys: vcc-sys {

Use consistent prefixes or suffixes, so vcc-sys-regulator.

(...)

arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts line 373

Quoted 1 line
arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts new file +1 -0
+	vdd_gpu: syr828@41 {

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH 2/2] arm64: dts: rockchip: rk3399: Radxa ROCK 4C+

In reply to Jagan Teki

Hello,

thank you very much for your work!

Quoted 1 line

+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-4c-plus.dtb

this is not an objection, just a note for me, currently our(Radxa) u-boot try to load "rk3399-rock-pi-4c-plus.dtb".

Quoted 1 line

+#include "rk3399-opp.dtsi"

ROCK 4C+ has RK3399-T. it needs different opp table.

arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts line 17

Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts new file +2 -0
+	aliases {
+		mmc0 = &sdmmc;

please add

		mmc1 = &sdhci;

as like as other ROCK (Pi) 4 series.

Review

Quoted 3 lines

+&hdmi_sound {

(quoted diff) +2 -0
+	status = "okay";
+};

please add

&i2s2 {
	status = "okay";
};

too.

arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts line 532

Quoted 11 lines

+&sdmmc {

arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts new file +10 -0
+	bus-width = <4>;
+	cap-mmc-highspeed;
+	cap-sd-highspeed;
+	card-detect-delay = <800>;
+	disable-wp;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdmmc_clk &sdmmc_cd &sdmmc_cmd &sdmmc_bus4>;
+	vqmmc-supply = <&vccio_sd>;
+	status = "okay";
+};

does card detect work for you? it doesn't work for me. I think it needs

	cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;

instead of "&sdmmc_cd".

Best regards,

--
FUKAUMI Naoki

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

author
#4 lore raw

Re: [PATCH 2/2] arm64: dts: rockchip: rk3399: Radxa ROCK 4C+

Quoted 5 lines · FUKAUMI Naoki

Hello,

thank you very much for your work!

Quoted 8 lines
Quoted 1 line

+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-4c-plus.dtb

this is not an objection, just a note for me, currently our(Radxa) u-boot try to load "rk3399-rock-pi-4c-plus.dtb".

Quoted 1 line

+#include "rk3399-opp.dtsi"

ROCK 4C+ has RK3399-T. it needs different opp table.

Yes, I will update this in V3.

Quoted 34 lines

arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts line 17

Quoted 3 lines
arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts new file +2 -0
+     aliases {
+             mmc0 = &sdmmc;

please add

                mmc1 = &sdhci;

as like as other ROCK (Pi) 4 series.

Review

Quoted 3 lines

+&hdmi_sound {

(quoted diff) +2 -0
+     status = "okay";
+};

please add

&i2s2 {
        status = "okay";
};

too.

arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts line 532

Quoted 11 lines

+&sdmmc {

arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts new file +10 -0
+     bus-width = <4>;
+     cap-mmc-highspeed;
+     cap-sd-highspeed;
+     card-detect-delay = <800>;
+     disable-wp;
+     pinctrl-names = "default";
+     pinctrl-0 = <&sdmmc_clk &sdmmc_cd &sdmmc_cmd &sdmmc_bus4>;
+     vqmmc-supply = <&vccio_sd>;
+     status = "okay";
+};
Quoted 2 lines

does card detect work for you? it doesn't work for me. I think it needs

Yes. it is detecting for me. I've booted from SD. 2022.03.04 V1.2 revision board.

Thanks,
Jagan.

#5 lore raw

Re: [PATCH 2/2] arm64: dts: rockchip: rk3399: Radxa ROCK 4C+

sorry, I noticed I sent previous email to wrong thread (v1, not v2).

Quoted 12 lines
Quoted 12 lines
Quoted 11 lines

+&sdmmc {

arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts new file +10 -0
+     bus-width = <4>;
+     cap-mmc-highspeed;
+     cap-sd-highspeed;
+     card-detect-delay = <800>;
+     disable-wp;
+     pinctrl-names = "default";
+     pinctrl-0 = <&sdmmc_clk &sdmmc_cd &sdmmc_cmd &sdmmc_bus4>;
+     vqmmc-supply = <&vccio_sd>;
+     status = "okay";
+};
Quoted 5 lines
Quoted 2 lines

does card detect work for you? it doesn't work for me. I think it needs

Yes. it is detecting for me. I've booted from SD. 2022.03.04 V1.2 revision board.

I have same board, but I'm using eMMC as boot media. do you have any eMMC module?

what I tried was inserting uSD card while running Linux on eMMC. it didn't work.

Best regards,

--
FUKAUMI Naoki

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

author
#6 lore raw

Re: [PATCH 2/2] arm64: dts: rockchip: rk3399: Radxa ROCK 4C+

Quoted 18 lines · FUKAUMI Naoki

sorry, I noticed I sent previous email to wrong thread (v1, not v2).

Quoted 15 lines
Quoted 14 lines

arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts line 532

Quoted 11 lines

+&sdmmc {

arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts new file +10 -0
+     bus-width = <4>;
+     cap-mmc-highspeed;
+     cap-sd-highspeed;
+     card-detect-delay = <800>;
+     disable-wp;
+     pinctrl-names = "default";
+     pinctrl-0 = <&sdmmc_clk &sdmmc_cd &sdmmc_cmd &sdmmc_bus4>;
+     vqmmc-supply = <&vccio_sd>;
+     status = "okay";
+};

does card detect work for you? it doesn't work for me. I think it needs

Quoted 8 lines
Quoted 2 lines

Yes. it is detecting for me. I've booted from SD. 2022.03.04 V1.2 revision board.

I have same board, but I'm using eMMC as boot media. do you have any eMMC module?

what I tried was inserting uSD card while running Linux on eMMC. it didn't work.

Here is booted from SD with eMMC inserted on board.
https://gist.github.com/openedev/85fb939664b6f0803c9ce02c5b275167

Jagan.

#7 lore raw

Re: [PATCH 2/2] arm64: dts: rockchip: rk3399: Radxa ROCK 4C+

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

does card detect work for you? it doesn't work for me. I think it needs

Yes. it is detecting for me. I've booted from SD. 2022.03.04 V1.2 revision board.

Quoted 8 lines
Quoted 5 lines

I have same board, but I'm using eMMC as boot media. do you have any eMMC module?

what I tried was inserting uSD card while running Linux on eMMC. it didn't work.

Here is booted from SD with eMMC inserted on board.
https://gist.github.com/openedev/85fb939664b6f0803c9ce02c5b275167

please try

1. power off
2. remove SD
3. attach bootable eMMC
4. power on
5. insert SD
6. see what happen

--
FUKAUMI Naoki

author
#8 lore raw

Re: [PATCH 2/2] arm64: dts: rockchip: rk3399: Radxa ROCK 4C+

Quoted 16 lines · FUKAUMI Naoki
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

does card detect work for you? it doesn't work for me. I think it needs

Yes. it is detecting for me. I've booted from SD. 2022.03.04 V1.2 revision board.

Quoted 8 lines
Quoted 5 lines

I have same board, but I'm using eMMC as boot media. do you have any eMMC module?

what I tried was inserting uSD card while running Linux on eMMC. it didn't work.

Here is booted from SD with eMMC inserted on board.
https://gist.github.com/openedev/85fb939664b6f0803c9ce02c5b275167

Quoted 8 lines

please try

1. power off
2. remove SD
3. attach bootable eMMC
4. power on
5. insert SD
6. see what happen

Got it. I'm sending V3 for updated changes.

Thanks,
Jagan.

author
#9 lore raw

Re: [PATCH 2/2] arm64: dts: rockchip: rk3399: Radxa ROCK 4C+

In reply to FUKAUMI Naoki
Quoted 14 lines · FUKAUMI Naoki

Hello,

thank you very much for your work!

Quoted 1 line

+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-4c-plus.dtb

this is not an objection, just a note for me, currently our(Radxa) u-boot try to load "rk3399-rock-pi-4c-plus.dtb".

Quoted 1 line

+#include "rk3399-opp.dtsi"

ROCK 4C+ has RK3399-T. it needs different opp table.

Quoted 8 lines

arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts line 17

Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts new file +2 -0
+     aliases {
+             mmc0 = &sdmmc;

please add

                mmc1 = &sdhci;

as like as other ROCK (Pi) 4 series.

are you sure? other use the same.

mmc0 = &sdmmc;
mmc1 = &sdhci;

#10 lore raw

Re: [PATCH 2/2] arm64: dts: rockchip: rk3399: Radxa ROCK 4C+

Quoted 5 lines
Quoted 5 lines

arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts line 17

Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts new file +2 -0
+     aliases {
+             mmc0 = &sdmmc;

please add

Quoted 8 lines
Quoted 3 lines
                mmc1 = &sdhci;

as like as other ROCK (Pi) 4 series.

are you sure? other use the same.

mmc0 = &sdmmc;
mmc1 = &sdhci;

well... I asked "please do the same", i.e.

mmc0 = &sdmmc;
mmc1 = &sdhci;

is there any problem?

Best regards,

--
FUKAUMI Naoki

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

Acked-by on v1 1/2
#11 lore raw
In reply to Jagan Teki
Quoted 8 lines · Jagan Teki

Document the dt-bindings for Radxa ROCK 4C+ SBC.

4C+ replaced DP with HDMI and updated FPC connectors for MIPI DSI/CSI compared to 4C revision.

Also, an official naming convention from Radxa mention to remove Pi from board name, so this 4C+ is named as Radxa ROCK 4C+ not Radxa ROCK Pi 4C+.

This does not look like wrapped according to Linux style.

https://elixir.bootlin.com/linux/v5.18-rc4/source/Documentation/process/submitting-patches.rst#L586

With wrapping fixes:

Best regards,
Krzysztof