Commit graph

45155 commits

Author SHA1 Message Date
Kumar Gala
2619b7cc57 cmake: remove BOARD_FAMILY variable
BOARD_FAMILY isn't used anywhere so remove it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-16 18:50:29 -05:00
Andrew Boie
13457ae46a Revert "tests: add new kernel objects tests"
This test is generating build warnings as it is making
checks that can never be false.

This reverts commit a4f1a5f58f.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-10-16 14:50:56 -04:00
Raveendra Padasalagi
ea2107c429 drivers: dma: pl330: const-ify device instance
Fix compilation issue associated with const-ifying
pl330 device instance.

Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
2020-10-16 06:50:49 -05:00
Kumar Gala
ccc16a41bd drivers: i2c: Move Kconfig I2C instances to esp32
The only user of the I2C instances is the esp32 driver.  Move the
Kconfig symbols down to the esp32 Kconfig for the instances it needs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-16 06:36:18 -04:00
Eugeniy Paltsev
ea11784919 sanitycheck: actually allow empty west-flash without parameter
According to west-flash option description it's allowed to use
west-flash without parameter:
> There are three ways this option is used.
> 1) bare: --west-flash
> 2) with a value: --west-flash="--board-id=42"
> 3) Multiple values: --west-flash="--board-id=42,--erase"

However, we don't allow to west-flash to be without parameter
when we verify sanitycheck arguments. Fix that.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2020-10-16 06:26:21 -04:00
Ioannis Glaropoulos
e121052c13 boards: arm: enable HW stack protection by default on Atmel boards
Enable HW stack protection by default in the board
definitions of ATMEL-based platforms.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-16 10:07:20 +02:00
Lingao Meng
0e3b04e393 Bluetooth: Mesh: Disable network_id beacon when proxy disabled
According Mesh Spec 1.0.1 Section 7.2.2.2.1 Advertising

A node that does not support the Proxy feature or has the Proxy
feature disabled shall not advertise with Network ID.

Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
2020-10-16 10:06:50 +02:00
Steven Daglish
f4ed379cce boards: arm: add support for NUCLEO-L011K4 board
Support for the NUCLEO-L011K4 development board with STM32L011K4 SoC.

Although the SoC only contains 16K flash and 2K RAM, it has been tested
on a number of samples and has worked as expected.

Signed-off-by: Steven Daglish <s.c.daglish@gmail.com>
2020-10-16 10:00:08 +02:00
Gerard Marull-Paretas
b777647517 tests: drivers: adc: fix NUCLEO-H743ZI ADC channel
NUCLEO-H743ZI board uses ADC channel 15, not 0.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-16 09:59:16 +02:00
Ryan Erickson
3371d809b9 codeowners: add owner for hl7800 driver
Add myself as an owner for the hl7800 modem driver.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-10-16 09:44:36 +02:00
Torsten Rasmussen
1368295183 cmake: fix DTS handling of multiple overlay files
This commit fixes an issue where providing a list of overlay files for
dts was not handled correctly.
The means that using `-DDTC_OVERLAY_FILE="file1.overlay;file2.overlay"`
would fail as those two file names would be concatenated into a single
file name.

This is fixed by properly quote the `DTC_OVERLAY_FILE` variable.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-10-15 22:47:52 -05:00
Scott Worley
03e510d68b gpio: mchp_xec: fix glitch setting pin to output
A GPIO's parallel output bit in the parallel output
registers is read-only until the AOD bit is set to 1
in the pin's control registers. The proper sequence to
preset the state of an output pin is:
Configure pin as input with AOD=1 in the control register
Set pin state in the parallel output register
Set direction to output in the pin's control register.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2020-10-15 22:07:34 -04:00
Torsten Rasmussen
fef7879583 scripts: ensuring posix path on module defined roots.
Fixes: #29235

This commit ensures that roots are being converted to posix paths.
This fixes the issue where windows style path (containing `\`) would
result in DTS dependency file to contain mixed style path separator and
thus causing Ninja to re-invoke CMake in an endless loop.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-10-15 22:07:11 -04:00
Peter Bigot
260b327d2f samples: bluetooth: display source address in beacon console output
Users testing beacon capability will likely want to see the beacons in
a sniffer tool.  Switch to an advertising mode that uses a persistent
known address, and display that address on the console output.

This also demonstrates techniques to retrieve the advertising address
where one is known.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-10-15 22:22:16 +03:00
Peter Bigot
56c3c11d6a bluetooth: add helper for advertising with identity
Document the distinction between the existing non-connectable
advertising configurations, and add one that uses identity which will
be the same for all beacons.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-10-15 22:22:16 +03:00
Maksim Masalski
a4f1a5f58f tests: add new kernel objects tests
Found out that important requirements are not tested by current
kernel objects tests. Decided to fix that situation

New added tests:
1. test_kobj_assign_perms_on_alloc_obj()
Create kernel object semaphore, dynamically allocate it from the
calling thread's resource pool.
Check that object's address is in bounds of that memory pool.
Then check the requestor thread will implicitly be assigned
permission on the allocated object by using
semaphore API k_sem_init()

2. test_no_ref_dyn_kobj_release_mem()
Dynamically allocated kernel objects whose access is controlled by
the permission system will use object permission as a reference count
If no threads have access to an object, the object's memory released.

3. test_krnl_obj_static_alloc_build_time()
Take addresses of the kernel objects which are statically allocated
during the build time and verify that they are not null.
That kernel objects shouldn't require manual
registration by the end user.

4. Clean-up. Removed unused variable from userspace test.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2020-10-15 11:53:55 -07:00
Anas Nashif
b3ff5cbd70 Bluetooth: remove unused extern z_prf
z_prf is not being used in the monitor code, so remove it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-10-15 11:50:14 -05:00
Mahesh Mahadevan
4db6f4c735 doc: Add clock control details
Include support for clock control in the documentation

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-15 11:17:24 -05:00
Mahesh Mahadevan
a3341dd347 modules: Add config for LPC clock control
Add a config for MCUX LPC clock control

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-15 11:17:24 -05:00
Mahesh Mahadevan
c2a40a8c66 dts: Clock control for RT600, LPC54xxx, LPC55xxx
Use the clock control driver to get flexcomm clock
frequency

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-15 11:17:24 -05:00
Mahesh Mahadevan
f025700d8f soc: LPC54xxx, LPC55xxx: Update to use clock control
Use the clock control driver to get flexcomm clock
frequency

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-15 11:17:24 -05:00
Mahesh Mahadevan
350edf9415 soc: RT600: Update to use clock control
Use the clock control driver to get flexcomm clock
frequency

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-15 11:17:24 -05:00
Mahesh Mahadevan
c6b3316947 drivers: Update Flexcomm SPI driver for clock control
Use the clock API to get the spi clock frequency

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-15 11:17:24 -05:00
Mahesh Mahadevan
3eb3b58bb4 drivers: Update Flexcomm Serial driver for clock control
Use the clock API to get the serial clock frequency

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-15 11:17:24 -05:00
Mahesh Mahadevan
8927985c70 drivers: Update Flexcomm I2C driver for clock control
Use the clock API to get the I2C clock frequency

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-15 11:17:24 -05:00
Mahesh Mahadevan
c7b0b43ec6 drivers: Add NXP LPC clock control driver
Add clock control driver for NXP LPC devices that use
the MCUX SDK drivers

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-15 11:17:24 -05:00
Mahesh Mahadevan
b50d0ebfcb include: Add NXP LPC clock control driver
DTS bindings file for NXP LPC clock control driver that
uses the MCUX SDK drivers

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-15 11:17:24 -05:00
Armando Visconti
1921a2d84e drivers/sensor: add support to IIS2ICLX accelerometer
The IIS2ICLX is a high-accuracy. ultra-low noise, low-power
two-axis linear accelerometer which can be interfaced through
either I2C or SPI bus.
Its high accuracy, stability over temperature and repeatability
make IIS2ICLX particularly suitable for inclination measurement
for industrial applications (inclinometers).

https://www.st.com/resource/en/datasheet/iis2iclx.pdf

This driver is based on stmemsc i/f v1.03.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-10-15 09:57:47 -05:00
Ioannis Glaropoulos
38dd4683c6 doc: add HW stack protection enabling in the board porting guidelines
Mention in the board porting guidelines the recommendation
to enable by default the HW Stack Protection feature, and
the rationale behind it.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-15 09:55:01 -05:00
Yestin Sun
26a8f3765b boards: stm32l562e_dk: add support for stm32l562e_dk
Add support for the STM32L562E-DK Discovery board
(based on the nucleo_l552ze_q board).
Tested with hello_world, basic/blinky, basic/button.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2020-10-15 09:53:00 -05:00
Yestin Sun
d6e718f414 soc: arm: st_stm32: add support for stm32l562Xe
Add support for the stm32l562Xe SoC

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2020-10-15 09:53:00 -05:00
Ryan Erickson
669ab7bb11 tests: drivers: build_all: add HL7800 driver
Add the HL7800 modem driver to the
build_all drivers test.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-10-15 08:46:41 -05:00
Ryan Erickson
e36fc53fa6 drivers: modem: hl7800: fix file open in fw update
File open function for firmware update
requires a flags parameter to be passed in.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-10-15 08:46:41 -05:00
Łukasz Mazur
705e1a4610 SPI: Refactoring in SPI with DMA (peripheral switching on/off)
Moved enabling SPI peripheral in front of the buffers loop.
Removed SPI DMA switching on in front of the buffers loop.

Signed-off-by: Łukasz Mazur <lukasz.mazur@hidglobal.com>
2020-10-15 14:11:46 +02:00
Łukasz Mazur
f091aab0d7 SPI: Do not disable SPI peripheral while switching DMA buffers
Removed SPI peripheral disabling when switching DMA to another buffer.
When using hardware chip select this would cause to stop driving
CS pin when swhitching buffers. This is different (and wrong) than
when used software CS.

Fixes #28833

Signed-off-by: Łukasz Mazur <lukasz.mazur@hidglobal.com>
2020-10-15 14:11:46 +02:00
Joakim Andersson
2837ac4409 Bluetooth: shell: Add disable advertising channel arguments
Add options to disable advertising channels for the different
advertising commands.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-10-15 13:21:26 +03:00
Joakim Andersson
ea273100ef Bluetooth: host: Add advertising options to disable channel
Add advertising options to disable the individual advertising
channel 37, 38 and 39 per advertising instance.

Fixes: #26732

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-10-15 13:21:26 +03:00
Joakim Andersson
426cef4477 Bluetooth: host: fix size of advertising option argument
Fix size of advertising option argument to get_filter_policy
function.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-10-15 13:21:26 +03:00
Vinayak Kariappa Chettimada
99dfa277bf Bluetooth: host: Fix missing BT_DEV_EXPLICIT_SCAN flag clear
Fix missing BT_DEV_EXPLICIT_SCAN flag clear on error
return.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-10-15 13:10:16 +03:00
Joakim Andersson
b322fa2f34 Bluetooth: GATT: Document use of attribute parameter in discovery cb
Document which fields in the attribute parameter in the discovery
callback contains valid information.
Document the type of the user_data so that the application can cast
this to a valid type in order to retrieve the information.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-10-15 11:08:48 +02:00
Joakim Andersson
ee81c0865d Bluetooth: GATT: Consistent permission handling of discovered attribute
Be consistent in the permission handling of the discovered attribute
in the temporary object given in the discovery callback.
For characteristics the permission field was set to READ, while for
all other attributes it was set to 0.

Fixes: #29083

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-10-15 11:08:48 +02:00
Joakim Andersson
24f62eeea1 Bluetooth: GATT: Use UUID of attribute to check for a characteristic
Update check in the bt_gatt_attr_value_handle API function to use the
UUID of the function, in case the attribute has been declared with a
different read handler, or the attribute is a temporary object
where the read attribute has not been set.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-10-15 11:08:48 +02:00
Joakim Andersson
da5ea438c7 Bluetooth: GATT: Add init macro for struct bt_gatt_chrc
Add init macro for struct bt_gatt_chrc so that it can be re-used
other places.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-10-15 11:08:48 +02:00
Rihards Skuja
576b3583ee lorawan,lora: fix C++ compilation/linking errors
The usual suspects: missing extern and assignments from void *.

Signed-off-by: Rihards Skuja <rihardssk@mikrotik.com>
2020-10-15 11:08:07 +02:00
Kumar Gala
c22e34397e drivers: serial: stm32: set default parity in driver
Have the driver default to UART_CFG_PARITY_NONE if no parity property
exists rather than using default in binding.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-15 04:01:22 -05:00
Maksim Masalski
3ce7afdaaa tests: sched_api remove misprints and etc
I reviewed that test to find a bug root cause, unfortunately,
bug dissapeared, so nothing to fix, but I noticed several
misprints and wrong comment styles. It's something at least.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2020-10-14 19:38:11 -04:00
Peter Bigot
b1e4f89c13 boards: particle: fix spi overlays
These need an initial compatible to be recognized as SPI devices.

Also fix a typo in the base include file, and ensure the overlays are
the same for all variants.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-10-14 17:55:50 -05:00
Frank Li
53cc090c39 boards: mm_swiftio: enable pwm devices
Enable pwm device for mm_swiftio.
select HAS_MCUX_PWM for rt1052.

Signed-off-by: Frank Li <lgl88911@163.com>
2020-10-14 15:33:10 -05:00
Maximilian Bachmann
498655ae8e arch/x86: fix compilation errors
fixes the following compilation errors
- sys_cache_line_size was undeclared at first use
- there was an assignment to an rvalue in arch_dcache_flush

Signed-off-by: Maximilian Bachmann <m.bachmann@acontis.com>
2020-10-14 13:27:23 -07:00
Andrei Gansari
b66db222a2 tests: gpio: gpio_port_set_masked_raw overwrite check
Code checks if gpio_port_set_masked_raw overwrites masked pins.
It should detect that the attempt to set only the input pin to zero also
affected the output pin.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-10-14 15:21:34 -05:00