From patchwork Thu Jun 1 08:51:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Qiu X-Patchwork-Id: 101824 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp159217vqr; Thu, 1 Jun 2023 02:16:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6WBH4QgwJdGddUdHm/1XiKEieHQn/TqhiYacY/lRcTTz0e+A95tkbWA60N3x/7cspVkuNh X-Received: by 2002:a05:6214:aca:b0:626:e55:dfb2 with SMTP id g10-20020a0562140aca00b006260e55dfb2mr9971057qvi.39.1685610960119; Thu, 01 Jun 2023 02:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685610960; cv=none; d=google.com; s=arc-20160816; b=qpAaI3hD11nd1IXJwD8vVj5Kks4pbZH+sLHmWH75QSvPRKbk3v28ajx/vYdALrzbTm oEehGZ5DrI/QZOlgAfOZbGSQlQk7BZVczJtE/hQ+2SuYeD3OiB4BPx3XCM0vh4AfCplA W59UR/wYqILp7vAmFJt+aVk7wi0B4LsF7/UMV4hKT+jcHPIn0vnoPvnTuceKnevmXXdf Sn6nFI7HYnyh9qUGzWKZWYnyZdRqPxonFrYWfW9l6ExSU4oZm4NS3lsw6gcaoZFlgj6W tvpX8ueIQnl5yZsATSa0wAAh284+3z24j4e7oF4FpiGKf32BgMQ5zD4MxPpcIwTgB/tf +B+Q== 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=fsftTr6Ji88JlNaDjPxg6cj3QJA6pRl9vt+7a5ASy0c=; b=aglV3m9L/5xtmsgyOYIj6HCZ7zmcPuycfWrP+W2QPPf90jpwj5gWaCE4hq9ID5DB/9 DnJ+Cr6no24IrPu5eO3eqZZnXU3qlkSNeFhzo8+JCEGvRFQXGT47w3uIB0DQKrJw25nS ho/RavppY++21eiQFaFCTZFfJQnZItNFpNPm6bUOifP/ZYAJPTDKrmkrkjc0xqU5ugH6 DG92GwcX99D5dTKuujLdz8y2lO83JI4UV5uNL+upqvt6CmOsmQ6WSzK2m+PmXBTK+DlD f3N2LY3eTvfgntV5LmVo/Doc0/dL8+UJ3wlG9tb0NrUaSd+BmcJLdL6mYHU2+zCWleq3 0NCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j4-20020a170902c3c400b001b06f8ce437si2421527plj.70.2023.06.01.02.15.48; Thu, 01 Jun 2023 02:16:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232396AbjFAIwJ convert rfc822-to-8bit (ORCPT + 99 others); Thu, 1 Jun 2023 04:52:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231667AbjFAIwE (ORCPT ); Thu, 1 Jun 2023 04:52:04 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 153B713D; Thu, 1 Jun 2023 01:52:00 -0700 (PDT) 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 fd01.gateway.ufhost.com (Postfix) with ESMTP id 712BC7FD6; Thu, 1 Jun 2023 16:51:58 +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; Thu, 1 Jun 2023 16:51:58 +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; Thu, 1 Jun 2023 16:51:57 +0800 From: William Qiu To: , , , CC: Thierry Reding , Philipp Zabel , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , Emil Renner Berthing , Hal Feng , William Qiu Subject: [PATCH v4 3/4] riscv: dts: starfive: jh7110: Add PWM node and pins configuration Date: Thu, 1 Jun 2023 16:51:53 +0800 Message-ID: <20230601085154.36938-4-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230601085154.36938-1-william.qiu@starfivetech.com> References: <20230601085154.36938-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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767491198080104241?= X-GMAIL-MSGID: =?utf-8?q?1767491198080104241?= Add StarFive JH7110 PWM controller node and add PWM pins configuration on VisionFive 2 board. Reviewed-by: Hal Feng Signed-off-by: William Qiu --- .../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 2a6d81609284..bbc2531999bc 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -126,6 +126,12 @@ &i2c6 { status = "okay"; }; +&ptc { + pinctrl-names = "default"; + pinctrl-0 = <&pwm_pins>; + status = "okay"; +}; + &sysgpio { i2c0_pins: i2c0-0 { i2c-pins { @@ -183,6 +189,22 @@ GPOEN_SYS_I2C6_DATA, }; }; + pwm_pins: pwm-0 { + pwm-pins { + pinmux = , + ; + bias-disable; + drive-strength = <12>; + input-disable; + input-schmitt-disable; + slew-rate = <0>; + }; + }; + uart0_pins: uart0-0 { tx-pins { pinmux = ; + clocks = <&syscrg JH7110_SYSCLK_PWM_APB>; + resets = <&syscrg JH7110_SYSRST_PWM_APB>; + #pwm-cells = <3>; + status = "disabled"; + }; + syscrg: clock-controller@13020000 { compatible = "starfive,jh7110-syscrg"; reg = <0x0 0x13020000 0x0 0x10000>;