// SPDX-License-Identifier: (GPL-2.0 OR MIT)

/dts-v1/;
/plugin/;

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

	fragment@0 {
		target = <&ubi_part>;

		__overlay__ {
			volumes {
				ubi_factory: ubi-volume-factory {
					volname = "factory";

					nvmem-layout {
						compatible = "fixed-layout";
						#address-cells = <1>;
						#size-cells = <1>;

						eeprom_wmac: eeprom@0 {
							reg = <0x0 0x1e00>;
						};

						gmac2_mac: eeprom@fffee {
							reg = <0xfffee 0x6>;
						};

						gmac1_mac: eeprom@ffff4 {
							reg = <0xffff4 0x6>;
						};

						gmac0_mac: eeprom@ffffa {
							reg = <0xffffa 0x6>;
						};
					};
				};
			};
		};
	};

	fragment@1 {
		target = <&pcie0>;
		__overlay__ {
			pcie@0,0 {
				reg = <0x0000 0 0 0 0>;

				wifi@0,0 {
					compatible = "mediatek,mt76";
					reg = <0x0000 0 0 0 0>;
					nvmem-cell-names = "eeprom";
					nvmem-cells = <&eeprom_wmac>;
				};
			};
		};
	};

	fragment@2 {
		target = <&gmac0>;
		__overlay__ {
			nvmem-cell-names = "mac-address";
			nvmem-cells = <&gmac0_mac>;
		};
	};

	fragment@3 {
		target = <&gmac1>;
		__overlay__ {
			nvmem-cell-names = "mac-address";
			nvmem-cells = <&gmac1_mac>;
		};
	};

	fragment@4 {
		target = <&gmac2>;
		__overlay__ {
			nvmem-cell-names = "mac-address";
			nvmem-cells = <&gmac2_mac>;
		};
	};
};
