Skip to content

Commit 7fd3c4d

Browse files
kwillis01praneethbajjuri
authored andcommitted
feat(linux): Power_Management: add AM62D support
For all Power_Management files that apply to AM62D, make sure that to add AM62D to any applicable ifconfig or create a new ifconfig for AM62D if needed. Signed-off-by: Kendall Willis <k-willis@ti.com>
1 parent f1f6686 commit 7fd3c4d

8 files changed

Lines changed: 89 additions & 25 deletions

File tree

configs/AM62DX/AM62DX_linux_toc.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,15 @@ linux/Foundational_Components/Machine_Learning/nnstreamer
7070
linux/Foundational_Components/Machine_Learning/onnxrt
7171
linux/Foundational_Components/Machine_Learning/tflite
7272

73-
#linux/Foundational_Components_Power_Management
73+
linux/Foundational_Components_Power_Management
74+
linux/Foundational_Components/Power_Management/pm_overview
75+
linux/Foundational_Components/Power_Management/pm_dfs
76+
linux/Foundational_Components/Power_Management/pm_cpuidle
77+
linux/Foundational_Components/Power_Management/pm_runtime_pm
78+
linux/Foundational_Components/Power_Management/pm_low_power_modes
79+
linux/Foundational_Components/Power_Management/pm_wakeup_sources
80+
linux/Foundational_Components/Power_Management/pm_sw_arch
81+
linux/Foundational_Components/Power_Management/pm_debug
7482

7583
linux/Foundational_Components_Kernel_Users_Guide
7684
linux/Foundational_Components_Kernel_LTP-DDT_Validation

source/linux/Foundational_Components/Power_Management/pm_cpuidle.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ C-state. Governor decides whether to continue in current state/
1616
transition to a different state. Current 'driver' is called to
1717
transition to the selected state.
1818

19-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'J722S')
19+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'J722S', 'AM62DX')
2020

2121
.. rubric:: Standby Mode
2222

source/linux/Foundational_Components/Power_Management/pm_dfs.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ To view supported OPP's (frequency in kHz),
197197
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
198198
750000000 1000000000 1500000000 2000000000
199199
200-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'J722S')
200+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'J722S', 'AM62DX')
201201

202202
.. code-block:: console
203203
@@ -248,7 +248,7 @@ table.
248248
};
249249
};
250250
251-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX')
251+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'AM62DX')
252252

253253
The OPP table defined in the following files
254254
allows defining of a different set of OPPs for each different SoC:
@@ -257,7 +257,7 @@ table.
257257

258258
:file:`arch/arm64/boot/dts/ti/k3-am625.dtsi`
259259

260-
.. ifconfig:: CONFIG_part_variant in ('AM62AX')
260+
.. ifconfig:: CONFIG_part_variant in ('AM62AX', 'AM62DX')
261261

262262
:file:`arch/arm64/boot/dts/ti/k3-am62a7.dtsi`
263263

source/linux/Foundational_Components/Power_Management/pm_low_power_modes.rst

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@ Partial I/O supports wakeup sources mcu_mcan0 and mcu_mcan1. For more
5454
information about enabling CAN wakeup, see
5555
:ref:`CAN I/O Daisy Chain<pm_wakeup_sources_can>`.
5656

57+
.. ifconfig:: CONFIG_part_variant in ('AM62DX')
58+
59+
.. important::
60+
61+
Currently, wakeup from CAN is not available on AM62D EVM, but CAN
62+
wakeup still needs to be **enabled** to enter Partial I/O. To wakeup
63+
from Partial I/O, enable WKUP UART wakeup by entering the following
64+
command:
65+
66+
.. code-block:: console
67+
68+
root@<machine>:~# devmem2 0x4084024 w 0x20050000 # MCU_PADCONFIG9 for wkup_uart0
69+
5770
Enter Partial I/O mode with the following command:
5871

5972
.. code-block:: console
@@ -83,7 +96,7 @@ I/O Only Plus DDR
8396

8497
This mode is not applicable for AM62X.
8598

86-
.. ifconfig:: CONFIG_part_variant in ('AM62AX' , 'AM62PX')
99+
.. ifconfig:: CONFIG_part_variant in ('AM62AX' , 'AM62PX', 'AM62DX')
87100

88101
This mode is similar to Partial I/O mode, with the major distinction being
89102
that the DDR memory is kept in self refresh to save context. All the processor
@@ -108,6 +121,10 @@ I/O Only Plus DDR
108121

109122
.. important:: Jumper J12 should be connected on SK to enable system to enter I/O Only plus DDR mode.
110123

124+
.. ifconfig:: CONFIG_part_variant in ('AM62DX')
125+
126+
.. important:: Jumper J16 should be connected on SK to enable system to enter I/O Only plus DDR mode.
127+
111128
I/O Only Plus DDR supports wakeup sources mcu_uart0, mcu_mcan0,
112129
mcu_mcan1 and wkup_uart0. To use the mcu_mcan0 and mcu_mcan1 wakeup
113130
sources, see
@@ -137,7 +154,7 @@ I/O Only Plus DDR
137154
Main UART, USB0, and USB1 as these wakeup sources are not
138155
supported for this mode.
139156

140-
.. ifconfig:: CONFIG_part_variant in ('AM62AX')
157+
.. ifconfig:: CONFIG_part_variant in ('AM62AX', 'AM62DX')
141158

142159
.. code-block:: console
143160
@@ -157,7 +174,7 @@ I/O Only Plus DDR
157174
158175
.. rubric:: Then, configure PMIC register bit to turn off only selected rails for this mode.
159176

160-
.. ifconfig:: CONFIG_part_variant in ('AM62AX')
177+
.. ifconfig:: CONFIG_part_variant in ('AM62AX', 'AM62DX')
161178

162179
.. code-block:: console
163180
@@ -247,7 +264,7 @@ In order to enter Deep Sleep, use the following command:
247264
[ 444.826567] psci: CPU2 killed (polled 0 ms)
248265
[ 444.830170] psci: CPU3 killed (polled 0 ms)
249266
250-
.. ifconfig:: CONFIG_part_variant in ('AM62AX' , 'AM62PX')
267+
.. ifconfig:: CONFIG_part_variant in ('AM62AX' , 'AM62PX', 'AM62DX')
251268

252269
.. code-block:: console
253270

source/linux/Foundational_Components/Power_Management/pm_overview.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The dynamic power management features enabled on |__PART_FAMILY_DEVICE_NAMES__|
3131
#. DVFS
3232
#. CPUIdle
3333

34-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX')
34+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'AM62DX')
3535

3636
#. Dynamic Frequency Scaling
3737
#. CPUIdle
@@ -56,7 +56,7 @@ duration. This is accomplished by leveraging the low power modes supported
5656
by the SoC and the `System Sleep States <https://docs.kernel.org/admin-guide/pm/sleep-states.html>`__
5757
supported by the Linux kernel.
5858

59-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX')
59+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'AM62DX')
6060

6161
The static power management features on |__PART_FAMILY_DEVICE_NAMES__| are:
6262

source/linux/Foundational_Components/Power_Management/pm_runtime_pm.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ The following drivers have been validated for Runtime PM in this release:
3030

3131
DSS, GPU, McASP, OSPI, MCAN, Video Codec.
3232

33+
.. ifconfig:: CONFIG_part_variant in ('AM62DX')
34+
35+
DSS, McASP, OSPI, MCAN.
36+
3337
.. rubric:: Driver Usage
3438

3539
Linux provides the following sysfs interface (/sys/devices/.../power/)

source/linux/Foundational_Components/Power_Management/pm_sw_arch.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ If constraint is put on MAIN devgroup devices, then no low power mode is possibl
230230
`Devgroup section <https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am62x/soc_devgrps.html#am62x-device-group-descriptions>`__
231231
of TISCI documentation.
232232

