Add support for Radxa ROCK Pi S
Subsystems (2)
cover Add support for Radxa ROCK Pi S
This adds a device-tree for the Radxa Rock Pi S; The first patch was originally submitted a few years back but seems to have stalled. I've adjusted it to sort the device nodes and drop duplication of dtsi properties. The second patch adds support for a bunch of additional peripherals.
Akash Gajjar (1):
arm64: dts: rockchip: add ROCK Pi S DTS support
Sjoerd Simons (1):
arm64: dts: rockchip: rock-pi-s add more peripherals
.../devicetree/bindings/arm/rockchip.yaml | 5 + arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3308-rock-pi-s.dts | 256 ++++++++++++++++++ 3 files changed, 262 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
Signature · 7 lines
2.36.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH 2/2 arm64: dts: rockchip: rock-pi-s add more peripherals
This enables the following peripherals:
* Onboard ethernet support
* Bluetooth
* USB 2 port
* OTG port via type-c connector
* Hardware watchog
Also add aliases for the mmc devices and the ethernet interface
---
.../boot/dts/rockchip/rk3308-rock-pi-s.dts | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+)
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +52 -0
@@ -11,6 +11,12 @@ / { model = "Radxa ROCK Pi S"; compatible = "radxa,rockpis", "rockchip,rk3308"; + aliases { + ethernet0 = &gmac; + mmc0 = &emmc; + mmc1 = &sdmmc; + }; + chosen { stdout-path = "serial0:1500000n8"; };
@@ -132,6 +138,15 @@ &emmc { status = "okay"; }; +&gmac { + clock_in_out = "output"; + phy-supply = <&vcc_io>; + snps,reset-gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 50000 50000>; + status = "okay"; +}; + &i2c1 { status = "okay"; };
@@ -195,10 +210,47 @@ &sdmmc { status = "okay"; }; +&u2phy { + status = "okay"; + + u2phy_host: host-port { + phy-supply = <&vcc5v0_otg>; + status = "okay"; + }; + + u2phy_otg: otg-port { + phy-supply = <&vcc5v0_otg>; + status = "okay"; + }; +}; + &uart0 { status = "okay"; }; &uart4 { status = "okay"; + + bluetooth { + compatible = "realtek,rtl8723bs-bt"; + device-wake-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; + host-wake-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; + }; +}; + +&usb_host_ehci { + status = "okay"; +}; + +&usb_host_ohci { + status = "okay"; +}; + +&usb20_otg { + dr_mode = "peripheral"; + status = "okay"; +}; + +&wdt { + status = "okay"; };
Signature · 7 lines
2.36.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH 1/2 arm64: dts: rockchip: add ROCK Pi S DTS support
In reply to Sjoerd SimonsFrom: Akash Gajjar <[email protected]>
ROCK Pi S is RK3308 based SBC from radxa.com. ROCK Pi S has a,
- 256MB/512MB DDR3 RAM
- SD, NAND flash (optional on board 1/2/4/8Gb)
- 100MB ethernet, PoE (optional)
- Onboard 802.11 b/g/n wifi + Bluetooth 4.0 Module
- USB2.0 Type-A HOST x1
- USB3.0 Type-C OTG x1
- 26-pin expansion header
- USB Type-C DC 5V Power Supply
This patch enables
- Console
- NAND Flash
- SD Card
---
.../devicetree/bindings/arm/rockchip.yaml | 5 + arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3308-rock-pi-s.dts | 204 ++++++++++++++++++ 3 files changed, 210 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
Documentation/devicetree/bindings/arm/rockchip.yaml +5 -0
@@ -554,6 +554,11 @@ properties: - const: vamrs,rk3399pro-vmarc-som - const: rockchip,rk3399pro + - description: Radxa ROCK Pi S + items: + - const: radxa,rockpis + - const: rockchip,rk3308 + - description: Radxa Rock2 Square items: - const: radxa,rock2-square
arch/arm64/boot/dts/rockchip/Makefile +1 -0
@@ -5,6 +5,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += px30-engicam-px30-core-ctouch2-of10.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += px30-engicam-px30-core-edimm2.2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-roc-cc.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a95x-z2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts new file +204 -0
204 lines not on this page · raw message
Signature · 7 lines
2.36.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Re: [PATCH 2/2] arm64: dts: rockchip: rock-pi-s add more peripherals
In reply to Sjoerd SimonsHi,
Quoted 21 lines · Sjoerd Simons
This enables the following peripherals:
* Onboard ethernet support
* Bluetooth
* USB 2 port
* OTG port via type-c connector
* Hardware watchogAlso add aliases for the mmc devices and the ethernet interface
Signed-off-by Sjoerd Simons <[email protected]>---
.../boot/dts/rockchip/rk3308-rock-pi-s.dts | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+)arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +0
-0
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts / { · line 17
Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +4
-0@@ -11,6 +11,12 @@ / { model = "Radxa ROCK Pi S"; compatible = "radxa,rockpis", "rockchip,rk3308"; + aliases { + ethernet0 = &gmac; + mmc0 = &emmc; + mmc1 = &sdmmc;
Sure? emmc is at address ff49000 which is larger than sdmmc's address ff480000. I believe the aliases should be sorted w.r.t. addresses.
Best regards,
Michael
Quoted 69 lines
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +48
-0+ }; + chosen { stdout-path = "serial0:1500000n8"; };@@ -132,6 +138,15 @@ &emmc { status = "okay"; }; +&gmac { + clock_in_out = "output"; + phy-supply = <&vcc_io>; + snps,reset-gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 50000 50000>; + status = "okay"; +}; + &i2c1 { status = "okay"; };@@ -195,10 +210,47 @@ &sdmmc { status = "okay"; }; +&u2phy { + status = "okay"; + + u2phy_host: host-port { + phy-supply = <&vcc5v0_otg>; + status = "okay"; + }; + + u2phy_otg: otg-port { + phy-supply = <&vcc5v0_otg>; + status = "okay"; + }; +}; + &uart0 { status = "okay"; }; &uart4 { status = "okay"; + + bluetooth { + compatible = "realtek,rtl8723bs-bt"; + device-wake-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; + host-wake-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; + }; +}; + +&usb_host_ehci { + status = "okay"; +}; + +&usb_host_ohci { + status = "okay"; +}; + +&usb20_otg { + dr_mode = "peripheral"; + status = "okay"; +}; + +&wdt { + status = "okay"; };
Re: [PATCH 2/2] arm64: dts: rockchip: rock-pi-s add more peripherals
Hey Michael,
Quoted 8 lines · Michael Riesch
Quoted 5 lines
+ aliases {
+ ethernet0 = &gmac;
+ mmc0 = &emmc;
+ mmc1 = &sdmmc;Sure? emmc is at address ff49000 which is larger than sdmmc's address
ff480000. I believe the aliases should be sorted w.r.t. addresses.
Do you have a reference about this sorting requirement?
Also do you mean that mmc0 should be &sdmmc *or* that the aliases should have mmc1 listed first.
For reference the reason is that mmc0 is emmc is because it seems more logical to have the builtin devices come first (e.g. as mmcblk0)
Quoted 73 lines
Best regards,
MichaelQuoted 70 lines
+ };
+
chosen {
stdout-path = "serial0:1500000n8"; };(quoted diff) +0
-0@@ -132,6 +138,15 @@ &emmc { status = "okay"; };
+&gmac {
+ clock_in_out = "output";
+ phy-supply = <&vcc_io>;
+ snps,reset-gpio = <&gpio0RK_PA7GPIO_ACTIVE_LOW>; + snps,reset-active-low;
+ snps,reset-delays-us = <0 50000 50000>;
+ status = "okay";(quoted diff) +2
-0+}; +&i2c1 {
status = "okay";
};(quoted diff) +0
-0@@ -195,10 +210,47 @@ &sdmmc { status = "okay"; };
+&u2phy {
+ status = "okay";arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +12
-0+ + u2phy_host: host-port { + phy-supply = <&vcc5v0_otg>; + status = "okay"; + }; + + u2phy_otg: otg-port { + phy-supply = <&vcc5v0_otg>; + status = "okay"; + }; +}; +&uart0 {
status = "okay";
};
&uart4 {
status = "okay";
+
+ bluetooth {
+ compatible = "realtek,rtl8723bs-bt";
+ device-wake-gpios = <&gpio4RK_PB3GPIO_ACTIVE_HIGH>;
+ host-wake-gpios = <&gpio4RK_PB4GPIO_ACTIVE_HIGH>; + };arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +17
-0+}; + +&usb_host_ehci { + status = "okay"; +}; + +&usb_host_ohci { + status = "okay"; +}; + +&usb20_otg { + dr_mode = "peripheral"; + status = "okay"; +}; + +&wdt { + status = "okay";};
Signature · 2 lines
Sjoerd Simons Collabora Ltd.
Heiko Stübner
maintainerRe: [PATCH 2/2] arm64: dts: rockchip: rock-pi-s add more peripherals
Am Mittwoch, 8. Juni 2022, 14:07:33 CEST schrieb Sjoerd Simons:
Quoted 9 lines
Hey Michael,
Quoted 6 lines · Michael Riesch
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +4
-0+ aliases { + ethernet0 = &gmac; + mmc0 = &emmc; + mmc1 = &sdmmc;
Quoted 4 lines
Quoted 2 lines
Sure? emmc is at address ff49000 which is larger than sdmmc's address
ff480000. I believe the aliases should be sorted w.r.t. addresses.Do you have a reference about this sorting requirement?
I do believe we used that mmcx -> *mmc-device sorted by address when the aliases still were in the main soc dtsi. Simply because one couldn't really know what was available on a specific board (no emmc for example).
I guess now on a per-board level we could actually do that more relaxed and let that be the decision of the board submitter ;-) .
Heiko
Quoted 82 lines
Also do you mean that mmc0 should be &sdmmc *or* that the aliases should have mmc1 listed first.
For reference the reason is that mmc0 is emmc is because it seems more logical to have the builtin devices come first (e.g. as mmcblk0)
Quoted 73 lines
Best regards,
MichaelQuoted 70 lines
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +48
-0+ }; + chosen { stdout-path = "serial0:1500000n8"; };@@ -132,6 +138,15 @@ &emmc { status = "okay"; }; +&gmac { + clock_in_out = "output"; + phy-supply = <&vcc_io>; + snps,reset-gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 50000 50000>; + status = "okay"; +}; + &i2c1 { status = "okay"; };@@ -195,10 +210,47 @@ &sdmmc { status = "okay"; }; +&u2phy { + status = "okay"; + + u2phy_host: host-port { + phy-supply = <&vcc5v0_otg>; + status = "okay"; + }; + + u2phy_otg: otg-port { + phy-supply = <&vcc5v0_otg>; + status = "okay"; + }; +}; + &uart0 { status = "okay"; }; &uart4 { status = "okay"; + + bluetooth { + compatible = "realtek,rtl8723bs-bt"; + device-wake-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; + host-wake-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; + }; +}; + +&usb_host_ehci { + status = "okay"; +}; + +&usb_host_ohci { + status = "okay"; +}; + +&usb20_otg { + dr_mode = "peripheral"; + status = "okay"; +}; + +&wdt { + status = "okay";};
Re: [PATCH 2/2] arm64: dts: rockchip: rock-pi-s add more peripherals
Hi all,
Quoted 14 lines · Heiko Stübner
Am Mittwoch, 8. Juni 2022, 14:07:33 CEST schrieb Sjoerd Simons:
Quoted 13 lines
Hey Michael,
Quoted 8 lines · Michael Riesch
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts / { · line 17
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +4
-0+ aliases { + ethernet0 = &gmac; + mmc0 = &emmc; + mmc1 = &sdmmc;Sure? emmc is at address ff49000 which is larger than sdmmc's address
ff480000. I believe the aliases should be sorted w.r.t. addresses.Do you have a reference about this sorting requirement?
No, not really. I did have the impression that such a convention existed...
Quoted 4 lines
I do believe we used that mmcx -> *mmc-device sorted by address when the aliases still were in the main soc dtsi. Simply because one couldn't really know what was available on a specific board (no emmc for example).
... and this seems to be the case indeed...
Quoted 2 lines
I guess now on a per-board level we could actually do that more relaxed and let that be the decision of the board submitter ;-) .
... but apparently the convention is not that crucial anymore :-) Just wanted to point it out.
Quoted 2 lines
Quoted 2 lines
Also do you mean that mmc0 should be &sdmmc *or* that the aliases should have mmc1 listed first.
FTR, I would have suggested
mmc0 = &sdmmc;
mmc1 = &emmc;
according to said convention, but then I would also take a look on whatever any other rk3308 boards do and aim to be in sync...
Quoted 2 lines
Quoted 2 lines
For reference the reason is that mmc0 is emmc is because it seems more logical to have the builtin devices come first (e.g. as mmcblk0)
... unless there is a good reason not to. You be the judge of that ;-)
Best regards,
Michael
Quoted 1 line
Quoted 1 line
[...]
Rob Herring
maintainerRe: [PATCH 1/2] arm64: dts: rockchip: add ROCK Pi S DTS support
In reply to Sjoerd SimonsQuoted 17 lines · Sjoerd Simons
From: Akash Gajjar <[email protected]>
ROCK Pi S is RK3308 based SBC from radxa.com. ROCK Pi S has a,
- 256MB/512MB DDR3 RAM
- SD, NAND flash (optional on board 1/2/4/8Gb)
- 100MB ethernet, PoE (optional)
- Onboard 802.11 b/g/n wifi + Bluetooth 4.0 Module
- USB2.0 Type-A HOST x1
- USB3.0 Type-C OTG x1
- 26-pin expansion header
- USB Type-C DC 5V Power SupplyThis patch enables
- Console
- NAND Flash
- SD Card
Quoted 6 lines
Signed-off-by Akash Gajjar <[email protected]>[sjoerd: Sort dt nodes, drop properties duplicated from dtsi]Signed-off-by Sjoerd Simons <[email protected]>---
.../devicetree/bindings/arm/rockchip.yaml | 5 +
Bindings should be a separate patch.
Quoted 4 lines
arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3308-rock-pi-s.dts | 204 ++++++++++++++++++ 3 files changed, 210 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts