Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp197588ybi; Fri, 24 May 2019 02:23:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZTf9OrHJhptGvob1rwyzmnl1FvvRfhKcEvz0O+8uLUIsZRF3GTxq+bhlkb85r/zxmVrzL X-Received: by 2002:a63:8b4b:: with SMTP id j72mr103514514pge.318.1558689792954; Fri, 24 May 2019 02:23:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558689792; cv=none; d=google.com; s=arc-20160816; b=EXwMRtmXRn9/EKrE9Ko0k13B/8VIa65uX3ASnVwXzfFcR16JGYKP55OBSRPVPWJhSx 9GEtVJP7Ofut9qoBVuO/C5LxbWAbygZcyGAOvKKZk5yD5FwMuayQmrWqR9x9XaA8DVGz fQ2Yx53CAvmbVFvKbPgVBxYXPllufUtxA4M21QPWk7uiT7saSGW+67JYKXAD4EzSR6cg fVAcy4KpqhouRilXhJ8I+BQZi0gDyCSSZ16H5pdaEHQ0m/xuhmwMMdeaQTviHeV79vMB nWtYLdqPlIJNuK8//EEFhwr2Kp++2kGnmVoZIVPQkOkp36f93MGhjuFNoodN3rTOQP9N No9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=PJl9QpqTGpKMayG4rVV8hqcfXMel4K/seXpLQMgt5jY=; b=mQKhskEvADYn3ojHGMq6/UymRzNFyzOG6LEorZ7GSEtDHznSSEfJKRcegVm0+LEAur XErgeBJAvhTyIWx628dzmD594JjTrGaRI98vfGHheIIPVQDFMns9crWy3lXNnxMDB7xi WW4i8qprTbRQRUk427O9b3GCNiFZnTjeN32rEKMezQWC7POvGN3WPtrwDn6DoigfWfYX IIkilGmscabBbEiiJYFlc89Y364bCjjyYJGDV1q7YQ9Pi4hRRbIGHQDkXtJg2XXTbfRx BxIPW1jKL9VgDl7SLalK5JdhrG+NZwi4fYKx5/wbz339vPsf8ks3gguKUBKwuZMwek3v 4M9Q== ARC-Authentication-Results: i=1; mx.google.com; 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 w207si3403118pff.69.2019.05.24.02.22.55; Fri, 24 May 2019 02:23:12 -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; 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 S2389886AbfEXJUO (ORCPT + 99 others); Fri, 24 May 2019 05:20:14 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:50543 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389710AbfEXJUN (ORCPT ); Fri, 24 May 2019 05:20:13 -0400 Received: from localhost (aaubervilliers-681-1-27-134.w90-88.abo.wanadoo.fr [90.88.147.134]) (Authenticated sender: maxime.ripard@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 37F45240016; Fri, 24 May 2019 09:20:01 +0000 (UTC) Date: Fri, 24 May 2019 11:20:01 +0200 From: Maxime Ripard To: Luca Weiss Cc: Chen-Yu Tsai , Rob Herring , Mark Rutland , "moderated list:ARM/Allwinner sunXi SoC support" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list Subject: Re: [PATCH] arm64: dts: allwinner: a64: Add lradc node Message-ID: <20190524092001.ztf3kntaj4uiswnv@flea> References: <20190518170929.24789-1-luca@z3ntu.xyz> <20190521142544.ma2xfu77bamk4hvc@flea> <4343071.IDWclfcoxo@g550jk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fjx5mpewtig2icgo" Content-Disposition: inline In-Reply-To: <4343071.IDWclfcoxo@g550jk> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --fjx5mpewtig2icgo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, May 24, 2019 at 10:35:36AM +0200, Luca Weiss wrote: > On Dienstag, 21. Mai 2019 16:25:44 CEST Maxime Ripard wrote: > > On Tue, May 21, 2019 at 03:52:47PM +0200, luca@z3ntu.xyz wrote: > > > On May 21, 2019 3:09:55 PM GMT+02:00, Maxime Ripard > wrote: > > > >On Tue, May 21, 2019 at 08:43:45AM +0200, luca@z3ntu.xyz wrote: > > > >> On May 20, 2019 1:07:42 PM GMT+02:00, Maxime Ripard > > > > > > > > wrote: > > > >> >On Sat, May 18, 2019 at 07:09:30PM +0200, Luca Weiss wrote: > > > >> >> Add a node describing the KEYADC on the A64. > > > >> >> > > > >> >> Signed-off-by: Luca Weiss > > > >> >> --- > > > >> >> > > > >> >> arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 7 +++++++ > > > >> >> 1 file changed, 7 insertions(+) > > > >> >> > > > >> >> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > > > >> > > > > >> >b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > > > >> > > > > >> >> index 7734f70e1057..dc1bf8c1afb5 100644 > > > >> >> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > > > >> >> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > > > >> >> @@ -704,6 +704,13 @@ > > > >> >> > > > >> >> status = "disabled"; > > > >> >> > > > >> >> }; > > > >> >> > > > >> >> + lradc: lradc@1c21800 { > > > >> >> + compatible = "allwinner,sun4i-a10-lradc- > keys"; > > > >> >> + reg = <0x01c21800 0x100>; > > > >> >> + interrupts = IRQ_TYPE_LEVEL_HIGH>; > > > >> >> + status = "disabled"; > > > >> >> + }; > > > >> >> + > > > >> > > > > >> >The controller is pretty different on the A64 compared to the A10. > > > > > > > >The > > > > > > > >> >A10 has two channels for example, while the A64 has only one. > > > >> > > > > >> >It looks like the one in the A83t though, so you can use that > > > >> >compatible instead. > > > >> > > > >> Looking at the patch for the A83t, the only difference is that it > > > >> uses a 3/4 instead of a 2/3 voltage divider, nothing is changed with > > > >> the channels. > > > > > > > >I guess you can reuse the A83t compatible here then, and a more > > > >specific a64 compatible in case we ever need to fix this. > > > > > > > >> But I'm also not sure which one (or a different one) > > > >> is used from looking at the "A64 User Manual". > > > > > > > >I'm sorry, what are you referring to with "one" in that sentence? > > > > > > Sorry, I meant I didn't find anything in the A64 user manual whether > > > a 3/4 or a 2/3 voltage divider (or one with different values) is > > > used on the A64. > > > > Ok :) > > > > I guess you can just reuse the A83t compatible then, together with the > > A64's. > > I'd submit a v2 with these changes to v1 then: > lradc: lradc@1c21800 { > - compatible = "allwinner,sun4i-a10-lradc-keys"; > - reg = <0x01c21800 0x100>; > + compatible = "allwinner,sun50i-a64-lradc-keys", > + "allwinner,sun8i-a83t-r-lradc"; > + reg = <0x01c21800 0x400>; > interrupts = ; > status = "disabled"; > }; > Does that look okay? > The reg change is due to me not spotting the address being 0x01C2 > 1800---0x01C2 1BFF, so the size should be 0x400 and not 0x100. It would be great to drop the -keys from the compatible, and to document the bindings Looks good otherwise Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --fjx5mpewtig2icgo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXOe3QQAKCRDj7w1vZxhR xWfqAQDx49qWsSlXSPCIFr0j7LgzCl6/USKYCbeA7Gmm78/oGgEA7OyIV/rpYtNc ksrLp0izVlRyo3tYAqHBk8DXRXEeoAw= =xKwX -----END PGP SIGNATURE----- --fjx5mpewtig2icgo--