diff mbox series

[1/2] dt-bindings: net: add RTL8152 binding documentation

Message ID 20210814181107.138992-1-mail@david-bauer.net
State New
Headers show
Series [1/2] dt-bindings: net: add RTL8152 binding documentation | expand

Commit Message

David Bauer Aug. 14, 2021, 6:11 p.m. UTC
Add binding documentation for the Realtek RTL8152 / RTL8153 USB ethernet
adapters.

Signed-off-by: David Bauer <mail@david-bauer.net>
---
 .../bindings/net/realtek,rtl8152.yaml         | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/realtek,rtl8152.yaml

Comments

David Bauer Aug. 14, 2021, 10:26 p.m. UTC | #1
Hi Heiner,

On 8/14/21 8:33 PM, Heiner Kallweit wrote:
> On 14.08.2021 20:11, David Bauer wrote:
>> Add binding documentation for the Realtek RTL8152 / RTL8153 USB ethernet
>> adapters.
>>
>> Signed-off-by: David Bauer <mail@david-bauer.net>
>> ---
>>   .../bindings/net/realtek,rtl8152.yaml         | 43 +++++++++++++++++++
>>   1 file changed, 43 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/net/realtek,rtl8152.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/net/realtek,rtl8152.yaml b/Documentation/devicetree/bindings/net/realtek,rtl8152.yaml
>> new file mode 100644
>> index 000000000000..ab760000b3a6
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/net/realtek,rtl8152.yaml
>> @@ -0,0 +1,43 @@
>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/net/realtek,rtl8152.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Realtek RTL8152/RTL8153 series USB ethernet
>> +
>> +maintainers:
>> +  - David Bauer <mail@david-bauer.net>
>> +
>> +properties:
>> +  compatible:
>> +    oneOf:
>> +      - items:
>> +          - enum:
>> +              - realtek,rtl8152
>> +              - realtek,rtl8153
>> +
>> +  reg:
>> +    description: The device number on the USB bus
>> +
>> +  realtek,led-data:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description: Value to be written to the LED configuration register.
>> +
> 
> +Pavel as LED subsystem maintainer
> 
> There's an ongoing discussion (with certain decisions taken already) about
> how to configure network device LEDs.

Thanks, I didn't knew about this.

Is there any place where i can read up specifics about
this topic?

Best
David

> 
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +examples:
>> +  - |
>> +    usb@100 {
>> +      reg = <0x100 0x100>;
>> +      #address-cells = <1>;
>> +      #size-cells = <0>;
>> +
>> +      usb-eth@2 {
>> +        compatible = "realtek,rtl8153";
>> +        reg = <0x2>;
>> +        realtek,led-data = <0x87>;
>> +      };
>> +    };
>>
>
Rob Herring (Arm) Aug. 15, 2021, 2:46 p.m. UTC | #2
On Sat, 14 Aug 2021 20:11:06 +0200, David Bauer wrote:
> Add binding documentation for the Realtek RTL8152 / RTL8153 USB ethernet
> adapters.
> 
> Signed-off-by: David Bauer <mail@david-bauer.net>
> ---
>  .../bindings/net/realtek,rtl8152.yaml         | 43 +++++++++++++++++++
>  1 file changed, 43 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/realtek,rtl8152.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/realtek,rtl8152.yaml: 'additionalProperties' is a required property
	hint: A schema without a "$ref" to another schema must define all properties and use "additionalProperties"
	from schema $id: http://devicetree.org/meta-schemas/base.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/realtek,rtl8152.yaml: ignoring, error in schema: 
warning: no schema found in file: ./Documentation/devicetree/bindings/net/realtek,rtl8152.yaml
Documentation/devicetree/bindings/net/realtek,rtl8152.example.dt.yaml:0:0: /example-0/usb@100/usb-eth@2: failed to match any schema with compatible: ['realtek,rtl8153']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1516862

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/realtek,rtl8152.yaml b/Documentation/devicetree/bindings/net/realtek,rtl8152.yaml
new file mode 100644
index 000000000000..ab760000b3a6
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/realtek,rtl8152.yaml
@@ -0,0 +1,43 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/realtek,rtl8152.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek RTL8152/RTL8153 series USB ethernet
+
+maintainers:
+  - David Bauer <mail@david-bauer.net>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - realtek,rtl8152
+              - realtek,rtl8153
+
+  reg:
+    description: The device number on the USB bus
+
+  realtek,led-data:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Value to be written to the LED configuration register.
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    usb@100 {
+      reg = <0x100 0x100>;
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      usb-eth@2 {
+        compatible = "realtek,rtl8153";
+        reg = <0x2>;
+        realtek,led-data = <0x87>;
+      };
+    };