// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (C) 2021 Marvell International Ltd.
 * Copyright (C) 2024 Addiva Elektronik AB
 *
 * Device tree for revision A of DCP-SC-28P
 */

#include "dcp-sc-28p.dtsi"
/ {
	compatible = "styx,dcp-sc-28p-a",
		"styx,dcp-sc-28p",
		"marvell,armada-ap807-quad",
		"marvell,armada-ap807";
};

&sw3 {
	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		/* Can't use XSWP macro as port 0 does not have
		 * any LEDs attached to it. LEDs for port 10 seem
		 * to be wired to the corresponding SFP cage. Maybe
		 * we can apply a static workaround by binding port
		 * 10's green LED to "Special LED 1", so we can at
		 * least see link/act.
		 */
		port@0 {
			reg = <0>;
			label = "e16";
			nvmem-cells = <&base_mac 16>;
			nvmem-cell-names = "mac-address";
			phy-mode = "10gbase-r";
			managed = "in-band-status";
			sfp = <&sfp3>;
		};
		XSWCPU(9, &cp0_eth0);
		sw3p10: XSWLINK(a, &sw2p10 &sw1p0);
	};

};

&sw2 {
	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		sw2p0:  XSWLINK(0, &sw1p0);
		XSWP(9, "e15", 15, &sfp2);
		sw2p10: XSWLINK(a, &sw3p10);
	};
};

&sw1 {
	ports {
		sw1p0: XSWLINK(0, &sw2p0 &sw3p10);
		XSWP(9, "e14", 14, &sfp1);
		XSWP(a, "e13", 13, &sfp0);
	};
};

&cp0_spi1 {
	spi-flash@0 {
		broken-flash-reset;
	};
};
