Commit graph

249 commits

Author SHA1 Message Date
Daniel Leung d0e36f2cac boards: intel_s1000_crb: add zephyr,flash-controller to DTS
The board has a SPI NOR flash enabled by default but was missing
the "zephyr,flash-controller" in DTS. This prevents the flash
shell sample to compile. So add the DTS entry.

Fixes #26764

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-07-09 14:03:14 -04:00
Stephanos Ioannidis 3322489d22 config: Rename TEXT_SECTION_OFFSET to ROM_START_OFFSET
The `TEXT_SECTION_OFFSET` symbol is used to specify the offset between
the beginning of the ROM area and the address of the first ROM section.

This commit renames `TEXT_SECTION_OFFSET` to `ROM_START_OFFSET` because
the first ROM section is not always the `.text` section.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-07-09 14:02:38 -04:00
Andrew Boie a9670ab5cf boards: centralize QEMU icount management
Instead of endlessly repeating the same command line args,
centralize this and tune the shift value on a per-board
basis.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-06-24 20:28:36 -04:00
Mohamed ElShahawi f9e0fa9af3 drivers: esp32/clock_control: support UART, I2C
- Change default CPU Clock to 240MHz
(PLL is activated)
- I2C, UART will use sysclk from clock driver
- esp32_enable_peripheral replaced by
clock_control_on

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2020-06-16 09:00:51 -05:00
Mohamed ElShahawi 4acac3e9ef drivers: esp32/clock_control: Add Clock Driver
- Support PLL for Higher Frequencies 80,160,240 MHz
- Support XTAL Frequencies 26MHz, 40MHz
- Clock Driver can't be disabled, because all of the other drivers
will depend on it to get their operating Frequency based on chosen
clock source (XTAL/PLL).

- Add needed references to BBPLL i2c bus ROM functions.
- Add `rtc` node to Device Tree.
- Since All Peripherals Frequency is depending on CPU_CLK Source,
`clock-source` property added to CPU node

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2020-06-16 09:00:51 -05:00
Wentong Wu 845abb04cf boards: qemu_xtensa: enable icount mode
Enable icount mode for qemu_xtensa platform, The icount shift value
is selectd based on cpu clock frequency of this platform. The virtual
cpu will execute one instruction every 2^shift ns of virtual time.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-05-14 13:52:07 +02:00
Andrei Emeltchenko d6a33ef467 soc: intel_adsp: Generalize bootloader
Move bootloader to soc/xtensa/intel_adsp making it available for other
boards.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-05-09 13:07:33 +02:00
Daniel Leung 8939847ea5 boards: intel_s1000_crb: fix xt-gdb cannot find register error
With the new RI-2018.0 XCC, xt-gdb complains about not being able
to find register f0. Turns out that xt-gdb needs to be told which
file to look at (the file command) before a load command can be
issued. So swap these two commands in the load_elf.txt file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-05-08 11:16:49 -04:00
Kumar Gala a5b45d9567 boards: Remove Kconfig I2C_[0-9] usage
The Kconfig I2C_[0-9] sybmols don't have any meaning for the majority of
SoCs.  The drivers doesn't utilize them and no sample or test code does
either so we can remove setting them in board Kconfig.defconfig files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-06 10:55:38 -05:00
Andrei Emeltchenko 7770d182c1 boards: up_squared_adsp: Update logtool tool
Update logtool tool to be able to read logs from xtensa qemu.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-04-28 16:14:47 -04:00
Andrei Emeltchenko 80f295a9dd boards: up_squared_adsp: Add flasher script
Add script signing and flashing up_squared_adsp board. Can be used:

$ west flash \
<zephyr>/boards/xtensa/up_squared_adsp/tools/up_squared_adsp_flash.sh

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-04-22 17:36:30 +02:00
Andrei Emeltchenko 9c9b3790a6 boards: up_squared_adsp: Change default flasher
Change default flasher to misc-flasher, allowing to pass
custom flash command.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-03-30 13:38:52 -05:00
Daniel Leung fb1e7a563c soc: intel_apl_adsp: add multi-processing support
This adds multi-processing support for Intel Apollo Lake ADSP.

