From patchwork Mon Oct 29 09:42:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 10658961 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C1F113A9 for ; Mon, 29 Oct 2018 09:43:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C0D228639 for ; Mon, 29 Oct 2018 09:43:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E7B22894E; Mon, 29 Oct 2018 09:43:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C26B028639 for ; Mon, 29 Oct 2018 09:43:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729738AbeJ2SbN (ORCPT ); Mon, 29 Oct 2018 14:31:13 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:41288 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729740AbeJ2SbM (ORCPT ); Mon, 29 Oct 2018 14:31:12 -0400 Received: by mail-pf1-f193.google.com with SMTP id e22-v6so693775pfn.8 for ; Mon, 29 Oct 2018 02:43:20 -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=pCPQcI73UddaBWggkh570wXZTWiaCyv6lTgOSiLnbCM=; b=TjAIwcBs595dTO4lawKU3u/xjBCzwU4vXj8rbWfbQ0EXBtVEaWjDjHH4NUoYIeO2Qn xMAjv9np6GTwAZ7UBXV/AQi/EUrY56ku4NcQS+7JqKSbKLTWcKRBGd4bqPFL859LXBV/ sbM0+UuKCihmKH+ky7DeUQ6H1VHcIY1wm/j94= 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=pCPQcI73UddaBWggkh570wXZTWiaCyv6lTgOSiLnbCM=; b=IMN6mhlUR0FRoA9IqrFsNvIHMrBVKb3gf2MYtbUWJt4EA11plaFf3aaOXKDSEBfJ4S /dstbbZXfX7AvTA2UFsCXXqzIL2A0Z1IlSUjhoVjBWLP4OLs2MoB1moAPwgzGwHjrT7O gI3ajdep5KiVbxxPsxdDW0awLLD1ft2IupHANf9rX8i08josJkkDzYkVwawMfOCCv337 zSQnks/ekBCtPPOhu2OCbG8fv0FOoT3fxtGCgQV1ZSQ1pZxuoA9tpxunxKm3x9PmJGlE M+OedsRlbQQ085tYfsjYQgTzhvNTcjjmuYBv31SSNas/Ge7kIdJEpnA22OHSbQqElA3o ab4A== X-Gm-Message-State: AGRZ1gIFXA6GLMcczm9HJo8MDMscbVR6d6jNjUklOwTQ9ZXbyWzRiDPA XN0wdjKZ+9/geCe4QGL2+/Fq X-Google-Smtp-Source: AJdET5e3W23iETWSuprcDsJ0+1FqdzhhfEwF7SvTEk1pZxm/5TUz62C250d18Z+ZO66+IaR+SYns3Q== X-Received: by 2002:a63:4343:: with SMTP id q64-v6mr13582181pga.276.1540806199372; Mon, 29 Oct 2018 02:43:19 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:6091:9d4b:9d82:66b9:3ee6:ffac]) by smtp.gmail.com with ESMTPSA id b62-v6sm21162056pfa.159.2018.10.29.02.43.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 02:43:18 -0700 (PDT) From: Manivannan Sadhasivam To: robh@kernel.org, heiko@sntech.de, ezequiel@collabora.com, xuwei5@hisilicon.com, michal.simek@xilinx.com, pavel@ucw.cz, andy.gross@linaro.org Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, daniel.thompson@linaro.org, amit.kucheria@linaro.org, linus.walleij@linaro.org, koen.kooi@linaro.org, nicolas.dechesne@linaro.org, Manivannan Sadhasivam Subject: [PATCH v3 2/7] arm64: dts: rockchip: rock960: Add on-board LED support Date: Mon, 29 Oct 2018 15:12:40 +0530 Message-Id: <20181029094245.7886-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181029094245.7886-1-manivannan.sadhasivam@linaro.org> References: <20181029094245.7886-1-manivannan.sadhasivam@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add on-board LED support for Rock960 board based on the following standard used by rest of the 96Boards: green:user1 default-trigger: heartbeat green:user2 default-trigger: mmc0/disk-activity(onboard-storage) green:user3 default-trigger: mmc1 (SD-card) green:user4 default-trigger: none, panic-indicator yellow:wlan default-trigger: phy0tx blue:bt default-trigger: hci0-power Signed-off-by: Manivannan Sadhasivam --- .../boot/dts/rockchip/rk3399-rock960.dts | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts index 3c3308daec98..12285c51cceb 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 = "green:user1"; + gpios = <&gpio4 RK_PC2 0>; + linux,default-trigger = "heartbeat"; + }; + + user_led2 { + label = "green:user2"; + gpios = <&gpio4 RK_PC6 0>; + linux,default-trigger = "mmc0"; + }; + + user_led3 { + label = "green:user3"; + gpios = <&gpio4 RK_PD0 0>; + linux,default-trigger = "mmc1"; + }; + + user_led4 { + label = "green:user4"; + gpios = <&gpio4 RK_PD4 0>; + panic-indicator; + linux,default-trigger = "none"; + }; + + wlan_active_led { + label = "yellow:wlan"; + gpios = <&gpio4 RK_PD5 0>; + linux,default-trigger = "phy0tx"; + default-state = "off"; + }; + + bt_active_led { + label = "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 =