aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKanak Shilledar <kanakshilledar@gmail.com>2024-07-05 15:04:59 +0530
committerDrew Fustini <drew@pdp7.com>2024-07-31 17:27:00 -0700
commit32121e158449f0b6d6ab6b2e63b22d9d80471563 (patch)
tree950c8f070aac596bb628de40f4ea7cb0c44ce85a
parentLinux 6.11-rc1 (diff)
downloadwireguard-linux-32121e158449f0b6d6ab6b2e63b22d9d80471563.tar.xz
wireguard-linux-32121e158449f0b6d6ab6b2e63b22d9d80471563.zip
riscv: dts: thead: add basic spi node
created spi0 node with fixed clock. the spi0 node uses synopsis designware driver and has the following compatible "snps,dw-apb-ssi". the spi0 node is connected to a SPI NOR flash pad which is left unpopulated on the back side of the board. Acked-by: Drew Fustini <drew@pdp7.com> Signed-off-by: Kanak Shilledar <kanakshilledar@gmail.com> Signed-off-by: Drew Fustini <drew@pdp7.com>
-rw-r--r--arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts9
-rw-r--r--arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi4
-rw-r--r--arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts5
-rw-r--r--arch/riscv/boot/dts/thead/th1520.dtsi16
4 files changed, 34 insertions, 0 deletions
diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts
index d9b4de9e4757..b4d2e1d69bdb 100644
--- a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts
+++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts
@@ -23,6 +23,7 @@
serial3 = &uart3;
serial4 = &uart4;
serial5 = &uart5;
+ spi0 = &spi0;
};
chosen {
@@ -52,6 +53,10 @@
clock-frequency = <198000000>;
};
+&spi_clk {
+ clock-frequency = <396000000>;
+};
+
&uart_sclk {
clock-frequency = <100000000>;
};
@@ -79,3 +84,7 @@
&uart0 {
status = "okay";
};
+
+&spi0 {
+ status = "okay";
+};
diff --git a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi
index 1365d3a512a3..6939bd36560c 100644
--- a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi
+++ b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi
@@ -33,6 +33,10 @@
clock-frequency = <198000000>;
};
+&spi_clk {
+ clock-frequency = <396000000>;
+};
+
&uart_sclk {
clock-frequency = <100000000>;
};
diff --git a/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts b/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts
index 9a3884a73e13..7738d2895c5a 100644
--- a/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts
+++ b/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts
@@ -20,6 +20,7 @@
serial3 = &uart3;
serial4 = &uart4;
serial5 = &uart5;
+ spi0 = &spi0;
};
chosen {
@@ -30,3 +31,7 @@
&uart0 {
status = "okay";
};
+
+&spi0 {
+ status = "okay";
+};
diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi
index 3c9974062c20..aa703da30fc3 100644
--- a/arch/riscv/boot/dts/thead/th1520.dtsi
+++ b/arch/riscv/boot/dts/thead/th1520.dtsi
@@ -221,6 +221,12 @@
#clock-cells = <0>;
};
+ spi_clk: spi-clock {
+ compatible = "fixed-clock";
+ clock-output-names = "spi_clk";
+ #clock-cells = <0>;
+ };
+
uart_sclk: uart-sclk-clock {
compatible = "fixed-clock";
clock-output-names = "uart_sclk";
@@ -264,6 +270,16 @@
<&cpu3_intc 3>, <&cpu3_intc 7>;
};
+ spi0: spi@ffe700c000 {
+ compatible = "thead,th1520-spi", "snps,dw-apb-ssi";
+ reg = <0xff 0xe700c000 0x0 0x1000>;
+ interrupts = <54 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&spi_clk>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
uart0: serial@ffe7014000 {
compatible = "snps,dw-apb-uart";
reg = <0xff 0xe7014000 0x0 0x100>;