From patchwork Tue Oct 9 14:05:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 148495 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp4947620lji; Tue, 9 Oct 2018 07:06:00 -0700 (PDT) X-Google-Smtp-Source: ACcGV62xGJ7M+lRmnaRJ94sSZIfYgdJo4IZdNzCDa3+EyJG3KEMa1qnYlo7rpZsjuXWGwHRULD1v X-Received: by 2002:a17:902:7109:: with SMTP id a9-v6mr28774261pll.310.1539093960069; Tue, 09 Oct 2018 07:06:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539093960; cv=none; d=google.com; s=arc-20160816; b=llM+VTUXjrJMa5IMA92f0xrdf4+VdHihNEYrz4811RZzYzUnrIBdUrYkcVBmIAuD7Q dURIlJcyhwl88prJBTCBwQPJQtkh6gKzdzKwotR5ruXna2sy6+bG2BHV/1FwPSyELBHp 47UggKzwvizNBi0y3BZapc9ERnsmXAeu1qdPLmJkR9M8FPnY6QOxFiYd6vZiJ1hBJ43z 5iHrvws/4Ar2RE8oLN8JOhcUMV6QbKg+D+0ZIhtmWdHqkN4vGL75RyMOl0zUhOi5m9Me 6LkfXcUu50/UC+XaW+E4QnEiiWPWL1j93uLo/FNfHcBFbWSr1r5RfW/+J2c/5RM56ykJ qWlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=2v0A8Sy+mBXs6qKDANV08GTdJ7Hi+gaENxNk1633qzo=; b=xsmhyslEmrzc/EcybAvQmibxubddHmldvJI4lUwaMM//JwvbXlTr8XBGVTocdvtnXv vZG2R114SOGFG3pzExbIXbtNmwAF/4LsEmkaOz70J1Ek/325kNKyNy+sUOa6FERo9Jmb 4d8CAXgj7eqzAcHufomyzq2yGNiulYLK36XWu1qsiOgyHZxFRIC6en3b3JJ1bLhPYw8i kvXZ4MIkXw7LT2QuxrKZldoBrgHQ1oIqhlmhhtMAkvn5v/twCmwa/zI7TZOBWqVVOtCG 2XqaclIkcGae08uglkRhJWDx5XAUoch1vOlyCIVef6TRKLnpMdlLavahEUI+Wtu62Lbw vGpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dqilUWZ8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 185-v6si18569034pge.516.2018.10.09.07.05.58; Tue, 09 Oct 2018 07:06:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dqilUWZ8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726977AbeJIVXE (ORCPT + 32 others); Tue, 9 Oct 2018 17:23:04 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:34738 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726882AbeJIVXD (ORCPT ); Tue, 9 Oct 2018 17:23:03 -0400 Received: by mail-pl1-f195.google.com with SMTP id f18-v6so904741plr.1 for ; Tue, 09 Oct 2018 07:05:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2v0A8Sy+mBXs6qKDANV08GTdJ7Hi+gaENxNk1633qzo=; b=dqilUWZ8k3+3dB7GdgNnSUnkxsyfzIAB2n7vFWTR7EifJcr7Bmj5t4tqKkwTEyL3RU FbHIzGnB16JAVEfwRklSjwmklgn8O3ncDy0wQLEBlA+EJqAD3vSlCqT7FnRlBdqz1cjm sI9CZqmmJyDIGcfGNywthy0hiKeP22SkQRuQo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2v0A8Sy+mBXs6qKDANV08GTdJ7Hi+gaENxNk1633qzo=; b=QGA795A/Qr8THMxZkg/LBIFMiB2OSiI1upWGgb5QPXCgW4bEqBqhQRV5rjlIE6mz9U PNw1TkZYoWivUKFDhkjXdoXFC4ES1lpbU8v4dgqjEEyY0UpiZC5tfQ1Ib3SQohp0Efm+ do/65h6Zoiayk3l6bJvEjp1XjhwpiMSEIoUCy7jhmTB16VcbBq+w23bFQ4uxt00395Z6 RJJRrXCsvOz+Y5p9VyTUZUxKHM4S43aG194ypNdoFr9xE7LiNDncSQIhK4PyCFyIWJi/ z5mOjpb34ibvB3qphENOmzTfwJmZn8YX+lw6/4P5SJCs53PKvD+ymFXWuASoAJcYq2+l mZ0Q== X-Gm-Message-State: ABuFfoj+uWrbA/lEAWs4wPfDsVE9mvMx/DOQnHCKXpTbEPhh1Iw+dDWq CK/VD3SuZBIJ2EQa8KIwJzaS X-Received: by 2002:a17:902:8e8b:: with SMTP id bg11-v6mr28500234plb.219.1539093956191; Tue, 09 Oct 2018 07:05:56 -0700 (PDT) Received: from localhost.localdomain ([103.59.133.81]) by smtp.googlemail.com with ESMTPSA id e64-v6sm28947722pfe.55.2018.10.09.07.05.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Oct 2018 07:05:55 -0700 (PDT) From: Manivannan Sadhasivam To: robh+dt@kernel.org, heiko@sntech.de, ezequiel@collabora.com, xuwei5@hisilicon.com, michal.simek@xilinx.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, daniel.thompson@linaro.org, amit.kucheria@linaro.org, linus.walleij@linaro.org, koen.kooi@linaro.org, Manivannan Sadhasivam Subject: [PATCH 2/6] arm64: dts: rockchip: rock960: Add on-board LED support Date: Tue, 9 Oct 2018 19:35:18 +0530 Message-Id: <20181009140522.6492-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181009140522.6492-1-manivannan.sadhasivam@linaro.org> References: <20181009140522.6492-1-manivannan.sadhasivam@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add on-board LED support for Rock960 board based on the following standard used by rest of the 96Boards: device-name:green:user1 default-trigger: heartbeat device-name:green:user2 default-trigger: mmc0/disk-activity (onboard-storage) device-name:green:user3 default-trigger: mmc1 (SD-card) device-name:green:user4 default-trigger: none, panic-indicator device-name:yellow:wlan default-trigger: phy0tx device-name:blue:bt default-trigger: hci0-power Signed-off-by: Manivannan Sadhasivam --- .../boot/dts/rockchip/rk3399-rock960.dts | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts index 3c3308daec98..7d0d1c69c3a8 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts @@ -13,6 +13,53 @@ chosen { stdout-path = "serial2:1500000n8"; }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&user_led1>, <&user_led2>, <&user_led3>, + <&user_led4>, <&wlan_led>, <&bt_led>; + + user_led1 { + label = "rk3399-rock960:green:user1"; + gpios = <&gpio4 RK_PC2 0>; + linux,default-trigger = "heartbeat"; + }; + + user_led2 { + label = "rk3399-rock960:green:user2"; + gpios = <&gpio4 RK_PC6 0>; + linux,default-trigger = "mmc0"; + }; + + user_led3 { + label = "rk3399-rock960:green:user3"; + gpios = <&gpio4 RK_PD0 0>; + linux,default-trigger = "mmc1"; + }; + + user_led4 { + label = "rk3399-rock960:green:user4"; + gpios = <&gpio4 RK_PD4 0>; + panic-indicator; + linux,default-trigger = "none"; + }; + + wlan_active_led { + label = "rk3399-rock960:yellow:wlan"; + gpios = <&gpio4 RK_PD5 0>; + linux,default-trigger = "phy0tx"; + default-state = "off"; + }; + + bt_active_led { + label = "rk3399-rock960:blue:bt"; + gpios = <&gpio4 RK_PD6 0>; + linux,default-trigger = "hci0-power"; + default-state = "off"; + }; + }; + }; &pcie0 { @@ -20,6 +67,38 @@ }; &pinctrl { + leds { + user_led1: user_led1 { + rockchip,pins = + <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + user_led2: user_led2 { + rockchip,pins = + <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + user_led3: user_led3 { + rockchip,pins = + <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + user_led4: user_led4 { + rockchip,pins = + <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + wlan_led: wlan_led { + rockchip,pins = + <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_led: bt_led { + rockchip,pins = + <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + pcie { pcie_drv: pcie-drv { rockchip,pins =