Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 486ad2ed authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'vexpress/updates-for-3.16' of...

Merge tag 'vexpress/updates-for-3.16' of git://git.linaro.org/people/pawel.moll/linux into next/cleanup

Merge "ARM Versatile Express updates for 3.16" from Pawel Moll:

This series reworks VE's platform configuration infrastructure by:

- making it possible to instantiate selected devices from the
  Device Tree, prior to massive population,
- converting custom "func" API into standard "regmap",
- splitting the existing MFD driver into smaller ones and placing
  them into relevant directories.

The common clock framework driver can now be selected individually
(mostly for arm64 sake, where some of them are not used at all).

It also simplifies the machine code, by:

- moving the shed clock info clocksource driver,
- simplifying SMP operations to base them entirely of the DT data,
- moving platform ID checks into relevant driver.

* tag 'vexpress/updates-for-3.16' of git://git.linaro.org/people/pawel.moll/linux

:
  ARM: vexpress: move HBI check to sysreg driver
  ARM: vexpress: Simplify SMP operations for DT-powered system
  ARM: vexpress: remove redundant vexpress_dt_cpus_num to get cpu count
  clocksource: Sched clock source for Versatile Express
  clk: versatile: Split config options for sp810 and vexpress_osc
  mfd: vexpress: Define the device as MFD cells
  mfd: syscon: Add platform data with a regmap config name
  mfd: vexpress: Convert custom func API to regmap
  of: Keep track of populated platform devices
  + Linux 3.15-rc5

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents 9e05f9f3 6b2c31c7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,9 @@ to deliver its interrupts via SPIs.

- clock-frequency : The frequency of the main counter, in Hz. Optional.

- always-on : a boolean property. If present, the timer is powered through an
  always-on power domain, therefore it never loses context.

Example:

	timer {
+66 −13
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@ 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

Deprecated properties, replaced by GPIO subnodes (see below):
- 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:
@@ -16,35 +18,86 @@ Required node properties:
    2 - NOR FLASH WPn
  - second cell can take standard GPIO flags (currently ignored).

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).

Example:
	v2m_sysreg: sysreg@10000000 {
 		compatible = "arm,vexpress-sysreg";
 		reg = <0x10000000 0x1000>;

		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>;
		};
 	};

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
numbers - see motherboard's TRM for more details.

The node describing a config device must refer to the sysreg node via
"arm,vexpress,config-bridge" phandle (can be also defined in the node's
parent) and relies on the board topology properties - see main vexpress
node documentation for more details. It must also define the following
property:
- arm,vexpress-sysreg,func : must contain two cells:
  - first cell defines function number (eg. 1 for clock generator,
    2 for voltage regulators etc.)
  - device number (eg. osc 0, osc 1 etc.)
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

Example:
	mcc {
		compatible = "arm,vexpress,config-bus";
		arm,vexpress,config-bridge = <&v2m_sysreg>;

		osc@0 {
			compatible = "arm,vexpress-osc";
			arm,vexpress-sysreg,func = <1 0>;
		};

		energy@0 {
			compatible = "arm,vexpress-energy";
			arm,vexpress-sysreg,func = <13 0>, <13 1>;
		};
	};
+10 −5
Original line number Diff line number Diff line
@@ -80,12 +80,17 @@ but also control clock generators, voltage regulators, gather
environmental data like temperature, power consumption etc. Even
the video output switch (FPGA) is controlled that way.

Nodes describing devices controlled by this infrastructure should
point at the bridge device node:
The controllers are not mapped into normal memory address space
and must be accessed through bridges - other devices capable
of generating transactions on the configuration bus.

The nodes describing configuration controllers must define
the following properties:
- compatible value:
	compatible = "arm,vexpress,config-bus";
- bridge phandle:
	arm,vexpress,config-bridge = <phandle>;
This property can be also defined in a parent node (eg. for a DCC)
and is effective for all children.
and children describing available functions.


Platform topology
@@ -197,7 +202,7 @@ Example of a VE tile description (simplified)
	};

	dcc {
		compatible = "simple-bus";
		compatible = "arm,vexpress,config-bus";
		arm,vexpress,config-bridge = <&v2m_sysreg>;

		osc@0 {
+3 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ Required properties:
  * "sata-phy" for the SATA 6.0Gbps PHY

Optional properties:
- dma-coherent		: Present if dma operations are coherent
- status		: Shall be "ok" if enabled or "disabled" if disabled.
			  Default is "ok".

@@ -55,6 +56,7 @@ Example:
			      <0x0 0x1f22e000 0x0 0x1000>,
			      <0x0 0x1f227000 0x0 0x1000>;
			interrupts = <0x0 0x87 0x4>;
			dma-coherent;
			status = "ok";
			clocks = <&sataclk 0>;
			phys = <&phy2 0>;
@@ -69,6 +71,7 @@ Example:
			      <0x0 0x1f23e000 0x0 0x1000>,
			      <0x0 0x1f237000 0x0 0x1000>;
			interrupts = <0x0 0x88 0x4>;
			dma-coherent;
			status = "ok";
			clocks = <&sataclk 0>;
			phys = <&phy3 0>;
+10 −2
Original line number Diff line number Diff line
@@ -4,11 +4,15 @@ Required properties:
- compatible: Should be "snps,arc-emac"
- reg: Address and length of the register set for the device
- interrupts: Should contain the EMAC interrupts
- clock-frequency: CPU frequency. It is needed to calculate and set polling
period of EMAC.
- max-speed: see ethernet.txt file in the same directory.
- phy: see ethernet.txt file in the same directory.

Clock handling:
The clock frequency is needed to calculate and set polling period of EMAC.
It must be provided by one of:
- clock-frequency: CPU frequency.
- clocks: reference to the clock supplying the EMAC.

Child nodes of the driver are the individual PHY devices connected to the
MDIO bus. They must have a "reg" property given the PHY address on the MDIO bus.

@@ -19,7 +23,11 @@ Examples:
		reg = <0xc0fc2000 0x3c>;
		interrupts = <6>;
		mac-address = [ 00 11 22 33 44 55 ];

		clock-frequency = <80000000>;
		/* or */
		clocks = <&emac_clock>;

		max-speed = <100>;
		phy = <&phy0>;

Loading