Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2573358rdb; Fri, 22 Sep 2023 02:37:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGKbOCza1/PTi9nhHuf6MRiMVZsPtqzzcYa7UBCRTxYmIhfBu0Ar/VlJPW7HWq1ySlJt71r X-Received: by 2002:a05:6358:931a:b0:142:e748:9260 with SMTP id x26-20020a056358931a00b00142e7489260mr6728572rwa.17.1695375472206; Fri, 22 Sep 2023 02:37:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695375472; cv=none; d=google.com; s=arc-20160816; b=uIeB0JR1KWUIy6dbY3w/fDvT0tFSYYKmeNQEmEYRWR7Gt+YlN98PazqdYUxrM6OHDZ TSXdx0B8P3PYGdNQ/+QgsazDaj/EzaCeUH2mekQzJO+l+fWQK9g8BR2Br//xLd5gRb0z 5YjxVwkswklLj8nlgO1WK9L+znSrsbjQ8zoKXtmPOVVIra/O2ODyYpX4wQw2kVXyhwMr zjEtTO3j4mg8neqAErbqceNLt+Xrf5Q0VeR2+wFZrVomoSp2/SXKbuh/2FnfH0agG5bI X9cUdPktw0dOxOc0LpnH6gOIdC6l6bhfE+8w/K6CbJwDhpjC/6S+3/mej1f0Qg045o1D t1Rw== 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=h0Z93UKKggYB+YTHQMBpzo+29+QOrAdqnes+aWah2S4=; fh=T4gzk7+hgrXGjSNvKGZTlbuKXCiuDaGkxvCBgfgONjs=; b=b5RrrOJ9JcXMBSsgUGhNCPXzGD8vujeMPA+3A3NMrKs3+z9wsYnxzMOctAmuMiVLpG dLzJzTmZzXYdybWz3kXspJLpJkX0VoDWW+8qRBhmQE9G56h6+4dLgo+YG/OPDzeqWuYD xXMY9hf5YS+ThPn6Kyf14nDgkpmwr3yEn200NdKK5T31N+LLn+97IsP3RlU17WxhSMIE koAKH7RIgRX4L6X4erXOaetC19oTuB611d6Mq5cYUR6KD4QnuTZ4FvJfyp/59fG+t69N 9B9vuhbNK4VKDqoe07yFhF5QJVSjxs6amuh4KclojdP9/4qXJGaHvSBFzlRC6xvzVlSW AmLA== 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 k63-20020a636f42000000b00577a519621bsi3324964pgc.231.2023.09.22.02.37.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 02:37:52 -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 1EA3182922F7; Fri, 22 Sep 2023 02:29:12 -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 S232332AbjIVJ3K convert rfc822-to-8bit (ORCPT + 99 others); Fri, 22 Sep 2023 05:29:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232940AbjIVJ3C (ORCPT ); Fri, 22 Sep 2023 05:29:02 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58AE319D; Fri, 22 Sep 2023 02:28:53 -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 3886317EC1; Fri, 22 Sep 2023 17:28:50 +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, 22 Sep 2023 17:28:50 +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, 22 Sep 2023 17:28:49 +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 v5 0/4] StarFive's Pulse Width Modulation driver support Date: Fri, 22 Sep 2023 17:28:44 +0800 Message-ID: <20230922092848.72664-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: EXCAS061.cuchost.com (172.16.6.21) 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, 22 Sep 2023 02:29:12 -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 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. - Moified 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.6rc2. William Qiu (4): dt-bindings: pwm: Add StarFive PWM module pwm: starfive: 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/starfive,jh7100-pwm.yaml | 55 +++++ 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 | 9 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-starfive.c | 190 ++++++++++++++++++ 9 files changed, 326 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/starfive,jh7100-pwm.yaml create mode 100644 drivers/pwm/pwm-starfive.c -- 2.34.1