Commit Graph

194 Commits

Author SHA1 Message Date
Ederson de Souza 6babbd32e1 boards/riscv: Add qemu_riscv32_smp and qemu_riscv64_smp
Based on qemu_riscv32 and qemu_riscv64, add minimal SMP support
using the "virt" machine.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-02-25 19:13:50 -05:00
Fu Haolei 2d58806161 twister: for twister can run tests on ITE board.
Set board flasher, so twister can run tests on ITE(it8xxx2_evb) board.
Add supported drivers of it8xxx2_evb board, so twister could run these
driver tests without skipping.

Signed-off-by: Fu Haolei <haolei.fu@intel.com>
2022-02-25 10:07:19 -08:00
Katsuhiro Suzuki feaf0070fc boards: riscv: hifive_unleashed: add GPIO support
This patch adds GPIO and 96board LS (Low Speed)iexpansion  connector
support for SiFive HiFive Unleashed and also enables GPIO basic test.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
2022-02-21 20:46:47 -05:00
Ruibin Chang 5f3bba54e8 ITE drivers/pwm: support tests/drivers/pwm/pwm_api
Add pwm-0 to support tests/drivers/pwm/pwm_api.

Solve tests code runtime error on it8xxx2_evb:
1.If the pwm channel target frequency is < 1, then we will
  return an error code.

2.If the target_freq is <= 324Hz, we will configure that this pwm
  channel need to output in EC power saving mode.
  In test_pwm_cycle() case, the period is 64000, then the
  target_freq is 8000000 / 64000 = 125Hz and <= 324Hz, so we will
  switch the prescaler clock source from 8MHz to 32.768kHz.
  Then the target_freq is 32768 / 64000 = 0.512Hz and < 1Hz,
  this will return an error code. In order to get the same
  target_freq, we always return PWM_FREQ in
  pwm_it8xxx2_get_cycles_per_sec().

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2022-02-21 20:44:41 -05:00
BJ Chen 59cd9fd551 ITE: drivers/peci: Add PECI driver module of ITE IT8xxx2
Added the PECI driver tested with the samples/drivers/peci.

Signed-off-by: BJ Chen <bj.chen@ite.com.tw>
2022-02-21 19:43:40 -05:00
Yuriy Vynnychek dfd82a025c boards: riscv: tlsr9518adk80d: doc: improved Build and Flash info
Updated Build and Flash chapters with new information.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2022-02-21 19:41:44 -05:00
Yuriy Vynnychek 851599080d boards: riscv: tlsr9518adk80d: doc: improved Build and Flash info
Updated Build and Flash chapters with new information.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2022-02-21 19:41:44 -05:00
Gerard Marull-Paretas a9f7891c14 boards: riscv: rv32m1_vega: remove redundant Kconfig comment
The defconfig files are just used to change defaults, not to define any
new Kconfig nodes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 19:35:21 -05:00
TOKITA Hiroshi 45995212ab boards: riscv: longan_nano: Add BOARD definition
Define missing definition BOARD_LONGAN_NANO to defconfig.
And cleaning up some verbose comments.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-01-31 14:23:45 -06:00
Sylvio Alves f1e26219d0 soc: esp32c3: prepare kconfigs and cmake to support mcuboot
This modifies esp32c3 SOC configuration to support MCUBoot.

CmakeLists is moved from board to soc specific. It also
includes MCUBoot changes.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-01-22 16:55:00 -05:00
Sylvio Alves 8ee785c54e boards: esp32c3_devkitm: update device tree to add new partitions
This adds mcuboot slot0, slot1 and scratch partition

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-01-22 16:55:00 -05:00
Jim Shu 03d1e9b52a boards: riscv: qemu_riscv64: Enable RISC-V PMP
Enable PMP and Userspace on RV64 QEMU to improve CI coverage

Signed-off-by: Jim Shu <cwshu09@gmail.com>
2022-01-18 13:11:36 -05:00
Ruibin Chang 1a11a3362e ITE drivers/watchdog: support tests/drivers/watchdog/wdt_basic_api
Add watchdog0 to support tests/drivers/watchdog/wdt_basic_api.

Solve tests code runtime error on it8xxx2_evb:

1.When run the wdt tests api, we shouldn't reduce the warning
timer time, so I add config WDT_ITE_REDUCE_WARNING_LEADING_TIME,
this config will be enabled only on platform EC.

2.Upper limit window timeouts can't be 0 when we install timeout.

3.Since we support wdt_it8xxx2_disable(), then we should support
flag WDT_OPT_PAUSE_HALTED_BY_DBG, too. Watchdog can be stopped
by IT8XXX2_WDT_EWDSCEN bit of ETWCTRL reg.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2022-01-18 12:14:26 -05:00
Ruibin Chang 336d0f67b3 ITE drivers/kscan: support tests/driver/kscan/kscan_api
Add kscan0 to support tests/driver/kscan/kscan_api.

