Linux driver: Hande paralell wired PHYs to a unique MII/GMII bus
I'm currently work on a custom embedded platform on which their are two
phy devices hardware wired in parallel on an unique MII/GMII bus. I can
choose which PHY device is actually hardware connected to the bus by
switching the PHYs hardware reset pins. (The PHY devices that I use are
custom designed for my platform and they present high impedance to the
MII/GMII bus when their reset pin is set. I can control that by switching
two GPIOs pins wired to the PHYs reset pins.)
My problem is that at boot time the PHYs reset pins are set. That lead in
High impedances (not connected wire) on the MII/GMII bus and linux thus
neither detect them neither load the drivers for the two PHYs and neither
allocate the devices which can't be found in the devices tree-model.
I tried to drive the GPIO after startup and manually load the driver by a
'modprobe' call, the call is successful and load the modules but don't
allocate the device, so the module is used by nothing and the kernel don't
provide any ethernet interface.
Where is the best place for me to trigger those GPIO's to make linux aware
of their presences to properly probe the devices? Should I do this at the
bus probe time? I need to load the two driver and I should be able to
readily switch between them in a user-space program.
Thanks for answers.
No comments:
Post a Comment