Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6281839pxb; Mon, 14 Feb 2022 21:32:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJybzobUQl7/BA5JiLtYGi7Bz5C0uek2E8rbcS6NmRGDxb8OtkpLLWLqzwmijmr9DYCFWUA+ X-Received: by 2002:a17:902:d707:: with SMTP id w7mr2552921ply.145.1644903164529; Mon, 14 Feb 2022 21:32:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644903164; cv=none; d=google.com; s=arc-20160816; b=Ciz/NyO1zFpUdv4orSixRmJU24zpqsAmgb+NocqD42mRLLeWHml/4fecKlyj7ONoB2 qYYkquj2upsPK+msvBbNqkFz56lZNH+eIpY/tJw3KjSHiFb8sFDS0N8nLTPum2sUuDp5 53AHHATdEIj0AYQSbzyvBxWa0Op8i6oD7ZFC24+E8VdDmSiKXac/aqZ4HWfC8yzC27n0 xKLPqA7J3hrw7qRXBACVlxfpDaRiGekP/33loJ23ZW7iKeTMXpVxzySgax/OHhhRz6PU Z/maKqQhNVumwGniWMb/Z0pblH1aSsUWh9PmWC6tv94WYliT/LYMqajak2cCNN/tf+YE 8lKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=2UA9i8NcklLpt+XYNlbZ4hM3keOTDyTxUGj4UTts0Vk=; b=PJBFeSnWRba9CO+afy0+184FH4fkS8dUI3cUrXdZTbv5+NaBUlp9tsmuwxqzoJ66fs mn5OiStXCZ2/OqPc/Vjm3Ff2hcMXv6+fWhiglKvd+6u3AZlClihIynbT01JJzL7n6Vi6 4txKAoZ4YMGdWNVhuBHAr6pZwVIQBYNPpdrooPi8U721lrjovZvWXx58DBQQT3qo9/W2 LDWPi51j9aVTgMcOT3yvJ8jFsD5WU9NOUgFFVXtIvjXFeb4GpSxifzBz9AeghMSfHr+T rl796bEdPs77P89GgzNJNYNx9PMj+MA8L8kuG1kgzQF1ncGA5szt4PieHT7/uqDFpPBu 48pQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f3si1052884pgc.246.2022.02.14.21.32.28; Mon, 14 Feb 2022 21:32:44 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229820AbiBNXOw (ORCPT + 99 others); Mon, 14 Feb 2022 18:14:52 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:35470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231510AbiBNXOr (ORCPT ); Mon, 14 Feb 2022 18:14:47 -0500 Received: from finn.localdomain (finn.gateworks.com [108.161.129.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9B641B10FE; Mon, 14 Feb 2022 15:14:38 -0800 (PST) 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 1nJkYB-00AkNe-LP; Mon, 14 Feb 2022 23:14:31 +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 3/4] arm64: dts: imx8mm-venice-gw73xx-0x: add dt overlay for imx219 rpi v2 camera Date: Mon, 14 Feb 2022 15:14:23 -0800 Message-Id: <20220214231424.30927-4-tharvey@gateworks.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220214231424.30927-1-tharvey@gateworks.com> References: <20220214231424.30927-1-tharvey@gateworks.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 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 controlled regulator enable. Support is added via a device-tree overlay. The IMX219 supports RAW8/RAW10 image formats. Signed-off-by: Tim Harvey --- v3: use overlay target for simplicity v2: - added DTC_FLAGS - added line between prop and subnode for port@0 - added mipi_csi/port@1 to fix compiler warning --- arch/arm64/boot/dts/freescale/Makefile | 2 + .../imx8mm-venice-gw73xx-0x-imx219.dts | 93 +++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x-imx219.dts diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile index 1753f787a609..a84463bea15c 100644 --- a/arch/arm64/boot/dts/freescale/Makefile +++ b/arch/arm64/boot/dts/freescale/Makefile @@ -102,6 +102,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx8ulp-evk.dtb imx8mm-venice-gw72xx-0x-rs232-rts-dtbs := imx8mm-venice-gw72xx-0x.dtb imx8mm-venice-gw72xx-0x-rs232-rts.dtbo imx8mm-venice-gw72xx-0x-rs422-dtbs := imx8mm-venice-gw72xx-0x.dtb imx8mm-venice-gw72xx-0x-rs422.dtbo imx8mm-venice-gw72xx-0x-rs485-dtbs := imx8mm-venice-gw72xx-0x.dtb imx8mm-venice-gw72xx-0x-rs485.dtbo +imx8mm-venice-gw73xx-0x-imx219-dtbs := imx8mm-venice-gw73xx-0x.dtb imx8mm-venice-gw73xx-0x-imx219.dtbo imx8mm-venice-gw73xx-0x-rs232-rts-dtbs := imx8mm-venice-gw73xx-0x.dtb imx8mm-venice-gw73xx-0x-rs232-rts.dtbo imx8mm-venice-gw73xx-0x-rs422-dtbs := imx8mm-venice-gw73xx-0x.dtb imx8mm-venice-gw73xx-0x-rs422.dtbo imx8mm-venice-gw73xx-0x-rs485-dtbs := imx8mm-venice-gw73xx-0x.dtb imx8mm-venice-gw73xx-0x-rs485.dtbo @@ -109,6 +110,7 @@ imx8mm-venice-gw73xx-0x-rs485-dtbs := imx8mm-venice-gw73xx-0x.dtb imx8mm-venice- dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw72xx-0x-rs232-rts.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw72xx-0x-rs422.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw72xx-0x-rs485.dtb +dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw73xx-0x-imx219.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw73xx-0x-rs232-rts.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw73xx-0x-rs422.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw73xx-0x-rs485.dtb diff --git a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x-imx219.dts b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x-imx219.dts new file mode 100644 index 000000000000..f3ece4b7fbbd --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x-imx219.dts @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2022 Gateworks Corporation + */ + +#include + +#include "imx8mm-pinfunc.h" + +/dts-v1/; +/plugin/; + +&{/} { + compatible = "gw,imx8mm-gw73xx-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>; + }; + }; + + port@1 { + reg = <1>; + + imx8mm_mipi_csi_out: endpoint { + remote-endpoint = <&csi_in>; + }; + }; + }; +}; + +&iomuxc { + pinctrl_reg_cam: regcamgrp { + fsl,pins = < + MX8MM_IOMUXC_GPIO1_IO01_GPIO1_IO1 0x41 + >; + }; +}; -- 2.17.1