arm64: dts: freescale: imx8mm-verdin-dahlia: support sleep-moci
authorStefan Eichenberger <stefan.eichenberger@toradex.com>
Fri, 5 Apr 2024 16:07:20 +0000 (18:07 +0200)
committerShawn Guo <shawnguo@kernel.org>
Mon, 22 Apr 2024 04:37:02 +0000 (12:37 +0800)
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 <stefan.eichenberger@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8mm-verdin-dahlia.dtsi

index b64dac4f29c2383adc02fe1fd83c46b324c98593..393fc9e204232b06edb369aacee8f3c5dea6e59c 100644 (file)
                        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 */
 
 /* Verdin PCIE_1 */
 &pcie0 {
+       vpcie-supply = <&reg_pcie>;
        status = "okay";
 };
 
        status = "okay";
 };
 
+/* We support turning off sleep moci on Dahlia */
+&reg_force_sleep_moci {
+       status = "disabled";
+};
+
 /* Verdin I2S_1 */
 &sai2 {
        status = "okay";
 
 /* 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 = <&reg_usb_hub>;
+       };
 };
 
 /* Verdin SD_1 */