From: Aleksa Paunovic Date: Wed, 02 Dec 2026 16:21:25 +0100 Subject: [PATCH v5 5/8] dt-bindings: timer: Add MIPS P8700 ACLINT MTIMER MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261202-p8700-dts-v5-5-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 , Conor Dooley X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796224891; l=2574; i=aleksa.paunovic@htecgroup.com; s=20250806; h=from:subject:message-id; bh=NmIYyLj+gJ6O//Yk7OxU878XkPBa6KujS6dDK+sOfuA=; b=541zTE+r1hcA11kRLe+FKZiMtgR5+TI1EJJ6TUyDgA84e08MTqlpitrgS85cDpIX/nnv4P8c4 RbnUnV8hxCbCx3asctoTxlkt0llVRDKzCY81E9SX6RphzieH1YzBfK+ 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 List-Id: B4 Relay Submissions Document 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. Acked-by: Conor Dooley Signed-off-by: Aleksa Paunovic --- .../bindings/timer/thead,c900-aclint-mtimer.yaml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml b/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml index cf7c82e980f674afcf59fc726742dc4f49c1a820..e74816c171d9e9b3417806c531969085d260977a 100644 --- a/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml +++ b/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml @@ -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>; + }; ... -- 2.43.0