Commit graph

36 commits

Author SHA1 Message Date
Gerson Fernando Budke 4da1dff1ff boards: arm: samr21_xpro: Add atmel xplained-pro headers
Add xplained-pro connectors definitions.  This enable hardware related
GPIOs and drivers to drive external shields.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-07-13 11:54:29 +02:00
Gerson Fernando Budke 1b293b2ba5 boards: arm: samr21: Add active low CS gpio flags
Update cs-gpios flag with active low value to instruct spi driver how
to handle cs signal.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-07-08 23:22:19 -04:00
Gerson Fernando Budke c001baafc8 boards: arm: atsamr21_xpro: Add PWM support
This enables PWM and connects it to the LED0.  Tested with blinky_pwm
and fade_led samples.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-07-04 15:13:28 -04:00
Gerson Fernando Budke c5d7679025 boards: arm: atsamr21_xpro: Fix yaml supported list order
Index supported list order by name.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-07-04 15:13:28 -04:00
Gerson Fernando Budke eabae8b0f0 boards: sam0: pinmux: Add Kconfig check for I2C
To avoid pin conflicts add CONFIG_I2C_SAM0 flag for each i2c pinmux
config.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-05-19 17:25:59 +02:00
Gerson Fernando Budke 48a4e459e9 boards: sam0: pinmux: Add Kconfig check for SPI
To avoid pin conflicts add CONFIG_SPI_SAM0 flag for each spi pinmux
config.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-05-19 17:25:59 +02:00
Gerson Fernando Budke 85ca73ccf8 boards: sam0: pinmux: Add Kconfig check for UART
To avoid pin conflicts add CONFIG_UART_SAM0 flag for each uart pinmux
config.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-05-19 17:25:59 +02:00
Stephanos Ioannidis a772d2da11 boards: arm: atsamr21_xpro: Add i2c-0 alias
This commit adds the `i2c-0` alias for the Atmel SAM R21 Xplained Pro
board, as required by the I2C test.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-05 04:58:47 -05:00
Kumar Gala 4d7d3a25c1 boards: arm: sam0: Conver to new dt macros
Convert to using DT_NODELABEL as we phase out the old generated
devicetree macros.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 13:47:39 -05:00
Stephanos Ioannidis 547a5e9eb0 tests: uart_async_api: Support atsamr21_xpro board
This commit adds the asynchronous UART API testing support on the SAM
R21 Xplained Pro board.

The SERCOM3 module is used as the secondary loop-back UART, which is
required to run this test.

Note that no external UART loop-back connection is necessary to run
this test, because the SERCOM3 UART TX and RX pads are configured to be
internally connected; it is, however, still necessary to configure the
pinmux because the module pads are not connected until the pinmux is
configured.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-23 16:19:35 -05:00
Kuba Sanak 3523c1b8f4 boards: pinmux: Don't throw compiler warnings on using custom sercom use
In order to use its serial peripheral SERCOMs SAMD socs require their
pins to be configured with pinmux. Currently pins are muxed only for the
boards' default serial interfaces. The pinmux code is written to throw
a compiler error if a user tries to use any sercom in a way it wasn't
pre-defined to be used.

This commit changes compiler errors to warnings so that user can provide
custom pinmuxing code in their app.

Fixes #23133

Signed-off-by: Kuba Sanak <contact@kuba.fyi>
2020-04-17 04:52:49 -05:00
Gerson Fernando Budke 4c6ee8b3d9 boards: arm: atsamr21_xpro: Fix corrupted frames on rf2xx
When using internal IEEE 802.15.4 transceiver AT86RF233 at SPI speeds
above 6MHz was detected that frame buffer read returns corrupted data.
This set spi-max-frequency to 6MHz at atsamr21_xpro.dts to ensure best
relation of performance vs reliability.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-03-09 14:17:06 +02:00
Alexander Wachter 57bd09186b boards: Remove "supported: -hwinfo" from all boards
Remove all "supported: -hwinfo" definitions from the boards
yaml files and documentation. hwinfo can generally be tested
on every board because it returns -ENOTSUP if not supported.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-02-27 21:14:54 +01:00
Gerson Fernando Budke 886fee8b64 boards: arm: atsamr21_xpro: Add echo server/client link
Add mention and link about IPv6 echo_server/client demos.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-02-11 17:46:05 +02:00
Ulf Magnusson c5839f834b kconfig: Remove assignments to CONFIG_<arch> syms and hide them
All board defconfig files currently set the architecture in addition to
the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up
defconfig files.

CONFIG_<arch> symbols currently being set in configuration files also
means that they are configurable (can be changed in menuconfig and in
configuration files), even though changing the architecture won't work,
since other things get set from -DBOARD=<board>. Many boards also allow
changing the architecture symbols independently from the SoC symbols,
which doesn't make sense.

Get rid of all assignments to CONFIG_<arch> symbols and clean up the
relationships between symbols and the configuration interface, like
this:

