Commit graph

50892 commits

Author SHA1 Message Date
Kumar Gala
bee58ceec2 boards: arm: frdm_k82f: Add pinctrl dts properties
Add pinctrl-0 properties for configuration of peripherals like LPUART,
SPI, I2C, ADC, etc.  These settings are based on what is defined in
the board/pinmux.c file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-14 09:06:36 -05:00
Kumar Gala
a45c60f25a boards: arm: ip_k66f: Add pinctrl dts properties
Add pinctrl-0 properties for configuration of peripherals like UARTs,
SPI, ENET, etc.  These settings are based on what is defined in
the board/pinmux.c file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-14 09:06:36 -05:00
Kumar Gala
84492677c0 boards: arm: twr_kv58f220m: Add pinctrl dts properties
Add pinctrl-0 properties for configuration of peripherals like UARTs,
I2C, SPI, FTMs, etc.  These settings are based on what is defined in
the board/pinmux.c file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-14 09:06:36 -05:00
Kumar Gala
3227c2a941 boards: arm: usb_kw24d512: Add pinctrl dts property for UART
Add pinctrl-0 properties for configuration of peripherals UART.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-14 09:06:36 -05:00
Kumar Gala
efb8a9ad04 boards: arm: hexiwear_k64: Add pinctrl dts properties
Add pinctrl-0 properties for configuration of peripherals like UARTs,
I2C, SPI, FTMs, etc.  These settings are based on what is defined in
the board/pinmux.c file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-14 09:06:36 -05:00
Kumar Gala
dcb2211fc1 boards: arm: frdm_k22f: Add pinctrl dts properties
Add pinctrl-0 properties for configuration of peripherals like UARTs,
I2C, SPI, FTMs, etc.  These settings are based on what is defined in
the board/pinmux.c file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-14 09:06:36 -05:00
Kumar Gala
9901871736 boards: arm: frdm_k64f: Add pinctrl dts properties
Add pinctrl-0 properties for configuration of peripherals like UARTs,
I2C, SPI, FTMs, etc.  These settings are based on what is defined in
the board/pinmux.c file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-14 09:06:36 -05:00
Kumar Gala
e9c69f9000 boards: arm: hexiwear_kw40z: Add pinctrl dts properties
Add pinctrl-0 properties for configuration of peripherals like UART,
ADC, etc.  These settings are based on what is defined in
the board/pinmux.c file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-14 09:06:36 -05:00
Kumar Gala
e7487e9657 west.yml: update NXP HAL for MKW40Z pin dtsi data
Update NXP HAL repo to pull in MKW40Z dtsi pin data file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-14 09:06:36 -05:00
Jennifer Williams
b003c971f6 soc: arm: cypress: fix soc_gpio missing final else in construct
The final else was missing in the if ... else if ... construct.
This commit adds a non-empty else {} to comply with coding
guideline 15.7.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-04-14 09:20:20 -04:00
Jennifer Williams
efc78b5b46 lib: os: fix heap_print_info missing final else in construct
The if ... else if ... construct was missing the final else.
This commit refactors it to comply with coding guideline 15.7.
The logic is to check if used or free, and do not increment
for the reserved chunks (first/last) in the heap.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-04-14 09:20:20 -04:00
Peter Bigot
188cb2cb7c net: Conversion of k_work API
Replace all existing deprecated API with the recommended alternative.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-04-14 07:07:40 -04:00
Peter Bigot
4f6a365f4f drivers: console: mux: Conversion of k_work API
Replace all existing deprecated API with the recommended alternative
for gsm_mux and uart_mux drivers.

Fixes #34103

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-04-14 07:07:40 -04:00
Peter Bigot
cc090726e6 drivers: modem: rote conversion of k_work API
Replace all existing deprecated API with the recommended alternative.

Be aware that this does not address architectural errors in the use
of the work API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-04-14 07:07:40 -04:00
Peter Bigot
9fcd75160e drivers: wifi: rote conversion of k_work API
Replace all existing deprecated API with the recommended alternative.

Be aware that this does not address architectural errors in the use
of the work API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-04-14 07:07:40 -04:00
Peter Bigot
74f776c29c drivers: ieee802154: rote conversion of k_work API
Replace all existing deprecated API with the recommended alternative.

Be aware that this does not address architectural errors in the use
of the work API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-04-14 07:07:40 -04:00
Peter Bigot
659fe50ff0 drivers: ethernet: rote conversion of k_work API
Replace all existing deprecated API with the recommended alternative.

Be aware that this does not address architectural errors in the use
of the work API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-04-14 07:07:40 -04:00
Detlev Zundel
f1f5f607b2 scripts: size_report: Add a depth parameter to CMakeLists.txt
The parameter can be used to limit the ram and rom reports to a
certain depth.  The resulting graphs with depths of e.g. 3 or 4 are
visually easier to grasp.

Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
2021-04-14 07:05:58 -04:00
Detlev Zundel
e5f33bd740 scripts: size_report: Add handling of depth argument
The script already accepts a depth parameter to configure the output,
but that parameter was not used at all.  This commit adds the correct
handling by passing it to anytrees RenderTree iterator.

Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
2021-04-14 07:05:58 -04:00
Mark Wang
b6217e1bec Bluetooth: hci: add HCI_Write_Class_Of_Device
add the op code and the parameter structure.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2021-04-14 12:58:57 +03:00
Kumar Gala
b532d2917b boards: arm: frdm_kw41z: Remove testing PWM pins
The TPM1/2 pin settings aren't used by any drivers or other devices and
only existed for testing purposes.  Remove them since nothing in tree
is utilizing these settings.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-13 20:24:21 -05:00
Kumar Gala
ceca603c98 boards: arm: frdm_kw41z: Fix pwm/tpm pin settings
The nodelabel for the PWM controller on KW41Z is TPM[0..n], so we need
to change the logic in the ifdef to get the pins setup.

Additionally the setup of PORTA0/1 and PORTB16/17 pins for TPM only
exists on kPORT_MuxAlt5.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-13 20:24:21 -05:00
Kumar Gala
f210957b7f boards: frdm_k22f: Remove setting PTC11 as GPIO for SPI0
There's no obvious reason that PTC11 should be as a GPIO pin when SPI0
is being utilized.  As such remove this pin setting.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-13 20:04:07 -05:00
Kumar Gala
e62e4f766e boards: frdm_k22f: Fix SPI CS pinmux setting
The chipselect is wired to PTC4 and is SPI0_PCS0.  Fix pinmux.c and
board docs to correctly reflect this.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-13 20:04:07 -05:00
Jose Alberto Meza
11cb2e5ec6 samples: drivers: espi: Ensure sample code thread exits
Fix #32457 by decreasing iterations on failure too.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2021-04-13 18:29:35 -04:00
Jose Alberto Meza
74d55c6b5e drivers: espi: xec: Reduce buffer allocation to minimum required
Update eSPI buffer to values required per eSPI specification.
Allow applications to override as needed.
Guarantee buffers are not allocated at all if channels are
disabled.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2021-04-13 18:29:35 -04:00
Anas Nashif
d881d7227f actions: limit issue tracker to main project
Run this action only on the main zephyr tree. Do not run in forks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-13 17:39:39 -04:00
Anas Nashif
70dc6b40ff ci: pylint: relax similar lines rule
We are getting hits on similar imports in different files, relax that.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-13 16:33:18 -05:00
Luiz Augusto von Dentz
6017506bcc Bluetooth: ATT: Add documentation for chan_send
chan_send does restore buffer state in case of an error which is
different than how bt_l2cap_send_cb works as it does always unref in
case of an error.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2021-04-13 16:21:25 -04:00
Luiz Augusto von Dentz
9d2d1a208a Bluetooth: ATT: Fix crash if bt_l2cap_send_cb fails
This fixes a regression introduced by
10841b9a14 as it did remove a call to
net_buf_ref which was used not only to keep a reference for resending
but also to prevent bt_l2cap_send_cb to unref the buffer in case it
fails.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2021-04-13 16:21:25 -04:00
Pawel Dunaj
1caf5fd21e drivers: led_pwm: Handle power state changes
Suspend/resume PMW device when PWM LEDs are suspended/resumed.

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
2021-04-13 16:21:07 -04:00
Alberto Escolar Piedras
8d348f0076 tests: log_core be explicit about configuration
The log_core tests assume the logger is configured in
LOG_MODE_DEFERRED, so let's set it explicitly in the test
prj.conf instead of relaying on defaults.

+ fix a typo in test

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2021-04-13 15:13:19 -04:00
Jiafei Pan
8499b7962d board: arm64: add SMP support for NXP ls1046a RDB board
Enable SMP on ls1046a RDB board with new board name
"nxp_ls1046ardb_smp".

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2021-04-13 15:09:23 -04:00
Jiafei Pan
46d7de1aad interrupt_controller: gic: add SMP support
Add the function to raise SGI, and initialize GICC for secondary
Cores.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2021-04-13 15:09:23 -04:00
Jiafei Pan
dd56080d9b interrupt_controller: gic: fix some macro definition
Add parenthesis for the parameters to avoid the issues if
parameter is an expression but not an immediate value.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2021-04-13 15:09:23 -04:00
Henrik Brix Andersen
e8ffafae12 drivers: intc: shared_irq: remove internal structs from header
Move the internal structs used by the generic, shared interrupt driver
from the public header file into the implementation file.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-04-13 13:03:33 -04:00
Vinayak Kariappa Chettimada
94cd9dd207 Bluetooth: controller: Remove unused code in auxiliary advertising
Remove unused early prototyping code experimenting with
piggyback of auxiliary PDUs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-04-13 13:02:35 -04:00
Morten Priess
07278fc98f Bluetooth: controller: Guard against race in conn. establishment
In the time between a NODE_RX_TYPE_CONNECTION node is sent from LLL and
demuxed in ULL, an ADV role disable may be executed.
This makes the LLL data referenced in the node NULL/invald, and
ull_conn_setup would operate on invalid data.

This commit introduces a check in ADV disable to disallow the operation
(including conn invalidation), if a connection has been initiated.

To prevent pipeline-queued prepares from advertising after disable has
been initiated, set 'cancelled' flag for immediate signalling to LLL.

Signed-off-by: Morten Priess <mtpr@oticon.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-04-13 13:02:35 -04:00
Tim Lin
cd96046bee ite: drivers/adc: add adc drivers on it8xxx2_evb platform
This commit is about the it8xxx2 analog to digital converter
driver. Support 8 channels ch0~ch7 and 10-bit resolution.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-04-13 13:01:56 -04:00
Ioannis Glaropoulos
a9257bf8c9 doc: releases: add release note entry for TF-M update
Add an entry in the release notes for 2.6, indicating
that TF-M is updated to v1.3.0 release.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-13 13:01:21 -04:00
Ioannis Glaropoulos
bf41373bf1 trusted-firmware-m: update to upstream release v.1.3.0
Update TF-M module to the upstream release v1.3.0.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-13 13:01:21 -04:00
Paul Sokolovsky
471afe5ddc net: sockets: Make NET_SOCKETS_POSIX_NAMES be on by default
Zephyr socket subsystem has come a long way since initial experimental
alternative to internal Zephyr networking API. Its configuration also
mirrors the usual conservative approach, where a user needs to
explicitly enable options to get "more" features. And as an
experimental API, socket subsystem was initially developed as
namespaced API, where all functions/structures are prefixed with
"zsock_", and to get standard names, CONFIG_NET_SOCKETS_POSIX_NAMES
needs to be set (or alternatively, CONFIG_POSIX_API needs to be, which
enabled full POSIX subsys overall).

However, a few years later, sockets are the standard networking API,
and in majority of cases its used under the standard POSIX names.
Necessity to explicitly set an option to achieve this effects, and
confusion which results from it - are just unneeded chores for users.

So, switch CONFIG_NET_SOCKETS_POSIX_NAMES to be on by default (unless
CONFIG_POSIX_API is already defined). It still can be explicitly
disabled if needed (but usecases for that would be peculiar and rare).

Addresses #34165

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2021-04-13 13:00:53 -04:00
Yong Cong Sin
f40cd8b718 drivers/i2c: Reset i2c of STM32F1 series to enter master mode properly
Reset the I2C of the STM32F1 series to enter master mode properly.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-04-13 13:00:36 -04:00
Mulin Chao
c22df17be3 dts: npcx: Fixed the name of nodes in vw, miwu-wui, and miwu-int files.
Fixed the name of nodes in in espi-vw, miwu-wui, and miwu-int
device-tree node. This CL fixed missing nodes in CL d3a94fa8ab.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-04-13 13:00:19 -04:00
Mulin Chao
87087f5709 dts: npcx: arrange default priority of interrupts for ec application.
The following is the interrupt priority plan for ec application.

The original IRQ priority map in Chromium EC is:
- IRQ priority 0:
|-ITIM IRQ for Warning watchdog.

-IRQ priority 1:
|-UART IRQ for signle byte FIFO in npcx5 series.
  (Ignore it since UART has 16 bytes FIFO in npcx7 and later series.)

-IRQ priority 2:
|-SHI IRQ for FIFO FULL and Half FULL event.
|-MIWU IRQ for SHI CS. (Wake-Up ASAP for handling data from SPI bus.)

-IRQ priority 3:
|-All MIWU IRQs for GPIO, MTC and eSPI VW events.
|-ITIM IRQ for task scheduling.
|-ITIM IRQ for time-out.
  (No need in Zephyr since 64-bit timer support.)

IRQ priority 4:
|-All UART FIFO IRQs
|-All I2C controller IRQs
|-ADC IRQ for conversion event.
|-ESPI IRQ for generic eSPI bus events.
|-Host KBC IBF/OBE IRQs
|-Host PM IBF/OBE IRQs
|-Host port80 IRQ
|-PECI IRQ

IRQ priority 5:
|-Keyboard RAW IRQ
|-PS2 IRQ

Then, this CL arranges the priority of npcx interrupts in Zephyr as:
IRQ priority 0:
|-Reserved it for further requirements.

IRQ priority 1:
|-SHI IRQ for FIFO FULL and Half FULL event.
| (Will modify it in ec repo.)
|-MIWU IRQ for SHI CS (Will modify it in ec repo.)

IRQ priority 2:
|-MIWU IRQ for GPIO, MTC, T0 timer and eSPI VW events.
|-ITIM IRQ for task scheduling.

IRQ priority 3:
|-All UART FIFO IRQs
|-All I2C controller IRQs
|-ADC IRQ for conversion event.
|-ESPI IRQ for generic eSPI bus events.
|-Host KBC IBF/OBE IRQs
|-Host PM IBF/OBE IRQs
|-Host port80 IRQ

IRQ priority 4:
|-Keyboard RAW IRQ. (Will modify it in ec repo.)

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-04-13 13:00:19 -04:00
Jeremy Bettis
757cd12e66 dts: Add description of reg
For i2c-devices, reg is the address. This took me way to long to
discover and I wanted to leave a breadcrumb for the next Zephyr newbie.

Signed-off-by: Jeremy Bettis <jbettis@chromium.org>
2021-04-13 10:32:52 -05:00
Henry Wang
35f52fd31a sample: mpu: skip the MPU test for Armv8-R AArch64
The functionality of the MPU depends on userspace, which has not
been implemented on AArch64. Therefore we skip that case for now.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
2021-04-13 07:47:44 -04:00
Jaxson Han
985b03340d board: arm64: Add FVP BaseR AEMv8R board
Add essential files to create a new board. Enable arch timer, uart,
multi-threading. Set memory map for flash and sram. The new board name
is fvp_baser_aemv8r with the fvp_aemv8r_aarch64 soc.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2021-04-13 07:47:44 -04:00
Henry Wang
7d88c3b79d tests: Add missing timestamp_serialize() for Armv8-R aarch64
This commit fixes the build error: "error implementation of
timestamp_serialize() not provided for your CPU target" for
fvp_baser_aemv8r tests.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
2021-04-13 07:47:44 -04:00
Jaxson Han
f249544f48 arch: arm64: Add MPU drivers to the build system
When ARM_MPU is defined, the MPU drivers will be built into the final
zephyr target.

Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2021-04-13 07:47:44 -04:00