From patchwork Mon Aug 22 22:48:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 9294505 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 8D856607F0 for ; Mon, 22 Aug 2016 22:50:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BAC228AD1 for ; Mon, 22 Aug 2016 22:50:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FBBC28AD7; Mon, 22 Aug 2016 22:50:44 +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=ham 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 2043928AD1 for ; Mon, 22 Aug 2016 22:50:44 +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 1bby1m-0006Vk-69; Mon, 22 Aug 2016 22:49:10 +0000 Received: from mail-pf0-x233.google.com ([2607:f8b0:400e:c00::233]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bby1D-0006JQ-W4 for linux-arm-kernel@lists.infradead.org; Mon, 22 Aug 2016 22:48:37 +0000 Received: by mail-pf0-x233.google.com with SMTP id h186so36497472pfg.3 for ; Mon, 22 Aug 2016 15:48:15 -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=ijP4PWTS8QKz+u5ASQt8AIvtxrpaGVwLsNeUBuXhIR0=; b=UwhpjjDaVIVq63F8Jhw2OItkpkycMUfpqESisqFa1dLJCCuHw7kzgMTdxcjfkU3XYJ icJVFt/zMRXbv+9xheUmvyG7YrNr+3x/6G0hiPRB4+tjCwolGz9NlKzUdcr9T6rdVI3b F8GYsgQJbczztNqF04ab0SL8cXsRhK6vHjL8Y= 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=ijP4PWTS8QKz+u5ASQt8AIvtxrpaGVwLsNeUBuXhIR0=; b=kHQtj0+3CUHBD6YzGQPh9ySOAjSSz9ZorBtlgEr5QQw3h7P3SUSzaanKBY8fIJOuWc gmRfy4fz1p+DPHM3ittqLbuHm40wyhhwPGWw98yJXpX6+FY/kXv9jou5QAQ3uuZmsxrP RUjdG+NBYx+N3bBqnWUo81BAyVgpV7h0yO7DPFgbBKCnm5qixr+XBDeNwzfLZ9nlk6ZP KcJNVKv6am0gSyZKhjYkO+oBc7rGXt+n5KNW9VQIdupMktsRQb+EpfKHCOVPqAe2smDm oxdQpTogc8orbi79frUwT+dg0EfXPDbI5aRbdhlQqMAAS/ArnHS30rUlpBgajqi/9TvJ 6VRg== X-Gm-Message-State: AEkoous5HM9xPhXSnU47mCdYDN5rcfuu0KBd1fpKjdzVgXLU8wCvkI3Q33SZ9Mv6vyBnXYJd X-Received: by 10.98.56.207 with SMTP id f198mr47121876pfa.83.1471906094711; Mon, 22 Aug 2016 15:48:14 -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 uc1sm189946pac.24.2016.08.22.15.48.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Aug 2016 15:48:14 -0700 (PDT) From: John Stultz To: lkml Subject: [PATCH 3/4] arm64: dts: hikey: Add hikey support for syscon-reboot-mode Date: Mon, 22 Aug 2016 15:48:04 -0700 Message-Id: <1471906085-16682-3-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1471906085-16682-1-git-send-email-john.stultz@linaro.org> References: <1471906085-16682-1-git-send-email-john.stultz@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160822_154836_088233_E0B09F48 X-CRM114-Status: GOOD ( 13.16 ) 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 Acked-by: Bjorn Andersson Signed-off-by: John Stultz --- 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..4492a15 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 { + compatible = "syscon-reboot-mode"; + offset = <0x0>; + + mode-normal = <0x77665501>; + mode-bootloader = <0x77665500>; + mode-recovery = <0x77665502>; + }; + }; + soc { spi0: spi@f7106000 { status = "ok";