Message ID | 20231110062039.103339-1-william.qiu@starfivetech.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp1309354vqs; Fri, 10 Nov 2023 10:39:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGkwsS3fXrexp29R0kT/lSI6HvdM7OStpupIchJv6dpS6iXBbiZ2jEUfd3fjpar9fFfayzf X-Received: by 2002:a17:902:e54b:b0:1cc:60ca:8f24 with SMTP id n11-20020a170902e54b00b001cc60ca8f24mr133399plf.45.1699641577099; Fri, 10 Nov 2023 10:39:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699641577; cv=none; d=google.com; s=arc-20160816; b=uZLfq1oFDehDNIyMUaj4CYNclYI70uGKnAkHCLsny/Vnd8xoNfTGWeDLyDXzHqEZV5 n2fRpgbKQf+LCOLPLdWiQWwV4/lTmsF+3EGfVb1rZk7L8XDYX3hUxcmfTYJsScdbKej8 U45KFYooyIwF9UZ+TczhwZRzFv1GftY/7SPcnEfgg3uPpq2rEM0L9BjTk7vefN4jgTsB L1v+WTCgPshyZ1b/a7gpweYE6ngyKtCL9VYe7r4Q8+qBVWgGeAwdH0BgJnNs3ZWUJGoL zxAuKxdyOPUVK/i0/cAjWUQqh5gkCas3cxN0GwaZb1PZEfcrwsPw8e40E0nxpYsHwaj4 HwIw== 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=vIPNawAQYAslamt3hUXghq/9PTgFPuaowSRRkstvK44=; fh=T4gzk7+hgrXGjSNvKGZTlbuKXCiuDaGkxvCBgfgONjs=; b=Ccx6WZapFbxq1flaFZBTWl77sAl+B76c6r3hU1xPdq75zeisO9xL1bAr/VpMsu1xaH 74J4ub3eLLeQlhDHJe/NjM/PRlcCV6y2nBvhgSoeI2kmLa0LXE2r8PxBUtVwmhtNiKUC +YgSMS5E1LcputOSG9cq/hQqXVOIpSIuvzx3FEsugGqLZAhYmpF8WL9a055kqLPJ7hmS MwzoPNtLI+lu+mS53kWuH6s0so23f5GAq4V9GYAv2O5CfBWuaTSUWgPDxVGEgWmH32f2 yPImf4aszz2c4Ax6TJd8rn6BW+t3ags/Z0FwqO1Y3uqZJLufeuE+Oi/vHjqn2arTgSk2 XRRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id d14-20020a170902cece00b001b9dda4e1e7si8782653plg.154.2023.11.10.10.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 10:39:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id B3CA480E857F; Fri, 10 Nov 2023 10:39:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345854AbjKJSeL convert rfc822-to-8bit (ORCPT <rfc822;heyuhang3455@gmail.com> + 29 others); Fri, 10 Nov 2023 13:34:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346043AbjKJSc6 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 10 Nov 2023 13:32:58 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBE266A5B; Thu, 9 Nov 2023 22:20:52 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 5852A24DFED; Fri, 10 Nov 2023 14:20:41 +0800 (CST) Received: from EXMBX168.cuchost.com (172.16.6.78) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 10 Nov 2023 14:20:41 +0800 Received: from williamqiu-virtual-machine.starfivetech.com (171.223.208.138) by EXMBX168.cuchost.com (172.16.6.78) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 10 Nov 2023 14:20:40 +0800 From: William Qiu <william.qiu@starfivetech.com> To: <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org>, <linux-pwm@vger.kernel.org> CC: Emil Renner Berthing <kernel@esmil.dk>, Rob Herring <robh+dt@kernel.org>, Thierry Reding <thierry.reding@gmail.com>, Philipp Zabel <p.zabel@pengutronix.de>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, "Hal Feng" <hal.feng@starfivetech.com>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, William Qiu <william.qiu@starfivetech.com> Subject: [PATCH v7 0/4] StarFive's Pulse Width Modulation driver support Date: Fri, 10 Nov 2023 14:20:35 +0800 Message-ID: <20231110062039.103339-1-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX168.cuchost.com (172.16.6.78) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=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 lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 10 Nov 2023 10:39:09 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782203366492246147 X-GMAIL-MSGID: 1782203366492246147 |
Series |
StarFive's Pulse Width Modulation driver support
|
|
Message
William Qiu
Nov. 10, 2023, 6:20 a.m. UTC
Hi, This patchset adds initial rudimentary support for the StarFive Pulse Width Modulation controller driver. And this driver will be used in StarFive's VisionFive 2 board.The first patch add Documentations for the device and Patch 2 adds device probe for the module. Changes v6->v7: - Rebased to v6.6. - Added dependency architecture. - Adopted new rounding algorithm. - Added limitation descripton. - Used function interfaces instead of macro definitions. - Followed the linux coding style. Changes v5->v6: - Rebased to v6.6rc5. - Changed driver into a generic OpenCores driver. - Modified dt-bindings description into OpenCores. - Uesd the StarFive compatible string to parameterize. Changes v4->v5: - Rebased to v6.6rc2. - Updated macro definition indent. - Replaced the clock initializes the interface. - Fixed patch description. Changes v3->v4: - Rebased to v6.5rc7. - Sorted the header files in alphabetic order. - Changed iowrite32() to writel(). - Added a way to turn off. - Modified polarity inversion implementation. - Added 7100 support. - Added dts patches. - Used the various helpers in linux/math.h. - Corrected formatting problems. - Renamed dtbinding to 'starfive,jh7100-pwm.yaml'. - Dropped the redundant code. Changes v2->v3: - Fixed some formatting issues. Changes v1->v2: - Renamed the dt-binding 'pwm-starfive.yaml' to 'starfive,jh7110-pwm.yaml'. - Dropped the compatible's Items. - Dropped the unuse defines. - Modified the code to follow the Linux coding style. - Changed return value to dev_err_probe. - Dropped the unnecessary local variable. The patch series is based on v6.6. William Qiu (4): dt-bindings: pwm: Add OpenCores PWM module pwm: opencores: Add PWM driver support riscv: dts: starfive: jh7110: Add PWM node and pins configuration riscv: dts: starfive: jh7100: Add PWM node and pins configuration .../bindings/pwm/opencores,pwm.yaml | 56 +++++ MAINTAINERS | 7 + .../boot/dts/starfive/jh7100-common.dtsi | 24 ++ arch/riscv/boot/dts/starfive/jh7100.dtsi | 9 + .../jh7110-starfive-visionfive-2.dtsi | 22 ++ arch/riscv/boot/dts/starfive/jh7110.dtsi | 9 + drivers/pwm/Kconfig | 12 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-ocores.c | 236 ++++++++++++++++++ 9 files changed, 376 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/opencores,pwm.yaml create mode 100644 drivers/pwm/pwm-ocores.c -- 2.34.1