arm64: dts: ti: k3-am62-verdin: add sleep-moci support
Subsystems (2)
cover arm64: dts: ti: k3-am62-verdin: add sleep-moci support
From: Stefan Eichenberger <[email protected]>
This patch series adds support for sleep-moci to the Verdin AM62 in combination with the Dahlia carrier board. sleep-moci is a GPIO that allows the system on module to turn off regulators that are not needed in suspend mode on the carrier board.
Commit ba9d3cd71f15 ("dt-bindings: usb: microchip,usb5744: Remove peer-hub as requirement") from linux-next is needed to make DTB_CHECK pass without peer-hub set for the hub on the usb1 interface.
Stefan Eichenberger (2):
arm64: dts: ti: k3-am62-verdin: replace sleep-moci hog with regulator
arm64: dts: ti: k3-am62-verdin-dahlia: support sleep-moci
.../boot/dts/ti/k3-am62-verdin-dahlia.dtsi | 22 +++++++++++++++++ arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi | 24 ++++++++++++------- 2 files changed, 38 insertions(+), 8 deletions(-)
Signature · 1 line
2.40.1
PATCH 1/2 arm64: dts: ti: k3-am62-verdin: replace sleep-moci hog with regulator
From: Stefan Eichenberger <[email protected]>
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.
--- arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +16 -8
@@ -122,6 +122,22 @@ reg_1v8_eth: regulator-1v8-eth { vin-supply = <®_1v8>; }; + /* + * 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 = <&main_gpio0 31 GPIO_ACTIVE_HIGH>; + regulator-always-on; + regulator-boot-on; + regulator-name = "CTRL_SLEEP_MOCI#"; + }; + /* Verdin SD_1 Power Supply */ reg_sdhc1_vmmc: regulator-sdhci1 { compatible = "regulator-fixed";
@@ -951,14 +967,6 @@ &main_gpio0 { "", "", ""; - - verdin_ctrl_sleep_moci: ctrl-sleep-moci-hog { - gpio-hog; - /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ - gpios = <31 GPIO_ACTIVE_HIGH>; - line-name = "CTRL_SLEEP_MOCI#"; - output-high; - }; }; &main_gpio1 {
Signature · 1 line
2.40.1
Re: [PATCH v1 1/2] arm64: dts: ti: k3-am62-verdin: replace sleep-moci hog with regulator
Quoted 12 lines · Stefan Eichenberger
From: Stefan Eichenberger <[email protected]>
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.
Quoted 1 line
Signed-off-by Stefan Eichenberger <[email protected]>
PATCH 2/2 arm64: dts: ti: k3-am62-verdin-dahlia: support sleep-moci
In reply to Stefan EichenbergerFrom: Stefan Eichenberger <[email protected]>
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 a new regulator for the USB hub that can be turned off when the system is suspended.
--- .../boot/dts/ti/k3-am62-verdin-dahlia.dtsi | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+)
arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi +22 -0
@@ -43,6 +43,15 @@ simple-audio-card,cpu { sound-dai = <&mcasp0>; }; }; + + reg_usb_hub: regulator-usb-hub { + compatible = "regulator-fixed"; + enable-active-high; + /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ + gpio = <&main_gpio0 31 GPIO_ACTIVE_HIGH>; + regulator-boot-on; + regulator-name = "HUB_PWR_EN"; + }; }; /* Verdin ETHs */
@@ -183,6 +192,11 @@ &ospi0 { status = "okay"; }; +/* Do not force CTRL_SLEEP_MOCI# always enabled */ +®_force_sleep_moci { + status = "disabled"; +}; + /* Verdin SD_1 */ &sdhci1 { ti,driver-strength-ohm = <33>;
@@ -204,7 +218,15 @@ &usbss1 { }; &usb1 { + #address-cells = <1>; + #size-cells = <0>; status = "okay"; + + usb-hub@1 { + compatible = "usb424,2744"; + reg = <1>; + vdd-supply = <®_usb_hub>; + }; }; /* Verdin CTRL_WAKE1_MICO# */
Signature · 1 line
2.40.1
Re: [PATCH v1 2/2] arm64: dts: ti: k3-am62-verdin-dahlia: support sleep-moci
Quoted 10 lines · Stefan Eichenberger
From: Stefan Eichenberger <[email protected]>
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_mociregulator and adding a new regulator for the USB hub that can be turned off when the system is suspended.Signed-off-by Stefan Eichenberger <[email protected]>
Hello Nishanth,
Quoted 7 lines · Stefan Eichenberger
From: Stefan Eichenberger <[email protected]>
This patch series adds support for sleep-moci to the Verdin AM62 in combination with the Dahlia carrier board. sleep-moci is a GPIO that allows the system on module to turn off regulators that are not needed in suspend mode on the carrier board.
Quoted 5 lines
Commit
ba9d3cd71f15("dt-bindings: usb: microchip,usb5744: Remove peer-hub as requirement") from linux-next is needed to makeDTB_CHECKpass without peer-hub set for the hub on the usb1 interface.Signed-off-by Stefan Eichenberger <[email protected]>
Is this series on your queue? Any concern? I noticed you applied more recent patches but not this one, therefore asking.
(I know you are travelling, I just want to be sure this is not getting
lost)
Francesco
Hi Stefan Eichenberger,
Quoted 8 lines · Stefan Eichenberger
From: Stefan Eichenberger <[email protected]>
This patch series adds support for sleep-moci to the Verdin AM62 in combination with the Dahlia carrier board. sleep-moci is a GPIO that allows the system on module to turn off regulators that are not needed in suspend mode on the carrier board.
[...]
I have applied the following to branch ti-k3-dts-next on [1]. Thank you!
[1/2] arm64: dts: ti: k3-am62-verdin: replace sleep-moci hog with regulator
commit: e75f65467e01633afe921acb5742403c86153b48
[2/2] arm64: dts: ti: k3-am62-verdin-dahlia: support sleep-moci
commit: 262b0d3d724dc33c7ae1359bcd89abefbad7a886All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D