Commit graph

41120 commits

Author SHA1 Message Date
Stanislav Poboril
34a4e072f5 imx: Enabled EPIT in Udoo Neo Full board
Enabled EPIT (Enhanced Periodic Interrupt Timer) in Cortex-M4 core
of Udoo Neo Full board so the counter API could be used there.

Origin: Original

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2019-02-07 16:14:00 -05:00
Stanislav Poboril
e2904c8c5f imx: Add EPIT peripheral support for i.MX6SoloX soc
Add EPIT (Enhanced Periodic Interrupt Timer) peripheral support
for i.MX6SoloX soc.

Origin: Original

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2019-02-07 16:14:00 -05:00
Stanislav Poboril
f51ef0551c imx: Add IMX EPIT driver for i.MX socs
Add shim driver for i.MX EPIT (Enhanced Periodic Interrupt Timer)
peripheral which can be used for i.MX6SoloX, i.MX7D and other i.MX socs.

Origin: Original

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2019-02-07 16:14:00 -05:00
Krzysztof Chruscinski
708f08a4be drivers: counter: Rename wrap to top_value
Renamed:
- counter_set_wrap to counter_set_top_value
- counter_get_wrap to counter_get_top_value
- counter_get_max_wrap to counter_get_max_top_value

Updated nRF implementations and counter test.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-07 16:14:00 -05:00
Krzysztof Chruscinski
b745355315 drivers: counter: Add user_data to alarm callback
Modify alarm callback to return user_data and channel_id.
Set_alarm and disable_alarm updated accordingly. Renamed
counter_*_ch_alarm to counter_*_channel_alarm. Updated test
and nrf implementations.

Updated doxygen comments.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-07 16:14:00 -05:00
Krzysztof Chruscinski
5bfe8612a2 drivers: timer: Fix broken dependency for nrf_rtc_timer
nrf_rtc_timer was selecting counter RTC1 instance even though it
is not using counter API at all.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-07 16:14:00 -05:00
Krzysztof Chruscinski
f81b225f6a counter: Fix warning due to deprecation of legacy API
counter_callback_t has been previously prefixed with __deprecated
but it is used in prototype of deprecated function (counter_set_alarm).
It seems that compiler generates the warning even though function is
not used. Removed __deprecated prefix from the typedef, keeping it for
the function only.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-07 16:14:00 -05:00
Krzysztof Chruscinski
b969f40e9d tests: drivers: counter: Fix tests for nrf peripherals
Test was not aligned with changes in the API.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-07 16:14:00 -05:00
Krzysztof Chruscinski
cbf7796504 boards: Add counter capability to nordic boards
Added counter capability to pca10028, pca10040 and pca10056

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-07 16:14:00 -05:00
Krzysztof Chruscinski
a6c2c3f0a9 soc: arm: nordic_nrf: Remove duplicates from Kconfig.soc
Removing duplicates in selects for config SOC_NRF52832 and
SOC_NRF52840. Duplicates were unexpected merge artifacts.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-07 16:14:00 -05:00
Krzysztof Chruscinski
5d0d5c0a7a drivers: counter: Counter API implementation for nRF Series (RTC).
Shim for counter API using nrfx_rtc driver.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-07 16:14:00 -05:00
Peter A. Bigot
49c8325339 drivers: counter: nrfx: update to newer HAL API
Upstream trunk moved to a newer Nordic HAL that changed file and
constant names.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-07 16:14:00 -05:00
Peter A. Bigot
8f28e6043d drivers: counter: add API to query counter frequency
Add API to get the base counter frequency.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-02-07 16:14:00 -05:00
Peter A. Bigot
e03c3d8f79 drivers: timer: conflict RTC timer with RTC1 counter
The system timer uses RTC1, but does not implement the counter API with
it.  Instead of auto-enabling the counter API on the system timer make
the two conflict until/unless both APIs are supported by the peripheral.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-02-07 16:14:00 -05:00
Peter A. Bigot
889a55c86a drivers: counter: nrf: make name configuration consistent
Using `COUNTER_2_NAME` when all other properties are
`COUNTER_TIMER2_foo` is confusing.  Make the names consistent.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-02-07 16:14:00 -05:00
Peter A. Bigot
6b0e8cd879 tests: drivers: counter: improve comments on reserved instances
RTC1 (not RTC0) is excluded because it is used as the system clock.

