arm64: dts: rockchip: add Forlinx OK3568-C
Subsystems (2)
v3 cover arm64: dts: rockchip: add Forlinx OK3568-C
This series add support for Forlinx OK3568-C board based on FET3568-C SoM (rk3568). Patches 1-3 add .dtsi for FET3568-C and .dts for OK3568-C. Patch 4 adds .dtso for FIT-PCIE-SATA adapter that allows to connect SATA drives to the board.
Note: tested on v1.1 board. On v1.2 RTL8211F phys use dedicated crystal oscillator instead of 25 MHz reference clock from SoC. Patch should be compatible with both revisions, as in [1] solution.
[1] https://lore.kernel.org/all/20250704-rk3576-rock4d-phy-handling-fixes-v1-1-1d64130c4139@kernel.org/
---
Changes in v3:
- dropped rfkill-gpio dt-binding patch as not appropriate
- dropped rfkill-gpio node from the board's device tree
- Link to v2: https://patch.msgid.link/[email protected]
Changes in v2:
- added patch for rfkill-gpio's dt-binding with reset-gpios property to suppress dt warnings
- removed mmc-pwrseq. AW-CM358SM has only power management PDn pin
for both wifi and bt. Using shared wifi_bt_reg_on regulator fixes bluetooth failure on cold boots
- added bluetooth wakein/wakeout pins
- moved leds/common.h to the SoM dtsi
- switched gmac's phy-mode to rgmii-id
- added rfkill-gpio for modem reset
- dropped unused wifi and bt pinctrl's
- Link to v1: https://patch.msgid.link/[email protected]
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: Heiko Stuebner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
Dmitry Yashin (4):
dt-bindings: arm: rockchip: add Forlinx FET3568-C
arm64: dts: rockchip: add Forlinx FET3568-C
arm64: dts: rockchip: add Forlinx OK3568-C
arm64: dts: rockchip: add FIT-PCIE-SATA overlay
.../devicetree/bindings/arm/rockchip.yaml | 7 + arch/arm64/boot/dts/rockchip/Makefile | 6 + arch/arm64/boot/dts/rockchip/rk3568-fet3568-c.dtsi | 332 ++++++++++++ .../rockchip/rk3568-ok3568-c-fit-pcie-sata.dtso | 16 + arch/arm64/boot/dts/rockchip/rk3568-ok3568-c.dts | 566 +++++++++++++++++++++ 5 files changed, 927 insertions(+)
---
base-commit: 72d3fcf802c45d00b300f25b848a93c3a2bd7c7e
change-id: 20260930-ok3568-c-c095925b1e26
Best regards,
Signature · 1 line
Dmitry Yashin <[email protected]>
PATCH v3 1/4 dt-bindings: arm: rockchip: add Forlinx FET3568-C
FET3568-C is an System on Module made by Forlinx based on Rockchip RK3568. This SoM used by OK3568-C Board.
FET3568-C features:
- Rockchip RK3568
- DDR4 1/2/4/8 GB
- eMMC 8/16/32/64 GB
- RK809 PMIC
Add devicetree binding for Forlinx FET3568-C SoM.
--- Documentation/devicetree/bindings/arm/rockchip.yaml | 7 +++++++ 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +7 -0
@@ -324,6 +324,13 @@ properties: - const: firefly,rk3568-roc-pc - const: rockchip,rk3568 + - description: Forlinx FET3568-C SoM + items: + - enum: + - forlinx,ok3568-c + - const: forlinx,fet3568-c + - const: rockchip,rk3568 + - description: Forlinx FET3588-C SoM items: - enum:
Signature · 1 line
2.56.0
PATCH v3 2/4 arm64: dts: rockchip: add Forlinx FET3568-C
In reply to Dmitry YashinFET3568-C is an System on Module made by Forlinx based on Rockchip RK3568. This SoM used by OK3568-C Board.
FET3568-C features:
- Rockchip RK3568
- DDR4 1/2/4/8 GB
- eMMC 8/16/32/64 GB
- RK809 PMIC
Add devicetree for Forlinx FET3568-C SoM.
--- arch/arm64/boot/dts/rockchip/rk3568-fet3568-c.dtsi | 332 +++++++++++++++++++++ 1 file changed, 332 insertions(+)
arch/arm64/boot/dts/rockchip/rk3568-fet3568-c.dtsi new file +332 -0
@@ -0,0 +1,332 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/leds/common.h> +#include "rk3568.dtsi" + +/ { + compatible = "forlinx,fet3568-c", "rockchip,rk3568"; + + aliases { + mmc0 = &sdhci; + }; + + chosen: chosen { + stdout-path = "serial2:1500000n8"; + }; + + leds { + compatible = "gpio-leds"; + + led-0 { + color = <LED_COLOR_ID_BLUE>; + default-state = "on"; + function = LED_FUNCTION_HEARTBEAT; + gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + pinctrl-names = "default"; + pinctrl-0 = <&led0_pin>; + }; + }; +}; + +&cpu0 { + cpu-supply = <&vdd_cpu>; +}; + +&cpu1 { + cpu-supply = <&vdd_cpu>; +}; + +&cpu2 { + cpu-supply = <&vdd_cpu>; +}; + +&cpu3 { + cpu-supply = <&vdd_cpu>; +}; + +&gpu { + mali-supply = <&vdd_gpu>; + status = "okay"; +}; + +&i2c0 { + status = "okay"; + + vdd_cpu: regulator@1c { + compatible = "tcs,tcs4525"; + reg = <0x1c>; + fcs,suspend-voltage-selector = <1>; + regulator-name = "vdd_cpu"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1150000>; + regulator-ramp-delay = <2300>; + vin-supply = <&vcc5v0>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + rk809: pmic@20 { + compatible = "rockchip,rk809"; + reg = <0x20>; + assigned-clocks = <&cru I2S1_MCLKOUT_TX>; + assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>; + #clock-cells = <1>; + clocks = <&cru I2S1_MCLKOUT_TX>; + clock-names = "mclk"; + clock-output-names = "rk809-clkout1", "rk809-clkout2"; + interrupt-parent = <&gpio0>; + interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>; + #sound-dai-cells = <0>; + system-power-controller; + wakeup-source; + + vcc1-supply = <&vcc3v3>; + vcc2-supply = <&vcc3v3>; + vcc3-supply = <&vcc3v3>; + vcc4-supply = <&vcc3v3>; + vcc5-supply = <&vcc3v3>; + vcc6-supply = <&vcc3v3>; + vcc7-supply = <&vcc3v3>; + vcc8-supply = <&vcc3v3>; + vcc9-supply = <&vcc3v3>; + + regulators { + vdd_logic: DCDC_REG1 { + regulator-name = "vdd_logic"; + regulator-always-on; + regulator-boot-on; + regulator-initial-mode = <0x2>; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-ramp-delay = <6001>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_gpu: DCDC_REG2 { + regulator-name = "vdd_gpu"; + regulator-always-on; + regulator-boot-on; + regulator-initial-mode = <0x2>; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-ramp-delay = <6001>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_ddr: DCDC_REG3 { + regulator-name = "vcc_ddr"; + regulator-always-on; + regulator-boot-on; + regulator-initial-mode = <0x2>; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vdd_npu: DCDC_REG4 { + regulator-name = "vdd_npu"; + regulator-initial-mode = <0x2>; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1350000>; + regulator-ramp-delay = <6001>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_1v8: DCDC_REG5 { + regulator-name = "vcc_1v8"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdda0v9_image: LDO_REG1 { + regulator-name = "vdda0v9_image"; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdda_0v9: LDO_REG2 { + regulator-name = "vdda_0v9"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdda0v9_pmu: LDO_REG3 { + regulator-name = "vdda0v9_pmu"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <900000>; + }; + }; + + vccio_acodec: LDO_REG4 { + regulator-name = "vccio_acodec"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vccio_sd: LDO_REG5 { + regulator-name = "vccio_sd"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc3v3_pmu: LDO_REG6 { + regulator-name = "vcc3v3_pmu"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcca_1v8: LDO_REG7 { + regulator-name = "vcca_1v8"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcca1v8_pmu: LDO_REG8 { + regulator-name = "vcca1v8_pmu"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcca1v8_image: LDO_REG9 { + regulator-name = "vcca1v8_image"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_3v3: SWITCH_REG1 { + regulator-name = "vcc_3v3"; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc3v3_sd: SWITCH_REG2 { + regulator-name = "vcc3v3_sd"; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; +}; + +&pinctrl { + leds { + led0_pin: led0-pin { + rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + pmic { + pmic_int: pmic-int { + rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; + +&sdhci { + bus-width = <8>; + cap-mmc-highspeed; + max-frequency = <200000000>; + mmc-hs200-1_8v; + non-removable; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>; + vmmc-supply = <&vcc_3v3>; + vqmmc-supply = <&vcc_1v8>; + status = "okay"; +}; + +&tsadc { + rockchip,hw-tshut-mode = <0>; + rockchip,hw-tshut-polarity = <0>; + status = "okay"; +}; + +&uart2 { + status = "okay"; +};
Signature · 1 line
2.56.0
PATCH v3 3/4 arm64: dts: rockchip: add Forlinx OK3568-C
In reply to Dmitry YashinOK3568-C is the carrier board for FET3568-C System on Module.
OK3568-C features:
2x 1GbE Realtek RTL8211F Ethernet
1x HDMI Type A out
1x Edp and LVDS headers
2x USB Type C (2.0 and debug console)
1x USB 3.0 OTG Type A (2.0 part is multiplexed with Type C) 1x USB 3.0 M.2 M Key (4G/5G modem)
2x USB 2.0 Type A
1x PCIE 3.0 PCIe (2 lanes)
1x PCIE 2.1 PCIe (1 lane)
1x TF scard slot
1x MIPI CSI
1x MIPI DSI
2x CAN 2.0
1x RTC
1x earphone output and Speaker output, 1x mic. 50-pin expansion header
ADC keys
onboard WiFi And BT (AW-CM358SM)
Add support for Forlinx OK3568-C board.
--- arch/arm64/boot/dts/rockchip/Makefile | 1 + arch/arm64/boot/dts/rockchip/rk3568-ok3568-c.dts | 566 +++++++++++++++++++++++ 2 files changed, 567 insertions(+)
arch/arm64/boot/dts/rockchip/Makefile +1 -0
@@ -155,6 +155,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-ok3568-c.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-photonicat.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts233.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts233-pcb-12-11.dtbo
arch/arm64/boot/dts/rockchip/rk3568-ok3568-c.dts new file +566 -0
566 lines not on this page · raw message
Signature · 1 line
2.56.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Medium] arm64: dts: rockchip: conflicting GPIO polarity in vcc1v8_wifi_bt_reg_on - [Medium] arm64: dts…
Thank you for your contribution! Sashiko AI review found 2 potential issues to consider:
- [Medium] arm64: dts: rockchip: conflicting GPIO polarity in vcc1v8_wifi_bt_reg_on
- [Medium] arm64: dts: rockchip: missing assigned-clocks on gmac0/1 in rk3568-ok3568-c
--
commit b8a53fc702b227f666755566c4fdee7cf810512c
Author: Dmitry Yashin <[email protected]>
arm64: dts: rockchip: add Forlinx OK3568-C
This commit adds a devicetree for the Forlinx OK3568-C carrier board, which hosts the FET3568-C System on Module.
Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3568-ok3568-c.dts new file +0
-0@@ -0,0 +1,566 @@
[ ... ]
arch/arm64/boot/dts/rockchip/rk3568-ok3568-c.dts line 120
Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3568-ok3568-c.dts new file +12
-0+ vcc1v8_wifi_bt_reg_on: regulator-1v8-vcc-wifi-bt-reg-on { + compatible = "regulator-fixed"; + enable-active-high; + gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_reg_on>; + off-on-delay-us = <20000>; + regulator-name = "vcc1v8_wifi_bt_reg_on"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + startup-delay-us = <200>; + };
[Severity: Medium]
Does vcc1v8_wifi_bt_reg_on specify conflicting polarities with both enable-active-high and GPIO_ACTIVE_LOW?
For regulator-fixed nodes with enable-active-high, of_gpio_quirk_polarity() emits a runtime warning and strips OF_GPIO_ACTIVE_LOW. If the hardware enable signal is active-low, enable-active-high should be dropped so the regulator does not invert the polarity and keep the WiFi/BT module powered off; if it is active-high, gpios should use GPIO_ACTIVE_HIGH.
[ ... ]
Quoted 19 lines
+&gmac0 {
arch/arm64/boot/dts/rockchip/rk3568-ok3568-c.dts new file +18
-0+ clock_in_out = "output"; + phy-handle = <&rgmii_phy0>; + phy-mode = "rgmii-id"; + pinctrl-names = "default"; + pinctrl-0 = <&gmac0_miim + &gmac0_tx_bus2 + &gmac0_rx_bus2 + &gmac0_rgmii_clk + &gmac0_rgmii_bus + &gmac0_clkinout + ð0_pins>; + status = "okay"; +}; + +&gmac1 { + clock_in_out = "output"; + phy-handle = <&rgmii_phy1>; + phy-mode = "rgmii-id";
arch/arm64/boot/dts/rockchip/rk3568-ok3568-c.dts line 256
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3568-ok3568-c.dts new file +10
-0+ pinctrl-names = "default"; + pinctrl-0 = <&gmac1m1_miim + &gmac1m1_tx_bus2 + &gmac1m1_rx_bus2 + &gmac1m1_rgmii_clk + &gmac1m1_rgmii_bus + &gmac1m1_clkinout + ð1m1_pins>; + status = "okay"; +};
[Severity: Medium]
Should gmac0 and gmac1 configure assigned-clocks, assigned-clock-parents, and assigned-clock-rates for RGMII clock output?
On RK3568, rk_gmac_clk_init() does not program the GMAC clock muxes or the 125 MHz base rate in RGMII output mode, and SCLK_GMAC0/1_RGMII_SPEED lacks CLK_SET_RATE_PARENT so runtime link speed changes only switch dividers on SCLK_GMAC0/1_RX_TX. Without assigned-clocks in the devicetree to parent SCLK_GMAC0/1_RX_TX to SCLK_GMAC0/1_RGMII_SPEED and set SCLK_GMAC0/1 to 125 MHz (via CLK_MAC0/1_2TOP), RGMII clock generation depends on the bootloader having already configured both clock trees.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
PATCH v3 4/4 arm64: dts: rockchip: add FIT-PCIE-SATA overlay
In reply to Dmitry YashinFIT-PCIE-SATA V1.0 is an adapter that included with OK3568-C board and allows to connect SATA drives to the device.
Add overlay to use combphy2 in SATA mode.
--- arch/arm64/boot/dts/rockchip/Makefile | 5 +++++ .../boot/dts/rockchip/rk3568-ok3568-c-fit-pcie-sata.dtso | 16 ++++++++++++++++ 2 files changed, 21 insertions(+)
arch/arm64/boot/dts/rockchip/Makefile +5 -0
@@ -155,6 +155,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-ok3568-c-fit-pcie-sata.dtbo dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-ok3568-c.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-photonicat.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts233.dtb
@@ -275,6 +276,10 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-lion-haikou-haikou-video-demo.dtb rk3368-lion-haikou-haikou-video-demo-dtbs := rk3368-lion-haikou.dtb \ rk3368-lion-haikou-video-demo.dtbo +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-ok3568-c-fit-pcie-sata.dtb +rk3568-ok3568-c-fit-pcie-sata-dtbs := rk3568-ok3568-c.dtb \ + rk3568-ok3568-c-fit-pcie-sata.dtbo + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou-haikou-video-demo.dtb rk3399-puma-haikou-haikou-video-demo-dtbs := rk3399-puma-haikou.dtb \ rk3399-puma-haikou-video-demo.dtbo
arch/arm64/boot/dts/rockchip/rk3568-ok3568-c-fit-pcie-sata.dtso new file +16 -0
@@ -0,0 +1,16 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * FIT-PCIE-SATA V1.0 is an adapter that included with OK3568-C + * board and allows to connect SATA drives to the device. + */ + +/dts-v1/; +/plugin/; + +&pcie2x1 { + status = "disabled"; +}; + +&sata2 { + status = "okay"; +};
Signature · 1 line
2.56.0
Quoted 10 lines · Dmitry Yashin
This series add support for Forlinx OK3568-C board based on FET3568-C SoM (rk3568). Patches 1-3 add .dtsi for FET3568-C and .dts for OK3568-C. Patch 4 adds .dtso for FIT-PCIE-SATA adapter that allows to connect SATA drives to the board.
Note: tested on v1.1 board. On v1.2 RTL8211F phys use dedicated crystal oscillator instead of 25 MHz reference clock from SoC. Patch should be compatible with both revisions, as in [1] solution.
[...]
Applied, thanks!
[1/4] dt-bindings: arm: rockchip: add Forlinx FET3568-C
commit: 45935aaba59002a6e50b24ee229b94e7bae1f466
[2/4] arm64: dts: rockchip: add Forlinx FET3568-C
commit: a673ac719a827dbf813dbfefb277b13c85999c0b
[3/4] arm64: dts: rockchip: add Forlinx OK3568-C
commit: c5c520d606b87361d9833a06ac7929599d02816c
[4/4] arm64: dts: rockchip: add FIT-PCIE-SATA overlay
commit: a78448b92c2e03c77d33f87505fd3976385ae9d9Best regards,
Signature · 1 line
Heiko Stuebner <[email protected]>