Commit graph

119 commits

Author SHA1 Message Date
Benjamin Cabé 155420522b doc: Fix occurrences of repeated words
Another round of repeated words cleanup. This commit tries to keep the
diff minimal and line wrapping was mostly left intact in the touched
files, as having them consistent across the documentation is probably
the topic of a future tree-wide cleanup (or not)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-15 17:34:39 -05:00
Alberto Escolar Piedras 74d22a4b35 tests/drivers/eeprom: Several fixes and improvements
* Fix app path in documentation
* Move the at24 emulator overlays to be general instead of
  native_posix specific
* Switch default test platform from native_posix to native_sim
* From build only test, exclude platforms which are used
  in the build and run test.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 11:11:53 +01:00
Alberto Escolar Piedras 8366c1adb4 doc/hardware: Replace references to native_posix w native_sim
Replace the references to native_posix with native_sim.

Background: during this release native_sim is replacing
native_posix as the main host test/development platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 11:11:53 +01:00
Tom Burdick 344d24bcb7 docs: Better document the DMA API and expectations
The DMA API has several expectations for drivers and callers that were
underdocumented or undocumented. Better clarify the driver expectations
and caller expectations.

The DMA API from the caller side is not a portable API and really cannot
be as each DMA has unique properties and expectations of memory,
peripheral interaction, and features. The API in effect provides a union
of all useful DMA functionality drivers have needed in the tree. It can
still be a good abstraction, with care, for peripheral devices for
vendors where the DMA IP might be very similar but have slight
variances.

From the driver implementation side expectations around synchronization,
state transitions, and memory management for transfer descriptors is now
described in documentation rather than solely from me in github review
comments.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-11-10 10:40:10 +01:00
Ricardo Rivera-Matos 2253ba571b docs: charger: Corrects text in the Properties section
Correct Properties subsection of the document to be accurate
to the latest implementation of the charger API.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2023-11-09 17:26:03 -05:00
Ricardo Rivera-Matos d291ef4577 doc: charger: Removes misleading statement at introduction
Removes a statement at the introduction claiming only getting
properties is supported by the API. The charger API can get/set
properties.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2023-11-09 17:26:03 -05:00
Henrik Brix Andersen 5d5249d85b drivers: can: unify spelling of CAN Flexible Data-rate abbreviation
Unify spelling of CAN Flexible Data-rate abbreviation to "CAN FD" instead
of "CAN-FD". The former aligns with the CAN in Automation (CiA)
recommendation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-11-01 11:17:17 +00:00
Henrik Brix Andersen 435b8a25d6 doc: hardware: peripherals: can: split CAN transceiver from controller
Split out the CAN transceiver API documentation from the CAN controller API
documentation. The CAN transceiver API was introduced in Zephyr v3.1.0.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-31 09:02:00 +01:00
Bjarki Arge Andreasen 42676e322b doc: gnss: Add GNSS documentation
- Added GNSS documentation entry to peripherals
- Added GNSS API entry to the API overview as 3.6 experimental

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Henrik Brix Andersen eddfba487d doc: can: move the documention for high-level protocols to connectivity
Move the documentation for high-level CAN protocols (for now only covering
ISO-TP) from the peripherals section to the connectivity section.

This matches the layout in code, where the CAN controllers are under the
drivers/can directory and the protocols are under the subsys/canbus/
directory.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-30 09:25:40 +01:00
Yanfeng Liu 4940a31b9e doc: hardware:porting:arch fix typo
remove unnessary item break to fix XIP kernel case.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2023-10-18 18:38:36 +03:00
Benjamin Cabé 00fc22a44a doc: porting: Set proper languages for syntax highlighting
Make sure devicetree, kconfig, etc. code snippets all have proper
pygments language set.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-18 13:16:34 +03:00
Jamie McCrae 9ea9c85f00 doc: retained_mem: Add note on mutex configuration
Adds a note on how to configure and what to beware of when
disabling mutex support in a multithreading application

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-10-10 16:27:10 +03:00
Anas Nashif 34e16225eb neural_net: remove unused experimental API
Experimental API is not being used anymore, remove it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-29 20:48:33 -04:00
Grzegorz Swiderski f62c805a3d doc: board_porting: Extend the board extensions section
Tweak a few sentences and add a basic example, to fit in with the
overall document a little better. Also, fix an invalid cross-reference.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-09-29 16:29:49 +02:00
Grzegorz Swiderski 491901d605 doc: board_porting: Move the board extensions section
It was awkwardly placed in the middle of the "Write your devicetree"
section, breaking up the flow of the guide. A more natural placement
would be underneath "Contributing your board", considering that this
feature deals with boards already submitted to Zephyr.

