Skip to content

Commit 6afd563

Browse files
committed
Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC driver updates from Arnd Bergmann: "Driver updates for ARM SoCs, including a couple of newly added drivers: - The Qualcomm external bus interface 2 (EBI2), used in some of their mobile phone chips for connecting flash memory, LCD displays or other peripherals - Secure monitor firmware for Amlogic SoCs, and an NVMEM driver for the EFUSE based on that firmware interface. - Perf support for the AppliedMicro X-Gene performance monitor unit - Reset driver for STMicroelectronics STM32 - Reset driver for SocioNext UniPhier SoCs Aside from these, there are minor updates to SoC-specific bus, clocksource, firmware, pinctrl, reset, rtc and pmic drivers" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (50 commits) bus: qcom-ebi2: depend on HAS_IOMEM pinctrl: mvebu: orion5x: Generalise mv88f5181l support for 88f5181 clk: mvebu: Add clk support for the orion5x SoC mv88f5181 dt-bindings: EXYNOS: Add Exynos5433 PMU compatible clocksource: exynos_mct: Add the support for ARM64 perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver Documentation: Add documentation for APM X-Gene SoC PMU DTS binding MAINTAINERS: Add entry for APM X-Gene SoC PMU driver bus: qcom: add EBI2 driver bus: qcom: add EBI2 device tree bindings rtc: rtc-pm8xxx: Add support for pm8018 rtc nvmem: amlogic: Add Amlogic Meson EFUSE driver firmware: Amlogic: Add secure monitor driver soc: qcom: smd: Reset rx tail rather than tx memory: atmel-sdramc: fix a possible NULL dereference reset: hi6220: allow to compile test driver on other architectures reset: zynq: add driver Kconfig option reset: sunxi: add driver Kconfig option reset: stm32: add driver Kconfig option reset: socfpga: add driver Kconfig option ...
2 parents b4f33f6 + d6db68b commit 6afd563

52 files changed

