Skip to contentSkip to conversation

spacemit: k1: Add support for Banana Pi BPI-CM6 IO board

PATCH Superseded Junhui Liu 3 participants 9 messages May 28 – May 29

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Junhui Liu

author
#0 lore raw

v2 cover spacemit: k1: Add support for Banana Pi BPI-CM6 IO board

This adds initial support for the Banana Pi BPI-CM6 IO board. The BPI-CM6 is an industrial-grade RISC-V compute module powered by the SpacemiT K1 SoC, featuring board-to-board connectors similar to the Raspberry Pi CM4 form factor. For evaluation and development, the module is paired with a companion IO carrier board.

During the board bring-up, GPIO45 and GPIO46 were found to be used by the BPI-CM6 hardware as Ethernet PHY reset GPIOs, while the common K1 GMAC pinctrl groups currently mux them as optional GMAC reference clock pins. Since the reference clock pins are not required on all K1 boards, the second patch separates them into independent pinctrl groups so board DTS files can select them only when the signal is actually wired.

This is based on the "dt-for-next" branch of the spacemit-com/linux.

---
Changes in v2:
- Keep gmac_clk_ref pinctrl groups referenced on existing boards where
the pins are routed to optional PHY refclk paths
- Remove duplicate vpcie3v3-supply property from pcie1 and pcie2 nodes
- Collect tags
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Junhui Liu (3):
dt-bindings: riscv: spacemit: Add Banana Pi BPI-CM6 compatible
riscv: dts: spacemit: k1: Split gmac_clk_ref into independent pinctrl groups
riscv: dts: spacemit: k1: Add Banana Pi BPI-CM6 IO board

 .../devicetree/bindings/riscv/spacemit.yaml        |   5 +
 arch/riscv/boot/dts/spacemit/Makefile              |   1 +
 .../riscv/boot/dts/spacemit/k1-bananapi-cm6-io.dts | 213 +++++++++++++++++++
 arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi  | 227 +++++++++++++++++++++
 arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts    |   4 +-
 arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts  |   4 +-
 arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts     |   2 +-
 arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts   |   4 +-
 arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi       |  24 ++-
 9 files changed, 473 insertions(+), 11 deletions(-)

---
base-commit: 85e4c5733cd7efa39f10d7200095c016ce4a2815
change-id: 20260522-bpi-cm6-dc38f91e3fec

Best regards,

Signature · 1 line
Junhui Liu <[email protected]>
author
#1 lore raw

PATCH v2 1/3 dt-bindings: riscv: spacemit: Add Banana Pi BPI-CM6 compatible

The Banana Pi BPI-CM6 IO board consists of the BPI-CM6 compute module plugged into an IO carrier board, which is used for evaluation and development.

The core CM6 module is based on the SpacemiT K1 SoC and provides PMIC, DDR, the eth0 PHY and wireless connectivity. The carrier board extends this by adding the eth1 PHY and external interfaces including Ethernet, PCIe M.2, USB, MicroSD, QSPI, and serial console connectivity.

---
 Documentation/devicetree/bindings/riscv/spacemit.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/riscv/spacemit.yaml +5 -0
index af8030242bdc..3e868383eb4a 100644
@@ -19,6 +19,11 @@ properties:
     const: '/'
   compatible:
     oneOf:
+      - items:
+          - enum:
+              - bananapi,bpi-cm6-io
+          - const: bananapi,bpi-cm6
+          - const: spacemit,k1
       - items:
           - enum:
               - bananapi,bpi-f3
Signature · 1 line
2.54.0
author
#2 lore raw

PATCH v2 2/3 riscv: dts: spacemit: k1: Split gmac_clk_ref into independent pinctrl groups

In reply to Junhui Liu

The gmac_clk_ref signal is optional for the GMAC controller and is not strictly required for all hardware designs. The pins for gmac0_clk_ref (GPIO 45) and gmac1_clk_ref (GPIO 46) may also be used as GPIOs for other functions even when the Ethernet controller is active.

