From patchwork Fri Apr 5 16:07:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Eichenberger X-Patchwork-Id: 13619255 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 E876ECD11C2 for ; Fri, 5 Apr 2024 16:08:16 +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=jAylFDaJTZZJaxbAwq+NKpLZWVQGGH/gOQit8T3go20=; b=omQiLCUXrBBmww svoci2SgjM7JBPaUMo89DCYo9h7EpJ19Nr3DC2AdPoW8woxw1GDWHzTeqyWN4F+fLDrgx5edHlQ2P cciF/XtO0Ya3NXDHbgBMaZg4t03c24GKkgIX2Q7CT/meC34HXsAMurBTOY1CY1PWD3B4ChSVQuSwp Bg0Vg5iGxXofsfUEqdqPxpbwt2ZjuzyaXmj7kQ8QvQZOWt7bxzk/q/NfvutmZi7nOit8nzQr4cMiO ABiDKFrWKmeqphh3JPuDc1eFosNMlnNswIbjehh6bkqR/l9a6dHhliRlHwCBTy8mxdghVoGrBnzqD QPEUdFxySqHeV6dnMyPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsm6k-00000007vAO-1ZcA; Fri, 05 Apr 2024 16:08:02 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsm6V-00000007uyq-1q1R for linux-arm-kernel@lists.infradead.org; Fri, 05 Apr 2024 16:07:49 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-41627acfd03so15066935e9.3 for ; Fri, 05 Apr 2024 09:07:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712333262; x=1712938062; 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=rWZ/UFU9OUajltHDRCM2CeH0LshCjJsNLCkamYUQgwY=; b=S4Pqw+43AS7Hz6DRcizP2ZHtwGvfPv71teddtc0O8MqaRrrZTM7iw/l0sFavMH94NJ 77SZPpI6Lu/3gxTHy4eydTOJ2vvxE8nHflP7D4hHUJ8lF5GMCNDoMMg5+b07+5h71H6f g7GCof82PSGGeCBV1J60lsh5FD901YrGxFWY+zd4UlfWSZrUoHmz7+6jfCZaNK39AIsZ e5OKcwxEPeiKVyFlArCWJNpidzGJuH5MGon1Zmt0eZ24zS1zPvcN1hox2cbQba2daCAV Yrkj1AfJoa9acRmGXE7cuCuqahESquKhd4hUBOTFc2+QWoQw8iruDON0rEYZSrhudFK9 K7Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712333262; x=1712938062; 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=rWZ/UFU9OUajltHDRCM2CeH0LshCjJsNLCkamYUQgwY=; b=C33YIpadDcnNVp2vmwhCjc06zCY1WqTZM2ckj6u59Uim8Aw6CALspfTDS860BajRgd Sg62hj55WJviC8bsQzMJ06VmWDP1Mxh52o6uNH/4wNOXvqtNuXch5vws19AUJSaAjRov PKBDJ6K8MfyeLeknCD6wLMPprFaVVD4rHmuVS+tIhPhOKezQlTuFRtnC/sHVXvzhZuqU 2/omN7sOpWONDCRlDkVJ1axqY/d1rGY6YWX5+Df0x7P4kLdL6EbZr3cUgngk5kHyDjKu UHU+WfpIe+ELRtWntnH5efV+EPRqseB06N2OM1T6CvxErRuI3B3FxMNYAUeJstKft6Go 3jFw== X-Forwarded-Encrypted: i=1; AJvYcCWqPJDF5rUxB+oAsywLw+eCgkZncU2LF1Ufy5hSEAv3iM4iYTZ+6eRMFcTKE6IoE0MkBd1roB+vkG0miCNrsMfy66kM0myKTbqSU2e5m9SqO0FHNWA= X-Gm-Message-State: AOJu0YwfDjgGxN3m3JToqijYAOB/h6r/ke/Zb6Ye4fRQfu8fb6LYTrVl sMb2/v7eP1H6ytb51D4ahF/wUJ/Y/Idl/QxlyBRHpz/oUzNqeehT X-Google-Smtp-Source: AGHT+IEIEeAONGwQhGeJMxNS3GD/dJh0uPbqMERZziPL6q1ylU9BP4frM9EsEdBFmc2rYLQVFaQ9+g== X-Received: by 2002:a05:600c:1e13:b0:416:3326:c150 with SMTP id ay19-20020a05600c1e1300b004163326c150mr440524wmb.29.1712333261663; Fri, 05 Apr 2024 09:07:41 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 09:07:40 -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 4/4] arm64: dts: freescale: imx8mm-verdin-dahlia: support sleep-moci Date: Fri, 5 Apr 2024 18:07:20 +0200 Message-Id: <20240405160720.5977-5-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_090747_618766_F9B40C2C X-CRM114-Status: GOOD ( 13.69 ) 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 Reviewed-by: Francesco Dolcini --- .../dts/freescale/imx8mm-verdin-dahlia.dtsi | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-verdin-dahlia.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-verdin-dahlia.dtsi index b64dac4f29c2..393fc9e20423 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-verdin-dahlia.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-verdin-dahlia.dtsi @@ -32,6 +32,25 @@ simple-audio-card,cpu { sound-dai = <&sai2>; }; }; + + reg_usb_hub: regulator-usb-hub { + compatible = "regulator-fixed"; + enable-active-high; + /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ + gpio = <&gpio5 1 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 = <&gpio5 1 GPIO_ACTIVE_HIGH>; + regulator-boot-on; + regulator-name = "PCIE_1_PWR_EN"; + startup-delay-us = <100000>; + }; }; /* Verdin SPI_1 */ @@ -98,6 +117,7 @@ wm8904_1a: audio-codec@1a { /* Verdin PCIE_1 */ &pcie0 { + vpcie-supply = <®_pcie>; status = "okay"; }; @@ -120,6 +140,11 @@ &pwm3 { status = "okay"; }; +/* We support turning off sleep moci on Dahlia */ +®_force_sleep_moci { + status = "disabled"; +}; + /* Verdin I2S_1 */ &sai2 { status = "okay"; @@ -148,8 +173,16 @@ &usbotg1 { /* Verdin USB_2 */ &usbotg2 { + #address-cells = <1>; + #size-cells = <0>; disable-over-current; status = "okay"; + + usb-hub@1 { + compatible = "usb424,2744"; + reg = <1>; + vdd-supply = <®_usb_hub>; + }; }; /* Verdin SD_1 */