Lines changed: 3789 additions & 290 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/devicetree/bindings/arm/samsung/pmu.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Properties:
1010
- "samsung,exynos5260-pmu" - for Exynos5260 SoC.
1111
- "samsung,exynos5410-pmu" - for Exynos5410 SoC,
1212
- "samsung,exynos5420-pmu" - for Exynos5420 SoC.
13+
- "samsung,exynos5433-pmu" - for Exynos5433 SoC.
1314
- "samsung,exynos7-pmu" - for Exynos7 SoC.
1415
second value must be always "syscon".
1516

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
Qualcomm External Bus Interface 2 (EBI2)
2+
3+
The EBI2 contains two peripheral blocks: XMEM and LCDC. The XMEM handles any
4+
external memory (such as NAND or other memory-mapped peripherals) whereas
5+
LCDC handles LCD displays.
6+
7+
As it says it connects devices to an external bus interface, meaning address
8+
lines (up to 9 address lines so can only address 1KiB external memory space),
9+
data lines (16 bits), OE (output enable), ADV (address valid, used on some
10+
NOR flash memories), WE (write enable). This on top of 6 different chip selects
11+
(CS0 thru CS5) so that in theory 6 different devices can be connected.
12+
13+
Apparently this bus is clocked at 64MHz. It has dedicated pins on the package
14+
and the bus can only come out on these pins, however if some of the pins are
15+
unused they can be left unconnected or remuxed to be used as GPIO or in some
16+
cases other orthogonal functions as well.
17+
18+
Also CS1 and CS2 has -A and -B signals. Why they have that is unclear to me.
19+
20+
The chip selects have the following memory range assignments. This region of
21+
memory is referred to as "Chip Peripheral SS FPB0" and is 168MB big.
22+
23+
Chip Select Physical address base
24+
CS0 GPIO134 0x1a800000-0x1b000000 (8MB)
25+
CS1 GPIO39 (A) / GPIO123 (B) 0x1b000000-0x1b800000 (8MB)
26+
CS2 GPIO40 (A) / GPIO124 (B) 0x1b800000-0x1c000000 (8MB)
27+
CS3 GPIO133 0x1d000000-0x25000000 (128 MB)
28+
CS4 GPIO132 0x1c800000-0x1d000000 (8MB)
29+
CS5 GPIO131 0x1c000000-0x1c800000 (8MB)
30+
31+
The APQ8060 Qualcomm Application Processor User Guide, 80-N7150-14 Rev. A,
32+
August 6, 2012 contains some incomplete documentation of the EBI2.
33+
34+
FIXME: the manual mentions "write precharge cycles" and "precharge cycles".
35+
We have not been able to figure out which bit fields these correspond to
36+
in the hardware, or what valid values exist. The current hypothesis is that
37+
this is something just used on the FAST chip selects and that the SLOW
38+
chip selects are understood fully. There is also a "byte device enable"
39+
flag somewhere for 8bit memories.
40+
41+
FIXME: The chipselects have SLOW and FAST configuration registers. It's a bit
42+
unclear what this means, if they are mutually exclusive or can be used
43+
together, or if some chip selects are hardwired to be FAST and others are SLOW
44+
by design.
45+
46+
The XMEM registers are totally undocumented but could be partially decoded
47+
because the Cypress AN49576 Antioch Westbridge apparently has suspiciously
48+
similar register layout, see: http://www.cypress.com/file/105771/download
49+
50+
Required properties:
51+
- compatible: should be one of:
52+
"qcom,msm8660-ebi2"
53+
"qcom,apq8060-ebi2"
54+
- #address-cells: shoule be <2>: the first cell is the chipselect,
55+
the second cell is the offset inside the memory range
56+
- #size-cells: should be <1>
57+
- ranges: should be set to:
58+
ranges = <0 0x0 0x1a800000 0x00800000>,
59+
<1 0x0 0x1b000000 0x00800000>,
60+
<2 0x0 0x1b800000 0x00800000>,
61+
<3 0x0 0x1d000000 0x08000000>,
62+
<4 0x0 0x1c800000 0x00800000>,
63+
<5 0x0 0x1c000000 0x00800000>;
64+
- reg: two ranges of registers: EBI2 config and XMEM config areas
65+
- reg-names: should be "ebi2", "xmem"
66+
- clocks: two clocks, EBI_2X and EBI
67+
- clock-names: shoule be "ebi2x", "ebi2"
68+
69+
Optional subnodes:
70+
- Nodes inside the EBI2 will be considered device nodes.
71+
72+
The following optional properties are properties that can be tagged onto
73+
any device subnode. We are assuming that there can be only ONE device per
74+
chipselect subnode, else the properties will become ambigous.
75+
76+
Optional properties arrays for SLOW chip selects:
77+
- qcom,xmem-recovery-cycles: recovery cycles is the time the memory continues to
78+
drive the data bus after OE is de-asserted, in order to avoid contention on
79+
the data bus. They are inserted when reading one CS and switching to another
80+
CS or read followed by write on the same CS. Valid values 0 thru 15. Minimum
81+
value is actually 1, so a value of 0 will still yield 1 recovery cycle.
82+
- qcom,xmem-write-hold-cycles: write hold cycles, these are extra cycles
83+
inserted after every write minimum 1. The data out is driven from the time
84+
WE is asserted until CS is asserted. With a hold of 1 (value = 0), the CS
85+
stays active for 1 extra cycle etc. Valid values 0 thru 15.
86+
- qcom,xmem-write-delta-cycles: initial latency for write cycles inserted for
87+
the first write to a page or burst memory. Valid values 0 thru 255.
88+
- qcom,xmem-read-delta-cycles: initial latency for read cycles inserted for the
89+
first read to a page or burst memory. Valid values 0 thru 255.
90+
- qcom,xmem-write-wait-cycles: number of wait cycles for every write access, 0=1
91+
cycle. Valid values 0 thru 15.
92+
- qcom,xmem-read-wait-cycles: number of wait cycles for every read access, 0=1
93+
cycle. Valid values 0 thru 15.
94+
95+
Optional properties arrays for FAST chip selects:
96+
- qcom,xmem-address-hold-enable: this is a boolean property stating that we
97+
shall hold the address for an extra cycle to meet hold time requirements
98+
with ADV assertion.
99+
- qcom,xmem-adv-to-oe-recovery-cycles: the number of cycles elapsed before an OE
100+
assertion, with respect to the cycle where ADV (address valid) is asserted.
101+
2 means 2 cycles between ADV and OE. Valid values 0, 1, 2 or 3.
102+
- qcom,xmem-read-hold-cycles: the length in cycles of the first segment of a
103+
read transfer. For a single read trandfer this will be the time from CS
104+
assertion to OE assertion. Valid values 0 thru 15.
105+
106+
107+
Example:
108+
109+
ebi2@1a100000 {
110+
compatible = "qcom,apq8060-ebi2";
111+
#address-cells = <2>;
112+
#size-cells = <1>;
113+
ranges = <0 0x0 0x1a800000 0x00800000>,
114+
<1 0x0 0x1b000000 0x00800000>,
115+
<2 0x0 0x1b800000 0x00800000>,
116+
<3 0x0 0x1d000000 0x08000000>,
117+
<4 0x0 0x1c800000 0x00800000>,
118+
<5 0x0 0x1c000000 0x00800000>;
119+
reg = <0x1a100000 0x1000>, <0x1a110000 0x1000>;
120+
reg-names = "ebi2", "xmem";
121+
clocks = <&gcc EBI2_2X_CLK>, <&gcc EBI2_CLK>;
122+
clock-names = "ebi2x", "ebi2";
123+
/* Make sure to set up the pin control for the EBI2 */
124+
pinctrl-names = "default";
125+
pinctrl-0 = <&foo_ebi2_pins>;
126+
127+
foo-ebi2@2,0 {
128+
compatible = "foo";
129+
reg = <2 0x0 0x100>;
130+
(...)
131+
qcom,xmem-recovery-cycles = <0>;
132+
qcom,xmem-write-hold-cycles = <3>;
133+
qcom,xmem-write-delta-cycles = <31>;
134+
qcom,xmem-read-delta-cycles = <28>;
135+
qcom,xmem-write-wait-cycles = <9>;
136+
qcom,xmem-read-wait-cycles = <9>;
137+
};
138+
};

