Unverified Commit 9bba6186 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'riscv-sophgo-dt-for-v6.16' of https://github.com/sophgo/linux into soc/late



RISC-V Devicetrees for v6.16

Sophgo:
Add Pinctrl & SPI support for SG2042 SoC, and
refactor the dts of cv18xx to facilitate adding
support for arm core later (SG200X has two cores,
one is RISC-V and another is ARM64).
Also add initial support for Sophgo SG2044/SRD3-10.
SRD3-10 board bases on Sophgo SG2044 SoC and
initial support includes uart only. This part of
the changes involves some modifications to dts
and bindings.

Signed-off-by: default avatarChen Wang <unicorn_wang@outlook.com>

* tag 'riscv-sophgo-dt-for-v6.16' of https://github.com/sophgo/linux:
  riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX
  riscv: dts: sophgo: Add initial device tree of Sophgo SRD3-10
  dt-bindings: riscv: sophgo: Add SG2044 compatible string
  dt-bindings: interrupt-controller: Add Sophgo SG2044 PLIC
  dt-bindings: interrupt-controller: Add Sophgo SG2044 CLINT mswi
  riscv: dts: sopgho: use SOC_PERIPHERAL_IRQ to calculate interrupt number
  riscv: dts: sophgo: rename header file cv18xx.dtsi to cv180x.dtsi
  riscv: dts: sophgo: Move riscv cpu definition to a separate file
  riscv: dts: sophgo: Move all soc specific device into soc dtsi file
  riscv: sophgo: dts: Add spi controller for SG2042
  riscv: dts: sophgo: sg2042: add pinctrl support

Link: https://lore.kernel.org/r/MA0P287MB22622FA23ECF9B9216735FA0FE9CA@MA0P287MB2262.INDP287.PROD.OUTLOOK.COM


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents a5806cd5 108a7677
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ properties:
              - sophgo,cv1812h-plic
              - sophgo,sg2002-plic
              - sophgo,sg2042-plic
              - sophgo,sg2044-plic
              - thead,th1520-plic
          - const: thead,c900-plic
      - items:
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ properties:
    items:
      - enum:
          - sophgo,sg2042-aclint-mswi
          - sophgo,sg2044-aclint-mswi
      - const: thead,c900-aclint-mswi

  reg:
+4 −0
Original line number Diff line number Diff line
@@ -35,6 +35,10 @@ properties:
          - enum:
              - milkv,pioneer
          - const: sophgo,sg2042
      - items:
          - enum:
              - sophgo,srd3-10
          - const: sophgo,sg2044

additionalProperties: true

+1 −0
Original line number Diff line number Diff line
@@ -3,3 +3,4 @@ dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-licheerv-nano-b.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += sg2044-sophgo-srd3-10.dtb
+28 −11
Original line number Diff line number Diff line
@@ -3,8 +3,11 @@
 * Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
 */

#define SOC_PERIPHERAL_IRQ(nr)	((nr) + 16)

#include <dt-bindings/pinctrl/pinctrl-cv1800b.h>
#include "cv18xx.dtsi"
#include "cv180x-cpus.dtsi"
#include "cv180x.dtsi"

/ {
	compatible = "sophgo,cv1800b";
@@ -15,23 +18,37 @@ memory@80000000 {
	};

	soc {
		interrupt-parent = <&plic>;
		dma-noncoherent;

		pinctrl: pinctrl@3001000 {
			compatible = "sophgo,cv1800b-pinctrl";
			reg = <0x03001000 0x1000>,
			      <0x05027000 0x1000>;
			reg-names = "sys", "rtc";
		};
	};

		clk: clock-controller@3002000 {
			compatible = "sophgo,cv1800b-clk";
			reg = <0x03002000 0x1000>;
			clocks = <&osc>;
			#clock-cells = <1>;
		};

&plic {
		plic: interrupt-controller@70000000 {
			compatible = "sophgo,cv1800b-plic", "thead,c900-plic";
			reg = <0x70000000 0x4000000>;
			interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;
			interrupt-controller;
			#address-cells = <0>;
			#interrupt-cells = <2>;
			riscv,ndev = <101>;
		};

&clint {
		clint: timer@74000000 {
			compatible = "sophgo,cv1800b-clint", "thead,c900-clint";
			reg = <0x74000000 0x10000>;
			interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>;
		};
	};

&clk {
	compatible = "sophgo,cv1800-clk";
};
Loading