Commit graph

51573 commits

Author SHA1 Message Date
Erwan Gouriou
28c3cfacfe dts/bindings: clocks: Add clocks bindings for stm32h7 series
Add clocks related stm32h7 specific bindings:
- stm32h7-hsi-clock
- stm32h7-pll-clock
- stm32h7-rcc

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-03 10:56:05 +02:00
Joakim Andersson
de60823d9a Bluetooth: tester: fix bt_le_oob_set_legacy_tk excluded when supported
Fix bt_le_oob_set_legacy_tk excluded when Legacy OOB pairing is
supported. We still support legacy OOB when
CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is not defined.
It is only when we disable Legacy pairing that it is not included.

Check that the OOB data type is in fact Legacy OOB before calling
bt_le_oob_set_legacy_tk.

Log an error if the OOB type was not handled by the callback.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-03 10:00:44 +02:00
Aurelien Jarno
b61c23943c usb: netusb: rndis: fix a typo
asemble => assemble

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2021-05-01 14:17:39 -04:00
Anas Nashif
6eb5063ddc ci: add coding guideline workflow
Use coccinelle rules to detect coding guideline violations on submitted
code.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-30 22:09:43 -04:00
Anas Nashif
184b786fe2 coccinelle: check reserved symbols based on a file
Use a file with reserved symbols instead of checking against a fixed
list of strings.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-30 22:09:43 -04:00
Sylvio Alves
180e61a32e west.yml: esp32: update hal to support bluetooth
Bring hal updates to add bluetooth support

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-04-30 16:51:30 -04:00
Sylvio Alves
a3c35c93ff driver: esp32: add bluetooth support
Add support to BLE and BR/EDR feature.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-04-30 16:51:30 -04:00
Sylvio Alves
6ae038ca27 esp32: linker clean up to support BT
BT support requires lots of PROVIDE calls that  cannot
be added into this linker file. All necessary includes
were moved into hal module to proper handled as needed.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-04-30 16:51:30 -04:00
Anas Nashif
6df4405cca doc: fix typos
Fix various typos in the docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-30 16:03:08 -04:00
Peter Bigot
5189f804a4 drivers: flash: spi_nor: unconditionally provide config pointer
Information about which block protect bits are set on power-up is not
inferable from SFDP content, so we need the devicetree config pointer
to get the has-lock property value even when SFDP data is read at
runtime.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-04-30 13:10:23 -05:00
Jordan Yates
e7368e1940 samples: lorawan: class_a: downlink cb
Add an example downlink callback to the LoRaWAN sample.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-04-30 13:05:10 -05:00
Jordan Yates
bbd53dcde0 lorawan: port oriented downlink callbacks
Add downlink callbacks on a per-port basis. A single message will be
handled as many times as users have registered matching ports. Callbacks
will also be run on "meta" downlink packets on port 0, such as confirmed
uplink acknowledgements.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-04-30 13:05:10 -05:00
Jordan Yates
6e9500852a lorawan: minor formatting fixes
Fix a typo, remove a stray semicolon, convert a tab to a space.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-04-30 13:05:10 -05:00
Lukasz Maciejonczyk
083465b793 samples: openthread: Add test configuration for coprocessor sample
Coprocessor sample was lacked of test configuration which makes
buildkite/zephyr to fail. This commit fixes it by providing test
configuration for this sample.

Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
2021-04-30 12:58:31 -05:00
Lukasz Maciejonczyk
4500862af1 net: openthread: Init NCP after USB communication is established
The device has sent RESET_POWER_UP message before the communication
with the host hadn't been established. It could be observed with
pyspinel which displayed `Framing error`.

This commit fixes the bug by initializing NCP after the host stated
is ready to communicate.

This commit reverts initialization the USB stack into function
otPlatUartEnable to be consistent with others OpenThread platforms.
OpenThread co-processor samples are not affected by #27071 as they use
USB for SPINEL communication with host and not for UART console.

Note:
When co-processor communicates by USB CDC ACM and it is hard reset
(what is happening in current Zephyr OpenThread platform)
the connection needs to be properly handled by the host.

For posix platform used together with RCP it was implemented in:
https://github.com/openthread/openthread/pull/6454

and for NCP:
https://github.com/openthread/wpantund/pull/492 .

Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
2021-04-30 12:58:31 -05:00
Robert Lubos
39aee39cf9 net: openthread: Align with the new NCP API
OpenThread modified its NCP API, so we need to align with these changes
in Zephyr.

One of the major changes was removal of UART from the platform APIs.
`openthread/platform/uart.h` header file was moved to
`examples/platforms/util/uart.h` so we need to use the new location in
Zephyr. This means that OpenThread no longer impose the UART API but for
the simplicity of the upmerge I've kept the UART APIs as they are for
now.

