Commit graph

41120 commits

Author SHA1 Message Date
Kumar Gala
b546ef3748 drivers: audio: tlv320dac310x: Explicitly set GPIO_DIR_OUT
As a precursor to the new GPIO API in which GPIO_DIR_OUT isn't a dts
flag move setting of GPIO_DIR_OUT from the dts to explicitly in the
code.  We remove setting the flag in intel_s1000_crb.dts as part of this
cleanup.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-11 05:16:09 -05:00
Kumar Gala
544921cd93 samples: CAN: Tweak GPIO flags in dts for mcp2515
Remove setting GPIO_DIR_OUT in the dts overlay for mcp2515 as a
precursor to new GPIO API work.  The flag isn't used for cs-gpio,
as we hard code GPIO_DIR_OUT in the spi controller code.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-11 05:15:54 -05:00
Gregers Rygg
82c25587a2 doc: Correct gpio sample description
Fix a typo and add a few missing words

Signed-off-by: Gregers Rygg <gregers@telenordigital.com>
2019-09-10 16:13:39 -05:00
Andrzej Głąbek
a19356d79b dts: nordic: nrf9160: Add missing peripheral nodes
For quite a few peripherals that are currently supported by nrfx HALs
or drivers there are no definitions of corresponding CMSIS-Core
peripheral accessing symbols that would provide their base addresses
in the proper domain (secure or non-secure), accordingly to the build
target. This commits adds devicetree nodes for these peripherals so
that their base addresses can be used in definitions of the accessing
symbols mentioned above.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-10 22:47:43 +02:00
Chris Schramm
ed9c1ce55d drivers/gpio: pcal9535a: fix i2c write
writing to both port registers of pcal9535a
was broken

fixes #17625

Signed-off-by: Chris Schramm <schramm@makaio.com>
2019-09-10 15:09:53 -05:00
Ravi kumar Veeramally
1a6f4a6368 net: tcp: Accept connections only in LISTENING state
Issue noticed with following scenario.

 1) TCP server is listening for connections but will handle
    only one connection at a time (e.g. echo-server sample)
 2) Client A connects, and the connection is accepted.
 3) Client B connects, instead of denying a connection,
    it is "auto" accepted (this is the actual bug) even
    if the application has not called accept().
 4) After the connection A is closed, the connection B
    gets accepted by application but now the closed
    connection A will cause confusion in the net-stack
 5) This confusion can cause memory leak or double free
    in the TCP core.

It is not easy to trigger this issue because it depends
on timing of the connections A & B.

Fixes: #18308

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-09-10 22:57:48 +03:00
Jukka Rissanen
8fa6dfbe5a tests: net: tcp: Test connection cleanup after receiving SYN
Make sure the net_context is properly removed if done after
receiving SYN.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-09-10 22:53:12 +03:00
Jukka Rissanen
29cae7e2fa net: tcp: Cleanup context if connection is not established
If we are closing connection before the connection was established,
then unref the context so that the cleanup is done properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-09-10 22:53:12 +03:00
Kumar Gala
14ef05f93f dts/bindings: st: sensors: Mark 'irq-gpios' as optional
The 'irq-gpios' property is optional as the drivers work fine if this
property isn't set.  The property is only required if "TRIGGER" mode is
enabled in the drivers.

As such mark 'irq-gpios' as 'required:false`.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-10 14:38:50 -05:00
Andy Liu
b888f8f892 dts: arm: nxp_rt: Fix typo in DT_PWM_MCUX_3_INDEX definition
DT_NXP_IMX_4PWM_03DC000_PWM3_INDEX should be
DT_NXP_IMX_PWM_403DC000_PWM3_INDEX.

Signed-off-by: Andy Liu <andy@madmachine.io>
2019-09-10 14:35:43 -05:00
Ravi kumar Veeramally
e2b1ec8565 samples: net: coap_client: Fix coverity issue
Ignore socket close() return value in this sample.

Fixes #18961

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-09-10 22:17:54 +03:00
Ulf Magnusson
a5f4ad8df3 scripts: dts: Fix wrong filename in 'include:' code in old scripts
The 'fname' parameter to merge_included_bindings(), giving the path to
the top-level binding file, was accidentally shadowed in the
'for fname in fnames:' loop. This could lead to the wrong filename being
used in error messages.

Discovered via this pylint warning:

    scripts/dts/extract_dts_includes.py:225:12: R1704: Redefining
    argument with the local name 'fname' (redefined-argument-from-local)

