Commit 62cd6679 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'dt-bindings-first-batch-of-dt-schema-conversions-for-amlogic-meson-bindings'

Neil Armstrong says:

====================
dt-bindings: first batch of dt-schema conversions for Amlogic Meson bindings

Batch conversion of the following bindings:
[...]
- mdio-mux-meson-g12a.txt
====================

Link: https://lore.kernel.org/r/20221117-b4-amlogic-bindings-convert-v2-0-36ad050bb625@linaro.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 60d86034 82fc0f87
Loading
Loading
Loading
Loading
+80 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/amlogic,g12a-mdio-mux.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: MDIO bus multiplexer/glue of Amlogic G12a SoC family

description:
  This is a special case of a MDIO bus multiplexer. It allows to choose between
  the internal mdio bus leading to the embedded 10/100 PHY or the external
  MDIO bus.

maintainers:
  - Neil Armstrong <neil.armstrong@linaro.org>

allOf:
  - $ref: mdio-mux.yaml#

properties:
  compatible:
    const: amlogic,g12a-mdio-mux

  reg:
    maxItems: 1

  clocks:
    items:
      - description: peripheral clock
      - description: platform crytal
      - description: SoC 50MHz MPLL

  clock-names:
    items:
      - const: pclk
      - const: clkin0
      - const: clkin1

required:
  - compatible
  - reg
  - clocks
  - clock-names

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    mdio-multiplexer@4c000 {
        compatible = "amlogic,g12a-mdio-mux";
        reg = <0x4c000 0xa4>;
        clocks = <&clkc_eth_phy>, <&xtal>, <&clkc_mpll>;
        clock-names = "pclk", "clkin0", "clkin1";
        mdio-parent-bus = <&mdio0>;
        #address-cells = <1>;
        #size-cells = <0>;

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

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

            ethernet-phy@8 {
                compatible = "ethernet-phy-id0180.3301",
                             "ethernet-phy-ieee802.3-c22";
                interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
                reg = <8>;
                max-speed = <100>;
            };
        };
    };
...
+0 −48
Original line number Diff line number Diff line
Properties for the MDIO bus multiplexer/glue of Amlogic G12a SoC family.

This is a special case of a MDIO bus multiplexer. It allows to choose between
the internal mdio bus leading to the embedded 10/100 PHY or the external
MDIO bus.

Required properties in addition to the generic multiplexer properties:
- compatible : amlogic,g12a-mdio-mux
- reg: physical address and length of the multiplexer/glue registers
- clocks: list of clock phandle, one for each entry clock-names.
- clock-names: should contain the following:
  * "pclk"   : peripheral clock.
  * "clkin0" : platform crytal
  * "clkin1" : SoC 50MHz MPLL

Example :

mdio_mux: mdio-multiplexer@4c000 {
	compatible = "amlogic,g12a-mdio-mux";
	reg = <0x0 0x4c000 0x0 0xa4>;
	clocks = <&clkc CLKID_ETH_PHY>,
		 <&xtal>,
		 <&clkc CLKID_MPLL_5OM>;
	clock-names = "pclk", "clkin0", "clkin1";
	mdio-parent-bus = <&mdio0>;
	#address-cells = <1>;
	#size-cells = <0>;

	ext_mdio: mdio@0 {
		reg = <0>;
		#address-cells = <1>;
		#size-cells = <0>;
	};

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

		internal_ephy: ethernet-phy@8 {
			compatible = "ethernet-phy-id0180.3301",
				     "ethernet-phy-ieee802.3-c22";
			interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
			reg = <8>;
			max-speed = <100>;
		};
	};
};