Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3463336rwb; Sun, 9 Oct 2022 05:40:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Ohdt9tg6hMbl0Lj8HRcn29DBGAxaSEVy6L0y1vHEsH7wyw3aO0mnVwSbqXRRVt+puEhhA X-Received: by 2002:a17:903:2691:b0:17a:8f3:bef0 with SMTP id jf17-20020a170903269100b0017a08f3bef0mr14195347plb.17.1665319208695; Sun, 09 Oct 2022 05:40:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665319208; cv=none; d=google.com; s=arc-20160816; b=WVGkYsEFmDD1DGywPKCJwxR2koMNB7ItgobhE7ev/2BCwn34h08Wkn0qkwwwXYJf0p hnbIUb1xcEkgaFmx7A1voKH9HVcRoSup9UDRDDiNsos9bRS/FMYah6PjMcWxXY02fSxG CaMHZo2kB/slg+Tkoq29PPz042PGEITBFulod/uKe++SQlox4aUXGj/K1RiFVVNq1lRu nccrPnG+WkUWo6VfhH61zREqjkEOBlxbbccjkfP0yt6QvLWWrlTlHKivuqrsZUMqk5A1 9wJ6ciHJbIltDGVJ3C/SCRdBNLMnVyN8kqj03436yJ8MmzRfbelDNQBlAInSM1Da/RPk wNQA== 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:to:from; bh=HqYH1xqPji+X7mRUfrU3iWQUdXhKJi+PbufiTieRvzY=; b=j5DjA2V1uWnadTZ4OaqDPx5IMUAxMqFhqVom6GI5nym6M31YfY41b+1KmBvIPN6kI0 xzknL0/QLCk+2y17KksEKQqO+HfEneptrF56wgw67uf8QVw+vYA+Axu+gfZiPeRAlmVO +NCNEPkLFKuvK3jZEcVrfvDLAJfdhWWDzr/xJDiSxcowPIiYk35yDcoXZhOtmOQjsW43 P+PIOFUpfUTGfUdPBx1ZwUZvjIwG0gtEitx0ArbnVwve6tHh9B7M+ksiyE6DV1+lQvFw j2+NCfK8SujR25qM6k1bp6izf3u4j4+Ymz30kQlAVf0hyfRsmvny6G55cDDUOKQxfx3/ WOnA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g17-20020a056a0023d100b0055f75fd2ec4si8707395pfc.249.2022.10.09.05.39.55; Sun, 09 Oct 2022 05:40:08 -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 S230130AbiJIMhA (ORCPT + 99 others); Sun, 9 Oct 2022 08:37:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbiJIMgr (ORCPT ); Sun, 9 Oct 2022 08:36:47 -0400 Received: from honk.sigxcpu.org (honk.sigxcpu.org [24.134.29.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BCA829C86; Sun, 9 Oct 2022 05:36:45 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 34B91FB03; Sun, 9 Oct 2022 14:27:02 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id stLLPOUzZBli; Sun, 9 Oct 2022 14:27:00 +0200 (CEST) From: =?UTF-8?q?Guido=20G=C3=BCnther?= To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , Alexander Stein , =?UTF-8?q?Guido=20G=C3=BCnther?= , Markus Niebel , Bjorn Andersson , Dmitry Baryshkov , Marcel Ziswiler , Vinod Koul , Arnd Bergmann , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, phone-devel@vger.kernel.org, kernel@puri.sm Subject: [PATCH v1 2/3] arm64: dts: librem5-devkit: Make LED use PWM Date: Sun, 9 Oct 2022 14:26:54 +0200 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 We can use PWM instead of just GPIO allowing us to control brightness. Signed-off-by: Guido Günther --- .../dts/freescale/imx8mq-librem5-devkit.dts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts index 6445c6b90b5b..7e4b6d65fd89 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts @@ -61,14 +61,12 @@ button-3 { }; leds { - compatible = "gpio-leds"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_gpio_leds>; + compatible = "pwm-leds"; led1 { label = "LED 1"; - gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; - default-state = "off"; + max-brightness = <248>; + pwms = <&pwm2 0 50000 0>; }; }; @@ -615,9 +613,9 @@ MX8MQ_IOMUXC_GPIO1_IO05_GPIO1_IO5 0x19 /* TOUCH RST */ >; }; - pinctrl_gpio_leds: gpioledgrp { + pinctrl_pwm_led: pwmledgrp { fsl,pins = < - MX8MQ_IOMUXC_GPIO1_IO13_GPIO1_IO13 0x16 + MX8MQ_IOMUXC_GPIO1_IO13_PWM2_OUT 0x16 >; }; @@ -920,6 +918,12 @@ &pwm1 { status = "okay"; }; +&pwm2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pwm_led>; + status = "okay"; +}; + &snvs_pwrkey { status = "okay"; }; -- 2.35.1