From patchwork Sat Mar 9 09:02:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13587549 X-Patchwork-Delegate: mail@conchuod.ie Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E0320C54E5D for ; Sat, 9 Mar 2024 09:04:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8e9n6bhh0w1NjdCDk1ZyhNdup0q/ux+wT5UL8HAhIqo=; b=QydlyKq03LKItp DFWsbfG+QSEYYWZ7D81Ak/QD6s/mNp1k3NcqsT344A+hDS+UnTDeO3ipFcS3HK8wsfgQxmA5oibUN DCDy5C91a4zzWtTrlboQ1ZxgYFGNN9mey2TWtfUizq0jN02S6QlSFOnIL4+9h3Yv4tLQcILV9x4Ms 8FGGargZhE3r2hvUHz7kzU+4uVXyLzCEOozwOmFdUlzpY84epU9KTL7kErw6moEReiap6JBWaDeQm MMaJU1Yf9yRx2TyN3kJuKGlI4FDTCRAG9/ZpL/9Bb2rJFztN8pLMfSqTvBE5/8go4QB54mCPsWeFk vatZpqKw5mVBJzTM/GnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1riscb-0000000Cx70-4BuN; Sat, 09 Mar 2024 09:04:02 +0000 Received: from mail-sn1nam02acsn20800.outbound.protection.outlook.com ([2a01:111:f400:7ea9::800] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1riscZ-0000000Cwzk-0TFU for linux-riscv@lists.infradead.org; Sat, 09 Mar 2024 09:04:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O5zmcUjpNTwT5FHyPAnytUQoUajnTB7vuDPKCiIHCm104eh1L5FQVD64QcugI1WLvatwZqgPdeD4MMwqh0MoOO7oixAISGk/5hxlHDdfq/67BoMnseEdUv7IU4/w0vmbVJ1/SHcpJZUKDjzxG0BGpY+PHfbGY6Blbg788n3tnEFdVQmOur+zC8UKMeSFeSfBYygkyOBeBhZ87LBv/Y6tjg8YzQhNywmmlxAk878Pq/Jx7uw/zeXpoAnYuY9SgI3RY65Mwg0jTEZAwKwNzj6majKVhbwAxSGqR70GmnxquwI4WZUgq/frnuGL5qKW8LAipnw8scwJzMTMN60i5FYmYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qXKebW81HIKbfru8Xbvk/M2+H4liGBrQ3VC1HcchFE8=; b=cQuG9HhjvkGPbdzn0mC0h/zC80g0ycuLtRGxxeHm10lQmxt8GYHP+3tmBO9/ZyUxTQdL6UKbHqlyc2oxdxp7Y9tx76U2j+yuC9bdNFxFGEYc/lbjkJtZDSBmxjOOf/Vflh/V0OddZDe3ZI8fTUMUL2yBEnwb5G0qhYcmtaDLVw3QwfVh4s85l0fv3cpJ1Bun01TVOLkPjra2mREvG39vCVanyE97Zd44CbR8Oolhx3NrUGffRAyU2B+G0KCfivo9FPE+tmClRmVSh1lWG0heSHBFJsUa1VISC/N++GW+ysjqUEIrpOF+f9bNGIkTZYkHxUpbLu2WI2vvarvNXpiddw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qXKebW81HIKbfru8Xbvk/M2+H4liGBrQ3VC1HcchFE8=; b=kb6w2SjwU3FGf/zl7PR0U4q/t3YEJ+LarXp6IQbokG2CnD/8BScJjSwq8a3EER11TxGmOfVKYQepqLabPuHjnNynJ4blM5qRAg0UegJ5hBSUanPo3P+t/Yrp2N8e1RhahHGzQeEHnxTrBqLlRKUcspaiLj7B53zlBGknXy4XAJpVy9SIdu/gdISWqaLqmaJYxBsdtHeKkpUUSv39heUnOM9cMqUbtZwSqdvCw2TWmGYrYy1v4dExpcxpbxNlXmWNa6IWzJmiGLtCu3daB+v8GLgRm1w3/KaoMGSvICCRZ9Q8QRr5zFczO5FIZhJ2hK2bvr9vc4IH/VcPU9cPcPRkfw== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by MW5PR20MB4260.namprd20.prod.outlook.com (2603:10b6:303:191::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.33; Sat, 9 Mar 2024 09:03:46 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::8615:efe2:7c8e:2041]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::8615:efe2:7c8e:2041%3]) with mapi id 15.20.7362.030; Sat, 9 Mar 2024 09:03:46 +0000 From: Inochi Amaoto To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chao Wei , Chen Wang , Paul Walmsley , Palmer Dabbelt , Albert Ou , Inochi Amaoto Cc: Jisheng Zhang , Liu Gui , Jingbao Qiu , dlan@gentoo.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v9 5/6] riscv: dts: sophgo: add clock generator for Sophgo CV1800 series SoC Date: Sat, 9 Mar 2024 17:02:55 +0800 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: X-TMN: [DGM7oJ/u4E3Zqiu3rruldR2Kc6ER3uED2BN11vTMJf4=] X-ClientProxiedBy: TYCP301CA0074.JPNP301.PROD.OUTLOOK.COM (2603:1096:405:7d::14) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240309090257.927623-5-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|MW5PR20MB4260:EE_ X-MS-Office365-Filtering-Correlation-Id: 1a60f150-85fb-42c6-c904-08dc4017d3c1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oPrsqEcvz5Yz8k38LX/l0cZ3sKRptcXjGIl8U5tKDOET8CvxKRK0jDKIw1C8SrYHX9XeHLObEsDLb5+eCI5BLnffz1mfBPtt3FefEUxY0pi5maj+sfTXpwJoaM1OkWiGV1503OcZaCgltX5/dooBbFwNeMJO0Q+C5TkoKWW93TqQHP4fjml01UTGJJI2cSxrF6roYbiqIvxjXfYL780yzrM6AxxLMcEa8pVum0XV5l7/o1DeQj74VrxDO8Pgs3XQdPPsiDFsLllunqhwwkCs+UbN/UXc8w4asX0QlSY41ZU3yqvsMaDw9A15b6/nCHQXXvvJfKO+Le7arGIDc+E8aFksaqPwQkv5SOJvAQG+We0VO4TSucJWsDxEoQUh7ytawTFEblUTprUbuus/0nomZw0QokTu4EfdsIwZy2dveJ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DcMbsxErJqWPZWHYhqgs+xvtQkebAzWWV0VX3nJpeCTuwwQ+jKZj5qM3NzZa5Qk7sYBbXP3Vl5MEtawIJKUzXS208cKk0I4fOPk1kMsRNsFW+XajFGB075BnMA7l2Wt5+xU4kqxRdV0giC97ER5/XwaFThvA5zgZ1c9d0mdbcyiaAMxGToWSuSWsWOUyS9rdIaRsVZlSDMw3WmtZzu0Wt/bCU0eUZnckSdCg/HUeEyQlwwSuT9S+zTgdd6oG6ujz+6yiq8ooLWDaNNpixLXEvm1BFDBsVjwu+00TpekpVXHTMP2QB3lwDrKxFnG3rQBTgbThi4mzhAIyZnkkP8SisDCiGyqu1/evQE7I6Tza2dKY+3pNcxMmT2s2IKmqbm10dk/b/WcnvwdNO0roWvAZ9395w7YAYfXOjpu2QHSHshZLls/h6DUBPjT2jPkLPhtNfdqj5l8XdO97jkqKfbdeHaPKr+HnvDk7z9HIchzABqx+5ZIGMhYM0yF12kUSZpF1TpPPj6jJGzH6bqJmd3xPdp+adbo5dVn9fsjhhaYkCqUoS8 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a60f150-85fb-42c6-c904-08dc4017d3c1 X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2024 09:03:46.4490 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR20MB4260 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240309_010359_231355_44948854 X-CRM114-Status: UNSURE ( 8.40 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add clock generator node for CV1800B and CV1812H. Until now, It uses DT override to minimize duplication. This may change in the future. See the last link for the discussion on maintaining DT of CV1800 series. Link: https://github.com/milkv-duo/duo-files/blob/6f4e9b8ecb459e017cca1a8df248a19ca70837a3/duo/datasheet/CV1800B-CV1801B-Preliminary-Datasheet-full-en.pdf Link: https://lore.kernel.org/all/IA1PR20MB495373158F3B690EF3BF2901BB8BA@IA1PR20MB4953.namprd20.prod.outlook.com/ Reviewed-by: Chen Wang Signed-off-by: Inochi Amaoto --- arch/riscv/boot/dts/sophgo/cv1800b.dtsi | 4 ++++ arch/riscv/boot/dts/sophgo/cv1812h.dtsi | 4 ++++ arch/riscv/boot/dts/sophgo/cv18xx.dtsi | 6 ++++++ 3 files changed, 14 insertions(+) -- 2.44.0 diff --git a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi index 165e9e320a8c..baf641829e72 100644 --- a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi +++ b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi @@ -16,3 +16,7 @@ &plic { &clint { compatible = "sophgo,cv1800b-clint", "thead,c900-clint"; }; + +&clk { + compatible = "sophgo,cv1800-clk"; +}; diff --git a/arch/riscv/boot/dts/sophgo/cv1812h.dtsi b/arch/riscv/boot/dts/sophgo/cv1812h.dtsi index 3e7a942f5c1a..7fa4c1e2d1da 100644 --- a/arch/riscv/boot/dts/sophgo/cv1812h.dtsi +++ b/arch/riscv/boot/dts/sophgo/cv1812h.dtsi @@ -22,3 +22,7 @@ &plic { &clint { compatible = "sophgo,cv1812h-clint", "thead,c900-clint"; }; + +&clk { + compatible = "sophgo,cv1810-clk"; +}; diff --git a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi index 2d6f4a4b1e58..6ea1b2784db9 100644 --- a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi +++ b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi @@ -53,6 +53,12 @@ soc { dma-noncoherent; ranges; + clk: clock-controller@3002000 { + reg = <0x03002000 0x1000>; + clocks = <&osc>; + #clock-cells = <1>; + }; + gpio0: gpio@3020000 { compatible = "snps,dw-apb-gpio"; reg = <0x3020000 0x1000>;