Commit graph

5542 commits

Author SHA1 Message Date
Immo Birnbaum
99b7e9d860 boards: arm: qemu_cortex_a9: change board's timing parameters
- Fix the system clock frequency: should be 111.1 MHz instead
of 100 MHz.
- Set ticks per second to 1000 for higher system clock precision.
- Set QEMU icount shift value to 3 so that one instruction gets
executed every 2^3 = 8 ns.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@Weidmueller.com>
2021-11-15 14:44:56 -05:00
Maureen Helm
836651b453 drivers: gpio: Refactor drivers to use shared init priority
Refactors all of the on-chip GPIO drivers to use a shared driver class
initialization priority configuration, CONFIG_GPIO_INIT_PRIORITY, to
allow configuring GPIO drivers separately from other devices. This is
similar to other driver classes like I2C and SPI.

Most drivers previously used CONFIG_KERNEL_INIT_PRIORITY_DEFAULT or
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, therefore the default for this new
option is the lower of the two, which means earlier initialization.

Driver-specific options for off-chip I2C- or SPI-based GPIO drivers are
left intact because they often need to be initialized at a different
priority than on-chip GPIO drivers.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-11-15 14:38:55 -05:00
Anas Nashif
7424126060 boards: qemu_cortex_a9: use SUPPORTED_EMU_PLATFORMS
We moved from EMU_PLATFORM to SUPPORTED_EMU_PLATFORMS.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-14 10:11:06 -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
Sebastian Bøe
b39384f5df tf-m: Fix flashing of samples on nrf5340 and nrf9160 boards
Always flash the merged hex file.

This fixes flashing for samples. Before "west flash" only worked for
tests.

I don't know why this was not done from the get-go.

This also fixes builds that enables CONFIG_TFM_REGRESSION_NS, which will
use the tfm_ns application file instead of the zephyr application, and
will merge tfm_ns hex into the merged hex file. Otherwise the wrong
application hex file will be flashed.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-12 15:03:09 +01: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
Martí Bolívar
b330e3f374 boards: ubx_bmd345eval_nrf52840: shorten FEM settle times
Based on a report from Bob Recny, reducing the settling times doesn't
break anything.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-11-11 21:52:24 +01:00
Martí Bolívar
7ff74e0ab9 Bluetooth: controller: support FEMs via devicetree
A FEM in this case is an external Front-End Module. This is basically
a range booster with some extra amplification in the TX and RX paths.

This feature is supported for the Nordic open source controller. See
the changes to the ubx_bmd345eval_nrf52840 board for a quick summary
of what you have to do to take advantage of this.

(This patch doesn't actually remove the feature in the openisa HAL,
though, because that never implemented the required GPIO handling
routines.)

We are using the 'fem' property previously added to the
nordic,nrf-radio's devicetree binding, which points to the FEM that is
in use. If you have this property and the node it points to is
enabled, the controller subsystem respects it. Otherwise, FEM support
is disabled.

This obsoletes the following Kconfig options, which are now unused:

- CONFIG_BT_CTLR_GPIO_PA
- CONFIG_BT_CTLR_GPIO_PA_PIN
- CONFIG_BT_CTLR_GPIO_PA_POL_INV
- CONFIG_BT_CTLR_GPIO_PA_OFFSET

- CONFIG_BT_CTLR_GPIO_LNA
- CONFIG_BT_CTLR_GPIO_LNA_PIN
- CONFIG_BT_CTLR_GPIO_LNA_POL_INV
- CONFIG_BT_CTLR_GPIO_LNA_OFFSET

- CONFIG_BT_CTLR_FEM_NRF21540
- CONFIG_BT_CTLR_GPIO_PDN_PIN
- CONFIG_BT_CTLR_GPIO_PDN_POL_INV
- CONFIG_BT_CTLR_GPIO_CSN_PIN
- CONFIG_BT_CTLR_GPIO_CSN_POL_INV
- CONFIG_BT_CTLR_GPIO_PDN_CSN_OFFSET

