Commit graph

51583 commits

Author SHA1 Message Date
Mahesh Mahadevan
96fd76edda tests: i2s: Fix i2s_states_test test suite
1. Update the way test_i2s_state_error_neg test handles
RX overflow.
2. Clean up after test_i2s_state_stopping_neg test in case the
receiving channel is stuck in the STOPPING State if the data
was received prior to calling the STOP trigger.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-04-30 12:02:55 -05:00
Mahesh Mahadevan
06c1020304 tests: i2s: Update i2s_speed test
1. Allow loopback over different I2S ports
2. Add a config option to indicate if the ports
   are separate

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-04-30 12:02:55 -05:00
Mahesh Mahadevan
3df8733276 tests: i2s: Update i2s_api test
1. Provide an option to loopback over separate I2S ports
2. Increase the buffer count in the loopback test to 4
3. Update test_i2s_transfer_rx_overrun test on how to
   handle RX overrun failures

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-04-30 12:02:55 -05:00
Mahesh Mahadevan
d16ced9ae4 MXRT600: Add I2S support
Use flexcomm1 and flexcomm3 for I2S support

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-04-30 12:02:55 -05:00
Mahesh Mahadevan
712317c2e3 drivers: i2s: Add support for I2S driver for LPC devices
This uses the API's provided by the SDK I2S driver.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-04-30 12:02:55 -05:00
Mahesh Mahadevan
5fa4876d2b dts: Add support for I2S driver for LPC devices
Add support for I2S driver for LPC devices

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-04-30 12:02:55 -05:00
Mahesh Mahadevan
b88d8070d7 drivers: dma: Update the LPC DMA driver
1. Update the SDK API's called in the configure implementation.
The DMA_PrepareTransfer and DMA_SubmitTransfer SDK functions
are not recommneded for use. Replaced the call to these SDK
functions with other SDK API's.
2. Fix the implementation the configure function when multiple
blocks are used.
3. Update the dma_reload implementation. The old reload function
would simply abort the transfer. The new implementation reloads
the DMA buffers for transfer.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-04-30 12:02:55 -05:00
Didrik Rokhaug
5045f5772c doc: fix typo in driver documentation
'whice' is replaced with 'which', which makes more sense in the
given context.

Signed-off-by: Didrik Rokhaug <didrik.rokhaug@gmail.com>
2021-04-30 11:23:48 -04:00
Jordan Yates
a0909ac00b linker: stm32f0: move ram vector table to snippets
Move the STM32F0 specific ram vector table sections into a dedicated
linker snippet included by the new `SRAM_VECTOR_TABLE` symbol.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-04-30 15:16:02 +02:00
Jordan Yates
318ee971c5 boards: stm32f0: explicit RAM vector table control
Add a new Kconfig symbol that explicitly controls whether the vector
table should be placed in RAM. This eliminates the side effect of
`IS_BOOTLOADER` controlling vector table location. Making the condition
a positive assertion also allows the config to be used in CMakeLists
conditions (`zephyr_linker_sources_ifdef()`, etc).

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-04-30 15:16:02 +02:00
Jordan Yates
bcca26260b boards: nucleo_l0*: remove invalid options
Remove the `IS_BOOTLOADER` and `BOOTLOADER_SRAM_SIZE` symbols from the
`nucleo_l053r8` and `nucleo_l031k6` boards. The stated reason for
inclusion is to disable the RAM vector table, however this doesn't apply
to the STM32L0 series, only STM32F0.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-04-30 15:16:02 +02:00
Jordan Yates
371a83b9d9 scripts: gen_handles.py: initialize handle.device
Initialize `handle.device` to `None` so that the assert after the
matching has a chance to catch errors. Without this, a failed match will
raise an exception on the line above as it attempts to get a property
that doesn't exist.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-04-30 15:16:02 +02:00
Andrzej Puzdrowski
29c838ed1d fs/nvs: document flash wbs migration capability
Document the fact than NVS image of different wbs
are compatible each other if psychical ATE size
is kept.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2021-04-30 12:27:27 +02:00
Damian Krolik
95121b544a nvs: fix initialization of fs->data_wra on alignment change
When existing records stored in the NVS are not properly
aligned according to the current flash driver requirements,
fs->data_wra may be initialized with an unaligned address.
Fix the initialization code, so that fs->data_wra is rounded
up to the nearest multiple of the current flash driver block
size.

