From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796224924; b=sVGf29M5SSfAcyFnkiFICT8XNBUC8Qfu0kp3ZEHHANxCQ93NE9caiwmhNpgxYBX0wR7b oc7ueT2hcTkugcB07CcYea8/PUTl3pwl0B/fhPV8JaPPEkwd8QEWVTWg6c01yrZmus8Bd fxfs2wtyfiXX8L0FQR1s9I53OlYt7ylCmZ1dIVXFYNWUpL21TuiNdX2Yx4bDzfP8k8f5P h3s5nvgFdEkPHKvwFWVn5yi0ub5Gk7TfDa/Joki6O6BKJI2tJZ3s7+9Akj7Ao37+EkRDr k66TqPvKF85/pTAhHW4xvn0o63ltDnNHSvw289V++vjwB/Kg81PAuNO5q0EKIIg2alQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796224924; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=DZYd64QP9tZbRRhz+ERq5npVLobZcChaTcfYfRN2OYc=; b=f8HUvZaJ0jIS5GhdGaWkp1pPZM7fhL6aV6INXad4HGqc7SgxQjFP/TCPNG9D2bu0p5DR yCAAz7h1hGDHpN9I/ChoQyQ5c+PqXpbaxC+FmE2X1+04hDQuAa9lGRI6mQM2+6oELuWiL gtIXmAL0fwIWQ9kuXtbWH4twiwzGQ6T+3rXNnSzatBm/wDMgtzKiGcfzbN9ZO/EdeNyzE /5EB+500B/htbcfSz3KovRA/5ZJ0nM7CUjrha2f6I7V03Cwzagall46hL0h0YwjWpk6VT TuOHeOmaBnu7xzYrOKKRJQyK8a3x0NjHLC8C8sip8Sm4Uoi6BY70En0dLo0c2nUq3+Q== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=faIEjAie; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54CD3606A32C; Wed, 2 Dec 2026 15:22:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=faIEjAie Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796224924; b=TM/0lAKzrxZOWT2HA5nrYPV5PRP1QnW2F+jZ5c9fAJfrF0yRb2RYYK8RQqQj/qdFbqXA +L+89ElrqyW7UxJVAkuyqtJIf1D8wURiT6Cx5HU+Txp5zhuSdDf0YXxnuESui9cVVPYZl H16q+OEMIuREStC6CfI743iYlmmMCHuzwbk4KYw8MN017EUxDoNl0N3mYex8OIP8GxjAb JZUezhsz/4scbLCy1BzrxBuUjja+8xVzncK/0o4siPFOO0V6jIfppsDUpvrYe8jFndbe6 D/OPN0ckHU7aXE923PEGyp/nkBexidGh0b6/E+buqBwMic/s6GC43H2cdmKAkESkzvw== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796224924; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=DZYd64QP9tZbRRhz+ERq5npVLobZcChaTcfYfRN2OYc=; b=J1prZmZi/mgmXcZqx8ZlAwgdACoyToomH0hNgLZYtpcWQl6rQSAbRVOqMcRgjSaBL8Wp NonJQbKpezIUNjp6eFjTUwOXOfYQ02TFFMua/NUu1GfHb+Yj7f/oA6c0RvhRvfNfE6jnU igW4XCmr1eTPm2x7oRGXbgS4DLJ+RpWYcN5qbj6s5aBR5yIU+2gCehuTlb9LTpdlqPA7S hIYwKs9qM93uVxlB3seKbDE9hPkFSlunImfedioQDddFh0D3EvhaDo7dyVg/zQcsTC/MM sBpAvf2wMRP8ZSU/zxkOnibjmvuTwmJ5SIyfHOzTOk6njuYRu4dDfwbqgY3FpieUdoQ== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 9CC481F00A15; Wed, 2 Dec 2026 15:21:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796224923; bh=DZYd64QP9tZbRRhz+ERq5npVLobZcChaTcfYfRN2OYc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=faIEjAieqN32Am//V9+CCaDSlHEPw1O/Gd5Rokru35QtVgHTRVm8p0tt0auukaS0j yXwKXa3BV5Et7uBmXLbCwcnw6LROwDajCY6fyZdE2QhjWOSLT/G0fe8KP8awFmi7iu MAdimNSVHbPphe71EafYfagYM8vvHAj1utBvfO9lAaHU7lB2qCJe+ytqvjNZqyuqto 7ytrG70TI0v+kxGfJiIfez2GuU5hVPKd566VXRHyqRRB69uy60C8cwQJxcp22tIY8O RxsMlD1BOdQK6I5NESR5os447FjFufiwYiRnUBVHkzuQ0de0iXTRXdvCOWXc7Gj6bC n11yNnuSb6+MQ== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id E22C44F4C5; Wed, 2 Dec 2026 15:21:32 +0000 (UTC) From: Aleksa Paunovic via B4 Relay Date: Wed, 02 Dec 2026 16:21:26 +0100 Subject: [PATCH v5 6/8] riscv: dts: mips: Initial support for the P8700 Boston board X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261202-p8700-dts-v5-6-9d8829ef4841@htecgroup.com> References: <20261202-p8700-dts-v5-0-9d8829ef4841@htecgroup.com> In-Reply-To: <20261202-p8700-dts-v5-0-9d8829ef4841@htecgroup.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Djordje Todorovic , Anup Patel , Thomas Gleixner , Radu Rendec , Inochi Amaoto , Daniel Lezcano Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , Conor Dooley , linux-riscv@lists.infradead.org, Vladimir Kondratiev , Paul Walmsley , Palmer Dabbelt , Chao-Ying Fu , Aleksa Paunovic X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796224891; l=7732; i=aleksa.paunovic@htecgroup.com; s=20250806; h=from:subject:message-id; bh=KTonUAYNZpyCSMbdOGMCV5wA/mAnIGVlE4a83Hh48FM=; b=6EUxWVEapWT6YBxHzIwf3qo8T7PNzmlmo6Gl9CpKVowVg3ThgodFToJSjP0BlrOoqr8zmmGvf 7FANDs5g0CLDCu/OIF2SZSA1hjnSwCNkDWPumb2bKpCSFOgV4nPCALA X-Developer-Key: i=aleksa.paunovic@htecgroup.com; a=ed25519; pk=Dn4KMnDdgyhlXJNspQQrlHJ04i7/irG29p2H27Avd+8= X-Endpoint-Received: by B4 Relay for aleksa.paunovic@htecgroup.com/20250806 with auth_id=476 X-Original-From: Aleksa Paunovic Reply-To: aleksa.paunovic@htecgroup.com Content-Transfer-Encoding: 7bit From: Aleksa Paunovic Add 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. Co-developed-by: Djordje Todorovic Signed-off-by: Djordje Todorovic Signed-off-by: Aleksa Paunovic --- 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 | 141 ++++++++++++++++++++++++++++++ arch/riscv/boot/dts/mips/p8700.dtsi | 82 +++++++++++++++++ 5 files changed, 232 insertions(+) diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs index 429e0758930687c742c4dd09603e71e90dc096a2..2562b74f85969b52a7e22679322951f5fd8884a9 100644 --- a/arch/riscv/Kconfig.socs +++ b/arch/riscv/Kconfig.socs @@ -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 diff --git a/arch/riscv/boot/dts/Makefile b/arch/riscv/boot/dts/Makefile index 69d8751fb17c803f0efb8003e111ee24144c222b..6669ddd10f1ec3a2b0323cd0b460d48ae56edd2e 100644 --- a/arch/riscv/boot/dts/Makefile +++ b/arch/riscv/boot/dts/Makefile @@ -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 diff --git a/arch/riscv/boot/dts/mips/Makefile b/arch/riscv/boot/dts/mips/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..a1f3a8ed427342042a3ec176d3cb41c8dbb8926a --- /dev/null +++ b/arch/riscv/boot/dts/mips/Makefile @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_MIPS) += p8700-boston.dtb diff --git a/arch/riscv/boot/dts/mips/p8700-boston.dts b/arch/riscv/boot/dts/mips/p8700-boston.dts new file mode 100644 index 0000000000000000000000000000000000000000..4f4f6a2955422699461b92dbc307863e8af9dd0e --- /dev/null +++ b/arch/riscv/boot/dts/mips/p8700-boston.dts @@ -0,0 +1,141 @@ +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +/* + * Copyright (C) 2025 MIPS + * + * Boston FPGA development board with a MIPS P8700 bitfile. + */ + +/dts-v1/; + +#include "p8700.dtsi" + +#include +#include + +/* Clock frequency (in Hz) of the FPGA bitfile */ +#define BITFILE_FREQ 25000000 + +/ { + model = "MIPS P8700 Boston"; + compatible = "mips,p8700-boston-rtl-5057225-202410011144", + "mips,p8700-boston"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + cpus { + timebase-frequency = ; + }; + + memory@80000000 { + device_type = "memory"; + reg = <0x80000000 0x80000000>; + }; + + 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 0x1f>; + + 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: pci@0 { + compatible = "pci10ee,7021"; + reg = <0x00000000 0 0 0 0>; + device_type = "pci"; + ranges; + bus-range = <0x01 0x02>; + + #address-cells = <3>; + #size-cells = <2>; + + eg20t_bridge: pci@0 { + compatible = "pci8086,8800"; + reg = <0x00010000 0 0 0 0>; + device_type = "pci"; + ranges; + bus-range = <0x02 0x02>; + + #address-cells = <3>; + #size-cells = <2>; + + eg20t_mac: ethernet@0,1 { + compatible = "pci8086,8802"; + reg = <0x00020100 0 0 0 0>; + phy-reset-gpios = <&eg20t_gpio 6 GPIO_ACTIVE_LOW>; + }; + + eg20t_gpio: gpio@0,2 { + compatible = "pci8086,8803"; + reg = <0x00020200 0 0 0 0>; + + gpio-controller; + #gpio-cells = <2>; + }; + + eg20t_i2c: i2c@c,2 { + compatible = "pci8086,8817"; + reg = <0x00026200 0 0 0 0>; + + #address-cells = <1>; + #size-cells = <0>; + + rtc@68 { + compatible = "st,m41t81s"; + reg = <0x68>; + }; + }; + }; + }; + }; + + uart0: serial@17ffe000 { + compatible = "ns16550a"; + reg = <0x17ffe000 0x1000>; + reg-shift = <2>; + reg-io-width = <4>; + + interrupt-parent = <&aplic_s0>; + interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; + + clock-frequency = ; + }; + + lcd: lcd@17fff000 { + compatible = "img,boston-lcd"; + reg = <0x17fff000 0x8>; + }; + + flash@18000000 { + compatible = "cfi-flash"; + reg = <0x18000000 0x8000000>; + bank-width = <2>; + }; +}; diff --git a/arch/riscv/boot/dts/mips/p8700.dtsi b/arch/riscv/boot/dts/mips/p8700.dtsi new file mode 100644 index 0000000000000000000000000000000000000000..94536e7e6e87998486f919a2962ee1da4d2c596b --- /dev/null +++ b/arch/riscv/boot/dts/mips/p8700.dtsi @@ -0,0 +1,82 @@ +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +/* + * Copyright (C) 2025 MIPS + */ + +/ { + #address-cells = <1>; + #size-cells = <1>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu@0 { + device_type = "cpu"; + compatible = "mips,p8700", "riscv"; + reg = <0x0>; + mmu-type = "riscv,sv39"; + riscv,isa-base = "rv64i"; + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", + "zicntr", "zicsr", "zifencei", + "zihpm", "zba", "zbb", + "xmipsexectl"; + + cpu0_intc: interrupt-controller { + compatible = "riscv,cpu-intc"; + interrupt-controller; + #interrupt-cells = <1>; + }; + }; + }; + + soc: soc { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + mtimer0: timer@16108050 { + compatible = "mips,p8700-aclint-mtimer"; + reg = <0x16108050 0x8>, + <0x16154000 0x7ff8>; + reg-names = "mtime", "mtimecmp"; + interrupts-extended = <&cpu0_intc 7>; + }; + + aplic_m0: interrupt-controller@16140000 { + compatible = "mips,p8700-aplic", "riscv,aplic"; + reg = <0x16140000 0x8000>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts-extended = <&cpu0_intc 11>; + riscv,num-sources = <53>; + riscv,children = <&aplic_s0>; + riscv,delegation = <&aplic_s0 1 53>; + }; + + mswi0: mswi@16150000 { + compatible = "mips,p8700-aclint-mswi"; + reg = <0x16150000 0x4000>; + interrupts-extended = <&cpu0_intc 3>; + }; + + aplic_s0: interrupt-controller@16160000 { + compatible = "mips,p8700-aplic", "riscv,aplic"; + reg = <0x16160000 0x8000>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts-extended = <&cpu0_intc 9>; + riscv,num-sources = <53>; + }; + + sswi0: interrupt-controller@1616c000 { + compatible = "mips,p8700-aclint-sswi"; + reg = <0x1616c000 0x4000>; + interrupt-controller; + #interrupt-cells = <0>; + interrupts-extended = <&cpu0_intc 1>; + riscv,hart-indexes = <0x0>; + }; + }; +}; -- 2.43.0