Create the new compatibles to identify AST2600 MAC0/1 and MAC3/4.
Add conditional schema constraints for Aspeed AST2600 MAC controllers:
- For "aspeed,ast2600-mac01", require rx/tx-internal-delay-ps properties
with 45ps step.
- For "aspeed,ast2600-mac23", require rx/tx-internal-delay-ps properties
with 250ps step.
- Both require the "scu" property.
Other compatible values remain unrestricted.
Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
---
.../devicetree/bindings/net/faraday,ftgmac100.yaml | 50 ++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
index d14410018bcf..de646e7e3bca 100644
--- a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
+++ b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
@@ -19,6 +19,12 @@ properties:
- aspeed,ast2500-mac
- aspeed,ast2600-mac
- const: faraday,ftgmac100
+ - items:
+ - enum:
+ - aspeed,ast2600-mac01
+ - aspeed,ast2600-mac23
+ - const: aspeed,ast2600-mac
+ - const: faraday,ftgmac100
reg:
maxItems: 1
@@ -69,6 +75,12 @@ properties:
mdio:
$ref: /schemas/net/mdio.yaml#
+ scu:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the SCU (System Control Unit) syscon node for Aspeed platform.
+ This reference is used by the MAC controller to configure the RGMII delays.
+
required:
- compatible
- reg
@@ -88,6 +100,44 @@ allOf:
else:
properties:
resets: false
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: aspeed,ast2600-mac01
+ then:
+ properties:
+ rx-internal-delay-ps:
+ minimum: 0
+ maximum: 1395
+ multipleOf: 45
+ tx-internal-delay-ps:
+ minimum: 0
+ maximum: 1395
+ multipleOf: 45
+ required:
+ - scu
+ - rx-internal-delay-ps
+ - tx-internal-delay-ps
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: aspeed,ast2600-mac23
+ then:
+ properties:
+ rx-internal-delay-ps:
+ minimum: 0
+ maximum: 7750
+ multipleOf: 250
+ tx-internal-delay-ps:
+ minimum: 0
+ maximum: 7750
+ multipleOf: 250
+ required:
+ - scu
+ - rx-internal-delay-ps
+ - tx-internal-delay-ps
unevaluatedProperties: false
--
2.34.1
On Mon, Nov 03, 2025 at 03:39:16PM +0800, Jacky Chou wrote: > Create the new compatibles to identify AST2600 MAC0/1 and MAC3/4. > Add conditional schema constraints for Aspeed AST2600 MAC controllers: > - For "aspeed,ast2600-mac01", require rx/tx-internal-delay-ps properties > with 45ps step. > - For "aspeed,ast2600-mac23", require rx/tx-internal-delay-ps properties > with 250ps step. That difference does not justify different compatibles. Basically you said they have same programming model, just different hardware characteristics, so same compatible. Best regards, Krzysztof
On Mon, Nov 03, 2025 at 03:39:16PM +0800, Jacky Chou wrote: > Create the new compatibles to identify AST2600 MAC0/1 and MAC3/4. > Add conditional schema constraints for Aspeed AST2600 MAC controllers: > - For "aspeed,ast2600-mac01", require rx/tx-internal-delay-ps properties > with 45ps step. > - For "aspeed,ast2600-mac23", require rx/tx-internal-delay-ps properties > with 250ps step. > - Both require the "scu" property. > Other compatible values remain unrestricted. > > Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com> > --- > .../devicetree/bindings/net/faraday,ftgmac100.yaml | 50 ++++++++++++++++++++++ > 1 file changed, 50 insertions(+) > > diff --git a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml > index d14410018bcf..de646e7e3bca 100644 > --- a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml > +++ b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml > @@ -19,6 +19,12 @@ properties: > - aspeed,ast2500-mac > - aspeed,ast2600-mac I don't know if it is possible, but it would be good to mark aspeed,ast2600-mac as deprecated. I also think some comments would be good, explaining how aspeed,ast2600-mac01 and aspeed,ast2600-mac23 differ from aspeed,ast2600-mac, and why you should use them. Andrew
On Mon, Nov 03, 2025 at 03:39:16PM +0800, Jacky Chou wrote: > Create the new compatibles to identify AST2600 MAC0/1 and MAC3/4. > Add conditional schema constraints for Aspeed AST2600 MAC controllers: > - For "aspeed,ast2600-mac01", require rx/tx-internal-delay-ps properties > with 45ps step. > - For "aspeed,ast2600-mac23", require rx/tx-internal-delay-ps properties > with 250ps step. > - Both require the "scu" property. > Other compatible values remain unrestricted. > > Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com> > --- > .../devicetree/bindings/net/faraday,ftgmac100.yaml | 50 ++++++++++++++++++++++ > 1 file changed, 50 insertions(+) > > diff --git a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml > index d14410018bcf..de646e7e3bca 100644 > --- a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml > +++ b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml > @@ -19,6 +19,12 @@ properties: > - aspeed,ast2500-mac > - aspeed,ast2600-mac > - const: faraday,ftgmac100 > + - items: > + - enum: > + - aspeed,ast2600-mac01 > + - aspeed,ast2600-mac23 > + - const: aspeed,ast2600-mac > + - const: faraday,ftgmac100 > > reg: > maxItems: 1 > @@ -69,6 +75,12 @@ properties: > mdio: > $ref: /schemas/net/mdio.yaml# > > + scu: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + Phandle to the SCU (System Control Unit) syscon node for Aspeed platform. > + This reference is used by the MAC controller to configure the RGMII delays. > + > required: > - compatible > - reg > @@ -88,6 +100,44 @@ allOf: > else: > properties: > resets: false > + - if: > + properties: > + compatible: > + contains: > + const: aspeed,ast2600-mac01 > + then: > + properties: > + rx-internal-delay-ps: > + minimum: 0 > + maximum: 1395 > + multipleOf: 45 I would add a default: 0 > + tx-internal-delay-ps: > + minimum: 0 > + maximum: 1395 > + multipleOf: 45 and also here. > + required: > + - scu > + - rx-internal-delay-ps > + - tx-internal-delay-ps and then these are not required, but optional. > + - if: > + properties: > + compatible: > + contains: > + const: aspeed,ast2600-mac23 > + then: > + properties: > + rx-internal-delay-ps: > + minimum: 0 > + maximum: 7750 > + multipleOf: 250 > + tx-internal-delay-ps: > + minimum: 0 > + maximum: 7750 > + multipleOf: 250 > + required: > + - scu > + - rx-internal-delay-ps > + - tx-internal-delay-ps Same again here. Andrew
© 2016 - 2026 Red Hat, Inc.