From patchwork Wed Jun 28 14:52:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13295899 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 730E8EB64DA for ; Wed, 28 Jun 2023 14:54:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=DUyVYTx+jeAdmHvmoMU7VfQM0uIbDIbWVh8cKrTg9oM=; b=mkEun8nkxnA4mO YKEzNcsMBsdSQL1+kKAKE5guFNDIBNqK/xXOpBqBeWlqngrxiCV+8u3fCUD+bT/M/0TlQZMNis1Vl TpxxdJyRp5u1ThZitP95diESC6TIpN5PRWoagRar3BUhclrOj3R2rVLBReB5TkYuu958N0IGh2WuK i/ymfRu6EuQ7WmldsHSKiQhJM3u+iMejsP+MqT+scO+A7KRKAvKA1ih+X/vcYumexKkMu1Vx10886 qOtPkoqJTCTR6VKZTawMWmaD86VjojpKs/Ik+EceHSjpETpH85PXC/767qY+kKNvdkAWAfKDrDqtF YhJAbD5keeN7eyNhdekw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qEWYp-00Fu0h-1d; Wed, 28 Jun 2023 14:54:23 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qEWYk-00Ftzi-1l for linux-arm-kernel@lists.infradead.org; Wed, 28 Jun 2023 14:54:21 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f865f0e16cso8468284e87.3 for ; Wed, 28 Jun 2023 07:54:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1687964056; x=1690556056; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9/0nNN44VNRNUJVhh4K+B/77Q53o4u445deZJq878Zg=; b=3U/AqUXHlkLWMESSviAmOFThRvVcswBGYbBOWKK59lj1GZ2VqgQ1+pSZko0dtzN7UP Ca7Aio6JPmkKxeQi8G4zYUDlNZmWxxWurWQduxodhFykzHp5qF/t5qpxLP4ZyyZBeyhH ZP8RRglbiprZPTTaA4iGl3+yGE9fOZ2dS+Ch4Xm+ysB7yIR8g8dT1BqDqbwjt/9F4BeN NDjVPJlnTXwtg2ATTLDUEMiKxFDkDtSOiAo7HkspOVOTz1cLdgZoULtjtI5AEgY7H2Ew 1Mh6lE0Lgr1B4aNyF8rjQYpzYhA8jD9/McHP9A71ucdr594dMUZQFOrI1aIfs14UKod2 cxWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687964056; x=1690556056; 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=9/0nNN44VNRNUJVhh4K+B/77Q53o4u445deZJq878Zg=; b=iTapVo0j7TMucayPczqF4yP5w8dBToNk3EIGJYMfdDjRLqeSNkm6/X/Qv457bIUzDD 5T+JrnNw0WbC7Y97dCyFFqylX76syl2x2WqHIxKzBNL0RNNtvaOD4zEIORjqY5IVa7sZ HE6xNATAb6w3kXsmPhhLD4jb30+GAf+rkRR4C9/zcS0HofzdPVks2M4g+v/YUX//lDO4 RawX0Icefsw4+tcccFKH8Rq++FJswtUlM6YbwrVt+sXX4kMTeSyYykpEa7wQEeLSaWne JelassSOmKPluHbx+G5AbLOpXTNG5HlvxobYJf2m10dvri7IVQUJlKvvEPJBlzBu071O Vn2A== X-Gm-Message-State: AC+VfDwTDu74pMEQ5Rjdf9MfjP60WSch4pKm43bRjnU9Z98jxrlPWDgX oVQZwYytZjafKwV+Fh2vLrfuQg== X-Google-Smtp-Source: ACHHUZ5hKqR6Qa4F5o02E1EftTHMMD7L0/abbxO4ZsmrimeO6vZ7sL5KrmRVU9LTa27Amjnnr3F8Bw== X-Received: by 2002:a19:431c:0:b0:4f9:58bd:9e5a with SMTP id q28-20020a19431c000000b004f958bd9e5amr10705065lfa.27.1687964056264; Wed, 28 Jun 2023 07:54:16 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:55f:21e0:9e19:4376:dea6:dbfa]) by smtp.gmail.com with ESMTPSA id k16-20020a05600c0b5000b003fba6709c68sm4846278wmr.47.2023.06.28.07.54.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 07:54:15 -0700 (PDT) From: Julien Stephan To: 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 0/4] Add Mediatek ISP3.0 Date: Wed, 28 Jun 2023 16:52:51 +0200 Message-ID: <20230628145412.1610260-1-jstephan@baylibre.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230628_075418_791879_33AD3FB6 X-CRM114-Status: GOOD ( 15.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 has several inputs connected to phys. The PHY module is available here: https://lore.kernel.org/all/20230620121928.1231745-1-jstephan@baylibre.com/ 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/ 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 | 301 ++++ 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 | 1559 +++++++++++++++++ .../isp/isp_30/seninf/mtk_seninf_reg.h | 99 ++ 18 files changed, 3988 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