The PA and LNA pins are now specified via fem-specific devicetree
properties in the FEM node:

- The "generic" PA/LNA case is handled with the ctx-gpios and
  crx-gpios properties of the generic-fem-two-ctrl-pins compatible,
  respectively.

- If the fem is an nRF21540, use the tx-en-gpios and rx-en-gpios
  properties instead (and also respectively). This allows us to specify
  FEM properties in a way that makes sense for the hardware datasheet,
  while still handling them in a uniform way within the controller.

We support this in the nRF5 HAL with a new radio_nrf5_fem.h
sub-header, which pulls in radio_nrf5_fem_generic.h or
radio_nrf5_fem_nrf21540.h depending on the fem node's compatible, if
one is defined. These in turn let us replace the implementation
routines in radio.c with DT equivalents.

Keep in-tree users and devicetree binding documentation up to date.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-11-11 21:52:24 +01:00
Jamie McCrae
6791aaec62 boards: arm: rm1xx_dvk: Add Laird Connectivity RM1xx development board
This is a development board which supports LoRa and Bluetooth Low
Energy functionality

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2021-11-10 09:05:07 -06:00
Francois Ramu
9d3ff71ae5 boards: stm32U585 disco kit enables the ADC1 peripheral
This PR enables the ADC1  for the b_u585i_iot02a disco kit
with input pin channel 15 on pb0.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-11-09 15:59:23 -06: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
Henrik Brix Andersen
5cd2b1ac46 boards: arm: waveshare_open103z: disable CAN bus tests
Disable CAN bus tests since can1 is disabled by default due to an IRQ
conflict with the USB controller.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-11-08 10:55:34 -05:00
Henrik Brix Andersen
c817a09b0a canbus: rename zephyr,can-primary chosen property to zephyr,canbus
Rename the Zephyr chosen property for specifying the default CAN bus
controller from "zephyr,can-primary" to "zephyr,canbus".

The "zephyr,can-primary" property name was selected in antipation of
adding support for redundant CAN networks, which we have yet to
add. Meanwhile, the "primary" term causes confusion for non-redundant
CAN bus configurations (and the "can" term doesn't match the name of the
Zephyr CAN bus subsystem).

The CAN in Automation (CiA) 302-6, which deals with CANopen network
redundancy, uses the terms "default interface" and "redundant
interface". If/when we add support for redundant CAN networks, the
"zephyr,canbus" chosen property can be supplemented with a
"zephyr,canbus-redundant" chosen property.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-11-07 09:05:39 -05:00
Marc Herbert
af1dedf89c boards: intel_adsp: add curly braces around log data in debug mode
This commit makes absolutely no change to the output unless debug is
manually turned on. Debug can be turned on with this other code change:

--- a/boards/xtensa/intel_adsp_cavs15/tools/logtool.py
+++ b/boards/xtensa/intel_adsp_cavs15/tools/logtool.py
@@ -45,7 +45,7 @@ def main():
         else:
             etrace = QEMU_ETRACE

-    l = Loglist(etrace)
+    l = Loglist(etrace, True)
     l.print()

