From patchwork Tue Dec 5 09:42:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 17557 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3314870vqy; Tue, 5 Dec 2023 01:42:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IFO6k+hvHH9gu9W21yoXDw5vKWSCDQVnsZVcCxkMs2ypE1tcbcvo6CIHz7x8c4/TIofpto/ X-Received: by 2002:a05:6a21:3293:b0:18b:3c54:e6d8 with SMTP id yt19-20020a056a21329300b0018b3c54e6d8mr3306453pzb.39.1701769372724; Tue, 05 Dec 2023 01:42:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701769372; cv=pass; d=google.com; s=arc-20160816; b=L6h2bKdJjyeYC7ookR390SFwF6WDliEfijQ03YahpNKqZmfUqLAMrYYnYqSk+qRM3S OCoaG66DEBv/PlqUeE2WrICry9mb8+s4pjENZ5ZBQJNklsskjID4R7agh27oKb2M2kHi 35xiCMOC3dgaCChBzYoqmyr+hBP/xPnqpRV+4rI0PQR5gXm2Co3SZ7DTfRKzWtGxrZFL 9e6iAGGDsUPmvWBC51+4lMSmEOzAUYLiAxE6QmTr6ZOdD2wAe9c5U0hYP7hvFD7T6xab fjwzKeJ74P0V/N/hJS4ZsZafB2xVxO1LxsP8V4UChDM4Xmpq/iyVXnQIc9oOmTjZvhtA T/og== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=yyKTXoLRFa+pgkBFMuX0U/DX5U1Pvdkd0Moda5c8ve4=; fh=udsugYL+CKLioYrw1vjD5HAmhynlcXrQEL+030iaqQM=; b=JFD6PZxnJgfhBmLguDAy5cTslnbH83E7l6up2veFaA/PUnKdamgpgh+KPI1e/Uaux7 2+B01RRCQo+jf7VWkGiG+3KpFwJNKo5bpkkOW91/d+C6TFNJLUjtg+XkPBz+yJ/euPEH KM7cezGu20bnjI+99NP/hpOyuB97o2OHsUtfvk1ek1lJuYYfI5S509xk8Yona0ZnyOWv KWRmL1cXRcatwLxQfdgxk6cddiUb7mcGqbR9v8/Md4uislgv7zQtZ/hxXuxYApmn81xC 7rCJVR2rfGaDpBRUn4naW/PDT/c4JEISNARHbjQ5gGKOVHb5ozdMZYw7YG5Oufek/bOF Ua6g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b="JusN/Dcz"; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id g20-20020a056a000b9400b006ce65a4a67bsi1560820pfj.325.2023.12.05.01.42.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 01:42:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b="JusN/Dcz"; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id D555A801C898; Tue, 5 Dec 2023 01:42:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231772AbjLEJmj (ORCPT + 99 others); Tue, 5 Dec 2023 04:42:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbjLEJmh (ORCPT ); Tue, 5 Dec 2023 04:42:37 -0500 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10olkn2058.outbound.protection.outlook.com [40.92.42.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96D11A0; Tue, 5 Dec 2023 01:42:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dPBWltaPx3T60jZYLcO2c0vi/eohD2BjlW0wAjslBhubhTxoh29tg2OGOQj0xQoD6LHhpqoeU2W8aWnG4O+NPNN4svoR1FSnrLnvRpuyLf5e7jTe409WMCaYVgWmY7xXs/EhwibEhyRo/s9DHLgOU0W8jCDhOcMG8/mIHtJGZpDN4XHNHujxmik5IavMKlfGUBkMrODtpzC7oUst5au6XedCzEDGV2dJ1vYY6Qn8Wg2ogKqvAi5vPx11p1LJ3W63kS6pumr1pwxhkBEM16UPqvlMyeUaeLcXLakJeqWpr6X8rb0IeK7HDwyMoWgdMtp5rD6PxCRSkEcN3Y3HIylyAw== 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=yyKTXoLRFa+pgkBFMuX0U/DX5U1Pvdkd0Moda5c8ve4=; b=YRiAWsRGHHYasz0ligew9nFeMpldsLO5DbomIk6f/Hv3t9+XuYZIyDS1vEqqAYK0feyYD9hqiR/TfOnBag98lAL+Q3HnrsaGybYKFqqCDNVLv7n3ZehdZ4j/nQuWhT2m9t+zfNqs5FSu3q3N4U0Z6c31RRy3fMeMaaKZregTuzo2ijxTZxchta3nJyNkGjXRhO0ptDhCyk9tY5dLxEhCmtdyWXybRl1Rp8kianTigr11yTmG8L4LAg3OS8ZNsoSxenwaCdqY21UUYkSLG51fEx2KBGCK09A82Mj6cvJrFwdXCKiLdOoB+drzkU/q1f0uQ+ca5qQk4x3FS1BW7cx8PQ== 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=yyKTXoLRFa+pgkBFMuX0U/DX5U1Pvdkd0Moda5c8ve4=; b=JusN/DczOgOEJ4nUjfzL/e0FupwseuYELus7SUzsOdQhfz/ppVlWJKgkN3UyIDoLVORJmFpMXz2LCw2VHfveGfKowoWmMs/OwhLxUM1QQbX8gz+1pt8OaEMd3Xp83pv5LLASpzHM4os0Npy1JUjpllLgtekWwkhP5h3UJIPMLwH6L9/Cxyz+yNLBQyjKgFOLlKBf65jc2PpctOlVQRTWth8L5F0dzR6YM0NnXw+6n0MNg5bvnb0sZ1b7Z1YtnQeOmf5FQsOzHXtTE06Dw2Bw58ctfrEF9YnhXaKSHr99Xlt5/YTYPYG9QVAJxGgYT5tpRkwMNDKUpyl0hYQ/rohadQ== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by SA1PR20MB5247.namprd20.prod.outlook.com (2603:10b6:806:25e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34; Tue, 5 Dec 2023 09:42:41 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::55b:c350:980:ad8]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::55b:c350:980:ad8%6]) with mapi id 15.20.7046.024; Tue, 5 Dec 2023 09:42:41 +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 , qiujingbao.dlmu@gmail.com, dlan@gentoo.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH 0/4] riscv: sophgo: add clock support for Sophgo CV1800 SoCs Date: Tue, 5 Dec 2023 17:42:30 +0800 Message-ID: X-Mailer: git-send-email 2.43.0 X-TMN: [g7mMLR4qKkk/op8//Y8z28e1pmKbnJxMfJoI9g8aZ1k=] X-ClientProxiedBy: TYAPR01CA0042.jpnprd01.prod.outlook.com (2603:1096:404:28::30) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20231205094231.943544-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|SA1PR20MB5247:EE_ X-MS-Office365-Filtering-Correlation-Id: 7a254ba0-b03f-4d6c-91d3-08dbf576862d X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a78+eworjdu5xTkdasuOljIqp1BnPOpBbxF9LYxPMB+ZmvgANdW5cnV56h1hPle/PAXaQwcV0Q40oXvQ/wBZ2qZTSoVZsZsWehoTMFGv8Nnj68xcEqfHNYsynRdd0XDbQB2yvy6exX5hnrIk6AQwEmDXie47aQSW+RPbVCKejapR4OWAMys1EI4YGaUKX9NU1z+8NyaNllP82svdJAfr26VEZU7eq/EtVP0OtD8+nMPGVfY+LICsO9PW3Eos3iElwHcFVIphWe2QKsY6GfkWx0yZRywTrtn+YjYCX97mVviLCm384POsogV0w0XOXMXJpXYZR8Fxb7i6XyBsQgpuqX4jXf6HA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SFGFY/KHW2/8nwnshJ++FrA6j21Oao5PVmat+f51/ayKsIcxChKo5Va3CcnQijV7r7Xjcy3bN+pC6ztBNF6pz4S2HGeDVOe6Mho5xt0RNzwSGgblqC7viuvaQt6aDtfCKzwrsqQCl1jTg6liHY6FDSAazDo266VoSFpmMrbEYy68Bu2LhtSEo1SeTOFhrjItnIee1n7FQsIrWbFxnUkdxwTdCLTCcRyDPM7OpeM0f39yUOv8TJI6bF8VXs8exjbjeBgRp9fpnGsH+zgzsVnywBo8Hj6eoDobFEcTWelwT/Ebo44ChiWZdSbKWfHzk0iSPAv22Fk/Q3ryDi+4sgy4ZgJIapy/j/QdmPzDguSijXct6CrYOfwc+xw/6Gp3V3ig9WbJdclrc0bX+AjkYD0R1eVTdPGFfdaOXx4atBJSWusNX10/oYOZojUaBOyIhG++ivGpaegwYXzdQzU5IP3jEA6pEGseAFsEWOcabdwJbrNSBc/lsmo4vtpgPsZGULFyai2nTsEFMPuoko= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7a254ba0-b03f-4d6c-91d3-08dbf576862d X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2023 09:42:41.3016 (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: SA1PR20MB5247 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 05 Dec 2023 01:42:47 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784434522163368660 X-GMAIL-MSGID: 1784434522163368660 Add clock controller support for the Sophgo CV1800B and CV1812H. Inochi Amaoto (4): dt-bindings: clock: sophgo: Add CV1800 bindings clk: sophgo: Add CV1800 series clock controller driver riscv: dts: sophgo: add clock generator for Sophgo CV1800 series SoC riscv: dts: sophgo: add uart clock for Sophgo CV1800 series SoC .../bindings/clock/sophgo,cv1800-clk.yaml | 53 + arch/riscv/boot/dts/sophgo/cv1800b.dtsi | 4 + arch/riscv/boot/dts/sophgo/cv1812h.dtsi | 4 + arch/riscv/boot/dts/sophgo/cv18xx.dtsi | 28 +- drivers/clk/Kconfig | 1 + drivers/clk/Makefile | 1 + drivers/clk/sophgo/Kconfig | 7 + drivers/clk/sophgo/Makefile | 7 + drivers/clk/sophgo/clk-cv1800.c | 1548 +++++++++++++++++ drivers/clk/sophgo/clk-cv1800.h | 123 ++ drivers/clk/sophgo/clk-cv18xx-common.c | 76 + drivers/clk/sophgo/clk-cv18xx-common.h | 85 + drivers/clk/sophgo/clk-cv18xx-ip.c | 898 ++++++++++ drivers/clk/sophgo/clk-cv18xx-ip.h | 266 +++ drivers/clk/sophgo/clk-cv18xx-pll.c | 465 +++++ drivers/clk/sophgo/clk-cv18xx-pll.h | 79 + include/dt-bindings/clock/sophgo,cv1800.h | 174 ++ 17 files changed, 3814 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/sophgo,cv1800-clk.yaml create mode 100644 drivers/clk/sophgo/Kconfig create mode 100644 drivers/clk/sophgo/Makefile create mode 100644 drivers/clk/sophgo/clk-cv1800.c create mode 100644 drivers/clk/sophgo/clk-cv1800.h create mode 100644 drivers/clk/sophgo/clk-cv18xx-common.c create mode 100644 drivers/clk/sophgo/clk-cv18xx-common.h create mode 100644 drivers/clk/sophgo/clk-cv18xx-ip.c create mode 100644 drivers/clk/sophgo/clk-cv18xx-ip.h create mode 100644 drivers/clk/sophgo/clk-cv18xx-pll.c create mode 100644 drivers/clk/sophgo/clk-cv18xx-pll.h create mode 100644 include/dt-bindings/clock/sophgo,cv1800.h --- 2.43.0