From 12166b61ee84e9ed37fa58da6d991763fca04509 Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Fri, 1 Feb 2019 14:50:46 +0100 Subject: [PATCH] dts: stm32: Add watchdog nodes to STM32 dtsi files Provide watchdog node definition to stm32 dtsi files to enable watchdog configuration by device tree. Add matching st,stm32-watchdog binding. Signed-off-by: Erwan Gouriou --- dts/arm/st/f0/stm32f0.dtsi | 6 ++++ dts/arm/st/f1/stm32f1.dtsi | 7 +++++ dts/arm/st/f2/stm32f2.dtsi | 7 +++++ dts/arm/st/f3/stm32f3.dtsi | 7 +++++ dts/arm/st/f4/stm32f4.dtsi | 6 ++++ dts/arm/st/f7/stm32f7.dtsi | 7 +++++ dts/arm/st/l0/stm32l0.dtsi | 7 +++++ dts/arm/st/l4/stm32l4.dtsi | 7 +++++ dts/bindings/watchdog/st,stm32-watchdog.yaml | 31 ++++++++++++++++++++ 9 files changed, 85 insertions(+) create mode 100644 dts/bindings/watchdog/st,stm32-watchdog.yaml diff --git a/dts/arm/st/f0/stm32f0.dtsi b/dts/arm/st/f0/stm32f0.dtsi index 4c541eb0eec..b26766ab974 100644 --- a/dts/arm/st/f0/stm32f0.dtsi +++ b/dts/arm/st/f0/stm32f0.dtsi @@ -160,6 +160,12 @@ label = "SPI_1"; }; + idwg: watchdog@40003000 { + compatible = "st,stm32-watchdog"; + reg = <0x40003000 0x400>; + label = "IWDG"; + }; + timers1: timers@40012c00 { compatible = "st,stm32-timers"; reg = <0x40012c00 0x400>; diff --git a/dts/arm/st/f1/stm32f1.dtsi b/dts/arm/st/f1/stm32f1.dtsi index 9414a66a50f..5c378c20b8e 100644 --- a/dts/arm/st/f1/stm32f1.dtsi +++ b/dts/arm/st/f1/stm32f1.dtsi @@ -157,6 +157,13 @@ label = "SPI_1"; }; + idwg: watchdog@40003000 { + compatible = "st,stm32-watchdog"; + reg = <0x40003000 0x400>; + label = "IWDG"; + status = "disabled"; + }; + timers1: timers@40012c00 { compatible = "st,stm32-timers"; reg = <0x40012c00 0x400>; diff --git a/dts/arm/st/f2/stm32f2.dtsi b/dts/arm/st/f2/stm32f2.dtsi index 40e76dd719e..c3c4032edb5 100644 --- a/dts/arm/st/f2/stm32f2.dtsi +++ b/dts/arm/st/f2/stm32f2.dtsi @@ -140,6 +140,13 @@ }; }; + idwg: watchdog@40003000 { + compatible = "st,stm32-watchdog"; + reg = <0x40003000 0x400>; + label = "IWDG"; + status = "disabled"; + }; + usart1: serial@40011000 { compatible = "st,stm32-usart", "st,stm32-uart"; reg = <0x40011000 0x400>; diff --git a/dts/arm/st/f3/stm32f3.dtsi b/dts/arm/st/f3/stm32f3.dtsi index 382f6fe4885..dd4d73c1aed 100644 --- a/dts/arm/st/f3/stm32f3.dtsi +++ b/dts/arm/st/f3/stm32f3.dtsi @@ -103,6 +103,13 @@ }; }; + idwg: watchdog@40003000 { + compatible = "st,stm32-watchdog"; + reg = <0x40003000 0x400>; + label = "IWDG"; + status = "disabled"; + }; + usart1: serial@40013800 { compatible = "st,stm32-usart", "st,stm32-uart"; reg = <0x40013800 0x400>; diff --git a/dts/arm/st/f4/stm32f4.dtsi b/dts/arm/st/f4/stm32f4.dtsi index 999b64bda87..ea66bd395e5 100644 --- a/dts/arm/st/f4/stm32f4.dtsi +++ b/dts/arm/st/f4/stm32f4.dtsi @@ -114,6 +114,12 @@ }; }; + idwg: watchdog@40003000 { + compatible = "st,stm32-watchdog"; + reg = <0x40003000 0x400>; + label = "IWDG"; + status = "disabled"; + }; usart1: serial@40011000 { compatible = "st,stm32-usart", "st,stm32-uart"; diff --git a/dts/arm/st/f7/stm32f7.dtsi b/dts/arm/st/f7/stm32f7.dtsi index 35756371458..8edb7647b01 100644 --- a/dts/arm/st/f7/stm32f7.dtsi +++ b/dts/arm/st/f7/stm32f7.dtsi @@ -140,6 +140,13 @@ }; }; + idwg: watchdog@40003000 { + compatible = "st,stm32-watchdog"; + reg = <0x40003000 0x400>; + label = "IWDG"; + status = "disabled"; + }; + usart1: serial@40011000 { compatible = "st,stm32-usart", "st,stm32-uart"; reg = <0x40011000 0x400>; diff --git a/dts/arm/st/l0/stm32l0.dtsi b/dts/arm/st/l0/stm32l0.dtsi index 6b230961aff..7d421e65c40 100644 --- a/dts/arm/st/l0/stm32l0.dtsi +++ b/dts/arm/st/l0/stm32l0.dtsi @@ -105,6 +105,13 @@ }; }; + idwg: watchdog@40003000 { + compatible = "st,stm32-watchdog"; + reg = <0x40003000 0x400>; + label = "IWDG"; + status = "disabled"; + }; + usart1: serial@40013800 { compatible = "st,stm32-usart", "st,stm32-uart"; reg = <0x40013800 0x400>; diff --git a/dts/arm/st/l4/stm32l4.dtsi b/dts/arm/st/l4/stm32l4.dtsi index a8ebf463da2..999b4d3bff1 100644 --- a/dts/arm/st/l4/stm32l4.dtsi +++ b/dts/arm/st/l4/stm32l4.dtsi @@ -98,6 +98,13 @@ }; }; + idwg: watchdog@40003000 { + compatible = "st,stm32-watchdog"; + reg = <0x40003000 0x400>; + label = "IWDG"; + status = "disabled"; + }; + usart1: serial@40013800 { compatible = "st,stm32-usart", "st,stm32-uart"; reg = <0x40013800 0x400>; diff --git a/dts/bindings/watchdog/st,stm32-watchdog.yaml b/dts/bindings/watchdog/st,stm32-watchdog.yaml new file mode 100644 index 00000000000..ca05508d2f0 --- /dev/null +++ b/dts/bindings/watchdog/st,stm32-watchdog.yaml @@ -0,0 +1,31 @@ +# +# Copyright (c) 2019, Linaro Limited +# +# SPDX-License-Identifier: Apache-2.0 +# +--- +title: STMicroelectronics STM32 watchdog driver +version: 0.1 + +description: > + This is a representation of the STM32 watchdog + +properties: + compatible: + type: string + category: required + description: compatible strings + constraint: "st,stm32-watchdog" + generation: define + + reg: + type: int + description: mmio register space + generation: define + category: required + + label: + type: string + category: required + description: Human readable string describing the device (used by Zephyr for API name) + generation: define