‎Documentation/devicetree/bindings/clock/mvebu-core-clock.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Required properties:
5252
"marvell,dove-core-clock" - for Dove SoC core clocks
5353
"marvell,kirkwood-core-clock" - for Kirkwood SoC (except mv88f6180)
5454
"marvell,mv88f6180-core-clock" - for Kirkwood MV88f6180 SoC
55+
"marvell,mv88f5181-core-clock" - for Orion MV88F5181 SoC
5556
"marvell,mv88f5182-core-clock" - for Orion MV88F5182 SoC
5657
"marvell,mv88f5281-core-clock" - for Orion MV88F5281 SoC
5758
"marvell,mv88f6183-core-clock" - for Orion MV88F6183 SoC

‎Documentation/devicetree/bindings/clock/st,stm32-rcc.txt‎

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
STMicroelectronics STM32 Reset and Clock Controller
22
===================================================
33

4-
The RCC IP is both a reset and a clock controller. This documentation only
5-
describes the clock part.
4+
The RCC IP is both a reset and a clock controller.
65

7-
Please also refer to clock-bindings.txt in this directory for common clock
8-
controller binding usage.
6+
Please refer to clock-bindings.txt for common clock controller binding usage.
7+
Please also refer to reset.txt for common reset controller binding usage.
98

109
Required properties:
1110
- compatible: Should be "st,stm32f42xx-rcc"
1211
- reg: should be register base and length as documented in the
1312
datasheet
13+
- #reset-cells: 1, see below
1414
- #clock-cells: 2, device nodes should specify the clock in their "clocks"
1515
property, containing a phandle to the clock device node, an index selecting
1616
between gated clocks and other clocks and an index specifying the clock to
@@ -19,6 +19,7 @@ Required properties:
1919
Example:
2020

