Commit graph

417 commits

Author SHA1 Message Date
Jukka Rissanen 41d17433f0 doc: net: Add more info for network connectivity with host
Added more detailed information how to connect Zephyr instance
to host system like Linux desktop.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-20 07:32:42 -05:00
Kumar Gala 8bd360fa14 boards: galileo: Fix I2C device name defaults
Fix setting of the I2C bus master device name for the GPIO_PCAL9535A
device and PWM_PCA9685.  We need to extract them from the dts otherwise
they will just get set to "".

Fixes #13458

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-18 23:39:12 -05:00
Anas Nashif d448726aba boards: minnowboard: add image to qemu boards
Add board image and expand intro section.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-11 07:45:21 -05:00
Anas Nashif 762f4f26ad boards: qemu: add image to qemu boards
Add Qemu logo to qemu boards and expand intro.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-11 07:45:21 -05:00
Anas Nashif 99921cb917 boards: galileo: add image
Add image and expand intro section.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-11 07:45:21 -05:00
Anas Nashif 75e91bfbda boards: up_squared: add intro and image
Expand overview and add image of board.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-11 07:45:21 -05:00
Anas Nashif acaae579cc doc: boards: make board images consistent with board name
Having the image use the same name will help us script listing the
boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-10 17:48:08 -05:00
Anas Nashif dd95d2ffb9 board: up_squared_sbl: fix board identifier
This board had the wrong identifier.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-10 17:48:08 -05:00
Anas Nashif 0e4ff809d7 doc: boards: move all board docs to be index.rst
Be consistent in how board docs are named and move all to index.rst.
This will make the URL to the board documentation predictable and easier
to remember.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-09 17:22:08 -06:00
Kumar Gala 4c51684918 drivers: i2c: dw: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert designware i2c driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:50:07 -05:00
Kumar Gala 33ab2fa42e boards: Change supported 'rtc' to 'counter' for QMSI RTC based boards
We've removed the QMSI RTC driver as part of the new counter API.  So
any old rtc tests don't build for QMSI based boards anymore.  Switch
this from 'rtc' to 'counter' in the board.yaml.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 07:31:21 -05:00
Daniel Leung f7a42a70f8 gpio: intel_apl: rework driver for pin_mask callback
To avoid confusion, callbacks using ordinal pin numbers
is going to be reverted. So the driver has to be re-worked
to expose multiple devices so each device has 32 pins.

Also fixes #12765

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-02-06 07:18:15 -05:00
Daniel Leung 7695a72e3c drivers/interrupt_controller: shared_irq: configure by device tree
This allows the shared_irq driver to be configured by device tree.
With previous implementation, only the board configuration can
override the IRQ trigger, as the trigger config is a "choice" rather
than "config". With this patch, the driver can be fully configued at
the SoC level.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-02-06 07:18:15 -05:00
Andrew Boie 2d9bbdf5f3 x86: remove support for non-PAE page tables
PAE tables introduce the NX bit which is very desirable
from a security perspetive, back in 1995.

PAE tables are larger, but we are not targeting x86 memory
protection for RAM constrained devices.

Remove the old style 32-bit tables to make the x86 port
easier to maintain.

Renamed some verbosely named data structures, and fixed
incorrect number of entries for the page directory
pointer table.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-02-05 20:51:21 -08:00
Kumar Gala f054ba2b65 flash: w25qxxdv: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert w25qxxdv driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-28 10:40:31 -06:00
Kumar Gala 2492d52f5c ieee802154: cc2520: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert cc5250 driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-28 10:40:14 -06:00
Kumar Gala b7cda2d33a boards: x86: arduino_101: Fix SPI dts node
We are utilizing CS0 for the flash, so the reg address should be 0 to
match.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-23 09:45:32 -06:00
Anas Nashif d9ec5eca24 hpet: remove HPET_TIMER_*_EDGE and HPET_TIMER_LEVEL_*
This option is not used anywhere and was removed when the hpet driver
was rewritten.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-22 07:45:22 -05:00
Anas Nashif 1d11945739 hpet: remove unused HPET_TIMER_LEGACY_EMULATION
This option is not used anywhere and was removed when the hpet
driver was rewritten.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-22 07:45:22 -05:00
Adithya Baglody 777407b9ea gcov: Add coverage supported boards.
Not all boards can get the coverage reports. The report generation
needs minimum of 64KB SRAM. This patch added support for mps2_an385,
qemu_cortex_m3, qemu_x86. This is just a subset. Also the previously
supported board native_posix is included in this patch.

If a board has 64KB RAM, it can generate reports by just
adding HAS_COVERAGE_SUPPORT in Kconfig.board.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-01-16 06:12:33 -05:00
Kumar Gala a4c3feced4 dts: flash: w25qxxdv: Add Device Tree Support for SPI FLASH w25qxxdv
Convert the w25qxxdv driver to use device tree for SPI device params.
Updated the Arduino 101 config to use device tree to specify the SPI
flash.  Update the arduino_101_sss to drop Kconfig support for the
w25qxxdv flash.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-09 10:26:10 -06:00
Jakub Rzeszutko f8178dcb05 shell: remove Console dependencies
Removed Console dependencies from shell uart backend.
Generated define: CONFIG_UART_SHELL_ON_DEV_NAME for each board.

Fixes #10191

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-12-07 12:11:11 +01:00
Patrik Flykt 25e8e4d4e7 boards: Add 'U' to unsigned variable assignments
Add 'U' to a value when assigning it to an unsigned variable.
MISRA-C rule 7.2

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2018-12-04 22:51:56 -05:00
Andrei Emeltchenko 1bf0870d2a doc: up_squared: Add network booting documentation
Add instructions for booting Zephyr over network.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-04 00:01:35 -05:00
Andrei Emeltchenko 9c144e9c0a doc: up_squared: Use contents instead of hardcoded toc
Use contents instead of hardcoded chapters in TOC.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-04 00:01:35 -05:00
Andrei Emeltchenko 32655ae2e7 doc: up_squared: Clean up documentation
Cleanup documentation following common standards

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-04 00:01:35 -05:00
Andrei Emeltchenko b05c6834ad scripts: Add net and tftp to grub
This allows to boot over network for up_squared board.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-04 00:01:35 -05:00
Andrew Boie 1c5642a402 boards: x86: don't turn on mem protection
This is not enabled at the board level.
tests/Kconfig turns this on for test cases.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-11-28 15:33:11 -08:00
Paul Sokolovsky 182ede4912 boards: qemu_x86: Remove QEMU options which break eth_e1000 driver
"-machine type=pc-0.14" appears to be the option which leads to
broken PCI emulation in QEMU, where PCI enumeration reports one
IRQ number (11), while actually IRQ 10 is emulated by QEMU.

"-vga none" and "-display none" appear to be just subordinate of
"-machine type=pc-0.14" and are required to get qemu_x86 into
bootable state.

Fixes: #11706

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-11-28 11:00:09 -08:00
David B. Kinder 096e18c2f8 doc: fix broken link in upsquared board doc
Link to upsquared specifications was incorrect

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-27 18:19:21 +01:00
Anas Nashif e4505892bc boards: add docs for quark_se_c1000_devboard
Add documentation for the quark_se_c1000_devboard with links to platform
guidelines and other details.

