Add support for MIPS P8700
Subsystems (5)
v4 cover Add support for MIPS P8700
The MIPS P8700 is a multi-core RISC-V microprocessor system, supporting both single-cluster and multi-cluster configurations. [1] This series adds full description of the platform,
including the Boston FPGA board configured with a P8700 bitfile.
The P8700 cores support the RV64GCZba_Zbb (G = IMAFD) Standard ISA, with a caveat: the A extension is only partially supported, and all ZAAMO extension instructions are emulated on the SBI level. The device tree intentionally does not reflect this fact. Vladimir Kondratiev's series improves performance by directly substituting AMO instructions with LR/SC. [4] The two patchsets do not depend on one another.
The board itself is the same board as 'img,boston', configured with a different bitfile [3]. The Boston board has been supported since commit 6e62a888029b ("MIPS: generic: Support MIPS Boston development boards") (thanks to Maciej for finding the ref).
I tested this series both on QEMU and a Boston board configured with a single P8700 CPU,
after applying the necessary U-Boot changes. We are planning on upstreaming these as well.
Following the discussion in [2], I decided to drop the 'gf' prefix for all compatibles and to rework the aclint-mtimer binding.
Links:
[1] https://mips.com/wp-content/uploads/2025/11/P8700-F_Programmers_Reference_Manual-TM.pdf
[2] https://lore.kernel.org/linux-riscv/[email protected]/
[3] https://training.mips.com/cps_mips/Examples/MD00901_Boot-MIPS_Example_Boot_Code_for_MIPS_Cores.pdf
[4] https://lore.kernel.org/all/[email protected]/
---
Changes in v4:
- Add git tree link to the MAINTAINERS entry.
- Require the names of mtimer registers to be 'mtime' and 'mtimecmp', as suggested by Sashiko. Update the commit message to reflect the reasoning for changes in v3, suggested by Conor.
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- Drop the 'gf' vendor prefix patch. The prefix isn't used anywhere.
- Replace 'gf,mips-p8700-*' compatibles with 'mips,p8700-*'
to match those already present in OpenSBI.
Other compatibles are also renamed for consistency.
Match the directory structure and binding names,
by replacing 'gf' with 'mips' everywhere.
- Add a MAINTAINERS entry.
- Change the aclint-mtimer binding, reversing the decision made in v2
and putting 'mtime' first when both 'mtime' and 'mtimecmp' are present.
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Patch 1: Replace "MIPS Technology" with "MIPS Technologies".
- Patch 3: Name the FPGA used and add the versioned bitfile compatible.
- Patch 5: Drop hart indexes from MSWI.
- Patch 6: Swap mtimecmp and mtime, require reg-names both for mtime and mtimecmp on P8700.
- Original patch 7: Dropped.
- Patch 7 (previously 8): Remove additional harts that are not
present in the bitfile I have. Reflect changes made in patches 3, 5 and 6. Remove riscv,cbom-block-size. Drop undocumented compatibles. Other minor changes.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Aleksa Paunovic (8):
dt-bindings: riscv: cpus: add mips,p8700
dt-bindings: riscv: Add MIPS Boston board compatible
dt-bindings: interrupt-controller: Add MIPS P8700 APLIC
dt-bindings: interrupt-controller: Add MIPS P8700 ACLINT MSWI
dt-bindings: timer: Add MIPS P8700 ACLINT MTIMER
riscv: dts: mips: Initial support for the P8700 Boston board
MAINTAINERS: Add entry for MIPS RISC-V SoC support
riscv: defconfig: Enable MIPS SoCs
.../bindings/interrupt-controller/riscv,aplic.yaml | 1 + .../thead,c900-aclint-mswi.yaml | 11 ++ Documentation/devicetree/bindings/riscv/cpus.yaml | 1 + Documentation/devicetree/bindings/riscv/mips.yaml | 33 +++++ .../bindings/timer/thead,c900-aclint-mtimer.yaml | 39 ++++++ MAINTAINERS | 8 ++ arch/riscv/Kconfig.socs | 6 + arch/riscv/boot/dts/Makefile | 1 + arch/riscv/boot/dts/mips/Makefile | 2 + arch/riscv/boot/dts/mips/p8700-boston.dts | 135 +++++++++++++++++++++ arch/riscv/boot/dts/mips/p8700.dtsi | 82 +++++++++++++ arch/riscv/configs/defconfig | 1 + 12 files changed, 320 insertions(+)
---
base-commit: fd73f4a6659897191fa0d40695fe370925dd3780
change-id: 20260325-p8700-dts-41788f014227
Best regards,
Signature · 1 line
Aleksa Paunovic <[email protected]>
PATCH v4 1/8 dt-bindings: riscv: cpus: add mips,p8700
Document the MIPS P8700 compatible.
--- Documentation/devicetree/bindings/riscv/cpus.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/riscv/cpus.yaml +1 -0
@@ -48,6 +48,7 @@ properties: - amd,mbv64 - andestech,ax45mp - canaan,k210 + - mips,p8700 - nuclei,ux900 - sifive,bullet0 - sifive,e5
Signature · 1 line
2.43.0
PATCH v4 2/8 dt-bindings: riscv: Add MIPS Boston board compatible
In reply to Aleksa PaunovicDocument the MIPS Boston board compatible with a P8700 bitfile.
--- Documentation/devicetree/bindings/riscv/mips.yaml | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+)
Documentation/devicetree/bindings/riscv/mips.yaml new file +33 -0
@@ -0,0 +1,33 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/riscv/mips.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MIPS SoC-based boards + +maintainers: + - Djordje Todorovic <[email protected]> + - Aleksa Paunovic <[email protected]> + +description: + MIPS SoC-based boards + +properties: + $nodename: + const: '/' + compatible: + oneOf: + - description: | + Boston FPGA development board with a MIPS P8700 bitfile + + The Boston board carries a Xilinx XC7V2000T FPGA and fixed + peripherals: a Xilinx AXI PCIe root port, an Intel EG20T PCH, + a UART and an ASCII LCD. + items: + - const: mips,p8700-boston-rtl-5057225-202410011144 + - const: mips,p8700-boston + +additionalProperties: true + +...
Signature · 1 line
2.43.0
PATCH v4 3/8 dt-bindings: interrupt-controller: Add MIPS P8700 APLIC
In reply to Aleksa PaunovicDocument the aplic compatible for the MIPS P8700.
--- Documentation/devicetree/bindings/interrupt-controller/riscv,aplic.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/interrupt-controller/riscv,aplic.yaml +1 -0
@@ -27,6 +27,7 @@ properties: compatible: items: - enum: + - mips,p8700-aplic - qemu,aplic - spacemit,k3-aplic - const: riscv,aplic
Signature · 1 line
2.43.0
PATCH v4 4/8 dt-bindings: interrupt-controller: Add MIPS P8700 ACLINT MSWI
In reply to Aleksa PaunovicDocument the aclint mswi compatible for the MIPS P8700.
--- .../bindings/interrupt-controller/thead,c900-aclint-mswi.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-mswi.yaml +11 -0
@@ -21,6 +21,7 @@ properties: - enum: - anlogic,dr1v90-aclint-mswi - const: nuclei,ux900-aclint-mswi + - const: mips,p8700-aclint-mswi reg: maxItems: 1
@@ -46,4 +47,14 @@ examples: <&cpu4intc 3>; reg = <0x94000000 0x00010000>; }; + + - | + mswi@16150000 { + compatible = "mips,p8700-aclint-mswi"; + reg = <0x16150000 0x4000>; + interrupts-extended = <&cpu1intc 3>, + <&cpu2intc 3>, + <&cpu3intc 3>, + <&cpu4intc 3>; + }; ...
Signature · 1 line
2.43.0
PATCH v4 5/8 dt-bindings: timer: Add MIPS P8700 ACLINT MTIMER
In reply to Aleksa PaunovicDocument the MIPS P8700 ACLINT MTIMER. Extend support for both mtimecmp and mtime registers within the ACLINT MTIMER, identified via reg-names.
When both registers are present, the order is fixed to mtime first and mtimecmp second because both OpenSBI
and U-Boot expect this behavior of the riscv,aclint-mtimer compatible.
--- .../bindings/timer/thead,c900-aclint-mtimer.yaml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+)
Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml +39 -0
@@ -21,13 +21,19 @@ properties: - enum: - anlogic,dr1v90-aclint-mtimer - const: nuclei,ux900-aclint-mtimer + - const: mips,p8700-aclint-mtimer reg: + minItems: 1 items: + - description: MTIME Registers, or MTIMECMP Registers if only one + region is present - description: MTIMECMP Registers reg-names: + minItems: 1 items: + - enum: [ mtime, mtimecmp ] - const: mtimecmp interrupts-extended:
@@ -42,6 +48,28 @@ required: - reg-names - interrupts-extended +allOf: + - if: + properties: + compatible: + contains: + const: mips,p8700-aclint-mtimer + then: + properties: + reg: + minItems: 2 + reg-names: + items: + - const: mtime + - const: mtimecmp + else: + properties: + reg: + maxItems: 1 + reg-names: + items: + - const: mtimecmp + examples: - | timer@ac000000 {
@@ -53,4 +81,15 @@ examples: reg = <0xac000000 0x00010000>; reg-names = "mtimecmp"; }; + + - | + timer@16108050 { + compatible = "mips,p8700-aclint-mtimer"; + reg = <0x16108050 0x8>, <0x16154000 0x7ff8>; + reg-names = "mtime", "mtimecmp"; + interrupts-extended = <&cpu1intc 7>, + <&cpu2intc 7>, + <&cpu3intc 7>, + <&cpu4intc 7>; + }; ...
Signature · 1 line
2.43.0
PATCH v4 6/8 riscv: dts: mips: Initial support for the P8700 Boston board
In reply to Aleksa PaunovicAdd initial device tree for the MIPS P8700 and the device tree for the Boston FPGA development board with a MIPS P8700 bitfile.
Add related Makefile and KCONFIG changes.
--- arch/riscv/Kconfig.socs | 6 ++ arch/riscv/boot/dts/Makefile | 1 + arch/riscv/boot/dts/mips/Makefile | 2 + arch/riscv/boot/dts/mips/p8700-boston.dts | 135 ++++++++++++++++++++++++++++++ arch/riscv/boot/dts/mips/p8700.dtsi | 82 ++++++++++++++++++ 5 files changed, 226 insertions(+)
arch/riscv/Kconfig.socs +6 -0
@@ -26,6 +26,12 @@ config ARCH_MICROCHIP help This enables support for Microchip SoC platforms. +config ARCH_MIPS + bool "MIPS SoCs" + help + This enables support for MIPS SoC platform hardware, + including the P8700. + config ARCH_RENESAS bool "Renesas RISC-V SoCs" help
arch/riscv/boot/dts/Makefile +1 -0
@@ -5,6 +5,7 @@ subdir-y += anlogic subdir-y += canaan subdir-y += eswin subdir-y += microchip +subdir-y += mips subdir-y += renesas subdir-y += sifive subdir-y += sophgo
arch/riscv/boot/dts/mips/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_MIPS) += p8700-boston.dtb
arch/riscv/boot/dts/mips/p8700-boston.dts new file +135 -0
135 lines not on this page · raw message
arch/riscv/boot/dts/mips/p8700.dtsi new file +82 -0
82 lines not on this page · raw message
Signature · 1 line
2.43.0
[email protected]
AI reviewRe: [PATCH v4 6/8] riscv: dts: mips: Initial support for the P8700 Boston board
Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] riscv: dts: mips: non-generic PCI node names and invalid unit addresses --
Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Low] riscv: dts: mips: non-generic PCI node names and invalid unit addresses
--
commit 79c2f7a61a39f331205c23d7c6c9e68fb0be373c
Author: Aleksa Paunovic <[email protected]>
riscv: dts: mips: Initial support for the P8700 Boston board
This commit adds the initial device tree for the MIPS P8700 SoC and the Boston FPGA development board, along with the corresponding Kconfig and Makefile entries.
Quoted 6 lines
arch/riscv/boot/dts/mips/p8700-boston.dts new file +0
-0@@ -0,0 +1,135 @@
[ ... ]
Quoted 50 lines
arch/riscv/boot/dts/mips/p8700-boston.dts new file +50
-0+ pci2: pci@14000000 { + compatible = "xlnx,axi-pcie-host-1.00.a"; + device_type = "pci"; + reg = <0x14000000 0x2000000>; + + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + + interrupt-parent = <&aplic_s0>; + interrupts = <7 IRQ_TYPE_LEVEL_HIGH>; + + ranges = <0x02000000 0 0x16000000 + 0x16000000 0 0x100000>; + + bus-range = <0x00 0xff>; + + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &pci2_intc 1>, + <0 0 0 2 &pci2_intc 2>, + <0 0 0 3 &pci2_intc 3>, + <0 0 0 4 &pci2_intc 4>; + + pci2_intc: interrupt-controller { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + }; + + pci2_root@0,0 { + compatible = "pci10ee,7021"; + reg = <0x00000000 0 0 0 0>; + + #address-cells = <3>; + #size-cells = <2>; + + eg20t_bridge@1,0,0 { + compatible = "pci8086,8800"; + reg = <0x00010000 0 0 0 0>; + + #address-cells = <3>; + #size-cells = <2>; + + eg20t_mac@2,0,1 { + compatible = "pci8086,8802"; + reg = <0x00020100 0 0 0 0>; + phy-reset-gpios = <&eg20t_gpio 6 GPIO_ACTIVE_LOW>; + }; + + eg20t_gpio: eg20t_gpio@2,0,2 {
arch/riscv/boot/dts/mips/p8700-boston.dts line 99
Quoted 10 lines
arch/riscv/boot/dts/mips/p8700-boston.dts new file +10
-0+ compatible = "pci8086,8803"; + reg = <0x00020200 0 0 0 0>; + + gpio-controller; + #gpio-cells = <2>; + }; + + eg20t_i2c@2,12,2 { + compatible = "pci8086,8817"; + reg = <0x00026200 0 0 0 0>;
[Severity: Low]
Should the PCI child nodes under pci@14000000 use generic node names, standard PCI unit addresses, and include device_type = "pci" and ranges on the PCI bridges?
The underscore-separated names (pci2_root, eg20t_bridge, eg20t_mac, eg20t_gpio, eg20t_i2c) trigger dtc W=2 warnings, fail dtbs_check against xlnx,axi-pcie-host.yaml (which expects generic names such as pci, ethernet, gpio, and i2c), and prevent dtc and dtschema from recognizing eg20t_i2c as an I2C bus.
In addition, PCI unit addresses take the hex form <dev> or <dev>,<func> without the bus number (so @1,0,0, @2,0,1, @2,0,2, and @2,12,2 with decimal 12 should be @0, @0,1, @0,2, and @c,2), and the two PCI-to-PCI bridge nodes need device_type = "pci" and ranges to satisfy check_pci_bridge() in dtc and pci-pci-bridge.yaml.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
PATCH v4 7/8 MAINTAINERS: Add entry for MIPS RISC-V SoC support
In reply to Aleksa PaunovicAdd a MAINTAINERS entry covering the MIPS RISC-V devicetree sources and the board binding.
--- MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+)
MAINTAINERS +8 -0
@@ -23542,6 +23542,14 @@ F: drivers/spi/spi-mpfs.c F: drivers/usb/musb/mpfs.c F: include/soc/microchip/mpfs.h +RISC-V MIPS SoC SUPPORT +M: Aleksa Paunovic <[email protected]> +L: [email protected] +S: Supported +T: git https://github.com/aleksapaunovic-htec/linux.git +F: Documentation/devicetree/bindings/riscv/mips.yaml +F: arch/riscv/boot/dts/mips/ + RISC-V MISC SOC SUPPORT M: Conor Dooley <[email protected]> L: [email protected]
Signature · 1 line
2.43.0
PATCH v4 8/8 riscv: defconfig: Enable MIPS SoCs
In reply to Aleksa PaunovicBuild the MIPS P8700 Boston dtb by default.
--- arch/riscv/configs/defconfig | 1 + 1 file changed, 1 insertion(+)
arch/riscv/configs/defconfig +1 -0
@@ -26,6 +26,7 @@ CONFIG_ARCH_ANDES=y CONFIG_ARCH_ANLOGIC=y CONFIG_ARCH_ESWIN=y CONFIG_ARCH_MICROCHIP=y +CONFIG_ARCH_MIPS=y CONFIG_ARCH_SIFIVE=y CONFIG_ARCH_SOPHGO=y CONFIG_ARCH_SPACEMIT=y
Signature · 1 line
2.43.0