Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp838250rdb; Fri, 25 Aug 2023 02:40:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFr3YuoWAvdZo2B6FherKv0mudENimiQSLo4aRqVuWrMLXXGQjHjgOORGZZkN8H4hFSzPng X-Received: by 2002:a17:907:6eab:b0:9a1:e5bf:c907 with SMTP id sh43-20020a1709076eab00b009a1e5bfc907mr7137487ejc.2.1692956409359; Fri, 25 Aug 2023 02:40:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692956409; cv=none; d=google.com; s=arc-20160816; b=cKJ0HCNvS5/9x3T4vEX3Kap8AhmoOvng91KaDi6Aviy1Jj9pignToxkggQa+jJkKW5 epGuXUa8nRWiZDHL+r1pcI/OjnVqOEX7z/DBINha9t33p1XnCjYarykDjD/coFNUje9n y8wEQgH7Vuygt8ixXCmEFK2csMBpBJgwZf43ANa9PFcs4RliLyYUEN90oNXUxz7F6W+z C56Tf7LE0jKxAsy6NPSGPE0Ur/qmLlOSpv/QrEyoS1Lv4vp+cyrYpY9SFqxMhmLqyhTq 6BTcE7nXkkP7iQ8iH9/xqSnpUofYAQJHc5Cg/2StkTD6eqpNqxQ23pNJyG0T4C4pXiPg 3VrA== 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=3WQltjRTnQgkU/S0E/tzdbwjgBRLwzzMVRB1wPpJe3M=; fh=OlQYnYmfnAvovqMM7SwhPEmQSrStPosmmGYBCfTg71c=; b=B6xuo8qwMxAi5/NvOIycGyoUusjMDyC/NdnRpcdjcqh49s71lPElkLKXtrTYDZXZ60 /RyuSs77BaXNng4+PB6wO9cnchYLJo4s4DoRwPKkzzfIv5CSxI/Eq9T+6RlzLZJuQln3 NncHSLCvRI+weRJ4l2JbJTor7txlCvrm/CXI188ZDflTKBWEJE7y9+Ckfp1+WxNvaZIk u+9GkrIkOmxywVS84lOE04o2bLdWrcE+fR+6TqO9WqHA3ss5+XtzKypQpFtbzZQCjgpN D60gtc+ErG/8zYrGBj8WQSCe/nQP0pOUQf1elYxwromwOOUQmaPOa9KGFhx2ejkm9mnE HlrA== 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 gh20-20020a170906e09400b0099cbed6da42si758158ejb.157.2023.08.25.02.39.40; Fri, 25 Aug 2023 02:40:09 -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 S242539AbjHYIOJ convert rfc822-to-8bit (ORCPT + 99 others); Fri, 25 Aug 2023 04:14:09 -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 S241144AbjHYIOB (ORCPT ); Fri, 25 Aug 2023 04:14:01 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4E0D2134; Fri, 25 Aug 2023 01:13:35 -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 7654680B6; Fri, 25 Aug 2023 16:13:33 +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:33 +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:32 +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 4/4] riscv: dts: starfive: jh7100: Add PWM node and pins configuration Date: Fri, 25 Aug 2023 16:13:28 +0800 Message-ID: <20230825081328.204442-5-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230825081328.204442-1-william.qiu@starfivetech.com> References: <20230825081328.204442-1-william.qiu@starfivetech.com> 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 Add StarFive JH7100 PWM controller node and add PWM pins configuration on VisionFive 2 board. 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 4218621ea3b9..7f5bb19e636e 100644 --- a/arch/riscv/boot/dts/starfive/jh7100.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7100.dtsi @@ -248,5 +248,14 @@ watchdog@12480000 { resets = <&rstgen JH7100_RSTN_WDTIMER_APB>, <&rstgen JH7100_RSTN_WDT>; }; + + 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"; + }; }; }; -- 2.34.1