From patchwork Mon Aug 7 09:48:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13343239 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 44B4BEB64DD for ; Mon, 7 Aug 2023 09:50:22 +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=Lo6dF6zPC/lwuwyCtWApmLamqRWfdAtAvcxETLWgGmg=; b=X8Oes6wvM0zJ1c AicGzu6w0bx/mEgEOpIBXCwcKYu++aunHHXREt9krIXAuu89psTUKRjprt8navSMs5A+fq5OM/8Uz z8EDCvhj1481IQ9xbPPeN+trZXvCIxoHxizm8/fziybyC95j1Qqojmo4OWIfJoc6UrVg9HA3BHU8Y 5RPQC0YJEiQZnhEh86fbHLQxNrXhZxTWpc4L2j3IsVssYmlL8T5vpY9MImfjWmewbg1fLt4YI5uoL tvbM+cr67OAa1f/qxSo+Y3NvSymy2Fkb70+dGlk1UkmJk9TB0zxDwBHr443f0iWX+CK9fE9KprkPe RLqVTH2LdF7JxIUsNo4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSws3-00GbTO-26; Mon, 07 Aug 2023 09:49:51 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qSws0-00GbS0-0R for linux-arm-kernel@lists.infradead.org; Mon, 07 Aug 2023 09:49:49 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3fe4a89e8c4so20352835e9.3 for ; Mon, 07 Aug 2023 02:49:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1691401785; x=1692006585; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7WlaoSNS0YQPW0Ym1+gME4oJekwgVfQCX8PcT91w2v4=; b=Sa8PD0Y+SHMOpyVVYoPVv0bjF/lbLKgj8brbLKMHB8UR/YlDmps4DaYcK/PwagxM5F 6kj6WB7tBpA9MZ9ZWuihJwiZQsnl6xQ4k8WAXX/8+kWxY1wrE0r0ox/EvvAt7xpGVOGE x/kB838MjxHRBYpAz641hN7ivYvnA8uW2WhfnGIyOUDiydJEc2Yq3fPLPejKhK5qcYxR hKQcmgGik+3OcEJEli0L4ToKdkPsFxencPLkDz77AoI4x7382U1jeilqSekJNYO7GhLA 4724WjNHZSsxaBeZRFpTa33rn7eP0ByHaVUMfeO0PO979YDxlKsYWXAUO8u3Jrfoh/OJ Osgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691401785; x=1692006585; 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=7WlaoSNS0YQPW0Ym1+gME4oJekwgVfQCX8PcT91w2v4=; b=RblY/d2YZ9p9HYaXd5/7UnB4x2TshYdvTNXlJOqHuVD+MtbryrLN0quNjVU0M4Fdw/ rKIcf6vcx3bydRcPLTaMohWQfVzY8/YtTL29anTyJZcGDwj71C2bZpyQAEcZ92l47hqQ hJiLN2fSwlPXvT4Gq9SROTCSHYQWMsfZCCUNxy1DySZJ3FsoG79UMrzonUD0qE8b++CI JBg6+67S/dxY5UONJENAg4VCHaT73weNlXWS7QG0zDozyGMfE1V4ZL3dC9WdeZDdZ81K NSO9iVcz6xcCrtkpU4QDJYVdiuwGe5gEvWeXW0iPXDcFfs3ZZI5lt+bSniQnLqm5JnlY 8S7g== X-Gm-Message-State: AOJu0Yxl5QvrMK8LIlfdWs5l2jQE/vNt68OpQLKfXprEWfBaOGej0+hH XRDL9ZyhUuPdEulK6febDT69dg== X-Google-Smtp-Source: AGHT+IEQJRkkN0Aet2aRuHdQXnzNkF4CizFKB1Dy7s2jxhLny1IPKP1IQDAj6d1UgfXDOBClCgMuQA== X-Received: by 2002:a1c:7913:0:b0:3fb:b248:67c with SMTP id l19-20020a1c7913000000b003fbb248067cmr5522062wme.22.1691401784845; Mon, 07 Aug 2023 02:49:44 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:55f:21e0:9e19:4376:dea6:dbfa]) by smtp.gmail.com with ESMTPSA id i11-20020a05600c2d8b00b003fe5228b78dsm2752429wmg.1.2023.08.07.02.49.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 02:49:44 -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 Subject: [PATCH v3 0/4] Add Mediatek ISP3.0 Date: Mon, 7 Aug 2023 11:48:09 +0200 Message-ID: <20230807094940.329165-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-20230807_024948_176108_9BF30B5E X-CRM114-Status: GOOD ( 18.54 ) 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 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: [1] for the phy, [2] for power management support 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/ [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 | 109 ++ .../media/mediatek,mt8365-seninf.yaml | 259 +++ 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 | 328 ++++ .../mediatek/isp/isp_30/camsv/mtk_camsv.h | 196 +++ .../isp/isp_30/camsv/mtk_camsv30_hw.c | 432 +++++ .../isp/isp_30/camsv/mtk_camsv30_regs.h | 60 + .../isp/isp_30/camsv/mtk_camsv_video.c | 781 +++++++++ .../mediatek/isp/isp_30/seninf/Makefile | 5 + .../mediatek/isp/isp_30/seninf/mtk_seninf.c | 1491 +++++++++++++++++ .../isp/isp_30/seninf/mtk_seninf_reg.h | 112 ++ 18 files changed, 3836 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