Commit graph

33 commits

Author SHA1 Message Date
Oane Kingma fff0a2b5e7 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>
2020-02-03 11:25:40 -08:00
Ulf Magnusson 2934ee2cda dts: bindings: Remove 'title:' and put all info. into 'description:'
Add any useful information from 'title:' to the 'description:' strings
(e.g. explanations of acronyms), and remove 'title:' as well as any
copy-pasted "this binding gives a ..." boilerplate.

Also clean some description strings up a bit.

Some other things could probably be cleaned up (replacing 'GPIO node'
with 'GPIO controller' on controllers for consistency, for example), but
I kept things close to the original to avoid accidentally messing up.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-18 11:52:45 +01:00
Mohamed ElShahawi 2d2f4de5b8 drivers: watchdog: esp32: Add Watchdog Device tree support
- Add WDT(0,1) to esp32.dtsi
- Extend the module to be able to use WDT(0,1)
- Some minor refactoring due to usage of device tree

Tests:
- samples/drivers/watchdog
- tests/drivers/watchdog/wdt_basic_api

Note:
- timer module interrupt registers shall be removed when
timer driver implemented.

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2019-11-04 18:00:36 +01:00
Ulf Magnusson b9240a3cbc dts: bindings: Preserve newlines in descriptions
With https://github.com/zephyrproject-rtos/zephyr/pull/20185, multi-line
descriptions will be formatted nicely, but using '>' breaks it, because
it removes internal newlines (including between paragraphs).

See https://yaml-multiline.info/.

Replace 'description: >' with 'description: |' to encourage '|'. That'll
prevent '>' from getting copied around and messing up long descriptions.

This will lead to some extra newlines in the output, but it's fine.
Line-wrapping messes up any manual formatting.

The replacement was done with

    $ git ls-files 'dts/bindings/*.yaml' | \
          xargs sed -i 's/description:\s*>/description: |/'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-30 07:55:51 +01:00
Anas Nashif f9fd831195 dts: remove unused QMSI bindings
QMSI bindings are not being used anymore, no platforms using QMSI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-18 11:06:18 -05:00
Ioannis Konstantelias 1db2685b57 dts: stm32: Add WWDG in STM32 dtsi files
Added System WWDG support for STM32 devices.

Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
2019-09-11 22:13:36 -05:00
Daniel Leung 3ad1fe8dec dts/watchdog: microchip,xec: fix cmake warnings
With the change to "compatible", and deprecation of "inherit"
and "category: required", there are multiple warnings when
running cmake. So fix those by updating the DTS YAML file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-09-09 17:54:11 -05:00
Ulf Magnusson 6e46a64a48 dts: bindings: Shorten license headers
Shaves a bunch of lines.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Ulf Magnusson a0fceff1a2 scripts: dts: Simplify and improve 'compatible' matching
Instead of

    properties:
        compatible:
            constraint: "foo"

, just have

    compatible: "foo"

at the top level of the binding.

For backwards compatibility, the old 'properties: compatible: ...' form
is still accepted for now, and is treated the same as a single-element
'compatible:'.

The old syntax was inspired by dt-schema (though it isn't
dt-schema-compatible), which is in turn a thin wrapper around
json-schema (the idea is to transform .dts files into YAML and then
verify them).

Maybe the idea was to gradually switch the syntax over to dt-schema and
then be able to use unmodified dt-schema bindings, but dt-schema is
really a different kind of tool (a completely standalone linter), and
works very differently from our stuff (see schemas/dt-core.yaml in the
dt-schema repo to get an idea of just how differently).

Better to keep it simple.

This commit also piggybacks some clarifications to the binding template
re. '#cells:'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Kumar Gala da9859533e dts/bindings: Convert bindings to new include syntax
Convert from:

inherits:
    !include spi-device.yaml

to:

include: spi-device.yaml

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-07 10:25:02 -05:00
Ulf Magnusson fcd665a26c dts: bindings: Have 'required: true/false' instead of 'category: ...'
The 'category: required/optional' setting for properties is just a
yes/no thing. Using a boolean makes it clearer, so have
'required: true/false' instead.

Print a clear error when 'category:' is used:

    edtlib.EDTError: please put 'required: true' instead of 'category:
    required' in 'properties: foo: ...' in
    test-bindings/sub-node-parent.yaml - 'category' has been removed

