Commit graph

41120 commits

Author SHA1 Message Date
Henrik Brix Andersen
b07f9b064f tests: lib: devicetree: add test for bus controller node without regs
Add a test for parsing devicetree with an (I2C) bus controller node
without a regs property.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-05-05 10:17:23 -05:00
Henrik Brix Andersen
359fd044d3 scripts: dts: gen_legacy_defines: handle bus nodes without regs
Correctly handle parent bus nodes without regs properties.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-05-05 10:17:23 -05:00
Ioannis Glaropoulos
4cf4be4373 samples: subsys: openamp: use new-style DT macros for shared memory
Adapt to using new-style device tree macros
for shared memory base address and size.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-05-05 10:08:28 -05:00
Ioannis Glaropoulos
2840a9954a samples: bluetooth: hci_rpmsg: use new-style DT for shared mem macro
Adapt to use new-style Device Tree macros for the
shared memory defines.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-05-05 10:08:28 -05:00
Erwan Gouriou
1be8bda215 boards: stm32: Fix boards names in yaml and/or doc files
For auto doc generation purpose, get name value of boards' yaml files
in sync with name provided as board name in .rst file


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-05 10:05:56 -05:00
Gerson Fernando Budke
1eb94e3d56 boards: shields: esp_8266: Add AT bin download link
Add Espressif At Bin download link page and small images adjusts.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-05-05 10:03:28 -05:00
Torsten Rasmussen
4c28016e43 cmake: fixing infinite loop when searching for Zephyr on windows
Fixes: #24909

This commit compares against previous search path instead of '/'.
This fixes the infinite loop issue on windows when building a Zephyr
standalone application and not setting ZEPHYR_BASE.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Ethan Slattery <ethan@wildlifecomputers.com>
2020-05-05 10:02:11 -05:00
Johann Fischer
bdf1fbac3b boards: decawave_dwm1001_dev: add devicetree node for LIS2DH12
Add devicetree node for LIS2DH12.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-05-05 10:01:31 -05:00
Arnaud Pouliquen
3a16788afe west.yml: update open_amp and libmetal to v2020.04.0
Updates OpenAMP lib modules to v2020.04.0 release

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-05-05 09:59:16 -05:00
Benjamin Valentin
8a99bd0da8 drivers: spi: spi_sam0: fix spi_sam0_fast_txrx()
The optimisation in `spi_sam0_fast_txrx()` is broken, loading
two bytes into the `DATA` register in rapid succession will lose
one byte.

This can be observed by running `tests/drivers/spi/spi_loopback`.
The test will get stuck in `spi_sam0_fast_txrx()` forever waiting
for the final byte.

Undo this small optimisation and only load the next byte into the
`DATA` register after the response has been received.

This fixes `tests/drivers/spi/spi_loopback`.

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
2020-05-05 09:58:29 -05:00
Kumar Gala
52a950bbe6 soc: riscv: openisa_rv32m1: Conver to new devicetree macros
Convert DT_CODE_PARTITION_{OFFSET,SIZE} to use new
DT_REG_ADDR/DT_REG_SIZE macros instead based on
DT_CHOSEN(zephyr_code_partition).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-05 09:23:32 -05:00
Kumar Gala
339e3f79eb riscv: linker: replace DT_FLASH_{BASE_ADDRESS,SIZE} with new macros
The riscv linker scripts utilize DT_FLASH_BASE_ADDRESS and
DT_FLASH_SIZE, as we want to phase out the old generator we need to
replace these defines with macros from devicetree.h.

We support two flash configurations at this point, either a QSPI flash
like on the hifive board or a SoC flash like on the rv32m1_vega.  We
update the linker scripts to check the compat of the zephyr,flash node
and based on if its 'jedec,spi-nor' or 'soc-nv-flash' we determine how
to extract the "flash" base address and size.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-05 09:23:32 -05:00
Robert Lubos
3afd12c146 CODEOWNERS: Cover all OpenThread directories in net
Current entry covered only /subsys/net/lib/openthread and not
/subsys/net/l2/openthread.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-05-05 09:22:52 -05:00
Kumar Gala
979904b6af soc: arm: nxp_lpc: Convert from Kconfig to DT_NODELABEL
As we phase out per instance Kconfig symbols convert to utilize
DT_NODELABEL for SPI and I2C instances instead.

