From patchwork Fri Oct 20 10:37:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Qiu X-Patchwork-Id: 155974 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp960618vqb; Fri, 20 Oct 2023 03:38:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGUx1bUhTG5birZY9fNAEFgey7pRymF/P4fVsxYFuY5n5utzmp1F5ECZwqBzyu02B8xd7Yt X-Received: by 2002:a05:6871:4f13:b0:1e9:8782:f948 with SMTP id zu19-20020a0568714f1300b001e98782f948mr1206085oab.58.1697798299646; Fri, 20 Oct 2023 03:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697798299; cv=none; d=google.com; s=arc-20160816; b=0ZPpReOy5dVsHDO61zfGanv9IWEOolA1BRvx0alTfQDmhpzKPnj2iV8efUCMZQYm+J SNiuQscojfzOH00E4+ZKsLC4SEBn6WuXHAsVoqukTXh69ZtZmoEo6/AwIlvCwdJkKvwa QtPtAaz3jxsyhG8FI3rKmQUdk+p1ULUDHy23FSar9PnLknjJxr7E88LhN+agLxYataxm 9ZAoMirGK68lAaegVSz/NxYGg8Za6PfkjJii6rQiX52Fx9iRZHT5dA0yZT7b3Iu7QTZl VUaQmyf1Fr6UVXPhgNhUnM7iCPoN0dgLO+YjR0iHvhUPi3Nu0KZOk+3Nuj8RtIwRpCSG P1Zw== 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=QmJ2fWlQ3bjI6T6QI0OOPjLwF1outNv2z3KoDzbiRg4=; fh=T4gzk7+hgrXGjSNvKGZTlbuKXCiuDaGkxvCBgfgONjs=; b=KNHnTUEsDkzF/mCabmLaJ0SN54xwNGvNfUfhOIwBVNuTH7yMNEQiT9qZxQJTLI8gef dPkFyvI7tpXuKOGpK+p8gZktdGKN7R5O/GDTaSfXNOZWpE80r+WJlkWv0m0UPhs5nz3O SatqUD2Kh/Vx8wPPXCn1bDsyPA72hClVvsjaUzAWSwVh/z0PKkTHMz57AvrW3pW0Mr7b ELv2kZZi1sB/+F+A3rbyCjoh4KgucXBVq7rfk34aeLPnpZ6uTUqd99PHXqHOC/0M0xXv ohtHTjReZ4nnbufsiK3iCieyyg+45kcJ4OetGGYE1jZPSBge7s/tjPHqjR68UTDRKSJV pDZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id 144-20020a630296000000b0055b43079640si1666082pgc.707.2023.10.20.03.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 03:38:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 5FAA882878AF; Fri, 20 Oct 2023 03:38:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376977AbjJTKh4 convert rfc822-to-8bit (ORCPT + 25 others); Fri, 20 Oct 2023 06:37:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376795AbjJTKhu (ORCPT ); Fri, 20 Oct 2023 06:37:50 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73A78D5F; Fri, 20 Oct 2023 03:37:48 -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 39C4A24E14F; Fri, 20 Oct 2023 18:37:47 +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; Fri, 20 Oct 2023 18:37:47 +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, 20 Oct 2023 18:37:46 +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 v6 4/4] riscv: dts: starfive: jh7100: Add PWM node and pins configuration Date: Fri, 20 Oct 2023 18:37:41 +0800 Message-ID: <20231020103741.557735-5-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231020103741.557735-1-william.qiu@starfivetech.com> References: <20231020103741.557735-1-william.qiu@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Fri, 20 Oct 2023 03:38:17 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780270549799694459 X-GMAIL-MSGID: 1780270549799694459 Add OpenCores PWM controller node and add PWM pins configuration on VisionFive 1 board. Signed-off-by: William Qiu Reviewed-by: Hal Feng --- .../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 35ab54fb235f..0bb9e2e5ae68 100644 --- a/arch/riscv/boot/dts/starfive/jh7100.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7100.dtsi @@ -274,6 +274,15 @@ watchdog@12480000 { <&rstgen JH7100_RSTN_WDT>; }; + pwm: pwm@12490000 { + compatible = "starfive,jh71x0-pwm"; + 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>;