aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-01-28 11:24:37 -0500
committerArnd Bergmann <arnd@arndb.de>2013-03-12 12:56:09 -0400
commit787b0c1f8e1975157fe73104e67cac18f955281b (patch)
tree4668c8a2a16baec67e71844840b85bea03cb5566 /Documentation
parentdc715452e9145156840b09df765ea2ede4851eda (diff)
serial: pl011: use generic DMA slave configuration if possible
With the new OF DMA binding, it is possible to completely avoid the need for platform_data for configuring a DMA channel. In cases where the platform has already been converted, calling dma_request_slave_channel should get all the necessary information from the device tree. This also adds a binding document specific to the pl011 controller, and extends the generic primecell binding to mention "dmas" and other common properties. Like the patch that converts the dw_dma controller, this is completely untested and is looking for someone to try it out. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Russell King <linux@arm.linux.org.uk> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: devicetree-discuss@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/arm/primecell.txt19
-rw-r--r--Documentation/devicetree/bindings/serial/pl011.txt17
2 files changed, 35 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/arm/primecell.txt b/Documentation/devicetree/bindings/arm/primecell.txt
index 64fc82bc8928..0df6acacfaea 100644
--- a/Documentation/devicetree/bindings/arm/primecell.txt
+++ b/Documentation/devicetree/bindings/arm/primecell.txt
@@ -16,14 +16,31 @@ Optional properties:
16- clocks : From common clock binding. First clock is phandle to clock for apb 16- clocks : From common clock binding. First clock is phandle to clock for apb
17 pclk. Additional clocks are optional and specific to those peripherals. 17 pclk. Additional clocks are optional and specific to those peripherals.
18- clock-names : From common clock binding. Shall be "apb_pclk" for first clock. 18- clock-names : From common clock binding. Shall be "apb_pclk" for first clock.
19- dmas : From common DMA binding. If present, refers to one or more dma channels.
20- dma-names : From common DMA binding, needs to match the 'dmas' property.
21 Devices with exactly one receive and transmit channel shall name
22 these "rx" and "tx", respectively.
23- pinctrl-<n> : Pinctrl states as described in bindings/pinctrl/pinctrl-bindings.txt
24- pinctrl-names : Names corresponding to the numbered pinctrl states
25- interrupts : one or more interrupt specifiers
26- interrupt-names : names corresponding to the interrupts properties
19 27
20Example: 28Example:
21 29
22serial@fff36000 { 30serial@fff36000 {
23 compatible = "arm,pl011", "arm,primecell"; 31 compatible = "arm,pl011", "arm,primecell";
24 arm,primecell-periphid = <0x00341011>; 32 arm,primecell-periphid = <0x00341011>;
33
25 clocks = <&pclk>; 34 clocks = <&pclk>;
26 clock-names = "apb_pclk"; 35 clock-names = "apb_pclk";
27 36
37 dmas = <&dma-controller 4>, <&dma-controller 5>;
38 dma-names = "rx", "tx";
39
40 pinctrl-0 = <&uart0_default_mux>, <&uart0_default_mode>;
41 pinctrl-1 = <&uart0_sleep_mode>;
42 pinctrl-names = "default","sleep";
43
44 interrupts = <0 11 0x4>;
28}; 45};
29 46
diff --git a/Documentation/devicetree/bindings/serial/pl011.txt b/Documentation/devicetree/bindings/serial/pl011.txt
new file mode 100644
index 000000000000..5d2e840ae65c
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/pl011.txt
@@ -0,0 +1,17 @@
1* ARM AMBA Primecell PL011 serial UART
2
3Required properties:
4- compatible: must be "arm,primecell", "arm,pl011"
5- reg: exactly one register range with length 0x1000
6- interrupts: exactly one interrupt specifier
7
8Optional properties:
9- pinctrl: When present, must have one state named "sleep"
10 and one state named "default"
11- clocks: When present, must refer to exactly one clock named
12 "apb_pclk"
13- dmas: When present, may have one or two dma channels.
14 The first one must be named "rx", the second one
15 must be named "tx".
16
17See also bindings/arm/primecell.txt