Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1303167ybi; Fri, 21 Jun 2019 18:43:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDqnZVObyFI5dQKDQaP5WyebWHjsvQ7fxaeKOF4/2gSQxJKMk3Z3bxFmUgCuQPoLk39Abm X-Received: by 2002:a17:902:363:: with SMTP id 90mr48146814pld.340.1561167815359; Fri, 21 Jun 2019 18:43:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561167815; cv=none; d=google.com; s=arc-20160816; b=Yg+D2AQTS7yzkgC2aGO7csVnBYPMQV/qPXWUyP5nGtShUJZSbTeI5RLjwp5e7GEgv4 X8ZRVhHQvpC0Yk0MQ/kpbGwta/aVK86iKYmIKhWWKe2iViEMjxOVv+UPzA6v5AOsVwUS R/Wbz2JFLXAjLLc6n1tuTSM/4xmA/nGTM+sexg8eLLbtHZVDYeYa78YRYT/u+i5MhGFO DRs0KCgi3qC3YIm+BAXfQ/QxNr2vwI19+/UqR2Dqc2nk6hB6mgQmQYLmsJPtun+axfgP 0B4B9qCOG9TVKc32/brmdQQDPkUtTiqnMIrDOCTn/rOdl6cCpUKxFTL5dhO+k816LEe2 oLnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=T3r+KxdA11GZjDF6tkn09aSq75Bqij6zoELE6Ppx7Is=; b=I5LD7RDFpcmuYAebj573gk9eBiqL9gICwcuhUhV7U5v8i4N/g1ytOPb28FbTZNa5AS /cQJR44fmgPT0VydG/X6bNgNA9OgSXUOhNLVMhYvEyZys1aFxWsiAK9unt0y3gOZifFh zodzl38WMeB8VTc9GJdBZ7fGVk+fqSd0NCkv0JvV2ioskopbYOyJfmgPieCar4O7lRKt ggY1kd8uPY2nFrZMHS7Tzt20vI+YA4NDYQuZ8gzPND6aVFnGqVY8LElcDpdiwhz/VnBK F643pcJQKN9edhbwx62L6Eov8qoIOKHoaPgbcOSrmQLSC485EdVBPhE1F0/wn5FOhCHR sRdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@onstation.org header.s=default header.b=L7yPW+eo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si4071788pld.265.2019.06.21.18.43.07; Fri, 21 Jun 2019 18:43:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@onstation.org header.s=default header.b=L7yPW+eo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726148AbfFVBnE (ORCPT + 99 others); Fri, 21 Jun 2019 21:43:04 -0400 Received: from onstation.org ([52.200.56.107]:32872 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726083AbfFVBnE (ORCPT ); Fri, 21 Jun 2019 21:43:04 -0400 Received: from localhost (c-98-239-145-235.hsd1.wv.comcast.net [98.239.145.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id 3E58D3E9C9; Sat, 22 Jun 2019 01:43:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=onstation.org; s=default; t=1561167783; bh=IzpR3342Zo9qt7/5FY4YZ3EhlrbdqIdBDC4xYGEgV/o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=L7yPW+eol25pVIHxkWQyPNS4TRH6ITU3pzqmxKec/mnVuMtC19eJTijdX55303oHj aoKQBSmVKw0/SXQkYhSaWobhcMwFTuEIufBrUlpplgcFjk+JBWL7HoSjXGNZ7vFQzK xcFCjvFcaK4RdaZCa837DJQ1UqkoeYmp9/+PlXa0= Date: Fri, 21 Jun 2019 21:43:02 -0400 From: Brian Masney To: Luca Weiss Cc: linux-arm-msm@vger.kernel.org, ~martijnbraam/pmos-upstream@lists.sr.ht, Andy Gross , David Brown , Rob Herring , Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: dts: msm8974-FP2: add reboot-mode node Message-ID: <20190622014302.GA20947@onstation.org> References: <20190620225824.2845-1-luca@z3ntu.xyz> <20190621000122.GA13036@onstation.org> <4607058.UzJteFJyig@g550jk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4607058.UzJteFJyig@g550jk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 21, 2019 at 09:25:17PM +0200, Luca Weiss wrote: > On Freitag, 21. Juni 2019 02:01:22 CEST you wrote: > > I think that it makes sense to put this snippet in qcom-msm8974.dtsi > > with a status of disabled, and then enable it in > > qcom-msm8974-fairphone-fp2.dts like so: > > > > imem@fe805000 { > > status = "ok"; > > }; > > Do you want me to put the whole node in the the dtsi file? Even though these > values are the same, there are also custom vendor-specified values for specific > phones. mach-msm in the downstream hammerhead sources has those addresses: https://github.com/AICP/kernel_lge_hammerhead/blob/n7.1/arch/arm/mach-msm/restart.c#L271 This lead me to think that it applies to other msm8974-based systems as well. I tried your device tree snippet on the Nexus 5 and it reboots the phone for me. / # ./reboot-mode normal [ 85.088556] reboot: Restarting system with command 'normal' The recovery and bootloader modes reboot the phone but into normal mode. Oddly, the bootloader shows different power on reasons after the "welcome to hammerhead bootloader" message. normal = [10] Power on reason 20001 recovery = [10] Power on reason 1 bootloader = [10] Power on reason 20001 > On the Linux kernel side, it has bootloader (0x77665500), recovery > (0x77665502), rtc (0x77665503), oem-* (0x6f656d00 | somevalue), edl (some > other addresses), and the else statements writes the 0x77665501 value in my > patch. The downstream hammerhead sources have the oem-*, and emergency download modes (edl) listed as well. I'm not sure on your other questions. Brian