Message ID | 20231129092732.43387-1-william.qiu@starfivetech.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a5a7:0:b0:403:3b70:6f57 with SMTP id d7csp219108vqn; Wed, 29 Nov 2023 01:27:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IFW7+cnZcCBYx+qt+nGgzc7lunXfTRv2C588DjLDgu6jSOy+QLYKC5+ZzwldmLfPGtMSmnd X-Received: by 2002:a17:90b:3884:b0:285:d803:8945 with SMTP id mu4-20020a17090b388400b00285d8038945mr9300475pjb.46.1701250079266; Wed, 29 Nov 2023 01:27:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701250079; cv=none; d=google.com; s=arc-20160816; b=twJkIS+oFLroiz56X+Pv11MwUz58WEk8WGg8aIWCA1y3M0OM/hZbhYgSVOM0MSuXw1 vYKN3wh0s3gGtnDQQ1+sBmUv4u6zbu6lIXmSuh/sQKw1mcywjRHx9gBSMM3enya70pOT D7C5l6hSuNg7IBIvrPPfG8Y7bI0qof6QEFkHxNh6wEOhyQKz1QDXozE06uH45AVJCeFn M+fGkMS+TKzzXrdX8H6BbkgMiYHLzDzDYry9nRFBRRnnKm0DLdFEP2PYNIp6gudx626l Kl32ERBVVwJgrfejAWPG2+i2ooL49/DDlphUwut+EfWiD+Vi5a0OXcC9DEiHZ9E7E+0M lf0w== 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=U5Q1ojHs4Ej9mINslJkmuRgoBWwqFLn1v+LGN9TwqCI=; fh=T4gzk7+hgrXGjSNvKGZTlbuKXCiuDaGkxvCBgfgONjs=; b=qVJWqGzS7eBpHo8pBPUe3+ynVZKMDrqYWQbdnVQk/vwXLDmQJ4fBPgKLL0gFba6moy HMolgbCRfGf7spbORJRFUx1QVPop+/NCv3h9LXIwCKQOJDk5HxBeSd+NKr6EY3uBTtjb xvtaLr8gg6LMuTiPd5MjKuF/wAMZUD3Of9QYNML2oaZTJopXmbwMAt4ByzAbN5t8h968 J3g+x3Uv5ORxUl61Z91+LScuFJs5E0HpVaNShqLLWzMlRY7S3q9b1CFM5f/xlfvtlg3m ZNhZ4FeeC7RPWQQensos/UjSab4hB7v96vO2BiKd78tbWahYATprmYM6uWQbRUs2ki+n OWPA== 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:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h6-20020a170902ac8600b001cfc3f7392fsi7628890plr.252.2023.11.29.01.27.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 01:27:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 532CB80C034D; Wed, 29 Nov 2023 01:27:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230168AbjK2J1m convert rfc822-to-8bit (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Wed, 29 Nov 2023 04:27:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230135AbjK2J1l (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 29 Nov 2023 04:27:41 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1100F1BD4; Wed, 29 Nov 2023 01:27:41 -0800 (PST) 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 ex01.ufhost.com (Postfix) with ESMTP id 18E1B24E2D4; Wed, 29 Nov 2023 17:27:34 +0800 (CST) Received: from EXMBX168.cuchost.com (172.16.6.78) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 29 Nov 2023 17:27:34 +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; Wed, 29 Nov 2023 17:27:32 +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 v8 0/4] StarFive's Pulse Width Modulation driver support Date: Wed, 29 Nov 2023 17:27:28 +0800 Message-ID: <20231129092732.43387-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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, 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: <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 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 01:27:58 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783890003555640393 X-GMAIL-MSGID: 1783890003555640393 |
Series |
StarFive's Pulse Width Modulation driver support
|
|
Message
William Qiu
Nov. 29, 2023, 9:27 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 v7->v8: - Rebased to v6.7rc3. - Changed compatible to "opencores,pwm-v1" - Adjusted the clock unprepare order. - Followed dt-bindings Coding style. 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.7rc3. William Qiu (4): dt-bindings: pwm: Add bindings for OpenCores PWM Controller pwm: opencores: Add PWM driver support riscv: dts: starfive: jh7100: Add PWM node and pins configuration riscv: dts: starfive: jh7110: 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 | 232 ++++++++++++++++++ 9 files changed, 372 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/opencores,pwm.yaml create mode 100644 drivers/pwm/pwm-ocores.c -- 2.34.1