Commit 2981deb8 authored by Palmer Dabbelt's avatar Palmer Dabbelt

RISC-V: PolarFire SoC Device Tree Updates

This add a device tree for Sundance Polarberry, along with various
cleanups to the PolarFire SOC device trees and bindings.

Link: https://lore.kernel.org/r/20220509142610.128590-1-conor.dooley@microchip.com

* 'riscv-pfsoc-dt' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/palmer/linux:
  riscv: dts: icicle: sort nodes alphabetically
  riscv: microchip: icicle: readability fixes
  riscv: dts: microchip: add the sundance polarberry
  dt-bindings: riscv: microchip: add polarberry compatible string
  dt-bindings: vendor-prefixes: add Sundance DSP
  riscv: dts: microchip: make the fabric dtsi board specific
  dt-bindings: riscv: microchip: document icicle reference design
  riscv: dts: microchip: remove soc vendor from filenames
  riscv: dts: microchip: move sysctrlr out of soc bus
  riscv: dts: microchip: remove icicle memory clocks
parents 35b51afd df403b7c
...@@ -20,6 +20,8 @@ properties: ...@@ -20,6 +20,8 @@ properties:
items: items:
- enum: - enum:
- microchip,mpfs-icicle-kit - microchip,mpfs-icicle-kit
- microchip,mpfs-icicle-reference-rtlv2203
- sundance,polarberry
- const: microchip,mpfs - const: microchip,mpfs
additionalProperties: true additionalProperties: true
......
...@@ -1207,6 +1207,8 @@ patternProperties: ...@@ -1207,6 +1207,8 @@ patternProperties:
description: Summit microelectronics description: Summit microelectronics
"^sunchip,.*": "^sunchip,.*":
description: Shenzhen Sunchip Technology Co., Ltd description: Shenzhen Sunchip Technology Co., Ltd
"^sundance,.*":
description: Sundance DSP Inc.
"^sunplus,.*": "^sunplus,.*":
description: Sunplus Technology Co., Ltd. description: Sunplus Technology Co., Ltd.
"^SUNW,.*": "^SUNW,.*":
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += microchip-mpfs-icicle-kit.dtb dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += mpfs-icicle-kit.dtb
dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += mpfs-polarberry.dtb
obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y)) obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
/* Copyright (c) 2020-2021 Microchip Technology Inc */ /* Copyright (c) 2020-2021 Microchip Technology Inc */
/ { / {
compatible = "microchip,mpfs-icicle-reference-rtlv2203", "microchip,mpfs";
core_pwm0: pwm@41000000 { core_pwm0: pwm@41000000 {
compatible = "microchip,corepwm-rtl-v4"; compatible = "microchip,corepwm-rtl-v4";
reg = <0x0 0x41000000 0x0 0xF0>; reg = <0x0 0x41000000 0x0 0xF0>;
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
/dts-v1/; /dts-v1/;
#include "microchip-mpfs.dtsi" #include "mpfs.dtsi"
#include "mpfs-icicle-kit-fabric.dtsi"
/* Clock frequency (in Hz) of the rtcclk */ /* Clock frequency (in Hz) of the rtcclk */
#define RTCCLK_FREQ 1000000 #define RTCCLK_FREQ 1000000
...@@ -32,41 +33,71 @@ cpus { ...@@ -32,41 +33,71 @@ cpus {
ddrc_cache_lo: memory@80000000 { ddrc_cache_lo: memory@80000000 {
device_type = "memory"; device_type = "memory";
reg = <0x0 0x80000000 0x0 0x2e000000>; reg = <0x0 0x80000000 0x0 0x2e000000>;
clocks = <&clkcfg CLK_DDRC>;
status = "okay"; status = "okay";
}; };
ddrc_cache_hi: memory@1000000000 { ddrc_cache_hi: memory@1000000000 {
device_type = "memory"; device_type = "memory";
reg = <0x10 0x0 0x0 0x40000000>; reg = <0x10 0x0 0x0 0x40000000>;
clocks = <&clkcfg CLK_DDRC>;
status = "okay"; status = "okay";
}; };
}; };
&refclk { &core_pwm0 {
clock-frequency = <125000000>; status = "okay";
}; };
&mmuart1 { &gpio2 {
interrupts = <53>, <53>, <53>, <53>,
<53>, <53>, <53>, <53>,
<53>, <53>, <53>, <53>,
<53>, <53>, <53>, <53>,
<53>, <53>, <53>, <53>,
<53>, <53>, <53>, <53>,
<53>, <53>, <53>, <53>,
<53>, <53>, <53>, <53>;
status = "okay"; status = "okay";
}; };
&mmuart2 { &i2c0 {
status = "okay"; status = "okay";
}; };
&mmuart3 { &i2c1 {
status = "okay"; status = "okay";
}; };
&mmuart4 { &i2c2 {
status = "okay"; status = "okay";
}; };
&mmc { &mac0 {
phy-mode = "sgmii";
phy-handle = <&phy0>;
status = "okay";
};
&mac1 {
phy-mode = "sgmii";
phy-handle = <&phy1>;
status = "okay"; status = "okay";
phy1: ethernet-phy@9 {
reg = <9>;
ti,fifo-depth = <0x1>;
};
phy0: ethernet-phy@8 {
reg = <8>;
ti,fifo-depth = <0x1>;
};
};
&mbox {
status = "okay";
};
&mmc {
bus-width = <4>; bus-width = <4>;
disable-wp; disable-wp;
cap-sd-highspeed; cap-sd-highspeed;
...@@ -78,73 +109,46 @@ &mmc { ...@@ -78,73 +109,46 @@ &mmc {
sd-uhs-sdr25; sd-uhs-sdr25;
sd-uhs-sdr50; sd-uhs-sdr50;
sd-uhs-sdr104; sd-uhs-sdr104;
};
&spi0 {
status = "okay"; status = "okay";
}; };
&spi1 { &mmuart1 {
status = "okay"; status = "okay";
}; };
&qspi { &mmuart2 {
status = "okay"; status = "okay";
}; };
&i2c0 { &mmuart3 {
status = "okay"; status = "okay";
}; };
&i2c1 { &mmuart4 {
status = "okay"; status = "okay";
}; };
&i2c2 { &pcie {
status = "okay"; status = "okay";
}; };
&mac0 { &qspi {
phy-mode = "sgmii";
phy-handle = <&phy0>;
};
&mac1 {
status = "okay"; status = "okay";
phy-mode = "sgmii";
phy-handle = <&phy1>;
phy1: ethernet-phy@9 {
reg = <9>;
ti,fifo-depth = <0x1>;
};
phy0: ethernet-phy@8 {
reg = <8>;
ti,fifo-depth = <0x1>;
};
}; };
&gpio2 { &refclk {
interrupts = <53>, <53>, <53>, <53>, clock-frequency = <125000000>;
<53>, <53>, <53>, <53>,
<53>, <53>, <53>, <53>,
<53>, <53>, <53>, <53>,
<53>, <53>, <53>, <53>,
<53>, <53>, <53>, <53>,
<53>, <53>, <53>, <53>,
<53>, <53>, <53>, <53>;
status = "okay";
}; };
&rtc { &rtc {
status = "okay"; status = "okay";
}; };
&usb { &spi0 {
status = "okay"; status = "okay";
dr_mode = "host";
}; };
&mbox { &spi1 {
status = "okay"; status = "okay";
}; };
...@@ -152,10 +156,7 @@ &syscontroller { ...@@ -152,10 +156,7 @@ &syscontroller {
status = "okay"; status = "okay";
}; };
&pcie { &usb {
status = "okay";
};
&core_pwm0 {
status = "okay"; status = "okay";
dr_mode = "host";
}; };
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2020-2022 Microchip Technology Inc */
/ {
fabric_clk3: fabric-clk3 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <62500000>;
};
fabric_clk1: fabric-clk1 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <125000000>;
};
};
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2020-2022 Microchip Technology Inc */
/dts-v1/;
#include "mpfs.dtsi"
#include "mpfs-polarberry-fabric.dtsi"
/* Clock frequency (in Hz) of the rtcclk */
#define MTIMER_FREQ 1000000
/ {
model = "Sundance PolarBerry";
compatible = "sundance,polarberry", "microchip,mpfs";
aliases {
ethernet0 = &mac1;
serial0 = &mmuart0;
};
chosen {
stdout-path = "serial0:115200n8";
};
cpus {
timebase-frequency = <MTIMER_FREQ>;
};
ddrc_cache_lo: memory@80000000 {
device_type = "memory";
reg = <0x0 0x80000000 0x0 0x2e000000>;
};
ddrc_cache_hi: memory@1000000000 {
device_type = "memory";
reg = <0x10 0x00000000 0x0 0xC0000000>;
};
};
/*
* phy0 is connected to mac0, but the port itself is on the (optional) carrier
* board.
*/
&mac0 {
phy-mode = "sgmii";
phy-handle = <&phy0>;
status = "disabled";
};
&mac1 {
phy-mode = "sgmii";
phy-handle = <&phy1>;
status = "okay";
phy1: ethernet-phy@5 {
reg = <5>;
ti,fifo-depth = <0x01>;
};
phy0: ethernet-phy@4 {
reg = <4>;
ti,fifo-depth = <0x01>;
};
};
&mbox {
status = "okay";
};
&mmc {
bus-width = <4>;
disable-wp;
cap-sd-highspeed;
cap-mmc-highspeed;
card-detect-delay = <200>;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
sd-uhs-sdr12;
sd-uhs-sdr25;
sd-uhs-sdr50;
sd-uhs-sdr104;
status = "okay";
};
&mmuart0 {
status = "okay";
};
&refclk {
clock-frequency = <125000000>;
};
&rtc {
status = "okay";
};
&syscontroller {
status = "okay";
};
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
/dts-v1/; /dts-v1/;
#include "dt-bindings/clock/microchip,mpfs-clock.h" #include "dt-bindings/clock/microchip,mpfs-clock.h"
#include "microchip-mpfs-fabric.dtsi"
/ { / {
#address-cells = <2>; #address-cells = <2>;
...@@ -146,6 +145,11 @@ refclk: mssrefclk { ...@@ -146,6 +145,11 @@ refclk: mssrefclk {
#clock-cells = <0>; #clock-cells = <0>;
}; };
syscontroller: syscontroller {
compatible = "microchip,mpfs-sys-controller";
mboxes = <&mbox 0>;
};
soc { soc {
#address-cells = <2>; #address-cells = <2>;
#size-cells = <2>; #size-cells = <2>;
...@@ -446,10 +450,5 @@ mbox: mailbox@37020000 { ...@@ -446,10 +450,5 @@ mbox: mailbox@37020000 {
#mbox-cells = <1>; #mbox-cells = <1>;
status = "disabled"; status = "disabled";
}; };
syscontroller: syscontroller {
compatible = "microchip,mpfs-sys-controller";
mboxes = <&mbox 0>;
};
}; };
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment