Commit Graph

49056 Commits

Author SHA1 Message Date
Alexandre Bourdiol 68f5626b64 boards/dts: add SPI support to nucleo_wl55jc board
Add SPI support to nucleo_wl55jc board

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-02-19 22:39:24 -05:00
Alexandre Bourdiol d98ce0b9d4 boards/dts: add i2c support to nucleo_wl55jc
Add I2C support to nucleo_wl55jc

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-02-19 22:39:24 -05:00
Alexandre Bourdiol 59ce5af11b drivers: i2c: add support of STM32WL
Add I2C support to STM32WL

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-02-19 22:39:24 -05:00
Alexandre Bourdiol 6663982fde boards: arm: add nucleo_wl55jc board support
Add support of nucleo_wl55jc board

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-02-19 22:39:24 -05:00
Alexandre Bourdiol 0ea63a5a17 soc: arm: st_stm32: add STM32WL support
Add STM32WL soc serie

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-02-19 22:39:24 -05:00
Alexandre Bourdiol 7d11f300b7 dts: arm: st: add STM32WL support
Add STM32WL55Xc device tree

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-02-19 22:39:24 -05:00
Alexandre Bourdiol 096c34114b drivers: interrupt_controller add STM32WL support
Add STM32WL support to interrupt_controller driver

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-02-19 22:39:24 -05:00
Alexandre Bourdiol 91b4350969 drivers: gpio add STM32WL support
Add STM32WL support to gpio driver

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-02-19 22:39:24 -05:00
Alexandre Bourdiol 6e5b0d01f5 drivers: clock_control: add STM32WL support
Add STM32WL support to clock_control driver

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-02-19 22:39:24 -05:00
Francois Ramu b1514d198b tests: subsys: power: add stm32 targets to the power_mgmt_soc test case
New stm32 nucleo boards with CONFIG_PM_DEVICE can pass this test.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-02-19 22:38:50 -05:00
Francois Ramu fc41846935 drivers: clock: stm32 clock control with low power modes
This will export the stm32_clock_control_init function
to restore the clocks after the low power modes.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-02-19 22:38:50 -05:00
Francois Ramu f561c87023 soc: arm: stm32 devices supporting low power modes
stm32wb and stm32l4 are devices which supports the low power
from the Kernel PM, so is the PM_DEVICE defined.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-02-19 22:38:50 -05:00
Francois Ramu 398d52de68 soc: arm: stm32l4 give a weak low power mode devices for policy
In case the policy is not available or defined by th application
the pm_policy_low_power_devices is still valid

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-02-19 22:38:50 -05:00
Francois Ramu d7fab9b0e9 soc: arm: stm32l4 low power mode restoring clocks
The clock configuration is restored by the stm32_clock_control_init
function of the clock_stm32_ll_common driver
when exiting the low power mode

Signed-off-by: Francois Ramu <francois.ramu@st.com>


Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-02-19 22:38:50 -05:00
Francois Ramu 3c18bcbf77 drivers: serial: stm32 restore uart after lowpower
This adds a function to control the uart device during lowpower modes

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-02-19 22:38:50 -05:00
Francois Ramu 930df38e23 soc: arm: stm32wb give a weak low power mode devices for policy
In case the policy is not available or defined by th application
the pm_policy_low_power_devices is still valid

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-02-19 22:38:50 -05:00
Francois Ramu 6e5eb88367 soc: arm: stm32wb low power mode restoring clocks
The clock configuration is restored by the stm32_clock_control_init
function of the clock_stm32_ll_common driver
when exiting the low power mode.
Keeping the stm32wbxx_ll_utils.h in case the PLL is used for wb.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-02-19 22:38:50 -05:00
Daniel Leung e0fe89cdda tests: fpu_sharing: allow board qemu_x86_lakemont
This adds qemu_x86_lakemont to the platform allow list
for the FPU sharing tests. Since Lakemont supports SSE3
and SSSE3, it is better to test them also.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-19 18:51:04 -05:00
Daniel Leung d2602de329 board: x86: add new board qemu_x86_lakemont
This adds a new board qemu_x86_lakemont for testing
the Lakemont SoC configuration.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-19 18:51:04 -05:00
Daniel Leung 78837c769a soc: x86: add Lakemont SoC
This adds a very basic SoC configuration for Intel Lakemont SoC.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-19 18:51:04 -05:00
Daniel Leung cd703ae9cf boards: x86/qemu: enable CPU flags for MMX/SSE
Tells QEMU to enable CPU flags corresponding to MMX/SSE
kconfigs.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-19 18:51:04 -05:00
Daniel Leung 9a189da03b x86: add kconfig CONFIG_X86_MEMMAP
This adds a new kconfig to enable the use of memory map.
This map can be populated automatically if
CONFIG_MULTIBOOT_MEMMAP=y or can be manually defined
via x86_memmap[].

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-19 18:51:04 -05:00
Daniel Leung c027494dba x86: add kconfig CONFIG_X86_PC_COMPATIBLE
This is an hidden option to indicate we are building for
PC-compatible devices (where there are BIOS, ACPI, etc.
which are standard on such devices).

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-19 18:51:04 -05:00
Kumar Gala 49f1e22a13 samples: portability: set integration_platforms to native_posix
Set integration_platforms on these samples to just native_posix.  This
should be sufficient to make sure these tests build and run.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-19 18:49:54 -05:00
Peter Bigot 1fa3447b4e shell: device_service: refine level output
Fix the order so that it reflects the actual initialization order,
rather than putting PRE_KERNEL initializations after APPLICATION.

Add SMP in the proper location.

Use the helper function to provide unique identifiers for "devices"
that don't have a device pointer (so don't have a name).

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-19 15:46:16 -05:00
Peter Bigot f0df72c269 shell: device_service: add dependency information
Refactor the output of device list to use standard API to retrieve the
list of devices, and to always display a status rather than hiding
disabled/failed devices.

Add API to associate a distinct identifier with any "device" that does
not have a name.

Where a device has requires dependencies display the devices on which
it depends.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-19 15:46:16 -05:00
Peter Bigot 9ef62d564d tests: devicetree: add test for devicetree node data
Verify that device dependencies are encoded into and retrievable from
the device structure.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-19 15:46:16 -05:00
Peter Bigot d554d34137 device: add post-process of elf file to manage device handles
Following the idiom used for system calls, add script support to read
the initial application binary to identify which devices are defined,
and to use their offset in the device array as their unique handle
rather than the externally-defined ordinal from devicetree.  The
device dependency arrays are updated to use these handles.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-19 15:46:16 -05:00
Peter Bigot 669bc6b86f device: inject device dependency information from devicetree nodes
Generate arrays of dependency information for each device.  If a
device definition is being constructed from devicetree these come from
the devicetree dependency information.  Additional dependencies may be
passed through using the DT_ macros.

Define flag values for device handles so we can partition the
dependency array into distinct sets, which include things it requires,
things it supports (may not be needed), and child nodes (not
implemented, may not be needed).

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-19 15:46:16 -05:00
Seppo Takalo 91869f3ba5 runners: jlink: Use specific target device for nrf9160DK
When proper target device is specified, instead of generic
Cortex-M33, JLinkGDBServer is able to flash the device on "load"
command.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2021-02-19 14:26:25 -06:00
Anas Nashif ff24090527 tests: filter default platforms
Do not attempt to build/run all tests. Emulation platforms should
primarily build kernel and architecture related tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-19 14:41:01 -05:00
Johann Fischer 9a3ebcccfa usb: hid: make config USB_DEVICE_HID menuconfig
This makes USB device support menu appear more tidy.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-02-19 14:39:26 -05:00
Johann Fischer dac91c0bdc usb: move USB Loopback class configuration to its own Kconfig
Move USB Loopback class configuration to its own Kconfig

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-02-19 14:39:26 -05:00
Johann Fischer 092a9de285 usb: move USB Bluetooth classes configuration to its own Kconfig
Move USB Bluetooth classes configuration to its own Kconfig.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-02-19 14:39:26 -05:00
Johann Fischer 12e32c2b70 usb: move USB MSC configuration to its own Kconfig file
Move USB MSC configuration to its own Kconfig file.

Align with other class designations and rename
mass_storage.c to msc.c

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-02-19 14:39:26 -05:00
Johann Fischer 2feee774bb usb: move CDC ACM configuration to to its own Kconfig file
Move CDC ACM configuration to to its own Kconfig file.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-02-19 14:39:26 -05:00
Henrik Brix Andersen 71d7f3f916 drivers: sensor: mcux_acmp: fix expansion-to-defined warning
Rework the checks for INPSEL, INNSEL, and C0_OFFSET_BIT presence to
avoid warnings when -Wexpansion-to-defined is enabled.