When running the tests code on it8xxx2_evb, it shows fatal
error: IRQ is enabled. We find that once polling_task() is
created and executed, the KSI interrupt will be enabled and
before we call irq_connect_dynamic(), so we switch both
function sequence.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2022-01-17 11:44:05 -05:00
TOKITA Hiroshi c72b75fc45 boards: riscv: longan_nano: Add LED and button configuration
Add configuration to support onboard LED and button.

- LED_R: PC13 (active low/output)
- LED_G: PA1  (active low/output)
- LED_B: PA2  (active low/output)
- BOOT0: PA8  (active high/input)

And enable timer1 to control LED_G and LED_B with PWM.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-01-14 09:59:35 -06:00
Tim Lin 96203820db boards: it8xxx2_evb: add aliases of i2c0
Add the aliases, we are able to build test of
tests/drivers/i2c/i2c_api for the it8xxx2_evb board.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-01-11 11:51:04 +01:00
Gerard Marull-Paretas a4790bcfab boards: riscv: gd32vf103v_eval: initial support
Add initial support for the GD32VF103V-EVAL board. The board is based on
the GD32VF103 RISC-V MCU.

This board can run on Zephyr now largerly thanks to the initial work
done by @soburi.

Note that this board requires using the riscv-openocd fork, however,
programming is slow when using OpenOCD even though it works (including
debugging). J-Link option has also been enabled as it seems to be more
realiable and works _out of the box_. Some details are given in the
board documentation file.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-01-11 11:50:35 +01:00
Jim Shu 74faa18902 soc: riscv: virt: enable RISC-V PMP support
Enable CONFIG_RISCV_PMP in qemu virt soc. Use this SoC as CI testing
platform of RISC-V PMP and Userspace.

Signed-off-by: Jim Shu <cwshu@andestech.com>
2022-01-11 11:47:03 +01:00
Dino Li 22d2bc9567 boards: it8xxx2_evb: enable LED0
With this change, we are able to build test of
tests/drivers/gpio/gpio_api_1pin for the board.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2022-01-05 14:58:22 -05:00
TOKITA Hiroshi a1fa5bba25 boards: riscv: longan_nano: Add DAC configuration
Add configuration to support DAC

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-01-04 11:49:14 +01:00
TOKITA Hiroshi 7e80c74f95 drivers: serial: Add USART support for GD32V
Modifying configuration to enable with gd32vf103

- Add usart definition to devicetree.
- Define USART_STAT as alias of USART_STAT0 if not defined it.
- Enable USART if SOC_SERIES_RISCV_GIGADEVICE_GD32VF103.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2021-12-20 17:51:30 +01:00
TOKITA Hiroshi c21bc77169 boards: riscv: Add SiPeed Longan Nano platform
SiPeed Longan Nano is a minimal development board
based on GigaDevice's RISC-V processor.
There are 2 board variations.

longan_nano:      GDGD32VF103CBT6 (128K Flash/32K SRAM)
longan_nano_lite: GDGD32VF103C8T6 ( 64K Flash/20K SRAM)

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2021-12-20 17:51:30 +01:00
Glauber Maroto Ferreira dd04a328cf soc: riscv: esp32c3: dts: uart node refactoring
Not all boards use the same UART's defaults properties.

This commit updates device tree declarations by deferring
specific definitions to the board's DTS.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-12-09 19:57:10 -05:00
Alex Kolosov f374d6b1f1 scripts: runners: Add west flash command for B91 platform
This commit implements west flash command for Telink B91 platform.
west flash command uses ICEman and SPI burn from AndeSight for flashing.

Signed-off-by: Alex Kolosov <rikorsev@gmail.com>
2021-12-06 07:28:38 -05:00
Ruibin Chang fad78a2c07 ITE drivers/sensor: add tachometer driver for it8xxx2_evb
Add tachometer driver for it8xxx2_evb.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2021-11-29 08:25:19 -05:00
Ruibin Chang b0cbff901f ITE borads/riscv/it8xxx2_evb: delete pwmleds node in dts
Delete pwmleds node in dts, because there isn't led on evb board.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2021-11-19 10:24:11 -06:00
Tim Lin e29a15c0e3 ITE: drivers/serial: add the UART driver for the PM callback function
IT8XXX2 uses shared ns16550.c driver which does not provide a power
management callback(pm_action_cb), so create driver to handle
IT8XXX2 specific UART features.

note: pm_action_cb(old name: pm_control_fn)

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-11-16 21:23:42 -05:00
Filip Kokosinski 0851255258 boards: riscv: hifive1: add support for QEMU and Renode simulation
This commit adds required config files for Renode simulation and adds
missing QEMU_binary_suffix. It also adds flash and newlib tags to
ignore_tags, as flash chip is currently not provided by default in
Renode for FE310 and newlib does not fit into the available memory.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2021-11-12 21:33:42 -05:00
Filip Kokosinski 94428044e2 cmake: support multiple entries in board.cmake
Currently there is no way to support running a board on multiple
emulation platforms nor to choose a desired emulation platform for the
simulation to be run on. This commit introduces a new
SUPPORTED_EMU_PLATFORMS list, which defines available emulation
platforms for a given board.

