Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4151849rwi; Wed, 12 Oct 2022 11:19:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5mFDI7IhGcrpgfmj6injTzB0M6TkmKiHbNizwNF4niXEqcGmGm3lRAsj/bHOO5xZb8Qe1V X-Received: by 2002:a17:907:b08:b0:78d:cea9:937d with SMTP id h8-20020a1709070b0800b0078dcea9937dmr9220919ejl.216.1665598759845; Wed, 12 Oct 2022 11:19:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665598759; cv=none; d=google.com; s=arc-20160816; b=OKbUjSsg+oxz1NwpXrugkNmYtA5zqbvIR5UNlHTxW4WrffC45LJ9eVNQFmA+9OLw+/ ZS+tyz2bBfpbG9mXt1uN5lZMEMjS4juG0ZC8XwOmiRtvP9JeLJm3gC5AzwTf8/u4JZof uQ9kUvzCh1A2flC3mPNTJoyCq0hHGLiQMkuiUBa9vFck8ZaJJNwAAjSP7d22FS4IWYga THR4tv6T+0fSCgXeo5a9KMkzFV664ajSVq7ryTNS/TsL+K9kz/s8P0jvEdRQFIkiOuRk WRl5k+yauqKv0Pm45rjNivv7a39FAMns9ZJZOaRHvkv3DO8zoOeutMxGHw+m2fPw0PNY Q3Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=r4aZgj6XjPndlRWFNzGcNR399Wz9mQ/AB+yw3p5fkOU=; b=Am4cKiuE+40B88KfICTkWO3RkEsxpxGRDJyuhae8ezr0HgCWBwYffdxJZA3VzIFxTA 6elqMy0O9Oe1vsYz43o7TY3KohYEGALqMz1WMJJ68WsydkFEQM+Z2lCCoJGWGxyBudZp WbsWX4LjLzUmLphNC+UM9QzriFa3I/HbJnLNgQeJgtNrsS99Wp/uaXAUuwoT7e/1pDnP 5b35z1onfxIS1MKEl6Hp5+elSSJc6PP4VNf/p30QMIad32XFEoGBncdjFs7ox4d3wSBp B9Kq/UdlmYGY4QYsdzpaDJuX/fl3aOj5DH5ZyCWXF1N6vg/Yz/kHtnHyqF6xP70cEgfY NYIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JAxG+Gqt; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bf26-20020a0564021a5a00b004587e08bc14si15192962edb.508.2022.10.12.11.18.52; Wed, 12 Oct 2022 11:19:19 -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=@kernel.org header.s=k20201202 header.b=JAxG+Gqt; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229731AbiJLSQr (ORCPT + 99 others); Wed, 12 Oct 2022 14:16:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229618AbiJLSQn (ORCPT ); Wed, 12 Oct 2022 14:16:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AA5F17A94; Wed, 12 Oct 2022 11:16:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BB08461596; Wed, 12 Oct 2022 18:16:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3302C433D6; Wed, 12 Oct 2022 18:16:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665598601; bh=njqsGfY/Ky3JVGMiS1t2SsK1cQbO3ajg+b5VYn5YLhg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JAxG+GqtIRT+kWAS9WEr6WzSOwCaFxCxO7b05swAq0QvhU1Ot2RXPgVPxgPnAboc6 b0oiKsHhiPjh/TsvTlUUoVLosVFwEkvurobiMs+nBfYi3xKCsoqs6V9SlHl7NZ0RN0 /0sRjojU9BR42RRTMrf3b2YRriB/u+zRMrkicOJp7BV1pLnHYAzGJnCdNiklM/Axgq JwWi5mGYGznLJemfk1nWyD8ZWMO9AmeaxplqCAcIH8YSfMss0HDfgmOUEW0Mb0pzWQ DekmCLsJzMrLi4rI3Rd/p792Cm8jPIUyLxrALVTz7jA/RmiARn4HASy/PYuJ0hs56m 0WIlUaN1DadkQ== Date: Wed, 12 Oct 2022 19:16:36 +0100 From: Conor Dooley To: Emil Renner Berthing Cc: linux-riscv@lists.infradead.org, Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Alexandre Ghiti , Bin Meng , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] riscv: dts: sifive unleashed: Add PWM controlled LEDs Message-ID: References: <20221012110928.352910-1-emil.renner.berthing@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221012110928.352910-1-emil.renner.berthing@canonical.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Wed, Oct 12, 2022 at 01:09:28PM +0200, Emil Renner Berthing wrote: > This adds the 4 PWM controlled green LEDs to the HiFive Unleashed device > tree. The schematic doesn't specify any special function for the LEDs, > so they're added here without any default triggers and named d1, d2, d3 > and d4 just like in the schematic. > > Signed-off-by: Emil Renner Berthing > --- > > Yes this board is old, but I'm trying to get rid of custom riscv patches in > the Ubuntu kernel. Old maybe, but some of us still have them ;) Reviewed-by: Conor Dooley Twiddled the sysfs knobs a bit too so: Tested-by: Conor Dooley > > .../boot/dts/sifive/hifive-unleashed-a00.dts | 38 +++++++++++++++++++ > 1 file changed, 38 insertions(+) > > diff --git a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts > index ced0d4e47938..900a50526d77 100644 > --- a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts > +++ b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts > @@ -3,6 +3,8 @@ > > #include "fu540-c000.dtsi" > #include > +#include > +#include > > /* Clock frequency (in Hz) of the PCB crystal for rtcclk */ > #define RTCCLK_FREQ 1000000 > @@ -42,6 +44,42 @@ gpio-restart { > compatible = "gpio-restart"; > gpios = <&gpio 10 GPIO_ACTIVE_LOW>; > }; > + > + led-controller { > + compatible = "pwm-leds"; > + > + led-d1 { > + pwms = <&pwm0 0 7812500 PWM_POLARITY_INVERTED>; > + active-low; > + color = ; > + max-brightness = <255>; > + label = "d1"; > + }; > + > + led-d2 { > + pwms = <&pwm0 1 7812500 PWM_POLARITY_INVERTED>; > + active-low; > + color = ; > + max-brightness = <255>; > + label = "d2"; > + }; > + > + led-d3 { > + pwms = <&pwm0 2 7812500 PWM_POLARITY_INVERTED>; > + active-low; > + color = ; > + max-brightness = <255>; > + label = "d3"; > + }; > + > + led-d4 { > + pwms = <&pwm0 3 7812500 PWM_POLARITY_INVERTED>; > + active-low; > + color = ; > + max-brightness = <255>; > + label = "d4"; > + }; > + }; > }; > > &uart0 { > -- > 2.37.2 >