// 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 = <&i2c1>;
		__overlay__ {
			pinctrl-names = "default";
			pinctrl-0 = <&i2c1_sfp_pins>;
			status = "okay";
		};
	};

	fragment@1 {
		target-path = "/";
		__overlay__ {
			sfp_esp0: sfp@0 {
				compatible = "sff,sfp";
				i2c-bus = <&i2c1>;
				mod-def0-gpios = <&pio 35 GPIO_ACTIVE_LOW>;
				los-gpios = <&pio 33 GPIO_ACTIVE_HIGH>;
				tx-disable-gpios = <&pio 29 GPIO_ACTIVE_HIGH>;
				maximum-power-milliwatt = <3000>;
			};
		};
	};

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