From patchwork Tue Jun 27 05:53:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xingyu Wu X-Patchwork-Id: 11322 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7974855vqr; Mon, 26 Jun 2023 23:03:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5OSZX0YZezqMvvI/GEbSPbWDBs6ESqainNCyvtAnTMIB7Eje6DpqIhhRe3o74VK3HI0DJh X-Received: by 2002:a05:6359:c11:b0:134:c984:ab74 with SMTP id gn17-20020a0563590c1100b00134c984ab74mr1734618rwb.9.1687845785619; Mon, 26 Jun 2023 23:03:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687845785; cv=none; d=google.com; s=arc-20160816; b=fHbvpMpGzRwNNIKk4DMg67RFU2rQjEXIY2CHRVMDXGa64aGjjLxk9zPSnlfftavHTo E4c10DlqXNgxBq2eCKv47fAKWVXtLt/0GheorAsY0Jncq1d/v6PJM5gZukvR3VS4uNIh 4GsfZTpsAKkIK3KQ2BuIYUcbcx8p0KXYpdz2Zt43ZhPzOmfQ4krH9WF0+FennUC/qZbC 5aqyiOH7CrvOCef/DcXYYldL8t7W/bn8/0hBYuRPEYSVtDzuHKQJWrQINR5uuYP2aOCq 51DhVGiNZiztytPVAjBdLPPPJhNbGRVKXz5fpuH3Vk6Wnn72Mw5qCeBoOmDfdqzhXywy 4/Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=jqVQDoTU1v8pO+vYe/Uos0emO6pu3Un0VscuBVu2m/E=; fh=Bi90+vHPGJvEeZC5E60tXc4xZML9zWIS5c+0tWGW748=; b=JBwT6wGtM1n2Fs+VDAYPdpHMlrteluOTPbgaySN9NsSRJ6pRheNONIy7sEBCmcLirK /dnwfOwaTfZYyo6K0VnYu0ftoowvRVOMSZmOreIudqgzNI7cuzr6Ef/fIWHSe1K2L3Cm gsL5TesuhKkBZlFCkoKehRjuI4ydJb5H4gcG9N9DYc5NunmwG54un6cj9elhvLlZbqiU 2rhyxm/sSMcaewgjSWQomf/OKqFVrrEtiUm+soRRxMzLIGjXKC/lqkdT5HcNJ2d8ZS20 ad68gq8XPtErqUYi6X3WSSxfHgVQuyC3NeHbmRRNCuRIPdtiwGW6w+hYIf4v5oxekref ZjQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j63-20020a638042000000b0053fee168aa6si6429859pgd.236.2023.06.26.23.02.50; Mon, 26 Jun 2023 23:03:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229766AbjF0Fxl convert rfc822-to-8bit (ORCPT + 99 others); Tue, 27 Jun 2023 01:53:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbjF0FxZ (ORCPT ); Tue, 27 Jun 2023 01:53:25 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A555A19B0; Mon, 26 Jun 2023 22:53:23 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id DFF4D808F; Tue, 27 Jun 2023 13:53:14 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 27 Jun 2023 13:53:14 +0800 Received: from localhost.localdomain (183.27.97.206) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 27 Jun 2023 13:53:13 +0800 From: Xingyu Wu To: , , "Daniel Lezcano" , Thomas Gleixner , Krzysztof Kozlowski CC: Rob Herring , Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Xingyu Wu , Samin Guo , , Conor Dooley Subject: [PATCH v3 0/3] Add timer driver for StarFive JH7110 RISC-V SoC Date: Tue, 27 Jun 2023 13:53:10 +0800 Message-ID: <20230627055313.252519-1-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [183.27.97.206] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769834582015187852?= X-GMAIL-MSGID: =?utf-8?q?1769834582015187852?= This patch serises are to add timer driver for the StarFive JH7110 RISC-V SoC. The first patch adds documentation to describe device tree bindings. The subsequent patch adds timer driver and support JH7110 SoC. The last patch adds device node about timer in JH7110 dts. This timer has four free-running 32 bit counters and runs in 24MHz clock on StarFive JH7110 SoC. And each channel(counter) triggers an interrupt when timeout. They support one-shot mode and continuous-run mode. Changes since v2: - Rebased on 6.4-rc7. - Merged the header file into the c file. - Renamed the functions from 'starfive_' to 'jh7110_' - Used function 'clocksource_register_hz' instead of 'clocksource_mmio_init'. v2: https://lore.kernel.org/all/20230320135433.144832-1-xingyu.wu@starfivetech.com/ Changes since v1: - Added description about timer and modified properties' description in dt-bindings. - Dropped the 'interrupt-names' and 'clock-frequency' in dt-bindings. - Renamed the functions and added 'starfive_' - Modified that the driver probe by platform bus. v1: https://lore.kernel.org/all/20221223094801.181315-1-xingyu.wu@starfivetech.com/ Xingyu Wu (3): dt-bindings: timer: Add timer for StarFive JH7110 SoC clocksource: Add JH7110 timer driver riscv: dts: jh7110: starfive: Add timer node .../bindings/timer/starfive,jh7110-timer.yaml | 96 ++++ MAINTAINERS | 7 + arch/riscv/boot/dts/starfive/jh7110.dtsi | 20 + drivers/clocksource/Kconfig | 11 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-jh7110.c | 485 ++++++++++++++++++ 6 files changed, 620 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/starfive,jh7110-timer.yaml create mode 100644 drivers/clocksource/timer-jh7110.c