From patchwork Fri May 20 14:58:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamseel Shams X-Patchwork-Id: 575367 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D16DC433FE for ; Sun, 22 May 2022 09:54:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243121AbiEVJy1 (ORCPT ); Sun, 22 May 2022 05:54:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243146AbiEVJyY (ORCPT ); Sun, 22 May 2022 05:54:24 -0400 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AAF23B3D9 for ; Sun, 22 May 2022 02:54:23 -0700 (PDT) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20220522095421epoutp04a75c93b85a6e8cba82f4a305b6c11ad3~xZLPNKgZ31941319413epoutp048 for ; Sun, 22 May 2022 09:54:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20220522095421epoutp04a75c93b85a6e8cba82f4a305b6c11ad3~xZLPNKgZ31941319413epoutp048 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1653213261; bh=3CYOlliTIM4sXaXe4CgeEj+R6puxqxZfAFM7+aBC378=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oLe6ySga7oEzo4KqEB/s6kJsf2Ji53c5y4bG/2U8brh3gEWzOeL0bRhIMFg6t6yP3 Rb0aWtBteHD0e0I8uf2v6lEGPc9XygvLhrv0wiAKdw6zE42XotahyhtjUSFVIDluXk Nhn5WIn+eRn4eOk3O2J/ysBIuIariO1YScdAymh4= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20220522095420epcas5p30a5b3ba76b423b8d848955faf4b47b0b~xZLN8lMhV2325123251epcas5p3V; Sun, 22 May 2022 09:54:20 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.177]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4L5bQc1J6dz4x9Pt; Sun, 22 May 2022 09:54:16 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id F6.EF.09762.7480A826; Sun, 22 May 2022 18:54:16 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20220520145759epcas5p240de0ce6d1a1bfea6c8a6bfb61c5d27d~w2BxwdmHu0952609526epcas5p2m; Fri, 20 May 2022 14:57:59 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220520145759epsmtrp2cf4f9401785fabc474304b22962937df~w2Bxvk4J80678806788epsmtrp2E; Fri, 20 May 2022 14:57:59 +0000 (GMT) X-AuditID: b6c32a4b-213ff70000002622-31-628a08478b8b Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 55.E2.11276.77CA7826; Fri, 20 May 2022 23:57:59 +0900 (KST) Received: from Jaguar.sa.corp.samsungelectronics.net (unknown [107.108.73.139]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220520145757epsmtip194fa68a9921fb863787649a7fbb27c93~w2BvycQ1t3190831908epsmtip1D; Fri, 20 May 2022 14:57:57 +0000 (GMT) From: Tamseel Shams To: jic23@kernel.org, lars@metafoo.de, robh+dt@kernel.org, krzk+dt@kernel.org Cc: geert@linux-m68k.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, alim.akhtar@samsung.com, paul@crapouillou.net, linux-fsd@tesla.com, Tamseel Shams Subject: [PATCH v2 1/3] dt-bindings: iio: adc: Add FSD-HW variant Date: Fri, 20 May 2022 20:28:18 +0530 Message-Id: <20220520145820.67667-2-m.shams@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220520145820.67667-1-m.shams@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplk+LIzCtJLcpLzFFi42LZdlhTXdeDoyvJ4GIfk8WDedvYLOYfOcdq 8ezWXiC3aRWTxctZ99gslkyez2qx6fE1VouHr8It5h15x2JxedccNosZ5/cxWdxtXcxu0b/4 EotF694j7A58HqsvtbN5bFrVyeZx6HAHo8fmJfUeS94cYvXo27KK0eNf01x2j8+b5AI4orJt MlITU1KLFFLzkvNTMvPSbZW8g+Od403NDAx1DS0tzJUU8hJzU22VXHwCdN0yc4DOVlIoS8wp BQoFJBYXK+nb2RTll5akKmTkF5fYKqUWpOQUmBToFSfmFpfmpevlpZZYGRoYGJkCFSZkZ1yf toqxYBdHxalz71gaGN+ydTFycEgImEg0N7h1MXJxCAnsZpS4un0JC4TziVHi28bn7BDON6BM 4wzGLkZOsI7/fw8xQST2MkqsX/yZFSQhJNDCJLG2MQ5kLJuApsTx89wgpoiAv0TnXxeQcmaB 5UwSp9dNYwMpFxZwlLjZeoUZxGYRUJW43NwFFucVsJD4sXAWO8QueYnVGw6A1XAKWEp8/dkE dcNEDol/21IhbBeJNd+bmCBsYYlXx7dA9UpJfH63lw3CTpeY+7AXqqZAYtmu71A19hIHrsxh AbmTGejk9bv0IcKyElNPrQMrZxbgk+j9/QSqlVdixzwYW1Hi/+5+qDHiEu9WTGGFsD0k+u/D ArGH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kvNzNzGCw1pLcwfj9lUf 9A4xMnEwHmKU4GBWEuFlzG1JEuJNSaysSi3Kjy8qzUktPsQozcGiJM57oetkvJBAemJJanZq akFqEUyWiYNTqoHpKM/us9P6crc/Z3+nmTjrx3NeidjAr1aWD44+ZDyb7OgW8NLS4dZUl7qL /14/+FssfOG0UdjmrZ6zr1oo7N1SHCL4RSJT5dWC9f8qzikcP9nGN9dUSMRw5zbX5UYrBV4d ONyfN3vL+UbulA2JHi7vFyvXC72cvTZvu59PZsS5ZX/aDpvN2391JnegkukS1XXVzJEyiw5P veUzWTGU8/VTFYbJ6kuvqjzXnMZanO0tVGTT+DG7kOHVJsGUdQrTvx0ovjU1fUuk2q57CX4b J9/pfOj4YPqW22VnO9wN0hvXTNNdLjCpZlqcuZz8W/XUtKorsVEKLv0PLy4N3HFlgv0n17zn IbsNC0o7p2vMZNn2VImlOCPRUIu5qDgRANk6jFDaAgAA X-CMS-MailID: 20220520145759epcas5p240de0ce6d1a1bfea6c8a6bfb61c5d27d X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220520145759epcas5p240de0ce6d1a1bfea6c8a6bfb61c5d27d References: <20220520145820.67667-1-m.shams@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Alim Akhtar This patch adds a new compatible string for FSD-HW's ADC variant Signed-off-by: Alim Akhtar Signed-off-by: Tamseel Shams --- - Changes since v1 * Addressed Krzysztof's comment to use soc-specific compatible .../devicetree/bindings/iio/adc/samsung,exynos-adc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml index 81c87295912c..ded0e3f85991 100644 --- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml +++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml @@ -14,6 +14,7 @@ properties: enum: - samsung,exynos-adc-v1 # Exynos5250 - samsung,exynos-adc-v2 + - samsung,exynos-adc-fsd-hw - samsung,exynos3250-adc - samsung,exynos4212-adc # Exynos4212 and Exynos4412 - samsung,exynos7-adc From patchwork Fri May 20 14:58:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamseel Shams X-Patchwork-Id: 575678 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B817C433EF for ; Sun, 22 May 2022 09:54:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243631AbiEVJyg (ORCPT ); Sun, 22 May 2022 05:54:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243474AbiEVJyd (ORCPT ); Sun, 22 May 2022 05:54:33 -0400 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88E213B3EA for ; Sun, 22 May 2022 02:54:31 -0700 (PDT) Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20220522095429epoutp01f4a94271223a007a64cab3ad861b8266~xZLW0nh4_0945809458epoutp01T for ; Sun, 22 May 2022 09:54:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20220522095429epoutp01f4a94271223a007a64cab3ad861b8266~xZLW0nh4_0945809458epoutp01T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1653213269; bh=LbKA1zuCHHgjytaxf7pbRgp1K7uW9nFynZPObMbAQFk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h2HIjTqKYPdEYypg4W3+P06CQLl9N9ISG9iCZs0prU2IBCh7cs7C/+S1LQ+7R4W3w YIz2hvrNTHrugQ0rzoIaEJoB/g9PQ4wvAXzddFuT/AizyZ7jWa22vrXsPN8ew1nExc kw+ZaNdD64y7oDWAPJNr4DkLSmSeJYbBxKsThq1k= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20220522095428epcas5p2ab41fb5e759c3067c9897dc9bd2fb5ec~xZLVvYIL33217932179epcas5p2J; Sun, 22 May 2022 09:54:28 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.177]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4L5bQm43jHz4x9Pp; Sun, 22 May 2022 09:54:24 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id D7.01.09827.0580A826; Sun, 22 May 2022 18:54:24 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20220520145802epcas5p2153cb572493e3bccd702e0ecce1171fb~w2Bz5l2F30456204562epcas5p28; Fri, 20 May 2022 14:58:02 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220520145802epsmtrp2baba019b24fd22c46067f5de9a8549f1~w2Bz4pZNy0678606786epsmtrp2K; Fri, 20 May 2022 14:58:02 +0000 (GMT) X-AuditID: b6c32a4a-b51ff70000002663-f2-628a08504f10 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 66.E2.11276.97CA7826; Fri, 20 May 2022 23:58:02 +0900 (KST) Received: from Jaguar.sa.corp.samsungelectronics.net (unknown [107.108.73.139]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220520145800epsmtip1336ebd9f9cb40b177ac85b01ce6e1a7c~w2Bx2w8wv1422614226epsmtip1_; Fri, 20 May 2022 14:57:59 +0000 (GMT) From: Tamseel Shams To: jic23@kernel.org, lars@metafoo.de, robh+dt@kernel.org, krzk+dt@kernel.org Cc: geert@linux-m68k.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, alim.akhtar@samsung.com, paul@crapouillou.net, linux-fsd@tesla.com, Tamseel Shams Subject: [PATCH v2 2/3] iio: adc: exynos-adc: Add support for ADC FSD-HW controller Date: Fri, 20 May 2022 20:28:19 +0530 Message-Id: <20220520145820.67667-3-m.shams@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220520145820.67667-1-m.shams@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjk+LIzCtJLcpLzFFi42LZdlhTUzeAoyvJ4F+DnMWDedvYLOYfOcdq 8ezWXiaLB02rmCxezrrHZrFk8nxWi02Pr7FaPHwVbjHvyDsWi8u75rBZzDi/j8nibutidov+ xZdYLFr3HmF34PNYfamdzWPTqk42j0OHOxg9Ni+p91jy5hCrR9+WVYwe/5rmsnt83iQXwBGV bZORmpiSWqSQmpecn5KZl26r5B0c7xxvamZgqGtoaWGupJCXmJtqq+TiE6DrlpkDdLaSQlli TilQKCCxuFhJ386mKL+0JFUhI7+4xFYptSAlp8CkQK84Mbe4NC9dLy+1xMrQwMDIFKgwITvj 4NUzLAXv5CouXdRqYHwi2cXIwSEhYCIxbbZAFyMXh5DAbkaJ1fsmMEE4nxglZv3cwQzhfGOU WHH6BVsXIydYx5kLt1khEnsZJVq3rIZqaWGS2HvkMDvIXDYBTYnj57lBTBEBf4nOvy4gJcwC y5kkTq+bBjZIWCBUov/VfTCbRUBV4vrtXcwgNq+AhcTas1+hlslLrN5wACzOKWAp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AJaEocP88NUiMiECyx+NBhZpAaZoGN TBL/d3exgiSEgRKzbk9iBrFZBFQlrt/eBWbzClhIrD37lQ1igbzE6g0HwOKcApYSX382gS0W AqpZ0fiNeQIj3wJGhlWMkqkFxbnpucWGBYZ5qeV6xYm5xaV56XrJ+bmbGMFBraW5g3H7qg96 hxiZOBgPMUpwMCuJ8DLmtiQJ8aYkVlalFuXHF5XmpBYfYpTmYFES573QdTJeSCA9sSQ1OzW1 ILUIJsvEwSnVwLRf88WKyQflwtctPni9+KT2+1+cGdELIpiaZ2W1MXosOfP0/6PYy1xTTFwi LUR3HK404Hq5yU+qO7AmsbFow4kQiVLF0k3fL3X9jeGeUMGauu2+uIh8cGnoz4XeOb4z+Mpv xCSu33W5pDpLRX5Zo09csMOmD3ozXS+KpTb8PKN07O3Mtwk2RdfucW5olLUxaHuX7FF8wl11 +684Y7P3fx5MK/DPinMP4Nsb9jCUaXuGj/Lf5Ys7Kpwu6Gj6p/mlZDmsaVq+an93ojU//8uV oo1Hct9J1ockLWtcqcYVqcaVHvi52sPg3OnNH6ZwJd1y2R3e1Xivvn7fnSUHpWxD52szG+7s 9Pv55pR49ZNuJZbijERDLeai4kQAHlqIidkCAAA= X-CMS-MailID: 20220520145802epcas5p2153cb572493e3bccd702e0ecce1171fb X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220520145802epcas5p2153cb572493e3bccd702e0ecce1171fb References: <20220520145820.67667-1-m.shams@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Alim Akhtar Exynos's ADC-FSD-HW has some difference in registers set, number of programmable channels (16 channel) etc. This patch adds support for ADC-FSD-HW controller version. Signed-off-by: Alim Akhtar Signed-off-by: Tamseel Shams --- - Changes since v1 * Addressed Jonathan's comment by using already provided isr handle drivers/iio/adc/exynos_adc.c | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c index cff1ba57fb16..183ae591327a 100644 --- a/drivers/iio/adc/exynos_adc.c +++ b/drivers/iio/adc/exynos_adc.c @@ -55,6 +55,11 @@ #define ADC_V2_INT_ST(x) ((x) + 0x14) #define ADC_V2_VER(x) ((x) + 0x20) +/* ADC_FSD_HW register definitions */ +#define ADC_FSD_DAT(x) ((x) + 0x08) +#define ADC_FSD_DAT_SUM(x) ((x) + 0x0C) +#define ADC_FSD_DBG_DATA(x) ((x) + 0x1C) + /* Bit definitions for ADC_V1 */ #define ADC_V1_CON_RES (1u << 16) #define ADC_V1_CON_PRSCEN (1u << 14) @@ -92,6 +97,7 @@ /* Bit definitions for ADC_V2 */ #define ADC_V2_CON1_SOFT_RESET (1u << 2) +#define ADC_V2_CON1_SOFT_NON_RESET (1u << 1) #define ADC_V2_CON2_OSEL (1u << 10) #define ADC_V2_CON2_ESEL (1u << 9) @@ -100,6 +106,7 @@ #define ADC_V2_CON2_ACH_SEL(x) (((x) & 0xF) << 0) #define ADC_V2_CON2_ACH_MASK 0xF +#define MAX_ADC_FSD_CHANNELS 16 #define MAX_ADC_V2_CHANNELS 10 #define MAX_ADC_V1_CHANNELS 8 #define MAX_EXYNOS3250_ADC_CHANNELS 2 @@ -484,6 +491,43 @@ static const struct exynos_adc_data exynos7_adc_data = { .start_conv = exynos_adc_v2_start_conv, }; +static void exynos_adc_fsd_init_hw(struct exynos_adc *info) +{ + u32 con2; + + writel(ADC_V2_CON1_SOFT_RESET, ADC_V2_CON1(info->regs)); + + writel(ADC_V2_CON1_SOFT_NON_RESET, ADC_V2_CON1(info->regs)); + + con2 = ADC_V2_CON2_C_TIME(6); + writel(con2, ADC_V2_CON2(info->regs)); + + /* Enable interrupts */ + writel(1, ADC_V2_INT_EN(info->regs)); +} + +static void exynos_adc_fsd_exit_hw(struct exynos_adc *info) +{ + u32 con2; + + con2 = readl(ADC_V2_CON2(info->regs)); + con2 &= ~ADC_V2_CON2_C_TIME(7); + writel(con2, ADC_V2_CON2(info->regs)); + + /* Disable interrupts */ + writel(0, ADC_V2_INT_EN(info->regs)); +} + +static const struct exynos_adc_data fsd_hw_adc_data = { + .num_channels = MAX_ADC_FSD_CHANNELS, + .mask = ADC_DATX_MASK, /* 12 bit ADC resolution */ + + .init_hw = exynos_adc_fsd_init_hw, + .exit_hw = exynos_adc_fsd_exit_hw, + .clear_irq = exynos_adc_v2_clear_irq, + .start_conv = exynos_adc_v2_start_conv, +}; + static const struct of_device_id exynos_adc_match[] = { { .compatible = "samsung,s3c2410-adc", @@ -518,6 +562,9 @@ static const struct of_device_id exynos_adc_match[] = { }, { .compatible = "samsung,exynos7-adc", .data = &exynos7_adc_data, + }, { + .compatible = "samsung,exynos-adc-fsd-hw", + .data = &fsd_hw_adc_data, }, {}, }; @@ -626,6 +673,8 @@ static irqreturn_t exynos_adc_isr(int irq, void *dev_id) info->ts_x = readl(ADC_V1_DATX(info->regs)); info->ts_y = readl(ADC_V1_DATY(info->regs)); writel(ADC_TSC_WAIT4INT | ADC_S3C2443_TSC_UD_SEN, ADC_V1_TSC(info->regs)); + } else if (of_device_is_compatible(info->dev->of_node, "samsung,exynos-adc-fsd-hw")) { + info->value = readl(ADC_FSD_DAT(info->regs)) & mask; } else { info->value = readl(ADC_V1_DATX(info->regs)) & mask; } @@ -719,6 +768,12 @@ static const struct iio_chan_spec exynos_adc_iio_channels[] = { ADC_CHANNEL(7, "adc7"), ADC_CHANNEL(8, "adc8"), ADC_CHANNEL(9, "adc9"), + ADC_CHANNEL(10, "adc10"), + ADC_CHANNEL(11, "adc11"), + ADC_CHANNEL(12, "adc12"), + ADC_CHANNEL(13, "adc13"), + ADC_CHANNEL(14, "adc14"), + ADC_CHANNEL(15, "adc15"), }; static int exynos_adc_remove_devices(struct device *dev, void *c) From patchwork Fri May 20 14:58:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamseel Shams X-Patchwork-Id: 575366 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37486C433EF for ; Sun, 22 May 2022 09:54:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243846AbiEVJyp (ORCPT ); Sun, 22 May 2022 05:54:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243911AbiEVJyn (ORCPT ); Sun, 22 May 2022 05:54:43 -0400 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16DFB3B563 for ; Sun, 22 May 2022 02:54:37 -0700 (PDT) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20220522095435epoutp03f2429b509edfb1e54148af509cf685a5~xZLbugIbM1803418034epoutp03F for ; Sun, 22 May 2022 09:54:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20220522095435epoutp03f2429b509edfb1e54148af509cf685a5~xZLbugIbM1803418034epoutp03F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1653213275; bh=6EZLFpcIcXAcnbtuz8KzWE4q/yNrSXTZ39BdCObJjg4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jmf7X5Ro39Scm3ucrRrGxUhfbY3lhXtnP5LcRx0q9EQH8bNRjCq7WufZMGQ7GJ1IQ ILRCPcMyQDduBxC/sQhpVAjz0pYj+DwEXARaww0Y1LPgwSP11N0ABPIfolun45WB4I nMHEfRGWlZ5BjO/whVYWY4JcNkcOHX6gy80EV/Sg= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20220522095433epcas5p4368005cc2e7f431fa9f3c42eeeda64e4~xZLaspYbb2175721757epcas5p4S; Sun, 22 May 2022 09:54:33 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.176]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4L5bQs6JTtz4x9Pt; Sun, 22 May 2022 09:54:29 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id E7.EF.09762.5580A826; Sun, 22 May 2022 18:54:29 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20220520145804epcas5p2925e66d30b18378fc62c92999ec269f7~w2B184iYh0456204562epcas5p29; Fri, 20 May 2022 14:58:04 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220520145804epsmtrp138c753df21232041dc3c99f929bd3ee3~w2B17_O4k2887028870epsmtrp1x; Fri, 20 May 2022 14:58:04 +0000 (GMT) X-AuditID: b6c32a4b-1fdff70000002622-40-628a08557b85 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 67.E2.11276.C7CA7826; Fri, 20 May 2022 23:58:04 +0900 (KST) Received: from Jaguar.sa.corp.samsungelectronics.net (unknown [107.108.73.139]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220520145802epsmtip1f086d24ad2527b24530cf258e000919e~w2Bz7o-MV1683316833epsmtip1A; Fri, 20 May 2022 14:58:02 +0000 (GMT) From: Tamseel Shams To: jic23@kernel.org, lars@metafoo.de, robh+dt@kernel.org, krzk+dt@kernel.org Cc: geert@linux-m68k.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, alim.akhtar@samsung.com, paul@crapouillou.net, linux-fsd@tesla.com, Tamseel Shams Subject: [PATCH v2 3/3] arm64: dts: fsd: Add ADC device tree node Date: Fri, 20 May 2022 20:28:20 +0530 Message-Id: <20220520145820.67667-4-m.shams@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220520145820.67667-1-m.shams@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjk+LIzCtJLcpLzFFi42LZdlhTQzeUoyvJ4OgTI4sH87axWcw/co7V 4tmtvUwWD5pWMVm8nHWPzWLJ5PmsFpseX2O1ePgq3GLekXcsFpd3zWGzmHF+H5PF3dbF7Bb9 iy+xWLTuPcLuwOex+lI7m8emVZ1sHocOdzB6bF5S77HkzSFWj74tqxg9/jXNZff4vEkugCMq 2yYjNTEltUghNS85PyUzL91WyTs43jne1MzAUNfQ0sJcSSEvMTfVVsnFJ0DXLTMH6GwlhbLE nFKgUEBicbGSvp1NUX5pSapCRn5xia1SakFKToFJgV5xYm5xaV66Xl5qiZWhgYGRKVBhQnbG x/kfmQpecFfMuJ/bwHibs4uRk0NCwETiYfNxpi5GLg4hgd2MEuubXrNDOJ8YJb5OOsAG4Xxj lNixdikrTMvc79OhEnsZJX41drOAJIQEWpgk3n6U6GLk4GAT0JQ4fp4bxBQR8Jfo/OsCUs4s sJxJ4vS6aWwg5cICjhKXV8wEm8kioCqxoekCM4jNK2Ah0fxrJyPELnmJ1RsOgMU5BSwlvv5s YgQZJCHQyyHx/e58ZogiF4mmOedYIGxhiVfHt7BD2FISL/vboOx0ibkPe5kg7AKJZbu+Q8Xt JQ5cmcMCcigz0M3rd+lDhGUlpp5aB1bOLMAn0fv7CVQrr8SOeTC2osT/3f1QY8Ql3q2YAg0f D4mOKeeg4dPDKPH5126WCYxysxBWLGBkXMUomVpQnJueWmxaYJyXWg6Ps+T83E2M4ISp5b2D 8dGDD3qH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474Wuk/FCAumJJanZqakF qUUwWSYOTqkGpsADZgIz/5/+tKliblbhfc7KwCArY4bEpY7vu+MvrnC9JKBUd6sqeXXFJpGT 6qUnrZZr3Dlhs5hTPTYzyOHQhvCYULYzPH/OHBQ2nCiw66Qiw7ztc3YkPniXfCH2R3ux9RSd 15avMj+0WrpMbTvhszLw01wdlt3uy+/Ni3437+PbBYJ3NikEtC9Nun01fTEPg19Endav6x1b dlqzL4q4KJslWfh/Qud+wSUvtZ/sYvysWquaY+F6lLlbOkDr//XlEllVP4XvBn19UxhsblGX e6mylTf6idy7CV2fDBi9hIWCJ+4ufShZ6Ff9woRtq+jU/2qMplmTFlr+zLMUjbz40DPg/JUo KZeUvU/e1eefUWIpzkg01GIuKk4EAP29IITYAgAA X-CMS-MailID: 20220520145804epcas5p2925e66d30b18378fc62c92999ec269f7 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220520145804epcas5p2925e66d30b18378fc62c92999ec269f7 References: <20220520145820.67667-1-m.shams@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Alim Akhtar This patch adds ADC device tree node and enables the same on fsd platform. Signed-off-by: Alim Akhtar Signed-off-by: Tamseel Shams --- - Changes since v1 * Addressed Krzysztof's comment for corrections in dt files arch/arm64/boot/dts/tesla/fsd-evb.dts | 4 ++++ arch/arm64/boot/dts/tesla/fsd.dtsi | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts b/arch/arm64/boot/dts/tesla/fsd-evb.dts index 5af560c1b5e6..63f26a85053a 100644 --- a/arch/arm64/boot/dts/tesla/fsd-evb.dts +++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts @@ -34,6 +34,10 @@ clock-frequency = <24000000>; }; +&adc { + status = "okay"; +}; + &serial_0 { status = "okay"; }; diff --git a/arch/arm64/boot/dts/tesla/fsd.dtsi b/arch/arm64/boot/dts/tesla/fsd.dtsi index 9a652abcbcac..f63624f2f414 100644 --- a/arch/arm64/boot/dts/tesla/fsd.dtsi +++ b/arch/arm64/boot/dts/tesla/fsd.dtsi @@ -748,6 +748,17 @@ clocks = <&fin_pll>, <&clock_imem IMEM_MCT_PCLK>; clock-names = "fin_pll", "mct"; }; + + adc: adc@141a0000 { + compatible = "samsung,exynos-adc-fsd-hw"; + reg = <0x0 0x141a0000 0x0 0x100>; + interrupts = ; + clocks = <&clock_peric PERIC_PCLK_ADCIF>; + clock-names = "adc"; + #io-channel-cells = <1>; + io-channel-ranges; + status = "disabled"; + }; }; };