The old scripts in scripts/dts/ ignore this setting, and only print a
warning if 'category: required' in an inherited binding is changed to
'category: optional'. Remove that code, since the new scripts already
have the same check.

The replacement was done with

    git ls-files 'dts/bindings/*.yaml' | xargs sed -i \
        -e 's/category:\s*required/required: true/' \
        -e 's/category:\s*optional/required: false/'

dts/binding-template.yaml is updated as well.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Tomasz Bursztyka bed0e2203b dts/bindings: Add the representation for Microchip's XEC watchdog timer
Such watchdog is found on MEC150x for instance.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-09-07 09:56:58 -04:00
Ulf Magnusson 0ec0c84808 dts: bindings: Remove unused 'version' field
No binding has anything but 'version: 0.1', and the code in scripts/dts/
never does anything with it except print a warning if it isn't there.
It's undocumented what it means.

I suspect it's overkill if it's meant to be the binding format version.
If we'd need to tell different versions from each other, we could change
some other minor thing in the format, and it probably won't be needed.

Remove the 'version' fields from the bindings and the warning from the
scripts/dts/ scripts.

The new device tree script will give an error when unknown fields appear
in bindings.

The deletion was done with

    git ls-files 'dts/bindings/*.yaml' | xargs sed -i '/^\s*version: /d'

Some blank lines at the beginning of bindings were removed as well.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-22 09:28:07 -04:00
Kumar Gala a69f070bca dts/bindings: remove required clock from intel,qmsi-watchdog
The dts that have intel,qmsi-watchdog don't sent a clock property so its
not required.  Change it from being required to optional.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-17 23:29:03 -04:00
Piotr Zięcik e4bd11b3f3 dts: Add information about system bus frequency to the dts
This commit adds a fixed clock node (representing clock driving
system bus). The added node is then referenced by peripherals requiring
information about driving clock frequency.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-07-17 21:53:36 +02:00
Kumar Gala 6e8c155cfa dts/binding: Move clocks into base.yaml
Add clocks as optional in base.yaml and cleanup other yamls

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-17 09:13:01 -04:00
Kumar Gala 8e1d3f3328 dts/bindings: Remove generation from binding
Now that the generation script doesn't look at the "generation" in the
YAML, we can remove it from the binding files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-11 06:51:17 -04:00
Henrik Brix Andersen 7cb92552f3 drivers: watchdog: mcux_wdog32: add driver for the NXP Kinetis WDOG32
Add driver shim for the NXP Kinetis WDOG32 module.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-07-02 18:00:16 -05:00
Ulf Magnusson eba81c6e54 yaml: Remove redundant document separators
YAML document separators are needed e.g. when doing

  $ cat doc1.yaml doc2.yaml | <parser>

For the bindings, we never parse concatenated documents. Assume we don't
for any other .yaml files either.

Having document separators in e.g. base.yaml makes !include a bit
confusing, since the !included files are merged and not separate
documents (the merging is done in Python code though, so it makes no
difference for behavior).

The replacement was done with

    $ git ls-files '*.yaml' | \
        xargs sed -i -e '${/\s*\.\.\.\s*/d;}' -e 's/^\s*---\s*$//'

First pattern removes ... at the end of files, second pattern clears a
line with a lone --- on it.

Some redundant blank lines at the end of files were cleared with

    $ git ls-files '*.yaml' | xargs sed -i '${/^\s*$/d}'

This is more about making sure people can understand why every part of a
binding is there than about removing some text.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-06-19 10:40:10 +02:00
Kumar Gala 48100df875 dts/bindings: Move common properties into a base.yaml
Move common properties like 'compatible', 'reg', 'reg-names',
'interrupts', 'interrupt-names', and 'label' into one common base.yaml
that all the other yaml's can inherit from.  This removes both
duplication and inconsistent definition.

The device specific yamls just need to say if a property is 'required'
or not.

NOTE: due to some generation conflicts we did not covert
'soc-nv-flash.yaml' to use base.yaml.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-10 11:17:41 -05:00
Ulf Magnusson 3513c260c0 dts/bindings: Remove 'generate: define' from 'interrupt-names' bindings
After commit 'scripts/dts: Never ignore properties in
generate_node_defines()', pointless entries for 'interrupt-names'
properties show up in generated_dts_board.conf and
generated_dts_board_fixups.h, because many bindings specify
'generate: define' for 'interrupt-names'.

