Commit Graph

537 Commits

Author SHA1 Message Date
Carlo Caione 43cb00df08 multi_heap: Introduce shared multi-heap memory pool manager
The shared multi-heap memory pool manager uses the multi-heap allocator
to manage a set of reserved memory regions with different capabilities /
attributes (cacheable, non-cacheable, etc...) defined in the DT.

The user can request allocation from the shared pool specifying the
capability / attribute of interest for the memory (cacheable /
non-cacheable memory, etc...)

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-10-12 07:44:46 -04:00
Johann Fischer a9442e5e20 doc: usb: add CDC ACM device support documentation
Add CDC ACM device support documentation.

Co-authored-by: Carles Cufí <carles.cufi@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-06 11:51:07 +02:00
Johann Fischer fb454d09bb doc: usb: refactor USB device support documentation structure
Move related areas to their own files and order
documentation logically from lower to upper layer.
Fix gross errors and inconsistencies.

Co-authored-by: Carles Cufí <carles.cufi@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-06 11:51:07 +02:00
Lauren Murphy a6dcf333a1 doc: misc fixes
Makes miscellaneous fixes to kernel and usermode documentation,
such as fixing broken links and adding clarifying wording.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-10-04 16:42:08 -04:00
Martí Bolívar 12351cb391 doc: devicetree release notes for 2.7
There's enough meat here to split the content up into areas:
devicetree.h itself, Python tooling changes, and bindings changes.

I also reworked the section describing vendor prefix fixes to use a
table, which I find more readable on a second pass through it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-10-02 20:00:28 -04:00
Andy Ross a8f02ed5ee doc: lib/os: Add overview docs for sys_multi_heap
Add a short section to the "heap" page detailing the new
sys_multi_heap utility.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-10-01 20:38:35 -04:00
Peter Mitsis 0153b7dc50 doc: Add deadline scheduling information
Adds information to the kernel scheduling documentation explaining
how a thread's deadline is used to determine the thread's relative
priority.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-09-30 17:01:09 -04:00
Robert Lubos 7abc68d432 doc: net: Remove obsolete note about sockets thread-safety status
The socket API was updated with mutex protection, however this
was not reflected in the documentation. Remove the obsolete note on the
thread-safety status of the socket API, to prevent confusion.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-09-27 10:25:59 -04:00
Anas Nashif 4ffb90f202 doc: pm: rework main documentation
Minor edits and remove old terminology of central and distributed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-09-09 08:06:36 -04:00
Anas Nashif f4cf104e59 doc: power management: remove mention of tickless-idle
Tickless Idle was removed, so remove this last mention of it in the
docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-09-09 08:06:36 -04:00
Flavio Ceolin d9d5c41294 pm: device: Remove transitional states
PM_DEVICE_STATE_RESUMING and PM_DEVICE_STATE_SUSPENDING
are transitional states and are only used in device runtime. Remove it
and use device flag to keep track of a transition.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-27 17:47:10 -04:00
Arvin Farahmand 419b103dd6 drivers: Add mdio API
This commit adds support for MDIO bus. The bus is used by Ethernet
MACs to communicate with PHYs.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2021-08-27 11:43:48 -04:00
Flavio Ceolin c42cde5b69 kernel: work_q: Fix k_work_queue_start documentation
Inform that the queue has to be initialized in zeroed memory or with
the k_work_queue_init before use.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-25 22:07:04 -04:00
Martí Bolívar e0b41a8f51 doc: document devicetree/pinctrl.h macros
Add a new section in the API reference for the newly added
devicetree/pinctrl.h macros.

Amend macros.bnf in the guide to reflect the new generated macros for
getting at pinctrl information by name.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-25 18:09:00 -04:00
Johann Fischer 9ad610d1a7 bluetooth: remove Kconfig options CONFIG_BT_*_ON_DEV_NAME
Follow up on commit bfd45e5b8c
("drivers: remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME")
Remove Kconfig options
CONFIG_BT_UART_ON_DEV_NAME and CONFIG_BT_MONITOR_ON_DEV_NAME
since all UART drivers are converted to devicetree and we can just use
DEVICE_DT_GET(DT_CHOSEN(zephyr_bt_uart)) and
DEVICE_DT_GET(DT_CHOSEN(zephyr_bt_mon_uart)).

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-25 18:05:17 -04:00
Flavio Ceolin 93e674e373 docs: pm: Fix system pm diagram
The device pm actions (low_power or suspend) were switched. Also,
added SOFT_OFF to the suspend action.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-24 22:29:34 -04:00
Johann Fischer 741ae93ce2 shell: remove Kconfig option CONFIG_UART_SHELL_ON_DEV_NAME
Follow up on commit bfd45e5b8c
("drivers: remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME")
Now we can also remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME
since all UART drivers are converted to devicetree and we can just use
DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_uart)).

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-24 17:15:58 -04:00
Anas Nashif eef51a8958 doc: kernel: move meta-irq doc to threads
Move this to where priorities are being discussed to keep things in
context and to have all priority types documented in 1 place.

