Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4924071ybl; Mon, 9 Dec 2019 19:58:31 -0800 (PST) X-Google-Smtp-Source: APXvYqx+Q0OaZnNddUSqmTbZz+0q/ZOi16Y89fq7T3X3idIsixiFvSzpqmuTK0YZTN+BnygDz65x X-Received: by 2002:aca:df07:: with SMTP id w7mr2329213oig.145.1575950311216; Mon, 09 Dec 2019 19:58:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575950311; cv=none; d=google.com; s=arc-20160816; b=N8DTVfZB8PRAX2aLtyYnjksuc1b3c6tUNlH5/WXBNPw4DdMtT/ZwFP2cEB7veNOwY8 LzOj9ASaM6rxEFfs9Zh0vV+ZwkI+/kVRq4FG4GmVK4mzyszPwCNZ9gedkFKHbz5Hpv5Z 3hEcKNriJiUSok/m3WW5WlTemjhkxwwqmySHMS1I8vDD8cD7mKxt2kQze72JyAi19L/v f5n8Jm5QMjxrhRyPxxY7/l6W5/cmLQAUG9StLSojgxVvjMbwCzef4GtpcLuc5GTWPZzy 0mMJiM1d09RRPp+Bawm4F7aEGGNfMVHPcbilm8AGRHjM6TKcSwQ6PWjsHS5cjK1GtGlA LEzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=3KXToAJmJZ0dICjwRwgmRbT8wxHXosOdiKQqviLYDt4=; b=I/RhWTw5+X3r6vn7YxtVqI5GsNehUGcwaZ1wSVrkdYGCnt+FUJs6+rKYN7ZDOYSE/b rsNzJEj90xxybUTAqpDwzgZRShNrf7bKsxWmV2/PVXPW+HlM0YOTeMTx46wEeBXrERPb Nm8GfoJIJRBfIASiJqhy0eBJ6dT2e6V2EZkFWs0UNO2wnGzmZsZ465q27pCE4T5BYD6j 8EovBtODrp8Di1OPkwBVGJxhypDS5WJ/bIW4+o5et6GT2tw3gF7J24tN7xbXOVwTZuiR GU5ecLBFIqoPdv/BZRjWijV7OzNYYMG+D7TMlYGbCiARtvWcgjPtAHL4a3tKwCFJnEh3 0B3g== 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 t130si1305316oib.202.2019.12.09.19.58.18; Mon, 09 Dec 2019 19:58:31 -0800 (PST) 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 S1727107AbfLJD5L (ORCPT + 99 others); Mon, 9 Dec 2019 22:57:11 -0500 Received: from mail-sz.amlogic.com ([211.162.65.117]:38470 "EHLO mail-sz.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726619AbfLJD5J (ORCPT ); Mon, 9 Dec 2019 22:57:09 -0500 Received: from [10.28.19.135] (10.28.19.135) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1591.10; Tue, 10 Dec 2019 11:57:40 +0800 Subject: Re: [PATCH] arm64: dts: a1: add saradc controller To: Kevin Hilman , Neil Armstrong , Martin Blumenstingl CC: Rob Herring , Jonathan Cameron , Jerome Brunet , Qianggui Song , Jianxin Pan , Jian Hu , , , , , References: <1575358332-44866-1-git-send-email-xingyu.chen@amlogic.com> <7hpngxqfa7.fsf@baylibre.com> From: Xingyu Chen Message-ID: <9a2ddfa3-28f3-7d15-bb25-5b84078b77c7@amlogic.com> Date: Tue, 10 Dec 2019 11:57:39 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <7hpngxqfa7.fsf@baylibre.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-Originating-IP: [10.28.19.135] X-ClientProxiedBy: mail-sz.amlogic.com (10.28.11.5) To mail-sz.amlogic.com (10.28.11.5) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Kevin On 2019/12/10 6:56, Kevin Hilman wrote: > Xingyu Chen writes: > >> The saradc controller in Meson-A1 is the same as the Meson-G12 series SoCs, >> so we use the same compatible string. >> >> Signed-off-by: Xingyu Chen >> >> --- >> This patch is based on A1 clock patchset at [0]. >> >> [0] https://lore.kernel.org/linux-amlogic/20191129144605.182774-1-jian.hu@amlogic.com >> --- >> arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 15 +++++++++++++++ >> 1 file changed, 15 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi >> index 7210ad0..cad1756 100644 >> --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi >> +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi >> @@ -93,6 +93,21 @@ >> clock-names = "xtal", "pclk", "baud"; >> status = "disabled"; >> }; >> + >> + saradc: adc@2c00 { >> + compatible = "amlogic,meson-g12a-saradc", >> + "amlogic,meson-saradc"; >> + reg = <0x0 0x2c00 0x0 0x48>; > Why 0x48 here? AXG uses 0x38 and you're not adding any more registers > to this driver. Thanks for you review. The saradc introduces 4 new registers (as shown below) begin with g12a platform, and these registers are used to save the sampling value of corresponding channel. In other words, we can choose fifo or new registers to save sampling value, but it is not supported by the current driver. dout register  |---> fifo                          |---> channel regs -|                                                            |--- channel-0                                                            |--- channel-1                                                            | ...                                                            | --- channel-7 AO_SAR_ADC_CHNL01:saving sampling data of channel 0/1 AO_SAR_ADC_CHNL23:   saving sampling data of channel 2/3 AO_SAR_ADC_CHNL45:   saving sampling data of channel 4/5 AO_SAR_ADC_CHNL67:   saving sampling data of channel 6/7 This patch use the 0x48 to describe the registers length just follow the file meson-g12-common.dtsi. and it doesn't affect the driver because of the mapped regiter length is limited by max_register member in struct regmap_config. I can replace 0x48 with 0x38 in next patch if necessary. > Kevin > > . >