The situation may occur during a firmware upgrade which
introduces a new flash driver or changes its parameters.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2021-04-30 12:27:27 +02:00
Piotr Pryga
9a14f62742 tests: Bluetooth: df: Fix undefinded symbols error
Remove undefined functions (unsued anymore).
Add missing stub implementation for new DF related radio functions.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-04-30 11:07:55 +02:00
Piotr Pryga
c5f8d0adb7 Bluetooth: controller: radio: Add API to configure CTE Rx
Add Radio configuration API that gives possiblity configure
reception and sampling of CTE.
Part of alrady implemented API was re-factored to comply
with new API and do complete initialization of registers:
DFECTRL1 and CTEINLINECONF.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-04-30 11:07:55 +02:00
Jukka Rissanen
6e1df0d603 tests: net: Refactor tests when running in real hw
The network tests were expecting that network interfaces
are in certain order. As we cannot guarantee that, refactor
the tests like this:

* if test is using DUMMY L2 driver, then disable Ethernet L2
  and fetch only DUMMY L2 instead of default interface
* if test is using Ethernet L2 driver, then make sure that the
  test is using the Ethernet interface specified in the test
  instead of the one provided by the DUT

Fixes #34505

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-04-30 11:59:10 +03:00
Daniel Leung
54283efcce x86: mmu: allow page table extra mappings to have cache disabled
This adds the bits to the gen_mmu.py script so that extra mappings
can be added with caching disabled. This is useful for mapping
MMIO regions where caching is not desired.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-29 21:17:24 -04:00
Daniel Leung
0ab8dc4d49 interrupt_controller: loapic: remove duplicate identifier
LOAPIC_TIMER is defined twice with same value, so remove one.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-29 21:09:54 -04:00
Francois Ramu
2493c39ee7 dts: arm: stm32h723 has usart10 in its dts
adding the device node for UART10 in dts/arm/st/h7/stm32h723.dtsi

Signed-off-by: Kshitij Kumar <kshitij9192@gmail.com>
Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-04-29 17:06:01 -05:00
Krishna Mohan Dani
a3e2e3ea7e boards/arm: stm32h747i_disco_m7: Enabling flash support in device tree.
This commit enables flash support for stm32h747i_disco_m7
in device tree. This has been tested with flash sample
application on stm32h747i_disco platform with m7 core.

Flash is shared between two cores (M4 & M7) so the last 1M is
assigned to M4 core. Hence allocating 1M of storage at the
end of first 1M.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-04-29 16:51:45 -05:00
Dino Li
ee39291553 dts: it8xxx2: change flash size to 1M byte
Flash size of IT8xxx2 is 1M byte.

Change-Id: Ic1464b6e36f16291f14024a6fb49acbf3a243176
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2021-04-29 16:47:47 -05:00
Daniel Leung
43f0726985 arm: aarch32: timing: fix potential divide by zero if DWT
There is a possibility that the DWT frequency calculation
is divided by zero. So this fixes the issue by repeatedly
trying to get the delta clock cycles and delta DWT cycles
until they both are not zero.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-29 16:49:17 -04:00
Daniel Leung
d6cbdace78 x86: timing: fix potential divide by zero
There is a possibility that the TSC frequency calculation
is divided by zero. So this fixes the issue by repeatedly
trying to get the delta clock cycles and delta TSC cycles
until they both are not zero.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-29 16:49:17 -04:00
Armando Visconti
08c750a397 boards: stm32: nucleo_f4*1re: Configure clocks using dt
Configure clock for the f401re/f411re nucleo boards using device tree.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-04-29 15:46:21 -04:00
Jukka Rissanen
d367fc73c5 tests: net: igmp: Remove device_pm_control_nop
The use of device_pm_control_nop is deprecated so remove it
from the test as it will give warning in CI.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-04-29 14:23:11 -04:00
Erwan Gouriou
5d2909654f dts/arm: st: Add clocks node on stm32wl series
Add clocks on stm32wl.dtsi.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
4978e2032f dts/bindings: clocks: Add stm32wl-rcc and fix stm32wb-pll-clock
Add binding fro stm32wl-rcc.yaml that derivates from stm32wb-rcc.
Additionally update stm32wb-pll-clock.yaml to be used as well
for stm32wl series and add missing div-m property.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
255c64bb94 include/drivers: clock_control: Add support for STM32WL bindings
Add support for STM32WL clocks bindings.

