Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: net: starfive,jh7110-dwmac: Add JH7100 SoC compatible

The Synopsys DesignWare MAC found on StarFive JH7100 SoC is mostly
similar to the newer JH7110, but it requires only two interrupts and a
single reset line, which is 'ahb' instead of the commonly used
'stmmaceth'.

Since the common binding 'snps,dwmac' allows selecting 'ahb' only in
conjunction with 'stmmaceth', extend the logic to also permit exclusive
usage of the 'ahb' reset name. This ensures the following use cases are
supported:

JH7110: reset-names = "stmmaceth", "ahb";
JH7100: reset-names = "ahb";
other: reset-names = "stmmaceth";

Also note the need to use a different dwmac fallback, as v5.20 applies
to JH7110 only, while JH7100 relies on v3.7x.

Additionally, drop the reset description items from top-level binding as
they are already provided by the included snps,dwmac schema.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Cristian Ciocaltea and committed by
David S. Miller
53e41b76 ccf14452

+57 -26
+7 -4
Documentation/devicetree/bindings/net/snps,dwmac.yaml
··· 95 95 - snps,dwmac-5.20 96 96 - snps,dwxgmac 97 97 - snps,dwxgmac-2.10 98 + - starfive,jh7100-dwmac 98 99 - starfive,jh7110-dwmac 99 100 100 101 reg: ··· 145 144 - description: AHB reset 146 145 147 146 reset-names: 148 - minItems: 1 149 - items: 150 - - const: stmmaceth 151 - - const: ahb 147 + oneOf: 148 + - items: 149 + - enum: [stmmaceth, ahb] 150 + - items: 151 + - const: stmmaceth 152 + - const: ahb 152 153 153 154 power-domains: 154 155 maxItems: 1
+50 -22
Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
··· 16 16 compatible: 17 17 contains: 18 18 enum: 19 + - starfive,jh7100-dwmac 19 20 - starfive,jh7110-dwmac 20 21 required: 21 22 - compatible 22 23 23 24 properties: 24 25 compatible: 25 - items: 26 - - enum: 27 - - starfive,jh7110-dwmac 28 - - const: snps,dwmac-5.20 26 + oneOf: 27 + - items: 28 + - const: starfive,jh7100-dwmac 29 + - const: snps,dwmac 30 + - items: 31 + - const: starfive,jh7110-dwmac 32 + - const: snps,dwmac-5.20 29 33 30 34 reg: 31 35 maxItems: 1 ··· 49 45 - const: ptp_ref 50 46 - const: tx 51 47 - const: gtx 52 - 53 - interrupts: 54 - minItems: 3 55 - maxItems: 3 56 - 57 - interrupt-names: 58 - minItems: 3 59 - maxItems: 3 60 - 61 - resets: 62 - items: 63 - - description: MAC Reset signal. 64 - - description: AHB Reset signal. 65 - 66 - reset-names: 67 - items: 68 - - const: stmmaceth 69 - - const: ahb 70 48 71 49 starfive,tx-use-rgmii-clk: 72 50 description: ··· 79 93 80 94 allOf: 81 95 - $ref: snps,dwmac.yaml# 96 + 97 + - if: 98 + properties: 99 + compatible: 100 + contains: 101 + const: starfive,jh7100-dwmac 102 + then: 103 + properties: 104 + interrupts: 105 + minItems: 2 106 + maxItems: 2 107 + 108 + interrupt-names: 109 + minItems: 2 110 + maxItems: 2 111 + 112 + resets: 113 + maxItems: 1 114 + 115 + reset-names: 116 + const: ahb 117 + 118 + - if: 119 + properties: 120 + compatible: 121 + contains: 122 + const: starfive,jh7110-dwmac 123 + then: 124 + properties: 125 + interrupts: 126 + minItems: 3 127 + maxItems: 3 128 + 129 + interrupt-names: 130 + minItems: 3 131 + maxItems: 3 132 + 133 + resets: 134 + minItems: 2 135 + 136 + reset-names: 137 + minItems: 2 82 138 83 139 unevaluatedProperties: false 84 140