From nobody Thu Oct 2 06:30:11 2025 Received: from sender4-op-o16.zoho.com (sender4-op-o16.zoho.com [136.143.188.16]) (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 B4D312D77EF; Mon, 22 Sep 2025 14:55:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.16 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758552946; cv=pass; b=MOHvIdFxHIbF1d/5PnA/IKQ0wBW5VX1zi8aR3KwPjUV1xXXIGMcxpNI4uunBpLtA2dtnnXX4c4yYUQZMEPAn3e2ssGu5NNkOyHCydQic0BG2OZ4jM1j4D7ZLVB6nRCIQ8uYht6cwoCXXMn+9qdlXnFX4kmLgNJRfTOoz0wDFJ1g= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758552946; c=relaxed/simple; bh=cb7wy+ZwN39ONi58h69i1DPSVfww4xXrfbM+TXkw/WI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gzfLU6hNjnTBzjyIUG9E6ITfz+BLdzvyopsjLJCi6e86ggj1MU/plXZEjijfNhdIKD3tRHUrEHHUrD+ne5/DRaiJ7h6wqKeTYyJSqMKSBL0cqX9E1pgjX/jsWgFntJuapWEfn9cclSxL1vIgqsURKrrqIVuusA7LkSvmKSoiLsw= 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=MkzjBf4f; arc=pass smtp.client-ip=136.143.188.16 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="MkzjBf4f" ARC-Seal: i=1; a=rsa-sha256; t=1758552923; cv=none; d=zohomail.com; s=zohoarc; b=C55XzlbDLCmFbDiqjupdn3RbRvL/2iczTfU27UwBI4plR6YtkuDjy/pabhffB6p8nXzsPaNB4wlXlvfTY3j74iiwho6OqUvX//euxnMw1kEia6d860xS+CheNziVk7cbaXlqm85TQdoBhr085pEXZ4f7EtI25kun7g5sAANIUO0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758552923; 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=PLzv6fg3fqqkM8iKZ+L1jhNCwLYKzVSOP0OdN57SCX8=; b=RJeWA3DqZvG8gjVnDJJ290dMwFXazbC23ufhwfITvd6mlu4ppzwoZmIzFbV6quvzIxylKPtv73bEFAgoo2LTntxzQd2vguSKnRoqjCUeqNswjG6QvA3f4xaxZA1gwKEBwUVRiRT4dcx1GHDgX1S3VxZMapoUF9Dni6xBTIqCxbU= 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=1758552923; 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=PLzv6fg3fqqkM8iKZ+L1jhNCwLYKzVSOP0OdN57SCX8=; b=MkzjBf4fxvx6JK7eEAmxLrzmYFsyDwsopO+l8NiJwOrpaQYQkr8P0K8Wl6cylHAD p06iSvqcL0U0Mm/6G3xVU/f6ezlT7B3A5z1C7dcbVYOT5sgB1Wh6v0AquwAlXUrzSJy J/+8woSfozohZgZSFj93cspma7J6hH/mkftdPxhs= Received: by mx.zohomail.com with SMTPS id 1758552920497610.5552985610591; Mon, 22 Sep 2025 07:55:20 -0700 (PDT) From: Junhui Liu Date: Mon, 22 Sep 2025 22:51:51 +0800 Subject: [PATCH 5/5] 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: <20250922-dr1v90-cru-v1-5-e393d758de4e@pigmoral.tech> References: <20250922-dr1v90-cru-v1-0-e393d758de4e@pigmoral.tech> In-Reply-To: <20250922-dr1v90-cru-v1-0-e393d758de4e@pigmoral.tech> To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Junhui Liu , Philipp Zabel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, "fushan.zeng" X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1758552834; l=2783; i=junhui.liu@pigmoral.tech; s=20250910; h=from:subject:message-id; bh=cb7wy+ZwN39ONi58h69i1DPSVfww4xXrfbM+TXkw/WI=; b=buSBznMbOgHdkJQ7FZtYm3RCpZxmyXDsUY+oZXW+9KxaSJHF+RaKU0KAdU860IixMtuCCq3mH GvDkjS5Jr3VDxCDn3E9hmEHCWpG5kWwp9vZ8l7PKnL7HY3761+D2PZB 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 f9f8754ceb5247d3ca25e6a65b3f915916ba6173..6458093dcf27afd640265aa07be= 9b93d6cb72f8a 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>; @@ -65,21 +89,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.0