Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2018274lqa; Tue, 30 Apr 2024 06:21:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUauDTgxbfdn2lmR/NhuRDhT+CfjGv/KNE4FSsP/KjpNfLdET6K6wVwGx+GEOmv7rmVf/Z+9+IaTsqcbcZNBhtS3MtR/550xrUfrsHxtw== X-Google-Smtp-Source: AGHT+IGLNTJ37KHR6rZdjO7XiUljHpGTsATbuo8QntD76QidWsOC6BeE5Pq8eEVmZeKzQW/4fhy1 X-Received: by 2002:a05:6e02:1389:b0:36c:4c0e:6e96 with SMTP id d9-20020a056e02138900b0036c4c0e6e96mr8579332ilo.21.1714483297575; Tue, 30 Apr 2024 06:21:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714483297; cv=pass; d=google.com; s=arc-20160816; b=zyMYRkFE51lEZvFGfRTcXGU/vJOUCMTuUZoLN4CGWrA4EhRZQAmfKF5lEM5WFjMvna wr4okA/1xdAeks4MaM6NGqEeAOfg/EGxT7Arznj21hI8C3iG02trgrPCzC6PpBUAphH5 Jba0owpnk0CSfuophS35Hm4U3+3RuLyE/KQzba5FCDItxyZuep8PC9QXN3rVi6qWGLg8 YkfcBiBnSeOPXuj1W6ubbCvWJghqYzRxxVv51WXrB0Ra0v8mXgxQ1CVMLKNe1tjSIQPj M3UR6er1j8MnI/5ITp82irbavtG5JNea346Q9hY7lClP1A+hc8ll9uiHuFwNMeJxbETc uNww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=hBymcBJAWOTM8dbe3lA3XtFBIzk5jOeYV08OK2Y43w4=; fh=RuFaGV8MNU7EBTCW+thUKV+3otxe9qtmAbLEHIJsJ6I=; b=hFfW9O3R44qPmK2U1qzep8cTyGXmkqxsAS9YCtKgmqiere53LCnT8m5VDukMJ3l6g5 2TJrHTuC0CzqGt8Hxstm0olLZDNz38IkCCwZrX7eK+px7aYfXPUd7bMNIVz2SOI/h76j t3W3TUb5hh9UIr3ydE3wqDoFQIAP/3YyCmEoAVBOaX91Yg9IOGh9u4zBVju8TfmVFgMl F6rg9/6KdngaN98xKJxHhyk8jFdjDRanMerVEcjg7nrTPUwzPnS9dvTMR20QXDgT2zQl miaL+9+kgZfKiY8fJIAg3FWttS2OIhbSwkCg+iEp7QYMCJTTrVhTPz5s8qB15hD2pf2D CkOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=2FRRSI97; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-163987-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163987-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s26-20020a63215a000000b005dc1e39fbeasi21612294pgm.80.2024.04.30.06.21.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 06:21:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163987-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=2FRRSI97; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-163987-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163987-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 37EDB283B2F for ; Tue, 30 Apr 2024 13:21:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C0830172762; Tue, 30 Apr 2024 13:20:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="2FRRSI97" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 59732171E49; Tue, 30 Apr 2024 13:20:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714483234; cv=none; b=RZcxYVIgB9LBNVVp/pklICeYTUob943GBaq5marRora/JscYkteSZ5YANRxX8AgUKYllDf1VsveXUuBi8zw0SXyou+w1feTlwoh+CNHQQTi5FTvP1CNym99PhM9oHUExGuH2C9HlsfVAivBhHXCSkO9SU3q8rijNSw18IBKGUEE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714483234; c=relaxed/simple; bh=F7Xc0i5LqTLUVcR9pEW59UMkv6QivjdXaw/5qjYRNRc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uQ4s3el1nCDVj91LxWmmD9F0SjpiJcnCm/Ih0RrGL9nngXHnAFFkDBoJsATH071e/fKdln6Vo1aZUkIvDcL1F/NerVNd+vT/JWB29I2k5psbxWht51dzRLjITwAn2M1R5wGD0Xy1qNTCho7xFySm6S9AoJPsrFQtO2AqEc4bUQE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=2FRRSI97; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1714483231; bh=F7Xc0i5LqTLUVcR9pEW59UMkv6QivjdXaw/5qjYRNRc=; h=From:To:Cc:Subject:Date:From; b=2FRRSI97EyrjLf6V/HzElSGlP6DxmuRR3fimjBPDltPbzbX8opYM9qzG1IvHSf97I 6e1CkM3HS06J4ApHqhNLWBvmFVr8CIHGrYGKNnvR9WwmC48FzmrTGtYrMX/Xw6CEtX RrFi5ZB2+5LBLljd+KWX71ciC4LYHFm+eRFp8KJveHQ8pISGOjMDTWODCUXnPE0LwP 8Oj5NVFj1KKDOUeRIM5dn6LBLNNaUtRZl5JxfS3AhR4AxpnYoxkj0YqwhYrhWnsDSv JQ8Bgh+E/d6ArxPuVi20LO3H0cV4t0Z1nB3+ULeZlAi+g4UpWP6l6/pphVffx7B8RE UEpn2JcpmFQqA== Received: from apertis.home (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: jmassot) by madrid.collaboradmins.com (Postfix) with ESMTPSA id BC2F137813E3; Tue, 30 Apr 2024 13:20:30 +0000 (UTC) From: Julien Massot To: linux-media@vger.kernel.org, sakari.ailus@iki.fi Cc: devicetree@vger.kernel.org, kernel@collabora.com, linux-kernel@vger.kernel.org, mchehab@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, Julien Massot Subject: [PATCH v7 0/5] Add support for MAX96714/F and MAX96717/F GMSL2 ser/des Date: Tue, 30 Apr 2024 15:19:26 +0200 Message-ID: <20240430131931.166012-1-julien.massot@collabora.com> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Change since v6: - Remove mention of C-PHY for MAX96717, this serializer is D-PHY only - Remove bus-type requirement for MAX96717 - Minor changes requested by Sakari - Workaround a MAX96717 issue, which occurs when stopping the CSI source before stopping the MAX96717 CSI receiver. Power management is not included in this patchset. The GMSL link is not always resuming when the deserializer is suspended without suspending the serializer. Change since v5: - Reverse fallback logic: max9671{4,7} can fallback to max9671{4,7}F - use const instead of enum for max9671{4,7}f compatible as suggested Change since v4: - Add support for MAX96717 and MAX96714 and use them as a fallback for MAX96717F and MAX96714F respectively - The drivers are now compatible with MAX96717 and MAX96714 since no change in the logic is needed - Reference 'i2c-gate' instead of 'i2c-controller' in the bindings Change since v3: - bindings - Renamed bindings to drop the 'f' suffix - Add bus type to MAX96717 and remove from MAX9674 - Add lane-polarities to both bindings - drivers - Address changes requested by Sakari in v3 - use v4l2_subdev_s_stream_helper for MAX96714 - do not init regmap twice in the MAX96714 driver - Fix compilations on 32 bits platforms Change since v2: - Convert drivers to use CCI helpers - Use generic node name - Use 'powerdown' as gpio name instead of 'enable' - Add pattern generator support for MAX96714 These patches add support for Maxim MAX96714F deserializer and MAX96717F serializer. MAX96714F has one GMSL2 input port and one CSI2 4 lanes output port, MAX96717F has one CSI2 input port and one GMSL2 output port. The drivers support the tunnel mode where all the CSI2 traffic coming from an imager is replicated through the deserializer output port. Both MAX96714F and MAX96717F are limited to a 3Gbps forward link rate leaving a maximum of 2.6Gbps for the video payload. Julien Massot (9): dt-bindings: media: add Maxim MAX96717 GMSL2 Serializer dt-bindings: media: add Maxim MAX96714 GMSL2 Deserializer media: i2c: add MAX96717 driver media: i2c: add MAX96714 driver drivers: media: max96717: stop the csi receiver before the source .../bindings/media/i2c/maxim,max96714.yaml | 174 +++ .../bindings/media/i2c/maxim,max96717.yaml | 157 +++ MAINTAINERS | 14 + drivers/media/i2c/Kconfig | 34 + drivers/media/i2c/Makefile | 2 + drivers/media/i2c/max96714.c | 1024 +++++++++++++++++ drivers/media/i2c/max96717.c | 927 +++++++++++++++ 7 files changed, 2332 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml create mode 100644 Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml create mode 100644 drivers/media/i2c/max96714.c create mode 100644 drivers/media/i2c/max96717.c -- 2.44.0