From patchwork Fri Jan 12 02:21:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 10159335 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4AE54605BA for ; Fri, 12 Jan 2018 02:21:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33308289E4 for ; Fri, 12 Jan 2018 02:21:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27F71289E7; Fri, 12 Jan 2018 02:21:58 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 AD468289E9 for ; Fri, 12 Jan 2018 02:21:57 +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=aX5DzSSXtTXpFZBki7uxoVefJvM4RfDAr+kp8ZpEd4w=; b=lIISMFjIM2XlYOucBC4CgOzqsH OcpJft5TNEAXZzi/a9cEuzGxC78behBwkz6Ywgeui8aCCD3dCZ+DoPdqHqFOYDQ+ZYqIuEbW42hYD eL4ODhnsS8d3CgxJvoP0AR9r5HOFCxsG2De8+34sKTAC8Ueami81HApDOMjOZ0X3YL+7cKsoArRLw 2cRM5IVBhmV11mxUjBtH7yf5/CHoiRx+TAGY/xjqUM51btyJneuy6Hz9N7YSh4Dlw8sYv2ubKl27H RERs9GZh3W0/7JpsJIDfRIlrBode2ZNjTg1/GN1AvuYP3T7box65G1kAlrCBl2b6fE033D20OUUb4 8VFylA/A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eZoyi-0008IZ-By; Fri, 12 Jan 2018 02:21:56 +0000 Received: from vern.gendns.com ([206.190.152.46]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eZoyU-0007qX-2T for linux-arm-kernel@lists.infradead.org; Fri, 12 Jan 2018 02:21:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject :Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WIzbsUAfshWpzhO055o6mYdvZSthxtdlIHV+mq460Ms=; b=UxUAbr8ArzcIOj+SNmsEOTG/L KH0c2y8LnANiyuf/lM3hzM39SwoqOeyeVUTzkChvyTm3QB96jfuJy9QIT4tZRRvRrolK2UA7z4AIk GJaRQYEzUOe5mJYTZfrgUnp3VYa1I2AXWgoDk3CHG8qkbXCM8uQOeBVa6Z/UE+EqCNPIlrwDw240y 7LNry5XmUTLWOseGE/RtNB5P65As7bk5zOCMP+FhckyJAGU5N63wOU75tuf2PXz4qzt080KhyOIvp qsF6VxJ5cPKWYzESB/ObmzDgCMinWjGewVR3IGx5EgN0Kr2vZdoe52De81KBByjopRaibtSoveG+x ztHquGe1w==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:45868 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1eZoy4-0040jE-Lj; Thu, 11 Jan 2018 21:21:17 -0500 From: David Lechner To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] ARM: dts: da850-lego-ev3: Add node for reboot modes Date: Thu, 11 Jan 2018 20:21:24 -0600 Message-Id: <1515723685-19286-2-git-send-email-david@lechnology.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515723685-19286-1-git-send-email-david@lechnology.com> References: <1515723685-19286-1-git-send-email-david@lechnology.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180111_182142_171761_B72066E7 X-CRM114-Status: UNSURE ( 8.44 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, David Lechner , Kevin Hilman , Sekhar Nori , linux-kernel@vger.kernel.org, Rob Herring MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This adds a new node for reboot modes on LEGO MINDSTORMS EV3. The EV3's bootloader looks for a magic number in the ARM local RAM and if found, it will boot into a special firmware update mode where the flash memory can be written via USB. This has been testing working using the command: # systemctl reboot loader Signed-off-by: David Lechner --- arch/arm/boot/dts/da850-lego-ev3.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts index e4bbf48..1cb2ff1 100644 --- a/arch/arm/boot/dts/da850-lego-ev3.dts +++ b/arch/arm/boot/dts/da850-lego-ev3.dts @@ -212,6 +212,23 @@ compatible = "gpio-backlight"; gpios = <&gpio 44 GPIO_ACTIVE_HIGH>; }; + + /* ARM local RAM */ + memory@ffff0000 { + compatible = "syscon", "simple-mfd"; + reg = <0xffff0000 0x2000>; /* 8k */ + + /* + * The I2C bootloader looks for this magic value to either + * boot normally or boot into a firmware update mode. + */ + reboot-mode { + compatible = "syscon-reboot-mode"; + offset = <0x1ffc>; + mode-normal = <0x00000000>; + mode-loader = <0x5555aaaa>; + }; + }; }; &cpu {