Commit graph

1310 commits

Author SHA1 Message Date
Manimaran A ed27c1b75c drivers: ps2: microchip: PS2 wakeup pin configured in overlay
Updated the overlay files with PS2 wakeup pin

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-06-17 07:59:07 -04:00
Manimaran A 0f6cb5edcd drivers: ps2: microchip: Low power and wakeup enabled
ps2 driver updated to support low power and wakeup.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-06-17 07:59:07 -04:00
Anas Nashif dd43a65540 samples: watchdog: fix twister filter
Fix devicetree filter. dt_has_compat is not a twister support filter.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-13 09:38:27 -04:00
Anas Nashif b835b02136 tests: cleanup metadata and filtering
- Add integration_platforms to avoid excessive filtering
- Make sure integration platforms are actually part of the filter
- Fix some tags and test meta data

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-13 09:38:27 -04:00
Francois Ramu c908aead77 tests: drivers: dac channel structure has a buffered parameter boolean
Add the '.buffered' field to the dac_channel_cfg structure
when testing the DAC.
This boolean parameter is initialised to 'true' to PASS the test.
It follows the https://github.com/zephyrproject-rtos/zephyr/pull/57730
Also changed for the samples/drivers/dac

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-06-08 09:33:11 -04:00
Jose Alberto Meza 2602b7260f samples: drivers: peci: Exclude MEC172x EVB from test
PECI bus sample requires a controller and a target
Intel system(PECI controller) + Embedded controller(PECI target),
where EC HW can be add-on card (mec172xmodular) or onboard EC.

MEC172x EVB is not intended to be connected hence excluding
the platform.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2023-06-07 13:57:16 -04:00
Benjamin Cabé 21f473aaec samples: doc: fix dead links
Fixed deadlinks reported by Sphinx linkchecker

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Benjamin Cabé 23f2a2066f doc: update stale srecord links
Updated 404 links to point to valid locations.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Anas Nashif 0064b6e8b6 tests: samples: cleanup test tags, add integration_platforms
Use integration platforms and sanitize tags.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-02 04:47:06 -04:00
Keith Packard c09618cf63 samples/eth_ivshmem: Switch main return type to int.
Zephyr now requires that main return int instead of void.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-05-31 10:36:17 +02:00
Keith Packard 35f445c247 samples/auxdisplay: Switch main return type to int.
Zephyr now requires that main return int instead of void.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-05-31 10:36:17 +02:00
Jamie McCrae 764da7fff1 samples: driver: Add auxdisplay sample
Adds a simple auxdisplay sample which outputs hello world and the
name of the board. A sample overlay is provided for the
nucleo_f746zg board with a Hitachi HD44780-compatible display.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Tyler Ng ae350a9c77 boards: riscv: opentitan_earlgrey: Add the OpenTitan AON Timer
Adds the AON Timer device in the OpenTitan Earlgrey device tree.
Adds overlay files to enable the watchdog and set the alias to
`watchdog0`.

Adds the AON timer (watchdog part) to the supported features section
of the OpenTitan documentation.

Signed-off-by: Tyler Ng <tkng@rivosinc.com>
2023-05-26 09:45:25 -04:00
Torsten Rasmussen 1120934874 doc: samples: update OVERLAY_CONFIG to EXTRA_CONF_FILE
Update rst files to use EXTRA_CONF_FILE instead of OVERLAY_CONFIG.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Jerzy Kasenberg 4e3968a507 samples: drivers: adc: Add da1469x_dk_pro overlay
This change creates an overlay file so that the adc sample
can be used with da1469x_dk_pro kit.
Both ADC are configured with several channels.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-05-22 12:41:42 +02:00
Bill Waters 61246e2592 driver: adc: infineon: Adding ADC driver support to cy8cproto_063_ble
- The boards\arm\cy8cproto_063_ble board now has ADC enabled
- This includes overlay files for the test app and sample app

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2023-05-19 20:22:51 -04:00
Grant Ramsay 83928aaab7 samples: drivers: ethernet: Add Jailhouse IVSHMEM Ethernet sample
Add an IVSHMEM Ethernet sample to communicate between Zephyr
and Linux root cell within the Jailhouse hypervisor.

The supported configuration runs the Jailhouse hypervisor
within QEMU Cortex-A53.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-05-14 18:17:33 -04:00
Daniel DeGrasse 77f8848f8e boards: arm: mimxrt1040_evk: enable ADC support
Enable ADC support for RT1040 EVK. Tested using samples/drivers/adc,
using channels 3 and 4 of ADC0.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:35:40 -05:00
Francois Ramu e9dd412a3d boards: arm: stm32h7b3 disco kit has external octo NOR flash controller
Add the alias to the MX25LM512 octo-NOR flash for the spi-flash node.
Remove the overlay for the samples/drivers/spi_flash as no MDMA driver
exists yet for the stm32h7.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-05-10 19:13:45 +02:00
Gerard Marull-Paretas 93b63df762 samples, tests: convert string-based twister lists to YAML lists
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-10 09:52:37 +02:00
Stephanos Ioannidis bd1a7a36f4 boards, samples: Fix minimal libc malloc arena settings
With the minimal libc moving to using the common malloc implementation,
boards and samples with minimal libc-specific settings need to switch
to using the common malloc settings instead.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-05-09 01:29:16 +09:00
Sreeram Tatapudi 98858f1e6a drivers: flash: Add Infineon CAT1 Flash driver
- Added initial version of Infineon CAT1 Flash driver
- Added binding file for infineon,cat1-flash-controller.yaml
- Added overlays for subsys/nvs and drivers/flash_shell
to support cy8cproto_063_ble, cy8cproto_062_4343w boards
- Defined erase-block-size in PSoC6 MPN dtsi.

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-05-08 11:16:09 +02:00
Manimaran A 0fde69411e samples: espi: microchip: espi sample compile fix
Updated the initialization of "spi_cs_control" structure
instance.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-05-08 09:58:40 +02:00
Stephan Linz 9f0bc06468 samples: mimxrt1010_evk: exclude various tests
Disable various samples because they require certain digital signals
from the Arduino header, which are not connected when the board is
shipped and therefore not defined via the connector gpio-map.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2023-05-08 09:58:30 +02:00
Bill Waters 3e02d48e4e driver: adc: infineon: Adding ADC driver
- This includes the driver, test app, and sample app
- Only the boards\arm\cy8cproto_062_4343w board is supported for now

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2023-04-27 10:16:23 -07:00
Gerard Marull-Paretas 3f2c2d4130 drivers: spi: make SPI dt-spec macros compatible with C++
As of today it is not possible to use SPI dt-spec macros in C++,
something known and documented. The main reason is because `cs` property
is initialized using a compound literal, something not supported in C++.
This PR takes another approach, that is to not make `cs` a pointer but a
struct member. This way, we can perform a regular initialization, at the
cost of using extra memory for unused delay/pin/flags if `cs` is not
used.

Fixes #56572

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-24 21:29:55 +02:00
Al Semjonovs 0258b23401 Revert "adc: harness regex string not capturing sample app"
This reverts commit aef973d65b.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-04-21 09:39:08 +02:00
Benjamin Björnsson 0a6d65583d samples: remove unnecessary include of adc dt-bindings
Remove include of adc dt-bindings header since these are
already included in the root .dtsi file that adds an adc.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-20 10:48:33 +02:00
Al Semjonovs aef973d65b adc: harness regex string not capturing sample app
NTC thermistor changes updated the sample app output,
correcting harness string to match sample app.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-04-18 11:25:12 -04:00
Keith Short c752568708 dts: microchip: Remove deleted property
PR https://github.com/zephyrproject-rtos/zephyr/pull/55129 deleted the
"port-sel" property.  Delete this property from remaining Microchip SoC
variants and boards.

Test: west build -b mec172xevb_assy6906 samples/drivers/espi/

Signed-off-by: Keith Short <keithshort@google.com>
2023-04-18 09:30:55 +02:00
Stephanos Ioannidis 43fc0f5184 samples: drivers: spi_flash_at45: Add missing return statement
The `main` function now returns `int` instead of `void` and therefore
must return a value.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-04-17 20:19:36 +09:00
Andrzej Głąbek 8cc7ca1208 samples: drivers: adc: Update console output specification
This is a follow-up to commit 9fa35bc9a0.

