From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82B99C4727D for ; Tue, 6 Oct 2020 12:45:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C8B72075A for ; Tue, 6 Oct 2020 12:45:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601988316; bh=jQA9qf0zTXfGZnsRtTNqxf5HKnAXpEcc7RqoVbJW6bI=; h=From:To:Cc:Subject:Date:List-ID:From; b=SRUHggB+guIDkjs8sSUbmCsV2xciIdLPOtUSy0kJrNgN+fQHzVq3TMiI0uDqcMHuB 92tZugirdV/Dvf+cK75nnXMX7jTywpiD3Cc+sCrghwKu8HVAQVIs8/6M/zBWt3/SCj KlW1oy6a2AgN8Owthd+CaK3h34pFVsyRcRVUfV3E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726603AbgJFMpP (ORCPT ); Tue, 6 Oct 2020 08:45:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:44084 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726362AbgJFMpP (ORCPT ); Tue, 6 Oct 2020 08:45:15 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5C5F0206F7; Tue, 6 Oct 2020 12:45:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601988314; bh=jQA9qf0zTXfGZnsRtTNqxf5HKnAXpEcc7RqoVbJW6bI=; h=From:To:Cc:Subject:Date:From; b=cYraoB7Ay9Spg6fd89ju1rqWG7xiW2NHArMm31qUx5EPDv0MmsMh5rXiDka3MokRA 95JmZ7W08zOUOlAvVd5Ge+/MQlJtHv02LHeYj+iB43IcrkG5DWUtqSTt78F8Rliq0f KOV/D2O0diPvyyKZUerUEwh+zezTfzSvGcxJZKqY= Received: by pali.im (Postfix) id E5C14891; Tue, 6 Oct 2020 14:45:11 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Gregory CLEMENT , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Rob Herring , Andre Heider , =?UTF-8?q?G=C3=A9rald=20Kerma?= Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm64: dts: marvell: espressobin: Add support for LED2 Date: Tue, 6 Oct 2020 14:44:55 +0200 Message-Id: <20201006124455.16617-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org LED2 is connected to MPP1_2 pin. It is working only on V7 boards. V5 boards have hw bug which cause that LED2 is non-working. So enable LED2 only for Espressobin V7 boards. Note that LED1 is connected to LED_WLAN# pin on miniPCIe card and LED3 to power supply. Therefore on Espressobin board only LED2 can be controlled directly from the host. LED1 is possible to control via WiFi card inserted in miniPCIe slot if driver for particular card supports it. Signed-off-by: Pali Rohár Tested-by: Gérald Kerma --- Previous version of this patch was sent by Uwe in March 2018, but it did not work on any tested V5 board. Now we know it was due to V5 HW bug. https://lore.kernel.org/linux-arm-kernel/20180321105005.18426-3-u.kleine-koenig@pengutronix.de/ --- .../dts/marvell/armada-3720-espressobin-v7-emmc.dts | 4 ++++ .../boot/dts/marvell/armada-3720-espressobin-v7.dts | 4 ++++ .../boot/dts/marvell/armada-3720-espressobin.dtsi | 13 +++++++++++++ 3 files changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts index 4775a7eda481..75401eab4d42 100644 --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts @@ -39,3 +39,7 @@ &sdhci0 { status = "okay"; }; + +&led2 { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts index c47a93978386..48a7f50fb427 100644 --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts @@ -34,3 +34,7 @@ &switch0port3 { label = "wan"; }; + +&led2 { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtsi b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtsi index 8a1c678bea5f..daffe136c523 100644 --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtsi @@ -41,6 +41,19 @@ 3300000 0x0>; enable-active-high; }; + + led2: gpio-led2 { + /* led2 is working only on v7 board */ + status = "disabled"; + + compatible = "gpio-leds"; + + led2 { + label = "led2"; + gpios = <&gpionb 2 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + }; }; /* J9 */ -- 2.20.1