Additionally fix a spot where STM32WB was missing.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
24969e8ab2 include/drivers: clock_control: Minor clean up on stm32 header
Reorder few lines for better readability.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
b095d6ce76 boards: nucleo_f746zg: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
f1cc613ac7 dts/arm: stm32: Add clocks nodes for STM2F7 series
Nodes are provided disabled.
Selection should be done at board level.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
bc4567e2fe dts/bindings/clock: Add bindings for STM32F7
Add F7 clocks bindings.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
8949f9b607 include/drivers: clock_control: Add support for STM32F7 bindings
Add support for STM32F7 clocks bindings.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
7b55d07a2d boards: nucleo_l053r8: Move clock config to DT
Use DT to configure board clocks

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
391cd36e70 drivers/clock_control: stm32 l0/l1: Update for DT based configuration
Add required changes to support DT based configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
0943d6b517 dts/arm: stm32: Add clocks nodes on L0 and L1
Nodes are provided disabled.
Selection should be done at board level.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
5396f154da dts/bindings/clock: Add bindings for L0/L1
Add L0 clocks bindings valid for L0 and L1 based socs.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
276bcd724e include/drivers: clock_control: Add support for STM32L0 bindings
Add support for STM32L0 clocks bindings.

Also, add a small tweak to SYSCLK selection to factorize some lines.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
e69492abe9 dts/arm: stm32: Add clocks nodes for STM2F2 series
Nodes are provided disabled.
Selection should be done at board level.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
c71bf36266 dts/bindings/clock: Add bindings for STM32F2
Add F2 clocks bindings.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
68a29fc26d include/drivers: clock_control: Add support for STM32F2 bindings
Add support for STM32F2 clocks bindings.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
367c06252d boards: nucleo_l552ze_q: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
01337645d9 dts/arm/st: l5: Add clocks node to stm32l5.dtsi
Add clocks node and clocks to stm32l5 series.
PLL binding is reused from stm32l4 series.
Matching binding is updated to document that.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
67dff334e9 boards: nucleo: Convert 4 boards to dts based clocks configuration
Convert following boards to dts based clocks configuration:
- nucleo_f070rb
- nucleo_f334r8
- nucleo_g071rb
- nucleo_g431rb

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
e8a465a446 dts/arm: st: Add clocks nodes for F0/F3/G0/G4
Add clocks nodes for F0/F3/G0/G4 series.

For F0 and G0 series, update compatible for rcc node
to specify use of dedicated "st,stm32f0-rcc" compatible.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
068589db2d dts/bindings: clocks: Add bindings for F0/F3/G0/G4
Add bindings for F0/F3/G0/G4 clocks.

Introduce new rcc binding "st,stm32f0-rcc" binding
that describes RCC hardware blocks that don't have
"apb2-prescaler".
This binding also applies to G0.

Binding "st,stm32f0-pll-clock" is used for both F0
and F3 series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
0710aa69c3 include/drivers/clock_control: stm32: Update for F0/F3/G0/G4 support
Update macros for STM32F0/F3/G0/G4 clock configuration.
Additionally update matching drivers.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
2578f3afc9 boards: nucleo_f103rb: Convert to dt based clocks configuration
Configure clocks for nucleo_f103rb using device tree.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
fe8c339080 dts/arm/st: f1: Add clocks nodes
Add clocks nodes for stm32f1*.dtsi

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00