Commit graph

7376 commits

Author SHA1 Message Date
Piotr Mienkowski 637dd67c66 drivers: i2s: fix i2s_handlers.c
Fix syntax error in i2s_handlers.c causing compile time error.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2020-05-06 09:47:42 +02:00
Kumar Gala 26bfddf1ee drivers: i2c: i2c_dw: Move to devicetree detection
We can utilize the devicetree macros to determine which instances to
enable.  This will allow us to phase out the per instance Kconfig
symbols.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-05 14:44:25 -05:00
Stephanos Ioannidis 2a710b1372 Revert "drivers: dma: sam0: fix DMA to peripheral transfer on SAMD5x"
This reverts commit 90cc723e65.

Using `DMAC_CHCTRLA_TRIGACT_BLOCK` breaks SERCOM UART peripheral DMA
operations (DMA-based asynchronous UART transmit operation only sends
the first byte and does not proceed any further).

The `DMAC_CHCTRLA_TRIGACT_BURST` with `DMAC_CHCTRLA_BURSTLEN(0)` is a
special case utilising the "internal FIFO", according to the datasheet
(see DS60001507E; 22.6.2.8), and should always be specified for
peripheral data transfer operations.

Also it is worth noting that Atmel and other third-party drivers use
the aforementioned "internal FIFO" configuration for peripheral data
transfers as well.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-05 13:53:49 -05:00
Abe Kohandel 8c7f63cf8d drivers: dma: stm32: DMA V1 channel direction
The channel direction for a V1 DMA is not allowed to be memory to memory
and there is a check in place for this. However, the check is being
performed on the stream prior to actually configuring the stream. This
results in the check always failing regardless of the channel direction.

The check has been modified to be performed on the incoming
configuration.

Signed-off-by: Abe Kohandel <abe@electronshepherds.com>
2020-05-05 13:48:09 -05:00
Henrik Brix Andersen a638dc0a57 drivers: i2c: bitbang: fix repeated start condition
Fix I2C bit banging REPEATED START condition function by ensuring both
SDA and SCL are high before generating the REPEATED START.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-05-05 20:02:43 +02:00
Henrik Brix Andersen d9c4b6f2d6 drivers: i2c: bitbang: fix stop condition
Fix I2C bit banging STOP condition function to not create a stray
START condition if SDA is high on entry. Instead, set SDA to LOW
before generating the STOP condition.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-05-05 20:02:43 +02:00
Kumar Gala 81e44f005e drivers: pwm: Remove per instance Kconfig symbols
There are now no users of the per instance Kconfig symbols so we can now
remove them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-05 12:46:57 -05:00
Francois Ramu 41df1c9380 drivers: dma: Enable dma and dmamux on stm32
This patch prepares the dma and introduces the dmamux on soc series
which supports this feature for memory/periph transfers.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-05 11:51:25 -05:00
Maureen Helm d898ada917 drivers: kscan: Add debug logging output to ft5336 driver
Adds debug logging for row, column, and pressed values read in the
ft5336 touch controller driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-05-05 11:08:02 -05:00
Martin Jäger e55483495e drivers: pinmux: stm32: Complete STM32F0 series
Fix some wrong assignments for SPI2 and add all other alternative
functions for USART, I2C, SPI and CAN according to STM32F091VC
datasheet, which is at the top end of this series.

https://www.st.com/resource/en/datasheet/stm32f091vc.pdf

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-05-05 11:06:47 -05:00
Gerard Marull-Paretas c6b1375400 drivers: pwm: stm32: remove remaining Kconfig instances
Following other drivers, Kconfig based instances are now entirely
removed. In order to do this change, PWM nodes in board DT files have
been given a pwm{N} label so that both:

- DT API checks such as #if DT_HAS_NODE(DT_NODELABEL(pwmN)) can be
  used (N being PWM instance number).
- DT references can be written as pwms = <&pwmN x y>; instead of
  pwms = <&{/soc/timers@XXXXXXXX/pwm} x y>;

This approach is also used on the Linux Kernel.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-05-05 10:52:51 -05:00
Henrik Brix Andersen f90f5d8da8 drivers: i2c: i2c_gpio: reformat comment
Reformat comment describing the I2C GPIO bit banging pre-requisites to
improve readability.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-05-05 10:17:23 -05:00
Henrik Brix Andersen 911b6a0e9f drivers: i2c: gpio: convert to using devicetree for instances
Convert the GPIO bit banging I2C controller driver to use devicetree
bindings for configuring instances.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-05-05 10:17:23 -05:00
Benjamin Valentin 8a99bd0da8 drivers: spi: spi_sam0: fix spi_sam0_fast_txrx()
The optimisation in `spi_sam0_fast_txrx()` is broken, loading
two bytes into the `DATA` register in rapid succession will lose
one byte.

This can be observed by running `tests/drivers/spi/spi_loopback`.
The test will get stuck in `spi_sam0_fast_txrx()` forever waiting
for the final byte.

Undo this small optimisation and only load the next byte into the
`DATA` register after the response has been received.

This fixes `tests/drivers/spi/spi_loopback`.

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
2020-05-05 09:58:29 -05:00
Kumar Gala b04b399d63 drivers: pwm: nrfx: Convert to use DTS NODELABEL for instance detection
Move to using NODELABEL references to enable driver instances for
PWM0..3.  This will allow us to remove per-instance PWM Kconfig symbols.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-05 08:40:19 -05:00
Francisco Munoz 51e82855b7 drivers: ps/2: Tune PS2 driver to support severval mice brands
The PS/2 driver was enabled with a single mouse and kb brand.
However, when plugging other mice brands, the interaction between the
driver and the device(mouse) was broken. A delay after inhibithing
the PS/2 instance helped the internal FSM to start the TX process.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2020-05-04 17:03:49 -05:00
Manivannan Sadhasivam f619cbc6fb lora: sx1276: Add missing RtcTick2Ms function definition
RtcTick2Ms function is required for upcoming LoRaWAN support. Hence,
add definition for it.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-05-04 19:01:09 +02:00
Manivannan Sadhasivam 7be8debaab lora: Switch to new timeout API
Get rid of legacy timeout API and move to new timeout API for LoRa.
This involves changes to API, SX1276 driver and sample application.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-05-04 19:01:09 +02:00
Manivannan Sadhasivam 0f02adfb0e lora: Make the LoRa support Experimental
The LoRa APIs are expected to undergo some change as the usecase get's
increased. So let's mark it as experimental until the APIs got
stabililized.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-05-04 19:01:09 +02:00
Manivannan Sadhasivam e177ab6c42 drivers: lora: Get rid of counter support
The RTC/Counter implementation doesn't fit for the upcoming LoRaWAN
as most of the Counter drivers in Zephyr works with 1s granularity
which is not enough for LoRaWAN stack. So, k_timer calls are used in
place of Counter's alarm and k_uptime_get() APIs are used in place of
Counter's time keeping.

While at it, lets also fixup the broken alarm implementation.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-05-04 19:01:09 +02:00
Kumar Gala dff8715615 drivers: ethernet: sam_gmac: rework pin config
Reworked sam_gmac driver to get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h

We remove defines from soc_pinmap.h that are no longer needed due to
getting all that information from devicetree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-04 11:32:10 -05:00
Francois Ramu 469e505278 drivers: spi: control of the dma callback on spi client for stm32
The DMA callback function now controls the tx or rx buffers
and reload dma in case of multiple trnasfer before the transfer ends

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-04 09:46:07 -05:00
Francois Ramu ce093dc35e drivers: spi: Enable dma transfer for SPI on stm32
Enable dma operations with or w/o a dmamux on STM32
for SPI periph/memory operations.
Use the pi dma client with dma macros

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-04 09:46:07 -05:00
Francois Ramu bea0a95578 drivers: dma: stm32 dma_reload function must re-enable
This patch is disabling the dma channel before reloading
source and dest for memory and peripheral addresses
Then the channel is enabled to re-launch the transfer.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-04 09:46:07 -05:00
Kumar Gala 024ea0e44e adc: Kconfig: Remove per instance ADC_{0..2} Kconfig symbols
No code utilizes CONFIG_ADC_{0..2} so we can now remove the Kconfig
sybmols for them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-04 09:04:16 -05:00
Kumar Gala 897652a536 adc: adc_shell: Rework device name extraction from devicetree
Replace having dts_fixup.h files define DT_ADC_{0..2}_NAME with using
the new devicetree.h macros.  We test to see what driver compat is
enabled via DT_HAS_COMPAT and set DT_DRV_COMPAT to that compat.  Than we
can utilize the DT_INST_LABEL() macro to extract the name of the device.

We also replace the Kconfig ADC_{0..2} symbols with DT_HAS_DRV_INST.
This will allow us to remove those Kconfig symbols as this was the only
usage.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-02 10:27:07 -05:00
Jukka Rissanen 5a105a67af drivers: eth: gmac: Convert to use k_timeout_t
Convert the code to use k_timeout_t when applicable.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-01 14:19:18 -05:00
Henrik Brix Andersen 7ede80be46 tests: boards: board_shell: enable DAC commands
Enable DAC commands in the board_shell test application.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Henrik Brix Andersen 8a5ba4539c drivers: dac: add DAC shell commands
Add shell commands for controlling digital-to-analog (DAC) devices.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Henrik Brix Andersen a0d88a61e9 drivers: dac: add driver for the NXP Kinetis DAC
Add driver shim for the NXP Kinetis Digital-to-Analog (DAC) module.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Henrik Brix Andersen 20b565a9f3 drivers: dac: add driver for the NXP Kinetis DAC32
Add driver shim for the NXP Kinetis Digital-to-Analog (DAC32) module.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Kumar Gala 1ce133d0fe drivers: usb: usb_dc_stm32: Rename defines to remove DT_ prefix
We want to limit DT_ prefix to macros from devicetree.h and generation.
So rename DT_USB* to just USB*.

Also fixup how USB_MAXIMUM_SPEED was defined.  We should only define it
if the property exists.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-01 07:49:00 -05:00
Jukka Rissanen 0576ce813f driver: modem: wncm14a2a: Convert to use k_timeout_t
Convert the code to use k_timeout_t when applicable.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-01 10:50:03 +03:00
Jukka Rissanen db9b47f6fa drivers: ieee802154: mcr20a: Convert to use k_timeout_t
Convert the code to use k_timeout_t when applicable.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-01 10:50:03 +03:00
Jukka Rissanen affe21c826 driver: wifi: eswifi: Convert to use k_timeout_t
Convert the code to use k_timeout_t when applicable.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-01 10:50:03 +03:00
Jukka Rissanen 104ffabab2 driver: eth: enc28j60: Convert to use k_timeout_t
Convert the code to use k_timeout_t when applicable.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-01 10:50:03 +03:00
Jukka Rissanen 7929f6c197 driver: eth: smsc911x: Convert to use k_timeout_t
Convert the code to use k_timeout_t when applicable.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-01 10:50:03 +03:00
Jukka Rissanen a921091f4e driver: eth: mcux: Convert to use k_timeout_t
Convert the code to use k_timeout_t when applicable.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-01 10:50:03 +03:00
Jukka Rissanen d5d31ef0c4 driver: eth: enc424j600: Convert to use k_timeout_t
Convert the code to use k_timeout_t when applicable.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-01 10:50:03 +03:00
Peter Bigot 52885d0576 coccinelle: run ms_timeout conversion semantic patch
Substitute integral constants where call sites passed named constants
that have timeout values as arguments to parameters that expect
millisecond durations.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-30 18:26:26 +02:00
Henrik Brix Andersen 9ceb29ac56 dts: introduce shared binding for the NXP FlexTimer
Do not assume in the SoC level device trees that NXP Kinetis FlexTimer
nodes will always be configured as PWM. Instead, configure FlexTimer
nodes for PWM at the board level for NXP Kinetis boards.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-04-30 08:28:48 -05:00
Gerson Fernando Budke 351719ae0f drivers: wifi: esp: Add esp at version choice name
Add WIFI_ESP_AT_VERSION choice name to allows select version on
*.defconfig files.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-04-30 16:08:35 +03:00
Erwan Gouriou de9fd59669 drivers/bluetooth: stm32wb: Fix loop
The goto instruction was removed when adding the RX thread.
While still working, this clearly break the clean handling of
error cases.
Re-instantiate the goto instruction.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-30 13:34:15 +02:00
Erwan Gouriou 73a19d4d20 drivers/bluetooth: stm32 ipm: Fix mutex on shared memory
ipm_busy is meant to be used as mutex on transport layer accesses.
Due to wrong configuration on rx_thread, imp_busy was a no-op.
Fix this.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-30 13:34:15 +02:00
Joakim Andersson 405ae6bb65 Bluetooth: drivers: Convert bluetooth drivers to use k_timeout struct
Convert bluetooth drivers to use k_timeout struct

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-04-30 13:46:48 +03:00
Kumar Gala 50345848b4 drivers: flash: flash_simulator: Convert to new DT macros
Convert flash_simulator to use new DT macros and remove associated
defines in dts_fixup.h.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 04:47:44 -05:00
Kumar Gala aba7d63860 drivers: sensor: lis2dh: Rename defines to remove DT_ prefix
We want to limit DT_ prefix to macros from devicetree.h and generation.
So rename DT_LIS2DH_INT* to just LIS2DH_INT*.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 04:46:11 -05:00
Kumar Gala 669a5104d0 drivers: eeprom: at2x: Rename defines to remove DT_ prefix
We want to limit DT_ prefix to macros from devicetree.h and generation.
So rename DT_INST_AT2X* to just INST_DT_AT2X*.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 04:45:35 -05:00
Kumar Gala 8639469339 drivers: adc: adc_mcp320x: Rename defines to remove DT_ prefix
We want to limit DT_ prefix to macros from devicetree.h and generation.
So rename DT_INST_MCP320X* to just INST_DT_MCP320X*.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 04:45:35 -05:00
Alexandre Bourdiol 0c8c6d2bb2 drivers/clock_control: stm32H7 AHB clock computation depends on core
On cortex M4, AHB clock is equal to SystemCoreClock
On Cortex M7, AHB clock is equal to SystemCoreClock/HPRE
By the way, D1CPRE is of no use when starting from SystemCoreColck.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-04-29 15:18:18 -05:00
Ryan Erickson a757832110 drivers: modem: wncm14a2a: fully release TCP context
TCP contexts are referenced twice,
once for the app and once for the stack.
Since TCP stack is not used for offload,
unref a second time to release the context.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-04-29 23:14:29 +03:00
Kumar Gala 3f236f2183 can: dts: Convert can-primary alias to zephyr,can-primary chosen prop
Convert CAN to use a chosen node property that is similar to how we
handle zephyr,entroy or zephyr,flash-controller as the means to select a
specific peripheral instance utilized by a subsystem.

Replace references of the form:

alias {
	can-primary = &can1;
};

with:

chosen {
	zephyr,can-primary = &can1;
};

Replace various macro/define references with either
DT_CHOSEN(zephyr_can_primary) or replace DT_ALIAS_CAN_PRIMARY_LABEL
with DT_CHOSEN_ZEPHYR_CAN_PRIMARY_LABEL.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-29 14:27:31 -05:00
Erwan Gouriou 7d1fc6d08c boards: stm23: Move IS pinmux to new DT API
Convert the board and clean up I2S driver from these symbols

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-29 13:13:58 -05:00
Alexandre Bourdiol d6e69383a3 drivers: STM32H7 dualcore EXTI management
Need to use specific EXTI API to configure the cortex M4 core.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-04-29 10:20:00 -05:00
Kumar Gala a918d301fe drivers: adc: adc_sam0: rework devicetree support
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks from devicetree.

