Commit graph

41120 commits

Author SHA1 Message Date
Daniel Leung
ba4099430b ethernet/dw: remove kconfigs that are SoC specific
Remove those kconfig options that are SoC specific, and
should not be configurable via kconfig.

Change-Id: Ib483419be5199b52cf281b4b106cd8a3be95b7be
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-07 00:58:57 +00:00
Daniel Leung
1bdc6f8b22 sanitycheck: fix initlevel section being mentioned twice
The "initlevel" section is being metioned twice. It does not affect
the final size calculation, but just remove it just for reader's
sanity.

Change-Id: I0e7d6e82c730631d2c83ca09dde0f675805840f3
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-07 00:56:41 +00:00
Sergio Rodriguez
1b41169828 rtc/qmsi: Fix the IRQ priority setting according to the SoC specific option
The configuration option CONFIG_RTC_IRQ_PRI does not longer exist, and have
to use the specific QMSI driver IRQ priority

Change-Id: I8074c6d8e095596d03e51a94f26a73c3a9ff91b7
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-04-06 12:05:23 -07:00
Grzegorz Kolodziejczyk
bae91cf980 Bluetooth: tester: Use bt enable cb to indicate cmd rsp success
This is needed especially for nble. If bluetooth is not enabled we
cannot send another commands to tester.

Change-Id: I17e639301bba6efd127f2c743b8942c1b493f9da
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-04-06 17:25:11 +00:00
Grzegorz Kolodziejczyk
355ded1863 drivers/nble: Add support to bt_gatt_attr_next
This function is needed to get next attribute of  passed to function
attribute.

Change-Id: Iefe2015f2d6bcb650012b1f9d5b1ea98e8fa8f48
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-04-06 12:35:49 +00:00
Andrei Emeltchenko
bd5f745e25 Bluetooth: Enable Nordic BLE chip using PM helpers
When Nordic BLE chip is flashed with HCI firmware use H:4 UART driver
and enable chip the same way we enable for NBLE.

Change-Id: Ie14734266803088feadb0d0eb20c49c3615f0267
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-06 12:10:21 +00:00
Johan Hedberg
f72063e214 Bluetooth: drivers/nble: Require callback for bt_enable()
The nble nRF51 firmware cannot handle situations where it receives
data before it is ready. The RPC calls otoh cannot be blocking.
Combine this with the fact that bt_enable(NULL) is supposed to be
blocking means we cannot support this mode of operation with nble.

Change-Id: Ib9c2c322b44b04bc48be243c2ba1c1bc4becb8ea
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-06 11:51:27 +00:00
Andrei Emeltchenko
f7da2220d7 quark_se_devboard: Remove UART default name from soc config
Remove UART default configuration to make it default UART_0. This
makes default working fine with Nordic BLE chip using H:4 driver.

Change-Id: Icb6d9f068b586bbf04694bc77ed968211de94c8a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-06 14:00:56 +03:00
Andrei Emeltchenko
3252f6cf1a drivers/nble: Refactor PM code to make it reusable
Refactoring Power Management related code to special file nrf51_pm
making it possible to reuse the functions for H:4 UART driver when
Nordic BLE is flashed with HCI firmware.

Change-Id: If389c1f4af13fa786e5866129624527cec0928e0
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-06 14:00:56 +03:00
Andrei Emeltchenko
8e4440674e Bluetooth: Add option for PM with Nordic BLE chip
The config option handles enabling, disabling and power management
operations with Nordic nRF51 BLE chip.

Change-Id: I816062a7fb17c9e57c234113a2cecdebceb407b6
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-06 14:00:55 +03:00
Andrei Emeltchenko
ecc35267da drivers/nble: Move Nordic Bluetooth LE driver inside drivers/bluetooth
Move NBLE code to the place where other Bluetooth drivers code resides.

Change-Id: Ibcf9ffb016e9b842bed66a61dff5c101b1573aaa
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-05 14:04:44 +03:00
Johan Hedberg
bc706e2a88 Bluetooth: Add stub for bt_storage_clear()
Change-Id: I7ab9ee4ca1d9702e7aef23aadfa627554907d145
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-05 12:29:14 +03:00
Johan Hedberg
d0e4e0183e Bluetooth: Rename bt_register_storage to bt_storage_register
Keep a single bt_storage_* name space for current and future storage
APIs.

