From patchwork Mon Aug 8 23:03:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 9269943 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 39CB760754 for ; Mon, 8 Aug 2016 23:06:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 299C428159 for ; Mon, 8 Aug 2016 23:06:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1DE8628173; Mon, 8 Aug 2016 23:06:17 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BE42528159 for ; Mon, 8 Aug 2016 23:06:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bWtbK-0000IY-Lk; Mon, 08 Aug 2016 23:04:54 +0000 Received: from mail-pa0-x233.google.com ([2607:f8b0:400e:c03::233]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bWtah-0008Sg-D3 for linux-arm-kernel@lists.infradead.org; Mon, 08 Aug 2016 23:04:16 +0000 Received: by mail-pa0-x233.google.com with SMTP id pp5so117751968pac.3 for ; Mon, 08 Aug 2016 16:03:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=paQTwtEUkOwQ/W5xOom8ufKrb6XmJji+JTZVePx+HBo=; b=SL8z2eTovbCiJA1ySoRfEbKdaARuTFPfeomLLRCGKVETdfwxDPmXoaRu29C2sj7vAB HdUVfK7ymjL+pNDH5y2SFPG8E2FD/fO0J9XmcDN34cazSy0IPRqvXDW3uyfZx0lqAFfp L3YYsIOnJ/Pj0GB87KSpqcS5w4Q9sZW3X1Qik= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=paQTwtEUkOwQ/W5xOom8ufKrb6XmJji+JTZVePx+HBo=; b=V3YHc7k32m0HlBtF0oKWaVtcUtS+MEobdxTDXDLb+ikCs0MHHoGi0EqcFUO84qzJmu 3IOKz592tYBbM25xe7bWnSbNOsd0dzq0vl751hhLMPX51olizghB5uWdto6rFyjrYnEN AGYVcS0eWNqHRI2eu/WRZNKkN134PXM4Mw0TvFbL3yh6CzBk7Yeop3/0a/oEGleulBvS kYgdRueDvA1XXzA3w8Bzd5nshJl59QGlmUPInMvyJl39MdZyUE2RQS1I157159uTSV0K xL0f2uDHLZUl+RTnkWKYtcMy02W6ZakZHBCEH8p7WSNmWuLbjCtfqSiNaGotUDOUFyVI y3pA== X-Gm-Message-State: AEkoouty8cFF6HTcHeCjb0OwENTNycv0ZF2mYirrp05IePL4PQf0QfN9qRymoMKChAd0ayHR X-Received: by 10.66.159.131 with SMTP id xc3mr12338321pab.28.1470697434356; Mon, 08 Aug 2016 16:03:54 -0700 (PDT) Received: from localhost.localdomain (c-73-67-244-238.hsd1.or.comcast.net. [73.67.244.238]) by smtp.gmail.com with ESMTPSA id ya6sm50704975pab.22.2016.08.08.16.03.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Aug 2016 16:03:53 -0700 (PDT) From: John Stultz To: lkml Subject: [RFC][PATCH 3/4] arm64: dts: hikey: Add hikey support for syscon-reboot-mode Date: Mon, 8 Aug 2016 16:03:45 -0700 Message-Id: <1470697426-16426-3-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470697426-16426-1-git-send-email-john.stultz@linaro.org> References: <1470697426-16426-1-git-send-email-john.stultz@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160808_160415_532239_F54FAEB0 X-CRM114-Status: GOOD ( 13.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Guodong Xu , Catalin Marinas , Will Deacon , Wei Xu , Bjorn Andersson , Rob Herring , John Stultz , Haojian Zhuang , Andy Yan , linux-arm-kernel@lists.infradead.org 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 Add support to hikey dts for the syscon-reboot-mode driver. After trying an approach using a sram driver and node, a number of issues cropped up which would make it so we would be duplicating a lot of extra syscon infrastructure in order to support mfds on sram. After talking with Bjorn, using the syscon driver for this seems like an better choice. Cc: Andy Yan Cc: Bjorn Andersson Cc: Haojian Zhuang Cc: Guodong Xu Cc: Wei Xu Cc: Rob Herring Cc: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org Signed-off-by: John Stultz Acked-by: Bjorn Andersson --- arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts index 8597e9b..b2683e4 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts @@ -29,6 +29,7 @@ * Reserve below regions from memory node: * * 0x05e0,0000 - 0x05ef,ffff: MCU firmware runtime using + * 0x05f0,1000 - 0x05f0,1fff: Reboot reason * 0x06df,f000 - 0x06df,ffff: Mailbox message data * 0x0740,f000 - 0x0740,ffff: MCU firmware section * 0x3e00,0000 - 0x3fff,ffff: OP-TEE @@ -36,11 +37,26 @@ memory@0 { device_type = "memory"; reg = <0x00000000 0x00000000 0x00000000 0x05e00000>, - <0x00000000 0x05f00000 0x00000000 0x00eff000>, + <0x00000000 0x05f00000 0x00000000 0x00001000>, + <0x00000000 0x05f02000 0x00000000 0x00efd000>, <0x00000000 0x06e00000 0x00000000 0x0060f000>, <0x00000000 0x07410000 0x00000000 0x36bf0000>; }; + reboot-mode-syscon@5f01000 { + compatible = "syscon", "simple-mfd"; + reg = <0x0 0x05f01000 0x0 0x00001000>; + + reboot-mode@0 { + compatible = "syscon-reboot-mode"; + offset = <0x0>; + + mode-normal = <0x77665501>; + mode-bootloader = <0x77665500>; + mode-recovery = <0x77665502>; + }; + }; + soc { spi0: spi@f7106000 { status = "ok";