18c2ecf20Sopenharmony_ciARM Versatile Express system registers
28c2ecf20Sopenharmony_ci--------------------------------------
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ciThis is a system control registers block, providing multiple low level
58c2ecf20Sopenharmony_ciplatform functions like board detection and identification, software
68c2ecf20Sopenharmony_ciinterrupt generation, MMC and NOR Flash control etc.
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ciRequired node properties:
98c2ecf20Sopenharmony_ci- compatible value : = "arm,vexpress,sysreg";
108c2ecf20Sopenharmony_ci- reg : physical base address and the size of the registers window
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ciDeprecated properties, replaced by GPIO subnodes (see below):
138c2ecf20Sopenharmony_ci- gpio-controller : specifies that the node is a GPIO controller
148c2ecf20Sopenharmony_ci- #gpio-cells : size of the GPIO specifier, should be 2:
158c2ecf20Sopenharmony_ci  - first cell is the pseudo-GPIO line number:
168c2ecf20Sopenharmony_ci    0 - MMC CARDIN
178c2ecf20Sopenharmony_ci    1 - MMC WPROT
188c2ecf20Sopenharmony_ci    2 - NOR FLASH WPn
198c2ecf20Sopenharmony_ci  - second cell can take standard GPIO flags (currently ignored).
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciControl registers providing pseudo-GPIO lines must be represented
228c2ecf20Sopenharmony_ciby subnodes, each of them requiring the following properties:
238c2ecf20Sopenharmony_ci- compatible value : one of
248c2ecf20Sopenharmony_ci			"arm,vexpress-sysreg,sys_led"
258c2ecf20Sopenharmony_ci			"arm,vexpress-sysreg,sys_mci"
268c2ecf20Sopenharmony_ci			"arm,vexpress-sysreg,sys_flash"
278c2ecf20Sopenharmony_ci- gpio-controller : makes the node a GPIO controller
288c2ecf20Sopenharmony_ci- #gpio-cells : size of the GPIO specifier, must be 2:
298c2ecf20Sopenharmony_ci  - first cell is the function number:
308c2ecf20Sopenharmony_ci    - for sys_led : 0..7 = LED 0..7
318c2ecf20Sopenharmony_ci    - for sys_mci : 0 = MMC CARDIN, 1 = MMC WPROT
328c2ecf20Sopenharmony_ci    - for sys_flash : 0 = NOR FLASH WPn
338c2ecf20Sopenharmony_ci  - second cell can take standard GPIO flags (currently ignored).
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciExample:
368c2ecf20Sopenharmony_ci	v2m_sysreg: sysreg@10000000 {
378c2ecf20Sopenharmony_ci 		compatible = "arm,vexpress-sysreg";
388c2ecf20Sopenharmony_ci 		reg = <0x10000000 0x1000>;
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci		v2m_led_gpios: sys_led@8 {
418c2ecf20Sopenharmony_ci			compatible = "arm,vexpress-sysreg,sys_led";
428c2ecf20Sopenharmony_ci			gpio-controller;
438c2ecf20Sopenharmony_ci			#gpio-cells = <2>;
448c2ecf20Sopenharmony_ci		};
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci		v2m_mmc_gpios: sys_mci@48 {
478c2ecf20Sopenharmony_ci			compatible = "arm,vexpress-sysreg,sys_mci";
488c2ecf20Sopenharmony_ci			gpio-controller;
498c2ecf20Sopenharmony_ci			#gpio-cells = <2>;
508c2ecf20Sopenharmony_ci		};
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci		v2m_flash_gpios: sys_flash@4c {
538c2ecf20Sopenharmony_ci			compatible = "arm,vexpress-sysreg,sys_flash";
548c2ecf20Sopenharmony_ci			gpio-controller;
558c2ecf20Sopenharmony_ci			#gpio-cells = <2>;
568c2ecf20Sopenharmony_ci		};
578c2ecf20Sopenharmony_ci 	};
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ciThis block also can also act a bridge to the platform's configuration
608c2ecf20Sopenharmony_cibus via "system control" interface, addressing devices with site number,
618c2ecf20Sopenharmony_ciposition in the board stack, config controller, function and device
628c2ecf20Sopenharmony_cinumbers - see motherboard's TRM for more details. All configuration
638c2ecf20Sopenharmony_cicontroller accessible via this interface must reference the sysreg
648c2ecf20Sopenharmony_cinode via "arm,vexpress,config-bridge" phandle and define appropriate
658c2ecf20Sopenharmony_citopology properties - see main vexpress node documentation for more
668c2ecf20Sopenharmony_cidetails. Each child of such node describes one function and must
678c2ecf20Sopenharmony_cidefine the following properties:
688c2ecf20Sopenharmony_ci- compatible value : must be one of (corresponding to the TRM):
698c2ecf20Sopenharmony_ci	"arm,vexpress-amp"
708c2ecf20Sopenharmony_ci	"arm,vexpress-dvimode"
718c2ecf20Sopenharmony_ci	"arm,vexpress-energy"
728c2ecf20Sopenharmony_ci	"arm,vexpress-muxfpga"
738c2ecf20Sopenharmony_ci	"arm,vexpress-osc"
748c2ecf20Sopenharmony_ci	"arm,vexpress-power"
758c2ecf20Sopenharmony_ci	"arm,vexpress-reboot"
768c2ecf20Sopenharmony_ci	"arm,vexpress-reset"
778c2ecf20Sopenharmony_ci	"arm,vexpress-scc"
788c2ecf20Sopenharmony_ci	"arm,vexpress-shutdown"
798c2ecf20Sopenharmony_ci	"arm,vexpress-temp"
808c2ecf20Sopenharmony_ci	"arm,vexpress-volt"
818c2ecf20Sopenharmony_ci- arm,vexpress-sysreg,func : must contain a set of two cells long groups:
828c2ecf20Sopenharmony_ci  - first cell of each group defines the function number
838c2ecf20Sopenharmony_ci    (eg. 1 for clock generator, 2 for voltage regulators etc.)
848c2ecf20Sopenharmony_ci  - second cell of each group defines device number (eg. osc 0,
858c2ecf20Sopenharmony_ci    osc 1 etc.)
868c2ecf20Sopenharmony_ci  - some functions (eg. energy meter, with its 64 bit long counter)
878c2ecf20Sopenharmony_ci    are using more than one function/device number pair
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ciExample:
908c2ecf20Sopenharmony_ci	mcc {
918c2ecf20Sopenharmony_ci		compatible = "arm,vexpress,config-bus";
928c2ecf20Sopenharmony_ci		arm,vexpress,config-bridge = <&v2m_sysreg>;
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_ci		osc@0 {
958c2ecf20Sopenharmony_ci			compatible = "arm,vexpress-osc";
968c2ecf20Sopenharmony_ci			arm,vexpress-sysreg,func = <1 0>;
978c2ecf20Sopenharmony_ci		};
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_ci		energy@0 {
1008c2ecf20Sopenharmony_ci			compatible = "arm,vexpress-energy";
1018c2ecf20Sopenharmony_ci			arm,vexpress-sysreg,func = <13 0>, <13 1>;
1028c2ecf20Sopenharmony_ci		};
1038c2ecf20Sopenharmony_ci	};
104