Some of the start-up code is borrowed from ESP32.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-03-25 19:07:28 -04:00
Daniel Leung 0ba204083d soc: intel_s1000: add SMP support
This adds SMP support for Intel S1000 SoC.

Some of the start-up code is borrowed from ESP32.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-03-25 19:07:28 -04:00
Daniel Leung 3751c396cd soc: intel_s1000: use CAVS DSP wall clock timer for SMP
The DSP wall clock timer is a timer driven directly by
external oscillator and is external to the CPU core(s).
It provides a common and synchronized counter for all
CPU cores (which is useful for SMP), instead of
indepedently running local core timer (xtensa_timer).

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-03-25 19:07:28 -04:00
Anas Nashif 000a7327e1 boards: intel_s1000_crb: update documentation
Remove dead link and add a note about board availability.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-03-18 09:46:16 -04:00
Timo Teräs 6fd168e9a1 driver: uart: ns16550: convert to DT_INST_*
Change to code to use the automatically generated DT_INST_*
defines and remove the now unneeded configs and fixups.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
2020-03-14 02:22:05 +02:00
Timo Teräs e740818093 driver: uart: ns16550: convert custom init options to DTS flow control
The sole purpose of init options has been to enable hardware flow
control on NS16750 when asked. Use the proper DTS tags for this.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
2020-03-14 02:22:05 +02:00
Carles Cufi b470fe54ea boards: xt-sim_intel_s1000: Fix board definition
Fix up the board definition so that the actual board can at least be
processed by Kconfig.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi dbe7338ca2 boards: xt-sim*: Conditionally set IPM console stack size
Set the IPM console stack size only when the console is enabled.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi 9ebafcca36 boards: qemu_xtensa: Conditionally set IPM console stack size
Set the IPM console stack size only when the console is enabled.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi 5954f2905d boards: odroid_go: Conditionally enable RNG
Enable RNG only if the actual entropy generator is enabled.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi d79062516e boards: esp32: Conditionally enable RNG
Enable RNG only if the actual entropy generator is enabled.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Ulf Magnusson a42a42cd5a kconfig: Replace defconfig singe-symbol 'if's with 'depends on'
Same deal as in commit eddd98f ("kconfig: Replace some single-symbol
'if's with 'depends on'"), for all symbols defined within defconfig
files. See that commit for an explanation.

Maybe 'if's were used originally to mirror the 'if's in the main Kconfig
files, and then it got copied around by people assuming 'if' must work
differently from 'depends on'. It doesn't match in every spot at least.
Better to keep it simple and just consistently use 'depends on' when
it's a single symbol/choice I think. Helps reinforce that 'if' isn't
magic too.

Verified by printing all Kconfig menu nodes (symbols, choices, menus,
etc.) before and after the change and diffing (should show no
difference).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-12 10:32:13 -06:00
Daniel Leung 0c3a9c83d8 boards: up_squared_adsp: fix mis-used logical operator
In the bootloader code, there is a mis-used logical operator
which should be bitwise operator. So fix it.

Fixes #22651
Coverity-CID: 208198

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-02-10 12:35:30 +02:00
Daniel Leung db2eb23bd2 boards: up_squared_adsp: provide start address for bootloader
Commit 9987c2e2f9 spills SoC configs
into architecture files which is less desirable. This provides
the jump address for bootloader, and modifies the bootloader to
jump to __start defined in reset-vector.S. This prepares for
that commit to be reverted.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-02-08 10:01:24 +02:00
Daniel Leung d93fd37ef6 boards: up_squared_adsp: provide default memctl in linker script
Both memctl_default.S and memerror-vector.S (inside
arch/xtensa/core/startup) refer to XCHAL_CACHE_MEMCTL_DEFAULT which
is not defined anywhere. The linker script for intel_apl_adsp SoC
provides default values, but not the bootloader linker script. So
provide the same default value in the bootloader linker script as
in the SoC linker script.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-02-08 10:01:24 +02:00
Ulf Magnusson c5839f834b kconfig: Remove assignments to CONFIG_<arch> syms and hide them
All board defconfig files currently set the architecture in addition to
the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up
defconfig files.

CONFIG_<arch> symbols currently being set in configuration files also
means that they are configurable (can be changed in menuconfig and in
configuration files), even though changing the architecture won't work,
since other things get set from -DBOARD=<board>. Many boards also allow
changing the architecture symbols independently from the SoC symbols,
which doesn't make sense.

Get rid of all assignments to CONFIG_<arch> symbols and clean up the
relationships between symbols and the configuration interface, like
this:

1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and
   turn the CONFIG_<arch> symbols into invisible
   (promptless/nonconfigurable) symbols instead.

   Getting rid of the choice allows the symbols to be 'select'ed (choice
   symbols don't support 'select').

2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols.
   This makes sense since you know the architecture if you know the SoC.

   Put the select on the SOC_* symbol instead for boards that don't have
   a SOC_SERIES_*.

3. Remove all assignments to CONFIG_<arch> symbols. The assignments
   would generate errors now, since the symbols are promptless.

The change was done by grepping for assignments to CONFIG_<arch>
symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the
same defconfig file, and putting a 'select' on it instead.

See
https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed
for a split-up version of this commit, which will make it easier to see
how stuff was done. This needs to go in as one commit though.

This change is safer than it might seem re. outstanding PRs, because any
assignment to CONFIG_<arch> symbols generates an error now, making
outdated stuff easy to catch.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-08 00:50:08 -06:00
Kumar Gala 1dc4b1dd2f boards: shrink image sizes
Reduce images sizes of boards.  Get a roughly 3x reduction in size.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-07 13:52:45 -05:00
Andrei Emeltchenko d64b3fb505 boards: up_squared_adsp: Update logging tools
Add debug and do not split on newline, fixes hexdump logs.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-02-06 15:39:23 +02:00
Andrei Emeltchenko d4e769c389 boards: up_squared_adsp: Update logging frontend
Update frontend moving general library code to appropriate place.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-02-06 15:39:23 +02:00
Andrei Emeltchenko 7d74a19639 boards: up_squared_adsp: Remove ignore_tag
Remove unneeded tag bluetooth. Those tests and samples use (should use)
depends_on: ble or whitelist platforms.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-02-06 15:39:23 +02:00
Kumar Gala 76f2987e66 boards: xtensa: fix device tree build warnings
Fix warnings of the following form:

unit-address and first reg (0x30000) don't match for partition@10000
unit-address and first reg (0x200000) don't match for partition@1F0000

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-05 17:10:54 -05:00
Andrei Emeltchenko 3fc7688b9b doc: up_squared_adsp: Add documentation for the board
Add documentation for the board up_squared_adsp.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-02-05 10:43:25 -05:00
Tedd Ho-Jeong An c4278b9888 boards: up_squared_adsp: Add scripts for diagnostic driver
This patch adds scripts which downloads the firmware and extracts the
trace messages. The scripts required the SOF diagnostics driver
installed.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2020-02-05 10:43:25 -05:00
Andrei Emeltchenko 30e67b4d97 boards: up_squared_adsp: Add logging frontend
Add a command-line frontend to match the logging backend for Intel
Apollolake-based boards like the Audio DSP in the Up Squared.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-02-05 10:43:25 -05:00
Johan Hedberg 3686ad1ac9 boards: xtensa: Add board definition for Audio DSP on Up Squared
Create a board definition for the Audio DSP found on the Up Squared
board.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-02-05 10:43:25 -05:00
Carles Cufi 132bf05561 drivers: audio: tlv320dac310x: Convert to the new GPIO API
Convert to the new GPIO API using logical access, including setting the
GPIO line as active low in the Device Tree source.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Mohamed ElShahawi fef3ebaa69 drivers: gpio_esp32: update to use new GPIO API
- Updates gpio driver and device tree files to the new GPIO Config flags
- Implements the new port_* APIs
- Update I2C and PWM Drivers to use new GPIO config
- Add esp32.overlay to gpio_basic_api test
- refactor convert_int_type, regs struct
- remove config_polarity
- add kConfig notes

Tests:
- samples/basic/blinky
- samples/basic/button
- tests/drivers/gpio/gpio_basic_api
- tests/drivers/gpio/gpio_api_1pin

Board:
- esp32 DevKitC V4

Note about interrupts:
The ESP32 requires specifying a CPU interrupt to be used for GPIO
interrupt signals.  CPU interrupts can be either level or edge (or
special) triggered, but not both.
Please check gpio/Kconfig.esp32 for more info.

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2020-02-05 12:00:36 +01:00
Anas Nashif 1eeb6ca873 intel_s1000_crb: we not can build this with zephyr sdk
Remove warning about sdk limitation and enable zephyr sdk in sanitycheck
for this board.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-31 14:51:37 -05:00
Tomasz Bursztyka b8e14b5b9d drivers/usb: Switching to DTS based configuration for DW driver
And applying the changes to intel_s1000_crb board as well.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-01-28 18:18:18 -05:00
Tomasz Bursztyka e33432fd44 drivers/dma: Rename CAVS driver to DesignWare
There is no such thing as CAVS DMA IP block, the DMA IP block found on
CAVS based chips is made with DesignWare one.

This will help to centralize DW based DMA device into one driver.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-01-28 18:18:18 -05:00
Ulf Magnusson 8f8f69e283 boards: kconfig: Do not assign promptless SERIAL_HAS_DRIVER
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

This symbol is enabled through being selected by other symbols.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-14 16:35:26 -05:00
Daniel Leung 7185670066 boards: intel_s1000_crb/doc: update XCC install instructions
This updates the toolchain installation instructions for
the newer RI-2018.0 version of XCC.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-01-07 17:09:38 +01:00
Daniel Leung 01cc804d76 boards: intel_s1000_crb: ignore net/bluetooth for testing
The board does not support networking and bluetooth so there
is no need to test these.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-01-07 17:09:38 +01:00
Ulf Magnusson 984bfae831 global: Remove leading/trailing blank lines in files
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.

Will avoid failures with the new CI test in
https://github.com/zephyrproject-rtos/ci-tools/pull/112, though it only
checks changed files.

Move the 'target-notes' target in boards/xtensa/odroid_go/doc/index.rst
to get rid of the trailing blank line there. It was probably misplaced.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-11 19:17:27 +01:00
Ulf Magnusson 1f38ea77ba kconfig: Clean up 'config FOO' (two spaces) definitions
Must've been copy-pasted around.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Ulf Magnusson bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Ulf Magnusson 975de21858 kconfig: Global whitespace/consistency cleanup
Clean up space errors and use a consistent style throughout the Kconfig
files. This makes reading the Kconfig files more distraction-free, helps
with grepping, and encourages the same style getting copied around
everywhere (meaning another pass hopefully won't be needed).

Go for the most common style:

 - Indent properties with a single tab, including for choices.

   Properties on choices work exactly the same syntactically as
   properties on symbols, so not sure how the no-indentation thing
   happened.

 - Indent help texts with a tab followed by two spaces

 - Put a space between 'config' and the symbol name, not a tab. This
   also helps when grepping for definitions.

 - Do '# A comment' instead of '#A comment'

I tweaked Kconfiglib a bit to find most of the stuff.

Some help texts were reflowed to 79 columns with 'gq' in Vim as well,
though not all, because I was afraid I'd accidentally mess up
formatting.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-01 15:53:23 +01:00
Yannis Damigos 5a601721e6 odroid_go: Enable entropy number generator
Enable entropy number generator

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2019-10-29 06:02:33 +01:00