Re: [PATCH v4 18/25] ARM: dts: rockchip: Add Rockchip RV1126 SoC

2022-12-18 Thread Kever Yang



On 2022/12/15 01:51, Jagan Teki wrote:

RV1126 is a high-performance vision processor SoC for IPC/CVR,
especially for AI related application.

It is based on quad-core ARM Cortex-A7 32-bit core which integrates
NEON and FPU. There is a 32KB I-cache and 32KB D-cache for each core
and 512KB unified L2 cache. It has build-in NPU supports INT8/INT16
hybrid operation and computing power is up to 2.0TOPs.

This patch add basic core dtsi support.

Signed-off-by: Jon Lin 
Signed-off-by: Sugar Zhang 
Signed-off-by: Jagan Teki 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Changes for v4:
- pick changes from linux
Changes for v3:
- collect Kever r-b
Changes for v2:
- none

  arch/arm/dts/rv1126.dtsi | 438 +++
  1 file changed, 438 insertions(+)
  create mode 100644 arch/arm/dts/rv1126.dtsi

diff --git a/arch/arm/dts/rv1126.dtsi b/arch/arm/dts/rv1126.dtsi
new file mode 100644
index 00..1cb43147e9
--- /dev/null
+++ b/arch/arm/dts/rv1126.dtsi
@@ -0,0 +1,438 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/ {
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   compatible = "rockchip,rv1126";
+
+   interrupt-parent = <&gic>;
+
+   aliases {
+   i2c0 = &i2c0;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   cpu0: cpu@f00 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a7";
+   reg = <0xf00>;
+   enable-method = "psci";
+   clocks = <&cru ARMCLK>;
+   };
+
+   cpu1: cpu@f01 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a7";
+   reg = <0xf01>;
+   enable-method = "psci";
+   clocks = <&cru ARMCLK>;
+   };
+
+   cpu2: cpu@f02 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a7";
+   reg = <0xf02>;
+   enable-method = "psci";
+   clocks = <&cru ARMCLK>;
+   };
+
+   cpu3: cpu@f03 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a7";
+   reg = <0xf03>;
+   enable-method = "psci";
+   clocks = <&cru ARMCLK>;
+   };
+   };
+
+   arm-pmu {
+   compatible = "arm,cortex-a7-pmu";
+   interrupts = ,
+,
+,
+;
+   interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
+   };
+
+   psci {
+   compatible = "arm,psci-1.0";
+   method = "smc";
+   };
+
+   timer {
+   compatible = "arm,armv7-timer";
+   interrupts = ,
+,
+,
+;
+   clock-frequency = <2400>;
+   };
+
+   xin24m: oscillator {
+   compatible = "fixed-clock";
+   clock-frequency = <2400>;
+   clock-output-names = "xin24m";
+   #clock-cells = <0>;
+   };
+
+   grf: syscon@fe00 {
+   compatible = "rockchip,rv1126-grf", "syscon", "simple-mfd";
+   reg = <0xfe00 0x2>;
+   };
+
+   pmugrf: syscon@fe02 {
+   compatible = "rockchip,rv1126-pmugrf", "syscon", "simple-mfd";
+   reg = <0xfe02 0x1000>;
+
+   pmu_io_domains: io-domains {
+   compatible = "rockchip,rv1126-pmu-io-voltage-domain";
+   status = "disabled";
+   };
+   };
+
+   qos_emmc: qos@fe86 {
+   compatible = "rockchip,rv1126-qos", "syscon";
+   reg = <0xfe86 0x20>;
+   };
+
+   qos_nandc: qos@fe860080 {
+   compatible = "rockchip,rv1126-qos", "syscon";
+   reg = <0xfe860080 0x20>;
+   };
+
+   qos_sfc: qos@fe860200 {
+   compatible = "rockchip,rv1126-qos", "syscon";
+   reg = <0xfe860200 0x20>;
+   };
+
+   qos_sdio: qos@fe86c000 {
+   compatible = "rockchip,rv1126-qos", "syscon";
+   reg = <0xfe86c000 0x20>;
+   };
+
+   gic: interrupt-controller@feff {
+   compatible = "arm,gic-400";
+   interrupt-controller;
+   #interrupt-cells = <3>;
+   #address-cells = <0>;
+
+   reg = <0xfeff1000 0x1000>,
+ <0xfeff2000 0x2000>,
+ <0xfeff4000 0x2000>,
+ <0xfeff6000 0x20

[PATCH v4 18/25] ARM: dts: rockchip: Add Rockchip RV1126 SoC

2022-12-14 Thread Jagan Teki
RV1126 is a high-performance vision processor SoC for IPC/CVR,
especially for AI related application.

It is based on quad-core ARM Cortex-A7 32-bit core which integrates
NEON and FPU. There is a 32KB I-cache and 32KB D-cache for each core
and 512KB unified L2 cache. It has build-in NPU supports INT8/INT16
hybrid operation and computing power is up to 2.0TOPs.

This patch add basic core dtsi support.

Signed-off-by: Jon Lin 
Signed-off-by: Sugar Zhang 
Signed-off-by: Jagan Teki 
---
Changes for v4:
- pick changes from linux
Changes for v3:
- collect Kever r-b
Changes for v2:
- none

 arch/arm/dts/rv1126.dtsi | 438 +++
 1 file changed, 438 insertions(+)
 create mode 100644 arch/arm/dts/rv1126.dtsi

diff --git a/arch/arm/dts/rv1126.dtsi b/arch/arm/dts/rv1126.dtsi
new file mode 100644
index 00..1cb43147e9
--- /dev/null
+++ b/arch/arm/dts/rv1126.dtsi
@@ -0,0 +1,438 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/ {
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   compatible = "rockchip,rv1126";
+
+   interrupt-parent = <&gic>;
+
+   aliases {
+   i2c0 = &i2c0;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   cpu0: cpu@f00 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a7";
+   reg = <0xf00>;
+   enable-method = "psci";
+   clocks = <&cru ARMCLK>;
+   };
+
+   cpu1: cpu@f01 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a7";
+   reg = <0xf01>;
+   enable-method = "psci";
+   clocks = <&cru ARMCLK>;
+   };
+
+   cpu2: cpu@f02 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a7";
+   reg = <0xf02>;
+   enable-method = "psci";
+   clocks = <&cru ARMCLK>;
+   };
+
+   cpu3: cpu@f03 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a7";
+   reg = <0xf03>;
+   enable-method = "psci";
+   clocks = <&cru ARMCLK>;
+   };
+   };
+
+   arm-pmu {
+   compatible = "arm,cortex-a7-pmu";
+   interrupts = ,
+,
+,
+;
+   interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
+   };
+
+   psci {
+   compatible = "arm,psci-1.0";
+   method = "smc";
+   };
+
+   timer {
+   compatible = "arm,armv7-timer";
+   interrupts = ,
+,
+,
+;
+   clock-frequency = <2400>;
+   };
+
+   xin24m: oscillator {
+   compatible = "fixed-clock";
+   clock-frequency = <2400>;
+   clock-output-names = "xin24m";
+   #clock-cells = <0>;
+   };
+
+   grf: syscon@fe00 {
+   compatible = "rockchip,rv1126-grf", "syscon", "simple-mfd";
+   reg = <0xfe00 0x2>;
+   };
+
+   pmugrf: syscon@fe02 {
+   compatible = "rockchip,rv1126-pmugrf", "syscon", "simple-mfd";
+   reg = <0xfe02 0x1000>;
+
+   pmu_io_domains: io-domains {
+   compatible = "rockchip,rv1126-pmu-io-voltage-domain";
+   status = "disabled";
+   };
+   };
+
+   qos_emmc: qos@fe86 {
+   compatible = "rockchip,rv1126-qos", "syscon";
+   reg = <0xfe86 0x20>;
+   };
+
+   qos_nandc: qos@fe860080 {
+   compatible = "rockchip,rv1126-qos", "syscon";
+   reg = <0xfe860080 0x20>;
+   };
+
+   qos_sfc: qos@fe860200 {
+   compatible = "rockchip,rv1126-qos", "syscon";
+   reg = <0xfe860200 0x20>;
+   };
+
+   qos_sdio: qos@fe86c000 {
+   compatible = "rockchip,rv1126-qos", "syscon";
+   reg = <0xfe86c000 0x20>;
+   };
+
+   gic: interrupt-controller@feff {
+   compatible = "arm,gic-400";
+   interrupt-controller;
+   #interrupt-cells = <3>;
+   #address-cells = <0>;
+
+   reg = <0xfeff1000 0x1000>,
+ <0xfeff2000 0x2000>,
+ <0xfeff4000 0x2000>,
+ <0xfeff6000 0x2000>;
+   interrupts = ;
+   };
+
+   pmu: power-management@ff3e {