Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1018586rdd; Wed, 10 Jan 2024 06:26:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3E9MY9f/iMYD/wZKyAK6Mtsqmnl2FIQYGF6B3SDXfKAAbQYfLnFv1XM5s3nj9s/pGP8U3 X-Received: by 2002:a05:6e02:1b08:b0:360:ba:603a with SMTP id i8-20020a056e021b0800b0036000ba603amr1326040ilv.48.1704896792622; Wed, 10 Jan 2024 06:26:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704896792; cv=none; d=google.com; s=arc-20160816; b=GQel8N4NFpvp8Aeu6XAA/HzRiOCMH2cAUJ3PeMnLG9NTYausLhNEOVTmcprsjgU6JK IfbitDVhSWJRG0Fm6ueEzY7dDA20J40Xc8bFl3QUtDxUM/Tefnk2QbwuZDeZEsWd3VVG eRDKuKjBCe3xmm3pwjYXbxUlmv60UHWGG8qnF+T99zYLJ102CJ9Ubek4Er/yeIoo0qzr rqFMI1h5ndhWIKtG/vl3MpTX9Nxj7d84fYyt3BcCD74tKY/xgsqAUBpLTyTmBS7DIPJv SeYVKdlJ6Chhs2q1uFMuxTxn1YcC1boxrusqNoeYUozn60IJYfsBBuw52KPYA6ws5mEh egPQ== ARC-Message-Signature: i=1; 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=J8jYdrd32qpj6UYwFmFTXCiQDt/VqLbFNDBtbxT7ng8=; fh=qwpAZCCXrPWodcfO6Mhr4MYuDQpPOk8blf0KSlqK5TI=; b=sA2iI0LA6BlepLAjbx7FHrnlYPjNHtlyjgoIfNwORXr7qUhsSBC+dIoVnNS/xxyFlq k7nW1GqXkda7KGgCB7nSqBi20G7+u/JqHfBkewIVVvFnPBG1zfGP15ny40AIODKyxPbi /LBAkwbyYwhPYX8tmhpc+d+d+xTZEwPlrtBwOxghpKM3wNr0bzuizmnVx/24ph51n/rO dLuTWXrq/M0st0mLwHocw+dOAm+J12WKnwQGTFhBxvSGA1ptAHi4OeLHxliUS6/uhK+A iXa3jJHwtMtPWbnn64Lf9RhXqvGy87QLqUKqrTc4UOQo0p5GWnn4mrXlEpuXKBHzQz5Q ojzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=uhq+nv9f; spf=pass (google.com: domain of linux-kernel+bounces-22334-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22334-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id h34-20020a63f922000000b005cdf86014e2si3638979pgi.674.2024.01.10.06.26.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 06:26:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22334-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=uhq+nv9f; spf=pass (google.com: domain of linux-kernel+bounces-22334-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22334-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8D326B28040 for ; Wed, 10 Jan 2024 14:16:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F71D4CB2F; Wed, 10 Jan 2024 14:14:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="uhq+nv9f" Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 E5AB94A98C for ; Wed, 10 Jan 2024 14:14:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-40d88fff7faso43147385e9.3 for ; Wed, 10 Jan 2024 06:14:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1704896090; x=1705500890; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=J8jYdrd32qpj6UYwFmFTXCiQDt/VqLbFNDBtbxT7ng8=; b=uhq+nv9fAQyMBYF8Pj/TA0VBkt660Ea0Zt8nyeJgpEsM67LHzswYeBs3rzY0xrkPJr EHkzHomTTlG6YDkAAt2SARrEcqAn85va/ckSiyqmqcoPuP5Yxg7I1hjmtzwCd7hAKZ6c dk2pxqlzAIm4Vdgpemhl0RZPq9LvwFRtULcAZTgRr88837vLFRr0+xrzWlq9C3vX0j2/ q88d4Vm4B3diJdYCAdstcDlGZtzG9z//kasqvA2On1hrkLPWyrfi4z0dnNVfnEuJySue zDZ3DMzT4HRotFkyf5shHrouk4A+nSTObML1+SHZKL8Jm6G34aiL1OQ/rHO7yM7GhsKf wc1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704896090; x=1705500890; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=J8jYdrd32qpj6UYwFmFTXCiQDt/VqLbFNDBtbxT7ng8=; b=bCIFKpMzkwQzo3NI4aG3vJxEL3mkV634YEHy/PtRgmtjVcnzpcS0LvZ2oZFQx1ePbW /Y/Zo/bH7HpW9G3oKVAIkvfgccY4zCqN2NVUjUuhNagBVkLbgCQXj/zhPXNA5Fn9lbYX 0V4Mqg5Akujvj04Ql7bfCXtjba2J5Zvnqj5jWxVPDjuxfSmUvtgMhjHvXdFgf00onGIk upt8bhWOyW1WU+UzST0PpAlUQkaGobtrHwDEu4+mtXnM+3UpzqRF4FY4cLsxVXu2G8Qt KnAu9UxkbheJkswoW38OazP0n4I+OjHMM83hQF7y81exYwQdHyv6AYrq+I1oAeL9Rs3U GxTQ== X-Gm-Message-State: AOJu0YxFpShb4kVI4zqaIa/u205x8j/sbAJKEUMifg8vkwvqfRJu1M3G uE4R3ItKabcmx6SO5qXYT2DOgNfTw3EJZSm1DmupIFVKU7yBcUCu X-Received: by 2002:a05:600c:c06:b0:40d:6f03:dd9a with SMTP id fm6-20020a05600c0c0600b0040d6f03dd9amr290341wmb.69.1704896090143; Wed, 10 Jan 2024 06:14:50 -0800 (PST) Received: from localhost.localdomain ([2a01:e0a:55f:21e0:9e19:4376:dea6:dbfa]) by smtp.gmail.com with ESMTPSA id j17-20020a05600c1c1100b0040c46719966sm2363890wms.25.2024.01.10.06.14.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 06:14:49 -0800 (PST) From: Julien Stephan To: Cc: Julien Stephan , Andy Hsieh , AngeloGioacchino Del Regno , Conor Dooley , devicetree@vger.kernel.org, Florian Sylvestre , Krzysztof Kozlowski , Laurent Pinchart , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-media@vger.kernel.org, Louis Kuo , Matthias Brugger , Mauro Carvalho Chehab , Paul Elder , Phi-bang Nguyen , Rob Herring Subject: [PATCH v4 0/5] Add Mediatek ISP3.0 Date: Wed, 10 Jan 2024 15:14:37 +0100 Message-ID: <20240110141443.364655-1-jstephan@baylibre.com> X-Mailer: git-send-email 2.43.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 This series adds the support of the Mediatek ISP3.0 found on some Mediatek SoCs such as the mt8365. The driver is divided into 2 parts: * SENINF: the sensor interface * CAMSV: this driver provides a path to bypass the SoC ISP so that image data coming from the SENINF can go directly into memory without any image processing. This allows the use of an external ISP or camera sensor directly. The SENINF driver is based on previous work done by Louis Kuo available as an RFC here: https://lore.kernel.org/all/20200708104023.3225-1-louis.kuo@mediatek.com/ This series depends on the following series for the phy [1] Changes in v4: - fix suspend/resume deadlock - fix various locking issues reported by Laurent Pinchart on v3 - run LOCKDEP - add missing include reported by kernel-test-robot for non mediatek arch and COMPILE_TEST=y - use atomic poll inside mtk_camsv30_setup - drop second lane support as it was not used - remove useless members in structs - fix media entity initialization - initialize correct pad for camsv video device - add isp support in mt8365.dtsi - rebase on 6.7 Changes in v3: - fix a lot of formatting issues/coding style issues found in camsv/seninf reported by Angelo on v2 - fix camsv/seninf binding file error reported by Rob Changes in v2: - renamed clock `cam_seninf` to `camsys` - renamed clock `top_mux_seninf` to `top_mux` - moved phy properties from port nodes to top level - remove patternProperties - specify power management dependency in the cover letter description to fix missing include in dt-binding example - change '$ref' properties on some endpoint nodes from '$ref: video-interfaces.yaml#' to '$ref: /schemas/graph.yaml#/$defs/endpoint-base' where applicable Best Julien Stephan [1] : https://lore.kernel.org/all/20230620121928.1231745-1-jstephan@baylibre.com/ Louis Kuo (2): dt-bindings: media: add mediatek ISP3.0 sensor interface media: platform: mediatek: isp_30: add mediatek ISP3.0 sensor interface Phi-bang Nguyen (2): dt-bindings: media: add mediatek ISP3.0 camsv media: platform: mediatek: isp_30: add mediatek ISP3.0 camsv .../bindings/media/mediatek,mt8365-camsv.yaml | 109 ++ .../media/mediatek,mt8365-seninf.yaml | 259 +++ MAINTAINERS | 10 + arch/arm64/boot/dts/mediatek/mt8365.dtsi | 128 ++ drivers/media/platform/mediatek/Kconfig | 1 + drivers/media/platform/mediatek/Makefile | 1 + drivers/media/platform/mediatek/isp/Kconfig | 2 + drivers/media/platform/mediatek/isp/Makefile | 3 + .../platform/mediatek/isp/isp_30/Kconfig | 35 + .../platform/mediatek/isp/isp_30/Makefile | 4 + .../mediatek/isp/isp_30/camsv/Makefile | 7 + .../mediatek/isp/isp_30/camsv/mtk_camsv.c | 328 ++++ .../mediatek/isp/isp_30/camsv/mtk_camsv.h | 199 +++ .../isp/isp_30/camsv/mtk_camsv30_hw.c | 427 +++++ .../isp/isp_30/camsv/mtk_camsv30_regs.h | 60 + .../isp/isp_30/camsv/mtk_camsv_video.c | 774 +++++++++ .../mediatek/isp/isp_30/seninf/Makefile | 5 + .../mediatek/isp/isp_30/seninf/mtk_seninf.c | 1488 +++++++++++++++++ .../isp/isp_30/seninf/mtk_seninf_reg.h | 112 ++ 19 files changed, 3952 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/mediatek,mt8365-camsv.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mt8365-seninf.yaml create mode 100644 drivers/media/platform/mediatek/isp/Kconfig create mode 100644 drivers/media/platform/mediatek/isp/Makefile create mode 100644 drivers/media/platform/mediatek/isp/isp_30/Kconfig create mode 100644 drivers/media/platform/mediatek/isp/isp_30/Makefile create mode 100644 drivers/media/platform/mediatek/isp/isp_30/camsv/Makefile create mode 100644 drivers/media/platform/mediatek/isp/isp_30/camsv/mtk_camsv.c create mode 100644 drivers/media/platform/mediatek/isp/isp_30/camsv/mtk_camsv.h create mode 100644 drivers/media/platform/mediatek/isp/isp_30/camsv/mtk_camsv30_hw.c create mode 100644 drivers/media/platform/mediatek/isp/isp_30/camsv/mtk_camsv30_regs.h create mode 100644 drivers/media/platform/mediatek/isp/isp_30/camsv/mtk_camsv_video.c create mode 100644 drivers/media/platform/mediatek/isp/isp_30/seninf/Makefile create mode 100644 drivers/media/platform/mediatek/isp/isp_30/seninf/mtk_seninf.c create mode 100644 drivers/media/platform/mediatek/isp/isp_30/seninf/mtk_seninf_reg.h -- 2.43.0