Fixes #21648

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-08-24 06:59:13 -04:00
Michał Barnaś 5a1fcb609c doc: replace courge with corge
Grault and corge are both syntactical variables used globally.
Courge is misspelling of corge.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2021-08-23 18:54:27 -04:00
Michał Barnaś 1b06477832 doc: change functions arguments in drivers documentation
Fix functions arguments in documentation to match
order of their real declarations

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2021-08-23 18:54:27 -04:00
Johann Fischer bfd45e5b8c drivers: remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME
Remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-23 18:53:47 -04:00
Johann Fischer f460848002 net: ot: rework NCP interface configuration
Rework NCP interface configuration and NCP sample. Remove
CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_DEV_NAME and
CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_ACM Kconfig
options in favor of chosen node zephyr,ot-uart usage.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-23 18:53:47 -04:00
Emil Obalski 6f4f1dc230 logging: Add configurable logging thread delay
This patch adds confiugurable delay when starting log processing
thread.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2021-08-13 11:19:27 -04:00
Fabio Baltieri f6d7c38adb doc: iterable_sections: add an API example
Expand the iterable sections documentation by adding a usage example.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2021-08-12 17:47:04 -04:00
Flavio Ceolin 1c6507afa8 doc: pm: Add wakeup information
Add documentation for wakeup sources.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-11 19:39:13 -04:00
Lingao Meng 23a9594944 Bluetooth: Add connect event structure to zsector
Add an optional version for connection events
to save some memory.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-08-11 13:42:28 +02:00
Jordan Yates fdeaa9103e random: deprecate `XOROSHIRO_RANDOM_GENERATOR`
Deprecate the xoroshiro128+ PRNG algorithm in favour of xoshiro128++.
xoshiro128++ is a drop-in replacement which is invisible from the user
perspective.

