2012-09-18 11:24:57 +00:00
|
|
|
ARM Versatile Express system registers
|
|
|
|
--------------------------------------
|
|
|
|
|
|
|
|
This is a system control registers block, providing multiple low level
|
|
|
|
platform functions like board detection and identification, software
|
|
|
|
interrupt generation, MMC and NOR Flash control etc.
|
|
|
|
|
|
|
|
Required node properties:
|
|
|
|
- compatible value : = "arm,vexpress,sysreg";
|
|
|
|
- reg : physical base address and the size of the registers window
|
2014-04-23 09:49:31 +00:00
|
|
|
|
|
|
|
Deprecated properties, replaced by GPIO subnodes (see below):
|
2012-09-18 11:24:57 +00:00
|
|
|
- gpio-controller : specifies that the node is a GPIO controller
|
|
|
|
- #gpio-cells : size of the GPIO specifier, should be 2:
|
|
|
|
- first cell is the pseudo-GPIO line number:
|
|
|
|
0 - MMC CARDIN
|
|
|
|
1 - MMC WPROT
|
|
|
|
2 - NOR FLASH WPn
|
|
|
|
- second cell can take standard GPIO flags (currently ignored).
|
|
|
|
|
2014-04-23 09:49:31 +00:00
|
|
|
Control registers providing pseudo-GPIO lines must be represented
|
|
|
|
by subnodes, each of them requiring the following properties:
|
|
|
|
- compatible value : one of
|
|
|
|
"arm,vexpress-sysreg,sys_led"
|
|
|
|
"arm,vexpress-sysreg,sys_mci"
|
|
|
|
"arm,vexpress-sysreg,sys_flash"
|
|
|
|
- gpio-controller : makes the node a GPIO controller
|
|
|
|
- #gpio-cells : size of the GPIO specifier, must be 2:
|
|
|
|
- first cell is the function number:
|
|
|
|
- for sys_led : 0..7 = LED 0..7
|
|
|
|
- for sys_mci : 0 = MMC CARDIN, 1 = MMC WPROT
|
|
|
|
- for sys_flash : 0 = NOR FLASH WPn
|
|
|
|
- second cell can take standard GPIO flags (currently ignored).
|
|
|
|
|
2012-09-18 11:24:57 +00:00
|
|
|
Example:
|
|
|
|
v2m_sysreg: sysreg@10000000 {
|
|
|
|
compatible = "arm,vexpress-sysreg";
|
|
|
|
reg = <0x10000000 0x1000>;
|
2014-04-23 09:49:31 +00:00
|
|
|
|
|
|
|
v2m_led_gpios: sys_led@08 {
|
|
|
|
compatible = "arm,vexpress-sysreg,sys_led";
|
|
|
|
gpio-controller;
|
|
|
|
#gpio-cells = <2>;
|
|
|
|
};
|
|
|
|
|
|
|
|
v2m_mmc_gpios: sys_mci@48 {
|
|
|
|
compatible = "arm,vexpress-sysreg,sys_mci";
|
|
|
|
gpio-controller;
|
|
|
|
#gpio-cells = <2>;
|
|
|
|
};
|
|
|
|
|
|
|
|
v2m_flash_gpios: sys_flash@4c {
|
|
|
|
compatible = "arm,vexpress-sysreg,sys_flash";
|
|
|
|
gpio-controller;
|
|
|
|
#gpio-cells = <2>;
|
|
|
|
};
|
2012-09-18 11:24:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
This block also can also act a bridge to the platform's configuration
|
|
|
|
bus via "system control" interface, addressing devices with site number,
|
|
|
|
position in the board stack, config controller, function and device
|
mfd: vexpress: Convert custom func API to regmap
Components of the Versatile Express platform (configuration
microcontrollers on motherboard and daughterboards in particular)
talk to each other over a custom configuration bus. They
provide miscellaneous functions (from clock generator control
to energy sensors) which are represented as platform devices
(and Device Tree nodes). The transactions on the bus can
be generated by different "bridges" in the system, some
of which are universal for the whole platform (for the price
of high transfer latencies), others restricted to a subsystem
(but much faster).
Until now drivers for such functions were using custom "func"
API, which is being replaced in this patch by regmap calls.
This required:
* a rework (and move to drivers/bus directory, as suggested
by Samuel and Arnd) of the config bus core, which is much
simpler now and uses device model infrastructure (class)
to keep track of the bridges; non-DT case (soon to be
retired anyway) is simply covered by a special device
registration function
* the new config-bus driver also takes over device population,
so there is no need for special matching table for
of_platform_populate nor "simple-bus" hack in the arm64
model dtsi file (relevant bindings documentation has
been updated); this allows all the vexpress devices
fit into normal device model, making it possible
to remove plenty of early inits and other hacks in
the near future
* adaptation of the syscfg bridge implementation in the
sysreg driver, again making it much simpler; there is
a special case of the "energy" function spanning two
registers, where they should be both defined in the tree
now, but backward compatibility is maintained in the code
* modification of the relevant drivers:
* hwmon - just a straight-forward API change
* power/reset driver - API change
* regulator - API change plus error handling
simplification
* osc clock driver - this one required larger rework
in order to turn in into a standard platform driver
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Mike Turquette <mturquette@linaro.org>
2014-04-30 15:46:29 +00:00
|
|
|
numbers - see motherboard's TRM for more details. All configuration
|
|
|
|
controller accessible via this interface must reference the sysreg
|
|
|
|
node via "arm,vexpress,config-bridge" phandle and define appropriate
|
|
|
|
topology properties - see main vexpress node documentation for more
|
|
|
|
details. Each child of such node describes one function and must
|
|
|
|
define the following properties:
|
|
|
|
- compatible value : must be one of (corresponding to the TRM):
|
|
|
|
"arm,vexpress-amp"
|
|
|
|
"arm,vexpress-dvimode"
|
|
|
|
"arm,vexpress-energy"
|
|
|
|
"arm,vexpress-muxfpga"
|
|
|
|
"arm,vexpress-osc"
|
|
|
|
"arm,vexpress-power"
|
|
|
|
"arm,vexpress-reboot"
|
|
|
|
"arm,vexpress-reset"
|
|
|
|
"arm,vexpress-scc"
|
|
|
|
"arm,vexpress-shutdown"
|
|
|
|
"arm,vexpress-temp"
|
|
|
|
"arm,vexpress-volt"
|
|
|
|
- arm,vexpress-sysreg,func : must contain a set of two cells long groups:
|
|
|
|
- first cell of each group defines the function number
|
|
|
|
(eg. 1 for clock generator, 2 for voltage regulators etc.)
|
|
|
|
- second cell of each group defines device number (eg. osc 0,
|
|
|
|
osc 1 etc.)
|
|
|
|
- some functions (eg. energy meter, with its 64 bit long counter)
|
|
|
|
are using more than one function/device number pair
|
2012-09-18 11:24:57 +00:00
|
|
|
|
|
|
|
Example:
|
|
|
|
mcc {
|
mfd: vexpress: Convert custom func API to regmap
Components of the Versatile Express platform (configuration
microcontrollers on motherboard and daughterboards in particular)
talk to each other over a custom configuration bus. They
provide miscellaneous functions (from clock generator control
to energy sensors) which are represented as platform devices
(and Device Tree nodes). The transactions on the bus can
be generated by different "bridges" in the system, some
of which are universal for the whole platform (for the price
of high transfer latencies), others restricted to a subsystem
(but much faster).
Until now drivers for such functions were using custom "func"
API, which is being replaced in this patch by regmap calls.
This required:
* a rework (and move to drivers/bus directory, as suggested
by Samuel and Arnd) of the config bus core, which is much
simpler now and uses device model infrastructure (class)
to keep track of the bridges; non-DT case (soon to be
retired anyway) is simply covered by a special device
registration function
* the new config-bus driver also takes over device population,
so there is no need for special matching table for
of_platform_populate nor "simple-bus" hack in the arm64
model dtsi file (relevant bindings documentation has
been updated); this allows all the vexpress devices
fit into normal device model, making it possible
to remove plenty of early inits and other hacks in
the near future
* adaptation of the syscfg bridge implementation in the
sysreg driver, again making it much simpler; there is
a special case of the "energy" function spanning two
registers, where they should be both defined in the tree
now, but backward compatibility is maintained in the code
* modification of the relevant drivers:
* hwmon - just a straight-forward API change
* power/reset driver - API change
* regulator - API change plus error handling
simplification
* osc clock driver - this one required larger rework
in order to turn in into a standard platform driver
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Mike Turquette <mturquette@linaro.org>
2014-04-30 15:46:29 +00:00
|
|
|
compatible = "arm,vexpress,config-bus";
|
2012-09-18 11:24:57 +00:00
|
|
|
arm,vexpress,config-bridge = <&v2m_sysreg>;
|
|
|
|
|
|
|
|
osc@0 {
|
|
|
|
compatible = "arm,vexpress-osc";
|
|
|
|
arm,vexpress-sysreg,func = <1 0>;
|
|
|
|
};
|
mfd: vexpress: Convert custom func API to regmap
Components of the Versatile Express platform (configuration
microcontrollers on motherboard and daughterboards in particular)
talk to each other over a custom configuration bus. They
provide miscellaneous functions (from clock generator control
to energy sensors) which are represented as platform devices
(and Device Tree nodes). The transactions on the bus can
be generated by different "bridges" in the system, some
of which are universal for the whole platform (for the price
of high transfer latencies), others restricted to a subsystem
(but much faster).
Until now drivers for such functions were using custom "func"
API, which is being replaced in this patch by regmap calls.
This required:
* a rework (and move to drivers/bus directory, as suggested
by Samuel and Arnd) of the config bus core, which is much
simpler now and uses device model infrastructure (class)
to keep track of the bridges; non-DT case (soon to be
retired anyway) is simply covered by a special device
registration function
* the new config-bus driver also takes over device population,
so there is no need for special matching table for
of_platform_populate nor "simple-bus" hack in the arm64
model dtsi file (relevant bindings documentation has
been updated); this allows all the vexpress devices
fit into normal device model, making it possible
to remove plenty of early inits and other hacks in
the near future
* adaptation of the syscfg bridge implementation in the
sysreg driver, again making it much simpler; there is
a special case of the "energy" function spanning two
registers, where they should be both defined in the tree
now, but backward compatibility is maintained in the code
* modification of the relevant drivers:
* hwmon - just a straight-forward API change
* power/reset driver - API change
* regulator - API change plus error handling
simplification
* osc clock driver - this one required larger rework
in order to turn in into a standard platform driver
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Mike Turquette <mturquette@linaro.org>
2014-04-30 15:46:29 +00:00
|
|
|
|
|
|
|
energy@0 {
|
|
|
|
compatible = "arm,vexpress-energy";
|
|
|
|
arm,vexpress-sysreg,func = <13 0>, <13 1>;
|
|
|
|
};
|
2012-09-18 11:24:57 +00:00
|
|
|
};
|