Add support for MikroTik RB5009UG

I honestly prefer U-boot as its a standard thing and we can easily upstream and get it included in OpenWrt.

BTW MikroTik just shared ROS v7 GPL:

Obviously all of the juicy stuff is missing like the switch driver itself which to me looks like it was picked from Marvell-s SDK.

What are they doing here:

mdio_regs = ioremap(0xf212a200, 0x100);
writel(is_type("5009") ? 0x612 : 0x610, mdio_regs + 4);

It's the MDIO(SMI) MISC configuration register, it looks like they are enabling a fast MDC clock, it sets the clock to be divided by 16 instead of 128 and disabling MDC invert

3 Likes