Skip to contentSkip to conversation

arm64: dts: rockchip: Add BigTreeTech CB2 and Pi2

PATCH Superseded Ivan Sergeev 2 participants 4 messages Jan 5, 2025

Subsystems (2)

v5 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v5 cover arm64: dts: rockchip: Add BigTreeTech CB2 and Pi2

BigTreeTech CB2 and Pi2 are Rockchip RK3566 SoM and SBC boards made by BigTreeTech for the intent of using as a 3d printer control board. It is a successor to the Allwinner H616-based BigTreeTech CB1 and Pi, so the device trees for CB2 and Pi2 are also done in the same manner: the common nodes and properties are put into a dtsi file that the board-specific device trees include.

Changes in v5:
- Applied requested changes
- Fixed usb phy-supply format
- Removed improperly named pinctrl nodes that were unused.
- Fixed names of other pinctrl nodes
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes in v4:
- Removed invalid i2c,ignore-nak properties
- Set #address-cells and size-cells on sdmmc1
- Fixed phy-supply properties of usb host nodes
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Proper formatting and patch series sending (using b4)
- Converted spaces to tab indentation in the dtsi file
- Fixed empty line where the license identifier should be
- Link to v2 1/2: https://lore.kernel.org/linux-rockchip/[email protected]/
- Link to v2 2/2: https://lore.kernel.org/linux-rockchip/[email protected]/

Changes in v2:
- Added bigtreetech cb2 and pi2 boards to the list of platforms
- Split BigTreeTech CB2 and Pi2 into two device trees using common dtsi
- Link to v1: https://lore.kernel.org/linux-rockchip/[email protected]/

---
Ivan Sergeev (2):
dt-bindings: arm: rockchip: Add BigTreeTech CB2 and Pi2
arm64: dts: rockchip: Add BigTreeTech CB2 and Pi2

 .../devicetree/bindings/arm/rockchip.yaml          |  11 +
 arch/arm64/boot/dts/rockchip/Makefile              |   2 +
 .../dts/rockchip/rk3566-bigtreetech-cb2-manta.dts  |  10 +
 .../boot/dts/rockchip/rk3566-bigtreetech-cb2.dtsi  | 919 +++++++++++++++++++++
 .../boot/dts/rockchip/rk3566-bigtreetech-pi2.dts   |  10 +
 5 files changed, 952 insertions(+)

---
base-commit: 63676eefb7a026d04b51dcb7aaf54f358517a2ec
change-id: 20241224-bigtreetech-cb2-18944b349916

Best regards,

Signature · 1 line
Ivan Sergeev <[email protected]>
#1 lore raw

PATCH v5 1/2 dt-bindings: arm: rockchip: Add BigTreeTech CB2 and Pi2

BigTreeTech CB2 and Pi2 are Rockchip RK3566 based boards

---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 11 +++++++++++
 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +11 -0
index 753199a12923fadaa48c407a8e55e7854db7203e..349453b1676bfac45abf5cd49d6bd9f847281213 100644
@@ -81,6 +81,17 @@ properties:
           - const: azw,beelink-a1
           - const: rockchip,rk3328
 
+      - description: BigTreeTech CB2 Manta M4/8P
+        items:
+          - const: bigtreetech,cb2-manta
+          - const: bigtreetech,cb2
+          - const: rockchip,rk3566
+
+      - description: BigTreeTech Pi 2
+        items:
+          - const: bigtreetech,pi2
+          - const: rockchip,rk3566
+
       - description: bq Curie 2 tablet
         items:
           - const: mundoreader,bq-curie2
Signature · 1 line
2.45.2
#2 lore raw

PATCH v5 2/2 arm64: dts: rockchip: Add BigTreeTech CB2 and Pi2

In reply to Ivan Sergeev

BigTreeTech CB2 and Pi2 share a lot of hardware configuration, so a common dtsi file was used to define common nodes and properties. This is similar to how BigTreeTech CB1 and Pi are implemented.

---
 arch/arm64/boot/dts/rockchip/Makefile              |   2 +
 .../dts/rockchip/rk3566-bigtreetech-cb2-manta.dts  |  10 +
 .../boot/dts/rockchip/rk3566-bigtreetech-cb2.dtsi  | 919 +++++++++++++++++++++
 .../boot/dts/rockchip/rk3566-bigtreetech-pi2.dts   |  10 +
 4 files changed, 941 insertions(+)
arch/arm64/boot/dts/rockchip/Makefile +2 -0
index 86cc418a2255cdc22f1d503e9519d2d9572d4e9d..99266316a6003e5a8a4dadbd05b8453beb2c3efc 100644
@@ -111,6 +111,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-box-demo.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lckfb-tspi.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lubancat-1.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-nanopi-r3s.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-bigtreetech-cb2-manta.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-bigtreetech-pi2.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb
arch/arm64/boot/dts/rockchip/rk3566-bigtreetech-cb2-manta.dts new file +10 -0
new file mode 100644
index 0000000000000000000000000000000000000000..97415d099d886aba97c9b652af3d03573f5e74d7
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include "rk3566-bigtreetech-cb2.dtsi"
+
+/ {
+	model = "BigTreeTech CB2";
+	compatible = "bigtreetech,cb2-manta", "bigtreetech,cb2", "rockchip,rk3566";
+};
arch/arm64/boot/dts/rockchip/rk3566-bigtreetech-cb2.dtsi new file +919 -0

919 lines not on this page · raw message

arch/arm64/boot/dts/rockchip/rk3566-bigtreetech-pi2.dts new file +10 -0
new file mode 100644
index 0000000000000000000000000000000000000000..7cd444caa18bc9f6cf7afe04a777aecdce2fc93e
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include "rk3566-bigtreetech-cb2.dtsi"
+
+/ {
+	model = "BigTreeTech Pi 2";
+	compatible = "bigtreetech,pi2", "rockchip,rk3566";
+};
Signature · 1 line
2.45.2
#3 lore raw
Quoted 12 lines · Ivan Sergeev
arch/arm64/boot/dts/rockchip/rk3566-bigtreetech-cb2.dtsi new file +12 -0
+
+&spi3 {
+	pinctrl-0 = <&spi3m1_cs0 &spi3m1_pins>;
+};
+
+&pcie2x1 {
+	reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie_reset_h>;
+	vpcie3v3-supply = <&vcc3v3_pcie>;
+	status = "okay";
+};

arch/arm64/boot/dts/rockchip/rk3566-bigtreetech-cb2.dtsi line 612

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3566-bigtreetech-cb2.dtsi new file +10 -0
+
+&pinctrl {
+	sd {
+		sdmmc0_pwr_h: sdmmc0-pwr-h {
+			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	pmic {
+		pmic_int: pmic_int {

Not fixed here and in multiple other places. Please fix the same issue everywhere, not in one place I commented under.

Quoted 1 line

Best regards,
Krzysztof