Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1362581ybz; Thu, 16 Apr 2020 07:54:32 -0700 (PDT) X-Google-Smtp-Source: APiQypLvV5WJ3qcCXnPmIkxggOlZ5UO/LOVVaLyneFSnkdqKVX+kBu1jfe6cfJojT7Ie3JFtQ/V0 X-Received: by 2002:aa7:d399:: with SMTP id x25mr31057676edq.163.1587048872248; Thu, 16 Apr 2020 07:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587048872; cv=none; d=google.com; s=arc-20160816; b=EoShW9X2g2GUFmWTTCIhbTHzZOzu6p+F3vofMHtuD4sINQQ0YFkbAPIao3PSC5Npk+ ElbjYzh20p5FG5ftJyePwNfIj1YKPU/xYV04x2Q5O49NmG+E8H0iCoE2kdLvsR3axk3n k8gvpeuvQU/o39aKR863VAB7BHSP0OzCVaeZ5cpVYmwWfphr7M+vgWrMIp1v5sDoZVSF a13oPZc7xodgrUdSRNRdPWP/fl/VL8dhcr8sg9ihifoEYjmYIyFg+T4enIpFblcEYVaJ BLftRGF7/06I7jpthQdCkzMX28OUrWqVrFrl4blnOqlnp98NZfMhheR9iYQK4ZUEScGD sKIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=lwQx04fRGCKLAqLkPIuju/Mf7EL+LzWw2iTqHU+8bFw=; b=MR4nTuuk4gNO6rvNiSU0ekeFxSeFSI44BUsADeLMmLU2E/mfzr/QTsBTvz9qgm6hOZ /oLf96NojdxY3jsDBNzxoB/gH2F3Zcv5uTi3wik2RMsif2h6u7CIMFlp6ElYpb6L7pkA w5nn4zadl7PmWEoFjLBnTYoS48Zj9Zir5qiYm7b9k79wF+MEAqULOJAn9A8BUKC0F/Y5 TrjI0/gB8Wd3y3ydAdqaR4kwF9HKrDtzdNqqGIMU8Ym6t7No1Wid8meFmaLjHwG99xes p2NQUKCHznfV+pr7ktiZcWJ9DIFTki59R+S4O0oidEzSB85YgBrQpFIRfvj7jsqw6Swx sP1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si12978420edt.338.2020.04.16.07.53.58; Thu, 16 Apr 2020 07:54:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731640AbgDPOwD (ORCPT + 99 others); Thu, 16 Apr 2020 10:52:03 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:40968 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728543AbgDPOvn (ORCPT ); Thu, 16 Apr 2020 10:51:43 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 00BA52A21ED Received: by jupiter.universe (Postfix, from userid 1000) id 4C63F4800F7; Thu, 16 Apr 2020 16:51:38 +0200 (CEST) From: Sebastian Reichel To: Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Ian Ray , Samu Nuutamo , Sebastian Reichel Subject: [PATCH] ARM: dts: imx53: ppd: alarm LEDs use kernel LED interface Date: Thu, 16 Apr 2020 16:51:23 +0200 Message-Id: <20200416145123.73039-1-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ian Ray Use kernel LED interface for the alarm LEDs. Signed-off-by: Ian Ray [Rebased] Signed-off-by: Samu Nuutamo [Rebased] Signed-off-by: Sebastian Reichel --- arch/arm/boot/dts/imx53-ppd.dts | 49 +++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/arch/arm/boot/dts/imx53-ppd.dts b/arch/arm/boot/dts/imx53-ppd.dts index 5ff9a179c83c..34ce41600098 100644 --- a/arch/arm/boot/dts/imx53-ppd.dts +++ b/arch/arm/boot/dts/imx53-ppd.dts @@ -176,7 +176,7 @@ pwm_bl: backlight { power-supply = <®_3v3_lcd>; }; - leds { + leds-brightness { compatible = "pwm-leds"; alarm-brightness { @@ -185,6 +185,32 @@ alarm-brightness { }; }; + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_alarmled_pins>; + + alarm1 { + label = "alarm:red"; + gpios = <&gpio7 3 GPIO_ACTIVE_HIGH>; + }; + + alarm2 { + label = "alarm:yellow"; + gpios = <&gpio7 7 GPIO_ACTIVE_HIGH>; + }; + + alarm3 { + label = "alarm:blue"; + gpios = <&gpio7 8 GPIO_ACTIVE_HIGH>; + }; + + alarm4 { + label = "alarm:silenced"; + gpios = <&gpio7 13 GPIO_ACTIVE_HIGH>; + }; + }; + gpio-poweroff { compatible = "gpio-poweroff"; gpios = <&gpio3 9 GPIO_ACTIVE_HIGH>; @@ -909,18 +935,10 @@ MX53_PAD_NANDF_CS2__GPIO6_15 0x0 MX53_PAD_NANDF_CS3__GPIO6_16 0x0 /* POWER_AND_BOOT_STATUS_INDICATOR */ MX53_PAD_PATA_INTRQ__GPIO7_2 0x1e4 - /* ACTIVATE_ALARM_LIGHT_RED */ - MX53_PAD_PATA_DIOR__GPIO7_3 0x0 - /* ACTIVATE_ALARM_LIGHT_YELLOW */ - MX53_PAD_PATA_DA_1__GPIO7_7 0x0 - /* ACTIVATE_ALARM_LIGHT_CYAN */ - MX53_PAD_PATA_DA_2__GPIO7_8 0x0 /* RUNNING_ON_BATTERY_INDICATOR_GREEN */ MX53_PAD_GPIO_16__GPIO7_11 0x0 /* BATTERY_STATUS_INDICATOR_AMBER */ MX53_PAD_GPIO_17__GPIO7_12 0x0 - /* AUDIO_ALARMS_SILENCED_INDICATOR */ - MX53_PAD_GPIO_18__GPIO7_13 0x0 >; }; @@ -1080,4 +1098,17 @@ pinctrl_usb_otg: usbotggrp { MX53_PAD_KEY_COL4__USBOH3_USBOTG_OC 0x180 >; }; + + pinctrl_alarmled_pins: qmx6alarmledgrp { + fsl,pins = < + /* ACTIVATE_ALARM_LIGHT_RED */ + MX53_PAD_PATA_DIOR__GPIO7_3 0x0 + /* ACTIVATE_ALARM_LIGHT_YELLOW */ + MX53_PAD_PATA_DA_1__GPIO7_7 0x0 + /* ACTIVATE_ALARM_LIGHT_CYAN */ + MX53_PAD_PATA_DA_2__GPIO7_8 0x0 + /* AUDIO_ALARMS_SILENCED_INDICATOR */ + MX53_PAD_GPIO_18__GPIO7_13 0x0 + >; + }; }; -- 2.25.1