From patchwork Mon Jul 17 10:00:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kepplinger-Novakovic X-Patchwork-Id: 13316440 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mout02.posteo.de ([185.67.36.66]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qLL2o-003i9z-2a for linux-arm-kernel@lists.infradead.org; Mon, 17 Jul 2023 10:01:32 +0000 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 25565240107 for ; Mon, 17 Jul 2023 12:01:14 +0200 (CEST) From: Martin Kepplinger Subject: [PATCH v1 1/4] arm64: dts: imx8mq-librem5: set audio-1v8 always-on Date: Mon, 17 Jul 2023 10:00:53 +0000 Message-Id: <20230717100056.4047292-2-martink@posteo.de> In-Reply-To: <20230717100056.4047292-1-martink@posteo.de> References: <20230717100056.4047292-1-martink@posteo.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+lwn-linux-arm-kernel=archive.lwn.net@lists.infradead.org List-Archive: To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, festevam@gmail.com Cc: kernel@pengutronix.de, linux-imx@nxp.com, kernel@puri.sm, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, Martin Kepplinger From: Martin Kepplinger Unfortunately the codec can't be switched off on it's own. It would ground the whole bus it's connected to (because of it's built-in diodes to VDD on i2c pins), making all the other devices on the same bus inaccessible: [ 0.237154] lm3692x 2-0036: Cannot read/clear faults: -11 [ 0.242628] lm3692x 2-0036: Fail writing initialization values [ 0.286462] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@30800000/mipi-dsi@30a00000 to encoder None-34: -517 Work around this hardware limitation by keeping audio-1v8 enabled. Signed-off-by: Martin Kepplinger --- arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi index 38732579d13e9..ab47bdc35cebd 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi @@ -91,6 +91,7 @@ reg_aud_1v8: regulator-audio-1v8 { regulator-max-microvolt = <1800000>; gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>; enable-active-high; + regulator-always-on; }; reg_mic_2v4: regulator-mic-2v4 { From patchwork Mon Jul 17 10:00:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kepplinger-Novakovic X-Patchwork-Id: 13316438 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mout01.posteo.de ([185.67.36.65]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qLL2m-003iA2-09 for linux-arm-kernel@lists.infradead.org; Mon, 17 Jul 2023 10:01:30 +0000 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C91FC240028 for ; Mon, 17 Jul 2023 12:01:15 +0200 (CEST) From: Martin Kepplinger Subject: [PATCH v1 2/4] arm64: dts: imx8mq-librem5-r4: Bump up proximity sensor's near level Date: Mon, 17 Jul 2023 10:00:54 +0000 Message-Id: <20230717100056.4047292-3-martink@posteo.de> In-Reply-To: <20230717100056.4047292-1-martink@posteo.de> References: <20230717100056.4047292-1-martink@posteo.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+lwn-linux-arm-kernel=archive.lwn.net@lists.infradead.org List-Archive: To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, festevam@gmail.com Cc: kernel@pengutronix.de, linux-imx@nxp.com, kernel@puri.sm, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, Sebastian Krzyszkowiak , Martin Kepplinger From: Sebastian Krzyszkowiak There is at least one Evergreen phone out there that reports levels of 5-6 at rest: https://gitlab.gnome.org/GNOME/calls/-/issues/560 Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Martin Kepplinger --- arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts index 97577c0a77158..33f398b48119b 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts @@ -23,5 +23,5 @@ &lcd_panel { }; &proximity { - proximity-near-level = <5>; + proximity-near-level = <7>; }; From patchwork Mon Jul 17 10:00:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kepplinger-Novakovic X-Patchwork-Id: 13316437 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mout02.posteo.de ([185.67.36.66]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qLL2m-003iAJ-05 for linux-arm-kernel@lists.infradead.org; Mon, 17 Jul 2023 10:01:30 +0000 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 58227240101 for ; Mon, 17 Jul 2023 12:01:17 +0200 (CEST) From: Martin Kepplinger Subject: [PATCH v1 3/4] arm64: dts: imx8mq-librem5: Mark tps65982 as wakeup source Date: Mon, 17 Jul 2023 10:00:55 +0000 Message-Id: <20230717100056.4047292-4-martink@posteo.de> In-Reply-To: <20230717100056.4047292-1-martink@posteo.de> References: <20230717100056.4047292-1-martink@posteo.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+lwn-linux-arm-kernel=archive.lwn.net@lists.infradead.org List-Archive: To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, festevam@gmail.com Cc: kernel@pengutronix.de, linux-imx@nxp.com, kernel@puri.sm, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, Sebastian Krzyszkowiak , Martin Kepplinger From: Sebastian Krzyszkowiak This allows to wake up from system suspend on USB-C plug/unplug. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Martin Kepplinger --- arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi index ab47bdc35cebd..3f251910b3949 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi @@ -796,6 +796,8 @@ typec_pd: usb-pd@3f { interrupt-parent = <&gpio1>; interrupts = <10 IRQ_TYPE_LEVEL_LOW>; interrupt-names = "irq"; + extcon = <&usb3_phy0>; + wakeup-source; connector { compatible = "usb-c-connector"; From patchwork Mon Jul 17 10:00:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kepplinger-Novakovic X-Patchwork-Id: 13316441 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mout01.posteo.de ([185.67.36.65]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qLL2p-003iAN-2e for linux-arm-kernel@lists.infradead.org; Mon, 17 Jul 2023 10:01:33 +0000 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 6206224002A for ; Mon, 17 Jul 2023 12:01:19 +0200 (CEST) From: Martin Kepplinger Subject: [PATCH v1 4/4] arm64: dts: imx8mq-librem5: Reduce usdhc2's post-power-on-delay-ms to 20ms Date: Mon, 17 Jul 2023 10:00:56 +0000 Message-Id: <20230717100056.4047292-5-martink@posteo.de> In-Reply-To: <20230717100056.4047292-1-martink@posteo.de> References: <20230717100056.4047292-1-martink@posteo.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+lwn-linux-arm-kernel=archive.lwn.net@lists.infradead.org List-Archive: To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, festevam@gmail.com Cc: kernel@pengutronix.de, linux-imx@nxp.com, kernel@puri.sm, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, Sebastian Krzyszkowiak , Martin Kepplinger From: Sebastian Krzyszkowiak This appears to be enough for both Redpine and SparkLAN cards. Waiting for too long makes us waste time in resume from system suspend, so let's keep it as short as possible. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Martin Kepplinger --- arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi index 3f251910b3949..e329c29f3f1c6 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi @@ -1394,7 +1394,7 @@ &usdhc2 { bus-width = <4>; vmmc-supply = <®_wifi_3v3>; mmc-pwrseq = <&usdhc2_pwrseq>; - post-power-on-delay-ms = <1000>; + post-power-on-delay-ms = <20>; cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; max-frequency = <100000000>; disable-wp;