platform/kernel/linux-rpi.git
4 years agodt-bindings: mfd: Convert stm32 low power timers bindings to json-schema
Benjamin Gaignard [Mon, 18 Nov 2019 09:48:42 +0000 (10:48 +0100)]
dt-bindings: mfd: Convert stm32 low power timers bindings to json-schema

Convert the STM32 low power timers binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: interrupt-controller: Convert stm32-exti to json-schema
Alexandre Torgue [Fri, 15 Nov 2019 18:12:39 +0000 (19:12 +0100)]
dt-bindings: interrupt-controller: Convert stm32-exti to json-schema

Convert the STM32 external interrupt controller (EXTI) binding to DT
schema format using json-schema.

Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: crypto: Convert stm32 HASH bindings to json-schema
Benjamin Gaignard [Fri, 15 Nov 2019 10:24:27 +0000 (11:24 +0100)]
dt-bindings: crypto: Convert stm32 HASH bindings to json-schema

Convert the STM32 HASH binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: rng: Convert stm32 RNG bindings to json-schema
Benjamin Gaignard [Fri, 15 Nov 2019 10:08:54 +0000 (11:08 +0100)]
dt-bindings: rng: Convert stm32 RNG bindings to json-schema

Convert the STM32 RNG binding to DT schema format using json-schema
Remove interrupt from the json-schema because it is not used by the driver.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: pwm: Convert Samsung PWM bindings to json-schema
Krzysztof Kozlowski [Mon, 21 Oct 2019 16:02:07 +0000 (18:02 +0200)]
dt-bindings: pwm: Convert Samsung PWM bindings to json-schema

Convert Samsung PWM (S3C, S5P and Exynos SoCs) bindings to DT schema
format using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: pwm: Convert PWM bindings to json-schema
Krzysztof Kozlowski [Mon, 21 Oct 2019 16:02:06 +0000 (18:02 +0200)]
dt-bindings: pwm: Convert PWM bindings to json-schema

Convert generic PWM controller bindings to DT schema format using
json-schema.  The consumer bindings are provided by dt-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Acked-by: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: serial: Add a new compatible string for SC9863A
Chunyan Zhang [Mon, 11 Nov 2019 09:02:29 +0000 (17:02 +0800)]
dt-bindings: serial: Add a new compatible string for SC9863A

SC9863A use the same serial device which SC9836 uses.

Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: serial: Convert sprd-uart to json-schema
Chunyan Zhang [Mon, 11 Nov 2019 09:02:27 +0000 (17:02 +0800)]
dt-bindings: serial: Convert sprd-uart to json-schema

Convert the sprd-uart binding to DT schema using json-schema.

Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
[robh: dual license GPL/BSD]
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: arm: Add bindings for Unisoc SC9863A
Chunyan Zhang [Mon, 11 Nov 2019 09:02:28 +0000 (17:02 +0800)]
dt-bindings: arm: Add bindings for Unisoc SC9863A

Added bindings for Unisoc SC9863A board and SC9863A SoC.

Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: arm: Convert sprd board/soc bindings to json-schema
Chunyan Zhang [Mon, 11 Nov 2019 09:02:26 +0000 (17:02 +0800)]
dt-bindings: arm: Convert sprd board/soc bindings to json-schema

Convert Unisoc (formerly Spreadtrum) SoC bindings to DT schema format
using json-schema.

Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
[robh: dual license GPL/BSD]
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoof: property: Fix documentation for out values
Matti Vaittinen [Wed, 13 Nov 2019 06:43:38 +0000 (08:43 +0200)]
of: property: Fix documentation for out values

Property fetching functions which return number of successfully fetched
properties should not state that out-values are only modified if 0 is
returned. Fix this. Also, "pointer to return value" is slightly suboptimal
phrase as "return value" commonly refers to value function returns (not via
arguments). Rather use "pointer to found values".

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Reviewed-by: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: Add syscon YAML description
Maxime Ripard [Mon, 11 Nov 2019 13:35:00 +0000 (14:35 +0100)]
dt-bindings: Add syscon YAML description

The syscon binding is a pretty loose one, with everyone having a bunch of
vendor specific compatibles.

In order to start the effort to describe them using YAML, let's create a
binding that tolerates additional, not listed, compatibles.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: crypto: Convert stm32 CRYP bindings to json-schema
Benjamin Gaignard [Fri, 8 Nov 2019 12:52:43 +0000 (13:52 +0100)]
dt-bindings: crypto: Convert stm32 CRYP bindings to json-schema

Convert the STM32 CRYP binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: crypto: Convert stm32 CRC bindings to json-schema
Benjamin Gaignard [Fri, 8 Nov 2019 12:52:42 +0000 (13:52 +0100)]
dt-bindings: crypto: Convert stm32 CRC bindings to json-schema

Convert the STM32 CRC binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: mfd: Convert stm32 timers bindings to json-schema
Benjamin Gaignard [Thu, 14 Nov 2019 10:18:23 +0000 (11:18 +0100)]
dt-bindings: mfd: Convert stm32 timers bindings to json-schema

Convert the STM32 timers binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: Improve validation build error handling
Rob Herring [Wed, 13 Nov 2019 15:46:19 +0000 (09:46 -0600)]
dt-bindings: Improve validation build error handling

