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