From nobody Thu Oct 2 06:30:12 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 C27522D248B; Mon, 22 Sep 2025 14:55:09 +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=1758552911; cv=pass; b=kLVUKoiuJPc2YtW3YGsVuEcG0aQUOaU0E3h1Gg2z9SJYPtOxd7b0s7BNlH0R/B02yan1s5dgmcdsCXbs/rmh5nCs5aOkfttResbYyUGII/T6K3Z2mRvaSksqgNOI16mTowNf6hERxnr4Up8c8EsKGrmlLtwqGv4Ga0FBbKeXYMw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758552911; c=relaxed/simple; bh=Dp1B+m+lazPgrf8IPyyBCe9O9i8M/wMMQ5M8r7le1Mw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=I+n3ffDIiI/88krd+XJ2kB3IjiUFE6fTZEJ7NKR8WqSM29pJHx3rXz4hkBPdtdDXOQFTWP1+EQPKbM98Qfmtn820RBEQ3AYqZEWqpBPuxTbyvqtQNREEgDJxXd9nCxAPxFC7XewhQYVVRuUqlhOKSFgpociMtF5EaDJRFkUfLF4= 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=X8Hw3Q1T; 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="X8Hw3Q1T" ARC-Seal: i=1; a=rsa-sha256; t=1758552882; cv=none; d=zohomail.com; s=zohoarc; b=GY2BiSvhaKqVlNQ3jLPDd+IMx/w/ZKhV3qbenOZS6nP+iqbQFb67iEAd3LsCERMFlPhHlAhPk3QPIPvOTFoj0EejV5X4LEtUXcGDWAV2IyM+wnz1aL61ScBUIGzwb8rD8CABe56x7t9yRc2+yi0qZQew8ccoLsEJmZMUHwT338Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758552882; 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=VKAHYHQMSU3Sazt3AzibRdtYJHKKbmTRN1QCcYVHYRg=; b=LzyI/U6y04XktJNrT9K8sr8Heq3geCEzi+JWT6vUT6V8/JADJHkx9+Qm2eomOyGnYnveOynhGsTBOwtn5Sc6z38/dmp/ClMQy1dJEW/tLGAJhvh4xWas8t8ikRUr5vVai2PTa4ctRC6Y57OyEYHUEWoe4PIpLGZ4wIVleFdbZr8= 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=1758552882; 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=VKAHYHQMSU3Sazt3AzibRdtYJHKKbmTRN1QCcYVHYRg=; b=X8Hw3Q1TO6keUhI17SZibDj7sJClvzVKBkqdyLyxttgpEydQaHfhsKZleR3kQBMx xba88WGZLAjBP1rLiajBcKGfLdDpVhCFreUzp+ldq7In1ZshwkT39FBds8AbzZzu40d 91+RaON4Qb9lqlOD1+MB2SobsSbvmqGehn/ZpDCc= Received: by mx.zohomail.com with SMTPS id 1758552879739807.5979493071006; Mon, 22 Sep 2025 07:54:39 -0700 (PDT) From: Junhui Liu Date: Mon, 22 Sep 2025 22:51:48 +0800 Subject: [PATCH 2/5] dt-bindings: clock: add Anlogic DR1V90 CRU 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-2-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=5255; i=junhui.liu@pigmoral.tech; s=20250910; h=from:subject:message-id; bh=Dp1B+m+lazPgrf8IPyyBCe9O9i8M/wMMQ5M8r7le1Mw=; b=CAUGt0jn0WMDpJ2kFNML0ocqb5dl55H6C68VpohHlIJmycRAo9YzU6YxTynTYMvp59dHiZr6n 3l4265Ru5V1DCNRGm4xiZmibiOqEZ55rbIpBpGyjJxPn5kQl0HR9HD+ X-Developer-Key: i=junhui.liu@pigmoral.tech; a=ed25519; pk=cgATWSU1KfGWmdwNmkPyHGnWgofhqqhE8Vts58wyxe4= X-ZohoMailClient: External Add the Clock and Reset Unit (CRU) support for the Anlogic DR1V90 SoC, which is responsible for clock and reset management. Signed-off-by: Junhui Liu Reviewed-by: Conor Dooley --- .../bindings/clock/anlogic,dr1v90-cru.yaml | 60 ++++++++++++++++++= ++++ include/dt-bindings/clock/anlogic,dr1v90-cru.h | 46 +++++++++++++++++ include/dt-bindings/reset/anlogic,dr1v90-cru.h | 42 +++++++++++++++ 3 files changed, 148 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/anlogic,dr1v90-cru.yam= l b/Documentation/devicetree/bindings/clock/anlogic,dr1v90-cru.yaml new file mode 100644 index 0000000000000000000000000000000000000000..165c71ce333a8ee8ebbc86f238b= b807880580aca --- /dev/null +++ b/Documentation/devicetree/bindings/clock/anlogic,dr1v90-cru.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/anlogic,dr1v90-cru.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Anlogic DR1V90 Clock and Reset Unit (CRU) + +maintainers: + - Junhui Liu + +properties: + compatible: + const: anlogic,dr1v90-cru + + reg: + maxItems: 1 + + clocks: + items: + - description: Main Oscillator (33 MHz) + - description: External CAN clock + - description: External WDT clock + + clock-names: + items: + - const: osc_33m + - const: can_ext + - const: wdt_ext + + "#clock-cells": + const: 1 + description: + Refer for valid indices. + + "#reset-cells": + const: 1 + description: + Refer for valid indices. + +required: + - compatible + - reg + - clocks + - clock-names + - "#clock-cells" + - "#reset-cells" + +additionalProperties: false + +examples: + - | + clock-controller@f8801000 { + compatible =3D "anlogic,dr1v90-cru"; + reg =3D <0xf8801000 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>; + }; diff --git a/include/dt-bindings/clock/anlogic,dr1v90-cru.h b/include/dt-bi= ndings/clock/anlogic,dr1v90-cru.h new file mode 100644 index 0000000000000000000000000000000000000000..d87dd7ef4510b5bb2f7f892f5a1= 4aa6d29456767 --- /dev/null +++ b/include/dt-bindings/clock/anlogic,dr1v90-cru.h @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) 2025 Shanghai Anlogic Infotech Co., Ltd. + * Copyright (c) 2025 Junhui Liu + */ + +#ifndef _DT_BINDINGS_CLOCK_ANLOGIC_DR1V90_CRU_H_ +#define _DT_BINDINGS_CLOCK_ANLOGIC_DR1V90_CRU_H_ + +#define CLK_OSC_DIV2 0 +#define CLK_CPU_PLL 1 +#define CLK_CPU_PLL_4X 2 +#define CLK_CPU_4X 3 +#define CLK_CPU_2X 4 +#define CLK_CPU_1X 5 +#define CLK_IO_PLL 6 +#define CLK_IO_1000M 7 +#define CLK_IO_400M 8 +#define CLK_IO_25M 9 +#define CLK_IO_80M 10 +#define CLK_IO_400M_DIV2 11 +#define CLK_IO_400M_DIV4 12 +#define CLK_IO_400M_DIV8 13 +#define CLK_IO_400M_DIV16 14 +#define CLK_QSPI 15 +#define CLK_SPI 16 +#define CLK_SMC 17 +#define CLK_SDIO 18 +#define CLK_GPIO_DB 19 +#define CLK_EFUSE 20 +#define CLK_TVS 21 +#define CLK_TRNG 22 +#define CLK_OSC_DIV 23 +#define CLK_PWM 24 +#define CLK_FCLK0 25 +#define CLK_FCLK1 26 +#define CLK_FCLK2 27 +#define CLK_FCLK3 28 +#define CLK_WDT_SEL 29 +#define CLK_EFUSE_SEL 30 +#define CLK_CAN_SEL 31 +#define CLK_CPU_SEL 32 +#define CLK_CAN0 33 +#define CLK_CAN1 34 + +#endif /* _DT_BINDINGS_CLOCK_ANLOGIC_DR1V90_CRU_H_ */ diff --git a/include/dt-bindings/reset/anlogic,dr1v90-cru.h b/include/dt-bi= ndings/reset/anlogic,dr1v90-cru.h new file mode 100644 index 0000000000000000000000000000000000000000..0eed06f417e01a2dbc5074b9c73= 1d24eff050117 --- /dev/null +++ b/include/dt-bindings/reset/anlogic,dr1v90-cru.h @@ -0,0 +1,42 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) 2025 Shanghai Anlogic Infotech Co., Ltd. + * Copyright (c) 2025 Junhui Liu + */ + +#ifndef _DT_BINDINGS_RESET_ANLOGIC_DR1V90_CRU_H_ +#define _DT_BINDINGS_RESET_ANLOGIC_DR1V90_CRU_H_ + +#define RESET_OCM 0 +#define RESET_QSPI 1 +#define RESET_SMC 2 +#define RESET_WDT 3 +#define RESET_DMAC_AXI 4 +#define RESET_DMAC_AHB 5 +#define RESET_NPU 6 +#define RESET_JPU 7 +#define RESET_DDRBUS 8 +#define RESET_NIC_HP0 9 +#define RESET_NIC_HP1 10 +#define RESET_NIC_GP0M 11 +#define RESET_NIC_GP1M 12 +#define RESET_GPIO 13 +#define RESET_IPC 14 +#define RESET_USB0 15 +#define RESET_USB1 16 +#define RESET_GBE0 17 +#define RESET_GBE1 18 +#define RESET_SDIO0 19 +#define RESET_SDIO1 20 +#define RESET_UART0 21 +#define RESET_UART1 22 +#define RESET_SPI0 23 +#define RESET_SPI1 24 +#define RESET_CAN0 25 +#define RESET_CAN1 26 +#define RESET_TTC0 27 +#define RESET_TTC1 28 +#define RESET_I2C0 29 +#define RESET_I2C1 30 + +#endif /* _DT_BINDINGS_RESET_ANLOGIC_DR1V90_CRU_H_ */ --=20 2.51.0