We add a property ('calib-offset') for the SAM{D,E}5x family of SoCs
that is the bit position offset from ADC0 BIASCOMP in the NVM Software
Calibration Area Mapping.  For ADC0 this is typically 0 and for ADC1
this will be 14.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-29 08:02:36 -05:00
Kumar Gala d73ffa3855 drivers: uart: mcux_flexcomm: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.  Removed per
instance Kconfig symbols and replaced with DT_NODELABEL references
where needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-28 16:54:30 -05:00
Kumar Gala fd021da59a drivers: uart: mcux_lpsci: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.  Removed per
instance Kconfig symbols and replaced with DT_NODELABEL references
where needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-28 16:54:30 -05:00
Erwan Gouriou c9135686b2 drivers/can: stm32: Convert to DT macros
Use DT macros to configure stm32 can device instances.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-28 14:49:55 -05:00
Erwan Gouriou 826e24ca58 drivers/can: stm32: configure driver thanks to compatible
Remove need to configure from soc/

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-28 14:49:55 -05:00
Peter Bigot 82d4fcc1bf drivers: hwinfo: fix ESP32 implementation
Add the missing prefix z_ required to make the ESP32 version override
the weak implementation.

General practice in ESP32 seems to be to use the MAC address, so
extract that in its canonical byte order.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-28 15:32:53 -04:00
Martí Bolívar 07044c621b drivers: ethernet: clean up sam_gmac Kconfig
Use the new path access helpers to avoid hard-coding devicetree paths
in Kconfig, which is a bit messy.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-28 12:11:14 -05:00
Joakim Andersson e9375a2814 Bluetooth: Remove bluetooth thread stack size analysis
Remove logging of individual threads spread out throughout the
bluetooth subsystem. The stacks can be analysed by enabling the
following options.

CONFIG_THREAD_ANALYZER=y
CONFIG_THREAD_ANALYZER_AUTO=y
CONFIG_THREAD_ANALYZER_RUN_UNLOCKED=y
Optional:
CONFIG_THREAD_NAME=y

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-04-28 09:11:13 -04:00
Daniel Leung 13ef99831a drivers: gpio: mchp_xec: Convert to using new device tree macros
Convert driver to use the new device tree macro's instead of
dts_fixup.h based macros. This moves us closer to removing both
dts_fixup.h and per instance Kconfig symbols.

The pinmux_mchp_xec is also being updated since it's using DT
from GPIO.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-28 07:43:31 -05:00
Daniel Leung 5692702248 drivers: pinmux: mchp_xec: Convert to using new device tree macros
Convert driver to use the new device tree macro's instead of
dts_fixup.h based macros. This moves us closer to removing both
dts_fixup.h and per instance Kconfig symbols.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-28 07:43:31 -05:00
Daniel Leung f59d56b534 drivers: spi: xec_qmspi: Convert to using DT_INST macros
Convert driver to use instance macro's instead of dts_fixup.h based
macros.  This moves us closer to removing both dts_fixup.h and per
instance Kconfig symbols.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-28 07:43:31 -05:00
Gerson Fernando Budke 9be1ba9e08 drivers: ieee802154: rf2xx: Add no auto start option
Add a Kconfig option that allows user to set any necessary config
using management interface before interface be operational. A use
case is set the EUI-64 address from an external EEPROM by the
NET_REQUEST_IEEE802154_SET_EXT_ADDR command. After all configs
are done net_if_up() can be invoked to bring interface up.

Fixes #23193.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-04-28 10:30:55 +03:00
Gerson Fernando Budke c755821608 drivers: ieee802154: rf2xx: Add local-mac-address
Add local-mac-address on DT and enable it on rf2xx driver. If user
define local-mac-address this value will be used as default mac address.
Otherwise driver automatically add a random mac address.

On application level user can change default mac address using net_mgmt
command with NET_REQUEST_IEEE802154_SET_EXT_ADDR parameter defined on
include/net/ieee802154_mgmt.h header.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-04-28 10:30:55 +03:00
Kumar Gala 7a15afc1d4 drivers: flash: replace DT_FLASH_DEV_NAME with DT macro
Replace DT_FLASH_DEV_NAME with DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL.
We now set zephyr,flash-controller in the chosen node of the device
tree to the flash controller device.

NOTE: For a SoCs with on die flash, this points to the controller and
      not the 'soc-nv-flash' node.  Typically the controller is the
      parent of the 'soc-nv-flash' node).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-27 18:43:20 -05:00
Erwan Gouriou 57a74653df drivers/bluetooth: ipm_stm32: Implement a RX thread
Fasten events handling by unloading callback treatment.
A RX thread is created. IPM RX events are dumped in a FIFO
which is processed in the thread context.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-27 19:02:14 +02:00
Vincent Wan 2599f705a8 drivers: cc32xx: use DT_INST_FOREACH to reduce code duplication
Use DT_INST_FOREACH macro to combine code used for multiple instances.
Remove unnecessary Kconfig options and dts fixups for GPIO instances.

A side-effect to using DT_INST_FOREACH is that GPIO ports A0 and A3
are now enabled, whereas they were originally disabled by default as
an optimization.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-04-26 06:05:10 -05:00
Vincent Wan 720ed0b15e drivers: cc32xx: Convert drivers to use more new DT_INST macros
Changing more of DT_* prefixed macros that refer to instances to use
DT_INST macros in GPIO, I2C and UART drivers.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-04-26 06:05:10 -05:00
Kumar Gala a49817d17e arm: Convert DT_DTCM_* to new devicetree.h macros
Convert various DT_DTCM_* macros to use DT_CHOSEN(zephyr_dtcm) and
associated macros from devicetree.h.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-26 06:04:46 -05:00
Kumar Gala 1192e32dac drivers: pinmux: sam0: Conver to new DT macros
Convert pinmux driver to use nodelabels to get references to devicetree
nodes using the new devicetree.h macros.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 13:47:39 -05:00
Kumar Gala 7249bfbc04 drivers: gpio: sam0: Convert to new DT macros
Convert gpio driver to use nodelabels to get references to devicetree
nodes using the new devicetree.h macros.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 13:47:10 -05:00
Kumar Gala 8eafcc32db drivers: counter: sam0_tc32: rework devicetree support
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks from devicetree.  Move the prescaler setting
from Kconfig to devicetree as well.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 13:33:56 -05:00
Kumar Gala 8aeb8a3814 soc: xtensa: rework DT_L2_SRAM and DT_L2_SRAM
Rename DT_L2_SRAM_* to just L2_SRAM_* and set it using new DT macros.
Do something similar for DT_LP_SRAM_* renamed to LP_SRAM_*

Updated the intel_gna driver as it used the DT_L2_SRAM_* defines.

This change also lets us remove dts_fixup.h on intel_s1000 and
intel_apl_adsp SoCs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 09:32:00 -05:00
Kumar Gala aa63b07019 drivers: spi: spi_sam0: rework devicetree support
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks and dma from devicetree.  We update the
atmel,sam0-spi binding for dma to replace the rxdma and txdma
properties with proper 'dmas' property.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 09:30:16 -05:00
Kumar Gala b8ade7856d drivers: i2c: i2c_sam0: rework devicetree support
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks and dma from devicetree.  We update the
atmel,sam0-i2c binding for dma to replace the dma property with
proper 'dmas' property.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 09:30:16 -05:00
Kumar Gala dbeb3ba32e drivers: spi: spi_sam: rework device tree support
Reworked spi_sam driver to utilize new DT_INST macros as part of
this rework we also now get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h

We remove defines from dts_fixup.h and soc_pinmap.h and associated
Kconfig symbols that are no longer needed due to getting all that
information from devicetree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 09:29:54 -05:00
Martí Bolívar 11fbc0b2fa drivers: i2c: nordic: move to new DT API
Keep existing per-instance Kconfig options around.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-24 19:46:18 +02:00
Martí Bolívar df8be2d2e0 drivers: i2c: nordic: cosmetics
Adjust whitespace.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-24 19:46:18 +02:00
Martí Bolívar eca99d810f drivers: watchdog: nordic: move to new DT API
Straightforward API conversion only.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-24 19:35:41 +02:00
Ryan Erickson 6243557e5f drivers: nrf: uarte: check if RXSTARTED before issue STOPRX
Only issue STOPRX is RX has started.
This prevents getting stuck in while loop.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-04-24 19:34:50 +02:00
Erwan Gouriou 5776c82c85 drivers/timer: stm32_lptim: Move to new DT api
Use NODELABEL macros rather than DT_INST as this driver is so far
limited to support of LPTIM1 instance.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-24 12:09:17 -05:00
Kumar Gala 7b2fde91d8 drivers: serial: uart_psoc6: Convert to new dt macros
Convert the driver to use the new dt macros.  As part of this change we
remove a bunch of defines that happened in dts_fixup.h that didn't
belong there.  Some of these should be converted to devicetree
properties at some point.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-24 10:57:33 -05:00
Martí Bolívar be84c4ebbf drivers: pwm: nordic: move to new DT API
DT API conversion only.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-24 17:00:13 +02:00
Pawel Dunaj ed5e247f63 drivers: gpio_nrfx: Pass only pins associated with handler
When notifying the handler that GPIO interrupt has occurred
pass only pins that are associated with this handler.

Fixes: #24634

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
2020-04-24 16:56:10 +02:00
Mark Olsson 1ca4aedc35 tests: drivers: fixes for failing tests
Tests were failing as they were looking for an alias which didn't exist
Also, because some code in kscan_handlers.c wasn't compilable

Signed-off-by: Mark Olsson <mark@markolsson.se>
2020-04-24 09:49:46 -05:00
Kwon Tae-young 84817f4906 drivers: pinmux: stm32l4: I2C_1, CAN pinmuxes added
Add pin configuration for I2C_1 and CAN.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2020-04-24 06:36:35 -05:00
Kumar Gala 8b6acb5e91 soc: arm: replace DT_CPU_CLOCK_FREQUENCY with new dt macros
Replace DT_CPU_CLOCK_FREQUENCY with a PATH based reference to cpu@0
(DT_PATH(cpus, cpu_0)) and than getting the clock_frequency property:

DT_CPU_CLOCK_FREQUENCY -> DT_PROP(DT_PATH(cpus, cpu_0), clock_frequency)

This lets us remove DT_CPU_CLOCK_FREQUENCY from dts_fixup.h.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-23 23:55:37 -05:00
Vincent Wan 0915ccca46 drivers: cc13xx_cc26xx: use DT_INST_FOREACH to reduce code duplication
Use DT_INST_FOREACH macro to combine code used for multiple instances.
Remove unnecessary Kconfig options for UART instances.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-04-23 17:29:53 -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 9d89ce1d6d drivers: cc13xx_cc26xx: Convert drivers to use more new DT_INST macros
Changing more of DT_* prefixed macros that refer to instances to use
DT_INST macros.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-04-23 17:29:53 -05:00
Kumar Gala 22e65cb9ba gpio: mcux: Convert convert to DT_INST defines
Convert driver to use DT_INST_ defines.  As part of this conversion we
remove the Kconfig options for per GPIO controller enables and instead
get that information from device tree.  This means we now disable each
GPIO controller by default in the DTS and have each board dts enable the
GPIO controller ports it needs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-23 17:07:41 -05:00
Andrzej Głąbek 7e050b4bd3 drivers: uart_nrfx_uarte: Fix implementation of uart_irq_tx_ready()
Although it is not clearly specified in the UART API, this function
is supposed to return 0 when the TX interrupt is disabled, regardless
of whether anything could fit into the TX buffer or not (this can be
concluded from looking at implementations of several samples and tests
present in the tree, also almost all UART drivers are implemented this
way).

The problem in the uart_nrfx_uarte driver case is that the flag that
allows generation of the TX interrupt is not cleared directly in the
uart_irq_tx_disable() function but this clearing is deferred to the
end of the current transmission, in case one is in progress, and hence
it is done in the interrupt handler. Consequently, when the interrupt
handler is not entered between calls to uart_irq_tx_disable() and
uart_irq_tx_ready() (e.g. when both functions are called in a loop
executed in the interrupt context), the latter may return an invalid
value.

Fix this problem by additionally checking if the TX interrupt was
requested to be disabled, not only if it is already disabled in
hardware.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-04-23 18:24:07 +02:00
Venkataramana Kotakonda e34133cd2c driver: espi: Re-enable bus interrupts after espi reset.
Espi bus interrupts need to re-enable after espi reset to get
all espi bus and vw signal interrupts.

Signed-off-by: Venkataramana Kotakonda <venkataramana.kotakonda@intel.com>
2020-04-23 18:22:49 +02:00
Venkataramana Kotakonda 7eccdf7b5c driver: espi: Enable OOB_RST_WARN virtual wire interrupt.
Epsi slave need to respond with an OOB_RST_ACK for OOB_RST_WARN sent by
master during host reset. Enable interrupt for OOB_RST_WARN to receive
signal changes and respond with ACK.

Signed-off-by: Venkataramana Kotakonda <venkataramana.kotakonda@intel.com>
2020-04-23 18:22:49 +02:00
Tobias Svehagen 688f506d4b drivers: spi: sifive: Fix bug with checking if tx fifo is full
The check of the SF_TXDATA_FULL flag is only done on the register
address and not on the actual register content.

Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
2020-04-23 17:28:48 +02:00
Kumar Gala 9c6c1f966c drivers: ethernet: eth_mcux: Convert to using DT_INST macros
Convert driver to use instance macro's instead of dts_fixup.h based
macros.  This moves us closer to removing both dts_fixup.h and per
instance Kconfig symbols.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-23 07:40:37 -05:00
Kumar Gala 94fcf2efa1 drivers: adc: adc_sam_afec: rework device tree support
Reworked adc_sam_afec driver to utilize new DT_INST macros as part of
this rework we also now get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h

We remove defines from dts_fixup.h and soc_pinmap.h and associated
Kconfig symbols that are no longer needed due to getting all that
information from devicetree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-23 06:11:26 -05:00
Kumar Gala 085747e5fb drivers: usb: usb_dc_sam: Convert to DT_INST macros
Convert driver to use new DT_INST macros throughout.  We also remove
defines in dts_fixup.h as they are no longer needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-23 06:10:07 -05:00
Kumar Gala a3ec95caef drivers: gpio: gpio_sam: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.  We update one
sample app to use a nodelabel reference.  We also remove defines in
dts_fixup.h as they are no longer needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-23 05:59:50 -05:00
Kumar Gala 22a41e4eb7 drivers: usb: usb_dc_stm32: Convert DT_COMPAT_ define usage to new macros
Convert driver from using DT_COMPAT_ST_STM32_* to new macro
DT_HAS_COMPAT(st_stm32_*).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-23 05:58:17 -05:00
Kumar Gala 5999787e6e drivers: spi: spi_stm32: Convert DT_COMPAT_ define usage to new macros
Convert driver from using DT_COMPAT_ST_STM32_SPI_FIFO to new macro
DT_HAS_COMPAT(st_stm32_spi_fifo).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-23 05:58:17 -05:00
Kumar Gala bd639fc332 drivers: serial: uart_sam0: rework devicetree support
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks and dma from devicetree.  We update the
atmel,sam0-uart binding for dma to replace the rxdma and txdma
properties with proper 'dmas' property.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-22 21:34:21 -05:00
Anthony Brandon 7dd4cc5821 sensor: si7006: combined RH/T measurements
The Si7006-A20 rev. 1.2 datasheet, section 5.1.2. Measuring Temperature
says that:

"Each time a relative humidity measurement is made a temperature
measurement is also made for the purposes of temperature compensation of
the relative humidity measurement. If the temperature value is required,
it can be read using command 0xE0; this avoids having to perform a
second temperature measurement."

Respective improvement is implemented.

Signed-off-by: Max Payne <forgge@gmail.com>
Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com>
2020-04-22 15:51:15 -05:00
Max Payne 0bc4370689 sensor: si7006: fixed temperature conversion
The driver was incorrectly converting the temperature samples. According
to Si7006-A20 rev. 1.2 datasheet, section 5.1.2. Measuring Temperature,
the offset -46.85 must be applied.

Signed-off-by: Max Payne <forgge@gmail.com>
Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com>
2020-04-22 15:51:15 -05:00
Jose Alberto Meza 9538f7896e drivers: espi: xec: Add support for eSPI flash channel
Add driver implementation to support flash read/writ transactions
over eSPI bus.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-04-22 22:21:54 +02:00
Kamil Rakoczy 415065a5f3 Sensor: ADXL345: Fix ADXL345 driver
Fixes problems with ADXL345 3-axis I2C accelerometer
reported in #23577, #23581 and #23584.

Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2020-04-22 19:28:47 +02:00
Kamil Rakoczy f0ffe33dfe Sensor: ADXL345: Fix ADXL345 device address
Fixes bad device address passed to i2c_reg_write_byte/i2c_reg_read_byte.

Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2020-04-22 19:28:47 +02:00
Henrik Brix Andersen b29c15ed09 drivers: gpio: mcux_igpio: fix infinite loop
Avoid entering an infinite loop when configuring the the IGPIO IRQ.

Fixes 50129f8dd7
Fixes #24579

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-04-22 12:27:11 -04:00
Krzysztof Chruscinski 10d15d185b drivers: timer: nrf_rtc: Refactor alarm setting
User reported a flaw in the current algorithm which fails when Zero
Latency Interrupts (ZLI) are used. Ported algorithm from
counter_nrfx_rtc.c which covers all cases. Algorithm is lockless so
no distinction for ZLI is needed.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-04-22 17:45:07 +02:00
Sven Herrmann bded58cee5 Sensor: mpr: Add Honeywell MPR driver
The Honeywell MPR sensor is a piezoresistive silicon pressure sensor,
which can be accessed via i2c.

https://sensing.honeywell.com/micropressure-mpr-series

Signed-off-by: Sven Herrmann <sven.herrmann@posteo.de>
2020-04-22 17:39:31 +02:00
Aurelien Jarno 298df51c0c drivers: pinmux: stm32l4: Add extra pins for I2C1
Add I2C1 SDA/SCL configuration on pins PA9 and PA10, as they are
currently only available on other pins.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2020-04-22 17:39:12 +02:00
Immo Birnbaum f88923a2ff drivers: serial: Xilinx UART run-time config, interrupt functionality
The driver was extended so that the tests/drivers/uart/uart_basic_api
test case now passes. The following modifications were made for the
following items of the test case:

* test_uart_configure
* test_uart_config_get

The driver was missing the support to re-configure the UART at run-time
as well as to obtain the current configuration at run-time via the
.configure and .config_get hooks provided within the UART driver API.
For the flow control setting, bit (mask) definitions were added for the
Modem Control Register. Both the configuration get and set functions
come with auxiliary functions that convert configuration register bit
masks to the UART driver API's enumeration types and vice versa.

For run-time configurability, the device's data struct is required un-
conditionally, previously, it was only available whenever interrupt-
driven mode was enabled. Consequently, the device initialization was
simplified to a single call of the DEVICE_AND_API_INIT macro, as the
existance of the device's data struct is now no longer conditional.

* test_uart_fifo_fill

For the user callback function of the test case to receive the initial
'Ready to TX' indication upon which the TX FIFO is filled, it is
necessary that uart_xlnx_ps_irq_tx_enable also sets the TX FIFO empty
bit in the Interrupt Enable Register. Consequently, the same modifi-
cation applies to the irq_tx_disable function.

* test_uart_fifo_read

During inital device configuration, the RX FIFO interrupt trigger
level has to be set to 1 byte for now, as the test case doesn't poll
the incoming data in a while()-loop, therefore, it misses the CR/LF
if more than one character is in the RX FIFO at the time of the
interrupt and neither CR nor LF is the first character.

Whenever the state of an interrupt is checked by the user callback
function (uart_xlnx_ps_irq_tx_ready, uart_xlnx_ps_irq_rx_ready),
the corresponding bits are cleared in the Interrupt Status Register,
re-enabling interrupts generated by the corresponding source.

Tested on QEMU (R5, A9) and actual Zynq7000 hardware.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@weidmueller.com>
2020-04-22 17:36:58 +02:00
Immo Birnbaum 80647b583f drivers: serial: Xilinx UART driver interrupt support feature flag
Added the SERIAL_SUPPORT_INTERRUPT feature flag to the driver's
configuration file. This flag was missing, although the driver
supports interrupt-driven operation.

Interrupt support is required for testcases using the UART_PIPE
feature on the upcoming Cortex-A9 targets (QEMU/Zynq-7000).

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@weidmueller.com>
2020-04-22 17:36:58 +02:00
Immo Birnbaum 24f3bce4f3 drivers: serial: Xilinx UART driver IRQ connect macro fix
Fix for the UART_XLNX_PS_IRQ_CONF_FUNC macro, which wraps IRQ_CONNECT
into a function for each device instance. This macro had device
instance #0 hardcoded at one point.

Interrupt support is required for test cases using the UART_PIPE
feature on the upcoming Cortex-A9 targets (QEMU/Zynq-7000).

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@weidmueller.com>
2020-04-22 17:36:58 +02:00
Peter Bigot 736860ac90 drivers: hwinfo: update mcux-sim implementation byte order
Following the practice for i.MX decoding assume the 32-bit identifier
values need to be converted to big-endian representation for
device-independent interpretation.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-22 17:31:56 +02:00
Peter Bigot 1668c21e17 drivers: hwinfo: update i.MX implementation byte order
Resources indicate that CFG2 holds the upper 32 bits, and CFG1 the
lower 32 bits, of a 64-bit unique identifier.  Store it in big-endian
format so it reads correctly when accessed as a byte sequence.

https://community.nxp.com/docs/DOC-94459

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-22 17:31:56 +02:00
Martí Bolívar a95e7c5424 drivers: uart: nordic: move to new DT API
Keep existing Kconfig in place.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-22 17:27:42 +02:00
Marc Reilly cf7dd4981f drivers: serial: nrf uarte: avoid dropping RX chars/overruns
In some cases (eg at high baud rate, no HW flow control, and when BLE
radio/ints running) data could be lost between when enough characters
have been RX'd to fill the DMA buffer and when the ENDRX event was
fired, where the the STARTRX task is invoked to start filling the next
buffer (which is set up earlier, but I think will not be filled until
STARTRX).
To fix this, the SHORT is enabled between ENDRX and STARTRX whenever the
'next' buffer is available, so that STARTRX is invoked automatically and
subsequent chars go into the next buffer via EasyDMA.
To make this work properly, uarte_nrfx_isr_async() now handles the ENDRX
event _before_ the STARTRX event.

There was also an issue in rx_timeout() where the received character
count (rx_total_byte_count) could be incremented greater than the actual
buffer size. This arises from rx_total_byte_count value coming from the
counting the RXDRDY events (either by PPI/timer counter or counting the
RXDRDY ints themselves) and so if chars are received in the rx_timeout()
(or before ENDRX is handled) the rx_timeout() could increment rx_offset
past the length of the buffer. This could result the remaining 'len'
being calculated incorrectly (an underflow due to unsigned - signed ,
where signed > unsigned).
To fix this, we now store the lengths of the buffers and don't invoke
the UART_RX_RDY callback when the buffers are full; its handled by
ENDRX.
(Also note that the buffer size should be available via the RXD.MAXCNT
register on the nrf, but this register is not exposed through the nrfx
HAL and is also double buffered, so it seemed clearer to just track the
buffer lengths explicitly here in the driver).

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>

for fixup

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2020-04-22 12:27:32 +02:00
Kumar Gala 45a014a883 drivers: intc: intc_cavs: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.  This allows us to
also remove dts_fixup.h that are no longer used.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-22 04:59:22 -05:00
Kumar Gala e53ddb5037 intc: intc_cavs: Replace DT_CAVS_ICTL_BASE_ADDR with new macros
Replace various drivers and soc code that use DT_CAVS_ICTL_BASE_ADDR
with DT_REG_ADDR(DT_NODELABEL(cavs0)).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-22 04:59:22 -05:00
Kumar Gala 492fbf7bba intc: intc_cavs: Use DTS labels for device names
Replace Kconfig device names with one's that come from device tree like
most all other devices do.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-22 04:59:22 -05:00
Kumar Gala a7e243bea4 drivers: i2c: i2c_sam_twihs: rework device tree support
Reworked i2c_sam_twi driver to utilize new DT_INST macros as part of
this rework we also now get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h

We remove defines from dts_fixup.h and soc_pinmap.h and associated
Kconfig symbols that are no longer needed due to getting all that
information from devicetree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-21 15:46:30 -05:00
Kumar Gala 5f94e593c0 drivers: i2c: i2c_sam_twi: rework device tree support
Reworked i2c_sam_twi driver to utilize new DT_INST macros as part of
this rework we also now get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h

We remove defines from dts_fixup.h and soc_pinmap.h and associated
Kconfig symbols that are no longer needed due to getting all that
information from devicetree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-21 15:46:30 -05:00
Martí Bolívar 18c9c8cf27 drivers: usb_dc_nrfx: move to new DT API
Close out the existing partial conversion to the new DT API.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-21 13:34:22 -05:00
Martí Bolívar 100187cb64 drivers: flash: nordic qspi: finish DT API conversion
Also convert bus node access to the new API.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-21 18:31:08 +02:00
Henrik Brix Andersen 42af963db2 drivers: can: shell: add command for configuring a CAN controller
Add shell command for configuring the mode and bitrate of a CAN
controller.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-04-21 18:26:16 +02:00
Hans Wilmers 5d6770aeea drivers: modem: ublox-sara-r4: implemented sendmsg
Implemented sendmsg

Tested using Sara U201 and the MQTT protocol library.

Signed-off-by: Hans Wilmers <hans@wilmers.no>
2020-04-21 17:37:08 +03:00
Hans Wilmers ed88088ba2 driver: modem: ublox_sara_r4: fixed closing UDP socket
Following issue is addressed in this bugfix:

When using offloaded sockets with modem ublox_sara_r4,
the socket is only closed if it is in connected state
at the time of the function call. When using UDP sockets,
this leads to a socket never being closed.

Signed-off-by: Hans Wilmers <hans@wilmers.no>
2020-04-21 17:37:08 +03:00
Hans Wilmers 71fa7ba5ad drivers: modem: ublox_sara_r4: fixed rssi for Sara U201
Calculation of RSSI was done incorrectly for Sara U201.

When evaluating +CSQ command responses, the RSSI can be calculated
from the first value, which is <signal_strength>. Instead, the
RSSI was calculated from the second value, which is <qual>.
With the subsequent mapping to RSSI, this results in a wrong
value for RSSI.

This is now corrected by using value <signal_strength> to calculate
the RSSI.

Tested using Sara U201.

Signed-off-by: Hans Wilmers <hans@wilmers.no>
2020-04-21 17:37:08 +03:00
Steven Slupsky b39423e0e2 drivers: modem: gpio api and string len
This commit references modem_pin() and modem_shell()

modem_pin(): use new gpio api
The existing pin driver does not respect gpio
configuration in device tree for active high / low
This commit allows for the device tree to determine the
active logic level.

modem_shell(): use correct string length
The ms_send macro uses iface.write() to send a string.
iface.write() requires the length of the string not the
size of the string.
This commit corrects the string length.

drivers: ublox-sara-r4: fix vint polling

This eliminates the implication that the enable and disable values can
be something other than 1 and 0, and fixes the code so it won't enter
an infinite loop if the GPIO read returns an error.

Signed-off-by: Steven Slupsky <sslupsky@gmail.com>
2020-04-21 17:02:22 +03:00
Kumar Gala bf0add1a34 drivers: serial: uart_sam0: Fix build error with CONFIG_UART_ASYNC_API
When we build this driver with CONFIG_UART_ASYNC_API enabled we get the
following build error:

uart_sam0.c: In function 'uart_sam0_init':
uart_sam0.c:558:35: error: redefinition of 'dev_data'
  558 |  struct uart_sam0_dev_data *const dev_data = DEV_DATA(dev);
uart_sam0.c:498:35: note: previous definition of 'dev_data' was here
  498 |  struct uart_sam0_dev_data *const dev_data = DEV_DATA(dev);

Fix this be removnig the duplicate at line 558.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-21 08:00:49 -05:00
Kumar Gala 5419a196b1 include/devicetree: dma: rename DMAS CELL macros
The macros should have been DMAS_CELL_ not DMAS_CELLS_ as this matches
the other devicetree macro naming convention.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-21 06:37:28 -05:00
Henrik Brix Andersen cb83b96a60 drivers: serial: mcux_lpuart: fix infinite loop
Avoid entering an infinite loop when configuring the the NXP Kinetis
LPUART IRQ.

Fixes 9a65318a5b.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-04-21 06:37:10 -05:00
Christoph Reiter c523e3606a drivers: i2c: nrfx: Fix log level is ignored
Fixes the problem that the log level set in Kconfig is ignored.

Signed-off-by: Christoph Reiter <christoph.reiter@infineon.com>
2020-04-20 23:55:46 +02:00
Kumar Gala 9a65318a5b drivers: uart: mcux_lpuart: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.  Removed per
instance Kconfig symbols and replaced with DT_NODELABEL references
where needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 15:50:45 -05:00
Erwan Gouriou 81f27c2265 boards: stm32: Use dt API for serial peripheral configuration
Replace use of Kconfig UART_X symbols by calls to DT API.
Clean driver from symbols definitions

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-20 15:27:56 -05:00
Erwan Gouriou 76313f06db drivers/serial: stm32: Remove calls to CONFIG_LPUART_1
Before removing CONFIG_LPUART_1 symbols in boards, remove its
use in serial driver.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-20 15:27:56 -05:00
Kumar Gala fac0d7d90e drivers: spi: mcux_lpspi: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 15:23:47 -05:00
Kumar Gala df302727dc drivers: spi: mcux_flexcomm: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 15:23:47 -05:00
Kumar Gala 1d33ed3dfc drivers: spi: mcux_dspi: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 15:23:47 -05:00
Kumar Gala 7a62ab7fdf drivers: i2c: mcux_lpi2c: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 15:23:47 -05:00
Kumar Gala 97544fb022 drivers: i2c: mcux_i2c: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 15:23:47 -05:00
Kumar Gala b07596bcea drivers: adc: mcux_adc12: create macro for device instantiation
Create a ACD12_MCUX_INIT macro that we can use with DT_INST_FOREACH for
device instantiation.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 15:23:47 -05:00
Kumar Gala bc4d12f8c8 drivers: adc: mcux_adc16: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.  We can remove
various defines from dts_fixup.h now as well.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 15:23:47 -05:00
Kumar Gala 7758f4a6f7 drivers: gpio: gpio_intel_apl: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.  We remove the
aliases and use nodelabel instead in the soc_gpio.h to determine the
label for the specific gpio controller.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 15:23:11 -05:00
Kumar Gala 576033f858 drivers: pinmux: intel_s1000: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.  This allows us to
also remove dts_fixup.h that are no longer used.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 15:21:39 -05:00
Peter Bigot 8c749ffc0a drivers: hwinfo: update stm32 implementation byte order
The unique identifier for this platform is a 96-bit value, where the
upper 56 bits provide an ASCII encoding of the lot number, and the
lower 40 bits provide the wafer number and X, Y position on the wafer.
Extract the value into big-endian form for device-independent
interpretation.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-20 19:04:26 +02:00
Viraaj Somayajula e850ced155 gpio: gpio_sx1509b: add support for interrupt functionality
enable the interrupt functionality for sx1509b gpio expander,
when the CONFIG_GPIO_SX1509B_INTERRUPT config is enabled.
The gpio pin used for interrupt should be configured in the
device tree sx1509b node before enabling the interrupt
configuration.

Signed-off-by: Viraaj Somayajula <sviraaj@zedblox.com>
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-20 18:51:59 +02:00
Stephanos Ioannidis c442203c08 arch: arm: aarch32: Fix incorrect z_arm_{int,exc}_exit usage
In the ARM Cortex-M architecture implementation, the concepts of
"exceptions" and "interrupts" are interchangeable; whereas, in the
Cortex-A/-R architecture implementation, they are considered separate
and therefore handled differently (i.e. `z_arm_exc_exit` cannot be used
to exit an "interrupt").

This commit fixes all `z_arm_exc_exit` usages in the interrupt handlers
to use `z_arm_int_exit`.

NOTE: In terms of the ARM AArch32 Cortex-A and Cortex-R architecture
      implementations, the "exceptions" refer to the "Undefined
      Instruction (UNDEF)" and "Prefetch/Data Abort (PABT/DABT)"
      exceptions, while "interrupts" refer to the "Interrupt (IRQ)",
      "Fast Interrupt (FIQ)" and "Software Interrupt/Supervisor Call
      (SWI/SVC)".

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-20 18:22:46 +02:00
Kumar Gala adf3c236fc drivers: video: mcux_csi: Convert driver to DT_INST macro
Convert from using dts_fixup.h based macros to DT_INST macro.  This lets
us remove the dependancy on dts_fixup.h for this driver.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 11:08:46 -05:00
Kumar Gala 476e90a6a5 drivers: pwm: pwm_mcux: Convert driver to new DT_INST macros
Convert driver to use DT_INST macros and remove related board per
instance Kconfig symbol usage.  We also remove dts_fixup.h defines that
are no longer needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 11:08:46 -05:00
Kumar Gala 50129f8dd7 drivers: gpio: mcux_igpio: Convert driver to new DT_INST macros
Convert driver to use DT_INST macros and remove related board per
instance Kconfig symbol usage.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 11:08:46 -05:00
Martin Jäger 414527926d drivers: dac: Add support for STM32L0 series
First implementation for STM32L0 series MCUs to be used for testing.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-04-20 17:41:48 +02:00
Martin Jäger 33228f516b drivers: dac: Add API for DAC peripherals
DAC (digital to analog converter) peripheral driver with a generic API
suitable for most MCUs (only basic DAC features considered).

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-04-20 17:41:48 +02:00
Peter Bigot df106a1708 modem: gsm: correct timeout parameter to k_delayed_work_submit
The parameter is a k_timeout_t, not an integer in milliseconds.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-20 18:09:18 +03:00
Takumi Ando c2b2aad8ae soc: arm: stm32l1: Add UART4 and UART5 supports
Add UART4 and UART5 supports for STM32L1 series.

Signed-off-by: Takumi Ando <takumi@t15.red>
2020-04-20 15:54:22 +02:00
Maureen Helm b03e4312b3 drivers: i2c: Fix incorrect fast and fast+ mode bus speeds
Fixes the nxp and silabs i2c drivers to decode fast and fast+ mode bus
speeds as 400 kHz and 1 MHz respectively.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-20 15:54:04 +02:00
Bartlomiej Flak c0be43e9ab interrupt_controller: gic: Fix ICFGRn access and config
Fixing ICFGRn register access with `sys_{read,write}32`
since this register is not byte-accessible.
Type of `val` changed to u32 to match reg width.

Fixes #24339

Supersedes #24422

Signed-off-by: Bartlomiej Flak <flakbartlomiej@gmail.com>
2020-04-20 15:48:45 +02:00
Kumar Gala 78f29f84ee drivers: ipm: ipm_mcux: convert to new DT_INST macros
Convert from older DT macro use the new include/devicetree.h
DT_INST macro APIs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 08:45:37 -05:00
Martí Bolívar 44cf00d6e1 drivers: spi: nordic: finish conversion to new DT API
The SPIM driver has been converted already. Convert the SPI and SPIS
drivers too. Leave existing Kconfigs in place.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-20 15:43:39 +02:00
Flavio Ceolin 1572106e68 sensor: lis3mdl: Check possible error in trigger_set
Check the return of i2c_burst_read return and in case of error return
early and propagate the error.

Fixes: #23294

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-04-20 15:43:23 +02:00
Martí Bolívar cd1387d6cf drivers: sensor: qdec_nrfx: move to new DT API
And add "quadrature decoder" to the binding description just have it
written down.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-20 15:43:01 +02:00
Peter A. Bigot 3d8125a47c drivers: flash: nrfx_qspi_nor: fix semaphore errors
The code generally invoked qspi_wait_for_completion() within a locked
region without verifying that an operation was successfully initiated.
This caused a deadlock whenever the operation failed, e.g. because the
data buffer was not 4-byte aligned.  Update that function to take the
result of the operation and either wait for completion or release the
lock, depending on its value.

Also uniformly use the correct type for Nordic HAL error values, and
refactor the erase module so that the correct values are displayed in
the diagnostic when something goes wrong.

Also check the alignment requirements for the flash address and
transfer size, which are highly constrained on this device.  This
driver also requires 4-byte aligned data buffer; this is checked in
the Nordic HAL.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-04-20 15:41:35 +02:00
Kumar Gala af5515e2e0 drivers: usb: device: kinetis: Convert driver to DT_INST macro
Convert from using dts_fixup.h based macros to DT_INST macro.  This
lets us remove the dependancy on dts_fixup.h for this driver.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 15:40:44 +02:00
Erwan Gouriou 65eacef644 drivers/flash: stm32: Use stm32 generic compat as driver compatible
Instead of various series compatibles, use single stm32 generic
compatible as reference for stm32 flash driver.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-20 03:51:36 -05:00
Kumar Gala e7c7f911a9 drivers: serial: usart_sam: rework device tree support
Reworked usart_sam driver to utilize new DT_INST macros as part of
this rework we also now get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h

We remove defines from dts_fixup.h and soc_pinmap.h and associated
Kconfig symbols that are no longer needed due to getting all that
information from devicetree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-18 17:04:08 -05:00
Kumar Gala fa8aa11f71 drivers: serial: uart_sam: rework device tree support
Reworked uart_sam driver to utilize new DT_INST macros as part of this
rework we also now get pin ctrl/mux configuration information from the
device tree instead of via Kconfig and defines in soc_pinmap.h

We remove defines from dts_fixup.h and soc_pinmap.h and associated
Kconfig symbols that are no longer needed due to getting all that
information from devicetree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-18 17:04:08 -05:00
Kumar Gala addaa802c1 drivers: audio: mpxxdtyy: Conver to use DT_ANY_INST_ON_BUS macro
Convert driver to use new DT_ANY_INST_ON_BUS(i2s) away from
DT_ST_MPXXDTYY_BUS_I2S.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-18 08:43:02 -05:00
Martí Bolívar 5dd0db3081 drivers: bluetooth: rpmsg_nrf53: use new DT API
Use DT_CHOSEN() to access the chosen node.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-18 07:52:05 -05:00
Kumar Gala 57784fb9d5 drivers: timer: xlnx_psttc: Convert driver to DT_INST macro
Convert older DT_INST_ macro use the new include/devicetree.h
DT_INST macro APIs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-17 16:00:58 -05:00
Kumar Gala e8b6dd7f14 drivers: gpio: stellaris: Convert one missed old style DT macro
Convert one old style DT_INST_n_..._LABEL macro that got missed to
DT_INST_LABEL(n).

At the same time move driver to also use DT_INST_FOREACH.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-17 16:00:34 -05:00
Aurelien Jarno 2a396561d4 drivers: pinmux: stm32l4: use a pull-down for SPI SCK pin
When the STM32L4x SoC goes into STOP mode, the SPI device is disabled.
This cause the pins to not be drived anymore (i.e. they are floating)
except through their pull-up or pull-down.

From the logical point of view, the NSS pin is held high by a pull-up
so it's not a problem if the other pins are floating. However those pins
are floating input for the slaves, which increase their power
consumption.

The solution is to hold the state of the pins through a pull-up or a
pull-down. This is already done for the NSS and MOSI pins, but not for
SCK. Fix that by using pull-down on the SCK pin the same way it is
already done for the MOSI pin.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2020-04-17 13:21:12 -05:00
Aurelien Jarno c695899e04 drivers: pinmux: stm32l4: use consistent config for SPI pins
Most of the MISO and MOSI SPI pins of STM32L4 SoCs are configured with
a pull-down except PE14 and PE15. Change them for consistency.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2020-04-17 13:21:12 -05:00
Martí Bolívar 75b42d8a37 drivers: gpio: nordic: move to new DT API
This keeps existing per-instance Kconfig in place, and only updates to
the new DT API.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-17 12:57:24 -05:00
Flavio Ceolin aeb70d5471 drivers: espi_mchp_xec: Update driver to espi API changes
espi driver API is passing struct by reference, just fixed this
driver to follow that changes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-04-17 10:33:02 -07:00
Flavio Ceolin d62dd0737e drivers: espi: Change syscall APIs to pass structs by reference
Several functions that are syscalls were passing structs by value
instead of by reference. Just changed that and implemented missing
verfication handlers for them.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-04-17 10:33:02 -07:00
Flavio Ceolin a5b4e272e2 drivers: espi: Add some missing verification handlers
Add verification handlers for some syscalls that are just missing
that. Though there are syscalls still missing that but they need to be
fixed before adding verification handlers.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-04-17 10:33:02 -07:00
Martí Bolívar 3a8aabd774 drivers: counter: nrf: use new DT API
These drivers use legacy DT APIs to access data by node label. Update
them to use the new API.

Leave the existing Kconfig options in place. This helps with
bisectability in case of regressions and lets us proceed
incrementally. Removing the per-instance Kconfigs is also nontrivial
in these cases because of hard-coded dependencies in other subsystems.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-17 18:28:55 +02:00
Kumar Gala 1d605684ce drivers: usb: device: mcux_ehci: Convert driver to DT_INST macro
Convert from using dts_fixup.h based macros to DT_INST macro.  This lets
us remove the dependancy on dts_fixup.h for this driver.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-17 11:27:30 -05:00
Abe Kohandel 475bc0c962 drivers: i2s: stm32: Add I2S master clock output
Some external audio devices require a master clock to be provided by
the I2S peripheral to work correctly. To allow for the operation of
these devices the master clock output should always be enabled when in
master mode.

Specific applications requiring this signal to be output can configure
the desitnation pin via the pinmux driver.

Signed-off-by: Abe Kohandel <abe@electronshepherds.com>
2020-04-17 10:44:52 -05:00
Aurelien Jarno 7e7e79481f drivers: adc: adc_stm32: enable internal voltage reference source
Like other STM32 series the STM32L4x SoCs have an internal voltage
reference source that need to be enabled.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2020-04-17 17:30:44 +02:00
Kumar Gala c07ab7b5d2 drivers: display: mb_display: Convert to DT_LABEL() macro
Convert old dts_fixup.h style DT_GPIO_P0_DEV_NAME macro to new
DT_LABEL(DT_NODELABEL(gpio0))

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-17 17:22:53 +02:00
Kumar Gala 0b58ae65c8 drivers: gpio: mcux_lpc: Remove unused Kconfig symbols
CONFIG_GPIO_MCUX_LPC_PORT0_NAME and CONFIG_GPIO_MCUX_LPC_PORT1_NAME
aren't used anywhere so we can just remove them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-17 10:16:40 -05:00
Kuba Sanak bf2dccb0eb drivers: uart: samd0: add missing .configure API functionality
The UART driver for samd0 was is missing the .configure and
.config_get functionality expected from api for serial driver.
This commit fixes this by providing basic configuration

Signed-off-by: Kuba Sanak <contact@kuba.fyi>
2020-04-17 08:07:28 -04:00
Sean Nyekjaer ca3457c792 gpio: add driver for MCP23S17 GPIO chip
Adds a new gpio driver that can be used for all boards

Signed-off-by: Sean Nyekjaer <sean@geanix.com>
2020-04-17 05:56:05 -05:00
Stephanos Ioannidis 568466aa93 drivers: ethernet: sam_gmac: Add SAM E54 maximum queue count reference
This commit adds a reference to the SAM E54 maximum queue count value
in the device tree for specifying the range of `ETH_SAM_GMAC_QUEUES`
configuration.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-17 04:56:28 -05:00
Stephanos Ioannidis 5b248ce792 drivers: ethernet: eth_sam_gmac: Add SAM0 family support
This commit adds the GMAC driver support for the Ethernet-capable SAM0
family devices (SAM E53 and E54 at this time).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-17 04:56:28 -05:00
Kumar Gala 762b521931 drivers: sensor: Fix missing DT_DRV_COMPAT
Some sensor drivers modify there struct's based on DT defines.  In those
cases we need to make sure that DT_DRV_COMPAT is set on all the source
files associated with that driver.  This updates any such files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-17 03:32:19 -05:00
Francois Ramu 7ed83ded6d drivers: dma: initialize peripheral request dma on stm32
Set the peripheral ID for the Channel Selection register

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-04-17 03:13:02 -05:00
Francois Ramu a9f277a61b drivers: dma: control of null buffer address for stm32 dma transfers
Raise warning if the buffer address of the source or the dest is NULL

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-04-17 03:13:02 -05:00
Francois Ramu 60644a3e2c drivers: dma: irq handler of the dma_stm32
define the irq handler in case of DMA V1 or V2,
for the stm32x soc series
with DMA V1 raise Fifo Error if enabled
with V2, handle the Global Interrupt

Signed-off-by: Francois Ramu <francois.ramu@st.com>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-17 03:13:02 -05:00
Francois Ramu e135bba72e drivers: dma: channel direction of the dma_stm32
Return an error if the direction of the channel is wrong

Signed-off-by: Francois Ramu <francois.ramu@st.com>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-17 03:13:02 -05:00
Francois Ramu 1b0503d2cd drivers: dma: clean up header
Move tables declaration as they are only used locally for now

Signed-off-by: Francois Ramu <francois.ramu@st.com>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-17 03:13:02 -05:00
Erwan Gouriou de4ba27539 drivers: dma: channel configuration for dma_stm32
Control values when configuring the dma channel
According to the soc specification,
the dma V2 channel counts from 1.
the dma V1 stream counts from 0.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-17 03:13:02 -05:00
Francois Ramu c4bf6ac1f9 drivers: dma: include duplicated
remove duplicates line

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-04-17 03:13:02 -05:00
Jukka Rissanen d75c83cdbe drivers: gsm_mux: Convert to use k_timeout_t
Convert to use k_timeout_t

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-04-17 10:15:54 +03:00
Jukka Rissanen 31ec75fca3 modem: shell: Add info command
Add an information command that currently will only prints
GSM muxing status.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-04-17 10:15:54 +03:00