mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 1/2] dt-bindings: loongarch: Add Loongson-2K0300
       [not found] <20260322060246.1375569-1-wjjsn@qq.com>
@ 2026-03-22  6:02 ` wjjsn
  2026-03-22  6:02 ` [PATCH v3 2/2] loongarch: boot: dts: Add Loongson-2K0300 support wjjsn
  1 sibling, 0 replies; 3+ messages in thread
From: wjjsn @ 2026-03-22  6:02 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, chenhuacai
  Cc: kernel, devicetree, loongarch, linux-kernel, wjjsn

Signed-off-by: wjjsn <wjjsn@qq.com>
---
 Documentation/devicetree/bindings/loongarch/loongson.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/loongarch/loongson.yaml b/Documentation/devicetree/bindings/loongarch/loongson.yaml
index e1a4a97b7576..8bea8b9f75b1 100644
--- a/Documentation/devicetree/bindings/loongarch/loongson.yaml
+++ b/Documentation/devicetree/bindings/loongarch/loongson.yaml
@@ -14,6 +14,10 @@ properties:
     const: '/'
   compatible:
     oneOf:
+      - description: Loongson-2K0300 processor based boards
+        items:
+          - const: loongson,99pi
+          - const: loongson,ls2k0300
       - description: Loongson-2K0500 processor based boards
         items:
           - const: loongson,ls2k0500-ref
-- 
2.43.0


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

* [PATCH v3 2/2] loongarch: boot: dts: Add Loongson-2K0300 support
       [not found] <20260322060246.1375569-1-wjjsn@qq.com>
  2026-03-22  6:02 ` [PATCH v3 1/2] dt-bindings: loongarch: Add Loongson-2K0300 wjjsn
@ 2026-03-22  6:02 ` wjjsn
  2026-03-22  8:53   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 3+ messages in thread
From: wjjsn @ 2026-03-22  6:02 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, chenhuacai
  Cc: kernel, devicetree, loongarch, linux-kernel, wjjsn

Signed-off-by: wjjsn <wjjsn@qq.com>
---
 .../bindings/loongarch/loongson.yaml          |  2 +-
 arch/loongarch/boot/dts/Makefile              |  2 +-
 .../boot/dts/loongson-2k0300-ref.dts          | 34 +++++++
 arch/loongarch/boot/dts/loongson-2k0300.dtsi  | 95 +++++++++++++++++++
 4 files changed, 131 insertions(+), 2 deletions(-)
 create mode 100644 arch/loongarch/boot/dts/loongson-2k0300-ref.dts
 create mode 100644 arch/loongarch/boot/dts/loongson-2k0300.dtsi

diff --git a/Documentation/devicetree/bindings/loongarch/loongson.yaml b/Documentation/devicetree/bindings/loongarch/loongson.yaml
index 8bea8b9f75b1..8e0a917ffc01 100644
--- a/Documentation/devicetree/bindings/loongarch/loongson.yaml
+++ b/Documentation/devicetree/bindings/loongarch/loongson.yaml
@@ -16,7 +16,7 @@ properties:
     oneOf:
       - description: Loongson-2K0300 processor based boards
         items:
-          - const: loongson,99pi
+          - const: loongson,ls2k0300-ref
           - const: loongson,ls2k0300
       - description: Loongson-2K0500 processor based boards
         items:
diff --git a/arch/loongarch/boot/dts/Makefile b/arch/loongarch/boot/dts/Makefile
index 15d5e14fe418..4a096608cfad 100644
--- a/arch/loongarch/boot/dts/Makefile
+++ b/arch/loongarch/boot/dts/Makefile
@@ -1,3 +1,3 @@
 # 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-ref.dtb loongson-2k0500-ref.dtb loongson-2k1000-ref.dtb loongson-2k2000-ref.dtb
