mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] spacemit: k3: Add support for BS01DCMA RV2768
@ 2026-11-13 14:28 Troy Mitchell
  2026-11-13 14:28 ` [PATCH v2 1/2] dt-bindings: riscv: spacemit: Add K3 " Troy Mitchell
  2026-11-13 14:28 ` [PATCH v2 2/2] riscv: dts: spacemit: Add K3 BS01DCMA RV2768 support Troy Mitchell
  0 siblings, 2 replies; 4+ messages in thread
From: Troy Mitchell @ 2026-11-13 14:28 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Guodong Xu, Yangyu Chen, Troy Mitchell
  Cc: devicetree, linux-riscv, spacemit, linux-kernel

This patch series adds initial support for the SpacemiT K3 BS01DCMA
module in the SpacemiT Cluster Server RV2768. BS01DCMA carries two
independent K3 nodes; each has a K3 SoC, 16 GiB of LPDDR5 memory, a P1
PMIC, an EEPROM and QSPI NOR flash. The RV2768 carrier only connects
the modules to PCIe network cards.

Enable support for the serial console, EEPROM, PMIC and QSPI NOR flash.

---
Changes in v2:
- Split into a k3-bs01dcma.dtsi for the module and a
  k3-bs01dcma-rv2768.dts for the RV2768 carrier (Emil)
- Add the spacemit,k3-bs01dcma-rv2768 compatible, with
  spacemit,k3-bs01dcma as the module fallback
- Describe BS01DCMA as a module instead of a board
- End the uboot partition at 0x700000 and add a read-only var
  partition for the EDK2 variable store (Sarah)
- Add vcc-supply for the NOR flash (ALDO2, PMIC_VCC1V8_QSPI)
- Link to v1: https://patch.msgid.link/20261104-k3-bs01dcma-v1-0-794025247e4a@linux.spacemit.com

To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Paul Walmsley <pjw@kernel.org>
To: Palmer Dabbelt <palmer@dabbelt.com>
To: Albert Ou <aou@eecs.berkeley.edu>
To: Alexandre Ghiti <alex@ghiti.fr>
To: Yixun Lan <dlan@kernel.org>
To: Troy Mitchell <troy.mitchell@linux.spacemit.com>
To: Guodong Xu <docular.xu@gmail.com>
To: Yangyu Chen <cyy@cyyself.name>
Cc: devicetree@vger.kernel.org
Cc: linux-riscv@lists.infradead.org
Cc: spacemit@lists.linux.dev
Cc: linux-kernel@vger.kernel.org

---
Troy Mitchell (2):
      dt-bindings: riscv: spacemit: Add K3 BS01DCMA RV2768
      riscv: dts: spacemit: Add K3 BS01DCMA RV2768 support

 .../devicetree/bindings/riscv/spacemit.yaml        |   5 +
 arch/riscv/boot/dts/spacemit/Makefile              |   1 +
 .../riscv/boot/dts/spacemit/k3-bs01dcma-rv2768.dts |  19 ++
 arch/riscv/boot/dts/spacemit/k3-bs01dcma.dtsi      | 264 +++++++++++++++++++++
 4 files changed, 289 insertions(+)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261104-k3-bs01dcma-467fe26c462c

Best regards,
--  
Troy Mitchell <troy.mitchell@linux.spacemit.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 1/2] dt-bindings: riscv: spacemit: Add K3 BS01DCMA RV2768
  2026-11-13 14:28 [PATCH v2 0/2] spacemit: k3: Add support for BS01DCMA RV2768 Troy Mitchell
@ 2026-11-13 14:28 ` Troy Mitchell
  2026-11-13 16:53   ` Conor Dooley
  2026-11-13 14:28 ` [PATCH v2 2/2] riscv: dts: spacemit: Add K3 BS01DCMA RV2768 support Troy Mitchell
  1 sibling, 1 reply; 4+ messages in thread
From: Troy Mitchell @ 2026-11-13 14:28 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Guodong Xu, Yangyu Chen, Troy Mitchell
  Cc: devicetree, linux-riscv, spacemit, linux-kernel

BS01DCMA is a compute module carrying two independent SpacemiT K3
nodes. The SpacemiT Cluster Server RV2768 is built from several of
these modules plugged into a carrier.

Add compatibles for the module and for a K3 node in the RV2768.

Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
 Documentation/devicetree/bindings/riscv/spacemit.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/riscv/spacemit.yaml b/Documentation/devicetree/bindings/riscv/spacemit.yaml
index 4ee9c88984b4..31107219d855 100644
--- a/Documentation/devicetree/bindings/riscv/spacemit.yaml
+++ b/Documentation/devicetree/bindings/riscv/spacemit.yaml
@@ -37,6 +37,11 @@ properties:
               - deepcomputing,fml13v05
               - spacemit,k3-pico-itx
           - const: spacemit,k3
+      - items:
+          - enum:
+              - spacemit,k3-bs01dcma-rv2768
+          - const: spacemit,k3-bs01dcma
+          - const: spacemit,k3
       - items:
           - enum:
               - spacemit,k3-com260-ifx

-- 
2.56.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 2/2] riscv: dts: spacemit: Add K3 BS01DCMA RV2768 support
  2026-11-13 14:28 [PATCH v2 0/2] spacemit: k3: Add support for BS01DCMA RV2768 Troy Mitchell
  2026-11-13 14:28 ` [PATCH v2 1/2] dt-bindings: riscv: spacemit: Add K3 " Troy Mitchell
