From patchwork Thu Jun 1 08:51:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Qiu X-Patchwork-Id: 101821 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp158366vqr; Thu, 1 Jun 2023 02:14:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7IT7a9WwZ3xzLIPxMxAttukMxgPKXisX0OMqQjc5p1Y+E0CQPrLpu0Cv7bSaPVr9HCpf/A X-Received: by 2002:a54:4d84:0:b0:398:29bb:dd4a with SMTP id y4-20020a544d84000000b0039829bbdd4amr6194676oix.54.1685610867187; Thu, 01 Jun 2023 02:14:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685610867; cv=none; d=google.com; s=arc-20160816; b=Zkq/OvOWV8ujTY7fRmFm4lW5QIAcM/eXQSdVRHOW7Ef9gIbJVAWqCGELAJ8fYBvYPZ 4i/KdVfkuSSrSONxTX5a9kPnvy/x01w2z4WvisuV173gOb5cLkYfhnd7YOou2s4Gx3v7 6g+D9GEhA/f5fopzCRo/YHbXaQeG4cYBtZ6JEv95sf+9UCLe6Kne0xt/jYVBif71FfDp GN0eQ6KpSyWB9+XA5WUrO1X8+emK4c2N4Lj72cUgk1CrM+LtSdUnjINSemEcPMHFG7fl fZxNJnpjEgQrWgmpO/xeJ+UjmLfizE8eGktFNPAjRAyG+pGpqigXFq7SiWcA5O1QbLfI zedw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=pT/FBlP/klXQ3r3R9dePUEUhL6+9nhwI1UuKdOBA7Bg=; b=Z/DVYSFCEoflDXgXGCVcfAX+sQSGb91steqJKMsOtTbG36I6TLx5xPZ428Qv9hty1Y kouWWtYqJ8D0Vt2dRY6ay+KwO3wQxajcvNe7PUynVVNSF+wIFvnf4HvHcLT3tnYe5qSz ZubYVUrvGrVVsRT4sIC6V3I12/2Zg04W8iFztelteA4sDAjrdNyxjOn8me3CBTyUzzVf lXKGLO5/uIvXf4pBfAvflYh4GLRysFh/Xv2a/UaxoKkZxBg0WMiCpw4pMEDi8Ubod64b turUzeybvzErAU8S2/+UqgznO+Mw8skfTTS23MTGME35lyJNuWN8UqF0O8IaFUx99qxY XDfg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h126-20020a625384000000b0064367018c21si5093131pfb.12.2023.06.01.02.14.11; Thu, 01 Jun 2023 02:14:27 -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 S232453AbjFAIwW convert rfc822-to-8bit (ORCPT + 99 others); Thu, 1 Jun 2023 04:52:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232389AbjFAIwI (ORCPT ); Thu, 1 Jun 2023 04:52:08 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5904E2; Thu, 1 Jun 2023 01:52:05 -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 2A6537FDC; Thu, 1 Jun 2023 16:51:59 +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; Thu, 1 Jun 2023 16:51:59 +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; Thu, 1 Jun 2023 16:51:58 +0800 From: William Qiu To: , , , CC: Thierry Reding , Philipp Zabel , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , Emil Renner Berthing , Hal Feng , William Qiu Subject: [PATCH v4 4/4] riscv: dts: starfive: jh7100: Add PWM node and pins configuration Date: Thu, 1 Jun 2023 16:51:54 +0800 Message-ID: <20230601085154.36938-5-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230601085154.36938-1-william.qiu@starfivetech.com> References: <20230601085154.36938-1-william.qiu@starfivetech.com> MIME-Version: 1.0 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767491100264835701?= X-GMAIL-MSGID: =?utf-8?q?1767491100264835701?= Add StarFive JH7100 PWM controller node and add PWM pins configuration on VisionFive 2 board. Reviewed-by: Hal Feng Signed-off-by: William Qiu --- .../boot/dts/starfive/jh7100-common.dtsi | 24 +++++++++++++++++++ arch/riscv/boot/dts/starfive/jh7100.dtsi | 9 +++++++ 2 files changed, 33 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7100-common.dtsi b/arch/riscv/boot/dts/starfive/jh7100-common.dtsi index b93ce351a90f..746867b882b0 100644 --- a/arch/riscv/boot/dts/starfive/jh7100-common.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7100-common.dtsi @@ -84,6 +84,24 @@ GPO_I2C2_PAD_SDA_OEN, }; }; + pwm_pins: pwm-0 { + pwm-pins { + pinmux = , + ; + bias-disable; + drive-strength = <35>; + input-disable; + input-schmitt-disable; + slew-rate = <0>; + }; + }; + uart3_pins: uart3-0 { rx-pins { pinmux = ; }; +&ptc { + pinctrl-names = "default"; + pinctrl-0 = <&pwm_pins>; + status = "okay"; +}; + &uart3 { pinctrl-names = "default"; pinctrl-0 = <&uart3_pins>; diff --git a/arch/riscv/boot/dts/starfive/jh7100.dtsi b/arch/riscv/boot/dts/starfive/jh7100.dtsi index 000447482aca..977a509ffbdd 100644 --- a/arch/riscv/boot/dts/starfive/jh7100.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7100.dtsi @@ -238,5 +238,14 @@ i2c3: i2c@12460000 { #size-cells = <0>; status = "disabled"; }; + + ptc: pwm@12490000 { + compatible = "starfive,jh7100-pwm"; + reg = <0x0 0x12490000 0x0 0x10000>; + clocks = <&clkgen JH7100_CLK_PWM_APB>; + resets = <&rstgen JH7100_RSTN_PWM_APB>; + #pwm-cells = <3>; + status = "disabled"; + }; }; };