Skip to content

Commit 8f8f7bc

Browse files
committed
Merge tag 'riscv-sophgo-dt-for-v6.20' of https://github.com/sophgo/linux into soc/dt
RISC-V/Sophgo Devicetrees for v6.20 Sophgo: For CV18xx serials: Update RX/TX FIFO size to fix the USB transfer issue. For SG2042: Optimize the DTS file format, including moving PLIC/CLINT nodes into cpu dtsi and sorting peripheral nodes by address. In addition, we also enable RTC for Pioneerbox. For SG2044: Add "b" ISA extension to fix dtbs_check warnings. Signed-off-by: Chen Wang <unicorn_wang@outlook.com> * tag 'riscv-sophgo-dt-for-v6.20' of https://github.com/sophgo/linux: riscv: dts: sophgo: sg2044: Add "b" ISA extension riscv: dts: sophgo: fix the node order of SG2042 peripheral riscv: dts: sophgo: Move PLIC and CLINT node into CPU dtsi riscv: dts: sophgo: enable hardware clock (RTC) on the Milk-V Pioneer riscv: dts: sophgo: cv180x: fix USB dwc2 FIFO sizes Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents 1092e5c + f16ae81 commit 8f8f7bc

5 files changed

Lines changed: 544 additions & 521 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,8 @@
438438
clocks = <&clk CLK_AXI4_USB>, <&clk CLK_APB_USB>;
439439
clock-names = "otg", "utmi";
440440
g-np-tx-fifo-size = <32>;
441-
g-rx-fifo-size = <536>;
442-
g-tx-fifo-size = <768 512 512 384 128 128>;
441+
g-rx-fifo-size = <1536>;
442+
g-tx-fifo-size = <128 128 64 64 64 64 32 32>;
443443
interrupts = <SOC_PERIPHERAL_IRQ(14) IRQ_TYPE_LEVEL_HIGH>;
444444
phys = <&usbphy>;
445445
phy-names = "usb2-phy";

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

