From patchwork Fri Jun 30 10:01:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 698250 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D32CEB64D7 for ; Fri, 30 Jun 2023 10:04:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232999AbjF3KE0 (ORCPT ); Fri, 30 Jun 2023 06:04:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232975AbjF3KEY (ORCPT ); Fri, 30 Jun 2023 06:04:24 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C10E1BE1 for ; Fri, 30 Jun 2023 03:04:23 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3fb4146e8fcso15129865e9.0 for ; Fri, 30 Jun 2023 03:04:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1688119461; x=1690711461; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jBKfzhFFhqAcTYJrg0Dr4h4x6W3U5a5giVvpMdKvQlM=; b=LlWsUWbq1Di/wC+f2am+zd1wq6JZQpYMso73TAuEWKuA17yojjbdgQsBSqTxxX4uNA s0Knm59Dk29M6lpoBzEij1CU/EFN/bFX/mF4CCgSzJy4DqtYPv/DsTHauOIMt8RRRy6a 6LcNT1Nquw1n1/ChM+TgnbZbonqWgZcZ98b37vEUadBMAM2UagS7S2/eWV3RaVK4D/I+ 5Ywwkb7W6zqcV+PsHXy2gBoPOwuCO6iF85XDTrwZpUf1zkEjY+5BHW1+Kx+Y2pv2L8Qp SQ+xLhV35juqFXGD/fs+KNuKz0stf7I527vM7mH6MXWk4QL6Ic3V+NLWLDlz8L/DHFJa ta/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688119461; x=1690711461; 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=jBKfzhFFhqAcTYJrg0Dr4h4x6W3U5a5giVvpMdKvQlM=; b=SsiUffRmRgYn66F4NRKsVzb0fE2HD4gOxcZqz0+1uvJBxZylAKOBxfi2SS/HiP09tC 4trdrNut6ZFGn7/AY32SzlAVQCb3wMggZwcK2kpKyl+AWWreCdj62LTDUnXLHeu27laL HMOgjcdMm5rlk6CoDg6ooDZ4JxptjaUgnitD4Uw1yeiVim4zp9RFvVaZYzVqO5V/deoC qT6wzIhjzaAqwmGPqr8jokCRYc8f/w48jN8n+G4YdR8yiiZxGo5TT4g7MXWaWZ8QyqNF yyv7bTq9g8ZB0vTYmaBH0rZZBuK+2sHx/6IB6b/YWvaTkr5sceoeVI73mrQv2zi+7+tp 4Q5w== X-Gm-Message-State: AC+VfDw0XnmLNgrS7fEp+xxwTHwS0TKF5oA7nhjpIaV//BNd/dl6g+AH qcdEjMcctFsHYghouvRxgW9WUg== X-Google-Smtp-Source: ACHHUZ4u46ovHqmM1pHPoNIUq+uSFsIrq0pSwJxOzyZztDHewsHVbkiEFAY3g8CAub6dkFiNq5KlKg== X-Received: by 2002:a05:600c:214d:b0:3f7:e660:cdc5 with SMTP id v13-20020a05600c214d00b003f7e660cdc5mr2329714wml.9.1688119461299; Fri, 30 Jun 2023 03:04:21 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:55f:21e0:9e19:4376:dea6:dbfa]) by smtp.gmail.com with ESMTPSA id x11-20020adff0cb000000b0031424f4ef1dsm743280wro.19.2023.06.30.03.04.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jun 2023 03:04:21 -0700 (PDT) From: Julien Stephan Cc: Julien Stephan , Andy Hsieh , AngeloGioacchino Del Regno , Conor Dooley , daoyuan huang , devicetree@vger.kernel.org, Florian Sylvestre , Hans Verkuil , 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 , Moudy Ho , Phi-bang Nguyen , Ping-Hsun Wu , Rob Herring , Sumanth Korikkar , Vasily Gorbik Subject: [PATCH v2 0/4] Add Mediatek ISP3.0 Date: Fri, 30 Jun 2023 12:01:49 +0200 Message-ID: <20230630100321.1951138-1-jstephan@baylibre.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This series add 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: [1] for the phy, [2] for power management support 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/ [2] : https://lore.kernel.org/lkml/20230627131040.3418538-1-msp@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 | 113 ++ .../media/mediatek,mt8365-seninf.yaml | 295 ++++ MAINTAINERS | 10 + 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 | 334 ++++ .../mediatek/isp/isp_30/camsv/mtk_camsv.h | 200 +++ .../isp/isp_30/camsv/mtk_camsv30_hw.c | 474 +++++ .../isp/isp_30/camsv/mtk_camsv30_regs.h | 59 + .../isp/isp_30/camsv/mtk_camsv_video.c | 781 +++++++++ .../mediatek/isp/isp_30/seninf/Makefile | 5 + .../mediatek/isp/isp_30/seninf/mtk_seninf.c | 1561 +++++++++++++++++ .../isp/isp_30/seninf/mtk_seninf_reg.h | 99 ++ 18 files changed, 3984 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.41.0