Re: [PATCH 2/3] dt-bindings: net: Add support for J-Core EMAC
From: Artur Rojek
Date: Sat Aug 16 2025 - 08:06:54 EST
On 2025-08-16 10:19, Krzysztof Kozlowski wrote:
On 15/08/2025 21:48, Artur Rojek wrote:
Add a documentation file to describe the Device Tree bindings for the
Ethernet Media Access Controller found in the J-Core family of SoCs.
Signed-off-by: Artur Rojek <contact@xxxxxxxxxxxxxx>
---
.../devicetree/bindings/net/jcore,emac.yaml | 42
+++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644
Documentation/devicetree/bindings/net/jcore,emac.yaml
diff --git a/Documentation/devicetree/bindings/net/jcore,emac.yaml
b/Documentation/devicetree/bindings/net/jcore,emac.yaml
new file mode 100644
index 000000000000..a4384f7ed83d
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/jcore,emac.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/jcore,emac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: J-Core Ethernet Media Access Controller
+
+description: |
+ This node provides properties for configuring the Ethernet MAC
found
+ in the J-Core family of SoCs.
+
+maintainers:
+ - Artur Rojek <contact@xxxxxxxxxxxxxx>
+
+properties:
+ compatible:
+ const: jcore,emac
You need SoC-based compatibles. And then also rename the file to match
it.
Given how the top-most compatible of the bindings [1] of the board I am
using has "jcore,j2-soc", this driver should probably go with
"jcore,j2-emac".
But as this is an FPGA design, I don't know how widespread the use is
across other jcore derived SoCs (if any?).
I will wait for Jeff (who's design this is) to clarify on that.
PS. Too bad we already have other IP cores following the old pattern:
$ grep -r "compatible = \"jcore," bindings/ | grep -v "emac"
bindings/timer/jcore,pit.yaml: compatible = "jcore,pit";
bindings/spi/jcore,spi.txt: compatible = "jcore,spi2";
bindings/interrupt-controller/jcore,aic.yaml: compatible =
"jcore,aic2";
Cheers,
Artur
[1]
https://raw.githubusercontent.com/j-core/jcore-soc/refs/heads/master/targets/boards/turtle_1v1/board.dts
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+allOf:
+ - $ref: ethernet-controller.yaml#
+
+additionalProperties: false
unevaluatedProperties instead
+
+examples:
+ - |
+ ethernet@10000 {
+ compatible = "jcore,emac";
+ reg = <0x10000 0x2000>;
+ interrupts = <0x11>;
That's not hex...
+ };
Best regards,
Krzysztof