Change-Id: If158eb7408cce7c06cd8f98d78a061b9f9585265
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-05 12:29:14 +03:00
Johan Hedberg
e70771d3c8 Bluetooth: Export bt_storage inside the stack
It's likely that other files besides hci_core.c will be needing to
read/write the storage. Export it therefore through hci_core.h (same
time adding a missing 'const' to the declaration).

Change-Id: I7c08bc0d69c752bef68f9da9e4aee1acfa00de72
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-05 12:29:14 +03:00
Johan Hedberg
499b44201b Bluetooth: Don't update random address unnecessarily
If the wanted address is already programmed to the controller there's
no need to send a HCI command to change it.

Change-Id: Ib73d09cc5b20cd6820e603f0828f000f8310a89e
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-05 12:29:14 +03:00
Johan Hedberg
5ccb20c591 Bluetooth: Use bt_addr_t inside bt_addr_le_t
In many cases when we want to access the 'val' member of bt_addr_le_t
it's in situations where the type needed is actually bt_addr_t. To
avoid unnecessary typecasts in these places simply embed bt_addr_t
inside bt_addr_le_t.

Change-Id: I7eecf129bee1dcf085abc83ec2f32e1a10b0b5aa
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-05 12:29:14 +03:00
Johan Hedberg
13be3947ab Bluetooth: Add Privacy Feature support
Add initial support for the Privacy Feature, including the ability to
manage a local IRK and to use Resolvable Random Addresses.

Change-Id: I1c70aea67078dd2a5d07f3b797c37746ebe9ab61
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-05 12:29:14 +03:00
Andrei Emeltchenko
24732e8fb9 drivers/nble: Fix typo in compatible_firmware name
Change-Id: I81a211892e61bc11db5e5e8c1715f7971d64ace1
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-05 11:18:53 +03:00
Andrei Emeltchenko
8f5e21154b drivers/nble: Update RPC to Nordic firmware 0404 version
Update RPC headers and change compatible_firmware version 0404.

Change-Id: Ie9920d302f3787c07181bc6aa519a96556463a79
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-05 11:18:53 +03:00
Andrei Emeltchenko
f0f91d4a7b drivers/nble: Refactor Nordic BLE chip enable functions
Move NBLE pin handling to the driver from gap.c.

Change-Id: I4b7fd408c623971d19da12784c656c5c605852a5
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-05 11:18:53 +03:00
Andrei Emeltchenko
36748b9f33 ia32: Allow to connect Nordic chip to qemu
Allow to connect Nordic Devkit or dongle to qemu. Simple
configuration for the current NBLE firmware is following:

Connect Nordic board to PC, ttyACMX gets created.
$ socat -x /dev/ttyACMX,raw,b1000000 unix-listen:/tmp/bt-server-bredr
Build app with prj_nble.conf and run with make qemu

Change-Id: I354644b465ad09ab0ca62fbd97f15d9bb3c87d6a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-05 11:18:53 +03:00
Andrei Emeltchenko
53c5979c2e quark_se_devboard: Configure UART0 for quark_se_devboard
UART0 is connected to Nordic BLE chip, copy the configuration from
arduino_101 where there is the same chip.

Change-Id: Ic9fe30f4562d261920c0cfd359ea34be4e7e2476
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-05 11:18:53 +03:00
Andrei Emeltchenko
feaa25315e quark_se_devboard: Enable NBLE for quark_se_devboard in Kconfig
Enable GPIO and select UART0 for Nordic BLE chip.

Change-Id: Ic1bf82a8b97fcc231eb857ee0bd05381a24a2d25
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-05 11:18:52 +03:00
Johan Hedberg
ad7912422f Bluetooth: Introduce SMP helper to generate RPAs
This will be needed to implement local privacy support.

Change-Id: I6222a7d396d47929d6f8946793bbf3f49eaae179
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-04 17:35:02 +03:00
Johan Hedberg
5c45a3bce1 Bluetooth: Export is_bonded through hci_core.c
There will be other uses, so rename this to bt_addr_le_is_bonded and
export it through hci_core.h.

