WIP: [bcm63xx] Support for the Actiontec F2250

Hi everyone,

I am working on adding support for the Actiontec F2250. I can compile an initramfs image that boots, but I don't have anything that I would be comfortable flashing yet. You can see my progress here.
What works:

  • Booting
  • Reading from flash
  • USB
  • UART
  • Buttons
  • LEDs are mapped to GPIOs correctly

What doesn't work:

  • Ethernet
  • Wi-Fi (There is no bcm63xx internal Wi-Fi support at all in OpenWrt, so this is probably above my pay grade.)
  • LEDs are not yet attached to actions in base-files/etc/board.d/01_leds.

What could work, but I'm hesitant to try it:

  • Writing to flash

I have a number of questions, which I will list below. If you know the answers to any of these, feel free to respond in this thread.

  • How do I know what the correct value for nand-ecc-step-size in the nflash section of the device tree is? Is it in the data sheet for the NAND flash chip, or do I need to figure it out from the manufacturer's source code? Is the fact that I can read from the flash an indication that this value is correct, or do I need to test writing? How do I safely test writing if I'm not sure the ECC is working?

  • Same, but for nand-ecc-strength.

  • Same, but for nand-on-flash-bbt. According to the stock firmware bootlog, there are BBTs at 0x07fe0000 and 0x07fc0000. Do I need to tell OpenWrt this, or does it figure out where the BBTs are?

  • What is the meaning of the SUBPAGESIZE value in bcm63xx_nand.mk? If I see no references to subpages in my flash chip's data sheet, does that mean I should leave this value unset?

  • What is CFERAM? In the root of the stock firmware images, there's a file called cferam.000. When the stock firmware images are running, there's a file in their root directories called cferam.06x, where I have seen x be 5, 8, and 9. What is this file? Are the cferam.000 files hosted in the bcm63xx-cfe repository just copies of the files from stock firmware images, or are they altered in some way?

  • Why does flashing OpenWrt flash over the CFE partition? Why can't the bootloader be left alone?

  • How do I get ethernet working? Right now, if I set up a switch in 519-board_bcm63268.patch with the same config as either of the other 63268 boards, the interface comes up, but I can't get it to connect to anything. I'm not too experienced with networking, so I'm not really sure how to test if this is a hardware problem or if I'm misconfiguring something within OpenWrt. I took the heatsink off the router, and it has a BCM53125 under there. If it's using that instead of the internal switch, how do I need to change my configuration to reflect that?

I'm hoping that to someone experienced with OpenWrt on bcm63xx, these are pretty basic issues. If you have any insight into any of these problems, please let me know. Thank you very much for taking a look at this post.