Split the refclk pins into independent pinctrl groups so boards can request them only when the reference clock path is actually needed.

Among the already mainlined boards, BPI-F3, Jupiter and MusePi Pro have optional hardware paths for the GMAC refclk pins. BPI-F3 and Jupiter route both GMAC refclk pins to the PHYs through NC/0R option resistors, while MusePi Pro only does so for GMAC0. Keep referencing the new clk-ref pinctrl groups on these boards so the optional hardware paths remain usable if the option resistors are populated.

OrangePi R2S has no publicly available schematic, so also keep the clk-ref groups there to preserve the previous pinmux behavior.

Fixes 60775f28cfb7 ("riscv: dts: spacemit: Add Ethernet support for K1")
---
 arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts   |  4 ++--
 arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts |  4 ++--
 arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts    |  2 +-
 arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts  |  4 ++--
 arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi      | 24 +++++++++++++++++++----
 5 files changed, 27 insertions(+), 11 deletions(-)
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts +2 -2
index 72f77e9edd63..e6ab43be301a 100644
@@ -101,7 +101,7 @@ &eth0 {
 	phy-handle = <&rgmii0>;
 	phy-mode = "rgmii-id";
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac0_cfg>;
+	pinctrl-0 = <&gmac0_cfg>, <&gmac0_clk_ref_cfg>;
 	rx-internal-delay-ps = <0>;
 	tx-internal-delay-ps = <0>;
 	status = "okay";
@@ -124,7 +124,7 @@ &eth1 {
 	phy-handle = <&rgmii1>;
 	phy-mode = "rgmii-id";
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac1_cfg>;
+	pinctrl-0 = <&gmac1_cfg>, <&gmac1_clk_ref_cfg>;
 	rx-internal-delay-ps = <0>;
 	tx-internal-delay-ps = <250>;
 	status = "okay";
arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts +2 -2
index 2fc8d6533786..b61f5995ec77 100644
@@ -121,7 +121,7 @@ &eth0 {
 	phy-handle = <&rgmii0>;
 	phy-mode = "rgmii-id";
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac0_cfg>;
+	pinctrl-0 = <&gmac0_cfg>, <&gmac0_clk_ref_cfg>;
 	rx-internal-delay-ps = <0>;
 	tx-internal-delay-ps = <0>;
 	status = "okay";
@@ -144,7 +144,7 @@ &eth1 {
 	phy-handle = <&rgmii1>;
 	phy-mode = "rgmii-id";
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac1_cfg>;
+	pinctrl-0 = <&gmac1_cfg>, <&gmac1_clk_ref_cfg>;
 	rx-internal-delay-ps = <0>;
 	tx-internal-delay-ps = <250>;
 	status = "okay";
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts +1 -1
index 0d809e4ad3b1..3078ffb5cb87 100644
@@ -102,7 +102,7 @@ &combo_phy {
 &eth0 {
 	phy-handle = <&rgmii0>;
 	phy-mode = "rgmii-id";
-	pinctrl-0 = <&gmac0_cfg>;
+	pinctrl-0 = <&gmac0_cfg>, <&gmac0_clk_ref_cfg>;
 	pinctrl-names = "default";
 	rx-internal-delay-ps = <0>;
 	tx-internal-delay-ps = <0>;
arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts +2 -2
index 1ecc40749e5a..018072722d55 100644
@@ -50,7 +50,7 @@ &eth0 {
 	phy-handle = <&rgmii0>;
 	phy-mode = "rgmii-id";
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac0_cfg>;
+	pinctrl-0 = <&gmac0_cfg>, <&gmac0_clk_ref_cfg>;
 	rx-internal-delay-ps = <0>;
 	tx-internal-delay-ps = <0>;
 	status = "okay";
@@ -74,7 +74,7 @@ &eth1 {
 	phy-handle = <&rgmii1>;
 	phy-mode = "rgmii-id";
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac1_cfg>;
+	pinctrl-0 = <&gmac1_cfg>, <&gmac1_clk_ref_cfg>;
 	rx-internal-delay-ps = <0>;
 	tx-internal-delay-ps = <250>;
 	status = "okay";
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi +20 -4
index 4e9a62d0e85b..8c57ca05dabd 100644
@@ -27,8 +27,16 @@ gmac0-pins {
 				 <K1_PADCONF(11, 1)>,	/* gmac0_tx_en */
 				 <K1_PADCONF(12, 1)>,	/* gmac0_mdc */
 				 <K1_PADCONF(13, 1)>,	/* gmac0_mdio */
-				 <K1_PADCONF(14, 1)>,	/* gmac0_int_n */
-				 <K1_PADCONF(45, 1)>;	/* gmac0_clk_ref */
+				 <K1_PADCONF(14, 1)>;	/* gmac0_int_n */
+
+			bias-pull-up = <0>;
+			drive-strength = <21>;
+		};
+	};
+
+	gmac0_clk_ref_cfg: gmac0-clk-ref-cfg {
+		gmac0-clk-ref-pins {
+			pinmux = <K1_PADCONF(45, 1)>;	/* gmac0_clk_ref */
 
 			bias-pull-up = <0>;
 			drive-strength = <21>;
@@ -51,8 +59,16 @@ gmac1-pins {
 				 <K1_PADCONF(40, 1)>,	/* gmac1_tx_en */
 				 <K1_PADCONF(41, 1)>,	/* gmac1_mdc */
 				 <K1_PADCONF(42, 1)>,	/* gmac1_mdio */
-				 <K1_PADCONF(43, 1)>,	/* gmac1_int_n */
-				 <K1_PADCONF(46, 1)>;	/* gmac1_clk_ref */
+				 <K1_PADCONF(43, 1)>;	/* gmac1_int_n */
+
+			bias-pull-up = <0>;
+			drive-strength = <21>;
+		};
+	};
+
+	gmac1_clk_ref_cfg: gmac1-clk-ref-cfg {
+		gmac1-clk-ref-pins {
+			pinmux = <K1_PADCONF(46, 1)>;	/* gmac1_clk_ref */
 
 			bias-pull-up = <0>;
 			drive-strength = <21>;
Signature · 1 line
2.54.0
#3 lore raw

Re: [PATCH v2 2/3] riscv: dts: spacemit: k1: Split gmac_clk_ref into independent pinctrl groups

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] The patch separates `gmac_clk_ref` pins into independent pinctrl groups but fails to update the…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The patch separates gmac_clk_ref pins into independent pinctrl groups but fails to update the OrangePi RV2 board device tree (k1-orangepi-rv2.dts), silently dropping its Ethernet reference clock pinmux configuration. --

commit 4736202eaeb8dff5f83c1f6977e4a98ac6644bcc
Author: Junhui Liu <[email protected]>

riscv: dts: spacemit: k1: Split gmac_clk_ref into independent pinctrl groups

The gmac_clk_ref signal is optional for the GMAC controller and is not strictly required for all hardware designs. The pins for gmac0_clk_ref (GPIO 45) and gmac1_clk_ref (GPIO 46) may also be used as GPIOs for other functions even when the Ethernet controller is active.

Quoted 16 lines
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi +6 -2
index b13dcb10f4d66..39682e8b4ed91 100644
@@ -27,8 +27,16 @@ gmac0-pins {
 				 <K1_PADCONF(11, 1)>,	/* gmac0_tx_en */
 				 <K1_PADCONF(12, 1)>,	/* gmac0_mdc */
 				 <K1_PADCONF(13, 1)>,	/* gmac0_mdio */
-				 <K1_PADCONF(14, 1)>,	/* gmac0_int_n */
-				 <K1_PADCONF(45, 1)>;	/* gmac0_clk_ref */
+				 <K1_PADCONF(14, 1)>;	/* gmac0_int_n */
+
+			bias-pull-up = <0>;
+			drive-strength = <21>;
+		};
+	};

[ ... ]

arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi gmac1-pins { · line 67

Quoted 12 lines
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi +6 -2
@@ -51,8 +59,16 @@ gmac1-pins {
 				 <K1_PADCONF(40, 1)>,	/* gmac1_tx_en */
 				 <K1_PADCONF(41, 1)>,	/* gmac1_mdc */
 				 <K1_PADCONF(42, 1)>,	/* gmac1_mdio */
-				 <K1_PADCONF(43, 1)>,	/* gmac1_int_n */
-				 <K1_PADCONF(46, 1)>;	/* gmac1_clk_ref */
+				 <K1_PADCONF(43, 1)>;	/* gmac1_int_n */
+
+			bias-pull-up = <0>;
+			drive-strength = <21>;
+		};
+	};

[Severity: High]
Does this change silently drop the Ethernet reference clock pinmux configuration for the OrangePi RV2 board?

The k1-orangepi-rv2.dts board file still relies on &gmac0_cfg and &gmac1_cfg but wasn't updated in this patch to include the new &gmac0_clk_ref_cfg and &gmac1_clk_ref_cfg groups. Without this update, OrangePi RV2 will lose the pinmux configurations for GPIO 45 and 46, which may cause network failure.

The commit message mentions an intent to preserve the previous pinmux behavior for boards without public schematics. It seems the omission of OrangePi RV2 breaks this contract. A search forward in the patch series confirms this issue is not resolved by a later commit.

Could k1-orangepi-rv2.dts be updated to include the new pinmux groups to preserve its original configuration?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
#4 lore raw

Re: [PATCH v2 2/3] riscv: dts: spacemit: k1: Split gmac_clk_ref into independent pinctrl groups

In reply to Junhui Liu
Quoted 26 lines · Junhui Liu

The gmac_clk_ref signal is optional for the GMAC controller and is not strictly required for all hardware designs. The pins for gmac0_clk_ref (GPIO 45) and gmac1_clk_ref (GPIO 46) may also be used as GPIOs for other functions even when the Ethernet controller is active.

Split the refclk pins into independent pinctrl groups so boards can request them only when the reference clock path is actually needed.

Among the already mainlined boards, BPI-F3, Jupiter and MusePi Pro have optional hardware paths for the GMAC refclk pins. BPI-F3 and Jupiter route both GMAC refclk pins to the PHYs through NC/0R option resistors, while MusePi Pro only does so for GMAC0. Keep referencing the new clk-ref pinctrl groups on these boards so the optional hardware paths remain usable if the option resistors are populated.

OrangePi R2S has no publicly available schematic, so also keep the clk-ref groups there to preserve the previous pinmux behavior.

Fixes 60775f28cfb7 ("riscv: dts: spacemit: Add Ethernet support for K1")
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi +0 -0
index 4e9a62d0e85b..8c57ca05dabd 100644

arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi gmac0-pins { · line 31

Quoted 5 lines
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi +0 -2
@@ -27,8 +27,16 @@ gmac0-pins {
 				 <K1_PADCONF(11, 1)>,	/* gmac0_tx_en */
 				 <K1_PADCONF(12, 1)>,	/* gmac0_mdc */
 				 <K1_PADCONF(13, 1)>,	/* gmac0_mdio */
-				 <K1_PADCONF(14, 1)>,	/* gmac0_int_n */
-				 <K1_PADCONF(45, 1)>;	/* gmac0_clk_ref */

The point sashiko made here seems valid, odd that these aren't added to another group.

Quoted 36 lines
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi +20 -2
+				 <K1_PADCONF(14, 1)>;	/* gmac0_int_n */
+
+			bias-pull-up = <0>;
+			drive-strength = <21>;
+		};
+	};
+
+	gmac0_clk_ref_cfg: gmac0-clk-ref-cfg {
+		gmac0-clk-ref-pins {
+			pinmux = <K1_PADCONF(45, 1)>;	/* gmac0_clk_ref */
 
 			bias-pull-up = <0>;
 			drive-strength = <21>;
@@ -51,8 +59,16 @@ gmac1-pins {
 				 <K1_PADCONF(40, 1)>,	/* gmac1_tx_en */
 				 <K1_PADCONF(41, 1)>,	/* gmac1_mdc */
 				 <K1_PADCONF(42, 1)>,	/* gmac1_mdio */
-				 <K1_PADCONF(43, 1)>,	/* gmac1_int_n */
-				 <K1_PADCONF(46, 1)>;	/* gmac1_clk_ref */
+				 <K1_PADCONF(43, 1)>;	/* gmac1_int_n */
+
+			bias-pull-up = <0>;
+			drive-strength = <21>;
+		};
+	};
+
+	gmac1_clk_ref_cfg: gmac1-clk-ref-cfg {
+		gmac1-clk-ref-pins {
+			pinmux = <K1_PADCONF(46, 1)>;	/* gmac1_clk_ref */
 
 			bias-pull-up = <0>;
 			drive-strength = <21>;
Signature · 2 lines
-- 
2.54.0
author
#5 lore raw

Re: [PATCH v2 2/3] riscv: dts: spacemit: k1: Split gmac_clk_ref into independent pinctrl groups

Hi Conor,

Quoted 22 lines · Conor Dooley
Quoted 20 lines · Junhui Liu

The gmac_clk_ref signal is optional for the GMAC controller and is not strictly required for all hardware designs. The pins for gmac0_clk_ref (GPIO 45) and gmac1_clk_ref (GPIO 46) may also be used as GPIOs for other functions even when the Ethernet controller is active.

Split the refclk pins into independent pinctrl groups so boards can request them only when the reference clock path is actually needed.

Among the already mainlined boards, BPI-F3, Jupiter and MusePi Pro have optional hardware paths for the GMAC refclk pins. BPI-F3 and Jupiter route both GMAC refclk pins to the PHYs through NC/0R option resistors, while MusePi Pro only does so for GMAC0. Keep referencing the new clk-ref pinctrl groups on these boards so the optional hardware paths remain usable if the option resistors are populated.

OrangePi R2S has no publicly available schematic, so also keep the clk-ref groups there to preserve the previous pinmux behavior.

Fixes 60775f28cfb7 ("riscv: dts: spacemit: Add Ethernet support for K1")
Quoted 13 lines

arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi gmac0-pins { · line 31

Quoted 10 lines
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi +0 -2
index 4e9a62d0e85b..8c57ca05dabd 100644
@@ -27,8 +27,16 @@ gmac0-pins {
 				 <K1_PADCONF(11, 1)>,	/* gmac0_tx_en */
 				 <K1_PADCONF(12, 1)>,	/* gmac0_mdc */
 				 <K1_PADCONF(13, 1)>,	/* gmac0_mdio */
-				 <K1_PADCONF(14, 1)>,	/* gmac0_int_n */
-				 <K1_PADCONF(45, 1)>;	/* gmac0_clk_ref */

The point sashiko made here seems valid, odd that these aren't added to another group.

Do you mean Sashiko's point about not adding these groups to the OrangePi RV2 board? That is because GPIO45 and GPIO46 are used as TP_RST_1V8 and TP_INT_1V8 respectively on the OrangePi RV2. These are the reset and interrupt signals for the touch panel, and are not connected to the optional GMAC PHY refclk path. So with this patch, GPIO45/46 can be properly used by the touch panel without pinmux conflicts once display/tp support is added in the future.

I have added the new gmac_clk_ref groups to all boards where I found these signals may actually be used.

Best regards,
Junhui Liu

Quoted 37 lines
Quoted 37 lines
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi +20 -2
+				 <K1_PADCONF(14, 1)>;	/* gmac0_int_n */
+
+			bias-pull-up = <0>;
+			drive-strength = <21>;
+		};
+	};
+
+	gmac0_clk_ref_cfg: gmac0-clk-ref-cfg {
+		gmac0-clk-ref-pins {
+			pinmux = <K1_PADCONF(45, 1)>;	/* gmac0_clk_ref */
 
 			bias-pull-up = <0>;
 			drive-strength = <21>;
@@ -51,8 +59,16 @@ gmac1-pins {
 				 <K1_PADCONF(40, 1)>,	/* gmac1_tx_en */
 				 <K1_PADCONF(41, 1)>,	/* gmac1_mdc */
 				 <K1_PADCONF(42, 1)>,	/* gmac1_mdio */
-				 <K1_PADCONF(43, 1)>,	/* gmac1_int_n */
-				 <K1_PADCONF(46, 1)>;	/* gmac1_clk_ref */
+				 <K1_PADCONF(43, 1)>;	/* gmac1_int_n */
+
+			bias-pull-up = <0>;
+			drive-strength = <21>;
+		};
+	};
+
+	gmac1_clk_ref_cfg: gmac1-clk-ref-cfg {
+		gmac1-clk-ref-pins {
+			pinmux = <K1_PADCONF(46, 1)>;	/* gmac1_clk_ref */
 
 			bias-pull-up = <0>;
 			drive-strength = <21>;
Signature · 2 lines
-- 
2.54.0
#6 lore raw

Re: [PATCH v2 2/3] riscv: dts: spacemit: k1: Split gmac_clk_ref into independent pinctrl groups

Quoted 39 lines · Junhui Liu

Hi Conor,

Quoted 22 lines · Conor Dooley
Quoted 20 lines · Junhui Liu

The gmac_clk_ref signal is optional for the GMAC controller and is not strictly required for all hardware designs. The pins for gmac0_clk_ref (GPIO 45) and gmac1_clk_ref (GPIO 46) may also be used as GPIOs for other functions even when the Ethernet controller is active.

Split the refclk pins into independent pinctrl groups so boards can request them only when the reference clock path is actually needed.

Among the already mainlined boards, BPI-F3, Jupiter and MusePi Pro have optional hardware paths for the GMAC refclk pins. BPI-F3 and Jupiter route both GMAC refclk pins to the PHYs through NC/0R option resistors, while MusePi Pro only does so for GMAC0. Keep referencing the new clk-ref pinctrl groups on these boards so the optional hardware paths remain usable if the option resistors are populated.

OrangePi R2S has no publicly available schematic, so also keep the clk-ref groups there to preserve the previous pinmux behavior.

Fixes 60775f28cfb7 ("riscv: dts: spacemit: Add Ethernet support for K1")
Quoted 13 lines

arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi gmac0-pins { · line 31

Quoted 10 lines
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi +0 -2
index 4e9a62d0e85b..8c57ca05dabd 100644
@@ -27,8 +27,16 @@ gmac0-pins {
 				 <K1_PADCONF(11, 1)>,	/* gmac0_tx_en */
 				 <K1_PADCONF(12, 1)>,	/* gmac0_mdc */
 				 <K1_PADCONF(13, 1)>,	/* gmac0_mdio */
-				 <K1_PADCONF(14, 1)>,	/* gmac0_int_n */
-				 <K1_PADCONF(45, 1)>;	/* gmac0_clk_ref */

The point sashiko made here seems valid, odd that these aren't added to another group.

Quoted 7 lines

Do you mean Sashiko's point about not adding these groups to the OrangePi RV2 board? That is because GPIO45 and GPIO46 are used as TP_RST_1V8 and TP_INT_1V8 respectively on the OrangePi RV2. These are the reset and interrupt signals for the touch panel, and are not connected to the optional GMAC PHY refclk path. So with this patch, GPIO45/46 can be properly used by the touch panel without pinmux conflicts once display/tp support is added in the future.

Okay, that sounds fair enough!

author
#7 lore raw

PATCH v2 3/3 riscv: dts: spacemit: k1: Add Banana Pi BPI-CM6 IO board

In reply to Junhui Liu

The Banana Pi BPI-CM6 IO board combines the BPI-CM6 compute module with an IO carrier board. The core module integrates the SpacemiT K1 SoC, PMIC, DDR, eMMC, the eth0 PHY, and wireless connectivity. The companion IO carrier board extends it by providing the eth1 PHY and exposing standard interfaces, including dual Gigabit Ethernet, MicroSD, two USB-A ports, a USB Type-C port, two PCIe M.2 slots, and a serial console.

The board also has two I2C EEPROMs. One is on the core module, which stores factory manufacturing data and is marked read-only. The other is on the carrier board, which is shipped unprogrammed and left writable for evaluation purposes.

Add initial support for UART console, eMMC, SD card, I2C, EEPROMs, PCIe, USB, and dual Ethernet interfaces.

---
 arch/riscv/boot/dts/spacemit/Makefile              |   1 +
 .../riscv/boot/dts/spacemit/k1-bananapi-cm6-io.dts | 213 +++++++++++++++++++
 arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi  | 227 +++++++++++++++++++++
 3 files changed, 441 insertions(+)
arch/riscv/boot/dts/spacemit/Makefile +1 -0
index acb993c452ba..dd6125dc2012 100644
@@ -1,4 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
+dtb-$(CONFIG_ARCH_SPACEMIT) += k1-bananapi-cm6-io.dtb
 dtb-$(CONFIG_ARCH_SPACEMIT) += k1-bananapi-f3.dtb
 dtb-$(CONFIG_ARCH_SPACEMIT) += k1-milkv-jupiter.dtb
 dtb-$(CONFIG_ARCH_SPACEMIT) += k1-musepi-pro.dtb
arch/riscv/boot/dts/spacemit/k1-bananapi-cm6-io.dts new file +213 -0

213 lines not on this page · raw message

arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi new file +227 -0

227 lines not on this page · raw message

Signature · 1 line
2.54.0
#8 lore raw

Re: [PATCH v2 3/3] riscv: dts: spacemit: k1: Add Banana Pi BPI-CM6 IO board

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The `&sdhci0` node references `&mmc1_cfg` and `&mmc1_uhs_cfg` via `pinctrl-0` and `pinctrl-1`, but…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The &sdhci0 node references &mmc1_cfg and &mmc1_uhs_cfg via pinctrl-0 and pinctrl-1, but these nodes are not defined anywhere in the included DTSI files or the patch itself. --

commit c74b8c1d21d14e7c0a04fc8690e5deac751ac08a
Author: Junhui Liu <[email protected]>

riscv: dts: spacemit: k1: Add Banana Pi BPI-CM6 IO board

This commit adds initial support for the Banana Pi BPI-CM6 IO board, which combines the BPI-CM6 compute module with an IO carrier board. It introduces the necessary device tree nodes to enable peripherals like UART, eMMC, SD card, I2C, PCIe, USB, and dual Ethernet interfaces.

Quoted 5 lines
arch/riscv/boot/dts/spacemit/k1-bananapi-cm6-io.dts new file +0 -0
new file mode 100644
index 0000000000000..137b7ef3fc7b4

[ ... ]

arch/riscv/boot/dts/spacemit/k1-bananapi-cm6-io.dts line 180

Quoted 4 lines

+&sdhci0 {

arch/riscv/boot/dts/spacemit/k1-bananapi-cm6-io.dts new file +3 -0
+	pinctrl-names = "default", "uhs";
+	pinctrl-0 = <&mmc1_cfg>;
+	pinctrl-1 = <&mmc1_uhs_cfg>;

[Severity: Low]
Will this cause a device tree compilation failure?

It appears that mmc1_cfg and mmc1_uhs_cfg are not defined in the included dtsi files or in this patch. Could this result in an unresolved phandle error when building the device tree?

Quoted 2 lines
arch/riscv/boot/dts/spacemit/k1-bananapi-cm6-io.dts new file +2 -0
+	bus-width = <4>;
+	cd-gpios = <&gpio K1_GPIO(80) (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3