From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 195A1C4320E for ; Wed, 1 Sep 2021 12:32:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E4AAA61027 for ; Wed, 1 Sep 2021 12:32:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E4AAA61027 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=a3RBC7aj+eQH0FuSeLb+NQo8YF25B8IF33ZLE4WmJCo=; b=cdhHLEiCrYnCFz ddbYJWVKViKY1kANZo2STMgBBhZAe0DeWx1/jxzC7nnWiU0XLnhPkHl0f125JOyr9TDeR1MEk2AUo wanY/3407fR0wHzGXhi8WwwpsUoOkkb/uvmhQzlZnqLWV4q1QYdDwlrmeWf6bpDTisFtxrGgphHQf HsqcQ44/ORdI8zM8E1OMO9rtZvominkq78XudtRdxkfiwQJp0Q0Rke5CfzXfz/TS9ccuMF45qdjrx P+DU3hmBfPW4e+fT9DdQJhZ2Mfhy2M9Fk44Qtku0wf2ngykcREL9O4PZmbr21jfFblKEM0rjPYQha MvDvbxOZ+RLOWrhAq1hQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLPO1-005xnd-IR; Wed, 01 Sep 2021 12:30:37 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLPNq-005xhw-Q9 for linux-arm-kernel@lists.infradead.org; Wed, 01 Sep 2021 12:30:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1630499426; x=1662035426; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=b7KC/3OW3RV6bU+IXe2jATbGjJZFaZjUrZviOJCwN9A=; b=0izW6TPZDelNhd4cT97Ad9XkDl8vTUkBEfrJWm1MMGiKGgUD4ZqeCMyj rKuJZk5G1ugLxNE1/Vo6ax2ZfBLTt6pWYjvrDAOjmZnnM2Rtq58q1pJFn e4kGuGA6eHw37AGBphF7++GsuVycaryGEQC0y2BMXLEqpfET1QoJJwaDu 54cn6tVe+OCr+sBEVsAX0cA9yaSHAoJ2h+f0K8hjV5hz/WjgsDmVmzoCe xqYQjv0uNNAShfMV1z0pbdxCphBbloCWOKd5AN658PR64/mDg6XpoBSMY Di9Y4Z+anDdY48vY3Bq+JZeRPjMJKf+dzBk5nhLS23AmD9rZDQ7FeSeht w==; 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210901_053026_955775_E3D8FF22 X-CRM114-Status: GOOD ( 15.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel