Hey,
My CPU AM3505 is connected to a 3-port Micrel switch via an MDIO interface. This way I can access chip's PHY registers and my davinci linux driver is Ok for the basic L2 operation of the switch. In order to access all chip's mapped regs I require to use an SMI (Micrel's proprietary) protocol which ... not standard and could be achieved by bitbanging of the mdio/mdc lines, configured as gpio.
I am looking for a "kernel implementation" advise to understand how to combine bitbanging and the mdio control. Have tried to run the mdio-gpio.c plat-driver that is using the mdio-bitbang.c, set the pins to mux-mode4 and actually saw the bitbang SMI is working on the scope. Of course, by that, I have completely killed the davinci_mdio operation and with it, the link to the switch, as the mdio controller should be configured by the davinci driver. From the other hand, when I am running davinci with mdio/mdc in mux-mode0, the bitbang driver is muted.
To test that, I've used a simple MII reg access using ioctl to the mdio_read/write routines, which in first case belong to the bitbang and in the second - to the davinci.
Please advise,
Best regards
Yakir