// SPDX-License-Identifier: GPL-2.0-or-later
/dts-v1/;

#include "rtl9312_plasmacloud_common.dtsi"

/ {
	compatible = "plasmacloud,psx28", "realtek,rtl9312-soc";
	model = "Plasma Cloud PSX28";

	leds {
		led-2 {
			color = <LED_COLOR_ID_GREEN>;
			function = "alarm-poe";
			gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
		};
	};
};

&i2c_mst1 {
	i2c5: i2c@5 {
		reg = <5>;
		#address-cells = <1>;
		#size-cells = <0>;

		pse: ethernet-pse@20 {
			compatible = "plasmacloud,psx28-pse", "realtek,pse-mcu-gen2-smbus";
			reg = <0x20>;

			enable-gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;

			pse-pis {
				#address-cells = <1>;
				#size-cells = <0>;

				PSE_PI(0)
				PSE_PI(1)
				PSE_PI(2)
				PSE_PI(3)
				PSE_PI(4)
				PSE_PI(5)
				PSE_PI(6)
				PSE_PI(7)
				PSE_PI(8)
				PSE_PI(9)
				PSE_PI(10)
				PSE_PI(11)
				PSE_PI(12)
				PSE_PI(13)
				PSE_PI(14)
				PSE_PI(15)
				PSE_PI(16)
				PSE_PI(17)
				PSE_PI(18)
				PSE_PI(19)
				PSE_PI(20)
				PSE_PI(21)
				PSE_PI(22)
				PSE_PI(23)
			};
		};
	};
};

&phy0 { pses = <&pse_pi0>; };
&phy1 { pses = <&pse_pi1>; };
&phy4 { pses = <&pse_pi2>; };
&phy5 { pses = <&pse_pi3>; };
&phy8 { pses = <&pse_pi4>; };
&phy9 { pses = <&pse_pi5>; };
&phy12 { pses = <&pse_pi6>; };
&phy13 { pses = <&pse_pi7>; };
&phy16 { pses = <&pse_pi8>; };
&phy17 { pses = <&pse_pi9>; };
&phy20 { pses = <&pse_pi10>; };
&phy21 { pses = <&pse_pi11>; };
&phy24 { pses = <&pse_pi12>; };
&phy25 { pses = <&pse_pi13>; };
&phy28 { pses = <&pse_pi14>; };
&phy29 { pses = <&pse_pi15>; };
&phy32 { pses = <&pse_pi16>; };
&phy33 { pses = <&pse_pi17>; };
&phy36 { pses = <&pse_pi18>; };
&phy37 { pses = <&pse_pi19>; };
&phy40 { pses = <&pse_pi20>; };
&phy41 { pses = <&pse_pi21>; };
&phy44 { pses = <&pse_pi22>; };
&phy45 { pses = <&pse_pi23>; };
