The third argument 'nomap' of early_init_dt_reserve_memory_arch() is
bool. It is preferred to pass it with a bool type parameter.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
There is no need to cast "u64" to "unsigned long long" before printing
it, as both types have been made identical on all architectures many
years ago.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
The example of the EHCI binding generates a bunch of warnings now that the
examples are validated too.
Most notably, phy-names isn't used at all, and the node name should be USB.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
When adding support for the DWMAC (and derivatives) bindings,
phy-connection-type was required, even though the previous binding required
the equivalent phy-mode.
Let's fix this by using phy-mode as we should have.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Both the allwinner and amlogic compatibles require that either the
allwinner,pipeline or the amlogic,pipeline property is set. This was
dropped during the conversion since we didn't have conditionals back then,
but we can express this properly now.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
The simple-framebuffer binding has a compatible that isn't one of the valid
options. Since an Allwinner pipeline is being described, let's add the
matching compatible.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
The child nodes of a mdio bus are supposed to be ethernet PHYs, with a reg
property. Make sure that's validated as well.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
MDIO controllers should have child nodes with a singe value in their reg
properties being the ID of the PHY in the bus.
Let's add the proper constraints on #address-cells and #size-cells.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
The node name of an MDIO controller should be MDIO. Let's add a rule for
this.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Mixing 'maxItems' and scalar properties doesn't make much sense, so drop
'maxItems' as a single item is implied.
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: linux-mtd@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
Matching on the 'cpus' node was a bad choice because the schema is
incorrectly applied to non-Arm cpus nodes. As we now have a common cpus
schema which checks the general structure, it is also redundant to do so
in the Arm CPU schema.
The downside is one could conceivably mix different architecture's cpu
nodes or have typos in the compatible string. The latter problem pretty
much exists for every schema.
Signed-off-by: Rob Herring <robh@kernel.org>
The '#address-cells' and '#size-cells' properties were not defined in
the lm3630a bindings and would cause the following error when
attempting to validate the examples against the schema:
Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.example.dt.yaml:
'#address-cells', '#size-cells' do not match any of the regexes:
'^led@[01]$', 'pinctrl-[0-9]+'
Correct this by adding those two properties.
While we're here, move the ti,linear-mapping-mode property to the
led@[01] child nodes to correct the following validation error:
Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.example.dt.yaml:
led@0: 'ti,linear-mapping-mode' does not match any of the regexes:
'pinctrl-[0-9]+'
Fixes: 32fcb75c66 ("dt-bindings: backlight: Add lm3630a bindings")
Signed-off-by: Brian Masney <masneyb@onstation.org>
Reported-by: Rob Herring <robh+dt@kernel.org>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Acked-by: Dan Murphy <dmurphy@ti.com>
[robh: also drop maxItems from child reg]
Signed-off-by: Rob Herring <robh@kernel.org>
Even though the DWMAC driver uses some driver specific properties, the PHY
core has a bunch of generic properties and can deal with them nicely.
Let's deprecate our specific properties.
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Rob Herring <robh@kernel.org>
Switch our Allwinner H3 EMAC controller binding to a YAML schema to enable
the DT validation. Since that controller is based on a Synopsys IP, let's
add the validation to that schemas with a bunch of conditionals.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Switch our Allwinner A20 GMAC controller binding to a YAML schema to enable
the DT validation. Since that controller is based on a Synopsys IP, let's
add the validation to that schemas with a bunch of conditionals.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Switch the STMMAC / Synopsys DesignWare MAC controller binding to a YAML
schema to enable the DT validation.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Switch our Allwinner A10 MDIO controller binding to a YAML schema to enable
the DT validation.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Switch our Allwinner A10 EMAC controller binding to a YAML schema to enable
the DT validation.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Unlike what was initially claimed in the PHY binding, the interrupt
property of a PHY can be omitted, and the OS will turn to polling instead.
Document that.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
While the Ethernet PHY framework was marked as maintained, the device tree
bindings associated to that framework was not listed under the maintained
files. Fix that.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
The MDIO buses have a number of available device tree properties that can
be used in their device tree node. Add a YAML schemas for those.
Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
The networking PHYs have a number of available device tree properties that
can be used in their device tree node. Add a YAML schemas for those.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
[robh: drop maxItems from reg]
Signed-off-by: Rob Herring <robh@kernel.org>
The Ethernet controllers have a good number of generic options that can be
needed in a device tree. Add a YAML schemas for those.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Rob Herring <robh@kernel.org>
Convert the PSCI binding to use DT schema format.
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Convert Conexant Digicolor SoC bindings to DT schema format using json-schema.
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Rob Herring <robh@kernel.org>
Convert NXP LPC32xx SoC bindings to DT schema format using json-schema.
Cc: Roland Stigge <stigge@antcom.de>
Signed-off-by: Rob Herring <robh@kernel.org>
Convert MOXA ART SoC bindings to DT schema format using json-schema.
Cc: Jonas Jensen <jonas.jensen@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
The board bindings for IPQ4019 are undocumented. Add the missing bindings
to the schema.
Cc: Andy Gross <agross@kernel.org>
Cc: David Brown <david.brown@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
The SoC/board bindings for MSM8974 are undocumented. Add the missing
bindings to the schema.
Cc: Andy Gross <agross@kernel.org>
Cc: David Brown <david.brown@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Convert Alpine SoC bindings to DT schema format using json-schema.
Cc: Tsahee Zidenberg <tsahee@annapurnalabs.com>
Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: devicetree@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Pull in SPDX tag conversion from upstream dtc. This will replace the
conversion done in the kernel tree copy in v5.2-rc2.
This adds the following commits from upstream:
702c1b6c0e73 README.license: Update to reflect SPDX tag usage
4097bbffcf1d dtc: Add GPLv2 SPDX tags to files missing license text
94f87cd5b7c5 libfdt: Add dual GPL/BSD SPDX tags to files missing license text
c4ffc05574b1 tests: Replace license boilerplate with SPDX tags
a5ac29baacd2 pylibfdt: Replace dual GPLv2/BSD license boilerplate with SPDX tags
7fb0f4db2eb7 libfdt: Replace GPL/BSD boilerplate/reference with SPDX tags
acfe84f2c47e dtc: Replace GPLv2 boilerplate/reference with SPDX tags
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rob Herring <robh@kernel.org>
"git diff" says:
\ No newline at end of file
after modifying the files.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
When CONFIG_OF_EARLY_FLATTREE is disabled, there is a compiler
warning,
drivers/of/fdt.c:129:19: warning: ‘of_fdt_match’ defined but not used [-Wunused-function]
static int __init of_fdt_match(const void *blob, unsigned long node,
Since the only caller of of_fdt_match() is of_flat_dt_match(),
let's move the body of of_fdt_match() into of_flat_dt_match()
and eliminate of_fdt_match().
Meanwhile, move of_fdt_is_compatible() under CONFIG_OF_EARLY_FLATTREE,
as all callers are over there.
Fixes: 9b4d2b635b ("of/fdt: Remove dead code and mark functions with __init")
Cc: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Kontron is a leading embedded computer supplier. More information can be
found on: https://www.kontron.de/
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Rob Herring <robh@kernel.org>
STM32 serial can be reset via reset controller.
Add an optional reset property to stm32 usart bindings.
Signed-off-by: Erwan Le Ray <erwan.leray@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
The "enable-method" property for cpu nodes needs to be "psci" for CPU
idle management to be setup correctly.
Add a note to the binding documentation to this effect to make it
obvious.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Make the naming of units consistent with common practices:
- Do not capitalize the first character of units ("Celsius" is
special, as it is not the unit name, but a reference to its
proposer),
- Do not use plural for units,
- Do not abbreviate "ampere",
- Concatenate prefixes and units (no spaces or hyphens),
- Separate units by spaces not hyphens,
- "milli" applies to "degree", not to "Celsius".
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
Currently, the binding examples are just built with dtc. dtc recently
gained the support necessary to output the examples in YAML format
(commit 87963ee20693 ("livetree: add missing type markers in generated
overlay properties"). Now just switch the output format and the examples
will be checked against the schema.
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Generated nodes for overlays begin with '_'. The binding examples are
built as overlays in order to allow unresolved phandles, so we need to
allow the generated node names.
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
This adds the following commits from upstream:
87963ee20693 livetree: add missing type markers in generated overlay properties
825146d13dc0 Fix typos in various documentation and source files
25bb080c18d1 Update the GPL2 text to the latest revision
243176c4ce84 Fix bogus error on rebuild
ce01b21098a4 libfdt: Add FDT_CREATE_FLAG_NO_NAME_DEDUP flag that trades size for speed
fbb62754ce45 libfdt: Introduce fdt_create_with_flags()
228a44cce857 libfdt: Ensure fdt_add_property frees allocated name string on failure
8f695676227b Avoid assertion in check_interrupts_property()
5c3513f68921 Link tools and tests against libfdt shared library
00f9febf9c16 tests: Rename tests.sh to testutils.sh
c5d45188f923 Clean up LDLIBS handling
6ef8fcd05b74 Rebuild libfdt shared object if versioning linker script changes
26ee65a16c38 Use Python3 by default
cca6546244cb libfdt: Make fdt_get_max_phandle() an inline
730875016a6a libfdt: Add phandle generation helper
7dfb61ba96b1 libfdt: Use fdt_find_max_phandle()
2bc5b66d7f6c libfdt: Add new maximum phandle lookup function
7fcf8208b8a9 libfdt: add fdt_append_addrrange()
ae795b2db7a4 checks: Do not omit nodes with labels if symbol generation is requested
eac2ad495b29 Update version.lds again
f67b47135523 Revert "libfdt: Add phandle generation helper"
54ea41c22415 libfdt: Add phandle generation helper
4762ad051ee0 checks: Fix spelling in check_graph_endpoint
d37f6b20107e Bump version to v1.5.0
a4b1a307ff3a pylibfdt:tests: Extend the way how to find a Python module
625dd8aaf20f pylibfdt: Change how passing tests are recognized
364631626bb7 pylibfdt: Test fdt.setprop take bytes on Python 3, add error handling
cb0f454f73cc pylibfdt: check_err accepts only integer as a first argument.
4b68c6b3605a pylibfdt: Proper handling of bytes/unicode strings and octal literals
78e113e81c9d Use PRIxPTR for printing uintptr_t values
ea7a8f6dad67 libfdt: Fix FDT_ERR_NOTFOUND typos in documentation
5aafd7ca43e0 libfdt: Fix fdt_getprop_by_offset() parameter name in documentation
7cbc550f903b checks: Add unit address check if node is enabled
Signed-off-by: Rob Herring <robh@kernel.org>
Add all the missing vendors used in Allwinner DTS.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
In the text file, simtek didn't have any description and apparently this
confused the conversion script. Fix the simtek entry and add a proper
description.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Single quotes need to be escaped in YAML, make sure it's the case.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
The FDT pointer, i.e. initial_boot_params, shouldn't be changed after
init. It's only set by boot code and then the only user of the FDT is
the raw sysfs reading API. Mark this pointer with __ro_after_init so
that the pointer can't be changed after init.
Cc: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Some functions in here are never called, and others are only called
during __init. Remove the dead code and some dead exports for functions
that don't exist (I'm looking at you of_fdt_get_string!). Mark some
functions with __init so we can throw them away after we boot up and
poke at the FDT blob too.
Cc: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Rob Herring <robh@kernel.org>
We shouldn't reference Linux kernel functions or Linux itself in proper
bindings. It's OK to reference functions in the kernel when explaining
examples, but otherwise we shouldn't reference functions to describe
what the binding means.
Cc: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Ignore disabled nodes in the memory-region
nodes list and continue to initialize the rest
of enabled nodes.
Check if the "reserved-memory" node is available
and if it's not available, return 0 to ignore the
"reserved-memory" node and continue parsing with
next node in memory-region nodes list.
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Signed-off-by: Puneet Saxena <puneets@nvidia.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Add Espressif Systems DT vendor prefix. That prefix has been used for quite
some time for WiFi chips, but has never been documented.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>