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