From patchwork Fri Sep 2 08:42:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Kepplinger X-Patchwork-Id: 12963837 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C72F8C54EE9 for ; Fri, 2 Sep 2022 08:44:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mqm3deiX7+4jEJBpObmdbfVnVLT3IoJPXPO2dJWEVCE=; b=zNZqKh4ODQ/4Mo IWqNxbboGrvqEqhYsmQGaKQYRsMHG8JBNcskHZXizZCwohUMm9YlKQEXjNdV9mfwcSfqRIa4o8pLW ADV8cTdrwY6041SGFc9nh6xh5nPzy/4cMssck5WeHwV3lT0R2T2yJOHk8D3WpDMi5/heZzcFMX/DR dcLuvGyUauHZZqQmZWrNHqJn5EYw1dqsPAWCGN+cFpub2lJpz7+ue1f7QS6qU/dscOaejyzooutyc WJnvxdPVZ/Yu7p0gUBZTIlYIMeH+FQDgoSlBMSzFJ/boOL3v+fIEOZYOp+GleoNuWvUS2HFxd1pX2 rxacnHISen7plDgrCgnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU2Gy-00215i-2j; Fri, 02 Sep 2022 08:43:32 +0000 Received: from comms.puri.sm ([159.203.221.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU2GV-0020iA-P2 for linux-arm-kernel@lists.infradead.org; Fri, 02 Sep 2022 08:43:05 +0000 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 9E10ADFE2A; Fri, 2 Sep 2022 01:42:33 -0700 (PDT) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2FZVnIlIZDDt; Fri, 2 Sep 2022 01:42:32 -0700 (PDT) From: Martin Kepplinger DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=puri.sm; s=comms; t=1662108152; bh=XTCJOy1lkwWbbFV/ClvUNuSaI8YS0YPYuLCf+fQ4u70=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NjczDtnuMPfxFD7pvzPTt7m8+EKF5pj6HYfvpQelgRVe1FLyvQpo+tgvicr1dxw57 yFaEQ359kfmHUTUy715IrOjF+Dt8iKjK1sURwit6U2ZhRo1QA7N0HUaXHO5scJXpCh tZooioEePYHowXMHO3mKbtipSWwvntblMRSxzkJJSJim11OrgTc1HlVanzBD1M5J2p QRtCf0HiKm9NSS/+S6vpbsOxjNS08Mg8FBq3U2tbpdJMTz21oVQnU9kiZ00q/53MGu RLmreh17fuVbsSuuYt59e23MQfRwHLb8081NI6V1Vho0WwfdL7O/4yqbG/UlskARJ0 pEUaadBDQGq5w== To: festevam@gmail.com, shawnguo@kernel.org Cc: martin.kepplinger@puri.sm, devicetree@vger.kernel.org, kernel@pengutronix.de, kernel@puri.sm, krzk@kernel.org, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, robh@kernel.org, =?utf-8?q?Guido_G=C3=BCnther?= Subject: [PATCH v2 2/6] arm64: dts: imx8mq-librem5: add RGB pwm notification leds Date: Fri, 2 Sep 2022 10:42:12 +0200 Message-Id: <20220902084216.1259202-3-martin.kepplinger@puri.sm> In-Reply-To: <20220902084216.1259202-1-martin.kepplinger@puri.sm> References: <20220902084216.1259202-1-martin.kepplinger@puri.sm> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220902_014303_842776_E9633BFA X-CRM114-Status: UNSURE ( 9.72 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Guido Günther Describe the RGB notification leds on the Librem 5 phone. Use the common defines so we're sure to adhere to the common patterns, use predefined led colors and functions so we're being warned in case of deprecations. Signed-off-by: Guido Günther Signed-off-by: Martin Kepplinger --- .../boot/dts/freescale/imx8mq-librem5.dtsi | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi index 0626e4194d958..8da7b87c1aa1f 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi @@ -7,6 +7,7 @@ #include "dt-bindings/input/input.h" #include +#include #include "dt-bindings/pwm/pwm.h" #include "dt-bindings/usb/pd.h" #include "imx8mq.dtsi" @@ -54,6 +55,31 @@ key-vol-up { }; }; + led-controller { + compatible = "pwm-leds"; + + led-0 { + function = LED_FUNCTION_STATUS; + color = ; + max-brightness = <248>; + pwms = <&pwm2 0 50000 0>; + }; + + led-1 { + function = LED_FUNCTION_STATUS; + color = ; + max-brightness = <248>; + pwms = <&pwm4 0 50000 0>; + }; + + led-2 { + function = LED_FUNCTION_STATUS; + color = ; + max-brightness = <248>; + pwms = <&pwm3 0 50000 0>; + }; + }; + reg_aud_1v8: regulator-audio-1v8 { compatible = "regulator-fixed"; pinctrl-names = "default";