Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp924067rdb; Fri, 20 Oct 2023 03:38:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHfDq82Zv4nuFaoIcEHvr4FFagaZY4VjmPUY4YGHg8NJnFFGPJJC1EkOLniJ7jb3Hgydn8a X-Received: by 2002:a05:6358:63a8:b0:13f:2833:bf41 with SMTP id k40-20020a05635863a800b0013f2833bf41mr1316307rwh.23.1697798309696; Fri, 20 Oct 2023 03:38:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697798309; cv=none; d=google.com; s=arc-20160816; b=IqyjVo98EpEU+4zcwytjOHcYZTUDzXP/5zN6i26v7n/fNsoqpyStFIptjsieDlni8b lYvAE6a8W6UPau82YdEspLh9ISWA+f+b91fsDIwgy05I2oCwDSdaBrXOpkzuDv58f0EV kCrbV3RR1SWm883rICTXUyKE6SKuno8fCy9wET6uzyb1Uu1LJZ1ZTLndMCUlowhjuszO QxuW/2JkfGlsCbVjfIv/Yu7B8YDB2AtIDBVvfzWJzHNSDG9TDD9zN03IYc0lysXmzTc4 wMNd3d5v2ZhkQZSCTaU5hxrbNQDfygzZF32evUDyp2BOm5GN9AUI/PEpql4/kywC8ps7 H3TA== 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=CIFy6tMUHs/SWQUrRq3/TlaWCxezGhYW4TpeDDq884I=; fh=T4gzk7+hgrXGjSNvKGZTlbuKXCiuDaGkxvCBgfgONjs=; b=rHbGBU7IqbB/HZRP16BhkUkkOXqSMCJSW0YjnoO0ntPzHgi6ptvps7oxOF5+wFG17V JTbj17cVr3RFFox0ewyhsGi2QFYh8Vb0jceXjyDviKdhituT96VP8n2O2hvpRdsQdiJh PNfgyLo04bKt/fRKNiITFrgR8QtuPMR6Wl8xzIPkQOjcerdSMZXaaXgj16I9JvrfgS2R 8sKAMhYgBCjIGoe4oD+dhEyJstjEsyBP3QPgjT3dRSOGOJ1gElvKFQWGmawzSRBoYc8T 8FczdwDZRZMNUeCzIPWKsqKj7nCXArlYtih8k0fnuG3mNi67IxwzGqLh/4+L2Eje2HuU VmWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id x14-20020aa79ace000000b006b61871ae27si1613371pfp.367.2023.10.20.03.38.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 03:38:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 50B42828D026; Fri, 20 Oct 2023 03:38:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376961AbjJTKhw convert rfc822-to-8bit (ORCPT + 99 others); Fri, 20 Oct 2023 06:37:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376857AbjJTKht (ORCPT ); Fri, 20 Oct 2023 06:37:49 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47B39D5B; Fri, 20 Oct 2023 03:37:46 -0700 (PDT) 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 fd01.gateway.ufhost.com (Postfix) with ESMTP id A854424E0F6; Fri, 20 Oct 2023 18:37:43 +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, 20 Oct 2023 18:37:43 +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, 20 Oct 2023 18:37:42 +0800 From: William Qiu To: , , , CC: Emil Renner Berthing , Rob Herring , Thierry Reding , Philipp Zabel , Krzysztof Kozlowski , Conor Dooley , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , "Hal Feng" , Paul Walmsley , Palmer Dabbelt , Albert Ou , William Qiu Subject: [PATCH v6 0/4] StarFive's Pulse Width Modulation driver support Date: Fri, 20 Oct 2023 18:37:37 +0800 Message-ID: <20231020103741.557735-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: EXCAS064.cuchost.com (172.16.6.24) 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 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: 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, 20 Oct 2023 03:38:24 -0700 (PDT) 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 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.6rc5. 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-ocores.yaml | 53 +++++ 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 | 11 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-ocores.c | 211 ++++++++++++++++++ 9 files changed, 347 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/opencores,pwm-ocores.yaml create mode 100644 drivers/pwm/pwm-ocores.c -- 2.34.1