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: 10658991 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 0AC4D14DE for ; Mon, 29 Oct 2018 09:47:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFCA9296EF for ; Mon, 29 Oct 2018 09:47:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3C8B29870; Mon, 29 Oct 2018 09:47:49 +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 49387296EF for ; Mon, 29 Oct 2018 09:47:49 +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=OiE69jMtz6t2hVoNo6QV1oeMqHD8IzRPsPsrcow6ulI=; b=eXqODs65ncpSOj6hVDas6n/lcJ 2vcMzk579ErUFZl7LHNcz7g22pgR3ccLHdzymfRs98faFln6fay77W9H0mfHb9fiqaeMnr0F8VH0l ze2SlYgf5cyuSVs9GOGpM6ZyHuuvlTHliGKG31yJ7a/SrY656B5wDuwp4U5lmMKLH9FnG2Msfyux1 pHIb88WOh0AK4RTNriFa7GAoqVnVmydNhnnH+71nKYb2iuEcTNfEzB6qtkqRfDiYVQWEHAi+0j9dv 9rI/nzBlw5xp/amkK6xs1LeCX/bqjUGwDTj+G9LOz+XakGhK2IUcq9IOTQmVQ+WVu2pGQIbaL2/hQ lLa9mnsg==; 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 1gH497-0001WI-LX; Mon, 29 Oct 2018 09:47:41 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gH454-0006sR-Mr for linux-rockchip@lists.infradead.org; Mon, 29 Oct 2018 09:44:03 +0000 Received: by mail-pf1-x441.google.com with SMTP id j23-v6so3736031pfi.4 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=BNWdJZOtCDgngU+XAC1Agjc2VdW67XtYrG7USgIib7Qsp/2xzzqRl+Qzz0v0lhRZCM NKrBkgauKfF11CKbdDzRf30X+NP7Qtqy5FiyK2ye0aCYbS8UWwUgFQ76CJE3cLx0FtUu p915L4sGa/+XPRd0hMWzDZ4txMYtevquj3H8bMYMOxFfd5iJRss3WcPZ4Swc9iTAnT1h CM3Dslw+GVDXZ8ehDqpCChv5pm1yD3NS+wguAp/8XbumMUKDx0Nz9I33z4aAOSkG4eHA xDURU88/R+TRdQRVUwSeZ9bYrWbOVeIJOhXljjURafhLmusLu0lM+27716FxzVw+9EKE Eafg== X-Gm-Message-State: AGRZ1gI9yI/qnZG+nvFte16OLKik0C1DPGgiSI/edYQa8FXFdxRBdtFW 5egdtLxiMERYO9X73I6BSuNI 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181029_024330_778931_826E631C X-CRM114-Status: GOOD ( 11.35 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=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 =