dts / boards / soc: Add support for SiLabs Gecko watchdog
This commit adds the following: - device tree bindings for Gecko watchdog driver - EFM32PG SOC support for the watchdog driver - EFM32PG board support for the watchdog driver - DTS aliases for testing with default watchdog driver test Signed-off-by: Oane Kingma <o.kingma@interay.com>
This commit is contained in:
parent
dc5c242223
commit
fff0a2b5e7
10 changed files with 62 additions and 0 deletions
|
@ -59,6 +59,8 @@ The efm32pg_stk3402a board configuration supports the following hardware feature
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
| I2C | on-chip | i2c port-polling |
|
| I2C | on-chip | i2c port-polling |
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
|
| WATCHDOG | on-chip | watchdog |
|
||||||
|
+-----------+------------+-------------------------------------+
|
||||||
|
|
||||||
The default configuration can be found in the defconfig file:
|
The default configuration can be found in the defconfig file:
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ supported:
|
||||||
- i2c
|
- i2c
|
||||||
- gpio
|
- gpio
|
||||||
- nvs
|
- nvs
|
||||||
|
- watchdog
|
||||||
testing:
|
testing:
|
||||||
ignore_tags:
|
ignore_tags:
|
||||||
- net
|
- net
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
zephyr,shell-uart = &usart0;
|
zephyr,shell-uart = &usart0;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
watchdog0 = &wdog0;
|
||||||
|
watchdog1 = &wdog1;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* These aliases are provided for compatibility with samples */
|
/* These aliases are provided for compatibility with samples */
|
||||||
|
@ -84,6 +86,15 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&wdog0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&wdog1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
&flash0 {
|
&flash0 {
|
||||||
/*
|
/*
|
||||||
* For more information, see:
|
* For more information, see:
|
||||||
|
|
|
@ -202,6 +202,22 @@
|
||||||
gpio-controller;
|
gpio-controller;
|
||||||
#gpio-cells = <2>;
|
#gpio-cells = <2>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
wdog0: wdog@40052000 {
|
||||||
|
compatible = "silabs,gecko-wdog";
|
||||||
|
reg = <0x40052000 0x2C>;
|
||||||
|
label = "WDOG0";
|
||||||
|
interrupts = <2 0>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
wdog1: wdog@40052400 {
|
||||||
|
compatible = "silabs,gecko-wdog";
|
||||||
|
reg = <0x40052400 0x2C>;
|
||||||
|
label = "WDOG1";
|
||||||
|
interrupts = <3 0>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
19
dts/bindings/watchdog/silabs,gecko-wdog.yaml
Normal file
19
dts/bindings/watchdog/silabs,gecko-wdog.yaml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Copyright (c) 2019 Interay Solutions B.V.
|
||||||
|
# Copyright (c) Oane Kingma
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
description: Silicon Labs Gecko Family Watchdog driver
|
||||||
|
|
||||||
|
compatible: "silabs,gecko-wdog"
|
||||||
|
|
||||||
|
include: base.yaml
|
||||||
|
|
||||||
|
properties:
|
||||||
|
reg:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
label:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
interrupts:
|
||||||
|
required: true
|
|
@ -31,4 +31,7 @@
|
||||||
|
|
||||||
#define DT_RTC_0_NAME DT_INST_0_SILABS_GECKO_RTCC_LABEL
|
#define DT_RTC_0_NAME DT_INST_0_SILABS_GECKO_RTCC_LABEL
|
||||||
|
|
||||||
|
#define DT_WDT_0_NAME DT_INST_0_SILABS_GECKO_WDOG_LABEL
|
||||||
|
#define DT_WDT_1_NAME DT_INST_1_SILABS_GECKO_WDOG_LABEL
|
||||||
|
|
||||||
/* End of SoC Level DTS fixup file */
|
/* End of SoC Level DTS fixup file */
|
||||||
|
|
|
@ -29,5 +29,7 @@
|
||||||
#define DT_GPIO_GECKO_PORTJ_NAME DT_SILABS_EFM32_GPIO_PORT_4000A1C0_LABEL
|
#define DT_GPIO_GECKO_PORTJ_NAME DT_SILABS_EFM32_GPIO_PORT_4000A1C0_LABEL
|
||||||
#define DT_GPIO_GECKO_PORTK_NAME DT_SILABS_EFM32_GPIO_PORT_4000A1F0_LABEL
|
#define DT_GPIO_GECKO_PORTK_NAME DT_SILABS_EFM32_GPIO_PORT_4000A1F0_LABEL
|
||||||
|
|
||||||
|
#define DT_WDT_0_NAME DT_INST_0_SILABS_GECKO_WDOG_LABEL
|
||||||
|
#define DT_WDT_1_NAME DT_INST_1_SILABS_GECKO_WDOG_LABEL
|
||||||
|
|
||||||
/* End of SoC Level DTS fixup file */
|
/* End of SoC Level DTS fixup file */
|
||||||
|
|
|
@ -29,4 +29,7 @@
|
||||||
#define DT_GPIO_GECKO_PORTJ_NAME DT_SILABS_EFM32_GPIO_PORT_4000A1C0_LABEL
|
#define DT_GPIO_GECKO_PORTJ_NAME DT_SILABS_EFM32_GPIO_PORT_4000A1C0_LABEL
|
||||||
#define DT_GPIO_GECKO_PORTK_NAME DT_SILABS_EFM32_GPIO_PORT_4000A1F0_LABEL
|
#define DT_GPIO_GECKO_PORTK_NAME DT_SILABS_EFM32_GPIO_PORT_4000A1F0_LABEL
|
||||||
|
|
||||||
|
#define DT_WDT_0_NAME DT_INST_0_SILABS_GECKO_WDOG_LABEL
|
||||||
|
#define DT_WDT_1_NAME DT_INST_1_SILABS_GECKO_WDOG_LABEL
|
||||||
|
|
||||||
/* End of SoC Level DTS fixup file */
|
/* End of SoC Level DTS fixup file */
|
||||||
|
|
|
@ -28,4 +28,6 @@
|
||||||
#define DT_GPIO_GECKO_PORTE_NAME DT_SILABS_EFR32XG1_GPIO_PORT_4000A0C0_LABEL
|
#define DT_GPIO_GECKO_PORTE_NAME DT_SILABS_EFR32XG1_GPIO_PORT_4000A0C0_LABEL
|
||||||
#define DT_GPIO_GECKO_PORTF_NAME DT_SILABS_EFR32XG1_GPIO_PORT_4000A0F0_LABEL
|
#define DT_GPIO_GECKO_PORTF_NAME DT_SILABS_EFR32XG1_GPIO_PORT_4000A0F0_LABEL
|
||||||
|
|
||||||
|
#define DT_WDT_0_NAME DT_INST_0_SILABS_GECKO_WDOG_LABEL
|
||||||
|
|
||||||
/* End of SoC Level DTS fixup file */
|
/* End of SoC Level DTS fixup file */
|
||||||
|
|
|
@ -30,4 +30,7 @@
|
||||||
#define DT_GPIO_GECKO_PORTJ_NAME DT_SILABS_EFR32MG_GPIO_PORT_4000A1B0_LABEL
|
#define DT_GPIO_GECKO_PORTJ_NAME DT_SILABS_EFR32MG_GPIO_PORT_4000A1B0_LABEL
|
||||||
#define DT_GPIO_GECKO_PORTK_NAME DT_SILABS_EFR32MG_GPIO_PORT_4000A1E0_LABEL
|
#define DT_GPIO_GECKO_PORTK_NAME DT_SILABS_EFR32MG_GPIO_PORT_4000A1E0_LABEL
|
||||||
|
|
||||||
|
#define DT_WDT_0_NAME DT_INST_0_SILABS_GECKO_WDOG_LABEL
|
||||||
|
#define DT_WDT_1_NAME DT_INST_1_SILABS_GECKO_WDOG_LABEL
|
||||||
|
|
||||||
/* End of SoC Level DTS fixup file */
|
/* End of SoC Level DTS fixup file */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue