Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1662868pxb; Thu, 4 Nov 2021 06:26:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzkdM3OgOkGzwAYHAA4vxDKtcdB0zKaJa+/JlQEKQUNkEq0zBe82Ad9T6HHVXaCi1J1x9/ X-Received: by 2002:a5d:9918:: with SMTP id x24mr35792070iol.51.1636032404308; Thu, 04 Nov 2021 06:26:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636032404; cv=none; d=google.com; s=arc-20160816; b=oZogK8tZK8cCb9Jl5YJsdQOtSxnDWvVx05ZX+etFILdzFrMbhpI0i/AkF7EktPoMjl OzapjJ5QDQbe9rLGLBzbLlCky8NkTMnsksxebDlUuPWW4w5utp3RnHbgsJ3sc3TXXQYu +MFmrMtIgtwonfce6/5O2O8zcLT9v7YuFAv55MtM1yiXFZ989nC6sQD1iw1SZwQOjurT nKtt0YW1eIL98d+G/TQxUIErjoeGW0D+Pg3hjgdTFumoPdfKOui01HqbeLs8x3vTXGoW tCs5daJV2dpXs/nUhDReATkpcVpGD2K0rK6qoDokj32DlnEwxJEAcjbVSD5kZWADKMtt kw+g== 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; bh=1ynJN9yRkDKzyE1uU6dk0gRdaUgptrdNA7RbDEekWxc=; b=nafc56kjsix3qODc+47PWavfYZ1hJfXCoE+IKdQMIzVFvlvy5nepZNG3tnubFFG2VH /ly8CZ8ffBBEI7D2QRBZAsKeK7+p9toMFxsa1JvkXF2R5rlBwXEF63wJVaYnKHedu519 iqi+9EQKSxLSjLF+6HxiutWSaLfXFrNENOtclCTBy8lQGyvqAA8NkU0vunbS8Iefnso2 MumjB9y0RW2dqqSl2/rk4+bH9MDNkLaGUWlnH6ODUPIUNGXx4qcKf8BAWA6yPPC+In2R xbMTqXlBT0pdHnulUz2hKVBKP1/lBLDuLJsbRascy5z3VRam9seq11nz6AuIb4Zi6Jvp bddQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k4si10171259ilo.15.2021.11.04.06.26.30; Thu, 04 Nov 2021 06:26:44 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231636AbhKDN0u (ORCPT + 99 others); Thu, 4 Nov 2021 09:26:50 -0400 Received: from comms.puri.sm ([159.203.221.185]:42324 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231340AbhKDN0s (ORCPT ); Thu, 4 Nov 2021 09:26:48 -0400 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 95ED3DFE44; Thu, 4 Nov 2021 06:23:40 -0700 (PDT) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Gsss55MNO2vf; Thu, 4 Nov 2021 06:23:39 -0700 (PDT) From: Martin Kepplinger To: festevam@gmail.com, shawnguo@kernel.org Cc: martin.kepplinger@puri.sm, devicetree@vger.kernel.org, kernel@pengutronix.de, kernel@puri.sm, krzk@kernel.org, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, robh@kernel.org Subject: [PATCH v1 2/4] arm64: dts: imx8mq-librem5: describe power supply for cameras Date: Thu, 4 Nov 2021 14:22:11 +0100 Message-Id: <20211104132213.470498-3-martin.kepplinger@puri.sm> In-Reply-To: <20211104132213.470498-1-martin.kepplinger@puri.sm> References: <20211104132213.470498-1-martin.kepplinger@puri.sm> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CAMERA_PWR_EN controls two different power supplies that cameras will use. The hardware killswitch controls a third one. Describe that appropriately. The pinctrl that describes the gpio that is used in 2 places here is added to the pmic. This is done because pmic is powered early enough to make sure this will work. When we would have put the same pinctrl property into the 2 regulator nodes (instead of the pmic), we'd get: imx8mq-pinctrl 30330000.pinctrl: pin MX8MQ_IOMUXC_GPIO1_IO00 already requested by regulator-csi-1v8; cannot claim for regulator-vcam-2v8 imx8mq-pinctrl 30330000.pinctrl: pin-10 (regulator-vcam-2v8) status -22 imx8mq-pinctrl 30330000.pinctrl: could not request pin 10 (MX8MQ_IOMUXC_GPIO1_IO00) from group camerapwrgrp on device 30330000.pinctrl Signed-off-by: Martin Kepplinger --- .../boot/dts/freescale/imx8mq-librem5.dtsi | 50 ++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi index 60d47c71499b..5541e1d2ec6f 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi @@ -62,6 +62,40 @@ reg_aud_1v8: regulator-audio-1v8 { enable-active-high; }; + /* + * the pinctrl for reg_csi_1v8 and reg_vcam_1v8 is added to the PMIC + * since we can't have it twice in the 2 different regulator nodes. + */ + reg_csi_1v8: regulator-csi-1v8 { + compatible = "regulator-fixed"; + regulator-name = "CAMERA_VDDIO_1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <®_vdd_3v3>; + gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + /* controlled by the CAMERA_POWER_KEY HKS */ + reg_vcam_1v2: regulator-vcam-1v2 { + compatible = "regulator-fixed"; + regulator-name = "CAMERA_VDDD_1V2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + vin-supply = <®_vdd_1v8>; + enable-active-high; + }; + + reg_vcam_2v8: regulator-vcam-2v8 { + compatible = "regulator-fixed"; + regulator-name = "CAMERA_VDDA_2V8"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + vin-supply = <®_vdd_3v3>; + gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + reg_gnss: regulator-gnss { compatible = "regulator-fixed"; pinctrl-names = "default"; @@ -329,6 +363,20 @@ MX8MQ_IOMUXC_SAI5_MCLK_GPIO3_IO25 0x83 >; }; + pinctrl_camera_pwr: camerapwrgrp { + fsl,pins = < + /* CAMERA_PWR_EN_3V3 */ + MX8MQ_IOMUXC_GPIO1_IO00_GPIO1_IO0 0x83 + >; + }; + + pinctrl_csi1: csi1grp { + fsl,pins = < + /* CSI1_NRST */ + MX8MQ_IOMUXC_ENET_RXC_GPIO1_IO25 0x83 + >; + }; + pinctrl_charger_in: chargeringrp { fsl,pins = < /* CHRG_INT */ @@ -725,7 +773,7 @@ pmic: pmic@4b { compatible = "rohm,bd71837"; reg = <0x4b>; pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_pmic>; + pinctrl-0 = <&pinctrl_pmic>, <&pinctrl_camera_pwr>; clocks = <&pmic_osc>; clock-names = "osc"; clock-output-names = "pmic_clk"; -- 2.30.2