From nobody Tue Feb 10 01:31:07 2026 Received: from sender4-op-o15.zoho.com (sender4-op-o15.zoho.com [136.143.188.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CA0E2DF6FF; Sun, 26 Oct 2025 14:10:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.15 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761487830; cv=pass; b=N25sPiRyrNyn4ONFDjR9TOUss3vyc6Gu0I5zgmi4pc3WHKNNNs9sOoPtUsOeO/4mESYnwHSm23S9eFi00vpMB93bwJt53NKgq+Tv6NlLhD/JQdYa++ntRFFXGFXa/GXFQw2pTkMRJItuWUlSA/VeXiI/15cht2h63+q6t0htLs0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761487830; c=relaxed/simple; bh=yoJsOjGFvjODgrr4fqhQ6dvTgK03ghCyF/+Y4Q8LGcM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=feeAMOYaqhKE48/xFJdmy5wl17WYMElH/7wZyZVcDHjb00WQxq2n77akqE5m1+dItdZ+yIMUiPzxvWqObcRyppIVXAqatNDCwbMjm/rVbtv2N/rJ4In/VcmLeT1mibCS4wxO/puSoUtEAIXcmJ6oOfFTRqkwXTgI2p0t/8PuPPM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pigmoral.tech; spf=pass smtp.mailfrom=pigmoral.tech; dkim=pass (1024-bit key) header.d=pigmoral.tech header.i=junhui.liu@pigmoral.tech header.b=ExrVb5+p; arc=pass smtp.client-ip=136.143.188.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pigmoral.tech Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pigmoral.tech Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=pigmoral.tech header.i=junhui.liu@pigmoral.tech header.b="ExrVb5+p" ARC-Seal: i=1; a=rsa-sha256; t=1761487815; cv=none; d=zohomail.com; s=zohoarc; b=VUMJ2PMbBJzCB3lkTVcLR+hq9fAyqYaq4sAia6ivWNiZjnN0aKPF+NRuISl/SOcPMGQvNY8zEN3+VPIpWIzz5u9mUGGDdK7Tf4E240NgWqKRNzQAW+qwbJeE2v1hnMQqo5vdUUoBzzPWK7ev59WRPHvRajQsXvrthA631Y1thsE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761487815; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=eliORry44a7mPwhrGzCYhWX3lekfOrzJUK9cQoCUcTI=; b=n27N1pkX/kkiKybg7rWP5Z1jKB8i+cqxS4mLc/edSqDNkQkLcF5i1CqYEOKrDU876UMfQfneD4mm7cwerxsgFq3heiqRdN1DnZhNwmzJoPsaW0LqvWjykNRONazS+fkIaXFSrb6kzRy1vLDo8RFMZ9zsOh/Kw8vBYUOwKjE28WM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=pigmoral.tech; spf=pass smtp.mailfrom=junhui.liu@pigmoral.tech; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1761487815; s=zmail; d=pigmoral.tech; i=junhui.liu@pigmoral.tech; h=From:From:Date:Date:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Message-Id:References:In-Reply-To:To:To:Cc:Cc:Reply-To; bh=eliORry44a7mPwhrGzCYhWX3lekfOrzJUK9cQoCUcTI=; b=ExrVb5+p14pRS3ti7Gyyonq9ISf/zVFRMKuC1LwY0DypFzFRP5VpLCoP1rsIp2ZA dT/UDwYGZ1R2wMkaSkA0FAb+PXMV64EB1XOSFpNr4BTO0ITilddsuP3SsWob/VJDIb7 k96aeTdibxMrkvbmhUcxzNxqmrdXgSzykht5yTmc= Received: by mx.zohomail.com with SMTPS id 1761487812789429.0882655822114; Sun, 26 Oct 2025 07:10:12 -0700 (PDT) From: Junhui Liu Date: Sun, 26 Oct 2025 22:00:45 +0800 Subject: [PATCH v2 5/6] riscv: dts: anlogic: add clocks and CRU for DR1V90 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251026-dr1v90-cru-v2-5-43b67acd6ddd@pigmoral.tech> References: <20251026-dr1v90-cru-v2-0-43b67acd6ddd@pigmoral.tech> In-Reply-To: <20251026-dr1v90-cru-v2-0-43b67acd6ddd@pigmoral.tech> To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , Junhui Liu , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1761487753; l=2784; i=junhui.liu@pigmoral.tech; s=20250910; h=from:subject:message-id; bh=yoJsOjGFvjODgrr4fqhQ6dvTgK03ghCyF/+Y4Q8LGcM=; b=6u/YbQzSJ0XQHj0dmGYfyTBzfl814kCdrEQD+24N03GLtrGKz6s7Yjb4fvbF1WWG3T4Pm97rS 7F8O2/b90GQCWR3DEcxsEPNrLhvmBJgEzmUnS9UJ614Ds3zJKgI8bRM X-Developer-Key: i=junhui.liu@pigmoral.tech; a=ed25519; pk=cgATWSU1KfGWmdwNmkPyHGnWgofhqqhE8Vts58wyxe4= X-ZohoMailClient: External Add clocks and introduce the CRU (Clock and Reset) unit node for Anlogic DR1V90 SoC, providing both clock and reset support. The DR1V90 SoC uses three external clocks: - A 33 MHz crystal oscillator as the main system clock. - Two optional external clocks (via IO) for the CAN and WDT modules. Signed-off-by: Junhui Liu --- arch/riscv/boot/dts/anlogic/dr1v90.dtsi | 41 +++++++++++++++++++++++++++++= ++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/arch/riscv/boot/dts/anlogic/dr1v90.dtsi b/arch/riscv/boot/dts/= anlogic/dr1v90.dtsi index a5d0765ade3231ece0afbe8835d95cd918a44ad9..dc8358b3575124234f984c44854= 7493d063e991f 100644 --- a/arch/riscv/boot/dts/anlogic/dr1v90.dtsi +++ b/arch/riscv/boot/dts/anlogic/dr1v90.dtsi @@ -3,6 +3,9 @@ * Copyright (C) 2025 Junhui Liu */ =20 +#include +#include + /dts-v1/; / { #address-cells =3D <2>; @@ -39,6 +42,27 @@ cpu0_intc: interrupt-controller { }; }; =20 + clocks { + can_ext: clock-ext-can { + compatible =3D "fixed-clock"; + clock-output-names =3D "can_ext"; + #clock-cells =3D <0>; + }; + + osc_33m: clock-33m { + compatible =3D "fixed-clock"; + clock-frequency =3D <33333333>; + clock-output-names =3D "osc_33m"; + #clock-cells =3D <0>; + }; + + wdt_ext: clock-ext-wdt { + compatible =3D "fixed-clock"; + clock-output-names =3D "wdt_ext"; + #clock-cells =3D <0>; + }; + }; + soc { compatible =3D "simple-bus"; interrupt-parent =3D <&plic>; @@ -80,21 +104,34 @@ plic: interrupt-controller@6c000000 { uart0: serial@f8400000 { compatible =3D "anlogic,dr1v90-uart", "snps,dw-apb-uart"; reg =3D <0x0 0xf8400000 0x0 0x1000>; - clock-frequency =3D <50000000>; + clocks =3D <&cru CLK_IO_400M_DIV8>, <&cru CLK_CPU_1X>; + clock-names =3D "baudclk", "apb_pclk"; interrupts =3D <71>; reg-io-width =3D <4>; reg-shift =3D <2>; + resets =3D <&cru RESET_UART0>; status =3D "disabled"; }; =20 uart1: serial@f8401000 { compatible =3D "anlogic,dr1v90-uart", "snps,dw-apb-uart"; reg =3D <0x0 0xf8401000 0x0 0x1000>; - clock-frequency =3D <50000000>; + clocks =3D <&cru CLK_IO_400M_DIV8>, <&cru CLK_CPU_1X>; + clock-names =3D "baudclk", "apb_pclk"; interrupts =3D <72>; reg-io-width =3D <4>; reg-shift =3D <2>; + resets =3D <&cru RESET_UART1>; status =3D "disabled"; }; + + cru: clock-controller@f8801000 { + compatible =3D "anlogic,dr1v90-cru"; + reg =3D <0x0 0xf8801000 0 0x400>; + clocks =3D <&osc_33m>, <&can_ext>, <&wdt_ext>; + clock-names =3D "osc_33m", "can_ext", "wdt_ext"; + #clock-cells =3D <1>; + #reset-cells =3D <1>; + }; }; }; --=20 2.51.1