Skip to contentSkip to conversation

ARM: dts: rockchip: Add Luckfox Lyra boards

PATCH In review Jonas Karlman 3 participants 17 messages Nov 22 – Nov 25

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v2 cover ARM: dts: rockchip: Add Luckfox Lyra boards

This series adds initial devicetree for Rockchip RK3506 SoC and initial support for Luckfox Lyra board family [1].

The Luckfox Lyra board family use different RK3506 SoC variants, i.e. Lyra and Lyra Plus both use RK3506G2 and Lyra Ultra and Lyra Zero W both use the RK3506B varaiant.

All board compatibles use rockchip,rk3506 in this revision of the series, maybe we should use rockchip,rk3506b for the RK3506B (and RK3506J) variants?

The pinctrl driver for RK3506 will not work as-is using the SoC DT from this series. The already merged driver depends on a rockchip,ioc1 phandle prop that never was described in dt-bindings. The SoC DT in this series instead uses rockchip,grf in GPIO controller node to reference correct IOC for GPIO0 and GPIO1. A patch to fix the pinctrl driver can be found at [2].

The branch at [3] also contains follow-up patches that e.g. fixes pinctrl driver and adds USB support.

Mainline U-Boot support can be tested using a branch at [4], it contains board support using same devicetree files extended with USB support.

Changes in v2:
- Add default pinctrl to fspi node
- Add display_subsystem, vop, dsi and dsi_dphy nodes
- Add osc_clk_out and ref_clk0_out to pinctrl
Link to v1: https://patch.msgid.link/[email protected]/

[1] https://wiki.luckfox.com/Luckfox-Lyra
[2] https://patch.msgid.link/[email protected]/
[3] https://github.com/Kwiboo/linux-rockchip/commits/next-20261116-rk3506
[4] https://git.u-boot-project.org/u-boot/contributors/kwiboo/u-boot/-/commits/rk3506

Jonas Karlman (8):
dt-bindings: soc: rockchip: grf: Add RK3506 compatibles
ARM: dts: rockchip: Add support for RK3506
dt-bindings: arm: rockchip: Add Luckfox Lyra and Lyra Plus
ARM: dts: rockchip: Add Luckfox Lyra and Lyra Plus boards
dt-bindings: arm: rockchip: Add Luckfox Lyra Ultra
ARM: dts: rockchip: Add Luckfox Lyra Ultra board
dt-bindings: arm: rockchip: Add Luckfox Lyra Zero W
ARM: dts: rockchip: Add Luckfox Lyra Zero W board

 .../devicetree/bindings/arm/rockchip.yaml     |   9 +
 .../devicetree/bindings/soc/rockchip/grf.yaml |   6 +
 arch/arm/boot/dts/rockchip/Makefile           |   6 +-
 .../dts/rockchip/rk3506-luckfox-lyra-plus.dts |  31 +
 .../boot/dts/rockchip/rk3506-luckfox-lyra.dts |   9 +
 .../dts/rockchip/rk3506-luckfox-lyra.dtsi     | 124 ++++
 .../arm/boot/dts/rockchip/rk3506-pinctrl.dtsi | 594 +++++++++++++++++
 arch/arm/boot/dts/rockchip/rk3506.dtsi        | 614 ++++++++++++++++++
 .../rockchip/rk3506b-luckfox-lyra-ultra.dts   |  31 +
 .../rockchip/rk3506b-luckfox-lyra-zero-w.dts  |  23 +
 .../dts/rockchip/rk3506b-luckfox-lyra.dtsi    | 100 +++
 11 files changed, 1546 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506-luckfox-lyra-plus.dts
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506-luckfox-lyra.dts
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506-luckfox-lyra.dtsi
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506-pinctrl.dtsi
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506.dtsi
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506b-luckfox-lyra-ultra.dts
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506b-luckfox-lyra-zero-w.dts
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506b-luckfox-lyra.dtsi

---
Based-on: <[email protected]>

Signature · 1 line
2.56.1
#1 lore raw

PATCH v2 1/8 dt-bindings: soc: rockchip: grf: Add RK3506 compatibles

Add the GRF and IOC compatible strings for the Rockchip RK3506 SoC.

Table 1-1 RK3506 Address Mapping in TRM for RK3506 contains following related entries:

Module Address Size
GRF 0xFF288000 16KB
GPIO2/3/4_IOC 0xFF4D8000 32KB
GPIO1_IOC 0xFF660000 64KB
GRF_CORE 0xFF840000 16KB
GRF_PMU/RMIO 0xFF910000 16KB
GPIO0_IOC 0xFF950000 64KB

---
Changes in v2:
- No change

---
 Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/soc/rockchip/grf.yaml +6 -0
index e94c83d7c138..3c1c3dc1b84d 100644
@@ -15,6 +15,9 @@ properties:
       - items:
           - enum:
               - rockchip,rk3288-sgrf
+              - rockchip,rk3506-ioc0
+              - rockchip,rk3506-ioc1
+              - rockchip,rk3506-ioc234
               - rockchip,rk3528-ioc-grf
               - rockchip,rk3528-pipe-phy-grf
               - rockchip,rk3528-vo-grf
@@ -93,6 +96,9 @@ properties:
               - rockchip,rk3368-pmugrf
               - rockchip,rk3399-grf
               - rockchip,rk3399-pmugrf