Let's relocate this part and swap two of its paragraphs in the process,
to motivate the feature before describing it.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-09-29 16:29:49 +02:00
Anisetti Avinash Krishna db70b8ed11 doc: hardware: peripherals: Added tgpio.rst
Added tgpio.rst file for documentation generation.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-09-29 16:28:09 +02:00
Aaron Massey 12cbfcf397 fuel_gauge: Repl property struct w/ union
Based on review of the similar charger driver API, it's been demonstrated
from the community that embedding a per value property type when fetching
properties. Separating off the property types from the property values
themselves also allow an array of property types to declared as static
const.

Break up fuel_gauge_property struct into a fuel_gauge_prop_val union and a
fuel_gauge_prop_t property type as inputs into fuel gauge API functions.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-27 12:07:59 +02:00
Aaron Massey e294b16a2f fuel_gauge: Add fuel_guage_get_props()
The fuel_gauge_get_prop() function prototype declares a function that
retrieves multiple fuel gauge properties at once. The naming suggests it
ought to fetch a singular property at a time. Moreso, some clients may just
want to fetch properties one at a time and may feel uncomfortable using a
prototype for fetching multiple properties when wanting to fetch them one
at a time.

Modify fuel_gauge_get_prop() to fetch a single property and add
fuel_gauge_get_props() to support fetching multiple properties. Modify
existing tests/drivers/samples.

This is part of #61818 work.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-27 12:07:59 +02:00
Anas Nashif 1640d37189 drivers: neural_net: remove obsolete driver
This driver is not being used by anything and is not being built or
tested, so remove it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-25 07:40:07 -04:00
Benjamin Cabé b6165e01ca doc: can: samples: fix bad reference to can-counter sample
Fixed a dangling reference that was silently ignored before.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-22 10:18:02 +01:00
Benjamin Cabé f6a4217a88 doc: driver: samples: Update driver samples to use new Sphinx extension
Migrated existing driver samples to use the new code-sample directive
and role.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-22 09:21:43 +02:00
Benjamin Cabé 994558ef8e samples: net: doc: Use new Sphinx extension to document networking samples
Use the new code-sample directive and roles to document the networking
samples so that they show up as "Related samples" when browsing the
various relevant networking APIs.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-19 15:22:59 +01:00
Aaron Massey a7b25d599b fuel_gauge: Join get/set prop structs
The fuel gauge API uses separate get/set property structs to indicate what
properties are readable or writable. This lead to duplication in property
names and potential confusion for new users of the API. See issue #61818.
In addition to above, drivers already determine at runtime if a property is
supported for read or write actions.

Join the get/set fuel gauge property structs as a single struct.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-18 10:38:59 +01:00
Carlo Caione e4a125b6a4 dt: Make zephyr,memory-attr a capabilities bitmask
This is the final step in making the `zephyr,memory-attr` property
actually useful.

The problem with the current implementation is that `zephyr,memory-attr`
is an enum type, this is making very difficult to use that to actually
describe the memory capabilities. The solution proposed in this PR is to
use the `zephyr,memory-attr` property as an OR-ed bitmask of memory
attributes.

With the change proposed in this PR it is possible in the DeviceTree to
mark the memory regions with a bitmask of attributes by using the
`zephyr,memory-attr` property. This property and the related memory
region can then be retrieved at run-time by leveraging a provided helper
library or the usual DT helpers.

The set of general attributes that can be specified in the property are
defined and explained in
`include/zephyr/dt-bindings/memory-attr/memory-attr.h` (the list can be
extended when needed).

For example, to mark a memory region in the DeviceTree as volatile,
non-cacheable, out-of-order:

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-attr = <( DT_MEM_VOLATILE |
			       DT_MEM_NON_CACHEABLE |
			       DT_MEM_OOO )>;
   };

The `zephyr,memory-attr` property can also be used to set
architecture-specific custom attributes that can be interpreted at run
time. This is leveraged, among other things, to create MPU regions out
of DeviceTree defined memory regions on ARM, for example:

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-region = "NOCACHE_REGION";
       zephyr,memory-attr = <( DT_ARM_MPU(ATTR_MPU_RAM_NOCACHE) )>;
   };

See `include/zephyr/dt-bindings/memory-attr/memory-attr-mpu.h` to see
how an architecture can define its own special memory attributes (in
this case ARM MPU).

