From nobody Sun Nov 24 18:32:30 2024 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2064.outbound.protection.outlook.com [40.107.104.64]) (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 04C251B0F26; Mon, 4 Nov 2024 10:01:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730714464; cv=fail; b=lwgLlRFt4jWOkXCpBC4ffHSQpt9CtlkWrcKyJI21Ru7MUhDP6sPEFbGNBLrvd43GJVfm67ZlE5HBsigz2nusILF1rmHV23Ju6M0BwM0PQg8v2LaBBVX72V6jaK6S8H9033+/aaz3N6+tTcpTYggBFK2BIhQDFiJdni+rdp52ZN8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730714464; c=relaxed/simple; bh=U7GBfDvNoizSjWh01A042BOlkC0W56gsgmVgLj2y3ho=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=JfwtvFSE0kCHLq9eX+AY/NPNMcb3UBsHbKXZqw8qWfVfcUyEW2bDk77Pkka8PFTCLSBZvu46Vqhp7MIOufvyspj10DgQbkUSOeyMf1s2lIAIBGQGiCfzMxwoEPABysVUtrYFBRvt1EEYSItdV7B2D4qdBGCf03YbRp3gCBiShrU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=M2J2CRCu; arc=fail smtp.client-ip=40.107.104.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="M2J2CRCu" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tdvdLq6QSpfO/S2EPipQg58izacjnrz2+Y/3MoogEYkq4pK5HkFijsWBmi8lRE1LZNIf4/GIfG69x4tcsEwh8qTRbgJzun5gtonRk16qXtag5s9Q4ndTR/kp2Yf0VuQAfp25ygyvQBrb0Ocmv/e3KuCSUmi17+R3UTB6hy3DF3jFHbYPw4SLP5p1InirNWcNvEaHEuL1vtGFRGwqUpcDpao9LJBRk1J911Oly2uTiHDS2VOGcN56n2Gp0waE5G5u/KXD7RhUc34rgctxVlnjsQstj9HdIquCi6UcVSW+hdKfdpQ0Q2WD+mzhfn0Q3vPGuPDToLgSt+SxcxgxUYe9tQ== 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=kwZ6s2Kxruih+NW0LgLdVIf3bnoPNU9rRCt/vQ+acig=; b=Pvj8QTU2AIUq31m8rRjeujNvg24oTTg8SoWpXFl71jQqGQMHTsotTJTGmZSsvd4PlP4oEYgbbQSBqrjAqEsWNIJnMPN7kohsqHZqSAJOMd5PvalF2M9J/0A2wCy6vb/AEcieqRPdrfy20bHU0+GTXuUlpHQjJyT4Yz76kMvNsFY1DK/NDvk14ItTnKYkQkTCmCAeq+rSm/nNG4Lqfr+WTyilqvwsCyfedDDrgvzLtJtdIHG7+a6zO25XxGpnZbvFmXJdvBvLJZu98bJfMGisBs/kLsYqjo9E3icfdFE4HSPgz7XmKy4eVT8rgsaBc7vBwKJq3nlPpwbNaNanT+sEOA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kwZ6s2Kxruih+NW0LgLdVIf3bnoPNU9rRCt/vQ+acig=; b=M2J2CRCuoU8Wx+qgxfMmws2rP70MRUCr+720XgMhUJ0wKUxOY+n7tFczOjuNhjcw8l6KbEbxnTc+LhevN3TWUiU0ZaJRWMEIIEPLGoT3DoI11SgG4NU/5Yktz0d9Tc4TiXgfgBfqO9OugfV1ko05Css1oCiYF/VGSm/Tq/Zz5scZes88xBfzy1iXL9Z1zOCouwTlzY8b97NOzzTE1G5XNfckoL2uG/U3bi2csO9C4FYOKblDUTpnzRvY0jYcOIKWM2XiJ2kIpfBIP7fqx8htR1zlQ9DzmSODQe+tgs0de6U/FpjgSBSPxBtXQ3g2Evd1Cm0FJs/+DkskeU4qSxhvTA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) by DB8PR04MB6825.eurprd04.prod.outlook.com (2603:10a6:10:112::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 10:00:58 +0000 Received: from DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd]) by DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd%6]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 10:00:54 +0000 From: Ciprian Costea To: Oleksij Rempel , Pengutronix Kernel Team , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Ciprian Marian Costea , Ionut Vicovan Subject: [PATCH 2/2] i2c: imx: add support for S32G2/S32G3 SoCs Date: Mon, 4 Nov 2024 12:00:44 +0200 Message-ID: <20241104100044.3634076-3-ciprianmarian.costea@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241104100044.3634076-1-ciprianmarian.costea@oss.nxp.com> References: <20241104100044.3634076-1-ciprianmarian.costea@oss.nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM8P189CA0028.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:218::33) To DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9251:EE_|DB8PR04MB6825:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e143f73-9541-434c-6ccf-08dcfcb791f8 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|7416014|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?TTFQNThxMXpTN3Fka2hUUEZCZTRPbnNXRkpNQnhJbTdOQXU2QW1aSDB6czQr?= =?utf-8?B?MG9CZ05DYzVjNE10TFdtR01FV054cWc5LzZqUG0wYlZ3RFFCVmhZS0tDcFI4?= =?utf-8?B?ek9DMGgzK3lKOEVoR1hvWWVYZGxsbE9vdlpvR2hlYUZDa3RCYT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0TGZBNHRlY0o3dVJr?= =?utf-8?B?UEJVN1V3YldDS1B3aytFT2VRbjRHeXNKRi8wYjRxbjY0VEdlbnE0SkJKZ3Yr?= =?utf-8?B?a21BekdweFFKV0xBZGFDcGQxZmRjRWlTMUVqZ21TYlUyVFNyYTBMT1RvNklm?= =?utf-8?B?TzNQbmVBN1RSa1VLOVpvdEVHUUtvc2xUTERzT0U3VFlkSTAyQUozUE1jMmh5?= =?utf-8?B?MmZmOUlGa0xEWVNvRHVQYWJobmRlRkVmUTdTUnlOMG1qeDNYVlZmOGdqVGFV?= =?utf-8?B?SThNTm9RdUJLaUNseUlpTlRCeUt6cWxyMUE0eis0T3F1cUFSK01XanhQMEhi?= =?utf-8?B?b0lsZVFkcHAwbk95djQ3ekZKTHNwU2JjWVhCR1MvTWFzOXJRTm5FUjBuUTNJ?= =?utf-8?B?MkJta3ZyN1Zha05IYVhHaHg3dUFNVVZMa2RsWGtrWW9lVGFveE9ScjJTTUE5?= =?utf-8?B?Y1p5NGxLdWFDcUMwU3JhbTh6d3V4S1NiWW1ockI0NERFMW5QZnRreEhnaE5I?= =?utf-8?B?VFZCb1BPN0VqUmJMZDNJYVlIMkZ1aEJ5NGVWTnJId3V5ckNJekliQ21EdVdQ?= =?utf-8?B?bHZSb0xBckN6VkRmZjQ0bjJIZlZmYXN2b01tRUZFL2MwV283Q0Y3NXFmRzJP?= =?utf-8?Q?i2iahLC/0LQ9joLOzO9e?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9251.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WTgweUJSOXN2NW9FNFR3cEZBbFYxUHdNM1E4MDErZS9GN0hSZk5rVFBwZ01k?= =?utf-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lDaE56RlVMbmdQK2lxbWtF?= =?utf-8?B?UUNEbXZVSkw2YnpINWxFN28yeEhVNFE3azZOa1VHZzNLeUpuankwTTkwRWN0?= =?utf-8?B?VlYyUHl4TFl1a0xBRUxpaXEyWjE5c2x6SWZGMkNyK01Bd2hyRGJhV3MrZTI5?= =?utf-8?B?T3AxbVNxZ3pwL1hFREZ0TXJzQmFxNWkvRUJBaEdkcEdIanc2RGRQSGZXbGtx?= =?utf-8?B?ZG5PZC9YM3BJUTRLc0VWNnhzeVBVT2hSYlRRN0VTT1g3S2pCU0hVdm4vWnZR?= =?utf-8?B?SmxIOGQwOUVtNFVLNWQyRVdTcjY5QVFZMWFqWlozUVNBOFQ2MngxYlBkK2tH?= =?utf-8?B?c0E9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e143f73-9541-434c-6ccf-08dcfcb791f8 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9251.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 10:00:54.0136 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Rl59JlPJcC7Ly8lTQVmzql1tTvL2nT7l0l2mJ6XTZo11nfHfqbe7UIouSQV6B/ainK+4FunYy+d4noOwwZjIx8kkgSM45XdlJR4lJ4n/jzA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6825 Content-Type: text/plain; charset="utf-8" From: Ciprian Marian Costea Some S32G2/S32G3 SoC I2C particularities exist such as different pairs. Those are addressed by adding specific S32G2 and S32G3 compatible strings. Co-developed-by: Ionut Vicovan Signed-off-by: Ionut Vicovan Signed-off-by: Ciprian Marian Costea Reviewed-by: Frank Li * * Copyright 2013 Freescale Semiconductor, Inc. - * Copyright 2020 NXP + * Copyright 2020, 2024 NXP * */ =20 @@ -84,6 +84,7 @@ =20 #define IMX_I2C_REGSHIFT 2 #define VF610_I2C_REGSHIFT 0 +#define S32G_I2C_REGSHIFT 0 =20 /* Bits of IMX I2C registers */ #define I2SR_RXAK 0x01 @@ -165,10 +166,35 @@ static struct imx_i2c_clk_pair vf610_i2c_clk_div[] = =3D { { 3840, 0x3F }, { 4096, 0x7B }, { 5120, 0x7D }, { 6144, 0x7E }, }; =20 +/* S32G2/S32G3 clock divider, register value pairs */ +static struct imx_i2c_clk_pair s32g2_i2c_clk_div[] =3D { + { 34, 0x00 }, { 36, 0x01 }, { 38, 0x02 }, { 40, 0x03 }, + { 42, 0x04 }, { 44, 0x05 }, { 46, 0x06 }, { 48, 0x09 }, + { 52, 0x0A }, { 54, 0x07 }, { 56, 0x0B }, { 60, 0x0C }, + { 64, 0x0D }, { 68, 0x40 }, { 72, 0x0E }, { 76, 0x42 }, + { 80, 0x12 }, { 84, 0x0F }, { 88, 0x13 }, { 96, 0x14 }, + { 104, 0x15 }, { 108, 0x47 }, { 112, 0x19 }, { 120, 0x16 }, + { 128, 0x1A }, { 136, 0x80 }, { 144, 0x17 }, { 152, 0x82 }, + { 160, 0x1C }, { 168, 0x84 }, { 176, 0x1D }, { 192, 0x21 }, + { 208, 0x1E }, { 216, 0x87 }, { 224, 0x22 }, { 240, 0x56 }, + { 256, 0x1F }, { 288, 0x24 }, { 320, 0x25 }, { 336, 0x8F }, + { 352, 0x93 }, { 356, 0x5D }, { 358, 0x98 }, { 384, 0x26 }, + { 416, 0x56 }, { 448, 0x2A }, { 480, 0x27 }, { 512, 0x2B }, + { 576, 0x2C }, { 640, 0x2D }, { 704, 0x9D }, { 768, 0x2E }, + { 832, 0x9D }, { 896, 0x32 }, { 960, 0x2F }, { 1024, 0x33 }, + { 1152, 0x34 }, { 1280, 0x35 }, { 1536, 0x36 }, { 1792, 0x3A }, + { 1920, 0x37 }, { 2048, 0x3B }, { 2304, 0x74 }, { 2560, 0x3D }, + { 3072, 0x3E }, { 3584, 0x7A }, { 3840, 0x3F }, { 4096, 0x7B }, + { 4608, 0x7C }, { 5120, 0x7D }, { 6144, 0x7E }, { 7168, 0xBA }, + { 7680, 0x7F }, { 8192, 0xBB }, { 9216, 0xBC }, { 10240, 0xBD }, + { 12288, 0xBE }, { 15360, 0xBF }, +}; + enum imx_i2c_type { IMX1_I2C, IMX21_I2C, VF610_I2C, + S32G_I2C, }; =20 struct imx_i2c_hwdata { @@ -258,7 +284,15 @@ static struct imx_i2c_hwdata vf610_i2c_hwdata =3D { .ndivs =3D ARRAY_SIZE(vf610_i2c_clk_div), .i2sr_clr_opcode =3D I2SR_CLR_OPCODE_W1C, .i2cr_ien_opcode =3D I2CR_IEN_OPCODE_0, +}; =20 +static const struct imx_i2c_hwdata s32g2_i2c_hwdata =3D { + .devtype =3D S32G_I2C, + .regshift =3D S32G_I2C_REGSHIFT, + .clk_div =3D s32g2_i2c_clk_div, + .ndivs =3D ARRAY_SIZE(s32g2_i2c_clk_div), + .i2sr_clr_opcode =3D I2SR_CLR_OPCODE_W1C, + .i2cr_ien_opcode =3D I2CR_IEN_OPCODE_0, }; =20 static const struct platform_device_id imx_i2c_devtype[] =3D { @@ -288,6 +322,7 @@ static const struct of_device_id i2c_imx_dt_ids[] =3D { { .compatible =3D "fsl,imx8mp-i2c", .data =3D &imx6_i2c_hwdata, }, { .compatible =3D "fsl,imx8mq-i2c", .data =3D &imx6_i2c_hwdata, }, { .compatible =3D "fsl,vf610-i2c", .data =3D &vf610_i2c_hwdata, }, + { .compatible =3D "nxp,s32g2-i2c", .data =3D &s32g2_i2c_hwdata, }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, i2c_imx_dt_ids); --=20 2.45.2