+              - rockchip,rk3506-core-grf
+              - rockchip,rk3506-grf
+              - rockchip,rk3506-pmu-grf
               - rockchip,rk3562-pmu-grf
               - rockchip,rk3568-grf
               - rockchip,rk3568-pmugrf
Signature · 1 line
2.56.1
Acked-by on v2 1/8
#2 lore raw

Re: [PATCH v2 1/8] dt-bindings: soc: rockchip: grf: Add RK3506 compatibles

Quoted 13 lines · Jonas Karlman

Add the GRF and IOC compatible strings for the Rockchip RK3506 SoC.

Table 1-1 RK3506 Address Mapping in TRM for RK3506 contains following related entries:

Module Address Size
GRF 0xFF288000 16KB
GPIO2/3/4_IOC 0xFF4D8000 32KB
GPIO1_IOC 0xFF660000 64KB
GRF_CORE 0xFF840000 16KB
GRF_PMU/RMIO 0xFF910000 16KB
GPIO0_IOC 0xFF950000 64KB

Quoted 2 lines

---

Best regards,
Krzysztof

Signature · 1 line
Krzysztof Kozlowski <[email protected]>
#3 lore raw

PATCH v2 2/8 ARM: dts: rockchip: Add support for RK3506

In reply to Jonas Karlman

Add the initial devicetree for Rockchip RK3506 SoC.

---
Changes in v2:
- Add default pinctrl to fspi node
- Add display_subsystem, vop, dsi and dsi_dphy nodes
- Add osc_clk_out and ref_clk0_out to pinctrl

