Commit Graph

54017 Commits

Author SHA1 Message Date
Marcin Jeliński 14272c2726 samples: subsys: ipc: Add a sample for using multi-instance RPMsg
Demonstating usage of multiple instance of RPMsg

Signed-off-by: Marcin Jeliński <marcin.jelinski@nordicsemi.no>
2021-07-16 21:43:39 -04:00
Marcin Jeliński 54d2eb45a1 ipc: Add multiple instances RPMsg
This patch implements a service that adds multiple instances
capabilities to RPMsg.
Each instance is allocated a separate piece of shared memory.
Multiple instances provide independent message processing.
Each instance has its own work_q.

Signed-off-by: Marcin Jeliński <marcin.jelinski@nordicsemi.no>
2021-07-16 21:43:39 -04:00
Gerson Fernando Budke 3771b968f0 drivers: eth: sam: Replace constants by devicetree values
The zephyr sam gmac driver don't get register address and, in some
cases, peripheral id from devicetree.  This replace headers constants
in favor of devicetree values.

This fix wrong Atmel SAME7x/SAMV7x gmac register address and add
missing peripheral id property for SAM family.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-07-16 21:34:43 -04:00
Gerson Fernando Budke 49eb184ea4 dts: eth: sam: Split generic GMAC compatible
The current GMAC compatible not allow especialize properties by SoC
family.  Split current generic Atmel GMAC compatible into two new
compatibles which are defined by SoC families.  This increase the
freedom and avoid odd situations.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-07-16 21:34:43 -04:00
Gerson Fernando Budke a9180f1b2c drivers: eth: sam: Fix style and documentation
This fixes properties documentation and two devicetree styles:

 - properties with wrong code identation and
 - property description tag style

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-07-16 21:34:43 -04:00
Elliot Revell-Nash 78498933f1 scripts: colorize parsed dictionary logging
Print parsed dictionary based logging with color

Signed-off-by: Elliot Revell-Nash <elliot.revell-nash@wdtl.com>
2021-07-16 21:34:06 -04:00
Carlo Caione b4803a0eff dts: npcx: Remove misused syscon compatible
Now that there is a syscon driver, remove the misused compatible.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-07-16 21:31:38 -04:00
Carlo Caione bc30598456 drivers: syscon: Add generic syscon API
A syscon device is a device managing a memory region containing a set of
registers that are not cohesive enough to represent as any specific type
of device. We need a driver for that because several other drivers could
use the same region at the same time and we need to io-map the region at
boot for MMU enabled platforms.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-07-16 21:31:38 -04:00
Gerard Marull-Paretas 5b939ea731 ci: doc: fix build target for doc publish
The build target was not updated on the doc publish workflow (htmldocs
-> html).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-16 21:15:43 -04:00
Gerard Marull-Paretas ac1b9d9654 doc: guides: move doc README to the guides folder
The location of the documentation guide is inconsistent with other
documentation guides, so move it to the `guides` folder.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-16 21:11:41 -04:00
Sylvio Alves c203dec140 west.yml: update hal to fix esp timer stack
Fix esp timer task stack definition.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-07-16 18:59:57 -04:00
Sylvio Alves 4d37aa828a driver: wifi: add esp event task name
When enabling shell and retrieving thread information,
esp wifi event task name was empty.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-07-16 18:59:57 -04:00
Sylvio Alves 136c377b55 libc: workaround to fix wifi IP address issue
libc optimization changes regarding memset and memcpy
added by this 5d55730cf6
 caused wifi driver issues, which won't
let device get IP address.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-07-16 18:59:36 -04:00
Wealian Liao 3964ae1895 soc: npcx: Improve npcx header Kconfig
This commit includes the following:
1. Add symbol for choice option. So we can override the default value
   by an earlier definition.
2. NPCX9 doesn't support 33MHz SPI clock in the header. So disable the
   option for NPCX9.
3. NPCX9 support 512K flash. Change default to 512k for NPCX9.

Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
2021-07-16 18:59:12 -04:00
Maureen Helm 8ae7a4ec81 west.yml: Build imxrt6xx drivers in the nxp hal library
Make the imxrt6xx drivers consistent with the other SoC family drivers
by building them in the nxp hal library. Similar to commit
cf0587c3ec, this stops leaking long source
paths in build directories and makes them deterministic.

When building samples/hello_world for mimxrt685_evk_cm33, this changes
the build directories from:

build/
└── zephyr
└── CMakeFiles
    └── zephyr.dir
	└── home
	    └── maureen
		└── zephyrproject
		    └── modules
			└── hal
			    └── nxp
				└── mcux
				    └── drivers
					└── imxrt6xx
					    ├── fsl_cache.c.obj
					    ├── fsl_common.c.obj
					    ├── fsl_flexcomm.c.obj
					    ├── fsl_gpio.c.obj
					    ├── fsl_inputmux.c.obj
					    ├── fsl_ostimer.c.obj
					    ├── fsl_pint.c.obj
					    └── fsl_usart.c.obj

