Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp3099939rdb; Tue, 29 Aug 2023 05:35:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF6DnFpzqJPR6W9NKGTRiW9rJ+Sv3i2YHnOB39KSq1vlngidYHb26RacGCdsUUTdOLDmsWl X-Received: by 2002:a17:90b:287:b0:268:b682:23da with SMTP id az7-20020a17090b028700b00268b68223damr21860019pjb.34.1693312516987; Tue, 29 Aug 2023 05:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693312516; cv=none; d=google.com; s=arc-20160816; b=JflQtJl0HxGThSue3U8SPHzuD/q5F5Iwx+/EJZsoO6heLD9KiVRmqB1n7GTR+kzGcx phhAGOuuEkIIcYA61N4YIz0hffD3a2OCdsxTYEFTklhOHIRLGRFFG4qOZVj/Lt3zczcR Oboo434ongqceic51Hz6gEnFEDEkuwTy0BSUBYu7CA+jPW0I+vJ67SOG1PriOsP+CUVy xYbKeWbZSj+/GtdJM7RTi4X838icIz265iRevsBsTTZd7HC/I9mu2e4eTlb6rK8DFAon FDBrPEtsafj4XTf1XJGPI4R9BgqgiHjxRwq20Rpna5F7ELo7BJLthkvt1nNVKOEoxqgH WLhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=gTippXVpSNNz9qzwb3ZwRyGCLyetmmexG2eFM+R4Cws=; fh=3AB6UP2wlT/tcO2FdRVUhiUMEz3d/BRm51TawfSI5ew=; b=qZjHK2SHeQQvm5jEypImRLucXl3dsqXiwU/Jbty+f2+FJA+sv/1y/xX15QvjbtSdQh XaOKRJRoBdBfgPn50bpTEpapYL6ywFMfHLbwLuIi4XAstepjQabncFw187rnutYqxqJQ 8A151pmd9GcUeuQkSTJodeymeEQRJquSnfI2LRilOveEwc5OebJkiwuQXpPIpCP0f095 HHJNr1qHmPCA7rYuaYRfgtSjO0vyHPdQyzPWgDQccNcgn5RPHgvKrlPUfCdXNY2pwGN/ AKBJ9ljtLKzJFEYEPUEjh12ZVRDjxooLhl653KASDbtWr9oyhu/TnUZcNFWGCR7RiG+2 8iYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b="SF7/n0sx"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kv14-20020a17090328ce00b001bde0b58abesi1052933plb.161.2023.08.29.05.34.57; Tue, 29 Aug 2023 05:35:16 -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; dkim=pass header.i=@canonical.com header.s=20210705 header.b="SF7/n0sx"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234984AbjH2Jjc (ORCPT + 99 others); Tue, 29 Aug 2023 05:39:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234829AbjH2JjI (ORCPT ); Tue, 29 Aug 2023 05:39:08 -0400 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B23D6198 for ; Tue, 29 Aug 2023 02:39:05 -0700 (PDT) Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 16F4F3F546 for ; Tue, 29 Aug 2023 09:39:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1693301944; bh=gTippXVpSNNz9qzwb3ZwRyGCLyetmmexG2eFM+R4Cws=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=SF7/n0sxplvyQpmrXTUei+QllTXsQE9PGCuShKz0OGYR5i45MYKcPIx2SlPB6lpIa o+hbytNmaMxi82jv9PgjwwztH5NjUkvhgZihg38E1koCdCiMgKOdZj40y1xjVrXUe8 Xd8fFfWSZdFNnJmcXcLv4iMnFdTRpulQ+vA1CLR8lRZLlNPWhioKbV10IRARVt1uQC OO2VFrfv1G44kDk1eP37NsaZmgxEFkO+tciAY+3k2aWa3QkHkTsYDnhPN98yXbmTe0 5e6EJpEa6PpgOv6+Z4TrLctMwg2po501KOn8jPn5MtQ9jWBge8ysG8ZZs5aefsx42/ N6+3y5Qhq8FJA== Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-41084adf425so47567091cf.0 for ; Tue, 29 Aug 2023 02:39:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693301943; x=1693906743; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gTippXVpSNNz9qzwb3ZwRyGCLyetmmexG2eFM+R4Cws=; b=kunj+YJfYcg/y3zjP6YU8J12untHZLGCLPfFwrEemn9USGPMGjsiybN5Le/RjgvxsA y3/J17P1JdaBKN/it6s6thqoicIEvSrjNJY5gYQc7gNc5AYf97tlrYr6q59+cPe8BU/n av58qJ6Puas6+4l073gSSUkCCUeSmIF6kkFe3qbw9LnO3Xia5twH1XSz5rN10YhcvCII edlB8AD8fxbYtMb2aQ+FDIkr51Hc44lXFUQtsnb5wtCq96GiPhToq3SsI75NpS7WboAV vIbJyCINLFo+5oUsRZhX+FIUzkIL1yae0lfdhEaRCID4Kk3nPdjyJ8f+hvWreT58e/Zl OAWg== X-Gm-Message-State: AOJu0Ywgfm36suVoPshxkS0u1APacwS3Igqqy8ccq+cbct/KsWUqOIb0 08UBr4G2y8Qo5gxtz//lu4Dgi1SiB6edynB/iVP7ndnnrNM1D7HZQNjH5Xgojn22iuqtWsEd1kx CjB3DC1nZo78n8fTODjiQswrjSeuJWA55MJ4Vc1q1virHJuHlO6XP0AQW2Q== X-Received: by 2002:a05:622a:143:b0:412:2f80:abe4 with SMTP id v3-20020a05622a014300b004122f80abe4mr4205703qtw.46.1693301943115; Tue, 29 Aug 2023 02:39:03 -0700 (PDT) X-Received: by 2002:a05:622a:143:b0:412:2f80:abe4 with SMTP id v3-20020a05622a014300b004122f80abe4mr4205688qtw.46.1693301942895; Tue, 29 Aug 2023 02:39:02 -0700 (PDT) MIME-Version: 1.0 References: <20230825081328.204442-1-william.qiu@starfivetech.com> <20230825081328.204442-5-william.qiu@starfivetech.com> In-Reply-To: <20230825081328.204442-5-william.qiu@starfivetech.com> From: Emil Renner Berthing Date: Tue, 29 Aug 2023 11:38:47 +0200 Message-ID: Subject: Re: [RFC v4 4/4] riscv: dts: starfive: jh7100: Add PWM node and pins configuration To: William Qiu Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-pwm@vger.kernel.org, Emil Renner Berthing , Rob Herring , Philipp Zabel , Thierry Reding , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Hal Feng Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 On Fri, 25 Aug 2023 at 10:16, William Qiu wrote: > Add StarFive JH7100 PWM controller node and add PWM pins configuration > on VisionFive 2 board. Hi William, This is the VisionFive V1 board right? /Emil > Signed-off-by: William Qiu > --- > .../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..746867b882b0 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 = + GPO_PWM_PAD_OUT_BIT0, > + GPO_PWM_PAD_OE_N_BIT0, > + GPI_NONE)>, > + + GPO_PWM_PAD_OUT_BIT1, > + GPO_PWM_PAD_OE_N_BIT1, > + GPI_NONE)>; > + bias-disable; > + drive-strength = <35>; > + input-disable; > + input-schmitt-disable; > + slew-rate = <0>; > + }; > + }; > + > uart3_pins: uart3-0 { > rx-pins { > pinmux = @@ -154,6 +172,12 @@ &osc_aud { > clock-frequency = <27000000>; > }; > > +&ptc { > + 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 4218621ea3b9..7f5bb19e636e 100644 > --- a/arch/riscv/boot/dts/starfive/jh7100.dtsi > +++ b/arch/riscv/boot/dts/starfive/jh7100.dtsi > @@ -248,5 +248,14 @@ watchdog@12480000 { > resets = <&rstgen JH7100_RSTN_WDTIMER_APB>, > <&rstgen JH7100_RSTN_WDT>; > }; > + > + ptc: pwm@12490000 { > + compatible = "starfive,jh7100-pwm"; > + reg = <0x0 0x12490000 0x0 0x10000>; > + clocks = <&clkgen JH7100_CLK_PWM_APB>; > + resets = <&rstgen JH7100_RSTN_PWM_APB>; > + #pwm-cells = <3>; > + status = "disabled"; > + }; > }; > }; > -- > 2.34.1 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv