Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp875634pxb; Wed, 1 Sep 2021 11:52:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTXKV3KsEXl4rhhwNXf47wGxzCU5W8D0R6k2+04o6pZqijyJSv5/V8Fgm+bqoZNdvq+u11 X-Received: by 2002:a05:6e02:20cd:: with SMTP id 13mr685410ilq.156.1630522347469; Wed, 01 Sep 2021 11:52:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630522347; cv=none; d=google.com; s=arc-20160816; b=XZ2DcriF1nt1KNI8w84CQU+u1Ns/EB/DDY76aXLv3EV+9eleFPMqNN8ju8hmjdKKi6 aa2V2g2pjTyB5AWMnvpGYTWbj693xBAFq/oexUbQ9f070hyakNiEsJF45Doztqficb/y oJ5FoDVvLI6y4stRxoqDu8WrcPX0++DAMgjeDxqenIYkq61mXrpY4ohsU6BJdI6Alnip bNaqMwnqIKfz1mJsHSl1tzk8YXrFVI+fzNN7xRzYuB85sVf4w1rh36YZf67Mxk7GevZg HurV8fmPfqrREhmSI16KouNdk0PtXsH/4JWonuVEt+90N5488q98EChowTa3yU18OwRD GQhg== 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:ironport-sdr:dkim-signature; bh=QzFGdemVLH12BaczoMp0V3Bgszc1+D7tpVl/OQXWAys=; b=zKyGWqFor5LOYWBi/RL7WrqID9us/AldCeursQRQdWC+hwU1xW9dEC31EmbWcFHJZe D6zZpl54EtQISqPI9uW70vjiYgnPi/WPAZV8HcP1Mju44ZnaCZFufw6fNdIuXD00vqEr 9Snv6hrBs0+W8w1Jebe4mF8sfKXTFLrWY3RHjbBiWdL0dUz5ZsrkVV8hYQ7UAYWITlkU lrZIzgQNoJBDkyltyEBi3tsEW7hZ2+LGbnl5w60+2vxp9BQFekP0sho/jnHEGXz0F3Js BtyZX/uUWZYX+z+xVWSMiaGjU3gUBlCehCiOyXi0+G8wjJreYlaM92A5psmCnVwKnvX2 Zzqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=ETiMx2x4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t7si254719jac.1.2021.09.01.11.52.15; Wed, 01 Sep 2021 11:52:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=ETiMx2x4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244983AbhIAMcG (ORCPT + 99 others); Wed, 1 Sep 2021 08:32:06 -0400 Received: from esa.microchip.iphmx.com ([68.232.153.233]:55485 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244585AbhIAMbV (ORCPT ); Wed, 1 Sep 2021 08:31:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1630499425; x=1662035425; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=b7KC/3OW3RV6bU+IXe2jATbGjJZFaZjUrZviOJCwN9A=; b=ETiMx2x4S74ZLNSJeKduMKhVbrApLVt4mW847/yN8ZJBEZZlyEE33WW3 Ot9/bcOdBoXlwfz1Gqhf4AWi5BG+jqAj8+0PJpHH39A8qk+Vu50qqs/7B a7YGYyqPBYJ4/gMnYoNsbPYuSBiFQz68j0cstl+LSGF2FnseR+fbcvw6q uZiNbF9iriieWCAx9TA+YpDD2mudcwycz+FNnCq7yOIUxmi+TjBmBLmTh vFM7FKyK+W9hxTLCFq+kFf8gzxpmJy6WAxPy9Pk0eYyyOAa5vwozcZCt8 O+ywPszi4w8WGxggmGlLa27I2MkfqIfTBeKxMgMGQkU/4xyiWqBA0OxMA g==; IronPort-SDR: Q90feKacTf3jbK8/LWWyguioi8F6sswgm8gwsZ5LJ9E/MLfSj2PeISyDJxX1AE/k8vMNRbYLl8 ciGNFI1ShiNb2U6Ml6soLkwARds8O7CeND0XCaPVbDw/t1Vn7UbWl+Ba/AZsyIE4g0CHcNfelP T/rif3KRcKA81f52tt4sfX+zzdwv1GoUGF0evqiNecpP8bV5Ex6/bZ7VPUl5DL9+sRsqyi6eMC q8kvDFxrVG0lSc2MfosT3Hej5z/4dMhXJeWxI+8rcdycIuXZzkoXj0z9msD0mmKxc4HjyisPGw MjwasXYU/hblac7RrTs0VZud X-IronPort-AV: E=Sophos;i="5.84,369,1620716400"; d="scan'208";a="134969763" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 01 Sep 2021 05:30:24 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Wed, 1 Sep 2021 05:30:24 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Wed, 1 Sep 2021 05:30:22 -0700 From: Eugen Hristev To: , , , CC: , , , , Eugen Hristev Subject: [PATCH v3 00/10] iio: adc: at91-sama5d2_adc: add support for sama7g5 Date: Wed, 1 Sep 2021 15:30:03 +0300 Message-ID: <20210901123013.329792-1-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This series adds support for sama7g5. The sama7g5 is slightly different from sama5d2, but has the same basic operations. The register map is a bit different, so, I added some primitives to differentiate between the two classes of hardware blocks (sama5d2-sam9x60 and sama7g5). Sama7g5 has 16 channels ADC, no resistive touch, and extra features (FIFOs, better oversampling , not implemented yet). It is a rework of the series initially sent here: https://marc.info/?l=linux-iio&m=161461656807826&w=2 Changes in v3: updates for the channel indexes ABI minor nitpicks fixes fixed krobot report Changes in v2: I reworked this according to review by Jonathan, meaning that first I created a no-op patch that will convert the driver to a more platform specific data dedicated type of driver. This adds various structures that hold things like register layout and channel information. After this I created few patches that implement the main differences between sama7g5 and older products: the end-of-conversion new register. I added helper functions to make code more easy to read and more simple. One the last patches adds the layout and channels for sama7g5. At this moment in linux-next, the DT for sama7g5 and sama7g5ek is present, and the last patches add and enable this node in DT for this board. Eugen Eugen Hristev (10): dt-bindings: iio: adc: at91-sama5d2: add compatible for sama7g5-adc iio: adc: at91-sama5d2_adc: initialize hardware after clock is started iio: adc: at91-sama5d2_adc: remove unused definition iio: adc: at91-sama5d2_adc: convert to platform specific data structures iio: adc: at91-sama5d2_adc: add support for separate end of conversion registers iio: adc: at91-sama5d2_adc: add helper for COR register iio: adc: at91-sama5d2_adc: add support for sama7g5 device iio: adc: at91-sama5d2_adc: update copyright and authors information ARM: dts: at91: sama7g5: add node for the ADC ARM: dts: at91: sama7g5ek: enable ADC on the board .../bindings/iio/adc/atmel,sama5d2-adc.yaml | 1 + arch/arm/boot/dts/at91-sama7g5ek.dts | 8 + arch/arm/boot/dts/sama7g5.dtsi | 16 + drivers/iio/adc/at91-sama5d2_adc.c | 594 ++++++++++++------ 4 files changed, 432 insertions(+), 187 deletions(-) -- 2.25.1