Also document that TIMER0 and RTC0 may be rejected when CONFIG_BT_LL_SW
is enabled.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-02-07 16:14:00 -05:00
Anas Nashif
887c4ad923 tests: remove aon_counter test
This is now covered by counter API.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-07 16:14:00 -05:00
Savinay Dharmappa
0f492149ad rtc: rename CONFIG_RTC_0_NAME to DT_RTC_0_NAME.
patch renames CONFIG_RTC_0_NAME to DT_RTC_0_NAME.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-02-07 16:14:00 -05:00
Savinay Dharmappa
6f58d17759 soc: x86: Remove RTC config
remove using RTC config

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-02-07 16:14:00 -05:00
Savinay Dharmappa
aa15f3973a drivers: rtc_qmsi: Move rtc driver apis to unified interface
patch modifies rtc apis to unified interface.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-02-07 16:14:00 -05:00
Savinay Dharmappa
9cd7803579 drivers: counter: Move AON and AONPT driver api to unified interface
patch modifies AON and AONPT driver api to unified interface

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-02-07 16:14:00 -05:00
Krzysztof Chruscinski
257a0319ed drivers: counter: rtc: Deprecating legacy counter and rtc API
Deprecating counter legacy API and renaming new counter_set_alarm
to coutner_set_ch_alarm. Deprecating rtc API and modifying rtc
API to call new counter API (compatibility layer).

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-07 16:14:00 -05:00
Krzysztof Chruscinski
549341307b tests: drivers: counter: Add tests for counter driver
Add test suite which covers main functionality of counter driver.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-07 16:14:00 -05:00
Krzysztof Chruscinski
da0d9bab2d drivers: counter: Counter API implementation for nRF Series (RTC).
Shim for counter API using nrfx_rtc driver.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-07 16:14:00 -05:00
Krzysztof Chruściński
6b4ff1252a drivers: counter: Counter API implementation for nRF Series (TIMER).
Shim for counter API using nrfx_timer driver.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2019-02-07 16:14:00 -05:00
Krzysztof Chruściński
dedbecb046 drivers: counter: API unifying counter and rtc drivers.
counter.h and rtc.h API's share almost the same functionality.
They are unified as a new counter.h. rtc.h will be deprecated.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2019-02-07 16:14:00 -05:00
Alexander Wachter
ad92d5bfe9 drivers: hwinfo: add driver support for NXP i.mx RT device ID
Add driver support for NXP i.mx RT ID device.
This device has an ID of 8 bytes.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-02-07 15:08:18 -06:00
Alexander Wachter
50156e0ea9 drivers: hwinfo: add driver support for kinetis device ID
Add driver support for kinetis ID device.
The length depends on the SoC.
`SIM_GetUniqueId` was not used because the struct would reorder
the ID and makes the driver more complicated because the length
of the struct depends on the SoC.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-02-07 15:08:18 -06:00
Kumar Gala
5ef93aa639 tests: kernel: interrupt: Exclude platforms test isnt valid on
The test assumes that the last to IRQ numbers will be free, this isn't a
valid assumption and now that we detect multiple ISRs registering for
the some IRQ line, we see failures because of this assumption on some
platforms.  Exclude those platforms from this test for the time being.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-07 15:58:43 -05:00
Maureen Helm
54047dc59a dts: boards: Add bindings and nodes for the rocktech lcd module
Adds device tree bindings and nodes for the rocktech lcd module used on
imx rt boards. The use of port, endpoint, and remote-endpoint properties
follow what is currently done in linux, but they are not yet used in
zephyr because some additional plumbing is needed in the
extract_dts_includes.py script.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-07 14:28:55 -06:00
Maureen Helm
dedc82d005 samples: gui: Add support for imx rt boards to lvgl sample
Adds board configurations to support the mimxrt1050_evk and
mimxrt1060_evk boards in the lvgl sample.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-07 14:28:55 -06:00
Maureen Helm
606f8316dd samples: gui: Fix lvgl sample to use configured display device name
Fixes the lvgl sample to use the same display device name as the lvgl
library rather than a hardcoded string.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-07 14:28:55 -06:00
Maureen Helm
8ce2954e25 boards: mimxrt1060_evk: Enable mcux elcdif driver and pins
Enables the mcux elcdif shim driver and pin muxes on the mimxrt1060_evk
board.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-07 14:28:55 -06:00
Maureen Helm
769aa51dc8 boards: mimxrt1050_evk: Enable mcux elcdif driver and pins
Enables the mcux elcdif shim driver and pin muxes on the mimxrt1050_evk
board.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-07 14:28:55 -06:00
Maureen Helm
bf0abe4438 soc: nxp_imx: Enable mcux elcdif driver and clocks
Enables the mcux elcdif shim driver and clocks on imx rt socs when the
display driver interface is enabled.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-07 14:28:55 -06:00
Maureen Helm
ab84cbfc40 drivers: display: Introduce mcux elcdif shim driver
Adds a shim layer around the mcux elcdif driver to adapt it to the
zephyr display interface. Although the hardware and underlying mcux sdk
driver can support additional configurations, some shortcuts are
currently made in the shim that force a given pixel format, lcd data
bus width, and signal polarity. This works with the rocktech lcd module
used on imx rt boards, but will need to be updated for other display
panels.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-07 14:28:55 -06:00
Maureen Helm
711249c789 drivers: display: Add RGB 565 pixel format to display api
Adds a new entry in the pixel format enum for RGB 565. This will be used
for the lcd display on the mimxrt1050_evk and mimxrt1060_evk boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-07 14:28:55 -06:00
Maureen Helm
19167a402b dts: Add bindings for the imx lcd display controller
Adds device tree bindings for the imx enhanced LCD interface (eLCDIF)
controller. The compatible is reused from linux.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-07 14:28:55 -06:00
bde3224c91 scripts: bossac: Support flashing at an offset.
The Adafruit SAMD51 boards use a combined BOSSA / U2F bootloader that
resides in the first 16 KiB.  Add support for pulling the application
partition offset from the configuration and using that to offset where
the binary gets flashed.

Signed-off-by: Michael Hope <mlhx@google.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-07 15:13:11 -05:00
Emanuele Di Santo
0f7456c3a0 boards: arm: nrf9160_pca10090: link into code-partition if non-secure
Always link firmware built for nrf9160_pca10090ns into the
code-partition defined in DT, regardless.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2019-02-07 13:29:19 -06:00
Emanuele Di Santo
8a9b470d1d boards: arm: nrf9160_pca10090: define BOARD_NRF9160_PCA10090NS
Introduce BOARD_NRF9160_PCA10090NS to differentiate between
secure and non-secure board variants.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2019-02-07 13:29:19 -06:00
Emanuele Di Santo
95d6ddbb56 boards: arm: nrf9160_pca10090: choose code-partition in secure variant
Choose a code partition in the secure board variant
for consistency with other boards.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2019-02-07 13:29:19 -06:00
Gil Pitney
8b457d2050 boards: cc3220sf_launchxl: Set CONFIG_FLASH defaults for non-XIP
In case of !XIP, set defaults for CONFIG_FLASH_SIZE and
CONFIG_FLASH_BASE_ADDRESS in Kconfig.

Fixes: #13113

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2019-02-07 13:14:18 -06:00
Vikrant More
49aeb1ffe3 samples: mesh: taking care of interrupted transition
With this commit, it is now possible that if (for e.g.) lightness
transition is interrupted by temperature transition (which could
be instantaneous or non-instanstaneous) then as soon as temperature
transition get over, then algorithm would achieve target value
of lightness.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-02-07 21:01:37 +02:00
Wolfgang Puffitsch
aed74024b5 bluetooth: host: Fix endianness issue for group end_handle.
Convert end_handle to native endianness before comparison.

Signed-off-by: Wolfgang Puffitsch <wopu@oticon.com>
2019-02-07 21:00:42 +02:00
Marc Pignat
8b6204b7ae samples/drivers/led_apa102: add a sample for using APA102 LEDs strip
Add a sample demonstrating usage of the APA102 driver, heavily based
on led_ws2812. Tested on nucleo_l432kc with an Adafruit DotStar strip.

Signed-off-by: Marc Pignat <marc@absintheaudio.com>
2019-02-07 11:19:00 -06:00
Marc Pignat
9dba1feaf1 samples: rename led_apa102c sample to led_apa102c_bitbang
There is a apa102 driver, and an upcomming patch will provide a sample
for using it, but let's keep the bitbang version which is intersting.

Signed-off-by: Marc Pignat <marc@absintheaudio.com>
2019-02-07 11:19:00 -06:00
Daniel Leung
69d4d32acf gpio: gpio_sch: error when configure for level triggers
The GPIO controller only supports edge triggering according to
the descriptions of the associated registers. So errors out
when level trigger is requested. Also adds the option to do
double edges triggering as the controller supports this.

Fixes #12763

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-02-07 11:18:23 -06:00
Sebastian Bøe
d5afe27207 logging: Increase log processing stack size when NO_OPTIMIZATIONS
When optimizations are disabled more RAM is used and we get a stack
overflow on CONFIG_LOG_PROCESS_THREAD_STACK_SIZE. To rectify this,
increase the stack size when CONFIG_NO_OPTIMIZATIONS.

This does not scale well, and will have to be replaced by a a more
general solution eventually, but in the mean time it follows the
existing best practice established by the GCOV infrastructure in
commit e908ea9aa5

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-02-07 11:16:59 -06:00
Sebastian Bøe
7644d02598 Bluetooth: Increase hci_tx stack size when CONFIG_NO_OPTIMIZATIONS
When optimizations are disabled more RAM is used and we get a stack
overflow on BT_HCI_TX_STACK_SIZE. To rectify this, increase the stack
size when CONFIG_NO_OPTIMIZATIONS.

This does not scale well, and will have to be replaced by a a more
general solution eventually, but in the mean time it follows the
existing best practice established by the GCOV infrastructure in
commit e908ea9aa5

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-02-07 11:16:59 -06:00