[net-next,3/4] dt-bindings: net: allwinner,sun8i-a83t-emac: Add Allwinner H616 EMAC1 and syscon index
Commit Message
Document the Allwinner H616 EMAC1 and internal EMAC compatible strings
("allwinner,sun50i-h616-emac1" and "allwinner,sun50i-h616-internal-emac").
Update the syscon property schema to support an optional register index
offset argument, allowing boards to reference the secondary EMAC clock
register on H616/H618 SoCs.
Assisted-by: LLM
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
---
Notes:
Tested against Allwinner H616/H618 device trees in Armbian, verifying
schema validation with dt_binding_check.
.../bindings/net/allwinner,sun8i-a83t-emac.yaml | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
Comments
On Wed, 16 Sep 2026 14:41:18 +1000, Alastair D'Silva wrote:
> Document the Allwinner H616 EMAC1 and internal EMAC compatible strings
> ("allwinner,sun50i-h616-emac1" and "allwinner,sun50i-h616-internal-emac").
> Update the syscon property schema to support an optional register index
> offset argument, allowing boards to reference the secondary EMAC clock
> register on H616/H618 SoCs.
>
> Assisted-by: LLM
> Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
> ---
>
> Notes:
> Tested against Allwinner H616/H618 device trees in Armbian, verifying
> schema validation with dt_binding_check.
>
> .../bindings/net/allwinner,sun8i-a83t-emac.yaml | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml: properties:syscon:items:0: {'minItems': 1, 'maxItems': 2, 'items': [{'description': 'Phandle to the device containing the EMAC or GMAC clock register'}, {'description': 'Register index offset (0 for EMAC0, 1 for EMAC1)'}]} should not be valid under {'required': ['maxItems']}
hint: "maxItems" is not needed with an "items" list
from schema $id: http://devicetree.org/meta-schemas/items.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20260916044119.475666-4-alastair@d-silva.org
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
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 after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: missing mdio-mux conditional for h616-internal-emac
--
commit 32bf9c78551205e690dd92ce3a439bc48e70a630
Author: Alastair D'Silva <alastair@d-silva.org>
dt-bindings: net: allwinner,sun8i-a83t-emac: Add Allwinner H616 EMAC1 and syscon index
The commit documents the Allwinner H616 EMAC1 and internal EMAC compatible
strings. It also updates the syscon property schema to support an optional
register index offset argument.
> diff --git a/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml b/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
> index 323a669fa9823..cd1075dab5810 100644
> --- a/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
> +++ b/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
> @@ -39,6 +39,8 @@ properties:
> - allwinner,sun50i-a100-emac
> - allwinner,sun50i-h6-emac
> - allwinner,sun50i-h616-emac0
> + - allwinner,sun50i-h616-emac1
> + - allwinner,sun50i-h616-internal-emac
[Severity: Low]
Does the newly added allwinner,sun50i-h616-internal-emac variant need to be
included in the conditional block for mdio-mux?
Looking at the schema file, there is a conditional block that permits the
mdio-mux property for internal PHYs:
allOf:
- if:
properties:
compatible:
contains:
enum:
- allwinner,sun8i-h3-emac
- allwinner,sun8i-v3s-emac
then:
properties:
...
mdio-mux:
type: object
unevaluatedProperties: false
Since allwinner,sun50i-h616-internal-emac is not in this enum, valid device
trees using this new compatible string with an mdio-mux node will fail
schema validation.
The driver itself requires the mdio-mux node to avoid an -ENODEV error
during probe, so it seems the property is needed, but the schema will
reject it due to unevaluatedProperties: false at the root level.
@@ -39,6 +39,8 @@ properties:
- allwinner,sun50i-a100-emac
- allwinner,sun50i-h6-emac
- allwinner,sun50i-h616-emac0
+ - allwinner,sun50i-h616-emac1
+ - allwinner,sun50i-h616-internal-emac
- allwinner,sun55i-a523-gmac0
- const: allwinner,sun50i-a64-emac
- items:
@@ -71,10 +73,16 @@ properties:
maxItems: 1
syscon:
- $ref: /schemas/types.yaml#/definitions/phandle
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ - minItems: 1
+ maxItems: 2
+ items:
+ - description: Phandle to the device containing the EMAC or GMAC clock register
+ - description: Register index offset (0 for EMAC0, 1 for EMAC1)
description:
- Phandle to the device containing the EMAC or GMAC clock
- register
+ Phandle to the device containing the EMAC or GMAC clock register,
+ with an optional register index (0 for EMAC0, 1 for EMAC1).
required:
- compatible