Fixes #12375.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2021-11-12 21:33:42 -05:00
Ruibin Chang e501c4a21a ITE boards/it8xxx2_evb: remove CONFIG_* not for every application
These drivers are no longer enabled for every application,
even hello_world. The right SoC-specific drivers are
enabled in applications that need them.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2021-11-12 10:25:47 -06:00
Ruibin Chang 4393f66ba2 ITE soc/riscv-ite/it8xxx2: move config to soc from board
Make config conditional and move to soc Kconfig.defconfig.series
from it8xxx2_evb_defconfig.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2021-11-12 10:25:47 -06:00
Felipe Neves b50cb2a537 drivers: counter: esp32: add support for esp32c3
to the unified esp32 counter driver.

Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
2021-11-11 19:14:15 -05:00
Felipe Neves 857a188c76 drivers: watchdog: esp32: enabled esp32c3
support for the unified esp32 wdt driver.

Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
2021-11-08 10:56:28 -05:00
Sylvio Alves ab91612a6d driver: esp32: I2C code refactoring
Use i2c_hal functions to enable support for
multiple SoCs.

Use DT compat to enable I2C from device
tree configuration

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-11-05 14:07:09 -04:00
Henrik Brix Andersen 6cc536daa8 boards: riscv: neorv32: minor documentation improvements
Add a few minor improvements to the NEORV32 board documentation based on
community feedback.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-11-05 12:18:30 -05:00
Sylvio Alves 27e44acda1 clock: esp32: unify clock control for all espressif socs
This joins all clock control handling to same source
by using hal clock functions. It also brings ESP32C3
clock support.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-11-04 15:21:26 -04:00
Sylvio Alves d5aa5c2a77 drivers: esp32: uart: use hal functions
In order to have Espressif SoCs working with
the same uart drivers, all low level functions
are now replaced to hal_espressif HAL calls.

This also changes pinmux, gpio and uart
init order to meet its dependencies.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-11-03 16:47:32 -04:00
Felipe Neves 0a0fed7879 drivers: spi: esp32: add esp32c3 support
to the esp32 spi unified driver

Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
2021-11-01 21:47:26 -04:00
Sylvio Alves 3f9f299499 openocd: esp32: add debugging interface
Add openocd.cfg for all socs/boards.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-10-30 14:20:04 -04:00
Felipe Neves 4c069b9894 drivers: serial: add support for esp32c3
into esp32_serial unified driver

Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
2021-10-29 16:09:09 -04:00
Glauber Maroto Ferreira bcf78f29d6 soc: riscv: esp32c3: nvs: add NVS support using fixed partitions
add NVS support to esp32c3 using fixed partitions defined on DT

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-10-28 06:47:21 -04:00
Glauber Maroto Ferreira 1af506dd32 soc: riscv: esp32c3: drivers: flash: add support
to host SPI Flash driver.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-10-28 06:47:21 -04:00
Henrik Brix Andersen 92c8d87b90 boards: riscv: neorv32: mention TRNG support
Mention TRNG support in the NEORV32 board documentation, but leave it
disabled by default.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-26 17:53:15 -04:00
Sylvio Alves b0717d518e drivers: gpio: esp32: use dts and improve code checks
This PR updates GPIO driver to use DTS information
regarding gpio availability.

This also fixes interrupt handling and
also removes kconfig definition for GPIO port.

A few configuration checks were also added to
improve code usage.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-10-21 10:53:34 -04:00
Anas Nashif b3abe11104 boards: remove CONFIG_PRINTK from board _defconfig
We should not enable this config in the board, this is an
application config.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-10-18 09:49:45 -04:00
Anas Nashif 798acef774 boards: remove CONFIG_BOOT_BANNER
This config should not be enabled by boards, it is an application
config.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-10-18 09:49:45 -04:00
Henrik Brix Andersen 22c67bcfac boards: riscv: add basic neorv32 board definition
Add a basic board definition for the open-source NEORV32 RISC-V
compatible processor system (SoC).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-15 09:46:53 -04:00
Felipe Neves ed55ee95e9 boards: riscv: esp32c3: added button support
in samples for esp32c3 devkitm_board using GPIO9

Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
2021-10-05 19:24:38 -04:00
Felipe Neves 9768e98001 drivers: gpio_esp32: added support for esp32c3
in the gpio drivers and pinmux for esp32 chip series

Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
2021-10-05 19:24:38 -04:00
Felipe Neves 6020afe46a soc: riscv: esp32c3: update west version
to enable wifi subsystem for esp32c3, also
update the linker with proper wlog sections.

Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
2021-09-30 06:39:55 -04:00