@ 2026-11-13 14:28 ` Troy Mitchell
  1 sibling, 0 replies; 4+ messages in thread
From: Troy Mitchell @ 2026-11-13 14:28 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Guodong Xu, Yangyu Chen, Troy Mitchell
  Cc: devicetree, linux-riscv, spacemit, linux-kernel

BS01DCMA is a compute module carrying two independent K3 nodes. Each
node has a SpacemiT K3 SoC, 16 GiB of LPDDR5 memory, a P1 PMIC, an
EEPROM and QSPI NOR flash. The SpacemiT Cluster Server RV2768 hosts
several BS01DCMA modules; its carrier only connects them to PCIe
network cards.

Add a dtsi for the module with the serial console, EEPROM, PMIC and
QSPI NOR flash, and a dts for a K3 node in the RV2768.

The NOR flash is a 1.8 V part powered from the PMIC_VCC1V8_QSPI rail,
which is ALDO2 of the P1 PMIC. Its partitions follow the layout of the
SpacemiT boot firmware. U-Boot and EDK2 both go into the partition at
0x210000; EDK2 keeps its UEFI variable store at the fixed offset
0x700000, so that partition ends below it and the store is described
as a separate read-only partition.

Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
 arch/riscv/boot/dts/spacemit/Makefile              |   1 +
 .../riscv/boot/dts/spacemit/k3-bs01dcma-rv2768.dts |  19 ++
 arch/riscv/boot/dts/spacemit/k3-bs01dcma.dtsi      | 264 +++++++++++++++++++++
 3 files changed, 284 insertions(+)

diff --git a/arch/riscv/boot/dts/spacemit/Makefile b/arch/riscv/boot/dts/spacemit/Makefile
index 851b701e5da4..a00c31a2c3e6 100644
--- a/arch/riscv/boot/dts/spacemit/Makefile
+++ b/arch/riscv/boot/dts/spacemit/Makefile
@@ -5,6 +5,7 @@ dtb-$(CONFIG_ARCH_SPACEMIT) += k1-milkv-jupiter.dtb
 dtb-$(CONFIG_ARCH_SPACEMIT) += k1-musepi-pro.dtb
 dtb-$(CONFIG_ARCH_SPACEMIT) += k1-orangepi-r2s.dtb
 dtb-$(CONFIG_ARCH_SPACEMIT) += k1-orangepi-rv2.dtb
+dtb-$(CONFIG_ARCH_SPACEMIT) += k3-bs01dcma-rv2768.dtb
 dtb-$(CONFIG_ARCH_SPACEMIT) += k3-com260-ifx.dtb
 dtb-$(CONFIG_ARCH_SPACEMIT) += k3-deepcomputing-fml13v05.dtb
 dtb-$(CONFIG_ARCH_SPACEMIT) += k3-pico-itx.dtb
diff --git a/arch/riscv/boot/dts/spacemit/k3-bs01dcma-rv2768.dts b/arch/riscv/boot/dts/spacemit/k3-bs01dcma-rv2768.dts
new file mode 100644
index 000000000000..5b0449314d64
--- /dev/null
+++ b/arch/riscv/boot/dts/spacemit/k3-bs01dcma-rv2768.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (c) 2026 SpacemiT (Hangzhou) Technology Co. Ltd
+ */
+
+#include "k3-bs01dcma.dtsi"
+
+/ {
+	model = "SpacemiT K3 RV2768 Cluster Server";
+	compatible = "spacemit,k3-bs01dcma-rv2768", "spacemit,k3-bs01dcma", "spacemit,k3";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
diff --git a/arch/riscv/boot/dts/spacemit/k3-bs01dcma.dtsi b/arch/riscv/boot/dts/spacemit/k3-bs01dcma.dtsi
new file mode 100644
index 000000000000..0f9375c38e40
--- /dev/null
+++ b/arch/riscv/boot/dts/spacemit/k3-bs01dcma.dtsi
@@ -0,0 +1,264 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (c) 2026 SpacemiT (Hangzhou) Technology Co. Ltd
+ */
+
+#include "k3.dtsi"
+#include "k3-pinctrl.dtsi"
+
+/ {
+	model = "SpacemiT K3 BS01DCMA Module";
+	compatible = "spacemit,k3-bs01dcma", "spacemit,k3";
+
+	memory@100000000 {
+		device_type = "memory";
+		reg = <0x1 0x00000000 0x4 0x00000000>;
+	};
+
+	reg_5v_sys: regulator-5v-sys {
+		compatible = "regulator-fixed";
+		regulator-name = "P5V0_SYS";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+	};
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c2_1_cfg>;
+	status = "okay";
+
+	eeprom@50 {
+		compatible = "atmel,24c02";
+		reg = <0x50>;
+		pagesize = <8>;
+		read-only;
+		size = <256>;
+		status = "okay";
+
+		nvmem-layout {
+			compatible = "onie,tlv-layout";
+
+			mac-address {
+				#nvmem-cell-cells = <1>;
+			};
+
+			num-macs {
+			};
+
+			product-name {
+			};
+
+			serial-number {
+			};
+		};
+	};
+};
+
+&i2c8 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c8_cfg>;
+	status = "okay";
+
+	pmic@41 {
+		compatible = "spacemit,p1";
+		reg = <0x41>;
+		interrupts = <64 IRQ_TYPE_LEVEL_HIGH>;
+		vin1-supply = <&reg_5v_sys>;
+		vin2-supply = <&reg_5v_sys>;
+		vin3-supply = <&reg_5v_sys>;
+		vin4-supply = <&reg_5v_sys>;
+		vin5-supply = <&reg_5v_sys>;
+		vin6-supply = <&reg_5v_sys>;
+		aldoin-supply = <&reg_5v_sys>;
+		dldoin1-supply = <&buck4>;
+		dldoin2-supply = <&buck4>;
+
+		regulators {
+			buck1: buck1 {
+				regulator-min-microvolt = <1050000>;
+				regulator-max-microvolt = <1050000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck2: buck2 {
+				regulator-min-microvolt = <1050000>;
+				regulator-max-microvolt = <1050000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck3: buck3 {
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <800000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck4: buck4 {
+				regulator-min-microvolt = <2100000>;
+				regulator-max-microvolt = <2100000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck5: buck5 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck6: buck6 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <500000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			aldo1: aldo1 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			aldo2: aldo2 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			aldo3: aldo3 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+			};
+
+			aldo4: aldo4 {
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			dldo1: dldo1 {
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1200000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			dldo2: dldo2 {
+				regulator-min-microvolt = <900000>;
+				regulator-max-microvolt = <900000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			dldo3: dldo3 {
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <800000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			dldo4: dldo4 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			dldo5: dldo5 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			dldo6: dldo6 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			dldo7: dldo7 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+		};
+	};
+};
+
+&qspi {
+	pinctrl-names = "default";
+	pinctrl-0 = <&qspi_cfg>;
+	status = "okay";
+
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <26500000>;
+		spi-rx-bus-width = <4>;
+		spi-tx-bus-width = <4>;
+		vcc-supply = <&aldo2>; /* PMIC_VCC1V8_QSPI */
+		m25p,fast-read;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			bootinfo@0 {
+				reg = <0x0 0x20000>;
+			};
+
+			fsbl@20000 {
+				reg = <0x20000 0x80000>;
+			};
+
+			env@a0000 {
+				reg = <0xa0000 0x10000>;
+			};
+
+			esos@b0000 {
+				reg = <0xb0000 0x100000>;
+			};
+
+			opensbi@1b0000 {
+				reg = <0x1b0000 0x60000>;
+			};
+
+			uboot@210000 {
+				reg = <0x210000 0x4f0000>;
+			};
+
+			var@700000 {
+				reg = <0x700000 0xc0000>;
+				read-only;
+			};
+		};
+	};
+};
+
+&qspi_cfg {
+	qspi-pins {
+		power-source = <1800>;
+	};
+
+	qspi-cs0-pins {
+		power-source = <1800>;
+	};
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_0_cfg>;
+	status = "okay";
+};

-- 
2.56.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: riscv: spacemit: Add K3 BS01DCMA RV2768
  2026-11-13 14:28 ` [PATCH v2 1/2] dt-bindings: riscv: spacemit: Add K3 " Troy Mitchell
@ 2026-11-13 16:53   ` Conor Dooley
  0 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2026-11-13 16:53 UTC (permalink / raw)
  To: Troy Mitchell
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Guodong Xu, Yangyu Chen, devicetree, linux-riscv, spacemit,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 75 bytes --]

Acked-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-13 16:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-13 14:28 [PATCH v2 0/2] spacemit: k3: Add support for BS01DCMA RV2768 Troy Mitchell
2026-11-13 14:28 ` [PATCH v2 1/2] dt-bindings: riscv: spacemit: Add K3 " Troy Mitchell
2026-11-13 16:53   ` Conor Dooley
2026-11-13 14:28 ` [PATCH v2 2/2] riscv: dts: spacemit: Add K3 BS01DCMA RV2768 support Troy Mitchell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®