Skip to content

Commit b1f2a34

Browse files
sycamoremoonRevySR
authored andcommitted
FROMLIST: riscv: dts: sophgo: Add SPI NOR node for SG2042
Add SPI-NOR controller and flash nodes to device tree for SG2042. Signed-off-by: Zixian Zeng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Han Gao <[email protected]>
1 parent 648d3ab commit b1f2a34

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,30 @@
138138
status = "okay";
139139
};
140140

141+
&spifmc0 {
142+
status = "okay";
143+
144+
flash@0 {
145+
compatible = "jedec,spi-nor";
146+
reg = <0>;
147+
spi-max-frequency = <100000000>;
148+
spi-tx-bus-width = <4>;
149+
spi-rx-bus-width = <4>;
150+
};
151+
};
152+
153+
&spifmc1 {
154+
status = "okay";
155+
156+
flash@0 {
157+
compatible = "jedec,spi-nor";
158+
reg = <0>;
159+
spi-max-frequency = <100000000>;
160+
spi-tx-bus-width = <4>;
161+
spi-rx-bus-width = <4>;
162+
};
163+
};
164+
141165
&uart0 {
142166
pinctrl-0 = <&uart0_cfg>;
143167
pinctrl-names = "default";

arch/riscv/boot/dts/sophgo/sg2042.dtsi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,30 @@
4848
interrupt-parent = <&intc>;
4949
ranges;
5050

51+
spifmc0: spi@7000180000 {
52+
compatible = "sophgo,sg2042-spifmc-nor";
53+
reg = <0x70 0x00180000 0x0 0x1000000>;
54+
#address-cells = <1>;
55+
#size-cells = <0>;
56+
clocks = <&clkgen GATE_CLK_AHB_SF>;
57+
interrupt-parent = <&intc>;
58+
interrupts = <108 IRQ_TYPE_LEVEL_HIGH>;
59+
resets = <&rstgen RST_SF0>;
60+
status = "disabled";
61+
};
62+
63+
spifmc1: spi@7002180000 {
64+
compatible = "sophgo,sg2042-spifmc-nor";
65+
reg = <0x70 0x02180000 0x0 0x1000000>;
66+
#address-cells = <1>;
67+
#size-cells = <0>;
68+
clocks = <&clkgen GATE_CLK_AHB_SF>;
69+
interrupt-parent = <&intc>;
70+
interrupts = <109 IRQ_TYPE_LEVEL_HIGH>;
71+
resets = <&rstgen RST_SF1>;
72+
status = "disabled";
73+
};
74+
5175
i2c0: i2c@7030005000 {
5276
compatible = "snps,designware-i2c";
5377
reg = <0x70 0x30005000 0x0 0x1000>;

0 commit comments

Comments
 (0)