Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp1124132rdf; Wed, 22 Nov 2023 06:18:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IGR40d1yhOM+v9rjtVRR8u+zuBoqtSCZT+8k6XaPOd59krb7Wsh4G2FOD5eUz6eXO943cLK X-Received: by 2002:a05:6a00:2450:b0:6be:1f19:e604 with SMTP id d16-20020a056a00245000b006be1f19e604mr3015719pfj.21.1700662685592; Wed, 22 Nov 2023 06:18:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700662685; cv=none; d=google.com; s=arc-20160816; b=W6aZ+zlQH8JmREDfW7OuWYjR0foc9rFXf2EIB3rHrtgnYVjiJUW8Md+jUDtqT/KUAx slfANYm7q5kpjq2TxgjDCIz4LsC4/tr8AvqZMsd7FnnUsm/QBQFpY/gRlv9VB6ov224U BdpU+ZPRVDuX+0T5GrXYMy+LHnOVwNMFj80av4bn2Ne8p1pNBgnIWZaCGWOGqlXPXhKE LBJc+oKjIV3zbKkbb+9o1PFYU9LGBbEdy94PyaFU37ZUXSjsWq9AzvdsBvcy17+cl3Zl Yl/U98GrzBgagEqeDu7pflpGiw4OAYC9F7gw7oD14mvS5yHBbdrIBx/GeJMEzU7zBxDy qcPg== 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=RMUiNYYrSJTJpIrbqVmKd1nt/unZDdKv9MD9/KuRjYU=; fh=PHVbIgf+UxIdrbueJ5cOSpcsisIa90hQUxmE2wscmBk=; b=n4hWgG5oRitPToumg9MSTxXnIDftQ1/ij4f0TNrSro4N+f16f5K2bQu8XCPklga6mR m9DtP622Q5x2B7ojROKib/OIQTuXHEtzgiuVoTV3SGV24cOFlnVwsb41CnG7GAIpEpsz hYnUZL9LX2MVniBrMihgJ4tyqtqk6jX1BmTuSf9nI6wwhbPzAwTYVUxHRS/B1fswk2Xo ZSZpBdLW6AUOawiYSAsbAfcEi3qXkgbKrEKm81Tw06Kq6RVEp/la2FNbzBw4Bo9pdxPb rz+MrqeYHqhHfsgZA60iVWk+jXVdI+EYMMAKAUEwfKgabwZlXaq20HJq1S904JdCPXT3 1VgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ZwSqH+8l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id y18-20020a056a00181200b006cbb7fdff10si4796449pfa.194.2023.11.22.06.18.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 06:18:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ZwSqH+8l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 9CBBF80740DE; Wed, 22 Nov 2023 06:15:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344332AbjKVOPO (ORCPT + 99 others); Wed, 22 Nov 2023 09:15:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235176AbjKVOO7 (ORCPT ); Wed, 22 Nov 2023 09:14:59 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D28F18E; Wed, 22 Nov 2023 06:14:54 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 0924DE0005; Wed, 22 Nov 2023 14:14:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700662493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RMUiNYYrSJTJpIrbqVmKd1nt/unZDdKv9MD9/KuRjYU=; b=ZwSqH+8lCJrY2dcdvuLfcyUKWscKeAFuIdhGlMmMEJhRsMlUdaxjRRhbQ34NPkIQ/qOE19 iXLRl9FZIKxlPwHGd/Ru7l9BfhiKQT0hwj5QrjHPBjOoUeENgW9/PpftveMyDsl7zVDOV6 B/raDGP1i8+aaBcNSYagiXiDRpvHkNvuaoWf+x5DZ4uIS+bNYORAh4nyO3sHuxLCDI6B11 QebxJvcY69UBGKLF1zARAUH9PT7S+hzFI7WVTWD8s3sLq84eZ228OyFTe9I+LBt7OYNknO s65gs4Lrh1xWQpS7OJgWXbEdKUJZ+RbM7aSbj/begvkf6/XOPg+sGv5TMmK2Ng== From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maxime Ripard , Laurent Pinchart , Michael Turquette , Stephen Boyd , Paul Kocialkowski Subject: [PATCH v7 7/7] ARM: dts: sun8i-a83t: Add BananaPi M3 OV8865 camera overlay Date: Wed, 22 Nov 2023 15:14:25 +0100 Message-ID: <20231122141426.329694-8-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> References: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: paul.kocialkowski@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 22 Nov 2023 06:15:54 -0800 (PST) Add an overlay supporting the OV8865 from the BananaPi Camera v3 peripheral board. The board has two sensors (OV5640 and OV8865) which cannot be supported in parallel as they share the same reset pin and the kernel currently has no support for this case. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/allwinner/Makefile | 1 + .../sun8i-a83t-bananapi-m3-camera-ov8865.dtso | 109 ++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3-camera-ov8865.dtso diff --git a/arch/arm/boot/dts/allwinner/Makefile b/arch/arm/boot/dts/allwinner/Makefile index a0a9aa6595e4..980ac88634e3 100644 --- a/arch/arm/boot/dts/allwinner/Makefile +++ b/arch/arm/boot/dts/allwinner/Makefile @@ -278,6 +278,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-a83t-allwinner-h8homlet-v2.dtb \ sun8i-a83t-bananapi-m3.dtb \ sun8i-a83t-bananapi-m3-camera-ov5640.dtbo \ + sun8i-a83t-bananapi-m3-camera-ov8865.dtbo \ sun8i-a83t-cubietruck-plus.dtb \ sun8i-a83t-tbs-a711.dtb \ sun8i-h2-plus-bananapi-m2-zero.dtb \ diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3-camera-ov8865.dtso b/arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3-camera-ov8865.dtso new file mode 100644 index 000000000000..0656ee8d4bfe --- /dev/null +++ b/arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3-camera-ov8865.dtso @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: GPL-2.0 OR X11 +/* + * Copyright 2022 Bootlin + * Author: Kévin L'hôpital + * Author: Paul Kocialkowski + */ + +/dts-v1/; +/plugin/; + +#include +#include + +&{/} { + /* + * These regulators actually have DLDO4 tied to their EN pin, which is + * described as input supply here for lack of a better representation. + * Their actual supply is PS, which is always-on. + */ + + ov8865_avdd: ov8865-avdd { + compatible = "regulator-fixed"; + regulator-name = "ov8865-avdd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + vin-supply = <®_dldo4>; + }; + + ov8865_dovdd: ov8865-dovdd { + compatible = "regulator-fixed"; + regulator-name = "ov8865-dovdd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + vin-supply = <®_dldo4>; + }; + + ov8865_dvdd: ov8865-dvdd { + compatible = "regulator-fixed"; + regulator-name = "ov8865-dvdd"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + vin-supply = <®_dldo4>; + }; +}; + +&ccu { + assigned-clocks = <&ccu CLK_CSI_MCLK>; + assigned-clock-parents = <&osc24M>; + assigned-clock-rates = <24000000>; +}; + +&csi { + status = "okay"; +}; + +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pe_pins>; + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + + ov8865: camera@36 { + compatible = "ovti,ov8865"; + reg = <0x36>; + + clocks = <&ccu CLK_CSI_MCLK>; + assigned-clocks = <&ccu CLK_CSI_MCLK>; + assigned-clock-parents = <&osc24M>; + assigned-clock-rates = <24000000>; + + avdd-supply = <&ov8865_avdd>; + dovdd-supply = <&ov8865_dovdd>; + dvdd-supply = <&ov8865_dvdd>; + + powerdown-gpios = <&pio 4 17 GPIO_ACTIVE_LOW>; /* PE17 */ + reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */ + + port { + ov8865_out_mipi_csi2: endpoint { + remote-endpoint = <&mipi_csi2_in_ov8865>; + link-frequencies = /bits/ 64 <360000000>; + data-lanes = <1 2 3 4>; + }; + }; + }; +}; + +&mipi_csi2 { + status = "okay"; +}; + +&mipi_csi2_in { + mipi_csi2_in_ov8865: endpoint { + remote-endpoint = <&ov8865_out_mipi_csi2>; + data-lanes = <1 2 3 4>; + }; +}; + +&pio { + pinctrl-names = "default"; + pinctrl-0 = <&csi_mclk_pin>; +}; + +®_dldo4 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; +}; -- 2.42.1