Schema errors can cause make to exit before useful information is
printed. This leaves developers wondering what's wrong. It can be
overcome passing '-k' to make, but that's not an obvious solution.
There's 2 scenarios where this happens.

When using DT_SCHEMA_FILES to validate with a single schema, any error
in the schema results in processed-schema.yaml being empty causing a
make error. The result is the specific errors in the schema are never
shown because processed-schema.yaml is the first target built. Simply
making processed-schema.yaml last in extra-y ensures the full schema
validation with detailed error messages happen first.

The 2nd problem is while schema errors are ignored for
processed-schema.yaml, full validation of the schema still runs in
parallel and any schema validation errors will still stop the build when
running validation of dts files. The fix is to not add the schema
examples to extra-y in this case. This means 'dtbs_check' is no longer a
superset of 'dt_binding_check'. Update the documentation to make this
clear.

Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Jeffrey Hugo <jhugo@codeaurora.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: power: Convert Samsung Exynos Power Domain bindings to json-schema
Krzysztof Kozlowski [Wed, 30 Oct 2019 17:32:16 +0000 (18:32 +0100)]
dt-bindings: power: Convert Samsung Exynos Power Domain bindings to json-schema

Convert Samsung Exynos Soc Power Domain bindings to DT schema format using
json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: power: Convert Generic Power Domain bindings to json-schema
Krzysztof Kozlowski [Wed, 30 Oct 2019 17:32:15 +0000 (18:32 +0100)]
dt-bindings: power: Convert Generic Power Domain bindings to json-schema

Convert Generic Power Domain bindings to DT schema format using
json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: gpu: mali-midgard: add samsung exynos 5420 compatible
Marian Mihailescu [Wed, 6 Nov 2019 22:55:26 +0000 (09:25 +1030)]
dt-bindings: gpu: mali-midgard: add samsung exynos 5420 compatible

Add "samsung,exynos5420-mali" binding

Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: gpu: mali-bifrost: Add Realtek RTD1619
Andreas Färber [Mon, 4 Nov 2019 01:39:32 +0000 (02:39 +0100)]
dt-bindings: gpu: mali-bifrost: Add Realtek RTD1619

Define a compatible string for Realtek RTD1619 SoC family.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: gpu: mali-midgard: Add Realtek RTD1295
Andreas Färber [Mon, 4 Nov 2019 01:39:27 +0000 (02:39 +0100)]
dt-bindings: gpu: mali-midgard: Add Realtek RTD1295

Define a compatible string for Realtek RTD1295 SoC family.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: gpu: mali-midgard: Tidy up conversion to YAML
Andreas Färber [Mon, 4 Nov 2019 01:39:26 +0000 (02:39 +0100)]
dt-bindings: gpu: mali-midgard: Tidy up conversion to YAML

Instead of grouping alphabetically by third-party vendor, leading to
one-element enums, start sorting by Mali model number, as done for
Utgard.

This already allows us to de-duplicate two "arm,mali-t760" sections and
will make it easier to add new vendor compatibles.

