xref: /freebsd/sys/contrib/device-tree/Bindings/arm/freescale/fsl,scu.txt (revision 5956d97f4b3204318ceb6aa9c77bd0bc6ea87a41)
1c66ec88fSEmmanuel VadotNXP i.MX System Controller Firmware (SCFW)
2c66ec88fSEmmanuel Vadot--------------------------------------------------------------------
3c66ec88fSEmmanuel Vadot
4c66ec88fSEmmanuel VadotThe System Controller Firmware (SCFW) is a low-level system function
5c66ec88fSEmmanuel Vadotwhich runs on a dedicated Cortex-M core to provide power, clock, and
6c66ec88fSEmmanuel Vadotresource management. It exists on some i.MX8 processors. e.g. i.MX8QM
7c66ec88fSEmmanuel Vadot(QM, QP), and i.MX8QX (QXP, DX).
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel VadotThe AP communicates with the SC using a multi-ported MU module found
10c66ec88fSEmmanuel Vadotin the LSIO subsystem. The current definition of this MU module provides
11c66ec88fSEmmanuel Vadot5 remote AP connections to the SC to support up to 5 execution environments
12c66ec88fSEmmanuel Vadot(TZ, HV, standard Linux, etc.). The SC side of this MU module interfaces
13c66ec88fSEmmanuel Vadotwith the LSIO DSC IP bus. The SC firmware will communicate with this MU
14c66ec88fSEmmanuel Vadotusing the MSI bus.
15c66ec88fSEmmanuel Vadot
16c66ec88fSEmmanuel VadotSystem Controller Device Node:
17c66ec88fSEmmanuel Vadot============================================================
18c66ec88fSEmmanuel Vadot
19c66ec88fSEmmanuel VadotThe scu node with the following properties shall be under the /firmware/ node.
20c66ec88fSEmmanuel Vadot
21c66ec88fSEmmanuel VadotRequired properties:
22c66ec88fSEmmanuel Vadot-------------------
23c66ec88fSEmmanuel Vadot- compatible:	should be "fsl,imx-scu".
24c66ec88fSEmmanuel Vadot- mbox-names:	should include "tx0", "tx1", "tx2", "tx3",
25c66ec88fSEmmanuel Vadot			       "rx0", "rx1", "rx2", "rx3";
26c66ec88fSEmmanuel Vadot		include "gip3" if want to support general MU interrupt.
27c66ec88fSEmmanuel Vadot- mboxes:	List of phandle of 4 MU channels for tx, 4 MU channels for
28c66ec88fSEmmanuel Vadot		rx, and 1 optional MU channel for general interrupt.
29c66ec88fSEmmanuel Vadot		All MU channels must be in the same MU instance.
30c66ec88fSEmmanuel Vadot		Cross instances are not allowed. The MU instance can only
31c66ec88fSEmmanuel Vadot		be one of LSIO MU0~M4 for imx8qxp and imx8qm. Users need
32c66ec88fSEmmanuel Vadot		to make sure use the one which is not conflict with other
33c66ec88fSEmmanuel Vadot		execution environments. e.g. ATF.
34c66ec88fSEmmanuel Vadot		Note:
35c66ec88fSEmmanuel Vadot		Channel 0 must be "tx0" or "rx0".
36c66ec88fSEmmanuel Vadot		Channel 1 must be "tx1" or "rx1".
37c66ec88fSEmmanuel Vadot		Channel 2 must be "tx2" or "rx2".
38c66ec88fSEmmanuel Vadot		Channel 3 must be "tx3" or "rx3".
39c66ec88fSEmmanuel Vadot		General interrupt rx channel must be "gip3".
40c66ec88fSEmmanuel Vadot		e.g.
41c66ec88fSEmmanuel Vadot		mboxes = <&lsio_mu1 0 0
42c66ec88fSEmmanuel Vadot			  &lsio_mu1 0 1
43c66ec88fSEmmanuel Vadot			  &lsio_mu1 0 2
44c66ec88fSEmmanuel Vadot			  &lsio_mu1 0 3
45c66ec88fSEmmanuel Vadot			  &lsio_mu1 1 0
46c66ec88fSEmmanuel Vadot			  &lsio_mu1 1 1
47c66ec88fSEmmanuel Vadot			  &lsio_mu1 1 2
48c66ec88fSEmmanuel Vadot			  &lsio_mu1 1 3
49c66ec88fSEmmanuel Vadot			  &lsio_mu1 3 3>;
50c66ec88fSEmmanuel Vadot		See Documentation/devicetree/bindings/mailbox/fsl,mu.yaml
51c66ec88fSEmmanuel Vadot		for detailed mailbox binding.
52c66ec88fSEmmanuel Vadot
53c66ec88fSEmmanuel VadotNote: Each mu which supports general interrupt should have an alias correctly
54c66ec88fSEmmanuel Vadotnumbered in "aliases" node.
55c66ec88fSEmmanuel Vadote.g.
56c66ec88fSEmmanuel Vadotaliases {
57c66ec88fSEmmanuel Vadot	mu1 = &lsio_mu1;
58c66ec88fSEmmanuel Vadot};
59c66ec88fSEmmanuel Vadot
60c66ec88fSEmmanuel Vadoti.MX SCU Client Device Node:
61c66ec88fSEmmanuel Vadot============================================================
62c66ec88fSEmmanuel Vadot
63c66ec88fSEmmanuel VadotClient nodes are maintained as children of the relevant IMX-SCU device node.
64c66ec88fSEmmanuel Vadot
65c66ec88fSEmmanuel VadotPower domain bindings based on SCU Message Protocol
66c66ec88fSEmmanuel Vadot------------------------------------------------------------
67c66ec88fSEmmanuel Vadot
68c66ec88fSEmmanuel VadotThis binding for the SCU power domain providers uses the generic power
69c66ec88fSEmmanuel Vadotdomain binding[2].
70c66ec88fSEmmanuel Vadot
71c66ec88fSEmmanuel VadotRequired properties:
72c66ec88fSEmmanuel Vadot- compatible:		Should be one of:
73c66ec88fSEmmanuel Vadot			  "fsl,imx8qm-scu-pd",
74c66ec88fSEmmanuel Vadot			  "fsl,imx8qxp-scu-pd"
75c66ec88fSEmmanuel Vadot			followed by "fsl,scu-pd"
76c66ec88fSEmmanuel Vadot
77c66ec88fSEmmanuel Vadot- #power-domain-cells:	Must be 1. Contains the Resource ID used by
78c66ec88fSEmmanuel Vadot			SCU commands.
79c66ec88fSEmmanuel Vadot			See detailed Resource ID list from:
80c66ec88fSEmmanuel Vadot			include/dt-bindings/firmware/imx/rsrc.h
81c66ec88fSEmmanuel Vadot
82c66ec88fSEmmanuel VadotClock bindings based on SCU Message Protocol
83c66ec88fSEmmanuel Vadot------------------------------------------------------------
84c66ec88fSEmmanuel Vadot
85c66ec88fSEmmanuel VadotThis binding uses the common clock binding[1].
86c66ec88fSEmmanuel Vadot
87c66ec88fSEmmanuel VadotRequired properties:
88c66ec88fSEmmanuel Vadot- compatible:		Should be one of:
89*5956d97fSEmmanuel Vadot			  "fsl,imx8qm-clk"
90*5956d97fSEmmanuel Vadot			  "fsl,imx8qxp-clk"
91c66ec88fSEmmanuel Vadot			followed by "fsl,scu-clk"
92*5956d97fSEmmanuel Vadot- #clock-cells:		Should be 2.
93*5956d97fSEmmanuel Vadot			Contains the Resource and Clock ID value.
94c66ec88fSEmmanuel Vadot- clocks:		List of clock specifiers, must contain an entry for
95c66ec88fSEmmanuel Vadot			each required entry in clock-names
96c66ec88fSEmmanuel Vadot- clock-names:		Should include entries "xtal_32KHz", "xtal_24MHz"
97c66ec88fSEmmanuel Vadot
98c66ec88fSEmmanuel VadotThe clock consumer should specify the desired clock by having the clock
99c66ec88fSEmmanuel VadotID in its "clocks" phandle cell.
100c66ec88fSEmmanuel Vadot
101c66ec88fSEmmanuel VadotSee the full list of clock IDs from:
102c66ec88fSEmmanuel Vadotinclude/dt-bindings/clock/imx8qxp-clock.h
103c66ec88fSEmmanuel Vadot
104c66ec88fSEmmanuel VadotPinctrl bindings based on SCU Message Protocol
105c66ec88fSEmmanuel Vadot------------------------------------------------------------
106c66ec88fSEmmanuel Vadot
107c66ec88fSEmmanuel VadotThis binding uses the i.MX common pinctrl binding[3].
108c66ec88fSEmmanuel Vadot
109c66ec88fSEmmanuel VadotRequired properties:
110c66ec88fSEmmanuel Vadot- compatible:		Should be one of:
111c66ec88fSEmmanuel Vadot			"fsl,imx8qm-iomuxc",
112c66ec88fSEmmanuel Vadot			"fsl,imx8qxp-iomuxc",
113c66ec88fSEmmanuel Vadot			"fsl,imx8dxl-iomuxc".
114c66ec88fSEmmanuel Vadot
115c66ec88fSEmmanuel VadotRequired properties for Pinctrl sub nodes:
116c66ec88fSEmmanuel Vadot- fsl,pins:		Each entry consists of 3 integers which represents
117c66ec88fSEmmanuel Vadot			the mux and config setting for one pin. The first 2
118c66ec88fSEmmanuel Vadot			integers <pin_id mux_mode> are specified using a
119c66ec88fSEmmanuel Vadot			PIN_FUNC_ID macro, which can be found in
120c66ec88fSEmmanuel Vadot			<dt-bindings/pinctrl/pads-imx8qm.h>,
121c66ec88fSEmmanuel Vadot			<dt-bindings/pinctrl/pads-imx8qxp.h>,
122c66ec88fSEmmanuel Vadot			<dt-bindings/pinctrl/pads-imx8dxl.h>.
123c66ec88fSEmmanuel Vadot			The last integer CONFIG is the pad setting value like
124c66ec88fSEmmanuel Vadot			pull-up on this pin.
125c66ec88fSEmmanuel Vadot
126c66ec88fSEmmanuel Vadot			Please refer to i.MX8QXP Reference Manual for detailed
127c66ec88fSEmmanuel Vadot			CONFIG settings.
128c66ec88fSEmmanuel Vadot
129c66ec88fSEmmanuel Vadot[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
130c66ec88fSEmmanuel Vadot[2] Documentation/devicetree/bindings/power/power-domain.yaml
131c66ec88fSEmmanuel Vadot[3] Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt
132c66ec88fSEmmanuel Vadot
133c66ec88fSEmmanuel VadotRTC bindings based on SCU Message Protocol
134c66ec88fSEmmanuel Vadot------------------------------------------------------------
135c66ec88fSEmmanuel Vadot
136c66ec88fSEmmanuel VadotRequired properties:
137c66ec88fSEmmanuel Vadot- compatible: should be "fsl,imx8qxp-sc-rtc";
138c66ec88fSEmmanuel Vadot
139c66ec88fSEmmanuel VadotOCOTP bindings based on SCU Message Protocol
140c66ec88fSEmmanuel Vadot------------------------------------------------------------
141c66ec88fSEmmanuel VadotRequired properties:
142c66ec88fSEmmanuel Vadot- compatible:		Should be one of:
143c66ec88fSEmmanuel Vadot			"fsl,imx8qm-scu-ocotp",
144c66ec88fSEmmanuel Vadot			"fsl,imx8qxp-scu-ocotp".
145c66ec88fSEmmanuel Vadot- #address-cells:	Must be 1. Contains byte index
146c66ec88fSEmmanuel Vadot- #size-cells:		Must be 1. Contains byte length
147c66ec88fSEmmanuel Vadot
148c66ec88fSEmmanuel VadotOptional Child nodes:
149c66ec88fSEmmanuel Vadot
150c66ec88fSEmmanuel Vadot- Data cells of ocotp:
151c66ec88fSEmmanuel Vadot  Detailed bindings are described in bindings/nvmem/nvmem.txt
152c66ec88fSEmmanuel Vadot
153c66ec88fSEmmanuel VadotWatchdog bindings based on SCU Message Protocol
154c66ec88fSEmmanuel Vadot------------------------------------------------------------
155c66ec88fSEmmanuel Vadot
156c66ec88fSEmmanuel VadotRequired properties:
157c66ec88fSEmmanuel Vadot- compatible: should be:
158c66ec88fSEmmanuel Vadot              "fsl,imx8qxp-sc-wdt"
159c66ec88fSEmmanuel Vadot              followed by "fsl,imx-sc-wdt";
160c66ec88fSEmmanuel VadotOptional properties:
161c66ec88fSEmmanuel Vadot- timeout-sec: contains the watchdog timeout in seconds.
162c66ec88fSEmmanuel Vadot
163c66ec88fSEmmanuel VadotSCU key bindings based on SCU Message Protocol
164c66ec88fSEmmanuel Vadot------------------------------------------------------------
165c66ec88fSEmmanuel Vadot
166c66ec88fSEmmanuel VadotRequired properties:
167c66ec88fSEmmanuel Vadot- compatible: should be:
168c66ec88fSEmmanuel Vadot              "fsl,imx8qxp-sc-key"
169c66ec88fSEmmanuel Vadot              followed by "fsl,imx-sc-key";
170c66ec88fSEmmanuel Vadot- linux,keycodes: See Documentation/devicetree/bindings/input/input.yaml
171c66ec88fSEmmanuel Vadot
172c66ec88fSEmmanuel VadotThermal bindings based on SCU Message Protocol
173c66ec88fSEmmanuel Vadot------------------------------------------------------------
174c66ec88fSEmmanuel Vadot
175c66ec88fSEmmanuel VadotRequired properties:
176c66ec88fSEmmanuel Vadot- compatible:			Should be :
177c66ec88fSEmmanuel Vadot				  "fsl,imx8qxp-sc-thermal"
178c66ec88fSEmmanuel Vadot				followed by "fsl,imx-sc-thermal";
179c66ec88fSEmmanuel Vadot
180c66ec88fSEmmanuel Vadot- #thermal-sensor-cells:	See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml
181c66ec88fSEmmanuel Vadot				for a description.
182c66ec88fSEmmanuel Vadot
183c66ec88fSEmmanuel VadotExample (imx8qxp):
184c66ec88fSEmmanuel Vadot-------------
185c66ec88fSEmmanuel Vadotaliases {
186c66ec88fSEmmanuel Vadot	mu1 = &lsio_mu1;
187c66ec88fSEmmanuel Vadot};
188c66ec88fSEmmanuel Vadot
189c66ec88fSEmmanuel Vadotlsio_mu1: mailbox@5d1c0000 {
190c66ec88fSEmmanuel Vadot	...
191c66ec88fSEmmanuel Vadot	#mbox-cells = <2>;
192c66ec88fSEmmanuel Vadot};
193c66ec88fSEmmanuel Vadot
194c66ec88fSEmmanuel Vadotfirmware {
195c66ec88fSEmmanuel Vadot	scu {
196c66ec88fSEmmanuel Vadot		compatible = "fsl,imx-scu";
197c66ec88fSEmmanuel Vadot		mbox-names = "tx0", "tx1", "tx2", "tx3",
198c66ec88fSEmmanuel Vadot			     "rx0", "rx1", "rx2", "rx3",
199c66ec88fSEmmanuel Vadot			     "gip3";
200c66ec88fSEmmanuel Vadot		mboxes = <&lsio_mu1 0 0
201c66ec88fSEmmanuel Vadot			  &lsio_mu1 0 1
202c66ec88fSEmmanuel Vadot			  &lsio_mu1 0 2
203c66ec88fSEmmanuel Vadot			  &lsio_mu1 0 3
204c66ec88fSEmmanuel Vadot			  &lsio_mu1 1 0
205c66ec88fSEmmanuel Vadot			  &lsio_mu1 1 1
206c66ec88fSEmmanuel Vadot			  &lsio_mu1 1 2
207c66ec88fSEmmanuel Vadot			  &lsio_mu1 1 3
208c66ec88fSEmmanuel Vadot			  &lsio_mu1 3 3>;
209c66ec88fSEmmanuel Vadot
210c66ec88fSEmmanuel Vadot		clk: clk {
211c66ec88fSEmmanuel Vadot			compatible = "fsl,imx8qxp-clk", "fsl,scu-clk";
2125def4c47SEmmanuel Vadot			#clock-cells = <2>;
213c66ec88fSEmmanuel Vadot		};
214c66ec88fSEmmanuel Vadot
215c66ec88fSEmmanuel Vadot		iomuxc {
216c66ec88fSEmmanuel Vadot			compatible = "fsl,imx8qxp-iomuxc";
217c66ec88fSEmmanuel Vadot
218c66ec88fSEmmanuel Vadot			pinctrl_lpuart0: lpuart0grp {
219c66ec88fSEmmanuel Vadot				fsl,pins = <
220c66ec88fSEmmanuel Vadot					SC_P_UART0_RX_ADMA_UART0_RX	0x06000020
221c66ec88fSEmmanuel Vadot					SC_P_UART0_TX_ADMA_UART0_TX	0x06000020
222c66ec88fSEmmanuel Vadot				>;
223c66ec88fSEmmanuel Vadot			};
224c66ec88fSEmmanuel Vadot			...
225c66ec88fSEmmanuel Vadot		};
226c66ec88fSEmmanuel Vadot
227c66ec88fSEmmanuel Vadot		ocotp: imx8qx-ocotp {
228c66ec88fSEmmanuel Vadot			compatible = "fsl,imx8qxp-scu-ocotp";
229c66ec88fSEmmanuel Vadot			#address-cells = <1>;
230c66ec88fSEmmanuel Vadot			#size-cells = <1>;
231c66ec88fSEmmanuel Vadot
232c66ec88fSEmmanuel Vadot			fec_mac0: mac@2c4 {
233c66ec88fSEmmanuel Vadot				reg = <0x2c4 8>;
234c66ec88fSEmmanuel Vadot			};
235c66ec88fSEmmanuel Vadot		};
236c66ec88fSEmmanuel Vadot
237c66ec88fSEmmanuel Vadot		pd: imx8qx-pd {
238c66ec88fSEmmanuel Vadot			compatible = "fsl,imx8qxp-scu-pd", "fsl,scu-pd";
239c66ec88fSEmmanuel Vadot			#power-domain-cells = <1>;
240c66ec88fSEmmanuel Vadot		};
241c66ec88fSEmmanuel Vadot
242c66ec88fSEmmanuel Vadot		rtc: rtc {
243c66ec88fSEmmanuel Vadot			compatible = "fsl,imx8qxp-sc-rtc";
244c66ec88fSEmmanuel Vadot		};
245c66ec88fSEmmanuel Vadot
246c66ec88fSEmmanuel Vadot		scu_key: scu-key {
247c66ec88fSEmmanuel Vadot			compatible = "fsl,imx8qxp-sc-key", "fsl,imx-sc-key";
248c66ec88fSEmmanuel Vadot			linux,keycodes = <KEY_POWER>;
249c66ec88fSEmmanuel Vadot		};
250c66ec88fSEmmanuel Vadot
251c66ec88fSEmmanuel Vadot		watchdog {
252c66ec88fSEmmanuel Vadot			compatible = "fsl,imx8qxp-sc-wdt", "fsl,imx-sc-wdt";
253c66ec88fSEmmanuel Vadot			timeout-sec = <60>;
254c66ec88fSEmmanuel Vadot		};
255c66ec88fSEmmanuel Vadot
256c66ec88fSEmmanuel Vadot		tsens: thermal-sensor {
257c66ec88fSEmmanuel Vadot			compatible = "fsl,imx8qxp-sc-thermal", "fsl,imx-sc-thermal";
258c66ec88fSEmmanuel Vadot			#thermal-sensor-cells = <1>;
259c66ec88fSEmmanuel Vadot		};
260c66ec88fSEmmanuel Vadot	};
261c66ec88fSEmmanuel Vadot};
262c66ec88fSEmmanuel Vadot
263c66ec88fSEmmanuel Vadotserial@5a060000 {
264c66ec88fSEmmanuel Vadot	...
265c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
266c66ec88fSEmmanuel Vadot	pinctrl-0 = <&pinctrl_lpuart0>;
2675def4c47SEmmanuel Vadot	clocks = <&uart0_clk IMX_SC_R_UART_0 IMX_SC_PM_CLK_PER>;
2685def4c47SEmmanuel Vadot	clock-names = "ipg";
269c66ec88fSEmmanuel Vadot	power-domains = <&pd IMX_SC_R_UART_0>;
270c66ec88fSEmmanuel Vadot};
271