Commit Graph

67235 Commits

Author SHA1 Message Date
Anas Nashif 3133666c9a kconfig: guard grove lcd logging macros
Logging kconfig options for this lcd should appear when the hardware is
enabled.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-20 18:28:43 +02:00
Anas Nashif 7d799fdff0 kconfig: guard MPU logging macros
MPU logging Kconfigs should only appear when MPU is enabled.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-20 18:28:43 +02:00
Fabio Baltieri a5dfd6bd64 ci: doc-build: bump timeout up to 45m
Give documentation a bit more time to build, seems like we are hitting
the current 30 minutes limit.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-07-20 09:41:32 -05:00
Fabio Baltieri 56ab3a74e4 doc: drop few reference of -s west build flag
This has been removed in:

b710177a27 west: commands: build: Specify source dir without a flag

and hidden from the help, drop it from the documents to avoid confusion.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-07-20 09:41:32 -05:00
Fabio Baltieri 43e0a4678f boards: litex_vexriscv: fix duplicate doc title
The document title is repeated for some reason, causing it to be listed
twice in the board list. Drop one of the instances.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-07-20 09:41:32 -05:00
Fabio Baltieri dd24c61a4a samples: fix shell_module Kconfig menu name
Shell sample has the wrong mainmenu name, rename it one that makes
sense.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-07-20 09:41:32 -05:00
Kumar Gala 37b16e62ab tests: i2c: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from tests.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-20 09:31:17 -05:00
Daniel DeGrasse cb3d1313e5 drivers: lpuart: prevent spurious transmission complete interrupts
Correct issue where transmission complete interrupt was not disabled when
using interrupt driven serial API with power management enabled,
resulting in continuous spurious interrupts that effectively locked
the system.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-07-20 09:29:38 -05:00
Kumar Gala 60d3d49405 samples: boards: arc_secure_services: Remove empty prj.conf
We get the following error message from twister:

ERROR   - samples/boards/arc_secure_services/prj.conf:
          can't find: cannot mmap an empty file

Fix by removing the empty file.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-20 09:29:11 -05:00
Simon Hein b5522fffbc arch: comply to coding guidelines MISRA C:2012 Rule 14.4
MISRA C:2012 Rule 14.4 (The controlling expression of an if statement
and the controlling expression of an iteration-statement shall have
essentially Boolean type.)

Use `do { ... } while (false)' instead of `do { ... } while (0)'.
Use comparisons with zero instead of implicitly testing integers.
Use comparisons with NULL instead of implicitly testing pointers.
Use comparisons with NUL instead of implicitly testing plain chars.

This commit is a subset of the original auditable-branch commit:
5d02614e34