to:

build/
└── modules
└── nxp
    └── lib..__modules__hal__nxp.a

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-07-16 18:58:16 -04:00
John Kjellberg 0647b2e0a8 disk: Add support for MCUs with SDIO drivers.
Use abstracted define to cover more MCUs.

Signed-off-by: John Kjellberg <kjellberg.john@gmail.com>
2021-07-16 18:57:17 -04:00
Mahesh Mahadevan 6ca1ffa6fe tests: Update counter test for LPC RTC counter
Update the counter test for LPC RTC counter

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-07-16 18:56:15 -04:00
Mahesh Mahadevan db162bb05d counter: Add counter support for rt600
Add counter support using the RTC for RT600

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-07-16 18:56:15 -04:00
Mahesh Mahadevan 5c818f7f55 drivers: counter: Add counter for rt600
Add a RTC based counter for MXRT600

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-07-16 18:56:15 -04:00
Ioannis Glaropoulos 334e596518 doc: guides: arm: add a brief section for cortex-M linker
A small paragraph about linking Cortex-M
applications using GCC.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos e0abb2da4a doc: guides: arm: add a brief section about FP Services
Add a small paragraph about Floating Point services
in Cortex-M, focusing on the important considerations
around footprint and runtime overhead.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos cf4faeae41 doc: guide: arm: add misc sections
Add a small section about specific considerations
around chain loadable images.
Add a brief section about code relocation.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos 2596db90f6 arm: guide: add section about memory protection features
Memory protection features in Cortex-M applications
- user mode and system calls
- MPU based stack overflow detection

Add section about memory map and mpu programming.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos a17c7ba19d doc: guide: arm: misc sections about testing and maintenance
- add a paragraph about CMSIS
- add a note about maintenance status of Cortex-M
- add a paragraph about testing the Cortex-m porting

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos 1a6f30961d arm: guide: add list of QEMU targets and their feature set
Add list of the available QEMU targets for Cortex-M
platforms in Zephyr along with the corresponding feature set.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos 798378ae01 doc: guides: arm: add section for CPU idling
Adding a small section to describe the CPU idle
functionality in Cortex-M.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos 59cb4ac5f7 doc: guides: arm: add a paragraph for Cortex-M ISR handling
Adding sections to describe
- isr handling principles
- different kinds of interrupts
- reserved interrupts and levels
- locking and unlocking interrupts
- zero latency interrupts
- dynamic direct interrupts

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos 491746624b doc: guides: arm: add a paragraph for thread operations
Adding a small paragraph to describe the details around
thread stack alignment. Adding a detailed section to cover
the thread context-switch and the stack limit checking.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos ccfca8070f doc: guides: introduce ARM user guide (initial commit)
ARM Cortex-M user guide. Initial commit including a table
for listing supported features in the different
Cortex-M variants.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-16 18:55:40 -04:00
Martí Bolívar 7baf5e6176 doc: fix gen_devicetree_rest.py bindings search
The gen_devicetree_rest.py script is responsible for generating .rst
files that comprise the devicetree bindings index. As a first step, it
finds all the YAML files that might be bindings.

However, it's doing that incorrectly and ignoring files in nested
subdirectories. This affects bindings in places like
dts/bindings/net/wireless, which are not found.

Fix it by using recursive=True in the glob.glob() call.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-07-16 16:31:30 -05:00
Christopher Friedt a87a5ea22b tests: kernel: mem_protect: stack_random: disable qemu_riscv32
Test fails consistently in CI but local builds succeed. Puzzling. In
order to keep main green, disabling this test only for qemu_riscv32
until a solution is found.

```
% west build -p always -b qemu_riscv32 -t run \
  tests/kernel/mem_protect/stack_random
...
*** Booting Zephyr OS build zephyr-v2.6.0-1039-g523764b3fd75  ***
Running test suite stack_pointer_randomness
===================================================================
START - test_stack_pt_randomization
Test Stack pointer randomization
stack pointer changed 13 times out of 64 tests
 PASS - test_stack_pt_randomization in 0.5 seconds
===================================================================
Test suite stack_pointer_randomness succeeded
===================================================================
PROJECT EXECUTION SUCCESSFUL
```

```
*** Booting Zephyr OS build zephyr-v2.6.0-1063-g0106d8f2a391  ***
Running test suite stack_pointer_randomness
===================================================================
START - test_stack_pt_randomization
Test Stack pointer randomization
stack pointer changed 0 times out of 64 tests
 Assertion failed at WEST_TOPDIR/zephyr/tests/kernel/mem_protect/\
  stack_random/src/main.c:68: test_stack_pt_randomization: \
  (sp_changed equal to 0)
 Stack pointer is not randomized
FAIL - test_stack_pt_randomization in 0.6 seconds
===================================================================
Test suite stack_pointer_randomness failed.
===================================================================
PROJECT EXECUTION FAILED
```

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-07-16 14:48:21 -04:00
Erwan Gouriou 04e70a482d drivers/gpio: stm32: Move gpio_stm32_configure to void
No check is done on this function,
so no error can be returned.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-07-16 07:21:07 -04:00
Erwan Gouriou b26a898705 drivers/gpio: stm32: Move driver initialization to PRE_KERNEL_1
Assuming gpio devices are required by pinmux which is used
by any device make it a device that is initialized in preliminary
steps of platform init.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-07-16 07:21:07 -04:00
Erwan Gouriou 7e8c497d40 drivers/pinmux: stm32: Group gpio devices usability checks
Move GPIO devices clock handling in stm32_pin_configure function
which is also used in stm32_setup_pins.
Additionally, add device usability check to be sure gpio driver
was initialized before being used by pinmux pseudo driver.

Last, going from the assumption that GPIO devices should be
initialized before being used by pinmux, then there is no need
to enable clock in case CONFIG_PM_DEVICE_RUNTIME=n.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-07-16 07:21:07 -04:00
Erwan Gouriou f629394eee boards/arm: disco_l475_iot1: Remove usart2 node
usart2 node was enabled but no pin were never assigned and
it never got documented. Remove it.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-07-16 07:21:07 -04:00
Glauber Maroto Ferreira c5361d2416 esp32: interrupt_controller: clean redundant configs
Remove config entries now selected on SoC definition.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-07-16 07:19:28 -04:00
Glauber Maroto Ferreira 35c8cb7b37 esp32: drivers: interrupt_controller: review SPI interrupt usage
Review SPI interrupt allocation usage.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-07-16 07:19:28 -04:00
Glauber Maroto Ferreira 378278f61d esp32: drivers: interrupt_controller: review I2C interrupt usage
Review I2C interrupt allocation usage.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-07-16 07:19:28 -04:00
Glauber Maroto Ferreira 4108ca1060 esp32: drivers: interrupt_controller: review GPIO interrupt usage
Review GPIO interrupt allocation usage.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-07-16 07:19:28 -04:00
Glauber Maroto Ferreira 57bf89d65e esp32: drivers: interrupt_controller: review UART interrupt usage
Review UART interrupt allocation usage.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-07-16 07:19:28 -04:00
Glauber Maroto Ferreira 0cf0830ead esp32: drivers: interrupt_controller: review WDT interrupt usage
Review WDT interrupt allocation usage.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-07-16 07:19:28 -04:00
Glauber Maroto Ferreira b6d61587c2 esp32: drivers: interrupt_controller: review Timer's interrupt usage
Review Timer interrupt allocation usage.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-07-16 07:19:28 -04:00
Glauber Maroto Ferreira 9ae5fd1b34 esp32: drivers: interrupt_controller: add interrupt allocation support
Add interrupt allocation support for ESP32.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-07-16 07:19:28 -04:00
Marcin Niestroj 54b26ca7e8 scripts: west: boards: support listing out-of-tree boards
So far only upstream boards were listed. Use just introduced
zephyr_module.parse_modules() function to get information about
out-of-tree board roots. Append them to user provided args.board_roots,
so out-of-tree boards from west modules are listed as well.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-07-16 07:17:35 -04:00
Marcin Niestroj 248d25dc6f scripts: zephyr_module: split function for parsing modules
Add parse_modules() function, which will offload most of the work in
main() and additionally allow external Python code to use that function.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-07-16 07:17:35 -04:00
Chen Peng1 0106d8f2a3 MAINTAINER: remove jocelyn-li from collaborators list.
remove jocelyn-li from collaborators list.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2021-07-16 10:53:52 +02:00
Vinayak Kariappa Chettimada 78e3fe3d75 Bluetooth: Controller: Refactor Periodic Advertising time update
Refactor Periodic Advertising time update function to use
caller supplied Periodic Advertising PDU to calculate the
time reservations.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-07-16 10:48:39 +02:00
Vinayak Kariappa Chettimada ab6d4693da Bluetooth: Controller: Use BT_HCI_ERR_SUCCESS return and other changes
Apply suggestions from code review, and change to using
BT_HCI_ERR_SUCCESS instead of returning 0.

Co-authored-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-07-16 10:48:39 +02:00
Vinayak Kariappa Chettimada ead034d514 Bluetooth: Controller: Fix Extended and Periodic Coded PHY time
Fix Extended and Periodic Coded PHY time reservation. The
define earlier used does not have calculations for Coded
PHY.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-07-16 10:48:39 +02:00
Vinayak Kariappa Chettimada 177ebac790 Bluetooth: Controller: Periodic advertising time reservation
Implementation to update Periodic Advertising time
reservations when advertising data and/or CTE length is
updated.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-07-16 10:48:39 +02:00