Skip to content

Commit 1fe283e

Browse files
neuschaefervinodkoul
authored andcommitted
dt-bindings: dma: Convert fsl,elo*-dma to YAML
The devicetree bindings for Freescale DMA engines have so far existed as a text file. This patch converts them to YAML, and specifies all the compatible strings currently in use in arch/powerpc/boot/dts. Signed-off-by: J. Neuschäfer <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 964c032 commit 1fe283e

File tree

4 files changed

+394
-204
lines changed

4 files changed

+394
-204
lines changed
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/dma/fsl,elo-dma.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale Elo DMA Controller
8+
9+
maintainers:
10+
- J. Neuschäfer <[email protected]>
11+
12+
description:
13+
This is a little-endian 4-channel DMA controller, used in Freescale mpc83xx
14+
series chips such as mpc8315, mpc8349, mpc8379 etc.
15+
16+
properties:
17+
compatible:
18+
items:
19+
- enum:
20+
- fsl,mpc8313-dma
21+
- fsl,mpc8315-dma
22+
- fsl,mpc8323-dma
23+
- fsl,mpc8347-dma
24+
- fsl,mpc8349-dma
25+
- fsl,mpc8360-dma
26+
- fsl,mpc8377-dma
27+
- fsl,mpc8378-dma
28+
- fsl,mpc8379-dma
29+
- const: fsl,elo-dma
30+
31+
reg:
32+
items:
33+
- description:
34+
DMA General Status Register, i.e. DGSR which contains status for
35+
all the 4 DMA channels.
36+
37+
cell-index:
38+
$ref: /schemas/types.yaml#/definitions/uint32
39+
description: Controller index. 0 for controller @ 0x8100.
40+
41+
ranges: true
42+
43+
"#address-cells":
44+
const: 1
45+
46+
"#size-cells":
47+
const: 1
48+
49+
interrupts:
50+
maxItems: 1
51+
description: Controller interrupt.
52+
53+
required:
54+
- compatible
55+
- reg
56+
57+
patternProperties:
58+
"^dma-channel@[0-9a-f]+$":
59+
type: object
60+
additionalProperties: false
61+
62+
properties:
63+
compatible:
64+
oneOf:
65+
# native DMA channel
66+
- items:
67+
- enum:
68+
- fsl,mpc8315-dma-channel
69+
- fsl,mpc8323-dma-channel
70+
- fsl,mpc8347-dma-channel
71+
- fsl,mpc8349-dma-channel
72+
- fsl,mpc8360-dma-channel
73+
- fsl,mpc8377-dma-channel
74+
- fsl,mpc8378-dma-channel
75+
- fsl,mpc8379-dma-channel
76+
- const: fsl,elo-dma-channel
77+
78+
# audio DMA channel, see fsl,ssi.yaml
79+
- const: fsl,ssi-dma-channel
80+
81+
reg:
82+
maxItems: 1
83+
84+
cell-index:
85+
description: DMA channel index starts at 0.
86+
87+
interrupts:
88+
maxItems: 1
89+
description:
90+
Per-channel interrupt. Only necessary if no controller interrupt has
91+
been provided.
92+
93+
additionalProperties: false
94+
95+
examples:
96+
- |
97+
#include <dt-bindings/interrupt-controller/irq.h>
98+
99+
dma@82a8 {
100+
compatible = "fsl,mpc8349-dma", "fsl,elo-dma";
101+
reg = <0x82a8 4>;
102+
#address-cells = <1>;
103+
#size-cells = <1>;
104+
ranges = <0 0x8100 0x1a4>;
105+
interrupts = <71 IRQ_TYPE_LEVEL_LOW>;
106+
cell-index = <0>;
107+
108+
dma-channel@0 {
109+
compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
110+
reg = <0 0x80>;
111+
cell-index = <0>;
112+
interrupts = <71 IRQ_TYPE_LEVEL_LOW>;
113+
};
114+
115+
dma-channel@80 {
116+
compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
117+
reg = <0x80 0x80>;
118+
cell-index = <1>;
119+
interrupts = <71 IRQ_TYPE_LEVEL_LOW>;
120+
};
121+
122+
dma-channel@100 {
123+
compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
124+
reg = <0x100 0x80>;
125+
cell-index = <2>;
126+
interrupts = <71 IRQ_TYPE_LEVEL_LOW>;
127+
};
128+
129+
dma-channel@180 {
130+
compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
131+
reg = <0x180 0x80>;
132+
cell-index = <3>;
133+
interrupts = <71 IRQ_TYPE_LEVEL_LOW>;
134+
};
135+
};
136+
137+
...
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/dma/fsl,elo3-dma.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale Elo3 DMA Controller
8+
9+
maintainers:
10+
- J. Neuschäfer <[email protected]>
11+
12+
description:
13+
DMA controller which has same function as EloPlus except that Elo3 has 8
14+
channels while EloPlus has only 4, it is used in Freescale Txxx and Bxxx
15+
series chips, such as t1040, t4240, b4860.
16+
17+
properties:
18+
compatible:
19+
const: fsl,elo3-dma
20+
21+
reg:
22+
items:
23+
- description:
24+
DMA General Status Registers starting from DGSR0, for channel 1~4
25+
- description:
26+
DMA General Status Registers starting from DGSR1, for channel 5~8
27+
28+
ranges: true
29+
30+
"#address-cells":
31+
const: 1
32+
33+
"#size-cells":
34+
const: 1
35+
36+
interrupts:
37+
maxItems: 1
38+
39+
patternProperties:
40+
"^dma-channel@[0-9a-f]+$":
41+
type: object
42+
additionalProperties: false
43+
44+
properties:
45+
compatible:
46+
enum:
47+
# native DMA channel
48+
- fsl,eloplus-dma-channel
49+
50+
# audio DMA channel, see fsl,ssi.yaml
51+
- fsl,ssi-dma-channel
52+
53+
reg:
54+
maxItems: 1
55+
56+
interrupts:
57+
maxItems: 1
58+
description:
59+
Per-channel interrupt. Only necessary if no controller interrupt has
60+
been provided.
61+
62+
additionalProperties: false
63+
64+
examples:
65+
- |
66+
#include <dt-bindings/interrupt-controller/irq.h>
67+
68+
dma@100300 {
69+
compatible = "fsl,elo3-dma";
70+
reg = <0x100300 0x4>,
71+
<0x100600 0x4>;
72+
#address-cells = <1>;
73+
#size-cells = <1>;
74+
ranges = <0x0 0x100100 0x500>;
75+
76+
dma-channel@0 {
77+
compatible = "fsl,eloplus-dma-channel";
78+
reg = <0x0 0x80>;
79+
interrupts = <28 IRQ_TYPE_EDGE_FALLING 0 0>;
80+
};
81+
82+
dma-channel@80 {
83+
compatible = "fsl,eloplus-dma-channel";
84+
reg = <0x80 0x80>;
85+
interrupts = <29 IRQ_TYPE_EDGE_FALLING 0 0>;
86+
};
87+
88+
dma-channel@100 {
89+
compatible = "fsl,eloplus-dma-channel";
90+
reg = <0x100 0x80>;
91+
interrupts = <30 IRQ_TYPE_EDGE_FALLING 0 0>;
92+
};
93+
94+
dma-channel@180 {
95+
compatible = "fsl,eloplus-dma-channel";
96+
reg = <0x180 0x80>;
97+
interrupts = <31 IRQ_TYPE_EDGE_FALLING 0 0>;
98+
};
99+
100+
dma-channel@300 {
101+
compatible = "fsl,eloplus-dma-channel";
102+
reg = <0x300 0x80>;
103+
interrupts = <76 IRQ_TYPE_EDGE_FALLING 0 0>;
104+
};
105+
106+
dma-channel@380 {
107+
compatible = "fsl,eloplus-dma-channel";
108+
reg = <0x380 0x80>;
109+
interrupts = <77 IRQ_TYPE_EDGE_FALLING 0 0>;
110+
};
111+
112+
dma-channel@400 {
113+
compatible = "fsl,eloplus-dma-channel";
114+
reg = <0x400 0x80>;
115+
interrupts = <78 IRQ_TYPE_EDGE_FALLING 0 0>;
116+
};
117+
118+
dma-channel@480 {
119+
compatible = "fsl,eloplus-dma-channel";
120+
reg = <0x480 0x80>;
121+
interrupts = <79 IRQ_TYPE_EDGE_FALLING 0 0>;
122+
};
123+
};
124+
125+
...
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/dma/fsl,eloplus-dma.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale EloPlus DMA Controller
8+
9+
maintainers:
10+
- J. Neuschäfer <[email protected]>
11+
12+
description:
13+
This is a 4-channel DMA controller with extended addresses and chaining,
14+
mainly used in Freescale mpc85xx/86xx, Pxxx and BSC series chips, such as
15+
mpc8540, mpc8641 p4080, bsc9131 etc.
16+
17+
properties:
18+
compatible:
19+
oneOf:
20+
- items:
21+
- enum:
22+
- fsl,mpc8540-dma
23+
- fsl,mpc8541-dma
24+
- fsl,mpc8548-dma
25+
- fsl,mpc8555-dma
26+
- fsl,mpc8560-dma
27+
- fsl,mpc8572-dma
28+
- fsl,mpc8641-dma
29+
- const: fsl,eloplus-dma
30+
- const: fsl,eloplus-dma
31+
32+
reg:
33+
items:
34+
- description:
35+
DMA General Status Register, i.e. DGSR which contains
36+
status for all the 4 DMA channels
37+
38+
cell-index:
39+
$ref: /schemas/types.yaml#/definitions/uint32
40+
description:
41+
controller index. 0 for controller @ 0x21000, 1 for controller @ 0xc000
42+
43+
ranges: true
44+
45+
"#address-cells":
46+
const: 1
47+
48+
"#size-cells":
49+
const: 1
50+
51+
interrupts:
52+
maxItems: 1
53+
description: Controller interrupt.
54+
55+
patternProperties:
56+
"^dma-channel@[0-9a-f]+$":
57+
type: object
58+
additionalProperties: false
59+
60+
properties:
61+
compatible:
62+
oneOf:
63+
# native DMA channel
64+
- items:
65+
- enum:
66+
- fsl,mpc8540-dma-channel
67+
- fsl,mpc8541-dma-channel
68+
- fsl,mpc8548-dma-channel
69+
- fsl,mpc8555-dma-channel
70+
- fsl,mpc8560-dma-channel
71+
- fsl,mpc8572-dma-channel
72+
- const: fsl,eloplus-dma-channel
73+
74+
# audio DMA channel, see fsl,ssi.yaml
75+
- const: fsl,ssi-dma-channel
76+
77+
reg:
78+
maxItems: 1
79+
80+
cell-index:
81+
description: DMA channel index starts at 0.
82+
83+
interrupts:
84+
maxItems: 1
85+
description:
86+
Per-channel interrupt. Only necessary if no controller interrupt has
87+
been provided.
88+
89+
additionalProperties: false
90+
91+
examples:
92+
- |
93+
#include <dt-bindings/interrupt-controller/irq.h>
94+
95+
dma@21300 {
96+
compatible = "fsl,mpc8540-dma", "fsl,eloplus-dma";
97+
reg = <0x21300 4>;
98+
#address-cells = <1>;
99+
#size-cells = <1>;
100+
ranges = <0 0x21100 0x200>;
101+
cell-index = <0>;
102+
103+
dma-channel@0 {
104+
compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
105+
reg = <0 0x80>;
106+
cell-index = <0>;
107+
interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
108+
};
109+
110+
dma-channel@80 {
111+
compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
112+
reg = <0x80 0x80>;
113+
cell-index = <1>;
114+
interrupts = <21 IRQ_TYPE_EDGE_FALLING>;
115+
};
116+
117+
dma-channel@100 {
118+
compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
119+
reg = <0x100 0x80>;
120+
cell-index = <2>;
121+
interrupts = <22 IRQ_TYPE_EDGE_FALLING>;
122+
};
123+
124+
dma-channel@180 {
125+
compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
126+
reg = <0x180 0x80>;
127+
cell-index = <3>;
128+
interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
129+
};
130+
};
131+
132+
...

0 commit comments

Comments
 (0)