Align specification of the expected console output with the changes
done to the sample in the above commit.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-04-17 11:24:44 +02:00
Andrei Emeltchenko 607a56585a samples: ivshmem: Use device_is_ready()
Fix sample to use device_is_ready(dev) when checking for device.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-04-17 10:18:46 +02:00
Gerard Marull-Paretas 667eeb11fb shell: fix MISRA 5.7 violations on struct shell
MISRA Rule 5.7 requires uniqueness of tag identifiers. Shell is
frequently problematic because many code uses `const struct shell
*shell`. This causes CI noise every time one of these shell files is
edited, so let's update all of them with `const struct shell *sh`
instead.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-14 12:21:08 +02:00
Keith Packard 1d5e644d12 samples, tests: Switch main return type from void to int
This applies the coccinelle script to another set of files:

   samples/bluetooth/bthome_sensor_template/src/main.c
   samples/boards/stm32/power_mgmt/standby_shutdown/src/main.c
   samples/drivers/smbus/src/main.c
   samples/drivers/virtualization/ivshmem/doorbell/src/ivshmem.c
   samples/fuel_gauge/max17048/src/main.c
   samples/hello_world/src/main.c
   samples/sensor/proximity_polling/src/main.c
   samples/subsys/logging/ble_backend/src/main.c
   tests/drivers/build_all/mfd/src/main.c

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
Keith Packard f12853004e samples/drivers/display: Eliminate control flow in macro
Remove RETURN_FROM_MAIN macro which performed control flow, violating
compliance tests. Replace with explicit use of posix_exit_main or return as
appropriate.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
Keith Packard 0b90fd5adf samples, tests, boards: Switch main return type from void to int
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.

Most of these changes were automated using coccinelle with the following
script:

@@
@@
- void
+ int
main(...) {
	...
-	return;
+	return 0;
	...
}

Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
David Leach 095db2ee27 boards: lpcxpresso55s36: Enable LPADC
Enable LPADC on lpcxpresso55s36 board
Support lpcxpresso55s36 on ADC driver sample

Signed-off-by: David Leach <david.leach@nxp.com>
2023-04-13 16:13:25 +02:00
Scott Worley 5c00a83b99 drivers: spi: Microchip XEC QMSPI-LDMA fix spi buffer usage
Zephyr SPI driver model for full-duplex operation assumes
data will be transmitted and received during each clock period.
The QMSPI driver for the XEC family also supported dual and
quad I/O use cases which are inherently half-duplex. To
support dual/quad the driver incorrectly processed spi buffers
as all transmit buffers first then all receive buffers. This
worked if only the SPI driver was used. It did not work with
the Zephyr flash SPI NOR driver which assumes SPI drivers
follow the SPI driver model. This commit implements a QMSPI
driver that follows the Zephyr SPI driver model resulting in
a slightly smaller driver. Dual/quad SPI transactions are
supported if the experimental SPI extended mode Zephyr
configuration flag is enabled. We also remove the QMSPI full duplex
driver added previously to support the flash SPI NOR driver.
Added board to spi loop-back test and spi_flash sample.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2023-04-11 16:57:56 +02:00
Al Semjonovs 9fa35bc9a0 adc: Add TI ADS7052 SPI driver
Add driver for TI ADS7052.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-04-07 16:23:17 -05:00
Manimaran A 535d64cd44 drivers: peci: microchip: Enabled low power mode
Updated the PECI driver to support low power mode.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-04-07 13:30:40 +02:00
Rodrigo Cataldo 1feaa9db06 samples: drivers: virtualization: add ivshmem doorbell sample
Provide a sample for ivshmem-doorbell running under virtualization
(QEMU). The sample relies on existing tools (ivshmem-server,
ivshmem-client) that must be run at the host (unix).

The sample can be run on userspace or kernelspace, and on arm64 (qemu,
kvm) and x86_64 (qemu) platforms.

This execution of this code is quite complex, thus the README should be
made available in the official documentation. This is why the code is a
sample and not a test.

Signed-off-by: Rodrigo Cataldo <rodrigo.cataldo@huawei.com>
Co-authored-by: Henri Xavier <datacomos@huawei.com>
2023-04-07 13:26:01 +02:00
Caspar Friedrich ba66f41e21 samples: w1: Update scanner example for ds2482-800 bus driver
The scanner example for 1-wire now supports the DS2482-800 multi channel
bus master.

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2023-04-07 13:11:54 +02:00
Francois Ramu ad4cc3a577 samples: drivers: stm32h5 octospi driver testing
Add the config for testing the jesd jedec sfdp of the octoNor flash
on the stm32h573 disco kit.
The external octoflash is the macronix  MX25LM51245 or micron.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-07 08:33:51 +00:00
Benjamin Björnsson 0599e9c7fa samples: drivers: adc: Add Nucleo C031C6 overlay
Add overlay for Nucleo C031C6 board.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-07 08:18:03 +00:00
Rico Ganahl f53d0e4d05 samples: drivers: display: introduce B-LCD40-DSI1
Add STMicroelectronics MIPI DSI display shield for testing.

Signed-off-by: Rico Ganahl <rico.ganahl@bytesatwork.ch>
2023-04-06 11:51:06 +02:00
Francois Ramu 770a7473bf samples: drivers: counter alarm running on the stm32h573i_dk
Run the samples/drivers/counter/alarm on the stm32h573i_dk.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-05 10:39:19 +00:00
Pieter De Gendt 6b532ff43e treewide: Update clock control API usage
Replace all (clock_control_subsys_t *) casts with (clock_control_subsys_t)

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-04-05 10:55:46 +02:00
Francois Ramu cef8c3fdd1 samples: drivers: adc for the stm32h5 boards
Add the new nucleo_h503rb board for testing the adc_api driver
on the ADC1 channel6 (pf12). Read the analog value of the ADC1
input on A5 of the arduino connector (CN16).

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-03 09:50:43 +02:00
Jordan Yates 41d83d7ea2 lora: compile drivers based on devicetree
Similar to the changes made in #48048, compile in the appropriate lora
modem driver when `CONFIG_LORA=y`. The `LORA_SX12XX` symbol has no
use now so remove. LoRa and LoRaWAN subsystems are still marked as
unstable so no additional deprecation cycle is needed.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-03-31 09:20:22 +02:00
Martin Jäger a99c12d572 samples: drivers: dac: allow building for all boards with overlays
Add all boards where the required overlay is present in the boards
folder to platform_allow. At the same time sort the list alphabetically
to keep a better overview.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-03-30 17:34:03 -04:00
Andrei Emeltchenko db2ebed78d tests: smbus: Cleanup CMakeLists files
Remove "-machine Q35" from QEMU_EXTRA_FLAGS since this is now the
default qemu_x86_64 configuration.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-30 09:45:02 +00:00
Anas Nashif 6093870caf samples: i2c fram: remove sample
Quark SE does not exist in zephyr anymore and this sample was there as
one of the first i2c users in Zephyr and is not providing any value any
more.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-03-29 10:26:56 -05:00
Francois Ramu 2928f30551 samples: drivers: watchdog testing on the stm32h573i_dk
Run the samples/drivers/watchdog on the stm32h573i_dk
for both IWDG and WWDG of the stm32h5 device

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-29 10:04:39 +02:00
Krzysztof Chruscinski a5865949d9 samples: drivers: counter: alarm: Fix nordic DKs
After reworking counter driver to use device tree this sample
stopped to compile for nordic DKs. Providing overlays to fix
the compliation.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-27 22:15:15 +00:00
Andrei Emeltchenko fd078b6746 samples: smbus: Remove qemu_x86_64 overlay
Remove overlay added by mistake. SMBus EEPROM PR is not merged and the
dts would be updated for qemu_x86_64 board's dts.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-24 09:36:47 -04:00
Jay Vasanth b2f3d35540 samples: drivers: espi: update MEC172x espi sample
MEC172x espi sample to use eSPI virtual wire hardware routing
through device tree

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2023-03-23 11:58:26 -04:00
Manimaran A 754920a74f drivers: adc: microchip: Added MEC15xx board overlay
Added MEC15xx board overlay in sample folder.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-03-23 11:43:30 -04:00
Daniel DeGrasse 6c0b68672d samples: drivers: adc: treat samples as signed when using diff mode
Treat sample data as signed when using differential mode for ADC
sampling, so that negative differential samples will be converted
correctly.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-23 08:58:44 +00:00
Daniel DeGrasse 4629b626c8 samples: drivers: adc: update board overlays for LPADC API change
Update board overlays for boards with LPADC IP present on their SOCs, to
use new LPADC API for channel numbering.

