doc: devicetree: Add bindings documentation for omap-des driver
Subsystems (2)
PATCH 1/1 doc: devicetree: Add bindings documentation for omap-des driver
Add documentation for the generic OMAP DES crypto module describing the device tree bindings.
--- .../devicetree/bindings/crypto/omap-des.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/omap-des.txt
Documentation/devicetree/bindings/crypto/omap-des.txt new file +28 -0
@@ -0,0 +1,28 @@ +OMAP SoC DES crypto Module + +Required properties: + +- compatible : Should be "ti,omap4-des" +- ti,hwmods: Name of the hwmod associated with the DES module +- reg : Offset and length of the register set for the module +- interrupts : the interrupt-specifier for the DES module +- clocks : phandle to the functional clock node of the DES module +- clock-names : Name of the functional clock + +Optional properties: +- dmas: DMA specifiers for tx and rx dma. See the DMA client binding, + Documentation/devicetree/bindings/dma/dma.txt +- dma-names: DMA request names should include "tx" and "rx" if present + +Example: + /* DRA7xx SoC */ + des: des@480a5000 { + compatible = "ti,omap4-des"; + ti,hwmods = "des"; + reg = <0x480a5000 0xa0>; + interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&sdma 117>, <&sdma 116>; + dma-names = "tx", "rx"; + clocks = <&l3_iclk_div>; + clock-names = "fck"; + };
Signature · 6 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Joel Fernandes
Add documentation for the generic OMAP DES crypto module describing the device tree bindings.
Signed-off-by Joel Fernandes <[email protected]>---
Thanks Joel for picking this up.
FWIW, Acked-by: Santosh Shilimkar <[email protected]>
Hi Joel,
I realise I'm a little late in replying to this, but there are a few things that would be nice to fix up.
Quoted 15 lines · Joel Fernandes
Add documentation for the generic OMAP DES crypto module describing the device tree bindings.
Signed-off-by Joel Fernandes <[email protected]>--- .../devicetree/bindings/crypto/omap-des.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/omap-des.txtDocumentation/devicetree/bindings/crypto/omap-des.txt new file +0
-0
Documentation/devicetree/bindings/crypto/omap-des.txt line 5
Quoted 5 lines
Documentation/devicetree/bindings/crypto/omap-des.txt new file +5
-0@@ -0,0 +1,28 @@ +OMAP SoC DES crypto Module + +Required properties: + +- compatible : Should be "ti,omap4-des"
Nit: s/Should be/Should contain/
Documentation/devicetree/bindings/crypto/omap-des.txt line 8
Quoted 3 lines
Documentation/devicetree/bindings/crypto/omap-des.txt new file +3
-0+- ti,hwmods: Name of the hwmod associated with the DES module +- reg : Offset and length of the register set for the module +- interrupts : the interrupt-specifier for the DES module
Just to check: there's only one interrupt?
Documentation/devicetree/bindings/crypto/omap-des.txt line 10
Quoted 2 lines
Documentation/devicetree/bindings/crypto/omap-des.txt new file +2
-0+- clocks : phandle to the functional clock node of the DES module +- clock-names : Name of the functional clock
What name is expected here? The intent of clock-names is to describe which clock input lines the clocks are wired to, so this should be well-defined.
Quoted 1 line
From the looks of the example, the clock input is called "fck". Is that
correct?
When you have clock-names, the nicest thing to do is to define clocks in terms of clock-names. Something like:
- clocks: A phandle + clock-specifier pair for each entry in clock-names.
- clock-names: Should contain:
* "fck" for the functional clock
Which implies that the correct way to find clocks is to look in clock-names first to find the clock's index, rather than grabbing the clock by index. This makes it far easier to add/remove/change clocks in future.
Documentation/devicetree/bindings/crypto/omap-des.txt line 14
Quoted 4 lines
Documentation/devicetree/bindings/crypto/omap-des.txt new file +4
-0+ +Optional properties: +- dmas: DMA specifiers for tx and rx dma. See the DMA client binding, + Documentation/devicetree/bindings/dma/dma.txt
Similarly here it would be nice to have dmas refer to dma-names for the description of which dmas exist.
Quoted 4 lines
+- dma-names: DMA request names should include "tx" and "rx" if present
Documentation/devicetree/bindings/crypto/omap-des.txt new file +3
-0+ +Example: + /* DRA7xx SoC */
Documentation/devicetree/bindings/crypto/omap-des.txt line 28
Quoted 10 lines
Documentation/devicetree/bindings/crypto/omap-des.txt new file +10
-0+ des: des@480a5000 { + compatible = "ti,omap4-des"; + ti,hwmods = "des"; + reg = <0x480a5000 0xa0>; + interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&sdma 117>, <&sdma 116>; + dma-names = "tx", "rx"; + clocks = <&l3_iclk_div>; + clock-names = "fck"; + };
Cheers,
Mark.
Quoted 15 lines · Mark Rutland
Hi Joel,
I realise I'm a little late in replying to this, but there are a few things that would be nice to fix up.
Quoted 9 lines · Joel Fernandes
Add documentation for the generic OMAP DES crypto module describing the device tree bindings.
Signed-off-by Joel Fernandes <[email protected]>--- .../devicetree/bindings/crypto/omap-des.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/omap-des.txt
Quoted 13 lines
Documentation/devicetree/bindings/crypto/omap-des.txt line 5
Quoted 11 lines
Documentation/devicetree/bindings/crypto/omap-des.txt new file +5
-0@@ -0,0 +1,28 @@ +OMAP SoC DES crypto Module + +Required properties: + +- compatible : Should be "ti,omap4-des"Nit: s/Should be/Should contain/
ok
Quoted 6 lines
Documentation/devicetree/bindings/crypto/omap-des.txt line 8
Quoted 4 lines
Documentation/devicetree/bindings/crypto/omap-des.txt new file +3
-0+- ti,hwmods: Name of the hwmod associated with the DES module +- reg : Offset and length of the register set for the module +- interrupts : the interrupt-specifier for the DES moduleJust to check: there's only one interrupt?
Yes.
Quoted 9 lines
Documentation/devicetree/bindings/crypto/omap-des.txt line 10
Quoted 2 lines
Documentation/devicetree/bindings/crypto/omap-des.txt new file +2
-0+- clocks : phandle to the functional clock node of the DES module +- clock-names : Name of the functional clockWhat name is expected here? The intent of clock-names is to describe which clock input lines the clocks are wired to, so this should be well-defined.
From the looks of the example, the clock input is called "fck". Is that correct?
Yes. The clock name is used by PM code to get the clock for the particular device. Yes the code assumes it to be "fck", I can change doc to be so.
Quoted 6 lines
When you have clock-names, the nicest thing to do is to define clocks in terms of clock-names. Something like:
- clocks: A phandle + clock-specifier pair for each entry in clock-names.
Quoted 7 lines
- clock-names: Should contain:
* "fck" for the functional clockWhich implies that the correct way to find clocks is to look in clock-names first to find the clock's index, rather than grabbing the clock by index. This makes it far easier to add/remove/change clocks in future.
Ok. I'll reword documentation of clocks as above.
Quoted 8 lines
Documentation/devicetree/bindings/crypto/omap-des.txt line 14
Quoted 5 lines
Documentation/devicetree/bindings/crypto/omap-des.txt new file +4
-0+ +Optional properties: +- dmas: DMA specifiers for tx and rx dma. See the DMA client binding, + Documentation/devicetree/bindings/dma/dma.txtSimilarly here it would be nice to have dmas refer to dma-names for the description of which dmas exist.
Ok, will make the above 3 changes and resubmit, if its ok will add your Reviewed-by.
thanks,
-Joel
Mark Rutland
Reviewed-byQuoted 79 lines · Joel Fernandes
Quoted 15 lines · Mark Rutland
Hi Joel,
I realise I'm a little late in replying to this, but there are a few things that would be nice to fix up.
Quoted 9 lines · Joel Fernandes
Add documentation for the generic OMAP DES crypto module describing the device tree bindings.
Signed-off-by Joel Fernandes <[email protected]>--- .../devicetree/bindings/crypto/omap-des.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/omap-des.txtQuoted 13 lines
Documentation/devicetree/bindings/crypto/omap-des.txt line 5
Quoted 11 lines
Documentation/devicetree/bindings/crypto/omap-des.txt new file +5
-0@@ -0,0 +1,28 @@ +OMAP SoC DES crypto Module + +Required properties: + +- compatible : Should be "ti,omap4-des"Nit: s/Should be/Should contain/
ok
Quoted 6 lines
Documentation/devicetree/bindings/crypto/omap-des.txt line 8
Quoted 4 lines
Documentation/devicetree/bindings/crypto/omap-des.txt new file +3
-0+- ti,hwmods: Name of the hwmod associated with the DES module +- reg : Offset and length of the register set for the module +- interrupts : the interrupt-specifier for the DES moduleJust to check: there's only one interrupt?
Yes.
Quoted 9 lines
Documentation/devicetree/bindings/crypto/omap-des.txt line 10
Quoted 2 lines
Documentation/devicetree/bindings/crypto/omap-des.txt new file +2
-0+- clocks : phandle to the functional clock node of the DES module +- clock-names : Name of the functional clockWhat name is expected here? The intent of clock-names is to describe which clock input lines the clocks are wired to, so this should be well-defined.
From the looks of the example, the clock input is called "fck". Is that correct?
Yes. The clock name is used by PM code to get the clock for the particular device. Yes the code assumes it to be "fck", I can change doc to be so.
Quoted 6 lines
When you have clock-names, the nicest thing to do is to define clocks in terms of clock-names. Something like:
- clocks: A phandle + clock-specifier pair for each entry in clock-names.
Quoted 7 lines
- clock-names: Should contain:
* "fck" for the functional clockWhich implies that the correct way to find clocks is to look in clock-names first to find the clock's index, rather than grabbing the clock by index. This makes it far easier to add/remove/change clocks in future.
Ok. I'll reword documentation of clocks as above.
Quoted 8 lines
Documentation/devicetree/bindings/crypto/omap-des.txt line 14
Quoted 5 lines
Documentation/devicetree/bindings/crypto/omap-des.txt new file +4
-0+ +Optional properties: +- dmas: DMA specifiers for tx and rx dma. See the DMA client binding, + Documentation/devicetree/bindings/dma/dma.txtSimilarly here it would be nice to have dmas refer to dma-names for the description of which dmas exist.
Quoted 1 line
Ok, will make the above 3 changes and resubmit, if its ok will add your Reviewed-by.
That would be fine by me.
With the changes:
Mark.