Fixes #11166

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-22 15:10:47 -05:00
Anas Nashif 8f807946b1 boards: quark_d2000_crb: fix board name
Fixed typo in documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-22 15:10:47 -05:00
Kumar Gala a1a321431b boards: up_squared: Rework dts_fixup.h to work w/o BOARD_DIR include
Merge up_squared_dts_fixup.h and up_squared_sbl_dts_fixup.h into
dts_fixup.h.  This allows us to remove BOARD_DIR from being included
everywhere.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-20 14:08:01 -05:00
David B. Kinder e4759cbc41 doc: fix links in Galileo doc
Fix link text to remove substitutions that are ignored by Sphinx.  Also
replace link to Quark SOC HW ref manual to be from an Intel site (not
Russian).

Fixes: #11516

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-19 21:36:22 -05:00
Kumar Gala 25d17db96b ieee802154: cc2520: quark_se_c1000_devboard: Move all GPIOs to DTS
Added support to the ti,cc2520 binding for optional GPIO signals and
moved the quark_se_c1000_devboard to define those signals in the DTS.
This lets us remove board.h and some #defines & fake Kconfig symbols
from the quark_se_c1000_devboard board.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-16 14:02:00 -05:00
Kumar Gala 27469810ac board: quark_se_c1000_devboard: Move the CC2520 DTS node to the board
The CC2520 device is specific to the quark_se_c1000_devboard not the
intel curie SoC.  Move the device node where it belongs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-16 14:02:00 -05:00
Kumar Gala f249a0f4f2 ieee802154: cc2520: Move to DT only config support
Now that the in tree user of cc2520 uses device tree to configure SPI
and GPIO params, we can remove and convert the driver to utilize DT
only.  This means removing the Kconfig options that come from DT and
rename CONFIG_ to DT_ for those options.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-16 14:02:00 -05:00
Tomasz Bursztyka 1b3b0153a6 boards/x86: Use dts for configuring the cc2520 device
Only the SPI bus for now.
Make cc2520's Kconfig aware of DTS on these settings.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-11-16 14:02:00 -05:00
Kumar Gala fd6e9c6f58 dts: i2c: cleanup CONFIG_I2C_x_IRQ_PRI
The majority of cases of CONFIG_I2C_x_IRQ_PRI should be
DT_I2C_x_IRQ_PRI.  So go ahead and fix them up.  Only the i2c_nios
driver still uses Kconfig for getting priority.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-16 13:57:02 -05:00
Aiden Park 16dca3773f boards/x86: up_squared: add support for SBL(Slim Bootloader)
This adds a primitive board configuration for the UP Squared board to
work properly with SBL(Slim Bootloader).
- https://github.com/slimbootloader/slimbootloader
- https://slimbootloader.github.io/

BOARD shall be 'up_squared_sbl'
  cmake -GNinja -DBOARD=up_squared_sbl ..
  ninja

Signed-off-by: Aiden Park <aiden.park@intel.com>
2018-11-15 17:51:51 -05:00
Kumar Gala f210d11970 boards: Remove including soc.h in board.h
We should let drivers or board code include soc.h directly so we can keep
board.h to local info for board specific code.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-14 06:44:02 -06:00
Kumar Gala 758d5b14a9 boards: Remove board.h from boards that don't need it
These boards don't need board.h to work so remove it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-14 06:44:02 -06:00
Ulf Magnusson 4638652214 Kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
This can help find unused symbols. Those end up without a type if
'default' is used instead of 'def_bool', which generates a warning.

Search for "Kconfig.defconfig" in
https://docs.zephyrproject.org/latest/application/kconfig-tips.html for
a longer explanation.

Keep the 'def_bool' for the following symbols, which seem to be
deliberately defined only in Kconfig.defconfig files:

 - ALTERA_AVALON_I2C
 - ALTERA_AVALON_MSGDMA
 - ALTERA_AVALON_PIO
 - ALTERA_AVALON_QSPI
 - ALTERA_AVALON_SYSID
 - CLOCK_CONTROL_IMX_CCM
 - CPU_EM4_DMIPS
 - CPU_EM4_FPUDA
 - CPU_EM4_FPUS
 - FP_FPU_DA
 - I2C_GECKO

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-11-13 16:04:01 -05:00
Andrzej Głąbek 20202902f2 dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig
These changes were obtained by running a script  created by
Ulf Magnusson <Ulf.Magnusson@nordicsemi.no> for the following
specification:

1. Read the contents of all dts_fixup.h files in Zephyr
2. Check the left-hand side of the #define macros (i.e. the X in
   #define X Y)
3. Check if that name is also the name of a Kconfig option
   3.a If it is, then do nothing
   3.b If it is not, then replace CONFIG_ with DT_ or add DT_ if it
       has neither of these two prefixes
4. Replace the use of the changed #define in the code itself
   (.c, .h, .ld)

Additionally, some tweaks had to be added to this script to catch some
of the macros used in the code in a parameterized form, e.g.:
- CONFIG_GPIO_STM32_GPIO##__SUFFIX##_BASE_ADDRESS
- CONFIG_UART_##idx##_TX_PIN
- I2C_SBCON_##_num##_BASE_ADDR
and to prevent adding DT_ prefix to the following symbols:
- FLASH_START
- FLASH_SIZE
- SRAM_START
- SRAM_SIZE
- _ROM_ADDR
- _ROM_SIZE
- _RAM_ADDR
- _RAM_SIZE
which are surprisingly also defined in some dts_fixup.h files.

Finally, some manual corrections had to be done as well:
- name##_IRQ -> DT_##name##_IRQ in uart_stm32.c

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-11-13 10:44:42 -06:00
Andrzej Głąbek f39ba7230d dts_fixups: Update labels generated from DTS with DT_ prefix
All labels containing "_<8-hex-digits>_" or "16550_<3or6-hex-digits>_"
in their names, assumed to be generated by the extracting script,
are updated with the DT_ prefix, to reflect the recent changes made
to the script.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-11-13 10:44:42 -06:00
Kumar Gala e8587f4493 usb: Make USB_VBUS_GPIO a Kconfig option
Previously we had a set of magic #define's in board.h that would both
enable and set the GPIO controller & pin if a given board used a GPIO
for USB VBUS.  Now we make it a proper Kconfig set of options that
specify if the feature is needed, the GPIO controller device name, and
pin number.  In the future this should move to devicetree.

Updated the related boards that used this feature to set the Kconfig
options in the Kconfig.defconfig

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-13 07:10:04 -06:00
Jukka Rissanen 421505c7e3 net: qemu: Allow SLIP or normal ethernet connectivity
Introduce new Kconfig option for selecting either slip or ethernet
connectivity to host.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-11-10 09:13:45 -05:00
Tomasz Bursztyka d658e03488 drivers/spi: Remove unused legacy options
These have been osbolete for some time already.

Fixes #11064

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-11-09 05:25:11 -06:00
Tomasz Bursztyka 3792728582 boards/galileo: Enable SPI port 0 by default
As it used to be before in relevant quark_x1000 soc's Kconfig.