The warning was enabled in c7bc6380bd.

Fixes #32475.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-02-19 13:15:47 -05:00
Pavlo Hamov 692398d56c tests: adc: add support of cc32xx
Add support for cc32xx devices.

Signed-off-by: Pavlo Hamov <pasha.gamov@gmail.com>
2021-02-19 10:43:58 -06:00
Pavlo Hamov 9fa62b810b samples: adc: add cc32xxsf_launchxl support
Add support for cc3220sf_launchxl, cc3235sf_launchxl boards

Signed-off-by: Pavlo Hamov <pasha.gamov@gmail.com>
2021-02-19 10:43:58 -06:00
Pavlo Hamov 8e02c4cdf4 shell: adc: support cc322xx
Control cc322xx ADC from shell

Signed-off-by: Pavlo Hamov <pasha.gamov@gmail.com>
2021-02-19 10:43:58 -06:00
Pavlo Hamov 8bc2ef4538 boards: cc32xx: add ADC support
Enable ADC for cc32xxsf_launchxl boards

Signed-off-by: Pavlo Hamov <pasha.gamov@gmail.com>
2021-02-19 10:43:58 -06:00
Pavlo Hamov ee6ec8d4f3 drivers: adc: cc32xx: Add support
Support 4 channels in IRQ mode. Sync/Async

Signed-off-by: Pavlo Hamov <pasha.gamov@gmail.com>
2021-02-19 10:43:58 -06:00
Peter Bigot d1a0568e11 device: store device pm busy status in the state structure
Move the busy status from a global atomic bit sequence to atomic flags
in the device PM state.  While this temporarily adds 4 bytes to each
PM structure the whole device PM infrastructure will be refactored and
it's likely the extra memory can be recovered.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-19 10:11:20 -05:00
Peter Bigot 65eee5cb47 device: store initialization status in the state structure
Separate the state indicator of whether the initialization function
has been invoked from the success or failure of the initialization.
This allows precise confirmation that the device is ready (i.e. it has
been initialized, and that initialization succeeded).

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-19 10:11:20 -05:00
Peter Bigot 8d771f1d8e device: move device power management state into common dynamic state
This avoids the need for distinct object that uses flash to store its
initializer.  Instead the state is initialized when the kernel is
starting up, before anything can reference it.  In future refactoring
the PM state could be accessed directly without storing an extra
pointer in the static device state.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-19 10:11:20 -05:00
Peter Bigot 1cadd8b305 device: perform dynamic device initialization during system startup
Initialize all device objects in a batch before invoking any code that
might try to reference data in them.  This eliminates a race condition
enabled by the ability to resolve a device structure at build time,
and reference it from one device's initialization routine before the
device itself has been initialized.

While the device is pulled from the sys_init records rather than
static devices, all in-tree init_entry records that are associated
with devices are produced via Z_DEVICE_DEFINE(), so there should be no
static devices that would be missed by instead iterating over the
device records.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-19 10:11:20 -05:00
Peter Bigot a955c9e1aa device: add common structure for dynamic device state
While devices have driver-specific dynamic state accessed through the
data field, there is also dynamic state that is common to most if not
all devices.  Add a structure to hold that data.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-19 10:11:20 -05:00
Göran Weinholt 62954da76c drivers: flash: stm32h7: fix clearing of erased sector number
This fixes the logic in erase_sector() for clearing the previous
sector number. The logic was reversed, clearing bits it should not
clear and keeping previous bits of the sector number. In practice this
does not seem to have had any effect on the current functionality, but
it will start to matter later if e.g. flash interrupts are enabled.

Signed-off-by: Göran Weinholt <goran.weinholt@endian.se>
2021-02-19 10:02:28 -05:00
Andrei Emeltchenko 80ec93860b tests: edac: Add test for user thread communication
Add test verifying communication with user thread.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-02-19 16:06:29 +02:00
Andrei Emeltchenko e97d99fa5b tests: edac: Support userspace
Add support for communication with user thread.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-02-19 16:06:29 +02:00