Skip to content

Commit d40a2f5

Browse files
committed
Merge tag 'riscv-dt-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/dt
RISC-V Devicetrees for v6.4 Microchip: A "fix" for the system controller's regs on PolarFire SoC, adding a missing reg property. The patch had been sitting there for months and I only re-found it recently, so you can guess how much of a "fix" it actually is. It'll become needed when the system controller's QSPI gets added in the future, but at present there's no urgency as the driver can handle both the current and "fixed" versions. StarFive: Basic support for the JH7110 & the associated first-party dev board, the VisionFive v2 (in two forms). There's a bunch of dt-bindings required for this too, all of which have had input from the DT folk. There's enough in this tag to boot to a console w/ an initramfs but little more. The SoC supports some of the "new" bit manipulation instructions, which is a good test for the recently added Zbb support in the kernel. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> * tag 'riscv-dt-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree riscv: dts: starfive: Add StarFive JH7110 pin function definitions riscv: dts: starfive: Add initial StarFive JH7110 device tree dt-bindings: riscv: Add SiFive S7 compatible dt-bindings: interrupt-controller: Add StarFive JH7110 plic dt-bindings: timer: Add StarFive JH7110 clint dt-bindings: clock: Add StarFive JH7110 always-on clock and reset generator dt-bindings: clock: Add StarFive JH7110 system clock and reset generator riscv: dts: microchip: fix the mpfs' mailbox regs riscv: dts: microchip: add mpfs specific macb reset support Link: https://lore.kernel.org/r/20230406-shank-impromptu-3d483bbc249f@spud Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents acda89d + 4cd4beb commit d40a2f5

14 files changed

Lines changed: 1650 additions & 4 deletions