Fixes: 553cedf60056 ("dt-bindings: Convert Arm Mali Midgard GPU to DT schema")
Fixes: 1be5b54d26ae ("dt-bindings: gpu: mali-midgard: Add samsung exynos5250 compatible")
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
[robh: don't resort everything to avoid conflicts]
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: example-schema: Standard unit should be microvolt not microvolts
Rob Herring [Thu, 7 Nov 2019 02:19:59 +0000 (20:19 -0600)]
dt-bindings: example-schema: Standard unit should be microvolt not microvolts

Even the DT maintainer gets confused. The schema in dt-schema was wrong
too, so this was passing validation until trying to add some common
incorrect patterns to check.

Fixes: 58fbe999ff40 ("dt-bindings: example-schema: Add some additional examples and commentary")
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: usb: dwc3: Move Amlogic G12A DWC3 Glue Bindings to YAML schemas
Neil Armstrong [Wed, 6 Nov 2019 10:44:58 +0000 (11:44 +0100)]
dt-bindings: usb: dwc3: Move Amlogic G12A DWC3 Glue Bindings to YAML schemas

Now that we have the DT validation in place, let's convert the device tree
bindings for the Amlogic G12A DWC3 Glue Bindings over to a YAML schemas,
the AXG and GXL glue bindings will be converted later.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
[robh: drop maxItems on vbus-supply]
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: arm-smmu: update binding for qcom sc7180 SoC
Rajendra Nayak [Wed, 6 Nov 2019 06:50:06 +0000 (12:20 +0530)]
dt-bindings: arm-smmu: update binding for qcom sc7180 SoC

Add the soc specific compatible for sc7180 smmu-500

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: net: davinci-mdio: convert bindings to json-schema
Grygorii Strashko [Fri, 1 Nov 2019 16:45:02 +0000 (18:45 +0200)]
dt-bindings: net: davinci-mdio: convert bindings to json-schema

Now that we have the DT validation in place, let's convert the device tree
bindings for the TI SoC Davinci/OMAP/Keystone2 MDIO Controllerr over to a
YAML schemas.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: Remove FIXME in yaml bindings
Maxime Ripard [Fri, 1 Nov 2019 13:58:08 +0000 (14:58 +0100)]
dt-bindings: Remove FIXME in yaml bindings

Some binding that were introduced early on got a comment to enable
additionalProperties, but we couldn't due to the generic properties being
reported as errors.

The way we're dealing with this now is to use the draft-08's
unevaluatedProperties (even though the tools doesn't do anything with it
yet).

Let's convert those old bindings to it.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: interconnect: Convert qcom, qcs404 to DT schema
Georgi Djakov [Wed, 30 Oct 2019 10:15:55 +0000 (12:15 +0200)]
dt-bindings: interconnect: Convert qcom, qcs404 to DT schema

Convert the qcom,qcs404 interconnect provider binding to DT schema.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: arm: samsung: Drop syscon compatible from CHIPID binding
Sylwester Nawrocki [Mon, 28 Oct 2019 15:20:50 +0000 (16:20 +0100)]
dt-bindings: arm: samsung: Drop syscon compatible from CHIPID binding

The "syscon" compatible string was introduced mainly to allow sharing
of the CHIPID IO region between multiple drivers. However, such sharing
can be also done without an additional compatible so remove "syscon".

Suggested-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: serial: Convert Samsung UART bindings to json-schema
Krzysztof Kozlowski [Sun, 3 Nov 2019 16:01:12 +0000 (17:01 +0100)]
dt-bindings: serial: Convert Samsung UART bindings to json-schema

Convert Samsung S3C/S5P/Exynos Serial/UART bindings to DT schema format
using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: usb: Convert Allwinner A10 mUSB controller to a schema
Maxime Ripard [Fri, 1 Nov 2019 14:32:16 +0000 (15:32 +0100)]
dt-bindings: usb: Convert Allwinner A10 mUSB controller to a schema

The Allwinner SoCs have an mUSB controller that is supported in Linux, with
a matching Device Tree binding.

Now that we have the DT validation in place, let's convert the device tree
bindings for that controller over to a YAML schemas.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodtc: Use pkg-config to locate libyaml
Pavel Modilaynen [Fri, 12 Jul 2019 11:52:19 +0000 (13:52 +0200)]
dtc: Use pkg-config to locate libyaml

Using Makefile's wildcard with absolute path to detect
the presence of libyaml results in false-positive
detection when cross-compiling e.g. in yocto environment.
The latter results in build error:
| scripts/dtc/yamltree.o: In function `yaml_propval_int':
| yamltree.c: undefined reference to `yaml_sequence_start_event_initialize'
| yamltree.c: undefined reference to `yaml_emitter_emit'
| yamltree.c: undefined reference to `yaml_scalar_event_initialize'
...
Use pkg-config to locate libyaml to address this scenario.

Signed-off-by: Pavel Modilaynen <pavel.modilaynen@axis.com>
[robh: silence stderr]
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoscripts/dtc: dtx_diff - add color output support
Geert Uytterhoeven [Fri, 25 Oct 2019 09:22:15 +0000 (11:22 +0200)]
scripts/dtc: dtx_diff - add color output support

Add new -c/--color options, to enhance the diff output with color, and
improve the user's experience.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Tested-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: can: Convert Allwinner A10 CAN controller to a schema
Maxime Ripard [Tue, 22 Oct 2019 15:47:45 +0000 (17:47 +0200)]
dt-bindings: can: Convert Allwinner A10 CAN controller to a schema

The older Allwinner SoCs have a CAN controller that is supported in Linux,
with a matching Device Tree binding.

Now that we have the DT validation in place, let's convert the device tree
bindings for that controller over to a YAML schemas.

Signed-off-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: display: st,stm32-dsi: Fix white spaces
Krzysztof Kozlowski [Mon, 21 Oct 2019 15:18:47 +0000 (17:18 +0200)]
dt-bindings: display: st,stm32-dsi: Fix white spaces

Remove unneeded indentation in blank line and space at end of line.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: soc: amlogic: canvas: convert to yaml
Neil Armstrong [Mon, 21 Oct 2019 13:39:50 +0000 (15:39 +0200)]
dt-bindings: soc: amlogic: canvas: convert to yaml

Now that we have the DT validation in place, let's convert the device tree
bindings for the Amlogic Canvas over to a YAML schemas.

Cc: Maxime Jourdan <mjourdan@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
[robh: update title]
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agomedia: dt-bindings: media: add new rc map names
Neil Armstrong [Mon, 21 Oct 2019 12:12:49 +0000 (14:12 +0200)]
media: dt-bindings: media: add new rc map names

Add new entries for linux,rc-map-name:
- rc-khadas
- rc-odroid
- rc-tanix-tx3mini
- rc-wetek-hub
- rc-wetek-play2
- rc-x96max

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: media: meson-ao-cec: convert to yaml
Neil Armstrong [Mon, 21 Oct 2019 12:11:31 +0000 (14:11 +0200)]
dt-bindings: media: meson-ao-cec: convert to yaml

Now that we have the DT validation in place, let's convert the device tree
bindings for the Amlogic AO-CEC controller over to a YAML schemas.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoMAINTAINERS: update the list of maintained files for max77650
Bartosz Golaszewski [Mon, 21 Oct 2019 12:44:28 +0000 (14:44 +0200)]
MAINTAINERS: update the list of maintained files for max77650

The DT bindings for MAX77650 MFD have now been converted to YAML.
Update the MAINTAINERS entry for this set of drivers.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: mfd: max77650: convert the binding document to yaml
Bartosz Golaszewski [Mon, 21 Oct 2019 12:44:27 +0000 (14:44 +0200)]
dt-bindings: mfd: max77650: convert the binding document to yaml

Convert the binding document for MAX77650 core MFD module to YAML.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: leds: max77650: convert the binding document to yaml
Bartosz Golaszewski [Mon, 21 Oct 2019 12:44:26 +0000 (14:44 +0200)]
dt-bindings: leds: max77650: convert the binding document to yaml

Convert the binding document for MAX77650 LED module to YAML.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: power: max77650: convert the binding document to yaml
Bartosz Golaszewski [Mon, 21 Oct 2019 12:44:25 +0000 (14:44 +0200)]
dt-bindings: power: max77650: convert the binding document to yaml

Convert the binding document for MAX77650 charger module to YAML.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: regulator: max77650: convert the binding document to yaml
Bartosz Golaszewski [Mon, 21 Oct 2019 12:44:24 +0000 (14:44 +0200)]
dt-bindings: regulator: max77650: convert the binding document to yaml

Convert the binding document for MAX77650 regulator module to YAML.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: input: max77650: convert the binding document to yaml
Bartosz Golaszewski [Mon, 21 Oct 2019 12:44:23 +0000 (14:44 +0200)]
dt-bindings: input: max77650: convert the binding document to yaml

Convert the binding document for MAX77650 onkey module to YAML.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: ata: sata_rcar: Add r8a774b1 support
Fabrizio Castro [Wed, 23 Oct 2019 09:15:06 +0000 (10:15 +0100)]
dt-bindings: ata: sata_rcar: Add r8a774b1 support

Document SATA support for the RZ/G2N, no driver change required.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: sram: Merge Socionext SRAM bindings into generic
Krzysztof Kozlowski [Mon, 21 Oct 2019 16:13:51 +0000 (18:13 +0200)]
dt-bindings: sram: Merge Socionext SRAM bindings into generic

The Socionext SRAM bindings list only compatible so integrate them into
generic SRAM bindings schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: sram: Merge Allwinner SRAM bindings into generic
Krzysztof Kozlowski [Mon, 21 Oct 2019 16:13:50 +0000 (18:13 +0200)]
dt-bindings: sram: Merge Allwinner SRAM bindings into generic

The Allwinner SRAM bindings list only compatible so integrate them into
generic SRAM bindings schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: sram: Merge Rockchip SRAM bindings into generic
Krzysztof Kozlowski [Mon, 21 Oct 2019 16:13:49 +0000 (18:13 +0200)]
dt-bindings: sram: Merge Rockchip SRAM bindings into generic

The Rockchip SRAM bindings list only compatible so integrate them into
generic SRAM bindings schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: sram: Merge Renesas SRAM bindings into generic
Krzysztof Kozlowski [Mon, 21 Oct 2019 16:13:48 +0000 (18:13 +0200)]
dt-bindings: sram: Merge Renesas SRAM bindings into generic

The Renesas SRAM bindings list only compatible so integrate them into
generic SRAM bindings schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: sram: Merge Amlogic SRAM bindings into generic
Krzysztof Kozlowski [Mon, 21 Oct 2019 16:13:47 +0000 (18:13 +0200)]
dt-bindings: sram: Merge Amlogic SRAM bindings into generic

The Amlogic SRAM bindings list only compatible so integrate them into
generic SRAM bindings schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: sram: Merge Samsung SRAM bindings into generic
Krzysztof Kozlowski [Mon, 21 Oct 2019 16:13:46 +0000 (18:13 +0200)]
dt-bindings: sram: Merge Samsung SRAM bindings into generic

The Samsung SRAM bindings list only compatible so integrate them into
generic SRAM bindings schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: sram: Convert SRAM bindings to json-schema
Krzysztof Kozlowski [Mon, 21 Oct 2019 16:13:45 +0000 (18:13 +0200)]
dt-bindings: sram: Convert SRAM bindings to json-schema

Convert generic mmio-sram bindings to DT schema format using
json-schema.  Require the address/size cells to be 1, not equal to root
node.  This also fixes the check for clocks property to be in main root
node instead of children.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoMerge branch 'dt/linus' into dt/next
Rob Herring [Fri, 25 Oct 2019 14:14:56 +0000 (09:14 -0500)]
Merge branch 'dt/linus' into dt/next

4 years agodt-bindings: example-schema: Add some additional examples and commentary
Rob Herring [Thu, 17 Oct 2019 16:25:38 +0000 (11:25 -0500)]
dt-bindings: example-schema: Add some additional examples and commentary

Add examples for properties with standard units, child nodes,
dependencies, and if/then schema. Also, make some minor updates based on
common questions and review issues.

Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt: submitting-patches: Document requirements for DT schema
Rob Herring [Tue, 15 Oct 2019 15:47:49 +0000 (10:47 -0500)]
dt: submitting-patches: Document requirements for DT schema

Update the DT submitting-patches.txt with additional requirements for DT
binding schemas. New binding documents should generally use the schema
format and have an explicit license.

Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt: writing-schema: Add a note about tools PATH setup
Rob Herring [Tue, 15 Oct 2019 15:26:00 +0000 (10:26 -0500)]
dt: writing-schema: Add a note about tools PATH setup

Users without an existing python install may not have their PATH setup
for pip installed python programs already. Add a note about having the
DT validation programs in the PATH.

Reported-by: Robert Jones <rjones@gateworks.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: arm: samsung: Update the CHIPID binding for ASV
Sylwester Nawrocki [Thu, 17 Oct 2019 09:29:39 +0000 (11:29 +0200)]
dt-bindings: arm: samsung: Update the CHIPID binding for ASV

This patch adds documentation of new optional "samsung,asv-bin"
property in the chipid device node and documents requirement of
"syscon" compatible string.  These additions are needed to support
Exynos ASV (Adaptive Supply Voltage) feature.

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
[robh: drop 'select' which is no longer needed. Fix up example whitespace]
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agolibfdt: reduce the number of headers included from libfdt_env.h
Masahiro Yamada [Mon, 17 Jun 2019 16:21:23 +0000 (01:21 +0900)]
libfdt: reduce the number of headers included from libfdt_env.h

Currently, libfdt_env.h includes <linux/kernel.h> just for INT_MAX.

<linux/kernel.h> pulls in a lots of broat.

Thanks to commit 54d50897d544 ("linux/kernel.h: split *_MAX and *_MIN
macros into <linux/limits.h>"), <linux/kernel.h> can be replaced with
<linux/limits.h>.

This saves including dozens of headers.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoof: reserved_mem: add missing of_node_put() for proper ref-counting
Chris Goldsworthy [Sun, 20 Oct 2019 01:57:24 +0000 (18:57 -0700)]
of: reserved_mem: add missing of_node_put() for proper ref-counting

Commit d698a388146c ("of: reserved-memory: ignore disabled memory-region
nodes") added an early return in of_reserved_mem_device_init_by_idx(), but
didn't call of_node_put() on a device_node whose ref-count was incremented
in the call to of_parse_phandle() preceding the early exit.

Fixes: d698a388146c ("of: reserved-memory: ignore disabled memory-region nodes")
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
Cc: stable@vger.kernel.org
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoof: unittest: fix memory leak in unittest_data_add
Navid Emamdoost [Fri, 4 Oct 2019 18:58:43 +0000 (13:58 -0500)]
of: unittest: fix memory leak in unittest_data_add

In unittest_data_add, a copy buffer is created via kmemdup. This buffer
is leaked if of_fdt_unflatten_tree fails. The release for the
unittest_data buffer is added.

Fixes: b951f9dc7f25 ("Enabling OF selftest to run without machine's devicetree")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Reviewed-by: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: riscv: Fix CPU schema errors
Rob Herring [Tue, 24 Sep 2019 19:37:56 +0000 (14:37 -0500)]
dt-bindings: riscv: Fix CPU schema errors

Fix the errors in the RiscV CPU DT schema:

Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: 'timebase-frequency' is a required property
Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@1: 'timebase-frequency' is a required property
Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: compatible:0: 'riscv' is not one of ['sifive,rocket0', 'sifive,e5', 'sifive,e51', 'sifive,u54-mc', 'sifive,u54', 'sifive,u5']
Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: compatible: ['riscv'] is too short
Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: 'timebase-frequency' is a required property

The DT spec allows for 'timebase-frequency' to be in 'cpu' or 'cpus' node
and RiscV requires it in /cpus node, so make it disallowed in cpu
nodes.

Fixes: 4fd669a8c487 ("dt-bindings: riscv: convert cpu binding to json-schema")
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: linux-riscv@lists.infradead.org
Acked-by: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: gpu: samsung-rotator: Fix indentation
Krzysztof Kozlowski [Fri, 4 Oct 2019 15:14:13 +0000 (17:14 +0200)]
dt-bindings: gpu: samsung-rotator: Fix indentation

Array elements under 'items' should be indented.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: PCI: rcar: Add device tree support for r8a774b1
Fabrizio Castro [Fri, 4 Oct 2019 08:35:29 +0000 (09:35 +0100)]
dt-bindings: PCI: rcar: Add device tree support for r8a774b1

Add PCIe support for the RZ/G2N (a.k.a. R8A774B1).

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Andrew Murray <andrew.murray@arm.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: watchdog: renesas-wdt: Document r8a774b1 support
Fabrizio Castro [Fri, 4 Oct 2019 08:35:27 +0000 (09:35 +0100)]
dt-bindings: watchdog: renesas-wdt: Document r8a774b1 support

RZ/G2N (a.k.a. R8A774B1) watchdog implementation is compatible
with R-Car Gen3, therefore add the relevant documentation.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: iommu: Convert Arm SMMUv3 to DT schema
Rob Herring [Mon, 2 Sep 2019 14:30:59 +0000 (15:30 +0100)]
dt-bindings: iommu: Convert Arm SMMUv3 to DT schema

Convert the Arm SMMv3 binding to the DT schema format.

Cc: Joerg Roedel <joro@8bytes.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: iommu@lists.linux-foundation.org
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: iommu: Convert Arm SMMU to DT schema
Rob Herring [Fri, 20 Sep 2019 13:48:28 +0000 (08:48 -0500)]
dt-bindings: iommu: Convert Arm SMMU to DT schema

Convert the Arm SMMU binding to DT schema.

The existing binding doc doesn't cover the number of variations of
compatible properties found in .dts files. "qcom,msm8998-smmu-v2" was
also missing, so add it.

SoCFPGA Stratix10 has a single clock defined which doesn't match the
binding. This issue remains.

Cc: Joerg Roedel <joro@8bytes.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Robin Murphy <Robin.Murphy@arm.com>
Cc: iommu@lists.linux-foundation.org
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: display: Convert sharp, ld-d5116z01b panel to DT schema
Jeffrey Hugo [Thu, 10 Oct 2019 21:06:54 +0000 (14:06 -0700)]
dt-bindings: display: Convert sharp, ld-d5116z01b panel to DT schema

Convert the sharp,ld-d5116z01b panel binding to DT schema.

Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: usb: generic-ehci: Add "companion" entry
Alexandre Torgue [Mon, 7 Oct 2019 13:44:10 +0000 (15:44 +0200)]
dt-bindings: usb: generic-ehci: Add "companion" entry

"companion" entry is present in "generic.txt" usb binding file. This commit
adds it also in generic-ehci yaml binding.

Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
[robh: restrict type to phandle instead of phandle-array]
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: pinctrl: stm32: Fix 'st, syscfg' description field
Alexandre Torgue [Mon, 7 Oct 2019 13:44:09 +0000 (15:44 +0200)]
dt-bindings: pinctrl: stm32: Fix 'st, syscfg' description field

As there is only one item "st,syscfg" this commit moves phandle description
fields under "description" tag. It'll fix a validation issue seen  during
stm32 DT check.

Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: arm: stm32: Add missing STM32 boards
Alexandre Torgue [Mon, 7 Oct 2019 13:44:08 +0000 (15:44 +0200)]
dt-bindings: arm: stm32: Add missing STM32 boards

This commit documents missing STM32 boards:

-STM32MCU: F429 disco/eval, F469-disco, F746 disco/eval, F769 disco,
H743 disco/eval.

-STM32MPU: MP157 dk1/dk2/ed1/ev1.

Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: irqchip: renesas-irqc: Document r8a774b1 bindings
Biju Das [Fri, 4 Oct 2019 07:16:03 +0000 (08:16 +0100)]
dt-bindings: irqchip: renesas-irqc: Document r8a774b1 bindings

Document SoC specific bindings for RZ/G2N (r8a774b1) SoC.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: pwm: rcar: Add r8a774b1 support
Biju Das [Tue, 1 Oct 2019 12:02:40 +0000 (13:02 +0100)]
dt-bindings: pwm: rcar: Add r8a774b1 support

Document RZ/G2N (R8A774B1) SoC bindings.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: iio: adc: exynos: Use defines instead of clock numbers
Krzysztof Kozlowski [Wed, 2 Oct 2019 16:07:44 +0000 (18:07 +0200)]
dt-bindings: iio: adc: exynos: Use defines instead of clock numbers

Make the examples in Exynos ADC bindings more readable and bring them
closer to real DTS by using defines for clocks.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: rtc: s3c: Include generic dt-schema bindings
Krzysztof Kozlowski [Wed, 2 Oct 2019 16:07:43 +0000 (18:07 +0200)]
dt-bindings: rtc: s3c: Include generic dt-schema bindings

Include the generic rtc.yaml bindings in Samsung S3C RTC bindings.  This
brings the requirement of proper node names and adds parsing of
additional properties.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: rtc: s3c: Use defines instead of clock numbers
Krzysztof Kozlowski [Wed, 2 Oct 2019 16:07:42 +0000 (18:07 +0200)]
dt-bindings: rtc: s3c: Use defines instead of clock numbers

Make the examples in S3C RTC bindings more readable and bring them
closer to real DTS by using defines for clocks.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: samsung: Indent examples with four spaces
Krzysztof Kozlowski [Wed, 2 Oct 2019 16:07:41 +0000 (18:07 +0200)]
dt-bindings: samsung: Indent examples with four spaces

Change the indentation of examples used in json-schema bindings from two
to four spaces as this makes the code easier to read and seems to be
preferred in other files.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # for iio
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Sebastian Reichel <sre@kernel.org> # for power/reset
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: serio: Convert Allwinner PS2 controller to a schema
Maxime Ripard [Wed, 2 Oct 2019 12:06:45 +0000 (14:06 +0200)]
dt-bindings: serio: Convert Allwinner PS2 controller to a schema

The older Allwinner SoCs have a PS2 controller that is supported in Linux,
with a matching Device Tree binding.

Now that we have the DT validation in place, let's convert the device tree
bindings for that controller over to a YAML schemas.

Signed-off-by: Maxime Ripard <mripard@kernel.org>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: display: Convert stm32 display bindings to json-schema
Benjamin Gaignard [Tue, 15 Oct 2019 12:31:51 +0000 (14:31 +0200)]
dt-bindings: display: Convert stm32 display bindings to json-schema

Convert the STM32 display binding to DT schema format using json-schema.
Split the original bindings in two yaml files:
- one for display controller (ltdc)
- one for DSI controller

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
[robh: drop maxItems from phy-dsi-supply]
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: timer: Convert stm32 timer bindings to json-schema
Benjamin Gaignard [Mon, 14 Oct 2019 09:23:16 +0000 (11:23 +0200)]
dt-bindings: timer: Convert stm32 timer bindings to json-schema

Convert the STM32 timer binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: thermal: Convert stm32 thermal bindings to json-schema
Benjamin Gaignard [Mon, 14 Oct 2019 09:22:00 +0000 (11:22 +0200)]
dt-bindings: thermal: Convert stm32 thermal bindings to json-schema

Convert the STM32 thermal binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: media: Convert stm32 dcmi bindings to json-schema
Benjamin Gaignard [Mon, 14 Oct 2019 09:20:21 +0000 (11:20 +0200)]
dt-bindings: media: Convert stm32 dcmi bindings to json-schema

Convert the STM32 dcmi binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: media: Convert stm32 cec bindings to json-schema
Benjamin Gaignard [Mon, 14 Oct 2019 09:20:20 +0000 (11:20 +0200)]
dt-bindings: media: Convert stm32 cec bindings to json-schema

Convert the STM32 cec binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: hwlock: Convert stm32 hwspinlock bindings to json-schema
Benjamin Gaignard [Mon, 14 Oct 2019 09:17:56 +0000 (11:17 +0200)]
dt-bindings: hwlock: Convert stm32 hwspinlock bindings to json-schema

Convert the STM32 hwspinlock binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: Clean-up regulator '-supply' schemas
Rob Herring [Fri, 11 Oct 2019 18:44:13 +0000 (13:44 -0500)]
dt-bindings: Clean-up regulator '-supply' schemas

Regulator '*-supply' properties are always a single phandle, so
'maxItems: 1' or a $ref is not necessary. All that's needed is either
'true' or an optional 'description'. Following this clean-up, the
meta-schema will enforce this pattern.

There's one case in tree with 'innolux,n156bge-l21' having 2 phandles.
This appears to be a mistake or abuse of simple-panel as it's 2 different
voltage rails connected to 'power-supply'.

Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: linux-iio@vger.kernel.org
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # for iio
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agocheckpatch: Warn if DT bindings are not in schema format
Rob Herring [Thu, 12 Sep 2019 14:18:20 +0000 (15:18 +0100)]
checkpatch: Warn if DT bindings are not in schema format

DT bindings are moving to using a json-schema based schema format
instead of freeform text. Add a checkpatch.pl check to encourage using
the schema for new bindings. It's not yet a requirement, but is
progressively being required by some maintainers.

Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: riscv: Fix CPU schema errors
Rob Herring [Tue, 24 Sep 2019 19:37:56 +0000 (14:37 -0500)]
dt-bindings: riscv: Fix CPU schema errors

Fix the errors in the RiscV CPU DT schema:

Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: 'timebase-frequency' is a required property
Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@1: 'timebase-frequency' is a required property
Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: compatible:0: 'riscv' is not one of ['sifive,rocket0', 'sifive,e5', 'sifive,e51', 'sifive,u54-mc', 'sifive,u54', 'sifive,u5']
Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: compatible: ['riscv'] is too short
Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: 'timebase-frequency' is a required property

The DT spec allows for 'timebase-frequency' to be in 'cpu' or 'cpus' node
and RiscV requires it in /cpus node, so make it disallowed in cpu
nodes.

Fixes: 4fd669a8c487 ("dt-bindings: riscv: convert cpu binding to json-schema")
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: linux-riscv@lists.infradead.org
Acked-by: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: display: clps711x-fb: fix native-mode setting
Martin Kaiser [Sat, 5 Oct 2019 13:09:21 +0000 (15:09 +0200)]
dt-bindings: display: clps711x-fb: fix native-mode setting

Move the native-mode setting inside the display-timing node. Outside of
display-timing, it is ignored.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: display: imx: fix native-mode setting
Martin Kaiser [Sat, 5 Oct 2019 13:09:20 +0000 (15:09 +0200)]
dt-bindings: display: imx: fix native-mode setting

Move the native-mode setting inside the display-timing node. Outside of
display-timing, it is ignored.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoASoC: samsung: i2s: Document clocks macros
Maciej Falkowski [Thu, 26 Sep 2019 11:02:19 +0000 (13:02 +0200)]
ASoC: samsung: i2s: Document clocks macros

Document clocks macros with their description
from 'Documentation/devicetree/bindings/sound/samsung-i2s.txt'

Signed-off-by: Maciej Falkowski <m.falkowski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: rtc: rtc-sh: convert bindings to json-schema
Simon Horman [Mon, 23 Sep 2019 12:14:04 +0000 (14:14 +0200)]
dt-bindings: rtc: rtc-sh: convert bindings to json-schema

Convert Real Time Clock for Renesas SH and ARM SoCs bindings documentation
to json-schema.  Also name bindings documentation file according to the
compat string being documented.

Also correct syntax error in interrupts field in example.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: crypto: samsung: Convert SSS and SlimSSS bindings to json-schema
Krzysztof Kozlowski [Fri, 20 Sep 2019 16:36:35 +0000 (18:36 +0200)]
dt-bindings: crypto: samsung: Convert SSS and SlimSSS bindings to json-schema

Convert Samsung Exynos Security SubSystem (SSS) and SlimSSS hardware
crypto accelerator bindings to DT schema format using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: memory-controllers: Convert Samsung Exynos SROM bindings to json-schema
Krzysztof Kozlowski [Wed, 18 Sep 2019 17:31:37 +0000 (19:31 +0200)]
dt-bindings: memory-controllers: Convert Samsung Exynos SROM bindings to json-schema

Convert Samsung Exynos SROM controller bindings to DT schema format
using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: rng: exynos4-rng: Convert Exynos PRNG bindings to json-schema
Krzysztof Kozlowski [Wed, 2 Oct 2019 16:13:40 +0000 (18:13 +0200)]
dt-bindings: rng: exynos4-rng: Convert Exynos PRNG bindings to json-schema

Convert Samsung Exynos Pseudo Random Number Generator bindings to DT
schema format using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: at24: add new compatible
Bartosz Golaszewski [Wed, 2 Oct 2019 07:20:47 +0000 (09:20 +0200)]
dt-bindings: at24: add new compatible

arch/arm/boot/dts/at91-dvk_som60.dt.yaml uses the compatible string
'giantec,gt24c32a' for an at24 EEPROM with a fallback to 'atmel,24c32'.

Add this model as a special case to the binding document.

Reported-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: at24: convert the binding document to yaml
Bartosz Golaszewski [Wed, 2 Oct 2019 07:20:46 +0000 (09:20 +0200)]
dt-bindings: at24: convert the binding document to yaml

Convert the binding document for at24 EEPROMs from txt to yaml. The
compatible property uses a regex pattern to address all the possible
combinations of "vendor,model" strings.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
[robh: rework compatible schema, fix missing allOf for $ref, fix errors in example]
Signed-off-by: Rob Herring <robh@kernel.org>
[Bartosz: added comments explaining the compatible property]
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoof: Make of_dma_get_range() work on bus nodes
Robin Murphy [Wed, 3 Jul 2019 17:42:20 +0000 (18:42 +0100)]
of: Make of_dma_get_range() work on bus nodes

Since the "dma-ranges" property is only valid for a node representing a
bus, of_dma_get_range() currently assumes the node passed in is a leaf
representing a device, and starts the walk from its parent. In cases
like PCI host controllers on typical FDT systems, however, where the PCI
endpoints are probed dynamically the initial leaf node represents the
'bus' itself, and this logic means we fail to consider any "dma-ranges"
describing the host bridge itself. Rework the logic such that
of_dma_get_range() also works correctly starting from a bus node
containing "dma-ranges".

While this does mean "dma-ranges" could incorrectly be in a device leaf
node, there isn't really any way in this function to ensure that a leaf
node is or isn't a bus node.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
[robh: Allow for the bus child node to still be passed in]
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
4 years agoof/address: Fix of_pci_range_parser_one translation of DMA addresses
Rob Herring [Thu, 5 Sep 2019 09:47:26 +0000 (10:47 +0100)]
of/address: Fix of_pci_range_parser_one translation of DMA addresses

of_pci_range_parser_one() has a bug when parsing dma-ranges. When it
translates the parent address (aka cpu address in the code), 'ranges' is
always being used. This happens to work because most users are just 1:1
translation.

Cc: Robin Murphy <robin.murphy@arm.com>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoof/address: Translate 'dma-ranges' for parent nodes missing 'dma-ranges'
Rob Herring [Wed, 4 Sep 2019 10:43:30 +0000 (11:43 +0100)]
of/address: Translate 'dma-ranges' for parent nodes missing 'dma-ranges'

'dma-ranges' frequently exists without parent nodes having 'dma-ranges'.
While this is an error for 'ranges', this is fine because DMA capable
devices always have a translatable DMA address. Also, with no
'dma-ranges' at all, the assumption is that DMA addresses are 1:1 with
no restrictions unless perhaps the device itself has implicit
restrictions.

Cc: Robin Murphy <robin.murphy@arm.com>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoof/unittest: Add dma-ranges address translation tests
Rob Herring [Fri, 20 Sep 2019 18:28:53 +0000 (13:28 -0500)]
of/unittest: Add dma-ranges address translation tests

The functions for parsing 'dma-ranges' ranges are buggy and fail to
handle several conditions. Add new tests for of_dma_get_range() and
for_each_of_pci_range().

With this test, we get 5 new failures which are fixed in subsequent
commits:

OF: translation of DMA address(0) to CPU address failed node(/testcase-data/address-tests/device@70000000)
FAIL of_unittest_dma_ranges_one():798 of_dma_get_range failed on node /testcase-data/address-tests/device@70000000 rc=-22
OF: translation of DMA address(10000000) to CPU address failed node(/testcase-data/address-tests/bus@80000000/device@1000)
FAIL of_unittest_dma_ranges_one():798 of_dma_get_range failed on node /testcase-data/address-tests/bus@80000000/device@1000 rc=-22
OF: translation of DMA address(0) to CPU address failed node(/testcase-data/address-tests/pci@90000000)
FAIL of_unittest_dma_ranges_one():798 of_dma_get_range failed on node /testcase-data/address-tests/pci@90000000 rc=-22
FAIL of_unittest_pci_dma_ranges():851 for_each_of_pci_range wrong CPU addr (d0000000) on node /testcase-data/address-tests/pci@90000000
FAIL of_unittest_pci_dma_ranges():861 for_each_of_pci_range wrong CPU addr (ffffffffffffffff) on node /testcase-data/address-tests/pci@90000000

Cc: Robin Murphy <robin.murphy@arm.com>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoof: Factor out #{addr,size}-cells parsing
Robin Murphy [Tue, 2 Jul 2019 17:42:39 +0000 (18:42 +0100)]
of: Factor out #{addr,size}-cells parsing

In some cases such as PCI host controllers, we may have a "parent bus"
which is an OF leaf node, but still need to correctly parse ranges from
the point of view of that bus. For that, factor out variants of the
"#addr-cells" and "#size-cells" parsers which do not assume they have a
device node and thus immediately traverse upwards before reading the
relevant property.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
[robh: don't make of_bus_n_{addr,size}_cells() public]
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>