Improve naming a bit to fix it.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-10 11:34:03 -05:00
Ulf Magnusson
6fd7c69999 scripts: elf_helper.py: Simplify tests with chained comparisons
'a < b and b < c' can be simplified to 'a < b < c' in Python.

Fixes this pylint warning:

    R1716: Simplify chained comparison between the operands
    (chained-comparison)

Fixing pylint warnings for a CI check.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-10 16:22:48 +02:00
Ulf Magnusson
72e71d6000 x86: gen_idt.py: Use enumerate() to fix pylint warning
Use enumerate() to fix this pylint warning:

    C0200: Consider using enumerate instead of iterating with range and
    len (consider-using-enumerate)

enumerate() is handy when the loop body needs both the element and its
index. It returns (index, element) tuples.

Also use a tuple unpacking to extract 'handler' from the elements in
'vector'.

Piggyback a slightly simpler way to build a list of num_chars 0s.

Getting rid of warnings for a CI check.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-10 15:53:49 +02:00
Ulf Magnusson
4e90dd67a9 x86: gen_idt.py: Fix broken error() call in update_irq_vec_map()
Accidentally passed two arguments instead of one. Fixes this pylint
error:

    arch/x86/gen_idt.py:132:8: E1121: Too many positional arguments for
    function call (too-many-function-args)

Fixing pylint warning for a CI check.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-10 15:51:52 +02:00
Ulf Magnusson
9460708d3d scripts: elf_helper.py: Make functions that don't use 'self' static
Fixes this pylint warning:

    R0201: Method could be a function (no-self-use)

Another option would be to turn them into regular functions, but that'd
be a bigger change.

Piggyback a small ElfHelper.error() improvement: Passing a string to
sys.exit() prints it to stderr and exits with status 1.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-10 15:49:55 +02:00
Kristoffer Rist Skøien
c58af2b686 Bluetooth: Controller: Typo in Kconfig
Changed documentation in Bluetooth Controller
Kconfig for BT_CTLR_ASSERT_HANDLER

Signed-off-by: Kristoffer Rist Skøien <kristoffer.skoien@nordicsemi.no>
2019-09-10 08:32:02 -05:00
Neill Kapron
6225592e27 SOC: Boards: NXP: Enable ethernet for mimxrt1060_evk
This enables ethernet functionality on the mimxrt1062 SOC
and mimxrt1060_evk board.

Signed-off-by: Neill Kapron <nkapron@gmail.com>
2019-09-10 07:44:08 -05:00
Ulf Magnusson
b918e25921 dts: scripts: Require properties to be declared in bindings
Except for a few special properties like 'interrupts' and '#size-cells',
require all devicetree properties on nodes with bindings to be declared
in the binding.

This will help catch misspellings, and makes refactoring and cleanups
safer.

Suggested by Peter A. Bigot.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-10 07:42:02 -05:00
Kumar Gala
95f78bcacf interrupt: Convert RISC-V plic to use multi-level irq support
Utilize the multi-level irq infrastructure and replace custom handling
for PLIC on riscv-privilege SoCs.  The old code offset IRQs in drivers
and various places with RISCV_MAX_GENERIC_IRQ.  Instead utilize Zephyr's
encoded IRQ and replace offsets in drivers with the IRQ define from DTS.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-10 07:34:57 -05:00
Kumar Gala
d16b9c37af interrupt_controller: plic: remove plic.h
Fold plic.h into plic.c as the .h only defined two things that are
only used in plic.c.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-10 07:34:57 -05:00
Kumar Gala
2c1e0439c7 irq: rv32m1: Fixup IRQ values for multi-level IRQ handling
Remove the handcoded multi-level IRQ values in device tree.  We now are
able to generate the encoded multi-level IRQ value.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-10 07:34:57 -05:00
Kumar Gala
d6e6a2be38 irq: intel_s1000: Fixup IRQ values for multi-level IRQ handling
Remove the handcoded multi-level IRQ values in device tree.  We now are
able to generate the encoded multi-level IRQ value.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-10 07:34:57 -05:00
Kumar Gala
c16537fbde scripts/dts: Generate IRQ values for multi-level IRQs
When we have multi-level (ie chained interrupt controllers) Zephyr has a
schemee to encode the multi-level and IRQ values along the level's into
a single 32-bit value.  This is the "IRQ" value expected by Zephyr APIs.

The encoding scheme is documented here:

doc/reference/kernel/other/interrupts.rst

Update the device tree generation to walk the interrupt levels and
generate the expected encoded value for the IRQ.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-10 07:34:57 -05:00
Jan Van Winkel
2bed6759a4 west: gui: Updated lvgl to V6.0.2
Updated west manifest to take in lvgl V6.0.2

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-09-10 06:42:21 -05:00
Johann Fischer
dfee33f861 shields: x_nucleo_iks01a2: add missing irq-gpios properties
Add missing irq-gpios properties.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-10 06:40:27 -05:00
Erwan Gouriou
90df6a3291 drivers/pinmux: stm32: Use pull-up for _SPI_NSS pins
To work efficiently, SPI_NSS pins require pull-up configuration.
Fix this for whole STM32 series.

Fixes #17998

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-10 06:39:50 -05:00
Andrzej Głąbek
916bf0e682 modules: hal: nordic: Update the module revision
Update the module revision so that the following commits become
effective:

* nrfx_config: Use common mappings of Kconfig options to nrfx macros
* nrfx_config: Unify the way of enabling instances in nrfx drivers
* nrfx_config: Add missing mappings of Kconfig option symbols
* CMakeLists: Add missing inclusions of driver implementation files

The above changes require a minor correction in the nrf91/soc.h file,
so it is also modified in this commit.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-10 13:23:44 +02:00
Andrzej Głąbek
60e7364c09 modules: Kconfig: Add missing options enabling nrfx drivers
Quite a few nrfx drivers are missing corresponding Kconfig options
that would enable their use in Zephyr applications.
Add such options, to facilitate the use of nRF peripherals for which
there are no Zephyr driver shims or even suitable APIs.

Jira: NCSDK-2744

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-10 13:23:44 +02:00
Andrzej Głąbek
aeb1a7d76d modules: Kconfig: Make options enabling nrfx drivers easier to access
The options are given prompts, so that they become accessible from
application configuration files and visible in menuconfig, and they
are complemented with proper dependencies, so that only the relevant
ones for the selected SoC are made available.

Jira: NCSDK-2744

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-10 13:23:44 +02:00
Andrzej Głąbek
70d426bd33 modules: Kconfig: Unify the way of enabling instances in nrfx drivers
Use a consistent way of enabling particular instances of peripherals
in nrfx drivers through options defined in modules/Kconfig.nordic,
to make the usage of nrfx drivers in Zephyr, especially the ones for
which there are no Zephyr driver shims (yet), easier.

Jira: NCSDK-2744

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-10 13:23:44 +02:00
Vincent Wan
7bcaf3696d drivers: wifi: simplelink: fixes to support CONFIG_NET_NATIVE=n
Remove unnecessary calls to net_if_ipv4_addr_add() and
net_if_ipv4_set_gw(), to prevent link errors when CONFIG_NET_NATIVE
is set to n.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-10 12:45:38 +03:00
Jukka Rissanen
b73a3de4ed tests: net: poll: Increase the poll timeout value
Got several sanity failures with this information

Assertion failed at tests/net/socket/poll/src/main.c:76: \
  test_poll: (tstamp >= 30U && tstamp <= 30 + FUZZ is false)

In one of the failed tests, the tstamp was 50. Dunno what is
wrong here but in order to proceed with this, increasing the
timeout temporarily. This commit can be removed if the root
cause for this timeout is figured out.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-09-10 12:45:38 +03:00
Jukka Rissanen
a76b786eb6 tests: net: poll: Moving config options from yaml to conf file
Moving Kconfig options from testcase.yaml file to prj.conf so
that we can run the test app easily from command line and without
sanitycheck.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-09-10 12:45:38 +03:00
Jukka Rissanen
6cf1da486d net: Add CONFIG_NET_NATIVE option for selecting native IP
Allow user to disable native IP stack and use offloaded IP
stack instead. It is also possible to enable both at the same
time if needed.

Fixes #18105

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-09-10 12:45:38 +03:00
Mariusz Skamra
ac7f81314e Bluetooth: ATT: Fix responding to unknown ATT command
Host shall ignore the unknown ATT PDU that has Command Flag set.
Fixes regression introduced in 3b271b8455.

Fixes: GATT/SR/UNS/BI-02-C
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2019-09-10 12:26:11 +03:00
Vincent Wan
3142503ecb samples: net: sockets: disable http_get in test build
Build errors were introduced by the merge of #18736. Until PR #18780 is
approved to allow the SimpleLink libraries to build without
CONFIG_POSIX_API, this patch excludes cc3235sf_launchxl from the test
build.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-10 10:22:30 +03:00
Vincent Wan
89930a4259 boards: cc3235sf_launchxl: use OpenOCD from Zephyr SDK
We should use OpenOCD from the latest Zephyr SDK as opposed to using TI
OpenOCD.

