Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp444973iog; Wed, 15 Jun 2022 05:39:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s0guKVdKKHz6ybn6usfZytANsHGZw7SG3TMUX7G7mQf1eMbYTBv6n9yS4O1fCXEXeARLC7 X-Received: by 2002:a17:902:e752:b0:165:1282:8d56 with SMTP id p18-20020a170902e75200b0016512828d56mr9504840plf.48.1655296779914; Wed, 15 Jun 2022 05:39:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655296779; cv=none; d=google.com; s=arc-20160816; b=DBBmRI9S2IEQnbgnNUJw4IiQRzpXWHEq6v4/4qvwYm/j9pLJ1wAY72eWu2Cwb1NjC1 a0xRukJaeA1sUEfYqKfO0GGzznhOxtyqob4bETIDVQmjoNmkIWRkOak9cfJku0lVu+jc ALvoeP8sbXX1iVzIulBwPYksmUvFwgklPki+KTXW7Gtmz+znj9tYDF3YllDs+l52P3XL yMgUTB5qNAI0qAKVkvwRUc0SR0RHTCiLS866hkKp+/56iVdrmFCwtq9M+llzF9zA/rlG Nkx3aFnKlZ66YRHI7C/84z7u3GmHKJv6iYW19dmQ3PrZHIprgLBeCDNHPIT2+xJVT8u5 zK7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HENmXPwQgZrLvgBCOSxbn3j3qup91Vw70nnac08YVQI=; b=VLIsrVJAE1inqCQSDef2GICxXh8/+AnDD6ngzlGbB0OU8LFBW5Os0VonxF38WsAxX4 pXMbyBdPchsSYR/1Qmwib7YGFSwnASt5PtyxIoZDf10GTUzFhTZcCPK0gno7bSLI3vwh 2oDlSriQ//JZVFmYa5yrAD9eBC4700Y7FAfodoOzmBnMAdn4uGNZ9BNE2ZLqVuIKKIAa ecpnRtN7wZVcdzpK9HTEXRcRKod1wp7vp0S0oOrETSI56lX9ITNOpUlS9BoEnq50f5vF qIfWEck9hSXaxt52IbHNLjTQ5QST3vqBo5ZlSpN78GApUAynQAZ3/eYyMOljtElqglH+ uuvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DUgSbBif; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h21-20020a63e155000000b003fc1bb74001si16773688pgk.54.2022.06.15.05.39.27; Wed, 15 Jun 2022 05:39:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DUgSbBif; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346865AbiFOLvg (ORCPT + 99 others); Wed, 15 Jun 2022 07:51:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347229AbiFOLvG (ORCPT ); Wed, 15 Jun 2022 07:51:06 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFAEE4EF79; Wed, 15 Jun 2022 04:50:59 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id d14so15697623eda.12; Wed, 15 Jun 2022 04:50:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HENmXPwQgZrLvgBCOSxbn3j3qup91Vw70nnac08YVQI=; b=DUgSbBif0rvoVLNJXtj/ChM9YSBp5WGCaDECnnql+GX3hRdyoqgIuQ2xRZFqjedHAf cnEJo5iClqIkgWsSOUF8paCNyTTFWHdWmuvUrd0CEjfkhgikfT+jbe6lbSKDZrKwELoJ 22EmOIDiL+3X0CxgGcJ3i5ogwduadexq5qYRuM1L03r294jQwybtnqgQdHrbmKzdgK8a De2+Y8SBzqolsZauWOELhNie/rBqvlLIMw3SflSQvAdwyAYNRfjUCH5oFZcgtv6XrKSP NcSF4PrhRiOXbY0o5a6a+3xvgGdk4fWeRuQx2TmqZjpReXX+XO6l+3KLKH97sniqnNUL LBdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HENmXPwQgZrLvgBCOSxbn3j3qup91Vw70nnac08YVQI=; b=XCNdOFY+cG1rDk1Wys3GMerkMvGBRfsfQZBznBxCOVZcKda5fGsJ8qn36vgufM2b0C 2uFAxwQIQkwbKj0VBrpSzjTGchBDIvXUTyMGFUyI4L04UBuAntCYFvv4peOSx31Pgl5i 74n/1nI47+dM3VVNaPOrXXmdzQqneY2RXNwhgfx+8nHyKQlPwK7fb+7UmytPyyzv2VRL zG2AJ1hXJE4zgBPmnyH/qRd6bzL6rqzqy7YJZYI4bpai6tebk9PpDyFA69w51NYldL3V dQ4C2s3PiiqxOuhiMxXj/FhXOz5kx1whnxmcYsClPhWDJAZBCYcKEypVGixrF0tU4XGe bImw== X-Gm-Message-State: AJIora8ay/MpcbixmrFkuKIR4hM/mIeUpmYne+2X6YtijsbCQeyb6Qgx ELJZHP6Bry5QsooqAlmvH0Q= X-Received: by 2002:a05:6402:32a6:b0:42d:ed8b:3d8 with SMTP id f38-20020a05640232a600b0042ded8b03d8mr12220196eda.225.1655293858511; Wed, 15 Jun 2022 04:50:58 -0700 (PDT) Received: from linuxdev2.toradex.int (31-10-206-125.static.upc.ch. [31.10.206.125]) by smtp.gmail.com with ESMTPSA id t6-20020a17090616c600b00715a02874acsm4561158ejd.35.2022.06.15.04.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 04:50:58 -0700 (PDT) From: Max Krummenacher To: max.krummenacher@toradex.com Cc: Oleksandr Suvorov , Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 12/18] ARM: dts: imx6q-apalis: Add ov5640 mipi csi camera Date: Wed, 15 Jun 2022 13:50:00 +0200 Message-Id: <20220615115006.45672-13-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220615115006.45672-1-max.oss.09@gmail.com> References: <20220615115006.45672-1-max.oss.09@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oleksandr Suvorov The Apalis iMX6 modules allow connecting a mipi-csi video input. Add support for our OV5640 camera module but have it disabled. This allows to enable it in an overlay per the current system configuration. Signed-off-by: Oleksandr Suvorov Signed-off-by: Max Krummenacher --- Changes in v2: - Fixed '-' vs. '_' in node name as pointed out by Fabio - Sorted properties alphabetical in the newly added node arch/arm/boot/dts/imx6qdl-apalis.dtsi | 67 ++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi index b4742ad85f56..bbd838acb8d6 100644 --- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi +++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi @@ -29,6 +29,12 @@ status = "disabled"; }; + clk_ov5640_osc: clk-ov5640-osc { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + }; + gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; @@ -110,6 +116,26 @@ regulator-always-on; }; + reg_ov5640_1v8_d_o_vdd: regulator-ov5640-1v8-d-o-vdd { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-max-microvolt = <1800000>; + regulator-min-microvolt = <1800000>; + regulator-name = "DOVDD/DVDD_1.8V"; + /* Note: The CSI module uses on-board 3.3V_SW supply */ + vin-supply = <®_module_3v3>; + }; + + reg_ov5640_2v8_a_vdd: regulator-ov5640-2v8-a-vdd { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-max-microvolt = <2800000>; + regulator-min-microvolt = <2800000>; + regulator-name = "AVDD/AFVDD_2.8V"; + /* Note: The CSI module uses on-board 3.3V_SW supply */ + vin-supply = <®_module_3v3>; + }; + reg_usb_otg_vbus: regulator-usb-otg-vbus { compatible = "regulator-fixed"; pinctrl-names = "default"; @@ -452,7 +478,6 @@ reset-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>; /* MXM3_13 */ status = "disabled"; }; - }; /* @@ -631,6 +656,30 @@ scl-gpios = <&gpio3 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; sda-gpios = <&gpio3 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; status = "disabled"; + + ov5640_csi_cam: ov5640_mipi@3c { + compatible = "ovti,ov5640"; + AVDD-supply = <®_ov5640_2v8_a_vdd>; + DOVDD-supply = <®_ov5640_1v8_d_o_vdd>; + DVDD-supply = <®_ov5640_1v8_d_o_vdd>; + clock-names = "xclk"; + clocks = <&clks IMX6QDL_CLK_CKO2>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_cam_mclk>; + /* These GPIOs are muxed with the iomuxc node */ + powerdown-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>; + reg = <0x3c>; + reset-gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; + status = "disabled"; + + port { + ov5640_to_mipi_csi2: endpoint { + clock-lanes = <0>; + data-lanes = <1 2>; + remote-endpoint = <&mipi_csi_from_ov5640>; + }; + }; + }; }; &ipu1_di1_disp1 { @@ -661,6 +710,22 @@ }; }; +&mipi_csi { + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + port@0 { + reg = <0>; + + mipi_csi_from_ov5640: endpoint { + clock-lanes = <0>; + data-lanes = <1 2>; + remote-endpoint = <&ov5640_to_mipi_csi2>; + }; + }; +}; + &pwm1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm1>; -- 2.20.1