From nobody Mon Feb 9 02:08:29 2026 Received: from CH4PR04CU002.outbound.protection.outlook.com (mail-northcentralusazon11023110.outbound.protection.outlook.com [40.107.201.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B94C036CDF0; Thu, 8 Jan 2026 07:45:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.201.110 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767858339; cv=fail; b=SPS/izcdwPetiwo62V5HwosKbccrfvPoxfpxP1jhD2IuAX80DR2eOk/CXwwGo2gf2/1wNHFlLnOYUH/PNXt/nyS3teV/5n/eTHiR+0gRhErrqbxu6EIsRmAZhsFCMUNkPjfQZuNot7Xt8YIGJ2j2XU1PN37ydAOmIecGPOxyEb0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767858339; c=relaxed/simple; bh=kbTU57gWD1KtQGZesKBK2zg4Rh9coJMCrSPbwROnotg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=m4CmjxkYrVQtgNb+dpwD2twylWaYQv7VTYhpKanbKePW69mAZJmTtFmkY3d6hfSXcyXAcQU+zaa0YhPLJ3gxq3PctTV8rvreMza2tcS/aITQcm4c2xExQiovgcJoPpE04yaTUxUFSE0cFw3+49Xogum42NHYzXdvJqGBFGrLf80= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=axiado.com; spf=pass smtp.mailfrom=axiado.com; dkim=pass (2048-bit key) header.d=axiado.com header.i=@axiado.com header.b=cK0Zzf54; arc=fail smtp.client-ip=40.107.201.110 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=axiado.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=axiado.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=axiado.com header.i=@axiado.com header.b="cK0Zzf54" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=H3QNMNnMAUuW3GPuipzZ5HjoBXWTXryvog4hJ9uR5e/0ufgabOyTHtQAKAWKLf6uDbJ+KTMocORwf9gtse4xE4Q8THRdrdW0Z+TM4KK1Ln6EbeVm51101HQ1+kQcoBehnX1W1O7sWZAPwb17bSWLtpxYvTL8zmwpTV8DwvMItwHjWyhzNqjhFcVJEO7hWfcuqO4ooGo/d6E62vFCBT+odcsNIWaVEuygMDr22pCr4PKSEsBk1V3phh6SPsWGEFHDLER5yvIhU3XmncoJmQkZjdRBaFK1KZ3OiJfFoAsNsxrw68ML9Zj3SbtkLPbvElbBi0YqiPRI3G/kDOZkJVYbFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=gSXBXQERa5USla5LikQUFSRMJYLQrTyYKzjlYdRmT7E=; b=dMRM2AqdFhuhhVJ78u0W//Kb2dGDOcTkQih74DIGcqr8C71JMe4Tu/ya0U3SRCFMbRzPDpgWSLsguVmgorbf/FciJkhnFY0FEiTnsSxz2NnDQfxh1bprcK7cGnw1sjzCm0CYYZoBjakLgxq9wnVlWn7n/lzlA+TwSakAp6KAwp4CNSMNkoqJ5i9ndiCIQWxeiQFIC38U3llxuuA5rGtrqEO06EQEXUX6bLdDYF9tQM4tZ4OB8zlN5pMm0Hg9KGL8tHRUXcLIprcaOHqjtHk9+mCPYlbdY2x0JQZNQMag9nQKHSNuK5KHiLjrRTbPgtAUZ1A4XCpjLfhS5rMNCoYY+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 4.227.125.105) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=axiado.com; dmarc=none action=none header.from=axiado.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axiado.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gSXBXQERa5USla5LikQUFSRMJYLQrTyYKzjlYdRmT7E=; b=cK0Zzf54XTVKYNs8Rfwditbm7SrbQPSaLaju6pzycVextVOv/LqlHfOs6qJqlWQW/CRvdMrTpMyHcYflH83DJ48WyOVw34nPx2XUY+ff8jz3jozxx/1MSz5qLr3qDtFSSHQT8ci6dsbTQcdQlAf0k+iUx/Vs53xJqUqopHKMX1ArB95QfKHjndbtgANgO7y5AlXeFqB+1d+PGd0+VrRfPfvSf5mDBXLVY9adHg6Saw0IqzbgRe/mpcU1/QfAyWulwmf1iBMk710ze3EotomxAcoEJAgjX8jO+OLMWdaGzN4M9pbIuxkpm3sG0cofBg15b31X/U1jGLLvdMfn6nlmwQ== Received: from PH8P220CA0032.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:348::10) by SN7PR18MB3839.namprd18.prod.outlook.com (2603:10b6:806:f5::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9499.3; Thu, 8 Jan 2026 07:45:07 +0000 Received: from CY4PEPF0000E9D8.namprd05.prod.outlook.com (2603:10b6:510:348:cafe::c0) by PH8P220CA0032.outlook.office365.com (2603:10b6:510:348::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9499.3 via Frontend Transport; Thu, 8 Jan 2026 07:45:16 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 4.227.125.105) smtp.mailfrom=axiado.com; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=axiado.com; Received-SPF: Fail (protection.outlook.com: domain of axiado.com does not designate 4.227.125.105 as permitted sender) receiver=protection.outlook.com; client-ip=4.227.125.105; helo=[127.0.0.1]; Received: from [127.0.0.1] (4.227.125.105) by CY4PEPF0000E9D8.mail.protection.outlook.com (10.167.241.71) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9520.1 via Frontend Transport; Thu, 8 Jan 2026 07:45:06 +0000 From: Vladimir Moravcevic Date: Wed, 07 Jan 2026 23:44:37 -0800 Subject: [PATCH v3 1/3] dt-bindings: spi: axiado,ax3000-spi: Add binding for Axiado SPI DB controller Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260107-axiado-ax3000-soc-spi-db-controller-driver-v3-1-726e70cf19ad@axiado.com> References: <20260107-axiado-ax3000-soc-spi-db-controller-driver-v3-0-726e70cf19ad@axiado.com> In-Reply-To: <20260107-axiado-ax3000-soc-spi-db-controller-driver-v3-0-726e70cf19ad@axiado.com> To: Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Harshit Shah Cc: linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Vladimir Moravcevic X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1767858304; l=2261; i=vmoravcevic@axiado.com; s=20250904; h=from:subject:message-id; bh=kbTU57gWD1KtQGZesKBK2zg4Rh9coJMCrSPbwROnotg=; b=MyEsM0j3ABMWIU0TMuMzlaAHQ29XR/6GKo1+RrmIxG93I18nNP9+gNWNjcsiIFYrnGV6jWyvo qGIubr3HvcNCB+wUHQSO3EIe6NRujkVIBVqQrCXNxRPCDqOI/b7AgOU X-Developer-Key: i=vmoravcevic@axiado.com; a=ed25519; pk=iiyhWhM1F4HlCbbW3I3qKZhPCE8JsCrDQMgCBRg4YMA= X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D8:EE_|SN7PR18MB3839:EE_ X-MS-Office365-Filtering-Correlation-Id: 26c2679c-3ac5-4319-f3cf-08de4e89d7d1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|376014|1800799024|13003099007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?MXlxb1RiYjRmYmdKaTcyRDNkbTNRbmpuZ3duTm92VFRObnBYRlZMNyt3MlBh?= =?utf-8?B?T1NTS1pOdFhXQ2FoWVU0QmVmRm9HVk9reVZBajFiWDdvTU5NVXREZTRNalpD?= =?utf-8?B?cFRUVkVVRFdoYTdKbzBXYnhBeHRUQTdDSVhsU3RKSFhQRHBxVkREVEdRMXFq?= =?utf-8?B?U1hvbkRMQndzaktFVUtMalYvZDhoOG5Oell5WXpPNVRremEvMUFvSFZSc3Fw?= =?utf-8?B?L1B5M25COUhFQ3dnd25EU3dwY0Yyb2tXaEV0ZEtmeW5xd042UGFldU9ISzhT?= =?utf-8?B?dXVmQUhjaVFxNDlwbGNQVnF2aXMxWHE5TmViRElJaDJLOWhIa0tpUzIrYjA1?= =?utf-8?B?ZnlZaVg0ZnlzQjZQOUpSR3hiaGpKeU8vVHhZRUIyN2dDODJtZ25LTmFtb0Ex?= =?utf-8?B?UUFNZG0wZ0xGRDliVlZPVDF3RFRQMjlSZ3V2Sko3dXJuMWU3WWkrL0duNG9N?= =?utf-8?B?QUk4OS90SVFKUUkvRUpWOEZwK3Iwc1NibkNyTE9ybjI4Q21rakgyMWVSK3pj?= =?utf-8?B?cDZRNHJuL2Q3ZEpsdXdIRDB0T3diQWlVTjZ3OWN3cENHcnUvbG9XNGhjZHNn?= =?utf-8?B?cjBuZlZmeUw1L2drdWZhb3Npb0h1M3d0MlhRZFE3TDFoYUIzbWJNTTdLWmxK?= =?utf-8?B?ak9uWFh5aEh0YzBTbDBubjdmVGhCREV6ejZjaUZhbDRUd3BxS1ZTWndObmhs?= =?utf-8?B?YlpQd1FzbzUwNG1WeWx4NlFUUzlUbHZLWFUrYXI1MmUyVW9QS004NnZ5RXZU?= =?utf-8?B?dVFvVFB3dUQwK25qWHZnQkJ6cGNSUW9tc1VOVC93SUNHYXJJU2J1dEZPOTMw?= =?utf-8?B?TjFwb2lwY0hoQjBrVTNsNWd3SW5mT0JERFlGTW9JRk9SV0FIWUVteXRnYUpq?= =?utf-8?B?QTljZndLN2swRHNYbmZHek1FZTVOQ1AwcGtPWmh5bUU1dG5ndXlZSllkVHIv?= =?utf-8?B?enUraW5tbDFQWlV1bGRWNkI1OEc5d0IzZlkxblBoS2MxejRXRDVzc1NoQ1Fk?= =?utf-8?B?Q3JCZHU3ZTM3ZTlVU0hEVGdGcHRBdFBrS1Izb3FVTzVmcG1iWnp4eExKYjI1?= =?utf-8?B?cGtVUlJIRnJPSHZiUmQwaEZyYkN5Q2dHcWZCVEdtTkVsWkhVbW1WUVdoUm0r?= =?utf-8?B?OWFWTlNJSDZwVm1GeWJmam8yQVpYamVUcUpjdG5INTRYTHFRcGhqNy9tRXlw?= =?utf-8?B?cHdUbW9NNTlxWnBVaUFaaEo4QVREWXRHbTVEcmJqSTdaVVZCOHJYTTJxNVZQ?= =?utf-8?B?M1libjZTU0RjeVdtNzI0SEpSVVZNT2RzdW45VXYvS0xlQ2pYNEJrQ1Q0TnYr?= =?utf-8?B?aDkraVovbGhXb3JVTVZUZTduaTJBRTZLYmlzczBza2lwV3lrNEZmZWpOMUtl?= =?utf-8?B?bzFZRzZKNGcySTAyVUhuelN2NnBwUnZQVFJjMTQ4Q2dUMy91VWZwRDludE1L?= =?utf-8?B?SW9XbDJFOSt2QWtlNHhFektReS9WbGhKMFZmaXU4WWQrRGFlUG11d2NxRmEz?= =?utf-8?B?QU1FMDloOVVZbHJ1bjBtUzY0OVJGSnVpZ3h6a2xJVEVKQ2ZWWEF5dGJ4ZzNu?= =?utf-8?B?YXBHQkwxa0JyQmFmZUR0YU5DQ0hPVXZ3bjBjOTU5bkZkODNQU01KNmNoNWRS?= =?utf-8?B?VjlqWXRqUVEvVnpVL1pHdkVHMjlrSXM0a0oweU9xelhRS1dKdXp1Y2Ntamhx?= =?utf-8?B?OCtyaldmYlZPMC9pNGM4T1VCNEphVDIxWDZVMVlNNVA4WTRrMmt1dExqUUVv?= =?utf-8?B?TnNRbGJJMjE1cVo5dUpLSDgzWlVxNHZvZ0w0ODR5aWVEanpnaDhvV2tNU3d1?= =?utf-8?B?S2Rla09ZZ01xdDB4SDBhbjZpbE9RY2g5NGlLd3BDQU01b1hqYk00NmpkVmVx?= =?utf-8?B?TC9FYXVoZy9IWkhZSWtYOFJLK3JwT25lczc5NjMxN3YrdGx4WGJLbDZzaEdE?= =?utf-8?B?REE4MWVQc0VXRjNpUGUrN1BGT3V5THNsY0lFT1phckZNaWJ2eWVKang3Q1FD?= =?utf-8?B?ZWtCMEx0SGpJM0N0ZkJxQmM4bGhibXFGU2lWNGRSajM0bnNjVFkyek1VczRO?= =?utf-8?Q?tevwR6?= X-Forefront-Antispam-Report: CIP:4.227.125.105;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:[127.0.0.1];PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700013)(376014)(1800799024)(13003099007);DIR:OUT;SFP:1102; X-OriginatorOrg: axiado.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2026 07:45:06.3951 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 26c2679c-3ac5-4319-f3cf-08de4e89d7d1 X-MS-Exchange-CrossTenant-Id: ff2db17c-4338-408e-9036-2dee8e3e17d7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=ff2db17c-4338-408e-9036-2dee8e3e17d7;Ip=[4.227.125.105];Helo=[[127.0.0.1]] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D8.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR18MB3839 Add documentation for Axiado Digital Block SPI controller. Co-developed-by: Prasad Bolisetty Signed-off-by: Prasad Bolisetty Signed-off-by: Vladimir Moravcevic --- .../devicetree/bindings/spi/axiado,ax3000-spi.yaml | 73 ++++++++++++++++++= ++++ 1 file changed, 73 insertions(+) diff --git a/Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml b= /Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml new file mode 100644 index 000000000000..cd2aac66fca2 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml @@ -0,0 +1,73 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/axiado,ax3000-spi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Axiado AX3000 SoC SPI controller + +maintainers: + - Vladimir Moravcevic + - Tzu-Hao Wei + - Swark Yang + - Prasad Bolisetty + +allOf: + - $ref: spi-controller.yaml# + +properties: + compatible: + enum: + - axiado,ax3000-spi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clock-names: + items: + - const: ref + - const: pclk + + clocks: + maxItems: 2 + + num-cs: + description: | + Number of chip selects used. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 1 + maximum: 4 + default: 4 + +required: + - compatible + - reg + - interrupts + - clock-names + - clocks + +unevaluatedProperties: false + +examples: + - | + #include + #include + + soc { + #address-cells =3D <2>; + #size-cells =3D <2>; + + spi@80510000 { + compatible =3D "axiado,ax3000-spi"; + reg =3D <0x00 0x80510000 0x00 0x1000>; + clock-names =3D "ref", "pclk"; + clocks =3D <&spi_clk>, <&apb_pclk>; + interrupt-parent =3D <&gic500>; + interrupts =3D ; + num-cs =3D <4>; + }; + }; +... --=20 2.34.1 From nobody Mon Feb 9 02:08:29 2026 Received: from CH5PR02CU005.outbound.protection.outlook.com (mail-northcentralusazon11022086.outbound.protection.outlook.com [40.107.200.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92EFC36C5A3; Thu, 8 Jan 2026 07:45:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.200.86 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767858323; cv=fail; b=ZKS0Wzh3pEagtvffqkqRi2lhfbBUKIGPLckwAqtwrVSLJSNVCZkgl0Mf/C4jpYiwXtRLPTJ8KMJVQylAH46/pfxEPvN2d+5bwDEaAYbwKbkYSgL6xyz1BqbAxDa81yFhqTWXyxZkqw9htI80mFkw2JzrVGVjPggY5dcgeca0E78= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767858323; c=relaxed/simple; bh=UHaiLs7Eu5Y26GKQkahdLmjHynnWwijWWeZp1E+J4Ho=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kBxgj8OHUqh6m4XVXXPBT1kMWn7l/5PHLg/h3zX3Q51lWEaXcYRNZm/qor265YYiEtXaCZRloZi5mz5J2goyLxW+SvrlnPfhuH1jtrBSTtistn1u7wbMypaJIQ1XKWPqyxKPTZjCLJj5YcoQ/mQuSOF85NkMrezThP2BIFHv/Es= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=axiado.com; spf=pass smtp.mailfrom=axiado.com; dkim=pass (2048-bit key) header.d=axiado.com header.i=@axiado.com header.b=fE9+KKx2; arc=fail smtp.client-ip=40.107.200.86 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=axiado.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=axiado.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=axiado.com header.i=@axiado.com header.b="fE9+KKx2" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=O8zPLzymFAc9cDY9wbJ0xWOpM+NMP0OHxFw2YC7mGULV+uPiQJBOx/i1p0fy5xURozD6h6UoPmToi2mme2QdncPuyaLtWktUETm+KzOwwvG/hK4IWIvUTEL3ngx0AuyNadxNE0LGj7BbW+pJx1B2CiNNv/MBPAdVq9I3pJVMWLdQ5Vy126PlSHrW99vtLRWxxQ5EqDkpADA/E8aKDaNILz0WCTrWKx737yBONPr0hHil10JJwcf1ijs8vz1CeuYTwUBRD1lrlvqlUHPo1fxHdQDwYWM9X4r7bvPsQbWil5SaSy2LrSSdGQCpl2pKLDsJqV3/y0I0B8dQ9Vzeb2Mh+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=i8EPNV8QdIN92RtOwy+T5i3jnnyIYZqgSzMmSwxN6mY=; b=V9apDg0RW61rsCKHA3xqCJAdcPT70FFsp5mgd99HCIThG/8rqOocxnHC4cmLawLqLKt4f4AIYk01hWKytI2ZiqeyuAmFAP/zcICPosFdctE06arr03FFpxoURZcnncos+rgGX5Jsjv/Xjn7FutVFSNpoAROUC2PFeYvl0Sv6XdljxF4VBBS1SW6J1yPq9kmB7+AIERVWgNgd4I+UbEWa9CVNgLr1zAkxfT6LtTKb/Uq2QaECKhT3pNXb4SdBneUO321jZzupNTb6KGJbpNLLhrASJT5zxBX5WDSqtB8KeZafLDe/HE3qTK0YHq3YCJbjUIesv2BeqcAf8qZ7Gdp/CQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 4.227.125.105) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=axiado.com; dmarc=none action=none header.from=axiado.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axiado.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i8EPNV8QdIN92RtOwy+T5i3jnnyIYZqgSzMmSwxN6mY=; b=fE9+KKx28wItrkT3PR2KLRXhS1xseLJuag/kUUmpDVL0JXGOfSMy8K9bDX3adQkWL/DVmTz+F6M6vIQ++iPVCt0FRCMvQjAlWzyWIVVEiineRT4CmnLODe0umVBF72XSSVCIqTjRB3BLtnOWd+M9phKeh9I70tbI9w2qtqaaZ9R/Jl7JLXrL9IrEaMAMaFvd8b+CRtNtBcnpw1cByDXpswNriQ3mkP3vocQq1NxX85/X86Ax9qsgXjjdKTKM+bTi3oJvzDxMo5YbVpAD67G4S/S4CxSW8cWODzH2GIchU/1+vOMihPLXqm4myoYZl77+M4wBSE641Gnm0sEKI7wU5Q== Received: from PH8P220CA0030.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:348::15) by IA3PR18MB927605.namprd18.prod.outlook.com (2603:10b6:208:53c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9499.3; Thu, 8 Jan 2026 07:45:09 +0000 Received: from CY4PEPF0000E9D8.namprd05.prod.outlook.com (2603:10b6:510:348:cafe::8b) by PH8P220CA0030.outlook.office365.com (2603:10b6:510:348::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9499.3 via Frontend Transport; Thu, 8 Jan 2026 07:45:15 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 4.227.125.105) smtp.mailfrom=axiado.com; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=axiado.com; Received-SPF: Fail (protection.outlook.com: domain of axiado.com does not designate 4.227.125.105 as permitted sender) receiver=protection.outlook.com; client-ip=4.227.125.105; helo=[127.0.0.1]; Received: from [127.0.0.1] (4.227.125.105) by CY4PEPF0000E9D8.mail.protection.outlook.com (10.167.241.71) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9520.1 via Frontend Transport; Thu, 8 Jan 2026 07:45:07 +0000 From: Vladimir Moravcevic Date: Wed, 07 Jan 2026 23:44:38 -0800 Subject: [PATCH v3 2/3] spi: axiado: Add driver for Axiado SPI DB controller Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260107-axiado-ax3000-soc-spi-db-controller-driver-v3-2-726e70cf19ad@axiado.com> References: <20260107-axiado-ax3000-soc-spi-db-controller-driver-v3-0-726e70cf19ad@axiado.com> In-Reply-To: <20260107-axiado-ax3000-soc-spi-db-controller-driver-v3-0-726e70cf19ad@axiado.com> To: Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Harshit Shah Cc: linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Vladimir Moravcevic X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1767858304; l=39586; i=vmoravcevic@axiado.com; s=20250904; h=from:subject:message-id; bh=UHaiLs7Eu5Y26GKQkahdLmjHynnWwijWWeZp1E+J4Ho=; b=2q7nRaq1b010lXW3kKj5jOIc/+VHpyJI9YCxrM8UWMFGN6hHUoNEV2SvMoy5Yf72T2wC3+BAK /v4WuqSCIv+BHHMUjB683TlEo8WHI82Aqiu2aQZpmJLJV8GjEORIkyP X-Developer-Key: i=vmoravcevic@axiado.com; a=ed25519; pk=iiyhWhM1F4HlCbbW3I3qKZhPCE8JsCrDQMgCBRg4YMA= X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D8:EE_|IA3PR18MB927605:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e3cc990-f96f-4e54-0d26-08de4e89d8b7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?Vm1PK3FGWnJVWjZBeGtzeWV0SUJPNEl5UkRveDU2WTZpTkZBc3BpRFFnZG5N?= =?utf-8?B?ZEJoSDhQNGtqUDBhUjdkdlN1UXFWOHJTREtOZ3ZuT0M5TEt6dUNJODQyWFds?= =?utf-8?B?WFRRL1NhTHVKeEFuUmFQcnMvUVlQcWZod3N2SE1kbjRHMmFmQ1ZXQ1VYaVdm?= =?utf-8?B?TTBRMW5WbXJnSWowVmZhZXN0Nndkdm9GaVg0OVZMUFlHQVNjdXpkUEJLaVQw?= =?utf-8?B?QXRTMTFVWWR5Z245d0hpMmt1K2d2WHBUWkRCYUVkL3VWYUhmYjNUWDFHc3Fi?= =?utf-8?B?eXNmei9nMWVFdjJhaVgvRkkrclBRbWRpZlFOUWRwTWZ0cUgvdWJuT1ZMaUZh?= =?utf-8?B?ZWtlR1BqQWh2dHFDRW9TRGoxV01hb2ovV0pad0RFN284dmFnQTVFS3YxTFR5?= =?utf-8?B?b0UyTURtQ3kxeVlzVEErSTBpTFhDSitVUWdPWi8vYWFDUS9rTUZxTUZZeklB?= =?utf-8?B?OHRLNGVKcUF4ZDBEYkN3djdpaXZlcXlNbEorbGN3M2doSFN2YTlpS2xFajlJ?= =?utf-8?B?eFFqaUh2OHB6SXVCek00UUVjRzM1SndzaHVueUpXN1N5NktDNE9hekpvY3dr?= =?utf-8?B?b1lsOXpiY1FreFMwUUUzRHFsY3hyb3NCUUlVZzQzcFNwVHpIdVN6ZTZmdC8x?= =?utf-8?B?VHhVS3ZkWmxEczlpSnJIRG9UdHRmKy9DQ2EvMGZZUGQzWWRYZytOQUhzZCt6?= =?utf-8?B?MmJFV2VDTU9RdWhIdTRpZXRLUDhrUk9hRlhua1hudjR6bjFWOXFVMkM2REhB?= =?utf-8?B?azdKZ2RiTVpUdkRvUGkrdnNLOE1nZWRJZjNvMkQ2SUtWWjcwM3ZNTTZwQStP?= =?utf-8?B?V2lGMldSeVp1N0xUeDRjMjUwRWE2R3dKejZjZ05xenh1YUl2QUpPWFVSSmk2?= =?utf-8?B?Y2JRUWY2T1dmLzVZRXJwZzMwdURFVHVvVCtYREJxZVVYR2FEVjcxamFUdXFn?= =?utf-8?B?ckRheDJYclRNcDZkN2VRNW5MdFh5ZlhyVzZ5d0Z2N0xOVDRsLzVVSStRZXgz?= =?utf-8?B?b0RoNElyeUZEN3JXdzhpNTNDVm8wLzYzd3RwdmxQTHphNisrTjNjclFjcFB4?= =?utf-8?B?aElxSGRPTlNJbDlJbENZU1oya25QMjVQdWw1b0dYMGh4cmpsZURQQkovRjNs?= =?utf-8?B?RFFDRzNOakFvNjZNbUM1MVhNQmo4cGVVTm5sa0dVNWRzcCtpS2Z0ajhWNE1u?= =?utf-8?B?QzArQ2RFdzRyL0ZZZytXdCtZQzRubUhZYUpPMGV1TmpEUjhJMmtsREozcjNh?= =?utf-8?B?Zy9ZcFhBQytOYVluTXpNWlVyY2lJcEdiMDdFbVBDbHgyS1pHS05mVzVIdStj?= =?utf-8?B?M1NTdXlZUEEvRjdKWFVxaE9ZdFcyNHVVN045Rmc1alBZRmFsSE14elp1MWtQ?= =?utf-8?B?SFNpbWwzZ1dMK2tPMlMwNlFsbjdxakM5ZU9ZWFAvanoyQ0d3L1ZTdkRoVklO?= =?utf-8?B?MmdGa0lIU1Q0cWZyUFlpbTNKbjdlSkwvQmJxeDdNYTJIblY1dWZmbDJBeCs5?= =?utf-8?B?UmJacXNWTzg3STVnMnowWExhTEtLN0ovVzdjcXozOWJ2eUVwazlMZ1lwalFz?= =?utf-8?B?OHpzQVMvNGdJaFZiU3JKbmlxeHg4d05ZL2x0OEtZR1Y5THpKNTVkQVo5anpM?= =?utf-8?B?VEVPQzhQWnl3YVA3bUFQSFJzdXovL00yRWorb2ZtUHVUZHArRU5yYXB5RDhm?= =?utf-8?B?NkVZUWp1cW52OEVzMGxOdHUzWXBFRmtrV1huQzNSYW9Cc2g5QWt0WDF2aFVy?= =?utf-8?B?bDVvRk1wSkUzQjR3enZqcGpFV3REVUpUaVovNWRtWHA1eFVIRzlESXM1bHMr?= =?utf-8?B?N2RyejVyV2NjSHV2bjZHYjN3ZnpXL1plQVB1SDlUMURvQm1rREttVGNQTjVQ?= =?utf-8?B?NU5Fa1RmZDVGeE1CMjlNRE9wTk9ianVQK2hJQS8yZXkxVUM3dDJvc1RsOUJN?= =?utf-8?B?REY1U0pWN2NQeDE3ZnFPWU1yYkpTbEJkMFpLbzBicVN5SUpXQXpKZWZ4LzNS?= =?utf-8?B?a0xVWUVZRTdCeWl0bFowbVNXdVpZNUVvcndlWHphRVdjcENKcjRreGZKb2dR?= =?utf-8?B?bjRMK0ZOSlhqS0FnOWZBVzV5TERaZjh5dURKKzBVK2Q1ZmtYMFJneVU1RW9W?= =?utf-8?Q?DiA4=3D?= X-Forefront-Antispam-Report: CIP:4.227.125.105;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:[127.0.0.1];PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700013)(376014)(1800799024);DIR:OUT;SFP:1102; X-OriginatorOrg: axiado.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2026 07:45:07.8647 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0e3cc990-f96f-4e54-0d26-08de4e89d8b7 X-MS-Exchange-CrossTenant-Id: ff2db17c-4338-408e-9036-2dee8e3e17d7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=ff2db17c-4338-408e-9036-2dee8e3e17d7;Ip=[4.227.125.105];Helo=[[127.0.0.1]] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D8.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA3PR18MB927605 The Axiado SPI controller is present in AX3000 SoC and Evaluation Board. This controller is operating in Host only mode. Co-developed-by: Prasad Bolisetty Signed-off-by: Prasad Bolisetty Signed-off-by: Vladimir Moravcevic --- drivers/spi/Kconfig | 10 + drivers/spi/Makefile | 1 + drivers/spi/spi-axiado.c | 1007 ++++++++++++++++++++++++++++++++++++++++++= ++++ drivers/spi/spi-axiado.h | 133 ++++++ 4 files changed, 1151 insertions(+) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 5520403896fc..1a707c43669a 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -204,6 +204,16 @@ config SPI_AXI_SPI_ENGINE It is part of the SPI Engine framework that is used in some Analog Devi= ces reference designs for FPGAs. =20 +config SPI_AXIADO + tristate "Axiado DB-H SPI controller" + depends on SPI_MEM + help + Enable support for the SPI controller present on Axiado AX3000 SoCs. + + The implementation supports host-only mode and does not provide target + functionality. It is intended for use cases where the SoC acts as the S= PI + host, communicating with peripheral devices such as flash memory. + config SPI_BCM2835 tristate "BCM2835 SPI controller" depends on GPIOLIB diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile index 863b628ff1ec..3e662d2b69c1 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile @@ -32,6 +32,7 @@ obj-$(CONFIG_SPI_AT91_USART) +=3D spi-at91-usart.o obj-$(CONFIG_SPI_ATH79) +=3D spi-ath79.o obj-$(CONFIG_SPI_AU1550) +=3D spi-au1550.o obj-$(CONFIG_SPI_AXI_SPI_ENGINE) +=3D spi-axi-spi-engine.o +obj-$(CONFIG_SPI_AXIADO) +=3D spi-axiado.o obj-$(CONFIG_SPI_BCM2835) +=3D spi-bcm2835.o obj-$(CONFIG_SPI_BCM2835AUX) +=3D spi-bcm2835aux.o obj-$(CONFIG_SPI_BCM63XX) +=3D spi-bcm63xx.o diff --git a/drivers/spi/spi-axiado.c b/drivers/spi/spi-axiado.c new file mode 100644 index 000000000000..8cea81432c5b --- /dev/null +++ b/drivers/spi/spi-axiado.c @@ -0,0 +1,1007 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +// +// Axiado SPI controller driver (Host mode only) +// +// Copyright (C) 2022-2025 Axiado Corporation (or its affiliates). +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "spi-axiado.h" + +/** + * ax_spi_read - Register Read - 32 bit per word + * @xspi: Pointer to the ax_spi structure + * @offset: Register offset address + * + * @return: Returns the value of that register + */ +static inline u32 ax_spi_read(struct ax_spi *xspi, u32 offset) +{ + return readl_relaxed(xspi->regs + offset); +} + +/** + * ax_spi_write - Register write - 32 bit per word + * @xspi: Pointer to the ax_spi structure + * @offset: Register offset address + * @val: Value to write into that register + */ +static inline void ax_spi_write(struct ax_spi *xspi, u32 offset, u32 val) +{ + writel_relaxed(val, xspi->regs + offset); +} + +/** + * ax_spi_write_b - Register Read - 8 bit per word + * @xspi: Pointer to the ax_spi structure + * @offset: Register offset address + * @val: Value to write into that register + */ +static inline void ax_spi_write_b(struct ax_spi *xspi, u32 offset, u8 val) +{ + writeb_relaxed(val, xspi->regs + offset); +} + +/** + * ax_spi_init_hw - Initialize the hardware and configure the SPI controll= er + * @xspi: Pointer to the ax_spi structure + * + * * On reset the SPI controller is configured to be in host mode. + * In host mode baud rate divisor is set to 4, threshold value for TX FIFO + * not full interrupt is set to 1 and size of the word to be transferred a= s 8 bit. + * + * This function initializes the SPI controller to disable and clear all t= he + * interrupts, enable manual target select and manual start, deselect all = the + * chip select lines, and enable the SPI controller. + */ +static void ax_spi_init_hw(struct ax_spi *xspi) +{ + u32 reg_value; + + /* Clear CR1 */ + ax_spi_write(xspi, AX_SPI_CR1, AX_SPI_CR1_CLR); + + /* CR1 - CPO CHP MSS SCE SCR */ + reg_value =3D ax_spi_read(xspi, AX_SPI_CR1); + reg_value |=3D AX_SPI_CR1_SCR | AX_SPI_CR1_SCE; + + ax_spi_write(xspi, AX_SPI_CR1, reg_value); + + /* CR2 - MTE SRD SWD SSO */ + reg_value =3D ax_spi_read(xspi, AX_SPI_CR2); + reg_value |=3D AX_SPI_CR2_SWD | AX_SPI_CR2_SRD; + + ax_spi_write(xspi, AX_SPI_CR2, reg_value); + + /* CR3 - Reserverd bits S3W SDL */ + ax_spi_write(xspi, AX_SPI_CR3, AX_SPI_CR3_SDL); + + /* SCDR - Reserved bits SCS SCD */ + ax_spi_write(xspi, AX_SPI_SCDR, (AX_SPI_SCDR_SCS | AX_SPI_SCD_DEFAULT)); + + /* IMR */ + ax_spi_write(xspi, AX_SPI_IMR, AX_SPI_IMR_CLR); + + /* ISR - Clear all the interrupt */ + ax_spi_write(xspi, AX_SPI_ISR, AX_SPI_ISR_CLR); +} + +/** + * ax_spi_chipselect - Select or deselect the chip select line + * @spi: Pointer to the spi_device structure + * @is_high: Select(0) or deselect (1) the chip select line + */ +static void ax_spi_chipselect(struct spi_device *spi, bool is_high) +{ + struct ax_spi *xspi =3D spi_controller_get_devdata(spi->controller); + u32 ctrl_reg; + + ctrl_reg =3D ax_spi_read(xspi, AX_SPI_CR2); + /* Reset the chip select */ + ctrl_reg &=3D ~AX_SPI_DEFAULT_TS_MASK; + ctrl_reg |=3D spi_get_chipselect(spi, 0); + + ax_spi_write(xspi, AX_SPI_CR2, ctrl_reg); +} + +/** + * ax_spi_config_clock_mode - Sets clock polarity and phase + * @spi: Pointer to the spi_device structure + * + * Sets the requested clock polarity and phase. + */ +static void ax_spi_config_clock_mode(struct spi_device *spi) +{ + struct ax_spi *xspi =3D spi_controller_get_devdata(spi->controller); + u32 ctrl_reg, new_ctrl_reg; + + new_ctrl_reg =3D ax_spi_read(xspi, AX_SPI_CR1); + ctrl_reg =3D new_ctrl_reg; + + /* Set the SPI clock phase and clock polarity */ + new_ctrl_reg &=3D ~(AX_SPI_CR1_CPHA | AX_SPI_CR1_CPOL); + if (spi->mode & SPI_CPHA) + new_ctrl_reg |=3D AX_SPI_CR1_CPHA; + if (spi->mode & SPI_CPOL) + new_ctrl_reg |=3D AX_SPI_CR1_CPOL; + + if (new_ctrl_reg !=3D ctrl_reg) + ax_spi_write(xspi, AX_SPI_CR1, new_ctrl_reg); + ax_spi_write(xspi, AX_SPI_CR1, 0x03); +} + +/** + * ax_spi_config_clock_freq - Sets clock frequency + * @spi: Pointer to the spi_device structure + * @transfer: Pointer to the spi_transfer structure which provides + * information about next transfer setup parameters + * + * Sets the requested clock frequency. + * Note: If the requested frequency is not an exact match with what can be + * obtained using the prescalar value the driver sets the clock frequency = which + * is lower than the requested frequency (maximum lower) for the transfer.= If + * the requested frequency is higher or lower than that is supported by th= e SPI + * controller the driver will set the highest or lowest frequency supporte= d by + * controller. + */ +static void ax_spi_config_clock_freq(struct spi_device *spi, + struct spi_transfer *transfer) +{ + struct ax_spi *xspi =3D spi_controller_get_devdata(spi->controller); + + ax_spi_write(xspi, AX_SPI_SCDR, (AX_SPI_SCDR_SCS | AX_SPI_SCD_DEFAULT)); +} + +/** + * ax_spi_setup_transfer - Configure SPI controller for specified transfer + * @spi: Pointer to the spi_device structure + * @transfer: Pointer to the spi_transfer structure which provides + * information about next transfer setup parameters + * + * Sets the operational mode of SPI controller for the next SPI transfer a= nd + * sets the requested clock frequency. + * + */ +static void ax_spi_setup_transfer(struct spi_device *spi, + struct spi_transfer *transfer) +{ + struct ax_spi *xspi =3D spi_controller_get_devdata(spi->controller); + + ax_spi_config_clock_freq(spi, transfer); + + dev_dbg(&spi->dev, "%s, mode %d, %u bits/w, %u clock speed\n", + __func__, spi->mode, spi->bits_per_word, + xspi->speed_hz); +} + +/** + * ax_spi_fill_tx_fifo - Fills the TX FIFO with as many bytes as possible + * @xspi: Pointer to the ax_spi structure + */ +static void ax_spi_fill_tx_fifo(struct ax_spi *xspi) +{ + unsigned long trans_cnt =3D 0; + + while ((trans_cnt < xspi->tx_fifo_depth) && + (xspi->tx_bytes > 0)) { + /* When xspi in busy condition, bytes may send failed, + * then spi control did't work thoroughly, add one byte delay + */ + if (ax_spi_read(xspi, AX_SPI_IVR) & AX_SPI_IVR_TFOV) + usleep_range(10, 10); + if (xspi->tx_buf) + ax_spi_write_b(xspi, AX_SPI_TXFIFO, *xspi->tx_buf++); + else + ax_spi_write_b(xspi, AX_SPI_TXFIFO, 0); + + xspi->tx_bytes--; + trans_cnt++; + } +} + +/** + * ax_spi_get_rx_byte - Gets a byte from the RX FIFO buffer + * @xspi: Controller private data (struct ax_spi *) + * + * This function handles the logic of extracting bytes from the 32-bit RX = FIFO. + * It reads a new 32-bit word from AX_SPI_RXFIFO only when the current buf= fered + * word has been fully processed (all 4 bytes extracted). It then extracts + * bytes one by one, assuming the controller is little-endian. + * + * Returns: The next 8-bit byte read from the RX FIFO stream. + */ +static u8 ax_spi_get_rx_byte_for_irq(struct ax_spi *xspi) +{ + u8 byte_val; + + /* If all bytes from the current 32-bit word have been extracted, + * read a new word from the hardware RX FIFO. + */ + if (xspi->bytes_left_in_current_rx_word_for_irq =3D=3D 0) { + xspi->current_rx_fifo_word_for_irq =3D ax_spi_read(xspi, AX_SPI_RXFIFO); + xspi->bytes_left_in_current_rx_word_for_irq =3D 4; // A new 32-bit word = has 4 bytes + } + + /* Extract the least significant byte from the current 32-bit word */ + byte_val =3D (u8)(xspi->current_rx_fifo_word_for_irq & 0xFF); + + /* Shift the word right by 8 bits to prepare the next byte for extraction= */ + xspi->current_rx_fifo_word_for_irq >>=3D 8; + xspi->bytes_left_in_current_rx_word_for_irq--; + + return byte_val; +} + +/** + * Helper function to process received bytes and check for transfer comple= tion. + * This avoids code duplication and centralizes the completion logic. + * Returns true if the transfer was finalized. + */ +static bool ax_spi_process_rx_and_finalize(struct spi_controller *ctlr) +{ + struct ax_spi *xspi =3D spi_controller_get_devdata(ctlr); + + /* Process any remaining bytes in the RX FIFO */ + u32 avail_bytes =3D ax_spi_read(xspi, AX_SPI_RX_FBCAR); + + /* This loop handles bytes that are already staged from a previous word r= ead */ + while (xspi->bytes_left_in_current_rx_word_for_irq && + (xspi->rx_copy_remaining || xspi->rx_discard)) { + u8 b =3D ax_spi_get_rx_byte_for_irq(xspi); + + if (xspi->rx_discard) { + xspi->rx_discard--; + } else { + *xspi->rx_buf++ =3D b; + xspi->rx_copy_remaining--; + } + } + + /* This loop processes new words directly from the FIFO */ + while (avail_bytes >=3D 4 && (xspi->rx_copy_remaining || xspi->rx_discard= )) { + /* This function should handle reading from the FIFO */ + u8 b =3D ax_spi_get_rx_byte_for_irq(xspi); + + if (xspi->rx_discard) { + xspi->rx_discard--; + } else { + *xspi->rx_buf++ =3D b; + xspi->rx_copy_remaining--; + } + /* ax_spi_get_rx_byte_for_irq fetches a new word when needed + * and updates internal state. + */ + if (xspi->bytes_left_in_current_rx_word_for_irq =3D=3D 3) + avail_bytes -=3D 4; + } + + /* Completion Check: The transfer is truly complete if all expected + * RX bytes have been copied or discarded. + */ + if (xspi->rx_copy_remaining =3D=3D 0 && xspi->rx_discard =3D=3D 0) { + /* Defensive drain: If for some reason there are leftover bytes + * in the HW FIFO after we've logically finished, + * read and discard them to prevent them from corrupting the next transf= er. + * This should be a bounded operation. + */ + int safety_words =3D AX_SPI_RX_FIFO_DRAIN_LIMIT; // Limit to avoid getti= ng stuck + + while (ax_spi_read(xspi, AX_SPI_RX_FBCAR) > 0 && safety_words-- > 0) + ax_spi_read(xspi, AX_SPI_RXFIFO); + + /* Disable all interrupts for this transfer and finalize. */ + ax_spi_write(xspi, AX_SPI_IMR, 0x00); + spi_finalize_current_transfer(ctlr); + return true; + } + + return false; +} + +/** + * ax_spi_irq - Interrupt service routine of the SPI controller + * @irq: IRQ number + * @dev_id: Pointer to the xspi structure + * + * This function handles RX FIFO almost full and Host Transfer Completed i= nterrupts only. + * On RX FIFO amlost full interrupt this function reads the received data = from RX FIFO and + * fills the TX FIFO if there is any data remaining to be transferred. + * On Host Transfer Completed interrupt this function indicates that trans= fer is completed, + * the SPI subsystem will clear MTC bit. + * + * Return: IRQ_HANDLED when handled; IRQ_NONE otherwise. + */ +static irqreturn_t ax_spi_irq(int irq, void *dev_id) +{ + struct spi_controller *ctlr =3D dev_id; + struct ax_spi *xspi =3D spi_controller_get_devdata(ctlr); + u32 intr_status; + + intr_status =3D ax_spi_read(xspi, AX_SPI_IVR); + if (!intr_status) + return IRQ_NONE; + + /* Handle "Message Transfer Complete" interrupt. + * This means all bytes have been shifted out of the TX FIFO. + * It's time to harvest the final incoming bytes from the RX FIFO. + */ + if (intr_status & AX_SPI_IVR_MTCV) { + /* Clear the MTC interrupt flag immediately. */ + ax_spi_write(xspi, AX_SPI_ISR, AX_SPI_ISR_MTC); + + /* For a TX-only transfer, rx_buf would be NULL. + * In the spi-core, rx_copy_remaining would be 0. + * So we can finalize immediately. + */ + if (!xspi->rx_buf) { + ax_spi_write(xspi, AX_SPI_IMR, 0x00); + spi_finalize_current_transfer(ctlr); + return IRQ_HANDLED; + } + /* For a full-duplex transfer, process any remaining RX data. + * The helper function will handle finalization if everything is receive= d. + */ + ax_spi_process_rx_and_finalize(ctlr); + return IRQ_HANDLED; + } + + /* Handle "RX FIFO Full / Threshold Met" interrupt. + * This means we need to make space in the RX FIFO by reading from it. + */ + if (intr_status & AX_SPI_IVR_RFFV) { + if (ax_spi_process_rx_and_finalize(ctlr)) { + /* Transfer was finalized inside the helper, we are done. */ + } else { + /* RX is not yet complete. If there are still TX bytes to send + * (for very long transfers), we can fill the TX FIFO again. + */ + if (xspi->tx_bytes) + ax_spi_fill_tx_fifo(xspi); + } + return IRQ_HANDLED; + } + + return IRQ_NONE; +} + +static int ax_prepare_message(struct spi_controller *ctlr, + struct spi_message *msg) +{ + ax_spi_config_clock_mode(msg->spi); + return 0; +} + +/** + * ax_transfer_one - Initiates the SPI transfer + * @ctlr: Pointer to spi_controller structure + * @spi: Pointer to the spi_device structure + * @transfer: Pointer to the spi_transfer structure which provides + * information about next transfer parameters + * + * This function fills the TX FIFO, starts the SPI transfer and + * returns a positive transfer count so that core will wait for completion. + * + * Return: Number of bytes transferred in the last transfer + */ +static int ax_transfer_one(struct spi_controller *ctlr, + struct spi_device *spi, + struct spi_transfer *transfer) +{ + struct ax_spi *xspi =3D spi_controller_get_devdata(ctlr); + int drain_limit; + + /* Pre-transfer cleanup:Flush the RX FIFO to discard any stale data. + * This is the crucial part. Before every new transfer, we must ensure + * the HW is in a clean state to avoid processing stale data + * from a previous, possibly failed or interrupted, transfer. + */ + drain_limit =3D AX_SPI_RX_FIFO_DRAIN_LIMIT; // Sane limit to prevent infi= nite loop on HW error + while (ax_spi_read(xspi, AX_SPI_RX_FBCAR) > 0 && drain_limit-- > 0) + ax_spi_read(xspi, AX_SPI_RXFIFO); // Read and discard + + if (drain_limit <=3D 0) + dev_warn(&ctlr->dev, "RX FIFO drain timeout before transfer\n"); + + /* Clear any stale interrupt flags from a previous transfer. + * This prevents an immediate, false interrupt trigger. + */ + ax_spi_write(xspi, AX_SPI_ISR, AX_SPI_ISR_CLR); + + xspi->tx_buf =3D transfer->tx_buf; + xspi->rx_buf =3D transfer->rx_buf; + xspi->tx_bytes =3D transfer->len; + xspi->rx_bytes =3D transfer->len; + + /* Reset RX 32-bit to byte buffer for each new transfer */ + if (transfer->tx_buf && !transfer->rx_buf) { + /* TX mode: discard all received data */ + xspi->rx_discard =3D transfer->len; + xspi->rx_copy_remaining =3D 0; + } else if ((!transfer->tx_buf && transfer->rx_buf) || + (transfer->tx_buf && transfer->rx_buf)) { + /* RX mode: generate clock by filling TX FIFO with dummy bytes + * Full-duplex mode: generate clock by filling TX FIFO + */ + xspi->rx_discard =3D 0; + xspi->rx_copy_remaining =3D transfer->len; + } else { + /* No TX and RX */ + xspi->rx_discard =3D 0; + xspi->rx_copy_remaining =3D transfer->len; + } + + ax_spi_setup_transfer(spi, transfer); + ax_spi_fill_tx_fifo(xspi); + ax_spi_write(xspi, AX_SPI_CR2, (AX_SPI_CR2_HTE | AX_SPI_CR2_SRD | AX_SPI_= CR2_SWD)); + + ax_spi_write(xspi, AX_SPI_IMR, (AX_SPI_IMR_MTCM | AX_SPI_IMR_RFFM)); + return transfer->len; +} + +/** + * ax_prepare_transfer_hardware - Prepares hardware for transfer. + * @ctlr: Pointer to the spi_controller structure which provides + * information about the controller. + * + * This function enables SPI host controller. + * + * Return: 0 always + */ +static int ax_prepare_transfer_hardware(struct spi_controller *ctlr) +{ + struct ax_spi *xspi =3D spi_controller_get_devdata(ctlr); + + u32 reg_value; + + reg_value =3D ax_spi_read(xspi, AX_SPI_CR1); + reg_value |=3D AX_SPI_CR1_SCE; + + ax_spi_write(xspi, AX_SPI_CR1, reg_value); + + return 0; +} + +/** + * ax_unprepare_transfer_hardware - Relaxes hardware after transfer + * @ctlr: Pointer to the spi_controller structure which provides + * information about the controller. + * + * This function disables the SPI host controller when no target selected. + * + * Return: 0 always + */ +static int ax_unprepare_transfer_hardware(struct spi_controller *ctlr) +{ + struct ax_spi *xspi =3D spi_controller_get_devdata(ctlr); + + u32 reg_value; + + /* Disable the SPI if target is deselected */ + reg_value =3D ax_spi_read(xspi, AX_SPI_CR1); + reg_value &=3D ~AX_SPI_CR1_SCE; + + ax_spi_write(xspi, AX_SPI_CR1, reg_value); + + return 0; +} + +/** + * ax_spi_detect_fifo_depth - Detect the FIFO depth of the hardware + * @xspi: Pointer to the ax_spi structure + * + * The depth of the TX FIFO is a synthesis configuration parameter of the = SPI + * IP. The FIFO threshold register is sized so that its maximum value can = be the + * FIFO size - 1. This is used to detect the size of the FIFO. + */ +static void ax_spi_detect_fifo_depth(struct ax_spi *xspi) +{ + /* The MSBs will get truncated giving us the size of the FIFO */ + ax_spi_write(xspi, AX_SPI_TX_FAETR, ALMOST_EMPTY_TRESHOLD); + xspi->tx_fifo_depth =3D FIFO_DEPTH; + + /* Set the threshold limit */ + ax_spi_write(xspi, AX_SPI_TX_FAETR, ALMOST_EMPTY_TRESHOLD); + ax_spi_write(xspi, AX_SPI_RX_FAFTR, ALMOST_FULL_TRESHOLD); +} + +/* --- Internal Helper Function for 32-bit RX FIFO Read --- */ +/** + * ax_spi_get_rx_byte - Gets a byte from the RX FIFO buffer + * @xspi: Controller private data (struct ax_spi *) + * + * This function handles the logic of extracting bytes from the 32-bit RX = FIFO. + * It reads a new 32-bit word from AX_SPI_RXFIFO only when the current buf= fered + * word has been fully processed (all 4 bytes extracted). It then extracts + * bytes one by one, assuming the controller is little-endian. + * + * Returns: The next 8-bit byte read from the RX FIFO stream. + */ +static u8 ax_spi_get_rx_byte(struct ax_spi *xspi) +{ + u8 byte_val; + + /* If all bytes from the current 32-bit word have been extracted, + * read a new word from the hardware RX FIFO. + */ + if (xspi->bytes_left_in_current_rx_word =3D=3D 0) { + xspi->current_rx_fifo_word =3D ax_spi_read(xspi, AX_SPI_RXFIFO); + xspi->bytes_left_in_current_rx_word =3D 4; // A new 32-bit word has 4 by= tes + } + + /* Extract the least significant byte from the current 32-bit word */ + byte_val =3D (u8)(xspi->current_rx_fifo_word & 0xFF); + + /* Shift the word right by 8 bits to prepare the next byte for extraction= */ + xspi->current_rx_fifo_word >>=3D 8; + xspi->bytes_left_in_current_rx_word--; + + return byte_val; +} + +static int ax_spi_mem_exec_op(struct spi_mem *mem, const struct spi_mem_op= *op) +{ + struct spi_device *spi =3D mem->spi; + struct ax_spi *xspi =3D spi_controller_get_devdata(spi->controller); + u32 reg_val; + int ret =3D 0; + u8 cmd_buf[AX_SPI_COMMAND_BUFFER_SIZE]; + int cmd_len =3D 0; + int i =3D 0, timeout =3D AX_SPI_TRX_FIFO_TIMEOUT; + int bytes_to_discard_from_rx; + u8 *rx_buf_ptr =3D (u8 *)op->data.buf.in; + u8 *tx_buf_ptr =3D (u8 *)op->data.buf.out; + u32 rx_count_reg =3D 0; + + dev_dbg(&spi->dev, + "%s: cmd:%02x mode:%d.%d.%d.%d addr:%llx len:%d\n", + __func__, op->cmd.opcode, op->cmd.buswidth, op->addr.buswidth, + op->dummy.buswidth, op->data.buswidth, op->addr.val, + op->data.nbytes); + + /* Validate operation parameters: Only 1-bit bus width supported */ + if (op->cmd.buswidth !=3D 1 || + (op->addr.nbytes && op->addr.buswidth !=3D 0 && + op->addr.buswidth !=3D 1) || + (op->dummy.nbytes && op->dummy.buswidth !=3D 0 && + op->dummy.buswidth !=3D 1) || + (op->data.nbytes && op->data.buswidth !=3D 1)) { + dev_err(&spi->dev, "Unsupported bus width, only 1-bit bus width supporte= d\n"); + return -EOPNOTSUPP; + } + + /* Initialize controller hardware */ + ax_spi_init_hw(xspi); + + /* Assert chip select (pull low) */ + ax_spi_chipselect(spi, false); + + /* Build command phase: Copy opcode to cmd_buf */ + if (op->cmd.nbytes =3D=3D 2) { + cmd_buf[cmd_len++] =3D (op->cmd.opcode >> 8) & 0xFF; + cmd_buf[cmd_len++] =3D op->cmd.opcode & 0xFF; + } else { + cmd_buf[cmd_len++] =3D op->cmd.opcode; + } + + /* Put address bytes to cmd_buf */ + if (op->addr.nbytes) { + for (i =3D op->addr.nbytes - 1; i >=3D 0; i--) { + cmd_buf[cmd_len] =3D (op->addr.val >> (i * 8)) & 0xFF; + cmd_len++; + } + } + + /* Configure controller for desired operation mode (write/read) */ + reg_val =3D ax_spi_read(xspi, AX_SPI_CR2); + reg_val |=3D AX_SPI_CR2_SWD | AX_SPI_CR2_SRI | AX_SPI_CR2_SRD; + ax_spi_write(xspi, AX_SPI_CR2, reg_val); + + /* Write command and address bytes to TX_FIFO */ + for (i =3D 0; i < cmd_len; i++) + ax_spi_write_b(xspi, AX_SPI_TXFIFO, cmd_buf[i]); + + /* Add dummy bytes (for clock generation) or actual data bytes to TX_FIFO= */ + if (op->data.dir =3D=3D SPI_MEM_DATA_IN) { + for (i =3D 0; i < op->dummy.nbytes; i++) + ax_spi_write_b(xspi, AX_SPI_TXFIFO, 0x00); + for (i =3D 0; i < op->data.nbytes; i++) + ax_spi_write_b(xspi, AX_SPI_TXFIFO, 0x00); + } else { + for (i =3D 0; i < op->data.nbytes; i++) + ax_spi_write_b(xspi, AX_SPI_TXFIFO, tx_buf_ptr[i]); + } + + /* Start the SPI transmission */ + reg_val =3D ax_spi_read(xspi, AX_SPI_CR2); + reg_val |=3D AX_SPI_CR2_HTE; + ax_spi_write(xspi, AX_SPI_CR2, reg_val); + + /* Wait for TX FIFO to become empty */ + while (timeout-- > 0) { + u32 tx_count_reg =3D ax_spi_read(xspi, AX_SPI_TX_FBCAR); + + if (tx_count_reg =3D=3D 0) { + udelay(1); + break; + } + udelay(1); + } + + /* Handle Data Reception (for read operations) */ + if (op->data.dir =3D=3D SPI_MEM_DATA_IN) { + /* Reset the internal RX byte buffer for this new operation. + * This ensures ax_spi_get_rx_byte starts fresh for each exec_op call. + */ + xspi->bytes_left_in_current_rx_word =3D 0; + xspi->current_rx_fifo_word =3D 0; + + timeout =3D AX_SPI_TRX_FIFO_TIMEOUT; + while (timeout-- > 0) { + rx_count_reg =3D ax_spi_read(xspi, AX_SPI_RX_FBCAR); + if (rx_count_reg >=3D op->data.nbytes) + break; + udelay(1); /* Small delay to prevent aggressive busy-waiting */ + } + + if (timeout < 0) { + ret =3D -ETIMEDOUT; + goto out_unlock; + } + + /* Calculate how many bytes we need to discard from the RX FIFO. + * Since we set SRI, we only need to discard the address bytes and + * dummy bytes from the RX FIFO. + */ + bytes_to_discard_from_rx =3D op->addr.nbytes + op->dummy.nbytes; + for (i =3D 0; i < bytes_to_discard_from_rx; i++) + ax_spi_get_rx_byte(xspi); + + /* Read actual data bytes into op->data.buf.in */ + for (i =3D 0; i < op->data.nbytes; i++) { + *rx_buf_ptr =3D ax_spi_get_rx_byte(xspi); + rx_buf_ptr++; + } + } else if (op->data.dir =3D=3D SPI_MEM_DATA_OUT) { + timeout =3D AX_SPI_TRX_FIFO_TIMEOUT; + while (timeout-- > 0) { + u32 tx_fifo_level =3D ax_spi_read(xspi, AX_SPI_TX_FBCAR); + + if (tx_fifo_level =3D=3D 0) + break; + udelay(1); + } + if (timeout < 0) { + ret =3D -ETIMEDOUT; + goto out_unlock; + } + } + +out_unlock: + /* Deassert chip select (pull high) */ + ax_spi_chipselect(spi, true); + + return ret; +} + +static int ax_spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_o= p *op) +{ + struct spi_device *spi =3D mem->spi; + struct ax_spi *xspi =3D spi_controller_get_devdata(spi->controller); + size_t max_transfer_payload_bytes; + size_t fifo_total_bytes; + size_t protocol_overhead_bytes; + + fifo_total_bytes =3D xspi->tx_fifo_depth; + /* Calculate protocol overhead bytes according to the real operation each= time. */ + protocol_overhead_bytes =3D op->cmd.nbytes + op->addr.nbytes + op->dummy.= nbytes; + + /* Calculate the maximum data payload that can fit into the FIFO. */ + if (fifo_total_bytes <=3D protocol_overhead_bytes) { + max_transfer_payload_bytes =3D 0; + dev_warn_once(&spi->dev, "SPI FIFO (%zu bytes) is too small for protocol= overhead (%zu bytes)! Max data size forced to 0.\n", + fifo_total_bytes, protocol_overhead_bytes); + } else { + max_transfer_payload_bytes =3D fifo_total_bytes - protocol_overhead_byte= s; + } + + /* Limit op->data.nbytes based on the calculated max payload and SZ_64K. + * This is the value that spi-mem will then use to split requests. + */ + if (op->data.nbytes > max_transfer_payload_bytes) { + op->data.nbytes =3D max_transfer_payload_bytes; + dev_dbg(&spi->dev, "%s %d: op->data.nbytes adjusted to %u due to FIFO ov= erhead\n", + __func__, __LINE__, op->data.nbytes); + } + + /* Also apply the overall max transfer size */ + if (op->data.nbytes > SZ_64K) { + op->data.nbytes =3D SZ_64K; + dev_dbg(&spi->dev, "%s %d: op->data.nbytes adjusted to %u due to SZ_64K = limit\n", + __func__, __LINE__, op->data.nbytes); + } + + return 0; +} + +static const struct spi_controller_mem_ops ax_spi_mem_ops =3D { + .exec_op =3D ax_spi_mem_exec_op, + .adjust_op_size =3D ax_spi_mem_adjust_op_size, +}; + +/** + * ax_spi_probe - Probe method for the SPI driver + * @pdev: Pointer to the platform_device structure + * + * This function initializes the driver data structures and the hardware. + * + * Return: 0 on success and error value on error + */ +static int ax_spi_probe(struct platform_device *pdev) +{ + int ret =3D 0, irq; + struct spi_controller *ctlr; + struct ax_spi *xspi; + u32 num_cs; + + ctlr =3D devm_spi_alloc_host(&pdev->dev, sizeof(*xspi)); + if (!ctlr) + return -ENOMEM; + + xspi =3D spi_controller_get_devdata(ctlr); + ctlr->dev.of_node =3D pdev->dev.of_node; + platform_set_drvdata(pdev, ctlr); + + xspi->regs =3D devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(xspi->regs)) { + ret =3D PTR_ERR(xspi->regs); + goto remove_ctlr; + } + + xspi->pclk =3D devm_clk_get(&pdev->dev, "pclk"); + if (IS_ERR(xspi->pclk)) { + dev_err(&pdev->dev, "pclk clock not found.\n"); + ret =3D PTR_ERR(xspi->pclk); + goto remove_ctlr; + } + + xspi->ref_clk =3D devm_clk_get(&pdev->dev, "ref"); + if (IS_ERR(xspi->ref_clk)) { + dev_err(&pdev->dev, "ref clock not found.\n"); + ret =3D PTR_ERR(xspi->ref_clk); + goto remove_ctlr; + } + + ret =3D clk_prepare_enable(xspi->pclk); + if (ret) { + dev_err(&pdev->dev, "Unable to enable APB clock.\n"); + goto remove_ctlr; + } + + ret =3D clk_prepare_enable(xspi->ref_clk); + if (ret) { + dev_err(&pdev->dev, "Unable to enable device clock.\n"); + goto clk_dis_apb; + } + + pm_runtime_use_autosuspend(&pdev->dev); + pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT); + pm_runtime_get_noresume(&pdev->dev); + pm_runtime_set_active(&pdev->dev); + pm_runtime_enable(&pdev->dev); + + ret =3D of_property_read_u32(pdev->dev.of_node, "num-cs", &num_cs); + if (ret < 0) + ctlr->num_chipselect =3D AX_SPI_DEFAULT_NUM_CS; + else + ctlr->num_chipselect =3D num_cs; + + ax_spi_detect_fifo_depth(xspi); + + xspi->current_rx_fifo_word =3D 0; + xspi->bytes_left_in_current_rx_word =3D 0; + + /* Initialize IRQ-related variables */ + xspi->bytes_left_in_current_rx_word_for_irq =3D 0; + xspi->current_rx_fifo_word_for_irq =3D 0; + + /* SPI controller initializations */ + ax_spi_init_hw(xspi); + + irq =3D platform_get_irq(pdev, 0); + if (irq <=3D 0) { + ret =3D -ENXIO; + goto clk_dis_all; + } + + ret =3D devm_request_irq(&pdev->dev, irq, ax_spi_irq, + 0, pdev->name, ctlr); + if (ret !=3D 0) { + ret =3D -ENXIO; + dev_err(&pdev->dev, "request_irq failed\n"); + goto clk_dis_all; + } + + ctlr->use_gpio_descriptors =3D true; + ctlr->prepare_transfer_hardware =3D ax_prepare_transfer_hardware; + ctlr->prepare_message =3D ax_prepare_message; + ctlr->transfer_one =3D ax_transfer_one; + ctlr->unprepare_transfer_hardware =3D ax_unprepare_transfer_hardware; + ctlr->set_cs =3D ax_spi_chipselect; + ctlr->auto_runtime_pm =3D true; + ctlr->mode_bits =3D SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; + + xspi->clk_rate =3D clk_get_rate(xspi->ref_clk); + /* Set to default valid value */ + ctlr->max_speed_hz =3D xspi->clk_rate / 2; + xspi->speed_hz =3D ctlr->max_speed_hz; + + ctlr->bits_per_word_mask =3D SPI_BPW_MASK(8); + + pm_runtime_mark_last_busy(&pdev->dev); + pm_runtime_put_autosuspend(&pdev->dev); + + ctlr->mem_ops =3D &ax_spi_mem_ops; + + ret =3D spi_register_controller(ctlr); + if (ret) { + dev_err(&pdev->dev, "spi_register_controller failed\n"); + goto clk_dis_all; + } + + return ret; + +clk_dis_all: + pm_runtime_set_suspended(&pdev->dev); + pm_runtime_disable(&pdev->dev); + clk_disable_unprepare(xspi->ref_clk); +clk_dis_apb: + clk_disable_unprepare(xspi->pclk); +remove_ctlr: + spi_controller_put(ctlr); + return ret; +} + +/** + * ax_spi_remove - Remove method for the SPI driver + * @pdev: Pointer to the platform_device structure + * + * This function is called if a device is physically removed from the syst= em or + * if the driver module is being unloaded. It frees all resources allocate= d to + * the device. + */ +static void ax_spi_remove(struct platform_device *pdev) +{ + struct spi_controller *ctlr =3D platform_get_drvdata(pdev); + struct ax_spi *xspi =3D spi_controller_get_devdata(ctlr); + + spi_unregister_controller(ctlr); + + pm_runtime_set_suspended(&pdev->dev); + pm_runtime_disable(&pdev->dev); + + clk_disable_unprepare(xspi->ref_clk); + clk_disable_unprepare(xspi->pclk); +} + +/** + * ax_spi_suspend - Suspend method for the SPI driver + * @dev: Address of the platform_device structure + * + * This function disables the SPI controller and + * changes the driver state to "suspend" + * + * Return: 0 on success and error value on error + */ +static int __maybe_unused ax_spi_suspend(struct device *dev) +{ + struct spi_controller *ctlr =3D dev_get_drvdata(dev); + + return spi_controller_suspend(ctlr); +} + +/** + * ax_spi_resume - Resume method for the SPI driver + * @dev: Address of the platform_device structure + * + * This function changes the driver state to "ready" + * + * Return: 0 on success and error value on error + */ +static int __maybe_unused ax_spi_resume(struct device *dev) +{ + struct spi_controller *ctlr =3D dev_get_drvdata(dev); + struct ax_spi *xspi =3D spi_controller_get_devdata(ctlr); + + ax_spi_init_hw(xspi); + return spi_controller_resume(ctlr); +} + +/** + * ax_spi_runtime_resume - Runtime resume method for the SPI driver + * @dev: Address of the platform_device structure + * + * This function enables the clocks + * + * Return: 0 on success and error value on error + */ +static int __maybe_unused ax_spi_runtime_resume(struct device *dev) +{ + struct spi_controller *ctlr =3D dev_get_drvdata(dev); + struct ax_spi *xspi =3D spi_controller_get_devdata(ctlr); + int ret; + + ret =3D clk_prepare_enable(xspi->pclk); + if (ret) { + dev_err(dev, "Cannot enable APB clock.\n"); + return ret; + } + + ret =3D clk_prepare_enable(xspi->ref_clk); + if (ret) { + dev_err(dev, "Cannot enable device clock.\n"); + clk_disable_unprepare(xspi->pclk); + return ret; + } + return 0; +} + +/** + * ax_spi_runtime_suspend - Runtime suspend method for the SPI driver + * @dev: Address of the platform_device structure + * + * This function disables the clocks + * + * Return: Always 0 + */ +static int __maybe_unused ax_spi_runtime_suspend(struct device *dev) +{ + struct spi_controller *ctlr =3D dev_get_drvdata(dev); + struct ax_spi *xspi =3D spi_controller_get_devdata(ctlr); + + clk_disable_unprepare(xspi->ref_clk); + clk_disable_unprepare(xspi->pclk); + + return 0; +} + +static const struct dev_pm_ops ax_spi_dev_pm_ops =3D { + SET_RUNTIME_PM_OPS(ax_spi_runtime_suspend, + ax_spi_runtime_resume, NULL) + SET_SYSTEM_SLEEP_PM_OPS(ax_spi_suspend, ax_spi_resume) +}; + +static const struct of_device_id ax_spi_of_match[] =3D { + { .compatible =3D "axiado,ax3000-spi" }, + { /* end of table */ } +}; +MODULE_DEVICE_TABLE(of, ax_spi_of_match); + +/* ax_spi_driver - This structure defines the SPI subsystem platform drive= r */ +static struct platform_driver ax_spi_driver =3D { + .probe =3D ax_spi_probe, + .remove =3D ax_spi_remove, + .driver =3D { + .name =3D AX_SPI_NAME, + .of_match_table =3D ax_spi_of_match, + .pm =3D &ax_spi_dev_pm_ops, + }, +}; + +module_platform_driver(ax_spi_driver); + +MODULE_AUTHOR("Axiado Corporation"); +MODULE_DESCRIPTION("Axiado SPI Host driver"); +MODULE_LICENSE("GPL"); diff --git a/drivers/spi/spi-axiado.h b/drivers/spi/spi-axiado.h new file mode 100644 index 000000000000..6cf0e5bf5879 --- /dev/null +++ b/drivers/spi/spi-axiado.h @@ -0,0 +1,133 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Axiado SPI controller driver (Host mode only) + * + * Copyright (C) 2022-2025 Axiado Corporation (or its affiliates). + */ + +#ifndef SPI_AXIADO_H +#define SPI_AXIADO_H + +/* Name of this driver */ +#define AX_SPI_NAME "axiado-db-spi" + +/* Axiado - SPI Digital Blocks IP design registers */ +#define AX_SPI_TX_FAETR 0x18 // TX-FAETR +#define ALMOST_EMPTY_TRESHOLD 0x00 // Programmed threshold value +#define AX_SPI_RX_FAFTR 0x28 // RX-FAETR +#define ALMOST_FULL_TRESHOLD 0x0c // Programmed threshold value +#define FIFO_DEPTH 256 // 256 bytes + +#define AX_SPI_CR1 0x00 // CR1 +#define AX_SPI_CR1_CLR 0x00 // CR1 - Clear +#define AX_SPI_CR1_SCR 0x01 // CR1 - controller reset +#define AX_SPI_CR1_SCE 0x02 // CR1 - Controller Enable/Disable +#define AX_SPI_CR1_CPHA 0x08 // CR1 - CPH +#define AX_SPI_CR1_CPOL 0x10 // CR1 - CPO + +#define AX_SPI_CR2 0x04 // CR2 +#define AX_SPI_CR2_SWD 0x04 // CR2 - Write Enabel/Disable +#define AX_SPI_CR2_SRD 0x08 // CR2 - Read Enable/Disable +#define AX_SPI_CR2_SRI 0x10 // CR2 - Read First Byte Ignore +#define AX_SPI_CR2_HTE 0x40 // CR2 - Host Transmit Enable +#define AX_SPI_CR3 0x08 // CR3 +#define AX_SPI_CR3_SDL 0x00 // CR3 - Data lines +#define AX_SPI_CR3_QUAD 0x02 // CR3 - Data lines + +/* As per Digital Blocks datasheet clock frequency range + * Min - 244KHz + * Max - 62.5MHz + * SCK Clock Divider Register Values + */ +#define AX_SPI_RX_FBCAR 0x24 // RX_FBCAR +#define AX_SPI_TX_FBCAR 0x14 // TX_FBCAR +#define AX_SPI_SCDR 0x2c // SCDR +#define AX_SPI_SCD_MIN 0x1fe // Valid SCD (SCK Clock Divider Register) +#define AX_SPI_SCD_DEFAULT 0x06 // Default SCD (SCK Clock Divider Registe= r) +#define AX_SPI_SCD_MAX 0x00 // Valid SCD (SCK Clock Divider Register) +#define AX_SPI_SCDR_SCS 0x0200 // SCDR - AMBA Bus Clock source + +#define AX_SPI_IMR 0x34 // IMR +#define AX_SPI_IMR_CLR 0x00 // IMR - Clear +#define AX_SPI_IMR_TFOM 0x02 // IMR - TFO +#define AX_SPI_IMR_MTCM 0x40 // IMR - MTC +#define AX_SPI_IMR_TFEM 0x10 // IMR - TFE +#define AX_SPI_IMR_RFFM 0x20 // IMR - RFFM + +#define AX_SPI_ISR 0x30 // ISR +#define AX_SPI_ISR_CLR 0xff // ISR - Clear +#define AX_SPI_ISR_MTC 0x40 // ISR - MTC +#define AX_SPI_ISR_TFE 0x10 // ISR - TFE +#define AX_SPI_ISR_RFF 0x20 // ISR - RFF + +#define AX_SPI_IVR 0x38 // IVR +#define AX_SPI_IVR_TFOV 0x02 // IVR - TFOV +#define AX_SPI_IVR_MTCV 0x40 // IVR - MTCV +#define AX_SPI_IVR_TFEV 0x10 // IVR - TFEV +#define AX_SPI_IVR_RFFV 0x20 // IVR - RFFV + +#define AX_SPI_TXFIFO 0x0c // TX_FIFO +#define AX_SPI_TX_RX_FBCR 0x10 // TX_RX_FBCR +#define AX_SPI_RXFIFO 0x1c // RX_FIFO + +#define AX_SPI_TS0 0x00 // Target select 0 +#define AX_SPI_TS1 0x01 // Target select 1 +#define AX_SPI_TS2 0x10 // Target select 2 +#define AX_SPI_TS3 0x11 // Target select 3 + +#define SPI_AUTOSUSPEND_TIMEOUT 3000 + +/* Default number of chip select lines also used as maximum number of chip= select lines */ +#define AX_SPI_DEFAULT_NUM_CS 4 + +/* Default number of command buffer size */ +#define AX_SPI_COMMAND_BUFFER_SIZE 16 //Command + address bytes + +/* Target select mask + * 00 =E2=80=93 TS0 + * 01 =E2=80=93 TS1 + * 10 =E2=80=93 TS2 + * 11 =E2=80=93 TS3 + */ +#define AX_SPI_DEFAULT_TS_MASK 0x03 + +#define AX_SPI_RX_FIFO_DRAIN_LIMIT 24 +#define AX_SPI_TRX_FIFO_TIMEOUT 1000 +/** + * struct ax_spi - This definition defines spi driver instance + * @regs: Virtual address of the SPI controller registers + * @ref_clk: Pointer to the peripheral clock + * @pclk: Pointer to the APB clock + * @speed_hz: Current SPI bus clock speed in Hz + * @txbuf: Pointer to the TX buffer + * @rxbuf: Pointer to the RX buffer + * @tx_bytes: Number of bytes left to transfer + * @rx_bytes: Number of bytes requested + * @tx_fifo_depth: Depth of the TX FIFO + * @current_rx_fifo_word: Buffers the 32-bit word read from RXFIFO + * @bytes_left_in_current_rx_word: Bytes to be extracted from current 32-= bit word + * @current_rx_fifo_word_for_irq: Buffers the 32-bit word read from RXFIF= O for IRQ + * @bytes_left_in_current_rx_word_for_irq: IRQ bytes to be extracted from = current 32-bit word + * @rx_discard: Number of bytes to discard + * @rx_copy_remaining: Number of bytes to copy + */ +struct ax_spi { + void __iomem *regs; + struct clk *ref_clk; + struct clk *pclk; + unsigned int clk_rate; + u32 speed_hz; + const u8 *tx_buf; + u8 *rx_buf; + int tx_bytes; + int rx_bytes; + unsigned int tx_fifo_depth; + u32 current_rx_fifo_word; + int bytes_left_in_current_rx_word; + u32 current_rx_fifo_word_for_irq; + int bytes_left_in_current_rx_word_for_irq; + int rx_discard; + int rx_copy_remaining; +}; + +#endif /* SPI_AXIADO_H */ --=20 2.34.1 From nobody Mon Feb 9 02:08:29 2026 Received: from CH5PR02CU005.outbound.protection.outlook.com (mail-northcentralusazon11022130.outbound.protection.outlook.com [40.107.200.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CABB936B056; Thu, 8 Jan 2026 07:45:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.200.130 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767858338; cv=fail; b=F7w5/RM75uXQuml3AT2tAYqYDTmIBWKeaZExQZLSkFjaYq3VuvIlaqiOi6lhC79dKa3Eu2YwDASPaEoYb2zACYt4GpAyN0ciy33wuYWvkGiVEshM3wmnDVR9rNzPIZnoFZ/hRclTY7+bAUG3gpsCoCANTs8v0eT8rB1o15RUSaY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767858338; c=relaxed/simple; bh=Gs2fPQsJqqC0p6Q5Xyaf/g1pN8TOeWoqNAbutQbbAqo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bjqZVDMhITx7IOH6DBX1+qiQT1DmqAunxrDWb9yJDMsXktNV60AkiAHQNPQ59FMxWue1El8228E2eG4Sdp2fSNt6B02hAJnNt7iQH3Nmxl/4tfmwXQVeAcxsLhKpqJbfKXRXr20heeU8KvAyQo+SgXs0C+2cQGk1OGDnMJxg4So= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=axiado.com; spf=pass smtp.mailfrom=axiado.com; dkim=pass (2048-bit key) header.d=axiado.com header.i=@axiado.com header.b=kW7PiRaM; arc=fail smtp.client-ip=40.107.200.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=axiado.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=axiado.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=axiado.com header.i=@axiado.com header.b="kW7PiRaM" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jpbj5HbLzFrQCp9g/1PALkLXSqwWXIiI+u97ssgZlV9eNyzAaky1hKlHOYAxqUGxbTiRF+xq1vgMfQ9jrv0Q53A/js0k+odEskual/Xa/UJG6yJVexzvHZVy3akif0oJV6m7lUSAeul5Ujp9kG37y5QlHX8RxmaTCDCIYW63Gz1WIRyROpS5kcBJdbkLSzQI5Wma7HC5gInfdFP/CiOHhuIOmjRIcsDgr8dXV6trAiLjPpsGJD3F9A9Df9l5k8/fzK3S4q7LLHGrc/4JZvTbbnb/KLJaOXlXwSn9PCNMkc/t4tNdGcIepOldPdrDwpPJudVx2AfVyr/T/qF4wfmWEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=LfBTlH+yu/jDIKvt+BhwMod9LRqfvGjWZgI4Mkze5Qk=; b=TYkjPNznoN69hNqGGhjfWNucrvmMAPBmxREKwy5kUb8HiRUD8+7r36fsXDI2GMTG/hKXMXBckd7r1hHIZ45Q4XMK2cIRQHwobiNAJY4ox2cENwx7PdAppFEqhFUjhBeO3G5GZa4mKRBYuB6T7x/8cFY/Cy97w++E9tUYvTdOQUz5yHoGKnS8l59sAEQq1WRUWNi+UyfyRiwKj0HtYf0qn36WWC/YG9RMXjJZONejCZEowWehcHnqz5XW1fD5bhxt0KmXFift3EC/jNQppMo04vnQNbzh0IIkq0/lfhN3cTZcgX0bFdz8KbLJzYCx001/Z+I4vSjpJFly6XXtv1Vc7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 4.227.125.105) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=axiado.com; dmarc=none action=none header.from=axiado.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axiado.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LfBTlH+yu/jDIKvt+BhwMod9LRqfvGjWZgI4Mkze5Qk=; b=kW7PiRaMaZpgQzgnlthf6AUZogaKxH5nCgfld3YBX7MFZf6iXjHA/WB1hYf0EzXXKde22ytD4FZTWTdHeUsMTMu59wZABWRoiqResPm/4RR/FiArL+hOmWCbuLReSG2SuvJHf3WDzYI1ISkrmEnfbZFsYzEdnkY/jwQr50dT5Nps4/QVyObdw28S8jNV/tEQDcM2EJGVuwhw51iton5YrdnBDsSol4RfWNDAAzHV5o1+rNGMVrPlZQLTt+rb0nPotdCJPnl4xFnPAPj9WLr4K2lzqXZJzRnYqRJnOUch5qTtyLQ4aglyT1Wh4An2Ia/8fYvjxp0Ooz4peUdr3jtqoA== Received: from PH8P220CA0034.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:348::17) by DM8PR18MB4485.namprd18.prod.outlook.com (2603:10b6:8:32::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9499.2; Thu, 8 Jan 2026 07:45:10 +0000 Received: from CY4PEPF0000E9D8.namprd05.prod.outlook.com (2603:10b6:510:348:cafe::7d) by PH8P220CA0034.outlook.office365.com (2603:10b6:510:348::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9499.3 via Frontend Transport; Thu, 8 Jan 2026 07:45:17 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 4.227.125.105) smtp.mailfrom=axiado.com; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=axiado.com; Received-SPF: Fail (protection.outlook.com: domain of axiado.com does not designate 4.227.125.105 as permitted sender) receiver=protection.outlook.com; client-ip=4.227.125.105; helo=[127.0.0.1]; Received: from [127.0.0.1] (4.227.125.105) by CY4PEPF0000E9D8.mail.protection.outlook.com (10.167.241.71) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9520.1 via Frontend Transport; Thu, 8 Jan 2026 07:45:09 +0000 From: Vladimir Moravcevic Date: Wed, 07 Jan 2026 23:44:39 -0800 Subject: [PATCH v3 3/3] MAINTAINERS: Add entries for the Axiado SPI DB controller Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260107-axiado-ax3000-soc-spi-db-controller-driver-v3-3-726e70cf19ad@axiado.com> References: <20260107-axiado-ax3000-soc-spi-db-controller-driver-v3-0-726e70cf19ad@axiado.com> In-Reply-To: <20260107-axiado-ax3000-soc-spi-db-controller-driver-v3-0-726e70cf19ad@axiado.com> To: Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Harshit Shah Cc: linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Vladimir Moravcevic X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1767858304; l=1140; i=vmoravcevic@axiado.com; s=20250904; h=from:subject:message-id; bh=Gs2fPQsJqqC0p6Q5Xyaf/g1pN8TOeWoqNAbutQbbAqo=; b=bwBxHoay3NtOVTKBK/z3GllpVrwsxDqoGBXc/dUbO/LeqP7ypIp41AkSycH6tG0he5AFXJnIe aGvNv9O0LY5DwcCu9ogj+SpS4lYOMrqD+Kcj4QbQSYEPR9UQJI42v+w X-Developer-Key: i=vmoravcevic@axiado.com; a=ed25519; pk=iiyhWhM1F4HlCbbW3I3qKZhPCE8JsCrDQMgCBRg4YMA= X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D8:EE_|DM8PR18MB4485:EE_ X-MS-Office365-Filtering-Correlation-Id: acb41091-cb1a-48c0-58fa-08de4e89d9cf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|376014|1800799024|82310400026|13003099007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?V0w1emtPeW5PMWlhS2wvaktwcnE3aDI4RTcxL3J4Rk5TcE4wRkxLOG1HcWl0?= =?utf-8?B?L0U0eUgxL3ZlMnM2MllNc1dyT280Y2tQdXNBT3N0elRKemR0clRVZktVL0xn?= =?utf-8?B?SlRyVHpXaDJYSERPeVVVS3RIbFczTUhGTXFQdXE2WXNUZ1NzZXZEYTFzbHJD?= =?utf-8?B?UVBvVnJMMHlUMGhhUDJkV2lidTJ4NFdGampLYlVPZDRxbHByVStBYzY2U0tv?= =?utf-8?B?YW5ZMnJ6dlBJOXovK1JpeGFQQmpjV2RFVnhLeW53eW1kOTRUOFlUc0xrdkFR?= =?utf-8?B?SVdYM0VCYXo0UHJNeW5UZ1dteEUrMkxZeDNOckhDazFzZnp6RDJXUE00MEt0?= =?utf-8?B?cituLzlvT1BmTlduQTg4MHBsTk0yREdwOFc1dDNEak5NemZjOFhpVFd6bnVp?= =?utf-8?B?Y2hKam1vdHc1eXBCdEpnWkY4cXZwV1IyVVZ1cGpUMXVLZTloRFBhVUxER0gx?= =?utf-8?B?emZ6ZWtCWWpTcSttZktLTlJIQTJ6ekNta1RhZURjWTlobXdEUFpFVnNSbXNU?= =?utf-8?B?UVZxVGkyWHM5OGh5Q1VTbDRKQmx5NEMrT0FPZmoxeFZLekRMeG9UUll3d0lV?= =?utf-8?B?N2NsY2hOTzFHeDgwMjVUaXhSejVIK2YzTEJqemZBR2IzNzU3UFdDaUVOeUlm?= =?utf-8?B?Lytoc2tGbmt6VjBmdWMrcnArWUVYRk0zN2xPQk4vVFZ1bGJiUmhZRWx5dlNy?= =?utf-8?B?K1ozZ2d4Sy9XMXJCMWkxVHJUcnBBN3ZCbmpNN2x2dVFlRllDNlJNcnJqby9S?= =?utf-8?B?L0EwaHMvVWZHSWhJNU5ZN0pkNHlzYVlySFMvK0tLcWdyZEFWUmtyeUphbkNI?= =?utf-8?B?eXJ0VUUvRE9WZ090cjJSV05YT1dDeFgzSjVUMi81K2ttV0pwbFU2bXZiaWs5?= =?utf-8?B?R2kvWGlmOFIva1Vtd2ZzTlJKeEZSNU9BL1VKVnltSFBESXR6SklhRXdIVzNo?= =?utf-8?B?TkovemlRc0hQSUZSUlhrUVJtUTZQMFRNbHFnWHdsUGg5OVRUUDNqNVFEaE4z?= =?utf-8?B?ak00bWtsMFk0SEZoWlFBQVpBdytJbk1TYnRubFF2azdSOFEyWXZyUnJJNmF1?= =?utf-8?B?T3NNRmtDMlJMbTJTeVUyeXFNYUJXS0owajVES09WWG9xNDU4Ti92ZUo4VFZB?= =?utf-8?B?bVMvaWVieVhuVjZIUldEMmtPdGVPTEJFSDl6UUFoaTNBZFlwUFBvZWgxbWJZ?= =?utf-8?B?SEtNdUw1cWRrc2p0eFVidXlPV1pkUmZOMTEvSVRIdDlrekdvTDM0K0F1c2hn?= =?utf-8?B?UHRsL1dyVzhFckFIU1llcXV1K25SbURyTyt1QVRPNVR5aFlESkNBZnJ6bzR2?= =?utf-8?B?K3YxWGFyS1JDVGoyYlB2YkNnNVVZdzFSSXJvT2NGdEhtaTJRaUpMMFRUdXpi?= =?utf-8?B?aUxReUJNUklNOENNT283SDBKa0l4NGxSTnR1NDJHck1XaE5Ld2VYNW9PNjIx?= =?utf-8?B?b3RTT2xJUGZlUUp2NnVqTTdEZEJKZGttY0RURWw4a1BPclhidE93ZGJrNHRw?= =?utf-8?B?VEpPR2pib1BrMWplT1QvSUZvemJuMkdIMVVCMGx4UUJzWFF6VEVMRURtZkwz?= =?utf-8?B?MXhDdU1IYmNON1B6U3c2T0E0Y3RGYW5FdUphcFI0QTFSK09BL2cyNWJLQ0ZW?= =?utf-8?B?RXF6QTdzTVNMMm82dktoR1VocDFTZWJFSFJuanRhK0M0cTk4Q254YXNXVTZS?= =?utf-8?B?K2N1UkVFeENTM2NxSFc2UGdWelkvOUVnS2gyM2g2OFdNY2JkazdBcDZ4ZGJj?= =?utf-8?B?VUptNzRSTmNKNGJ5OWxzaW82Tm0vR0JSVFdGeHdoK1N5bllLaGJwaHlhSGU5?= =?utf-8?B?dW1iWEJ0YWF2eUVBM29MTVNSSW51UzRIWUdNSFRtZ0FSU0xiRVBvQnF0ZWh2?= =?utf-8?B?aWtveVYwcnpoSHVNM2xYaWRRdlZCTmhvZEpuc2ZEd09BVzZzL25kMmVENzE0?= =?utf-8?B?UkxiNEF1SXAzdHRqbHY3NFJZVXVBaDJSclAvWXZwWW80UG9hLzRobUJCVDFt?= =?utf-8?B?ajhaU1h1bTFtendQOHNrOFNtYWYrR0g0eks5ek8rTVJ1Wm5kVWhqUXphTGM3?= =?utf-8?B?UUdUSStIMkcvcnY5akdmSERTWmRldXpkUHlmdHhWZnAwTkVKZU4xbEwzU1JG?= =?utf-8?Q?m9yk=3D?= X-Forefront-Antispam-Report: CIP:4.227.125.105;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:[127.0.0.1];PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(376014)(1800799024)(82310400026)(13003099007);DIR:OUT;SFP:1102; X-OriginatorOrg: axiado.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2026 07:45:09.7484 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: acb41091-cb1a-48c0-58fa-08de4e89d9cf X-MS-Exchange-CrossTenant-Id: ff2db17c-4338-408e-9036-2dee8e3e17d7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=ff2db17c-4338-408e-9036-2dee8e3e17d7;Ip=[4.227.125.105];Helo=[[127.0.0.1]] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D8.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR18MB4485 Add the MAINTAINERS entries for the Axiado SPI DB controller. Acked-by: Tzu-Hao Wei Co-developed-by: Prasad Bolisetty Signed-off-by: Prasad Bolisetty Signed-off-by: Vladimir Moravcevic --- MAINTAINERS | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index dc731d37c8fe..9b53ac06ad42 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4270,6 +4270,17 @@ W: https://ez.analog.com/linux-software-drivers F: Documentation/devicetree/bindings/pwm/adi,axi-pwmgen.yaml F: drivers/pwm/pwm-axi-pwmgen.c =20 +AXIADO SPI DB DRIVER +M: Vladimir Moravcevic +M: Tzu-Hao Wei +M: Swark Yang +M: Prasad Bolisetty +L: linux-spi@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml +F: drivers/spi/spi-axiado.c +F: drivers/spi/spi-axiado.h + AYANEO PLATFORM EC DRIVER M: Antheas Kapenekakis L: platform-driver-x86@vger.kernel.org --=20 2.34.1