Thread View: linux.kernel.netdev
2 messages
2 total messages
Started by Andrew Lunn
Fri, 13 Nov 2026 13:20
Re: [PATCH net-next v4 1/8] dt-bindings: net: add Xilinx TSN Endpoint Ethernet MAC
Author: Andrew Lunn
Date: Fri, 13 Nov 2026 13:20
Date: Fri, 13 Nov 2026 13:20
96 lines
12122 bytes
12122 bytes
> + xlnx,max-learning-entries:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 256
> + maximum: 1920
> + default: 1920
> + description:
> + Maximum number of addresses the hardware address learning engine
> + can learn on each network port (MAC1 and MAC2). This is the
> + MAX_LEARNING_ENTRIES IP configuration parameter, and no register
> + reports it. The endpoint port does not take part in hardware
> + address learning.
Is this a synthesis parameter? No other switch that i know of has it
in DT. The driver hard codes the value based on the compatible. Why
does that not work for you?
> + mdio-1:
> + $ref: /schemas/net/mdio.yaml#
> + description:
> + MDIO bus controller for MAC1. Registers reside inside the mac1
> + reg-names window.
> + unevaluatedProperties: false
> +
> + mdio-2:
> + $ref: /schemas/net/mdio.yaml#
> + description:
> + MDIO bus controller for MAC2. Registers reside inside the mac2
> + reg-names window.
> + unevaluatedProperties: false
How hard coded into the design is the number of ports? The way the DT
is structured, it does not seem easy to add another port. It is more
normal to put all port properties within one node, so you just need to
cookie cutter that node, not add new nodes all other the place.
> + switch@38000 {
> + compatible = "xlnx,tsn-switch";
> + reg = <0x38000 0x8000>,
> + <0x00000 0x14000>,
> + <0x20000 0x14000>;
> + reg-names = "switch", "mac1", "mac2";
> + mdio-1 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + phy0: ethernet-phy@0 {
> + reg = <0>;
> + };
> + };
> +
> + mdio-2 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + phy1: ethernet-phy@1 {
> + reg = <1>;
> + };
> + };
Interesting that this is address 1, where as the other is address 0.
Just to be sure, there are two fully independent MDIO bus masters?
This
> +
> + ethernet-ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ethernet-port@0 {
> + reg = <0>;
> + ethernet = <&ep_mac>;
> + phy-mode = "internal";
> +
> + fixed-link {
> + speed = <1000>;
> + full-duplex;
> + };
> + };
> +
> + ethernet-port@1 {
> + reg = <1>;
> + phy-handle = <&phy0>;
> + phy-mode = "rgmii-id";
> + };
> +
> + ethernet-port@2 {
> + reg = <2>;
> + phy-handle = <&phy1>;
> + phy-mode = "rgmii-id";
Are these two PHY internal or external? Using rgmii internally is O.K,
but odd. Normally 'GMII' or 'internal' would be used.
Andrew
Re: [PATCH net-next v4 1/8] dt-bindings: net: add Xilinx TSN Endpoint Ethernet MAC
Author: Andrew Lunn
Date: Sat, 14 Nov 2026 21:43
Date: Sat, 14 Nov 2026 21:43
56 lines
11179 bytes
11179 bytes
> > Is this a synthesis parameter? No other switch that i know of has it
> > in DT. The driver hard codes the value based on the compatible. Why
> > does that not work for you?
> Yes, MAX_LEARNING_ENTRIES is a Vivado synthesis parameter of the IP
> (256 to 1920), and no register reports it
I assume that will be fixed in the next version of the IP?
Are there many other synthesis parameter which are not exported in
registers? I just want to get an idea if this is a one off, or you are
going to add lots of DT parameters in the next set of patches.
> The number of ports is fixed by the IP. The switch always has two
> external MAC ports and one internal endpoint port, and no configuration
> has more external MACs, so the binding never needs to grow another port.
And that is signed off by top management? The next switch you design
will be a fresh design, no reuse of the existing IP and will require a
whole new DSA driver?
> The switch node follows the IP's register map. The switch fabric and the
> two MAC blocks are separate register windows of the switch IP, and each
> MAC window also holds that MAC's MDIO controller and PTP block. The PTP
> timer interrupt is shared by the whole switch, not owned by one port.
>
> For these reasons I would prefer to keep the per-MAC resources on the
> switch node
>
> >
> > > + switch@38000 {
> > > + compatible = "xlnx,tsn-switch";
> > > + reg = <0x38000 0x8000>,
> > > + <0x00000 0x14000>,
> > > + <0x20000 0x14000>;
> > > + reg-names = "switch", "mac1", "mac2";
I ask, because it would not be too hard to swap this address map
around, put the switch registers first, and then the port registers,
and you could have as many ports as you want.
Back to what you just said:
> each
> MAC window also holds that MAC's MDIO controller and PTP block.
So the MDIO controller and the PTP block are MAC properties, so should
be inside the MAC node.
> The PTP
> timer interrupt is shared by the whole switch
So that should be at the switch level.
Andrew
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads