Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2222629rdb; Fri, 8 Dec 2023 01:42:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTBMC5OzFTpNhcOJYZf3Q1cF2O5v5z6Lu3Z8Qw/ENUh1M1SNEkp35JMupIcyZ0DQy76oOl X-Received: by 2002:a05:6a20:8f07:b0:18f:ee27:aa59 with SMTP id b7-20020a056a208f0700b0018fee27aa59mr3330581pzk.10.1702028551573; Fri, 08 Dec 2023 01:42:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702028551; cv=none; d=google.com; s=arc-20160816; b=nAiJ5E6bLIOFe+Sfv7tCQltaQiGCkq/4h11cMrc82RXKtm15hgwyUZB7ueaXa9L71L J8/79WksF1/qVXEthA+PasOwpSYAPF6FpkZjwoB99VikSDK7RZz7v8tDAE0C5MU5SgF4 vPe40DvbyctOdUoEtqnpHWuPwnq5NzQba8qoaE4nX5hNV77FVF0Y2S/Xhred903t0ZrT Hpi5IaQq4Hdc4YS6MS/XmatmBCUccMFB8tHEwVks52CZlKzhEPL/r/os68F8drFQbysE OlgxLRSPdpvX1zJIA2x0jJ8CYKL7fOuQPwAFFxXVoQ2EVPYvloueiPkJcBCCfgj70PYs dKNw== 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=1ztIwhAktZ3Bcr58N7thnt85AqEp9KIFyLApyHYv7Ug=; fh=T4gzk7+hgrXGjSNvKGZTlbuKXCiuDaGkxvCBgfgONjs=; b=PsGZLiyCVoXlAk9EXkKk4p2rkjcF9ApXJyylJQnAnhhHoxN3zOcKQWtrIPMBiTRzp8 ELcKE9b05oDMEwa04kPqN7/4jNnnl6juH4Qbqlh0qMgDkqzOojNqHZGBPFNy5MKw2in9 6bksYwAh+Sg9YPzlysDQ8TpvF0yvtt2Bq7I9xtPrO/G+SNjJKUakd7LQv0bjMEdU4vXf zFo+rq8wuudKKYcjo50Afj5fmfdPyNvAXQFxtZzejJOMS5dMVFzPhXJZQEmPcf6MMInt WyqvkQWIV800FkgcH7LUA5P0GnLGv/AJ/LMe+fH0avjXJ4iWSVpektXCxm6h1et9OXtm LLDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id z17-20020a170903019100b001cfee3a03c1si1287966plg.470.2023.12.08.01.42.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 01:42:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 85C5880DECCD; Fri, 8 Dec 2023 01:42:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233315AbjLHJmR convert rfc822-to-8bit (ORCPT + 99 others); Fri, 8 Dec 2023 04:42:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230457AbjLHJmO (ORCPT ); Fri, 8 Dec 2023 04:42:14 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FC1C10CA; Fri, 8 Dec 2023 01:42:15 -0800 (PST) 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 ex01.ufhost.com (Postfix) with ESMTP id D3A8824E199; Fri, 8 Dec 2023 17:42:13 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 8 Dec 2023 17:42:13 +0800 Received: from williamqiu-virtual-machine.starfivetech.com (171.223.208.138) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 8 Dec 2023 17:42:12 +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 v9 3/4] riscv: dts: starfive: jh7100: Add PWM node and pins configuration Date: Fri, 8 Dec 2023 17:42:08 +0800 Message-ID: <20231208094209.1910934-4-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231208094209.1910934-1-william.qiu@starfivetech.com> References: <20231208094209.1910934-1-william.qiu@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 08 Dec 2023 01:42:30 -0800 (PST) Add OpenCores PWM controller node and add PWM pins configuration on VisionFive 1 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..11876906cc05 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 = ; }; +&pwm { + 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 e68cafe7545f..4f5eb2f60856 100644 --- a/arch/riscv/boot/dts/starfive/jh7100.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7100.dtsi @@ -280,6 +280,15 @@ watchdog@12480000 { <&rstgen JH7100_RSTN_WDT>; }; + pwm: pwm@12490000 { + compatible = "starfive,jh7100-pwm", "opencores,pwm-v1"; + reg = <0x0 0x12490000 0x0 0x10000>; + clocks = <&clkgen JH7100_CLK_PWM_APB>; + resets = <&rstgen JH7100_RSTN_PWM_APB>; + #pwm-cells = <3>; + status = "disabled"; + }; + sfctemp: temperature-sensor@124a0000 { compatible = "starfive,jh7100-temp"; reg = <0x0 0x124a0000 0x0 0x10000>; -- 2.34.1