Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1018871rdd; Wed, 10 Jan 2024 06:27:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZ6q80sbf71jnweQGkFUKYfcesNzZ7cnGkhHF9vaJNkXu8E18QzCIq8osJCDdQWtRdWJIc X-Received: by 2002:a05:651c:32d:b0:2cc:77fd:6f8 with SMTP id b13-20020a05651c032d00b002cc77fd06f8mr280408ljp.64.1704896826348; Wed, 10 Jan 2024 06:27:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704896826; cv=none; d=google.com; s=arc-20160816; b=V+EzPfpRZWlrQoTu9V14Rpd+5xKNXXdZq2p3+p2OcKaf4GLxZyz6PHTHv5gzETPRCh g/pq9iKD5s1wjWhUJvhUcvrqoMNGEk3f1Ct1LsHNQUef76laQJRu2bQT3hSdpM/2L8Uo 9AGigdgsRqVQdCI5JsgZI6DYI09YxCBu33dt/zwOyTEtxoV7d0zrV+J98zStuMXtMsts 1JJLZTrp8AKjgighEekB59eE/1AB2XR4H/LR19ywR8JS8Oy9yN/zk9rf7DP4VnNu5kOT /+Vb9Tch90OfcFJochmkSa/p99wthORL644JyNukxU1MbYcaw92oy4M0Vv3r+yfDC2Vk 4j+g== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=YxtigJcFkwv9zaWo7GK9kjRZG8IVTttxdOGtGMzq6k0=; fh=qwpAZCCXrPWodcfO6Mhr4MYuDQpPOk8blf0KSlqK5TI=; b=vPzVo5ZElYbNyJUCnprh44ilXdiq9Fu+hOmCznCbUOHwuVqBGFyn90mbLXY82O1gX2 97wpLRZMayvC5FlC6QDhfgT9mAwZWGlYRrcdeCd3dowoZuJQ/15t0aQad7oToPH5+JLN LTK9FRAh46pttxMH/KWoL7bNq0ufRCU3rJIAjSTL3x5yH0sIy2nNxF2rnn3tonWwoQQj MMbP0fm0TlNIzt7Se7y22wfI5JnmVRkCAOutuTELR6vEFDVqzmDkm8kboyUShLTr4bsi 2baqDm7QUPlCakpKzFTpERebOk8Yu08O6lty/s6Ab8iaDIQTT0wgnSm6ltqNvWdBQvo1 y7dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=2RB5We6q; spf=pass (google.com: domain of linux-kernel+bounces-22336-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22336-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h24-20020a50cdd8000000b0055854396553si654172edj.309.2024.01.10.06.27.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 06:27:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22336-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=2RB5We6q; spf=pass (google.com: domain of linux-kernel+bounces-22336-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22336-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1D57C1F28580 for ; Wed, 10 Jan 2024 14:17:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F0A6A4D138; Wed, 10 Jan 2024 14:15:00 +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="2RB5We6q" Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 81F5B4CE17 for ; Wed, 10 Jan 2024 14:14:57 +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-wr1-f52.google.com with SMTP id ffacd0b85a97d-3366ddd1eddso3974819f8f.0 for ; Wed, 10 Jan 2024 06:14:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1704896095; x=1705500895; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YxtigJcFkwv9zaWo7GK9kjRZG8IVTttxdOGtGMzq6k0=; b=2RB5We6qg9zdjTzpzDLc75zmvq3FZVy9rOXDqu0Npxi1dXb392uOK3X4/bIfabGkzY 4JS/2jsuDfyowQNXZH9/Me9tB4QumuWWTibYhYq2i86RpOhYEP2iAHBXGINLFaFaOOhK jS2IUsLubxb6fwce1yeBY4/Q3AO1n22inNdffXRyG5Cdhv2b3DVXT90obZBoy5dzMH6x 5BXP63W5MzbrNv+AzZpRRTjpolFeYEWF6VplURmaCDWLtakdpDDPRMzo707/MB2XPw+o 7oeSDY1aLSdTzMexx0Xmntg3p9JfN79LDqRWijWaZv2b0LkX+1DOlTeNiDFP+UA96pfr gAfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704896095; x=1705500895; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YxtigJcFkwv9zaWo7GK9kjRZG8IVTttxdOGtGMzq6k0=; b=LNkEhaaDdGbwgXmEFsn/bkKM05sif0eN07SP7JMSPwiUkyBmDGSEHQKmw8EfIC41pe 4+1EHoX2j1TO/ghwh9XVxTz7QrdJWr3LtApSZ8TMzbSqKrylhJMTYfB/6mX2Ie5/V8ii Iasla48PKOKm9wz4qHb2fncPMBKrbUKW6iaxzk3JRBArEDFWYo8QWt49emh3X1/sr5rl lMXK7h3CSuv17eWgYcEvsGxSjxLXK/oQnjRStXeb8Q3PmX20ZEfKZo64RB/b2a8kqFXU RmBDUUB1TL6iSb+5hKZnK9np5U8xCBu3hg2SzFJZLlaS9r54+epmHtNuAHSzXKJlxNCU nq3w== X-Gm-Message-State: AOJu0YyDuR/TwDl4N30QOkT6Y7vy8FAeVS3+ZGVqtLlIwd/vcFqU/AN8 CWACq9kt1ZbwL0j027kAFdbzh17Eiz8FAA== X-Received: by 2002:a05:600c:4ecc:b0:40d:9377:faff with SMTP id g12-20020a05600c4ecc00b0040d9377faffmr327887wmq.189.1704896095738; Wed, 10 Jan 2024 06:14:55 -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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 06:14:55 -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 5/5] arm64: dts: mediatek: mt8365: Add support for camera Date: Wed, 10 Jan 2024 15:14:42 +0100 Message-ID: <20240110141443.364655-6-jstephan@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240110141443.364655-1-jstephan@baylibre.com> References: <20240110141443.364655-1-jstephan@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add base support for cameras for mt8365 platforms. This requires nodes for the sensor interface, camsv, and CSI receivers. Signed-off-by: Julien Stephan --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 128 +++++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index 24581f7410aa..9059b2f83b83 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -10,6 +10,7 @@ #include #include #include +#include / { compatible = "mediatek,mt8365"; @@ -703,6 +704,133 @@ ethernet: ethernet@112a0000 { status = "disabled"; }; + camsv1: camsv@15050000 { + compatible = "mediatek,mt8365-camsv"; + reg = <0 0x15050000 0 0x0040>, + <0 0x15050208 0 0x0020>, + <0 0x15050400 0 0x0100>; + interrupts = ; + clocks = <&camsys CLK_CAM>, + <&camsys CLK_CAMTG>, + <&camsys CLK_CAMSV0>; + clock-names = "cam", "camtg", "camsv"; + iommus = <&iommu M4U_PORT_CAM_IMGO>; + mediatek,larb = <&larb2>; + power-domains = <&spm MT8365_POWER_DOMAIN_CAM>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + camsv1_endpoint: endpoint { + remote-endpoint = + <&seninf_camsv1_endpoint>; + }; + }; + }; + }; + + camsv2: camsv@15050800 { + compatible = "mediatek,mt8365-camsv"; + reg = <0 0x15050800 0 0x0040>, + <0 0x15050228 0 0x0020>, + <0 0x15050C00 0 0x0100>; + interrupts = ; + clocks = <&camsys CLK_CAM>, + <&camsys CLK_CAMTG>, + <&camsys CLK_CAMSV1>; + clock-names = "cam", "camtg", "camsv"; + iommus = <&iommu M4U_PORT_CAM_IMGO>; + + mediatek,larb = <&larb2>; + power-domains = <&spm MT8365_POWER_DOMAIN_CAM>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + camsv2_endpoint: endpoint { + remote-endpoint = + <&seninf_camsv2_endpoint>; + }; + }; + }; + }; + + seninf: seninf@15040000 { + compatible = "mediatek,mt8365-seninf"; + reg = <0 0x15040000 0 0x6000>; + interrupts = ; + clocks = <&camsys CLK_CAM_SENIF>, + <&topckgen CLK_TOP_SENIF_SEL>; + clock-names = "camsys", "top_mux"; + + power-domains = <&spm MT8365_POWER_DOMAIN_CAM>; + + phys = <&mipi_csi0 PHY_TYPE_DPHY>, <&mipi_csi1>; + phy-names = "csi0", "csi1"; + + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + }; + + port@1 { + reg = <1>; + }; + + port@2 { + reg = <2>; + }; + + port@3 { + reg = <3>; + }; + + port@4 { + reg = <4>; + seninf_camsv1_endpoint: endpoint { + remote-endpoint = + <&camsv1_endpoint>; + }; + }; + + port@5 { + reg = <5>; + seninf_camsv2_endpoint: endpoint { + remote-endpoint = + <&camsv2_endpoint>; + }; + }; + }; + }; + + mipi_csi0: mipi-csi0@11c10000 { + compatible = "mediatek,mt8365-csi-rx"; + reg = <0 0x11C10000 0 0x2000>; + status = "disabled"; + num-lanes = <4>; + #phy-cells = <1>; + }; + + mipi_csi1: mipi-csi1@11c12000 { + compatible = "mediatek,mt8365-csi-rx"; + reg = <0 0x11C12000 0 0x2000>; + phy-type = ; + status = "disabled"; + num-lanes = <4>; + #phy-cells = <0>; + }; + u3phy: t-phy@11cc0000 { compatible = "mediatek,mt8365-tphy", "mediatek,generic-tphy-v2"; #address-cells = <1>; -- 2.43.0