wkup_m3_ipc.txt
4.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
Wakeup M3 IPC Driver
=====================
The TI AM33xx and AM43xx family of devices use a small Cortex M3 co-processor
(commonly referred to as Wakeup M3 or CM3) to help with various low power tasks
that cannot be controlled from the MPU, like suspend/resume and certain deep
C-states for CPU Idle. Once the wkup_m3_ipc driver uses the wkup_m3_rproc driver
to boot the wkup_m3, it handles communication with the CM3 using IPC registers
present in the SoC's control module and a mailbox. The wkup_m3_ipc exposes an
API to allow the SoC PM code to execute specific PM tasks.
Wkup M3 Device Node:
====================
A wkup_m3_ipc device node is used to represent the IPC registers within an
SoC.
Required properties:
--------------------
- compatible: Should be,
"ti,am3352-wkup-m3-ipc" for AM33xx SoCs
"ti,am4372-wkup-m3-ipc" for AM43xx SoCs
- reg: Contains the IPC register address space to communicate
with the Wakeup M3 processor
- interrupts: Contains the interrupt information for the wkup_m3
interrupt that signals the MPU.
- ti,rproc: phandle to the wkup_m3 rproc node so the IPC driver
can boot it.
- mboxes: phandles used by IPC framework to get correct mbox
channel for communication. Must point to appropriate
mbox_wkupm3 child node.
Example:
--------
/* AM33xx */
l4_wkup: l4_wkup@44c00000 {
...
scm: scm@210000 {
compatible = "ti,am3-scm", "simple-bus";
reg = <0x210000 0x2000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x210000 0x2000>;
...
wkup_m3_ipc: wkup_m3_ipc@1324 {
compatible = "ti,am3352-wkup-m3-ipc";
reg = <0x1324 0x24>;
interrupts = <78>;
ti,rproc = <&wkup_m3>;
mboxes = <&mailbox &mbox_wkupm3>;
};
...
};
};
Support for I2C PMIC Voltage Scaling
--------------------
It is possible to pass the name of a binary file to laod to the CM3 firmware
in order to provide I2C sequences for the CM3 to send out to the PMIC during
low power mode entry.
Optional properties:
--------------------
- scale-data-fw: Name of the firmware binary in /lib/firmware to copy to m3
aux data.
Support for VTT Toggle
==================================
In order to enable the support for VTT toggle during Suspend/Resume
sequence needed by some boards (like AM335x EVM-SK & AM437x GP EVM),
the below DT properties are required. It is possible to toggle VTT
using one of two methods depending on the SoC being used, either
GPIO0 toggle (AM335x and AM437x), or any GPIO with DS_PAD_CONFIG
bits in the control module (AM437x only).
VTT Toggle using GPIO0
----------------------------------
Supported by: AM335x and AM437x
Used on: AM335x EVM-SK
Optional properties:
- ti,needs-vtt-toggle: Indicates that the boards requires VTT toggling
during suspend/resume.
- ti,vtt-gpio-pin: Specifies the GPIO0 pin used for VTT toggle.
Important Note:
- Here it is assumed that VTT Toggle will be done using a pin on GPIO-0 Instance.
It will not work on any other GPIO using the above properties, regardless of
which part is being used.
Example:
wkup_m3_ipc: wkup_m3_ipc@1324 {
compatible = "ti,am3352-wkup-m3-ipc";
...
...
ti,needs-vtt-toggle;
ti,vtt-gpio-pin = <7>;
...
};
VTT Toggle using any GPIO
----------------------------------
Supported by: AM437x ONLY
Used on: AM437x GP EVM
Many of the pins on AM437x have the ability to configure both normal and
sleep states. Because of this it is possible to use any pin with a
corresponding CTRL_CONF_* register in the control module and the
DS_PAD_CONFIG bits to toggle the VTT regulator enable pin. The DS state of
the pin must be configured such that the pin disables the VTT regulator. The
normal state of the pin must be configured such that the VTT regulator is
enabled by the state alone. This is because the VTT regulator must be enabled
before context is restored to the controlling GPIO.
Optional properties:
- ti,set-io-isolation: Indicates that the IO's should be placed into
isolation and the DS_PAD_CONFIG values should be
used during suspend.
Example:
On the AM437x GP EVM, the VTT enable line must be held low to disable VTT
regulator and held high to enable, so the following pinctrl entry is used.
The DS pull is enabled which uses a pull down by default and DS off mode is
used which outputs a low by default. For the normal state, a pull up is
specified so that the VTT enable line gets pulled high immediately after
the DS states are removed upon exit from DeepSleep0.
&am43xx_pinmux {
pinctrl-names = "default";
pinctrl-0 = <&ddr3_vtt_toggle_default>;
ddr3_vtt_toggle_default: ddr_vtt_toggle_default {
pinctrl-single,pins = <
0x25C (DS0_PULL_UP_DOWN_EN | PIN_OUTPUT_PULLUP |
DS0_FORCE_OFF_MODE | MUX_MODE7)>;
};
...
};
wkup_m3_ipc: wkup_m3_ipc@1324 {
compatible = "ti,am4372-wkup-m3-ipc";
...
...
ti,set-io-isolation;
...
};