Fixes #11064

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-11-09 05:25:11 -06:00
Tomasz Bursztyka 79e24fe7f0 boards/x86: Removing cc1200 support on quark_se_c1000_devboard
This required wiring external daughter board by hand, it's not provided
by the board directly, let's remove this.

Applying the change on relevant samples.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-11-09 05:25:11 -06:00
Kumar Gala 37f911375a Kconfig: dts: Move HAS_DTS to arch level
Remove either duplicate settings between arch & board, or just set
HAS_DTS at the arch level since all the boards for a given arch support
DTS now.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-06 18:35:39 -05:00
Anas Nashif e25d67b7b0 boards: qemu_x86: remove deprecated qemu options
Options "-clock dynticks" and  "-balloon none" are deprecated and
produce warning in recent Qemu versions, so remove them.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-06 12:42:08 -05:00
Anas Nashif 8d138ede02 boards: dts: define default console only
When using USB CDC, set that via an overlay instead of in the board DTS.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-05 12:07:30 -06:00
Daniel Leung 7ad0dd0eec boards: up_squared: dts: fix a typo in I2C address
The address to the I2C6 controller has a typo. So fix it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-11-02 21:58:02 -04:00
Kumar Gala aacdd64584 boards: Cleanup include of board.h
Remove some references <board.h> that aren't need or replace them with
<soc.h> where that is the proper include to pull in.  Also use "board.h"
instead of <board.h> for how we include the file when its local to the
board code itself.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-01 13:15:18 +01:00
Kumar Gala 7ae220c845 dts: x86: Fix dts warnings when building up_squared
Fix the following dts warnings:

up_squared.dts_compiled: Warning (simple_bus_reg): /soc/gpio@0:
	simple-bus unit address format error, expected "d0c50000"
up_squared.dts_compiled: Warning (simple_bus_reg): /soc/i2c@91528000:
	simple-bus unit address format error, expected "9158000"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-18 07:02:32 -05:00
Andy Ross 25863549be kernel: Remove clock_always_on control from k_busy_wait()
This feature was a useless noop based on mistaken API understanding.

The idea seems to have been that k_busy_wait() included guards to
ensure "clock_always_on" was true duing the loop, presumably because
the original author was afraid that "turning the clock off" would
affect the operation of k_cycle_get_32().

Then later someone came around and "optimized" this for Quark SE,
where the cycle counter is the RTC and unrelated to the timer driver
used by the clock_always_on feature.  (Except even there it presumably
should have been done at the SoC level and not just in the C1000
devboard -- note that Arduino 101 never would have gotten this).

