From nobody Sun Nov 24 08:05:25 2024 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 56EEE1C9DC9 for ; Thu, 21 Nov 2024 08:53:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732179203; cv=none; b=Sl/Ei5rkZ2RSANgYwf9BdpCqBCzn2pgK8ruEfWK26V65acBnPpJJzHhqt8fh0vOveSlWj1WqrLTpRikQ92ET802+rsJmgYdVqZD6RTl3GnfUAkldWhWzDJHAAocr6SsHxbEcjediaIWJxpJXQqsJ0p7V4D5YoiHq0fAvn1wNcRU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732179203; c=relaxed/simple; bh=0rkB4/JpaPliiwIivH9y29TzVUpUltIbQ7I+cmLdwJ8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GwH06mLnGeSnZ9PI6l567XoAliq5mgOfJQtSs1bCuub7GdgujRxYJj9rlN10HN4eu9cSyPuBTRB10nvap5qSI5CWQQFL7u7rBRYhP3eiTbkfE4/9Hkma4mWu5mY1oHrQWpiS+qQZBiyRc/lOhOLZyUSvVkxbUR9JEid+YgoPsOU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=2SWW/CPf; arc=none smtp.client-ip=209.85.221.49 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 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="2SWW/CPf" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-37ed3bd6114so374546f8f.2 for ; Thu, 21 Nov 2024 00:53:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1732179198; x=1732783998; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=5MCyWyyuLRYxP0oH9ltkOsqfvK0CBscNjWxECImzBCc=; b=2SWW/CPfWhoYVi1cSbqP5KTtPiWS3Oru45+H2ENNxMQBTPf+9SMs4m+dRpk66OnLQO E6NNH4WHU6F9XdnpqbIstrWHyqXxfYRFF1wF4syoWYd1CC/GwZYUQqN3oCIIcITO3bln 5C/2sHAyTB9ImDKb/OAPevbEasPWDgM7nBBkmaX7O0e1pwRhcOV5PJIIXMcX/n8Zgdk8 Xr/8mdVb3wcie4616WY8CaC9iMQnbLTmFurOVYumtdV4aV0eGSqw78SWwcvYuzh78YXo l0vpgrIgfqmZ/GkHI3yYXo+krBC/eMX6ij/BRV2kPNVYo8juqh4IVhkNmKrjd00aLiTj mU5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732179198; x=1732783998; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5MCyWyyuLRYxP0oH9ltkOsqfvK0CBscNjWxECImzBCc=; b=bwxgKFC5MUweIor45nx3hPR8llNwewR2jwULBCTG+VkUwtTRbMPX5qaUSg5O+Is9rC sH2M9q1kd/jAIx6y28v+oXUVlbuNzCeC2BvApuw9+k28fW287h/AjV6CdwAhoIdbNaWO cOhFZHxmwkY85qFrv1QtTJyapdKVwlJtHNxQUcv/3Tiju1tom5UEnbcHwVpvXQpDme96 ag0PMuYfaAxmS4dGlm/UmIVIDBlE60ESCwmgIkZl689TfAaJFIlSbS/AhFB46DNP80UR hCPClucIyIvBL2XBS0FoNKfr+50s54VEUYSM7jxX0/jddhqhMylSEtvVhWLuxaUMVuaS Yl9A== X-Forwarded-Encrypted: i=1; AJvYcCUXNNiq0ogZFnnBuhd71gEr+Ds/hGFUXtgepPsRPvA+XTqdjnWdqqEfAnjJagAvFyMI3XjV7aLi8cBeKak=@vger.kernel.org X-Gm-Message-State: AOJu0YydK82L9ONNxD4lU/gXHF7MvXSwGO8WmMKmpj1hjk5alplnOREU 8q70VmlipHHsZqRj67OIa9dNyES/0CbzwSNspMV+xpBA3hCK5SI1b0M3DB9tM24= X-Gm-Gg: ASbGncsxPI4ZU0GHX1RHFFFfMpxx6wwjhAqRDf1MqJOWo+k7s3k6OjSweGgWAwKBFGs TPFFxb2y4M1pArZNVnN91xwse4Hm79JjIY3LSndkMFNnw1aPImm6PITCDrOXFAmYfrxoZrlI1Xy BsCKhEBq2zEXy5sKFdI3VSPhWk2DRh4vmRh289v5CsdmvTI9M6wRXvH7SfwjqJvdmry6NIX1g+V 7iNDlM2QRL+9HEXwnUuU5Asm1bq5RFRRQsquUqGIJYC1EmiYxY+PprLIKwjU2kJF80dSBTuTRLe sq1/1jSx2Hy8V8XCPH+zx2qdzNL+rI/zOW5mDjqUZqw= X-Google-Smtp-Source: AGHT+IEMIkoLdPBEX/9Nv5t80VVjflIxCN9/zIPP7NEINBt57fCC+7zzZNTiyW6G4qkMw3XegNJTaQ== X-Received: by 2002:a5d:5985:0:b0:382:4a80:a616 with SMTP id ffacd0b85a97d-38254ae0006mr4981983f8f.9.1732179197597; Thu, 21 Nov 2024 00:53:17 -0800 (PST) Received: from [192.168.42.0] (2a02-842a-d52e-6101-6fd0-06c4-5d68-f0a5.rev.sfr.net. [2a02:842a:d52e:6101:6fd0:6c4:5d68:f0a5]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-382549111fdsm4219900f8f.58.2024.11.21.00.53.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2024 00:53:17 -0800 (PST) From: Julien Stephan Date: Thu, 21 Nov 2024 09:53:15 +0100 Subject: [PATCH v7 1/5] dt-bindings: media: add mediatek ISP3.0 sensor interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241121-add-mtk-isp-3-0-support-v7-1-b04dc9610619@baylibre.com> References: <20241121-add-mtk-isp-3-0-support-v7-0-b04dc9610619@baylibre.com> In-Reply-To: <20241121-add-mtk-isp-3-0-support-v7-0-b04dc9610619@baylibre.com> To: Laurent Pinchart , Andy Hsieh , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Julien Stephan , Louis Kuo , Phi-Bang Nguyen X-Mailer: b4 0.14.2 From: Louis Kuo This adds the bindings, for the mediatek ISP3.0 SENINF module embedded in some Mediatek SoC, such as the mt8365 Signed-off-by: Louis Kuo Signed-off-by: Phi-Bang Nguyen Signed-off-by: Laurent Pinchart Reviewed-by: Laurent Pinchart Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring (Arm) Signed-off-by: Julien Stephan --- .../bindings/media/mediatek,mt8365-seninf.yaml | 259 +++++++++++++++++= ++++ MAINTAINERS | 7 + 2 files changed, 266 insertions(+) diff --git a/Documentation/devicetree/bindings/media/mediatek,mt8365-seninf= .yaml b/Documentation/devicetree/bindings/media/mediatek,mt8365-seninf.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8bd78ef424acf1ec207b527b4a8= 4b6a535f37593 --- /dev/null +++ b/Documentation/devicetree/bindings/media/mediatek,mt8365-seninf.yaml @@ -0,0 +1,259 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (c) 2023 MediaTek, BayLibre +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/mediatek,mt8365-seninf.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek Sensor Interface 3.0 + +maintainers: + - Laurent Pinchart + - Julien Stephan + - Andy Hsieh + +description: + The ISP3.0 SENINF is the CSI-2 and parallel camera sensor interface foun= d in + multiple MediaTek SoCs. It can support up to three physical CSI-2 input = ports, + configured in DPHY (2 or 4 data lanes) or CPHY depending on the SoC. + On the output side, SENINF can be connected either to CAMSV instance or + to the internal ISP. CAMSV is used to bypass the internal ISP processing + in order to connect either an external ISP, or a sensor (RAW, YUV). + +properties: + compatible: + const: mediatek,mt8365-seninf + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + power-domains: + maxItems: 1 + + clocks: + items: + - description: Seninf camsys clock + - description: Seninf top mux clock + + clock-names: + items: + - const: camsys + - const: top_mux + + phys: + minItems: 2 + maxItems: 2 + description: + phandle to the PHYs connected to CSI0/A, CSI1, CSI0B + + phy-names: + description: + list of PHYs names + minItems: 2 + maxItems: 2 + items: + enum: [ csi0, csi1, csi0b] + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: CSI0 or CSI0A port + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + maxItems: 1 + data-lanes: + minItems: 1 + maxItems: 4 + + port@1: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: CSI1 port + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + maxItems: 1 + data-lanes: + minItems: 1 + maxItems: 4 + + port@2: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: CSI2 port + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + maxItems: 1 + data-lanes: + minItems: 1 + maxItems: 4 + + port@3: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: CSI0B port + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + maxItems: 1 + data-lanes: + minItems: 1 + maxItems: 2 + + port@4: + $ref: /schemas/graph.yaml#/properties/port + description: connection point for cam0 + + port@5: + $ref: /schemas/graph.yaml#/properties/port + description: connection point for cam1 + + port@6: + $ref: /schemas/graph.yaml#/properties/port + description: connection point for camsv0 + + port@7: + $ref: /schemas/graph.yaml#/properties/port + description: connection point for camsv1 + + port@8: + $ref: /schemas/graph.yaml#/properties/port + description: connection point for camsv2 + + port@9: + $ref: /schemas/graph.yaml#/properties/port + description: connection point for camsv3 + + required: + - port@0 + - port@1 + - port@2 + - port@3 + - port@4 + - port@5 + - port@6 + - port@7 + - port@8 + - port@9 + +required: + - compatible + - interrupts + - clocks + - clock-names + - power-domains + - ports + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + #include + + soc { + #address-cells =3D <2>; + #size-cells =3D <2>; + + csi@15040000 { + compatible =3D "mediatek,mt8365-seninf"; + reg =3D <0 0x15040000 0 0x6000>; + interrupts =3D ; + clocks =3D <&camsys CLK_CAM_SENIF>, + <&topckgen CLK_TOP_SENIF_SEL>; + clock-names =3D "camsys", "top_mux"; + + power-domains =3D <&spm MT8365_POWER_DOMAIN_CAM>; + + phys =3D <&mipi_csi0 PHY_TYPE_DPHY>, <&mipi_csi1>; + phy-names =3D "csi0", "csi1"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + seninf_in1: endpoint { + clock-lanes =3D <2>; + data-lanes =3D <1 3 0 4>; + remote-endpoint =3D <&isp1_out>; + }; + }; + + port@1 { + reg =3D <1>; + }; + + port@2 { + reg =3D <2>; + }; + + port@3 { + reg =3D <3>; + }; + + port@4 { + reg =3D <4>; + seninf_camsv1_endpoint: endpoint { + remote-endpoint =3D <&camsv1_endpoint>; + }; + }; + + port@5 { + reg =3D <5>; + seninf_camsv2_endpoint: endpoint { + remote-endpoint =3D <&camsv2_endpoint>; + }; + }; + + port@6 { + reg =3D <6>; + }; + + port@7 { + reg =3D <7>; + }; + + port@8 { + reg =3D <8>; + }; + + port@9 { + reg =3D <9>; + }; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 4c7f9e37c5653664a11a2cb36aba942830b5a8d1..242c54c88a4a22fc0cbe5c4fc5d= 7b0d0f84b329e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14565,6 +14565,13 @@ M: Sean Wang S: Maintained F: drivers/char/hw_random/mtk-rng.c =20 +MEDIATEK ISP3.0 DRIVER +M: Laurent Pinchart +M: Julien Stephan +M: Andy Hsieh +S: Supported +F: Documentation/devicetree/bindings/media/mediatek,mt8365-seninf.yaml + MEDIATEK SMI DRIVER M: Yong Wu L: linux-mediatek@lists.infradead.org (moderated for non-subscribers) --=20 2.47.0