If 'generation: define' is taken as "generate #define's for this
particular property", then only the 'interrupts' property ought to have
'generation: define'. Having it on both 'interrupts' and
'interrupt-names' makes you wonder what it would mean to only have it on
one of them.

Things get a bit confusing since 'interrupt-names' is still used when
determining the macro names generated for 'interrupts', but it's
probably best to have 'generation: define' work in a consistent way
still (and never be a no-op).

Remove 'generation: define' from all 'interrupt-names' bindings.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-27 10:02:35 -06:00
Erwan Gouriou 12166b61ee 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 <erwan.gouriou@linaro.org>
2019-02-01 19:16:59 -05:00
Kumar Gala 719c9e7b92 dts/bindings: Remove id field from atmel,sam-watchdog
atmel,sam-watchdog..yaml had the old id field that we have removed.
Remove it so we stop getting a warning about it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-03 22:56:01 -04:00
Subramanian Meenakshi Sundaram 4e1179bba5 drivers: watchdog: Adding watchdog support for sam SOC
Adding watchdog driver for sam SoC. The current implemntation just
diables the watchdog on device boot.
This PR adds the following support for SAM3X, SAM4S and SAME70
1. Activate processor reset
2. Activate all reset
3. Generate interrupt on watchdog timer expiration.

Signed-off-by: Subramanian Meenakshi Sundaram <subbu147@gmail.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-02 15:09:22 -05:00
Kumar Gala e99b4235c5 dts: yaml: remove unused id field
Some new yaml bindings that got committed added back in the 'id:' field
which we have removed.  Remove it from those dts binding files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-16 23:20:03 -04:00
Savinay Dharmappa bf389e0853 drivers: watchdog: Add dts support for QMSI based watchdog.
patch adds the device binding for qmsi watchdog and device node
for socs which are using wdt qmsi driver.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-14 14:16:03 -04:00
Kumar Gala 011b93011e dts: yaml: remove unused id field
The 'id' field was never used and tended to just have the compat of the
node.  Lets remove it and removed some code in extract_dts_includes.py
related to it.  Added a warning if 'id' is set in a yaml so we can
remove it going forward.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-11 08:03:44 -05:00
Erwan Gouriou 1755cf6582 dts/bindings: Add 'generation' directive on for 'compatible' property
Add 'generation: define' directive to 'compatible' property.
When existing for a type of device, move compatible property
description in device base structure (eg: i2c.yaml)

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-09-14 08:02:53 -05:00
Maureen Helm 7960f79134 dts: Add kinetis watchdog bindings and update k64, kw2xd soc nodes
Adds dts bindings for the kinetis watchdog peripheral, and updates the
watchdog nodes for the k64 and kw2xd socs.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-17 15:00:55 -05:00
Karol Lasończyk 83e4947cf1 dts: nrf: Expand nRF DTS to support watchdog
Commit introduces support for watchdog configuration for Nordic
Semiconductor nRF SoCs in device tree.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2018-05-14 10:28:23 -05:00
Michael Hope be8cba4bad watchdog: add a watchdog driver for the SAM0 family.
Signed-off-by: Michael Hope <mlhx@google.com>
2018-01-04 13:18:25 -05:00
Erwan Gouriou 104553d93f yaml: fix properties syntax to 'mapping' instead of 'series'
According to yaml syntaxic rules, 'properties' described in dts
bindings yaml files could be seen as 'mapping'(key/value couple),
instead of 'series' (list of single elements).
yaml 'mappings' will then be converted by yaml python library as
python 'dict' which will ease treatment (instead of current list
as were before this commit).
Same treatment is applied to 'inherits'.

script extract_dts_inlcude is updated to take change of yaml_list
structre into account. This allows some code simplification. Largest
impact is yaml_collapse function which works now allow complete
overload method on all the attributes of a yaml nodes.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-11-28 11:42:59 -06:00
Kumar Gala b5c4237009 dts: yaml: rework yaml file layout
Moved yaml files to be under dts/bindings and have the bindings try
and match the linux doc device tree binding dir structure as the
canonical binding reference.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-10-23 15:02:00 +02:00