diff mbox series

[v2,3/3] dt-bindings: ata: Add device tree binding fir Mikrotik RB532 PATA controller

Message ID 20210428163336.73125-3-tsbogend@alpha.franken.de
State New
Headers show
Series None | expand

Commit Message

Thomas Bogendoerfer April 28, 2021, 4:33 p.m. UTC
Add YAML devicetree binding for Mikrotik RB532 PATA controller.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
---
 .../bindings/ata/mikrotek,rb532-pata.yaml     | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml

Comments

Rob Herring (Arm) May 3, 2021, 7:28 p.m. UTC | #1
On Wed, Apr 28, 2021 at 06:33:36PM +0200, Thomas Bogendoerfer wrote:
> Add YAML devicetree binding for Mikrotik RB532 PATA controller.

> 

> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

> ---

>  .../bindings/ata/mikrotek,rb532-pata.yaml     | 43 +++++++++++++++++++

>  1 file changed, 43 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml

> 

> diff --git a/Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml b/Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml

> new file mode 100644

> index 000000000000..f74880c4fd82

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml

> @@ -0,0 +1,43 @@

> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

> +%YAML 1.2

> +---

> +$id: http://devicetree.org/schemas/ata/mikrotek,rb532-pata.yaml#

> +$schema: http://devicetree.org/meta-schemas/core.yaml#

> +

> +title: Mikrotek RB532 PATA Controller bindings


We have a common binding for this (ata/pata-common.yaml). Really, all 
you'd gain is how to support 2 devices is defined. Should you use that? 
Is CompactFlash only a single device, I don't remember. If so, is that a 
limitation for the board or could 2 devices be supported?

> +

> +maintainers:

> +  - Thomas Bogendoerfer <tsbogend@alpha.franken.de>

> +

> +properties:

> +  compatible:

> +    const: mikrotik,rb532-pata

> +

> +  reg:

> +    maxItems: 1

> +

> +  interrupts:

> +    maxItems: 1

> +

> +  gpio:


'<name>-gpios' is the preferred form (even for singular).

> +    maxItems: 1

> +

> +required:

> +  - compatible

> +  - reg

> +  - interrupts

> +  - gpio

> +

> +additionalProperties: false

> +

> +examples:

> +  - |

> +    cf@18a10000 {

> +        compatible = "mikrotik,rb532-pata";

> +        reg = <0x18a10000 0xc04>;

> +

> +        gpio = <&gpio0 13 0>;

> +

> +        interrupt-parent = <&gpio0>;

> +        interrupts = <13 0>;

> +    };

> -- 

> 2.29.2

>
Thomas Bogendoerfer May 3, 2021, 8:58 p.m. UTC | #2
On Mon, May 03, 2021 at 02:28:05PM -0500, Rob Herring wrote:
> On Wed, Apr 28, 2021 at 06:33:36PM +0200, Thomas Bogendoerfer wrote:

> > Add YAML devicetree binding for Mikrotik RB532 PATA controller.

> > 

> > Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

> > ---

> >  .../bindings/ata/mikrotek,rb532-pata.yaml     | 43 +++++++++++++++++++

> >  1 file changed, 43 insertions(+)

> >  create mode 100644 Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml

> > 

> > diff --git a/Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml b/Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml

> > new file mode 100644

> > index 000000000000..f74880c4fd82

> > --- /dev/null

> > +++ b/Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml

> > @@ -0,0 +1,43 @@

> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

> > +%YAML 1.2

> > +---

> > +$id: http://devicetree.org/schemas/ata/mikrotek,rb532-pata.yaml#

> > +$schema: http://devicetree.org/meta-schemas/core.yaml#

> > +

> > +title: Mikrotek RB532 PATA Controller bindings

> 

> We have a common binding for this (ata/pata-common.yaml). Really, all 

> you'd gain is how to support 2 devices is defined. Should you use that? 

> Is CompactFlash only a single device, I don't remember. If so, is that a 

> limitation for the board or could 2 devices be supported?


there is only one device possible. So what do I need to put into the
yaml file for the driver ?  

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml b/Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml
new file mode 100644
index 000000000000..f74880c4fd82
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml
@@ -0,0 +1,43 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/ata/mikrotek,rb532-pata.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mikrotek RB532 PATA Controller bindings
+
+maintainers:
+  - Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+
+properties:
+  compatible:
+    const: mikrotik,rb532-pata
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  gpio:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - gpio
+
+additionalProperties: false
+
+examples:
+  - |
+    cf@18a10000 {
+        compatible = "mikrotik,rb532-pata";
+        reg = <0x18a10000 0xc04>;
+
+        gpio = <&gpio0 13 0>;
+
+        interrupt-parent = <&gpio0>;
+        interrupts = <13 0>;
+    };