The property can also be used to set custom software-specific
attributes. For example we can think of marking a memory region as
available to be used for memory allocation (not yet implemented):

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-attr = <( DT_MEM_NON_CACHEABLE |
			       DT_MEM_SW_ALLOCATABLE )>;
   };

Or maybe we can leverage the property to specify some alignment
requirements for the region:

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-attr = <( DT_MEM_CACHEABLE |
			       DT_MEM_SW_ALIGN(32) )>;
   };

The conventional and recommended way to deal and manage with memory
regions marked with attributes is by using the provided `mem-attr`
helper library by enabling `CONFIG_MEM_ATTR` (or by using the usual DT
helpers).

When this option is enabled the list of memory regions and their
attributes are compiled in a user-accessible array and a set of
functions is made available that can be used to query, probe and act on
regions and attributes, see `include/zephyr/mem_mgmt/mem_attr.h`

Note that the `zephyr,memory-attr` property is only a descriptive
property of the capabilities of the associated memory  region, but it
does not result in any actual setting for the memory to be set. The
user, code or subsystem willing to use this information to do some work
(for example creating an MPU region out of the property) must use either
the provided `mem-attr` library or the usual DeviceTree helpers to
perform the required work / setting.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-09-15 12:46:54 +02:00
Huifeng Zhang 2c22e83dfb include: arch: arm: Remove aarch32 directory
This commit follows the parent commit work.

This commit introduces the following major changes.

  1. Move all directories and files in 'include/zephyr/arch/arm/aarch32'
    to the 'include/zephyr/arch/arm' directory.

  2. Change the path string which is influenced by the changement 1.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Huifeng Zhang df41deac1c arch: arm: Remove aarch32 directory
It doesn't make sense to keep the aarch32 directory in the
'arch/arm/core' directory as the aarch64 has been moved out.

This commit introduces the following major changes.

  1. Move all directories and files in 'arch/arm/core/aarch32' to
    'arch/arm/core' and remove the 'arch/arm/core/aarch32' directory.
  2. Move all directories and files in 'arch/include/aarch32' to
    'arch/include' and remove the 'arch/include/aarch32' directory.
  3. Remove the nested including in the 'arch/include/kernel_arch_func.h'
    and 'arch/include/offsets_short_arch.h' header files.
  4. Change the path string which is influenced by the changement 1
    and 2.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Ricardo Rivera-Matos a627035290 charger: Adds basic stub API doc
Adds a short stub doc as a placeholder for future documentation in the
charger API.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2023-09-07 13:03:13 -04:00
Aaron Massey 82bfb26446 fuel_gauge: Add battery cutoff support
Many fuel gauge ICs offer a battery cutoff/shipping mode functionality that
cutoff charge from the battery. This is often useful for preserving battery
charge on devices while in storage.

Add battery cutoff support to the fuel gauge API with a generic default SBS
driver showing an example of support in tests.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-08-22 18:05:50 +02:00
Gerard Marull-Paretas 11d782ce56 cmake: modules: add support for board extensions
Board extensions are board fragments that may be present in any board
root folder, under `${BOARD_ROOT}/extensions/${BOARD}`. The board
extension directory may contain Kconfig fragments and/or devicetree
overlays.  Board extensions are automatically loaded and applied on top
of board files, before anything else. There is no guarantee on which
order extensions are applied, in case multiple exist.

Board extensions may be useful in the context of Zephyr modules, such as
`example-application`. In some situations, certain hardware description
or choices can not be added in the upstream Zephyr context, but they do
in a downstream project, where custom bindings or driver classes can
also be created. This feature may also be useful in development phases,
when the board skeleton lives upstream, but other board features are not
yet present.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-21 16:28:22 +02:00
Declan Snyder 6dd8601716 doc: disk: Mention eMMC support in disk subsystem
Include mention of MMC in disk/SD/SDHC doc pages.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-08-18 10:14:01 +02:00
Evgeniy Paltsev 57623bc7db doc: ARC: update ARC support status page regarding VPX support
Update ARC support status page as now we have scalar ARC VPX
port upstreamed.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-08-11 19:45:48 +00:00
Jordan Yates a5895d6464 cmake: extensions: board revisions can be optional
Add a new option to `board_check_revision` that can make specifying a
board revision optional. This makes it easier to work with boards that
can come in a base variant with extensions. For example Fanstel BLE
modules that come with/without power amplifiers.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-08-07 13:26:35 +02:00
Tristan Honscheid 171c1fc9d9 emul: Introduce emulator backend API and generic sensor test
This PR introduces a backend API to be implemented by sensor emulators
that creates a standardized mechanism for setting expected sensor
readings in tests. This unlocks the ability to create a generic sensor
test that can automatically set expected values in supported sensor
emulators and verify them through the existing sensor API. An
implementation of this API is provided for the AKM09918C magnetometer.

