Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933104AbeALCaX (ORCPT + 1 other); Thu, 11 Jan 2018 21:30:23 -0500 Received: from vern.gendns.com ([206.190.152.46]:53237 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932797AbeALCaB (ORCPT ); Thu, 11 Jan 2018 21:30:01 -0500 From: David Lechner To: linux-arm-kernel@lists.infradead.org Cc: David Lechner , Sekhar Nori , Kevin Hilman , Rob Herring , Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] ARM: dts: da850-lego-ev3: Add node for reboot modes Date: Thu, 11 Jan 2018 20:29:50 -0600 Message-Id: <1515724191-30499-2-git-send-email-david@lechnology.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515724191-30499-1-git-send-email-david@lechnology.com> References: <1515724191-30499-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 - vger.kernel.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: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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 81942ae..2e85080 100644 --- a/arch/arm/boot/dts/da850-lego-ev3.dts +++ b/arch/arm/boot/dts/da850-lego-ev3.dts @@ -184,6 +184,23 @@ io-channel-names = "voltage", "current"; rechargeable-gpios = <&gpio 136 GPIO_ACTIVE_LOW>; }; + + /* 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>; + }; + }; }; &pmx_core { -- 2.7.4