Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1415918pxb; Fri, 21 Jan 2022 18:10:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvxFFzUEYYEYGGHBHkrzIfYHNc+8LZZlJs9JK5pBMTjhkuv7IS7Ef0MjFhgIpqamnUFTb6 X-Received: by 2002:a17:90a:ec05:: with SMTP id l5mr1840866pjy.192.1642817453934; Fri, 21 Jan 2022 18:10:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642817453; cv=none; d=google.com; s=arc-20160816; b=KD107UkrR77/xrE/iEJkPxPGlyhxbQu3KIQHytXKzda+cUnwi+jVCqxRj+nD/Jitlx PhpCWM22WnWSCADPv5irG/RgTi24HBeVEiwLDZRYaxxWXueKXA766tTEn7q1B4Lv705Q 1coTWSQuIpZ8uj/FeKMIhOjQjYUFbW3DKfAfzNFHxWTIj8pHSBPtp5Il6kz6vtIUfM3+ hhjB+bERzt14jBf0A8lSAd3b/xYBVqS49wk6RAN10oggTlW0G3oXVVoPNCP1tTW79llC h93RDl0e1ciK2zuiq2DxniO3MoqiCRN/UYjnT+RXal826m/07x3c1nYjtx32IWsHaspF ge9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=WTOUhcMu9FulJO8LOGXKHqZzuab7A53QPpNohVIOXUc=; b=efuGPgu/apCy6/IaeNFUrSEufJCP10ebykVmEuSlvegcR49FbwTX4YPFLVb7Yp1pK/ kWmKiiUuFt9cPh9jMBbnjps5v6GMk3TP3k+nt+Duph++wnNBTuOJ/dubie9ssVk4u3n1 3ur00q87YWCEXKQi24VGjDR/vkJJgxMRyUG0vwulkPm/YAfKRj8U0ZthCT35bqaiZedP IQDiVYkieHqsWEtGGbLDjepvksoVLuNJzEKOY8oj6mAU4NcfVNyjfUGbrF6zWmc3zD1W bURuTpICEFgD+ZRgY9PZUlHRyr2Pdo7jNTD/WkfeXMVaY3c600oDbMKn4FvSdINQCq5N YHFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h9si7930730pgg.455.2022.01.21.18.10.42; Fri, 21 Jan 2022 18:10:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382168AbiAUShq (ORCPT + 99 others); Fri, 21 Jan 2022 13:37:46 -0500 Received: from finn.gateworks.com ([108.161.129.64]:48802 "EHLO finn.localdomain" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1346158AbiAUShg (ORCPT ); Fri, 21 Jan 2022 13:37:36 -0500 Received: from 068-189-091-139.biz.spectrum.com ([68.189.91.139] helo=tharvey.pdc.gateworks.com) by finn.localdomain with esmtp (Exim 4.93) (envelope-from ) id 1nAyVD-00A3Dc-66; Fri, 21 Jan 2022 18:19:11 +0000 From: Tim Harvey To: Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Tim Harvey Subject: [PATCH] arm64: dts: imx8mm-venice-gw72xx-0x: add dt overlay for imx219 rpi v2 camera Date: Fri, 21 Jan 2022 10:19:09 -0800 Message-Id: <20220121181909.13727-1-tharvey@gateworks.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for the RaspberryPi Camera v2 which is an IMX219 8MP module: - https://datasheets.raspberrypi.com/camera/camera-v2-schematics.pdf - has its own on-board 24MHz osc so no clock required from baseboard - pin 11 enables 1.8V and 2.8V LDO which is connected to GW73xx MIPI_GPIO4 (IMX8MM GPIO1_IO1) so we use this as a gpio Support is added via a device-tree overlay. The IMX219 supports RAW8/RAW10 image formats. Signed-off-by: Tim Harvey --- arch/arm64/boot/dts/freescale/Makefile | 1 + .../imx8mm-venice-gw72xx-0x-imx219.dts | 84 +++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx-0x-imx219.dts diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile index 324c1b01989a..08d1f28a5165 100644 --- a/arch/arm64/boot/dts/freescale/Makefile +++ b/arch/arm64/boot/dts/freescale/Makefile @@ -43,6 +43,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mm-nitrogen-r2.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mm-var-som-symphony.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw71xx-0x.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw72xx-0x.dtb +dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw72xx-0x-imx219.dtbo dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw72xx-0x-rs232-rts.dtbo dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw72xx-0x-rs422.dtbo dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw72xx-0x-rs485.dtbo diff --git a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx-0x-imx219.dts b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx-0x-imx219.dts new file mode 100644 index 000000000000..6fbae90735d4 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx-0x-imx219.dts @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2022 Gateworks Corporation + */ + +#include + +#include "imx8mm-pinfunc.h" + +/dts-v1/; +/plugin/; + +&{/} { + compatible = "gw,imx8mm-gw72xx-0x", "fsl,imx8mm"; + + reg_cam: regulator-cam { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_reg_cam>; + compatible = "regulator-fixed"; + regulator-name = "reg_cam"; + gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + cam24m: cam24m { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + clock-output-names = "cam24m"; + }; +}; + +&csi { + status = "okay"; +}; + +&i2c3 { + #address-cells = <1>; + #size-cells = <0>; + + imx219: sensor@10 { + compatible = "sony,imx219"; + reg = <0x10>; + clocks = <&cam24m>; + VDIG-supply = <®_cam>; + + port { + /* MIPI CSI-2 bus endpoint */ + imx219_to_mipi_csi2: endpoint { + remote-endpoint = <&imx8mm_mipi_csi_in>; + clock-lanes = <0>; + data-lanes = <1 2>; + link-frequencies = /bits/ 64 <456000000>; + }; + }; + }; +}; + +&mipi_csi { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + imx8mm_mipi_csi_in: endpoint { + remote-endpoint = <&imx219_to_mipi_csi2>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&iomuxc { + pinctrl_reg_cam: regcamgrp { + fsl,pins = < + MX8MM_IOMUXC_GPIO1_IO01_GPIO1_IO1 0x41 + >; + }; +}; -- 2.17.1