fix gpio interrupt-cells property on AM335x
[openwrt/openwrt.git] / target / linux / omap / patches-3.12 / 300-ARM-dts-AM33XX-Add-SHAM-data-and-documentation.patch
1 Add the generic AM33XX SHAM module's device tree data and
2 enable it for the am335x-evm, am335x-evmsk, and am335x-bone
3 platforms. Also add Documentation file describing the data
4 for the SHAM module.
5
6 [joelf@ti.com: Dropped interrupt-parrent property, documentation fixups]
7 CC: Paul Walmsley <paul@pwsan.com>
8 Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
9 Acked-by: Mark Rutland <mark.rutland@arm.com>
10
11 ---
12 .../devicetree/bindings/crypto/omap-sham.txt | 28 ++++++++++++++++++++++
13 arch/arm/boot/dts/am335x-bone.dts | 4 ++++
14 arch/arm/boot/dts/am335x-evm.dts | 4 ++++
15 arch/arm/boot/dts/am335x-evmsk.dts | 4 ++++
16 arch/arm/boot/dts/am33xx.dtsi | 9 +++++++
17 5 files changed, 49 insertions(+)
18 create mode 100644 Documentation/devicetree/bindings/crypto/omap-sham.txt
19
20 diff --git a/Documentation/devicetree/bindings/crypto/omap-sham.txt b/Documentation/devicetree/bindings/crypto/omap-sham.txt
21 new file mode 100644
22 index 0000000..f839acd
23 --- /dev/null
24 +++ b/Documentation/devicetree/bindings/crypto/omap-sham.txt
25 @@ -0,0 +1,28 @@
26 +OMAP SoC SHA crypto Module
27 +
28 +Required properties:
29 +
30 +- compatible : Should contain entries for this and backward compatible
31 + SHAM versions:
32 + - "ti,omap2-sham" for OMAP2 & OMAP3.
33 + - "ti,omap4-sham" for OMAP4 and AM33XX.
34 + Note that these two versions are incompatible.
35 +- ti,hwmods: Name of the hwmod associated with the SHAM module
36 +- reg : Offset and length of the register set for the module
37 +- interrupts : the interrupt-specifier for the SHAM module.
38 +
39 +Optional properties:
40 +- dmas: DMA specifiers for the rx dma. See the DMA client binding,
41 + Documentation/devicetree/bindings/dma/dma.txt
42 +- dma-names: DMA request name. Should be "rx" if a dma is present.
43 +
44 +Example:
45 + /* AM335x */
46 + sham: sham@53100000 {
47 + compatible = "ti,omap4-sham";
48 + ti,hwmods = "sham";
49 + reg = <0x53100000 0x200>;
50 + interrupts = <109>;
51 + dmas = <&edma 36>;
52 + dma-names = "rx";
53 + };
54 diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
55 index 0d63348..8a9802e 100644
56 --- a/arch/arm/boot/dts/am335x-bone.dts
57 +++ b/arch/arm/boot/dts/am335x-bone.dts
58 @@ -19,3 +19,7 @@
59 &mmc1 {
60 vmmc-supply = <&ldo3_reg>;
61 };
62 +
63 +&sham {
64 + status = "okay";
65 +};
66 diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
67 index 23b0a3e..d59e51c 100644
68 --- a/arch/arm/boot/dts/am335x-evm.dts
69 +++ b/arch/arm/boot/dts/am335x-evm.dts
70 @@ -522,3 +522,7 @@
71 status = "okay";
72 vmmc-supply = <&vmmc_reg>;
73 };
74 +
75 +&sham {
76 + status = "okay";
77 +};
78 diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
79 index bc93895..d45a330 100644
80 --- a/arch/arm/boot/dts/am335x-evmsk.dts
81 +++ b/arch/arm/boot/dts/am335x-evmsk.dts
82 @@ -424,3 +424,7 @@
83 status = "okay";
84 vmmc-supply = <&vmmc_reg>;
85 };
86 +
87 +&sham {
88 + status = "okay";
89 +};
90 diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
91 index 553adc6..299710b 100644
92 --- a/arch/arm/boot/dts/am33xx.dtsi
93 +++ b/arch/arm/boot/dts/am33xx.dtsi
94 @@ -710,5 +710,14 @@
95 #size-cells = <1>;
96 status = "disabled";
97 };
98 +
99 + sham: sham@53100000 {
100 + compatible = "ti,omap4-sham";
101 + ti,hwmods = "sham";
102 + reg = <0x53100000 0x200>;
103 + interrupts = <109>;
104 + dmas = <&edma 36>;
105 + dma-names = "rx";
106 + };
107 };
108 };