Message ID | 20231127235558.71995-1-gnstark@salutedevices.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3555578vqx; Mon, 27 Nov 2023 15:56:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAKJ+Zo0l/S4Pu4p9pc3abht1/l2bmFRkxyVGexh8m7cmY+3N1qBcg3lzdKWSbs06WBB9w X-Received: by 2002:a05:6a00:3989:b0:693:3d55:2bb3 with SMTP id fi9-20020a056a00398900b006933d552bb3mr13739393pfb.26.1701129395914; Mon, 27 Nov 2023 15:56:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701129395; cv=none; d=google.com; s=arc-20160816; b=ABNS5YGeyHbbihv1MOVjKLZEYJSRfBfMoprY/KzhVbE/SY0r6YMiaoUFBorZXWUj+H FzBhwsX8Oo6leymyOuA7f8dOoBa71iZ9MiwKsg8kh95dk2f4HUnlPv5AhFx6apUXLkEw 8EE/m9APgjfWaNWklHXI84KQ9f/R4585Q1ZXPXSslxrB5WwhMDxfWngcqQAUlU/iz3gF 8aFNhb4rEUvQNmE23noSa4dKAsNVwF6tCVuN9FLmBgHHrOmgY3F7UBMDChLgwx8DvZS7 0hp6P/6u+eKcqKRMxjdRNJaftce4Mm+GMvqlqsqdKIThccMV/1A6DOumvqyw8DZJRQDX kO7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=CJtUvORyiS7SGX4uAfp8J1IHEbYRh5RzK5Kl1l27Yd8=; fh=oy3NHOEhWYKVpFhV1NNuwn5V55AWpupNTNwRor5xLNc=; b=cW22qcWuz68SWl2AnHexIkSgTDArrM9yEUng/widjG/lnoqcMdJtHGcXYPd9KCVFap B2mZfFpkmy1vE62JX0PKRpgDdIw9U0CGaptUhkE3l/3VusnegrEOk9RqKdTN2VLUMwXV c61vCjroECvdRYAsa+8+c6DHTeroulNIThOJ1Gy/HS2xM1M3iMUUOLgeg7nC8cw83yx+ oaVI0GSZvk2hx12Iw/k0NIEOtnohpFJfiwXToLHtuU0LtUoPNIUGFg8THxV5Pg4UkhoQ rMwkzuXkBJYprtQjuGvveIvWmJfcRjEITH7xVBoon008VodeuP9IlNNbM7dn2wQKvYO+ /OCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=UK7vCiWo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id t5-20020a056a0021c500b006cd88a2426fsi4125285pfj.157.2023.11.27.15.56.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 15:56:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=UK7vCiWo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 98164806AA1E; Mon, 27 Nov 2023 15:56:33 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233933AbjK0X4I (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Mon, 27 Nov 2023 18:56:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233841AbjK0X4G (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 27 Nov 2023 18:56:06 -0500 Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02593E4; Mon, 27 Nov 2023 15:56:09 -0800 (PST) Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id DDD26120015; Tue, 28 Nov 2023 02:56:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru DDD26120015 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1701129366; bh=CJtUvORyiS7SGX4uAfp8J1IHEbYRh5RzK5Kl1l27Yd8=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=UK7vCiWoyNz2a19lk9i/BpUUH9gFRhIb0HaKI+xnW8LrOqhU+fohNsLI4bkJ7JYJM W+3Lcm1a/1ovHOhPFaBlNiRQg/PvGLbW0YwmvE7AmvRXvlGNrc1VzuogNJ6GzwLc+0 5B7dA4Cb+FH2CtTKczK7pwEcTJUrAyBoF19gfRV+CEQCIck3XDXtYrhrXXQ3Oh4uQC 86XTLEl1o1bMv+KxlYJiL6Kyzaa2afvTS+iLhgz1QwCOfjHIXVV9HRrkacf9B/axF2 oPYZ9qK0djKPiLv66XlGNtyw7s8EW/q8jo9nF5WYDlorKzxwbUPQeMtwbDn13eTVR1 W6t+oFsU5LaQQ== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Tue, 28 Nov 2023 02:56:06 +0300 (MSK) Received: from localhost.localdomain (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 28 Nov 2023 02:56:06 +0300 From: George Stark <gnstark@salutedevices.com> To: <jic23@kernel.org>, <lars@metafoo.de>, <neil.armstrong@linaro.org>, <khilman@baylibre.com>, <jbrunet@baylibre.com>, <martin.blumenstingl@googlemail.com>, <andriy.shevchenko@linux.intel.com>, <nuno.sa@analog.com>, <u.kleine-koenig@pengutronix.de>, <gnstark@salutedevices.com> CC: <linux-iio@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <linux-amlogic@lists.infradead.org>, <kernel@salutedevices.com> Subject: [PATCH v3 1/1] iio: adc: meson: add separate config for axg SoC family Date: Tue, 28 Nov 2023 02:55:58 +0300 Message-ID: <20231127235558.71995-1-gnstark@salutedevices.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 181630 [Nov 27 2023] X-KSMG-AntiSpam-Version: 6.0.0.2 X-KSMG-AntiSpam-Envelope-From: gnstark@salutedevices.com X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 5 0.3.5 98d108ddd984cca1d7e65e595eac546a62b0144b, {Tracking_from_domain_doesnt_match_to}, d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;100.64.160.123:7.1.2;127.0.0.199:7.1.2;salutedevices.com:7.1.1;p-i-exch-sc-m01.sberdevices.ru:7.1.1,5.0.1, FromAlignment: s, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2023/11/27 21:09:00 #22555279 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 27 Nov 2023 15:56:33 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783249546164360873 X-GMAIL-MSGID: 1783763457262833574 |
Series |
[v3,1/1] iio: adc: meson: add separate config for axg SoC family
|
|
Commit Message
George Stark
Nov. 27, 2023, 11:55 p.m. UTC
According to Amlogic custom kernels ADC of axg SoC family has vref_select and requires this setting to work nominally and thus needs a separate config. Fixes: 90c6241860bf ("iio: adc: meson: init voltage control bits") Signed-off-by: George Stark <gnstark@salutedevices.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> --- drivers/iio/adc/meson_saradc.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
Comments
On Tue, 28 Nov 2023 02:55:58 +0300 George Stark <gnstark@salutedevices.com> wrote: > According to Amlogic custom kernels ADC of axg SoC family has > vref_select and requires this setting to work nominally and thus > needs a separate config. > > Fixes: 90c6241860bf ("iio: adc: meson: init voltage control bits") > Signed-off-by: George Stark <gnstark@salutedevices.com> > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Applied to the fixes-togreg branch of iio.git and marked for stable. Thanks, jonathan > --- > drivers/iio/adc/meson_saradc.c | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c > index db280da9edbf..34555a85f131 100644 > --- a/drivers/iio/adc/meson_saradc.c > +++ b/drivers/iio/adc/meson_saradc.c > @@ -1242,6 +1242,20 @@ static const struct meson_sar_adc_param meson_sar_adc_gxl_param = { > .cmv_select = 1, > }; > > +static const struct meson_sar_adc_param meson_sar_adc_axg_param = { > + .has_bl30_integration = true, > + .clock_rate = 1200000, > + .bandgap_reg = MESON_SAR_ADC_REG11, > + .regmap_config = &meson_sar_adc_regmap_config_gxbb, > + .resolution = 12, > + .disable_ring_counter = 1, > + .has_reg11 = true, > + .vref_volatge = 1, > + .has_vref_select = true, > + .vref_select = VREF_VDDA, > + .cmv_select = 1, > +}; > + > static const struct meson_sar_adc_param meson_sar_adc_g12a_param = { > .has_bl30_integration = false, > .clock_rate = 1200000, > @@ -1286,7 +1300,7 @@ static const struct meson_sar_adc_data meson_sar_adc_gxm_data = { > }; > > static const struct meson_sar_adc_data meson_sar_adc_axg_data = { > - .param = &meson_sar_adc_gxl_param, > + .param = &meson_sar_adc_axg_param, > .name = "meson-axg-saradc", > }; >
diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c index db280da9edbf..34555a85f131 100644 --- a/drivers/iio/adc/meson_saradc.c +++ b/drivers/iio/adc/meson_saradc.c @@ -1242,6 +1242,20 @@ static const struct meson_sar_adc_param meson_sar_adc_gxl_param = { .cmv_select = 1, }; +static const struct meson_sar_adc_param meson_sar_adc_axg_param = { + .has_bl30_integration = true, + .clock_rate = 1200000, + .bandgap_reg = MESON_SAR_ADC_REG11, + .regmap_config = &meson_sar_adc_regmap_config_gxbb, + .resolution = 12, + .disable_ring_counter = 1, + .has_reg11 = true, + .vref_volatge = 1, + .has_vref_select = true, + .vref_select = VREF_VDDA, + .cmv_select = 1, +}; + static const struct meson_sar_adc_param meson_sar_adc_g12a_param = { .has_bl30_integration = false, .clock_rate = 1200000, @@ -1286,7 +1300,7 @@ static const struct meson_sar_adc_data meson_sar_adc_gxm_data = { }; static const struct meson_sar_adc_data meson_sar_adc_axg_data = { - .param = &meson_sar_adc_gxl_param, + .param = &meson_sar_adc_axg_param, .name = "meson-axg-saradc", };