Skip to contentSkip to conversation

Add support for Ariaboard Photonicat RK3568

PATCH Applied Junhao Xie 4 participants 9 messages Jan 14, 2025 – Feb 10, 2025

Subsystems (2)
lore
Share & tools
lore

Junhao Xie

author
#0 lore raw

v7 cover Add support for Ariaboard Photonicat RK3568

Add dts for Ariaboard Photonicat RK3568.

This series bring support for:
* Debug UART
* SDIO QCA9377 WiFi and Bluetooth
* M.2 E-Key PCIe WiFi and Bluetooth
* M.2 B-Key USB Modem WWAN
* Ethernet WAN Port
* MicroSD Card slot
* eMMC
* HDMI Output
* Mali GPU
* USB Type-A

Changed from v1:
- remove some general nodes (firmware, ramoops, reboot-mode)
- gmac1 change to phy-mode rgmii-id
- corrected some regulator to be closer to schematics
- rename rk3568-ariaboard-photonicat.dts to rk3568-photonicat.dts
https://lore.kernel.org/lkml/[email protected]/

Changed from v2:
- remove unused headers
- corrected some regulator to be closer to schematics
- remove usb_host1_ohci, usb_host1_ehci, usb2phy1_host that have no connection
https://lore.kernel.org/lkml/[email protected]/

Changed from v3:
- corrected some regulator to be closer to schematics
- changed to using clk32k_out1 in xin32k
https://lore.kernel.org/lkml/[email protected]/

Changed from v4:
- corrected some regulator to be closer to schematics
- corrected some label to match node name
- use resets props in phy node instead deprecated snps,reset-gpio
https://lore.kernel.org/lkml/[email protected]/

Changed from v5:
- resort regulator nodes
- remove dr_mode from usb_host1_xhci
https://lore.kernel.org/lkml/[email protected]/

Changed from v6:
- fix property gpios to gpio in vcc3v3_pi6c
- rename rgmii_phy1 to rgmii_phy
- change address from 0x0 to 0x3 in rgmii_phy
- add link to downstream board dts
https://lore.kernel.org/lkml/[email protected]/

Junhao Xie (3):
dt-bindings: vendor-prefixes: Add prefix for Ariaboard
dt-bindings: arm: rockchip: Add Ariaboard Photonicat RK3568
arm64: dts: rockchip: add dts for Ariaboard Photonicat RK3568

 .../devicetree/bindings/arm/rockchip.yaml     |   5 +
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../boot/dts/rockchip/rk3568-photonicat.dts   | 591 ++++++++++++++++++
 4 files changed, 599 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts
Signature · 1 line
2.47.1
author
#1 lore raw

PATCH v7 1/3 dt-bindings: vendor-prefixes: Add prefix for Ariaboard

Add an entry for Ariaboard from Shanghai Novotech

Ariaboard represents a product line from Shanghai Novotech Co., Ltd.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index da01616802c7..25e1efbe7c3a 100644
@@ -147,6 +147,8 @@ patternProperties:
     description: Arctic Sand
   "^arcx,.*":
     description: arcx Inc. / Archronix Inc.
+  "^ariaboard,.*":
+    description: Shanghai Novotech Co., Ltd. (Ariaboard)
   "^aries,.*":
     description: Aries Embedded GmbH
   "^arm,.*":
Signature · 1 line
2.47.1
author
#2 lore raw

PATCH v7 2/3 dt-bindings: arm: rockchip: Add Ariaboard Photonicat RK3568

In reply to Junhao Xie

This documents Ariaboard Photonicat which is a router based on RK3568 SoC.

---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +5 -0
index 753199a12923..4802ced008b7 100644
@@ -49,6 +49,11 @@ properties:
               - anbernic,rg-arc-s
           - const: rockchip,rk3566
 
+      - description: Ariaboard Photonicat
+        items:
+          - const: ariaboard,photonicat
+          - const: rockchip,rk3568
+
       - description: ArmSoM Sige5 board
         items:
           - const: armsom,sige5
Signature · 1 line
2.47.1
author
#3 lore raw

PATCH v7 3/3 arm64: dts: rockchip: add dts for Ariaboard Photonicat RK3568

In reply to Junhao Xie

Add dts for Ariaboard Photonicat RK3568.
Partially based on downstream board dts. [1]

Working IO:
Debug UART
SDIO QCA9377 WiFi and Bluetooth
M.2 E-Key PCIe WiFi and Bluetooth
M.2 B-Key USB Modem WWAN
Ethernet WAN Port
MicroSD Card slot
eMMC
HDMI Output
Mali GPU
USB Type-A

Not working IO:
Ethernet LAN Port (Lack of SGMII support) Power management MCU on UART4 (Driver pending)

