* [PATCH v3 1/4] dt-bindings: vendor-prefixes: Add CTCISZ Technology Co., LTD.
2025-05-23 9:54 [PATCH v3 0/4] Initial support for CTCISZ Forever Pi Yao Zi
@ 2025-05-23 9:54 ` Yao Zi
2025-05-23 9:54 ` [PATCH v3 2/4] dt-bindings: LoongArch: Add CTCISZ Forever Pi Yao Zi
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Yao Zi @ 2025-05-23 9:54 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Huacai Chen,
WANG Xuerui, Yao Zi, Neil Armstrong, Heiko Stuebner, Junhao Xie,
Rafał Miłecki, Aradhya Bhatia, Manivannan Sadhasivam,
Binbin Zhou
Cc: devicetree, linux-kernel, loongarch, Mingcong Bai, Kexy Biscuit,
Krzysztof Kozlowski, Yanteng Si
CTCISZ Technology Co., LTD. is a company specializing in designing of
embedded systems. Document the vendor prefix.
Link: http://www.ctcisz.com/
Signed-off-by: Yao Zi <ziyao@disroot.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 86f6a19b28ae..02f35e583948 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -344,6 +344,8 @@ patternProperties:
description: Guangzhou China Star Optoelectronics Technology Co., Ltd
"^csq,.*":
description: Shenzen Chuangsiqi Technology Co.,Ltd.
+ "^ctcisz,.*":
+ description: CTCISZ Technology Co.,Ltd.
"^ctera,.*":
description: CTERA Networks Intl.
"^ctu,.*":
--
2.49.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v3 2/4] dt-bindings: LoongArch: Add CTCISZ Forever Pi
2025-05-23 9:54 [PATCH v3 0/4] Initial support for CTCISZ Forever Pi Yao Zi
2025-05-23 9:54 ` [PATCH v3 1/4] dt-bindings: vendor-prefixes: Add CTCISZ Technology Co., LTD Yao Zi
@ 2025-05-23 9:54 ` Yao Zi
2025-05-23 9:54 ` [PATCH v3 3/4] LoongArch: dts: Add initial SoC devicetree for Loongson 2K0300 Yao Zi
2025-05-23 9:54 ` [PATCH v3 4/4] LoongArch: dts: Add initial devicetree for CTCISZ Forever Pi Yao Zi
3 siblings, 0 replies; 5+ messages in thread
From: Yao Zi @ 2025-05-23 9:54 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Huacai Chen,
WANG Xuerui, Yao Zi, Neil Armstrong, Heiko Stuebner, Junhao Xie,
Rafał Miłecki, Aradhya Bhatia, Manivannan Sadhasivam,
Binbin Zhou
Cc: devicetree, linux-kernel, loongarch, Mingcong Bai, Kexy Biscuit,
Krzysztof Kozlowski, Yanteng Si
Forever Pi is an Loongson 2K0300-based development board produced by
CTCISZ. Features include,
- 512MiB DDR4 RAM
- On-board eMMC storage
- Optional SD Card support
- 2 USB 2.0 Ports (OTG and HOST)
- 1 GbE Ethernet port
- Optional WiFi/BT support
- Audio output through 3.5mm phone connector
- Optional display output through RAW RGB interface
Add compatible string for the board.
Signed-off-by: Yao Zi <ziyao@disroot.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>
---
Documentation/devicetree/bindings/loongarch/loongson.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/loongarch/loongson.yaml b/Documentation/devicetree/bindings/loongarch/loongson.yaml
index e1a4a97b7576..2479174ed454 100644
--- a/Documentation/devicetree/bindings/loongarch/loongson.yaml
+++ b/Documentation/devicetree/bindings/loongarch/loongson.yaml
@@ -14,6 +14,11 @@ properties:
const: '/'
compatible:
oneOf:
+ - description: CTCISZ Forever Pi
+ items:
+ - const: ctcisz,forever-pi
+ - const: loongson,ls2k0300
+
- description: Loongson-2K0500 processor based boards
items:
- const: loongson,ls2k0500-ref
--
2.49.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v3 3/4] LoongArch: dts: Add initial SoC devicetree for Loongson 2K0300
2025-05-23 9:54 [PATCH v3 0/4] Initial support for CTCISZ Forever Pi Yao Zi
2025-05-23 9:54 ` [PATCH v3 1/4] dt-bindings: vendor-prefixes: Add CTCISZ Technology Co., LTD Yao Zi
2025-05-23 9:54 ` [PATCH v3 2/4] dt-bindings: LoongArch: Add CTCISZ Forever Pi Yao Zi
@ 2025-05-23 9:54 ` Yao Zi
2025-05-23 9:54 ` [PATCH v3 4/4] LoongArch: dts: Add initial devicetree for CTCISZ Forever Pi Yao Zi
3 siblings, 0 replies; 5+ messages in thread
From: Yao Zi @ 2025-05-23 9:54 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Huacai Chen,
WANG Xuerui, Yao Zi, Neil Armstrong, Heiko Stuebner, Junhao Xie,
Rafał Miłecki, Aradhya Bhatia, Manivannan Sadhasivam,
Binbin Zhou
Cc: devicetree, linux-kernel, loongarch, Mingcong Bai, Kexy Biscuit
Add SoC devicetree for 2K0300 SoC, which features one LA264 dual-issue
core and targets embedded market. Only CPU core, legacy interrupt
controllers and UARTs are defined for now.
Signed-off-by: Yao Zi <ziyao@disroot.org>
---
arch/loongarch/boot/dts/loongson-2k0300.dtsi | 184 +++++++++++++++++++
1 file changed, 184 insertions(+)
create mode 100644 arch/loongarch/boot/dts/loongson-2k0300.dtsi
diff --git a/arch/loongarch/boot/dts/loongson-2k0300.dtsi b/arch/loongarch/boot/dts/loongson-2k0300.dtsi
new file mode 100644
index 000000000000..ce3574691aa9
--- /dev/null
+++ b/arch/loongarch/boot/dts/loongson-2k0300.dtsi
@@ -0,0 +1,184 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2025 Loongson Technology Corporation Limited
+ * Copyright (C) 2025 Yao Zi <ziyao@disroot.org>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+ compatible = "loongson,ls2k0300";
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu0: cpu@0 {
+ compatible = "loongson,la264";
+ reg = <0>;
+ device_type = "cpu";
+ clocks = <&cpu_clk>;
+ };
+
+ };
+
+ cpuintc: interrupt-controller {
+ compatible = "loongson,cpu-interrupt-controller";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+
+ cpu_clk: clock-1000m {
+ compatible = "fixed-clock";
+ clock-frequency = <1000000000>;
+ #clock-cells = <0>;
+ };
+
+ soc@10000000 {
+ compatible = "simple-bus";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges = <0x00 0x10000000 0x00 0x10000000 0x0 0x10000000>,
+ <0x00 0x02000000 0x00 0x02000000 0x0 0x04000000>,
+ <0x00 0x40000000 0x00 0x40000000 0x0 0x40000000>;
+
+ liointc0: interrupt-controller@16001400 {
+ compatible = "loongson,liointc-2.0";
+ reg = <0x0 0x16001400 0x0 0x40>,
+ <0x0 0x16001040 0x0 0x8>;
+ reg-names = "main", "isr0";
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <2>;
+ interrupt-names = "int0";
+
+ loongson,parent_int_map = <0xffffffff>, /* int0 */
+ <0x00000000>, /* int1 */
+ <0x00000000>, /* int2 */
+ <0x00000000>; /* int3 */
+ };
+
+ liointc1: interrupt-controller@16001440 {
+ compatible = "loongson,liointc-2.0";
+ reg = <0x0 0x16001440 0x0 0x40>,
+ <0x0 0x16001048 0x0 0x8>;
+ reg-names = "main", "isr0";
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <4>;
+ interrupt-names = "int2";
+
+ loongson,parent_int_map = <0x00000000>, /* int0 */
+ <0x00000000>, /* int1 */
+ <0xffffffff>, /* int2 */
+ <0x00000000>; /* int3 */
+ };
+
+ uart0: serial@16100000 {
+ compatible = "ns16550a";
+ reg = <0 0x16100000 0 0x10>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+ no-loopback-test;
+ status = "disabled";
+ };
+
+ uart1: serial@16100400 {
+ compatible = "ns16550a";
+ reg = <0 0x16100400 0 0x10>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
+ no-loopback-test;
+ status = "disabled";
+ };
+
+ uart2: serial@16100800 {
+ compatible = "ns16550a";
+ reg = <0 0x16100800 0 0x10>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+ no-loopback-test;
+ status = "disabled";
+ };
+
+ uart3: serial@16100c00 {
+ compatible = "ns16550a";
+ reg = <0 0x16100c00 0 0x10>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+ no-loopback-test;
+ status = "disabled";
+ };
+
+ uart4: serial@16101000 {
+ compatible = "ns16550a";
+ reg = <0 0x16101000 0 0x10>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+ no-loopback-test;
+ status = "disabled";
+ };
+
+ uart5: serial@16101400 {
+ compatible = "ns16550a";
+ reg = <0 0x16101400 0 0x10>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+ no-loopback-test;
+ status = "disabled";
+ };
+
+ uart6: serial@16101800 {
+ compatible = "ns16550a";
+ reg = <0 0x16101800 0 0x10>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+ no-loopback-test;
+ status = "disabled";
+ };
+
+ uart7: serial@16101c00 {
+ compatible = "ns16550a";
+ reg = <0 0x16101c00 0 0x10>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+ no-loopback-test;
+ status = "disabled";
+ };
+
+ uart8: serial@16102000 {
+ compatible = "ns16550a";
+ reg = <0 0x16102000 0 0x10>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+ no-loopback-test;
+ status = "disabled";
+ };
+
+ uart9: serial@16102400 {
+ compatible = "ns16550a";
+ reg = <0 0x16102400 0 0x10>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+ no-loopback-test;
+ status = "disabled";
+ };
+
+ isa@16400000 {
+ compatible = "isa";
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <1 0x0 0x0 0x16400000 0x4000>;
+ };
+ };
+};
--
2.49.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v3 4/4] LoongArch: dts: Add initial devicetree for CTCISZ Forever Pi
2025-05-23 9:54 [PATCH v3 0/4] Initial support for CTCISZ Forever Pi Yao Zi
` (2 preceding siblings ...)
2025-05-23 9:54 ` [PATCH v3 3/4] LoongArch: dts: Add initial SoC devicetree for Loongson 2K0300 Yao Zi
@ 2025-05-23 9:54 ` Yao Zi
3 siblings, 0 replies; 5+ messages in thread
From: Yao Zi @ 2025-05-23 9:54 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Huacai Chen,
WANG Xuerui, Yao Zi, Neil Armstrong, Heiko Stuebner, Junhao Xie,
Rafał Miłecki, Aradhya Bhatia, Manivannan Sadhasivam,
Binbin Zhou
Cc: devicetree, linux-kernel, loongarch, Mingcong Bai, Kexy Biscuit
Enable UART0 as it's the boot UART used by firmware.
Signed-off-by: Yao Zi <ziyao@disroot.org>
---
arch/loongarch/boot/dts/Makefile | 1 +
.../dts/loongson-2k0300-ctcisz-forever-pi.dts | 45 +++++++++++++++++++
2 files changed, 46 insertions(+)
create mode 100644 arch/loongarch/boot/dts/loongson-2k0300-ctcisz-forever-pi.dts
diff --git a/arch/loongarch/boot/dts/Makefile b/arch/loongarch/boot/dts/Makefile
index 15d5e14fe418..cf7f74d4b1a4 100644
--- a/arch/loongarch/boot/dts/Makefile
+++ b/arch/loongarch/boot/dts/Makefile
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
dtb-y = loongson-2k0500-ref.dtb loongson-2k1000-ref.dtb loongson-2k2000-ref.dtb
+dtb-y += loongson-2k0300-ctcisz-forever-pi.dtb
diff --git a/arch/loongarch/boot/dts/loongson-2k0300-ctcisz-forever-pi.dts b/arch/loongarch/boot/dts/loongson-2k0300-ctcisz-forever-pi.dts
new file mode 100644
index 000000000000..a033c086461f
--- /dev/null
+++ b/arch/loongarch/boot/dts/loongson-2k0300-ctcisz-forever-pi.dts
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2025 Yao Zi <ziyao@disroot.org>
+ */
+
+/dts-v1/;
+
+#include "loongson-2k0300.dtsi"
+
+/ {
+ compatible = "ctcisz,forever-pi", "loongson,ls2k0300";
+ model = "CTCISZ Forever Pi";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@200000 {
+ device_type = "memory";
+ reg = <0 0x00200000 0 0x0ee00000>,
+ <0 0x90000000 0 0x10000000>;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ linux,cma {
+ compatible = "shared-dma-pool";
+ reusable;
+ size = <0 0x02000000>;
+ linux,cma-default;
+ };
+ };
+};
+
+&uart0 {
+ clock-frequency = <100000000>;
+ status = "okay";
+};
--
2.49.0
^ permalink raw reply related [flat|nested] 5+ messages in thread