From patchwork Tue Nov 21 07:50:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Stark X-Patchwork-Id: 167530 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp459767vqb; Mon, 20 Nov 2023 23:50:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IE98H2UUlWx0VdtvIvhV+ZwSU7ONXQMmDB/3o+AyKOv3t1Hl/ubp6Lw1DXbAoRP6OPkQpzM X-Received: by 2002:a05:6808:8d7:b0:3b6:a812:4fb4 with SMTP id k23-20020a05680808d700b003b6a8124fb4mr4306662oij.11.1700553030396; Mon, 20 Nov 2023 23:50:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700553030; cv=none; d=google.com; s=arc-20160816; b=x4eFcUv4s+NZq1GbRdI07/qZUHIuu/cqcLbHqm276us/AYYpZE+wkPot2a2FnjGHtP Usa+fQNN29ir5pBdASYLRFtNwjvunPdGb6Os2pdZr+shuCpjqZytWoFO6vAkOX+O9vRB 46NyYPTBSvP4dRXqiS+Gvf0NvBNhH0W7mxWHQ/OTSco8JXibNcmLpFRlj1S3ya8MMFnB Snx99bBmVx2oKEfnUWVO9AuxCmGmPeGWI4bsrYstX/CzGfDN9l4SvFiT3vCgZpykfuo7 LjOrfjDO/73RmKmS27/OBHvO1N7VD9Vkp2uYz7U0wMIkcSCuddGH1BJb8WqYLG9B2dxF 1Pqw== 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=0WELMaCNNccOLdD1SLZ+BioYKABuEVgaCyabuvIP7gQ=; fh=oy3NHOEhWYKVpFhV1NNuwn5V55AWpupNTNwRor5xLNc=; b=z/QNhF/33K4tOcbwKrChDefJCJM620edXw5/QZWB4BtBe04igg9h7RmJVYOv/bE9k9 pqL7/byKzBBoHPXO8YGwX7kbbqHtDNCjYRvDmmdroukSekP652jKjsduS4vsaQ/LdYP8 uZxbq3xqWjME6txFPTa2yzdSfPHm6E5lETXss5PIKF8U+AxiCxWox5ueVl2wrPUW97mB wFjmfwVTf6/kH0MJuaD39ATPGMDbCUHrJGkOIBFTv3ctSnOnB4m74eQNgqtTM71QoLH5 gA6L3mSAGZFifXLDIV/sCyDbPjxSB9p4kXRXEmNuvC3UX72zxnh83PKYwiAFjiteUn/V XUZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=sbT8afON; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id h37-20020a635765000000b005be1ee5be76si9595974pgm.373.2023.11.20.23.50.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 23:50:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=sbT8afON; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 36B28807754D; Mon, 20 Nov 2023 23:50:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229481AbjKUHuU (ORCPT + 99 others); Tue, 21 Nov 2023 02:50:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjKUHuT (ORCPT ); Tue, 21 Nov 2023 02:50:19 -0500 Received: from mx1.sberdevices.ru (mx1.sberdevices.ru [37.18.73.165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F71E97; Mon, 20 Nov 2023 23:50:13 -0800 (PST) Received: from p-infra-ksmg-sc-msk01 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 0FF9B10000A; Tue, 21 Nov 2023 10:50:10 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 0FF9B10000A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1700553010; bh=0WELMaCNNccOLdD1SLZ+BioYKABuEVgaCyabuvIP7gQ=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=sbT8afONwaXW+D/Cv7SGe30LrK/ezzGk4RXjg1gmiihW7/cPUivpHgeZEsPIkHT+h nqwR/H20u9zF9xt+chkWoB0qaQkNHVYmPqnazWWPkdE/YRiVnjbYi+e92cJUOTFG8E 1wtsDyLRjiLzOncuB0RfH2SMXINUKtUxVJMPeYQnYQlQvwDbNiagyTxkhg8trHEXci BWuO66Mt21KZfAfxpkeSElOHxDKRm2vanhtp3s4bmXKPTqfzp9b5LKA9GD43zBAN4K iqYZCH86RQdRYWAbJtkPcbeddrvpV4zkkMe4pvTyLKdVNz+T9GoGgCCoLK5C7qOdK/ Cyd7yASQfVcSw== 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, 21 Nov 2023 10:50:09 +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, 21 Nov 2023 10:50:09 +0300 From: George Stark To: , , , , , , , , , CC: , , , , Subject: [PATCH] iio: adc: meson: add separate config for axg SoC family Date: Tue, 21 Nov 2023 10:50:00 +0300 Message-ID: <20231121075000.133711-1-gnstark@salutedevices.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) 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: 181493 [Nov 21 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: 543 543 1e3516af5cdd92079dfeb0e292c8747a62cb1ee4, {Tracking_from_domain_doesnt_match_to}, d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2;p-i-exch-sc-m01.sberdevices.ru:5.0.1,7.1.1;salutedevices.com:7.1.1;100.64.160.123:7.1.2, 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/21 04:39:00 #22491233 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 20 Nov 2023 23:50:29 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783159094283099740 X-GMAIL-MSGID: 1783159094283099740 According to Amlogic custom kernels ADC of axg SoC family requires unique number of setting so add dedicated config for it. Signed-off-by: George Stark Reviewed-by: Neil Armstrong --- 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", };