xref: /freebsd/sys/contrib/device-tree/Bindings/arm/vexpress-sysreg.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotARM Versatile Express system registers
2*c66ec88fSEmmanuel Vadot--------------------------------------
3*c66ec88fSEmmanuel Vadot
4*c66ec88fSEmmanuel VadotThis is a system control registers block, providing multiple low level
5*c66ec88fSEmmanuel Vadotplatform functions like board detection and identification, software
6*c66ec88fSEmmanuel Vadotinterrupt generation, MMC and NOR Flash control etc.
7*c66ec88fSEmmanuel Vadot
8*c66ec88fSEmmanuel VadotRequired node properties:
9*c66ec88fSEmmanuel Vadot- compatible value : = "arm,vexpress,sysreg";
10*c66ec88fSEmmanuel Vadot- reg : physical base address and the size of the registers window
11*c66ec88fSEmmanuel Vadot
12*c66ec88fSEmmanuel VadotDeprecated properties, replaced by GPIO subnodes (see below):
13*c66ec88fSEmmanuel Vadot- gpio-controller : specifies that the node is a GPIO controller
14*c66ec88fSEmmanuel Vadot- #gpio-cells : size of the GPIO specifier, should be 2:
15*c66ec88fSEmmanuel Vadot  - first cell is the pseudo-GPIO line number:
16*c66ec88fSEmmanuel Vadot    0 - MMC CARDIN
17*c66ec88fSEmmanuel Vadot    1 - MMC WPROT
18*c66ec88fSEmmanuel Vadot    2 - NOR FLASH WPn
19*c66ec88fSEmmanuel Vadot  - second cell can take standard GPIO flags (currently ignored).
20*c66ec88fSEmmanuel Vadot
21*c66ec88fSEmmanuel VadotControl registers providing pseudo-GPIO lines must be represented
22*c66ec88fSEmmanuel Vadotby subnodes, each of them requiring the following properties:
23*c66ec88fSEmmanuel Vadot- compatible value : one of
24*c66ec88fSEmmanuel Vadot			"arm,vexpress-sysreg,sys_led"
25*c66ec88fSEmmanuel Vadot			"arm,vexpress-sysreg,sys_mci"
26*c66ec88fSEmmanuel Vadot			"arm,vexpress-sysreg,sys_flash"
27*c66ec88fSEmmanuel Vadot- gpio-controller : makes the node a GPIO controller
28*c66ec88fSEmmanuel Vadot- #gpio-cells : size of the GPIO specifier, must be 2:
29*c66ec88fSEmmanuel Vadot  - first cell is the function number:
30*c66ec88fSEmmanuel Vadot    - for sys_led : 0..7 = LED 0..7
31*c66ec88fSEmmanuel Vadot    - for sys_mci : 0 = MMC CARDIN, 1 = MMC WPROT
32*c66ec88fSEmmanuel Vadot    - for sys_flash : 0 = NOR FLASH WPn
33*c66ec88fSEmmanuel Vadot  - second cell can take standard GPIO flags (currently ignored).
34*c66ec88fSEmmanuel Vadot
35*c66ec88fSEmmanuel VadotExample:
36*c66ec88fSEmmanuel Vadot	v2m_sysreg: sysreg@10000000 {
37*c66ec88fSEmmanuel Vadot 		compatible = "arm,vexpress-sysreg";
38*c66ec88fSEmmanuel Vadot 		reg = <0x10000000 0x1000>;
39*c66ec88fSEmmanuel Vadot
40*c66ec88fSEmmanuel Vadot		v2m_led_gpios: sys_led@8 {
41*c66ec88fSEmmanuel Vadot			compatible = "arm,vexpress-sysreg,sys_led";
42*c66ec88fSEmmanuel Vadot			gpio-controller;
43*c66ec88fSEmmanuel Vadot			#gpio-cells = <2>;
44*c66ec88fSEmmanuel Vadot		};
45*c66ec88fSEmmanuel Vadot
46*c66ec88fSEmmanuel Vadot		v2m_mmc_gpios: sys_mci@48 {
47*c66ec88fSEmmanuel Vadot			compatible = "arm,vexpress-sysreg,sys_mci";
48*c66ec88fSEmmanuel Vadot			gpio-controller;
49*c66ec88fSEmmanuel Vadot			#gpio-cells = <2>;
50*c66ec88fSEmmanuel Vadot		};
51*c66ec88fSEmmanuel Vadot
52*c66ec88fSEmmanuel Vadot		v2m_flash_gpios: sys_flash@4c {
53*c66ec88fSEmmanuel Vadot			compatible = "arm,vexpress-sysreg,sys_flash";
54*c66ec88fSEmmanuel Vadot			gpio-controller;
55*c66ec88fSEmmanuel Vadot			#gpio-cells = <2>;
56*c66ec88fSEmmanuel Vadot		};
57*c66ec88fSEmmanuel Vadot 	};
58*c66ec88fSEmmanuel Vadot
59*c66ec88fSEmmanuel VadotThis block also can also act a bridge to the platform's configuration
60*c66ec88fSEmmanuel Vadotbus via "system control" interface, addressing devices with site number,
61*c66ec88fSEmmanuel Vadotposition in the board stack, config controller, function and device
62*c66ec88fSEmmanuel Vadotnumbers - see motherboard's TRM for more details. All configuration
63*c66ec88fSEmmanuel Vadotcontroller accessible via this interface must reference the sysreg
64*c66ec88fSEmmanuel Vadotnode via "arm,vexpress,config-bridge" phandle and define appropriate
65*c66ec88fSEmmanuel Vadottopology properties - see main vexpress node documentation for more
66*c66ec88fSEmmanuel Vadotdetails. Each child of such node describes one function and must
67*c66ec88fSEmmanuel Vadotdefine the following properties:
68*c66ec88fSEmmanuel Vadot- compatible value : must be one of (corresponding to the TRM):
69*c66ec88fSEmmanuel Vadot	"arm,vexpress-amp"
70*c66ec88fSEmmanuel Vadot	"arm,vexpress-dvimode"
71*c66ec88fSEmmanuel Vadot	"arm,vexpress-energy"
72*c66ec88fSEmmanuel Vadot	"arm,vexpress-muxfpga"
73*c66ec88fSEmmanuel Vadot	"arm,vexpress-osc"
74*c66ec88fSEmmanuel Vadot	"arm,vexpress-power"
75*c66ec88fSEmmanuel Vadot	"arm,vexpress-reboot"
76*c66ec88fSEmmanuel Vadot	"arm,vexpress-reset"
77*c66ec88fSEmmanuel Vadot	"arm,vexpress-scc"
78*c66ec88fSEmmanuel Vadot	"arm,vexpress-shutdown"
79*c66ec88fSEmmanuel Vadot	"arm,vexpress-temp"
80*c66ec88fSEmmanuel Vadot	"arm,vexpress-volt"
81*c66ec88fSEmmanuel Vadot- arm,vexpress-sysreg,func : must contain a set of two cells long groups:
82*c66ec88fSEmmanuel Vadot  - first cell of each group defines the function number
83*c66ec88fSEmmanuel Vadot    (eg. 1 for clock generator, 2 for voltage regulators etc.)
84*c66ec88fSEmmanuel Vadot  - second cell of each group defines device number (eg. osc 0,
85*c66ec88fSEmmanuel Vadot    osc 1 etc.)
86*c66ec88fSEmmanuel Vadot  - some functions (eg. energy meter, with its 64 bit long counter)
87*c66ec88fSEmmanuel Vadot    are using more than one function/device number pair
88*c66ec88fSEmmanuel Vadot
89*c66ec88fSEmmanuel VadotExample:
90*c66ec88fSEmmanuel Vadot	mcc {
91*c66ec88fSEmmanuel Vadot		compatible = "arm,vexpress,config-bus";
92*c66ec88fSEmmanuel Vadot		arm,vexpress,config-bridge = <&v2m_sysreg>;
93*c66ec88fSEmmanuel Vadot
94*c66ec88fSEmmanuel Vadot		osc@0 {
95*c66ec88fSEmmanuel Vadot			compatible = "arm,vexpress-osc";
96*c66ec88fSEmmanuel Vadot			arm,vexpress-sysreg,func = <1 0>;
97*c66ec88fSEmmanuel Vadot		};
98*c66ec88fSEmmanuel Vadot
99*c66ec88fSEmmanuel Vadot		energy@0 {
100*c66ec88fSEmmanuel Vadot			compatible = "arm,vexpress-energy";
101*c66ec88fSEmmanuel Vadot			arm,vexpress-sysreg,func = <13 0>, <13 1>;
102*c66ec88fSEmmanuel Vadot		};
103*c66ec88fSEmmanuel Vadot	};
104