If the same callback function is used for multiple interfaces
(`NETDEV_INDEX_ANY`), it is necessary to also provide the index of
the interface to hand out and address.
The board provides a 12 MHz oscillator that can be used to source
the CPU and peripheral clocks.
When doing so we don't have to rely on the internal fast oscillators.
This allows us to enable the buck regulator for maximum power savings.
With this same54-xpro reaches 0.8 mA in IDLE.
Use the dedicated 48 MHz clock as a source for the peripheral clocks.
This was already done for I2C to allow it to work despite the 120 MHz
main clock.
Not running the peripherals off the main clock will allow for dynamic
re-clocking of the main clock in the future, without affecting the
operation of the peripherals.
It also gives more flexibility to the main clock selection in general.
We can't run I2C off the 120 MHz main clock as the availiable dividers are too small.
Use the 48 MHz GCLK 6 instead which offers an appropriate frequency.
fixes#12037
Instead of hard-coding the peripheral clocks to CLOCK_CORECLOCK
introduce helper functions to return the frequency of the individual
GCLKs and use those for baud-rate calculations.
This requires the GCLK to be part of the peripheral's config struct.
While this is already the case for most peripherals, this also adds
it for those where it wasn't used before.
As it defaults to 0 (CLOCK_CORECLOCK) no change is to be expected.
To simplify board definitions and for unification between samd2x and
newer models, don't use the GCLK bitmask in board definitions.
Instead use the GCLK index and generate the bitmask when needed.
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included
Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.