From patchwork Fri Apr 5 16:07:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Eichenberger X-Patchwork-Id: 13619254 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 2D232CD1284 for ; Fri, 5 Apr 2024 16:08:04 +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=nRLcMONQ/kRo6YQm2VPd/KdG4/BDS8cSlkkllmu3f14=; b=uSkDKdlob2E9Hv 0kOLLLyZGlYH0p9jRSsRla7n9jeCylmpagNgIGVorpKtfIUO0m4L5UgRrxQEfPnyjufEWja5v5ULu DIW/fTe0ZNL5lMreLPXPEq60smPHSRraRvTLftzey0aN8jLiYUdhPOcXTbNvD8rMIl89L4OxqS+wE eaElQNd6MdlPlxM32+4xWMLQMR/NZUtecriJ1eoUwxFQ/RdhVpqyonFhkZWFSWI2HwAC50kWNjDmD l6N4Ync6+1404IOL3ToTdPijIoorhrzwPJRBwfabTv2lvpIZ1GReTF1zsUSBr43MFQ+fYmTBgBdm+ OOh7On3MDCsoQ9VKegJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsm6a-00000007v3z-0wls; Fri, 05 Apr 2024 16:07:52 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsm6T-00000007uzV-0ho7 for linux-arm-kernel@bombadil.infradead.org; Fri, 05 Apr 2024 16:07:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=qOce/01hbDzl8+x1yOJ/1AVGMenhuK+vsq/FsL52bf0=; b=SSSO0ZOw4oa69/YSc2QUJoMPnW hQLByEfO0Pt1KgERDNFKKvS3/lrAE08J5DhbtOvRYwijpI3qq3FCykQSvGa3NySUaerjX5NdgDxM2 HrDogHkCYPkUVKfZFIr6ycyehSHE/VhiNyY88Ydi3vzOIJ6fVYP9K0gijt/en40wfJ3WtbHix7kaF ahQCTpfe3UQ50MlzRJ7IBtCwbK4LouuPcIXtfGb3hwyL4ynS1u91JlKMoD6raFTmaEvVwpSdj2AWK KrofcFO3VkQp1vkaSle4y7R+K8jNQL6K8ro3Z86KwBBOYRESIEFfiUdKcZjMsM/hLjhLyq+HYiGZD FmO8H0yw==; Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsm6O-00000005j0t-2wue for linux-arm-kernel@lists.infradead.org; Fri, 05 Apr 2024 16:07:43 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4162b5ba2bbso14060325e9.1 for ; Fri, 05 Apr 2024 09:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712333256; x=1712938056; 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=qOce/01hbDzl8+x1yOJ/1AVGMenhuK+vsq/FsL52bf0=; b=Y4tbf1yPybjQHaUM7CJ6b5neiQ+M/gx4prYphsK/q9IrSwqQDjfRHhT0aMGhjZy7V8 74nBcO4ICN71J8JqkWodKb80wmdSqbabfil+ew9PqHEpf0gF6sl02HoEqYwJzxcSgrw5 1IUHlZ3C5gTO9LemW9+ZfD7Tsnv0+DRhKRi3cGnOdb63QI21pLzZ+AK0w9TTOmLkI+gX GnGWvYz7bsZ3Qedyz5g2O+apCBuLIKpOSuXVuvDyYmpGgRsi6gMiqxOy5z3n4P6qa8KN GeDeVDBV05r3W627h44RiX9tyKTZQxXulTRemEry7oLdW4WzZBT1D7q0/UhKbxtkDnBX JX6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712333256; x=1712938056; 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=qOce/01hbDzl8+x1yOJ/1AVGMenhuK+vsq/FsL52bf0=; b=h2EZA0iKtPdNysxl2vuVPL5zXKHBIFGUXf97cHEsa4ClrcjPLOVjHA4Q0QzVvXn9tm 7rGqPmAllZ8ObRdKiOqJ1hPah+k+csP6wuSA710OOg7LkcGYKcWJXLuBFAVE4m50+kKQ nhd1nDw7BeDKjgS+8dJpeEMddGjEni3i3KIkODRO7D5zZux32B6zNf1pdZcXqfAyNJ7H W4DE/4ir9USQqSJaiUCX8njmcvyErLuNJgn2nETIwsF/2SqgwrZ5oX5OE7uEHuRiyrZw iGt96R3LMY1R2aonHiu83SCJ+JdNjZLVkvzm0WHqyoAZVwVtChGFG2olUJYnL6ZL0s1H gppA== X-Forwarded-Encrypted: i=1; AJvYcCVGlVOlDbW9yGvO1QZBWoHhN9JTnhdtZrEgu+M44dbfsWl7F0s/thziJ/CPI4B2PmIOwW8gyKX8Nmx2QRzcDuh+18/jaGbmmJ3ZH7/x6hQ70OKPGbQ= X-Gm-Message-State: AOJu0YwEsqygMePKsMjI6M+MmI0eksq/kOupQCb8f0y7MmBKLhbNwLqZ br4O+t8LaQUdA8CNWU0sLMVsY/Whapi2hrLPSvjbe3XIdkoUwBuXZPuY5PBG/S8= X-Google-Smtp-Source: AGHT+IHX223U4DsZ/xQPDPFZTq5ivcV0JxX0dpOp4Q0Djfm9YV+NtF1fazKA8gfSCWvEVdck2JLcjA== X-Received: by 2002:a05:600c:3d88:b0:415:52f8:ca74 with SMTP id bi8-20020a05600c3d8800b0041552f8ca74mr1533482wmb.36.1712333256089; Fri, 05 Apr 2024 09:07:36 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 09:07:34 -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 1/4] arm64: dts: freescale: imx8mp-verdin: replace sleep-moci hog with regulator Date: Fri, 5 Apr 2024 18:07:17 +0200 Message-Id: <20240405160720.5977-2-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_170740_949486_DC350FE9 X-CRM114-Status: GOOD ( 14.94 ) 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 The Verdin family has a signal called sleep-moci which can be used to turn off peripherals on the carrier board when the SoM goes into suspend. So far we have hogged this signal, which means the peripherals are always on and it is not possible to add peripherals that depend on the sleep-moci to be on. With this change, we replace the hog with a regulator so that peripherals can add their own regulators that use the same gpio. Carrier boards that allow peripherals to be powered off in suspend can disable this regulator and implement their own regulator to control the sleep-moci. Signed-off-by: Stefan Eichenberger Reviewed-by: Francesco Dolcini --- .../dts/freescale/imx8mp-verdin-dahlia.dtsi | 5 ++++ .../boot/dts/freescale/imx8mp-verdin-dev.dtsi | 5 ++++ .../dts/freescale/imx8mp-verdin-yavia.dtsi | 5 ++++ .../boot/dts/freescale/imx8mp-verdin.dtsi | 26 ++++++++++++------- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi index 7e9e4b13b5c5..e68e0e6f21e9 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi @@ -70,6 +70,11 @@ &flexspi { status = "okay"; }; +&gpio4 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ctrl_sleep_moci>; +}; + /* Current measurement into module VCC */ &hwmon { status = "okay"; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi index a509b2b7fa85..1a2520d4d6cf 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi @@ -93,6 +93,11 @@ &flexspi { status = "okay"; }; +&gpio4 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ctrl_sleep_moci>; +}; + &gpio_expander_21 { status = "okay"; vcc-supply = <®_1p8v>; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin-yavia.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin-yavia.dtsi index db1722f0d80e..27160024d5b5 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin-yavia.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin-yavia.dtsi @@ -100,6 +100,11 @@ &flexcan1 { status = "okay"; }; +&gpio4 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ctrl_sleep_moci>; +}; + &hwmon_temp { status = "okay"; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi index faa17cbbe2fd..e523762947aa 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi @@ -116,6 +116,22 @@ reg_module_eth1phy: regulator-module-eth1phy { vin-supply = <®_vdd_3v3>; }; + /* + * By default we enable CTRL_SLEEP_MOCI#, this is required to have + * peripherals on the carrier board powered. + * If more granularity or power saving is required this can be disabled + * in the carrier board device tree files. + */ + reg_force_sleep_moci: regulator-force-sleep-moci { + compatible = "regulator-fixed"; + enable-active-high; + /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ + gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>; + regulator-always-on; + regulator-boot-on; + regulator-name = "CTRL_SLEEP_MOCI#"; + }; + reg_usb1_vbus: regulator-usb1-vbus { compatible = "regulator-fixed"; enable-active-high; @@ -439,16 +455,6 @@ &gpio4 { "SODIMM_256", "SODIMM_48", "SODIMM_44"; - - ctrl-sleep-moci-hog { - gpio-hog; - /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ - gpios = <29 GPIO_ACTIVE_HIGH>; - line-name = "CTRL_SLEEP_MOCI#"; - output-high; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_ctrl_sleep_moci>; - }; }; /* On-module I2C */ 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"; From patchwork Fri Apr 5 16:07:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Eichenberger X-Patchwork-Id: 13619253 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 11230C67861 for ; Fri, 5 Apr 2024 16:08:03 +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=EwH3zLKkQJmXhq1vMHDUCiARYEIpeU7ArZHIrRZBXE0=; b=hvhi5bvcgzDQ5c V17pyASPiPkT0s7ks8C1kFVeo9NRd6zfdPN+0O2C+gbj/5ePUYUHG8o817fH8JQjMgSO2bW1fKwIm 3ywvq8/XpHIKcOsbescj8QS2HDGWB56gND6rzeht9ASa5mkc0vkr0UhKPRjvAM5GyiFfTvLNblA9T 0icXhytmIZj/NPNJQpSUGXbufUkd7jGdsQmx88ap/CN/kgTk3quO6Nn4yzQVSCoID83ahh0/lnWuX eWPruz55aY6mWmXcTccSwxHIHIkA2cHJ9CcYMjK8BWKtUKRvauM9R3blvtSaAmrO9UkqR5QPRnrl5 LIBewT57xInlUeHg2ZPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsm6Y-00000007v2t-1EOd; Fri, 05 Apr 2024 16:07:50 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsm6Q-00000007uxZ-3HbM for linux-arm-kernel@lists.infradead.org; Fri, 05 Apr 2024 16:07:44 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4162ffb97a2so5777555e9.3 for ; Fri, 05 Apr 2024 09:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712333260; x=1712938060; 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=I6pW63QzcVFb8Z1JhQZTU0zt0MbJJ3KtnHGcQ53YARs=; b=mrTBYjauD5HEHE+D6knjWrwKDHgnOLYDNoLTKCMsQyHddBtZdAEWPxdtZFkb93Qrhi sm17tQ77aaXK3vk9CUFvp/iijh6aU1P6unUh6d9uaOuURwi4KN7TnW63ammvwahfB9kJ FS1DIbQa4LlM97JonDuA4DVUlrd0ENf9hkc1RtQIX2IF2hY5MJt4t3B8JFHoUu+mmewz PvDzwxqB8g14ESElik4CsimD4zA1C70D0AOR1XfYFSRJyE3eKjjATUK0TZjxKKAKK+o7 4376Hz6KHS1rv4UnVYk/ttqTcmnjcAQo5buWlT2gt2211g2bENr2h1mtvNZrO6M1RXPd AVDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712333260; x=1712938060; 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=I6pW63QzcVFb8Z1JhQZTU0zt0MbJJ3KtnHGcQ53YARs=; b=Wa964Wp/MBC1wUGZ2MuaZYmRLmRs2sblNEvSqGPxMYs+0L4mnMvB8f+rzbFrgs0TmW aH0k0J6u0qdFkUsqT7zWSp62YIvZsUWYRPhE5CwizNyxC0Bbu4Twg1AurYMOeo8IjmSU UfTzvQMAhh0TPGjLkCHEWw6oeX/qIwvjV9XENjMjeuCzOI5zLZhln0isX62GEuo3GQWO SJ+XFp0Re4Jj1TGwq9OWhZR0s2BhCcbXgU9ghPaeVD2jtE4lmvMga8DvFoeWqs1RqrN1 /XS20bTGvfdiGIjsUYS8CEk4WN0Oc3yU9DTpGM5cIarcdUp8iqPSdt4kM8Pd3jVB8OjG xjVw== X-Forwarded-Encrypted: i=1; AJvYcCVSJDxgRf1oNIuCrzolVlIt3F7qCYmANOd6dqdOg1iy5T//zVzcduCDO+u6pkbXj4UhOxXZZsi9hvEA0VET2jRC1dPwQECLX9Rg2j50ZTJMN3Y6jZ0= X-Gm-Message-State: AOJu0Yz5gMMJdXVQp32CPSzijIVRO08d3KC8RQxYukFcjtJNQavGejOt rcM/7SsSfqQOTwUKcSnq9NeQbX6+8ELUUP1mP7oHIQi64u/985FG X-Google-Smtp-Source: AGHT+IH+zUWXxsL8Og9UKbQxJ0DlCkaJldoLKLu4x8k64dMC7ySwdn8bowpGE2+mWbtxVMQsEct02Q== X-Received: by 2002:a05:600c:3acc:b0:413:fc09:7b19 with SMTP id d12-20020a05600c3acc00b00413fc097b19mr1449758wms.40.1712333259840; Fri, 05 Apr 2024 09:07:39 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 09:07:38 -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 3/4] arm64: dts: freescale: imx8mm-verdin: replace sleep-moci hog with regulator Date: Fri, 5 Apr 2024 18:07:19 +0200 Message-Id: <20240405160720.5977-4-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_090742_964472_87D0EE15 X-CRM114-Status: GOOD ( 15.24 ) 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 The Verdin family has a signal called sleep-moci which can be used to turn off peripherals on the carrier board when the SoM goes into suspend. So far we have hogged this signal, which means the peripherals are always on and it is not possible to add peripherals that depend on the sleep-moci to be on. With this change, we replace the hog with a regulator so that peripherals can add their own regulators that use the same gpio. Carrier boards that allow peripherals to be powered off in suspend can disable this regulator and implement their own regulator to control the sleep-moci. Signed-off-by: Stefan Eichenberger Reviewed-by: Francesco Dolcini --- .../dts/freescale/imx8mm-verdin-dahlia.dtsi | 5 ++++ .../boot/dts/freescale/imx8mm-verdin-dev.dtsi | 5 ++++ .../dts/freescale/imx8mm-verdin-yavia.dtsi | 5 ++++ .../boot/dts/freescale/imx8mm-verdin.dtsi | 26 ++++++++++++------- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-verdin-dahlia.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-verdin-dahlia.dtsi index 1cff0b829357..b64dac4f29c2 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-verdin-dahlia.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-verdin-dahlia.dtsi @@ -58,6 +58,11 @@ &flexspi { status = "okay"; }; +&gpio5 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ctrl_sleep_moci>; +}; + /* Current measurement into module VCC */ &hwmon { status = "okay"; diff --git a/arch/arm64/boot/dts/freescale/imx8mm-verdin-dev.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-verdin-dev.dtsi index 3c4b8ca125e3..95b7c9a03a23 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-verdin-dev.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-verdin-dev.dtsi @@ -78,6 +78,11 @@ &i2c3 { status = "okay"; }; +&gpio5 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ctrl_sleep_moci>; +}; + &gpio_expander_21 { status = "okay"; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mm-verdin-yavia.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-verdin-yavia.dtsi index 1e28c78e381f..763f069e8405 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-verdin-yavia.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-verdin-yavia.dtsi @@ -81,6 +81,11 @@ &gpio3 { pinctrl-0 = <&pinctrl_gpios_ext_yavia>; }; +&gpio5 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ctrl_sleep_moci>; +}; + &hwmon_temp { status = "okay"; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi index 6f0811587142..4768b05fd765 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi @@ -110,6 +110,22 @@ reg_ethphy: regulator-ethphy { startup-delay-us = <200000>; }; + /* + * By default we enable CTRL_SLEEP_MOCI#, this is required to have + * peripherals on the carrier board powered. + * If more granularity or power saving is required this can be disabled + * in the carrier board device tree files. + */ + reg_force_sleep_moci: regulator-force-sleep-moci { + compatible = "regulator-fixed"; + enable-active-high; + /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ + gpio = <&gpio5 1 GPIO_ACTIVE_HIGH>; + regulator-always-on; + regulator-boot-on; + regulator-name = "CTRL_SLEEP_MOCI#"; + }; + reg_usb_otg1_vbus: regulator-usb-otg1 { compatible = "regulator-fixed"; enable-active-high; @@ -333,16 +349,6 @@ &gpio5 { "SODIMM_212", "SODIMM_151", "SODIMM_153"; - - ctrl-sleep-moci-hog { - gpio-hog; - /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ - gpios = <1 GPIO_ACTIVE_HIGH>; - line-name = "CTRL_SLEEP_MOCI#"; - output-high; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_ctrl_sleep_moci>; - }; }; /* On-module I2C */ 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 */