From patchwork Fri Dec 22 09:45:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Qiu X-Patchwork-Id: 182597 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp948464dyi; Fri, 22 Dec 2023 01:46:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHlWqCzLNwXGwyiYhXRC9aKAXmse0ZDslFWFKbKuFP8ps7NHXi6SoWzDGYxoGZ2T+owXMuD X-Received: by 2002:a05:6a20:7d96:b0:190:e07d:99f7 with SMTP id v22-20020a056a207d9600b00190e07d99f7mr2870397pzj.15.1703238375535; Fri, 22 Dec 2023 01:46:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703238375; cv=none; d=google.com; s=arc-20160816; b=iwda00NGZ7fnQQD6olytvUw22EHNwejlABwsiJE4c84X5IGzLFGPSoTv2scB9K6n9e lymkj9XlolFaOGpkra+a4WYmm7q2VL9fwdZnyCUXkhFJsVQ2p9MDa1og7U/iqqCYryl4 SmT/GHwmEmcLZsY9cg5K2bV5g42XKbdW7kn3lmv7w2eCvjr7ejZrijUj1fZdA7t7QCNt bkpTgEnQGWfkWuIQnyzmmxbC9HduS5Po11hvALFOXCkvyhuZZtPdtVtcLGEcNPgmLTxb MN8XcR66R56E78/U55r/xPY2CNeIbG0KrF4xhZS/cnDKhVKkqWBftDL6U7t4GcnRWYT9 VSrg== 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=APfns//cY6CKlMelKddH/Zbl28Nn6UXsugSrO473Pe0=; fh=T4gzk7+hgrXGjSNvKGZTlbuKXCiuDaGkxvCBgfgONjs=; b=x30m6UR1TZ0ziCiwF36r46zJBX7kyJfwuFvSjvOcrU0sC6tAMKe6Uf13m8pV7xMHmO zY+Zo8WecLzAGg+wCV/sL3URJTQ9lc09epvKQtPjA/HU/o3huBN2RSW+hqJQe2jxejuH 9wtSNsM/Pyk/OXDr/snZov/4/SMrklujzXoaLghkuHYT9Cqbi5fxnwu7s3o5R8NG07ij LyZexkwsHDsHTH6YSquISJG1d0yDF5tErCSHUy+YTCQwIda5xrRSE43tX+wB5lSG0xlc iJvXAboi8kb0ehb/yASx7o99GzB1tiO8kBem4QoTB8UD24TqzhYWM4haqPicehxWPehM NWWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-9558-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9558-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id k2-20020a632402000000b005bdd6196f4asi257450pgk.392.2023.12.22.01.46.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 01:46:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9558-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-9558-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9558-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 77D81B217A2 for ; Fri, 22 Dec 2023 09:46:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7035E11727; Fri, 22 Dec 2023 09:45:59 +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 7DA2FD2F4; Fri, 22 Dec 2023 09:45:53 +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 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 AC31D24E2E2; Fri, 22 Dec 2023 17:45:52 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 22 Dec 2023 17:45:52 +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:51 +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 3/4] riscv: dts: starfive: jh7100: Add PWM node and pins configuration Date: Fri, 22 Dec 2023 17:45:47 +0800 Message-ID: <20231222094548.54103-4-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: 1785974883038360071 X-GMAIL-MSGID: 1785974883038360071 Add OpenCores PWM controller node and add PWM pins configuration on VisionFive 1 board. Signed-off-by: William Qiu Reviewed-by: Emil Renner Berthing --- .../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>;