1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and
   turn the CONFIG_<arch> symbols into invisible
   (promptless/nonconfigurable) symbols instead.

   Getting rid of the choice allows the symbols to be 'select'ed (choice
   symbols don't support 'select').

2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols.
   This makes sense since you know the architecture if you know the SoC.

   Put the select on the SOC_* symbol instead for boards that don't have
   a SOC_SERIES_*.

3. Remove all assignments to CONFIG_<arch> symbols. The assignments
   would generate errors now, since the symbols are promptless.

The change was done by grepping for assignments to CONFIG_<arch>
symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the
same defconfig file, and putting a 'select' on it instead.

See
https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed
for a split-up version of this commit, which will make it easier to see
how stuff was done. This needs to go in as one commit though.

This change is safer than it might seem re. outstanding PRs, because any
assignment to CONFIG_<arch> symbols generates an error now, making
outdated stuff easy to catch.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-08 00:50:08 -06:00
Kumar Gala 1dc4b1dd2f boards: shrink image sizes
Reduce images sizes of boards.  Get a roughly 3x reduction in size.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-07 13:52:45 -05:00
Piotr Mienkowski e1c10f6454 drivers: ieee802154_rf2xx: convert to the new GPIO API
Use new GPIO configuration API, set pin active level in devicetree
source.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2020-02-05 12:00:36 +01:00
Peter Bigot 638cf51ec2 boards: atmel sam0: update devicetree to new GPIO flags
Use standard spelling for pull and active flags.  Correct LED active
level (based on SAM-D21-Xplained-Pro).

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Carles Cufi afd1db6c9a boards: arm: atsamr21_xpro: Fix default configuration
This board enabled the IEEE802154_RF2XX driver unconditionally. Instead
make it depend on the IEEE802154 subsystem being enabled.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-04 15:49:35 -06:00
Gerson Fernando Budke 3d5c911612 board: atsamr21_xpro: Update docs
Add reference to wpanusb and wpan_serial examples. This links user with
some IEEE 802.15.4 applications.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-01-16 10:47:10 +02:00
Ulf Magnusson d3c525b986 boards: Kconfig: SAM: Do not assign promptless SOC_FAMILY_SAM0 symbol
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

This symbol is enabled through being select'ed.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-13 14:19:48 -05:00
Gerson Fernando Budke 0567184b3b board: atsamr21_xpro: Update config
Enable radio transceiver configuration by default on atsamr21_xpro
board.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2019-12-20 07:58:59 -05:00
Gerson Fernando Budke b2af5fd5e3 board: atsamr21_xpro: Update yaml with ieee802154
Add IEEE 802.15.4 feature to yaml config file.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2019-12-20 07:58:59 -05:00
Gerson Fernando Budke 8638a0cc3c board: atsamr21_xpro: Add at86rf233 dts binding
Add at86rf233 dts binding to enable IEEE 802.15.4 driver. The driver is
managed by sercom-4 at chip level.

see: SAM-R21_G.pdf section: 5.2 Internal Multiplexed Signals

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2019-12-20 07:58:59 -05:00
Ulf Magnusson bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Piotr Zięcik 7d56fc35fd dts: Add information about CPU frequency to the cpu nodes
This commit adds 'clock-frequency' property to the cpu nodes.
The clock frequency specified in the added property is used
during platform configuration. Examples:

- The SWO logger uses clock frequency to configure SWO output.
- Plenty of platforms need CPU clock specified for their HAL.
- Most of devices with USB needs information about CPU clock
  in order to configure USB clock source.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-07-17 21:53:36 +02:00
Anas Nashif a8167ab17d cleanup: include/: move pinmux.h to drivers/pinmux.h
move pinmux.h to drivers/pinmux.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Kumar Gala 0bed1007ed dts: cleanup missing #{address,size}-cells
A few i2c and spi bus nodes were missing #address-cells and #size-cells
properties.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-20 22:48:57 -05:00
David B. Kinder 6b2cd29223 doc: fix misspellings in documentation
Fix misspellings and doc issues missed during regular reviews (including
some files without a trailing newline)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-06-18 15:08:19 -04:00
Ulf Magnusson a84ded74ea dts: Replace status = "ok" with status = "okay"
The DT spec. only has "okay" and not "ok". The Linux kernel has around
12k "okay"s and 300 "ok"s.

The scripts/dts scripts only check for "disabled", so should be safe re.
those at least.

The replacement was done with

    git ls-files | xargs sed -i 's/status\s*=\s*"ok"/status = "okay"/'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-06-14 19:51:13 -05:00
Kumar Gala e541b16c54 boards: atmel: Enable hwinfo as a supported feature
Update the various board YAML files to list hwinfo as a supported
hwinfo.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-05-22 15:50:39 -05:00
Benjamin Valentin 13453b9105 boards: enable i2c on the SAM R21 Xplained Pro board
Hook up SERCOM1 to I2C, it is connected to the EXT3 header and
the EDBG embedded debugging interface.

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
2019-05-08 14:49:53 -04:00
Derek Hageman 4709816a69 soc: sam0: Remove SERCOM defines from dts_fixup.h
Move SERCOM peripherals to use the raw defines generated from DTS
parsing.  This adds aliases to the DTS so that the SERCOM number
can still be used for clocking and pinmux.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-05-03 08:46:57 -05:00
Derek Hageman 6324c8a27a drivers: pinmux: sam0: Remove defines from dts_fixup.h
Move SAM0 pinmux to use the raw defines generated from the DTS
parsing.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-05-03 08:46:57 -05:00
Benjamin Valentin 9f69878633 soc: sam0: enable RTC for samd21, samr21
The Atmel SAMD21 (and therefore also the SAMR21) comes with the same
RTC peripheral as the Atmel SAMD20.

Enable it in dts_fixup.h and enable it in the dts for samr21_xpro.

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
2019-04-28 13:25:35 -04:00
Benjamin Valentin 360fe70ee7 boards: atsamr21_xpro: Add SAM R21 Xplained Pro Evaluation Kit
Add the Atmel SAM R21 Xplained Pro Evaluation Kit to zephyr.

So far, UART, SPI, I2C (depends on #14128), debug LED and user button
have been tested.

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
2019-04-28 13:25:35 -04:00