The NCP initialization function have now to register a send handler,
and the appropriate transport driver have to call NCP callbacks when
transmission/reception is done. For now, re-use the existing code of
the UART driver, just as the upstream NCP application does.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-04-30 12:55:02 -05:00
Robert Lubos
c2ad0dff72 net: openthread: Use OT mutex in OT shell
Use OpenThread mutex in order to protect OT CLI API call instead of
halting the OpenThread thread.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-04-30 12:55:02 -05:00
Robert Lubos
983ee8b088 net: openthread: Align with the new CLI API
The OpenThread CLI API has changed therefore it's needed to align
OpenThread Shell implementation in Zephyr with these changes.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-04-30 12:55:02 -05:00
Robert Lubos
7ca3ccdd0d net: openthread: Introduce new OpenThread options
Introduce new OpenThread configuration options from the upmerge.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-04-30 12:55:02 -05:00
Robert Lubos
10a2687afe manifest: Update OpenThread revision
Update OpenThread revision with the latest version from the upmerge.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-04-30 12:55:02 -05:00
Alexandre Bourdiol
59a8081096 boards: sensortile_box: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-30 12:50:30 -05:00
Alexandre Bourdiol
a8da0b97a6 boards: stm32l496g_disco: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-30 12:50:30 -05:00
Alexandre Bourdiol
de78df9656 boards: stm32l476g_disco: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-30 12:50:30 -05:00
Alexandre Bourdiol
6cbeabc8a4 boards: nucleo_l496zg: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-30 12:50:30 -05:00
Alexandre Bourdiol
18de8457cf boards: nucleo_l452re: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-30 12:50:30 -05:00
Alexandre Bourdiol
2cfae94a86 boards: nucleo_l433rc_p: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-30 12:50:30 -05:00
Alexandre Bourdiol
3fc675e9dd boards: nucleo_l432kc: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-30 12:50:30 -05:00
Alexandre Bourdiol
4c7585e693 boards: nucleo_l412rb_p: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-30 12:50:30 -05:00
Alexandre Bourdiol
19e7e85cef boards: nucleo_l4r5zi: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-30 12:50:30 -05:00
Alexandre Bourdiol
3a6af0635e boards: b_l072z_lrwan1: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-30 12:42:42 -05:00
Alexandre Bourdiol
26ae8679cc boards: dragino_lsn50: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-30 12:42:42 -05:00
Alexandre Bourdiol
11c386fb3e boards: nucleo_l011k4: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-30 12:42:42 -05:00
Alexandre Bourdiol
d870374b5c boards: ronoth_lodev: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-30 12:42:42 -05:00
Alexandre Bourdiol
976c9a1f78 boards: 96b_wistrio: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-30 12:41:30 -05:00
Alexandre Bourdiol
61b6e2cc23 boards: stm32l1_disco: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-04-30 12:41:30 -05:00
Kalyan Sriram
cf6a7f3ca6 codeowners: add code owner for blackpill_f401ce, blackpill_f411ce
Add @coderkalyan (Kalyan Sriram <coder.kalyan@gmail.com>) as code owner
for blackpill_f401ce, blackpill_f411ce boards.

Signed-off-by: Kalyan Sriram <kalyan@coderkalyan.com>
2021-04-30 12:40:24 -05:00
Kalyan Sriram
7c43ac403b boards: stm32: blackpill_f411ce: configure clocks using dt
Migrate clock configuration for blackpill_f411ce board
from Kconfig to device tree.

Additionally, enable LSE crystal configuration for blackpill_f411ce.

Signed-off-by: Kalyan Sriram <kalyan@coderkalyan.com>
2021-04-30 12:40:24 -05:00
Kalyan Sriram
47961481ee boards: stm32: blackpill_f401ce: configure clocks using dt
Migrate clock configuration for blackpill_f401ce board
from Kconfig to device tree.

Additionally, enable LSE crystal configuration for blackpill_f401ce.

Signed-off-by: Kalyan Sriram <kalyan@coderkalyan.com>
2021-04-30 12:40:24 -05:00
Mulin Chao
0d50628af9 driver: gpio: npcx: force io type as open-drain if select to 1p8v.
During configuring the low-voltage power supply of IO pads, the npcx
GPIO driver needs to set the related PORTx_OUT_TYPE bit to 1, i.e.
select to 'Open Drain IO type', also. This CL provides a mechanism that
configuring these bits via 'def-lvol-io-list' node automatically in case
the flag of gpios that have been configured to low-voltage power supply
doesn't contain GPIO_OPEN_DRAIN.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-04-30 12:38:59 -05:00
Mahesh Mahadevan
478822f74c drivers: i2s: Do not support 8-bit word size in LPC I2S driver
The memory block passed by the user to the i2s_write function is
tightly packed next to each other.
However for 8-bit word_size the I2S hardware expects the data
to be in 2bytes which does not match what is passed by the user.
This will be addressed in a separate PR once the zephyr API committee
finalizes on an I2S API for the user to probe hardware variations.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-04-30 12:02:55 -05:00
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