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*c9ccf3a3SEmmanuel Vadot "fsl,imx8dxl-clk" 905956d97fSEmmanuel Vadot "fsl,imx8qm-clk" 915956d97fSEmmanuel Vadot "fsl,imx8qxp-clk" 92c66ec88fSEmmanuel Vadot followed by "fsl,scu-clk" 935956d97fSEmmanuel Vadot- #clock-cells: Should be 2. 945956d97fSEmmanuel Vadot Contains the Resource and Clock ID value. 95c66ec88fSEmmanuel Vadot- clocks: List of clock specifiers, must contain an entry for 96c66ec88fSEmmanuel Vadot each required entry in clock-names 97c66ec88fSEmmanuel Vadot- clock-names: Should include entries "xtal_32KHz", "xtal_24MHz" 98c66ec88fSEmmanuel Vadot 99c66ec88fSEmmanuel VadotThe clock consumer should specify the desired clock by having the clock 100c66ec88fSEmmanuel VadotID in its "clocks" phandle cell. 101c66ec88fSEmmanuel Vadot 102c66ec88fSEmmanuel VadotSee the full list of clock IDs from: 103c66ec88fSEmmanuel Vadotinclude/dt-bindings/clock/imx8qxp-clock.h 104c66ec88fSEmmanuel Vadot 105c66ec88fSEmmanuel VadotPinctrl bindings based on SCU Message Protocol 106c66ec88fSEmmanuel Vadot------------------------------------------------------------ 107c66ec88fSEmmanuel Vadot 108c66ec88fSEmmanuel VadotThis binding uses the i.MX common pinctrl binding[3]. 109c66ec88fSEmmanuel Vadot 110c66ec88fSEmmanuel VadotRequired properties: 111c66ec88fSEmmanuel Vadot- compatible: Should be one of: 112c66ec88fSEmmanuel Vadot "fsl,imx8qm-iomuxc", 113c66ec88fSEmmanuel Vadot "fsl,imx8qxp-iomuxc", 114c66ec88fSEmmanuel Vadot "fsl,imx8dxl-iomuxc". 115c66ec88fSEmmanuel Vadot 116c66ec88fSEmmanuel VadotRequired properties for Pinctrl sub nodes: 117c66ec88fSEmmanuel Vadot- fsl,pins: Each entry consists of 3 integers which represents 118c66ec88fSEmmanuel Vadot the mux and config setting for one pin. The first 2 119c66ec88fSEmmanuel Vadot integers <pin_id mux_mode> are specified using a 120c66ec88fSEmmanuel Vadot PIN_FUNC_ID macro, which can be found in 121c66ec88fSEmmanuel Vadot <dt-bindings/pinctrl/pads-imx8qm.h>, 122c66ec88fSEmmanuel Vadot <dt-bindings/pinctrl/pads-imx8qxp.h>, 123c66ec88fSEmmanuel Vadot <dt-bindings/pinctrl/pads-imx8dxl.h>. 124c66ec88fSEmmanuel Vadot The last integer CONFIG is the pad setting value like 125c66ec88fSEmmanuel Vadot pull-up on this pin. 126c66ec88fSEmmanuel Vadot 127c66ec88fSEmmanuel Vadot Please refer to i.MX8QXP Reference Manual for detailed 128c66ec88fSEmmanuel Vadot CONFIG settings. 129c66ec88fSEmmanuel Vadot 130c66ec88fSEmmanuel Vadot[1] Documentation/devicetree/bindings/clock/clock-bindings.txt 131c66ec88fSEmmanuel Vadot[2] Documentation/devicetree/bindings/power/power-domain.yaml 132c66ec88fSEmmanuel Vadot[3] Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt 133c66ec88fSEmmanuel Vadot 134c66ec88fSEmmanuel VadotRTC bindings based on SCU Message Protocol 135c66ec88fSEmmanuel Vadot------------------------------------------------------------ 136c66ec88fSEmmanuel Vadot 137c66ec88fSEmmanuel VadotRequired properties: 138c66ec88fSEmmanuel Vadot- compatible: should be "fsl,imx8qxp-sc-rtc"; 139c66ec88fSEmmanuel Vadot 140c66ec88fSEmmanuel VadotOCOTP bindings based on SCU Message Protocol 141c66ec88fSEmmanuel Vadot------------------------------------------------------------ 142c66ec88fSEmmanuel VadotRequired properties: 143c66ec88fSEmmanuel Vadot- compatible: Should be one of: 144c66ec88fSEmmanuel Vadot "fsl,imx8qm-scu-ocotp", 145c66ec88fSEmmanuel Vadot "fsl,imx8qxp-scu-ocotp". 146c66ec88fSEmmanuel Vadot- #address-cells: Must be 1. Contains byte index 147c66ec88fSEmmanuel Vadot- #size-cells: Must be 1. Contains byte length 148c66ec88fSEmmanuel Vadot 149c66ec88fSEmmanuel VadotOptional Child nodes: 150c66ec88fSEmmanuel Vadot 151c66ec88fSEmmanuel Vadot- Data cells of ocotp: 152c66ec88fSEmmanuel Vadot Detailed bindings are described in bindings/nvmem/nvmem.txt 153c66ec88fSEmmanuel Vadot 154c66ec88fSEmmanuel VadotWatchdog bindings based on SCU Message Protocol 155c66ec88fSEmmanuel Vadot------------------------------------------------------------ 156c66ec88fSEmmanuel Vadot 157c66ec88fSEmmanuel VadotRequired properties: 158c66ec88fSEmmanuel Vadot- compatible: should be: 159c66ec88fSEmmanuel Vadot "fsl,imx8qxp-sc-wdt" 160c66ec88fSEmmanuel Vadot followed by "fsl,imx-sc-wdt"; 161c66ec88fSEmmanuel VadotOptional properties: 162c66ec88fSEmmanuel Vadot- timeout-sec: contains the watchdog timeout in seconds. 163c66ec88fSEmmanuel Vadot 164c66ec88fSEmmanuel VadotSCU key bindings based on SCU Message Protocol 165c66ec88fSEmmanuel Vadot------------------------------------------------------------ 166c66ec88fSEmmanuel Vadot 167c66ec88fSEmmanuel VadotRequired properties: 168c66ec88fSEmmanuel Vadot- compatible: should be: 169c66ec88fSEmmanuel Vadot "fsl,imx8qxp-sc-key" 170c66ec88fSEmmanuel Vadot followed by "fsl,imx-sc-key"; 171c66ec88fSEmmanuel Vadot- linux,keycodes: See Documentation/devicetree/bindings/input/input.yaml 172c66ec88fSEmmanuel Vadot 173c66ec88fSEmmanuel VadotThermal bindings based on SCU Message Protocol 174c66ec88fSEmmanuel Vadot------------------------------------------------------------ 175c66ec88fSEmmanuel Vadot 176c66ec88fSEmmanuel VadotRequired properties: 177c66ec88fSEmmanuel Vadot- compatible: Should be : 178c66ec88fSEmmanuel Vadot "fsl,imx8qxp-sc-thermal" 179c66ec88fSEmmanuel Vadot followed by "fsl,imx-sc-thermal"; 180c66ec88fSEmmanuel Vadot 181c66ec88fSEmmanuel Vadot- #thermal-sensor-cells: See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml 182c66ec88fSEmmanuel Vadot for a description. 183c66ec88fSEmmanuel Vadot 184c66ec88fSEmmanuel VadotExample (imx8qxp): 185c66ec88fSEmmanuel Vadot------------- 186c66ec88fSEmmanuel Vadotaliases { 187c66ec88fSEmmanuel Vadot mu1 = &lsio_mu1; 188c66ec88fSEmmanuel Vadot}; 189c66ec88fSEmmanuel Vadot 190c66ec88fSEmmanuel Vadotlsio_mu1: mailbox@5d1c0000 { 191c66ec88fSEmmanuel Vadot ... 192c66ec88fSEmmanuel Vadot #mbox-cells = <2>; 193c66ec88fSEmmanuel Vadot}; 194c66ec88fSEmmanuel Vadot 195c66ec88fSEmmanuel Vadotfirmware { 196c66ec88fSEmmanuel Vadot scu { 197c66ec88fSEmmanuel Vadot compatible = "fsl,imx-scu"; 198c66ec88fSEmmanuel Vadot mbox-names = "tx0", "tx1", "tx2", "tx3", 199c66ec88fSEmmanuel Vadot "rx0", "rx1", "rx2", "rx3", 200c66ec88fSEmmanuel Vadot "gip3"; 201c66ec88fSEmmanuel Vadot mboxes = <&lsio_mu1 0 0 202c66ec88fSEmmanuel Vadot &lsio_mu1 0 1 203c66ec88fSEmmanuel Vadot &lsio_mu1 0 2 204c66ec88fSEmmanuel Vadot &lsio_mu1 0 3 205c66ec88fSEmmanuel Vadot &lsio_mu1 1 0 206c66ec88fSEmmanuel Vadot &lsio_mu1 1 1 207c66ec88fSEmmanuel Vadot &lsio_mu1 1 2 208c66ec88fSEmmanuel Vadot &lsio_mu1 1 3 209c66ec88fSEmmanuel Vadot &lsio_mu1 3 3>; 210c66ec88fSEmmanuel Vadot 211c66ec88fSEmmanuel Vadot clk: clk { 212c66ec88fSEmmanuel Vadot compatible = "fsl,imx8qxp-clk", "fsl,scu-clk"; 2135def4c47SEmmanuel Vadot #clock-cells = <2>; 214c66ec88fSEmmanuel Vadot }; 215c66ec88fSEmmanuel Vadot 216c66ec88fSEmmanuel Vadot iomuxc { 217c66ec88fSEmmanuel Vadot compatible = "fsl,imx8qxp-iomuxc"; 218c66ec88fSEmmanuel Vadot 219c66ec88fSEmmanuel Vadot pinctrl_lpuart0: lpuart0grp { 220c66ec88fSEmmanuel Vadot fsl,pins = < 221c66ec88fSEmmanuel Vadot SC_P_UART0_RX_ADMA_UART0_RX 0x06000020 222c66ec88fSEmmanuel Vadot SC_P_UART0_TX_ADMA_UART0_TX 0x06000020 223c66ec88fSEmmanuel Vadot >; 224c66ec88fSEmmanuel Vadot }; 225c66ec88fSEmmanuel Vadot ... 226c66ec88fSEmmanuel Vadot }; 227c66ec88fSEmmanuel Vadot 228c66ec88fSEmmanuel Vadot ocotp: imx8qx-ocotp { 229c66ec88fSEmmanuel Vadot compatible = "fsl,imx8qxp-scu-ocotp"; 230c66ec88fSEmmanuel Vadot #address-cells = <1>; 231c66ec88fSEmmanuel Vadot #size-cells = <1>; 232c66ec88fSEmmanuel Vadot 233c66ec88fSEmmanuel Vadot fec_mac0: mac@2c4 { 234c66ec88fSEmmanuel Vadot reg = <0x2c4 8>; 235c66ec88fSEmmanuel Vadot }; 236c66ec88fSEmmanuel Vadot }; 237c66ec88fSEmmanuel Vadot 238c66ec88fSEmmanuel Vadot pd: imx8qx-pd { 239c66ec88fSEmmanuel Vadot compatible = "fsl,imx8qxp-scu-pd", "fsl,scu-pd"; 240c66ec88fSEmmanuel Vadot #power-domain-cells = <1>; 241c66ec88fSEmmanuel Vadot }; 242c66ec88fSEmmanuel Vadot 243c66ec88fSEmmanuel Vadot rtc: rtc { 244c66ec88fSEmmanuel Vadot compatible = "fsl,imx8qxp-sc-rtc"; 245c66ec88fSEmmanuel Vadot }; 246c66ec88fSEmmanuel Vadot 247c66ec88fSEmmanuel Vadot scu_key: scu-key { 248c66ec88fSEmmanuel Vadot compatible = "fsl,imx8qxp-sc-key", "fsl,imx-sc-key"; 249c66ec88fSEmmanuel Vadot linux,keycodes = <KEY_POWER>; 250c66ec88fSEmmanuel Vadot }; 251c66ec88fSEmmanuel Vadot 252c66ec88fSEmmanuel Vadot watchdog { 253c66ec88fSEmmanuel Vadot compatible = "fsl,imx8qxp-sc-wdt", "fsl,imx-sc-wdt"; 254c66ec88fSEmmanuel Vadot timeout-sec = <60>; 255c66ec88fSEmmanuel Vadot }; 256c66ec88fSEmmanuel Vadot 257c66ec88fSEmmanuel Vadot tsens: thermal-sensor { 258c66ec88fSEmmanuel Vadot compatible = "fsl,imx8qxp-sc-thermal", "fsl,imx-sc-thermal"; 259c66ec88fSEmmanuel Vadot #thermal-sensor-cells = <1>; 260c66ec88fSEmmanuel Vadot }; 261c66ec88fSEmmanuel Vadot }; 262c66ec88fSEmmanuel Vadot}; 263c66ec88fSEmmanuel Vadot 264c66ec88fSEmmanuel Vadotserial@5a060000 { 265c66ec88fSEmmanuel Vadot ... 266c66ec88fSEmmanuel Vadot pinctrl-names = "default"; 267c66ec88fSEmmanuel Vadot pinctrl-0 = <&pinctrl_lpuart0>; 2685def4c47SEmmanuel Vadot clocks = <&uart0_clk IMX_SC_R_UART_0 IMX_SC_PM_CLK_PER>; 2695def4c47SEmmanuel Vadot clock-names = "ipg"; 270c66ec88fSEmmanuel Vadot power-domains = <&pd IMX_SC_R_UART_0>; 271c66ec88fSEmmanuel Vadot}; 272