Change-Id: Ia033a215255f2ec2e513c785dd1b9862faaf5ac8
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-04 17:35:02 +03:00
Andrei Emeltchenko
777a76297d drivers/nble: Implement GATT read Characteristic Presentation Format
Implement bt_gatt_attr_read_cpf() for NBLE.

Change-Id: Ia99db05a3f67bef3c1617df37fd371a8b1e8beb6
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-04 14:34:18 +00:00
Andrei Emeltchenko
0fd771acfc samples/nble: Remove default driver debug for samples
CONFIG_BLUETOOTH_DEBUG_DRIVER provides too low level information to be
useful for samples. Remove it from default settings.

Change-Id: I9d99f9953d4e6b839eeb51ed393e4aed1eeeb01b
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-04 14:33:50 +00:00
Johan Hedberg
0537c2c579 Bluetooth: Add support for reading local address from storage
If the local controller doesn't have a public address we need to
generate a static random address and use that as our Identity Address.

Change-Id: I3db261b630c670d285c6bfacbe090184cccb5e8c
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-04 14:01:59 +03:00
Johan Hedberg
7e7eee0fb4 Bluetooth: Add skeleton for persistent storage API
Add initial skeleton for the persistent storage API.

Change-Id: I7a6cc283aa88e7d861af18a6f0db2ed8c71e44a0
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-04 14:01:59 +03:00
Johan Hedberg
03ea90db8f Bluetooth: Rework local address tracking
Store the Identity Address and Random Address in their own variables.
If the controller doesn't have a public address a static random
address is set as the Identity Address. Also keep properly track of
which address was used for advertising and initiating connections so
that the connection object contains the right information.

Change-Id: I3e9dc2036b330c19c2725b180fd061da2df8a0fa
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-04 13:56:55 +03:00
Daniel Leung
8425568a8a gpio/dw: remove kconfigs that are SoC specific
Remove those kconfig options that are SoC specific, and
should not be configurable via kconfig.

Change-Id: Ib7e0b81b2df1a0225fc244fea3035416d0a4f282
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-02 23:11:07 +00:00
Daniel Leung
16d0b8b0a3 tests: enable pinmux build tests
Enable building pinmux drivers to catch build breakage.

Origin: Original
Change-Id: I86ec02423bf23ee6aca41b9413e240e984313fcf
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-02 23:11:06 +00:00
Laurentiu Palcu
7dd2372dd5 spi_dw: use SPI bus frequency in spi_dw_configure()
The SPI API states:

"max_sys_freq is the maximum frequency supported by the slave it
will deal with"

However, currently, for DW the max_sys_freq is a divider which confuses
the user.

This patch adds a small hack to allow users to use both dividers and
frequencies when configuring the bus. The only trade-off is one has to
use dividers for bus frequencies smaller than 65536Hz. However, since
most devices nowadays can run at clock frequencies more than 100kHz,
this is a good compromise.

Change-Id: I44386cc8ad501b08eeaf71bc7588661ff36e108b
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-04-02 23:08:49 +00:00
Laurentiu Palcu
dbe2c5faff bmi160: Add sample application
Origin: Original
Change-Id: I8bd3fa30f3794de0fa22ffff8e3eaeb213612741
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-04-02 23:08:48 +00:00
Laurentiu Palcu
5d2a200381 sensor: add driver for BMI160
This patch adds support for the Curie's BMI160 IMU chip. Only polling is
supported in this version.

Datasheet:
http://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BMI160-DS000-07.pdf

Origin: Original
Change-Id: I759856d4bf123c21e9e4928f32bdf8f00aeeed24
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-04-02 23:08:48 +00:00
Laurentiu Palcu
d43e152845 sensor.h: Add helper functions for unit conversions
Since sensors' API uses SI units, all attributes and channel reading use
SI units. Hence, conversions from other units to SI are necessary.

This patch adds helper for converting:
 * m/s^2 to Gs (and vice versa);
 * degrees to radians (and vice versa);