2121
rcc: rcc@40023800 {
22+
#reset-cells = <1>;
2223
#clock-cells = <2>
2324
compatible = "st,stm32f42xx-rcc", "st,stm32-rcc";
2425
reg = <0x40023800 0x400>;
@@ -35,16 +36,23 @@ from the first RCC clock enable register (RCC_AHB1ENR, address offset 0x30).
3536
It is calculated as: index = register_offset / 4 * 32 + bit_offset.
3637
Where bit_offset is the bit offset within the register (LSB is 0, MSB is 31).
3738

39+
To simplify the usage and to share bit definition with the reset and clock
40+
drivers of the RCC IP, macros are available to generate the index in
41+
human-readble format.
42+
43+
For STM32F4 series, the macro are available here:
44+
- include/dt-bindings/mfd/stm32f4-rcc.h
45+
3846
Example:
3947

4048
/* Gated clock, AHB1 bit 0 (GPIOA) */
4149
... {
42-
clocks = <&rcc 0 0>
50+
clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOA)>
4351
};
4452

4553
/* Gated clock, AHB2 bit 4 (CRYP) */
4654
... {
47-
clocks = <&rcc 0 36>
55+
clocks = <&rcc 0 STM32F4_AHB2_CLOCK(CRYP)>
4856
};
4957

5058
Specifying other clocks
@@ -61,5 +69,25 @@ Example:
6169

