Properties for an MDIO bus multiplexer/switch controlled by GPIO pins.

Schema identifier ($id): "http://devicetree.org/schemas/net/mdio-mux-gpio.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Andrew Lunn <andrew@lunn.ch>"

This is a special case of a MDIO bus multiplexer. One or more GPIO lines are used to control which child bus is connected.

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/net/mdio-mux.yaml#

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "mdio-mux-gpio"

gpios — required here #

List of GPIOs used to control the multiplexer, least significant bit first.

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 32

Required in this object (required): "compatible", "gpios"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

/*
 An NXP sn74cbtlv3253 dual 1-of-4 switch controlled by a
 pair of GPIO lines.  Child busses 2 and 3 populated with 4
 PHYs each.
 */
mdio-mux {
    compatible = "mdio-mux-gpio";
    gpios = <&gpio1 3 0>, <&gpio1 4 0>;
    mdio-parent-bus = <&smi1>;
    #address-cells = <1>;
    #size-cells = <0>;

    mdio@2 {
        reg = <2>;
        #address-cells = <1>;
        #size-cells = <0>;

        ethernet-phy@1 {
            reg = <1>;
            interrupt-parent = <&gpio>;
            interrupts = <10 8>; /* Pin 10, active low */
        };
        ethernet-phy@2 {
            reg = <2>;
            interrupt-parent = <&gpio>;
            interrupts = <10 8>; /* Pin 10, active low */
        };
        ethernet-phy@3 {
            reg = <3>;
            interrupt-parent = <&gpio>;
            interrupts = <10 8>; /* Pin 10, active low */
        };
        ethernet-phy@4 {
            reg = <4>;
            interrupt-parent = <&gpio>;
            interrupts = <10 8>; /* Pin 10, active low */
        };
    };

    mdio@3 {
        reg = <3>;
        #address-cells = <1>;
        #size-cells = <0>;

        ethernet-phy@1 {
            reg = <1>;
            interrupt-parent = <&gpio>;
            interrupts = <12 8>; /* Pin 12, active low */
        };
        ethernet-phy@2 {
            reg = <2>;
            interrupt-parent = <&gpio>;
            interrupts = <12 8>; /* Pin 12, active low */
        };
        ethernet-phy@3 {
            reg = <3>;
            interrupt-parent = <&gpio>;
            interrupts = <12 8>; /* Pin 12, active low */
        };
        ethernet-phy@4 {
            reg = <4>;
            interrupt-parent = <&gpio>;
            interrupts = <12 8>; /* Pin 12, active low */
        };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0

Edit this page