Change-Id: I49f8763bed253ff6bde4c97618766b05f97da699
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-04-02 23:08:48 +00:00
Laurentiu Palcu
3ed141ecd3 sensor.h: add new attributes
This patch as following attributes:
 * SENSOR_ATTR_OFFSET: for setting offsets in order to adjust the read
   values;
 * SENSOR_ATTR_CALIB_TARGET: for setting target that the chip internal
   algorithms need to converge to when calibrating;

Change-Id: I3aae5aa06bcd1376423e58b0511267ea43038718
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-04-02 23:08:47 +00:00
Johan Hedberg
9eec87a0ef Bluetooth: Remove unnecessary double check for CONFIG_BLUETOOTH_CONN
Change-Id: I3329cf1314cbcd4e6bb7015b9b52fd6c52526567
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-02 20:59:09 +03:00
Johan Hedberg
a85b1f7752 Bluetooth: Shorten set_adv_parameters to set_adv_param
The shorter form "param" is used elsewhere and this helps avoid overly
long lines.

Change-Id: Ie76497b5bf30e72099d13a26db9cacb8cd2c9c79
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-02 20:59:09 +03:00
Anas Nashif
fb663cac0d Zephyr 1.2.0
Change-Id: Ie223f458776c81439db8cd4c3a25b4753599588b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-02 08:45:35 -04:00
Anas Nashif
297c920dc7 sanitychecks: update footprint numbers
Change-Id: I66c71f7322e1529d7b5bfda5b29eeb078b13daf1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-02 08:45:16 -04:00
Daniel Leung
7328eb0d9e pinmux/galileo: include board.h
Or else, PINMUX_NUM_PINS is not found.

Change-Id: I48c173395f2cda72e8915c46aad964e83509a605
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-01 09:52:04 -07:00
Anas Nashif
5ddc8934cc arduino_101/quark_se_devboard: speed up flashing the SS
Set the target to ARC to speed up flashing. the difference:

before
 downloaded 27320 bytes in 50.685825s (0.526 KiB/s)

after

 downloaded 27320 bytes in 3.396626s (7.855 KiB/s)

Change-Id: I53ca26f97eefd40e869662b137f5a659082aa478
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-01 14:14:10 +00:00
Maciek Borzecki
883baedc64 arm: linker: fix indentation
Change-Id: I72a4947119f1f2b6fcd59fadbe38a54b6bc1ea61
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:58 +00:00
Maciek Borzecki
f95e15a228 samples: bluetooth: ipsp: exclude STM32F103RB from the test
Exclude STM32F103RB based platforms from the test. The SRAM is overflown
by 14kB.

Change-Id: I37c2905ed2706a89d9a199bc49518937659ac997
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:58 +00:00
Maciek Borzecki
9e8e0e8e82 tests: bluetooth/shell: exclude STM32F103RB from microkernel test
For STM32F103RB targets, the SRAM is overflown by 2-3kB in microkernel
test. Platforms with this SoC can still be built for in the nanokernel test.

Change-Id: I012b93cf8dfec74292f7ab228f4b2fca1a4f3444
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:57 +00:00
Maciek Borzecki
109b10b26e test_sha256: disable test for STM32F103RB SoC
Exclude STM32F103RB platform from the test. The SRAM is overflown by
>20kB, while the CPU itself has 20kB of SRAM.

Change-Id: Ic9aad6b88d517b62f4a18901cd698ba9a9defb40
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:57 +00:00
Maciek Borzecki
54a055426d test_tickless: disable test for STM32 SoCs
Disable the test for STM32 based platforms until an implementation of
timestamp counter becomes available.

Change-Id: I2e50dac36dbfdc61081610c0e0cf1ace8892f602
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:57 +00:00
Maciek Borzecki
3b0a701ac1 bluetooth: shell: declare commands as const
Take advantage of shell_init() accepting const commands array. This
moves ~280 bytes from SRAM to the text section.

Change-Id: Id64ee766e3c6cf7ce4cc623a1e21d3dacf33f050
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:57 +00:00
Maciek Borzecki
1ab798ae5a samples: shell: declare commands as const
Take advantage of shell_init() accepting const commands array.

Change-Id: Ie8c023de62cda75f7057184555806401f0381a1a
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:56 +00:00