Not working IO in MCU:
Battery voltage sensor
Board temperature sensor
Hardware Power-off
Hardware Watchdog
Network status LED
Real-time clock
USB Charger voltage sensor

About onboard power management MCU:
A heartbeat must be sent to the MCU within 60 seconds, otherwise the MCU will restart the system.
When powering off, a shutdown command needs to be sent to the MCU. When the power button is long pressed, the MCU will send a shutdown command to the system. If system does not shutdown within 60 seconds, the power will be turned off directly.
MCU only provides voltage for charger and battery. Manufacturer removed RK8xx PMIC.

[1] https://github.com/photonicat/rockchip_rk3568_kernel/blob/novotech-5.10/arch/arm64/boot/dts/rockchip/rk3568-photonicat-base.dtsi

---
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../boot/dts/rockchip/rk3568-photonicat.dts   | 591 ++++++++++++++++++
 2 files changed, 592 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
index 86cc418a2255..bd3fc25e0bb2 100644
@@ -120,6 +120,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-mecsbc.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5c.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-photonicat.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts433.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-roc-pc.dtb
arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts new file +591 -0

591 lines not on this page · raw message

Signature · 1 line
2.47.1
#4 lore raw

Re: [PATCH v7 3/3] arm64: dts: rockchip: add dts for Ariaboard Photonicat RK3568

Hi,

Quoted 1 line

[1] https://github.com/photonicat/rockchip_rk3568_kernel/blob/novotech-5.10/arch/arm64/boot/dts/rockchip/rk3568-photonicat-base.dtsi

I don't think this link has reference value. I was misled by this several times when I wrote dts before.

arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts line 365

Quoted 3 lines

+&pcie3x2 {

arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts new file +2 -0
+	max-link-speed = <1>;
+	num-lanes = <1>;

I'm not sure about this.
This PCIe3.0 x2 is not split.

Review

Quoted 4 lines

+&sdmmc1 {
...

(quoted diff) +2 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;

pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_clk &sdmmc1_cmd>;

arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts line 480

Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts new file +2 -0
+	wifi: wifi@1 {
+		reg = <1>;

No aliases needed.
Other parts LGTM.

Signature · 7 lines
2.25.1


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

Re: [PATCH v7 3/3] arm64: dts: rockchip: add dts for Ariaboard Photonicat RK3568

Quoted 5 lines · Chukun Pan

Hi,

Quoted 1 line

[1] https://github.com/photonicat/rockchip_rk3568_kernel/blob/novotech-5.10/arch/arm64/boot/dts/rockchip/rk3568-photonicat-base.dtsi

I don't think this link has reference value. I was misled by this several times when I wrote dts before.

It really helped me, I wrote first dts with reference to it and other devices in mainline.
Could there be a better reference link here?

Quoted 7 lines

arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts line 365

Quoted 4 lines

+&pcie3x2 {

arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts new file +2 -0
+	max-link-speed = <1>;
+	num-lanes = <1>;

I'm not sure about this.
This PCIe3.0 x2 is not split.

In the schematics for that slot I saw that it only has a PCIe3.0 x1 connected. I think maybe max-link-speed = <1> is wrong.
Now modify it to the following, it should look correct?

/* M.2 E-Key for PCIe WLAN */

&pcie3x2 {
	max-link-speed = <3>;
	num-lanes = <1>;
	pinctrl-names = "default";
	pinctrl-0 = <&pcie30x1m0_pins>;
	reset-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
	vpcie3v3-supply = <&vcc3v3_pcie>;
	status = "okay";
};
Quoted 7 lines

Review

Quoted 5 lines

+&sdmmc1 {
...

(quoted diff) +2 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;

pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_clk &sdmmc1_cmd>;

I will correct it.

Quoted 5 lines

arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts line 480

Quoted 3 lines
arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts new file +2 -0
+	wifi: wifi@1 {
+		reg = <1>;

No aliases needed.

I will remove it.

Quoted 2 lines

Other parts LGTM.

Thanks for your review, I will fix all problems in next version!

Best regards,
Junhao

#6 lore raw

Re: [PATCH v7 3/3] arm64: dts: rockchip: add dts for Ariaboard Photonicat RK3568

Hi,

Quoted 3 lines

It really helped me, I wrote first dts with reference to it and other devices in mainline.
Could there be a better reference link here?

No need, subject to the schematics.
My previous reply was also based on schematics.

Quoted 3 lines

In the schematics for that slot I saw that it only has a PCIe3.0 x1 connected. I think maybe max-link-speed = <1> is wrong. Now modify it to the following, it should look correct?

'max-link-speed = <3>;' already defined in rk3568.dtsi I'm not sure about this, can you test that it works? Without splitting, num-lanes should be 2.

Signature · 1 line
2.25.1
#7 lore raw
In reply to Junhao Xie
Quoted 62 lines · Junhao Xie

Add dts for Ariaboard Photonicat RK3568.

This series bring support for:
* Debug UART
* SDIO QCA9377 WiFi and Bluetooth
* M.2 E-Key PCIe WiFi and Bluetooth
* M.2 B-Key USB Modem WWAN
* Ethernet WAN Port
* MicroSD Card slot
* eMMC
* HDMI Output
* Mali GPU
* USB Type-A

Changed from v1:
- remove some general nodes (firmware, ramoops, reboot-mode)
- gmac1 change to phy-mode rgmii-id
- corrected some regulator to be closer to schematics
- rename rk3568-ariaboard-photonicat.dts to rk3568-photonicat.dts
https://lore.kernel.org/lkml/[email protected]/

Changed from v2:
- remove unused headers
- corrected some regulator to be closer to schematics
- remove usb_host1_ohci, usb_host1_ehci, usb2phy1_host that have no connection
https://lore.kernel.org/lkml/[email protected]/

Changed from v3:
- corrected some regulator to be closer to schematics
- changed to using clk32k_out1 in xin32k
https://lore.kernel.org/lkml/[email protected]/

Changed from v4:
- corrected some regulator to be closer to schematics
- corrected some label to match node name
- use resets props in phy node instead deprecated snps,reset-gpio
https://lore.kernel.org/lkml/[email protected]/

Changed from v5:
- resort regulator nodes
- remove dr_mode from usb_host1_xhci
https://lore.kernel.org/lkml/[email protected]/

Changed from v6:
- fix property gpios to gpio in vcc3v3_pi6c
- rename rgmii_phy1 to rgmii_phy
- change address from 0x0 to 0x3 in rgmii_phy
- add link to downstream board dts
https://lore.kernel.org/lkml/[email protected]/

Junhao Xie (3):
dt-bindings: vendor-prefixes: Add prefix for Ariaboard
dt-bindings: arm: rockchip: Add Ariaboard Photonicat RK3568
arm64: dts: rockchip: add dts for Ariaboard Photonicat RK3568

 .../devicetree/bindings/arm/rockchip.yaml     |   5 +
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../boot/dts/rockchip/rk3568-photonicat.dts   | 591 ++++++++++++++++++
 4 files changed, 599 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts
Quoted 5 lines

--
2.47.1

My bot found new DTB warnings on the .dts files added or changed in this series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:

  pip3 install dtschema --upgrade

New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/rockchip/' for [email protected]:

arch/arm64/boot/dts/rockchip/rk3568-photonicat.dtb: bluetooth: 'clock-names' does not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/net/bluetooth/qualcomm-bluetooth.yaml#
arch/arm64/boot/dts/rockchip/rk3568-photonicat.dtb: phy@fe8c0000: 'phy-supply' does not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/phy/rockchip,pcie3-phy.yaml#
arch/arm64/boot/dts/rockchip/rk3568-photonicat.dtb: rfkill-modem: 'reset-gpios' does not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/net/rfkill-gpio.yaml#

maintainer Applied
#8 lore raw
In reply to Junhao Xie
Quoted 14 lines · Junhao Xie

Add dts for Ariaboard Photonicat RK3568.

This series bring support for:
* Debug UART
* SDIO QCA9377 WiFi and Bluetooth
* M.2 E-Key PCIe WiFi and Bluetooth
* M.2 B-Key USB Modem WWAN
* Ethernet WAN Port
* MicroSD Card slot
* eMMC
* HDMI Output
* Mali GPU
* USB Type-A

Quoted 1 line

[...]

Applied, thanks!

[1/3] dt-bindings: vendor-prefixes: Add prefix for Ariaboard

      commit: 8d9863487e58434d22dbacb10ad2f9dde326a25c
[2/3] dt-bindings: arm: rockchip: Add Ariaboard Photonicat RK3568
      commit: a81c10aee108d805259dac50c0ac509681c559e8
[3/3] arm64: dts: rockchip: add dts for Ariaboard Photonicat RK3568
      commit: 3834e1009c108a8a834a7e4625dfa805fcb1f71d

As seen by the reply from Rob's bot, there were some minor issues, that I fixed myself:

- dropped clock-names from bluetooth node
- dropped reset-gpios from rfkill node
- dropped phy-supply from pcie-phy
with vcc3v3_pcie marked as being supplied by vcc3v3_pi6c, all supplies should still be enabled nevertheless

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>