Skip to content

Commit 74fb20c

Browse files
littleqypConchuOD
authored andcommitted
riscv: dts: starfive: Add spi node and pins configuration
Add StarFive JH7110 SPI controller node and pins configuration on VisionFive 2 board. Signed-off-by: William Qiu <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
1 parent e126aa3 commit 74fb20c

File tree

2 files changed

+155
-0
lines changed

2 files changed

+155
-0
lines changed

arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,18 @@
185185
status = "okay";
186186
};
187187

188+
&spi0 {
189+
pinctrl-names = "default";
190+
pinctrl-0 = <&spi0_pins>;
191+
status = "okay";
192+
193+
spi_dev0: spi@0 {
194+
compatible = "rohm,dh2228fv";
195+
reg = <0>;
196+
spi-max-frequency = <10000000>;
197+
};
198+
};
199+
188200
&sysgpio {
189201
i2c0_pins: i2c0-0 {
190202
i2c-pins {
@@ -242,6 +254,44 @@
242254
};
243255
};
244256

257+
spi0_pins: spi0-0 {
258+
mosi-pins {
259+
pinmux = <GPIOMUX(52, GPOUT_SYS_SPI0_TXD,
260+
GPOEN_ENABLE,
261+
GPI_NONE)>;
262+
bias-disable;
263+
input-disable;
264+
input-schmitt-disable;
265+
};
266+
267+
miso-pins {
268+
pinmux = <GPIOMUX(53, GPOUT_LOW,
269+
GPOEN_DISABLE,
270+
GPI_SYS_SPI0_RXD)>;
271+
bias-pull-up;
272+
input-enable;
273+
input-schmitt-enable;
274+
};
275+
276+
sck-pins {
277+
pinmux = <GPIOMUX(48, GPOUT_SYS_SPI0_CLK,
278+
GPOEN_ENABLE,
279+
GPI_SYS_SPI0_CLK)>;
280+
bias-disable;
281+
input-disable;
282+
input-schmitt-disable;
283+
};
284+
285+
ss-pins {
286+
pinmux = <GPIOMUX(48, GPOUT_SYS_SPI0_FSS,
287+
GPOEN_ENABLE,
288+
GPI_SYS_SPI0_FSS)>;
289+
bias-disable;
290+
input-disable;
291+
input-schmitt-disable;
292+
};
293+
};
294+
245295
uart0_pins: uart0-0 {
246296
tx-pins {
247297
pinmux = <GPIOMUX(5, GPOUT_SYS_UART0_TX,

arch/riscv/boot/dts/starfive/jh7110.dtsi

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,51 @@
446446
status = "disabled";
447447
};
448448

449+
spi0: spi@10060000 {
450+
compatible = "arm,pl022", "arm,primecell";
451+
reg = <0x0 0x10060000 0x0 0x10000>;
452+
clocks = <&syscrg JH7110_SYSCLK_SPI0_APB>,
453+
<&syscrg JH7110_SYSCLK_SPI0_APB>;
454+
clock-names = "sspclk", "apb_pclk";
455+
resets = <&syscrg JH7110_SYSRST_SPI0_APB>;
456+
interrupts = <38>;
457+
arm,primecell-periphid = <0x00041022>;
458+
num-cs = <1>;
459+
#address-cells = <1>;
460+
#size-cells = <0>;
461+
status = "disabled";
462+
};
463+
464+
spi1: spi@10070000 {
465+
compatible = "arm,pl022", "arm,primecell";
466+
reg = <0x0 0x10070000 0x0 0x10000>;
467+
clocks = <&syscrg JH7110_SYSCLK_SPI1_APB>,
468+
<&syscrg JH7110_SYSCLK_SPI1_APB>;
469+
clock-names = "sspclk", "apb_pclk";
470+
resets = <&syscrg JH7110_SYSRST_SPI1_APB>;
471+
interrupts = <39>;
472+
arm,primecell-periphid = <0x00041022>;
473+
num-cs = <1>;
474+
#address-cells = <1>;
475+
#size-cells = <0>;
476+
status = "disabled";
477+
};
478+
479+
spi2: spi@10080000 {
480+
compatible = "arm,pl022", "arm,primecell";
481+
reg = <0x0 0x10080000 0x0 0x10000>;
482+
clocks = <&syscrg JH7110_SYSCLK_SPI2_APB>,
483+
<&syscrg JH7110_SYSCLK_SPI2_APB>;
484+
clock-names = "sspclk", "apb_pclk";
485+
resets = <&syscrg JH7110_SYSRST_SPI2_APB>;
486+
interrupts = <40>;
487+
arm,primecell-periphid = <0x00041022>;
488+
num-cs = <1>;
489+
#address-cells = <1>;
490+
#size-cells = <0>;
491+
status = "disabled";
492+
};
493+
449494
usb0: usb@10100000 {
450495
compatible = "starfive,jh7110-usb";
451496
ranges = <0x0 0x0 0x10100000 0x100000>;
@@ -610,6 +655,66 @@
610655
status = "disabled";
611656
};
612657

658+
spi3: spi@12070000 {
659+
compatible = "arm,pl022", "arm,primecell";
660+
reg = <0x0 0x12070000 0x0 0x10000>;
661+
clocks = <&syscrg JH7110_SYSCLK_SPI3_APB>,
662+
<&syscrg JH7110_SYSCLK_SPI3_APB>;
663+
clock-names = "sspclk", "apb_pclk";
664+
resets = <&syscrg JH7110_SYSRST_SPI3_APB>;
665+
interrupts = <52>;
666+
arm,primecell-periphid = <0x00041022>;
667+
num-cs = <1>;
668+
#address-cells = <1>;
669+
#size-cells = <0>;
670+
status = "disabled";
671+
};
672+
673+
spi4: spi@12080000 {
674+
compatible = "arm,pl022", "arm,primecell";
675+
reg = <0x0 0x12080000 0x0 0x10000>;
676+
clocks = <&syscrg JH7110_SYSCLK_SPI4_APB>,
677+
<&syscrg JH7110_SYSCLK_SPI4_APB>;
678+
clock-names = "sspclk", "apb_pclk";
679+
resets = <&syscrg JH7110_SYSRST_SPI4_APB>;
680+
interrupts = <53>;
681+
arm,primecell-periphid = <0x00041022>;
682+
num-cs = <1>;
683+
#address-cells = <1>;
684+
#size-cells = <0>;
685+
status = "disabled";
686+
};
687+
688+
spi5: spi@12090000 {
689+
compatible = "arm,pl022", "arm,primecell";
690+
reg = <0x0 0x12090000 0x0 0x10000>;
691+
clocks = <&syscrg JH7110_SYSCLK_SPI5_APB>,
692+
<&syscrg JH7110_SYSCLK_SPI5_APB>;
693+
clock-names = "sspclk", "apb_pclk";
694+
resets = <&syscrg JH7110_SYSRST_SPI5_APB>;
695+
interrupts = <54>;
696+
arm,primecell-periphid = <0x00041022>;
697+
num-cs = <1>;
698+
#address-cells = <1>;
699+
#size-cells = <0>;
700+
status = "disabled";
701+
};
702+
703+
spi6: spi@120a0000 {
704+
compatible = "arm,pl022", "arm,primecell";
705+
reg = <0x0 0x120A0000 0x0 0x10000>;
706+
clocks = <&syscrg JH7110_SYSCLK_SPI6_APB>,
707+
<&syscrg JH7110_SYSCLK_SPI6_APB>;
708+
clock-names = "sspclk", "apb_pclk";
709+
resets = <&syscrg JH7110_SYSRST_SPI6_APB>;
710+
interrupts = <55>;
711+
arm,primecell-periphid = <0x00041022>;
712+
num-cs = <1>;
713+
#address-cells = <1>;
714+
#size-cells = <0>;
715+
status = "disabled";
716+
};
717+
613718
sfctemp: temperature-sensor@120e0000 {
614719
compatible = "starfive,jh7110-temp";
615720
reg = <0x0 0x120e0000 0x0 0x10000>;

0 commit comments

Comments
 (0)