Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp674750rdg; Wed, 11 Oct 2023 02:12:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEKHl4sJaa9R5RSAPNV8IJm0WDuRnA3fKiRAFL8WdqRwWToGrW+F//InkGFqTSzuJnPgaOL X-Received: by 2002:a05:6a20:258f:b0:14d:d9f8:83f8 with SMTP id k15-20020a056a20258f00b0014dd9f883f8mr25039668pzd.1.1697015561196; Wed, 11 Oct 2023 02:12:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697015561; cv=pass; d=google.com; s=arc-20160816; b=lsEaFyi+bNMqQHiyIGDga7MjwyobVWZ0UUGsU+92zKXTrkJj3j+mPf89udzICbKNHE USNVn0RHbjCMi4iSliPKDp/p6i95VWr8Ec2BFJp9n5PzU8NdJZEZbelLL0+WTrU/BjII FE6APelcI7i/ASLO9iYFWNw+T1ormkyio2S5L/yvWfGqckGTYIjiEpRlnJZIonShsQiv GZnGWT13vspWmhBLF3w3ClkDQYZz6uShddvfX5+QdOAz7bAUDb6cI5X7vWqY3HQzkkcA 44diRr/lMGP/NC+PwUX+xQDuDQh/ULc5iRbomqhgpMYxudIu0CURW3myt1hklcZ56ieG ahdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:in-reply-to:date:references:subject:cc:to:from :dkim-signature; bh=YdGGHPBjSSNHg/upVv6hExLMwdEQgD6j/22W5/NgLJA=; fh=OO3Mpk1PbaM59HBRy+mKtN9TjAoL2/6x235gdQdfk3A=; b=PE9lLvjCWfCR5QEAotkdlc0vBsBO3tGxoKpVL5YMmAx6pbmrs4QVbiaOnO+OLUUYzg mtGdIY9LmgWjiAykdaWqnWdn65iiTIqGtQxTZXwZQR1M5nQIV3qKzjp6RD5ZFzCCxGIj JUK1XKzN1W3jtUKKdislPM7TH3aRWCtJdu/pLF7mL24LUzHaSq/t3qTe2EJCanvxM3Nw iuHDx4tJmm+f2D+gUr2KzFJK3rMl0NnFePXEWffUHPf1zCeOIvWm/4h9AHRZtIlSO0AJ UR8fzXTaT7vOR6ZAIhm2PPTh+qYAZqoOwKpwWodHpNjHj2ZVr/I6HK6ZXSjcARkw4by0 95oQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lukasiewiczgov.onmicrosoft.com header.s=selector1-lukasiewiczgov-onmicrosoft-com header.b=yGPSWK1j; arc=pass (i=1 spf=pass spfdomain=piap.lukasiewicz.gov.pl dkim=pass dkdomain=piap.pl dmarc=pass fromdomain=piap.pl); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=piap.pl Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id 137-20020a63018f000000b00578acf1e8a3si14464564pgb.576.2023.10.11.02.12.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 02:12:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@lukasiewiczgov.onmicrosoft.com header.s=selector1-lukasiewiczgov-onmicrosoft-com header.b=yGPSWK1j; arc=pass (i=1 spf=pass spfdomain=piap.lukasiewicz.gov.pl dkim=pass dkdomain=piap.pl dmarc=pass fromdomain=piap.pl); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=piap.pl Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 969538080D4B; Wed, 11 Oct 2023 02:11:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345567AbjJKJKc (ORCPT + 99 others); Wed, 11 Oct 2023 05:10:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231143AbjJKJK1 (ORCPT ); Wed, 11 Oct 2023 05:10:27 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2069.outbound.protection.outlook.com [40.107.21.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8459394; Wed, 11 Oct 2023 02:10:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hNTHMit2AZTygELs4yPCav/YeRgCMMWfLAj9DgeNv/rF338+c9AdgZLSOD7XNElsCv7lozwD6Vv9yTSRn1WfjTj5W+Jjj9TuNuIIzZXs9auSUQF6+Y15KANf3uWKjPiugIoy+WHFXYZXn/M/pWF21Rb/6/pQGpWOTuMvRINAr9rNz1W3/2Wa5YpeSUv12kqzyUs7DyOakjNjppv2VEKAKvwYEdBDMhYy2/pmH7Rc0ejA45FNGyFX+5r1cp1Jw5Qx0nsBsbSWzioRz7M9UEeyN05aXfPWH9DSU41nZnTFkJR2xDd0Jf1dhAVgV/xlPlLZh4fsqp5JeVJ7ommq/eiQuQ== 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=YdGGHPBjSSNHg/upVv6hExLMwdEQgD6j/22W5/NgLJA=; b=C5ESDnwvdpMQKQCKWZRg+jw67lMSBDOQwOj0NaWxqAnFtC0RhJjEYK1kAcyvVOBbiTFgxL/limMtqjoOS8dEhF31wmgd0ZphYsA935AzxZ8OkMR04fQMMXe9sULNqFihJkvMJDXYijEWfP7OFSueGV0zYcy5OCY1RPMBkRk21yv/0lHqXQmIU3INbn44oodCshMO8K62We13ZokzzhgGgKadJVQJ75fK0DS5g7DTo0BXMAXf1w2ZtwwMjka+ZDDQcLaKP0HimiSFuDATw+HQr4DZVLRYakV7c18WcQXTpd6xUJJEi+okxO+Bf8D3YNCiEiCo3PZWhL2W+Q2hicgRbQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=piap.lukasiewicz.gov.pl; dmarc=pass action=none header.from=piap.pl; dkim=pass header.d=piap.pl; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lukasiewiczgov.onmicrosoft.com; s=selector1-lukasiewiczgov-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YdGGHPBjSSNHg/upVv6hExLMwdEQgD6j/22W5/NgLJA=; b=yGPSWK1jiQEXZEdYTha39ZR4NnMwrEdQL99Xra85P3ezRIKTw9Qvl87xrinwvy9v8lXB/3jBQYzuPmEtLd7UP40wfzmYX+N4DdpPdEY+OKnGQJnI8os1hMl5mJXezNI0WBDYgamPL1kxTuoV3lI+/wCl6NHN1utltfpPpek1Z9c= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=piap.pl; Received: from VI1P193MB0685.EURP193.PROD.OUTLOOK.COM (2603:10a6:800:155::18) by AM9P193MB1047.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:1ff::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.41; Wed, 11 Oct 2023 09:10:21 +0000 Received: from VI1P193MB0685.EURP193.PROD.OUTLOOK.COM ([fe80::1bd8:1a5d:e69:d1a7]) by VI1P193MB0685.EURP193.PROD.OUTLOOK.COM ([fe80::1bd8:1a5d:e69:d1a7%3]) with mapi id 15.20.6863.041; Wed, 11 Oct 2023 09:10:20 +0000 From: =?utf-8?Q?Krzysztof_Ha=C5=82asa?= To: linux-media Cc: lkml , Dave Stevenson Subject: Re: Sony IMX290/462 image sensors I2C xfer peculiarity References: Date: Wed, 11 Oct 2023 11:10:20 +0200 In-Reply-To: ("Krzysztof =?utf-8?Q?Ha=C5=82as?= =?utf-8?Q?a=22's?= message of "Tue, 10 Oct 2023 11:46:12 +0200") Message-ID: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: WA2P291CA0044.POLP291.PROD.OUTLOOK.COM (2603:10a6:1d0:1f::20) To VI1P193MB0685.EURP193.PROD.OUTLOOK.COM (2603:10a6:800:155::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1P193MB0685:EE_|AM9P193MB1047:EE_ X-MS-Office365-Filtering-Correlation-Id: 29c4ad58-e5ee-4da5-b229-08dbca39e4f7 X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: txN5jWWxfBmjSBRbX5c1sQGVs9ZQSwekkh2sIU1swTjC5rnDJ00EeO9jDMAp1GHpr9YoDzth17bn0ysn2RbPNAYlE0yb0UwAwdk1hC2FjK8+Ut3I2kfjpwvanC3cj7FhlVZpiIRLbxAdMzLANEVBTy4EQ3Okb0/5hLC27znUt/uMtIozFkZHFrBSOjS5C1grp2jl5Xly4Zx5Rn9axs9Xc6NUpI3QgQpKDx9SfuW5P5yD1/zPuvLAf7R6qMTccHCQxiqvvhvUumm8hQbVmR+gr39MgX3onde8masi/b6YDpat2VbmhlxcOlS6UDWD88tsOxX2x1Hhap0cK7xai1G/mRowJEmYhSJfB8rVMdJ1OkvSt2jRROEqpXT40K+TZ9KTxisesP9XvV2wBCQkETf52gmceObAcpZ90gkrUXmFD8581cMHzgCvtlbmOd+Ff1KLnnyQgPpRmMXhg7+Lb0fZtEswuX7dwqFzH4Q9ct9jrU/zyYtGghB66Dpr5KVGSIYcv9DasQjFmKfxZOeHLlO8OqEg1H5pU2U/GZ9kBF33KYoD3MZxl2olkaxmkGio1lZTMlKYq9ng9cHTqUkoBklh9G0o5S6zqzcxdzpKpsqOl0yJK9IPtMFw9qB/NuPqV75p X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1P193MB0685.EURP193.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(376002)(136003)(396003)(366004)(39850400004)(346002)(1800799009)(64100799003)(186009)(451199024)(2906002)(52116002)(66574015)(83170400001)(6512007)(6506007)(42882007)(26005)(66556008)(6916009)(786003)(54906003)(66946007)(478600001)(316002)(66476007)(6486002)(38100700002)(38350700002)(83380400001)(4326008)(41300700001)(8676002)(8936002)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?d090bndiZXpUOVRRaEl2QWVOc1QxVGFMTkxvcjZESUU2bW1HZ05rODV3bzZD?= =?utf-8?B?MnNMaVNOK3VWM05OaGpjeXVDc1ROM2FYcjBaTUNHNEYyeUYvUVpwQzNsR0Fv?= =?utf-8?B?ZFpjT2Fxd2pjK3FVM0Z3ajBId2dkTVVyYlQveWZ5ME04QzkrcUsrT2c4MEk5?= =?utf-8?B?WTNwK0IzT3IvNUJQM1diSHBUejhEb1RnZ2FVZ2FUZzJWWHNIN0NvMU1qUVhj?= =?utf-8?B?V0p3elB4eDBpWG15bmk5U2JiMnV2QmV4am1sRytMSElRMFQwc0ZHNmVXeE9a?= =?utf-8?B?ZUsrRXZtb2dTSDhpR1ZKcUtJb0YyN2VYUWMveTBnS0pod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OGI5Ti9ZNW5XUm5tQjlTOGtVenk4d2hnSUlNSlZyUXRkeWNXOFduMFpa?= =?utf-8?Q?ICdMtveN/pY1Pg494MSfPzD84N3+QG1X4GSQn3jHwNBy?= X-OriginatorOrg: piap.pl X-MS-Exchange-CrossTenant-Network-Message-Id: 29c4ad58-e5ee-4da5-b229-08dbca39e4f7 X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0685.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2023 09:10:20.8283 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3e05b101-c6fe-47e5-82e1-c6a410bb95c0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rg+SD6WIqPUvdJo0em5vJihs1ryRZ20oEVpm6/PH3msx8l6Zp6PPa0GUu0PpAMgUdYd3+UwJzscfhFf97d3+7b9imR2I9+fRoT+0AM+VzC+WakoBGuco+IVmccvXIcUKtzzIE6ijbmApvjF2qC+ehw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9P193MB1047 X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 11 Oct 2023 02:11:03 -0700 (PDT) X-Spam-Level: ** Hi, For the record, I think I will use the following. This way reading a register from Sony IMX290 and IMX462 image sensors (which behave exactly the same on I2C bus) takes up to ca. 270 us, and writing a register takes up to ca. 230 us. While still slow, this means the sensor won't disconnect itself from the I2C bus on 7 ms timeout (I wonder if the timeout is 3.5 ms on sensors running at 74.250 MHz). The times are on i.MX8MP at 1600 MHz. 0x30a50000 and 0x30ae0000 are I2C controllers connected to the IMX290/462 sensors. Not very nice, but works. Obviously, long transfers (like reading 0x100 registers at once) won't work (0xC0 seems fine), but the sensor driver only does 1-byte reads/writes (resp. 5 or 4 bytes on the bus). diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 97455283ef0cf..ffffb0d50ebd9 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -275,6 +275,7 @@ struct imx_i2c_struct { =20 struct i2c_client *slave; enum i2c_slave_event last_slave_event; + bool no_sleep; }; =20 static const struct imx_i2c_hwdata imx1_i2c_hwdata =3D { @@ -1249,8 +1250,15 @@ static int i2c_imx_xfer_common(struct i2c_adapter *a= dapter, unsigned int i, temp; int result; bool is_lastmsg =3D false; + bool really_atomic =3D atomic; struct imx_i2c_struct *i2c_imx =3D i2c_get_adapdata(adapter); + unsigned long flags; =20 + if (i2c_imx->no_sleep) + atomic =3D true; // IMX290 and IMX462 sensors disconnect after ca. 2^18 = MCLK cycles + + if (atomic) + local_irq_save(flags); /* Start I2C transfer */ result =3D i2c_imx_start(i2c_imx, atomic); if (result) { @@ -1258,8 +1266,12 @@ static int i2c_imx_xfer_common(struct i2c_adapter *a= dapter, * Bus recovery uses gpiod_get_value_cansleep() which is not * allowed within atomic context. */ - if (!atomic && i2c_imx->adapter.bus_recovery_info) { + if (!really_atomic && i2c_imx->adapter.bus_recovery_info) { + if (atomic) + local_irq_restore(flags); i2c_recover_bus(&i2c_imx->adapter); + if (atomic) + local_irq_save(flags); result =3D i2c_imx_start(i2c_imx, atomic); } } @@ -1318,6 +1330,8 @@ static int i2c_imx_xfer_common(struct i2c_adapter *ad= apter, fail0: /* Stop I2C transfer */ i2c_imx_stop(i2c_imx, atomic); + if (atomic) + local_irq_restore(flags); =20 dev_dbg(&i2c_imx->adapter.dev, "<%s> exit with: %s: %d\n", __func__, (result < 0) ? "error" : "success msg", @@ -1627,6 +1641,7 @@ static int i2c_imx_probe(struct platform_device *pdev= ) i2c_imx->adapter.nr =3D pdev->id; i2c_imx->adapter.dev.of_node =3D pdev->dev.of_node; i2c_imx->base =3D base; + i2c_imx->no_sleep =3D phy_addr =3D=3D 0x30a50000 || phy_addr =3D=3D 0x30= ae0000; // IMX290/462 hack ACPI_COMPANION_SET(&i2c_imx->adapter.dev, ACPI_COMPANION(&pdev->dev)); =20 /* Get I2C clock */ --=20 Krzysztof "Chris" Ha=C5=82asa Sie=C4=87 Badawcza =C5=81ukasiewicz Przemys=C5=82owy Instytut Automatyki i Pomiar=C3=B3w PIAP Al. Jerozolimskie 202, 02-486 Warszawa