233-
.. ifconfig:: CONFIG_part_variant in ('AM62AX')
233+
.. ifconfig:: CONFIG_part_variant in ('AM62AX', 'AM62DX')
234234

235235
For detailed description for devgroup of these devices, refer to
236236
`Devgroup section <https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am62ax/soc_devgrps.html#am62ax-device-group-descriptions>`__

source/linux/Foundational_Components/Power_Management/pm_wakeup_sources.rst

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ valid for given low power modes:
3030
| CAN I/O Daisy Chain | Yes | Yes | Yes |
3131
+------------------------------------------------+------------+----------+-------------+
3232

33-
.. ifconfig:: CONFIG_part_variant in ('AM62AX', 'AM62PX')
33+
.. ifconfig:: CONFIG_part_variant in ('AM62AX', 'AM62PX', 'AM62DX')
3434

3535
+------------------------------------------------+-------+------+---------+----------+
3636
| Wakeup Source | Deep | MCU | Partial | I/O Only |
@@ -155,7 +155,7 @@ For example, to wakeup from Deep Sleep in 10 seconds, use the command like this:
155155
[ 34.645777] PM: suspend exit
156156
root@am62xx-evm:~#
157157
158-
.. ifconfig:: CONFIG_part_variant in ('AM62AX')
158+
.. ifconfig:: CONFIG_part_variant in ('AM62AX', 'AM62DX')
159159

160160
.. code-block:: console
161161
@@ -309,7 +309,7 @@ For example, to wakeup from Deep Sleep in 10 seconds, use the command like this:
309309
[ 28.378392] random: crng reseeded on system resumption
310310
[ 28.384269] PM: suspend exit
311311
312-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX')
312+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'AM62DX')
313313

314314
.. note::
315315

@@ -325,7 +325,7 @@ MCU GPIO
325325

326326
MCU GPIO wakeup is not supported on AM62LX.
327327

328-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX')
328+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'AM62DX')
329329

330330
One of the most common ways to wakeup a system is by using some I/O activity.
331331
I/O activity on the MCU GPIOs can wakeup the system when the MCU GPIO
@@ -487,7 +487,7 @@ WKUP GPIO
487487
:ref:`LPM section<lpm_modes>`, wakeup from WKUP_UART0_RXD can be triggered
488488
by entering a keypress on the WKUP UART (/dev/ttyUSB2).
489489

490-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX')
490+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'AM62DX')
491491

492492
Setup of WKUP GPIO is the same process of MCU GPIO. Refer to the
493493
:ref:`MCU GPIO section<pm_mcu_gpio_wakeup>` on how to configure wakeup from
@@ -514,7 +514,7 @@ register.
514514
For detailed information and sequence please refer to I/O Power Management and
515515
Daisy Chaining section in the TRM.
516516

517-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX')
517+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'AM62DX')
518518

519519
.. note::
520520

