[LEDE-DEV] Convert ar71xx to devicetree

John Crispin john at phrozen.org
Thu Dec 8 08:31:05 PST 2016



On 08/12/2016 17:17, p.wassi at gmx.at wrote:
> Hi,
> 
> one of the open ToDos for LEDE is 'Convert ar71xx to devicetree'.
> In the last weeks, I've tried some stuff to get myself an idea of what
> needs to be done. Currently, I'm in this state:
> -) AR9331 devices (TL-WR740-v4, TL-WR741-v4, TL-MR3020) boot up fine with DTB,
> -) (All?) of the device's hardware is working like normal, this is supported:
>     -> Clocks
>     -> SPI Flash
>     -> Serial
>     -> eth0/1 + switch
>     -> wifi
>     -> USB
>     -> LEDs
>     -> Buttons
>     -> wifi calibration + MAC addresses come from flash
>     -> watchdog behaves strange, therefore currently disabled
> -) Images use an appended DTB, kernel cmdline coming from the DTB
> 
> Current code is just a proof of concept but enough to bring said devices to life
> using a DTB.
> 
> What are LEDE's further plans to do the conversion? As was previously sugguested on
> the mailing list, we could convert ar71xx device per device (maybe a SoC at a time).
> Can this migration be done in live ar71xx, or can there be a clone of this target
> (like ar71xx-dt)? Who else is working on this?
> 
> Best regards,
> P. Wassi
> 

Hi,

i was planning to start working on this in early 2017. i was hoping that
rather than converting ar71xx to DT we simply create a new target called
ath79 and start moving board support over from the legacy to the new
target. this would allow us to make the ath79 target much cleaner than
having to worry about legacy cruft.

converting all the mach files to dts files is also a bit tricky. back in
the day when i converted ramips, i simply create a host lib that
provided all the platform_*() callbacks used by the mach files. however
rather than register anything the code simply generated the matching dts
files. this was really ugly, run once and throw away code.

can you share the patches you have already created ? i think we could
start working on this now and once the new ath79 target starts to be
usable we simply refuse to merge patches to ar71xx and only accept ones
for ath79

	John



More information about the Lede-dev mailing list