From patchwork Wed Aug 31 08:02:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kepplinger X-Patchwork-Id: 12960500 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2C4CCECAAD1 for ; Wed, 31 Aug 2022 08:09:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QhlCwF/WHxqMztTQyuZX3VR7wATeQO6o2/egEL8RMfE=; b=GZ8LJLct9660L3 gLLI/K5DYQn9eAenNEcCXJoLZ1dLexAqZScSD0EYGj/epIYzvGnP3F2n3WBgsaybU8nRvJKAMRp63 EiJ0UhUiUaletVmKBe2uPkLy7xLdoP0RviiSpSqF6EclrQT0ViJYXcgm5PPRGJfAigwNiLoVOuCle +rBQj4PsZvSLaS5TJx+3Hj3DCR7EY8281EzoUhJ+8eOrjibWAHPKVmW/RT3zOO8PndajNRJUARZ9p i9zGgikkVPO4A0zm6e6xLlYXHSDYl9wMycuAVbE/cpnl+A78Cvc0IexdFw88DDgrQuqdcWz2Rdmg0 5nd/7YqanRVnctyWhUxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTIlp-004oig-2G; Wed, 31 Aug 2022 08:08:22 +0000 Received: from comms.puri.sm ([159.203.221.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTIhF-004mrn-GB for linux-arm-kernel@lists.infradead.org; Wed, 31 Aug 2022 08:03:42 +0000 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id C8770DF6D2; Wed, 31 Aug 2022 01:03:30 -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 Dp67oS9Wm6KH; Wed, 31 Aug 2022 01:03:30 -0700 (PDT) From: Martin Kepplinger DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=puri.sm; s=comms; t=1661933010; bh=yaZZI5m921+EyANDEcdH4Vsbrq6CyoF91jveOMdpW9Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q4BdqsmOdXvCkyS4IHTVAWMXjhMNfB6SrDRbYIyTq3AJFB85ij6yn+c0/Nj5CkXl9 2yXOF4/HzDUfYH0tgj0Ocz4LxdFS5osoMMd5Fd279bWllj0DR3ZNgx964PxU9TSHzn kR37teHWkQrckZgn9jTRQDZ87G6sN7X+MNrLfgQj7CufKXnNGsnZaeDObLdj57YVeA hop9g72A8OfD+XcfnBjWPm6I+9ii7TIE0DQWTlWIVWuWCpRuRXQxtq/O8SeByf1yXg GWzhq1PXyzzCsi+IAfCTrY8s71IIpUl3Fatqq7qdh2jZEaR8yYPszxFoxPUGafKjX9 kBOh/2srCxJ6Q== 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 1/5] arm64: dts: imx8mq-librem5: describe the voice coil motor for focus control Date: Wed, 31 Aug 2022 10:02:57 +0200 Message-Id: <20220831080301.1092737-2-martin.kepplinger@puri.sm> In-Reply-To: <20220831080301.1092737-1-martin.kepplinger@puri.sm> References: <20220831080301.1092737-1-martin.kepplinger@puri.sm> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220831_010337_632749_A0B961C5 X-CRM114-Status: UNSURE ( 9.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Describe the focus motor that will be used for the rear camera - even though the rear camera sensor driver is not yet in the mainline. The focus motor is a separate device and can be controlled already. Signed-off-by: Martin Kepplinger --- arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi index 9eec8a7eecfc8..0626e4194d958 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi @@ -1070,6 +1070,12 @@ &i2c4 { pinctrl-0 = <&pinctrl_i2c4>; status = "okay"; + vcm@c { + compatible = "dongwoon,dw9714"; + reg = <0x0c>; + vcc-supply = <®_csi_1v8>; + }; + bat: fuel-gauge@36 { compatible = "maxim,max17055"; reg = <0x36>; From patchwork Wed Aug 31 08:02:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Kepplinger X-Patchwork-Id: 12960506 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 35E91ECAAD3 for ; Wed, 31 Aug 2022 08:12:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+IwuTHCjsypazncn4yEt426Ehchlrhlzqhts6aW5CC4=; b=QJiKn0PGnevdhA gChyOK2i/rlAxvMIURCcL1gBan9aHe7ag34sOglR2ZjiJTvigo/qTkWQUjh2B9l/2lqm26+wRTMj1 js+NY24ST5HcEYkZtlj91UguJWaBKrCyiRyJ0/g7Stg5b+HCi2mz22kYPOawo7HyH7Vfh6MLPeUZ0 tMmr91/uivZ1Qo92IPODoxi+UTRXQkjOP/ac2PasFdXEdb2Ju2TgSWjXrLAYDb3LnD70/vCwE0hSt yE3uJNR4RhPwWUZIsQSlwkw74CGaDWIJ08qOjY52Ok/G/NUBweSffhw0WZxjgULlibJ3EolLx8ZIx A/T+up2WCawpeQSn2oGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTIoS-004pYm-UG; Wed, 31 Aug 2022 08:11:05 +0000 Received: from comms.puri.sm ([159.203.221.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTIhF-004mrl-9q for linux-arm-kernel@lists.infradead.org; Wed, 31 Aug 2022 08:03:42 +0000 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id CAF5EDF5D1; Wed, 31 Aug 2022 01:03:33 -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 eHVmjyzaFMHl; Wed, 31 Aug 2022 01:03:33 -0700 (PDT) From: Martin Kepplinger DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=puri.sm; s=comms; t=1661933013; bh=7qHCaOfhLwiXbXUxRw2B/DGm0lbeC8SuRRq3JSV3d7o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gMWhbEiZzi7b6oOqzzFXS7btCUFRKtoEJoJZNhU0briwOSdg/jmeuWPwgl4G3+RzU z5FhcC122drJ1Ym5hMvnR0hV5QU4Z31AFJNcG9QWmFlwelcGHRS0h/jfUJ877Px+DN fhpiayvTxieHo/9WqgVPknAwFWY8ft0GHAXTWcB11iyBoOBRYt6shzwjXQM6JYBq4o nEAwK4jMmbkKvGT4pOI+WQUBTd5ix9yPopjwi8EcvbkZH95m0Dufe2r8dYJ8h98jA/ HYL0Xv1eu54Ri0vVR+o/98hPbSJeRTP8DPxSsD7NNcQ37Sg/pGJX/RzGaVjz807SSM TQxQKV6pbWLjQ== 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, =?utf-8?q?Guido_G=C3=BCnther?= Subject: [PATCH v1 2/5] arm64: dts: imx8mq-librem5: add RGB pwmleds Date: Wed, 31 Aug 2022 10:02:58 +0200 Message-Id: <20220831080301.1092737-3-martin.kepplinger@puri.sm> In-Reply-To: <20220831080301.1092737-1-martin.kepplinger@puri.sm> References: <20220831080301.1092737-1-martin.kepplinger@puri.sm> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220831_010337_496912_ABA082B0 X-CRM114-Status: UNSURE ( 9.02 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Guido Günther Describe the RGB notification leds on the Librem 5 phone. Use the common defines so we're sure to adhere to the common patterns, use predefined led colors and functions so we're being warned in case of deprecations. Signed-off-by: Guido Günther Signed-off-by: Martin Kepplinger --- .../boot/dts/freescale/imx8mq-librem5.dtsi | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi index 0626e4194d958..bbf49e419b498 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi @@ -7,6 +7,7 @@ #include "dt-bindings/input/input.h" #include +#include #include "dt-bindings/pwm/pwm.h" #include "dt-bindings/usb/pd.h" #include "imx8mq.dtsi" @@ -54,6 +55,31 @@ key-vol-up { }; }; + pwmleds { + compatible = "pwm-leds"; + + blue { + function = LED_FUNCTION_STATUS; + color = ; + max-brightness = <248>; + pwms = <&pwm2 0 50000 0>; + }; + + green { + function = LED_FUNCTION_STATUS; + color = ; + max-brightness = <248>; + pwms = <&pwm4 0 50000 0>; + }; + + red { + function = LED_FUNCTION_STATUS; + color = ; + max-brightness = <248>; + pwms = <&pwm3 0 50000 0>; + }; + }; + reg_aud_1v8: regulator-audio-1v8 { compatible = "regulator-fixed"; pinctrl-names = "default"; From patchwork Wed Aug 31 08:02:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kepplinger X-Patchwork-Id: 12960501 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DEBC8ECAAD3 for ; Wed, 31 Aug 2022 08:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0+bqlL+31SdJI5+Ddu+qOMZao+eW61EnGQw2IPbSMSM=; b=Jwp1UdvncmD7iJ t+5QixeICYoNzNcxazxBB/9NZc58Y8q2gPkAhZ0Q+yvuvSeei5s8EU2m/r2C7DGCa3SQH4ynPxxIM xz0XgiZCHc6wlOk8pcp+e/Ob7ytLaKhNZ8BjQWFIkm144EeIC38hxdnFKqNNkiaO0tYLciB6OvVw+ +Wa1gxiMvej1OrYnNwaR7ggUNyi+Z9W1oRh9ZJ8BbZIO5Mcmkbh0UQ87nnCVtOCz4ChH30ywm8K7o JiHSlprGJ27nVJiO3wQY55gTmASWDLUcZlyxJ8485faA/d7WVqkEXegB4sUeoyshq8rcZoYA5G1n3 zHhh+kS8hXlaG4JDppfQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTInO-004pGY-3k; Wed, 31 Aug 2022 08:09:59 +0000 Received: from comms.puri.sm ([159.203.221.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTIhF-004mtp-9x for linux-arm-kernel@lists.infradead.org; Wed, 31 Aug 2022 08:03:42 +0000 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id C1DD2DF774; Wed, 31 Aug 2022 01:03:36 -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 pTixk_d-HRmK; Wed, 31 Aug 2022 01:03:36 -0700 (PDT) From: Martin Kepplinger DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=puri.sm; s=comms; t=1661933016; bh=vrU6a0X2Tj3PoMyyepXVXDWrv/gf3VSv27chaSDREEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zlc4XckiQK5J46QGyxGbDyudSTjq6MD1FOYfaFyZup0y3G9fJXJrN/NBLCXg/UQYm EVgqr0gSsBWCSVuesLPYWT7u0KdSzflAr/cniilRb2upr87cA1t0llyPNBdVICpKnN au9msbW4Kll1KcqZ9nC97riuuxjK9QOAN101NgrPwaPbHRSinNG7wvRpl805NjF1kG SQcbYG0s8it7TSy3t2ROQiADRqI4MU6/oNpZdaIhsO3Vb8zxQvLgQyZpyBWOyO9Idh pyg/732XoqX7WKIv7h0rtXlHGU8LJ9Mr9VjCv5cP9nqDPn3WCZ9/8XjvmCOaDzqkVK ZW8hQizGoEeoQ== 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, Sebastian Krzyszkowiak Subject: [PATCH v1 3/5] arm64: dts: imx8mq-librem5: Add bq25895 as max17055's power supply Date: Wed, 31 Aug 2022 10:02:59 +0200 Message-Id: <20220831080301.1092737-4-martin.kepplinger@puri.sm> In-Reply-To: <20220831080301.1092737-1-martin.kepplinger@puri.sm> References: <20220831080301.1092737-1-martin.kepplinger@puri.sm> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220831_010337_435598_DE3D1D39 X-CRM114-Status: UNSURE ( 7.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Sebastian Krzyszkowiak This allows the userspace to notice that there's not enough current provided to charge the battery, and also fixes issues with 0% SOC values being considered invalid. Signed-off-by: Sebastian Krzyszkowiak 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 bbf49e419b498..996930d72d209 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi @@ -1109,6 +1109,7 @@ bat: fuel-gauge@36 { interrupts = <20 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gauge>; + power-supplies = <&bq25895>; maxim,over-heat-temp = <700>; maxim,over-volt = <4500>; maxim,rsns-microohm = <5000>; From patchwork Wed Aug 31 08:03:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kepplinger X-Patchwork-Id: 12960509 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04B9BECAAD3 for ; Wed, 31 Aug 2022 08:15:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/P8bUSW3UF39BNpvfZEgKgaGoJgg8Q4vsjNxTsQO54E=; b=02URupJJynCjMI EZ6qm4RzoDu0Uoc2VHlNk75qy9fI4fVjMZ0gsbIiM2U2nybWLLZqTuTIaqkAzzbQ+QYvNjDwijtJy T+Qa4buoaldjTIAxb++raHTCSXD/KUWrTjBJWvuMIycUdxFgHqyAvUMrewBOHPdvBwA7UI4FxGRp1 ta1Qrp0Df42qjYQ/IszBwtAWu1e1dPG1ycpc+sjyH+0n/+c9wFxY0pcZqgTnnuGJUpkRsntZTWAho aH7fugsl1PnsfG3AjFAs0xC6oxYj8oSCjjTRumF9JNi+3R3p04t9upAI+BxZog4E8ZjYd8vXPekvp QMserJp+vqRmNhkVlF9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTIrX-004qjW-6d; Wed, 31 Aug 2022 08:14:15 +0000 Received: from comms.puri.sm ([159.203.221.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTIhm-004n8f-0E for linux-arm-kernel@lists.infradead.org; Wed, 31 Aug 2022 08:04:14 +0000 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id C8533DF7B9; Wed, 31 Aug 2022 01:03:39 -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 NOHJfuXF6lx0; Wed, 31 Aug 2022 01:03:39 -0700 (PDT) From: Martin Kepplinger DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=puri.sm; s=comms; t=1661933019; bh=DQ/1CIw/oRT/yUMubPfJpRx1jO/PQf/biyb80OqjBJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SG1iU1elUMM+QptXN2jE4eC1tK1riPbTd+IC5o9p4/nlRI6mGFU/B/aFMbEhBfyjW 7UhChIxdzbbO7WFg+/igCv0TauSSpBzbIuY2iHBsHha8u17r1DTm2qKbIMMI0NzqkF mjIXOadbrhwdOVnTQaQsMGsCc7Oe+j3MJK0Klj2q5kZ3e7D7tk4wacyNo/9bbrb2F/ 5m0NOeuuc8agqGTO0MVT987CE9EIhBr1lb7BVYM881oCZusi9PRAVJSRZqfiy6wp24 6GIeseCS99nzoWHz6y/316gtN3lHPLqDRHfkZ3LQKp7p0fuYVwfG3vW4fA0kOOBJki OpvWOmX/cN60g== 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, Angus Ainslie Subject: [PATCH v1 4/5] arm64: dts: imx8mq-librem5: add USB type-c properties for role switching Date: Wed, 31 Aug 2022 10:03:00 +0200 Message-Id: <20220831080301.1092737-5-martin.kepplinger@puri.sm> In-Reply-To: <20220831080301.1092737-1-martin.kepplinger@puri.sm> References: <20220831080301.1092737-1-martin.kepplinger@puri.sm> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220831_010410_099042_522CABDB X-CRM114-Status: UNSURE ( 8.51 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Angus Ainslie Add the connector properties to the USB type-c stanza to enable (PD) role-switching on the Librem 5 phone. Signed-off-by: Angus Ainslie Signed-off-by: Martin Kepplinger --- arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi index 996930d72d209..d5c7c35d2e85f 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi @@ -773,6 +773,10 @@ typec_pd: usb-pd@3f { interrupt-names = "irq"; connector { + compatible = "usb-c-connector"; + label = "USB-C"; + data-role = "dual"; + ports { #address-cells = <1>; #size-cells = <0>; From patchwork Wed Aug 31 08:03:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kepplinger X-Patchwork-Id: 12960508 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 71BBAECAAD1 for ; Wed, 31 Aug 2022 08:14:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rGApeL2gdP32LhSKTebi41KxXmuiZlgSsX08WjDgLds=; b=dSYWxvaiAS/U27 HJL23R1GuRvmlEZUIrQXdZx5CVCMmlSE04BwkQ/XFEM5QD3J0noSbwz2dkr3fOzHZlqTfOW9gQiea 3wpgOPwarkhq4ACONog9vnTTvHYPNOOCfmXSK/pzU+byQcDaG4xvSKG1IEtCRfizrVAONJrve7dmN Zm6WE/KVp2tOdBZ7I1SC1Hj1F28U8Q2ofaH5XXUmagJ7KTpi32/EGwXePAMQpBtw+BzQddgXGeH24 L0GWbsVAeCCjnim2C/YnAFr9XaSkhZCo3xEkQ1NIwii3CVO9vmQfYRG/TUEasXLolrykHGV4N7PhQ tfB9MywP3uF/N2R1gojA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTIqh-004qKt-Hc; Wed, 31 Aug 2022 08:13:24 +0000 Received: from comms.puri.sm ([159.203.221.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTIhL-004mxV-GP for linux-arm-kernel@lists.infradead.org; Wed, 31 Aug 2022 08:03:44 +0000 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id DBE8EDF8D9; Wed, 31 Aug 2022 01:03:42 -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 HoFfwWJ9Hs3T; Wed, 31 Aug 2022 01:03:42 -0700 (PDT) From: Martin Kepplinger DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=puri.sm; s=comms; t=1661933022; bh=pTAM1GG6G97KUgnlgXB/M7yFHEvP6eRofoU5RlNqxKM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DRbLYS6OJx6shFzLIrYUFTZtfUFEPfnMa8+PbfRdSKLzinAbkNEz5gtFf2yxhlW+g W4Uiw9YjLga3qQvf609FRTudkrJJm0LRGUlpcSpY12VFCJ8tRARz72yjqMt5xhWf50 G86nH9ClvaHXqz/FiMNdg873VidJjMMhF0skSMnFQDvyIfYqo32dKBys2whykDmoue 3c0HvYbmRWf86PAhGB6ivTJgr4Jcfi1iDY6s+ruU5GS/dmLGfy/R3yV1fFetnBZH41 UTU1zIeXOPY3UmYIQZyDpaWgOsVjrGbmQQNumLfDvub85LuxZrKX6vdEBTNKITW0GF B0J1s/NS1aC3g== 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, Angus Ainslie Subject: [PATCH v1 5/5] arm64: dts: imx8mq-librem5: add usb-role-switch property to dwc3 Date: Wed, 31 Aug 2022 10:03:01 +0200 Message-Id: <20220831080301.1092737-6-martin.kepplinger@puri.sm> In-Reply-To: <20220831080301.1092737-1-martin.kepplinger@puri.sm> References: <20220831080301.1092737-1-martin.kepplinger@puri.sm> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220831_010343_635430_03952B64 X-CRM114-Status: UNSURE ( 7.70 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Angus Ainslie In order to enable (PD and data) role switching on the Librem 5 phone, add the usb-role-switch property to imx8mq's dwc3 node. Signed-off-by: Angus Ainslie 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 d5c7c35d2e85f..e685a636ca6c4 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi @@ -1302,6 +1302,7 @@ &usb_dwc3_0 { #size-cells = <0>; dr_mode = "otg"; snps,dis_u3_susphy_quirk; + usb-role-switch; status = "okay"; port@0 {