Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp156816ybi; Fri, 24 May 2019 01:39:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEnzqGy7GQBcHD4q5DBAueuqifwRRQFxDAlGI27aIdc6F3XKAjPBVe7GquIxzjwryr3T/t X-Received: by 2002:a62:c4:: with SMTP id 187mr17231582pfa.55.1558687155148; Fri, 24 May 2019 01:39:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558687155; cv=none; d=google.com; s=arc-20160816; b=v/mLSxLGUEsXNLzIN5hmS1Og/UsSqQkpOOmyA/KNkiv39wCY6Vd9zTDAh+s5+IaB8c 8mhd6+69aFv4kIIARKqaxJkrl/TwbXINnEdbY5Q+KnqaLhW31WRY4x1Mhvg+4ZrJ3Hiq bSHrQmQ4l1O+cMJaC7gQHIfKB9pQ9hVTVHylH8G070XOZQ/Ik50p81Vh1NP7qCZZx0ee CnW1pjzvpMRg7Cu1YinTwfpm86zRWVOcZKEYFZ8FJdvPh0TgU0/j+kEvleY5dQBf9WlX RcO5tHKwm+6OLMHzVzanGgk7hPrgDXJtxhWwiDVuJgpB+pveN6Xb/72cnA+m/mNKXPyX VvTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Rc1gM+G3rldQoyBcoI4FwVT2mKPcHuNQ3J0XAqvXGp8=; b=Td3UfUGuP3pGOUam6HEbhFgu5I/lzMr3DHijLjb95iTF3nH/mGb4CgbJaMVYngZKGd T1GRo1OHK7l7bi87YmNgRj6ofLumf53NdtH1wi5AjC3wTpDFGBWbDZ9wg1+xXymS7rwI fz1q9KHMg1Pigr/i1APRyxLoIzm1Qe6L+bWLxURGMap5O3CM42y2e8ngeDgWI6dlaJcv tfjMjQ/OyYOORnW2ivxXnn0Vtss3jjvZInt/tXZdS2DtG5D6gN3H/hIQxEgAxR/x2Jfv 8FSbm21lII6JOeR8UXNmlfdYxtN3jQpY0Qxi1qO/U5ncjj6xeBDbiwEde+OJpNNyGj4Z xTGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@z3ntu.xyz header.s=z3ntu header.b=Ojaeizz5; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=z3ntu.xyz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7si2815380pgt.106.2019.05.24.01.38.55; Fri, 24 May 2019 01:39:15 -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=fail header.i=@z3ntu.xyz header.s=z3ntu header.b=Ojaeizz5; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389630AbfEXIfl (ORCPT + 99 others); Fri, 24 May 2019 04:35:41 -0400 Received: from mail.z3ntu.xyz ([128.199.32.197]:37286 "EHLO mail.z3ntu.xyz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389514AbfEXIfl (ORCPT ); Fri, 24 May 2019 04:35:41 -0400 Received: from g550jk.localnet (80-110-121-20.cgn.dynamic.surfer.at [80.110.121.20]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 6D2B1C1D14; Fri, 24 May 2019 08:35:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1558686937; bh=8QxbOGfJLKmBY8BnGjqJHLbP9D2w96jkIDyZThAA41g=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Ojaeizz5pLdCcF0xdLCfW2ni1k4DaVA/6/5fp3iYD4hTrR7fARGyYCfz5XnQRDoHI 7h/ZuL2OpPXI3J+LHDxh1JlHJgpGe2DJBb1PlzoBfqK8WFhvQ3wa5it0XQv1AD4S2X FKdfKRnUKtB9iNVgwby3tNXv0SssAzJNxWfoQYqE= From: Luca Weiss To: Maxime Ripard 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 Date: Fri, 24 May 2019 10:35:36 +0200 Message-ID: <4343071.IDWclfcoxo@g550jk> In-Reply-To: <20190521142544.ma2xfu77bamk4hvc@flea> References: <20190518170929.24789-1-luca@z3ntu.xyz> <20190521142544.ma2xfu77bamk4hvc@flea> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 = ; > > >> >> + 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. > > Maxime > > -- > Maxime Ripard, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com Hi Maxime, 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. Thanks for the feedback, Luca