File tree

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/starfive,jh7110-aoncrg.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: StarFive JH7110 Always-On Clock and Reset Generator
8+
9+
maintainers:
10+
- Emil Renner Berthing <kernel@esmil.dk>
11+
12+
properties:
13+
compatible:
14+
const: starfive,jh7110-aoncrg
15+
16+
reg:
17+
maxItems: 1
18+
19+
clocks:
20+
oneOf:
21+
- items:
22+
- description: Main Oscillator (24 MHz)
23+
- description: GMAC0 RMII reference or GMAC0 RGMII RX
24+
- description: STG AXI/AHB
25+
- description: APB Bus
26+
- description: GMAC0 GTX
27+
28+
- items:
29+
- description: Main Oscillator (24 MHz)
30+
- description: GMAC0 RMII reference or GMAC0 RGMII RX
31+
- description: STG AXI/AHB or GMAC0 RGMII RX
32+
- description: APB Bus or STG AXI/AHB
33+
- description: GMAC0 GTX or APB Bus
34+
- description: RTC Oscillator (32.768 kHz) or GMAC0 GTX
35+
36+
- items:
37+
- description: Main Oscillator (24 MHz)
38+
- description: GMAC0 RMII reference
39+
- description: GMAC0 RGMII RX
40+
- description: STG AXI/AHB
41+
- description: APB Bus
42+
- description: GMAC0 GTX
43+
- description: RTC Oscillator (32.768 kHz)
44+
45+
clock-names:
46+
oneOf:
47+
- minItems: 5
48+
items:
49+
- const: osc
50+
- enum:
51+
- gmac0_rmii_refin
52+
- gmac0_rgmii_rxin
53+
- const: stg_axiahb
54+
- const: apb_bus
55+
- const: gmac0_gtxclk
56+
- const: rtc_osc
57+
58+
- minItems: 6
59+
items:
60+
- const: osc
61+
- const: gmac0_rmii_refin
62+
- const: gmac0_rgmii_rxin
63+
- const: stg_axiahb
64+
- const: apb_bus
65+
- const: gmac0_gtxclk
66+
- const: rtc_osc
67+
68+
'#clock-cells':
69+
const: 1
70+
description:
71+
See <dt-bindings/clock/starfive,jh7110-crg.h> for valid indices.
72+
73+
'#reset-cells':
74+
const: 1
75+
description:
76+
See <dt-bindings/reset/starfive,jh7110-crg.h> for valid indices.
77+
78+
required:
79+
- compatible
80+
- reg
81+
- clocks
82+
- clock-names
83+
- '#clock-cells'
84+
- '#reset-cells'
85+
86+
additionalProperties: false
87+
88+
examples:
89+
- |
90+
#include <dt-bindings/clock/starfive,jh7110-crg.h>
91+
92+
clock-controller@17000000 {
93+
compatible = "starfive,jh7110-aoncrg";
94+
reg = <0x17000000 0x10000>;
95+
clocks = <&osc>, <&gmac0_rmii_refin>,
96+
<&gmac0_rgmii_rxin>,
97+
<&syscrg JH7110_SYSCLK_STG_AXIAHB>,
98+
<&syscrg JH7110_SYSCLK_APB_BUS>,
99+
<&syscrg JH7110_SYSCLK_GMAC0_GTXCLK>,
100+
<&rtc_osc>;
101+
clock-names = "osc", "gmac0_rmii_refin",
102+
"gmac0_rgmii_rxin", "stg_axiahb",
103+
"apb_bus", "gmac0_gtxclk",
104+
"rtc_osc";
105+
#clock-cells = <1>;
106+
#reset-cells = <1>;
107+
};
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/starfive,jh7110-syscrg.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: StarFive JH7110 System Clock and Reset Generator
8+
9+
maintainers:
10+
- Emil Renner Berthing <kernel@esmil.dk>
11+
12+
properties:
13+
compatible:
14+
const: starfive,jh7110-syscrg
15+
16+
reg:
17+
maxItems: 1
18+
19+
clocks:
20+
oneOf:
21+
- items:
22+
- description: Main Oscillator (24 MHz)
23+
- description: GMAC1 RMII reference or GMAC1 RGMII RX
24+
- description: External I2S TX bit clock
25+
- description: External I2S TX left/right channel clock
26+
- description: External I2S RX bit clock
27+
- description: External I2S RX left/right channel clock
28+
- description: External TDM clock
29+
- description: External audio master clock
30+
31+
- items:
32+
- description: Main Oscillator (24 MHz)
33+
- description: GMAC1 RMII reference
34+
- description: GMAC1 RGMII RX
35+
- description: External I2S TX bit clock
36+
- description: External I2S TX left/right channel clock
37+
- description: External I2S RX bit clock
38+
- description: External I2S RX left/right channel clock
39+
- description: External TDM clock
40+
- description: External audio master clock
41+
42+
clock-names:
43+
oneOf:
44+
- items:
45+
- const: osc
46+
- enum:
47+
- gmac1_rmii_refin
48+
- gmac1_rgmii_rxin
49+
- const: i2stx_bclk_ext
50+
- const: i2stx_lrck_ext
51+
- const: i2srx_bclk_ext
52+
- const: i2srx_lrck_ext
53+
- const: tdm_ext
54+
- const: mclk_ext
55+
56+
- items:
57+
- const: osc
58+
- const: gmac1_rmii_refin
59+
- const: gmac1_rgmii_rxin
60+
- const: i2stx_bclk_ext
61+
- const: i2stx_lrck_ext
62+
- const: i2srx_bclk_ext
63+
- const: i2srx_lrck_ext
64+
- const: tdm_ext
65+
- const: mclk_ext
66+
67+
'#clock-cells':
68+
const: 1
69+
description:
70+
See <dt-bindings/clock/starfive,jh7110-crg.h> for valid indices.
71+
72+
'#reset-cells':
73+
const: 1
74+
description:
75+
See <dt-bindings/reset/starfive,jh7110-crg.h> for valid indices.
76+
77+
required:
78+
- compatible
79+
- reg
80+
- clocks
81+
- clock-names
82+
- '#clock-cells'
83+
- '#reset-cells'
84+
85+
additionalProperties: false
86+
87+
examples:
88+
- |
89+
clock-controller@13020000 {
90+
compatible = "starfive,jh7110-syscrg";
91+
reg = <0x13020000 0x10000>;
92+
clocks = <&osc>, <&gmac1_rmii_refin>,
93+
<&gmac1_rgmii_rxin>,
94+
<&i2stx_bclk_ext>, <&i2stx_lrck_ext>,
95+
<&i2srx_bclk_ext>, <&i2srx_lrck_ext>,
96+
<&tdm_ext>, <&mclk_ext>;
97+
clock-names = "osc", "gmac1_rmii_refin",
98+
"gmac1_rgmii_rxin",
99+
"i2stx_bclk_ext", "i2stx_lrck_ext",
100+
"i2srx_bclk_ext", "i2srx_lrck_ext",
101+
"tdm_ext", "mclk_ext";
102+
#clock-cells = <1>;
103+
#reset-cells = <1>;
104+
};

Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ properties:
5959
- enum:
6060
- sifive,fu540-c000-plic
6161
- starfive,jh7100-plic
62+
- starfive,jh7110-plic
6263
- canaan,k210-plic
6364
- const: sifive,plic-1.0.0
6465
- items:

Documentation/devicetree/bindings/riscv/cpus.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ properties:
3535
- sifive,e7
3636
- sifive,e71
3737
- sifive,rocket0
38+
- sifive,s7
3839
- sifive,u5
3940
- sifive,u54
4041
- sifive,u7

Documentation/devicetree/bindings/timer/sifive,clint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ properties:
3131
- enum:
3232
- sifive,fu540-c000-clint
3333
- starfive,jh7100-clint
34+
- starfive,jh7110-clint
3435
- canaan,k210-clint
3536
- const: sifive,clint0
3637
- items:

arch/riscv/boot/dts/microchip/mpfs.dtsi

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@
234234
reg = <0x0 0x20002000 0x0 0x1000>, <0x0 0x3E001000 0x0 0x1000>;
235235
clocks = <&refclk>;
236236
#clock-cells = <1>;
237+
#reset-cells = <1>;
237238
};
238239

239240
ccc_se: clock-controller@38010000 {
@@ -415,7 +416,7 @@
415416
};
416417

417418
mac0: ethernet@20110000 {
418-
compatible = "cdns,macb";
419+
compatible = "microchip,mpfs-macb", "cdns,macb";
419420
reg = <0x0 0x20110000 0x0 0x2000>;
420421
#address-cells = <1>;
421422
#size-cells = <0>;
@@ -424,11 +425,12 @@
424425
local-mac-address = [00 00 00 00 00 00];
425426
clocks = <&clkcfg CLK_MAC0>, <&clkcfg CLK_AHB>;
426427
clock-names = "pclk", "hclk";
428+
resets = <&clkcfg CLK_MAC0>;
427429
status = "disabled";
428430
};
429431

430432
mac1: ethernet@20112000 {
431-
compatible = "cdns,macb";
433+
compatible = "microchip,mpfs-macb", "cdns,macb";
432434
reg = <0x0 0x20112000 0x0 0x2000>;
433435
#address-cells = <1>;
434436
#size-cells = <0>;
@@ -437,6 +439,7 @@
437439
local-mac-address = [00 00 00 00 00 00];
438440
clocks = <&clkcfg CLK_MAC1>, <&clkcfg CLK_AHB>;
439441
clock-names = "pclk", "hclk";
442+
resets = <&clkcfg CLK_MAC1>;
440443
status = "disabled";
441444
};
442445

@@ -498,7 +501,8 @@
498501

499502
mbox: mailbox@37020000 {
500503
compatible = "microchip,mpfs-mailbox";
501-
reg = <0x0 0x37020000 0x0 0x1000>, <0x0 0x2000318C 0x0 0x40>;
504+
reg = <0x0 0x37020000 0x0 0x58>, <0x0 0x2000318C 0x0 0x40>,
505+
<0x0 0x37020800 0x0 0x100>;
502506
interrupt-parent = <&plic>;
503507
interrupts = <96>;
504508
#mbox-cells = <1>;
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-beaglev-starlight.dtb jh7100-starfive-visionfive-v1.dtb
2+
dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-beaglev-starlight.dtb
3+
dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-starfive-visionfive-v1.dtb
4+
5+
dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.2a.dtb
6+
dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.3b.dtb

0 commit comments

Comments
 (0)