From patchwork Fri Apr 5 16:07:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Eichenberger X-Patchwork-Id: 13619292 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 8150BC67861 for ; Fri, 5 Apr 2024 17:20:09 +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=09cxKfNLNolzEoLJzAGOGbN5OEYkzfhU5iAZFrnwoc0=; b=kWvU4UCGgIG+d2 rg5dlqvH6z6FcBLO77uGTlzWeD+LU/Kp3dq9alEZ7wJeETsWvyJxs6HwRQbRnWH/geiFteN2sVCzw f7n5sjk5nclXaM3v9u+oZBkcxEzeINtRaS7pU92N6jndUhJa/zocufB2QQSiyOlwZtLWN1r7hjCcv 4CjtaWprFJcKYT44U8QiBNfBXTB0uHtllOoTtayN7KaGN/3adD3sIeIEcaFIUP8oRWgMo2WEOzl9S o9mqtTUFfqTe0LvT5mKGvYZ7M7Qa3OLUi8p+QpsERwCgvpnv9rgd5zPn70659I62MGGCSV3gg841e INE755EVwb3FJgh0YNUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsnEN-00000008Ck6-0ZUx; Fri, 05 Apr 2024 17:19:59 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsm6P-00000007uwk-0SeG for linux-arm-kernel@lists.infradead.org; Fri, 05 Apr 2024 16:07:43 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2d29aad15a5so21570281fa.3 for ; Fri, 05 Apr 2024 09:07:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712333258; x=1712938058; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lgmM3Xbata7VzEXtxd2ThwevKFI1uBmzRn4wOr+9OFw=; b=QYqj94OEs0mljAPJTdIq8bLXsgmL/9Dp24Qe3+YmFhunBsmPmndZSmwb+OJzlD4HwH u1+BOdnn0mf6VJX6vAfPy0O3z5+80O8Ka1JvfH2A+nKhWK0g7bMeNG/nsldVMVw/zOHk ZRwmACOE1lU4sg+NDcTHzmzZ90OFeeOqO3MP/lTlbm2iB5XYax52WgSQcouZjnVUyJcX eK71cipZySmWCF5Wff8XO5BEPM7hOva+t3VUxbu+BJzP4mzKAyPk1BwAFpW0j5TrZ+V8 WNznBkS7pvuSp3aJkyVBDqwYi/z+sTFEtE7hB6Qvfw12D1l6ZfSBIvsQnmzfKSjXRnGJ qGUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712333258; x=1712938058; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lgmM3Xbata7VzEXtxd2ThwevKFI1uBmzRn4wOr+9OFw=; b=LI3oqGY+8OZAGSYxuG9D6keNJ6pzyGYlfpolRB9A+Dvmu5UnUOuKyxm6BnpZtF7l6H /lD6bzzSP5DNoKGSUWNNwySgErFLbLk3xeeVuawWTQM/XMl6H6Wy4XJpHInLl/qHL46a 2DJXyL6KmbD9nfmiCMNWWNW+4REVE2vz0euJtGw5R3qoHDYnxOxQEpM3ETgr13sqlbJ6 02TaBgiQJwNpBPrXktGAq928mNKISgO3O96MNNW/eNVFXBggaf518xiNiXuAt6DMkjtl usT693HInXMC0wCFejLr8j+OZI9UVp0rmP7YoEKOex75i3LykwvY2DUVETWeqVGmgXlU xNig== X-Forwarded-Encrypted: i=1; AJvYcCXCTS78j5x9cWfhU8zsyeDL4RIqNUKx3aVlQ4SjYyOs9/myHyd5T+dssHWBYtwZu5Bel7w1J5lPxOZO90h6I0G7fNWSrSS+NT5pEAkt85Khuhb0wiM= X-Gm-Message-State: AOJu0Yxw66KPQcbVCSD3wDs5weTx4mZJ0r9lX0kiqbgoCz/dS0EO+l2O SAccFJRff0QDVQJ5viBKzgQaxm80Q7j9Vsiy4S7uvorvsMMu6Ux6 X-Google-Smtp-Source: AGHT+IGcCu7kSbpvYBdqwmxAjtE9WbGU1f3WKzshRVZ88A/8Ug7BCKSWBua5SkDNKu2NdPeTUB5Puw== X-Received: by 2002:a2e:9045:0:b0:2d8:681:dc9e with SMTP id n5-20020a2e9045000000b002d80681dc9emr1448379ljg.41.1712333258017; Fri, 05 Apr 2024 09:07:38 -0700 (PDT) Received: from eichest-laptop.toradex.int ([2a02:168:af72:0:f624:ad13:2091:c808]) by smtp.gmail.com with ESMTPSA id k41-20020a05600c1ca900b004156c501e24sm6902651wms.12.2024.04.05.09.07.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 09:07:36 -0700 (PDT) From: Stefan Eichenberger To: robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, francesco.dolcini@toradex.com Cc: devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Stefan Eichenberger Subject: [PATCH v1 2/4] arm64: dts: freescale: imx8mp-verdin-dahlia: support sleep-moci Date: Fri, 5 Apr 2024 18:07:18 +0200 Message-Id: <20240405160720.5977-3-eichest@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240405160720.5977-1-eichest@gmail.com> References: <20240405160720.5977-1-eichest@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240405_090741_274543_FE9F5844 X-CRM114-Status: GOOD ( 13.46 ) 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: Stefan Eichenberger Previously, we had the sleep-moci pin set to always on. However, the Dahlia carrier board supports disabling the sleep-moci when the system is suspended to power down peripherals that support it. This reduces overall power consumption. This commit adds support for this feature by disabling the reg_force_sleep_moci regulator and adding two new regulators for the USB hub and PCIe that can be turned off when the system is suspended. Signed-off-by: Stefan Eichenberger --- .../dts/freescale/imx8mp-verdin-dahlia.dtsi | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi index e68e0e6f21e9..abad1887040a 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi @@ -32,6 +32,25 @@ simple-audio-card,cpu { sound-dai = <&sai1>; }; }; + + reg_usb_hub: regulator-usb-hub { + compatible = "regulator-fixed"; + enable-active-high; + /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ + gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>; + regulator-boot-on; + regulator-name = "HUB_PWR_EN"; + }; + + reg_pcie: regulator-pcie { + compatible = "regulator-fixed"; + enable-active-high; + /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ + gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>; + regulator-boot-on; + regulator-name = "PCIE_1_PWR_EN"; + startup-delay-us = <100000>; + }; }; &backlight { @@ -117,6 +136,7 @@ wm8904_1a: audio-codec@1a { /* Verdin PCIE_1 */ &pcie { + vpcie-supply = <®_pcie>; status = "okay"; }; @@ -143,6 +163,11 @@ ®_usdhc2_vmmc { vin-supply = <®_3p3v>; }; +/* We support turning off sleep moci on Dahlia */ +®_force_sleep_moci { + status = "disabled"; +}; + /* Verdin I2S_1 */ &sai1 { assigned-clocks = <&clk IMX8MP_CLK_SAI1>; @@ -186,6 +211,25 @@ &usb3_phy1 { status = "okay"; }; +&usb_dwc3_1 { + #address-cells = <1>; + #size-cells = <0>; + + usb_hub_3_0: usb-hub@1 { + compatible = "usb424,5744"; + reg = <1>; + peer-hub = <&usb_hub_2_0>; + vdd-supply = <®_usb_hub>; + }; + + usb_hub_2_0: usb-hub@2 { + compatible = "usb424,2744"; + reg = <2>; + peer-hub = <&usb_hub_3_0>; + vdd-supply = <®_usb_hub>; + }; +}; + /* Verdin SD_1 */ &usdhc2 { status = "okay";