For the RT595 and LPCxpresso55S69 EVKs, additional channels are enabled
to demonstrate the resolution and differential channel features of
the LPADC.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-23 08:58:44 +00:00
Pieter De Gendt 497d4899df samples: drivers: adc: Add sam4s_xplained overlay
Add a board overlay for sam4s_xplained. Channel 5 (PB1) is enabled as
well as the internal temperature sensor.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-03-23 09:41:00 +01:00
Andrei Emeltchenko cf423b3eaa samples: Add smbus shell sample application
Add smbus sample for testing SMBus commands.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Johan Hedberg 4bfebf0a9c samples: watchdog: Add support for Intel TCO watchdog
Add appropriate configuration parameters for using the Intel TCO
watchdog driver with the rpl_crb board.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-03-22 11:38:59 +01:00
Gerson Fernando Budke 6951160dd2 drivers: afec: sam: Enable sam4e SoCs
Add support to Atmel SAM SAM4E AFEC feature.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Alejandro Hidalgo Muñoz de Rivera 8851a83e18 samples: Added README for watchdog sample
Added README for watchdog sample in rst format

Signed-off-by: Alejandro Hidalgo Muñoz de Rivera <ahmrivera@gmail.com>
2023-03-21 19:44:56 +01:00
Jamie McCrae 2398ac1815 samples: drivers: espi: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae 34863c9f4e samples: drivers: kscan: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae cd4453d565 samples: drivers: ps2: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Ben Marsh 4e6c50646a samples: drivers: counter: alarm: Add support for stm32h735g_disco
Add the stm32h735g_disco board to the supported boards for the counter
alarm sample

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2023-03-20 09:53:59 +01:00
Lucas Tamborrino 81aaaa9f72 samples: drivers: counter: add esp32s3 overlay
Add esp32s3 overlay to counter sample

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-03-14 10:50:37 +01:00
Siyuan Cheng 303eb76293 sample: driver: spi_flash: Add emsdp support
Add emsdp support in spi_flash driver sample
output log:
JEDEC QSPI-NOR SPI flash testing
==========================

Test 1: Flash erase
Flash erase succeeded!

Test 2: Flash write
Attempting to write 4 bytes
Data read matches data written. Good!

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-03-13 11:58:48 +01:00
Fabio Baltieri bc612b8ebd boards: arm: add Arduino GIGA
Add support for the Arduino GIGA board, an STM32H747XI based development
board in Arduino form factor, featuring external flash, SDRAM, Bluetooth
and WiFi.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-06 12:33:57 +01:00
Daniel DeGrasse 43d19c0b5f samples: drivers: display: add support for RT595 EVK
Add support for RT595 EVK to display sample using RM68200 based MIPI
panel. The board is configured with an increased heap size to account
for the panel's high resolution.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-04 09:19:26 +01:00
Jay Vasanth e56721b8f0 dts: gpio: Add Microchip XEC GPIO macros for use in device tree
Microchip XEC devices specify GPIO pin using octal numbering and
organize pins in banks of 32. Chip documentation does not use
bank naming rather naming each pin by its octal number. This has
led to the developer having to calculate the bit position of a pin
in its 32-bit bank when a specifying the pin for GPIO usage. We
created a set of defines for all possible GPIO pins that specify
the DT GPIO bank name used in the chip level DTSI files and the
bit position in that bank.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2023-03-02 13:52:03 +01:00
Jamie McCrae af78cbdc99 samples and tests: Add REQUIRED to Zephyr find_package call
Adds REQUIRED to samples and tests for finding the zephyr package
to align all samples and tests with the same call and parameters.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-02 09:58:27 +01:00
Ben Marsh 30e0fa82f8 boards: arm: stm32h735g_disco: Enable ADC support
Enable ADC support for the stm32h735g_disco board in devicetree

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2023-02-28 10:26:26 +01:00
Ben Marsh 6d55cc6c23 samples/drivers/adc: Support 16-bit resolution
Zephyr supports ADCs with 16-bit resolution, but the ADC sample
displayed readings for such incorrectly due to too-small datatype

This commit fixes the ADC sample for ADCs with 16-bit resolution

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2023-02-28 10:26:26 +01:00
Pieter De Gendt b1d74e42cf samples: drivers: spi_flash_at45: Remove obsolete CONFIG_SPI_FLASH_AT45
The Kconfig symbol CONFIG_SPI_FLASH_AT45 is selected by default if a
compatible device is enabled.
Remove obsolete config entry.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-02-27 14:35:15 +01:00
Pieter De Gendt 9b706a099d samples: drivers: spi_flash: Remove obsolete CONFIG_SPI_NOR configs
The Kconfig symbol for CONFIG_SPI_NOR is selected by default if a
compatible device is enabled.
Remove obsolete board config files.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-02-27 14:35:15 +01:00
Jonathan Rico f8e5e17246 drivers: led_strip: add WS2812 I2S-based driver
Add a driver implementation that uses the I2S peripheral.
Based off this blog post:
https://electronut.in/nrf52-i2s-ws2812/

Should help with #33505, #29877 and maybe #47780, as there is no garbage
data at the end of transmissions on nRF52832, and no gaps.

Signed-off-by: Jonathan Rico <jonathan@rico.live>
2023-02-24 10:12:47 -08:00
Dominik Ermel d00dfa8a45 sample/drivers/jesd216: Reduce nrf52840dk SPI overlay
Reduce nrf52840dk_nrf52480_spi.overlay to use default board
definition of spi2.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-02-23 08:58:34 +01:00
Anas Nashif 57dcd3cc60 samples: move litex i2s sample under samples/boards
Move the board specific sample under samples/boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-02-22 05:31:07 -05:00
Anas Nashif 5cd0d03e76 samples: i2s: litex: fix sample.yaml syntax
Add tests section and whitelist litex board.

Fixes #54989

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-02-22 05:31:07 -05:00
Francois Ramu 3cf2654141 samples: drivers: led pwm running on 2 pwm leds on nucleo_u575
Add the overlay file to run the samples/drivers/led_pwm
on the nucelo_u575zi_q board.
Two green leds are used on pc7 and pb7 corresponding to pwm
channels of timers3 and timers4.
The leds node has to be disabled to let the pin for the pwm nodes.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-20 09:47:18 +01:00
Francois Ramu 98e24fa6ce samples: drivers: led pwm running on 2 pwm leds on disco l475
Add the overlay file to run the samples/drivers/led_pwm
on the disco_l475_iot1 board. Two green leds are used on pa5 and pb14
corresponding on 2 pwm channels of timers2 and timers15.
The leds node has to be disabled to let the pin for the pwm nodes.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-20 09:47:18 +01:00
Francois Ramu d41f69559a samples: drivers: led pwm running on pwm led of the nucleo boards
Configure the overlay file to run the samples/drivers/led_pwm
on the nucleo_l073rz and nucleo_f091rc board.
The green led is used on pa5 for pwm channels of timers2 channel
The leds node has to be disabled to let the pin for the pwm nodes.
The spi1 is disabled in that sample to avoid conflict on pa5 pin.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-20 09:47:18 +01:00
Sylvio Alves f1b662ae17 samples: ipm_esp32: remove binary blob
Remove array structure from source code to follow
Zephyr's policy regarding its usage.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-02-16 21:30:35 +09:00
Sylvio Alves f433e95262 samples: ipm_esp32: use net core source from build ouput
Current ipm_esp32 sample code requires esp32_net_firmware.c file
as source input, which is generated after ipm_esp32_net build.
esp32_net_firmware.c was manually added as binary blob, which needs to
be removed from the repository.

This change modifies ipm_esp32 CMakeLists.txt to include the build
output of ipm_esp32_net as input source of ipm_esp32 build, allowing the
binary blob to be removed.

Current approach shall be updated during next release.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-02-16 21:30:35 +09:00
Daniel DeGrasse bcee4ed34e samples: drivers: adc: add support for side b channel to RT685 EVK
Add support for CH0B to RT685 EVK, to demonstrate LPADC side B channel
support.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-02-08 01:08:08 +09:00
Daniel DeGrasse 966b88eaa9 samples: drivers: adc: add support for side B channel on LPCXpresso55s69
Add support for CH0B on LPC55s69 EVK, to demonstrate side B support in
LPADC driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-02-08 01:08:08 +09:00
Stancu Florin e55fd536c8 boards: cc13x2/cc26x2*: enable WDT + update docs & sample
Enables the watchdog timer within the DTS of supported boards,
add sample overlays showing how to use NMI WDT interrupts and
updated the board features inside the boards' doc / yaml files.

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2023-01-31 16:08:00 -05:00
Siyuan Cheng 86769f03df sample: driver: spi_flash: Add em_starterkit support
Add em_starterkit support in spi_flash driver sample
output log:
JEDEC QSPI-NOR SPI flash testing
==========================

