From patchwork Wed Jan 27 00:38:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 60551 Delivered-To: patches@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2289497lbb; Tue, 26 Jan 2016 16:38:11 -0800 (PST) X-Received: by 10.98.69.155 with SMTP id n27mr5647181pfi.68.1453855087646; Tue, 26 Jan 2016 16:38:07 -0800 (PST) Return-Path: Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com. [2607:f8b0:400e:c03::22d]) by mx.google.com with ESMTPS id la16si5298127pab.64.2016.01.26.16.38.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jan 2016 16:38:07 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c03::22d as permitted sender) client-ip=2607:f8b0:400e:c03::22d; Authentication-Results: mx.google.com; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c03::22d as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dkim=pass header.i=@linaro.org Received: by mail-pa0-x22d.google.com with SMTP id ho8so105886236pac.2 for ; Tue, 26 Jan 2016 16:38:07 -0800 (PST) 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 :mime-version:content-type:content-transfer-encoding; bh=YkovLYDDAePQzbvKq/aQp13+O25Iu9acfwwXjzVQc+k=; b=FKxcsd9sJLGIx22sbWADEsGs/EiYycsNvaM3nEOTuYQ8LfU4QD8Ajsul2EHpoULMOE 3rJtWAn81qvTlVm6OrJx3u9+zKA0RDPq2+mGjRzy57Q734SeshhDnZZWEhdOqhYMwtZE Td2tk2QctEvJ9laqOPgOkXww6olrqYzPwZ2ww= 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:mime-version:content-type:content-transfer-encoding; bh=YkovLYDDAePQzbvKq/aQp13+O25Iu9acfwwXjzVQc+k=; b=a/guzpQh0mKX5v8z9UD040uHle6isOrWp+N/74xV9nrfOfvYOsIWE+9OYCmc+PxALu EwJ6rgoQEcOBPvN1bHj8xetzXrOrYN4xa8ygpqH3F520i2qg8LB8Qvb8+df8DY1ZeHwf ENpudvJfSJPKCzHoPcL8V1LFmUIGJzk3+XrJ7PNgcQo+h0fKmVDymUNzvS6LQA58xDez egYCwD/3DHCugDLB4xpc+aXUu65t8W3LoQ7JQY6sdAx02c4+5N+Ig7rUWHorSu8YOZm3 YBS5MtDypNTAGcPxkVSwlDkKEnHMV0T06/1JCS+7ZpLDNxGK6qKZMDcKlfAgTsZ6FQ5a LyYg== X-Gm-Message-State: AG10YOTy1Ti2h35+8QnLyRLGjBnqHwkA/qFt4BW+HvnAkCdTDlyWA5ybcfowDypjtKm+HmZNEDo= X-Received: by 10.67.7.3 with SMTP id cy3mr38505289pad.100.1453855087277; Tue, 26 Jan 2016 16:38:07 -0800 (PST) Return-Path: Received: from localhost.localdomain (c-76-115-103-22.hsd1.or.comcast.net. [76.115.103.22]) by smtp.gmail.com with ESMTPSA id c86sm4321091pfd.75.2016.01.26.16.38.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Jan 2016 16:38:06 -0800 (PST) From: John Stultz To: lkml Cc: John Stultz , Andy Yan , Rob Herring , Arnd Bergmann , Thierry Reding , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Caesar Wang , Kees Cook , Guodong Xu , Haojian Zhuang , Vishal Bhoj , Bjorn Andersson , devicetree@vger.kernel.org, Android Kernel Team Subject: [RFC][PATCH 3/3] dts: hikey: Add hikey support for sram-reboot-mode Date: Tue, 26 Jan 2016 16:38:00 -0800 Message-Id: <1453855080-17760-4-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1453855080-17760-1-git-send-email-john.stultz@linaro.org> References: <1453855080-17760-1-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 Add support to hikey dts and defconfig for the sram-reboot-mode driver. The dts entries added here should really be generated by the UEFI firmware, and not be static in the dts, since one may be using different firmware on HiKey. But this patch provides an example of how the sram-reboot-mode entry would otherwise look. Cc: Andy Yan Cc: Rob Herring Cc: Arnd Bergmann Cc: Thierry Reding Cc: Heiko Stübner Cc: Caesar Wang Cc: Kees Cook Cc: Guodong Xu Cc: Haojian Zhuang Cc: Vishal Bhoj Cc: Bjorn Andersson Cc: devicetree@vger.kernel.org Cc: Android Kernel Team Signed-off-by: John Stultz --- arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 36 ++++++++++++++++++++++++++ arch/arm64/configs/hikey_defconfig | 3 +++ 2 files changed, 39 insertions(+) -- 1.9.1 diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts index 92f1704..67d12d0 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts @@ -52,6 +52,11 @@ <0x0 0x0740f000 0x0 0x00001000>; /* MCU firmware section */ }; + reboot-reason@05f01000 { + no-map; + reg = <0x0 0x05f01000 0x0 0x00001000>; + }; + mbox-buf@06dff000 { no-map; reg = <0x0 0x06dff000 0x0 0x00001000>; /* Mailbox message buf */ @@ -71,6 +76,37 @@ ftrace-size = <0x0 0x00020000>; }; + + /* This entry should really be provided by the UEFI firmware */ + sram@5f01000 { + compatible = "mmio-sram", "simple-bus"; + reg = <0x0 0x05f01000 0x0 0x00001000>; + ranges = <0x0 0x0 0x05f01000 0x00001000>; + + #address-cells = <1>; + #size-cells = <1>; + + reboot-mode@0 { + compatible = "sram-reboot-mode"; + reg = <0x0 0x4>; + + none { + linux,mode = "none"; + loader,magic = <0x77665501>; + }; + + bootloader { + linux,mode = "bootloader"; + loader,magic = <0x77665500>; + }; + + recovery { + linux,mode = "recovery"; + loader,magic = <0x77665502>; + }; + }; + }; + smb { uart0: uart@f8015000 { /* console */ status = "ok"; diff --git a/arch/arm64/configs/hikey_defconfig b/arch/arm64/configs/hikey_defconfig index a8375aa..e9db588 100644 --- a/arch/arm64/configs/hikey_defconfig +++ b/arch/arm64/configs/hikey_defconfig @@ -201,6 +201,7 @@ CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=16384 CONFIG_VIRTIO_BLK=y +CONFIG_SRAM=y CONFIG_TI_ST=y CONFIG_ST_HCI=y # CONFIG_SCSI_PROC_FS is not set @@ -266,6 +267,8 @@ CONFIG_SPI_PL022=y CONFIG_GPIO_SYSFS=y CONFIG_GPIO_XGENE=y CONFIG_POWER_RESET_SYSCON=y +CONFIG_SYSCON_REBOOT_MODE=y +CONFIG_SRAM_REBOOT_MODE=y CONFIG_THERMAL=y CONFIG_THERMAL_WRITABLE_TRIPS=y CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y