2024-03-01 08:49:49

by Stefan Eichenberger

[permalink] [raw]
Subject: [PATCH v1 0/2] 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.

Signed-off-by: Stefan Eichenberger <[email protected]>

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(-)

--
2.40.1



2024-03-01 08:50:00

by Stefan Eichenberger

[permalink] [raw]
Subject: [PATCH v1 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.

Signed-off-by: Stefan Eichenberger <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi | 24 ++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi b/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi
index 6a06724b6d16..ba3b3e18a46d 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi
@@ -122,6 +122,22 @@ reg_1v8_eth: regulator-1v8-eth {
vin-supply = <&reg_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 {
--
2.40.1


2024-03-01 08:50:04

by Stefan Eichenberger

[permalink] [raw]
Subject: [PATCH v1 2/2] arm64: dts: ti: k3-am62-verdin-dahlia: support sleep-moci

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_moci regulator 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]>
---
.../boot/dts/ti/k3-am62-verdin-dahlia.dtsi | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi b/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi
index bf6d27e70bc4..bb066e726527 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi
@@ -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 */
+&reg_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 = <&reg_usb_hub>;
+ };
};

/* Verdin CTRL_WAKE1_MICO# */
--
2.40.1


2024-03-01 09:00:37

by Francesco Dolcini

[permalink] [raw]
Subject: Re: [PATCH v1 1/2] arm64: dts: ti: k3-am62-verdin: replace sleep-moci hog with regulator

On Fri, Mar 01, 2024 at 09:49:00AM +0100, Stefan Eichenberger wrote:
> 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.
>
> Signed-off-by: Stefan Eichenberger <[email protected]>

Reviewed-by: Francesco Dolcini <[email protected]>


2024-03-01 09:01:07

by Francesco Dolcini

[permalink] [raw]
Subject: Re: [PATCH v1 2/2] arm64: dts: ti: k3-am62-verdin-dahlia: support sleep-moci

On Fri, Mar 01, 2024 at 09:49:01AM +0100, Stefan Eichenberger wrote:
> 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_moci regulator 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]>

Reviewed-by: Francesco Dolcini <[email protected]>


2024-04-17 07:55:34

by Francesco Dolcini

[permalink] [raw]
Subject: Re: [PATCH v1 0/2] arm64: dts: ti: k3-am62-verdin: add sleep-moci support

Hello Nishanth,

On Fri, Mar 01, 2024 at 09:48:59AM +0100, Stefan Eichenberger wrote:
> 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.
>
> 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


2024-04-26 22:43:13

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH v1 0/2] arm64: dts: ti: k3-am62-verdin: add sleep-moci support

Hi Stefan Eichenberger,

On Fri, 01 Mar 2024 09:48:59 +0100, Stefan Eichenberger wrote:
> 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: 262b0d3d724dc33c7ae1359bcd89abefbad7a886

All 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
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D