Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp22126ybi; Thu, 20 Jun 2019 17:01:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5WahV9RgnpF39TfRuB/kKnA1Cia35R/E8wZMrZjRMxT0ftAYlfD9TnNrc0GQCymLyXXuH X-Received: by 2002:a17:902:9897:: with SMTP id s23mr60142684plp.47.1561075313527; Thu, 20 Jun 2019 17:01:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561075313; cv=none; d=google.com; s=arc-20160816; b=PLqqLVNTkYMlsiTuf7ib3Meem/Dixz+uMpvFE7C9ZPNZDH90WAaxc3tWDevuEDwcej 1hRt4URA8iAdYiG/UQbEHIdX0uApIC73NmIJiPIYyjYSO6GdFRdn/pZqIzt9k1kwwgZf /grH6bEG5t1nvVdre52wQSVwWeFNCyjtY3wjSODTg2DJdgN9orsk+LPsRDJfL0p8gFSK 6bgl5yQtyvfxjPCSXXN6iHaKftv/YYP8pwWPRNPSzoNRaZ8LEMs1ENnmFeUqvqiKoIMl /dMZ4BT5SODAIZnYxL5LSRa71DlZKpvrst4eYCquxw+1Jrn2TftxFW65fZurd5m5WWmS jMeQ== 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=cdDlpKMr4zKTkgxoJaUOz3T2yNANviQiwrab0fVWhwA=; b=Wg89nksNV1QrFYOcWuS4Xtzu8d9BfftYYEi1GIsN7YKblbm0kizZRk8MqjKT+2Smbu w+zV28J6CslVEaAzmsZZO9Qbo3OnCvfPkVLGTC34ATHxwhcm+cuH0SDJcQzKhIiPC3go CNS+/L6iV4MH+xnMz/V0J0x22mAh7COCaoa14we7yaiGzZ9cAGeYQx6fyynV8bvzlbj7 BLXJ031AzPius2T7FRGqj4hy0R7awUW1e7ZFmFERwqybUTB5bwAXGrUHD/Fvp8uXi1Za Bq1ep3JTQu/sWzB9v+Vi0ynuKxKH2XFIRpblMs/wUoiUnCMk0KAKzRXkMArn7E6mlkZp VhKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@onstation.org header.s=default header.b=BP3OdbcJ; 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 m99si378665pjb.107.2019.06.20.17.01.36; Thu, 20 Jun 2019 17:01:53 -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=BP3OdbcJ; 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 S1726070AbfFUABY (ORCPT + 99 others); Thu, 20 Jun 2019 20:01:24 -0400 Received: from onstation.org ([52.200.56.107]:55740 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725905AbfFUABY (ORCPT ); Thu, 20 Jun 2019 20:01:24 -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 2D4FF3E9C9; Fri, 21 Jun 2019 00:01:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=onstation.org; s=default; t=1561075283; bh=HioIi7Zf7bcx4llI3gAto23W8JISs2Ta/a56m7blXz4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BP3OdbcJGD+jb7E8+lWiz2jM+4ibZUxFoxLdp4sRCI0wGnSCcqct8+ty1wllF9cLA afsAtwvbjHeXUoVFvnj1gNdPezng2V4QEJv3ENLuzqX+zXYcWqudBhCLXMdv9joLJh rXgX30CVhXMvIucRCGNz4/qsLxSCo7wVQIUV89U0= Date: Thu, 20 Jun 2019 20:01:22 -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: <20190621000122.GA13036@onstation.org> References: <20190620225824.2845-1-luca@z3ntu.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190620225824.2845-1-luca@z3ntu.xyz> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Luca, On Fri, Jun 21, 2019 at 12:58:24AM +0200, Luca Weiss wrote: > This enables userspace to signal the bootloader to go into the > bootloader or recovery mode. > > The magic values can be found in both the downstream kernel and the LK > kernel (bootloader). > > Signed-off-by: Luca Weiss > --- > Sidenote: Why are there no userspace tools to be found that support > this? Anyways, we have one now in postmarketOS :) > > arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts b/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts > index 643c57f84818..f86736a6d77e 100644 > --- a/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts > +++ b/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts > @@ -338,6 +338,20 @@ > }; > }; > }; > + > + imem@fe805000 { > + compatible = "syscon", "simple-mfd"; > + reg = <0xfe805000 0x1000>; > + > + reboot-mode { > + compatible = "syscon-reboot-mode"; > + offset = <0x65c>; > + > + mode-normal = <0x77665501>; > + mode-bootloader = <0x77665500>; > + mode-recovery = <0x77665502>; > + }; > + }; > }; 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"; }; What's the pmOS utility that utilizes this? I'll test it on the Nexus 5. Thanks, Brian