Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2155898pxb; Wed, 2 Feb 2022 23:58:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwgwlq93aVCCBOaLh10gl2XgIY+IDfuSuAR67ZKiDvegXazIEQOTJZDsUjlS1O+wKyjg/e X-Received: by 2002:a17:90b:350c:: with SMTP id ls12mr12361050pjb.44.1643875112107; Wed, 02 Feb 2022 23:58:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643875112; cv=none; d=google.com; s=arc-20160816; b=HIGw/eFvBGMOet1TEhASBR6kbxuF0JqU+kcJdOPbBShZ4BRybr19IwdFPPtkewyZ47 rjk6ATd6dQvFIRo8f3PIjyVt8+oGOQtNB+jpFRYZ9ywKnLKh5ICZ0V+8NAcsq9qHTva9 nE9E+MtQVQV41eEp3MFt+A2lCX6TpfVeoRFHb4SGpIFsaobXkRg/xHNPo9w5CESx0m/w iuC5bc7Cqxu/7GeE3dUre3gBkJUZ/KPEk21hCPML6XqyOZANo650ozzKC5zM9G8dz4jQ xPtI5LyAKlLV/WD1tabazCJiMJGBt4PCqUcIBih9ruogH2VdecnjMR+pK6qS7DY1hXZf TqKA== 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=/femRgznjxgooA5MJf5A1T8honwrwyNyWWZzjdDVEqs=; b=hL/APEdyr8qb+GzECEmMsEqFJFgRO9JD+9mdvdGkRt2ePfVfnhaCfQxW7s0eicf83l KxtA88VOgKlxW68RgiO+JUiEO5u/L9mStGhMrEMz9gHS5+F9uwSK4+JCbHkTlsV9N5LY JeGYiTR1h+Ww2me+AUMCFoYVvJFRLWeZRIznLDUg11qSoBsS/7O00BcJcuBkkg98lzGR 4sq7RTaySxpKiNrSOBWV5IibgJ1VkIYJDsKgtRH1tOjd9BSoiu7l7pCUHEuCqN44Sv2o vZ7XAH5PMTTumt9HXJA2Ybtye+VMdKE0O8fobXyqmKgjEBQ/8MERalORbTo0r7wsINXS YpSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=uYmuQ1hK; 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 145si21953791pgb.70.2022.02.02.23.58.20; Wed, 02 Feb 2022 23:58:32 -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; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=uYmuQ1hK; 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 S1346579AbiBBR5x (ORCPT + 99 others); Wed, 2 Feb 2022 12:57:53 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:58274 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346499AbiBBR52 (ORCPT ); Wed, 2 Feb 2022 12:57:28 -0500 Received: from tatooine.ideasonboard.com (unknown [IPv6:2a01:e0a:169:7140:7139:eada:2ff6:73dd]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 67BE21850; Wed, 2 Feb 2022 18:56:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1643824613; bh=3lrGwNeqv8zUuSa8vZIr+ceF4CcaJqG9pp3tPlC2K/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uYmuQ1hKzba11PQY9WPV1yOlDA1V8kdNg78UVgBUYTh0jmVHOar6yEiN5vaYTdhgH +Fq7Zhq4rxGmIwZfYxF9BJRnEyXNXoR+x8E1R/lT6CY/hCOWJO2NX4i53QQGtOAyxb 7C/eTAmD0C1Rox0LvpmXdAR4rb1fepNfkpDtHNPo= From: Jean-Michel Hautbois To: jeanmichel.hautbois@ideasonboard.com Cc: dave.stevenson@raspberrypi.com, devicetree@vger.kernel.org, kernel-list@raspberrypi.com, laurent.pinchart@ideasonboard.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, lukasz@jany.st, mchehab@kernel.org, naush@raspberrypi.com, robh@kernel.org, tomi.valkeinen@ideasonboard.com Subject: [RFC PATCH v3 11/11] media: bcm283x: Include the imx219 node Date: Wed, 2 Feb 2022 18:56:39 +0100 Message-Id: <20220202175639.149681-12-jeanmichel.hautbois@ideasonboard.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220202175639.149681-1-jeanmichel.hautbois@ideasonboard.com> References: <20220202175639.149681-1-jeanmichel.hautbois@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org WARNING: This patch is only used to demonstrate how the imx219 node is included in the bcm2711-rpi-4-b device tree, and is not intended to be merged. Configure the csi1 endpoint, add the imx219 node and connect it through the i2c mux. Signed-off-by: Jean-Michel Hautbois --- arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 1 + arch/arm/boot/dts/bcm283x-rpi-imx219.dtsi | 102 ++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 arch/arm/boot/dts/bcm283x-rpi-imx219.dtsi diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts index 4432412044de..f7625b70fe57 100644 --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts @@ -4,6 +4,7 @@ #include "bcm2711-rpi.dtsi" #include "bcm283x-rpi-usb-peripheral.dtsi" #include "bcm283x-rpi-wifi-bt.dtsi" +#include "bcm283x-rpi-imx219.dtsi" / { compatible = "raspberrypi,4-model-b", "brcm,bcm2711"; diff --git a/arch/arm/boot/dts/bcm283x-rpi-imx219.dtsi b/arch/arm/boot/dts/bcm283x-rpi-imx219.dtsi new file mode 100644 index 000000000000..f2c6a85fd731 --- /dev/null +++ b/arch/arm/boot/dts/bcm283x-rpi-imx219.dtsi @@ -0,0 +1,102 @@ +// SPDX-License-Identifier: GPL-2.0 +#include + +/ { + compatible = "brcm,bcm2835"; + + imx219_vdig: fixedregulator@1 { + compatible = "regulator-fixed"; + regulator-name = "imx219_vdig"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + imx219_vddl: fixedregulator@2 { + compatible = "regulator-fixed"; + regulator-name = "imx219_vddl"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + imx219_clk: imx219_clk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24000000>; + clock-output-names = "24MHz-clock"; + }; + + cam1_reg: cam1_reg { + compatible = "regulator-fixed"; + regulator-name = "imx219_vana"; + enable-active-high; + status = "okay"; + gpio = <&expgpio 5 GPIO_ACTIVE_HIGH>; + }; + + i2c0mux { + compatible = "i2c-mux-pinctrl"; + #address-cells = <1>; + #size-cells = <0>; + + i2c-parent = <&i2c0>; + + pinctrl-names = "i2c0", "i2c_csi_dsi"; + pinctrl-0 = <&i2c0_gpio0>; + pinctrl-1 = <&i2c0_gpio44>; + + i2c@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + imx219: sensor@10 { + compatible = "sony,imx219"; + reg = <0x10>; + status = "okay"; + + clocks = <&imx219_clk>; + clock-names = "xclk"; + + VANA-supply = <&cam1_reg>; /* 2.8v */ + VDIG-supply = <&imx219_vdig>; /* 1.8v */ + VDDL-supply = <&imx219_vddl>; /* 1.2v */ + + rotation = <0>; + orientation = <0>; + + port { + imx219_0: endpoint { + remote-endpoint = <&csi1_ep>; + clock-lanes = <0>; + data-lanes = <1 2>; + clock-noncontinuous; + link-frequencies = /bits/ 64 <456000000>; + }; + }; + }; + }; + }; +}; + +&csi1 { + status="okay"; + num-data-lanes = <2>; + port { + csi1_ep: endpoint { + remote-endpoint = <&imx219_0>; + data-lanes = <1 2>; + clock-lanes = <0>; + }; + }; +}; + +&i2c0 { + /delete-property/ pinctrl-names; + /delete-property/ pinctrl-0; +}; + -- 2.32.0