From patchwork Fri Dec 18 14:46:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1418484 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=dD99avyH; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=A6IBIMAk; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CyFLX6VSVz9sTL for ; Sat, 19 Dec 2020 03:53:39 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=l/ktR6jGgQgns3zBd2+IzSI6WXIHObxjfigyrySmChY=; b=dD99avyHQTZTYp68NtGkFqfbL7 zRWjbE6poVHi0kzFJVF5/+8i5p6L1JLzSK63ALB94SHQkTM21dsFr/XItW7Rxmmt+vAlbNFPyyyoU IZzWFFD+y2FVl+abNYa3qSnjthV69mUD6WP8Ig9itbVOsl9N8RyFOyHhi+8u1sy7QyeUvhCLLol/E HBoaYCp/D2vz/OYEBd50Gwn2RFz/asaQTH2malptnroXEF7825bDonoOIc4/HEd7T7iJ/3u0gd6ul htx7+KUHyoOmXz+GoOJbJAsBFUUjPhXqsWe84Sny7KXw7XLxQO/Y568Y63xJHqHeuupSlcTMn0GkS RD6xt7DA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kqIsc-0007oB-6D; Fri, 18 Dec 2020 16:45:30 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kqIpu-0007ba-A6 for openwrt-devel@lists.openwrt.org; Fri, 18 Dec 2020 16:42:36 +0000 Received: by mail-ed1-x533.google.com with SMTP id y24so2319346edt.10 for ; Fri, 18 Dec 2020 08:42:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GDqiHiocIvJH/64oCP5izYw9hc0vmeb4bw6QT8k0+QE=; b=A6IBIMAky5nIJlLJFEtUFx9yL9jCft5fUt3hr62Q1UZ/1g9IZ1aCoWvHBGTPf4lo/n xgklsAk5BjE0qKq3CT4XKs/dUsBTA/IHdH2wFNiyYIsHyLYxn6kgwyVLOaHy2YMnuqb/ LH6ve0VBdBxqrGMhPNAKjupQJFMeWT325Z+Fnpn6eZe+OYcBbBZ+3JwyBAS4XQiRmi/0 g8qlk3Cu2fnqzf23Pw82gFGz67fgqSLbR62VgKESH9aSQ+i/R9/+2u2HjiyEC6J1NonQ 4R4l52M+QUSpQBCzug5+wBXotNcEoN0Erk7rMFNnvOetNjRStKPNQOrTplMg2hdG+AqR Sbxw== 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:mime-version :content-transfer-encoding; bh=GDqiHiocIvJH/64oCP5izYw9hc0vmeb4bw6QT8k0+QE=; b=EexVAISsitF5Am0mJPRTdWf7MoCpW3bNgEgSiPgnD7ggtecu+gD82rM3wN/tsw/O2M HWe6aHSQsyr/qxzl7zwGrr9ucyoOrYU/ivepntf8k8NGHbKbQ9btl0xLD0jYQLiL8nXo sa3MrS6gkm15aPQPw8b3raUuomfGIuQXMaOOJzf1yijx2ZjC945b6v/i+Pi0TeisTzQA mQ76UiP8fEQRJYdUpHfUH3WJ1wccGR6UbPVXsffcT7qQk5KLKaGfpAqPaEsl0nLUZQSe xHreXrVExyXnNXEIgTZiWfXjLzKwp8kUJ6E2Is0jXEIck90EmeYlCM6CbffU4MhZK+3B TEDg== X-Gm-Message-State: AOAM531HyOzzD7ywcj+ZMXsfSHhE9eQugb4fOaRwIpJ2hreVWOCXFmNk YNnb/I92enC3W73HSOc+/XAQtSZ6pAwagg== X-Google-Smtp-Source: ABdhPJziLknRUQbcuw5c4mQrVbVn9gsZMWxAn7n0Jhze6Y3ZYnRqu1POsRkAsANRrbocJq8d8vj0qg== X-Received: by 2002:a19:4c08:: with SMTP id z8mr1776885lfa.580.1608302788073; Fri, 18 Dec 2020 06:46:28 -0800 (PST) Received: from localhost.localdomain (terefe.re. [5.255.96.200]) by smtp.googlemail.com with ESMTPSA id b22sm947727lfp.233.2020.12.18.06.46.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Dec 2020 06:46:27 -0800 (PST) From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2] mvebu: macchiatobin-singleshot: enable heartbeat LED Date: Fri, 18 Dec 2020 15:46:21 +0100 Message-Id: <20201218144621.71508-1-tmn505@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201218_114235_041600_BC79C1EE X-CRM114-Status: GOOD ( 16.36 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:533 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [tmn505[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [tmn505[at]gmail.com] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandra Alth Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org With board revision 1.3, SolidRun moved the power LED to the middle of the board. In old place of power LED a GPIO controllable heartbeat LED was added. This commit touches only Single Shot variant, because all have revision 1.3. Some boards could be placed in an enclosure, therefore the LED18 is enabled by default, since that'll be the only visible indicator that the board is operating. Ref: http://wiki.macchiatobin.net/tiki-index.php?page=Schematics#Revision1.3_Electrical_Design_Changes Ref: http://macchiatobin.net/wp-content/uploads/2017/11/MACCHIATOBin-rev-1_3.pdf Reported-by: Alexandra Alth Signed-off-by: Tomasz Maciej Nowak --- v1->v2 - update patch, as it's now in main tree - change index to "backported patches" - add note to the patch target/linux/mvebu/image/cortexa72.mk | 2 +- ...s-mcbin-singleshot-add-heartbeat-LED.patch | 65 +++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 target/linux/mvebu/patches-5.4/028-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch diff --git a/target/linux/mvebu/image/cortexa72.mk b/target/linux/mvebu/image/cortexa72.mk index 1440c07a0b5f..8bd4581766c2 100644 --- a/target/linux/mvebu/image/cortexa72.mk +++ b/target/linux/mvebu/image/cortexa72.mk @@ -38,7 +38,7 @@ define Device/marvell_macchiatobin-singleshot DEVICE_ALT0_VENDOR := SolidRun DEVICE_ALT0_MODEL := Armada 8040 Community Board DEVICE_ALT0_VARIANT := Single Shot - DEVICE_PACKAGES += kmod-i2c-mux-pca954x + DEVICE_PACKAGES += kmod-i2c-mux-pca954x kmod-ledtrig-heartbeat DEVICE_DTS := armada-8040-mcbin-singleshot SUPPORTED_DEVICES := marvell,armada8040-mcbin-singleshot endef diff --git a/target/linux/mvebu/patches-5.4/028-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch b/target/linux/mvebu/patches-5.4/028-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch new file mode 100644 index 000000000000..c3abae60a603 --- /dev/null +++ b/target/linux/mvebu/patches-5.4/028-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch @@ -0,0 +1,65 @@ +From da57203dc7fd556fbb3f0ec7d7d7c0b0e893b386 Mon Sep 17 00:00:00 2001 +From: Tomasz Maciej Nowak +Date: Tue, 10 Nov 2020 16:38:31 +0100 +Subject: [PATCH] arm64: dts: mcbin-singleshot: add heartbeat LED + +With board revision 1.3, SolidRun moved the power LED to the middle of +the board. In old place of power LED a GPIO controllable heartbeat LED +was added. This commit only touches Single Shot variant, since only this +variant is all revision 1.3. + +Note: +This is slightly modified patch. Some boards could be placed in an +enclosure, so the LED18 is enabled by default, since that'll be the only +visible indicator that the board is operating. + +Reported-by: Alexandra Alth +Signed-off-by: Tomasz Maciej Nowak +Signed-off-by: Gregory CLEMENT +--- + .../marvell/armada-8040-mcbin-singleshot.dts | 22 +++++++++++++++++++ + 1 file changed, 22 insertions(+) + +--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts ++++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts +@@ -5,6 +5,8 @@ + * Device Tree file for MACCHIATOBin Armada 8040 community board platform + */ + ++#include ++ + #include "armada-8040-mcbin.dtsi" + + / { +@@ -12,6 +14,20 @@ + compatible = "marvell,armada8040-mcbin-singleshot", + "marvell,armada8040-mcbin", "marvell,armada8040", + "marvell,armada-ap806-quad", "marvell,armada-ap806"; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-0 = <&cp0_led18_pins>; ++ pinctrl-names = "default"; ++ ++ led18 { ++ gpios = <&cp0_gpio2 1 GPIO_ACTIVE_LOW>; ++ function = LED_FUNCTION_HEARTBEAT; ++ color = ; ++ linux,default-trigger = "heartbeat"; ++ default-state = "on"; ++ }; ++ }; + }; + + &cp0_eth0 { +@@ -27,3 +43,10 @@ + managed = "in-band-status"; + sfp = <&sfp_eth1>; + }; ++ ++&cp0_pinctrl { ++ cp0_led18_pins: led18-pins { ++ marvell,pins = "mpp33"; ++ marvell,function = "gpio"; ++ }; ++};