There is a known issue with the current release (0.10.2) of the SDK in
how it resets the network processor, but we can deal with it
subsequently.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-10 10:22:30 +03:00
Vincent Wan
fb0c846db9 samples: net: Adding board config files for CC3235SF
Config files are added to support cc3235sf_launchxl as a new board.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-10 10:22:30 +03:00
Vincent Wan
3b63b92539 linker: place debug header section for CC3235SF
The CC3235SF requires a debug header to be placed at the beginning of
internal flash, so that the bootloader does not automatically overwrite
the flash memory with the program saved in external flash.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-10 10:22:30 +03:00
Vincent Wan
af30b5cee2 ext: simplelink: Update comment for HAS_CC3220SDK
This Kconfig option applies to the TI CC32xx SDK in general, given it is
the same as the CC3220 SDK.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-10 10:22:30 +03:00
Vincent Wan
d11864662b dts: arm: add device tree file for TI CC3235SF
This dtsi file adds definitions for memory regions on the SoC.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-10 10:22:30 +03:00
Vincent Wan
e059eb3336 soc: ti_simplelink: add CC3235SF to the CC32xx series
This commit adds the TI CC3235SF SoC to the CC32xx series.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-10 10:22:30 +03:00
Vincent Wan
8afe649144 boards: cc3235sf_launchxl: add support for TI CC3235SF LaunchPad
This commit adds the TI CC3235SF LaunchPad as a new board in Zephyr.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-10 10:22:30 +03:00
Kumar Gala
466f91a9e3 dts: nxp: nxp_ke1xf: Make LPO fixed-clock its own node
Pull out the LPO fixed-clock that is part of the PMC hardware block as
its own child node of the PMC block.  This is because the PMC could have
its own driver associated with it that is seperate from the LPO clk.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-09 21:23:30 -05:00
Daniel Leung
3ad1fe8dec dts/watchdog: microchip,xec: fix cmake warnings
With the change to "compatible", and deprecation of "inherit"
and "category: required", there are multiple warnings when
running cmake. So fix those by updating the DTS YAML file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-09-09 17:54:11 -05:00
Maureen Helm
5687dc828e west.yaml: Update hal_nxp to MCUXpresso SDK 2.6.x
Updates hal_nxp to pick up the latest MCUXpresso SDK version available
for all SoCs.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-09-09 17:52:54 -05:00
Stephanos Ioannidis
2b9636db52 net/ieee802154: Explicitly include toolchain.h.
This commit adds an explicit inclusion of toolchain.h from
ieee802154_frame.h.

The endianness preprocessor definitions (__BYTE_ORDER__,
__ORDER_LITTLE_ENDIAN__, __ORDER_BIG_ENDIAN__) are used by
ieee802154_frame.h; these being not defined can easily go unnoticed and
cause unexpected behaviours, as detailed in PR #18922.

toolchain.h ensures that these preprocessor definitions are defined and
*must* be included in a file that uses these definitions.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-09-09 21:40:54 +02:00
Stephanos Ioannidis
bef377998a net: Explicitly include toolchain.h to check for endianness definitions.
This commit adds an explicit inclusion of toolchain.h from ptp_time.h.

The endianness preprocessor definitions (__BYTE_ORDER__,
__ORDER_LITTLE_ENDIAN__, __ORDER_BIG_ENDIAN__) are used by ptp_time.h;
these being not defined can easily go unnoticed and cause unexpected
behaviours, as detailed in PR #18922.

toolchain.h ensures that these preprocessor definitions are defined and
*must* be included in a file that uses these definitions.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-09-09 21:40:54 +02:00
Stephanos Ioannidis
9b0e738e37 bluetooth: controller: Explicitly include toolchain.h.
This commit adds an explicit inclusion of toolchain.h from pdu.h.

The endianness preprocessor definitions (__BYTE_ORDER__,
__ORDER_LITTLE_ENDIAN__, __ORDER_BIG_ENDIAN__) are used by pdu.h;
these being not defined can easily go unnoticed and cause unexpected
behaviours, as detailed in PR #18922.

toolchain.h ensures that these preprocessor definitions are defined and
*must* be included in a file that uses these definitions.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-09-09 21:40:54 +02:00