From patchwork Thu Jan 20 01:02:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hancock X-Patchwork-Id: 12718141 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3A2BFC433F5 for ; Thu, 20 Jan 2022 01:05:23 +0000 (UTC) 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:References:In-Reply-To: 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: List-Owner; bh=QijyVze2wtL8E3AqMk+VQdbdNQuGsPY+MWE/rAOpeAQ=; b=YM7akZSxhyLDXA 7/OdGiAFRstcwfzBf/ybyV3er3STtOgH2FK2BK7mTaTfxat+lVHDDPnTASVGvdqUgsp3SluX3E7Hw 6nUIkOF0uOJmvgFCtdmNVC21QpArTc3Al1/1/aqOEIa48Xinz3U1cPd/u9aco8aoVpo4yZZkAF+1A EVuOmOi04gnddp6g59ElHEdeV8t5QNQkVKy3rJtrx+SHu9WJLntlCHMDj5G/GYtleU1fAfiiDRAbR 9XDMoj8sLsU7HVMsEDkF4knyLo9qL9H35Ajqs0B87AAkjfSOzhQ7DIy8aURr55j2Wlti9VFSFqfL6 cYrwukm3jOBJlPziodSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nALrl-00860L-M9; Thu, 20 Jan 2022 01:03:53 +0000 Received: from mx0c-0054df01.pphosted.com ([67.231.159.91]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nALrC-0085so-Nh for linux-arm-kernel@lists.infradead.org; Thu, 20 Jan 2022 01:03:21 +0000 Received: from pps.filterd (m0208999.ppops.net [127.0.0.1]) by mx0c-0054df01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20K0VdmY010083; Wed, 19 Jan 2022 20:03:03 -0500 Received: from can01-to1-obe.outbound.protection.outlook.com (mail-to1can01lp2057.outbound.protection.outlook.com [104.47.61.57]) by mx0c-0054df01.pphosted.com (PPS) with ESMTPS id 3dprrpg6d4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Jan 2022 20:03:03 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h/dTbgVlVUsMVQnh51gY+81FsJ8ns+faIP/LNCFnpd7nkZrp3cS8uLquMLQDjatK6rtU4Oz9hVJr+F+xqrseMgbii1tAZr5ph/frd/dwQV/Yd4r8fQ1D0dhB1zxWqkf720mBNgC/FmDBoYAvEHvCBsAdeifKcTa3C3IAEWZSqJHk3uDdupi42VDdOxWoPzDSc9aXc0js8IaBDTOr86xQzGOe4s2UtdmJeCRa8g2eYwTP+awLLdqLkAeZd8Uk7cUcXu5FFLnm5crN6Lgvnk3lVxgsG2fR/OgQaFshLFQ9KQCw3EjVzGfKL0vRwYzGiipZviNfNE1nqzM3Xb2t73rMUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fB66quH2nV7CUAm3/KsokulfFN6L1HYF7xjuLqSRfOc=; b=Jxf3hm6PYDE/SArPLlZUfqbSvL6d4HTaf6so13znST9cNhUJfEJee+hsUcGMvsDmzKsGeO8vh5YneHby5DpgQklOYnUWrLf7/68INGa6u4GX4uKsfoV/vPervbdI1MkUxrkCLYw+g9qCwjGHLI7h1UGmuzcgEb7LhhA8pW2OBlpG4DYef2YAHEKNTKLc+kKTiZRlvOF6et/juoTyLib4TFmNreYpAQdjC4tQmIsH9Lw9nExtOyVW3U2cdOl+cldL3iks79umI5S7jIyk/VE+xssO3WKoCX3SP8AQBELft9z2ZDRU8i4AudxJt1FT3FRjEZYBwFK0fsBx710xgMFtJQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=calian.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fB66quH2nV7CUAm3/KsokulfFN6L1HYF7xjuLqSRfOc=; b=10qvUbD5gnOKdz8qtT9b4Wbsj3ND5Z40iaU4s7DI+8Aqv6YraOBRk8I0puYQObN27CwwhQSjiTmh40z6KtoFbbztetw7ZxYmi3QrdBAYtk9tYluLTi5jgjbNqrQ2D4Wcw0s3KYqZIwJRCdK/nUOjU0M0oKlTogVIcZ7qXVH3x40= Received: from YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:6a::19) by YTOPR0101MB1065.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:20::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Thu, 20 Jan 2022 01:03:02 +0000 Received: from YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM ([fe80::6929:c39f:d893:b6c8]) by YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM ([fe80::6929:c39f:d893:b6c8%2]) with mapi id 15.20.4888.014; Thu, 20 Jan 2022 01:03:02 +0000 From: Robert Hancock To: linux-iio@vger.kernel.org Cc: robh+dt@kernel.org, michal.simek@xilinx.com, anand.ashok.dumbre@xilinx.com, jic23@kernel.org, lars@metafoo.de, manish.narani@xilinx.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Robert Hancock Subject: [PATCH 1/4] arm64: dts: zynqmp: add AMS driver to device tree Date: Wed, 19 Jan 2022 19:02:43 -0600 Message-Id: <20220120010246.3794962-2-robert.hancock@calian.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220120010246.3794962-1-robert.hancock@calian.com> References: <20220120010246.3794962-1-robert.hancock@calian.com> X-ClientProxiedBy: CH2PR10CA0008.namprd10.prod.outlook.com (2603:10b6:610:4c::18) To YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:6a::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2fbefcc9-e5ce-450b-241b-08d9dbb09b7f X-MS-TrafficTypeDiagnostic: YTOPR0101MB1065:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bFt2BQgv2sn9ZqGMEHf3ecUM1bTzpQB8UixZ63AhrNMbEo9VWOYUrhQB3j9ynUBXyVkTIZHY6xmOhS4n6lDR1O9P6oQai7ayUIYhKgdogcVrUTX0luFle4ZOK12CugFbU1196pLoO2U8jQNOmJtsOReReXQF+EEwwn6aZj5dLAEVoW2qkJ/iRp1LrAbb2OxiJHZr0M6KiSNFbHbpMGqYiVlVxFowgpJehybMrcMraznzJeKlEp94/IYUrVQ3Zv6tC+3Vskx7a/C2t9Sk9YDTokK83KTt9rVYat4kb1CcZcS6NVembqCXIs+hxDvtXNqmcGQ4FjNe446V8boorZDTNQPEy1aAk70UaDTJvhz1Gc1o80AOnP97lufZXMyAt6beOOcDe1lTqcZLn0F5MfjQqxP3JgXnTnYbkm1yz+TVYsUX4k4D7CXneNrD2/BT4+tLk19NAH9lj55uw/myPDs3Up829K2NdYbaVUHGWrILW4Z4ZtWgQsNwSnvFM1TX9ixXkdj6PbZNJqlxtU4pyqnHTozquMRoDcKhf0PJW9I9liMIjYbLORM6ksUtmq7OsuRp7g60bZj/oslyO9KYG+Y5aUcvzDEkO0+YIIHQD5X3zkX6jWv+Xz7SKNsw3CQSS2+Y05YsWOpfmFrhFXoQD9hO/wLq/ymRJaw4q5x+hBvxP83chLTOGMVmU3J3hjnnqLg6V5GzvPpbh5i/Vk1vJcGWPw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(366004)(2616005)(44832011)(4326008)(2906002)(66946007)(66476007)(66556008)(316002)(6916009)(1076003)(6512007)(38350700002)(26005)(36756003)(6506007)(6666004)(38100700002)(52116002)(5660300002)(83380400001)(6486002)(107886003)(86362001)(508600001)(8676002)(8936002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: u2J3R+TB/wnPFQX5llLt6eySZzkncYdSfIXHf8yQbirC+WPvJ8FYJtJQKBbz6zIgFw3l5/4eh8NiO2ZHNx9VhGrgoIfSFh5FLaMf5TuIOcuTmPclSNheoOLJ1ufFJgoxc0MEyhtrT2VpkM9p/O5fvgKKCQ6p6SPGmIMQUd2Ae3xW5YvQ10bPRVsDID8oc8zgi07IAo3m+OJAc+CEFfHBxnZHuOYqCQU61iFO6196PJEQsTgn3QjFuByijXEFegoiOLhPEp2XRMML35TzcBbPetyWQZiBprDT4AAsLzCBA6/gypVMkesTBLsqqBgoHmvMjgRWkMEYLA6XH5l+GoQMFv7K/nmRISpYtlvlmLX2c5g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y0k3KTbr6AQAn99DWSzcfeq+fBRolPwo513vwGaMe0uNvCUs0o9pMvraCqeIKbkG/shoM0ZC4fDp/lIlAmdmme43uJJfE+wr/RjupQzKQY7PZ2bFghS1rviTzQmqdpESYFCQix8CvNeX0+GemFHz8oDxGow4bEr6Odibsb+HBv8USuvKdWQoBZ3x6imAeB2Vu/hIwqSEWKTaikNiH9IFsUdw8DMCxpWxoWsTjmXpTa+5Jo8dJfkVYLJitvE0LnQ= X-OriginatorOrg: calian.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2fbefcc9-e5ce-450b-241b-08d9dbb09b7f X-MS-Exchange-CrossTenant-AuthSource: YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2022 01:03:02.0569 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 23b57807-562f-49ad-92c4-3bb0f07a1fdf X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mwfwkZW73V/9ztehgXuOX9d4p33Ea1a46OPM5IkVwXMePZkupQ5M2LuH1gsXjFZN+MKZRsPPbr6otdo5d0Myh2JAng3XKsvCgkHSufdBCYs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB1065 X-Proofpoint-ORIG-GUID: kdce35B3AVHrTg3LjpMR8BXf1hI11FNJ X-Proofpoint-GUID: kdce35B3AVHrTg3LjpMR8BXf1hI11FNJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-19_12,2022-01-19_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=727 phishscore=0 mlxscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 spamscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201200004 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220119_170319_011386_0233BBCC X-CRM114-Status: GOOD ( 12.94 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add an entry to the ZynqMP device tree to support the AMS device which now has a driver in mainline. Signed-off-by: Robert Hancock Reviewed-by: Michael Tretter --- .../arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi | 4 +++ arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 26 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi index 1e0b1bca7c94..108592104a1b 100644 --- a/arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi +++ b/arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi @@ -239,6 +239,10 @@ &lpd_watchdog { clocks = <&zynqmp_clk LPD_WDT>; }; +&xilinx_ams { + clocks = <&zynqmp_clk AMS_REF>; +}; + &zynqmp_dpdma { clocks = <&zynqmp_clk DPDMA_REF>; }; diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi index 74e66443e4ce..d1fe1e5b46c1 100644 --- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi +++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi @@ -878,6 +878,32 @@ lpd_watchdog: watchdog@ff150000 { timeout-sec = <10>; }; + xilinx_ams: ams@ffa50000 { + compatible = "xlnx,zynqmp-ams"; + status = "disabled"; + interrupt-parent = <&gic>; + interrupts = <0 56 4>; + reg = <0x0 0xffa50000 0x0 0x800>; + #address-cells = <1>; + #size-cells = <1>; + #io-channel-cells = <1>; + ranges = <0 0 0xffa50800 0x800>; + + ams_ps: ams_ps@0 { + compatible = "xlnx,zynqmp-ams-ps"; + status = "disabled"; + reg = <0x0 0x400>; + }; + + ams_pl: ams_pl@400 { + compatible = "xlnx,zynqmp-ams-pl"; + status = "disabled"; + reg = <0x400 0x400>; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + zynqmp_dpdma: dma-controller@fd4c0000 { compatible = "xlnx,zynqmp-dpdma"; status = "disabled"; From patchwork Thu Jan 20 01:02:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hancock X-Patchwork-Id: 12718138 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7B5BAC433F5 for ; Thu, 20 Jan 2022 01:05:09 +0000 (UTC) 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:References:In-Reply-To: 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: List-Owner; bh=K5o7TLATQr1k3sKUx9Coo4ek9qj5kiKajbeYZIKxSaM=; b=VR1AJuvKjVfjP+ OlwvFDtbj8NUuupC7wehrdC4zG8rCSLZuACRJ/+/mDCkUTapJiPX6/EVSRxYh48PUwTS9lb6Qh6G0 aNflRzoVsLknYZaN+WvhY/Wh+osS2v5I+ZV6Qtw7bd2tQbkBhWmiOmBPLLF/zqgnkUsdCX9uJ/T+r K7N3R5IEsZGgVKmb47Wlqf7cusw6GN8G4hMRZBMpBs6G1s0HMH6Aw7F3oe1VdsMvSglADRfkgsEAb M6mVn4WeF041BjfngGnafnFcJFeRH5xvGAqamXPooJ2mCl3mkPqkj/Vun4DhQpap+qwzpVOWLxOqZ BXWEAGCAS1F2dSbE6lfQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nALrb-0085yk-2f; Thu, 20 Jan 2022 01:03:43 +0000 Received: from mx0c-0054df01.pphosted.com ([67.231.159.91]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nALrC-0085sp-LG for linux-arm-kernel@lists.infradead.org; Thu, 20 Jan 2022 01:03:21 +0000 Received: from pps.filterd (m0208999.ppops.net [127.0.0.1]) by mx0c-0054df01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20K0VdmZ010083; Wed, 19 Jan 2022 20:03:04 -0500 Received: from can01-to1-obe.outbound.protection.outlook.com (mail-to1can01lp2051.outbound.protection.outlook.com [104.47.61.51]) by mx0c-0054df01.pphosted.com (PPS) with ESMTPS id 3dprrpg6d5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Jan 2022 20:03:04 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kbqj9oytF78nC1VAWpm1xiQuM/ybfCuEZA6CmticjaJaUrGSDUTIX5mE8+Ztkj54qgYH+3lsy8aVx5eDTM+E+YnlPf0g5D4k99/FBHcDVAJjnhPGlOtwZxsqIngsG9f6qHCx7hayezFT8T2P/WwCn89mtpaRbNFjTG09iryF1y2t7U2JX9MDG50kmVHOzCet2bvLlSjE90zV5MxXWpJSZF3YKG5NviwJJJaw6akPMsi1R+udz0jlHmDwz76bjBBJV3c4TbwhYdz32ToCLNdjz0i51OaWHudVd9ZhXFnFFs/Jp5zuMIJ+zYXBvJed+8ebm9UmcKHgPr8C0zJYuKwH2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HO7O+CioqUBh/mgqYxouOLjq/GsR7cGVI1UNJ/cIDs4=; b=WZuCKQxH+sCU+pqLv7dxuy+85t5nMjGJXONW5phsUU6xjeLjgE5MbGujd2IGSZIf6poGREjoRTkzOrY+hIUxWtc15nHVgW0jZa5VQa9YjCHBokc686G4TJzf3fUClLS7fw5kTBUcvQ0VsrhgovCfe3pECFpQKCo4R2Qg2eH+BEk8Sl9HQ2n8D7jcoa4SNoQM7JK5+jU9RiZTQDeqfpqLVvKDYV8ZeQzDzj8Ti62Dvagos6syBP33j6Rf85tDwpnU0gS3TrL9IHcPh6RYCCzaUYhijWJn4eLE6czifFCgctGt3iNz7F82u9hF9jy609I27ED6AIHMegn+qc1Uz0zULw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=calian.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HO7O+CioqUBh/mgqYxouOLjq/GsR7cGVI1UNJ/cIDs4=; b=z7jtW1o8m63PaYZFrtqrd+wXuJ2SKil9zxDijKWhtaFgztj2DK9FGZ5ZXDSClpfxpV4HOOxPEKX+Zl1bnSx88jLpIWojxQYgXDrCkU4hKbGW2Chh1TdGgpRu85vgvslSb0CBW11WUyClqxQ81PFtFNZHX+M0eJOAmkZWSOaMLmk= Received: from YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:6a::19) by YTOPR0101MB1065.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:20::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Thu, 20 Jan 2022 01:03:03 +0000 Received: from YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM ([fe80::6929:c39f:d893:b6c8]) by YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM ([fe80::6929:c39f:d893:b6c8%2]) with mapi id 15.20.4888.014; Thu, 20 Jan 2022 01:03:03 +0000 From: Robert Hancock To: linux-iio@vger.kernel.org Cc: robh+dt@kernel.org, michal.simek@xilinx.com, anand.ashok.dumbre@xilinx.com, jic23@kernel.org, lars@metafoo.de, manish.narani@xilinx.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Robert Hancock Subject: [PATCH 2/4] iio: adc: xilinx-ams: Fixed missing PS channels Date: Wed, 19 Jan 2022 19:02:44 -0600 Message-Id: <20220120010246.3794962-3-robert.hancock@calian.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220120010246.3794962-1-robert.hancock@calian.com> References: <20220120010246.3794962-1-robert.hancock@calian.com> X-ClientProxiedBy: CH2PR10CA0008.namprd10.prod.outlook.com (2603:10b6:610:4c::18) To YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:6a::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e52f2823-d16a-46ea-9823-08d9dbb09c4d X-MS-TrafficTypeDiagnostic: YTOPR0101MB1065:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IV9MsTi939bmee3v+RHQM9YkP1MfJ7j748KyI/fS2LYTvgSlDgD1TXD9SFEDN1d8emuyDLcq84W3SYJGuhU6NBQGgbqn7aP0SYTpSyOnsFNMHcwWnbYbIFsUDPMuJ0Ug7Qe5uTtnWNtn824qnXMfjllfCJQoqsvc7LTPGLKu+a1tTOLIwKc/3UPMANZzhkUlidmmw0fQ/w+sO4clamDgPWtLzgHTf3ADzhaq3jHKo8aT6z+jbJXQcTug9n32ZC9bRU4JZdqnxwB4WtqMRFeuFf0WPG7wIhs2Y7ox/m3tvS12u4uNcEqZhZfukSEC3W4FXOC/JM6WrxethBgOkvgO6gv92Iv39CQS+P7IVv4vR8Q8JwdeEoC1cVrrNNgiJ+LNubR1KHkuN3ihaPZEMtMHfxOCnU9fCENF34lcnfFduy1mOjdXSVebddkF+8bPs/ulXgjjpj9yrctuxWRtIfQVNc6JhszLWnGZD4WH6CZPaj4gcQMYZq2O6gs894SC4/zzvGkiKK9Mc48zu25Vu6FL0EG8eoz9w2zcGsdb2DY763bfS+eTx+wCyeWNsgrT1g0jpQ5/aebqdke2TYhVwdU4c0nNc0R+pD9TWnmXeMc5QAFponH9DmxzYSrfnKwdztJOzcfu5msZP5No4mertzRUQxDeYUInaDcz5f7OHTX9n7CZcdVIZeLWv6C+HNjW8G6fiBmU5rpgkE0eoeNqkWDe/w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(366004)(2616005)(44832011)(4326008)(2906002)(66946007)(66476007)(66556008)(316002)(6916009)(1076003)(6512007)(4744005)(38350700002)(26005)(36756003)(6506007)(6666004)(38100700002)(52116002)(5660300002)(6486002)(107886003)(86362001)(508600001)(8676002)(8936002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 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UFzrhqaRODezgY1f2/wMenhcsSKo6SaGwVdvMByBu5MLe7YTKMwc5g4hIAagkUhjI28R8jpbx8iHDCylOFw97iE8dLOVcOrbbwZbv4z0yqUJXfKoeoBpAiALIV/6oJt1VwumeGDB596k96jM7CiUEbsxC6PhpuyGgpIpjzQLVONnHqdfJSMTPWe89cUVgWIV9XrV4jcNiYRS51iqqIlQG+pkPGcsBEDzm3T3g/uhHxOH7S/dy/0g1waavXctVrFCZbG07E7rrT8feUgioUwNSpa8DhmKgJ+XaUKK/IhC3pVogh4B1YNIV3jtqHh2bZXhCay/IHiXJtLk7W4qHIJ/z7KEoOY26B10RluHNeTa+u01/Ril5ZFRjKJaEgWRWYasGfs72x7MMrRzBh6IMeS9U30MRUUzp0vPaEhxndLTFgiNlU0Ras+jqzn/PNuzna8QYR6H1+5fp4ERjomqCyHp6wRHeF2R+LCqwtq+UxCwvPqNlle4jWh9MXxmGbwWS0QjArOrimT5agW2Rg4Irt522esjz74/TpsO0dr5atBWLBgE/3+AqyENgSz/T5SqlDlAninigugWmAn/UPS5Vc0ZTKssvY0svLxM9nVY8Cy3YGzR1Rro9ZlcVAfJ+Yb4tqh+Ic9Iokqt497GHdKEMsI= X-OriginatorOrg: calian.com X-MS-Exchange-CrossTenant-Network-Message-Id: e52f2823-d16a-46ea-9823-08d9dbb09c4d X-MS-Exchange-CrossTenant-AuthSource: YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2022 01:03:03.4255 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 23b57807-562f-49ad-92c4-3bb0f07a1fdf X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: d6oDnQ0MQ7HSb2nIGXkflZV8DfKe7Mx26dIkEJxJ5AHt4VxdCT6tIMJglFkepu/3AaXhLji+6G9dgNNcwWiz55lLFqKT6XyNZJylJnWXu4Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB1065 X-Proofpoint-ORIG-GUID: rJ3jSLKTFKWGGZX0TT_jUHbzszW_dV6W X-Proofpoint-GUID: rJ3jSLKTFKWGGZX0TT_jUHbzszW_dV6W X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-19_12,2022-01-19_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=843 phishscore=0 mlxscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 spamscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201200004 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220119_170318_992749_FE004796 X-CRM114-Status: GOOD ( 10.74 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The code forgot to increment num_channels for the PS channel inputs, resulting in them not being enabled as they should. Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver") Signed-off-by: Robert Hancock Reviewed-by: Michael Tretter --- drivers/iio/adc/xilinx-ams.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c index 8343c5f74121..b93864362dac 100644 --- a/drivers/iio/adc/xilinx-ams.c +++ b/drivers/iio/adc/xilinx-ams.c @@ -1224,6 +1224,7 @@ static int ams_init_module(struct iio_dev *indio_dev, /* add PS channels to iio device channels */ memcpy(channels, ams_ps_channels, sizeof(ams_ps_channels)); + num_channels = ARRAY_SIZE(ams_ps_channels); } else if (fwnode_property_match_string(fwnode, "compatible", "xlnx,zynqmp-ams-pl") == 0) { ams->pl_base = fwnode_iomap(fwnode, 0); From patchwork Thu Jan 20 01:02:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hancock X-Patchwork-Id: 12718140 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 9E3D5C433EF for ; Thu, 20 Jan 2022 01:05:13 +0000 (UTC) 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:References:In-Reply-To: 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: List-Owner; bh=p8ClZAOBd+8rImYjLpOfZAKJuhOirfD6e2UnTzlPVyk=; b=5FTboM4psBQ8zm PoN1QwoY2+z2AkOwqjWdV49Qxx39MaPcuSOxElFYA38lD6GGQTLzcXTnRPJ4ng0tXjUpmMzix7aSE WHOLMCwWPPLqG+8KAYS9TUVLU5banotd8+18u429w9qhkKQziW3sKKJJCrt5m1M2MeZtYnPK6x3TH 5uuowOJQqkrNwPESKkeCXc2CDqEIy+8EZI9RqJT49pzn/plxtuA7V1tPC3ER4sDMyT43FEP/z8cDP MvU54JsaynIu/bSpzsJi8B9wg4Me/a5NpZIWiqnxIICu6B61IhwfiyasdB1DjAomoxId5hLrPhjpQ qYzNkhXgOwZuFia+/CAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nALrQ-0085wv-N6; Thu, 20 Jan 2022 01:03:33 +0000 Received: from mx0c-0054df01.pphosted.com ([67.231.159.91]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nALrC-0085tG-Mo for linux-arm-kernel@lists.infradead.org; Thu, 20 Jan 2022 01:03:20 +0000 Received: from pps.filterd (m0208999.ppops.net [127.0.0.1]) by mx0c-0054df01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20K0w4gU013047; Wed, 19 Jan 2022 20:03:06 -0500 Received: from can01-to1-obe.outbound.protection.outlook.com (mail-to1can01lp2050.outbound.protection.outlook.com [104.47.61.50]) by mx0c-0054df01.pphosted.com (PPS) with ESMTPS id 3dprrpg6d6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Jan 2022 20:03:06 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U3JIZ19RWcERIIq1c4FmJQMEqPHlJEsGn+UtEQ/cM4y79VWpti3oKGhaKiG+r8cM3Zp+UXJMt+oGRJVFB/6yPWt9rowey+vaH34wDxQnuM260hbeQettel18FBXscQszb+GRgoZEGvEtzocDoL1KRjaGCo4s6QqcyKhe4h+H3cf7LnBrFgHKUfBH7vNoh8tlUwRc4RsKIuw/AaJkXY9zLJWhQDpk89oONvYzkpc9Q02sA5xC3gPDflo2wmj02z9uiUCItvS95xB0rKoWBMmVRx2fcTJxZGvAdwXGiDipGNJvEGtKUSjDj95b6aS7995nDX4GcoAl4MhVSGi3vNWutw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5EbvfIK5ml9OrTJ5NUqULhZb2XjPh8IkhcVRUz0ltH0=; b=iitRv6JlhukxER1wS3NB7ESMM+/mvPaL3g5ZVVhz5GEGTPZzpWFbz/juOVBCly4NpSNmOFF4GuMOhReZB2lQPKc3dckBNDbA0f/xKAD14lLMydIR3XvBZQNWaMQnBTB8o0Og2GlPy5Z5u5KfxWy+cVoFAcMf0C4mo+75wtY1acu+unWX+pzyFh9YA72v7KA6jvgRAGgyrdUttNkqOl2hIxoHGcCQfyazS4aiC6zizuPDFQPScm0HZzV90sgWn25PvyRwC+lBQIDJ1DkAJfjykJR849XJ+33v1DT1JlTbvx84Z4QbSEsuidhprPXCVLQG1q94XEgG6yfOVJyaZ/sJqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=calian.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5EbvfIK5ml9OrTJ5NUqULhZb2XjPh8IkhcVRUz0ltH0=; b=wvQCTpTMqCfJOpqK5vK/a93nXR5bqR4+ic+2Fv4iixoCMu8w6NgF1tfNdMLu2teJk8LtgNAWt0oWIZQ49vKNQk/EFiqXdZ4o1mVXYx2AB3lMZ17PNu/5sqkW4hoDvfsz/mn4hEFZ6hIFmss5ygivlz8+EJiMoYKgRQgAV/xnpVY= Received: from YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:6a::19) by YTOPR0101MB1065.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:20::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Thu, 20 Jan 2022 01:03:04 +0000 Received: from YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM ([fe80::6929:c39f:d893:b6c8]) by YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM ([fe80::6929:c39f:d893:b6c8%2]) with mapi id 15.20.4888.014; Thu, 20 Jan 2022 01:03:04 +0000 From: Robert Hancock To: linux-iio@vger.kernel.org Cc: robh+dt@kernel.org, michal.simek@xilinx.com, anand.ashok.dumbre@xilinx.com, jic23@kernel.org, lars@metafoo.de, manish.narani@xilinx.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Robert Hancock Subject: [PATCH 3/4] iio: adc: xilinx-ams: Fixed wrong sequencer register settings Date: Wed, 19 Jan 2022 19:02:45 -0600 Message-Id: <20220120010246.3794962-4-robert.hancock@calian.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220120010246.3794962-1-robert.hancock@calian.com> References: <20220120010246.3794962-1-robert.hancock@calian.com> X-ClientProxiedBy: CH2PR10CA0008.namprd10.prod.outlook.com (2603:10b6:610:4c::18) To YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:6a::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 011b6738-58d0-4fbe-ff8d-08d9dbb09d1a X-MS-TrafficTypeDiagnostic: YTOPR0101MB1065:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4125; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xxN8bjNkJaggdcqWC9xUGOJNjO9PJIzn9ijioHIu3CWfeMkmbaTDkfSgwZ+PGamKobWoLIGMgCQkZHLar4IV4il4v1kNdY9cQ3RIPPTyjuCWUa5z4ZCTl5Mi5W/WcEaeqAxUum/nPe45491SFifg53M7lmRRSOMcylXSU5UHb+DfG3vtmwxzqnCwNvcPED4OwSrm2HxpcQ/2mqFcN2Ttxir2uY+otsR2Hkta7sV3Pi23TZVHNbKSEISyzvQkVgOkU+0Di5MgXiwg6dkUs1r0NI7Forbm+eOV48ZVVAA88zSHCzHB+DDqdJ8EXK07xwHoxjMzuhkRvBKTN2j1UnQq3jGASPGOzLIK6tKKMCGC3VvZ3RVgyGP471ErYH/ZLdLzb2lE26FPkC7Yck/nnQxQltKEZHz+hSijMP/+IvJzjzmM1VhWiWOI2/d+hRT+iGzFtDW/ZDUER5J1Md6hmCE31NOlYqst6hh8nYkm6t/kA5AAbbBBHnlLXumDjRY5JzmjMLOyBBqcFwuVnJfoPVWZBWTGLaPmwFe8W6xJhCTB/e1bszRFZD+WKzqDxYIV70oySO7kxaG4+TJSUirxWGQ22bfKs3AGRO7+TIVASvCl55Bl43JuDwBsN0epmmzNbAHRqPBzsNhhwif1OhnWpnfLuBbFifkmX9ulnE8BlQ+WWo8mVyM3yVPAJ8N4+T+uUXPjl09WaNbd5McKdWBWqp4wxg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(366004)(2616005)(44832011)(4326008)(2906002)(66946007)(66476007)(66556008)(316002)(6916009)(1076003)(6512007)(38350700002)(26005)(36756003)(6506007)(6666004)(38100700002)(52116002)(5660300002)(83380400001)(6486002)(107886003)(86362001)(508600001)(8676002)(8936002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dr56mB4dIzXdo6f5X6Lsfi0zYdS450nh6b01LCssrj1sWVdmUfLwPHq6qTQWUcsspGohvhu3z9oW3Ep4hFCCI1YTiqAVPBNOHeKA5WM2w5b1sncJgCDSVoMKWSwE8ZCCqznXJlVKNgoYQuIVuasSshu7riiczpgiyFjZTRlksJ/vCPG1/htk4Zk0tWyPlDcL4wmPbZc2Jmx6x6kxxYCuwly+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EM6/CwMhd4/fFsHgUOrmr8UBxrBn812YjTh/BYmluy49yE+MovbNorl73voaY8qx6H+jhoIPZ4+ATyIdHMOIK5NOBnH7uH6VFcU71IZFkW07YtdLcRtrTRu0fjswIEc0ozIKVeey8rrFEMOMexzHLW7L5DR1q4RJigsGEDOgYECAAT8AySRQYFs+BYTqNl2eAxX3rGA2O7OiWUS4qxmOjbRlm31Z/jbnhCkMZEKSDyB4ygHVWqA32SZm+yGyiAHe2nsMjbSXKGqxmVPIiIUYQRvjLRB2d7Vfn3RD6kjmrfHij0y+XKrP1n2Pky2yHgQT4Qr9GvmZFjT3+vvmgd/QgwpGL+ouYRos1s6dOuVfHO18KJAcksJtgxyKaCMjO8Hr8xwtUVNZ3bcDSaB26FHdyNeEJeh7iP5eODlv9XAYxNyvz4= X-OriginatorOrg: calian.com X-MS-Exchange-CrossTenant-Network-Message-Id: 011b6738-58d0-4fbe-ff8d-08d9dbb09d1a X-MS-Exchange-CrossTenant-AuthSource: YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2022 01:03:04.7716 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 23b57807-562f-49ad-92c4-3bb0f07a1fdf X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: elipaSNEpWqqH0ELe2t9xha5jBOTHQDdW3bmpdEiC2vNPFSKpApQBBTlKjY9Z4ZBnLeVoszw2JOe+7v/CQSYk6pblfNGnZZ0CE6A9IF4Q4A= X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB1065 X-Proofpoint-ORIG-GUID: v3gkoeNrc1juhIkhNxG-F4WLTeZXyPo5 X-Proofpoint-GUID: v3gkoeNrc1juhIkhNxG-F4WLTeZXyPo5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-19_12,2022-01-19_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=958 phishscore=0 mlxscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 spamscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201200004 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220119_170318_991744_A1867C8F X-CRM114-Status: GOOD ( 10.83 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Register settings used for the sequencer configuration register were incorrect, causing some inputs to not be read properly. Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver") Signed-off-by: Robert Hancock Reviewed-by: Michael Tretter --- drivers/iio/adc/xilinx-ams.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c index b93864362dac..199027c93cdc 100644 --- a/drivers/iio/adc/xilinx-ams.c +++ b/drivers/iio/adc/xilinx-ams.c @@ -91,8 +91,8 @@ #define AMS_CONF1_SEQ_MASK GENMASK(15, 12) #define AMS_CONF1_SEQ_DEFAULT FIELD_PREP(AMS_CONF1_SEQ_MASK, 0) -#define AMS_CONF1_SEQ_CONTINUOUS FIELD_PREP(AMS_CONF1_SEQ_MASK, 1) -#define AMS_CONF1_SEQ_SINGLE_CHANNEL FIELD_PREP(AMS_CONF1_SEQ_MASK, 2) +#define AMS_CONF1_SEQ_CONTINUOUS FIELD_PREP(AMS_CONF1_SEQ_MASK, 2) +#define AMS_CONF1_SEQ_SINGLE_CHANNEL FIELD_PREP(AMS_CONF1_SEQ_MASK, 3) #define AMS_REG_SEQ0_MASK GENMASK(15, 0) #define AMS_REG_SEQ2_MASK GENMASK(21, 16) From patchwork Thu Jan 20 01:02:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hancock X-Patchwork-Id: 12718142 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 23690C433EF for ; Thu, 20 Jan 2022 01:05:35 +0000 (UTC) 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:References:In-Reply-To: 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: List-Owner; bh=PTC4BHjaEgJy1Pag2KKlp71mLgHC6vVyB0Ab55UjiY8=; b=UMUX3QH5RlXIOL QExhkagpsqwv3zGZuqN4iJvNCJDP7F8PDlfY+Un5pdba8gFh3vULUSEnQ7dNDjN5qGizmNgDHqW5h pGHSHb+kw9n1byzqz0LeDcfNQCNncqXESgtRPWF9HpUaQgFMwzpM+6YMpJjbbrdiEYQbNz7IELWAV FtYTh/o4GaLov/pdv0GWAGgt0C4Amu0BtvUHiKWsdBF1WzxH5qJ6FCHH2lLBzBJDq5ZGFU5Ezvypi /MZOCGuoSOQP8azFlGxBBMZwUTQiG+SMPdSdqkjnIBEROyXc1kRrrkXS8nMqCsWkCSZQ+hkLsjyYZ LTB9/x+uM3eySlC+WGgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nALry-008633-F6; Thu, 20 Jan 2022 01:04:06 +0000 Received: from mx0d-0054df01.pphosted.com ([67.231.150.19]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nALrC-0085ta-OI for linux-arm-kernel@lists.infradead.org; Thu, 20 Jan 2022 01:03:21 +0000 Received: from pps.filterd (m0209000.ppops.net [127.0.0.1]) by mx0c-0054df01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20JNHfL4017531; Wed, 19 Jan 2022 20:03:07 -0500 Received: from can01-to1-obe.outbound.protection.outlook.com (mail-to1can01lp2056.outbound.protection.outlook.com [104.47.61.56]) by mx0c-0054df01.pphosted.com (PPS) with ESMTPS id 3dpmt68b92-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Jan 2022 20:03:07 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cs8paROcCsrSCtN30FkgToJoDvSjmFOG8QanvfgORSfcV8GYzujOI0jcKCPyjLkN83ZCPFdGvax1/N6OTAl8s3sY9+MILv81mw7L2pP18bQ6UHtSTMYS9vvp5AyRyRxzdZDrCl2eqGSnpNF9ExVl9u7/Rayb+/3j8X1ht5V3llwHRD1oa73gD8UySIvi3ElkIA5gCVU7jwlopopjnSS4C4Z4qwKie23MDJQ0hdVO31RQn7WDnt5uaE5eUyVk8GbkWYzWvTvZwsKigxU9qf9LeC3IWF042TBIhn7WUMQ5+f8vKuFiEq2MKXkm7oNg7xzxmqkTBmJsmSoBkd6mq2UC6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KwlHAXbj05qn9RWsqcRK51QW6q2ZXHSzH6cPrjoys8U=; b=XcHTMhiEkkF67xiyFjGuPQze/Opv4dTEeuwgfNd7f+oX6xupSJj9FGhHvcQL2Bbc4YojZ8iDmwNeB+pnKk9cPkeYMHN7jaRkVdkGWsp5VSi6q8xVg+ZRpPF76TVZkL1i4Cr/7dF7Z9TYdUud8Q5sh+JfwYZERmwsEs5nRHlIHi5M248bcNA1xVK4WcQi5oyAvY6+3HYHHqhWkBN57tVFnGmos2zhJy/7/LfI60VM5I9vzPVV/bR2Mv7jGMcYqrKYmSvkIGD8kt4d0H9jMRN0+24HkrojtRMrzP6RGQCk+sX+72LTzg/OB9LeIQl6DWJmerXp/fjJ2Ud6suSXs0clmg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=calian.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KwlHAXbj05qn9RWsqcRK51QW6q2ZXHSzH6cPrjoys8U=; b=cwx6eFEh3kcbqVyNRT+q/qhgvYUGWZueHoJNT6Bw+mqUTG5J1oLHeAawV75UFlfEdXDEPwggLz3awDcwdn8AJr5Fx+grE+nUab5P5FXda5U+8UtVeqpfyuvC15ytcDaMLvVigFEVbpkbPhYOPEdYtf8LlBcufrFhnUBpxnEweQY= Received: from YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:6a::19) by YTOPR0101MB1065.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:20::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Thu, 20 Jan 2022 01:03:06 +0000 Received: from YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM ([fe80::6929:c39f:d893:b6c8]) by YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM ([fe80::6929:c39f:d893:b6c8%2]) with mapi id 15.20.4888.014; Thu, 20 Jan 2022 01:03:06 +0000 From: Robert Hancock To: linux-iio@vger.kernel.org Cc: robh+dt@kernel.org, michal.simek@xilinx.com, anand.ashok.dumbre@xilinx.com, jic23@kernel.org, lars@metafoo.de, manish.narani@xilinx.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Robert Hancock Subject: [PATCH 4/4] iio: adc: xilinx-ams: Fix single channel switching sequence Date: Wed, 19 Jan 2022 19:02:46 -0600 Message-Id: <20220120010246.3794962-5-robert.hancock@calian.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220120010246.3794962-1-robert.hancock@calian.com> References: <20220120010246.3794962-1-robert.hancock@calian.com> X-ClientProxiedBy: CH2PR10CA0008.namprd10.prod.outlook.com (2603:10b6:610:4c::18) To YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:6a::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d791f610-5560-4f82-3bf2-08d9dbb09de8 X-MS-TrafficTypeDiagnostic: YTOPR0101MB1065:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ytiv9BbZ7kNlu8SBWUrOAVyo1x8Dh1ZseJ9jYhOWZb//CHvEhEtwqpZ2pEsxnHE3jfVeMC7GEqeA0MwzZat4cbpFhiL68OqTVpSsyOjdi+F6QgCmNqGB558KxI4FapZlWYm0RDHDmWV8ixWvKqv479YnoG+TGD16iXTF43fYthq/by/pgD2KL45eScUF9CWnmTk+1Kvaknrtmmz1c6XoHVE0sKsRMciXaaX8WrhKzfohkveNXHTJvWCR4etzSgNuyzUZaSW/C3Po/xzajLuKWUGW4LOmJ4yffUTj7//YxYqyvK3yiGylRellJdRnVJGmsShUnRM20oAHz77102IXHLz2Bm1mQjjc9K7BorrbppWwZ5u/0uRIklpKuRPioq0ExBPEiTb6RfLS9Fx2Onrtv/P2+5KnzkbEcUqj3JeDKOA1y8J9aG2YpmUwSL0KMeDQNcQJh4zOFj9SxSCM0Z4QHZQgDsuGfFRZatdKvlLjaF7krbrht98aFIp7VdrqR2hD5YOM8Tj5aGBtxp9RpwPVsNIlkCGuXFdkEqvb1aezPwod6HLK4lzB7BcecQr8EAF5UvSzjTLxnkePorbAETNHA9IVIMrLGPkSD8KgtN+7J8HahqZ/sxLRiJfy3Sk5/6nhdFZdHqdfylC8n5HQ7iO2M1B9s7CSpJAq7b0DXjo+IDNJ3ZUTiWOaJE7dmj9RC8mnenpV2dpjWAjxHKrxYS6yGg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(366004)(2616005)(44832011)(4326008)(2906002)(66946007)(66476007)(66556008)(316002)(6916009)(1076003)(6512007)(38350700002)(26005)(36756003)(6506007)(6666004)(38100700002)(52116002)(5660300002)(83380400001)(6486002)(107886003)(86362001)(508600001)(8676002)(8936002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /O/AMc1ZZC2v6y4QmLTgONtRBPed3WV1LkZHvLfZxzxnyaYxi39YKpUF19XkzIXc9yWH9N5Rvd30aEHZT8JfX0nDDXZY7pAm/L2r1MlMBI3ETY/1UEDesXoXPDiSLYqerQ7HpWGU/U38XRzbcpticcruGfcC+ANdLiVJClvWR8tHG7N+7osQ70eNQXZfZQ+UgzE+zX3sfwCJ8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c4DIvZ1Q/jwpXYG6b3dNYUNbU5fY5eG2rnfehyhk8A6AHvbCcUTIj4LRVdwU2nsVwz0hD7BhvAv7Fr9KpncaTbDlnHqpA2tdUqegO4V75ue7RUwMrfFgXEDuXKxYHhX5+N70TvMgjGgmxlGF0/mdGQOhtYTUEH16K+H38hAt64WlmoixuIxSY+XrzPjh6pUFWVasB1F3az0ysmWhWeM9wqvjF9zv4PPtVkU0pPGm//NhSZWDH6evP+4gps+6TREs4LDOd+p8eYp8xo32OqpqbFjuvbcmqDsoNk3yLlRI5YHKlI5a9SrlFoZkTiRPQp2SIWAnOo3ZksULQUMM+2b2XWR8KwhTUNPfprNUHQZJgqita9QwXI4e7hEQ9cwP2fXOKEdoC/XH3Pgi1okGFwW8luVtgiEF7g= X-OriginatorOrg: calian.com X-MS-Exchange-CrossTenant-Network-Message-Id: d791f610-5560-4f82-3bf2-08d9dbb09de8 X-MS-Exchange-CrossTenant-AuthSource: YT3PR01MB6274.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2022 01:03:06.0855 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 23b57807-562f-49ad-92c4-3bb0f07a1fdf X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ADaFm85sbRVk8EENEhERg1RCxEDdnqCGZuqUKGdhSf9a+cr+bLwcJx1T3qJU3UrEOb0D52LGAztnSW4F04ptH4nKBjaneNXabkyZaWPESfo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB1065 X-Proofpoint-GUID: 9gaOnxvw_GEtQ46BdxTXKgPM0VwoxRfz X-Proofpoint-ORIG-GUID: 9gaOnxvw_GEtQ46BdxTXKgPM0VwoxRfz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-19_12,2022-01-19_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxscore=0 impostorscore=0 adultscore=0 spamscore=0 mlxlogscore=827 suspectscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201200004 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220119_170318_973338_75F5935F X-CRM114-Status: GOOD ( 17.13 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Some of the AMS channels need to be read by switching into single-channel mode from the normal polling sequence. There was a logic issue in this switching code that could cause the first read of these channels to read back as zero. It appears that the sequencer should be set back to default mode before changing the channel selection, and the channel should be set before switching the sequencer back into single-channel mode. Also, write 1 to the EOC bit in the status register to clear it before waiting for it to become set, so that we actually wait for a new conversion to complete, and don't proceed based on a previous conversion completing. Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver") Signed-off-by: Robert Hancock --- drivers/iio/adc/xilinx-ams.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c index 199027c93cdc..7bf097fa10cb 100644 --- a/drivers/iio/adc/xilinx-ams.c +++ b/drivers/iio/adc/xilinx-ams.c @@ -530,14 +530,18 @@ static int ams_enable_single_channel(struct ams *ams, unsigned int offset) return -EINVAL; } - /* set single channel, sequencer off mode */ + /* put sysmon in a soft reset to change the sequence */ ams_ps_update_reg(ams, AMS_REG_CONFIG1, AMS_CONF1_SEQ_MASK, - AMS_CONF1_SEQ_SINGLE_CHANNEL); + AMS_CONF1_SEQ_DEFAULT); /* write the channel number */ ams_ps_update_reg(ams, AMS_REG_CONFIG0, AMS_CONF0_CHANNEL_NUM_MASK, channel_num); + /* set single channel, sequencer off mode */ + ams_ps_update_reg(ams, AMS_REG_CONFIG1, AMS_CONF1_SEQ_MASK, + AMS_CONF1_SEQ_SINGLE_CHANNEL); + return 0; } @@ -551,6 +555,8 @@ static int ams_read_vcc_reg(struct ams *ams, unsigned int offset, u32 *data) if (ret) return ret; + /* clear end-of-conversion flag, wait for next conversion to complete */ + writel(expect, ams->base + AMS_ISR_1); ret = readl_poll_timeout(ams->base + AMS_ISR_1, reg, (reg & expect), AMS_INIT_POLL_TIME_US, AMS_INIT_TIMEOUT_US); if (ret)