A generic sensor test is also created to exercise this implementation.
Observe that this test knows nothing about the AKM09918C; info about
supported channels and sample ranges is discovered through the backend
API. The test iterates over all devices attached to the virtual I2C and
SPI buses in the test binary's device tree, which (theoretically) covers
all sensors. Sensors whose emulator does not exist yet or does not
support the backend API are skipped.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2023-07-28 17:48:31 +02:00
Carlo Caione 15e84cbfac dts: Move to 'zephyr,memory-attr'
Move to 'zephyr,memory-attr' and use the newly introduced helpers.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-25 11:22:10 +02:00
Daniel Leung 9f02eeadf8 serial: allow callback setting to be exclusive
Both the IRQ API and Asynchronous API support callback.
However, since they are both interrupt driven, having
callbacks on both API would interfere with each other
in almost all cases. So this adds a kconfig to signal
that the callbacks should be exclusive to each other.
In other words, if one is set, the other should not
be active. Drivers implementing both APIs have been
updated to remove the callbacks from the other API.
Though, this still leaves the option to disable
the kconfig and allows both APIs to have callbacks
if one desires.

Fixes #48606

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-07-18 11:13:02 +00:00
Mike Fikes c59b04299f doc: isotp introduce CF abbreviation
Introduce the CF abbreviation as is done for
other abbreviations (like FF) before first use.

Signed-off-by: Mike Fikes <mike@fikesfarm.com>
2023-07-16 07:32:24 -04:00
Aaron Massey e1401fcf5e emul: Add SBS Gauge emulator backend_api
In order to support easier setup of test scenarios with fuel gauge
emulators, we should expose an API that can change internal emulator state.

Add a minimal fuel gauge emulator backend API for setting the charging
current and voltage with a sample implementation in the emul_sbs_gauge with
an associated driver test.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-07-07 09:22:20 +02:00
Tomasz Bursztyka 1b51be4ba0 doc/pcie: Add basic entry for PCIe doxygen documentation
This has been missing so let's add it.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-06-17 07:58:41 -04:00
Evgeniy Paltsev f8803090ca dos: ARC: mark DSP AGU/XY extensions as supported on ARC EM
DSP AGU/XY extensions ARC EM processors are supported now in
Zephyr.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-06-16 11:10:52 -04:00
Benjamin Cabé b7e23b88ce doc: pinctrl: fix link to ELC2021 slide deck
updated link to point to a working location.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Benjamin Cabé 46f7c044c0 doc: i2c: fixed non-working link to I2C spec
Fixed improperly formatted link to I2C spec.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Benjamin Cabé 21c1a61551 doc: peripherals: fix bad link to Display API
fixed incorrect link reference to Display API

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Andrei Emeltchenko 21f59903c7 doc: smbus: Correct SMBus documentation
Fix syntax errors in the documentation.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-06-01 18:04:58 -04:00
Carlo Caione f5c66e9708 doc: Add barriers API docs
Add an entry to the barriers API in the docs.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-05-31 06:15:32 -04:00
Jamie McCrae 71e7cf888d doc: api: Add auxdisplay as unstable API
Adds the new auxiliary display peripheral as an unstable API.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Jamie McCrae 71e10e743c doc: hardware: peripheral: Add auxdisplay documentation
Adds base auxdisplay documentation.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Yuval Peress 5ab14730f5 sensors: Add async read/decode documentation
Add documentation about the new async read and decode APIs including
some rough examples.

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-26 11:04:54 -05:00
Gerard Marull-Paretas 5b049f35b5 doc: drop usage of numref
Usage of numfig=True option in conf.py significantly increases doc build
time. While it is a nice feature, it's not extensively used in Zephyr
documentation, so let's remove its usage in favor of faster doc builds.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-22 11:08:53 +02:00
Keith Short a6af1dd43d docs: bc12: Update for charging mode operation
Add details for using charging mode and add the BC1.2 emulator API
information to the document.

Signed-off-by: Keith Short <keithshort@google.com>
2023-05-08 09:57:56 +02:00