From nobody Sat Sep 26 10:02:09 2026 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 145334A262D for ; Wed, 2 Sep 2026 14:23:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788359031; cv=none; b=c5BYeWLaf4ISG8bOzK5F8cuZBMXLz2xPwO31GS3WJKuTZBk0jU9DqlgrMgo0aBos5/ypINUGueSCrZUBgOfoZxWr9i8Nkv/Mc0kOs2qjIEqECM1y11J7PSIKpDicdUWS4gAw84OeB7WQBP75iAIled4ZP1UbJH+/j7vaq5/mfRw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788359031; c=relaxed/simple; bh=7Mf6k0qVkozT4YeFG9EjJGBACApFcUwcZixfGal0Bpc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XEdWizsPovP9rb4GoJUEW5fO98gSU1M8ZkIOEX9GqL++HiGO9EXbyLo3SZ+l0LOLCmPZrxYY3VWZ/vwzqon0rS86ZgxhILW5OmjF1KmMoV3b7s5AClGznvE5xuJb/aVwoVS79xvoHqPQYS5dhGPiEHmsxI0k8USXXvvQALFXKiw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Js3cO1uN; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Js3cO1uN" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-49b8ce9b733so8282655e9.1 for ; Wed, 02 Sep 2026 07:23:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788359027; x=1788963827; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=SM52+0dlyaiG6ccFqkc22ArwQiXLj4h7/RuQ4lLTioI=; b=Js3cO1uNRz11TcLZK+JXrkluXlYQq1MTrFceGOyIY9kGlhiHYascXCXu18wWiph+of h7tMOLy7Misuz5z83fDyds27/r97ylz9FO3GXRSVkGYl/qAIrRNUVWr2hQA9jzvDurBj 5SdwA4xuOFe/fQoxuNFYx5O7J6z2Bss/hnIjySXEXo0IYk5z98pSyDMnJvoQCHYptEZE fZAi76f+ES8u8oVYbX8y2Um2+nuPmfeKN/5LC/q+xh8scMEaEN66Il16vcw/uzbvObrC j+GJkCu/b1RRP6j8QbxZt/qTHo0IuZVqw8GlBOS4Uik2KaCMpGdvfciJE/gBKIVYzcRA IuBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788359027; x=1788963827; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=SM52+0dlyaiG6ccFqkc22ArwQiXLj4h7/RuQ4lLTioI=; b=gIzk23Df9sCBzzCZzYH8WSFNSW1DJfB0zLE+gVci5TvlgZ9b1gL2sxZvpGmnyuFIiy UCF/Z8+Lo24qnxqvLWuyR8rY00PQMSfQHzQXYkoQhMRZCvkWoHRJzitrWLXSR51iiIsW x9CCiwlzHXKFQ+Dm/U4IyemiVnhzQ2cLEatj2hv8h/aCSqyhP4SPAYfCwC+1p2xVWcl8 virbOhv7cdKRR72XEcPz+TtQdPn0NOPuIZqQb+A3Ttc+mv2k1AVNLMiuRKZKoCeej5cV aRdX1PlstFcEI8ir7iRWApYgAR/7be3kpxrBKQnDL+0WVF23fQLoMPA4KaKnKEJOg8mF b5Ug== X-Forwarded-Encrypted: i=1; AHgh+RrdvApAHv1AnblpsEXLskxNYPai9G0MVpPWwqAbF7OE7pTDvvTADCkXVuWbjnNTVkBTStVhutNARSFW+vU=@vger.kernel.org X-Gm-Message-State: AFuF++m6pdH62v7V2Gh5TrkaCRneLxKyBr4cdG7JPK41bmqDoIEJOyIG rl4z8ecIaoAc4VdEXlVDpxLdpIHO3wjb+mVmYBGXuMf3r1xfOH5U266o X-Gm-Gg: AR+sD11XPymniT5LxlCGG+GpV3XP2QojTuUqBAjj7X3s1/L+rII2u1aiEL+C29mdeys nxZRPY07tBkYLavvdhSbWNlk8Y36CdRHhiqcoCu2LZOC4+bZaBoVx0A9fofcrGw7DGpibR28Xi4 mfP3PirKG5W3NF3G6E6TS5jt1+ePB5s6eftVtkKW1GGtXaoeHfxjdOpxYP0ZoIVxBLpvQqCm7y1 bzs8Lr/Q2HJofCvr+EJ/bolnM8MaWd+BcqxfARjfwHXNKwMgF1aO9MQm3k7YwKyXFOusX/WD7Wt sqGP22u6K0fgpk4BiDj8EukptfLkM5t9C3ZNxt3Go7KmqsF+Q4WMeSZSbzzAvyrlz0qzxjeyXDY 1K/SZsB01wm6YJZg3pxJ6mD6mhT8aqc3owLet2bJGZHKIDIeYqSNH5t/n7IK7UtjQscdInHXw5L LRPGNYl6sPlTtrYSg4dVOWi3PJS+sSPS6jg08VZPBi3Fck7/gRJZcgT9Kjmm6xL9WuYUDRNZxef 2n8mSa2v2ZbsSbGHckcaNmTf+C1Q5eX1e78vm2V5GNcZZCvPQ0NHnakAPMA X-Received: by 2002:a05:600c:1c27:b0:49c:dcec:bd27 with SMTP id 5b1f17b1804b1-49ce57fd7bamr86987885e9.8.1788359027030; Wed, 02 Sep 2026 07:23:47 -0700 (PDT) Received: from raviolimobile.tail5f26fd.ts.net (mob-83-225-30-215.net.vodafone.it. [83.225.30.215]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49ce5927b68sm58999265e9.1.2026.09.02.07.23.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 07:23:46 -0700 (PDT) From: Fernando Rimoli To: linux-media@vger.kernel.org Cc: sakari.ailus@linux.intel.com, dan.scally@ideasonboard.com, linux-kernel@vger.kernel.org, Fernando Rimoli , Mauro Carvalho Chehab Subject: [PATCH v5 1/7] media: i2c: ov5693: Add OVTI5693 ACPI HID Date: Wed, 2 Sep 2026 16:23:15 +0200 Message-ID: <20260902142322.73523-2-fernandorimoli11@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260902142322.73523-1-fernandorimoli11@gmail.com> References: <20260831181858.325109-1-fernandorimoli11@gmail.com> <20260902142322.73523-1-fernandorimoli11@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The ov5693 driver only matches the "INT33BE" ACPI HID. Some Intel IPU6 Surface devices (e.g. Microsoft Surface Pro 9) enumerate the OV5693 front camera with the ACPI HID "OVTI5693" instead, so the i2c core never binds the driver. Add "OVTI5693" to the ACPI match table. Devices that use "INT33BE" (e.g. Surface Go 4) are unaffected. Tested on Surface Pro 9 (IPU6): the sensor enumerates as OVTI5693:00 (ACPI path \_SB_.PC00.I2C3.CAMF) and binds with this change. Link: https://github.com/linux-surface/linux-surface/pull/2171 Signed-off-by: Fernando Rimoli Reviewed-by: Daniel Scally Tested-by: D. Manresa # Surface Pro 7+, IPU6 TGL 8086:= 9a19, INT33BE; 4-7 backported to a 6.19 linux-surface tree --- drivers/media/i2c/ov5693.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index 4cc796bbe..02236f3db 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -1396,6 +1396,7 @@ static const struct dev_pm_ops ov5693_pm_ops =3D { =20 static const struct acpi_device_id ov5693_acpi_match[] =3D { {"INT33BE"}, + {"OVTI5693"}, {}, }; MODULE_DEVICE_TABLE(acpi, ov5693_acpi_match); --=20 2.43.0 From nobody Sat Sep 26 10:02:09 2026 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A02124A384D for ; Wed, 2 Sep 2026 14:23:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788359036; cv=none; b=QWM6Crm5fRODeCnNiwyR/iqx1Et9bFmqGjYjshrllwgJMxUiHlLHyY/iaGH7RF4QpaZqCalU98jF4ETz2+/ot/4hhEEMVpa7f/9kddElrHVJ1wkHILL7KMQxChztphXEosjNvH9uAN9Zw7o7Bs30/Y0cuPi06VEd7FMy8dBh4sA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788359036; c=relaxed/simple; bh=38NdsR7peVgmU+Oqd+nIHCO2SJKGV8pY8vX9DgyGykU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=f5XfLQK1syJBqnvV3PdqxrmxFB52jJXERT93jaGfaz6tFVdrAG/i20ElZ5QZhgJlImD9W7T02mlwxcQUgmxw12v0cKfTZDbpXnOpDj1HpsqvPKOYev1L8BHiizY0jawEOlqIsBaJGhZPQO06qqzRntCsVCDyK7P8A8i8ieYMirc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=B6VtD3sJ; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="B6VtD3sJ" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-48441a2ba1bso765082f8f.1 for ; Wed, 02 Sep 2026 07:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788359033; x=1788963833; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=2abaWYtjVKV9VZXaLgXVyTO08oA7zY/lp6O2BFsx6Gs=; b=B6VtD3sJQP9dUahxGoPpOgI9gldwlxvAza7jeobH0C1Jlr3jRjT8k2hRFLLpt88izz jpbuF7k614XeROtuMfk4EsC2SY6MUXsIn4gPENk+70EU5bO1IaB/uYRZ9/rEE7ejXDef UOyhPWQdIy5syMiaUdHVKk2i4Pm2EkSqOSovEjlzIF2eJULxvIY/wGF32p4WMQPwJnBd 3fVU7ckWs1oQb31ooYaTPlAu9ENg13iEGdc9fWB0TPSDW2LNV2LfrZkObSDRGxP2uHp2 /Gw9wO06vKUdIBSPutHycxDlRKFY4aV3YhwszFkm3uQO2lb7OMtpvzHnEJUZYvVxdqZN FaTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788359033; x=1788963833; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=2abaWYtjVKV9VZXaLgXVyTO08oA7zY/lp6O2BFsx6Gs=; b=GhVKC99ifn6/yIPGiXzoDlym8OTECjc/prlhpKT7nozTPXnEZpSBwpuE10p/HPT1z4 NrBdPHPOLPbUn0x9jozIp+8G4+puCDPT7OYLJXLRblbbL9zugkeEdDyXFVPG3ZRqTeew yhULpbgVq1ZUsGg3YCQncybZ9ssGuUgsaVy9edeHtdX2TZ0tEKowSGt+rfEleIwn/rRl 1fsKf8SJkdGy3PW5xs0Kq/VmDApd2xNv52VBlmv6RBb08F3YnDgwVXuAApBhjdSJfclM GfkWA5dBUGs7lRjS2G6W/Krab1WoHIQyf4ZF6ApgkgX/6u79VZdvqhaglBpct0+X5x06 gadQ== X-Forwarded-Encrypted: i=1; AHgh+RoqbfOn7+3yk6A2wkb+hyDQWbZil1pfM3PZZypT60YtRxR40JmHqC9vD0+FiUdkn3PVuWeo6xfRCrrMDAo=@vger.kernel.org X-Gm-Message-State: AFuF++nVCH0u0JOQf1xRaMwcGw/MRD/xJ/GcDAGjanqBmlIZvj1BiUwe qFzcLoFBxmOuzN9PDtlzT2lnXwc3qcYxvj7uZRSq7O9mVlIK5JrRNIcr X-Gm-Gg: AR+sD10B3DU7H6xnSpboIYRV+puXEUGByFMrnGTbUr2vRm5xLeczxVDlbb0jZ81zjLZ 9V++V8UrM5qfUuN7pe/SfmJaDQWez9PoxK6ceg0jOns+NYpomBrN3OA8k2C36l8TfDKymrRhlhB BScCDuzDwCbT7sC2oljUF+h1jHy3alwOllCiZMHtt6BGfK3ca/Im0AM3lObHtPtqqZWzsQjoU+0 /Yti4Uxlad0G2Lyc0rK2fYeF1NllqLHJwLfY9i92cbdU6WAz50D97Cz1CWbjeVY9KELYwmR8z4K Ev0s/F/P7F/bwkw9IVsYDBWzhtBRDhutUo5dwzv4236S5LwdbNjZPq88CPcOaewbV+qCNRkDoTG ps8gmS6E5VjjptpotWT/5Vz7de25k/Ne0VzT0xhGFf5alDTYXxRDmIL/K71mixPAMQ/fXq8amz0 wY4n8C1QewDy9TsYAnYz0MVQtEWD7oF4BWp3F6PIPQdJDrf7fsRrz9uQy7XZ6vO0KedEvm0fSaN hbl1h4+uBRDER8cmS80aaWjEcaTy11asTt6/ouAzoUATTGlDxo61QH/HU8= X-Received: by 2002:a05:600c:4e49:b0:499:84fe:5f3e with SMTP id 5b1f17b1804b1-49ce58388d2mr102414235e9.9.1788359030845; Wed, 02 Sep 2026 07:23:50 -0700 (PDT) Received: from raviolimobile.tail5f26fd.ts.net (mob-83-225-30-215.net.vodafone.it. [83.225.30.215]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49ce5927b68sm58999265e9.1.2026.09.02.07.23.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 07:23:50 -0700 (PDT) From: Fernando Rimoli To: linux-media@vger.kernel.org Cc: sakari.ailus@linux.intel.com, dan.scally@ideasonboard.com, linux-kernel@vger.kernel.org, Fernando Rimoli , Mauro Carvalho Chehab Subject: [PATCH v5 2/7] media: ipu-bridge: Add OVTI5693 to the list of supported sensors Date: Wed, 2 Sep 2026 16:23:16 +0200 Message-ID: <20260902142322.73523-3-fernandorimoli11@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260902142322.73523-1-fernandorimoli11@gmail.com> References: <20260831181858.325109-1-fernandorimoli11@gmail.com> <20260902142322.73523-1-fernandorimoli11@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The IPU bridge builds the firmware node graph only for sensors listed in ipu_supported_sensors[]. The OV5693 is currently listed only under its legacy "INT33BE" HID, so on Intel IPU6 Surface devices that enumerate it as "OVTI5693" (e.g. Microsoft Surface Pro 9) the bridge never wires up the sensor and the front camera is unusable. Add an "OVTI5693" entry. The link frequency (419200000) matches the existing INT33BE entry, as it is the same sensor. Tested on Surface Pro 9 (IPU6). Link: https://github.com/linux-surface/linux-surface/pull/2171 Signed-off-by: Fernando Rimoli Reviewed-by: Daniel Scally Tested-by: D. Manresa # Surface Pro 7+, IPU6 TGL 8086:= 9a19, INT33BE; 4-7 backported to a 6.19 linux-surface tree --- drivers/media/pci/intel/ipu-bridge.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel= /ipu-bridge.c index 1bb3a3e98..131c70844 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -95,6 +95,8 @@ static const struct ipu_sensor_config ipu_supported_senso= rs[] =3D { IPU_SENSOR_CONFIG("OVTI2680", 1, 331200000), /* Omnivision OV5675 */ IPU_SENSOR_CONFIG("OVTI5675", 1, 450000000), + /* Omnivision OV5693 */ + IPU_SENSOR_CONFIG("OVTI5693", 1, 419200000), /* Omnivision OV8856 */ IPU_SENSOR_CONFIG("OVTI8856", 3, 180000000, 360000000, 720000000), /* Sony IMX471 */ --=20 2.43.0 From nobody Sat Sep 26 10:02:09 2026 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B4614A0F1E for ; Wed, 2 Sep 2026 14:23:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788359036; cv=none; b=Nun+YDB1I47QnE4jr5vkEWVF7EUaOiP4MiY3T3lE6D0ejw/Bttw0qtRdnwvPGBPyI1D3eieLTYdTyXvwhdNYe1Kc/72G2Zh4S49Sr5S7f03b3WZceq6UvGqEtBdTjAIm3+hdhAbWYjp2WVwmYo9UrIZX8Y+Gmjysd+sf8aMH+rs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788359036; c=relaxed/simple; bh=eLcLdB61xgQPGp9TGH/pxR0qtBZ/5ekjEqwjdW1d3UU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=I+76pt7JwVDWmhzhv4h+NH38ENmQUM2l5Nw46OFKrC5WSibJxBUNL/QRfEMqhxNvR/1AvpzeIeh80EtIXGTMRmSsTIIbyiesHN8+wNrLLwhpeEJSbKHXTNsNryrUEoD5cU2UueMjM/VUzV9M4IaA40RdPxKugmmBCaiut8cXDiI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FC7rUtWe; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FC7rUtWe" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4980fe6b3beso17954915e9.0 for ; Wed, 02 Sep 2026 07:23:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788359033; x=1788963833; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=5YoW1Jzw+xb5Cvou5QkbkZo1EXSEsUxy2Wyof2lysEI=; b=FC7rUtWeocOH0+p6IP5JWUcQx6SEIuTbOJP3QMwEJooMIo5LWixMg625cjeNqfcic4 KQFV49YTZSojD0EMjHVBxTLcjkpK7ma5HmXMBk2aAtc6U7uGDPHIvSnUCLvEs2fLU2iS 7XobeHjuHEf4Pc+pD5nqQGWJzz5QyXwVK8PWzCXipSNQwozOLYd0wOiEZt/kqwTKjTn6 NgpyzV9QlEsGoeHlReSzN2pYhMY2lp+xr66amynNdDGSd+FrMxhVzjlUuOKZmzzwCh4d kUxBnWIubU4UjTMV2lSTDthnp9hDBRVlbKHSVx4SVvZfgW8kMCO3YxMR3oFC6u70sCf9 GBeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788359033; x=1788963833; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=5YoW1Jzw+xb5Cvou5QkbkZo1EXSEsUxy2Wyof2lysEI=; b=F/+ZnDAG9jQc0UwJGQC2umWZA4JVx41CCyczBktHz4E7wbh5Y4bEzW/KM1zpS+xu7G VquyMLf+6izLZ4hyRvt38tGaOTh0lTHDMhM28xtjOWBbbbRvGrFJyL3HhxTjuWZXGuug RLHZb4ZHFlcXYoYf+Kf7TBxBBRpDIcJH0AkTzhZE21egCgawMRlH4CT+VmWARLGju5NG H9om3fD+Z5QHucPGPUn/gDuQ0ZU1qdVs9sgblqltLYCsaZr08+UHn7ZgL+o1i9sxTMbl eAd9hUhCjR75RvW4FWCUQcXZhqE1q7I7vR3PznSsGsOx+NBTjft4NrcdxRQU7RQJIOq3 pbqw== X-Forwarded-Encrypted: i=1; AHgh+RpodNlqyDYqq/GxciRawmU92s5lXnTYsPwG5sDhwxFYw6VwOpUlyNxdkD5JaNK7/W4LcT1raanjDLXPh3Q=@vger.kernel.org X-Gm-Message-State: AFuF++kaMoRHWNdUkMjWIdhIv5MquKkEK+lm1exTIgqgJxA61jYJmX1/ D9h47rIkbXLyhUV5cjv74zJmjATR0csLMNHcCfblDuTBkmXrtXvw6rIW X-Gm-Gg: AR+sD128Qjx+2O/Ax3Yf4v3U4YcjpXog2tyxd8k5HlvdD4LDViA3ag1oQRzdFtXqPpm 1Yz13Uqp0iAU3lBaqEeJaE5GmCC4feNZmZTVUVe6oq5z60DQakVXcHgvbA+AIkodMLZKbU9E4OL NZhiHPNexQEa+o65lCZ278HCHVYe1kD1kjh/OzL2OufmHFIQFI2ZWhR8AmB+g3C013wxJgtcI9D U86++odWGtrqHD+TW1jMeExhyz9mCrYDcuisxvBNkFgGg3mRwtbtwPWOFquz2uVOC9z11eraNq1 4ESsOqk9JRiDAoxY4H+sQBkJgjfEZQyRT5lASoW3jY0tfllYNcIGhjBr5t/l38FwGLPzQxtPvDQ A/KecfUd5I4kKHHN/6oNzXORwlz8826TuSVwNfWzgelymVomj1ljsPrxP0MpQ0DQNuvpB3YmVuH EJ5mJzmqy2tW3wMXeiJ/ASXvYZuEB572J3sKBrqLm87eGGL1j58ooxP8nIS837ID8b+lo97DZB7 prWW2s8cSePipTsRibYiAO1gmEPfvfmJOKyQqwZbExX/PwVgWjJwOwIUwo= X-Received: by 2002:a05:600c:a10a:b0:49c:eded:44e with SMTP id 5b1f17b1804b1-49ceded0475mr11064115e9.7.1788359033274; Wed, 02 Sep 2026 07:23:53 -0700 (PDT) Received: from raviolimobile.tail5f26fd.ts.net (mob-83-225-30-215.net.vodafone.it. [83.225.30.215]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49ce5927b68sm58999265e9.1.2026.09.02.07.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 07:23:52 -0700 (PDT) From: Fernando Rimoli To: linux-media@vger.kernel.org Cc: sakari.ailus@linux.intel.com, dan.scally@ideasonboard.com, linux-kernel@vger.kernel.org, Fernando Rimoli , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Tommaso Merciai , devicetree@vger.kernel.org Subject: [PATCH v5 3/7] dt-bindings: media: ov5693: Add clock-noncontinuous Date: Wed, 2 Sep 2026 16:23:17 +0200 Message-ID: <20260902142322.73523-4-fernandorimoli11@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260902142322.73523-1-fernandorimoli11@gmail.com> References: <20260831181858.325109-1-fernandorimoli11@gmail.com> <20260902142322.73523-1-fernandorimoli11@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The sensor can gate its MIPI clock lane while idle, which the CSI-2 receivers on some platforms require. Allow the endpoint property that asks for it, as ov5647 already does. Signed-off-by: Fernando Rimoli Acked-by: Conor Dooley Tested-by: D. Manresa # Surface Pro 7+, IPU6 TGL 8086:= 9a19, INT33BE; 4-7 backported to a 6.19 linux-surface tree --- Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml b= /Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml index 3368b3bd8..0d8ca0a51 100644 --- a/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml @@ -82,6 +82,8 @@ properties: unevaluatedProperties: false =20 properties: + clock-noncontinuous: true + link-frequencies: true =20 data-lanes: --=20 2.43.0 From nobody Sat Sep 26 10:02:09 2026 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59A2049B1F4 for ; Wed, 2 Sep 2026 14:24:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788359049; cv=none; b=iiXjcAmS6ELe1AwDKJ8ou/OxiwErHHGfiRybn6dqX9QkbRJwNljfuouSD2NI1TxFIqvzXKKgXpKBwW7jMFDxheuguHHCp3SwyXI98eq88ABN0fRaGhBX76GxkP/MtVLYnDkruR+KlRApTGuGrI85zvz2g82nbxXJlMXjB5rgXn4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788359049; c=relaxed/simple; bh=9jRqscV2vyiWLZHtQQYToWuhN2milvu8Wk+kEmi486I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=snoAU40ViCQVyssQNktSynVLTwkE2PIms6zb7FC7i8FzcqHKX5f11OLQ5yJcqokQswlmlG1ETerYR7v+kriwVoRgDdfIkTMTR4L4+kjS7k3gi49eu+PPbkuyn9163Q8j1S8p8rMzxEQIUQej7NTex6Uy1T3LPgxWWcFekDUXZLc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Lni6eBnf; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Lni6eBnf" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-49b8687630fso8813275e9.3 for ; Wed, 02 Sep 2026 07:24:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788359045; x=1788963845; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=YZlYUa5vZ3YMWYevs3vCXgZ9Ntr1YXdsetznlF67liY=; b=Lni6eBnfjFt94GjymdnjUCTmBhSAxnxj++MyJIWl6SU8HDHkTNFm35vXDPef7yUO+x RfpEUf6bshR0Lj4n4Os6O7OoE266c6W2AtXpditgtAJhMcX2O0r8Ghk1yElRCJrHuR/v H7oOQLDXMhmzubr06GO4CTwQSeGWU0a7gpOXLxxygLebz4TAEAhoPZ41El89IlUBqhWs 96csFPVbAsrfl4ZrB1ZEE0qLzdf5iGSa+P8NGfuiT5FTqZU7UPKaQstE/YGGk7lVT+mz rUtA1sidt5XzgcQjBE7lv4mnC4GYT9MYr235ZjhDm6tKxj9j70Uarw1PbZ5sgWzSy7pN rx2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788359045; x=1788963845; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=YZlYUa5vZ3YMWYevs3vCXgZ9Ntr1YXdsetznlF67liY=; b=Sig6x+Iff/JW0qalTYPPo466prw5Y9WbER2L9Pxyxn7WZC3DG/s2vllWRKdr4rjdQg BfRGgbve2ZESvlexuLX9o7S7KpAl61PdZQxCGAqm75ob66iz8hLfyVjHw1fQ0FZfTS8T sXZyJsPvKHb1b+t3a6fr6cclWdTSCbdkpJ6qEzYZ99hpLUWc/XYJ1/CKhuxMJOKiQ1Jq HYBFtE71YFWbgRfTXQamvPJgHx3w1ccfJQV/Z2R5885Mq2ixcbXSZny7UuB9iuiXWq5D 2FpHp8qn1Oy+z2Eiu1/57oXaCw3tsgxBHjeUn9SmsrESTpJK7W1UynI2kXPsYQ+P16Oh RNQA== X-Forwarded-Encrypted: i=1; AHgh+RrU5dysISsZfxv0UepmT9omwrzLnJslP4jV7ajHQJNcrsbrfft61wv48seRKnKtw1GabIQ6V16YswQAIoY=@vger.kernel.org X-Gm-Message-State: AFuF++kJ8rJJ9VyyfuT7NCrOWOK9kIVEjLw547B3umnzcsQAiI77+s/D LpwYR4lbaOX00VA/sDSKyzbkNRNIqI3qseG20mqpTe2vQi6WDp6fo+Gc X-Gm-Gg: AR+sD12VaruSpmIees/UR9/maEo8EJPvizQgAWU2IVkbVbUXYpIhY7g3qvGxbhc3I7j lV251IVVjczOYIUQ8EjZaM2A71YzMNTdw1kACvHHQgHinvmONEU+nEwl/62RVICuWOK1r+1p4gx 4axI7Sf/2QALzv65BDpoC9618rlzbIUn9SHSGBPQETkP+Toj9y9Q9pLjjG0URDCW6UMiMhT0F9m oSBxYc+nibUcYkMIVyIrTlj0MQR2aCWncu6Pt0refVJOQVV3sm98qVHCjJwSLpzZr3mPbVBRKb/ mfxv+tY5WA1hDQkYz4icbrpnApl3oTjDGg0U+gQBIOEVAtJw7lVVs6hyHSAYAwtvhhJ74Fb8n4Z TzliXUrCyS8jDusGswpGcJv+6XvJhJi5BRtiexe7KnD/xingNSkbu58+uyWsgQ6HSJNpp23T5t8 +5iGWofBfksSOutZiiHLVxKoDvx3HCwCIeFKKdWGfthhSaAYCdT3Q95OTkOt2XPPyeD7v6bx/cE 364Ti+v7ZIfuQqhOXu+uS1bcqc+KaN9fGii5HT9KI6XaupvkyTrKtyRH5k= X-Received: by 2002:a05:600c:1d89:b0:49c:ed8f:d094 with SMTP id 5b1f17b1804b1-49ced8fd250mr33251625e9.10.1788359039726; Wed, 02 Sep 2026 07:23:59 -0700 (PDT) Received: from raviolimobile.tail5f26fd.ts.net (mob-83-225-30-215.net.vodafone.it. [83.225.30.215]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49ce5927b68sm58999265e9.1.2026.09.02.07.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 07:23:55 -0700 (PDT) From: Fernando Rimoli To: linux-media@vger.kernel.org Cc: sakari.ailus@linux.intel.com, dan.scally@ideasonboard.com, linux-kernel@vger.kernel.org, Fernando Rimoli , Arsalan Naeem , Jakob Berg Jespersen , Fil Dunsky , Lucas Lis , Kengo Oki , Mauro Carvalho Chehab Subject: [PATCH v5 4/7] media: i2c: ov5693: Gate the MIPI clock lane for non-continuous clock Date: Wed, 2 Sep 2026 16:23:18 +0200 Message-ID: <20260902142322.73523-5-fernandorimoli11@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260902142322.73523-1-fernandorimoli11@gmail.com> References: <20260831181858.325109-1-fernandorimoli11@gmail.com> <20260902142322.73523-1-fernandorimoli11@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The ov5693 never programs MIPI_CTRL00 (0x4800), leaving it at its 0x00 power-on default, which lets the MIPI clock run freely. The IPU3 CSI-2 receiver tolerates this, but the IPU6 receiver (e.g. on Microsoft Surface Pro 7+, Pro 8, Pro 9 and Surface Go 4) fails to lock onto the link, so the sensor streams but capture times out with "stream stop time out". On most affected machines no frames arrive at all; on some the failure is intermittent. Gate the clock lane while idle at stream on when the endpoint requests a non-continuous clock. Only the gate bit is touched, so platforms that do not request it are unaffected. No counterpart is needed at stream off, as the link is down by then and the register returns to its default when the sensor is powered off. The property is supplied by the ipu-bridge in a subsequent patch. Link: https://github.com/linux-surface/linux-surface/pull/2171 Co-developed-by: Arsalan Naeem Signed-off-by: Arsalan Naeem Signed-off-by: Fernando Rimoli Tested-by: Jakob Berg Jespersen # Surface Pro 7+, IPU6 Tiger = Lake Tested-by: Fil Dunsky # Surface Pro 8, IPU6 Tiger= Lake (8086:9a19) Tested-by: Lucas Lis # Surface Pro 7+, IPU6 Tiger = Lake (0x9a19) Tested-by: Kengo Oki # Surface Go 4, IPU6 Al= der Lake-N 8086:462e Tested-by: D. Manresa # Surface Pro 7+, IPU6 TGL 8086:= 9a19, INT33BE; 4-7 backported to a 6.19 linux-surface tree Tested-by: Fil Dunsky # Surface Pro 8, IPU6=20 --- drivers/media/i2c/ov5693.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index 02236f3db..cedc6ea03 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -35,6 +35,11 @@ #define OV5693_STOP_STREAMING 0x00 #define OV5693_SW_RESET 0x01 =20 +/* MIPI transmitter control */ +#define OV5693_MIPI_CTRL00_REG CCI_REG8(0x4800) +/* Gate the clock lane when there is no packet to transmit */ +#define OV5693_MIPI_CTRL00_CLOCK_LANE_GATE BIT(5) + #define OV5693_REG_CHIP_ID CCI_REG16(0x300a) /* Yes, this is right. The datasheet for the OV5693 gives its ID as 0x5690= */ #define OV5693_CHIP_ID 0x5690 @@ -144,6 +149,9 @@ struct ov5693_device { struct regulator_bulk_data supplies[OV5693_NUM_SUPPLIES]; struct clk *xvclk; =20 + /* Gate the MIPI clock lane when idle (CSI-2 non-continuous clock) */ + bool clock_ncont; + struct ov5693_mode { struct v4l2_rect crop; struct v4l2_mbus_framefmt format; @@ -611,6 +619,19 @@ static int ov5693_enable_streaming(struct ov5693_devic= e *ov5693, bool enable) { int ret =3D 0; =20 + /* + * Gate the MIPI clock lane while idle if the CSI-2 link is configured + * for a non-continuous clock. Only that bit is touched, and only in + * that case, so the register keeps whatever the platform left in it + * and the clock stays free-running as before everywhere else. It + * needs no counterpart at stream off: the link is down by then, and + * the register returns to its default when the sensor is powered off. + */ + if (enable && ov5693->clock_ncont) + cci_update_bits(ov5693->regmap, OV5693_MIPI_CTRL00_REG, + OV5693_MIPI_CTRL00_CLOCK_LANE_GATE, + OV5693_MIPI_CTRL00_CLOCK_LANE_GATE, &ret); + cci_write(ov5693->regmap, OV5693_SW_STREAM_REG, enable ? OV5693_START_STREAMING : OV5693_STOP_STREAMING, &ret); @@ -1259,6 +1280,9 @@ static int ov5693_check_hwcfg(struct ov5693_device *o= v5693) goto out_free_bus_cfg; } =20 + ov5693->clock_ncont =3D bus_cfg.bus.mipi_csi2.flags & + V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK; + out_free_bus_cfg: v4l2_fwnode_endpoint_free(&bus_cfg); =20 --=20 2.43.0 From nobody Sat Sep 26 10:02:09 2026 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D59AF485CDD for ; Wed, 2 Sep 2026 14:24:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788359047; cv=none; b=tHo8nMU48TgtFrvUvj2rXgPGiPE40L7DMDMyRq34pdVkhghnyQdX+uFf0G+4AtHim7ay+jVQ1mOB6U2uQz9WccyYFcsrh1mFkA594EdHYgpFNcmpOQnvvlHwzOC/9bL7pwEHRTEGzJ2n0hk37zCrFdjmu+L//0Ew06tB8It5HJA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788359047; c=relaxed/simple; bh=dn5lfqglA93Cf4DCouOkQx4zA8810nNbg54kpC3NCv4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nY0KuWir/QbkHS+Q1rq/r2/7CU4cHKsqtMC1pjeiYehg5emRkKZWcW35eJMzuOw0ZeEZ4VgF/7kphH3HrzEtnbJ3+BllBkUu5+/sYw0xi38sYRWNiglm32mD6MbkcYw3yN0hsurz4JdzyNAkUZyYFMWoaTmfhpF+PH590gudmqo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ljT5ewZv; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ljT5ewZv" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4954a9e8490so13920665e9.1 for ; Wed, 02 Sep 2026 07:24:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788359044; x=1788963844; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=nw0rLiQuiue9t66DwgUiBZvqp9/daLkRFkCzFJ0WIrM=; b=ljT5ewZvUuDWIOMeIIVre3afgQ1rVhR5YL3fqa16FjHo/pVzApQwZrZveHnHgkF1i3 GlwWb9KimhGRyvk3bqxADfvO3Otx/sBrxzeZwFgixoGRBRF2aZ4a2/q1Uge5GDV02q6W CQ95Ls8BCG2YfxaXKJ2UDZRSfeR+c4b0Zyf7HK2kHEBXM7eKaQtiQkB4AxOwJxoG8I3V NHMLRQCN92H31QB+eV5ob8HuYhiFOTFva8kZLohJ4jDUrIqXJDgjbzcTDkoTc5hDrGWQ Acj6L5qlqKNbi2rljfW+fNCIMq7HTFxepq//IL0v4fX2MLxzKme/Z5UccBL7pMI2Z7T/ OQ0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788359044; x=1788963844; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=nw0rLiQuiue9t66DwgUiBZvqp9/daLkRFkCzFJ0WIrM=; b=rau/LvneLhAvDf/BgOzu2HK4wV91TLRocTGWSoXQ+MMlda8+cHnjItD3LfPixf1j01 JHbANTSgQGuCW4hEYzHu8tITPpXVSWHrnPjP72VsbnJ0fLKn6EjS0uG/c6m76wH1I0Hr bBIjsvQfWRTl+FB+tsBiaeII4oPXGTsIFKwZXbFDE4LWsvng7Nh9bM1dQWPGwzhM1HFp xCH40myotZzgGudXN92x5BDPNgwxDAPvASyCmmfEzwS/ByMUvehjLXyAK2a4t2vUjsDC aYFZmiikNpoR/W0GD/eJRlTN9GMpWnuXu60M0w4SU+iduuQhvQusZj7yDCmhmy/vDckO Iurw== X-Forwarded-Encrypted: i=1; AHgh+RoyuT19BrYOp2gpdtd87TY9m9bq24YpayLXNCuGJz9TDJz3FrQp3Q2F2VMjMtd9sGvHAGNC4xOooLCQK18=@vger.kernel.org X-Gm-Message-State: AFuF++njr9jwsxkWrbrznktc3cFrGSgr+y31YQ+XDQRUxps9AYacMkWR LlXpPlh50cDCfos5KbJOIuBtQCMrmpJ4E/5bSMljJ+dbiFPoaZAe+2i1 X-Gm-Gg: AR+sD100V6/NnV/+I0NoZYP79JWxDLC7r21ecVtXL1xAuTtewGwTPWRWQseOakxB5fA vdoTh8U7QWk6hvNlaQj09qSl3j45yHggy7RFv9gfCf+h5AtBaAOuzRzAbgilQ5rX2PHaX4yBdgV AbDViEwI8Co+2ohCniEKmJrgFquBpEFH8Tiy0LPpoZxbY/WXOAxCM17RPapFKcyn+TOy4SdWKX7 BKiQcKeG1p2bnFxzpRu6U+nB6Fc9RnKhLXFmfWQ4NmfXtPwFYh60xpJnPLJLnMyf0EIDnNjGvm/ 3X17jp0YnNUo7WL/yMD1qkm8e5i8Z5NGUmhD3qm+YIs1x8HpCEOTIeJDVmy40T75FSmLDi5QiTv XTA6RJ0Ml+NRAWM7zA0A7JJ4nMKWYIks8XrUPWvPM2+dhFN0sE8b+jr7U+bJkW1Djy0KObfFe5h sjBHDC6UXgFF+9sYYghk8QJ2CAztQB1DPdYKd8Qadd+ijYGTeXFjmRW567uRC2Wycejrl5/HVds MAdTFqOYSapDwL8y3B9Oz5UbhvMQgUUBEuhiEAseZXHDC0ZzlYqjW4cpgQ= X-Received: by 2002:a05:600c:3485:b0:49b:4eb6:6ffd with SMTP id 5b1f17b1804b1-49ce7c26ecfmr39084775e9.5.1788359043774; Wed, 02 Sep 2026 07:24:03 -0700 (PDT) Received: from raviolimobile.tail5f26fd.ts.net (mob-83-225-30-215.net.vodafone.it. [83.225.30.215]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49ce5927b68sm58999265e9.1.2026.09.02.07.24.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 07:24:03 -0700 (PDT) From: Fernando Rimoli To: linux-media@vger.kernel.org Cc: sakari.ailus@linux.intel.com, dan.scally@ideasonboard.com, linux-kernel@vger.kernel.org, Fernando Rimoli , Jakob Berg Jespersen , Fil Dunsky , Lucas Lis , Kengo Oki , Mauro Carvalho Chehab Subject: [PATCH v5 5/7] media: ipu-bridge: Assign endpoint property indices dynamically Date: Wed, 2 Sep 2026 16:23:19 +0200 Message-ID: <20260902142322.73523-6-fernandorimoli11@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260902142322.73523-1-fernandorimoli11@gmail.com> References: <20260831181858.325109-1-fernandorimoli11@gmail.com> <20260902142322.73523-1-fernandorimoli11@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Index the ep_properties array dynamically instead of plain numerical values as is done in mipi-disco-img.c. Signed-off-by: Fernando Rimoli Tested-by: Jakob Berg Jespersen # Surface Pro 7+, IPU6 Tiger = Lake Tested-by: Fil Dunsky # Surface Pro 8, IPU6 Tiger= Lake (8086:9a19) Tested-by: Lucas Lis # Surface Pro 7+, IPU6 Tiger = Lake (0x9a19) Tested-by: Kengo Oki # Surface Go 4, IPU6 Al= der Lake-N 8086:462e Tested-by: D. Manresa # Surface Pro 7+, IPU6 TGL 8086:= 9a19, INT33BE; 4-7 backported to a 6.19 linux-surface tree --- drivers/media/pci/intel/ipu-bridge.c | 27 ++++++++++++++------------- include/media/ipu-bridge.h | 19 ++++++++++++++++++- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel= /ipu-bridge.c index 131c70844..eb7d1611b 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -451,6 +451,7 @@ static void ipu_bridge_create_fwnode_properties( { struct ipu_property_names *names =3D &sensor->prop_names; struct software_node *nodes =3D sensor->swnodes; + unsigned int i =3D 0; =20 sensor->prop_names =3D prop_names; =20 @@ -508,21 +509,21 @@ static void ipu_bridge_create_fwnode_properties( PROPERTY_ENTRY_REF_ARRAY("lens-focus", sensor->vcm_ref); } =20 - sensor->ep_properties[0] =3D PROPERTY_ENTRY_U32( - sensor->prop_names.bus_type, - V4L2_FWNODE_BUS_TYPE_CSI2_DPHY); - sensor->ep_properties[1] =3D PROPERTY_ENTRY_U32_ARRAY_LEN( - sensor->prop_names.data_lanes, - bridge->data_lanes, sensor->lanes); - sensor->ep_properties[2] =3D PROPERTY_ENTRY_REF_ARRAY( - sensor->prop_names.remote_endpoint, - sensor->local_ref); + sensor->ep_properties[IPU_BRIDGE_NEXT_PROPERTY(i, EP_BUS_TYPE)] =3D + PROPERTY_ENTRY_U32(names->bus_type, + V4L2_FWNODE_BUS_TYPE_CSI2_DPHY); + sensor->ep_properties[IPU_BRIDGE_NEXT_PROPERTY(i, EP_DATA_LANES)] =3D + PROPERTY_ENTRY_U32_ARRAY_LEN(names->data_lanes, + bridge->data_lanes, sensor->lanes); + sensor->ep_properties[IPU_BRIDGE_NEXT_PROPERTY(i, EP_REMOTE_EP)] =3D + PROPERTY_ENTRY_REF_ARRAY(names->remote_endpoint, + sensor->local_ref); =20 if (cfg->nr_link_freqs > 0) - sensor->ep_properties[3] =3D PROPERTY_ENTRY_U64_ARRAY_LEN( - sensor->prop_names.link_frequencies, - cfg->link_freqs, - cfg->nr_link_freqs); + sensor->ep_properties[IPU_BRIDGE_NEXT_PROPERTY(i, EP_LINK_FREQUENCIES)] = =3D + PROPERTY_ENTRY_U64_ARRAY_LEN(names->link_frequencies, + cfg->link_freqs, + cfg->nr_link_freqs); =20 sensor->ipu_properties[0] =3D PROPERTY_ENTRY_U32_ARRAY_LEN( sensor->prop_names.data_lanes, diff --git a/include/media/ipu-bridge.h b/include/media/ipu-bridge.h index 16fac7654..06701d151 100644 --- a/include/media/ipu-bridge.h +++ b/include/media/ipu-bridge.h @@ -64,6 +64,23 @@ enum ipu_sensor_swnodes { SWNODE_COUNT }; =20 +enum ipu_bridge_ep_props { + IPU_BRIDGE_EP_BUS_TYPE, + IPU_BRIDGE_EP_DATA_LANES, + IPU_BRIDGE_EP_REMOTE_EP, + IPU_BRIDGE_EP_LINK_FREQUENCIES, + IPU_BRIDGE_EP_NUM_OF, + IPU_BRIDGE_EP_NUM_ENTRIES +}; + +/* + * Get the index of the next property in a property array, with a given ma= ximum + * value. + */ +#define IPU_BRIDGE_NEXT_PROPERTY(index, max) \ + (WARN_ON((index) > IPU_BRIDGE_##max) ? \ + IPU_BRIDGE_##max : (index)++) + /* Data representation as it is in ACPI SSDB buffer */ struct ipu_sensor_ssdb { u8 version; @@ -141,7 +158,7 @@ struct ipu_sensor { const char *vcm_type; =20 struct ipu_property_names prop_names; - struct property_entry ep_properties[5]; + struct property_entry ep_properties[IPU_BRIDGE_EP_NUM_ENTRIES]; struct property_entry dev_properties[5]; struct property_entry ipu_properties[3]; struct property_entry ivsc_properties[1]; --=20 2.43.0 From nobody Sat Sep 26 10:02:09 2026 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABB9249C4CD for ; Wed, 2 Sep 2026 14:24:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788359052; cv=none; b=h/z+rb9ssOeU5Y/Y6bbjl+CrY4r/cU6KFxBZ+u6CQQGluWcw120pokEQztFjVBBi/TLI8GqVp6s+XyzC4+nEt5x1etPeO/rOo3SIiPJUjmBP7l9+p1j75ymS1dorcF7Ki8eBoV4tKqFjLV7UI4cCl56vLXHA3oeqrRA77a8WFFw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788359052; c=relaxed/simple; bh=oBxlFptKem+KpXxrIbNTiYDFtt+gGdaL+7vQwWccpoA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GVaYY0TQPojc8MrMM62ZQAr4m2D9dqx7gBOtGtLxW704HcaBgkEq5xEq7tZDX4K8fIFDJDdd13hkeYJb6rNvnVvVCGn3Ums04VyejhZ08YyBJO/Omvp77Zt1rvQhKVqrrrononCwtowK3k7V6y9dDHemdZRQDL3m0PM1Ich0Elg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=icgBMhe5; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="icgBMhe5" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-49b965570d7so9147015e9.0 for ; Wed, 02 Sep 2026 07:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788359049; x=1788963849; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=4B/kcq/oQaNYThkEivmQMh6hAFUzMhpSs6Yp0oogSCA=; b=icgBMhe5f9Pg8mES8sF0a8bGR6+iKeKe2RrlyVnog/B3XBKJ9yYGN0JoIZrf1Aegfi o0nNh/qDvSVFqxbw6mijaMPjnFKj3V4CEj+F8Sti854ZErMynPt4qnAi3foGn5LTdzSt HQLxP7RJ3be/4XfSVneaK2ASNeHLA4JXpVMyDqqovGglEWg1zlkHRn5AUpqQ++VXFHEr IVpfPof/x8HDbm55mvCyNayF2sj4qYDRIv1gi2iL15vRVxn0QuaAN41WKI1wHOR2nCmo sp2monm2m9rRipAr1OO3Rfqol84OWqoNRgMCDD3pN2ZJEwjub/nqiHxjlsXLJYEQ2krm 71bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788359049; x=1788963849; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=4B/kcq/oQaNYThkEivmQMh6hAFUzMhpSs6Yp0oogSCA=; b=R+0C3HTx9ESsooNw1iujSZO1j8G4pOHHcFbBuvmSxrz0BJXtYANW4B3NWcBqNp4gu9 DvThWYXCFWKT0WybEKplV2Pl/ZTNIGVJu2Bcw2v7RQBu6kL4wjSwDW7nLQ8RpzshJeor exneO3j4Ld6+a+/X4xU8RqWpXS2Is19N/u1pNfTr6e/CHFSCEYdBDgJ7XFo9mnAr4MVO JqXe9zqWU0Ombv73HcX4yN/gUSj4x+JbbY/EYF25ZHtK08CptfAwyn/I+RxDEdiOoZuj 0gUb4ho9DWx+OTYAis+hK1AWNXQ6EdTOS8nlaonUS1Hg0W1h+j+R79flEN/isZi+f/+L G8+Q== X-Forwarded-Encrypted: i=1; AHgh+RqkN9LQoX7HcJA3t7+ptXgb6x4mH6+ypNLwBPQ9hNF8mmgN4LBfwXcRfmHxA1Xm5s3Lc5gNnKUT3msvnac=@vger.kernel.org X-Gm-Message-State: AFuF++nBHK8fQNP21Fe8JXY4ajwskFM5yiLkJKWvaJincLTtmL9C9f5c CCMZVg+Mf0WBjZxfKqRSA0QiuL1SPvJ2JfbD5IotFMZQymjJ2vquiDVAnfUhpQ== X-Gm-Gg: AR+sD11TCc3KA8ft8x4lm2/xGQc0Hjg7K6zlHeU0131nJo3jk3+NXxSZz3IyHx84woe sYhSIdJNhEf5HHSMQYyQaby6tk4BZ1X+Wzm2wdd4mFh5bKs3DgFrE0m1eWhHxDaesCDHokCMwlY WXVnou7SPfkwRiVGMfn1688fEgthcSCIVvsfjnqQg3WvCYJc5jMcryxt6PjWrCLYgddwKntQe9C VGDsw++t1F46PfqbrFvLqVVv7s+3PdBueEw3hBfm8pF2w9E/4GRMYBb5GzunYsWHeJXYjzgQXsN NhRq3SWDiDS4x4MEvW1Q6QQ/g7R49cR28jculuR6w11S/7zJQKc0CG2HHB2xLw/+1zsQY7VrLQR MyxxHdCti0jI6uGZox5XXltarzSclB/vutBt3sWwhA9RnGaINKj3kIPObuaaedL7Q9k4ayqGmLB I3HXsJGxXY6O0lZW8ep8/MkFflP88BrAZfefVxWWcL1qowH2YNJ+yUfzTugvpac7m3kvFvFPy2V ljgMEWjy3aEwSB2JwRnsTUqZF2iVCiBdKTCCQ3lryKvLd8AJ3FaaPaXAo4= X-Received: by 2002:a05:600c:3f06:b0:49c:ee1c:d582 with SMTP id 5b1f17b1804b1-49cee1cd69emr1761085e9.14.1788359047796; Wed, 02 Sep 2026 07:24:07 -0700 (PDT) Received: from raviolimobile.tail5f26fd.ts.net (mob-83-225-30-215.net.vodafone.it. [83.225.30.215]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49ce5927b68sm58999265e9.1.2026.09.02.07.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 07:24:07 -0700 (PDT) From: Fernando Rimoli To: linux-media@vger.kernel.org Cc: sakari.ailus@linux.intel.com, dan.scally@ideasonboard.com, linux-kernel@vger.kernel.org, Fernando Rimoli , Jakob Berg Jespersen , Fil Dunsky , Lucas Lis , Kengo Oki , Mauro Carvalho Chehab Subject: [PATCH v5 6/7] media: ipu-bridge: Match sensor configs per IPU and add config flags Date: Wed, 2 Sep 2026 16:23:20 +0200 Message-ID: <20260902142322.73523-7-fernandorimoli11@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260902142322.73523-1-fernandorimoli11@gmail.com> References: <20260831181858.325109-1-fernandorimoli11@gmail.com> <20260902142322.73523-1-fernandorimoli11@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Some sensors need different treatment depending on which IPU they are connected to, so the ACPI HID alone is not enough. Match on an optional list of IPU PCI product IDs. Entries for one HID must be adjacent, IPU-specific ones first, so the generic entry is skipped once a specific one has matched. Signed-off-by: Fernando Rimoli Tested-by: Jakob Berg Jespersen # Surface Pro 7+, IPU6 Tiger = Lake Tested-by: Fil Dunsky # Surface Pro 8, IPU6 Tiger= Lake (8086:9a19) Tested-by: Lucas Lis # Surface Pro 7+, IPU6 Tiger = Lake (0x9a19) Tested-by: Kengo Oki # Surface Go 4, IPU6 Al= der Lake-N 8086:462e Tested-by: D. Manresa # Surface Pro 7+, IPU6 TGL 8086:= 9a19, INT33BE; 4-7 backported to a 6.19 linux-surface tree --- drivers/media/pci/intel/ipu-bridge.c | 35 ++++++++++++++++++++++++++++ include/media/ipu-bridge.h | 26 +++++++++++++++++---- 2 files changed, 56 insertions(+), 5 deletions(-) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel= /ipu-bridge.c index eb7d1611b..5efdcb9c8 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -853,8 +854,28 @@ static int ipu_bridge_connect_sensor(const struct ipu_= sensor_config *cfg, return ret; } =20 +/* + * Whether a sensor config applies to the IPU this bridge sits on. A config + * listing PCI product IDs only applies to those IPUs. + */ +static bool ipu_bridge_config_matches(const struct ipu_sensor_config *cfg, + struct ipu_bridge *bridge) +{ + const u16 *id; + + if (!cfg->pci_ids) + return true; + + for (id =3D cfg->pci_ids; *id; id++) + if (*id =3D=3D bridge->pci_id) + return true; + + return false; +} + static int ipu_bridge_connect_sensors(struct ipu_bridge *bridge) { + const char *done_hid =3D NULL; unsigned int i; int ret; =20 @@ -862,9 +883,22 @@ static int ipu_bridge_connect_sensors(struct ipu_bridg= e *bridge) const struct ipu_sensor_config *cfg =3D &ipu_supported_sensors[i]; =20 + /* + * Entries for one HID are adjacent, IPU-specific ones first, + * so the generic entry is skipped once a specific one has + * matched and the sensor is not connected twice. + */ + if (done_hid && !strcmp(cfg->hid, done_hid)) + continue; + + if (!ipu_bridge_config_matches(cfg, bridge)) + continue; + ret =3D ipu_bridge_connect_sensor(cfg, bridge); if (ret) goto err_unregister_sensors; + + done_hid =3D cfg->hid; } =20 return 0; @@ -948,6 +982,7 @@ int ipu_bridge_init(struct device *dev, sizeof(bridge->ipu_node_name)); bridge->ipu_hid_node.name =3D bridge->ipu_node_name; bridge->dev =3D dev; + bridge->pci_id =3D dev_is_pci(dev) ? to_pci_dev(dev)->device : 0; bridge->parse_sensor_fwnode =3D parse_sensor_fwnode; =20 ret =3D software_node_register(&bridge->ipu_hid_node); diff --git a/include/media/ipu-bridge.h b/include/media/ipu-bridge.h index 06701d151..aca76ff71 100644 --- a/include/media/ipu-bridge.h +++ b/include/media/ipu-bridge.h @@ -17,13 +17,24 @@ #define IPU_SENSOR_ROTATION_NORMAL 0 #define IPU_SENSOR_ROTATION_INVERTED 1 =20 -#define IPU_SENSOR_CONFIG(_HID, _NR, ...) \ - (const struct ipu_sensor_config) { \ - .hid =3D _HID, \ - .nr_link_freqs =3D _NR, \ - .link_freqs =3D { __VA_ARGS__ } \ +/* + * Sensor config specific to one or more IPUs, identified by their PCI pro= duct + * IDs, with flags describing what the sensor needs there. Entries for one= HID + * must be adjacent in ipu_supported_sensors[], with the IPU-specific ones + * before the generic one. + */ +#define IPU_SENSOR_CONFIG_MATCH_FL(_HID, _IDS, _FLAGS, _NR, ...) \ + (const struct ipu_sensor_config) { \ + .hid =3D _HID, \ + .pci_ids =3D _IDS, \ + .flags =3D _FLAGS, \ + .nr_link_freqs =3D _NR, \ + .link_freqs =3D { __VA_ARGS__ } \ } =20 +#define IPU_SENSOR_CONFIG(_HID, _NR, ...) \ + IPU_SENSOR_CONFIG_MATCH_FL(_HID, NULL, 0, _NR, __VA_ARGS__) + #define NODE_SENSOR(_HID, _PROPS) \ (const struct software_node) { \ .name =3D _HID, \ @@ -132,6 +143,9 @@ struct ipu_node_names { =20 struct ipu_sensor_config { const char *hid; + /* Zero-terminated list of IPU PCI product IDs, NULL for any IPU */ + const u16 *pci_ids; + const u32 flags; const u8 nr_link_freqs; const u64 link_freqs[MAX_NUM_LINK_FREQS]; }; @@ -177,6 +191,8 @@ typedef int (*ipu_parse_sensor_fwnode_t)(struct acpi_de= vice *adev, =20 struct ipu_bridge { struct device *dev; + /* PCI product ID of the IPU, 0 if it is not a PCI device */ + u16 pci_id; ipu_parse_sensor_fwnode_t parse_sensor_fwnode; char ipu_node_name[ACPI_ID_LEN]; struct software_node ipu_hid_node; --=20 2.43.0 From nobody Sat Sep 26 10:02:09 2026 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 272084A3F36 for ; Wed, 2 Sep 2026 14:24:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788359053; cv=none; b=KzsFHZz4trm++JzLyr52Xmw6xit6KeloVS0w/7AU6C8WbH2plyJd77h+DG/8DCkDLuYv6GKDAmeqSv1DZewoimkOtDCeNNNdSgmAyybp78Oa8rjuajVqPperg6XFItaxYb7jeQ4NZMuvKwOVM1H5KU8NjO2ZDkRQZl/VbTlGlRI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788359053; c=relaxed/simple; bh=zceS+87Q6gIX2OHEqKQK4Cdwa03R6ggqgHdcs+6vNww=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nQQ7JpKvnjCgnZ7X7LaWgdsh/h6dMYcsi+8qpKAcepozbzbbLS8qxBBlOmqdL/TF7NNfgve42jmhlZPzHK3/8uzybaatyEsOws8TEjS0gcTUH2Lo11nzhiG+Wvjv0thcmiP/YDa1uRtpxf+q5nGtfopQugEguQiAMBc3TBEyVvY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NVsKdHZ2; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NVsKdHZ2" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-499b2981a7bso11211155e9.3 for ; Wed, 02 Sep 2026 07:24:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788359050; x=1788963850; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=1snfACWgTZWHSW/RwX1o1WpObZwblmrobdH5d1agE/I=; b=NVsKdHZ2RV1yfPXmniFrHwnrMPxz7JTytolmWt6a5xgi6Zs9aTyeYBGj+RJ/13rqVz G343ZuKc1a6lbipJshubVo2Rra3BHa9O2231CfKw70d0uMeNA29SjBneAoMj3y7wGyUG zkuCU3M8gPOdwVNHRqaS/UOHWuIoEy5FM4bGXrHZ3Ehu+zA2VhqvawxN8GUdhqoF59df TfVvzVrCI4h2bfmh/OQdF1qHb3PTBVJMcaBLQip4Z0o2f1oD+VqSzzJlChYF+KcuJHBC P0t6vUf4xaRYAu76/pUHvkv3071f0wSUP0gG/2s4BghJfJ1P/w/Zqt1V2bazEKvk0ssO TjRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788359050; x=1788963850; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=1snfACWgTZWHSW/RwX1o1WpObZwblmrobdH5d1agE/I=; b=S0sZY3PvjyMl+fDbonYkBuG+7b7tgfaSufe4kXEWW2kanJCpmfziCYT0Z8aIJSVRyt R0rMqcoWdn6WBisXVz+s3c3CyezAgHeoBxpAgS/fhnliUpAA0VfZimAIJ7XvfCO0NFq+ oMzKZKW1wcMSmGMkkQTM5+2Ou1Q2/aALCFNlfc3W+7vmzflLabBWRyGh9kFfQMt2BQxM 3ZiSU1k/VfGBfFrW4vXKPpsFpPAYR+F1k/hb4QlnmlyyHPvbg2iLk2RvB3O0AnFm9lI6 5ZEqpbXeRqKQmzbNGsyHcnmEBdnXeAo2zByn97h39oDJ0aqUHQW+cOEks+Tj2uG7UE1p 7lQg== X-Forwarded-Encrypted: i=1; AHgh+Rp+xhfBMzqi65d1EoIwImlzrE/pgjRCM3p3D7MKD/4QTDdBL3nl9DicI09Wa3iebzp0BSpnhYRs039+Joo=@vger.kernel.org X-Gm-Message-State: AFuF++mhd75R0dHHOyRvCLSxu0Z/jImdH+Bl+jBg70w0i9GwliPfphrL vc/4Hmdl8zWzi30a3no5w5J7ejACwwkylYhdRKWJ17jIWve1nIaNkwq7Rrv/EQ== X-Gm-Gg: AR+sD12KwSn9B8aCJflmcpTEz2P01Am9wPMKNlV2pzhrw/qNcyKL2ODK8S9/zJ8zUKH l9CW0rm2+QZyMwpvFWMLe3ZAzu7Rq7KjFAU7WapIoEbiDgRRh1sElzbni3Z+kDgp3TIz2gJgwrN uXjKF9SKHgZd0V3B28tDW7wDZ/jhxAGeAen2VVZ1P2Oi2xP74ffUyXTgl/n7qL72BvBFaYg3udj w6Nx38a/x7CcQfcX4idbOha7G2WETxVaNRSCppqshvjvL9pm/rXrpLlxt+HbjLWj4ZpODnlYE5Q 15PqdzT7lhfFDhWN68hyKOoRfYaNU1cg+GSAbQyOoBAeRhEW8T/EZS1iqF6mNc4mebIojqn7vSG f2GmYzpD4zsMFP46SwVoBPJsNPE6q67RDEtREU9S0VEpwJowXw5ke68wltV2TpaXDw0uxqrCYDA t9ujtVbni3o8wOdG9awhtN9HrU4T64tDGYjiyLucR4HLIidj4112sHG/lXwgB3VDDiR75HoNWJC mj0t03QAC8ihU8fDjo00V9YY/f8h3xVc5GoCIgK7BF+uMxstZaDuYy39z4= X-Received: by 2002:a05:600c:699b:b0:49b:9205:45b3 with SMTP id 5b1f17b1804b1-49ce584c6femr95435505e9.15.1788359050063; Wed, 02 Sep 2026 07:24:10 -0700 (PDT) Received: from raviolimobile.tail5f26fd.ts.net (mob-83-225-30-215.net.vodafone.it. [83.225.30.215]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49ce5927b68sm58999265e9.1.2026.09.02.07.24.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 07:24:09 -0700 (PDT) From: Fernando Rimoli To: linux-media@vger.kernel.org Cc: sakari.ailus@linux.intel.com, dan.scally@ideasonboard.com, linux-kernel@vger.kernel.org, Fernando Rimoli , Jakob Berg Jespersen , Fil Dunsky , Lucas Lis , Kengo Oki , Mauro Carvalho Chehab Subject: [PATCH v5 7/7] media: ipu-bridge: Request non-continuous clock for ov5693 on IPU6 Date: Wed, 2 Sep 2026 16:23:21 +0200 Message-ID: <20260902142322.73523-8-fernandorimoli11@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260902142322.73523-1-fernandorimoli11@gmail.com> References: <20260831181858.325109-1-fernandorimoli11@gmail.com> <20260902142322.73523-1-fernandorimoli11@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The ov5693 (INT33BE / OVTI5693) needs its MIPI clock lane gated while idle for the IPU6 CSI-2 receiver to lock onto the link, which the sensor driver does when the endpoint requests a non-continuous clock. The same sensor works with a free-running clock on the IPU3, so request it only for the IPU6 variants where it has been confirmed on hardware: Tiger Lake, Alder Lake-P and Alder Lake-N. Signed-off-by: Fernando Rimoli Tested-by: Jakob Berg Jespersen # Surface Pro 7+, IPU6 Tiger = Lake Tested-by: Fil Dunsky # Surface Pro 8, IPU6 Tiger= Lake (8086:9a19) Tested-by: Lucas Lis # Surface Pro 7+, IPU6 Tiger = Lake (0x9a19) Tested-by: Kengo Oki # Surface Go 4, IPU6 Al= der Lake-N 8086:462e Tested-by: D. Manresa # Surface Pro 7+, IPU6 TGL 8086:= 9a19, INT33BE; 4-7 backported to a 6.19 linux-surface tree --- drivers/media/pci/intel/ipu-bridge.c | 19 +++++++++++++++++++ include/media/ipu-bridge.h | 5 +++++ 2 files changed, 24 insertions(+) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel= /ipu-bridge.c index 5efdcb9c8..12f1cccd8 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -16,6 +16,7 @@ #include =20 #include +#include #include =20 #define ADEV_DEV(adev) ACPI_PTR(&((adev)->dev)) @@ -49,6 +50,14 @@ * * Please keep the list sorted by ACPI HID. */ +/* IPU6 variants whose CSI-2 receiver needs the ov5693 clock lane gated */ +static const u16 ipu6_ov5693_ncont_clk[] =3D { + PCI_DEVICE_ID_INTEL_IPU6, /* Tiger Lake */ + PCI_DEVICE_ID_INTEL_IPU6EP_ADLP, /* Alder Lake-P */ + PCI_DEVICE_ID_INTEL_IPU6EP_ADLN, /* Alder Lake-N */ + 0 +}; + static const struct ipu_sensor_config ipu_supported_sensors[] =3D { /* Himax HM1092 */ IPU_SENSOR_CONFIG("HIMX1092", 2, 180000000, 180480000), @@ -61,6 +70,9 @@ static const struct ipu_sensor_config ipu_supported_senso= rs[] =3D { /* GalaxyCore GC0310 */ IPU_SENSOR_CONFIG("INT0310", 1, 55692000), /* Omnivision OV5693 */ + IPU_SENSOR_CONFIG_MATCH_FL("INT33BE", ipu6_ov5693_ncont_clk, + IPU_BR_FL_CSI2_CLK_NONCONTINUOUS, + 1, 419200000), IPU_SENSOR_CONFIG("INT33BE", 1, 419200000), /* Onsemi MT9M114 */ IPU_SENSOR_CONFIG("INT33F0", 1, 384000000), @@ -97,6 +109,9 @@ static const struct ipu_sensor_config ipu_supported_sens= ors[] =3D { /* Omnivision OV5675 */ IPU_SENSOR_CONFIG("OVTI5675", 1, 450000000), /* Omnivision OV5693 */ + IPU_SENSOR_CONFIG_MATCH_FL("OVTI5693", ipu6_ov5693_ncont_clk, + IPU_BR_FL_CSI2_CLK_NONCONTINUOUS, + 1, 419200000), IPU_SENSOR_CONFIG("OVTI5693", 1, 419200000), /* Omnivision OV8856 */ IPU_SENSOR_CONFIG("OVTI8856", 3, 180000000, 360000000, 720000000), @@ -526,6 +541,10 @@ static void ipu_bridge_create_fwnode_properties( cfg->link_freqs, cfg->nr_link_freqs); =20 + if (cfg->flags & IPU_BR_FL_CSI2_CLK_NONCONTINUOUS) + sensor->ep_properties[IPU_BRIDGE_NEXT_PROPERTY(i, EP_CLOCK_NONCONTINUOUS= )] =3D + PROPERTY_ENTRY_BOOL("clock-noncontinuous"); + sensor->ipu_properties[0] =3D PROPERTY_ENTRY_U32_ARRAY_LEN( sensor->prop_names.data_lanes, bridge->data_lanes, sensor->lanes); diff --git a/include/media/ipu-bridge.h b/include/media/ipu-bridge.h index aca76ff71..eec8c4688 100644 --- a/include/media/ipu-bridge.h +++ b/include/media/ipu-bridge.h @@ -17,6 +17,10 @@ #define IPU_SENSOR_ROTATION_NORMAL 0 #define IPU_SENSOR_ROTATION_INVERTED 1 =20 +/* Flags for struct ipu_sensor_config */ +/* The sensor's CSI-2 transmitter needs a non-continuous clock */ +#define IPU_BR_FL_CSI2_CLK_NONCONTINUOUS BIT(0) + /* * Sensor config specific to one or more IPUs, identified by their PCI pro= duct * IDs, with flags describing what the sensor needs there. Entries for one= HID @@ -80,6 +84,7 @@ enum ipu_bridge_ep_props { IPU_BRIDGE_EP_DATA_LANES, IPU_BRIDGE_EP_REMOTE_EP, IPU_BRIDGE_EP_LINK_FREQUENCIES, + IPU_BRIDGE_EP_CLOCK_NONCONTINUOUS, IPU_BRIDGE_EP_NUM_OF, IPU_BRIDGE_EP_NUM_ENTRIES }; --=20 2.43.0