Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp860427rdb; Fri, 25 Aug 2023 03:31:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHUJqsiDJzhuYXZ2fCvoQjb/td+1XtRFqk3rEw/lcrgvfDh24xS2n1JKHC0Q63Bwmq1d3Gf X-Received: by 2002:a05:6402:3447:b0:51d:95ac:22ed with SMTP id l7-20020a056402344700b0051d95ac22edmr21732810edc.1.1692959467321; Fri, 25 Aug 2023 03:31:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692959467; cv=none; d=google.com; s=arc-20160816; b=HmzjBpjTGAnEt/H4VBHx7og4hpg4YJQE8cMg3pcd2S/80PFOyIrH5gK54qaKhDOrTp 5xAybNMjmBNe3TA8LU08bOF9el7GXebIPx4TsejJ2LBns977Z1d5+nm9SuTIgbifHo7q LMN+7Dxx6MLrzquan3FHlVggELYc3WWAGtThPlJJrGBcqhLhx09MaUQP/F6j1DTEgZ1Z EfbNWYA66I8NHk86H2LEdJIQmjejvssNmkwQP1278PGvNMnwnEMbHlVlpNaLHAXTKI5N rH3hKQEPKPPXDQBDCqav8cqIPdLJmKnxVDeN1/hDbZDCvFcaZw5TAWDdmzxtGtUpTCKf g8BA== 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=9cRt41vbpW31K4X14y2jLJXhJ+QqjJlYXEWddEEkC3M=; fh=OlQYnYmfnAvovqMM7SwhPEmQSrStPosmmGYBCfTg71c=; b=V5VZgr2+G1VQljP18IKuyjdOaUM6Yt76zcTz0nrhE6AluBsCbZ6hNF7nNpPn2IGjth 3d1z6SeY/843BPfonTJkB+OMsy6aHKQXs3qq6m61+/7T/BTOk7tmhQDzRTWjQMR6Eqmu fQ5CZcpBbOeUYQhUu1CTRB2i3XwuzIPli7AivGcC//2AmqUjb8pWrkEuZyNDcfCSGUFr +SAS/tz6tALqyqx6OisDdUBCiAKaJjgCyNMbvgagRMPVJbHBSy5yzpSYbO7GZ+UHfAH0 zuUyaue92hN52CT/s7VGyFHEX2uXOiKx23LEesoo1v9FIoSihkv5ROCRe0CQFFfxvPtr GXyA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r25-20020aa7cfd9000000b0052a193f9987si955995edy.359.2023.08.25.03.30.34; Fri, 25 Aug 2023 03:31:07 -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 S243419AbjHYIOO convert rfc822-to-8bit (ORCPT + 99 others); Fri, 25 Aug 2023 04:14:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244010AbjHYIOC (ORCPT ); Fri, 25 Aug 2023 04:14:02 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51AD32115; Fri, 25 Aug 2023 01:13:40 -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 0BA2F81BB; Fri, 25 Aug 2023 16:13:30 +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; Fri, 25 Aug 2023 16:13:30 +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, 25 Aug 2023 16:13:28 +0800 From: William Qiu To: , , , CC: Emil Renner Berthing , Rob Herring , Philipp Zabel , Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Krzysztof Kozlowski , Conor Dooley , "Paul Walmsley" , Palmer Dabbelt , Albert Ou , Hal Feng , William Qiu Subject: [RFC v4 0/4] StarFive's Pulse Width Modulation driver support Date: Fri, 25 Aug 2023 16:13:24 +0800 Message-ID: <20230825081328.204442-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, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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 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 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.5rc7. 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-ptc.c | 192 ++++++++++++++++++ 9 files changed, 328 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/starfive,jh7100-pwm.yaml create mode 100644 drivers/pwm/pwm-starfive-ptc.c -- 2.34.1