From patchwork Wed Nov 29 09:27:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Qiu X-Patchwork-Id: 171190 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a5a7:0:b0:403:3b70:6f57 with SMTP id d7csp219366vqn; Wed, 29 Nov 2023 01:28:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IGfNPqAD3GIQr+YctCoWZdfpA8jmgoetmglMJ41NeNcpuLzUO/AB3XajidjyuWiBs0aQrIp X-Received: by 2002:a05:6808:1642:b0:3b6:4ee:49c8 with SMTP id az2-20020a056808164200b003b604ee49c8mr19983668oib.54.1701250120966; Wed, 29 Nov 2023 01:28:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701250120; cv=none; d=google.com; s=arc-20160816; b=wChu/HCvJ71uTUrqcwogA7dGJnlLfj2GYyHIgpux4Gu0xE9VT70fZ9Vxu4Xoj9Pa/T Isf2URuHTKi8pMVk33B0tKrZU7SVSHO4vqdCdO/KRQ8vQQDwZj8DhwK1phdbGxDJEHFn hDSi38KDyhZp6K/uwa0iuXM6PitWkkSmNZFsv3bq7m3BY8cx3jeJobEh4vdD1o6n7oyg sQpl9YefkDYEqXH9a+cm46JjABk6bjdD9wZNTQKb6f8R8B88/Iwdp43tB4r69z4yUg8E TbA1lnqnvlizGc/SAkKJ7dejujfWrqo9iDjQ8sbhfSL/85lGoOGrdyuU8TFyJq1MFdj9 n4lA== 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=n2+jBE/wBsaU0xbOmlnfIwvwMPnmK0da8mLBfmFWpLClQQKgr0OrduKOHeZrhrnAbR 6OOgM0Emv4eIMctq4CLwt4wQoFVTLjElVRsv4BPiPbz4KBIQ+gGtHJ3uHipGpRZVXv8S n49Ve1jvHyGMEZ3BB+JxYOdMOxIlC8X3kydiKfgP4dU5Mvz6ZzFqbcNsj3RrTSsWjZEu hDvuDHnKwJTOOIZyAvnZ5RzF0NL0ngAqvqqhZXkp3WYIJH8bwjt/ShfpRacmTUeTyKkF 1g6i7MD9TSiO/oEBr8Arg/epU+TYFYXAHvwlawIxMT/iyGSvxVcemRsbQg9T1fl7ex2F kZZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id m11-20020a056a00080b00b006cc86fef8f7si8949127pfk.87.2023.11.29.01.28.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 01:28:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 184C08051633; Wed, 29 Nov 2023 01:28:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229599AbjK2J14 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 29 Nov 2023 04:27:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230163AbjK2J1m (ORCPT ); Wed, 29 Nov 2023 04:27:42 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCA501A5; Wed, 29 Nov 2023 01:27:43 -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 fd01.gateway.ufhost.com (Postfix) with ESMTP id 25EC324DC0A; Wed, 29 Nov 2023 17:27:37 +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; Wed, 29 Nov 2023 17:27:36 +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; Wed, 29 Nov 2023 17:27:35 +0800 From: William Qiu To: , , , CC: Emil Renner Berthing , Rob Herring , Thierry Reding , Philipp Zabel , Krzysztof Kozlowski , Conor Dooley , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , "Hal Feng" , Paul Walmsley , Palmer Dabbelt , Albert Ou , William Qiu Subject: [PATCH v8 3/4] riscv: dts: starfive: jh7100: Add PWM node and pins configuration Date: Wed, 29 Nov 2023 17:27:31 +0800 Message-ID: <20231129092732.43387-4-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231129092732.43387-1-william.qiu@starfivetech.com> References: <20231129092732.43387-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=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Wed, 29 Nov 2023 01:28:36 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783890047074948733 X-GMAIL-MSGID: 1783890047074948733 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>;