[OpenWrt-Devel] b53 switch platform_data vs. device tree
jogo at openwrt.org
Tue Feb 17 08:29:37 EST 2015
On Fri, Feb 6, 2015 at 8:16 PM, Daniel Golle <daniel at makrotopia.org> wrote:
> I started using Jonas' b53 driver for the Lamobo R1 board in OpenWrt.
> To make things more convenient, I'd like to have the port mapping
> inside the device-tree, so port enumeration would be consistent.
> swconfig supports that (of_switch_load_portmap), apparently FONERA20N
> is the only board making use of that feature for now.
> Given the absurdity of the port mapping on the Lamobo R1 board, I'd
> love to use the feature there as well:
> LAN WAN
> (4 0 1 2) (3)
> However, b53 doesn't implement OF support but rather still makes use of
> Thus dev->of_node is unset for the b53 switches, and therefore
> of_switch_load_portmap can't do the job right now :(
> Are you planning on migrating from platform_data to device-tree any time
> soon? Doing that for b53 doesn't look hard to me, however, from what I
> can see, the only users of b53_platform_data are brcm63xx boards
> VR-3025u, VR-3025un and WAP5813n. I never touched that platform
> (nor any other broadcom target), thus it's hard for me to tell how far
> away OpenWrt is from the pressumed goal of deprecating b53_platform_data.
> Hacks such as assigning ethX aliases via platform_data could then be
> replaced by semantically more pleasing ways to assign non-MDIO connected
> b53 to a specific NIC.
Full DT-support is still a bit away for bcm63xx, as there are some
nasty dependencies (conversion to a common-clock driver, adding a
pinmux driver, resolving the issue that some chips require gpio
directions configured even for !gpio-functions, conversion to gpiolib,
making !OF-devices requiring gpios to use named gpios, ...).
> I'm not interested in brcm63xx and don't have any such hardware flying
> around. I can implement minimal OF support and make sure at least
> dev->of_node is set. This shoudn't do any harm and would allow a
> graceful migration path.
There is no reason for not supporting both, so feel free to submit patches.
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel