Commit graph

7653 commits

Author SHA1 Message Date
Francois Ramu c098aabcaa drivers: counter: rtc for stm32f0 doc series
This patch set the EXTI line 17 as the RTC
on the stm32f0x from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-07-24 16:16:21 +02:00
Erwan Gouriou c062cd260a drivers/ethernet: stm32: Enable Kconfig symbol ETH_STM32_HAL using dts
It should not be needed to configure ETH_STM32_HAL from boards.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-07-24 12:03:33 +02:00
Erwan Gouriou 04c1fcfde6 drivers/ethernet: stm32: Get static boot configuration from dts
Update stm32 ethernet driver to get basic boot configuration from
device tree.
So far information are:
- Label
- Base address
- IRQ number and prio
- Clock settings

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-07-24 12:03:33 +02:00
Tobias Svehagen 7ea0c19c55 drivers: wifi: esp: Retry command for getting IP settings
If AT_CIPSTA? command fails it is retried again after 5 seconds.

Fixes #25741

Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
2020-07-24 12:01:30 +02:00
Raveendra Padasalagi f4a141639d drivers: dma: Add pl330 dma driver
Add PL330 dma driver support, this driver
- supports 32 bit memory to memory operation
- supports 36 bit memory to memory operation
  under a config flag DMA_64BIT
- supports secure channel

Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
2020-07-24 11:54:31 +02:00
Raveendra Padasalagi 306980816a dma: Support 64bit source/dest address
Add 64bit source_address/dest_address fields support.
This is needed in situation where DMA controller is capable
of handling more than 32bit source and destination addresses.

Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
2020-07-24 11:54:31 +02:00
Parthiban Nallathambi d8e63e7161 drivers: wifi: eswifi: enable NET_SOCKETS_OFFLOAD by default
Enable NET_SOCKETS_OFFLOAD is default option for eswifi.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2020-07-24 11:13:31 +03:00
Parthiban Nallathambi 13808b7d83 drivers: wifi: eswifi: fix compilation warnings
Fix compilation warnings when CONFIG_NET_SOCKETS_OFFLOAD enabled

warning: passing argument 5 of '__eswifi_socket_new' makes pointer
 from integer without a cast [-Wint-conversion]
  395 |  idx = __eswifi_socket_new(eswifi, family, type, proto, 0x50CE);
      |                                                         ^~~~~~
      |                                                         |
      |                                                         int
eswifi.h:137:21: note: expected 'void *' but argument is of type 'int'
  137 |    int proto, void *context);
      |               ~~~~~~^~~~~~~
In function 'eswifi_socket_bind':
warning: comparison between pointer and integer
  461 |  if ((addrlen == NULL) || (addr == NULL) ||
      |

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2020-07-24 11:13:31 +03:00
Parthiban Nallathambi 0725719ada drivers: wifi: eswifi: Convert raw timeout values to use K_MSEC()
Use K_MSEC instead of raw timeout value.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2020-07-24 11:13:31 +03:00
Parthiban Nallathambi 1cb20aee34 driver: wifi: eswifi: use common log module
use common log module across all eswifi sources, which allows
to compile with CONFIG_NET_SOCKETS_OFFLOAD.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2020-07-24 11:13:31 +03:00
Simon Glass 5afdceee8c sensor: shell: Add a 'battery' command
It is useful to show sensor channels for a battery in cohesive block as
it is easier to read. Add a 'battery' command to handle this. It only
supports a single battery, relying on the device-tree alias to select
it.

uart:~$ battery
Temp:  23.55 C
V:     4.31 V
V-desired: 4.40 V
I:    574 mA (CHG)
I-desired:  2000 mA
Charging: Not Allowed
Charge: 100 %
V-design: 3.86 V
Remaining: 6764 mA
Cap-full: 6764 mA
Design: 6910 mA
Time full: 0h:00
Time empty: 0h:00

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-23 12:12:09 -04:00
Simon Glass ee34aced6a sensor: max17055: Add MAX17055 driver
Add support for the Maxim MAX17055 fueld-gauge sensor.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-23 12:12:09 -04:00
Simon Glass 9b8c04401d sensor: shell: Show the error code when reading fails
The error code may give a clue as to what is wrong. Add it to the error
message.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-23 12:12:09 -04:00
Simon Glass 122d8fa6a9 sensor: shell: Allow output for fuel-gauge channels
Add names for more channels so that they can be shown, e.g.:

$ sensor get MAX17055
channel idx=38 gauge_voltage =   4.313906
channel idx=39 gauge_avg_current = 558.000000
channel idx=42 gauge_temp =  23.558558
channel idx=43 gauge_state_of_charge = 100.000003
channel idx=44 gauge_full_cap = 6766.000000
channel idx=45 gauge_remaining_cap = 6766.000000
channel idx=46 gauge_nominal_cap = 6910.000000
channel idx=50 gauge_time_to_empty =   0.000000
channel idx=51 gauge_time_to_full =   0.000000
channel idx=52 gauge_cycle_count =   0.100000
channel idx=53 gauge_design_voltage =   3.860000
channel idx=55 gauge_desired_charging_current = 2000.000000

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-23 12:12:09 -04:00
Peter Bigot a1babb7f1f drivers: eeprom_slave: add const qualifier to read-only data
The EEPROM device doesn't mutate the source data it's given, so update
the API signature to reflect this fact.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-07-22 21:41:12 +02:00
Tobias Svehagen 71e7cd3f99 drivers: wifi: esp: Fix issue with incorrect tx timeout
It can happen that the command '>' is received between
modem_cmd_send_nolock and modem_cmd_handler_update_cmds. Since the
command handler for '>' is not set, sem_tx_ready will not be given
and _sock_send will timeout. Make sure the command handlers are set
before the send by also passing them to modem_cmd_send_nolock.

Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
2020-07-22 15:06:41 +03:00
Henrik Brix Andersen 381a1cfcd2 drivers: dma: mcux_dma: add support for the NXP KE1xF
Add support for the NXP KE1xF SoC to the eDMA driver. The KE1xF supports
m2m DMA transfers from sources 60 to 63.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-07-21 08:56:51 -05:00
Henrik Brix Andersen c89ef2f393 drivers: dma: mcux_emda: only enable nocache memory if supported
Only enable CONFIG_NOCACHE_MEMORY if supported by the SoC.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-07-21 08:56:51 -05:00
Alexander Kozhinov 92727e9846 drivers: ethernet: stm32: add stm32h7 support
add DTCM caching management in KConfig for stm32h7
add NOCACHE_MEMORY support for stm32h7 M7 CPU series
add HAL_RCC_EX support for stm32h7 series
implemented stm32h7 support within stm32 eth driver

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-07-21 15:12:18 +02:00
Alexander Kozhinov ec25fa8592 drivers: ethernet: stm32: pre-add stm32h7 support
added changes that apply to other than stm32h7 series
and prepares stm32h7 series integration:

eth_tx/eth_rx: changed type of total_len
added necessary defines for
    tx_desc and own flag extractions
added read_eth_phy_register() function
    and corresponding defines
added ETH_DMA_MEM and CACHE defines
following memory buffers declarations moved out of
    its ifdef preprocessor macro:
        dma_rx_desc_tab, dma_tx_desc_tab,
        dma_rx_buffer, dma_tx_buffer
added hal_ret stm32 HAL status checks

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-07-21 15:12:18 +02:00
Alexander Kozhinov 3ad1f91a80 drivers: pinumx: stm32: pinmux_stm32h7: added ethernet pins
added ethernet pins definition for stm32h7 SoC series

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-07-21 15:12:18 +02:00
Jan Van Winkel adecdd5d43 driver: display: Added extra asserts to SDL display
Added extra asserts to write function of SDL display driver to check if
write is within bounds.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-07-21 15:12:05 +02:00
Jan Van Winkel 814f94e053 driver: display: Added asserts to write of dummy driver
Added asserts to write function of dummy display driver to check if
write is within bounds

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-07-21 15:12:05 +02:00
Vincent Wan 53f408afe8 drivers: wifi: simplelink: enable IPv6 support
IPv6 support was not fully implemented in the driver and was disabled.
This commit completes the implementation and enables it when
configured.

Signed-off-by: Vincent Wan <vwan@ti.com>
2020-07-21 15:08:56 +02:00
Eugeniy Paltsev dd49fb4da4 Serial: NSIM: remove legacy ARC-NSIM UART driver
After switching nSIM to 16550 UART model & driver there is no users
for ARC-NSIM UART. So remove it entirely.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2020-07-20 13:34:34 -04:00
Krzysztof Chruscinski e82419074c drivers: led_strip: ws2812_gpio: Adapt to clock using onoff
Adapted to use onoff service for clock control

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-07-20 16:22:21 +02:00
Krzysztof Chruscinski 9e546fdf7e drivers: usb: device: nrf: Adapt to control clock using onoff
Change to use onoff service when controlling HFXO.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-07-20 16:22:21 +02:00
Krzysztof Chruscinski 554ff9d6d2 drivers: counter: nrfx_rtc: Adapt to clock control changes
Adapted nrfx_rtc counter to request clock through onoff API.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-07-20 16:22:21 +02:00
Krzysztof Chruscinski 2881df3d0c drivers: timer: nrf: Adapt to clock_control changes
Adapted driver to clock_control changes (usage of onoff manager).
Since timer is permanenty requesting the clock, it is using API
dedicated for that: z_nrf_clock_control_lf_on().

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-07-20 16:22:21 +02:00
Krzysztof Chruscinski ff089217cb drivers: sensor: nrf5: Adapt temp driver to use onoff for clock
Adapted driver to use onoff service for clock control.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-07-20 16:22:21 +02:00
Krzysztof Chruscinski 04e770b20c drivers: clock_control: nrf: Add clock status shell command
Added shell command to clock driver to get clock status.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-07-20 16:22:21 +02:00
Krzysztof Chruscinski 6f01c0bc79 drivers: clock_control: nrf: Add onoff service support
Updated nrf clock control driver to use onoff service for managing
multiple users.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-07-20 16:22:21 +02:00
Alexandre Bourdiol d7fb61f224 drivers: flash: stm32wb: disable Page Erase at end of erase_page()
FLASH_TYPEERASE_PAGES is null and doesn't represent a bit in the
register, thus this instruction has no effect.
It must be replaced by FLASH_CR_PER which is the bit that should
be cleared.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-07-20 12:48:10 +02:00
Mateusz Syc c3cc0c8787 drivers: flash: nrf_qspi_nor: supports non-aligned read
Added function read_non_aligned that reads data under
non-aligned flash addres to non-aligned read buffer of any size.

Signed-off-by: Mateusz Syc <Mateusz.Syc@nordicsemi.no>
2020-07-20 12:46:38 +02:00
Saravanan Sekar 9ac3c9d42a drivers: sensors: itds: Add support for WSEN-ITDS 3-axis accel sensor
Add support for wsen-itds 3-axis accel sensor, provides acceleration,
temperature data reading and supports configuring of output data rate,
operating mode and scale.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
2020-07-20 12:45:56 +02:00
Andrew Boie d728bece0a drivers: ns16550: use DEVICE_MMIO where needed
This gets a little complicated as the driver could be
using PCI-E MMIO, MMIO specified by DTS, or I/O ports.
This driver doesn't use struct uart_device_config any
more.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie 9f84637499 gpio_intel_apl: use DEVICE_MMIO
Good example of the NAMED variants of the MMIO macros, since
an existing inheritance mechanism already took the first-member
slot of the dev_data/config structs.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie 9e627ed6d2 drivers: i2c_dw: use device_mmio
Fairly straightforward example of how to deal with PCIe.
The code considers whether a particular instance is PCIe
or not on a per-instance basis, so DEVICE_MMIO_ROM is not
conditionally defined.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie 7f7d05c262 drivers: hpet: use device_mmio
Straightforward example on how to use the TOPLEVEL variants
of the DEVICE_MMIO macros.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie ee3c50ba6d x86: apic: use device MMIO APIs
A hack was required for the loapic code due to the address
range not being in DTS. A bug was filed.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie d15a531197 drivers: eth_e1000: use device MMIO
The ethernet driver no longer continues to try to initialize
itself if PCIe probing fails.

This device is always PCIe so we don't need to reserve ROM MMIO
storage.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Marcin Niestroj 967f485f38 drivers: wifi: simplelink: fix typo in logged option name
Fix typo in logged Kconfig option name that is missing in used
configuration. This one was mostly problematic for developers wanting to
find such option in source tree using grep - NET_SOCKET_OFFLOAD was not
found in Kconfig files.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-07-16 07:19:56 -05:00
Abhishek Shah 08ed93fed9 drivers: pcie: refactor pcie directory to make RC and EP independent
With this refactoring of pcie directory, RC drivers are placed under
host/ directory, EP drivers are placed under endpoint/ directory and
they are completely independent of each other.

Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
2020-07-14 19:35:31 -04:00
Andreas Sandberg b5bff2cf48 drivers: lora: sx126x: Use the new pin helpers
User the new pin configuration helpers to reduce boilerplate.

Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
2020-07-13 13:11:59 +02:00
Andreas Sandberg 2ebd80cd0e drivers: lora: sx126x: Don't initialize control pin to active
The antenna control GPIO was incorrectly initialized to active. This
is unnecessary since the HAL will activate the antenna switch when the
chip enters an active state.

Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
2020-07-13 13:11:59 +02:00
Andreas Sandberg 23e4a8b64e drivers: lora: Move sx1276 pin helpers to sx12xx common
The new sx1276 pin configuration helpers can be used by the sx126x
driver as well. Move them to sx126xx_common.{c,h} to facilitate reuse.

Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
2020-07-13 13:11:59 +02:00
Jeremy LOCHE 8344b8080b drivers: pinmux: corrected all USART6 alternate functions
Fixed AF for USART 6 on PC6/PC7 PG8/PG9/PG12/PG13/PG14/PG15
All RTS/CTS/RX/TX pins now have correct AF7 instead of wrong AF8.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-07-13 11:53:12 +02:00
Jeremy LOCHE 695bd85b99 drivers: pinmux: stm32h7: fix incorrect PG9/PG14 usart6 AF
Fixes AF of PG9/PG14 for usart6. Must be AF7 instead of AF8

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-07-13 11:53:12 +02:00
Michael Hope d1f4a91183 drivers: display: fix a typo in the ili9340 driver
The typo is inside an __ASSERT which is why the driver is normally OK.

Signed-off-by: Michael Hope <mlhx@google.com>
2020-07-12 17:17:17 -04:00
Steven Slupsky a18a73c19b drivers: wdt: sam0: fix register access in feed()
The wdt CLEAR register is a write synchronized register.
To avoid bus stall, check the status of SYNCBUSY before
accessing the register.

Use SYNCBUSY register for SAM E.
If the wdt is syncing, return -EAGAIN to avoid bus stall.

Signed-off-by: Steven Slupsky <sslupsky@gmail.com>
2020-07-11 12:40:18 -04:00