diff mbox series

[3/3] dt-bindings: net: davicom,dm9000: convert to DT schema

Message ID 20230713152848.82752-4-krzysztof.kozlowski@linaro.org (mailing list archive)
State Not Applicable
Delegated to: Netdev Maintainers
Headers show
Series dt-bindings: net: davicom,dm9000: convert to DT schema | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Krzysztof Kozlowski July 13, 2023, 3:28 p.m. UTC
Convert the Davicom DM9000 Fast Ethernet Controller bindings to DT
schema.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/net/davicom,dm9000.yaml          | 59 +++++++++++++++++++
 .../bindings/net/davicom-dm9000.txt           | 27 ---------
 2 files changed, 59 insertions(+), 27 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/davicom,dm9000.yaml
 delete mode 100644 Documentation/devicetree/bindings/net/davicom-dm9000.txt

Comments

Conor Dooley July 13, 2023, 7:30 p.m. UTC | #1
On Thu, Jul 13, 2023 at 05:28:48PM +0200, Krzysztof Kozlowski wrote:
> Convert the Davicom DM9000 Fast Ethernet Controller bindings to DT
> schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Seems like a faithful conversion to me,
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.
Paul Cercueil July 14, 2023, 3:27 p.m. UTC | #2
Hi Krzysztof,

Le jeudi 13 juillet 2023 à 17:28 +0200, Krzysztof Kozlowski a écrit :
> Convert the Davicom DM9000 Fast Ethernet Controller bindings to DT
> schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../bindings/net/davicom,dm9000.yaml          | 59
> +++++++++++++++++++
>  .../bindings/net/davicom-dm9000.txt           | 27 ---------
>  2 files changed, 59 insertions(+), 27 deletions(-)
>  create mode 100644
> Documentation/devicetree/bindings/net/davicom,dm9000.yaml
>  delete mode 100644 Documentation/devicetree/bindings/net/davicom-
> dm9000.txt
> 
> diff --git
> a/Documentation/devicetree/bindings/net/davicom,dm9000.yaml
> b/Documentation/devicetree/bindings/net/davicom,dm9000.yaml
> new file mode 100644
> index 000000000000..66a7c6eec767
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/davicom,dm9000.yaml
> @@ -0,0 +1,59 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/davicom,dm9000.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Davicom DM9000 Fast Ethernet Controller
> +
> +maintainers:
> +  - Paul Cercueil <paul@crapouillou.net>

Did you decide that by yourself? :)

I do have one of these on my MIPS CI20 board, so I'm fine with
maintaining it - but a head's up would have been nice.

Cheers,
-Paul

> +
> +properties:
> +  compatible:
> +    const: davicom,dm9000
> +
> +  reg:
> +    items:
> +      - description: Address registers
> +      - description: Data registers
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  davicom,no-eeprom:
> +    type: boolean
> +    description: Configuration EEPROM is not available
> +
> +  davicom,ext-phy:
> +    type: boolean
> +    description: Use external PHY
> +
> +  reset-gpios:
> +    maxItems: 1
> +
> +  vcc-supply: true
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +allOf:
> +  - $ref: /schemas/memory-controllers/mc-peripheral-props.yaml#
> +  - $ref: /schemas/net/ethernet-controller.yaml#
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    ethernet@a8000000 {
> +        compatible = "davicom,dm9000";
> +        reg = <0xa8000000 0x2>, <0xa8000002 0x2>;
> +        interrupt-parent = <&gph1>;
> +        interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
> +        local-mac-address = [00 00 de ad be ef];
> +        davicom,no-eeprom;
> +    };
> diff --git a/Documentation/devicetree/bindings/net/davicom-dm9000.txt
> b/Documentation/devicetree/bindings/net/davicom-dm9000.txt
> deleted file mode 100644
> index 64c159e9cbf7..000000000000
> --- a/Documentation/devicetree/bindings/net/davicom-dm9000.txt
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -Davicom DM9000 Fast Ethernet controller
> -
> -Required properties:
> -- compatible = "davicom,dm9000";
> -- reg : physical addresses and sizes of registers, must contain 2
> entries:
> -    first entry : address register,
> -    second entry : data register.
> -- interrupts : interrupt specifier specific to interrupt controller
> -
> -Optional properties:
> -- davicom,no-eeprom : Configuration EEPROM is not available
> -- davicom,ext-phy : Use external PHY
> -- reset-gpios : phandle of gpio that will be used to reset chip
> during probe
> -- vcc-supply : phandle of regulator that will be used to enable
> power to chip
> -
> -Example:
> -
> -       ethernet@18000000 {
> -               compatible = "davicom,dm9000";
> -               reg = <0x18000000 0x2 0x18000004 0x2>;
> -               interrupt-parent = <&gpn>;
> -               interrupts = <7 4>;
> -               local-mac-address = [00 00 de ad be ef];
> -               davicom,no-eeprom;
> -               reset-gpios = <&gpf 12 GPIO_ACTIVE_LOW>;
> -               vcc-supply = <&eth0_power>;
> -       };
Krzysztof Kozlowski July 17, 2023, 6:10 a.m. UTC | #3
On 14/07/2023 17:27, Paul Cercueil wrote:
> Hi Krzysztof,
> 
> Le jeudi 13 juillet 2023 à 17:28 +0200, Krzysztof Kozlowski a écrit :
>> Convert the Davicom DM9000 Fast Ethernet Controller bindings to DT
>> schema.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>>  .../bindings/net/davicom,dm9000.yaml          | 59
>> +++++++++++++++++++
>>  .../bindings/net/davicom-dm9000.txt           | 27 ---------
>>  2 files changed, 59 insertions(+), 27 deletions(-)
>>  create mode 100644
>> Documentation/devicetree/bindings/net/davicom,dm9000.yaml
>>  delete mode 100644 Documentation/devicetree/bindings/net/davicom-
>> dm9000.txt
>>
>> diff --git
>> a/Documentation/devicetree/bindings/net/davicom,dm9000.yaml
>> b/Documentation/devicetree/bindings/net/davicom,dm9000.yaml
>> new file mode 100644
>> index 000000000000..66a7c6eec767
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/net/davicom,dm9000.yaml
>> @@ -0,0 +1,59 @@
>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/net/davicom,dm9000.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Davicom DM9000 Fast Ethernet Controller
>> +
>> +maintainers:
>> +  - Paul Cercueil <paul@crapouillou.net>
> 
> Did you decide that by yourself? :)
> 
> I do have one of these on my MIPS CI20 board, so I'm fine with
> maintaining it - but a head's up would have been nice.

