arm64: dts: freescale: imx8mm-verdin: replace sleep-moci hog with regulator

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 <stefan.eichenberger@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
This commit is contained in:
Stefan Eichenberger 2024-04-05 18:07:19 +02:00 committed by Shawn Guo
parent 25b3af5395
commit 9f06926ef1
4 changed files with 31 additions and 10 deletions

View File

@ -58,6 +58,11 @@
status = "okay"; status = "okay";
}; };
&gpio5 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ctrl_sleep_moci>;
};
/* Current measurement into module VCC */ /* Current measurement into module VCC */
&hwmon { &hwmon {
status = "okay"; status = "okay";

View File

@ -78,6 +78,11 @@
status = "okay"; status = "okay";
}; };
&gpio5 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ctrl_sleep_moci>;
};
&gpio_expander_21 { &gpio_expander_21 {
status = "okay"; status = "okay";
}; };

View File

@ -81,6 +81,11 @@
pinctrl-0 = <&pinctrl_gpios_ext_yavia>; pinctrl-0 = <&pinctrl_gpios_ext_yavia>;
}; };
&gpio5 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ctrl_sleep_moci>;
};
&hwmon_temp { &hwmon_temp {
status = "okay"; status = "okay";
}; };

View File

@ -110,6 +110,22 @@
startup-delay-us = <200000>; 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 { reg_usb_otg1_vbus: regulator-usb-otg1 {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
enable-active-high; enable-active-high;
@ -333,16 +349,6 @@
"SODIMM_212", "SODIMM_212",
"SODIMM_151", "SODIMM_151",
"SODIMM_153"; "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 */ /* On-module I2C */