From patchwork Fri Nov 10 06:20:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Qiu X-Patchwork-Id: 163994 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp1379678vqs; Fri, 10 Nov 2023 12:58:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IHczaclkCbSKME5Uzh5fjrwVuy0XqnVh8Kf0KBPGaimNmmFSYaoDD3zxL5hhLHbdUGj0qKq X-Received: by 2002:a05:6830:14e:b0:6ce:30ce:3c94 with SMTP id j14-20020a056830014e00b006ce30ce3c94mr326858otp.4.1699649907065; Fri, 10 Nov 2023 12:58:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699649907; cv=none; d=google.com; s=arc-20160816; b=k1vlusXQbKxxPyOKC/Y+d8w9cfAAoPAab1uzTqN4bRn9ykZg6eYngcbctUjDcc6uZO m7JJ9OwiIvGTpMPiAVsIJMqsQIVUxPltqCnhrOr52L54tZx/Wg/VmPb5R7vnnx8Jl9/l 8ouBws7CsCyogS1L6KC3SgvNUIIFmOlNW4CpyxboMb1qICtRFxUMZuA6xCRr6lqhAn19 Vdyg7Z8kFQFgkKAO7HveVIGN0uJ0uKnFz4538d8N78s7VS0M2Nsj5c4p+J629jwAI4pT Mt0YC8+PB8wgyUWfFxaXz0g/wG4GjTQo+7rga1Heg3N+q5SvbgIxBbAO4Zop3lhXuLWi GHzg== 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=67M0Bw/YO05md+wYGztbCV+T8/ZPAUA+hIGaMlVC1Cg=; fh=T4gzk7+hgrXGjSNvKGZTlbuKXCiuDaGkxvCBgfgONjs=; b=QoBWhcPo8+3ssxRarKI2gmp8C8pmQziFWRYKGbX1S1Aja6x9qzM5aPMyXd5AvjBazP XqmAUqgUpIgJzwOGPD55JbUf7npNcKtmFrMPDDAHzudZjPijSnCYcM4t8939aG8DbuVU JrWaok7hE4rLrM5NkS415QSr5RWp2QBLwNycclkZiv+WgP4EaMgtwDsNxMZ9M5Z7Lz8y BXRmwh3zgXuKxJkjNWOze3tEgVqVPOBoj+pov6WFDhIQ0ciW3ryC+eac0oLXabGC+VQW iuy/W+53edunY0SV0i9wsyV8WtTMZFfjg/B1+WWDCS9W2i6vM58OOYRWeH5sufo8r0EA OmYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id s6-20020a63e806000000b005ad8009e301si236756pgh.250.2023.11.10.12.58.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 12:58:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 61C248307615; Fri, 10 Nov 2023 12:58:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346510AbjKJU6B convert rfc822-to-8bit (ORCPT + 29 others); Fri, 10 Nov 2023 15:58:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235845AbjKJU53 (ORCPT ); Fri, 10 Nov 2023 15:57:29 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC4B06A5D; Thu, 9 Nov 2023 22:20:52 -0800 (PST) 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 ex01.ufhost.com (Postfix) with ESMTP id 8860924E29F; Fri, 10 Nov 2023 14:20:44 +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, 10 Nov 2023 14:20:44 +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, 10 Nov 2023 14:20:43 +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 v7 3/4] riscv: dts: starfive: jh7110: Add PWM node and pins configuration Date: Fri, 10 Nov 2023 14:20:38 +0800 Message-ID: <20231110062039.103339-4-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231110062039.103339-1-william.qiu@starfivetech.com> References: <20231110062039.103339-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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 10 Nov 2023 12:58:24 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782212101020691368 X-GMAIL-MSGID: 1782212101020691368 Add OpenCores PWM controller node and add PWM pins configuration on VisionFive 2 board. Signed-off-by: William Qiu Reviewed-by: Hal Feng --- .../jh7110-starfive-visionfive-2.dtsi | 22 +++++++++++++++++++ arch/riscv/boot/dts/starfive/jh7110.dtsi | 9 ++++++++ 2 files changed, 31 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi index 2c02358abd71..823f298c3f4c 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -268,6 +268,12 @@ reserved-data@600000 { }; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm_pins>; + status = "okay"; +}; + &spi0 { pinctrl-names = "default"; pinctrl-0 = <&spi0_pins>; @@ -402,6 +408,22 @@ GPOEN_SYS_SDIO1_DATA3, }; }; + pwm_pins: pwm-0 { + pwm-pins { + pinmux = , + ; + bias-disable; + drive-strength = <12>; + input-disable; + input-schmitt-disable; + slew-rate = <0>; + }; + }; + spi0_pins: spi0-0 { mosi-pins { pinmux = ; + clocks = <&syscrg JH7110_SYSCLK_PWM_APB>; + resets = <&syscrg JH7110_SYSRST_PWM_APB>; + #pwm-cells = <3>; + status = "disabled"; + }; + sfctemp: temperature-sensor@120e0000 { compatible = "starfive,jh7110-temp"; reg = <0x0 0x120e0000 0x0 0x10000>;