2018-07-07 22:33:18 +08:00
|
|
|
# Copyright (c) 2017, I-SENSE group of ICCS
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2019-06-19 06:03:49 +08:00
|
|
|
|
2019-11-19 15:39:11 +08:00
|
|
|
description: STM32 OTGHS controller
|
2018-07-07 22:33:18 +08:00
|
|
|
|
2019-08-20 02:32:25 +08:00
|
|
|
compatible: "st,stm32-otghs"
|
|
|
|
|
2019-08-22 07:10:12 +08:00
|
|
|
include: usb-ep.yaml
|
2018-07-07 22:33:18 +08:00
|
|
|
|
|
|
|
properties:
|
|
|
|
reg:
|
2019-08-28 06:22:01 +08:00
|
|
|
required: true
|
2018-07-07 22:33:18 +08:00
|
|
|
|
|
|
|
interrupts:
|
2019-08-28 06:22:01 +08:00
|
|
|
required: true
|
2018-07-07 22:33:18 +08:00
|
|
|
|
|
|
|
ram-size:
|
|
|
|
type: int
|
2019-08-28 06:22:01 +08:00
|
|
|
required: true
|
2018-07-07 22:33:18 +08:00
|
|
|
description: Size of USB dedicated RAM. STM32 SOC's reference
|
|
|
|
manual defines a shared FIFO size.
|
2018-10-03 21:38:53 +08:00
|
|
|
|
|
|
|
phys:
|
dts: dtlib/edtlib: Add a syntax-based type-checking system
Property type-checking has been pretty rudimentary until now, only
checking things like the length being divisible by 4 for 'type: array',
and strings being null-terminated. In particular, no checking was done
for 'type: uint8-array', letting
jedec-id = < 0xc8 0x28 0x17 >;
slip through when
jedec-id = [ 0xc8 0x28 0x17 ];
was intended.
Fix it by adding a syntax-based type checker:
1. Add Property.type, which gives a high-level type for the property,
derived from the markers added in the previous commit.
This includes types like TYPE_EMPTY ('foo;'),
TYPE_NUM ('foo = < 3 >;'), TYPE_BYTES ('foo = [ 01 02 ];'),
TYPE_STRINGS ('foo = "bar", "baz"'),
TYPE_PHANDLE ('foo = < &bar >;'), and TYPE_COMPOUND (everything not
recognized).
See the Property.type docstring in dtlib for more info.
2. Use the high-level type in
Property.to_num()/to_string()/to_node()/etc. to verify that the
property was assigned in an expected way for the type.
If the assignment looks bad, give a helpful error:
expected property 'nums' on /foo/bar in some.dts to be assigned
with 'nums = < (number) (number) ... >', not 'nums = "oops";'
Some other related changes are included as well:
- There's a new Property.to_bytes() function that works like accessing
Property.bytes, except with an added check for the value being
assigned like 'foo = [ ... ]'.
This function solves problems like the jedec-id one.
- There's a new Property.to_path() function for fetching the
referenced node for assignments like 'foo = &node;', with type
checking. (Strings are accepted too, as long as they give the path
to an existing node.)
This function is used for /chosen and /aliases.
- A new 'type: phandle' type can now be given in bindings, for
properties that are assigned like 'foo = < &node >;'.
- Property.__str__() now displays phandles and path references as they
were written (e.g. '< &foo >' instead of '< 0x1 >', if the
allocated phandle happened to be 1).
- Property.to_num() and Property.to_nums() no longer take a 'length'
parameter, because it makes no sense with the type checking.
- The global dtlib.to_string() and dtlib.to_strings() functions were
removed, because they're not that useful.
- More tests were added, along with misc. minor cleanup in various
places.
- Probably other stuff I forgot.
The more strict type checking in dtlib indirectly makes some parts of
edtlib more strict as well (wherever Property.to_*() is used).
Fixes: #18131
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-08-10 02:38:17 +08:00
|
|
|
type: phandle
|
2019-08-28 06:22:01 +08:00
|
|
|
required: false
|
2018-10-03 21:38:53 +08:00
|
|
|
description: PHY provider specifier
|
2019-07-15 19:56:46 +08:00
|
|
|
|
|
|
|
clocks:
|
2019-08-28 06:22:01 +08:00
|
|
|
required: true
|