From patchwork Mon Oct 29 09:00:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 10658911 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 5EBFC1734 for ; Mon, 29 Oct 2018 09:04:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 537E328639 for ; Mon, 29 Oct 2018 09:04:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 473AA28901; Mon, 29 Oct 2018 09:04:07 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8D83D28639 for ; Mon, 29 Oct 2018 09:04:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=WwCqk35mXBuMKQxKsA3sZGGfC210hivh33aCDd7YyKY=; b=o9zmqE1RFnm4VcZwXtJmrayFVT vzh62Ez7JPYsJ9iKwcfEFw4aGAxsolizdwWrP9a1bUb2bFBHs+w7WO1nJpu/+YMGW+oBdkbAmaAU7 xuo1w/iRYEMLlDm5y7Rixedue4Y73KJJXVtxt6xwkPFpW8LKTA8BHt9PYSUwA9dJrXSqSNJvwdCM7 jj+80Smjfs+9LwOF/pNA9cbm/UXohbhyIPza2uOWaSUol0JvM+oOGYTRI1y/3Swjhe2Tldix1kwQc 7a3x2Z6GUdK95nRwXEksfwWLk7d2A1iTwF+dRsPQW7lAathjGQd3ZDueKCH1ptYfB97wVauaRLQu6 r52CcbcA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gH3Sr-0001q0-Eh; Mon, 29 Oct 2018 09:04:01 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gH3Q2-0000fe-HQ for linux-arm-kernel@lists.infradead.org; Mon, 29 Oct 2018 09:03:06 +0000 Received: by mail-pg1-x541.google.com with SMTP id s3-v6so3543400pga.12 for ; Mon, 29 Oct 2018 02:00:55 -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=Eojx8vHsmBS5mnFqb6X3/ycGgyVwyHU6+FHo16QyQgDddknzVYY2SInRI91PsXWqeT r7Z4KvvogstHZvTgaE2+cjZCL76kiyVUZ3u9QuV8AH/1EfqER+41fPNuhh+yKUxybPcl lbCN4JF/VPXBNQJAGgyp01X4mBJZtR/ake2b0= 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=T/ghhpU7eJfz64i59xaeOVy17l6kS9DaQbVeGe32HdVkq7Mfjzc3KG4TnnrNHEeRE0 aFUu2qDOrNGBXaKvx/V5O9/22pDGf1rD5AY4SLa8V85I8VdzCm5wCF0IFVATyC0O2ZnQ nQlVyiBDGMqBW3b3GG1RF4TXhkogn6nVLW7Iont41WcxKyu4dvL9PXfZ526qCXsgxwTn CrOyO1nekec/2H0ybTZlO+H7yAVDAPfkBIkP4fcs81WWHjiapbmYpTD1mXUWUCjnePka U77yuZrbhuz2k6fW+beFyshzmGnG15/UWrnMyk8B/aQNM/Hr3aIbvq7DPDiO44Hp7Qc0 oUdQ== X-Gm-Message-State: AGRZ1gJYK85VLE/b5/6K6VuZFEwKg0Mm7zpKY0z3P6FDC9eM/9LEo5De HbIEWupDSCdiXs3PPmDlsngo X-Google-Smtp-Source: AJdET5cDGg24Q2EbW7Y9fxYf6WbiLYUdZbXbLtdhqIGTx/Z1UdUVjzewiHBPknCPPWi+ZFH7Jqdg7w== X-Received: by 2002:a62:d2c7:: with SMTP id c190-v6mr157684pfg.26.1540803654681; Mon, 29 Oct 2018 02:00:54 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:6091:9d4b:9d82:66b9:3ee6:ffac]) by smtp.gmail.com with ESMTPSA id m11-v6sm28265245pfi.102.2018.10.29.02.00.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 02:00:54 -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 Subject: [PATCH v2 2/7] arm64: dts: rockchip: rock960: Add on-board LED support Date: Mon, 29 Oct 2018 14:30:01 +0530 Message-Id: <20181029090006.4353-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181029090006.4353-1-manivannan.sadhasivam@linaro.org> References: <20181029090006.4353-1-manivannan.sadhasivam@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181029_020106_627038_96537C53 X-CRM114-Status: GOOD ( 12.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, daniel.thompson@linaro.org, linux-arm-msm@vger.kernel.org, linus.walleij@linaro.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org, linux-rockchip@lists.infradead.org, koen.kooi@linaro.org, linux-leds@vger.kernel.org, Manivannan Sadhasivam , nicolas.dechesne@linaro.org, linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 =