Commit graph

21 commits

Author SHA1 Message Date
Peter Bigot 9dc7640ede spi-device: set CS gpio flags for all devices that had none
The generic SPI GPIO chip select support now respects devicetree flags
for signal active level.  Update all cs-gpios properties to specify
active low.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-07-09 06:07:07 -05:00
Vincent Wan 95ac55327b boards: arm: minor update to docs for CC13x2/CC26x2
Add a bit more of an intro to power management support.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-05-29 15:05:18 +02:00
Vincent Wan da60111949 drivers: spi: cc13xx_cc26xx: remove usage of CONFIG_SPI_0/1
Clean up as we wish to move away from using these Kconfig settings.
Also removing them from the boards' default config.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-05-06 17:48:13 -05:00
Vincent Wan 984988285b dts: bindings: cc13xx-cc26xx: add port info for uart tx and rx pins
Adding port information for uart tx and rx pins in dts, so that it can
be more systematically retrieved in the uart driver.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-04-23 17:29:53 -05:00
Vincent Wan 5c9e51e402 Kconfig: override min default residency values for cc13xx/cc26xx
Set the default value of SYS_PM_MIN_RESIDENCY_SLEEP_1 and
SYS_PM_MIN_RESIDENCY_SLEEP_2 to something more reasonable for these
platforms, as the latency of entering/exiting these sleep modes
is low.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-04-22 17:39:47 +02:00
Vincent Wan fc8d66c119 boards: arm: add doc on power management and uart for cc13xx/cc26xx
Adding documentation to inform users that characters may be lost if
polling is used and a character arrives while the system is in standby
mode.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-03-25 16:21:33 -04:00
Vincent Wan 13b10b544b boards: cc26x2r1_launchxl: workaround for xds firmware 3.x
Newer XDS firmware fails to flash correctly with higher adapter clock
speed. Using a slower speed for now to prevent errors.

Fixes #21372

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-03-10 15:00:44 +02:00
Ulf Magnusson a42a42cd5a kconfig: Replace defconfig singe-symbol 'if's with 'depends on'
Same deal as in commit eddd98f ("kconfig: Replace some single-symbol
'if's with 'depends on'"), for all symbols defined within defconfig
files. See that commit for an explanation.

Maybe 'if's were used originally to mirror the 'if's in the main Kconfig
files, and then it got copied around by people assuming 'if' must work
differently from 'depends on'. It doesn't match in every spot at least.
Better to keep it simple and just consistently use 'depends on' when
it's a single symbol/choice I think. Helps reinforce that 'if' isn't
magic too.

Verified by printing all Kconfig menu nodes (symbols, choices, menus,
etc.) before and after the change and diffing (should show no
difference).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-12 10:32:13 -06: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
Vincent Wan 4fce4749a2 gpio: Update cc13x2/cc26x2 gpio driver to use new gpio api
Updates the cc13x2/cc26x2 gpio driver and all associated boards to use
new device tree compatible gpio configuration flags. Implements new port
get/set/clear/toggle and pin_interrupt_configure functions recently
added to the gpio api.

Tested with:

samples/basic/blinky
samples/basic/button
tests/drivers/gpio/gpio_api_1pin
tests/drivers/gpio/gpio_basic_api

On board:

cc1352r1_launchxl

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-02-05 12:00:36 +01:00
Brett Witherspoon 71952fb92f boards: cc1352r1_launchxl / cc26x2r1_launchxl: add BoosterPack connector
Add BoosterPack connector information to the DTS of the CC1352 and
CC26x2 LaunchPad boards. This allows shields (e.g. BoosterPacks) to use
aliases for the connector interfaces and mappings for the GPIOs. This is
similar to what is being done for the Arduino connectors.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2020-01-14 15:45:35 +01:00
Vincent Wan 1b263ba0a6 dts: specify cpu frequency for TI CC13X2/CC26X2
Add cpu clock frequency information to DTS so that it can be retrieved
in the code.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-11-07 15:55:21 -06: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
Vincent Wan aeb8d017b5 drivers: timer: add RTC support as system clock for CC13X2/CC26X2
Add RTC timer driver for CC13X2/CC26X2, and use it instead of systick
as system clock. It is necessary to use this timer for power
management support, so that the system can exit from deep sleep upon
expiry of timeouts.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-19 13:43:10 -05: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
Brett Witherspoon 6cf806ac9a boards: cc1352r1_launchxl / cc26x2r1_launchxl: enable ROM bootloader
This enables the ROM bootloader on the CC13x2 / CC26x2 LaunchPad
development boards. The bootloader can be started by holding BTN-1
during reset. This can be useful during development to recover a board
if DAPs get disabled.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-05-30 17:15:53 -04:00
Brett Witherspoon b9cf58d90f boards: cc26x2r1_launchxl: enable support for SPI
Enable support for the SPI peripheral on the CC26x2R LaunchPad.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-05-27 09:21:19 -04:00
Brett Witherspoon a828b2a503 boards: cc26x2r1_launchxl: enable support for I2C
Enable I2C support on the CC26x2R LaunchPad.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-05-21 15:37:22 -04:00
Brett Witherspoon a016feb4a7 boards: cc26x2r1_launchxl: enable TRNG entropy source support
Enable support for the TRNG entropy source on the CC26x2R LaunchPad.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-05-14 06:10:52 -05:00
Brett Witherspoon 39855a9c90 boards: cc26x2r1_launchpad: add support for TI CC26x2R LaunchPad
The TI CC26x2R LaunchPad (LAUNCHXL-CC26X2R1) is a development kit that
features the CC2652R SoC.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-05-04 09:13:43 -05:00