};
when booting there is some log for network:
ksz9897 spi1.0: chip id 0x00947700
libphy: Switch MII bus: probed
libphy: Fixed MDIO Bus: probed
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 30 (00:0a:35:00:1e:53)
Generic PHY fixed-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:00, irq=-1)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
Configuring network interfaces... IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
udhcpc (v1.24.1) started
Sending discover...
macb e000b000.ethernet eth0: link up (1000/Full)
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
but it seem not work, there is no sysfs in /sys/class/net/eth0 for ksz9477 like "sw1"、"sw2" etc.
I don't wether other components like dsa and bridge should be added into my kernel tree?
And I found functions in setup_sw.c are useful to setup ksz9477, but is seem dose not in the driver of ksz9477, how to use this?
I am using KSZ9477 port6 as phy in my network, port1 and port2 as ports for connetction. |——————-————| |——————-————| | e000b000—|— rgmii—|—port6 port1
| ZTNQ | | KSZ9477 port2
|——————-—--|--—| |—-|————--————| |_SPI___| I use linux kernel 4.9 in my device, i add source codes under KSZ\linux-drivers\ksz9897\linux-4.9\drivers\net\ethernet\micrel into my kernel tree, and device tree: &gem0 { phy-mode = "rgmii-id"; status = "okay"; xlnx,ptp-enet-clock = <0x7f28150>; fixed-link = <0 1 1000 0 0>; }; &spi0 { is-decoded-cs = <0>; num-cs = <2>; status = "okay"; ksz9477: ksz9477@0 { compatible = "microchip,ksz9477"; reg = <0>; phy-mode = "rgmii-id"; spi-max-frequency = <44000000>; spi-cpha; spi-cpol; interrupt-parent = <&intc>; interrupts = <0 19 8>; status = "okay"; ports {
address-cells = <1>;
}; when booting there is some log for network: ksz9897 spi1.0: chip id 0x00947700 libphy: Switch MII bus: probed libphy: Fixed MDIO Bus: probed libphy: MACB_mii_bus: probed macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 30 (00:0a:35:00:1e:53) Generic PHY fixed-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:00, irq=-1) e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k e1000e: Copyright(c) 1999 - 2015 Intel Corporation. Configuring network interfaces... IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready udhcpc (v1.24.1) started Sending discover... macb e000b000.ethernet eth0: link up (1000/Full) IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready but it seem not work, there is no sysfs in /sys/class/net/eth0 for ksz9477 like "sw1"、"sw2" etc. I don't wether other components like dsa and bridge should be added into my kernel tree? And I found functions in setup_sw.c are useful to setup ksz9477, but is seem dose not in the driver of ksz9477, how to use this?