This is coming from devicetree and corrosponds to what we have in the
dts/bindings/vendor-prefixes.txt file.
This will allow for static filtering, especially with twister, i.e. no
need to build anything to know the vendor of a board
All of the vendor data was extracted automatically from the devicetree,
so some platforms might not have the right vendor or no vendor at all
right now, we need to fix some of the DTS information or do this
manually to get this 100% correct. But we are close.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This migrates the subsys code samples to the new Sphinx code-sample
extension, making it easier to find relevant samples when browsing
API reference.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add gpio-keys codes for all boards. These are mostly INPUT_KEY_0 and so
on but I've used some more specific ones where it was obvious that
there's something else on the boards.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Refactor the ESP32 target SOCs together with
all related boards. Most braking changes includes:
- changing the CONFIG_SOC_ESP32* to refer to
the actual soc line (esp32,esp32s2,esp32s3,esp32c3)
- replacing CONFIG_SOC with the CONFIG_SOC_SERIES
- creating CONFIG_SOC_FAMILY_ESP32 to embrace all
the ESP32 across all used architectures
- introducing CONFIG_SOC_PART_NUMBER_* to
provide a SOC model config
- introducing the 'common' folder to hide all
commonly used configs and files.
- updating west.yml to reflect previous changes in hal
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Introduce dtsi files representing the
current portfolio of chips and modules
based on the followint criteria:
- flash size
- psram size
- gpio count
- certification status
Update the boards dts files according
to which SOC/SIP they are using.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Cover the 2nd stage bootloader options and
the extend the application build instructions
to include sysbuild.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
This make MCUboot build as Zephyr application.
Providing optinal 2nd stage bootloader to the
IDF bootloader, which is used by default.
This provides more flexibility when building
and loading multiple images and aims to
brings better DX to users by using the sysbuild.
MCUboot and applications has now separate
linker scripts.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
All ESP32 boards shows a garbage char before Zephyr banner.
This happens during uart TX pin configuration that current
lacks setting as output high.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The init infrastructure, found in `init.h`, is currently used by:
- `SYS_INIT`: to call functions before `main`
- `DEVICE_*`: to initialize devices
They are all sorted according to an initialization level + a priority.
`SYS_INIT` calls are really orthogonal to devices, however, the required
function signature requires a `const struct device *dev` as a first
argument. The only reason for that is because the same init machinery is
used by devices, so we have something like:
```c
struct init_entry {
int (*init)(const struct device *dev);
/* only set by DEVICE_*, otherwise NULL */
const struct device *dev;
}
```
As a result, we end up with such weird/ugly pattern:
```c
static int my_init(const struct device *dev)
{
/* always NULL! add ARG_UNUSED to avoid compiler warning */
ARG_UNUSED(dev);
...
}
```
This is really a result of poor internals isolation. This patch proposes
a to make init entries more flexible so that they can accept sytem
initialization calls like this:
```c
static int my_init(void)
{
...
}
```
This is achieved using a union:
```c
union init_function {
/* for SYS_INIT, used when init_entry.dev == NULL */
int (*sys)(void);
/* for DEVICE*, used when init_entry.dev != NULL */
int (*dev)(const struct device *dev);
};
struct init_entry {
/* stores init function (either for SYS_INIT or DEVICE*)
union init_function init_fn;
/* stores device pointer for DEVICE*, NULL for SYS_INIT. Allows
* to know which union entry to call.
*/
const struct device *dev;
}
```
This solution **does not increase ROM usage**, and allows to offer clean
public APIs for both SYS_INIT and DEVICE*. Note that however, init
machinery keeps a coupling with devices.
**NOTE**: This is a breaking change! All `SYS_INIT` functions will need
to be converted to the new signature. See the script offered in the
following commit.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
init: convert SYS_INIT functions to the new signature
Conversion scripted using scripts/utils/migrate_sys_init.py.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
manifest: update projects for SYS_INIT changes
Update modules with updated SYS_INIT calls:
- hal_ti
- lvgl
- sof
- TraceRecorderSource
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
tests: devicetree: devices: adjust test
Adjust test according to the recently introduced SYS_INIT
infrastructure.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
tests: kernel: threads: adjust SYS_INIT call
Adjust to the new signature: int (*init_fn)(void);
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Current internal BT heap uses custom heap area, which reserves
unused RAM area. In order to free up some RAM, BT HAL
implementation was changed to use sysheap instead.
With this change, something around ~13kb is now available for
application, optmizing RAM usage.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
In order to avoid missing k_malloc options, add default
HEAP value for all boards.
Fixes#54428
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
ESP32 and ESP32-S2 HW clock are tied to DTS clock configuration.
This changes updates the default configuration to retrieve
this information from DTS.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This enables the support for the Semtech SX1276 chip on board (see the
pinout[1] and schematic[2] documents).
The chip is connected to SPI as follow:
| PIN | GPIO |
| ---- | -------|
| CS# | GPIO18 |
| CLK | GPIO5 |
| MOSI | GPIO27 |
| MISO | GPIO19 |
| RST# | GPIO14 |
Additionally, the LoRa DIO PINs are connected as follow:
| PIN | GPIO |
| ---- | -------|
| DIO0 | GPIO26 |
| DIO1 | GPIO35 |
| DIO2 | GPIO34 |
_Note_: The first three DIO PINs are connected to the ESP32 MCU only.
[1]: https://resource.heltec.cn/download/WiFi_LoRa_32/WIFI_LoRa_32_V2.1.pdf
[2]: https://resource.heltec.cn/download/WiFi_LoRa_32/V2/WIFI_LoRa_32_V2(868-915).PDF
Signed-off-by: Gaël PORTAY <gael.portay@gmail.com>
The tag that marks pinmux as supported is not used by any test or
sample, therefore this doesn't seem needed anymore.
- remove from 3 mec1x boards, they still use pinmux,
but as the tag is neither used in tests and pinmux
deprecated anyway no need for it.
- remove from 5 esp32 boards, as they now use pinctrl.
- remove from 2 lpc boards, as they now use pinctrl.
- remove from 1 stm32 board, as it now uses pinctrl.
- remove from 1 npcx board, as it now uses pinctrl.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
This PR removes information regarding previous
west extension related to OpenOCD download.
This extension is no longer available and manual download
is required until upstream OpenOCD receives
all xtensa and riscv patches.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
* Document use of OLED display.
* Fix indentation in list of features.
* References are only rendered if they are used and currently most of
them are not. Introduce a list of links in addition to the actual
references to make them show up.
Signed-off-by: Michael Laß <bevan@bi-co.net>
trng0 refers to the entropy source in the ESP32, as defined in
esp32.dtsi. It enables the configuration item ENTROPY_ESP32_RNG and
therefore offers an entropy driver, making the use of
CONFIG_TEST_RANDOM_GENERATOR unnecessary.
This change helps running the esp32_wifi_station sample.
Signed-off-by: Michael Laß <bevan@bi-co.net>
Now that entropy drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.
Signed-off-by: Kumar Gala <galak@kernel.org>
According to the board porting guidelines, boards should "leave
peripherals and their drivers disabled by default". In Zephyr we
tipically enable GPIO and SERIAL, as they are virtually required by all
samples/tests in tree. However, for the rest of peripherals it is up to
the application/test to enable the necessary driver classes. It is also
useful that board's Kconfig.defconfig enables certain driver peripherals
based on a condition, e.g. enable I2C if SENSOR=y.
Ref. https://docs.zephyrproject.org/latest/hardware/porting/
board_porting.html#general-recommendations
This patch removes the following driver classes from defconfig files:
- CONFIG_ADC
- CONFIG_COUNTER
- CONFIG_EEPROM
- CONFIG_ENTROPY
- CONFIG_ESPI
- CONFIG_HWINFO
- CONFIG_I2C
- CONFIG_LED
- CONFIG_NETWORKING
- CONFIG_PS2
- CONFIG_PWM
- CONFIG_SENSOR
- CONFIG_SPI
- CONFIG_SPI_SLAVE
- CONFIG_WATCHDOG
Note that a previous attempt was done in #38510.
Fixes#30694
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
For the !SOC_I2C_SUPPORT_HW_CLR_BUS in which we implement bus
reset via GPIOs, change the devicetree properties to be actual
gpio properties and update the code to reflect this.
Signed-off-by: Kumar Gala <galak@kernel.org>
Now that gpio drivers are enabled based on devicetree we can remove
any cases of them getting enabled by *defconfig and proj.conf files.
Signed-off-by: Kumar Gala <galak@kernel.org>
Add alias to boards with watchdog enabled to facilitate the
move of samples/drivers/watchdog to use DT_ALIAS.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
update device tree pin states definitions and node
descriptions to group pins sharing common properties.
Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
A number of boards utilize device_get_binding(DT_LABEL(...)) to
get a gpio for some purpose. Switch over to using DEVICE_DT_GET
and device_is_ready() instead. This is part of the ongoing
cleanup towards phasing out usage of the "label" property in DTS.
Signed-off-by: Kumar Gala <galak@kernel.org>
Espressif boards cannot have ble and wifi
CI build tests due to binary blobs policies.
This removes refered tests.
west.yml: update hal repository to get updates
that allows building using Zephyr's SDK.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
In order to bring consistency in-tree, migrate all boards code to the
new prefix <zephyr/...>. Note that the conversion has been scripted,
refer to zephyrproject-rtos#45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
ESP32/S2/C3-based boards no longer support pinmux, which was
deprecated in favor of pinctrl.
Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>