Below are two examples of the new debug output. For instance the empty
and duplicate (due to a bug) slot [33] is now much more obvious:

};  {[31] : 1434444: ssp_set_config(),
};  {[32] : 1485591: ssp_set_config(),
};  {[33] : };  {[33] : 1539091: ssp_set_config(),

In this other example it is now much clearer that [7] misses a
`\n` newline:

};  {[6] : 858361: starting dma_trace_init_complete()
};  {[7] : dma_tr_...() ret=0[00000005] <inf> main};  {[8] : ipc_dma..()
};  {[9] : entering dma_trace_enable
};  {[10] : entering dma_trace_buffer_init()

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-11-07 05:34:06 -05:00
Marc Herbert
e4b453f5fc boards: intel_adsp: prefix "ADSP Reset" message with "invalid slot 0"
Unlike logtool.py, adsplog.py is not shielded from corrupted log data.
Lenghten the error message a bit and be more transparent about the
"invalid slot 0 => ADSP reset" assumption because it is usually but not
always true.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-11-07 05:34:06 -05:00
Marc Herbert
89bfee9975 boards: intel_adsp: suggest to unload driver when mmap fails in adsplog
When CONFIG_IO_STRICT_DEVMEM is set the logger script fails with a
cryptic `OSError: [Errno 22] Invalid argument`. Print a clue and
re-raise the OSError.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-11-07 05:34:06 -05:00
Marc Herbert
2fac69422c boards: intel_adsp: add comments explaining log IDs start from 1
The mismatch between the slot number and the sequence ("id") made me
suspect a bug for too long. Fix one related comment and add two more. No
code change.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-11-07 05:34:06 -05:00
Gerson Fernando Budke
d86b0de993 boards: arm: gd32f403z_eval: Enable gd32isp runner
Add support to gd32isp runner and update board documentation.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-11-07 05:20:50 -05:00
Gerson Fernando Budke
0de934b2a7 scripts: runner: Introduce gd32isp flash runner
Add GigaDevice ISP console flash runner.  This tool enable uses ROM
bootloader to flash devices using serial port.

The GD32_ISP_Console tool can be found at
  http://www.gd32mcu.com/download/down/document_id/175/path_type/1

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-11-07 05:20:50 -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
Sylvio Alves
0931dd1d53 boards: faze: remove invalid defconfig
Removes invalid I2C defconfig in this board, as
config I2C_x is not implemented.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-11-05 14:07:09 -04:00
Sylvio Alves
3c34e156d9 boards: arduino: remove unused I2C config
Arduino Nano 33 board has undefined I2C_0 and I2C_1
configs. This removes it as I2C_TWIN kconfig already
handles it by its DTS file.

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
Francois Ramu
cd6adfe074 boards: arm: stm32 disco kit target board has USB-OTG instance
This commit enables the USB OTG full-speed instance (OTG)
on the target board b_u585i_iot02a from STMicroelectronics.
OTG is available on USB type-C connector (CN1).

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-11-04 10:25:17 -05:00
Maureen Helm
32b4950c61 drivers: eeprom: Refactor drivers to use shared init priority
Refactors all of the EEPROM drivers to use a shared driver class
initialization priority configuration, CONFIG_EEPROM_INIT_PRIORITY, to
allow configuring EEPROM drivers separately from other devices. This is
similar to other driver classes like I2C and SPI.

The default is set to CONFIG_KERNEL_INIT_PRIORITY_DEVICE to preserve the
existing default initialization priority for most drivers. The
exceptions are at2x and emul drivers which have dependencies on SPI,
I2C, or flash drivers and must therefore initialize later than the
default device priority.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-11-04 07:33:01 -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
Daniel DeGrasse
7cd8c06bb3 boards: mimxrt1160: Enable watchdog timer on RT1160
Enable watchdog timer on RT1160 evk. This was tested using
the watchdog timer api test (tests/drivers/watchdog/wdt_basic_api)

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Daniel DeGrasse
a477b25060 boards: mimxrt1160: Enabled ADC support for RT1160
ADC support verified with driver sample. LPADC1 channel 0 pin used,
which maps to pin 10 on J9 on the EVK.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Daniel DeGrasse
a30d7b5125 boards: mimxrt1160: Added SPI support for RT1160
SPI support was verified on lpspi1, by connecting MISO to MOSI

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Daniel DeGrasse
2b0ef89f20 boards: mimxrt1160: Added CAN bus support for RT1160
CAN bus was verified in loopback mode, and transmitted output was
verified using an oscilloscope. Receive functionality was verified in
loopback mode only.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Daniel DeGrasse
c0cee4fb5c boards: Add support for NXP RT1160 EVK
Add baseline support for mimxrt1160_evk Cortex M4 and M7 cores
UART shell, synchronization, and hello world have all been verified to
build and run correctly.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Nicolai Glud
28a4bb0763 boards: imxrt1050_evk_qspi: added nor config to dts
This fixes the build issue with chosen zephyr,flash missing.

Signed-off-by: Nicolai Glud <nicolai.glud@prevas.dk>
2021-11-03 10:53:55 +01:00
Nicolai Glud
b3e5076e59 boards: imxrt1060_evk_hyperflash: added hyperflash to board dts
This fixes the build issue with chosen zephyr,flash missing.

Signed-off-by: Nicolai Glud <nicolai.glud@prevas.dk>
2021-11-03 10:53:55 +01:00
Tom Burdick
71c0cebac9 rddrone_fmuk66: Board docs for RDDRONE-FMUK66
Adds board docs and picture of board with all its great accessories

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2021-11-02 13:17:44 -05:00
Tom Burdick
73f343c51e board: Adds RDDRONE-FMUK66 board support package
Adds required LQ18 part number to the kinetis K66 series

Signed-off-by: Tom Burdick <tom.burdick@electromatic.us>
2021-11-02 13:17:44 -05:00
Francois Ramu
0ddc07d511 boards: arm: stm32 disco kit target board has IWDG instance
This commit enables the independent watchdog peripheral
instance (IWDG1) on the target board b_u585i_iot02a
from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-11-02 13:22:24 +01:00
Francois Ramu
085f54a345 boards: arm: stm32 disco kit target board has entropy RNG instance
This commit enables the Random Nb Generator peripheral
instance (RNG) on the target board b_u585i_iot02a
from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-11-02 13:22:11 +01: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
Mahesh Mahadevan
34ffd5a7d4 boards: lpcxpresso55s69: Add PWM support
Add PWM support

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-11-01 11:14:29 -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
Dmytro Firsov
5451674373 xenvm: switch to Xen PV console instead of PL011 SBSA
This commit removes usage of Xen emulated PL011 SBSA UART in favor of
Xen PV console minimal implementation. Now boot log and application
output can be directly taken from hypervisor domain console, instead of
virtual UART.

Also Xen VM doc was updated according to these changes.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2021-10-29 15:23:33 +02:00
Jamie McCrae
9c5a534461 boards: arm: bt610: Rename from bt6x0
The BT6x0 board configuration is only valid for the BT610 device,
therefore rename the boards file to BT610

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2021-10-28 13:53:21 -04:00
Immo Birnbaum
f4d41b1a6c cmake: boards: make QEMU icount sleep parameter configurable
When QEMU is running in icount mode, the behaviour regarding
the CPU being in sleep mode is configurable, with the default
value being set to 'off'. In this case, instruction counting
continues even when the CPU is sleeping or no target time is
set in the system timer. If the sleep parameter is set to
'on', instruction counting stops if the CPU is sleeping, and
the instruction count will fast-forward directly to the next
target time once it is being set.

In the Xilinx derivative of QEMU (which simulates ZynqMP and
Zynq-7000 SoCs), the default configuration causes QEMU to no
longer accept control commands via the console or remotely
whenever Zephyr enters and remains in idle mode.

Therefore, this commit makes the value of the sleep para-
meter of the icount functionality configurable, with the
default value remaining 'off'. The value can be changed at
board level alongside with the specification of the icount
shift value.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@Weidmueller.com>
2021-10-28 15:26:50 +02:00
Immo Birnbaum
d90f3b4dd5 boards: arm: QEMU target for Cortex-A9 simulation
The qemu_cortex_a9 target simulates the Xilinx Zynq-7000
in a single core configuration with 512 MB of RAM. Supported
peripherals are the Zynq's two UARTs, of which one is activated
for console use, and the two Ethernet controllers, of which
GEM0 can be linked to the local zeth interface.

This target uses Xilinx' fork of QEMU, which is already being
used by the qemu_cortex_r5 target. Although being labelled
'arm64', this version of QEMU is also capable of emulating the
Zynq-7000 based on a binary device tree file. While regular
QEMU provides a Zynq-based machine, this implementation is
buggy and/or incomplete.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@weidmueller.com>
2021-10-28 15:26:50 +02: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