6270
/* Misc clock, FCLK */
6371
... {
64-
clocks = <&rcc 1 1>
72+
clocks = <&rcc 1 STM32F4_APB1_CLOCK(TIM2)>
73+
};
74+
75+
76+
Specifying softreset control of devices
77+
=======================================
78+
79+
Device nodes should specify the reset channel required in their "resets"
80+
property, containing a phandle to the reset device node and an index specifying
81+
which channel to use.
82+
The index is the bit number within the RCC registers bank, starting from RCC
83+
base address.
84+
It is calculated as: index = register_offset / 4 * 32 + bit_offset.
85+
Where bit_offset is the bit offset within the register.
86+
For example, for CRC reset:
87+
crc = AHB1RSTR_offset / 4 * 32 + CRCRST_bit_offset = 0x10 / 4 * 32 + 12 = 140
88+
89+
example:
90+
91+
timer2 {
92+
resets = <&rcc STM32F4_APB1_RESET(TIM2)>;
6593
};
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
* APM X-Gene SoC PMU bindings
2+
3+
This is APM X-Gene SoC PMU (Performance Monitoring Unit) module.
4+
The following PMU devices are supported:
5+
6+
L3C - L3 cache controller
7+
IOB - IO bridge
8+
MCB - Memory controller bridge
9+
MC - Memory controller
10+
11+
The following section describes the SoC PMU DT node binding.
12+
13+
Required properties:
14+
- compatible : Shall be "apm,xgene-pmu" for revision 1 or
15+
"apm,xgene-pmu-v2" for revision 2.
16+
- regmap-csw : Regmap of the CPU switch fabric (CSW) resource.
17+
- regmap-mcba : Regmap of the MCB-A (memory bridge) resource.
18+
- regmap-mcbb : Regmap of the MCB-B (memory bridge) resource.
19+
- reg : First resource shall be the CPU bus PMU resource.
20+
- interrupts : Interrupt-specifier for PMU IRQ.
21+
22+
Required properties for L3C subnode:
23+
- compatible : Shall be "apm,xgene-pmu-l3c".
24+
- reg : First resource shall be the L3C PMU resource.
25+
26+
Required properties for IOB subnode:
27+
- compatible : Shall be "apm,xgene-pmu-iob".
28+
- reg : First resource shall be the IOB PMU resource.
29+
30+
Required properties for MCB subnode:
31+
- compatible : Shall be "apm,xgene-pmu-mcb".
32+
- reg : First resource shall be the MCB PMU resource.
33+
- enable-bit-index : The bit indicates if the according MCB is enabled.
34+
35+
Required properties for MC subnode:
36+
- compatible : Shall be "apm,xgene-pmu-mc".
37+
- reg : First resource shall be the MC PMU resource.
38+
- enable-bit-index : The bit indicates if the according MC is enabled.
39+
40+
Example:
41+
csw: csw@7e200000 {
42+
compatible = "apm,xgene-csw", "syscon";
43+
reg = <0x0 0x7e200000 0x0 0x1000>;
44+
};
45+
46+
mcba: mcba@7e700000 {
47+
compatible = "apm,xgene-mcb", "syscon";
48+
reg = <0x0 0x7e700000 0x0 0x1000>;
49+
};
50+
51+
mcbb: mcbb@7e720000 {
52+
compatible = "apm,xgene-mcb", "syscon";
53+
reg = <0x0 0x7e720000 0x0 0x1000>;
54+
};
55+
56+
pmu: pmu@78810000 {
57+
compatible = "apm,xgene-pmu-v2";
58+
#address-cells = <2>;
59+
#size-cells = <2>;
60+
ranges;
61+
regmap-csw = <&csw>;
62+
regmap-mcba = <&mcba>;
63+
regmap-mcbb = <&mcbb>;
64+
reg = <0x0 0x78810000 0x0 0x1000>;
65+
interrupts = <0x0 0x22 0x4>;
66+
67+
pmul3c@7e610000 {
68+
compatible = "apm,xgene-pmu-l3c";
69+
reg = <0x0 0x7e610000 0x0 0x1000>;
70+
};
71+
72+
pmuiob@7e940000 {
73+
compatible = "apm,xgene-pmu-iob";
74+
reg = <0x0 0x7e940000 0x0 0x1000>;
75+
};
76+
77+
pmucmcb@7e710000 {
78+
compatible = "apm,xgene-pmu-mcb";
79+
reg = <0x0 0x7e710000 0x0 0x1000>;
80+
enable-bit-index = <0>;
81+
};
82+
83+
pmucmcb@7e730000 {
84+
compatible = "apm,xgene-pmu-mcb";
85+
reg = <0x0 0x7e730000 0x0 0x1000>;
86+
enable-bit-index = <1>;
87+
};
88+
89+
pmucmc@7e810000 {
90+
compatible = "apm,xgene-pmu-mc";
91+
reg = <0x0 0x7e810000 0x0 0x1000>;
92+
enable-bit-index = <0>;
93+
};
94+
95+
pmucmc@7e850000 {
96+
compatible = "apm,xgene-pmu-mc";
97+
reg = <0x0 0x7e850000 0x0 0x1000>;
98+
enable-bit-index = <1>;
99+
};
100+
101+
pmucmc@7e890000 {
102+
compatible = "apm,xgene-pmu-mc";
103+
reg = <0x0 0x7e890000 0x0 0x1000>;
104+
enable-bit-index = <2>;
105+
};
106+
107+
pmucmc@7e8d0000 {
108+
compatible = "apm,xgene-pmu-mc";
109+
reg = <0x0 0x7e8d0000 0x0 0x1000>;
110+
enable-bit-index = <3>;
111+
};
112+
};

‎Documentation/devicetree/bindings/pinctrl/marvell,orion-pinctrl.txt‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Please refer to marvell,mvebu-pinctrl.txt in this directory for common binding
44
part and usage.
55

66
Required properties:
7-
- compatible: "marvell,88f5181l-pinctrl", "marvell,88f5182-pinctrl",
7+
- compatible: "marvell,88f5181-pinctrl",
8+
"marvell,88f5181l-pinctrl",
9+
"marvell,88f5182-pinctrl",
810
"marvell,88f5281-pinctrl"
911

1012
- reg: two register areas, the first one describing the first two
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
STMicroelectronics STM32 Peripheral Reset Controller
2+
====================================================
3+
4+
The RCC IP is both a reset and a clock controller.
5+
6+
Please see Documentation/devicetree/bindings/clock/st,stm32-rcc.txt

0 commit comments

Comments
 (0)