Test 1: Flash erase
Flash erase succeeded!

Test 2: Flash write
Attempting to write 4 bytes
Data read matches data written. Good!

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-01-30 10:06:24 +00:00
Dominik Ermel 8febac3627 samples/drivers/soc_flash_nrf: Add missing README.rst
Missing documentation added.

Fixes #53753

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-01-27 19:22:40 +09:00
Brett Witherspoon 5ec1b4d1b2 samples: drivers: uart: Read until FIFO empty in echo_bot
The RX ready condition is unspecified with regard to being level or edge
triggered, so all available data should then be read once the RX ready
condition is detected. This change brings the sample into agreement with
the documentation and tests.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
2023-01-27 19:21:37 +09:00
Brian Juel Folkmann d0a7ab529d samples: spi_flash: Add option to test multiple sectors
Add tests for erase of multiple consequtive sectors.

Signed-off-by: Brian Juel Folkmann <bju@trackunit.com>
2023-01-26 09:39:59 +00:00
Henrik Brix Andersen 55d0ffa874 drivers: can: remove CAN_HAS_CANFD Kconfig helper
Remove the CAN_HAS_CANFD Kconfig helper symbol in order to allow enabling
CAN-FD support in the API regardless of driver support.

Change default to CAN-FD support being disabled and have samples and tests
that require CAN-FD support turn it on. This aligns the default
configuration across CAN controller drivers regardless of their
capabilities.

The rationale behind this is that we are starting to see MCUs with multiple
CAN controllers, some CAN-FD compatible, some not (e.g. NXP i.MX RT1060 and
FPGAs). Automatically enabling CAN-FD support based on the presence of a
CAN-FD capable CAN controller leads to different application default
settings based on the CAN controller(s) in use.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-25 15:00:39 +00:00
Marcin Jabrzyk 5787c69b9c samples: watchdog: RP2040 doesn't require custom max timeout
RP2040 accepts window max time in milliseconds then
the default Zephyr sample value is fine.

Signed-off-by: Marcin Jabrzyk <marcin.jabrzyk@gmail.com>
2023-01-24 19:01:34 -08:00
Quang Bui Trong ad19019b29 samples: watchdog: board s32z270dc2_r52 only build and not running
Currently, the s32z270dc2_r52 board only supports running on RAM,
 so samples or tests watchdogs that perform SoC reset will not produce
 results. Set the build only for these samples and tests until the
 reset SoC function is supported.

Signed-off-by: Quang Bui Trong <quang.buitrong@nxp.com>
2023-01-23 11:46:43 -08:00
Francois Ramu e9f77f1ecf samples: drivers: use stm32 dma driver binding macro to configure channel
Use the macro as defined by the
include/zephyr/dt-bindings/dma/stm32_dma.h to configure the
dma channel.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-01-23 09:15:21 -06:00
Andrzej Głąbek 8115fc2e9f samples: spi_bitbang: Use gpio_loopback pins for MOSI and MISO
Align pins that are required to be shorted for this sample on
nRF52840 DK with those used in e.g. uart driver tests.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-01-20 13:28:27 +01:00
YuLong Yao 1dd0ffbe40 Revert "samples: jesd216: add support for gd32a503v_eval board"
This reverts commit 0f28a8d120.

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-16 09:42:28 +01:00
Andrzej Głąbek 507f4b31d1 samples: drivers: w1: Enable arduino_i2c and arduino_serial explicitly
This sample uses the arduino_i2c and arduino_serial DT nodes, so it
should enable them explicitly, not assume they will be enabled by
default for a given board.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-01-16 09:26:10 +01:00
YuLong Yao 6a8a27ee78 samples: adc: add support for gd32a503v_eval board.
add support for gd32a503v_eval board.

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
YuLong Yao 0f28a8d120 samples: jesd216: add support for gd32a503v_eval board
add support for gd32a503v_eval board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
YuLong Yao 272aa129fa samples: spi_flash: add support for gd32a503v_eval board
add support for gd32a503v_eval board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
YuLong Yao ba1af141c1 samples: drivers: dac: add support for gd32a50x
add support for gd32a50x

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
TOKITA Hiroshi fed4e1857f boards: gd32f450i_eval: Enable DMA transfer for nor-flash
Enable DMA transfer via SPI bus for nor-flash.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-01-11 08:50:56 -08:00
Tom Burdick c0435dbbb4 samples: Replace dmic tag with lower case
Replaces the capitalized DMIC tag with dmic as tags in Zephyr are by
convention lower case.

Was unexpectedly building this sample for intel boards while ignoring
dmic (lower case tag).

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-10 18:29:35 -05:00
Tom Burdick 6fed49b765 samples: Replace i2s tag with lower case
Replaces the capitalized I2S tag with i2s as tags in Zephyr are
by convention lower case.

Unexpectedly built the i2s echo sample when given the lower case tag in the
ignore.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-10 18:29:35 -05:00
Daniel DeGrasse 64ff9aa4d2 samples: drivers: adc: add support for RT595
Add support for RT595 evk to adc driver sample. RT595 uses external
reference voltage, which is set to 1.8V on this board.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-08 19:48:54 +01:00
Fabio Baltieri 792469aae9 yamllint: indentation: fix files in samples/
Fix the YAML files indentation for files in samples/.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 14:23:53 +01:00
Daniel DeGrasse 0eb0e2b025 samples: drivers: memc: add sample to test memory controllers
Add sample to test memory controllers that map external RAM into
SOC address space. This sample uses the "sram-ext" alias
node to determine the base address and size of the external RAM
device.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-04 10:35:25 +01:00
Fabio Baltieri 7db1d17ee3 yamllint: fix all yamllint line-length errors
Fix all line-length errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(line-length)'

Using a limit is set to 100 columns, not touching the commandlines in
GitHub workflows (at least for now).

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Fabio Baltieri e0cc2b8dd0 yamllint: fix all yamllint hyphens errors
Fix all hyphens errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(hyphens)'

Default config is only one space after the hyphen.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Fabio Baltieri 5c32300861 yamllint: fix all yamllint truthy errors
Fix all thruthy errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(truthy)'

This only accepts true/false for boolean properties. Seems like python
takes all sort of formats:

https://github.com/yaml/pyyaml/blob/master/lib/yaml/constructor.py#L224-L235

But the current specs only mention "true" or "false"

https://yaml.org/spec/1.2.2/#10212-boolean

Which is the standard yamllint config.

Excluding codeconv and workflow files, as some are using yes/no instead
in the respective documentation.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Oliver Barta 5ad6a7989f boards: rpi_pico: avoid conflicting use of LED
led0 and pwm_led0 are both referring to the same LED. The usage is
mutualy exclusive, as only one pin muxing can be applied.

Disabling child nodes is currently neither supported by gpio-leds device
nor by pwm-leds device. We need to disable either of the devices
completely for correct operation.

Please note that even if disabling of child nodes would be supported, the
devices would be empty anyway, as both have only one singe LED defined at
the moment. Therefore we can completely disable one of the devices in any
case.