diff --git a/arch/loongarch/boot/dts/loongson-2k0300-ref.dts b/arch/loongarch/boot/dts/loongson-2k0300-ref.dts
new file mode 100644
index 000000000000..f85d2caa94b0
--- /dev/null
+++ b/arch/loongarch/boot/dts/loongson-2k0300-ref.dts
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2023 Loongson Technology Corporation Limited
+ */
+
+/dts-v1/;
+
+#include "loongson-2k0300.dtsi"
+
+/ {
+	compatible = "loongson,ls2k0300-ref", "loongson,ls2k0300";
+	model = "Loongson-2K0300 Reference Board";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory@200000 {
+		device_type = "memory";
+		reg = <0x0 0x00200000 0x0 0x0ee00000>,
+			  <0x0 0x90000000 0x0 0x10000000>;
+	};
+
+};
+
+
+&uart0 {
+	status = "okay";
+};
+
diff --git a/arch/loongarch/boot/dts/loongson-2k0300.dtsi b/arch/loongarch/boot/dts/loongson-2k0300.dtsi
new file mode 100644
index 000000000000..91062b388e77
--- /dev/null
+++ b/arch/loongarch/boot/dts/loongson-2k0300.dtsi
@@ -0,0 +1,95 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2023 Loongson Technology Corporation Limited
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/clock/loongson,ls2k-clk.h>
+
+/ {
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	interrupt-parent = <&cpuintc>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu0: cpu@0 {
+			compatible = "loongson,la264";
+			device_type = "cpu";
+			reg = <0x0>;
+			clocks = <&clk LS2K0300_CLK_NODE_DIV>;
+		};
+	};
+
+	ref_120m: clock-ref-120m {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <120000000>;
+		clock-output-names = "ref_120m";
+	};
+
+	cpuintc: interrupt-controller {
+		compatible = "loongson,cpu-interrupt-controller";
+		#interrupt-cells = <1>;
+		interrupt-controller;
+	};
+
+	liointc0: interrupt-controller@16001400 {
+		compatible = "loongson,liointc-2.0";
+		reg = <0x0 0x16001400 0x0 0x40>,
+				<0x0 0x16001040 0x0 0x8>;
+		reg-names = "main", "isr0";
+
+		interrupt-controller;
+		#address-cells = <0>;
+		#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;
+		#address-cells = <0>;
+		#interrupt-cells = <2>;
+		interrupt-parent = <&cpuintc>;
+		interrupts = <4>;
+		interrupt-names = "int2";
+
+		loongson,parent_int_map = <0x00000000>, /* int0 */
+						<0x00000000>, /* int1 */
+						<0xffffffff>, /* int2 */
+						<0x00000000>; /* int3 */
+	};
+	clk: clock-controller@16000400 {
+		compatible = "loongson,ls2k0300-clk";
+		reg = <0x0 0x16000400 0x0 0x2c>;
+		#clock-cells = <1>;
+		clocks = <&ref_120m>;
+		clock-names = "ref_120m";
+	};
+
+	uart0: serial@16100000 {
+		compatible = "ns16550a";
+		reg = <0x0 0x16100000 0x0 0x10>;
+		clocks = <&clk LS2K0300_CLK_APB_GATE>;
+		interrupt-parent = <&liointc0>;
+		interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+		no-loopback-test;
+		status = "disabled";
+	};
+};
-- 
2.43.0


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

* Re: [PATCH v3 2/2] loongarch: boot: dts: Add Loongson-2K0300 support
  2026-03-22  6:02 ` [PATCH v3 2/2] loongarch: boot: dts: Add Loongson-2K0300 support wjjsn
@ 2026-03-22  8:53   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-22  8:53 UTC (permalink / raw)
  To: wjjsn, robh, krzk+dt, conor+dt, chenhuacai
  Cc: kernel, devicetree, loongarch, linux-kernel

On 22/03/2026 07:02, wjjsn wrote:
> Signed-off-by: wjjsn <wjjsn@qq.com>
> ---
>  .../bindings/loongarch/loongson.yaml          |  2 +-
>  arch/loongarch/boot/dts/Makefile              |  2 +-
>  .../boot/dts/loongson-2k0300-ref.dts          | 34 +++++++
>  arch/loongarch/boot/dts/loongson-2k0300.dtsi  | 95 +++++++++++++++++++

Random posting.

>  4 files changed, 131 insertions(+), 2 deletions(-)
>  create mode 100644 arch/loongarch/boot/dts/loongson-2k0300-ref.dts
>  create mode 100644 arch/loongarch/boot/dts/loongson-2k0300.dtsi
> 
> diff --git a/Documentation/devicetree/bindings/loongarch/loongson.yaml b/Documentation/devicetree/bindings/loongarch/loongson.yaml
> index 8bea8b9f75b1..8e0a917ffc01 100644
> --- a/Documentation/devicetree/bindings/loongarch/loongson.yaml
> +++ b/Documentation/devicetree/bindings/loongarch/loongson.yaml
> @@ -16,7 +16,7 @@ properties:
>      oneOf:
>        - description: Loongson-2K0300 processor based boards
>          items:
> -          - const: loongson,99pi

But this is obviously NAK without explanation.

> +          - const: loongson,ls2k0300-ref


Best regards,
Krzysztof

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

end of thread, other threads:[~2026-03-22  8:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20260322060246.1375569-1-wjjsn@qq.com>
2026-03-22  6:02 ` [PATCH v3 1/2] dt-bindings: loongarch: Add Loongson-2K0300 wjjsn
2026-03-22  6:02 ` [PATCH v3 2/2] loongarch: boot: dts: Add Loongson-2K0300 support wjjsn
2026-03-22  8:53   ` Krzysztof Kozlowski

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®