But it was all a mistake: "clock_always_on" has nothing to do with
en/disabling the system cycle timer (which never happens when the
system is active, that's a feature of idle), it's a control over the
delivery of timer interrupts.  And needless to say we don't care about
timer interrupts when we're spinning on a cycle counter.

Yank the whole mess.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-10-16 15:03:10 -04:00
Oleg Zhurakivskyy 2f6961b778 boards/qemu_x86: Rename dts.fixup to dts_fixup.h
Use the new naming for DT fixup.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2018-10-10 13:57:02 +03:00
Tomasz Bursztyka 6ebc766043 boards/qemu_x86: Add a dts entry for the e1000 Ethernet controller
With approriate fixups.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2018-10-10 04:17:15 -04:00
Tomasz Bursztyka a804a4f119 dts: Add a dedicated config option for Ethernet DTS based entries
This will be usefull to tell when Ethernet device has its attributes
filled in by DTS rather than by Kconfig.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-10-10 04:17:15 -04:00
Kumar Gala 0d1203118f boards: x86: Convert boards to use device tree for LEDs & Buttons
Convert over x86 based boards to use device tree instead of board.h to
describe buttons & LEDs.  There are a few boards that the button gpio
flags need validation.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-09 11:48:54 -04:00
Sebastian Bøe 8eb734cd82 DT: Rename from dts.fixup to dts_fixup.h
The Zephyr configuration system uses many different files in many
different formats. It makes it a lot easier for users to understand
what these files do if when we use the correct file extensions.

To this end we rename the dts.fixup files to the correct file
extension '.h'.

This is a breaking change for out-of-tree fixup files. Such files will
be detected and given an appropriate error message.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-10-08 11:38:56 -04:00
Maureen Helm 55caa7b743 drivers: spi: Select HAS_DTS_SPI in designware driver
Makes the designware spi driver consistent with other spi drivers by
selecting HAS_DTS_SPI in the driver. This required adding spi nodes and
dts fixups to several arc and x86 socs, as well as enabling those nodes
in associated boards.

Also refactors the driver to use the base address, interrupt number, and
interrupt priority from dts.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-28 06:27:06 +05:30
Maureen Helm 8d89815084 boards: Remove redundant "select HAS_DTS_I2C"
The i2c drivers now consistently select HAS_DTS_I2C, so we no longer
need to select it at the board level.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-27 05:54:54 +05:30
Daniel Leung d328a4fede boards/x86: up_squared: add GPIO dts configuration
This adds the necessary dts entires to enable GPIO controller
on the UP Squared board.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-19 21:36:16 -04:00
Daniel Leung 2f0282a239 boards/x86: up_squared: updates SYS_CLOCK_HW_CYCLES_PER_SEC
Sets the HPET timer frequency (enabled by default) to 19.2MHz.
And also sets the local APIC timer frequencies according to
the SoC variant.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-19 21:36:16 -04:00
Daniel Leung 6802534d81 boards/x86: up_squared: add board option for SoC variants
There are currently three SoC variants for the UP Squared board:
Pentium, Celeron and Atom. This adds a board option to specify
for which variant is being built.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-19 21:36:16 -04:00
Kumar Gala 6e240da26f dts: Use new DT_SIZE_{K,M} macros
Now that we have a common DT_SIZE_K macro use it instead of defining
__SIZE_K eveywhere.  We also have DT_SIZE_M, so use that in a few
places as well.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-15 09:23:07 -05:00
Daniel Leung c1db146b27 Revert "boards: quark_d2000_crb: Remove adc support"
This reverts commit b0d3b560238fac09e63064620de9ff820cf8cc47.

Since we now have a working ADC driver for Quark D2000,
re-add the tag.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-05 18:38:57 -04:00
Daniel Leung 8708611fab adc: add native driver for Quark D2000
This adds a native ADC driver for Quark D2000.

Original: origin

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-05 18:38:57 -04:00
Anas Nashif d3bdc85112 boards: arduino_101: remove mention of boot stub
The stub is used for testing only and is not compatible anymore with the
usage documented here.

Fixed #9772

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-05 12:06:37 -04:00
Punit Vara ea4305a469 boards: quark_d2000_crb: Remove adc support
Remove ADC support from d2000 as it is not migrated to
new ADC apis.

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-08-29 13:46:57 -04:00
Savinay Dharmappa 8c91001ada boards: x86: arduino_101: set DISK_FLASH_MAX_RW_SIZE to 256
set DISK_FLASH_MAX_RW_SIZE to 256, as maximum bytes that can be
programed to SPI FLASH by Page Program Command is 256.

Fixes #8506

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-08-29 07:54:55 -04:00
Daniel Leung 7b0c7aab22 boards/x86: up_squared: support new devices and Atom SoC
The board config has been verified to boot with serial console
on the Atom version of the UP Squared board. So the references
to Pentium/Celeron can be removed. Moreover, add some notes on
BIOS settings, as it may change the MMIO addresses for various
IP blocks.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-07-27 17:16:18 -04:00
Daniel Leung bcc95235c5 boards/x86: up_squared: add I2C configurations
Add the necessary bits to enable the I2C controllers on
the UP Squared board. Only the ones exposed through the HAT
connector(s) are enabled by default.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-07-27 17:16:18 -04:00
Zide Chen 98775f34c3 kconfig: decouple realmode boot from CONFIG_JAIHOUSE
Add CONFIG_REALMODE item so that it's possible to configure other
x86 boards to boot from real mode.

Signed-off-by: Zide Chen <zide.chen@intel.com>
2018-07-24 15:37:09 -07:00
Daniel Leung efb0080d8b boards/x86: up_squared: fix UART interrupt triggers
The triggers for UART interrupts are actually active-low.

Signed-off-by: Daniel Leung <danielcp@gmail.com>
2018-07-23 17:20:10 -04:00
Daniel Leung 04d1a38b45 boards: x86: add support for UP Squared (Pentium/Celeron)
This adds a primitive board configuration for the UP Squared board
containing Apollo Lake based Pentinum and Celeron SoC. This has
been tested on model UPS-APLP4-A10-0432.

This starts from the minnowboard configuration, and document
from galileo.

Origin: Original

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-07-17 16:27:52 -04:00
Daniel Leung 2bda5cf1a7 boards/x86: scripts: extend build_grub.sh for 64-bit UEFI
This extends the build_grub.sh script so that it can build 64-bit
Grub UEFI application, and thus enabling us to boot on systems
with 64-bit BIOS.

Also updated the script to checkout the tag grub-2.02 since
v2.02 has been out.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-07-17 16:27:52 -04:00
Ulf Magnusson ef1544301f boards: arduino_101_mcuboot: Remove Kconfig settings moved to DTS
The PHYS_LOAD_ADDR Kconfig symbol was removed by commit b8ea7c889d
("x86: remove HAS_DTS checking"). The ROM_SIZE Kconfig symbol was
removed by commit e524f0b846 ("dts: x86: derive RAM and ROM size from
dts instead of Kconfig").

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-10 08:17:20 -04:00
Anas Nashif ae5105c08b boards: more boards with xtools support
Add first set of boards which can be built with xtools, this will
include all boards at some point, so we might need a better way to
whitelist toolchains that does not include changing every single board
definition file. For now enabling those needed for testing the new
toolchain.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-08 15:39:35 -04:00
Andy Ross 225c74bbdf kernel/Kconfig: Reorgnize wait_q and sched algorithm choices
Make these "choice" items instead of a single boolean that implies the
element unset.

Also renames WAITQ_FAST to WAITQ_SCALABLE, as the rbtree is really
only "fast" for large queue sizes (it's constant factor overhead is
bigger than a list's!)

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-07-03 17:09:15 -04:00
Ulf Magnusson fb0366b339 boards: Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that for any of the removed properties though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-27 17:15:31 -05:00
Alex Tereschenko 3c1a78ea0d cmake: replace PROJECT_SOURCE_DIR with ZEPHYR_BASE
Both variables were used (with the same value) interchangeably
throughout CMake files and per the discussion in GH issue,
ZEPHYR_BASE is preferred.

Also add a comment with explanation of one vs. the other.

Tested by building hello_world for several boards ensuring no errors.

Fixes #7173.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2018-06-18 15:25:55 -04:00
Tomasz Bursztyka 2fe51996db drivers/flash: Remove irrelevant option in w25qxxdv driver
CONFIG_SPI_FLASH_W25QXXDV_MAX_DATA_LEN is a left-over from old SPI API
usage. Now, there is no limit (besides the flash size) in SPI data
transaction.

Fixes #8327

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-06-14 14:41:52 -04:00
Ulf Magnusson 02b5f3edc8 drivers: gpio: Fix GPIO_QMSI_{0,1}_NAME Kconfig references
These symbols were removed by commit ed26b95 ("drivers/gpio:
Removing dts generated options in QMSI Kconfig"). The settings should
come from DTS now.

Commit 9611002f7a ("boards/x86: Use right GPIO names for CC2520")
fixed some of the references, but there are still others left. Guess
that the same fix is appropriate in those spots (hardcoded
"GPIO_0"/"GPIO_1" names).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-13 13:35:56 -04:00
Tomasz Bursztyka 9611002f7a boards/x86: Use right GPIO names for CC2520
GPIO_QMSI_<0/1>_NAME are now generated through DTS. Until CC2520
settings are generated through DTS, let's use direct gpio names
instead.

Fixes #8086

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-06-04 14:34:00 -04:00
Tomasz Bursztyka 538db99882 boards/x86: Removing undefined Kconfig symbol in quark_se_c1000_devboard
CONFIG_UART_QMSI_1_NAME is not generated via Kconfig anymore.

Fixes #7799

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-06-04 08:24:28 -04:00
Tomasz Bursztyka af411f316e boards/x86: Fix support for w25qxxdv on arduino_101
It requires to use w25qxxdv spi gpio cs settings.

Fixes #7766

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-05-29 16:21:08 -04:00
Ulf Magnusson a3128e6a2c boards: defconfig: Consistently quote string defaults
In preparation for introducing a warning.

Unquoted string defaults work through a quirk of Kconfig (undefined
symbols get their name as their string value), but look confusing. It's
done inconsistently now too.

Suggested by Kumar Gala.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-26 19:17:48 -04:00
Leandro Pereira a85c546203 boards: x86: minnowboard: Unset CONFIG_X86_NO_SPECTRE_V4 by default
According to INTEL-SA-00115[1], Intel(r) Atom(tm) Processor E Series
are affected.  All Minnowboards sports one of these processors.

[1]: https://goo.gl/CKyLQy

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-05-24 13:07:12 -04:00
Sebastian Bøe cde6bef778 kconfig: Drop support for CONFIG_TOOLCHAIN_VARIANT
The Kconfig option TOOLCHAIN_VARIANT (not to be confused with
ZEPHYR_TOOLCHAIN_VARIANT) is a legacy configuration option that has
very few use-cases and can easily be dropped.

It's functionality is easily covered by CONFIG_X86_IAMCU and
ZEPHYR_TOOLCHAIN_VARIANT.

This commit removes all references of it from Zephyr.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-05-22 11:15:36 -04:00
Marti Bolivar 59dc82e0d2 boards: adjust openocd runner arg syntax
The current method of setting the openocd runner arguments works for
direct invocation from the command line, but the values that are
written to the CMake cache are not properly separated and are
difficult to parse, due to the fact that in several cases, option
values contain spaces.

Adjust these runner arguments so that the options and their values are
separate list items. This makes it possible to parse them accurately
from the CMake cache.

No functional changes.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-05-19 07:01:39 +03:00
Andy Ross f8288abd22 boards/qemu_x86: Enable fast scheduler options
This target is already using the rbtree as part of CONFIG_USERSPACE,
so it incurs no code size overhead (actually it's a little smaller)
when using the scalable scheduler and waitq implementations.

The change also gets us test coverage of those choices on a default CI
target.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-05-19 07:00:55 +03:00
Anas Nashif 103cbe8c90 boards: minnowboard: do not run net/bluetooth tests
This board does not support both bluetooth and networking, so skip those
tests for now.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-16 23:10:30 +03:00
Savinay Dharmappa e524f0b846 dts: x86: derive RAM and ROM size from dts instead of Kconfig
patch removes Kconfig defines for RAM and ROM size in x86. Instead
these values are derived from dts.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-05-14 17:19:23 -04:00
Ulf Magnusson 9c032eb14d boards/arduino101: Enable UART 0 controller
boards/x86/arduino_101/arduino_101_defconfig currently enables
CONFIG_UART_QMSI_0_HW_FC (HW flow control on UART 0), but doesn't enable
CONFIG_UART_QMSI_0 (the UART itself), which is a direct dependency.

This means CONFIG_UART_QMSI_0_HW_FC remains disabled despite the request
to enable it, and kconfig.py prints a warning.

Enable CONFIG_UART_QMSI_0 in the arduino_101_defconfig.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-04-12 17:55:46 -05:00
Kumar Gala c542c0e33e boards: dts: Cleanup aliases
Underscore ('_') isn't a valid char for alias names based on the device
tree spec.  Newer dtc compilers flag this as a warning so lets clean it
up.  Replaced '_' with '-' to keep things simple.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-04-12 04:03:46 -05:00
Anas Nashif 973ec4ea62 boards: reduce testing on the same platform with variations
We are testing and building this already using qemu_x86, no need to
build the same thing all over again.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 22:55:20 -04:00
Anas Nashif 2ee6dff77b boards: fix yaml syntax and reduce indentation
Minor indentation fix

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 22:55:20 -04:00
Andrew Boie 7d301cbb6c cmake: qemu_x86: remove useless options
BIOS options are unnecessary and were breaking 'make run' on
OS X.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-04-04 20:31:24 -04:00
Tomasz Bursztyka 1f0bfb8529 boards/x86: Pinmux SPI port 2 relevantly on quark_se_c1000_devboard
This port is a slave SPI port only.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka 6d870ae25c arch/quark_se: Switch to native SPI DW driver
QMSI is not updated to latest SPI API. Switching to native DW driver,
until we find a way either to update the shim drivers in a
non-performant way, or updating QMSI itself enabling support for
scatter-gather type of buffers.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka d620c16a0d drivers/adc: Switch ti_adc108s102 driver to new SPI API
Replacing legacy API calls by news ones.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka d4065ae73e drivers/ieee802154: Switch CC2520 to new SPI API
Finally switching to new SPI API. It makes code simpler and performs
better.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Kumar Gala ca5964d66d board: x86: tinytile: Enable I2C through DTS
For some reason tinytile was missed in the conversion of quark_se boards
to use DTS for I2C.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-26 10:51:35 -04:00
Anas Nashif 66d60d2941 boards: delete arduino_101_ble board
This board is the same as curie_ble, so remove duplication and have only
one board definition.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-03-23 16:21:16 -04:00
Tomasz Bursztyka 2e972bc867 arch/x86: Enable i2c through DTS for quark_d2000
And adapt the relevant board accordingly.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-03-23 10:42:33 +08:00
Tomasz Bursztyka 5fc1f5ff1d arch/x86: Enable i2c through DTS for quark_se
And adapt relevant boards accordingly.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-03-23 10:42:33 +08:00
Tomasz Bursztyka e35a4a2576 boards/galileo: Switch to DTS for generating i2c settings
Thus dropping SoC based generated information.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-03-23 10:42:33 +08:00
Andrew Boie 1c5e6b2d3e qemu_x86: enable CONFIG_DEBUG_INFO
Minimal performance cost and will enable runtime stack traces.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-03-16 14:12:15 -07:00
Paul Sokolovsky 69957a3d0f boards: Add "ram" and "flash" properties for a number of boards
Currently, it seems that only boards with smaller amount of RAM
get a value for "ram" property, and very few boards have "flash"
defined. However, to test bigger sample applications, it's helpful
to have these properties universally defined.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-03-16 13:44:06 -07:00
Iván Sánchez Ortega 9d2915b763 boards: Remove USB VID/PID from tinytile
According to a conversation with @carlescufi and @finikorg, the
zephyr codebase should only use the Linux Foundation USB vendor
ID. The USB vendor IDs and product IDs in the board definitions
are an obsolete leftover from old code and no longer needed.

Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
2018-03-14 16:32:44 -07:00
Kumar Gala d2e89856cc cmake: dts: Fix usage of BOARD vs BOARD_FAMILY
We assumed that ${BOARD} and ${BOARD_FAMILY} are always the same and
thus interchangeable.  That isn't always the case so use ${BOARD} proper
for when we mean the exact BOARD name we are building for vs the
BOARD_FAMILY.

We also add .dts files for board variants within a board family, such
that we have a .dts matching each board name.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-27 19:56:47 -06:00
Kumar Gala dc6472f868 dts: x86/atom: Refactor SoC dts.fixup into arch/x86/soc/atom
Move common SoC dts.fixup defines into arch/x86/soc/atom/dts.fixup so we
remove duplication in the boards and only have board specific defines in
boards/x86/<FOO>/dts.fixup.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-26 10:55:36 -06:00
Kumar Gala d08661119e dts: ia32: Refactor SoC dts.fixup into arch/x86/soc/ia32
Move common SoC dts.fixup defines into arch/x86/soc/ia32/dts.fixup so we
remove duplication in the boards and only have board specific defines in
boards/x86/<FOO>/dts.fixup.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-26 10:55:36 -06:00
Kumar Gala 7e32b1d11f dts: quark_se: Refactor SoC dts.fixup into arch/x86/soc/intel_quark/<SOC>
Move common SoC dts.fixup defines into
arch/x86/soc/intel_quark/quark_se/dts.fixup so we remove duplication in
the boards and only have board specific defines in
boards/x86/<FOO>/dts.fixup.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-26 10:55:36 -06:00
Anas Nashif 8949233390 kconfig: fix more help spacing issues
Fix Kconfig help sections and add spacing to be consistent across all
Kconfig file. In a previous run we missed a few.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-15 23:20:55 -05:00
David B. Kinder 9a1d5d2d55 doc: fix misspelling in MinnowBoard doc
MinnowBoard has an uppercase "B" in its name.  Also added a link to the
config option mentioned.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-07 14:51:24 -05:00
Anas Nashif 2dec108da5 boards: add information about flashing/firmware
Add information about creating a boot image and the need to use a 32bit
firmware.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-05 06:48:01 -08:00
Anas Nashif 38828f1f8f boards: galileo: update documentation, add ref
Add a reference to flashing and booting so it can be used by minnowboard
and other boards.

Apply minor layout fixes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-05 06:48:01 -08:00
Anas Nashif c62003d161 boards: move grub script to a common place
Script can be used for other boards, so make it common.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-05 06:48:01 -08:00
Anas Nashif 8acdbd796e sanitycheck: support new simulation keyword
Some boards are supported natively by qemu. This option will allow us to
run tests using those platforms directly without having to go via a
dedicated qemu board definition.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-18 21:37:48 -05:00
Carles Cufi 72046a8abc doc: getting_started: Support multi-OS instructions
In order to be able to document the build on Windows and UNIX
systems, slight variations are required on the app commands
that are used throughout the documentation system.

This includes getting rid of the prompt symbol and providing commands
for both UNIX and Windows operating systems.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-18 16:53:31 -05:00
Maureen Helm dfdf5e37e1 boards: Move default pinmux enable to <board>_defconfig
Most boards enable the pinmux by default by setting CONFIG_PINMUX=y in
<board>_defconfig, but several boards did it in Kconfig.defconfig
instead. Several code reviews, such as #5043, have suggested using a
select in Kconfig.board to enable the pinmux, however this caused
warnings:

warning: (BOARD_LPCXPRESSO54114) selects PINMUX which has unmet direct
dependencies (BOARD_FRDM_K64F || BOARD_FRDM_KL25Z || BOARD_FRDM_KW41Z ||
BOARD_HEXIWEAR_K64 || BOARD_USB_KW24D512 || BOARD_GALILEO)

Fix how these boards enable the pinmux so they are more consistent with
other boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-01-18 11:40:56 -06:00
Tomasz Bursztyka 4a713aa824 boards/quark_se: Add an spi/gpio configuration for TI CC1200 15.4 chip
quark_se_c1000_devboard already embeds a cc2520 which is a 2.4Ghz 15.4
radio chip. But if one want to try a sub-Ghz radio chip such as the
cc1200 on it, it will require to wire as this configuration expects it
to be done.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-01-15 15:15:38 +02:00
Carles Cufi 7d764b35f3 cmake: Use path-corrected version of ZEPHYR_BASE
Instead of accessing the environment variable ZEPHYR_BASE every time we
require accessing the source code root, use an intermediate variable
that has OS path separators correctly set to '/' to avoid issues on
Windows.

Note: This removes the ZEPHYR_SOURCE_DIR CMake variable. External
applications using that will need to change to use the new ZEPHYR_BASE
variable.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-11 14:59:03 -05:00
Anas Nashif f006ea3b58 boards: add supported features
Update board definitions with supported feature. This is temporary
until we have full coverage for device drivers in DTS, then we can use
DTS instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif de4835902e tests: dma: use depends_on to whitelist platforms
Only build for those platforms that support DMA.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif be61a66e14 boards: remove panther board
This board was never released and is similar in many ways to the
quark_se_c1000_devboard.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-15 18:09:34 -05:00
Marti Bolivar 1d3c1150f0 boards: x86_jailhouse: fix build documentation
The build documentation for this board is misleading. It says to "set
JAILHOUSE_QEMU_IMG_FILE", *then* run cmake commands. But setting the
variable must be part of the cmake commands themselves. Fix it.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-12-15 16:49:13 -05:00
Savinay Dharmappa 21c2cf78f2 driver: serial: Get interrupt number from dts
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-12-15 11:22:55 -06:00
Savinay Dharmappa 54239d50a4 dts: x86: Add interrupt controller node
patch adds interrupt controller node and interrupt
property for device nodes.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-12-15 11:22:55 -06:00
Marti Bolivar 7a3462de7a scripts: runner: use arguments, not environment vars
The various runners (flash/debug scripts) use environment variables to
take arguments. This is legacy behavior which is not desirable.

Use command line arguments instead.

Note: this leaves more general environment variables with publicly
      documented behavior in place for now, for compatibility, e.g.:

      ZEPHYR_FLASH_OVER_DFU, OPENSDA_FW, ESP_IDF_PATH, PYOCD_DAPARG

For example, when using dfu-util to flash arduino_101, instead of
setting DFUUTIL_PID, DFUUTIL_ALT, and DFUUTIL_IMG environment
variables, have the script invocation look like this:

  python3 .../zephyr_flash_debug.py dfu-util flash \
          [common arguments omitted] \
          --pid=8087:0aba --alt=x86_app \
          --img=.../build/zephyr/zephyr.bin

Make similar changes for other runners (openocd, etc.) and
targets (debug, debugserver).

To implement this in the scripts:

  - have the individual scripts/support/runner/some-runner.py files
    register their own command line arguments

  - teach them to construct instances from arguments, not the
    environment

  - have zephyr_flash_debug.py request runners to register command
    line argument parsers, and handle arguments

In the build system:

  - add a new board_runner_args() extension function that board.cmake
    files can use to add to the zephyr_flash_debug.py command line

  - adjust cmake/flash/CMakeLists.txt to invoke with arguments

  - add new helper include files for each runner (like
    boards/common/dfu-util.board.cmake, etc.), which add default
    options as needed and then add on overrides from
    board_runner_args() calls

  - update board.cmake files to use the new includes and extension

This implied some tweaking when using openocd to make the CMake string
escaping and unescaping work properly.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-12-15 09:57:30 -05:00
Marti Bolivar e33ec242fd scripts: refactor flash/debug scripts to remove "shell"
The Python-based runners have replaced the old shell scripts. Refactor
the build system accordingly:

- FLASH_SCRIPT is now BOARD_FLASH_RUNNER
- DEBUG_SCRIPT is now BOARD_DEBUG_RUNNER

The values, rather than being the names of files, are now the names of
runners in scripts/support/runner. They are still short, descriptive
names like "openocd", "jlink", "em-starterkit", etc.

Adjust the zephyr_flash_debug.py call and runner internals
accordingly. Have each runner class report a name and the commands it
can handle. This lets us move some boilerplate from each do_run()
method into the common run() routine, and enables further improvements
in future patches.

The handles_command() method is temporary, and will be replaced by a
more general mechanism for describing runner capabilities in a
subsequent patch. The initial use case for extending this is to add
device tree awareness to the runners.

To try to avoid user confusion, abort the configuration if an
xxx_SCRIPT is defined.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-12-15 09:57:30 -05:00
Adithya Baglody 80d786a131 boards: quark_d2000: openocd: Fixed load image command for D2000.
During cmake migration the load image was not correctly set.
This was causing flash failures.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2017-12-13 20:13:07 -05:00
Anas Nashif 429c2a4d9d kconfig: fix help syntax and add spaces
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-13 17:43:28 -06:00
Adithya Baglody eb95d1ce7d x86: quark_d2000: ISR stack size was no longer sufficient.
For a lot of scenarios the isr stack was no longer enough.
Hence increased the stack size.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2017-12-13 10:50:09 -08:00
Gustavo Lima Chaves 4be1db0aac cmake: jailhouse: fix check for JAILHOUSE_QEMU_IMG_FILE
Also remove old, now unused, makefile with previous logic on that.

Signed-off-by: Gustavo Lima Chaves <gustavo.lima.chaves@intel.com>
2017-12-12 09:31:31 -05:00
Sebastian Bøe 6a2a94b124 cmake: qemu: Allow -kernel to be overridden
This is needed by platforms like jailhouse.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Gustavo Lima Chaves <gustavo.lima.chaves@intel.com>
2017-12-12 09:31:31 -05:00
Sebastian Bøe e0e7a7d852 cmake: Reorganize how qemu is found
We don't want to pollute core-infrastructure with board-specific code,
so we move the qemu discovery to after board.cmake has been executed,
and we introduce the overridable QEMU_binary_suffix CMake variable.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2017-12-12 09:31:31 -05:00
Gustavo Lima Chaves b771e569c9 cmake: jailhouse: fix arguments passed to QEMU on make run target
"-serial mon:stdio" was already injected elsewhere, so remove
duplication. That argument, when coming from the common infrastructure,
also comes as one of the last ones. Because of that, the former "-serial
vc" was taking precedence and we were never seeing output on stdio.
Removing the virtual console altogether, for now, fixes that.

Finally, since cmake came in, we have to fix the path for the fsdev
argument to QEMU as well.

Signed-off-by: Gustavo Lima Chaves <gustavo.lima.chaves@intel.com>
2017-12-12 09:31:31 -05:00
Anas Nashif f0e562f614 boards: fix board yaml syntax
Use better indentation for yaml syntax.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-11 14:47:08 -05:00
Anas Nashif a04e18b700 kconfig: fix CPU_HAS_FPU dependencies
Getting warnings from Kconfig after generalising how CPU_HAS_FPU is
configured on the architecture level. 2 Boards were settings this value
in the wrong place.

Fixes #5211.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-30 09:59:44 -05:00
Marti Bolivar 9116643290 arch: x86: fix jailhouse build
The jailhouse board's build is currently broken.

It wants to depend on the qemu board's devicetree, but can no longer
do so since the board-level dts files were moved into individual board
directories.

To restore the build, insert the qemu_x86.dts contents into
x86_jailhouse.dts.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-29 21:55:14 -05:00
Anas Nashif b005a7f3c4 boards: galileo and minnowboard require zephyr.strip
Restore creation of those binaries for galileo and minnowboard.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-28 12:24:43 -05:00
Savinay Dharmappa 536ef2edb3 dts: x86: galileo: Add device tree support for galileo board
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-11-27 22:18:20 -05:00
Savinay Dharmappa 139c7cc639 dts: x86: minnowboard: Add dts support for minnowboard
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-11-24 10:10:47 -05:00
Anas Nashif 1f1143ac87 build: use kconfig to select generated artifacts
Not all boards require the various binary formats zephyr generates. So
be selective based on the arch, SoC or board and only geenrate the
binaries actually needed.

Fixes #5009

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-23 07:29:13 -05:00
Savinay Dharmappa b05ba6b531 dts: x86: remove mem.h
patch removes the mem.h and marcos used in that file are
moved appropriate board files. As there are boards with
different flash configuration but of same soc, flash and
ram size are moved to dts file instead of dtsi

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-11-16 16:04:03 -05:00
David B. Kinder be9ee06bd9 doc: fix misspellings in boards and samples docs
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-11-15 12:59:22 -05:00
Andrei Emeltchenko 3c6dee35ef cmake: Fixes quark_se_c1000_devboard flashing
Fixes: #4905

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-11-13 10:09:45 -05:00
Sebastian Bøe f0346bfac0 flash: Change type of FLASH_SCRIPT_ENV_VARS
The old way of constructing FLASH_SCRIPT_ENV_VARS was corrupting the
values that were passed to the flasher. This new method is the
standard way of creating a dictionary/hashmap in CMake and does not
suffer from the same problem.

This fixes
https://github.com/zephyrproject-rtos/zephyr/issues/4844#event-1334599401

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-10 07:54:54 -05:00
Kumar Gala ef912810d3 dts: Move dts files into board dirs
Move the dts files into the board dir so that board ports can be more
standalone.  This will allow us at some point to have board ports
outside of the tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-11-09 14:23:41 -06:00
Kumar Gala 09c63b373a dts: Move fixup files into board dirs
Move the dts fixup files into the board dir so that board ports can be
more standalone.  This will allow us at some point to have board ports
outside of the tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-11-09 14:23:41 -06:00
Marti Bolivar 93c23d810b boards: x86: convert make to cmake
Unify documentation formatting and use zephyr-app-commands where
applicable.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Sebastian Bøe 0829ddfe9a kbuild: Removed KBuild
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Sebastian Bøe 12f8f76165 Introduce cmake-based rewrite of KBuild
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.

Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.

This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.

For users that just want to continue their work with minimal
disruption the following should suffice:

Install CMake 3.8.2+

Port any out-of-tree Makefiles to CMake.

Learn the absolute minimum about the new command line interface:

$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..

$ cd build
$ make

PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Gustavo Lima Chaves 56922d92fb x86: add new board to accomodate Jailhouse port
The port will enable Zephyr to run as a guest OS on x86-64 systems. It
comes with a test on QEMU to validate that, thus this new board
introduction. It's "make run" target will issue QEMU with the same
configuration Jailhouse upstream uses for their confis/qemu-x86.c root
cell configuration:

  Test configuration for QEMU Q35 VM, 1 GB RAM, 4 cores,
  6 MB hypervisor, 60 MB inmates (-4K shared mem device)

This will work provided qemu-system-x86_64 is installed in the system
and a given (qcow2) image with the Jailhouse root cell in it is
provided (any of those will ever ship with Zephyr, it's out of its
scope).

Signed-off-by: Gustavo Lima Chaves <gustavo.lima.chaves@intel.com>
2017-11-07 08:58:49 -05:00
Anas Nashif 035814efc6 boards: move pinmux driver to board/soc dir
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-31 12:32:34 -04:00
Adithya Baglody f677caef2d x86: MMU: Set PAE page tables for QEMU as default.
Replacing the default paging scheme from 32-bit paging to
PAE paging in QEMU.

JIRA:ZEP-2511

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2017-10-25 10:39:47 -07:00
Andrew Boie 911be99edf Revert "x86: MMU: Set PAE page tables..."
This reverts commit
0b6bc24089.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-10-24 12:45:59 -07:00
Adithya Baglody 0b6bc24089 x86: MMU: Set PAE page tables for QEMU as default.
Replacing the default paging scheme from 32-bit paging to
PAE paging in QEMU.

JIRA:ZEP-2511

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2017-10-23 10:13:07 -07:00
Adithya Baglody 38276101b8 qemu: x86: Enable the 'Execute Disable' capability of the PAE pages.
Page Address Extension(PAE) page tables make use of NXE bit in
EFER register.
This patch enables the capability needed to set this bit.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2017-10-23 10:13:07 -07:00
Andrew Boie 22696a3b0a x86: set default CI targets
The IAMCU variant does not need to be the default, this calling
convention was to support the discontinued Quark platforms.

qemu_x86 and qemu_x86_nommu now are set as default.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-10-19 15:07:45 -07:00
Andrew Boie dceb4ffaf4 x86: add qemu_x86_nommu board target
This will run all tests with the memory management unit disabled.
This means no hardware-based stack protection or user threads.

qemu_x86_iamcu now runs with all MMU features enabled.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-10-19 15:07:45 -07:00
Andrei Emeltchenko 2c49da8917 boards: tinytile: Set original firmware Vendor and Product IDs
Set Vendor and Product ID originally present in the firmware.
Implemented USB function is the same: CDC ACM serial port.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-10-19 09:30:58 -04:00
Anas Nashif 95a8b20c9f boards: add supported features
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-17 08:55:38 -04:00
Andrew Boie ec896b9796 qemu_x86: enable userspace and app memory
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-10-13 12:56:14 -07:00
Anas Nashif 8ba453b43b doc: fix location of grub script
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-12 16:27:12 -05:00
Savinay Dharmappa ddf6a69577 dts: x86: Add device tree support for qemu_x86
patch add device tree support for ia32 soc and qemu_x86
board port

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-10-06 08:35:42 -04:00
Anas Nashif 66f1f89da9 qemu: cleanup qemu configurations
Move all QEMU related defines to the boards and cleanup xtensa platforms
which were marked to be QEMU capable by mistake.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-23 16:51:20 -07:00
Andrew Boie 17876c857a qemu_x86: enable HW stack protection properly
CONFIG_X86_STACK_PROTECTION is now a hidden option enabled by
CONFIG_HW_STACK_PROTECTION.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-11 12:26:54 -07:00
Anas Nashif 63d418f0da scripts: move GRUB script to galileo
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-11 08:53:56 -07:00
Savinay Dharmappa fa0ece1fb0 dts: x86: quark_se_c1000_devboard: Add device tree support
patch add device tree support for develoement board of
quark_se_c1000. Previously pushed patch was flashing binary
at wrong address because of which UART was not working

Jira:ZEP-2459

test

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-08-23 10:00:36 -04:00
Anas Nashif 9479b98e75 boards: fix dropped HAS_DTS
Some boards had HAS_DTS in the defconfig which is dropped if the Kconfig
variable does not have a prompt.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-11 11:05:36 -05:00
Johan Hedberg 2975ca0754 Bluetooth: Kconfig: Rename CONFIG_BLUETOOTH_* to CONFIG_BT_*
The API name space for Bluetooth is bt_* and BT_* so it makes sense to
align the Kconfig name space with this. The additional benefit is that
this also makes the names shorter. It is also in line with what Linux
uses for Bluetooth Kconfig entries.

Some Bluetooth-related Networking Kconfig defines are renamed as well
in order to be consistent, such as NET_L2_BLUETOOTH.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-08-09 11:14:19 +03:00
David B. Kinder e9a3411651 doc: spelling fixes in docs
regular scan through docs and KConfig files for spelling issues
and UTF-8 characters

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-08-02 15:14:13 -04:00
Anas Nashif 4daabbd94e Revert "dts: x86: quark_se_c1000_devboard: Add device tree support"
This reverts commit c0d95f03c7.

Breaks UART and other things on this board, see Jira ZEP-2459.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 08:19:25 -04:00
Anas Nashif 56d88584db boards: support feature classes in yaml
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Savinay Dharmappa c0d95f03c7 dts: x86: quark_se_c1000_devboard: Add device tree support
patch add device tree support for developement board of
quark_se_c1000.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-07-31 10:17:45 -05:00
Anas Nashif dd8fd72826 boards: mark qemu targets with a unified Kconfig
This will allow checking if we are building for QEMU globally, without
having to know the exact architecture and board name.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-26 07:40:45 -05:00
Anas Nashif 9f642c4291 samples: mesh: build only on BLE platforms
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-26 07:23:14 -04:00
Andrew Boie 19fdf4d6f8 qemu_x86: enable MMU stack protection by default
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Kumar Gala 6ec63522cc board: arduino_101: remove unused !HAS_DTS bits
Since HAS_DTS is always defined for arduino_101 the board specific
Kconfig bits associated with !HAS_DTS are never used, so lets remove
them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-25 09:09:11 -05:00
Savinay Dharmappa dca22fa983 dts: tinytile: Add device tree support for tinytile board
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-07-25 08:58:14 -05:00
Andrew Boie a717050140 qemu_x86: terminate emulator on fatal system error
This will cause sanitycheck runs to finish more quickly
instead of sitting there waiting on a timeout. We already
do this with the Xtensa simulator.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-22 09:46:26 -04:00
Savinay Dharmappa c1e5cbfd41 devicetree: Generate BLUETOOTH_UART,UART_PIPE etc config from dt
patch uses chosen property zephyr,bt-uart, zephyr,uart-pipe
and zephyr,bt-mon-uart to determine the uart instance to be
used for bluetooth,uart_pipe and bluetooth_monitor and generate
appropriate configs.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-07-19 11:52:35 -04:00
Savinay Dharmappa 9f116097bf dts: quark_d2000_crb: Add device tree support to mint valley
patch adds device tree support for mint valley board

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-07-19 11:25:43 -04:00
Andrew Boie dbd705228b qemu: enable MMU by default
We have lots of RAM, this helps catch bugs.
Enable XIP as well, this used to be turned on but was
shut off for some reason.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-10 11:44:56 -07:00
Andrew Boie 103d655dee qemu_x86: increase to 8MB of RAM
Previously we were instantiating QEMU with 32MB of RAM but
only enabling a small fraction of it.

Now we boot with 8MB of ram. We ignore the first 4K so we can
make that an unmapped paged to catch NULL pointer dereferences.

If XIP is enabled, the "ROM" region will be the first half of
memory, the "RAM" region the latter.

Move the IDT_LIST and MMU_LIST regions elsewhere so they don't
overlap the new memory arrangement.

Use !XIP to fix a problem where CONFIG_RAM_SIZE was set incorrectly
for XIP case.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-10 11:44:56 -07:00
Kumar Gala 93d238401d boards: introduce usb_device support tag
Introduce a new tag for boards that have usb_device support.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-07 09:01:01 -05:00
Anas Nashif f131e9f6ea boards: mark boards with built-in networking support
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-06 10:34:41 -05:00
Anas Nashif 7318fa22a2 boards: qemu: enable test random generator
This should be a default option for this board which would allow us to
remove it from many sample configurations that can be then used for
other boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-05 12:43:13 -04:00
Anas Nashif d7e15aa415 benchmark: footprint: fixed testcase
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-05 12:43:13 -04:00
Paul Sokolovsky 2a770165df doc: boards: qemu: Mention support for SLIP networking
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-06-29 11:56:40 -04:00
Anas Nashif f9f2bd9d83 doc: update qemu_x86 instructions
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-28 16:58:37 -04:00
Anas Nashif b3ae274a62 tests: fix PCI test using 'supported' keyword
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-28 09:51:40 -05:00
David B. Kinder abcb8d446e doc: fix sidebar nav issues with board docs
Sidebar navigation for supported boards is wonky: opens to show
all boards (making for lots of scrolling to see the sidebar) and
sidebar items aren't always clickable (as explained in the JIRA
issue).

Fix is to not use multiple toctree directives in boards.rst and
create intermediate architecture-specific supported board docs.

JIRA: INF-132

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-06-27 19:21:29 -04:00
Savinay Dharmappa ba034a8b77 dts: arduino101: Add device tree support for arduino101 board
patch adds necessary files and does the modification
to the existing files to add device support for
arduino_101 board.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-06-22 10:23:39 -05:00