@@ -681,6 +681,41 @@ Main UART
681681
bootph-all;
682682
};
683683
684+
.. ifconfig:: CONFIG_part_variant in ('AM62DX')
685+
686+
To configure UART as an I/O daisy chain wakeup, refer to the
687+
main_uart0 node in `k3-am62d2-evm.dts <https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62d2-evm.dts?h=12.00.00.07>`_
688+
689+
.. code-block:: dts
690+
691+
&main_pmx0 {
692+
main_uart0_pins_default: main-uart0-default-pins {
693+
pinctrl-single,pins = <
694+
AM62DX_IOPAD(0x01c8, PIN_INPUT, 0) /* (E14) UART0_RXD */
695+
AM62DX_IOPAD(0x01cc, PIN_OUTPUT, 0) /* (D15) UART0_TXD */
696+
>;
697+
bootph-all;
698+
};
699+
700+
main_uart0_pins_wakeup: main-uart0-wakeup-pins {
701+
pinctrl-single,pins = <
702+
AM62DX_IOPAD(0x01c8, PIN_INPUT | PIN_WKUP_EN, 0) /* (E14) UART0_RXD */
703+
AM62DX_IOPAD(0x01cc, PIN_OUTPUT, 0) /* (D15) UART0_TXD */
704+
>;
705+
};
706+
};
707+
708+
&main_uart0 {
709+
status = "okay";
710+
pinctrl-names = "default", "wakeup";
711+
pinctrl-0 = <&main_uart0_pins_default>;
712+
pinctrl-1 = <&main_uart0_pins_wakeup>;
713+
wakeup-source = <&system_deep_sleep>,
714+
<&system_mcu_only>,
715+
<&system_standby>;
716+
bootph-all;
717+
};
718+
684719
In the above code, a "wakeup" pinctrl state is defined for main_uart0. The
685720
"wakeup" pinctrl state sets the WKUP_EN flag on the desired padconfig register,
686721
which allows the pad to act as a wakeup source. During suspend, the Linux
@@ -701,7 +736,7 @@ combination of gpio-keys with a chained IRQ in the pinctrl driver. Setting the
701736
29th bit in the desired padconfig register, allows the pad to act as a wakeup
702737
source by triggering a wake IRQ in Deep Sleep states.
703738

704-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX')
739+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'AM62DX')
705740

706741
The reference configuration for Main GPIO wakeup can be found under
707742
gpio_key node in
@@ -796,7 +831,7 @@ in a generic way using the ti-sysc interconnect target module driver.
796831
The reference configuration can be found under target-module in
797832
`k3-am62-wakeup.dtsi <https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi?h=12.00.00.07#n46>`__
798833

799-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX')
834+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'AM62DX')
800835

801836
WKUP UART is generally available on the third serial port
802837
(/dev/ttyUSB2) and by default it only shows output from DM R5.
@@ -925,7 +960,7 @@ MCU IPC based Wakeup
925960

926961
MCU IPC wakeup is not supported on AM62LX.
927962

928-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX')
963+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'AM62DX')
929964

930965
It's possible to use IPC based wakeup events from the MCU core. For details on how to implement this
931966
from the firmware side, please refer to the relevant documentation:
@@ -934,7 +969,7 @@ MCU IPC based Wakeup
934969

935970
`MCU+ SDK for AM62x <https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/11_01_00_16/exports/docs/api_guide_am62x/index.html>`__
936971

937-
.. ifconfig:: CONFIG_part_variant in ('AM62AX')
972+
.. ifconfig:: CONFIG_part_variant in ('AM62AX', 'AM62DX')
938973

939974
`MCU+ SDK for AM62Ax <https://software-dl.ti.com/mcu-plus-sdk/esd/AM62AX/11_01_00_16/exports/docs/api_guide_am62ax/index.html>`__
940975

@@ -971,7 +1006,7 @@ CAN I/O Daisy Chain
9711006

9721007
CAN wakeup is not supported on AM62LX.
9731008

974-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX')
1009+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'AM62DX')
9751010

9761011
CAN pins can be used to wake the system from any supported low power mode.
9771012
To enable this, in the device tree configure a "wakeup" pinctrl state that sets
@@ -1032,7 +1067,7 @@ CAN I/O Daisy Chain
10321067
RTC Ext Pin
10331068
***********
10341069

1035-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX')
1070+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'AM62DX')
10361071

10371072
This is not applicable for |__PART_FAMILY_DEVICE_NAMES__|.
10381073

@@ -1050,7 +1085,7 @@ Confirming the Wakeup event type
10501085

10511086
This is not applicable for AM62LX.
10521087

1053-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX')
1088+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'AM62DX')
10541089

10551090
When the SoC wakes up from any Low Power Mode, the Device Manager logs the wake
10561091
reason, the pin number that triggered the wakeup, and the last low power mode

0 commit comments

Comments
 (0)