From patchwork Mon Oct 29 09:00:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 149633 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3868743ljp; Mon, 29 Oct 2018 02:00:46 -0700 (PDT) X-Google-Smtp-Source: AJdET5fU/RpU3XBZolxFlki8Ei90OfobAaAYIWpFgeMss4K1dm8kJkf5S57Cn3Iy2zvXGtYz6thd X-Received: by 2002:a17:902:3341:: with SMTP id a59-v6mr13446219plc.138.1540803646479; Mon, 29 Oct 2018 02:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540803646; cv=none; d=google.com; s=arc-20160816; b=u3q7/+mU72u9qCozwj0c8Rv8x5uvScdUY3OV2QdwV2QGDjvYawYEwmDRvOa8iTW1aA oQa1c6N1DxELGrGftgeDekqfBqAbXmw5I7A9KfB6xcFAPlurilxv9Li6S3+TQVQ44wJg ly9/IDEmAmatuhThfmnuV5BGefUVWAtxue/I7cpP4v/OnzvhBNBc9wb+on6w7L1couvw 4S9doCY5PtZ1ANYlYzaDT6rY8/IEDOfjj1k3F+Dsx9BrdMCv7K1Y1E2u0bmZI1EnQ0IT VDp0d+kQNAvs/AKP2Vc6qvtJZfyuO0Xpyd9hHehNVjXqxy9IL13pdx2nzka124ACi7Bw 9qhQ== 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=pqG+u0pvjMi4NsYFL/NeW5TxCKozDwBVibGZqNwjitC09kiPILbFk7o1a0LICzHOoT p7jlpmF+EcvJrFA0cEpEfxK4gGqX1SuIf697e5w0odYdb8Pehqmws47v7R6elu8STOQc RWf5Fd/5HMrioMILrIpWyKAxUrLHdTGVmbn7kYKmPrEvHiMPeTc1PKFm2WFQiqXnQAsr T///fLFgW2jdp7e4cJVLgSGEa633yFxGY5N/xgT0RV6gQ40mUX9vAJJhhjLA9p/sJQ/N z1ln+TaAzaaSlDLzyXG62JdqoqC+VHekoSc9IDhvgwX0qzUA/3lXXO/TDqbjzX1SynMV yDfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UcVmJDUJ; 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 x5-v6si19487299plv.256.2018.10.29.02.00.46; Mon, 29 Oct 2018 02:00:46 -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=UcVmJDUJ; 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 S1729632AbeJ2Rs2 (ORCPT + 32 others); Mon, 29 Oct 2018 13:48:28 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:46412 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729483AbeJ2Rs1 (ORCPT ); Mon, 29 Oct 2018 13:48:27 -0400 Received: by mail-pl1-f194.google.com with SMTP id bb7-v6so3459021plb.13 for ; Mon, 29 Oct 2018 02:00:44 -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=UcVmJDUJTEMSRAD52MJcxieQC6frO1KWadP4ewuApun+xrieIuXfhWE8fkGrRhJmfX tEe8Zl2+rjR6MS+a6ueso+hwF39C/cHy+5giwk4OdZydNcmyMRH4oAvbFapIWnDEvFBl SsOE30qVQ2/FsfFBGM5OW2/mM0LRm8qbiM+9k= 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=HN67IgNYieps2yJDoQK2n0LHnN8DVE90AHemAOR13V9GLlhLPGsy09rJg1goNm/pWD 4S08iOPFpSpAvenkecAU9kDb3800DJnAEaCsCY6UcxPLlPuAlc364pK3Qq01eIhWKAns fUHA+8q1utyR9subR83asMwWM2POgfWxlzaP1vpPim20cn8uV2Pqqiu0eTgX4+HSEVN9 S/llIij4GDxkZmsDY8jRTpQzW8VxUlRkj5npN6sUVGgt0x2uj1isqLYQo3How7tpjWi3 7UAluKRu0HqFPizteDykeamdqRtypqpgjpdk2sAZcXVH7kfANFPq5Jgx8j3wm/Ee+/fe YWKw== X-Gm-Message-State: AGRZ1gIq4pIp8DjmUwaP1TvA19Ne1p5to2X7ur73Mdo/N8h7xm8jvhbZ JdexWZPWihQzOm9kRZmttH24 X-Received: by 2002:a17:902:8d88:: with SMTP id v8-v6mr13397557plo.21.1540803643884; Mon, 29 Oct 2018 02:00:43 -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.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 02:00:43 -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 v2 1/7] arm64: dts: rockchip: ficus: Add on-board LED support Date: Mon, 29 Oct 2018 14:30:00 +0530 Message-Id: <20181029090006.4353-2-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> 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 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 {