kernel/0140-feat-add-single-die-of-7702-dts.patch
2024-12-19 16:34:44 -05:00

1689 lines
30 KiB
Diff

From 2ddfed745c36596f93552e09824e1faa38480c2b Mon Sep 17 00:00:00 2001
From: ningyu <ningyu@eswincomputing.com>
Date: Sun, 4 Aug 2024 16:09:29 +0800
Subject: [PATCH 140/219] feat:add single die of 7702 dts
Changelogs:
1.Add dts of 7702 evb only activate die0
2.Add dts of 7702 evb only activate die1
Signed-off-by: ningyu <ningyu@eswincomputing.com>
---
arch/riscv/boot/dts/eswin/Makefile | 5 +-
.../boot/dts/eswin/eic7702-evb-a1-d0.dts | 813 +++++++++++++++++
.../boot/dts/eswin/eic7702-evb-a1-d1.dts | 828 ++++++++++++++++++
3 files changed, 1645 insertions(+), 1 deletion(-)
create mode 100644 arch/riscv/boot/dts/eswin/eic7702-evb-a1-d0.dts
create mode 100644 arch/riscv/boot/dts/eswin/eic7702-evb-a1-d1.dts
diff --git a/arch/riscv/boot/dts/eswin/Makefile b/arch/riscv/boot/dts/eswin/Makefile
index 5f6f08e84743..83f22c56ae87 100644
--- a/arch/riscv/boot/dts/eswin/Makefile
+++ b/arch/riscv/boot/dts/eswin/Makefile
@@ -2,5 +2,8 @@
dtb-$(CONFIG_SOC_SIFIVE) += eswin-win2030.dtb \
eic7700-evb.dtb \
eic7700-evb-a2.dtb \
- hifive-premier-550.dtb
+ hifive-premier-550.dtb \
+ eic7702-evb-a1-d0.dtb \
+ eic7702-evb-a1-d1.dtb
+
obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
diff --git a/arch/riscv/boot/dts/eswin/eic7702-evb-a1-d0.dts b/arch/riscv/boot/dts/eswin/eic7702-evb-a1-d0.dts
new file mode 100644
index 000000000000..870323d163ea
--- /dev/null
+++ b/arch/riscv/boot/dts/eswin/eic7702-evb-a1-d0.dts
@@ -0,0 +1,813 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for Eswin EIC7702 SoC only active die0.
+ *
+ * Copyright 2024, Beijing ESWIN Computing Technology Co., Ltd.. All rights reserved.
+ * SPDX-License-Identifier: GPL-2.0
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 2.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+/dts-v1/;
+
+#define RTCCLK_FREQ 1000000
+#define LSPCLK_FREQ 200000000
+
+/* If wanna enable ECC capability of DDR, should reserve highest zone of 1/8 all space for it */
+#define MEMORY_SIZE_H 0x4
+#define MEMORY_SIZE_L 0x0
+#define CMA_SIZE 0x20000000
+
+#include "eswin-win2030-die0-soc.dtsi"
+#include "eic7700-pinctrl.dtsi"
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/* Clock frequency (in Hz) of the PCB crystal for rtcclk */
+
+/ {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ model = "ESWIN EIC7700";
+ compatible = "sifive,hifive-unmatched-a00", "sifive,fu740-c000",
+ "sifive,fu740", "eswin,eic7700";
+
+ aliases {
+ serial0 = &d0_uart0;
+ ethernet0 = &d0_gmac0;
+ ethernet1 = &d0_gmac1;
+ rtc0 = &die0_rtc;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ cpus {
+ timebase-frequency = <RTCCLK_FREQ>;
+ };
+
+ memory@59000000 {
+ device_type = "memory";
+ reg = <0x0 0x59000000 0x0 0x400000>;
+ numa-node-id = <0>;
+ };
+
+ memory@80000000 {
+ device_type = "memory";
+ reg = <0x0 0x80000000 MEMORY_SIZE_H MEMORY_SIZE_L>;
+ numa-node-id = <0>;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ linux,cma {
+ compatible = "shared-dma-pool";
+ reusable;
+ size = <0x0 CMA_SIZE>;
+ alignment = <0x0 0x1000>;
+ alloc-ranges = <0x0 0x80000000 MEMORY_SIZE_H MEMORY_SIZE_L>;
+ linux,cma-default;
+ };
+
+ npu0_reserved: sprammemory@59000000 {
+ no-map;
+ reg = <0x0 0x59000000 0x0 0x400000>;
+ };
+
+ g2d_4GB_boundary_reserved_4k {
+ no-map;
+ reg = <0x0 0xfffff000 0x0 0x1000>;
+ };
+
+ g2d_8GB_boundary_reserved_4k {
+ no-map;
+ reg = <0x1 0xfffff000 0x0 0x1000>;
+ };
+
+ g2d_12GB_boundary_reserved_4k {
+ no-map;
+ reg = <0x2 0xfffff000 0x0 0x1000>;
+ };
+
+ mmz_nid_0_part_0 {
+ compatible = "eswin-reserve-memory";
+ reg = <0x3 0x0 0x1 0x80000000>;
+ no-map;
+ };
+ };
+};
+
+&d0_clock {
+ status = "okay";
+};
+
+&d0_reset {
+ status = "okay";
+};
+
+&d0_pmu {
+ status = "okay";
+};
+
+&ddr0 {
+ status = "okay";
+};
+
+&ddr1 {
+ status = "okay";
+};
+
+&smmu0 {
+ status = "okay";
+};
+
+&smmu_pmu0 {
+ status = "disabled";
+};
+
+&dev_foo_a {
+ status = "okay";
+};
+
+&d0_cfg_noc {
+ status = "okay";
+};
+
+&d0_llc_noc {
+ status = "okay";
+ stat,0 = "TracePort:ddr0_p0_req";
+ stat,1 = "TracePort:ddr1_p0_req";
+ //latency,0 = "TracePort:llcnoc_trans_probe";
+ //pending,0 = "TracePort:llcnoc_trans_probe";
+};
+
+&d0_sys_noc {
+ status = "okay";
+
+ //eswin,DSPT-qos-owner;
+ //eswin,NPU-qos-owner;
+ //eswin,SPISLV_TBU3-qos-owner;
+
+ stat,0 = "TracePort:ddr0_p1_req",
+ "InitFlow:mcput_snoc_mp/I/0";
+
+ stat,1 = "TracePort:ddr0_p2_req",
+ "InitFlow:dspt_snoc/I/0",
+ "AddrBase:0x81000000", "AddrSize:0x30",
+ "Opcode:RdWrLockUrg", "Status:ReqRsp", "Length:0x8000", "Urgency:0x0";
+
+ stat,2 = "TracePort:ddr1_p1_req",
+ "Status:Req", "AddrSize:0x28";
+
+ stat,3 = "TracePort:ddr1_p2_req";
+
+ latency,0 = "TracePort:sysnoc_trans_probe_0", "AddrSize:0x0";
+ latency,1 = "TracePort:sysnoc_trans_probe_1","Mode:latency","AddrBase:0x82000000","AddrSize:0x28","Opcode:RdWr";
+ //latency,2 = "TracePort:sysnoc_trans_probe_2";
+
+ //pending,0 = "TracePort:sysnoc_trans_probe_0";
+ //pending,1 = "TracePort:sysnoc_trans_probe_1","Mode:latency","AddrBase:0x82000000","AddrSize:0x0","Opcode:RdWr";
+ pending,0 = "TracePort:sysnoc_trans_probe_2", "AddrSize:0x3";
+};
+
+&d0_media_noc {
+ status = "okay";
+
+ //eswin,GPU-qos-owner;
+ //eswin,TBU2-qos-owner;
+ //eswin,VC-qos-owner;
+
+ stat,0 = "TracePort:ddr0_p3_req";
+ stat,1 = "TracePort:ddr1_p3_req";
+ //latency,0 = "TracePort:mnoc_trans_probe";
+ //pending,0 = "TracePort:mnoc_trans_probe";
+};
+
+&d0_realtime_noc {
+ status = "okay";
+
+ //eswin,TBU0-qos-owner;
+ //eswin,VO-qos-owner;
+
+ stat,0 = "TracePort:ddr0_p4_req";
+ stat,1 = "TracePort:ddr1_p4_req";
+ //latency,0 = "TracePort:rnoc_trans_probe";
+ //pending,0 = "TracePort:rnoc_trans_probe";
+};
+
+&d0_noc_wdt {
+ status = "okay";
+};
+
+&d0_ipc_scpu {
+ status = "okay";
+};
+
+&d0_lpcpu {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&d0_npu{
+ status = "okay";
+};
+
+&d0_dsp_subsys {
+ status = "okay";
+};
+
+&d0_dsp0 {
+ status = "okay";
+};
+
+&d0_dsp1 {
+ status = "okay";
+};
+
+&d0_dsp2 {
+ status = "okay";
+};
+
+&d0_dsp3 {
+ status = "okay";
+};
+
+&gpu0 {
+ status = "okay";
+};
+
+&gc820 {
+ status = "okay";
+};
+
+&vdec0 {
+ status = "okay";
+};
+
+&venc0 {
+ status = "okay";
+};
+
+&video_output {
+ status = "okay";
+};
+
+&dc {
+ status = "okay";
+};
+
+&dc_test {
+ status = "disabled";
+};
+
+&virtual_display {
+ status = "okay";
+};
+
+&dsi_output {
+ status = "okay";
+};
+
+&dsi_controller {
+ status = "okay";
+};
+
+&dsi_panel {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio27_default &pinctrl_gpio106_default>;
+ backlight0-gpios = <&porta 27 GPIO_ACTIVE_HIGH>;
+ rst-gpios = <&portd 10 GPIO_ACTIVE_HIGH>;
+};
+
+&dw_hdmi {
+ status = "okay";
+ ports {
+ port@2 {
+ reg = <2>;
+ hdmi_in_i2s: endpoint@1 {
+ system-clock-frequency = <12288000>;
+ remote-endpoint = <&d0_i2s0_endpoint>;
+ };
+ };
+ };
+};
+
+&dw_hdmi_hdcp2 {
+ status = "okay";
+};
+
+&d0_i2s0 {
+ status = "okay";
+ d0_i2s0_port: port {
+ d0_i2s0_endpoint: endpoint {
+ remote-endpoint = <&hdmi_in_i2s>;
+ dai-format = "i2s";
+ };
+ };
+};
+
+&d0_i2s1 {
+ status = "okay";
+ d0_i2s1_port: port {
+ d0_i2s1_endpoint: endpoint {
+ remote-endpoint = <&d0_codec0_endpoint>;
+ dai-format = "i2s";
+ };
+ };
+};
+
+&d0_i2s2 {
+ status = "okay";
+ d0_i2s2_port: port {
+ d0_i2s2_endpoint: endpoint {
+ remote-endpoint = <&d0_codec1_endpoint>;
+ dai-format = "i2s";
+ };
+ };
+};
+
+&d0_graphcard0 {
+ status = "okay";
+ label = "Analog Audio-0";
+ dais = <&d0_i2s1_port>;
+};
+
+&d0_graphcard1 {
+ status = "okay";
+ label = "Analog Audio-1";
+ dais = <&d0_i2s2_port>;
+};
+
+&d0_graphcard2 {
+ status = "okay";
+ label = "HDMI Audio";
+ dais = <&d0_i2s0_port>;
+};
+
+&isp_0 {
+ status = "okay";
+};
+
+&isp_1 {
+ status = "okay";
+};
+
+&dewarp {
+ status = "okay";
+};
+
+&mipi_dphy_rx {
+ status = "okay";
+};
+
+&csi_dma0 {
+ status = "okay";
+};
+
+&csi_dma1 {
+ status = "disabled";
+};
+
+&csi2_0 {
+ status = "okay";
+};
+
+&csi2_1 {
+ status = "disabled";
+};
+
+&sdhci_emmc {
+ /* emmc */
+ status = "okay";
+ delay_code = <0x17>;
+ drive-impedance-ohm = <50>;
+ enable-cmd-pullup;
+ enable-data-pullup;
+ no-sdio;
+ no-sd;
+};
+
+&sdio0 {
+ /* sd card */
+ status = "okay";
+ delay_code = <0x29>;
+ drive-impedance-ohm = <33>;
+ enable-cmd-pullup;
+ enable-data-pullup;
+ no-sdio;
+ no-mmc;
+};
+
+&sdio1 {
+ /* unused */
+ status = "disabled";
+};
+
+&d0_gmac0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio15_default>;
+ rst-gpios = <&porta 15 GPIO_ACTIVE_LOW>;
+ eswin,rgmiisel = <&pinctrl 0x290 0x3>;
+ eswin,led-cfgs = <0x6100 0xa40 0x420>;
+
+ status = "okay";
+};
+
+&d0_gmac1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio14_default>;
+ rst-gpios = <&porta 14 GPIO_ACTIVE_LOW>;
+ eswin,rgmiisel = <&pinctrl 0x294 0x3>;
+ eswin,led-cfgs = <0x6100 0xa40 0x420>;
+
+ status = "okay";
+};
+
+&d0_sata {
+ status = "okay";
+};
+
+&d0_usbdrd3_0 {
+ status = "okay";
+};
+
+&d0_usbdrd_dwc3_0 {
+ status = "okay";
+ dr_mode = "host";
+ maximum-speed = "super-speed";
+};
+
+&d0_usbdrd3_1 {
+ status = "okay";
+};
+
+&d0_usbdrd_dwc3_1 {
+ status = "okay";
+ dr_mode = "host";
+ maximum-speed = "super-speed";
+};
+
+&d0_dmac0 {
+ status = "okay";
+};
+
+&d0_aon_dmac {
+ status = "okay";
+};
+
+&d0_uart0 {
+ /* debug */
+ status = "okay";
+};
+
+&d0_uart1 {
+ /* RS232 DB9 */
+ status = "okay";
+};
+
+&d0_uart2 {
+ /* pin header */
+ status = "okay";
+};
+
+&d0_uart3 {
+ /* unused */
+ status = "disabled";
+};
+
+&d0_uart4 {
+ /* unused */
+ status = "disabled";
+};
+
+&ssi0 {
+ /* spi flash */
+ status = "okay";
+ num-cs = <2>;
+ spi-flash@0 {
+ compatible = "winbond,w25q128fw",
+ "jedec,spi-nor";
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <4800000>;
+ rx-sample-delay-ns = <10>;
+ };
+ spi-flash@1 {
+ compatible = "winbond,w25q128fw",
+ "jedec,spi-nor";
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <4800000>;
+ rx-sample-delay-ns = <10>;
+ };
+};
+
+&ssi1 {
+ /* unused */
+ status = "disabled";
+};
+
+&bootspi {
+ /* spi flash */
+ status = "okay";
+ num-cs = <1>;
+ cs-gpios = <&portd 0 GPIO_ACTIVE_LOW>;
+ wp-gpios = <&portd 4 GPIO_ACTIVE_LOW>;
+ spi-flash@0 {
+ compatible = "winbond,w25q128jw",
+ "jedec,spi-nor";
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <4800000>;
+ rx-sample-delay-ns = <10>;
+ };
+};
+
+&d0_mbox0 {
+ status = "okay";
+};
+
+&d0_mbox1 {
+ status = "okay";
+};
+
+&d0_mbox2 {
+ status = "okay";
+};
+
+&d0_mbox3 {
+ status = "okay";
+};
+
+&d0_mbox4 {
+ status = "okay";
+};
+
+&d0_mbox5 {
+ status = "okay";
+};
+
+&d0_mbox6 {
+ status = "okay";
+};
+
+&d0_mbox7 {
+ status = "okay";
+};
+
+&fan_control {
+ status = "okay";
+};
+
+&d0_i2c0 {
+ /* codec es8388 */
+ status = "okay";
+ d0_es8388_0: es8388-0@10 {
+ compatible = "eswin,es8388";
+ reg = <0x10>;
+ #sound-dai-cells = <0>;
+ port {
+ d0_codec0_endpoint: endpoint {
+ system-clock-frequency = <12288000>;
+ remote-endpoint = <&d0_i2s1_endpoint>;
+ };
+ };
+ };
+ d0_es8388_1: es8388-1@11 {
+ compatible = "eswin,es8388";
+ reg = <0x11>;
+ #sound-dai-cells = <0>;
+ port {
+ d0_codec1_endpoint: endpoint {
+ system-clock-frequency = <12288000>;
+ remote-endpoint = <&d0_i2s2_endpoint>;
+ };
+ };
+ };
+};
+
+&d0_i2c1 {
+ /* mpq8785 */
+ status = "okay";
+ mpq8785@10 {
+ compatible = "mps,mpq8785";
+ reg = <0x10>;
+ eswin,regulator_default-microvolt=<1000000>;
+ eswin,regulator_label = "supply vdd1", "npu vdd1", "npu current1", "npu temperature1";
+ label = "npu_vdd";
+ regulators{
+ npu_vcc1:npu_svcc{
+ regulator-name="NPU_SVCC";
+ regulator-min-microvolt=<700000>;
+ regulator-max-microvolt=<1100000>;
+ regulator-min-microamp=<20000000>;
+ regulator-max-microamp=<40000000>;
+ regulator-ov-protection-microvolt=<1100000>;
+ regulator-always-on;
+ };
+ };
+ };
+};
+
+&d0_i2c2 {
+ /* mipi dsi */
+ status = "disabled";
+};
+
+&d0_i2c3 {
+ /* mipi csi0/csi1 */
+ status = "okay";
+};
+
+&d0_i2c4 {
+ /* mipi csi2/csi3 */
+ status = "disabled";
+};
+
+&d0_i2c5 {
+ /* io extended for mipi csi */
+ status = "okay";
+ tca6416_0: gpio@20 {
+ compatible = "ti,tca6416";
+ reg = <0x20>;
+ gpio-controller; /* IRQ not connected */
+ #gpio-cells = <2>;
+ gpio-line-names = "MIPI_CSI0_PWDN", "MIPI_CSI0_RESET", "MIPI_CSI1_FBC", "MIPI_CSI1_ENB",
+ "MIPI_CSI1_RESET", "MIPI_CSI1_PWDN", "FREX_GP0", "",
+ "MIPI_CSI0_ENB", "MIPI_CSI0_FBC", "FREX_GP2", "MIPI_CSI2_FBC",
+ "MIPI_CSI2_ENB", "FREX_GP1", "MIPI_CSI2_RESET", "MIPI_CSI2_PWDN";
+ };
+ tca6416_1: gpio@21 {
+ compatible = "ti,tca6416";
+ reg = <0x21>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ /* IRQ not connected */
+ gpio-line-names = "MIPI_CSI3_PWDN", "MIPI_CSI3_RESET", "MIPI_CSI3_ENB", "MIPI_CSI3_FBC",
+ "MIPI_CSI4_PWDN", "MIPI_CSI4_RESET", "MIPI_CSI4_ENB", "MIPI_CSI4_FBC",
+ "MIPI_CSI5_FBC", "MIPI_CSI5_ENB", "MIPI_CSI5_RESET", "MIPI_CSI5_PWDN",
+ "", "", "", "";
+ };
+};
+
+&d0_i2c6 {
+ /* unused */
+ status = "disabled";
+};
+
+&d0_i2c7 {
+ /* unused */
+ status = "disabled";
+};
+
+&d0_i2c8 {
+ /* unused */
+ status = "disabled";
+};
+
+&d0_i2c9 {
+ /* unused */
+ status = "disabled";
+};
+
+&d0_aon_i2c0 {
+ /* ina226x4 & tmp102aidrlr */
+ status = "okay";
+ i2c-sda-hold-time-ns = <0x40>;
+ ina226@45 {
+ compatible = "ti,ina226";
+ #io-channel-cells = <1>;
+ label = "cpu_vdd";
+ reg = <0x45>;
+ shunt-resistor = <1000>;
+ };
+ ina226@44 {
+ compatible = "ti,ina226";
+ #io-channel-cells = <1>;
+ label = "soc_vdd";
+ reg = <0x44>;
+ shunt-resistor = <1000>;
+ };
+ ina226@41 {
+ compatible = "ti,ina226";
+ #io-channel-cells = <1>;
+ label = "lpddr_vdd";
+ reg = <0x41>;
+ shunt-resistor = <1000>;
+ };
+ ina226@48 {
+ compatible = "ti,ina226";
+ #io-channel-cells = <1>;
+ label = "dc_vdd";
+ reg = <0x48>;
+ shunt-resistor = <1000>;
+ };
+};
+
+&d0_aon_i2c1 {
+ /* serdes clk buffer rc22514a */
+ status = "okay";
+};
+
+&pwm0 {
+ /* fan */
+ status = "okay";
+};
+
+&pvt0 {
+ status = "okay";
+};
+
+&pvt1 {
+ status = "okay";
+};
+
+&wdt0 {
+ status = "disabled";
+};
+
+&wdt1 {
+ status = "disabled";
+};
+
+&wdt2 {
+ status = "disabled";
+};
+
+&wdt3 {
+ status = "disabled";
+};
+
+&die0_rtc {
+ status = "okay";
+};
+
+&timer0 {
+ status = "okay";
+};
+
+&timer1 {
+ status = "okay";
+};
+
+&timer2 {
+ status = "okay";
+};
+
+&timer3 {
+ status = "okay";
+};
+
+&pinctrl {
+ status = "okay";
+};
+
+/* GPIO Function Description
+
+ gpio0 : pcie prstn(I)
+ gpio11 : tmp alert(I)
+ gpio13 : tf card detect(I)
+ gpio14 : gphy1 resetn(O)
+ gpio15 : gphy0 resetn(O)
+ gpio18 : ina226 alert(I)
+ gpio20 : lcd touch int(I)
+ gpio21 : head phone plug/unplug detection2(I)
+ gpio27 : black light pwr_en(O)
+ gpio28 : head phone plug/unplug detection1(I)
+ gpio68 : fan pwm(O)
+ gpio69 : fan touch(I)
+ gpio92 : frex gp0(O)
+ gpio93 : frex gp1(O)
+ gpio106 : mipi dsi resetn(O)
+ gpio111 : lcd touch resetn(O)
+*/
+
+&gpio0 {
+ status = "okay";
+};
+&dev_llc_d0{
+ apply_npu_high_freq;
+};
+
diff --git a/arch/riscv/boot/dts/eswin/eic7702-evb-a1-d1.dts b/arch/riscv/boot/dts/eswin/eic7702-evb-a1-d1.dts
new file mode 100644
index 000000000000..cd069bc2da76
--- /dev/null
+++ b/arch/riscv/boot/dts/eswin/eic7702-evb-a1-d1.dts
@@ -0,0 +1,828 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for Eswin EIC7702 SoC only active die1.
+ *
+ * Copyright 2024, Beijing ESWIN Computing Technology Co., Ltd.. All rights reserved.
+ * SPDX-License-Identifier: GPL-2.0
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 2.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+/dts-v1/;
+
+#define RTCCLK_FREQ 1000000
+#define LSPCLK_FREQ 200000000
+
+/* If wanna enable ECC capability of DDR, should reserve highest zone of 1/8 all space for it */
+#define MEMORY_SIZE_H 0x4
+#define MEMORY_SIZE_L 0x0
+#define CMA_SIZE 0x20000000
+
+#include "eswin-win2030-die0-soc.dtsi"
+#include "eic7700-pinctrl.dtsi"
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/* Clock frequency (in Hz) of the PCB crystal for rtcclk */
+
+/ {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ model = "ESWIN EIC7700";
+ compatible = "sifive,hifive-unmatched-a00", "sifive,fu740-c000",
+ "sifive,fu740", "eswin,eic7700";
+
+ aliases {
+ serial0 = &d0_uart0;
+ ethernet0 = &d0_gmac0;
+ ethernet1 = &d0_gmac1;
+ rtc0 = &die0_rtc;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ cpus {
+ timebase-frequency = <RTCCLK_FREQ>;
+ };
+
+ memory@59000000 {
+ device_type = "memory";
+ reg = <0x0 0x59000000 0x0 0x400000>;
+ numa-node-id = <0>;
+ };
+
+ memory@80000000 {
+ device_type = "memory";
+ reg = <0x0 0x80000000 MEMORY_SIZE_H MEMORY_SIZE_L>;
+ numa-node-id = <0>;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ linux,cma {
+ compatible = "shared-dma-pool";
+ reusable;
+ size = <0x0 CMA_SIZE>;
+ alignment = <0x0 0x1000>;
+ alloc-ranges = <0x0 0x80000000 MEMORY_SIZE_H MEMORY_SIZE_L>;
+ linux,cma-default;
+ };
+
+ npu0_reserved: sprammemory@59000000 {
+ no-map;
+ reg = <0x0 0x59000000 0x0 0x400000>;
+ };
+
+ g2d_4GB_boundary_reserved_4k {
+ no-map;
+ reg = <0x0 0xfffff000 0x0 0x1000>;
+ };
+
+ g2d_8GB_boundary_reserved_4k {
+ no-map;
+ reg = <0x1 0xfffff000 0x0 0x1000>;
+ };
+
+ g2d_12GB_boundary_reserved_4k {
+ no-map;
+ reg = <0x2 0xfffff000 0x0 0x1000>;
+ };
+
+ mmz_nid_0_part_0 {
+ compatible = "eswin-reserve-memory";
+ reg = <0x3 0x0 0x1 0x80000000>;
+ no-map;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio68_default>;
+
+ gpio-68 {
+ gpios = <&portc 4 GPIO_ACTIVE_LOW>;
+ label = "heartbeat";
+ linux,default-trigger = "heartbeat";
+ };
+ };
+};
+
+&d0_clock {
+ status = "okay";
+};
+
+&d0_reset {
+ status = "okay";
+};
+
+&d0_pmu {
+ status = "okay";
+};
+
+&ddr0 {
+ status = "okay";
+};
+
+&ddr1 {
+ status = "okay";
+};
+
+&smmu0 {
+ status = "okay";
+};
+
+&smmu_pmu0 {
+ status = "disabled";
+};
+
+&dev_foo_a {
+ status = "okay";
+};
+
+&d0_cfg_noc {
+ status = "okay";
+};
+
+&d0_llc_noc {
+ status = "okay";
+ stat,0 = "TracePort:ddr0_p0_req";
+ stat,1 = "TracePort:ddr1_p0_req";
+ //latency,0 = "TracePort:llcnoc_trans_probe";
+ //pending,0 = "TracePort:llcnoc_trans_probe";
+};
+
+&d0_sys_noc {
+ status = "okay";
+
+ //eswin,DSPT-qos-owner;
+ //eswin,NPU-qos-owner;
+ //eswin,SPISLV_TBU3-qos-owner;
+
+ stat,0 = "TracePort:ddr0_p1_req",
+ "InitFlow:mcput_snoc_mp/I/0";
+
+ stat,1 = "TracePort:ddr0_p2_req",
+ "InitFlow:dspt_snoc/I/0",
+ "AddrBase:0x81000000", "AddrSize:0x30",
+ "Opcode:RdWrLockUrg", "Status:ReqRsp", "Length:0x8000", "Urgency:0x0";
+
+ stat,2 = "TracePort:ddr1_p1_req",
+ "Status:Req", "AddrSize:0x28";
+
+ stat,3 = "TracePort:ddr1_p2_req";
+
+ latency,0 = "TracePort:sysnoc_trans_probe_0", "AddrSize:0x0";
+ latency,1 = "TracePort:sysnoc_trans_probe_1","Mode:latency","AddrBase:0x82000000","AddrSize:0x28","Opcode:RdWr";
+ //latency,2 = "TracePort:sysnoc_trans_probe_2";
+
+ //pending,0 = "TracePort:sysnoc_trans_probe_0";
+ //pending,1 = "TracePort:sysnoc_trans_probe_1","Mode:latency","AddrBase:0x82000000","AddrSize:0x0","Opcode:RdWr";
+ pending,0 = "TracePort:sysnoc_trans_probe_2", "AddrSize:0x3";
+};
+
+&d0_media_noc {
+ status = "okay";
+
+ //eswin,GPU-qos-owner;
+ //eswin,TBU2-qos-owner;
+ //eswin,VC-qos-owner;
+
+ stat,0 = "TracePort:ddr0_p3_req";
+ stat,1 = "TracePort:ddr1_p3_req";
+ //latency,0 = "TracePort:mnoc_trans_probe";
+ //pending,0 = "TracePort:mnoc_trans_probe";
+};
+
+&d0_realtime_noc {
+ status = "okay";
+
+ //eswin,TBU0-qos-owner;
+ //eswin,VO-qos-owner;
+
+ stat,0 = "TracePort:ddr0_p4_req";
+ stat,1 = "TracePort:ddr1_p4_req";
+ //latency,0 = "TracePort:rnoc_trans_probe";
+ //pending,0 = "TracePort:rnoc_trans_probe";
+};
+
+&d0_noc_wdt {
+ status = "okay";
+};
+
+&d0_ipc_scpu {
+ status = "okay";
+};
+
+&d0_lpcpu {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&d0_npu{
+ status = "okay";
+};
+
+&d0_dsp_subsys {
+ status = "okay";
+};
+
+&d0_dsp0 {
+ status = "okay";
+};
+
+&d0_dsp1 {
+ status = "okay";
+};
+
+&d0_dsp2 {
+ status = "okay";
+};
+
+&d0_dsp3 {
+ status = "okay";
+};
+
+&gpu0 {
+ status = "okay";
+};
+
+&gc820 {
+ status = "okay";
+};
+
+&vdec0 {
+ status = "okay";
+};
+
+&venc0 {
+ status = "okay";
+};
+
+&video_output {
+ status = "okay";
+};
+
+&dc {
+ status = "okay";
+};
+
+&dc_test {
+ status = "disabled";
+};
+
+&virtual_display {
+ status = "okay";
+};
+
+&dsi_output {
+ status = "okay";
+};
+
+&dsi_controller {
+ status = "okay";
+};
+
+&dsi_panel {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio69_default &pinctrl_gpio21_default>;
+ backlight0-gpios = <&portc 5 GPIO_ACTIVE_HIGH>;
+ rst-gpios = <&porta 21 GPIO_ACTIVE_HIGH>;
+};
+
+&dw_hdmi {
+ status = "okay";
+ ports {
+ port@2 {
+ reg = <2>;
+ hdmi_in_i2s: endpoint@1 {
+ system-clock-frequency = <12288000>;
+ remote-endpoint = <&d0_i2s0_endpoint>;
+ };
+ };
+ };
+};
+
+&dw_hdmi_hdcp2 {
+ status = "okay";
+};
+
+&d0_i2s0 {
+ status = "okay";
+ d0_i2s0_port: port {
+ d0_i2s0_endpoint: endpoint {
+ remote-endpoint = <&hdmi_in_i2s>;
+ dai-format = "i2s";
+ };
+ };
+};
+
+&d0_i2s1 {
+ status = "okay";
+ d0_i2s1_port: port {
+ d0_i2s1_endpoint: endpoint {
+ remote-endpoint = <&d0_codec0_endpoint>;
+ dai-format = "i2s";
+ };
+ };
+};
+
+&d0_i2s2 {
+ status = "okay";
+ d0_i2s2_port: port {
+ d0_i2s2_endpoint: endpoint {
+ remote-endpoint = <&d0_codec1_endpoint>;
+ dai-format = "i2s";
+ };
+ };
+};
+
+&d0_graphcard0 {
+ status = "okay";
+ label = "Analog Audio-0";
+ dais = <&d0_i2s1_port>;
+};
+
+&d0_graphcard1 {
+ status = "okay";
+ label = "Analog Audio-1";
+ dais = <&d0_i2s2_port>;
+};
+
+&d0_graphcard2 {
+ status = "okay";
+ label = "HDMI Audio";
+ dais = <&d0_i2s0_port>;
+};
+
+&isp_0 {
+ status = "okay";
+};
+
+&isp_1 {
+ status = "okay";
+};
+
+&dewarp {
+ status = "okay";
+};
+
+&mipi_dphy_rx {
+ status = "okay";
+};
+
+&csi_dma0 {
+ status = "okay";
+};
+
+&csi_dma1 {
+ status = "disabled";
+};
+
+&csi2_0 {
+ status = "okay";
+};
+
+&csi2_1 {
+ status = "disabled";
+};
+
+&sdhci_emmc {
+ /* emmc */
+ status = "okay";
+ delay_code = <0x17>;
+ drive-impedance-ohm = <50>;
+ enable-cmd-pullup;
+ enable-data-pullup;
+ no-sdio;
+ no-sd;
+};
+
+&sdio0 {
+ /* wifi module */
+ status = "okay";
+ delay_code = <0x29>;
+ drive-impedance-ohm = <33>;
+ enable-cmd-pullup;
+ enable-data-pullup;
+ keep-power-in-suspend;
+ non-removable;
+ no-sd;
+ no-mmc;
+};
+
+&sdio1 {
+ /* unused */
+ status = "disabled";
+};
+
+&d0_gmac0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio13_default>;
+ rst-gpios = <&porta 13 GPIO_ACTIVE_LOW>;
+ eswin,rgmiisel = <&pinctrl 0x290 0x3>;
+ eswin,led-cfgs = <0x6100 0xa40 0x420>;
+
+ status = "okay";
+};
+
+&d0_gmac1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio14_default>;
+ rst-gpios = <&porta 14 GPIO_ACTIVE_LOW>;
+ eswin,rgmiisel = <&pinctrl 0x294 0x3>;
+ eswin,led-cfgs = <0x6100 0xa40 0x420>;
+
+ status = "okay";
+};
+
+&d0_sata {
+ status = "okay";
+};
+
+&d0_usbdrd3_0 {
+ status = "okay";
+};
+
+&d0_usbdrd_dwc3_0 {
+ status = "okay";
+ dr_mode = "host";
+ maximum-speed = "super-speed";
+};
+
+&d0_usbdrd3_1 {
+ status = "okay";
+};
+
+&d0_usbdrd_dwc3_1 {
+ status = "okay";
+ dr_mode = "host";
+ maximum-speed = "super-speed";
+};
+
+&d0_dmac0 {
+ status = "okay";
+};
+
+&d0_aon_dmac {
+ status = "okay";
+};
+
+&d0_uart0 {
+ /* debug */
+ status = "okay";
+};
+
+&d0_uart1 {
+ /* m.2 key */
+ status = "okay";
+};
+
+&d0_uart2 {
+ /* pin header */
+ status = "okay";
+};
+
+&d0_uart3 {
+ /* unused */
+ status = "disabled";
+};
+
+&d0_uart4 {
+ /* unused */
+ status = "disabled";
+};
+
+&ssi0 {
+ /* spi flash */
+ status = "okay";
+ num-cs = <2>;
+ spi-flash@0 {
+ compatible = "winbond,w25q128fw",
+ "jedec,spi-nor";
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <4800000>;
+ rx-sample-delay-ns = <10>;
+ };
+ spi-flash@1 {
+ compatible = "winbond,w25q128fw",
+ "jedec,spi-nor";
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <4800000>;
+ rx-sample-delay-ns = <10>;
+ };
+};
+
+&ssi1 {
+ /* unused */
+ status = "disabled";
+};
+
+&bootspi {
+ /* spi flash */
+ status = "okay";
+ num-cs = <1>;
+ cs-gpios = <&portd 0 GPIO_ACTIVE_LOW>;
+ wp-gpios = <&portd 4 GPIO_ACTIVE_LOW>;
+ spi-flash@0 {
+ compatible = "winbond,w25q128jw",
+ "jedec,spi-nor";
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <4800000>;
+ rx-sample-delay-ns = <10>;
+ };
+};
+
+&d0_mbox0 {
+ status = "okay";
+};
+
+&d0_mbox1 {
+ status = "okay";
+};
+
+&d0_mbox2 {
+ status = "okay";
+};
+
+&d0_mbox3 {
+ status = "okay";
+};
+
+&d0_mbox4 {
+ status = "okay";
+};
+
+&d0_mbox5 {
+ status = "okay";
+};
+
+&d0_mbox6 {
+ status = "okay";
+};
+
+&d0_mbox7 {
+ status = "okay";
+};
+
+&fan_control {
+ status = "okay";
+};
+
+&d0_i2c0 {
+ /* codec es8388 */
+ status = "okay";
+ d0_es8388_0: es8388-0@10 {
+ compatible = "eswin,es8388";
+ reg = <0x10>;
+ #sound-dai-cells = <0>;
+ port {
+ d0_codec0_endpoint: endpoint {
+ system-clock-frequency = <12288000>;
+ remote-endpoint = <&d0_i2s1_endpoint>;
+ };
+ };
+ };
+ d0_es8388_1: es8388-1@11 {
+ compatible = "eswin,es8388";
+ reg = <0x11>;
+ #sound-dai-cells = <0>;
+ port {
+ d0_codec1_endpoint: endpoint {
+ system-clock-frequency = <12288000>;
+ remote-endpoint = <&d0_i2s2_endpoint>;
+ };
+ };
+ };
+};
+
+&d0_i2c1 {
+ /* mpq8785 */
+ status = "okay";
+ mpq8785@10 {
+ compatible = "mps,mpq8785";
+ reg = <0x10>;
+ eswin,regulator_default-microvolt=<1000000>;
+ eswin,regulator_label = "supply vdd1", "npu vdd1", "npu current1", "npu temperature1";
+ label = "npu_vdd";
+ regulators{
+ npu_vcc1:npu_svcc{
+ regulator-name="NPU_SVCC";
+ regulator-min-microvolt=<700000>;
+ regulator-max-microvolt=<1100000>;
+ regulator-min-microamp=<20000000>;
+ regulator-max-microamp=<40000000>;
+ regulator-ov-protection-microvolt=<1100000>;
+ regulator-always-on;
+ };
+ };
+ };
+};
+
+&d0_i2c2 {
+ /* mipi dsi */
+ status = "disabled";
+};
+
+&d0_i2c3 {
+ /* mipi csi0/csi1 */
+ status = "okay";
+};
+
+&d0_i2c4 {
+ /* mipi csi2/csi3 */
+ status = "disabled";
+};
+
+&d0_i2c5 {
+ /* io extended for mipi csi */
+ status = "okay";
+ tca6416_0: gpio@20 {
+ compatible = "ti,tca6416";
+ reg = <0x20>;
+ gpio-controller; /* IRQ not connected */
+ #gpio-cells = <2>;
+ gpio-line-names = "MIPI_CSI0_PWDN", "MIPI_CSI0_RESET", "MIPI_CSI1_FBC", "MIPI_CSI1_ENB",
+ "MIPI_CSI1_RESET", "MIPI_CSI1_PWDN", "FREX_GP0", "",
+ "MIPI_CSI0_ENB", "MIPI_CSI0_FBC", "FREX_GP2", "MIPI_CSI2_FBC",
+ "MIPI_CSI2_ENB", "FREX_GP1", "MIPI_CSI2_RESET", "MIPI_CSI2_PWDN";
+ };
+ tca6416_1: gpio@21 {
+ compatible = "ti,tca6416";
+ reg = <0x21>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ /* IRQ not connected */
+ gpio-line-names = "MIPI_CSI3_PWDN", "MIPI_CSI3_RESET", "MIPI_CSI3_ENB", "MIPI_CSI3_FBC",
+ "MIPI_CSI4_PWDN", "MIPI_CSI4_RESET", "MIPI_CSI4_ENB", "MIPI_CSI4_FBC",
+ "MIPI_CSI5_FBC", "MIPI_CSI5_ENB", "MIPI_CSI5_RESET", "MIPI_CSI5_PWDN",
+ "", "", "", "";
+ };
+};
+
+&d0_i2c6 {
+ /* unused */
+ status = "disabled";
+};
+
+&d0_i2c7 {
+ /* unused */
+ status = "disabled";
+};
+
+&d0_i2c8 {
+ /* unused */
+ status = "disabled";
+};
+
+&d0_i2c9 {
+ /* unused */
+ status = "disabled";
+};
+
+&d0_aon_i2c0 {
+ /* ina226x4 & tmp102aidrlr */
+ status = "okay";
+ i2c-sda-hold-time-ns = <0x40>;
+ ina226@45 {
+ compatible = "ti,ina226";
+ #io-channel-cells = <1>;
+ label = "cpu_vdd";
+ reg = <0x45>;
+ shunt-resistor = <1000>;
+ };
+ ina226@44 {
+ compatible = "ti,ina226";
+ #io-channel-cells = <1>;
+ label = "soc_vdd";
+ reg = <0x44>;
+ shunt-resistor = <1000>;
+ };
+ ina226@41 {
+ compatible = "ti,ina226";
+ #io-channel-cells = <1>;
+ label = "lpddr_vdd";
+ reg = <0x41>;
+ shunt-resistor = <1000>;
+ };
+ ina226@48 {
+ compatible = "ti,ina226";
+ #io-channel-cells = <1>;
+ label = "dc_vdd";
+ reg = <0x48>;
+ shunt-resistor = <1000>;
+ };
+};
+
+&d0_aon_i2c1 {
+ /* syr838pkc */
+ status = "okay";
+};
+
+&pwm0 {
+ /* fan */
+ status = "okay";
+};
+
+&pvt0 {
+ status = "okay";
+};
+
+&pvt1 {
+ status = "okay";
+};
+
+&wdt0 {
+ status = "disabled";
+};
+
+&wdt1 {
+ status = "disabled";
+};
+
+&wdt2 {
+ status = "disabled";
+};
+
+&wdt3 {
+ status = "disabled";
+};
+
+&die0_rtc {
+ status = "okay";
+};
+
+&timer0 {
+ status = "okay";
+};
+
+&timer1 {
+ status = "okay";
+};
+
+&timer2 {
+ status = "okay";
+};
+
+&timer3 {
+ status = "okay";
+};
+
+&pinctrl {
+ status = "okay";
+};
+
+/* GPIO Function Description
+
+ gpio0 : lcd touch int(I)
+ gpio13 : gphy0 resetn(O)
+ gpio14 : gphy1 resetn(O)
+ gpio15 : bt wake host(I)
+ gpio16 : sdio wifi disable(O)
+ gpio18 : sdio wifi wake host(I)
+ gpio19 : pcie prstn(I)
+ gpio20 : head phone plug/unplug detection2(I)
+ gpio21 : mipi dsi resetn(O)
+ gpio27 : tmp alert(I)
+ gpio28 : head phone plug/unplug detection1(I)
+ gpio68 : system led(O)
+ gpio69 : black light pwr_en(O)
+ gpio92 : frex gp0(O)
+ gpio93 : frex gp1(O)
+ gpio106 : host wak bt(O)
+ gpio111 : lcd touch resetn(O)
+*/
+
+&gpio0 {
+ status = "okay";
+};
+&dev_llc_d0{
+ apply_npu_high_freq;
+};
+
--
2.47.0