boards: silabs: Consistently name dev kits

Rename all Silicon Labs dev kits to always use the official kit name
as board target name. Previous kit names used various naming schemes,
including putting part of the SoC name in the board name. With HWMv2,
SoC names (if needed) should go in the SoC board qualifier.

Use HWMv2 revisions for the two variants of SLTB010A.

Split the xG27 Dev Kit from the EFR32BG22 Thunderboard. This attempt
at deduplication is confusing due to the very different kit names
and use of different ICs (BG22 vs BG27), and was not continued with
the xG24 Dev Kit, meaning that it wasn't consistent.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
This commit is contained in:
Aksel Skauge Mellbye 2024-06-07 13:43:38 +02:00 committed by Anas Nashif
commit bc6c363bc9
92 changed files with 522 additions and 273 deletions

View file

@ -0,0 +1,59 @@
/*
* Copyright (c) 2020 Christian Taedcke
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/printk.h>
struct supply_cfg {
const struct device *gpio;
gpio_pin_t pin;
gpio_dt_flags_t flags;
};
static int enable_supply(const struct supply_cfg *cfg)
{
int rv = -ENODEV;
if (device_is_ready(cfg->gpio)) {
gpio_pin_configure(cfg->gpio, cfg->pin,
GPIO_OUTPUT | cfg->flags);
gpio_pin_set(cfg->gpio, cfg->pin, 1);
rv = 0;
}
return rv;
}
static int efr32mg_sltb004a_init(void)
{
struct supply_cfg cfg;
int rc = 0;
(void)cfg;
#define CCS811 DT_NODELABEL(ccs811)
#if DT_NODE_HAS_STATUS(CCS811, okay)
cfg = (struct supply_cfg){
.gpio = DEVICE_DT_GET(DT_GPIO_CTLR(CCS811, supply_gpios)),
.pin = DT_GPIO_PIN(CCS811, supply_gpios),
.flags = DT_GPIO_FLAGS(CCS811, supply_gpios),
};
/* Enable the CCS811 power */
rc = enable_supply(&cfg);
if (rc < 0) {
printk("CCS811 supply not enabled: %d\n", rc);
}
#endif
return rc;
}
/* needs to be done after GPIO driver init */
SYS_INIT(efr32mg_sltb004a_init, POST_KERNEL,
CONFIG_KERNEL_INIT_PRIORITY_DEVICE);