Commit graph

74 commits

Author SHA1 Message Date
David Leach d36b1b11f7 boards: riscv: rv32m1: enable BT related configuration
Specific SW defined BLE LL parameters need to be set
if the user enables it on this platform. As such, conditionally
enable them directly into the defconfig.

INTMUX CH2 and CH3 are not available to be used if BT support
is enabled on Vega, because they are used internally by the
BLE SW LL

Signed-off-by: David Leach <david.leach@nxp.com>
2019-11-08 15:38:57 +01:00
Alex Porosanu bfcfac8bf3 doc: riscv: rv32m1_vega: add BLE software link layer info
Since the experimental BLE software link layer is enabled on
the VEGABoard, add some information about it, as well as the
limitations.

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2019-11-08 15:38:57 +01:00
David Leach 94106a8ff3 boards: riscv: rv32m1: add support for GPIO debugging
Having a pin toggle when the code reaches a certain point
is really useful for debugging; the infrastructure is already
in place for Nordic boards, so just build upon and enable the
mechanism on the Vega board as well.

Signed-off-by: David Leach <david.leach@nxp.com>
2019-11-08 15:38:57 +01:00
Peter Bigot 8e55968aba doc: correct path to boards/riscv
The board area was renamed from riscv32 to riscv back in July to
accommodate riscv64 support.  Fix the remaining references in
documentation.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-07 12:39:08 -06: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
Karsten Koenig 8a6fd43439 boards: riscv: rv32m1_vega: Add onboard SPI flash
Enable the MX25R32 SPI NOR Flash on the VEGAboard and provide board
config file for the spi_flash sample.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-11-04 14:11:18 -06: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
Ulf Magnusson 3b98417ef2 drivers: serial: liteuart: Remove unused UART_LITEUART_PORT_0 symbol
Added in commit f9efca4b4f ("boards: riscv32: add LiteX VexRiscV
board"), then never used.

Found with a script.

Also change UART_LITEUART from a 'menuconfig' symbol to a 'config'
symbol, as it's no longer followed by symbols that depend on it
(UART_LITEUART_PORT_0 should have been a plain 'config' too).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-29 06:16:27 +01:00
Ulf Magnusson 2b61031c8f kconfig: Remove symbol types from Kconfig.defconfig files
Same deal as in commit 7fdb525754 ("kconfig: Use 'default' instead of
'def_bool' in Kconfig.defconfig files"), but I hacked Kconfiglib to also
find cases where the type is given separately as e.g.

    config FOO
            int
            default 3

Motivation (from a note in
https://docs.zephyrproject.org/latest/guides/kconfig/index.html):

    For a symbol defined in multiple locations (e.g., in a
    Kconfig.defconfig file in Zephyr), it is best to only give the
    symbol type for the "base" definition of the symbol, and to use
    'default' (instead of 'def_<type>' value) for the remaining
    definitions. That way, if the base definition of the symbol is
    removed, the symbol ends up without a type, which generates a
    warning that points to the other definitions. That makes the extra
    definitions easier to discover and remove.

It's also nice if 'def_bool' and the like turn into a semi-reliable flag
that the symbol is only defined in Kconfig.defconfig files. That might
be a sign that things could be cleaned up.

Will do a separate pass later to remove some symbols only defined in
Kconfig.defconfig files.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-24 12:40:22 -05:00
Kumar Gala 22e7449b73 kconfig: Introduce typed dt kconfig functions
Replace:
  dt_chosen_reg_addr
  dt_chosen_reg_size
  dt_node_reg_addr
  dt_node_reg_size

with:
  dt_chosen_reg_addr_int
  dt_chosen_reg_size_int
  dt_chosen_reg_addr_hex
  dt_chosen_reg_size_hex
  dt_node_reg_addr_int
  dt_node_reg_size_int
  dt_node_reg_addr_hex
  dt_node_reg_size_hex

So that we get the proper formatted string for the type of symbol.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-10-24 08:51:06 -05:00
Kumar Gala 669e0f3b32 i2c: Move how we set HAS_DTS_I2C
Now that all I2C drivers utilize DTS we can select HAS_DTS_I2C in a
common place and don't need to do it per driver.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-10-23 11:31:32 -05:00
Peter Bigot f8bfc7e175 devicetree: tree-wide: add nexus map properties for arduino headers
We need to be able to specify GPIO flags in devicetree without that
preventing translation from the Arduino specifier to the host GPIO
specifier.  Set up to ignore the low 6 bits of the flags field when
matching the child specifier, and to copy those bits to the parent
specifier.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-22 14:40:41 -05:00
Daniel Craviee f7bfa936a1 boards: litex_vexriscv: Enable LiteX SPI driver
This commit enables LiteX SPI driver for litex_vexriscv board.

Signed-off-by: Daniel Craviee <dcraviee@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-10-21 08:40:09 -05:00
David B. Kinder 82d6347355 doc: fix broken file and zephyr-app refs
found some references to files (via :zephyr_file: and :zephyr-app:) that
were moved, so the links were broken

Fixes: #19660

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-08 15:42:32 -05:00
Jakub Wegnerowski d57a3634f7 boards: litex_vexriscv: Enable LiteX DNA driver
Enable LiteX DNA ID driver in litex_vexriscv board.

Signed-off-by: Jakub Wegnerowski <jwegnerowski@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-09-21 21:36:00 +02:00
Kumar Gala 54f81a670b kconfig: hifive1_revb: Convert to use new kconfigfunctions
Convert use of dt_hex_val to dt_node_reg_addr.  As we want to
remove dt_hex_val.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-13 11:42:34 -05:00
Erwan Gouriou 5a12d51285 boards: Clean up references to env variable PROJECT_SOURCE_DIR
As recommended in cmake/app/boilerplate.cmake, ZEPHYR_BASE should
be preferred to PROJECT_SOURCE_DIR.
Do the change for all boards still referring to PROJECT_SOURCE_DIR.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 13:16:16 -05:00
Kumar Gala 702325ddb2 boards: Add arduino_gpio & and arduino_i2c to board supported
Update a number of boards that have arduino_gpio and arduino_i2c
support in their dts files to show that they support that in the
board.yaml file.  This allows coverage on several shield tests that
utilize the tags 'arduino_gpio' and 'arduino_i2c'.

Exlucde stm32mp157c_dk2 from some of the samples right now since the
connector on the board doesn't support A2/A3.  Also remove the duplicate
of exluding disco_l475_iot1.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-11 11:51:25 -05:00
David B. Kinder 168751a7b7 doc: fix broken doc links
The project's README.rst references the support board docs with an URL
that's not working these days (see
https://github.com/zephyrproject-rtos/infrastructure/issues/134) so fix
that URL reference.  While looking for other similar linking cases, I
found a hard URL references that should be using :ref: role, and a
release notes reference to a (now) broken link (fixing that in the
/latest/ version of the 1.10 release notes).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-06 16:14:39 +02:00
David B. Kinder 60136f00cb doc: add how to exit from QEMU in samples
While trying out the hello_world sample built for QEMU, I was expecting
the sample app to exit and I'd return to a command prompt.  Nope.  You
need to exit QEMU manually, so add that step to the sample instructions.
Looking around, there are more uses of QEMU like this that could use
this added step after running the sample app.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-02 12:06:08 -04:00
Nicolas Pitre 7f74825958 riscv: add a qemu_riscv64 board
This emulates a RISC-V in 64-bit mode on a SiFive FE310 dev board.
Memory is tight so a few tests had to be disabled due to the extra
memory usage compared to qemu_riscv32.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-08-09 09:11:45 -05:00
Nicolas Pitre 75bf3c5368 riscv: freedom: rename RISCV32 to RISCV
This code is common to 32- and 64-bit builds.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-08-08 00:29:24 -04:00
Alex Porosanu 453ee5e782 soc: riscv32: fix zero-riscy zephyr,flash node
For OpenVega board, in the case of the Zero Riscy core,
the flash partition used for the code and data is the
M0 ARM core's 256KB flash region. This is closest to
the RISC core.
The m0_flash node defines where the interrupt vector
is located for the Zero Riscy core, and one needs to
restrict the application so its interrupt vector is
placed accordingly.

Fixes: 34b0516466 ("boards: riscv32: rv32m1_vega:
                      enable MCUboot for ri5cy core")

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2019-08-07 07:27:51 -05:00
Nicolas Pitre 1f4b5ddd0f riscv32: rename to riscv
With the upcoming riscv64 support, it is best to use "riscv" as the
subdirectory name and common symbols as riscv32 and riscv64 support
code is almost identical. Then later decide whether 32-bit or 64-bit
compilation is wanted.

Redirects for the web documentation are also included.

Then zephyrbot complained about this:

"
New files added that are not covered in CODEOWNERS:

dts/riscv/microsemi-miv.dtsi
dts/riscv/riscv32-fe310.dtsi

Please add one or more entries in the CODEOWNERS file to cover
those files
"

So I assigned them to those who created them. Feel free to readjust
as necessary.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-08-02 13:54:48 -07:00