Ah, apologies, I am really sorry. I remember to write a note that
maintainer is needed and many you can be one, but then eventually I
forgot and sent it as is.  :(

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/davicom,dm9000.yaml b/Documentation/devicetree/bindings/net/davicom,dm9000.yaml
new file mode 100644
index 000000000000..66a7c6eec767
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/davicom,dm9000.yaml
@@ -0,0 +1,59 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/davicom,dm9000.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Davicom DM9000 Fast Ethernet Controller
+
+maintainers:
+  - Paul Cercueil <paul@crapouillou.net>
+
+properties:
+  compatible:
+    const: davicom,dm9000
+
+  reg:
+    items:
+      - description: Address registers
+      - description: Data registers
+
+  interrupts:
+    maxItems: 1
+
+  davicom,no-eeprom:
+    type: boolean
+    description: Configuration EEPROM is not available
+
+  davicom,ext-phy:
+    type: boolean
+    description: Use external PHY
+
+  reset-gpios:
+    maxItems: 1
+
+  vcc-supply: true
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+allOf:
+  - $ref: /schemas/memory-controllers/mc-peripheral-props.yaml#
+  - $ref: /schemas/net/ethernet-controller.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    ethernet@a8000000 {
+        compatible = "davicom,dm9000";
+        reg = <0xa8000000 0x2>, <0xa8000002 0x2>;
+        interrupt-parent = <&gph1>;
+        interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
+        local-mac-address = [00 00 de ad be ef];
+        davicom,no-eeprom;
+    };
diff --git a/Documentation/devicetree/bindings/net/davicom-dm9000.txt b/Documentation/devicetree/bindings/net/davicom-dm9000.txt
deleted file mode 100644
index 64c159e9cbf7..000000000000
--- a/Documentation/devicetree/bindings/net/davicom-dm9000.txt
+++ /dev/null
@@ -1,27 +0,0 @@ 
-Davicom DM9000 Fast Ethernet controller
-
-Required properties:
-- compatible = "davicom,dm9000";
-- reg : physical addresses and sizes of registers, must contain 2 entries:
-    first entry : address register,
-    second entry : data register.
-- interrupts : interrupt specifier specific to interrupt controller
-
-Optional properties:
-- davicom,no-eeprom : Configuration EEPROM is not available
-- davicom,ext-phy : Use external PHY
-- reset-gpios : phandle of gpio that will be used to reset chip during probe
-- vcc-supply : phandle of regulator that will be used to enable power to chip
-
-Example:
-
-	ethernet@18000000 {
-		compatible = "davicom,dm9000";
-		reg = <0x18000000 0x2 0x18000004 0x2>;
-		interrupt-parent = <&gpn>;
-		interrupts = <7 4>;
-		local-mac-address = [00 00 de ad be ef];
-		davicom,no-eeprom;
-		reset-gpios = <&gpf 12 GPIO_ACTIVE_LOW>;
-		vcc-supply = <&eth0_power>;
-	};