From patchwork Mon Oct 29 09:42:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 149641 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3905802ljp; Mon, 29 Oct 2018 02:43:11 -0700 (PDT) X-Google-Smtp-Source: AJdET5eG5HvvcEpBu2GCvQvJY5ZQbCz9313tBOwRNIkhGDbzSYbys93/f8QjVe/gffyPJ+kfD1UR X-Received: by 2002:a17:902:6b4b:: with SMTP id g11-v6mr13604835plt.213.1540806191685; Mon, 29 Oct 2018 02:43:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540806191; cv=none; d=google.com; s=arc-20160816; b=uraYFmIiK5tEo9DuitjB4HAZnAeS0rlf9aEzjjEfMPUWUpP5luYvbAYQjQHRLikA/Y n078GcTcN+o+A82agbycf5pd6alhm1fi1bdQl7PdTTwueR0rZ7q9UArKDlq+sKDNw+In Ih/RE/w9DFgd/H7aeDwmzAFK6C+UDgrpY3LBRbv8Gj5ZvV3UVq1MPBmjYum/ATvcXvJs JuUN7bFb7PS5HbbfoJ4yCwsdGBZDCmEvHrF0/+aZRUd3JZe/widYMHnzo2vcSEmdA8Oz tGJuKe7kS99Yeabrq5SirWMJq8v9bdjJaOsQ8r622c0bRup2xR3uyj3eI0+kL3Ro6LCL B9rw== 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=wUFCaMP2U/9XAPvBBvehrJOX1gaBUfBxuvntsZn9/3s=; b=qT1h1eFGFSAfsrY2/OsOPt9BZ9YpW3ctDu4KwbUp6ntDyIH5UAs9Cc2eTGNEyMD4zp nT6mcM+NFtB6afGwZoqCPq9QdGhpMCoTIRTbkJsDCKunNhSVv5wnXyI9OgcO7pr/Vnc6 N+usNwnHqWKXKk+nCihgliyP19LlDxJB5yamChK+kWF6IVu/hRUgQiH1mJ2ZwzYQCTEN AOWYQgonGrttxgMZKswGpVFqBODd+qhbfUI5qVNM69aymNXhsb++5F8i0ULlX4SmBxA1 WWFola39pr1VDoJ/AaVmpWHXiVPhXGcxynjOKCz0KZFUhmKxdisSupFJ1+PoKRBnYqlg tejA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C+RgILs3; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-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 n188-v6si13129193pga.434.2018.10.29.02.43.11; Mon, 29 Oct 2018 02:43:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-leds-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=C+RgILs3; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-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 S1729700AbeJ2SbD (ORCPT + 1 other); Mon, 29 Oct 2018 14:31:03 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:34013 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729558AbeJ2SbC (ORCPT ); Mon, 29 Oct 2018 14:31:02 -0400 Received: by mail-pg1-f195.google.com with SMTP id k1-v6so2194813pgq.1 for ; Mon, 29 Oct 2018 02:43:09 -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=wUFCaMP2U/9XAPvBBvehrJOX1gaBUfBxuvntsZn9/3s=; b=C+RgILs3dUJi3yraFCTU5KozzhnQqfd6aNaaH6g/niqa6DtxemChy0W8NGhvefe0hc eXZhBhncQ68vRSxmRQKktJb0TZtI/J6x6Rq6MfoPajHK5VBQBSxK/spann2Yv2cBvsDI RRb8GoLdALuemVCAody9oaWDnCsVGkEliQCd4= 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=wUFCaMP2U/9XAPvBBvehrJOX1gaBUfBxuvntsZn9/3s=; b=U7UCK71c85UyvJWUG8S2zbCUReOeS6PI8CLwAtBr0txx4zqs1CjrcnXCN50hjaeokE SJFbWf7pusxYNNbk0aFB7R94XYZl/CLOlOLAFkPQ6j7AhekeY+bu/NJr9iGu0ESm3ZJQ K87EcbmHB4XQvcURWqQN/2IzwHV+0NK4AIshnIE/ozytkd2e8wWNYCgT2stjscNnE5zg Vu2IW99yuEClt1z0lokWnCG642TrDbDaavwzt8ctUOp+CobOxBjUV+YN3cERVt5FIoMq TXKOryRwgszX+eFgIGcwoIJwB32jYusNqpUceDM8svQHSn8TcIMEjA69QGtPBHCKQygy OZxw== X-Gm-Message-State: AGRZ1gJ1UNOV5dRLmP/FdYWPkCpr/Lf6VB9N9u6QDT9P0xUR0FFQvWJU IpEAMtAnx2wgjHXxUG5M5INY X-Received: by 2002:a63:1c1b:: with SMTP id c27-v6mr13211072pgc.351.1540806189478; Mon, 29 Oct 2018 02:43:09 -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.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 02:43:09 -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 1/7] arm64: dts: rockchip: ficus: Add on-board LED support Date: Mon, 29 Oct 2018 15:12:39 +0530 Message-Id: <20181029094245.7886-2-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-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add on-board LED support for Ficus board based on the following standard used by other 96Boards: red:user1 default-trigger: heartbeat red:user2 default-trigger: mmc0/disk-activity (onboard-storage) red:user3 default-trigger: mmc1 (SD-card) red:user4 default-trigger: none, panic-indicator red:wlan default-trigger: phy0tx red:bt default-trigger: hci0-power Signed-off-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts index cce266da28cd..027d428917b8 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts @@ -23,6 +23,52 @@ clock-output-names = "clkin_gmac"; #clock-cells = <0>; }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&user_led1>, <&user_led2>, <&user_led3>, + <&user_led4>, <&wlan_led>, <&bt_led>; + + user_led1 { + label = "red:user1"; + gpios = <&gpio4 25 0>; + linux,default-trigger = "heartbeat"; + }; + + user_led2 { + label = "red:user2"; + gpios = <&gpio4 26 0>; + linux,default-trigger = "mmc0"; + }; + + user_led3 { + label = "red:user3"; + gpios = <&gpio4 30 0>; + linux,default-trigger = "mmc1"; + }; + + user_led4 { + label = "red:user4"; + gpios = <&gpio1 0 0>; + panic-indicator; + linux,default-trigger = "none"; + }; + + wlan_active_led { + label = "red:wlan"; + gpios = <&gpio1 1 0>; + linux,default-trigger = "phy0tx"; + default-state = "off"; + }; + + bt_active_led { + label = "red:bt"; + gpios = <&gpio1 4 0>; + linux,default-trigger = "hci0-power"; + default-state = "off"; + }; + }; }; &gmac { @@ -66,6 +112,38 @@ <4 27 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + leds { + user_led1: user_led1 { + rockchip,pins = + <4 25 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + user_led2: user_led2 { + rockchip,pins = + <4 26 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + user_led3: user_led3 { + rockchip,pins = + <4 30 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + user_led4: user_led4 { + rockchip,pins = + <1 0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + wlan_led: wlan_led { + rockchip,pins = + <1 1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_led: bt_led { + rockchip,pins = + <1 4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &usbdrd_dwc3_0 {