Signed-off-by: Simon Hein <SHein@baumer.com>
2022-07-20 09:28:38 -05:00
Evgeniy Paltsev 1bc2cb7fd7 ARC: fix SMP race in ASM ARC interrupt handling code
In interrupt chandler code we don't save full current task context
on stack (we don't save callee regs) before z_get_next_switch_handle()
call, but we passing _current to it, so z_get_next_switch_handle
saves current task to switch_handle, which means that this CPU
current task can be picked by other CPU before we fully store it
context on this CPU.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2022-07-20 09:26:24 -05:00
Kumar Gala b2f10ce0d0 dts: arc: Remove label property from devicetrees
Label properties are not required.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-20 09:23:45 -05:00
Nikodem Kastelik 295e0e35b9 manifest: Update hal_nordic revision to use nrfx 2.9.0
Pull in new nrfx version that integrates MDK 8.47.0

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2022-07-20 14:07:29 +00:00
Pieter De Gendt d01934f9e9 drivers: sensor: bq274xx: convert lazy load Kconfig option to dts property
This change allows per-instance configuration of lazy loading and
fixes build issue.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-07-20 08:39:45 -05:00
Kumar Gala 16eb5a026f tests: counter: counter_basic_api: Rework test to use struct device
Move to pass 'struct device *' instead of a 'char *'.  This lets us move
from device_get_binding to DEVICE_DT_GET.

Reworked get_counter_period_us() to not be name based, but instead
we keep a list of devices that need a different period value to check
against.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-20 08:32:04 -05:00
Kumar Gala d8dca94144 tests: counter_basic_api: refactor period handling
We do the same check for determining the period in a number of the
tests.  Refactor that code into get_counter_period_us().

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-20 08:32:04 -05:00
Kumar Gala 50cf6ca826 tests: led_api: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-20 10:07:17 +00:00
Reto Schneider 75ea632ba1 fs: fcb: Define length padding bytes
Before this, on flashes with a write alignment greater than one, the
padding bytes had no defined value.

The effect of this non-deterministic code made it hard(er) to verify
data written by FCB.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-07-20 11:09:29 +02:00
Ahmed Moheb e22d5bcb59 bluetooth: Fix bt_buf_get_rx() documentation
Edit the 'type' parameter description that describes the
allowed input values in order to match the implementation

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-07-20 11:09:16 +02:00
Tim Lin d7ccea6357 ITE: drivers/i2c: Add command queue mode not allowed condition
If the transaction of write or read is divided into two transfers
(not two messages), the command queue mode does not support.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-07-20 11:08:56 +02:00
Thomas Stranger 0cb7a1edcd samples/drivers/dac: add overlay file for nucleo_u575zi_q
Add overlayfile for the dac sample to use dac1_out1 on pa4.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-20 11:08:42 +02:00
Thomas Stranger 9a6ba3f6bc tests/drivers/spi/spi_loopback: add overlay for nucleo_u575zi_q
SYSCLK frequency is 160MHz therefore w/o overlayfile the
slow frequency can only be reached with the divider added
by this commit in the overlay.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-20 11:08:42 +02:00
Thomas Stranger 570ce2410e boards: nucleo_u575zi_q enable additional peripheral nodes
This commit enables additional nodes and specifies pinctrl for:
lpuart1, usart2, i2c1, i2c2, spi1, dac1, and iwdg

- nodes added in board dts file.
- nodes are also added to docs in alphabethical order.
- additionally arduino_spi, arduino_i2c, and arduino_serial
  node labels are added.
- enable support for these peripherals in the board.yaml file.

noteworthy:
- the slected spi1 nss pin does not mach the arduino header,
  because the pin connected does not support hardware nss.
  pa4 is chosen instead.
- For the dac the pin pa4 is chosen because the there are only two
  potential pins, and it seems preferable to have a conflict with
  SPI1_NSS(pa4) than with SPI1_SCK(pa5).

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-20 11:08:42 +02:00
Thomas Stranger 0ce1d4b091 boards: nucleo_u575zi_q add pyocd and jlink support
This commit adds jlink and pyocd as debuggers to the
nucleo_u575zi_q.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-20 11:08:42 +02:00
Aleksander Wasaznik 58c5e32e08 Bluetooth: Host: Disable host-based RPA resolution when !BT_PRIVACY
Change doc of CONFIG_BT_PRIVACY to explicitly say it's needed for both
generating and resolving RPAs.

Disable host-based RPA resolution in `bt_conn_le_create` when
!CONFIG_BT_PRIVACY.

Update doc of `bt_conn_le_create` to document that CONFIG_BT_PRIVACY is
a requirement for resolving RPAs. Also explictly say that this function
will resolve private identities. Also explain the expected effect of
Network Privacy on this function.

Reduce coupling to `bt_le_create_conn_ext` and
`bt_le_create_conn_legacy` in `bt_conn_le_create` by just use
`resp_addr` when it's set, instead of "knowing" when it had been set.
The alternative would be to also update `bt_le_create_conn_ext` and
`bt_le_create_conn_legacy` to have `(IS_ENABLED(CONFIG_BT_PRIVACY) &&
(!bt_dev.le.rl_size || bt_dev.le.rl_entries > bt_dev.le.rl_size))`

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2022-07-20 10:48:09 +02:00
Aleksander Wasaznik 2b68a7d391 Bluetooth: Host: Make function static
`bt_le_create_conn_legacy` is not used outside its file.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2022-07-20 10:48:09 +02:00
Stephanos Ioannidis 8ca122a572 MAINTAINERS: Add stephanosio as MAINTAINERS file collaborator
This commit adds @stephanosio as a collaborator for the MAINTAINERS
file area so that he is automatically notified of any changes to the
maintainer and collaborator list and can update the GitHub permissions
accordingly.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-07-20 01:15:17 -05:00
Kumar Gala dcfcd05ed3 tracing: Move to DTS for uart device
Move from using Kconfig TRACING_BACKEND_UART_NAME to a devicetree
chosen property ("zephyr,tracing-uart").  This is similar to a number
of other functions like "zephyr,shell-uart" or "zephyr,bt-uart".

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 16:00:47 -07:00
Benjamin Björnsson 93f71d6a8a samples: boards: nrf: battery: Remove uneccesary if-def
Remove if-def since io-channels is a required property of
the voltage-devider compatible so the else case won't happen.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 22:54:50 +00:00
Benjamin Björnsson f195b910b2 drivers: gpio: gpio_pcal6408a: move driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 22:53:37 +00:00
Kumar Gala 8fb2210cfb emul: remove name param from bus register APIs
Rework the <BUS>_emul_register calls to not pass the name param.  The
name param is only used for logging and we can get it from the
struct <BUS>_emul instead.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 15:52:36 -05:00
Gerard Marull-Paretas 20177daa0f drivers: spi: nrfx_spi(m|s): add common init function
Having a per-instance init function makes code cluttered and hard to
read. Just create a per-instance IRQ connect function (required to
resolve IRQ_CONNECT parameters at compile time).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-19 13:20:00 -07:00
Gerard Marull-Paretas a8b444f956 drivers: spi: nrfx_spi(m|s): s/_DEVICE/_DEFINE
Use SPI_NRFX_SPI(M|S)_DEFINE, since the macro _defines_ a device.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-19 13:20:00 -07:00
Gerard Marull-Paretas 7d42a8ff18 drivers: spi: nrfx_spim: remove unused definitions
SPIM_NRFX_MISO_PULL_DOWN and SPIM_NRFX_MISO_PULL_UP were not used,
delete them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-19 13:20:00 -07:00
Gerard Marull-Paretas e5ba80733a drivers: spi: nrfx_spi(m|s): drop NRFX_SPI(S|M)_INSTANCE usage
Stop using NRFX_SPI(S|M)_INSTANCE helper so that peripheral address from
Devicetree is used. We should not rely on HAL for hardware description
but Devicetree.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-19 13:20:00 -07:00
Gerard Marull-Paretas 2cfb5012db drivers: spi: nrfx_spim: move rx delay to DT
Move the RX (MISO) delaying capability information to Devicetree. It is
done using 2 properties:

- rx-delay-supported: enabled on SPI nodes that support delaying RX.
  This property can be used by the driver to determine if this
  capability is supported or not on a given instance.
- rx-delay: the actual RX delay value

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-19 13:20:00 -07:00
Gerard Marull-Paretas ee8d8b3c6e drivers: spi: nrfx_spis: max buffer length is SoC specific
The maximum transfer buffer length is SoC specific, not instance
specific. This patch defines MAX_BUF_LEN at driver level in a SoC
specific manner instead of using HAL values that are instance specific
but that always take the same value depending on the SoC.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-19 13:20:00 -07:00
Gerard Marull-Paretas 72cc583dc9 drivers: spi: nrfx_spim: max chunk length is SoC specific
The maximum transfer chunk length is SoC specific, not instance
specific. This patch defines MAX_CHUNK_LEN at driver level in a SoC
specific manner instead of using HAL values that are instance specific
but that always take the same value depending on the SoC.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-19 13:20:00 -07:00
Gerard Marull-Paretas 3c6649f631 drivers: spi: spi_nrfx_spi(m|s): move ORC to DT
Specify the overrun character in Devicetree. Since 0xFF is the most
common value, DT property contains such default.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-19 13:20:00 -07:00
Gerard Marull-Paretas 4ad3a96059 drivers: spi: nrfx_spim: move maximum frequency parameter to DT
Devicetree is the natural place to describe hardware, so move the
maximum frequency the SPI can work with to Devicetree instead of relying
on values from HAL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-19 13:20:00 -07:00
Gerard Marull-Paretas 717f81795b drivers: spi: nrfx_spim: use DT_IRQN
Driver was not using Devicetree to obtain the SPIM IRQ number.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-19 13:20:00 -07:00
Tom Burdick ac84039060 tests: intel_adsp: Silence the hda tests
Uses a macro with a define flag to enable register dumps on the DSP
side. On the python side a simple booling flag.

The default disabled both debug flags and makes the tests
considerably quieter.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-07-19 16:10:47 -04:00
Andreas Sandberg fa6fe0274c drivers: gd7965: Use packed structs where appropriate
There are a few registers that map nicely onto structs. Switch from
using index constants and byte arrays in those cases.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2022-07-19 13:06:47 -07:00
Andreas Sandberg 544c0b22dd drivers: gd7965: Make tcon/cdi/pwr/softstart optional
Some panels using this driver don't provide tcon/cdi/pwr/softstart
values in their reference code. It is normally expected that the right
values will be loaded from OTP in such cases. Make these values
optional to support such panels.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2022-07-19 13:06:47 -07:00
Andreas Sandberg dc860cd6aa drivers: gd7965: Make it possible to use multiple instances
Add instance-specific data and config structs, and remove all other
global variables.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2022-07-19 13:06:47 -07:00
Andreas Sandberg 376973423f drivers: gd7965: Remove the need to use heap memory
The GD7965 driver uses malloc to allocate a single line buffer when
clearing the display. This buffer is used to clear the display line by
line. This as two problems. First, it means that the driver introduces
an unnecessary requirement to support heap allocations. Second, it
causes a lot of weird and unnecessary SPI transactions that look like
partial updates without the actual refresh. This is very inefficient
since the same action can be performed in a single SPI transaction.

Add a gd7965_write_cmd_pattern() helper function that writes a pattern
of a specified length to a register in the device.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2022-07-19 13:06:47 -07:00
Andreas Sandberg 589b83a745 drivers: gd7965: Lock the SPI bus
The protocol used by the GD7965 driver requires that SPI transactions
are split into two phases, a command phase and a data phase, to change
the state of a GPIO signaling commands/data.

We currently don't lock the bus which means that other drivers could
potentially take over the bus and introduce unpredictable delays
between the command and data phase.

Add the necessary locking.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2022-07-19 13:06:47 -07:00
li biao 3e87adc8bc tests: lib: devicetree: move api_ext to new ztest API
Move test lib/devicetree/api_ext to use new ztest API.

Signed-off-by: li biao <biao1x.li@intel.com>
2022-07-19 13:00:37 -07:00
li biao dea133ac26 tests: lib: devicetree: move api to new ztest API
Move test lib/devicetree/api to use new ztest API.

Signed-off-by: li biao <biao1x.li@intel.com>
2022-07-19 13:00:37 -07:00
li biao a5129e62b3 tests: lib: devicetree: move devices to new ztest API
Move test lib/devicetree/devices to use new ztest API.

Signed-off-by: li biao <biao1x.li@intel.com>
2022-07-19 13:00:37 -07:00