Fixes: b876ad9d6f ("boards: arm: rpi_pico: add pwm bindings to
  devictree")
Signed-off-by: Oliver Barta <o.barta89@gmail.com>
2023-01-02 13:03:46 +01:00
Oliver Barta e24bfc53a6 samples: drivers: led_pwm: fix divider setting for rpi_pico
The fractional part of the divider value is a 4 bit value.

Fixes: 91f659d70a ("samples: led_pwm: add overlay for rpi_pico board")
Signed-off-by: Oliver Barta <o.barta89@gmail.com>
2023-01-02 13:03:46 +01:00
Oliver Barta 681d44b773 samples: drivers: led_pwm: enable immediate logging mode
The default deferred logging mode is not appropriate here. The LOG_INF
messages "Turned on", "Turned off", ... indicate the current state and
should be printed immediately to keep log output in sync with actual
LED state.

Signed-off-by: Oliver Barta <o.barta89@gmail.com>
2023-01-02 13:03:46 +01:00
Trent Piepho 8c8d41c32f samples: drivers: uart: Detect missing FIFO mode in echo_bot
Print an error message if the UART doesn't support FIFO mode or FIFO
mode is not enabled.

Previously the sample would run with no errors, but wouldn't receive or
echo any data.

Signed-off-by: Trent Piepho <tpiepho@gmail.com>
2022-12-31 18:24:32 +01:00
Jay Vasanth 0727421862 samples: drivers: clock_xec: Add MEC172x and MEC152x clock driver sample
MEC172x and MEC152x sample demonstrating clock control driver.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-12-28 10:43:03 +01:00
HaiLong Yang d850bec2c8 samples: drivers: adc: add gd32l233r_eval board
adc sample support gd32l233r_eval board.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-12-28 10:37:52 +01:00
Marek Matej 4a64919c36 samples: driver: adc: Add ESP32 boards support files
Add example code to cover single-shot ADC for ESP32, S2, C3 chips.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2022-12-23 23:45:05 +00:00
Marek Matej 937ea00e7a drivers: adc: esp32: Add support for single-shot conversion
Allow single-shot adc conversion on all supported targets.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2022-12-23 23:45:05 +00:00
Daniel DeGrasse 71e95ae29d samples: drivers: adc: fixup ADC sample support for LPADC
Fixup ADC sample support for boards with LPADC present. This ADC only
supports an external reference voltage, which is a board-specific value.
Add reference voltage values for all supported boards.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-12-22 11:04:42 +01:00
Erwan Gouriou 66d4c64966 all: Fix "#if IS_ENABLED(CONFIG_FOO)" occurrences
Clean up occurrences of "#if IS_ENABLED(CONFIG_FOO)" an replace
with classical "#if defined(CONFIG_FOO)".

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-12-21 10:09:23 +01:00
Mateusz Sierszulski 85a90d7448 samples: drivers: counter: support alarm sample in counter_gecko_stimer
This commit adds sample support for the counter_gecko_stimer
driver.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2022-12-20 22:50:19 +01:00
Andriy Gelman 1bd34d89f9 samples: drivers: adc: Add xmc45_relax_kit overlay
Adds xmc45_relax_kit overlay to run the sample.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-12-20 14:17:23 +01:00
Marek Matej 85b879594d samples: board: esp32: DAC sample code
Sample code demonstrate the DAC on ESP32 and ESP32-S2

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2022-12-13 16:29:38 +00:00
TOKITA Hiroshi e965db984d samples: counter: alarm: add support for GD32 boards
Add support for boards that implements the GD32 SoCs.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-12-12 10:08:12 +01:00
Andrzej Głąbek 7d5c9fa7a9 samples: Use immediate logging mode in watchdog related samples
Starting with commit b9b43a0eb772a464bba13833d11e3a31fbf4e09e, printk()
messages are handled by the logging subsystem. This can cause trouble
in watchdog related samples if the deferred logging mode is used (and
currently it is by default), because those samples are ended by a reset
and some messages may not get a chance to be outputted.
Since the same problem concerns also the ordinary logging messages that
may be produced during execution of the samples, this commit fixes it
by switching to the immediate logging mode, not by just disabling the
LOG_PRINTK option.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-12-10 09:45:02 +01:00
Anas Nashif 37c4110104 samples: jesd216: fix integration platforms
Fix integration platforms to match what is allowed (platform_allow).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-12-05 14:55:00 +01:00
Andrzej Puzdrowski 0e8005e860 sample/drivers/jesd216: spi-nor config for nrf52840dk
Added configuration which allows to test the sample using SPI_NOR
driver instead of NRF_QSPI driver.
SPI_NOR driver is generic, so nice to add possibility to check
how it is working.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-12-05 12:11:29 +01:00
Jay Vasanth 06fde72092 samples: drivers: led: Add sample for Microchip XEC LED driver
Add a sample program demonstrating the LED driver for Microchip's
XEC microcontrollers. The sample can be built for MEC152x and
MEC172x.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-12-02 11:31:50 +01:00
Gerard Marull-Paretas e0c8de1e39 drivers: regulator: fixed: simplify implementation
Remove regulator-fixed-sync specialization, create a single driver that
is always synchronous. The asynchronous part is rarely/never used, so
let's keep things simple for now.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-30 15:49:30 +01:00
Manuel Arguelles cc70daacdf samples: counter: support System Timer on s32z270dc2_r52
Enable counter alarm sample on s32z270dc2_r52 boards, using the first
System Timer Module instance.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-11-30 11:29:39 +01:00
Anas Nashif ba7d730e9b tests/samples: use integration_plaforms in more tests/samples
integration_platforms help us control what get built/executed in CI and
for each PR submitted. They do not filter out platforms, instead they
just minimize the amount of builds/testing for a particular
tests/sample.
Tests still run on all supported platforms when not in integration mode.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-29 16:03:23 +01:00
Gerson Fernando Budke 5c773ae45e samples: drivers: counter: alarm: Add support to TFM
Add cmake rules to allow build boards with TFM enabled.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-11-29 13:40:27 +00:00
Francois Ramu b839a0f9db samples: drivers: jesd216 jedec ID and SFDP from octo-flash
This adds the support jedec configuration to run
the jedec  sample application. So target boards can display
the content of the octo-NOR flash
of the stm32u585 and stm32l562 or stm32h735 disco boards.
The sfdp-bfp table is provided as example (overlay file),
to run this sample on the stm32l562e_dk platform.
It has to be defined in the deviceTree "in cases were runtime
retrieval of SFDP data is not desired."

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-29 09:32:22 +00:00
Francois Ramu 819cb95438 boards: arm: stm32l562e_dk includes the sdfp table for its octoflash
Moving the SDFP table property from the sample to the device tree
of the stm32l562e_dk disco kit.
The MX52lm51245 Nor octoflash mounted on this boarddoes not
provide its own internal SFDP parameters.
With this patch, the SFDP table is given by the board DTS.
So that the stm32 ospi driver can initialized the  NOR octoflash
correctly with the parameter from that property instead of
relying on the nor octoflash.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-24 09:37:07 +01:00
Francois Ramu d24f3b9baa samples: drivers: jesd216 jedec ID and SFDP from octo-flash
This adds the support jedec configuration to run
the jedec  sample application. So target boards can display
the content of the octo-NOR flash
of the stm32u585 and stm32l562 or stm32h735 disco boards.
The sfdp-bfp table is provided as example (overlay file),
to run this sample on the stm32l562e_dk platform.
It has to be defined in the deviceTree "in cases were runtime
retrieval of SFDP data is not desired."

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-22 14:26:57 +00:00
Francois Ramu 055c1c637e samples: drivers: stm32u5x octospi enables DMA
Adds the dma transfer for the octoSPI on NOR octo Flash
of the b_u585i_iot02a disco kit.
The channel for the GPDMA is 0-15 (0-7 for DMA1, 8-15 for DMA2)
The channel 12 to 15 are used for GPDMA transfers
to/from external memories.
The request is 41 for the OCTOSPI2.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-22 12:00:00 +00:00
Chris Friedt 7a0fd7ad14 samples: drivers: flash_shell: disambiguate flash shell app
Both `drivers/flash/flash_shell.c` and
`samples/drivers/flash_shell/src/main.c` provide a flash shell
utility called `flash`.

Rename the latter to disambiguate.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-19 14:24:38 -05:00
Henrik Brix Andersen f0199dc3e7 samples: drivers: eeprom: remove EEPROM shell overlay
Remove the EEPROM shell overlay from the EEPROM driver sample as this was
only introduced as a build test for the EEPROM shell. This is now done in
tests/drivers/eeprom/shell.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-11-15 09:43:42 -06:00
Daniel DeGrasse 1aa01c18bb samples: drivers: ipm: update to use sysbuild
Update ipm_mcux sample to use sysbuild for multicore images

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-15 14:46:02 +01:00
Chris Friedt dae6d2f84b samples: drivers: fpga: fpga_controller: fix links in README.rst
Markdown links were incorrectly used in this ReST document.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-15 05:59:09 -05:00
Anas Nashif 67e8d03280 tests/samples: fix some missing tags
Many driver samples or tests only had 'drivers' as the tag, without a
tag indicating what driver that is exactly, so add some missing tags.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-14 07:08:04 -05:00
Yonatan Schachter b49b11555c samples: flash_shell: Fix flash range printing
When running a flash read command on the flash shell, the hexdump
prints came out incorrect. There was a space missing between the
ninth element and its preceding "|", and a redundant newline.
This commit fixes this issue.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-11-14 12:38:03 +01:00
Francois Ramu 838cd28195 samples: drivers: watchdog stm32 wwdg decrease apb clock
The most of the wwdg peripherals requires a reduced apb clock
to pass the sample.drivers.watchdog.stm32_wwdg testcase.
This apb1 prescaler is added to the overlay file
for that particular clock.
Specific overlay for the stm32h7 family because of the APB1
bus clock named d2ppre1.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-11 08:40:23 +00:00
Jose Alberto Meza 2a8f7188c6 samples: drivers: peci: Add mec172xxebv overlay
Define DT alias for PECI

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2022-11-08 09:42:27 +00:00
Stancu Florin b9f462e890 boards: cc13x2/cc26x2*: add ADC sample + update docs
Add ADC driver sample overlays + update features in doc + metadata for TI
CC13x2/CC26x2 based boards (cc1352r_sensortag, cc1352r1_launchxl,
cc26x2r1_launchxl).

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2022-11-04 17:31:59 -04:00
Kamil Serwus 278120acb6 board: samc21: add support for SAMC21N Xplained Pro Board
Add basic support board with SAMC21N soc including SPI, UART, I2C,
ADC, Flash, Leds.

Signed-off-by: Kamil Serwus <kserwus@gmail.com>
2022-11-04 16:03:01 +01:00
Henrik Brix Andersen 836f582664 drivers: can: skip all CAN loopback mode tests for kvaser,pcican
Skip all CAN controller tests utilizing CAN loopback mode for the
kvaser,pcican CAN controller card as emulated in QEMU.

QEMU emulation of the SJA1000 CAN controller backend does not yet support
the SJA1000 Self Reception Request command which is required for proper
loopback operation.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-11-01 15:22:31 -04:00
Henrik Brix Andersen 05d02e2dac samples: drivers: can: counter: use printf() instead of printk()
Use printf() instead of printk() for printing sample output. According to
the documentation Zephyr printk() and friends are for printing kernel debug
messages.

With printf() instead of printk() the CAN counter sample passes twister
test execution on native_posix and native_posix_64.

Fixes: #50570

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-11-01 09:02:41 +00:00
Kumar Gala 117039ca2b IPM: remove defconfig/proj setting of IPM drivers
Now that IPM drivers are enabled based on devicetree we can
remove any cases of them getting enabled by Kconfig, *defconfig*,
and *.conf files.

We need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 16:45:56 -05:00
Henrik Brix Andersen 30c7d31fde samples: drivers: can: babbling: set CAN-FD mode if requested
Set the CAN controller to CAN-FD mode before attempting to send FD format
frames.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-25 16:32:10 +02:00
Henrik Brix Andersen f8a88cdb27 drivers: can: use flags fields for can_frame and can_filter structs
The can_frame and can_filter structs support a number of different flags
(standard/extended CAN ID type, Remote Transmission Request, CAN-FD format,
Bit Rate Switch, ...). Each of these flags is represented as a discrete bit
in the given structure.

This design pattern requires every user of these structs to initialize all
of these flags to either 0 or 1, which does not scale well for future flag
additions.

Some of these flags have associated enumerations to be used for assignment,
some do not. CAN drivers and protocols tend to rely on the logical value of
the flag instead of using the enumeration, leading to a very fragile
API. The enumerations are used inconsistently between the can_frame and
can_filter structures, which further complicates the API.

Instead, convert these flags to bitfields with separate flag definitions
for the can_frame and can_filter structures. This API allows for future
extensions without having to revisit existing users of the two
structures. Furthermore, this allows driver to easily check for unsupported
flags in the respective API calls.

As this change leads to the "id_mask" field of the can_filter to be the
only mask present in that structure, rename it to "mask" for simplicity.

Fixes: #50776

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-25 16:32:10 +02:00
Felipe Neves 5760fcc8ab soc: xtensa: esp32_net:
Fixes boot sequence for esp32_net, also reflect the changes in the
esp32 ipm driver.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-10-19 16:03:00 +02:00
Gerard Marull-Paretas 6a0f554ffa include: add missing kernel.h include
Some files make use of Kernel APIs without including kernel.h, fix this
problem.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Benjamin Björnsson 2ba91ce850 samples: flash_shell: Add board to platform_exclude list
Exclude Arduino Portenta H7 because the flash driver isn't
supported yet on the M4 core.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-10-06 13:52:40 -05:00
TOKITA Hiroshi c28fd3079e samples: driver: watchdog: Add GD32 SoCs support
Add support for boards that implement GD32 SoC.

Overlay file for longan_nano_lite enables FWDGT.

Add WDT_FEED_INTERVAL to make adjustable
the execution cycle of wdt_feed().

And also, make waiting for the WDT_FEED_INTERVAL period
for the watchdog window opens at the start of the test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-10-03 18:07:16 +02:00
Martin Jäger 9cec058e8e boards: posix: native_posix: enable can_loopback0 by default
The .yaml file states that CAN is supported, but the basic sample
application samples/drivers/can/counter cannot be compiled without
additional configuration.

The loopback driver does not require any additional steps like the
linux SocketCAN driver, so it is safe to enable it by default and
get rid of the many overlay files in the tests.

ISO-TP tests and the counter sample are excluded via .yaml from
twister tests because of timing issues.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-10-03 10:17:12 +02:00
Jose Alberto Meza dafdef83b4 samples: drivers: espi: Re-enable eSPI SAF for MEC152x board
Add missing device tree entry for SAF HW block.
Re-enable driver for MEC152x board.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2022-09-29 14:59:32 +00:00
Stephanos Ioannidis a0d335042a samples: ft800: Update outdated links
Apparently the URLs for these old products have been moved to under
"old2020" without any redirects ...

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis 016fc8c22f samples: grove_display: Update outdated link
The "Grove Base Shield" seems to be no longer listed in the Seeed
website, so its link is replaced with that of the "Base Shield V2",
which is the successor of the "Grove Base Shield."

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis 579de846b2 samples: led_lpd8806: Remove outdated link
The "RGB LED strips: an overview" link no longer works and there is no
direct replacement, so there is no point in listing this document in
the references anymore.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis 50cced58d2 samples: counter: maxim_ds3231: Fix outdated link
This commit fixes the outdated link to the "Chronodot" product page.

It seems "macetech" no longer lists the older versions of this product
with DS3231, so the link has been replaced with the one from Adafruit.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Jordan Yates 58b65082c2 samples: lora: remove platform_allow
The twister docs specify that `platform_allow` should only be used
if applications can only possibly run on the specified platforms. This
is not the case for these applications, which should be able to run on
any board with LoRa support.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-09-29 08:59:03 +00:00
Jay Vasanth 3bab0081dd samples: espi: add pinctrl in mec1501 board overlay
update mec1501modular board overlay to include pinctrl
properties for spi

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Thomas Stranger c1592fd4c7 samples: drivers: can: babbling: start can node
The device must be started before sending any frames.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-16 08:26:47 +00:00
Henrik Brix Andersen 180cdc105e drivers: can: add start and stop CAN controller API functions
Up until now, the Zephyr CAN controller drivers set a default bitrate (or
timing) specified via devicetree and start the CAN controller in their
respective driver initialization functions.

This is fine for CAN nodes using only one fixed bitrate, but if the bitrate
is set by the user (e.g. via a DIP-switch or other HMI which is very
common), the CAN driver will still initialise with the default
bitrate/timing at boot and use this until the application has determined
the requested bitrate/timing and set it using
can_set_bitrate()/can_set_timing().

During this period, the CAN node will potentially destroy valid CAN frames
on the CAN bus (which is using the soon-to-be-set-by-the-application
bitrate) by sending error frames. This causes interruptions to the ongoing
CAN bus traffic when a Zephyr-based CAN node connected to the bus is
(re-)booted.

Instead, require all configuration (setting bitrate, timing, or mode) to
take place when the CAN controller is stopped. This maps nicely to entering
"reset mode" (called "configuration mode" or "freeze mode" for some CAN
controller implementations) when stopping and exiting this mode when
starting the CAN controller.

Fixes: #45304

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-13 16:06:50 +00:00
Mulin Chao 839031271f driver: espi: npcx: add the controller attached flash sharing API
Add the flash channel support by implementing the controller attached
flash sharing APIs, including flash_read, flash_write, and flash_erase.
For flash_read, the max data payload the module can support is 64 bytes
in one transaction.
For flash_write, the max data payload the module can support is 16
bytes in one transaction.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2022-09-09 16:30:51 -04:00
Thomas Stranger 2ef81686b6 samples/drivers/w1: scanner: add ds2485 overlay
Adds an overlay for the ds2485 and adds a test configuration
for it.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-09 14:11:30 +00:00
Francois Ramu 3402dfb3da samples: drivers: stm32h7 octospi enables DMA
Adds the dma transfer for the octoSPI on NOR octo Flash
of the stm32h7b3i and stm32h735g disco kits.
The channel for the MDMA is 0-15.
The MDMA request is 0x16 for the OCTOSPI1 fifo threshold

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-08 10:07:21 +00:00
Francois Ramu 446b09361a samples: drivers: stm32l562 octospi enables DMA
Adds the dma transfer for the octoSPI on NOR octo Flash
of the stm32l562e_dk disco kit.
The channel for the DMAMUX is 0-15 (0-7 for DMA1, 8-15 for DMA2)
The DMAMUX request is 41 for the OCTOSPI.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-08 10:07:21 +00:00
HaiLong Yang ebc4a37a21 samples: flash_shell: add support for gd32 boards
After add zephyr,flash-controller property, most gd32 boards support
flash_shell sample.

gd32vf103c_starter and gd32vf103v_eval only have 32KB SRAM, so we
should reduce CONFIG_HEAP_MEM_POOL_SIZE to 8KB.

gd32f350r_eval only have 16KB driver, exclude from flash_shell sample.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-09-08 10:13:05 +02:00
TOKITA Hiroshi 519af86d38 samples: drivers: adc: Add rpi_pico support
Add support for rpi_pico board to adc driver sample.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-09-06 17:11:19 +02:00
Henrik Brix Andersen 424f696ce9 samples: drivers: can: add babbling node sample
In a Controller Area Network a babbling node is a node continuously (and
usually erroneously) transmitting CAN frames with identical - often high -
priority. This constant babbling blocks CAN bus access for any CAN frame
with lower priority as these frames will loose the bus arbitration.

Being able to simulate a babbling CAN node is useful when examining the
behavior of other nodes on the same CAN bus when they constantly loose bus
arbitration.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-09-06 09:56:57 +02:00
Henrik Brix Andersen 795280e2a2 samples: drivers: can: rename the CAN counter sample
Rename the CAN controller "counter" sample to make room for more CAN
related samples.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-09-06 09:56:57 +02:00
Dominik Ermel d69bc24702 samples/soc_flash_nrf: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Gerard Marull-Paretas 79e6b0e0f6 includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.

The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.

NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-05 16:31:47 +02:00
Kumar Gala 00931ddf77 samples: i2s: echo: Remove DT_COMPAT_<compat> defines
We auto-generate DT_COMPAT_<compat> defines so we dont need to
explicitly define them anymore.

NOTE: we need to source Kconfig.zephyr first to pull in the autogen
Kconfig.dts files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-09-01 14:58:25 +00:00
Henrik Brix Andersen 720eeab30f samples: drivers: can: increase the maximum number of shell arguments
Remove the custom Kconfig value for CONFIG_SHELL_ARGC_MAX as it is too low
to account for the new arguments to the "can send" shell command.

The default for CONFIG_SHELL_ARGC_MAX was increased to 20 in
32ebeb0a5c which is sufficient for sending
non-CAN-FD format frames using the new "can send" shell command.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-31 10:45:35 +02:00
Gerard Marull-Paretas 50cfb3a567 samples: drivers: led_pwm: use DT_FOREACH_CHILD_SEP_VARGS
use DT_FOREACH_CHILD_SEP_VARGS to avoid an auxiliary macro.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-30 16:19:57 +02:00
Kumar Gala 492a741d9f crypto: remove proj setting of crypto drivers
Now that crypto drivers are enabled based on devicetree we can
remove any cases of them getting enabled by proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-30 10:43:12 +00:00
Katarzyna Giadla 52fe06495d samples: Rename 'samples' to 'sample'
Samples testcases should start with 'sample'. Some testcases
start with 'samples'.
This commit rename these testcases.

Signed-off-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
2022-08-29 07:30:42 -04:00
Gerard Marull-Paretas a202341958 devices: constify device pointers initialized at compile time
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).