Lines changed: 305 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2189,4 +2189,309 @@
21892189
cache-unified;
21902190
};
21912191
};
2192+
2193+
soc {
2194+
intc: interrupt-controller@7090000000 {
2195+
compatible = "sophgo,sg2042-plic", "thead,c900-plic";
2196+
#address-cells = <0>;
2197+
#interrupt-cells = <2>;
2198+
reg = <0x00000070 0x90000000 0x00000000 0x04000000>;
2199+
interrupt-controller;
2200+
interrupts-extended =
2201+
<&cpu0_intc 11>, <&cpu0_intc 9>,
2202+
<&cpu1_intc 11>, <&cpu1_intc 9>,
2203+
<&cpu2_intc 11>, <&cpu2_intc 9>,
2204+
<&cpu3_intc 11>, <&cpu3_intc 9>,
2205+
<&cpu4_intc 11>, <&cpu4_intc 9>,
2206+
<&cpu5_intc 11>, <&cpu5_intc 9>,
2207+
<&cpu6_intc 11>, <&cpu6_intc 9>,
2208+
<&cpu7_intc 11>, <&cpu7_intc 9>,
2209+
<&cpu8_intc 11>, <&cpu8_intc 9>,
2210+
<&cpu9_intc 11>, <&cpu9_intc 9>,
2211+
<&cpu10_intc 11>, <&cpu10_intc 9>,
2212+
<&cpu11_intc 11>, <&cpu11_intc 9>,
2213+
<&cpu12_intc 11>, <&cpu12_intc 9>,
2214+
<&cpu13_intc 11>, <&cpu13_intc 9>,
2215+
<&cpu14_intc 11>, <&cpu14_intc 9>,
2216+
<&cpu15_intc 11>, <&cpu15_intc 9>,
2217+
<&cpu16_intc 11>, <&cpu16_intc 9>,
2218+
<&cpu17_intc 11>, <&cpu17_intc 9>,
2219+
<&cpu18_intc 11>, <&cpu18_intc 9>,
2220+
<&cpu19_intc 11>, <&cpu19_intc 9>,
2221+
<&cpu20_intc 11>, <&cpu20_intc 9>,
2222+
<&cpu21_intc 11>, <&cpu21_intc 9>,
2223+
<&cpu22_intc 11>, <&cpu22_intc 9>,
2224+
<&cpu23_intc 11>, <&cpu23_intc 9>,
2225+
<&cpu24_intc 11>, <&cpu24_intc 9>,
2226+
<&cpu25_intc 11>, <&cpu25_intc 9>,
2227+
<&cpu26_intc 11>, <&cpu26_intc 9>,
2228+
<&cpu27_intc 11>, <&cpu27_intc 9>,
2229+
<&cpu28_intc 11>, <&cpu28_intc 9>,
2230+
<&cpu29_intc 11>, <&cpu29_intc 9>,
2231+
<&cpu30_intc 11>, <&cpu30_intc 9>,
2232+
<&cpu31_intc 11>, <&cpu31_intc 9>,
2233+
<&cpu32_intc 11>, <&cpu32_intc 9>,
2234+
<&cpu33_intc 11>, <&cpu33_intc 9>,
2235+
<&cpu34_intc 11>, <&cpu34_intc 9>,
2236+
<&cpu35_intc 11>, <&cpu35_intc 9>,
2237+
<&cpu36_intc 11>, <&cpu36_intc 9>,
2238+
<&cpu37_intc 11>, <&cpu37_intc 9>,
2239+
<&cpu38_intc 11>, <&cpu38_intc 9>,
2240+
<&cpu39_intc 11>, <&cpu39_intc 9>,
2241+
<&cpu40_intc 11>, <&cpu40_intc 9>,
2242+
<&cpu41_intc 11>, <&cpu41_intc 9>,
2243+
<&cpu42_intc 11>, <&cpu42_intc 9>,
2244+
<&cpu43_intc 11>, <&cpu43_intc 9>,
2245+
<&cpu44_intc 11>, <&cpu44_intc 9>,
2246+
<&cpu45_intc 11>, <&cpu45_intc 9>,
2247+
<&cpu46_intc 11>, <&cpu46_intc 9>,
2248+
<&cpu47_intc 11>, <&cpu47_intc 9>,
2249+
<&cpu48_intc 11>, <&cpu48_intc 9>,
2250+
<&cpu49_intc 11>, <&cpu49_intc 9>,
2251+
<&cpu50_intc 11>, <&cpu50_intc 9>,
2252+
<&cpu51_intc 11>, <&cpu51_intc 9>,
2253+
<&cpu52_intc 11>, <&cpu52_intc 9>,
2254+
<&cpu53_intc 11>, <&cpu53_intc 9>,
2255+
<&cpu54_intc 11>, <&cpu54_intc 9>,
2256+
<&cpu55_intc 11>, <&cpu55_intc 9>,
2257+
<&cpu56_intc 11>, <&cpu56_intc 9>,
2258+
<&cpu57_intc 11>, <&cpu57_intc 9>,
2259+
<&cpu58_intc 11>, <&cpu58_intc 9>,
2260+
<&cpu59_intc 11>, <&cpu59_intc 9>,
2261+
<&cpu60_intc 11>, <&cpu60_intc 9>,
2262+
<&cpu61_intc 11>, <&cpu61_intc 9>,
2263+
<&cpu62_intc 11>, <&cpu62_intc 9>,
2264+
<&cpu63_intc 11>, <&cpu63_intc 9>;
2265+
riscv,ndev = <224>;
2266+
};
2267+
2268+
clint_mswi: interrupt-controller@7094000000 {
2269+
compatible = "sophgo,sg2042-aclint-mswi", "thead,c900-aclint-mswi";
2270+
reg = <0x00000070 0x94000000 0x00000000 0x00004000>;
2271+
interrupts-extended = <&cpu0_intc 3>,
2272+
<&cpu1_intc 3>,
2273+
<&cpu2_intc 3>,
2274+
<&cpu3_intc 3>,
2275+
<&cpu4_intc 3>,
2276+
<&cpu5_intc 3>,
2277+
<&cpu6_intc 3>,
2278+
<&cpu7_intc 3>,
2279+
<&cpu8_intc 3>,
2280+
<&cpu9_intc 3>,
2281+
<&cpu10_intc 3>,
2282+
<&cpu11_intc 3>,
2283+
<&cpu12_intc 3>,
2284+
<&cpu13_intc 3>,
2285+
<&cpu14_intc 3>,
2286+
<&cpu15_intc 3>,
2287+
<&cpu16_intc 3>,
2288+
<&cpu17_intc 3>,
2289+
<&cpu18_intc 3>,
2290+
<&cpu19_intc 3>,
2291+
<&cpu20_intc 3>,
2292+
<&cpu21_intc 3>,
2293+
<&cpu22_intc 3>,
2294+
<&cpu23_intc 3>,
2295+
<&cpu24_intc 3>,
2296+
<&cpu25_intc 3>,
2297+
<&cpu26_intc 3>,
2298+
<&cpu27_intc 3>,
2299+
<&cpu28_intc 3>,
2300+
<&cpu29_intc 3>,
2301+
<&cpu30_intc 3>,
2302+
<&cpu31_intc 3>,
2303+
<&cpu32_intc 3>,
2304+
<&cpu33_intc 3>,
2305+
<&cpu34_intc 3>,
2306+
<&cpu35_intc 3>,
2307+
<&cpu36_intc 3>,
2308+
<&cpu37_intc 3>,
2309+
<&cpu38_intc 3>,
2310+
<&cpu39_intc 3>,
2311+
<&cpu40_intc 3>,
2312+
<&cpu41_intc 3>,
2313+
<&cpu42_intc 3>,
2314+
<&cpu43_intc 3>,
2315+
<&cpu44_intc 3>,
2316+
<&cpu45_intc 3>,
2317+
<&cpu46_intc 3>,
2318+
<&cpu47_intc 3>,
2319+
<&cpu48_intc 3>,
2320+
<&cpu49_intc 3>,
2321+
<&cpu50_intc 3>,
2322+
<&cpu51_intc 3>,
2323+
<&cpu52_intc 3>,
2324+
<&cpu53_intc 3>,
2325+
<&cpu54_intc 3>,
2326+
<&cpu55_intc 3>,
2327+
<&cpu56_intc 3>,
2328+
<&cpu57_intc 3>,
2329+
<&cpu58_intc 3>,
2330+
<&cpu59_intc 3>,
2331+
<&cpu60_intc 3>,
2332+
<&cpu61_intc 3>,
2333+
<&cpu62_intc 3>,
2334+
<&cpu63_intc 3>;
2335+
};
2336+
2337+
clint_mtimer0: timer@70ac004000 {
2338+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2339+
reg = <0x00000070 0xac004000 0x00000000 0x0000c000>;
2340+
reg-names = "mtimecmp";
2341+
interrupts-extended = <&cpu0_intc 7>,
2342+
<&cpu1_intc 7>,
2343+
<&cpu2_intc 7>,
2344+
<&cpu3_intc 7>;
2345+
};
2346+
2347+
clint_mtimer1: timer@70ac014000 {
2348+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2349+
reg = <0x00000070 0xac014000 0x00000000 0x0000c000>;
2350+
reg-names = "mtimecmp";
2351+
interrupts-extended = <&cpu4_intc 7>,
2352+
<&cpu5_intc 7>,
2353+
<&cpu6_intc 7>,
2354+
<&cpu7_intc 7>;
2355+
};
2356+
2357+
clint_mtimer2: timer@70ac024000 {
2358+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2359+
reg = <0x00000070 0xac024000 0x00000000 0x0000c000>;
2360+
reg-names = "mtimecmp";
2361+
interrupts-extended = <&cpu8_intc 7>,
2362+
<&cpu9_intc 7>,
2363+
<&cpu10_intc 7>,
2364+
<&cpu11_intc 7>;
2365+
};
2366+
2367+
clint_mtimer3: timer@70ac034000 {
2368+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2369+
reg = <0x00000070 0xac034000 0x00000000 0x0000c000>;
2370+
reg-names = "mtimecmp";
2371+
interrupts-extended = <&cpu12_intc 7>,
2372+
<&cpu13_intc 7>,
2373+
<&cpu14_intc 7>,
2374+
<&cpu15_intc 7>;
2375+
};
2376+
2377+
clint_mtimer4: timer@70ac044000 {
2378+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2379+
reg = <0x00000070 0xac044000 0x00000000 0x0000c000>;
2380+
reg-names = "mtimecmp";
2381+
interrupts-extended = <&cpu16_intc 7>,
2382+
<&cpu17_intc 7>,
2383+
<&cpu18_intc 7>,
2384+
<&cpu19_intc 7>;
2385+
};
2386+
2387+
clint_mtimer5: timer@70ac054000 {
2388+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2389+
reg = <0x00000070 0xac054000 0x00000000 0x0000c000>;
2390+
reg-names = "mtimecmp";
2391+
interrupts-extended = <&cpu20_intc 7>,
2392+
<&cpu21_intc 7>,
2393+
<&cpu22_intc 7>,
2394+
<&cpu23_intc 7>;
2395+
};
2396+
2397+
clint_mtimer6: timer@70ac064000 {
2398+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2399+
reg = <0x00000070 0xac064000 0x00000000 0x0000c000>;
2400+
reg-names = "mtimecmp";
2401+
interrupts-extended = <&cpu24_intc 7>,
2402+
<&cpu25_intc 7>,
2403+
<&cpu26_intc 7>,
2404+
<&cpu27_intc 7>;
2405+
};
2406+
2407+
clint_mtimer7: timer@70ac074000 {
2408+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2409+
reg = <0x00000070 0xac074000 0x00000000 0x0000c000>;
2410+
reg-names = "mtimecmp";
2411+
interrupts-extended = <&cpu28_intc 7>,
2412+
<&cpu29_intc 7>,
2413+
<&cpu30_intc 7>,
2414+
<&cpu31_intc 7>;
2415+
};
2416+
2417+
clint_mtimer8: timer@70ac084000 {
2418+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2419+
reg = <0x00000070 0xac084000 0x00000000 0x0000c000>;
2420+
reg-names = "mtimecmp";
2421+
interrupts-extended = <&cpu32_intc 7>,
2422+
<&cpu33_intc 7>,
2423+
<&cpu34_intc 7>,
2424+
<&cpu35_intc 7>;
2425+
};
2426+
2427+
clint_mtimer9: timer@70ac094000 {
2428+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2429+
reg = <0x00000070 0xac094000 0x00000000 0x0000c000>;
2430+
reg-names = "mtimecmp";
2431+
interrupts-extended = <&cpu36_intc 7>,
2432+
<&cpu37_intc 7>,
2433+
<&cpu38_intc 7>,
2434+
<&cpu39_intc 7>;
2435+
};
2436+
2437+
clint_mtimer10: timer@70ac0a4000 {
2438+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2439+
reg = <0x00000070 0xac0a4000 0x00000000 0x0000c000>;
2440+
reg-names = "mtimecmp";
2441+
interrupts-extended = <&cpu40_intc 7>,
2442+
<&cpu41_intc 7>,
2443+
<&cpu42_intc 7>,
2444+
<&cpu43_intc 7>;
2445+
};
2446+
2447+
clint_mtimer11: timer@70ac0b4000 {
2448+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2449+
reg = <0x00000070 0xac0b4000 0x00000000 0x0000c000>;
2450+
reg-names = "mtimecmp";
2451+
interrupts-extended = <&cpu44_intc 7>,
2452+
<&cpu45_intc 7>,
2453+
<&cpu46_intc 7>,
2454+
<&cpu47_intc 7>;
2455+
};
2456+
2457+
clint_mtimer12: timer@70ac0c4000 {
2458+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2459+
reg = <0x00000070 0xac0c4000 0x00000000 0x0000c000>;
2460+
reg-names = "mtimecmp";
2461+
interrupts-extended = <&cpu48_intc 7>,
2462+
<&cpu49_intc 7>,
2463+
<&cpu50_intc 7>,
2464+
<&cpu51_intc 7>;
2465+
};
2466+
2467+
clint_mtimer13: timer@70ac0d4000 {
2468+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2469+
reg = <0x00000070 0xac0d4000 0x00000000 0x0000c000>;
2470+
reg-names = "mtimecmp";
2471+
interrupts-extended = <&cpu52_intc 7>,
2472+
<&cpu53_intc 7>,
2473+
<&cpu54_intc 7>,
2474+
<&cpu55_intc 7>;
2475+
};
2476+
2477+
clint_mtimer14: timer@70ac0e4000 {
2478+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2479+
reg = <0x00000070 0xac0e4000 0x00000000 0x0000c000>;
2480+
reg-names = "mtimecmp";
2481+
interrupts-extended = <&cpu56_intc 7>,
2482+
<&cpu57_intc 7>,
2483+
<&cpu58_intc 7>,
2484+
<&cpu59_intc 7>;
2485+
};
2486+
2487+
clint_mtimer15: timer@70ac0f4000 {
2488+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
2489+
reg = <0x00000070 0xac0f4000 0x00000000 0x0000c000>;
2490+
reg-names = "mtimecmp";
2491+
interrupts-extended = <&cpu60_intc 7>,
2492+
<&cpu61_intc 7>,
2493+
<&cpu62_intc 7>,
2494+
<&cpu63_intc 7>;
2495+
};
2496+
};
21922497
};

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@
5252
status = "okay";
5353
};
5454

55+
&i2c0 {
56+
pinctrl-0 = <&i2c0_cfg>;
57+
pinctrl-names = "default";
58+
status = "okay";
59+
60+
rtc: rtc@68 {
61+
compatible = "dallas,ds1307";
62+
reg = <0x68>;
63+
};
64+
};
65+
5566
&i2c1 {
5667
pinctrl-0 = <&i2c1_cfg>;
5768
pinctrl-names = "default";
@@ -89,6 +100,16 @@
89100
};
90101
};
91102

103+
i2c0_cfg: i2c0-cfg {
104+
i2c0-pins {
105+
pinmux = <PINMUX(PIN_IIC0_SDA, 0)>,
106+
<PINMUX(PIN_IIC0_SCL, 0)>;
107+
bias-pull-up;
108+
drive-strength-microamp = <26800>;
109+
input-schmitt-enable;
110+
};
111+
};
112+
92113
i2c1_cfg: i2c1-cfg {
93114
i2c1-pins {
94115
pinmux = <PINMUX(PIN_IIC1_SDA, 0)>,

0 commit comments

Comments
 (0)