We have a custom board using a Layerscape ls1012a processor hooked up in the following manner.

We are building openwrt with a 5.4 kernel that has divers for both chips. However, we are struggling to get our device tree configured so that either chip is probed correctly. We believe our RCW is configured correctly but we get a MDIO "device at address 0 is missing" when probing the MDIO bus and we get an error -22 (bad parameter) for the SPI switch.
We have tracked the SPI switch error to it not finding the phy-mode node even though we have it in several places.
Below are the relevent parts of our device tree.
&pfe {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
pfe_mac0: ethernet@0 {
compatible = "fsl,pfe-gemac-port";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x0>; /* GEM_ID */
fsl,mdio-mux-val = <0x0>;
phy-mode = "sgmii";
phy-handle = <&wan_phy>;
};
pfe_mac1: ethernet@1 {
phy-mode = "rgmii";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x1>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
mdio@0 {
#address-cells = <1>;
#size-cells = <0>;
wan_phy: ethernet-phy@0 {
reg = <0x0>; /* Phy Address on mdio bus */
//phy-mode = "sgmii";
tx-fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
};
};
};
&dspi {
status = "okay";
ksz8794: ksz8794@0 {
status = "okay";
compatible = "microchip,ksz8794";
reg = <0>;
spi-max-frequency = <10000000>;
spi-cpha;
spi-cpol;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
label = "lan1";
};
port@1 {
reg = <1>;
label = "lan2";
};
port@2 {
reg = <2>;
label = "lan3";
};
port@3 {
reg = <4>;
label = "cpu";
ethernet = <&pfe_mac1>;
phy-mode = "rgmii";
fixed-link {
speed = <1000>;
full-duplex;
};
};
};
};
};
Any help or direction would be appreciated.