Automated using:

```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-22 17:08:26 +02:00
Francois Ramu e195c3cad3 samples: drivers: adc running on the stm32U575 nucleo board
This change creates an overlay file so that the adc sample
is running on the nucleo_u575zi_q board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-22 10:23:53 +00:00
Gerard Marull-Paretas e0125d04af devices: constify statically initialized device pointers
It is frequent to find variable definitions like this:

```c
static const struct device *dev = DEVICE_DT_GET(...)
```

That is, module level variables that are statically initialized with a
device reference. Such value is, in most cases, never changed meaning
the variable can also be declared as const (immutable). This patch
constifies all such cases.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas af61ed61f5 samples: drivers: ps2: fix test issues
- Test effectively requires a microchip,xec-ps2, but it was "optional"
  even though the test continued setting up a callback that makes use of
  the device.
- Improve test filtering so that it requires a valid compatible to be
  enabled (allows to delete redundant ps2 tag)
- Initialize device at compile time (allowing to constify its pointer)

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas 14968b4f0f samples: drivers: peci: improve test
- Require peci-0 alias (test without it is pointless)
- Initialize peci device at compile time
- Filter depending on alias
- Remove redundant peci tag

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas 86b5517f99 samples: drivers: espi: initialize devices at compile time
Initialize devices at compile time so that device pointers can be
constified.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Henrik Brix Andersen 590cd5cb72 drivers: can: rename can_state enumerations
Rename the can_state enumerations to contain the word STATE to make their
meaning more clear:
- CAN_ERROR_ACTIVE  => CAN_STATE_ERROR_ACTIVE
- CAN_ERROR_WARNING => CAN_STATE_ERROR_WARNING
- CAN_ERROR_PASSIVE => CAN_STATE_ERROR_PASSIVE
- CAN_BUS_OFF       => CAN_STATE_BUS_OFF

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 21:41:11 +00:00
Henrik Brix Andersen 13c75417ba drivers: can: remove z prefix from public CAN API types
Remove the "z" prefix from the public CAN controller API types as this
makes them appear as internal APIs.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 10:19:29 +02:00
Katarzyna Giadla eae01f0fc5 samples: tests: Rename duplicated testcases
Names of some testcases are duplicated in another files.
This change rename duplicated testcases.

Signed-off-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
2022-08-17 12:11:00 +02:00
Tim Cooijmans ea80d9e1d7 samples: drivers: lora: Add public_network and iq_inverted config
Explicitly set the newly add public_network and iq_inverted settings
in lora_modem_config in the lora send and receive samples.

Signed-off-by: Tim Cooijmans <timcooijmans@gmail.com>
2022-08-16 18:06:18 +02:00
Felipe Neves d94dc98fd6 soc: xtensa: esp32_net: fixes include paths
that were changed with zephyr prefix  after rebasing.
Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Felipe Neves d808fa2c6d samples: drivers: ipm_esp32: add return
when ipm driver initialization fails.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Felipe Neves a5379b71f8 drivers: ipm: ipm_esp32: remove hardcoded nodelabels
by making shared memory property  of IPM binding.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Felipe Neves 0e17b8307a samples: drivers: ipm: added esp32 sample
code to demonstrate the utilization of assymetric
dual core infrastructure based on soft-IPM implementation.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Thomas Stranger daa477f75b samples/tests: w1: remove overlays after moving to 'select bus'
Because 1-wire drivers no longer use depends on serial/i2c, but select
the Kconfig for the bus they depend on, several overlays can be removed.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-08-14 09:08:19 -05:00
Kumar Gala 5ac8fca9cb kscan: Introduce zephyr,keyboard-scan chosen prop
Introduce zephyr,keyboard-scan chosen node property to point to the
node that implements the default KSCAN device.  This is similar to
the zephyr,display property.

We switch over the samples to utilize the new property instead of
kscan0 alias.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 17:54:03 -05:00
Kumar Gala 5281b58d29 samples: espi: disable SAF testing
espi saf node is not enabled in mec15xxevb_assy6853.dts so the sample
will fail to build.  For now disable CONFIG_ESPI_SAF to get the sample
to build.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 17:59:05 +02:00
Kumar Gala 9e8fb08c0f eeprom: remove defconfig/proj setting of eeprom drivers
Now that eeprom drivers are enabled based on devicetree we can
remove any cases of them getting enabled by proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 11:34:16 +02:00
Francois Ramu 8ec02948c5 samples: drivers: watchdog application running on stm32 boards
Adding configuration to run the watchdog sample application
on the stm32 boards through 2 common overlay files:
one for running on the IWDG one for WWDG, if compatible.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-11 17:47:05 +02:00
Kumar Gala 0e1a7e0241 drivers: led: Remove unnecessary Kconfig settings
Having the LED device enabled in devicetree will now get the driver
enabled by default when CONFIG_LED=y is set.  So we can remove
setting driver enabling Kconfig values in various .conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-11 17:46:43 +02:00
Kumar Gala 6de4cc5293 samples: i2s: echo: exclude litex_vexriscv
The litex platform has its own sample and echo sample does not
build on litex_vexriscv so exclude it.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-11 12:20:33 +02:00
Glauber Maroto Ferreira 7a58522b54 esp32: counter: samples: fix build config
Remove unnecessary build config and rename
Kconfig build variable.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-08-08 13:00:38 -05:00
Reto Schneider 1c1801ee7f drivers: eeprom: Fix format strings
Building for native_posix_64 exposes faulty format strings.

Changes in this commit also ensure that the shell code gets built in CI,
thus this kind of problem can not be introduced again later on.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-08-07 14:29:36 +01:00
Gerard Marull-Paretas c26d7259f8 samples: drivers: lcd_cyclonev_socdk: add missing CONFIG_I2C=y
The sample relies on using I2C API, so it must enable CONFIG_I2C.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-05 12:55:51 +02:00
Kumar Gala 346ac6b896 samples: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from samples.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-01 17:59:32 +02:00
Caspar Friedrich f2a7b88ef5 samples: Add 1-Wire scanner example
This adds a simple example to show basic 1-Wire bus operations

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2022-08-01 10:33:10 +02:00
Dominik Ermel 21f1c54089 samples/soc_flash_nrf: Fix flash device reference
Sample has been referencing flash area by its label, but flash device
by chosen `zephyr,flash-controller`, while flash area does not have
to be positioned on a device selected by the chosen directive.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-07-30 08:26:21 -05:00
Kumar Gala 2014c59d20 clock_control: remove defconfig/proj setting of clock control drivers
Now that clock control drivers are enabled based on devicetree we
can remove any cases of them getting enabled by *defconfig and
proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-29 14:12:12 +02:00
Aastha Grover 66786ed612 samples: Add missing sample.yaml
Adding the yaml files to sub-applications to avoid bitrot and
specifying the main applications with remote harness instead of
build_only.

Fixes #47613

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-07-28 20:51:14 +02:00
Francois Ramu 8aa3960874 samples: drivers flash add a test case for stm32h7 octospi
This add a removes the SPI config
for the stm32H735 and stm32H7b3 disco boards
when testing the octoSPI.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-07-27 18:46:25 +02:00
Kumar Gala fb9c241530 spi: remove defconfig/proj setting of SPI drivers
Now that SPI drivers are enabled based on devicetree we can remove
any cases of them getting enabled by *defconfig and proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-27 09:49:00 +02:00
Carlo Caione 780ee52bde samples: Add missing READMEs
Add some missing README.rst

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-25 15:17:48 +02:00
Carlo Caione ecdf224766 samples: Specify the remote harness
Instead of 'build_only'.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-25 15:17:48 +02:00
Carlo Caione badafa59c5 samples: Add missing sample.yaml
Some samples are missing the sample.yaml file.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-25 15:17:48 +02:00
Benjamin Björnsson 6ede1da434 samples: drivers: led_pwm: Update driver to remove DEVICE_DT_GET
Update driver to use DEVICE_DT_GET and remove usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-23 11:39:11 -05:00
Kumar Gala 6b5ae7799a samples: fpga: Convert to test to use use DEVICE_DT_GET
Update sample to use DEVICE_DT_GET to remove usage of
device_get_binding.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-23 09:28:40 -05:00
Benjamin Björnsson 84649d2d83 samples: drivers: spi_flash: Update sample to use alias
Simplify driver by using DT_ALIAS instead of DT_LABEL.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-22 19:15:13 +00:00
Kumar Gala 6cfaa9c381 samples: crypto: Convert to use Update sample to use DEVICE_DT_GET_ONE
Update sample to use DEVICE_DT_GET_ONE to remove usage of
device_get_binding if the device is devicetree based.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-21 14:00:38 +00:00
Benjamin Björnsson 706949cf71 samples: drivers: espi: Convert to use DT_NODELABEL
Convert to use DT_NODELABEL to remove usage of DT_INST in sample.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 06:06:02 -05:00
Benjamin Björnsson 2bed3950c3 samples: drivers: ht16k33: Update sample to remove use of DT_INST
Simplify sample by removing usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 05:31:57 -05: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
Benjamin Björnsson 1f630f838a samples: drivers: watchdog: Update sample to use alias
Simplify sample by using DT_ALIAS to make the sample more generic.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 09:28:43 -05:00
Benjamin Björnsson f047816f0f samples: drivers: watchdog: Add alias to overlays
Add alias to overlays for boards that switch the watchdog to be
used while running this sample.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 09:28:43 -05:00
Benjamin Björnsson 55d47d341a samples: drivers: watchdog: Remove uneccesary overlays
These watchdogs are already enabled in device tree.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 09:28:43 -05:00
Tomislav Milkovic 0fe2c1fe90 everywhere: Fix legacy include paths
Any project with Kconfig option CONFIG_LEGACY_INCLUDE_PATH set to n
couldn't be built because some files were missing zephyr/ prefix in
includes
Re-run the migrate_includes.py script to fix all legacy include paths

Signed-off-by: Tomislav Milkovic <milkovic@byte-lab.com>
2022-07-18 16:16:47 +00:00
Aastha Grover 35f42797b8 samples: drivers: fpga: merge both samples and add sample.yaml
Merge the fpga_controller and fpga_controller shell
sample applications and add sample.yaml to enable testing in
twister.

Fixes #47613

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-07-18 10:28:08 -05:00
Attie Grande adeb181a72 boards: arm: atsamr34: Add SAMR34 Xplained board
Implement support for SAMR34 Xplained Pro dev board.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-07-18 10:35:46 +00:00
Attie Grande 876dc19d27 boards: arm: atsaml21: Add SAML21 Xplained board
Implement support for SAML21 Xplained Pro dev board.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-07-18 10:35:46 +00:00
Jimmy Ou d98cad84c6 samples: drivers: display: add support for max7219
Add max7219_8x8 into sample.yaml for testing.

Signed-off-by: Jimmy Ou <yanagiis@gmail.com>
2022-07-15 10:10:48 +02:00
Attie Grande d713aa8e2f samples: drivers: adc: fixup sam0 samples
The sam0 ADC driver has ADC_CONFIGURABLE_INPUTS enabled, which means
that the device tree ADC nodes must include the zephyr,input-positive
property.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-07-14 10:31:19 +02:00
Glauber Maroto Ferreira c4ed27f0ec esp32: samples: counter: conf removal & overlay inclusion
Removes deprecated conf files from the counter/alarm
sample and adds overlays to enable timer nodes in use.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-07-13 15:53:04 +02:00
Gerard Marull-Paretas e0c647c147 samples: drivers: flash_shell: remove duplicate include
<stdlib.h> was included twice, keep the first occurence only.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 17:56:55 +02:00
Gerard Marull-Paretas d424d66aff samples: drivers: flash_shell: remove unused soc.h
The sample included soc.h for no reason, remove it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 17:56:55 +02:00
Kumar Gala ca22924f2f samples: drivers: espi: 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-11 10:51:30 +02:00
Kumar Gala d1b685a84b samples: drivers: espi: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-11 10:51:30 +02:00
Yuriy Vynnychek 99479ecbda drivers: adc: introduce new Telink B91 ADC driver
ADC driver basic support for Telink B91 SoC.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2022-07-08 11:07:18 +02:00
Kumar Gala a4ae3afd1f samples: ps2: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE 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-08 11:03:23 +02:00
Kumar Gala b77aeb0c21 samples: counter: maxim_ds3231: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE 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-08 10:52:34 +02:00
Kumar Gala 43c4066e0e samples: spi_bitbang: 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-08 10:52:21 +02:00
Kumar Gala 4415a3bd3c samples: drivers: spi_flash: Exclude hifive_unmatched
hifive_unmatched has a jedec,spi-nor flash node, however we have no
SPI driver for the controller so exclude the platform from this sample.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 09:36:43 +02:00
Kumar Gala 3cfc8d5875 samples: spi_flash: 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-08 09:36:43 +02:00
Joep Buruma 91f659d70a samples: led_pwm: add overlay for rpi_pico board
Add an overlay for rpi_pico board to the led_pwm sample.
This board only supports fairly high pwm frequencies so
the blinking of the LED is not supported. Turning it on/off
and fading is.

Signed-off-by: Joep Buruma <burumaj50@gmail.com>
2022-07-07 15:17:26 +02:00
Kumar Gala 465cc93bf0 samples: drivers: i2s: echo: Remove DT_LABEL usage
As we phase out usage of 'label' devicetree property, remove uses
of DT_LABEL.  Replace DT_LABEL with swN_spec.port->name.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:27:36 +00:00
Kumar Gala b17bc71889 samples: led_sx1509b_intensity: 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-07 10:09:48 +02:00
Kumar Gala 64819c3ac2 samples: spi_flash_at45: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE 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-07 10:01:15 +02:00