Skip to content

Commit 1f4a994

Browse files
inochisaarndb
authored andcommitted
riscv: dts: sophgo: separate sg2042 mtime and mtimecmp to fit aclint format
Change the timer layout in the dtb to fit the format that needed by the SBI. Fixes: 967a94a ("riscv: dts: add initial Sophgo SG2042 SoC device tree") Reviewed-by: Chen Wang <[email protected]> Reviewed-by: Guo Ren <[email protected]> Signed-off-by: Inochi Amaoto <[email protected]> Signed-off-by: Chen Wang <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 0d1d824 commit 1f4a994

File tree

1 file changed

+48
-32
lines changed

1 file changed

+48
-32
lines changed

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

Lines changed: 48 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -93,144 +93,160 @@
9393
<&cpu63_intc 3>;
9494
};
9595

96-
clint_mtimer0: timer@70ac000000 {
96+
clint_mtimer0: timer@70ac004000 {
9797
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
98-
reg = <0x00000070 0xac000000 0x00000000 0x00007ff8>;
98+
reg = <0x00000070 0xac004000 0x00000000 0x0000c000>;
99+
reg-names = "mtimecmp";
99100
interrupts-extended = <&cpu0_intc 7>,
100101
<&cpu1_intc 7>,
101102
<&cpu2_intc 7>,
102103
<&cpu3_intc 7>;
103104
};
104105

105-
clint_mtimer1: timer@70ac010000 {
106+
clint_mtimer1: timer@70ac014000 {
106107
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
107-
reg = <0x00000070 0xac010000 0x00000000 0x00007ff8>;
108+
reg = <0x00000070 0xac014000 0x00000000 0x0000c000>;
109+
reg-names = "mtimecmp";
108110
interrupts-extended = <&cpu4_intc 7>,
109111
<&cpu5_intc 7>,
110112
<&cpu6_intc 7>,
111113
<&cpu7_intc 7>;
112114
};
113115

114-
clint_mtimer2: timer@70ac020000 {
116+
clint_mtimer2: timer@70ac024000 {
115117
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
116-
reg = <0x00000070 0xac020000 0x00000000 0x00007ff8>;
118+
reg = <0x00000070 0xac024000 0x00000000 0x0000c000>;
119+
reg-names = "mtimecmp";
117120
interrupts-extended = <&cpu8_intc 7>,
118121
<&cpu9_intc 7>,
119122
<&cpu10_intc 7>,
120123
<&cpu11_intc 7>;
121124
};
122125

123-
clint_mtimer3: timer@70ac030000 {
126+
clint_mtimer3: timer@70ac034000 {
124127
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
125-
reg = <0x00000070 0xac030000 0x00000000 0x00007ff8>;
128+
reg = <0x00000070 0xac034000 0x00000000 0x0000c000>;
129+
reg-names = "mtimecmp";
126130
interrupts-extended = <&cpu12_intc 7>,
127131
<&cpu13_intc 7>,
128132
<&cpu14_intc 7>,
129133
<&cpu15_intc 7>;
130134
};
131135

132-
clint_mtimer4: timer@70ac040000 {
136+
clint_mtimer4: timer@70ac044000 {
133137
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
134-
reg = <0x00000070 0xac040000 0x00000000 0x00007ff8>;
138+
reg = <0x00000070 0xac044000 0x00000000 0x0000c000>;
139+
reg-names = "mtimecmp";
135140
interrupts-extended = <&cpu16_intc 7>,
136141
<&cpu17_intc 7>,
137142
<&cpu18_intc 7>,
138143
<&cpu19_intc 7>;
139144
};
140145

141-
clint_mtimer5: timer@70ac050000 {
146+
clint_mtimer5: timer@70ac054000 {
142147
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
143-
reg = <0x00000070 0xac050000 0x00000000 0x00007ff8>;
148+
reg = <0x00000070 0xac054000 0x00000000 0x0000c000>;
149+
reg-names = "mtimecmp";
144150
interrupts-extended = <&cpu20_intc 7>,
145151
<&cpu21_intc 7>,
146152
<&cpu22_intc 7>,
147153
<&cpu23_intc 7>;
148154
};
149155

150-
clint_mtimer6: timer@70ac060000 {
156+
clint_mtimer6: timer@70ac064000 {
151157
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
152-
reg = <0x00000070 0xac060000 0x00000000 0x00007ff8>;
158+
reg = <0x00000070 0xac064000 0x00000000 0x0000c000>;
159+
reg-names = "mtimecmp";
153160
interrupts-extended = <&cpu24_intc 7>,
154161
<&cpu25_intc 7>,
155162
<&cpu26_intc 7>,
156163
<&cpu27_intc 7>;
157164
};
158165

159-
clint_mtimer7: timer@70ac070000 {
166+
clint_mtimer7: timer@70ac074000 {
160167
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
161-
reg = <0x00000070 0xac070000 0x00000000 0x00007ff8>;
168+
reg = <0x00000070 0xac074000 0x00000000 0x0000c000>;
169+
reg-names = "mtimecmp";
162170
interrupts-extended = <&cpu28_intc 7>,
163171
<&cpu29_intc 7>,
164172
<&cpu30_intc 7>,
165173
<&cpu31_intc 7>;
166174
};
167175

168-
clint_mtimer8: timer@70ac080000 {
176+
clint_mtimer8: timer@70ac084000 {
169177
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
170-
reg = <0x00000070 0xac080000 0x00000000 0x00007ff8>;
178+
reg = <0x00000070 0xac084000 0x00000000 0x0000c000>;
179+
reg-names = "mtimecmp";
171180
interrupts-extended = <&cpu32_intc 7>,
172181
<&cpu33_intc 7>,
173182
<&cpu34_intc 7>,
174183
<&cpu35_intc 7>;
175184
};
176185

177-
clint_mtimer9: timer@70ac090000 {
186+
clint_mtimer9: timer@70ac094000 {
178187
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
179-
reg = <0x00000070 0xac090000 0x00000000 0x00007ff8>;
188+
reg = <0x00000070 0xac094000 0x00000000 0x0000c000>;
189+
reg-names = "mtimecmp";
180190
interrupts-extended = <&cpu36_intc 7>,
181191
<&cpu37_intc 7>,
182192
<&cpu38_intc 7>,
183193
<&cpu39_intc 7>;
184194
};
185195

186-
clint_mtimer10: timer@70ac0a0000 {
196+
clint_mtimer10: timer@70ac0a4000 {
187197
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
188-
reg = <0x00000070 0xac0a0000 0x00000000 0x00007ff8>;
198+
reg = <0x00000070 0xac0a4000 0x00000000 0x0000c000>;
199+
reg-names = "mtimecmp";
189200
interrupts-extended = <&cpu40_intc 7>,
190201
<&cpu41_intc 7>,
191202
<&cpu42_intc 7>,
192203
<&cpu43_intc 7>;
193204
};
194205

195-
clint_mtimer11: timer@70ac0b0000 {
206+
clint_mtimer11: timer@70ac0b4000 {
196207
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
197-
reg = <0x00000070 0xac0b0000 0x00000000 0x00007ff8>;
208+
reg = <0x00000070 0xac0b4000 0x00000000 0x0000c000>;
209+
reg-names = "mtimecmp";
198210
interrupts-extended = <&cpu44_intc 7>,
199211
<&cpu45_intc 7>,
200212
<&cpu46_intc 7>,
201213
<&cpu47_intc 7>;
202214
};
203215

204-
clint_mtimer12: timer@70ac0c0000 {
216+
clint_mtimer12: timer@70ac0c4000 {
205217
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
206-
reg = <0x00000070 0xac0c0000 0x00000000 0x00007ff8>;
218+
reg = <0x00000070 0xac0c4000 0x00000000 0x0000c000>;
219+
reg-names = "mtimecmp";
207220
interrupts-extended = <&cpu48_intc 7>,
208221
<&cpu49_intc 7>,
209222
<&cpu50_intc 7>,
210223
<&cpu51_intc 7>;
211224
};
212225

213-
clint_mtimer13: timer@70ac0d0000 {
226+
clint_mtimer13: timer@70ac0d4000 {
214227
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
215-
reg = <0x00000070 0xac0d0000 0x00000000 0x00007ff8>;
228+
reg = <0x00000070 0xac0d4000 0x00000000 0x0000c000>;
229+
reg-names = "mtimecmp";
216230
interrupts-extended = <&cpu52_intc 7>,
217231
<&cpu53_intc 7>,
218232
<&cpu54_intc 7>,
219233
<&cpu55_intc 7>;
220234
};
221235

222-
clint_mtimer14: timer@70ac0e0000 {
236+
clint_mtimer14: timer@70ac0e4000 {
223237
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
224-
reg = <0x00000070 0xac0e0000 0x00000000 0x00007ff8>;
238+
reg = <0x00000070 0xac0e4000 0x00000000 0x0000c000>;
239+
reg-names = "mtimecmp";
225240
interrupts-extended = <&cpu56_intc 7>,
226241
<&cpu57_intc 7>,
227242
<&cpu58_intc 7>,
228243
<&cpu59_intc 7>;
229244
};
230245

231-
clint_mtimer15: timer@70ac0f0000 {
246+
clint_mtimer15: timer@70ac0f4000 {
232247
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
233-
reg = <0x00000070 0xac0f0000 0x00000000 0x00007ff8>;
248+
reg = <0x00000070 0xac0f4000 0x00000000 0x0000c000>;
249+
reg-names = "mtimecmp";
234250
interrupts-extended = <&cpu60_intc 7>,
235251
<&cpu61_intc 7>,
236252
<&cpu62_intc 7>,

0 commit comments

Comments
 (0)