From patchwork Fri Dec 22 09:45:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Qiu X-Patchwork-Id: 182598 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp948648dyi; Fri, 22 Dec 2023 01:46:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IElX/w7WHuUYWlKmS8Iy8v4l1xp/t3CU+5LvJyuhwt4pCyZyhF6mZa8uppir3RLKz/igRgp X-Received: by 2002:a17:907:c9a1:b0:a23:3653:832a with SMTP id uj33-20020a170907c9a100b00a233653832amr932437ejc.17.1703238405115; Fri, 22 Dec 2023 01:46:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703238405; cv=none; d=google.com; s=arc-20160816; b=AmAy/WBazPsIlsf3T9TCaZaVmv0ii3taYBkZcSQqWCXcz6DUfH6nIMAYcFQR1BQPbk mtqyhFHR0AtPTSIvp3cWFYLnJRDzlwWuAeNpQwrLs0phPSpDjv+f42aZClwrGYV29IHL jh4ZttwySv2kbBPyrgIw6FqcLAYu+4tAWVEjMOtFflKa5j4txCo0t2NMZBc4ttuWX+ZT rgnYZCkWPw/VSurYLveFWC45vCPr4HawXxyCookHjGEtQJYkaZqvLmlaH9k/4LWQFyOl TQdZUBmcDz+AZTSb2iBAt35++NFLNgk08oQparYiLRda2G+oJpj0FkUPRl5nz+8sNKxW AAog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=wjxngCeMquxzq8ryy3tGZYFC85M+ImWA8cqZwbQYce4=; fh=T4gzk7+hgrXGjSNvKGZTlbuKXCiuDaGkxvCBgfgONjs=; b=hh51w6AQ1w0Bgz+z/9p666lLoK2I/fPl/09Tw5DswWaJ5Xc8Oa8uNOOTaSCHKbvHpR EDKxRWIRhItK2qWPR0WsTzk8XcpvXMUeMi0frYx3BYzRqc1jQGnf+3aVHL0KQBUMoPmZ VSPoPOuoGPWe3gio6VO/TvST3TDXjKHO6P876UfoRrsYY+nYbnwj/xisxf979fvEU/Mm Esno+RYn/vkMT9hahyf4GnvJC1NyUCjlIbTh7t5ZeO40WMxlogmqWPsvwwitis88QjZT OsyzxJga+pAKnPqSKmayRSUaYHWVOk+0tVhXHp4dZEq16NPgtDeJePPTtwdH/5mHd9Z9 tzQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-9559-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9559-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id e17-20020a17090618f100b00a26aaad1f32si1060907ejf.165.2023.12.22.01.46.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 01:46:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9559-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-9559-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9559-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B7A161F24ADA for ; Fri, 22 Dec 2023 09:46:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B7F1D168B6; Fri, 22 Dec 2023 09:46:01 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B383F9D6; Fri, 22 Dec 2023 09:45:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=starfivetech.com 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 73A5324E2E4; Fri, 22 Dec 2023 17:45:53 +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, 22 Dec 2023 17:45:53 +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, 22 Dec 2023 17:45:52 +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 v10 4/4] riscv: dts: starfive: jh7110: Add PWM node and pins configuration Date: Fri, 22 Dec 2023 17:45:48 +0800 Message-ID: <20231222094548.54103-5-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231222094548.54103-1-william.qiu@starfivetech.com> References: <20231222094548.54103-1-william.qiu@starfivetech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785974913882255784 X-GMAIL-MSGID: 1785974913882255784 Add OpenCores PWM controller node and add PWM pins configuration on VisionFive 2 board. Signed-off-by: William Qiu Reviewed-by: Emil Renner Berthing --- .../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 b89e9791efa7..e08af8a830ab 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -323,6 +323,12 @@ reserved-data@600000 { }; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm_pins>; + status = "okay"; +}; + &spi0 { pinctrl-names = "default"; pinctrl-0 = <&spi0_pins>; @@ -513,6 +519,22 @@ GPOEN_ENABLE, }; }; + 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>;