xoroshiro128+ is unsuitable because it is explicitly a floating-point
PRNG, not a general-purpose PRNG. This means that the lower 4 bits of
the output are actually linear, not random (from the designers,
https://prng.di.unimi.it/). This means 1/8th of the generated data is
not random.

Additionally, xoroshiro128+ is not a 32bit algorithm, it operates on
64bit numbers. For the vast majority of Zephyr devices, this makes the
PRNG slower than it needs to be. The replacement (xoshiro128++) is
32bit, with no loss in state space (still 128 bit).

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-08-05 11:24:44 +02:00
Gerard Marull-Paretas d41dadc569 pm: rename PM_DEVICE_STATE_SUSPEND to PM_DEVICE_STATE_SUSPENDED
The verb tense for the suspended state was not consistent with other
states. The likely reason: state was being used as a command/action.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-08-04 08:23:01 -04:00
Gerard Marull-Paretas 59f0e73522 doc: pm: update documentation
Update documentation so that latest changes are reflected.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-08-04 08:23:01 -04:00
Fabio Baltieri 94711f1ced doc: reference: add a page for iterable sections
Group together the iterable section functions and add a corresponding
documentation page.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2021-08-03 19:02:43 -04:00
Guennadi Liakhovetski cf92031b9b doc: add a missing ':c:func:' prefix
Fix one instance of a missing C function prefix in an RST document.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-07-23 16:06:54 -04:00
Jose Alberto Meza 28e214b315 doc: reference: peripherals: Add eSPI interface to peripherals list
Add missing eSPI driver interface under peripheral list.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Co-authored-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-07-21 18:21:29 -04:00
Jian Kang a3ec9b0ebd Fix: document: Fix there is no API Reference in clock
Add the doxygen group in clock rst file to add the API Reference
chapter. Fix: #37032

Signed-off-by: Jian Kang <jianx.kang@intel.com>
2021-07-21 05:33:25 -04:00
Yasushi SHOJI ab7f07dc4a doc: reference: memory_domain: Update minimal libc
The global variables in the Minimal C library are now placed in
z_libc_partition, update the document accordingly.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2021-07-20 13:32:36 -04:00
Yasushi SHOJI cc19558f57 doc: reference: memory_domain: Markup variables in sentences
Mark variables up if used in plain sentences for easier reading.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2021-07-20 13:32:36 -04:00
Yasushi SHOJI 49d003a925 doc: Markup kconfig options with :kconfig: role
Some Kconfig options are left marked as inline literals.  But in
Zephyr document, we use the "kconfig" role provided by Sphinx.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2021-07-20 13:32:36 -04:00
Henrik Brix Andersen 946ad14073 drivers: can: mark the CAN API as unstable
Mark the Controller Area Network (CAN) driver API as unstable. The CAN
API was introduced in Zephyr v1.14 and has since gained support for many
different hardware platforms.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-07-17 10:47:53 -04:00
Anas Nashif 9960dac090 doc: move kconfig to indices and table
Right now the kconfig index is randomly placed in the guides. This is a
table similar to other indeces we have and should be considered as part
of an appendix rather than place it in the middle of the documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-07-15 07:07:21 -04:00
Ingar Kulbrandstad 3ec6411c7f Bluetooth: Mesh: Align capitalization for BT mesh
Align the capitalization of the term "Bluetooth Mesh" to Bluetooth mesh"
in the documentation. This is done to to match the new updated naming
convention done in Bluetooth SIG. In the upcoming spec versions, it its
used "Bluetooth mesh" with the lower case convention.

Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
2021-07-13 11:23:54 -04:00
Lauren Murphy ab2ede428a doc, cpp: Update CXX support to show exception support
Updates CXX support documentation to reflect exception support
added in fixes for #32448 and #35772.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-07-12 23:35:45 +03:00
Gerard Marull-Paretas 9dfbdf1997 doc: use kconfig role and directive
Stop using :option: for Kconfig options.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-06-29 10:26:28 -04:00
Martí Bolívar 2b2f2c94a7 api: devicetree.h is stable
This API meets the requirements for marking an API stable:

- Test cases for the new API with 100% coverage: yes;
  we have had coverage for every API macro since the beginning.

- Complete documentation in code. All public interfaces shall be
  documented and available in online documentation.: yes, in the
  reference documentation:
  https://docs.zephyrproject.org/latest/reference/devicetree/api.html

- The API has been in-use and was available in at least 2 development
  releases: yes; this API ws introduced in v2.3.

The basic design involving node identifiers and the macros that create
and operate on them has not changed since the API was introduced, and
it is in widespread use throughout the tree. As we head into a new
LTS, it's time to mark it stable.

This is more of an acknowledgement of reality than a big change, as I
don't see any backwards incompatible changes since the API was first
introduced in v2.3. (We have deprecated a lot of label related macros
that are no longer required now that we have DEVICE_DT_GET and
friends, but they're still there, and we're still testing them, just
as if this were a stable API.)

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-14 15:18:11 +02:00
Martí Bolívar 73443088ba doc: api: fix devicetree modification version
This was modified in 2.6.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-11 17:59:35 -04:00
Kumar Gala 6d51863e0d toolchain: remove deprecated BUILD_ASSERT_MSG macro
The macros have been deprecated for 2 releases so remove the code
associated with them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-11 16:35:19 -05:00
Pavel Vasilyev 65f798a00a Bluetooth: Mesh: Add API to manually store pending RPL entries
The current approach with storing RPL by timeout doesn't solve all
issues as the node may loss power before the timer is fired.
In addition to that this may wear out flash quickly if short timeout is
used.

This change adds an API to store the pending RPL entry upon user
request. Additional Kconfig option allows to completely disable timer
so that the whole storing relies on the user.

The mesh stack still stays responsible for outdating RPL entries in case
of IV Index update as this happens implicitly for the user.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2021-06-11 15:47:09 +02:00
Anas Nashif 8b34495bd0 doc: move TLS to the kernel section
Move TLS docs into the 'Others' section of the kernel chapter.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-11 08:50:39 -04:00
Pavel Vasilyev 0335d5fb01 Bluetooth: Mesh: Add OOB Public Key support for provisionee role
This commit allows an unprovisioned device to exchange its public key
using out-of-band techology (see MeshPRFv1.0.1, table 5.19 and section
5.4.2.3).

For in-band public key exchange, the mesh stack uses HCI commands to
generate public and private keys, and DH key. This, however, doesn't
work for OOB public key exchange since there is no command to generate
DH key with a private key provided by an application. Therefore, this
commit adds direct usage of TinyCrypto into the mesh stack for DH key
generation for OOB public key support.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2021-06-10 17:14:03 -04:00
Arvin Farahmand 98a0ccd5c5 drivers: hwinfo: Add reset cause support
Add `hwinfo_get_reset_cause` and `hwinfo_clear_reset_cause` to retrieve
and to clear cause of system reset on supported platforms.

Different platforms can provide different causes of reset, however
there is a great deal of overlap. `enum reset_cause` can be expanded in
the future to support additional reasons, as additional platforms are
supported.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2021-06-08 10:16:17 +02:00
Kumar Gala 36a24329f8 doc/ref/api: Update API Version Modified
Update API Version Modified field for things that changed
for the 2.6.0 release.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-04 15:04:53 -05:00
Flavio Ceolin b06d084488 docs: pm: System power management diagram
Add a diagram for system power management.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-06-03 14:12:52 -05:00