Also updated comments to change from FLEXCOMM8 to HSLSPI.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-05 08:57:45 -05:00
Kumar Gala
f9702c34ae boards: arm: nxp_kinetis: Remove Kconfig PWM_[0-3] usage
The Kconfig PWM_[0-3] sybmols don't have any meaning for kinetis family
SoCs.  The driver doesn't utilize them and no sample or test code does
either so we can remove setting them in board Kconfig.defconfig files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-05 08:54:23 -05:00
Kumar Gala
463bce59e4 dts: Remove dts_fixup.h
Remove all remaining dts_fixup.h as all defines in the files are no
longer utilized.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-05 15:46:50 +02:00
Kumar Gala
31d5caa0a8 samples: counter: alarm: Convert to use new dts macros
Convert DT_RTC_0_NAME to DT_LABEL() references based on which driver is
enabled for the platforms the test is supported on (NRF & STM32).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-05 15:46:50 +02:00
Kumar Gala
30f3121c55 boards: arm: nrf: Remove Kconfig PWM_[0-3] usage
The Kconfig PWM_[0-3] sybmols don't have any meaning for nrf family of
SoCs.  The driver doesn't utilize them and no sample or test code does
either so we can remove setting them in board Kconfig.defconfig files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-05 08:40:19 -05:00
Kumar Gala
b04b399d63 drivers: pwm: nrfx: Convert to use DTS NODELABEL for instance detection
Move to using NODELABEL references to enable driver instances for
PWM0..3.  This will allow us to remove per-instance PWM Kconfig symbols.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-05 08:40:19 -05:00
Lukasz Maciejonczyk
ae68354428 net: l2: openthread: Add function for getting openthread default instance
The new function simplifies use of OpenThread API in Zephyr.

Signed-off-by: Lukasz Maciejonczyk <Lukasz.Maciejonczyk@nordicsemi.no>
2020-05-05 16:30:20 +03:00
Jukka Rissanen
65a1bebe85 net: Replace NET_WAIT_FOREVER by SYS_FOREVER_MS
As we now have SYS_FOREVER_MS, use that instead of network
specific NET_WAIT_FOREVER.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-05 16:29:23 +03:00
Ravi kumar Veeramally
b78c9dca52 samples: net: cloud: Fix polling incoming messages
Topic subscribe() will allow cloud to send messages to
device. There will be a bit of network delay. But mqtt_input
was called only after publish() which will trigger every
10-15 seconds. Which is causing more delay to read published
messages from cloud even though messages are already available
at socket level.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2020-05-05 14:10:44 +03:00
Jukka Rissanen
1fea82c125 net: ipv6_fragment: Remove extra net_pkt_cursor_init() call
The net_pkt_pull() will reset the cursor after its call so no
need to call it here.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-05 13:39:45 +03:00
Jukka Rissanen
8160385b57 net: pkt: Fix removal of empty buffers in net_pkt_pull()
If we have removed first net_buf, then we must not restore the
original cursor as that will point to wrong head net_buf.
Add also unit test to check that the packets are removed
properly.
Clarify the documentation that we are removing data from
beginning of the function, also document that the cursor
is reset after this call.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-05 13:39:45 +03:00
Anas Nashif
0bac2f35cc samples: remove unused harness definition
remove console harness without a config.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-05 06:16:50 -04:00
Anas Nashif
43275c8eff sanitycheck: raise exception on harness without a config
console harness without a harness_config is not allowed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-05 06:16:50 -04:00
Anas Nashif
5677eb0a35 tests: gpio: remove unused harness
harness being set without actual use of harness (via harness_config)
makes the test behave differently.

Fixes #24661

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-05 06:16:50 -04:00
Peter Bigot
15ed58652e scripts/cocci: add Zephyr macro file
Zephyr uses some defines to provide additional information about the
item being declared.  When unrecognized these can confuse the
Coccinelle parser so that it does not apply semantic patches in
situations where they should be applied.

Add a macro file that extends the Coccinelle builtin macro file with
some identifiers that are specific to Zephyr.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-05-05 06:15:04 -04:00
Stephanos Ioannidis
a772d2da11 boards: arm: atsamr21_xpro: Add i2c-0 alias
This commit adds the `i2c-0` alias for the Atmel SAM R21 Xplained Pro
board, as required by the I2C test.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-05 04:58:47 -05:00
Stephanos Ioannidis
55a17fbbc8 boards: arm: atsame54_xpro: Add i2c-0 alias
This commit adds the `i2c-0` alias for the Atmel SAM E54 Xplained Pro
board, as required by the I2C test.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-05 04:58:47 -05:00
Stephanos Ioannidis
5a7081f3ea boards: arm: atsamd21_xpro: Add I2C device
This commit configures the SERCOM2 peripheral to I2C mode for the Atmel
SAM D21 Xplained Pro board.

Note that the SERCOM2 on PA08/PA09 is the I2C peripheral/pin designated
by the board user guide.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-05 04:58:47 -05:00
Stephanos Ioannidis
7f87a76830 boards: arm: atsamd20_xpro: Add I2C device
This commit configures the SERCOM2 peripheral to I2C mode for the Atmel
SAM D20 Xplained Pro board.

Note that the SERCOM2 on PA08/PA09 is the I2C peripheral/pin designated
by the board user guide.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-05 04:58:47 -05:00
Mariusz Skamra
f51557d0f2 tester: Adjust to recent changes in BTP API
This patch adjusts L2CAP CoC related command and responses to the
recent BTP API changes.
BTP has been extended with Enhanced CoC support, thus few L2CAP
CoC related commands have been changed.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2020-05-05 11:05:54 +03:00
Anas Nashif
c75fa7e578 doc: remove reference to ext/
we do not have ext/ in the tree anymore, so remove it from the
docmentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-04 18:29:18 -04:00
Kumar Gala
4dc3a99fff tests: counter_basic_api: Convert to use new dts macros
Convert DT_RTC_0_NAME to DT_LABEL() references based on the compat being
defined in the build.

Introduce a set of macros that will generate a list of labels based on
compatible matches.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-04 17:26:33 -05:00
Francisco Munoz
51e82855b7 drivers: ps/2: Tune PS2 driver to support severval mice brands
The PS/2 driver was enabled with a single mouse and kb brand.
However, when plugging other mice brands, the interaction between the
driver and the device(mouse) was broken. A delay after inhibithing
the PS/2 instance helped the internal FSM to start the TX process.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2020-05-04 17:03:49 -05:00
Francois Ramu
dac1ea6c86 boards: stm32: g474 nucleo board has no hw pins for usart2
Remove the USART 2 definition from the nucleo_g474re board
as it could cause a pin conflict on LPUART1 TX pin (PA2).
The USART2 is not present on this nucleo hardware and then
the g474re board definition is aligned with the nucleo_g431rb.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-04 16:59:15 -05:00
Stephanos Ioannidis
79d1b188c9 tests: lib: cmsis_dsp: transform: Provide RIFFT bug workaround
This commit provides the workarounds for the CMSIS-DSP RIFFT input
buffer access bug reported in #24701.

The upstream issue for this bug is ARM-software/CMSIS_5#906.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-04 16:55:55 -05:00
Ioannis Glaropoulos
276e66bd98 boards: arm: nrf5340pdk: adapt shared-memory defines to new style DT
Adapt shared memory address and size macros to new DT style.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-05-04 16:52:21 -05:00
Jukka Rissanen
fdf184858e kernel: Fix k_thread_resource_pool_assign() documentation
The k_thread_resource_pool_assign() parameters were incorrectly
documented. Part of the thread parameter description should have been
in memory pool variable documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-04 14:49:28 -07:00
Anas Nashif
800c960d0d build: reports: add puncover target
puncover is a footprint and stack analysis tool in python, see

https://github.com/HBehrens/puncover

Add custom target puncover which launches puncover with the right
options.

Launch for example with:

west  build -b frdm_k64f samples/hello_world/ -t puncover

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-04 17:33:56 -04:00
Kumar Gala
4e93b77552 samples: Convert DT_ALIAS_* to new DT_ALIAS() macro
Convert DT_ALIAS_* defines to use DT_ALIAS() plus other macros from
include/devicetree.h.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-04 15:28:20 -05:00
Kumar Gala
cdd629cda2 samples: basic: threads: Rework to not define generated macros
Rather than redefining a macro which might be generated we should create
a new define name that should get used in the code.  Replace redefining
DT_ALIAS_LED0_GPIOS_FLAGS with LED0_FLAGS and DT_ALIAS_LED1_GPIOS_FLAGS
with LED1_FLAGS.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-04 15:28:20 -05:00
Kumar Gala
88a0f441da samples: basic: button: Rework to not define generated macros
Rather than redefining a macro which might be generated we should create
a new define name that should get used in the code.  Replace redefining
DT_ALIAS_SW0_GPIOS_FLAGS with SW0_FLAGS and DT_ALIAS_LED0_GPIOS_FLAGS
with LED0_FLAGS.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-04 15:28:20 -05:00
Kumar Gala
188cf2331b samples: lwm2m_client: Rework to not define generated macros
Rather than redefining a macro which might be generated we should create
a new define name that should get used in the code.  Replace redefining
DT_ALIAS_LED0_GPIOS_* and just use the LED_GPIO_* defines that already
exist.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-04 15:28:20 -05:00
Kumar Gala
26c2c010ee dts: Remove DT_ADC_{0..2}_NAME references from dts_fixup.h
Remove DT_ADC_{0..2}_NAME from dts_fixup.h, if this casues the
dts_fixup.h file to be empty we remove the file as well.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-04 14:00:44 -05:00
Joakim Andersson
ee9326d8c0 Bluetooth: host: Fix BT_CONN_LE_OPT_NONE renamed issue
Fix BT_LE_CONN_OPT_NONE renamed to BT_CONN_LE_OPT_NONE missed in 2
places in conn.h

Regression from commit: fdb3da8aff

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-05-04 21:07:55 +03:00
Parthiban Nallathambi
84da7e362f stm32_pinctrl: remove duplicate definition
remove duplicate definition of STM32PIN

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2020-05-04 19:49:14 +02:00
Manivannan Sadhasivam
f619cbc6fb lora: sx1276: Add missing RtcTick2Ms function definition
RtcTick2Ms function is required for upcoming LoRaWAN support. Hence,
add definition for it.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-05-04 19:01:09 +02:00
Manivannan Sadhasivam
7be8debaab lora: Switch to new timeout API
Get rid of legacy timeout API and move to new timeout API for LoRa.
This involves changes to API, SX1276 driver and sample application.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-05-04 19:01:09 +02:00