From patchwork Fri Jan 12 02:29:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 10159367 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 C0740602D8 for ; Fri, 12 Jan 2018 02:30:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A88FC2882F for ; Fri, 12 Jan 2018 02:30:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9CB9528852; Fri, 12 Jan 2018 02:30:50 +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 28FE62882F for ; Fri, 12 Jan 2018 02:30:49 +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=oUphdPwdUr9cfArpmU6tOsPiVfwb0XqZSgrPdGi2WWE=; b=E8Jw/gk83PPE7v7dqcqCJ6465j U5nrt5vhQJ7QpmCZNG8RDnyOZysnX+q1odVQ5wvpiBvjulMYwhFQfAZu9HgZ/7cHPB8l4cZWS1Lzb zop45FzXR5xjy4NbPQURdpnKAvhVOr2dll/mDS7ZBHeZU9sDMQ8vl/PKNBsaeEMRWzxog28fDWSQJ INtnCSJW3FyaT8mV98i1sA2fINEP3cVEfOFLlDbhhHh/w4BZzv+DMQC7PR5MZYO6jk2Z4NBokq21k d/7w5wNp6xbpdVAoBlyNc+0nOkN0j8rHX9N5edQJu5zwEErYjaNu+FfhezUmed931CRfPwLPEaXhm 8SSJiAAQ==; 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 1eZp7H-0006On-DN; Fri, 12 Jan 2018 02:30:47 +0000 Received: from vern.gendns.com ([206.190.152.46]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eZp6g-0004S1-9v for linux-arm-kernel@lists.infradead.org; Fri, 12 Jan 2018 02:30:13 +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=o2IjRXAvJ6NnxaQEgHDHajQRKubS7KTJuM0ZcQW0bQs=; b=EuBnrAvplv7YJjKxISgjXtW+i Zp6RJbQL3qKEQMdH0O9Yuw9SHpp7z6hqt2lOUZdIOxynAt2rmkB2Ql1LCdGSCdqx3KuAl7/otf/xR jMhN04CQsQT9rY3lRZJatIgTGwXqLa282exBL3LdninPhfl68TR4Lm1yqeifxkYSqNxI9IkSU28Hw CclYcFGCoaXn/8Al2uRYRa5Mn6fyWPeRSu25TYaFQ6tTmKkhC6bZUbt2Fqd0gKSSKqsSgOCxHU1sA 7yAjnMfRXwxgZMnaCXMeO2plxhae7mrIhtFakJSYkwhC90fbQJfmm9cw/C3RWqzDZE4Pw5OYt8QXg VETRhsbew==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:46076 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1eZp6H-0041iq-4R; Thu, 11 Jan 2018 21:29:45 -0500 From: David Lechner To: linux-arm-kernel@lists.infradead.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 - 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_183010_396225_5585A1B6 X-CRM114-Status: UNSURE ( 8.55 ) 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 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 {