---
 .../arm/boot/dts/rockchip/rk3506-pinctrl.dtsi | 594 +++++++++++++++++
 arch/arm/boot/dts/rockchip/rk3506.dtsi        | 614 ++++++++++++++++++
 2 files changed, 1208 insertions(+)
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506-pinctrl.dtsi
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506.dtsi
arch/arm/boot/dts/rockchip/rk3506-pinctrl.dtsi new file +594 -0
new file mode 100644
index 000000000000..72cebe2428f8
@@ -0,0 +1,594 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <arm64/rockchip/rockchip-pinconf.dtsi>
+
+&pinctrl {
+	aupll-clk {
+		/omit-if-no-ref/
+		aupll_clk_in: aupll-clk-in {
+			rockchip,pins =
+				/* aupll_clk_in */
+				<0 RK_PC4 2 &pcfg_pull_none>;
+		};
+	};
+
+	cpu {
+		/omit-if-no-ref/
+		cpu_avs: cpu-avs {
+			rockchip,pins =
+				/* cpu_avs */
+				<0 RK_PC5 1 &pcfg_pull_none>;
+		};
+	};
+
+	eth-clk0-25m {
+		/omit-if-no-ref/
+		eth_clk0_25m_out: eth-clk0-25m-out {
+			rockchip,pins =
+				/* eth_clk0_25m_out */
+				<0 RK_PC4 1 &pcfg_pull_none>;
+		};
+	};
+
+	eth-clk1-25m {
+		/omit-if-no-ref/
+		eth_clk1_25m_out: eth-clk1-25m-out {
+			rockchip,pins =
+				/* eth_clk1_25m_out */
+				<0 RK_PC3 1 &pcfg_pull_none>;
+		};
+	};
+
+	eth-rmii0 {
+		/omit-if-no-ref/
+		eth_rmii0_clk: eth-rmii0-clk {
+			rockchip,pins =
+				/* eth_rmii0_clk */
+				<2 RK_PB2 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		eth_rmii0_miim: eth-rmii0-miim {
+			rockchip,pins =
+				/* eth_rmii0_mdc */
+				<2 RK_PB6 1 &pcfg_pull_none>,
+				/* eth_rmii0_mdio */
+				<2 RK_PB7 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		eth_rmii0_rx_bus2: eth-rmii0-rx-bus2 {
+			rockchip,pins =
+				/* eth_rmii0_rxd0 */
+				<2 RK_PB0 1 &pcfg_pull_none>,
+				/* eth_rmii0_rxd1 */
+				<2 RK_PB1 1 &pcfg_pull_none>,
+				/* eth_rmii0_rxdvcrs */
+				<2 RK_PC0 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		eth_rmii0_tx_bus2: eth-rmii0-tx-bus2 {
+			rockchip,pins =
+				/* eth_rmii0_txd0 */
+				<2 RK_PB3 1 &pcfg_pull_none>,
+				/* eth_rmii0_txd1 */
+				<2 RK_PB4 1 &pcfg_pull_none>,
+				/* eth_rmii0_txen */
+				<2 RK_PB5 1 &pcfg_pull_none>;
+		};
+	};
+
+	eth-rmii1 {
+		/omit-if-no-ref/
+		eth_rmii1_clk: eth-rmii1-clk {
+			rockchip,pins =
+				/* eth_rmii1_clk */
+				<3 RK_PB0 2 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		eth_rmii1_miim: eth-rmii1-miim {
+			rockchip,pins =
+				/* eth_rmii1_mdc */
+				<3 RK_PB4 2 &pcfg_pull_none>,
+				/* eth_rmii1_mdio */
+				<3 RK_PB5 2 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		eth_rmii1_rx_bus2: eth-rmii1-rx-bus2 {
+			rockchip,pins =
+				/* eth_rmii1_rxd0 */
+				<3 RK_PA6 2 &pcfg_pull_none>,
+				/* eth_rmii1_rxd1 */
+				<3 RK_PA7 2 &pcfg_pull_none>,
+				/* eth_rmii1_rxdvcrs */
+				<3 RK_PB6 2 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		eth_rmii1_tx_bus2: eth-rmii1-tx-bus2 {
+			rockchip,pins =
+				/* eth_rmii1_txd0 */
+				<3 RK_PB1 2 &pcfg_pull_none>,
+				/* eth_rmii1_txd1 */
+				<3 RK_PB2 2 &pcfg_pull_none>,
+				/* eth_rmii1_txen */
+				<3 RK_PB3 2 &pcfg_pull_none>;
+		};
+	};
+
+	fspi {
+		/omit-if-no-ref/
+		fspi_bus4: fspi-bus4 {
+			rockchip,pins =
+				/* fspi_d0 */
+				<2 RK_PA2 1 &pcfg_pull_none>,
+				/* fspi_d1 */
+				<2 RK_PA3 1 &pcfg_pull_none>,
+				/* fspi_d2 */
+				<2 RK_PA4 1 &pcfg_pull_none>,
+				/* fspi_d3 */
+				<2 RK_PA5 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		fspi_clk: fspi-clk {
+			rockchip,pins =
+				/* fspi_clk */
+				<2 RK_PA1 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		fspi_csn: fspi-csn {
+			rockchip,pins =
+				/* fspi_csn */
+				<2 RK_PA0 1 &pcfg_pull_none>;
+		};
+	};
+
+	jtag {
+		/omit-if-no-ref/
+		jtagm0: jtagm0 {
+			rockchip,pins =
+				/* jtag_tck_m0 */
+				<3 RK_PA4 2 &pcfg_pull_none>,
+				/* jtag_tms_m0 */
+				<3 RK_PA5 2 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		jtagm1: jtagm1 {
+			rockchip,pins =
+				/* jtag_tck_m1 */
+				<0 RK_PC6 2 &pcfg_pull_none>,
+				/* jtag_tms_m1 */
+				<0 RK_PC7 2 &pcfg_pull_none>;
+		};
+	};
+
+	osc-clk {
+		/omit-if-no-ref/
+		osc_clk_out: osc-clk-out {
+			rockchip,pins =
+				/* osc_clk_out */
+				<0 RK_PD0 1 &pcfg_pull_none>;
+		};
+	};
+
+	ref-clk0 {
+		/omit-if-no-ref/
+		ref_clk0_out: ref-clk0-out {
+			rockchip,pins =
+				/* ref_clk0_out */
+				<0 RK_PD0 2 &pcfg_pull_none>;
+		};
+	};
+
+	ref-clk1 {
+		/omit-if-no-ref/
+		ref_clk1_out: ref-clk1-out {
+			rockchip,pins =
+				/* ref_clk1_out */
+				<0 RK_PC2 1 &pcfg_pull_none>;
+		};
+	};
+
+	sai0 {
+		/omit-if-no-ref/
+		sai0_lrck: sai0-lrck {
+			rockchip,pins =
+				/* sai0_lrck */
+				<0 RK_PA0 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai0_mclk: sai0-mclk {
+			rockchip,pins =
+				/* sai0_mclk */
+				<0 RK_PA2 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai0_sclk: sai0-sclk {
+			rockchip,pins =
+				/* sai0_sclk */
+				<0 RK_PA1 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai0_sdi0: sai0-sdi0 {
+			rockchip,pins =
+				/* sai0_sdi0 */
+				<0 RK_PA4 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai0_sdi1: sai0-sdi1 {
+			rockchip,pins =
+				/* sai0_sdi1 */
+				<0 RK_PA5 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai0_sdi2: sai0-sdi2 {
+			rockchip,pins =
+				/* sai0_sdi2 */
+				<0 RK_PA6 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai0_sdi3: sai0-sdi3 {
+			rockchip,pins =
+				/* sai0_sdi3 */
+				<0 RK_PA7 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai0_sdo: sai0-sdo {
+			rockchip,pins =
+				/* sai0_sdo */
+				<0 RK_PA3 1 &pcfg_pull_none>;
+		};
+	};
+
+	sai1 {
+		/omit-if-no-ref/
+		sai1_lrck: sai1-lrck {
+			rockchip,pins =
+				/* sai1_lrck */
+				<0 RK_PB2 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai1_mclk: sai1-mclk {
+			rockchip,pins =
+				/* sai1_mclk */
+				<0 RK_PB0 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai1_sclk: sai1-sclk {
+			rockchip,pins =
+				/* sai1_sclk */
+				<0 RK_PB1 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai1_sdi: sai1-sdi {
+			rockchip,pins =
+				/* sai1_sdi */
+				<0 RK_PB3 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai1_sdo0: sai1-sdo0 {
+			rockchip,pins =
+				/* sai1_sdo0 */
+				<0 RK_PB4 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai1_sdo1: sai1-sdo1 {
+			rockchip,pins =
+				/* sai1_sdo1 */
+				<0 RK_PB5 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai1_sdo2: sai1-sdo2 {
+			rockchip,pins =
+				/* sai1_sdo2 */
+				<0 RK_PB6 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai1_sdo3: sai1-sdo3 {
+			rockchip,pins =
+				/* sai1_sdo3 */
+				<0 RK_PB7 1 &pcfg_pull_none>;
+		};
+	};
+
+	sai2 {
+		/omit-if-no-ref/
+		sai2m0_lrck: sai2m0-lrck {
+			rockchip,pins =
+				/* sai2_lrck_m0 */
+				<3 RK_PB1 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai2m0_mclk: sai2m0-mclk {
+			rockchip,pins =
+				/* sai2_mclk_m0 */
+				<3 RK_PB6 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai2m0_sclk: sai2m0-sclk {
+			rockchip,pins =
+				/* sai2_sclk_m0 */
+				<3 RK_PA7 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai2m0_sdi: sai2m0-sdi {
+			rockchip,pins =
+				/* sai2m0_sdi */
+				<3 RK_PA6 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai2m0_sdo: sai2m0-sdo {
+			rockchip,pins =
+				/* sai2m0_sdo */
+				<3 RK_PB0 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai2m1_lrck: sai2m1-lrck {
+			rockchip,pins =
+				/* sai2_lrck_m1 */
+				<1 RK_PB3 6 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai2m1_mclk: sai2m1-mclk {
+			rockchip,pins =
+				/* sai2_mclk_m1 */
+				<1 RK_PC1 6 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai2m1_sclk: sai2m1-sclk {
+			rockchip,pins =
+				/* sai2_sclk_m1 */
+				<1 RK_PB2 6 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai2m1_sdi: sai2m1-sdi {
+			rockchip,pins =
+				/* sai2m1_sdi */
+				<1 RK_PC2 6 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai2m1_sdo: sai2m1-sdo {
+			rockchip,pins =
+				/* sai2m1_sdo */
+				<1 RK_PC3 6 &pcfg_pull_none>;
+		};
+	};
+
+	sai3 {
+		/omit-if-no-ref/
+		sai3_lrck: sai3-lrck {
+			rockchip,pins =
+				/* sai3_lrck */
+				<2 RK_PB5 3 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai3_mclk: sai3-mclk {
+			rockchip,pins =
+				/* sai3_mclk */
+				<2 RK_PC0 3 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai3_sclk: sai3-sclk {
+			rockchip,pins =
+				/* sai3_sclk */
+				<2 RK_PB4 3 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai3_sdi: sai3-sdi {
+			rockchip,pins =
+				/* sai3_sdi */
+				<2 RK_PB6 3 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sai3_sdo: sai3-sdo {
+			rockchip,pins =
+				/* sai3_sdo */
+				<2 RK_PB7 3 &pcfg_pull_none>;
+		};
+	};
+
+	sdmmc {
+		/omit-if-no-ref/
+		sdmmc_bus4: sdmmc-bus4 {
+			rockchip,pins =
+				/* sdmmc_d0 */
+				<3 RK_PA2 1 &pcfg_pull_up>,
+				/* sdmmc_d1 */
+				<3 RK_PA3 1 &pcfg_pull_up>,
+				/* sdmmc_d2 */
+				<3 RK_PA4 1 &pcfg_pull_up>,
+				/* sdmmc_d3 */
+				<3 RK_PA5 1 &pcfg_pull_up>;
+		};
+
+		/omit-if-no-ref/
+		sdmmc_clk: sdmmc-clk {
+			rockchip,pins =
+				/* sdmmc_clk */
+				<3 RK_PA0 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		sdmmc_cmd: sdmmc-cmd {
+			rockchip,pins =
+				/* sdmmc_cmd */
+				<3 RK_PA1 1 &pcfg_pull_up>;
+		};
+	};
+
+	spi0 {
+		/omit-if-no-ref/
+		spi0_clk: spi0-clk {
+			rockchip,pins =
+				/* spi0_clk */
+				<0 RK_PC0 2 &pcfg_pull_none_drv_level_3>,
+				/* spi0_miso */
+				<0 RK_PC2 2 &pcfg_pull_none_drv_level_3>,
+				/* spi0_mosi */
+				<0 RK_PC1 2 &pcfg_pull_none_drv_level_3>;
+		};
+
+		/omit-if-no-ref/
+		spi0_csn0: spi0-csn0 {
+			rockchip,pins =
+				/* spi0_csn0 */
+				<0 RK_PC3 2 &pcfg_pull_none_drv_level_3>;
+		};
+
+		/omit-if-no-ref/
+		spi0_csn1: spi0-csn1 {
+			rockchip,pins =
+				/* spi0_csn1 */
+				<0 RK_PB7 2 &pcfg_pull_none_drv_level_3>;
+		};
+	};
+
+	spi1 {
+		/omit-if-no-ref/
+		spi1_clk: spi1-clk {
+			rockchip,pins =
+				/* spi1_clk */
+				<0 RK_PB0 2 &pcfg_pull_none_drv_level_3>,
+				/* spi1_miso */
+				<0 RK_PB2 2 &pcfg_pull_none_drv_level_3>,
+				/* spi1_mosi */
+				<0 RK_PB1 2 &pcfg_pull_none_drv_level_3>;
+		};
+
+		/omit-if-no-ref/
+		spi1_csn0: spi1-csn0 {
+			rockchip,pins =
+				/* spi1_csn0 */
+				<0 RK_PB6 2 &pcfg_pull_none_drv_level_3>;
+		};
+
+		/omit-if-no-ref/
+		spi1_csn1: spi1-csn1 {
+			rockchip,pins =
+				/* spi1_csn1 */
+				<0 RK_PA7 2 &pcfg_pull_none_drv_level_3>;
+		};
+	};
+
+	spi2 {
+		/omit-if-no-ref/
+		spi2_clk: spi2-clk {
+			rockchip,pins =
+				/* spi2_clk */
+				<2 RK_PB0 2 &pcfg_pull_none>,
+				/* spi2_miso */
+				<2 RK_PB3 2 &pcfg_pull_none>,
+				/* spi2_mosi */
+				<2 RK_PB2 2 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		spi2_csn: spi2-csn {
+			rockchip,pins =
+				/* spi2_csn */
+				<2 RK_PB1 2 &pcfg_pull_none>;
+		};
+	};
+
+	test-clk {
+		/omit-if-no-ref/
+		test_clk_out: test-clk-out {
+			rockchip,pins =
+				/* test_clk_out */
+				<3 RK_PA3 2 &pcfg_pull_none>;
+		};
+	};
+
+	uart0 {
+		/omit-if-no-ref/
+		uart0_xfer: uart0-xfer {
+			rockchip,pins =
+				/* uart0_rx */
+				<0 RK_PC7 1 &pcfg_pull_up>,
+				/* uart0_tx */
+				<0 RK_PC6 1 &pcfg_pull_up>;
+		};
+	};
+
+	uart5 {
+		/omit-if-no-ref/
+		uart5m0_ctsn: uart5m0-ctsn {
+			rockchip,pins =
+				/* uart5m0_ctsn */
+				<3 RK_PB2 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		uart5m0_rtsn: uart5m0-rtsn {
+			rockchip,pins =
+				/* uart5m0_rtsn */
+				<3 RK_PB5 1 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		uart5m0_xfer: uart5m0-xfer {
+			rockchip,pins =
+				/* uart5_rx_m0 */
+				<3 RK_PB3 1 &pcfg_pull_up>,
+				/* uart5_tx_m0 */
+				<3 RK_PB4 1 &pcfg_pull_up>;
+		};
+
+		/omit-if-no-ref/
+		uart5m1_ctsn: uart5m1-ctsn {
+			rockchip,pins =
+				/* uart5m1_ctsn */
+				<1 RK_PB1 6 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		uart5m1_rtsn: uart5m1-rtsn {
+			rockchip,pins =
+				/* uart5m1_rtsn */
+				<1 RK_PD1 6 &pcfg_pull_none>;
+		};
+
+		/omit-if-no-ref/
+		uart5m1_xfer: uart5m1-xfer {
+			rockchip,pins =
+				/* uart5_rx_m1 */
+				<1 RK_PD3 6 &pcfg_pull_up>,
+				/* uart5_tx_m1 */
+				<1 RK_PD2 6 &pcfg_pull_up>;
+		};
+	};
+};
arch/arm/boot/dts/rockchip/rk3506.dtsi new file +614 -0

614 lines not on this page · raw message

Signature · 1 line
2.56.1
#4 lore raw

Re: [PATCH v2 2/8] ARM: dts: rockchip: Add support for RK3506

arch/arm/boot/dts/rockchip/rk3506.dtsi line 392

Quoted 13 lines
arch/arm/boot/dts/rockchip/rk3506.dtsi +11 -0
 
+		gmac0: ethernet@ff4c8000 {
+			compatible = "rockchip,rk3506-gmac", "snps,dwmac-4.20a";
+			reg = <0xff4c8000 0x2000>;
+			clocks = <&cru CLK_MAC0>, <&cru CLK_MAC0_PTP>,
+				 <&cru PCLK_MAC0>, <&cru ACLK_MAC0>;
+			clock-names = "stmmaceth", "ptp_ref",
+				      "pclk_mac", "aclk_mac";
+			interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "macirq", "eth_wake_irq";
+			phy-mode = "rmii";

Sorry, missed this on the first pass of the patchset.

phy-mode is generally a board/PCB property, not a SoC property. It would only be a SoC property when the SoC cannot do anything other than RMII. But given this is snps,dwmac, i expect it can do other phy modes.

Andrew

#5 lore raw

Re: [PATCH v2 2/8] ARM: dts: rockchip: Add support for RK3506

Hi Andrew,

Quoted 16 lines · Andrew Lunn

arch/arm/boot/dts/rockchip/rk3506.dtsi line 392

Quoted 13 lines
arch/arm/boot/dts/rockchip/rk3506.dtsi +11 -0
 
+		gmac0: ethernet@ff4c8000 {
+			compatible = "rockchip,rk3506-gmac", "snps,dwmac-4.20a";
+			reg = <0xff4c8000 0x2000>;
+			clocks = <&cru CLK_MAC0>, <&cru CLK_MAC0_PTP>,
+				 <&cru PCLK_MAC0>, <&cru ACLK_MAC0>;
+			clock-names = "stmmaceth", "ptp_ref",
+				      "pclk_mac", "aclk_mac";
+			interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "macirq", "eth_wake_irq";
+			phy-mode = "rmii";

Sorry, missed this on the first pass of the patchset.

Quoted 4 lines

phy-mode is generally a board/PCB property, not a SoC property. It would only be a SoC property when the SoC cannot do anything other than RMII. But given this is snps,dwmac, i expect it can do other phy modes.

This SoC only support RMII mode, so I put the phy-mode at SoC level.

Datasheet for this SoC lists following:

RMII 10/100 Ethernet Controller
- Support two Ethernet Controllers
- Supports 10/100-Mbps data transfer rates with the RMII interfaces
- Supports both full-duplex and half-duplex operation

The Technical Reference Manual also only mention RMII:

38.2 Block Diagram
...
The MAC only supports the PHY interfaces of reduced MII (RMII).
...
MAC Supports 10/100-Mbps data transfer rates with the RMII interfaces.

Regards,
Jonas

Quoted 2 lines

Andrew

Reviewed-by
#6 lore raw

Re: [PATCH v2 2/8] ARM: dts: rockchip: Add support for RK3506

Quoted 33 lines · Jonas Karlman

Hi Andrew,

Quoted 16 lines · Andrew Lunn

arch/arm/boot/dts/rockchip/rk3506.dtsi line 392

Quoted 13 lines
arch/arm/boot/dts/rockchip/rk3506.dtsi +11 -0
 
+		gmac0: ethernet@ff4c8000 {
+			compatible = "rockchip,rk3506-gmac", "snps,dwmac-4.20a";
+			reg = <0xff4c8000 0x2000>;
+			clocks = <&cru CLK_MAC0>, <&cru CLK_MAC0_PTP>,
+				 <&cru PCLK_MAC0>, <&cru ACLK_MAC0>;
+			clock-names = "stmmaceth", "ptp_ref",
+				      "pclk_mac", "aclk_mac";
+			interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "macirq", "eth_wake_irq";
+			phy-mode = "rmii";

Sorry, missed this on the first pass of the patchset.

Quoted 4 lines

phy-mode is generally a board/PCB property, not a SoC property. It would only be a SoC property when the SoC cannot do anything other than RMII. But given this is snps,dwmac, i expect it can do other phy modes.

This SoC only support RMII mode, so I put the phy-mode at SoC level.

Datasheet for this SoC lists following:

RMII 10/100 Ethernet Controller
- Support two Ethernet Controllers
- Supports 10/100-Mbps data transfer rates with the RMII interfaces
- Supports both full-duplex and half-duplex operation

Quoted 7 lines

The Technical Reference Manual also only mention RMII:

38.2 Block Diagram
...
The MAC only supports the PHY interfaces of reduced MII (RMII).
...
MAC Supports 10/100-Mbps data transfer rates with the RMII interfaces.

That is unusual, but O.K.

For the Ethernet node only:

Andrew

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

#7 lore raw

PATCH v2 3/8 dt-bindings: arm: rockchip: Add Luckfox Lyra and Lyra Plus

In reply to Jonas Karlman

Luckfox Lyra and Lyra Plus is powered by the Rockchip RK3506G2 SoC, which integrates three Cortex-A7 cores, one Cortex-M0 core, and 128 MB of DDR3 memory.

---
Changes in v2:
- No change

---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +7 -0
index a5eec2ecf23c..37321e23b087 100644
@@ -860,6 +860,13 @@ properties:
           - const: luckfox,core3576
           - const: rockchip,rk3576
 
+      - description: Luckfox Lyra boards
+        items:
+          - enum:
+              - luckfox,lyra
+              - luckfox,lyra-plus
+          - const: rockchip,rk3506
+
       - description: Lunzn FastRhino R66S / R68S
         items:
           - enum:
Signature · 1 line
2.56.1
Acked-by on v2 3/8
#8 lore raw

Re: [PATCH v2 3/8] dt-bindings: arm: rockchip: Add Luckfox Lyra and Lyra Plus

Quoted 6 lines · Jonas Karlman

Luckfox Lyra and Lyra Plus is powered by the Rockchip RK3506G2 SoC, which integrates three Cortex-A7 cores, one Cortex-M0 core, and 128 MB of DDR3 memory.

---

Best regards,
Krzysztof

Signature · 1 line
Krzysztof Kozlowski <[email protected]>
#9 lore raw

PATCH v2 4/8 ARM: dts: rockchip: Add Luckfox Lyra and Lyra Plus boards

In reply to Jonas Karlman

Luckfox Lyra and Lyra Plus is powered by the Rockchip RK3506G2 SoC, which integrates three Cortex-A7 cores, one Cortex-M0 core, and 128 MB of DDR3 memory.

---
Changes in v2:
- No change

---
 arch/arm/boot/dts/rockchip/Makefile           |   4 +-
 .../dts/rockchip/rk3506-luckfox-lyra-plus.dts |  31 +++++
 .../boot/dts/rockchip/rk3506-luckfox-lyra.dts |   9 ++
 .../dts/rockchip/rk3506-luckfox-lyra.dtsi     | 124 ++++++++++++++++++
 4 files changed, 167 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506-luckfox-lyra-plus.dts
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506-luckfox-lyra.dts
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506-luckfox-lyra.dtsi
arch/arm/boot/dts/rockchip/Makefile +3 -1
index e9f9e0ac3bfd..df620116bb2d 100644
@@ -45,4 +45,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
 	rk3288-veyron-pinky.dtb \
 	rk3288-veyron-speedy.dtb \
 	rk3288-veyron-tiger.dtb \
-	rk3288-vyasa.dtb
+	rk3288-vyasa.dtb \
+	rk3506-luckfox-lyra-plus.dtb \
+	rk3506-luckfox-lyra.dtb
arch/arm/boot/dts/rockchip/rk3506-luckfox-lyra-plus.dts new file +31 -0
new file mode 100644
index 000000000000..c8991f4179bd
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+#include "rk3506-luckfox-lyra.dtsi"
+
+/ {
+	model = "Luckfox Lyra Plus";
+	compatible = "luckfox,lyra-plus", "rockchip,rk3506";
+
+	aliases {
+		ethernet0 = &gmac1;
+	};
+};
+
+&gmac1 {
+	assigned-clocks = <&cru CLK_MAC1>;
+	assigned-clock-rates = <50000000>;
+	phy-handle = <&rmii_phy1>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&eth_rmii1_miim>, <&eth_rmii1_tx_bus2>,
+		    <&eth_rmii1_rx_bus2>, <&eth_rmii1_clk>;
+	clock_in_out = "output";
+	status = "okay";
+};
+
+&mdio1 {
+	rmii_phy1: ethernet-phy@1 {
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <1>;
+	};
+};
arch/arm/boot/dts/rockchip/rk3506-luckfox-lyra.dts new file +9 -0
new file mode 100644
index 000000000000..b7f11c7c510f
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+#include "rk3506-luckfox-lyra.dtsi"
+
+/ {
+	model = "Luckfox Lyra";
+	compatible = "luckfox,lyra", "rockchip,rk3506";
+};
arch/arm/boot/dts/rockchip/rk3506-luckfox-lyra.dtsi new file +124 -0

124 lines not on this page · raw message

Signature · 1 line
2.56.1
#10 lore raw

Re: [PATCH v2 4/8] ARM: dts: rockchip: Add Luckfox Lyra and Lyra Plus boards

Quoted 7 lines

+&gmac1 {

arch/arm/boot/dts/rockchip/rk3506-luckfox-lyra-plus.dts new file +6 -0
+	assigned-clocks = <&cru CLK_MAC1>;
+	assigned-clock-rates = <50000000>;
+	phy-handle = <&rmii_phy1>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&eth_rmii1_miim>, <&eth_rmii1_tx_bus2>,
+		    <&eth_rmii1_rx_bus2>, <&eth_rmii1_clk>;

arch/arm/boot/dts/rockchip/rk3506-luckfox-lyra-plus.dts line 31

Quoted 10 lines
arch/arm/boot/dts/rockchip/rk3506-luckfox-lyra-plus.dts new file +10 -0
+	clock_in_out = "output";
+	status = "okay";
+};
+
+&mdio1 {
+	rmii_phy1: ethernet-phy@1 {
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <1>;
+	};
+};

It is unusual to not have a phy-mode property.

What is the MAC capable of? Can it do RGMII? Does it default to rmii?

It is not required, but it would be nice to have a phy-mode.

Andrew

#11 lore raw

PATCH v2 5/8 dt-bindings: arm: rockchip: Add Luckfox Lyra Ultra

In reply to Jonas Karlman

Luckfox Lyra Ultra is powered by the Rockchip RK3506B SoC, which integrates three Cortex-A7 cores and one Cortex-M0 core. It includes 512 MB of DDR3 memory, 8 GB of eMMC storage, MIPI DSI, Ethernet, and IO expansion interfaces.

---
Changes in v2:
- No change

As mentioned in cover letter, unclear if this should use rockchip,rk3506b instead of rockchip,rk3506.

---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +1 -0
index 37321e23b087..651da02cfa51 100644
@@ -865,6 +865,7 @@ properties:
           - enum:
               - luckfox,lyra
               - luckfox,lyra-plus
+              - luckfox,lyra-ultra
           - const: rockchip,rk3506
 
       - description: Lunzn FastRhino R66S / R68S
Signature · 1 line
2.56.1
#12 lore raw

Re: [PATCH v2 5/8] dt-bindings: arm: rockchip: Add Luckfox Lyra Ultra

Quoted 9 lines · Jonas Karlman

Luckfox Lyra Ultra is powered by the Rockchip RK3506B SoC, which integrates three Cortex-A7 cores and one Cortex-M0 core. It includes 512 MB of DDR3 memory, 8 GB of eMMC storage, MIPI DSI, Ethernet, and IO expansion interfaces.

---
Changes in v2:
- No change

Same commit, what's the point to split such trivial changes?

Best regards,
Krzysztof

Signature · 1 line
Krzysztof Kozlowski <[email protected]>
#13 lore raw

PATCH v2 6/8 ARM: dts: rockchip: Add Luckfox Lyra Ultra board

In reply to Jonas Karlman

Luckfox Lyra Ultra is powered by the Rockchip RK3506B SoC, which integrates three Cortex-A7 cores and one Cortex-M0 core. It includes 512 MB of DDR3 memory, 8 GB of eMMC storage, MIPI DSI, Ethernet, and IO expansion interfaces.

---
Changes in v2:
- No change

As mentioned in cover letter, unclear if this should use rockchip,rk3506b instead of rockchip,rk3506.

---
 arch/arm/boot/dts/rockchip/Makefile           |   3 +-
 .../rockchip/rk3506b-luckfox-lyra-ultra.dts   |  31 ++++++
 .../dts/rockchip/rk3506b-luckfox-lyra.dtsi    | 100 ++++++++++++++++++
 3 files changed, 133 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506b-luckfox-lyra-ultra.dts
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506b-luckfox-lyra.dtsi
arch/arm/boot/dts/rockchip/Makefile +2 -1
index df620116bb2d..9a699bb8fc5a 100644
@@ -47,4 +47,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
 	rk3288-veyron-tiger.dtb \
 	rk3288-vyasa.dtb \
 	rk3506-luckfox-lyra-plus.dtb \
-	rk3506-luckfox-lyra.dtb
+	rk3506-luckfox-lyra.dtb \
+	rk3506b-luckfox-lyra-ultra.dtb
arch/arm/boot/dts/rockchip/rk3506b-luckfox-lyra-ultra.dts new file +31 -0
new file mode 100644
index 000000000000..5a3eb35eb70e
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+#include "rk3506b-luckfox-lyra.dtsi"
+
+/ {
+	model = "Luckfox Lyra Ultra";
+	compatible = "luckfox,lyra-ultra", "rockchip,rk3506";
+
+	aliases {
+		ethernet0 = &gmac1;
+	};
+};
+
+&gmac1 {
+	assigned-clocks = <&cru CLK_MAC1>;
+	assigned-clock-rates = <50000000>;
+	phy-handle = <&rmii_phy1>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&eth_rmii1_miim>, <&eth_rmii1_tx_bus2>,
+		    <&eth_rmii1_rx_bus2>, <&eth_rmii1_clk>;
+	clock_in_out = "output";
+	status = "okay";
+};
+
+&mdio1 {
+	rmii_phy1: ethernet-phy@1 {
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <1>;
+	};
+};
arch/arm/boot/dts/rockchip/rk3506b-luckfox-lyra.dtsi new file +100 -0

100 lines not on this page · raw message

Signature · 1 line
2.56.1
#14 lore raw

PATCH v2 7/8 dt-bindings: arm: rockchip: Add Luckfox Lyra Zero W

In reply to Jonas Karlman

Luckfox Lyra Zero W is a compact wireless development board powered by the Rockchip RK3506B SoC. It includes 512 MB of DDR3 memory, 256 MB of SPI NAND flash, 2.4 GHz Wi-Fi 6, Bluetooth 5.2, and BLE connectivity. MIPI DSI, USB OTG, USB Host, and RM_IO interfaces are available for peripheral expansion.

---
Changes in v2:
- No change

As mentioned in cover letter, unclear if this should use rockchip,rk3506b instead of rockchip,rk3506.

---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +1 -0
index 651da02cfa51..49c61ee985e7 100644
@@ -866,6 +866,7 @@ properties:
               - luckfox,lyra
               - luckfox,lyra-plus
               - luckfox,lyra-ultra
+              - luckfox,lyra-zero-w
           - const: rockchip,rk3506
 
       - description: Lunzn FastRhino R66S / R68S
Signature · 1 line
2.56.1
#15 lore raw

Re: [PATCH v2 7/8] dt-bindings: arm: rockchip: Add Luckfox Lyra Zero W

Quoted 8 lines · Jonas Karlman

Luckfox Lyra Zero W is a compact wireless development board powered by the Rockchip RK3506B SoC. It includes 512 MB of DDR3 memory, 256 MB of SPI NAND flash, 2.4 GHz Wi-Fi 6, Bluetooth 5.2, and BLE connectivity. MIPI DSI, USB OTG, USB Host, and RM_IO interfaces are available for peripheral expansion.

---

Same commit, squash.

Best regards,
Krzysztof

Signature · 1 line
Krzysztof Kozlowski <[email protected]>
#16 lore raw

PATCH v2 8/8 ARM: dts: rockchip: Add Luckfox Lyra Zero W board

In reply to Jonas Karlman

Luckfox Lyra Zero W is a compact wireless development board powered by the Rockchip RK3506B SoC. It includes 512 MB of DDR3 memory, 256 MB of SPI NAND flash, 2.4 GHz Wi-Fi 6, Bluetooth 5.2, and BLE connectivity. MIPI DSI, USB OTG, USB Host, and RM_IO interfaces are available for peripheral expansion.

---
Changes in v2:
- No change

As mentioned in cover letter, unclear if this should use rockchip,rk3506b instead of rockchip,rk3506.

---
 arch/arm/boot/dts/rockchip/Makefile           |  3 ++-
 .../rockchip/rk3506b-luckfox-lyra-zero-w.dts  | 23 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/rockchip/rk3506b-luckfox-lyra-zero-w.dts
arch/arm/boot/dts/rockchip/Makefile +2 -1
index 9a699bb8fc5a..faebeb20f467 100644
@@ -48,4 +48,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
 	rk3288-vyasa.dtb \
 	rk3506-luckfox-lyra-plus.dtb \
 	rk3506-luckfox-lyra.dtb \
-	rk3506b-luckfox-lyra-ultra.dtb
+	rk3506b-luckfox-lyra-ultra.dtb \
+	rk3506b-luckfox-lyra-zero-w.dtb
arch/arm/boot/dts/rockchip/rk3506b-luckfox-lyra-zero-w.dts new file +23 -0
new file mode 100644
index 000000000000..f2fa513e8bff
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+#include "rk3506b-luckfox-lyra.dtsi"
+
+/ {
+	model = "Luckfox Lyra Zero W";
+	compatible = "luckfox,lyra-zero-w", "rockchip,rk3506";
+};
+
+&fspi {
+	status = "okay";
+
+	flash@0 {
+		compatible = "spi-nand";
+		reg = <0>;
+		bootph-pre-ram;
+		bootph-some-ram;
+		spi-max-frequency = <80000000>;
+		spi-rx-bus-width = <4>;
+		spi-tx-bus-width = <1>;
+	};
+};
Signature · 1 line
2.56.1