// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
 * Copyright (C) 2022 MediaTek Inc.
 * Author: Sam.Shih <sam.shih@mediatek.com>
 */

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>

/ {
	compatible = "mediatek,mt7988a-rfb", "mediatek,mt7988a";

	fragment@0 {
		target = <&i2c2>;
		__overlay__ {
			pinctrl-names = "default";
			pinctrl-0 = <&i2c2_0_pins>;
			status = "okay";
		};
	};

	fragment@1 {
		target-path = "/";
		__overlay__ {
			sfp_esp1: sfp@1 {
				compatible = "sff,sfp";
				i2c-bus = <&i2c2>;
				mod-def0-gpios = <&pio 82 GPIO_ACTIVE_LOW>;
				los-gpios = <&pio 81 GPIO_ACTIVE_HIGH>;
				tx-disable-gpios = <&pio 36 GPIO_ACTIVE_HIGH>;
				maximum-power-milliwatt = <3000>;
			};
		};
	};

	fragment@2 {
		target = <&gmac1>;
		__overlay__ {
			phy-mode = "10gbase-r";
			managed = "in-band-status";
			sfp = <&sfp_esp1>;
			status = "okay";
		};
	};
};
