platform/kernel/linux-starfive.git
4 years agoASoC: lochnagar: Move binding over to dtschema
Charles Keepax [Tue, 12 May 2020 15:23:55 +0000 (16:23 +0100)]
ASoC: lochnagar: Move binding over to dtschema

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agohwmon: lochnagar: Move binding over to dtschema
Charles Keepax [Tue, 12 May 2020 15:23:54 +0000 (16:23 +0100)]
hwmon: lochnagar: Move binding over to dtschema

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: watchdog: renesas,wdt: Document r8a7742 support
Lad Prabhakar [Wed, 27 May 2020 16:29:27 +0000 (17:29 +0100)]
dt-bindings: watchdog: renesas,wdt: Document r8a7742 support

RZ/G1H (R8A7742) watchdog implementation is compatible with R-Car Gen2,
therefore add relevant documentation.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: vendor-prefixes: Add Shanghai Awinic Technology Co., Ltd.
Nikita Travkin [Mon, 11 May 2020 11:11:26 +0000 (16:11 +0500)]
dt-bindings: vendor-prefixes: Add Shanghai Awinic Technology Co., Ltd.

Add the "awinic" vendor prefix for Shanghai Awinic Technology Co., Ltd.
Website: https://www.awinic.com/

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Nikita Travkin <nikitos.tr@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: clock: Convert i.MX6UL clock to json-schema
Anson Huang [Wed, 13 May 2020 00:11:24 +0000 (08:11 +0800)]
dt-bindings: clock: Convert i.MX6UL clock to json-schema

Convert the i.MX6UL clock binding to DT schema format using json-schema.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: clock: Convert i.MX6SLL clock to json-schema
Anson Huang [Wed, 13 May 2020 00:11:23 +0000 (08:11 +0800)]
dt-bindings: clock: Convert i.MX6SLL clock to json-schema

Convert the i.MX6SLL clock binding to DT schema format using json-schema.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: clock: Convert i.MX6SL clock to json-schema
Anson Huang [Wed, 13 May 2020 00:11:22 +0000 (08:11 +0800)]
dt-bindings: clock: Convert i.MX6SL clock to json-schema

Convert the i.MX6SL clock binding to DT schema format using json-schema.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: clock: Convert i.MX6SX clock to json-schema
Anson Huang [Wed, 13 May 2020 00:11:21 +0000 (08:11 +0800)]
dt-bindings: clock: Convert i.MX6SX clock to json-schema

Convert the i.MX6SX clock binding to DT schema format using json-schema.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: clock: Convert i.MX6Q clock to json-schema
Anson Huang [Wed, 13 May 2020 00:11:20 +0000 (08:11 +0800)]
dt-bindings: clock: Convert i.MX6Q clock to json-schema

Convert the i.MX6Q clock binding to DT schema format using json-schema.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: usb: qcom,dwc3: Add compatible for SC7180
Sandeep Maheswaram [Thu, 21 May 2020 15:38:19 +0000 (21:08 +0530)]
dt-bindings: usb: qcom,dwc3: Add compatible for SC7180

Add compatible for SC7180 in usb dwc3 bindings.

Signed-off-by: Sandeep Maheswaram <sanm@codeaurora.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: usb: qcom,dwc3: Convert USB DWC3 bindings
Sandeep Maheswaram [Thu, 21 May 2020 15:38:18 +0000 (21:08 +0530)]
dt-bindings: usb: qcom,dwc3: Convert USB DWC3 bindings

Convert USB DWC3 bindings to DT schema format using json-schema.

Signed-off-by: Sandeep Maheswaram <sanm@codeaurora.org>
[robh: fixup example warnings]
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: nvmem: stm32: new property for data access
Etienne Carriere [Tue, 12 May 2020 13:13:34 +0000 (15:13 +0200)]
dt-bindings: nvmem: stm32: new property for data access

Introduce boolean property st,non-secure-otp for OTP data located
in a factory programmed area that only secure firmware can access
by default and that shall be reachable from the non-secure world.

This change also allows additional properties for NVMEM nodes that
were forbidden prior this change.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: eeprom: at24: Fix list of page sizes for writing
Geert Uytterhoeven [Tue, 12 May 2020 12:24:47 +0000 (14:24 +0200)]
dt-bindings: eeprom: at24: Fix list of page sizes for writing

"258" is an odd power-of-two ;-)
Obviously this is a typo, and the intended value is "256".

Fixes: 7f3bf4203774013b ("dt-bindings: at24: convert the binding document to yaml")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodrivers/of: keep description of function consistent with function name
chenqiwu [Mon, 11 May 2020 15:04:57 +0000 (23:04 +0800)]
drivers/of: keep description of function consistent with function name

Currently, there are some descriptions of function not
consistent with function name, fixing them will make
the code more readable.

Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodocs/devicetree/i2c: brcm,bcm2835: fix node id in example
Kangmin Park [Sun, 10 May 2020 19:58:21 +0000 (04:58 +0900)]
docs/devicetree/i2c: brcm,bcm2835: fix node id in example

This is a trivial patch to fix node id to match the reg in example.

Signed-off-by: Kangmin Park <l4stpr0gr4m@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: serial: qca,ar9330-uart: Convert to json-schema
Oleksij Rempel [Sun, 10 May 2020 05:15:22 +0000 (07:15 +0200)]
dt-bindings: serial: qca,ar9330-uart: Convert to json-schema

Convert the Qualcomm Atheros AR9330 High-Speed UART
Device Tree binding documentation to json-schema.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: ehci/ohci: Allow iommus property
Andre Przywara [Wed, 13 May 2020 10:30:16 +0000 (11:30 +0100)]
dt-bindings: ehci/ohci: Allow iommus property

A OHCI/EHCI controller could be behind an IOMMU, in which case an iommus
property assigns the stream ID for this device.

Allow that property in the DT bindings to fix a complaint about the Arm Juno
board's DTS file.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: mali-midgard: Allow dma-coherent
Andre Przywara [Wed, 13 May 2020 10:30:15 +0000 (11:30 +0100)]
dt-bindings: mali-midgard: Allow dma-coherent

Add the boolean dma-coherent property to the list of allowed properties,
since some boards (Arm Juno) integrate the GPU this way.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: arm: gic: Allow combining arm,gic-400 compatible strings
Andre Przywara [Wed, 13 May 2020 10:29:57 +0000 (11:29 +0100)]
dt-bindings: arm: gic: Allow combining arm,gic-400 compatible strings

The arm,gic-400 compatible is probably the best matching string for the
GIC in most modern SoCs, but was only introduced later into the kernel.
For historic reasons and to keep compatibility, some SoC DTs were thus
using a combination of this name and one of the older strings, which
currently the binding denies.

Add a stanza to the DT binding to allow "arm,gic-400", followed by
either "arm,cortex-a15-gic" or "arm,cortex-a7-gic". This fixes binding
compliance for quite some SoC .dtsi files in the kernel tree.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: irqchip: renesas-intc-irqpin: Convert to json-schema
Yoshihiro Kaneko [Thu, 7 May 2020 07:55:03 +0000 (09:55 +0200)]
dt-bindings: irqchip: renesas-intc-irqpin: Convert to json-schema

Convert the Renesas Interrupt Controller (INTC) for external pins Device
Tree binding documentation to json-schema.

Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Co-developed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[robh: drop allOf]
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: Fix incorrect 'reg' property sizes
Rob Herring [Tue, 12 May 2020 20:45:43 +0000 (15:45 -0500)]
dt-bindings: Fix incorrect 'reg' property sizes

The examples template is a 'simple-bus' with a size of 1 cell for
had between 2 and 4 cells which really only errors on I2C or SPI type
devices with a single cell.

The easiest fix in most cases is to change the 'reg' property to for 1 cell
address and size. In some cases with child devices having 2 cells, that
doesn't make sense so a bus node is needed.

Acked-by: Stephen Boyd <sboyd@kernel.org> # clk
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: ufs: ti: Add missing 'additionalProperties: false'
Rob Herring [Tue, 12 May 2020 20:45:42 +0000 (15:45 -0500)]
dt-bindings: ufs: ti: Add missing 'additionalProperties: false'

The ti,j721e-ufs schema is missing an 'additionalProperties: false'. Add
that and and the missing assigned-clock properties.

Acked-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: ufs: ti: Fix address properties handling
Rob Herring [Tue, 12 May 2020 20:45:41 +0000 (15:45 -0500)]
dt-bindings: ufs: ti: Fix address properties handling

The ti,j721e-ufs schema and example have a couple of problems related to
address properties. First, the default #size-cells and #address-cells
are 1 for examples, so they need to be overriden with a bus node.
Second, address translation for the child ufs node is broken because
'ranges', '#address-cells', and '#size-cells' are missing from the
schema.

Acked-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: usb: ehci: Add missing 2nd register region
Rob Herring [Tue, 12 May 2020 20:45:40 +0000 (15:45 -0500)]
dt-bindings: usb: ehci: Add missing 2nd register region

The 'ibm,usb-ehci-440epx' compatible has a 2nd 'reg' region, but the
schema says there is only 1 region. Fix this.

Cc: linux-usb@vger.kernel.org
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agospi: dt-bindings: sifive: Add missing 2nd register region
Rob Herring [Tue, 12 May 2020 20:45:39 +0000 (15:45 -0500)]
spi: dt-bindings: sifive: Add missing 2nd register region

The 'reg' description and example have a 2nd register region for memory
mapped flash, but the schema says there is only 1 region. Fix this.

Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: linux-spi@vger.kernel.org
Cc: linux-riscv@lists.infradead.org
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: serial: renesas,hscif: Document r8a7742 bindings
Lad Prabhakar [Wed, 6 May 2020 19:51:32 +0000 (20:51 +0100)]
dt-bindings: serial: renesas,hscif: Document r8a7742 bindings

RZ/G1H (R8A7742) SoC also has the R-Car gen2 compatible HSCIF ports,
so document the SoC specific bindings.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: serial: renesas,scifb: Document r8a7742 bindings
Lad Prabhakar [Wed, 6 May 2020 19:51:31 +0000 (20:51 +0100)]
dt-bindings: serial: renesas,scifb: Document r8a7742 bindings

RZ/G1H (R8A7742) SoC also has the R-Car gen2 compatible SCIFB ports,
so document the SoC specific bindings.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: serial: renesas,scif: Document r8a7742 bindings
Lad Prabhakar [Wed, 6 May 2020 19:51:30 +0000 (20:51 +0100)]
dt-bindings: serial: renesas,scif: Document r8a7742 bindings

RZ/G1H (R8A7742) SoC also has the R-Car gen2 compatible SCIF ports,
so document the SoC specific bindings.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: irqchip: renesas-irqc: Document r8a7742 bindings
Lad Prabhakar [Wed, 6 May 2020 19:51:28 +0000 (20:51 +0100)]
dt-bindings: irqchip: renesas-irqc: Document r8a7742 bindings

Document SoC specific bindings for RZ/G1H (r8a7742) SoC.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: Add vendor prefix for Baikal Electronics, JSC
Serge Semin [Wed, 6 May 2020 17:42:21 +0000 (20:42 +0300)]
dt-bindings: Add vendor prefix for Baikal Electronics, JSC

Add "BAIKAL ELECTRONICS, JSC" to the list of devicetree vendor prefixes
as "baikal".

Website: http://www.baikalelectronics.com

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-mips@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: vendor-prefixes: Add Vaisala
Vesa Jääskeläinen [Sun, 3 May 2020 09:33:55 +0000 (12:33 +0300)]
dt-bindings: vendor-prefixes: Add Vaisala

Vaisala Oyj is a company based in Finland and also has subsidiaries in other
countries. Vaisala develops, manufactures and markets innovative products and
services for environmental and industrial measurement.

https://www.vaisala.com/

Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: vendor-prefixes: Add U-Boot bootloader prefix
Michal Simek [Thu, 30 Apr 2020 09:31:27 +0000 (11:31 +0200)]
dt-bindings: vendor-prefixes: Add U-Boot bootloader prefix

List U-Boot project in vendor prefixes.

For more information take a look at:
https://en.wikipedia.org/wiki/Das_U-Boot
Source code is available here:
https://gitlab.denx.de/u-boot/u-boot

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: thermal: Convert UniPhier thermal monitor to json-schema
Kunihiko Hayashi [Thu, 30 Apr 2020 03:05:34 +0000 (12:05 +0900)]
dt-bindings: thermal: Convert UniPhier thermal monitor to json-schema

Convert the UniPhier thermal monitor binding to DT schema format.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: phy: Convert UniPhier USB3-PHY conroller to json-schema
Kunihiko Hayashi [Tue, 28 Apr 2020 06:34:50 +0000 (15:34 +0900)]
dt-bindings: phy: Convert UniPhier USB3-PHY conroller to json-schema

Convert the UniPhier USB3-PHY controller for SS/HS to DT schema format.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: phy: Convert UniPhier USB2-PHY controller to json-schema
Kunihiko Hayashi [Tue, 28 Apr 2020 06:34:49 +0000 (15:34 +0900)]
dt-bindings: phy: Convert UniPhier USB2-PHY controller to json-schema

Convert the UniPhier USB2-PHY conroller to DT schema format.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: phy: Convert UniPhier PCIe-PHY controller to json-schema
Kunihiko Hayashi [Tue, 28 Apr 2020 06:34:48 +0000 (15:34 +0900)]
dt-bindings: phy: Convert UniPhier PCIe-PHY controller to json-schema

Convert the UniPhier PCIe-PHY controller to DT schema format.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: timer: renesas: ostm: Convert to json-schema
Geert Uytterhoeven [Mon, 27 Apr 2020 19:32:24 +0000 (21:32 +0200)]
dt-bindings: timer: renesas: ostm: Convert to json-schema

Convert the Renesas OS Timer (OSTM) Device Tree binding documentation to
json-schema.

Document missing properties.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: watchdog: renesas-wdt: Convert to json-schema
Geert Uytterhoeven [Mon, 27 Apr 2020 19:25:22 +0000 (21:25 +0200)]
dt-bindings: watchdog: renesas-wdt: Convert to json-schema

Convert the Renesas Watchdog Timer (WDT) Controller Device Tree binding
documentation to json-schema.

Add missing "renesas,r8a77980-wdt" compatible value.
Document missing properties.
Update the example to match reality.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: gpio: rcar: Convert to json-schema
Geert Uytterhoeven [Mon, 27 Apr 2020 19:22:59 +0000 (21:22 +0200)]
dt-bindings: gpio: rcar: Convert to json-schema

Convert the Renesas General-Purpose Input/Output Ports (GPIO) Device
Tree binding documentation to json-schema.

Drop the deprecated "renesas,gpio-rcar" compatible value.
Document missing properties.
Drop the first example, as it doesn't add much value.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: serial: Convert ingenic,uart.txt to YAML
Paul Cercueil [Sun, 26 Apr 2020 18:58:55 +0000 (20:58 +0200)]
dt-bindings: serial: Convert ingenic,uart.txt to YAML

Convert the ingenic,uart.txt to a new ingenic,uart.yaml file.

A few things were changed in the process:
- the dmas and dma-names properties are now required.
- the ingenic,jz4770-uart and ingenic,jz4775-uart compatible strings now
  require the ingenic,jz4760-uart string to be used as fallback, since
  the hardware is compatible.
- the ingenic,jz4725b-uart compatible string was added, with a fallback
  to ingenic,jz4740-uart.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: i2c: Convert i2c-jz4780.txt to YAML
Paul Cercueil [Sun, 26 Apr 2020 18:58:54 +0000 (20:58 +0200)]
dt-bindings: i2c: Convert i2c-jz4780.txt to YAML

Convert the i2c-jz4780.txt file to ingenic,i2c.yaml.

Two things were changed in the process:
- the clock-frequency property can now only be set to the two values
  that can be set by the hardware;
- the dmas and dma-names properties are now required.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
[robh: add ref to i2c-controller.yaml]
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: intc: Convert ingenic,intc.txt to YAML
Paul Cercueil [Sun, 26 Apr 2020 18:58:50 +0000 (20:58 +0200)]
dt-bindings: intc: Convert ingenic,intc.txt to YAML

Convert the ingenic,intc.txt doc file to ingenic,intc.yaml.

Some compatible strings now require a fallback, as the controller
generally works the same across the SoCs families.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: clock: Convert ingenic,cgu.txt to YAML
Paul Cercueil [Sun, 26 Apr 2020 18:58:49 +0000 (20:58 +0200)]
dt-bindings: clock: Convert ingenic,cgu.txt to YAML

Convert the ingenic,cgu.txt doc file to ingenic,cgu.yaml.

The binding documentation has been updated as well. The node can have a
child node that corresponds to the USB PHY, which happens to be present
in the middle of the CGU registers.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: timer: Document allwinner,erratum-unknown1 property
Samuel Holland [Sun, 26 Apr 2020 16:20:32 +0000 (11:20 -0500)]
dt-bindings: timer: Document allwinner,erratum-unknown1 property

This arch_timer property was added in commit c950ca8c35ee
("clocksource/drivers/arch_timer: Workaround for Allwinner A64 timer instability")
but I omitted the device tree binding documentation. Now
`make dtbs_check` prints the following warning for all A64 boards:

timer: 'allwinner,erratum-unknown1' does not match any of the regexes: 'pinctrl-[0-9]+'

Resolve this by documenting the erratum property.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: usb: dwc2: add power-domains property
Johan Jonker [Sat, 25 Apr 2020 17:08:33 +0000 (19:08 +0200)]
dt-bindings: usb: dwc2: add power-domains property

A test with the command below gives this error:

arch/arm64/boot/dts/rockchip/px30-evb.dt.yaml: usb@ff300000:
'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+'

With the conversion to yaml it also filters things
in a node that are used by other drivers like
'power-domains' for Rockchip px30 usb nodes,
so add them to 'dwc2.yaml'.

make ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/usb/dwc2.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: gpu: add power-domains #cooling-cells to arm,mali-bifrost.yaml
Johan Jonker [Sat, 25 Apr 2020 15:40:37 +0000 (17:40 +0200)]
dt-bindings: gpu: add power-domains #cooling-cells to arm,mali-bifrost.yaml

A test with the command below gives this error:

arch/arm64/boot/dts/rockchip/px30-evb.dt.yaml: gpu@ff400000:
'#cooling-cells', 'power-domains'
do not match any of the regexes: 'pinctrl-[0-9]+'

With the conversion to yaml it also filters things
in a node that are used by other drivers like
'#cooling-cells' and 'power-domains'
for Rockchip px30 gpu nodes,
so add them to 'arm,mali-bifrost.yaml'.

make ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/gpu/
arm,mali-bifrost.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: sh_eth: Sort compatible string in increasing number of the SoC
Lad Prabhakar [Fri, 24 Apr 2020 10:38:15 +0000 (11:38 +0100)]
dt-bindings: sh_eth: Sort compatible string in increasing number of the SoC

Sort the items in the compatible string list in increasing number of SoC.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: at24: add microchip, 24lc[0-9]+ to the compatible pattern
Masahiro Yamada [Wed, 22 Apr 2020 14:18:36 +0000 (23:18 +0900)]
dt-bindings: at24: add microchip, 24lc[0-9]+ to the compatible pattern

arch/arm/boot/dts/uniphier-ref-daughter.dtsi has

  compatible = "microchip,24lc128", "atmel,24c128";

and 'make ARCH=arm dtbs_check' warns this:

  eeprom@50: compatible: ['microchip,24lc128', 'atmel,24c128'] is not valid under any of the given schemas (Possible causes of the failure)

Microchip 24LC128 is the device used on this board, and I see it in
https://www.microchip.com/wwwproducts/en/24LC128

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: watchdog: Convert i.MX7ULP to json-schema
Anson Huang [Tue, 21 Apr 2020 14:21:26 +0000 (22:21 +0800)]
dt-bindings: watchdog: Convert i.MX7ULP to json-schema

Convert the i.MX7ULP watchdog binding to DT schema format using json-schema.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: watchdog: Convert i.MX to json-schema
Anson Huang [Tue, 21 Apr 2020 14:21:25 +0000 (22:21 +0800)]
dt-bindings: watchdog: Convert i.MX to json-schema

Convert the i.MX watchdog binding to DT schema format using json-schema.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: nvmem: Convert MXS OCOTP to json-schema
Anson Huang [Tue, 21 Apr 2020 14:09:41 +0000 (22:09 +0800)]
dt-bindings: nvmem: Convert MXS OCOTP to json-schema

Convert the MXS OCOTP binding to DT schema format using json-schema.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: nvmem: Convert i.MX IIM to json-schema
Anson Huang [Tue, 21 Apr 2020 14:09:40 +0000 (22:09 +0800)]
dt-bindings: nvmem: Convert i.MX IIM to json-schema

Convert the i.MX IIM binding to DT schema format using json-schema.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: nvmem: Convert i.MX OCOTP to json-schema
Anson Huang [Tue, 21 Apr 2020 14:09:39 +0000 (22:09 +0800)]
dt-bindings: nvmem: Convert i.MX OCOTP to json-schema

Convert the i.MX OCOTP binding to DT schema format using json-schema.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: gpio: Convert i.MX to json-schema
Anson Huang [Tue, 21 Apr 2020 14:03:43 +0000 (22:03 +0800)]
dt-bindings: gpio: Convert i.MX to json-schema

Convert the i.MX GPIO binding to DT schema format using json-schema.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: thermal: Convert i.MX8MM to json-schema
Anson Huang [Tue, 21 Apr 2020 13:59:04 +0000 (21:59 +0800)]
dt-bindings: thermal: Convert i.MX8MM to json-schema

Convert the i.MX8MM thermal binding to DT schema format using json-schema

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: iommu: renesas,ipmmu-vmsa: convert to json-schema
Yoshihiro Shimoda [Tue, 21 Apr 2020 05:15:52 +0000 (14:15 +0900)]
dt-bindings: iommu: renesas,ipmmu-vmsa: convert to json-schema

Convert Renesas VMSA-Compatible IOMMU bindings documentation
to json-schema.

Note that original documentation doesn't mention renesas,ipmmu-vmsa
for R-Mobile APE6. But, R-Mobile APE6 is similar to the R-Car
Gen2. So, renesas,ipmmu-r8a73a4 belongs the renesas,ipmmu-vmsa
section.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodocs: dt: convert writing-bindings.txt to ReST
Mauro Carvalho Chehab [Wed, 15 Apr 2020 14:45:26 +0000 (16:45 +0200)]
docs: dt: convert writing-bindings.txt to ReST

- Add a SPDX header;
- Adjust document and section titles;
- Mark literal blocks as such;
- Add it to bindings/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodocs: dt: convert submitting-patches.txt to ReST format
Mauro Carvalho Chehab [Wed, 15 Apr 2020 14:45:25 +0000 (16:45 +0200)]
docs: dt: convert submitting-patches.txt to ReST format

- Add a SPDX header;
- Adjust document and section titles;
- Mark literal blocks as such;
- Add it to bindings/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodocs: dt: convert ABI.txt to ReST format
Mauro Carvalho Chehab [Wed, 15 Apr 2020 14:45:24 +0000 (16:45 +0200)]
docs: dt: convert ABI.txt to ReST format

This file only requires a properly-formatted title to be
recognized as a ReST file.

As there will be more files under bindings/ that will be
included at the documentation body, add a new index.rst
file there.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodocs: dt: convert overlay-notes.txt to ReST format
Mauro Carvalho Chehab [Wed, 15 Apr 2020 14:45:22 +0000 (16:45 +0200)]
docs: dt: convert overlay-notes.txt to ReST format

- Add a SPDX header;
- Adjust document title;
- Some whitespace fixes and new line breaks;
- Mark literal blocks as such;
- Add it to devicetree/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodocs: dt: convert of_unittest.txt to ReST
Mauro Carvalho Chehab [Wed, 15 Apr 2020 14:45:21 +0000 (16:45 +0200)]
docs: dt: convert of_unittest.txt to ReST

- Add a SPDX header;
- Adjust document and section titles;
- Adjust numerated list markups;
- Some whitespace fixes and new line breaks;
- Mark literal blocks as such;
- Add it to devicetree/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodocs: dt: convert dynamic-resolution-notes.txt to ReST
Mauro Carvalho Chehab [Wed, 15 Apr 2020 14:45:20 +0000 (16:45 +0200)]
docs: dt: convert dynamic-resolution-notes.txt to ReST

- Add a SPDX header;
- Adjust document title;
- Add it to devicetree/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodocs: dt: convert changesets to ReST
Mauro Carvalho Chehab [Wed, 15 Apr 2020 14:45:19 +0000 (16:45 +0200)]
docs: dt: convert changesets to ReST

- Add a SPDX header;
- Add a document title;
- Some whitespace fixes and new line breaks;
- Add it to devicetree/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodocs: dt: usage_model.rst: fix link for DT usage
Mauro Carvalho Chehab [Wed, 15 Apr 2020 14:45:17 +0000 (16:45 +0200)]
docs: dt: usage_model.rst: fix link for DT usage

The devicetree.org doesn't host the Device_Tree_Usage page
anymore. So, fix the link to point to a new address.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodocs: dt: convert usage-model.txt to ReST
Mauro Carvalho Chehab [Wed, 15 Apr 2020 14:45:16 +0000 (16:45 +0200)]
docs: dt: convert usage-model.txt to ReST

- Add a SPDX header;
- Adjust document title;
- Use footnoote markups;
- Some whitespace fixes and new line breaks;
- Mark literal blocks as such;
- Add it to devicetree/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodocs: dt: add an index.rst file for devicetree
Mauro Carvalho Chehab [Wed, 15 Apr 2020 14:45:15 +0000 (16:45 +0200)]
docs: dt: add an index.rst file for devicetree

There are some device tree documentation under
Documentation/devicetree. Add a top index file for it and
add the already-existing ReST file on it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoof: Documentation: change overlay example to use current syntax
Frank Rowand [Tue, 28 Jan 2020 00:37:18 +0000 (18:37 -0600)]
of: Documentation: change overlay example to use current syntax

The overlay implementation details in the compiled (DTB) file are
now properly implemented by the dtc compiler and should no longer
be hard coded in the source file.

Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: arm: Add Calxeda system registers json-schema binding
Andre Przywara [Thu, 30 Apr 2020 21:10:54 +0000 (22:10 +0100)]
dt-bindings: arm: Add Calxeda system registers json-schema binding

The Calxeda system registers are a collection of MMIO register
controlling several more general aspects of the SoC.
Beside for some power management tasks this node is also somewhat
abused as the container for the clock nodes.

Add a binding in DT schema format using json-schema.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: ipmi: Convert IPMI-SMIC bindings to json-schema
Andre Przywara [Thu, 30 Apr 2020 21:10:53 +0000 (22:10 +0100)]
dt-bindings: ipmi: Convert IPMI-SMIC bindings to json-schema

Convert the generic IPMI controller bindings to DT schema format
using json-schema.

The device_type property is deprecated for most node per the DT spec,
but at least the Linux driver matches on it, so I keep it in.

The Linux driver parses for some additional and optional properties,
but there are no in-tree users. Let's allow extra properties to cover
any other users.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: memory-controllers: Convert Calxeda DDR to json-schema
Andre Przywara [Thu, 30 Apr 2020 21:10:52 +0000 (22:10 +0100)]
dt-bindings: memory-controllers: Convert Calxeda DDR to json-schema

Convert the Calxeda DDR memory controller binding to DT schema format
using json-schema.
Although this technically covers the whole DRAM controller, the
intention to use it only for error reporting and mapping fault addresses
to DRAM chips.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: arm: Convert Calxeda L2 cache controller to json-schema
Andre Przywara [Thu, 30 Apr 2020 21:10:51 +0000 (22:10 +0100)]
dt-bindings: arm: Convert Calxeda L2 cache controller to json-schema

Convert the L2-ECC controller binding to DT schema format using
json-schema.
This is indented to be just used for error reporting.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: phy: Convert Calxeda ComboPHY binding to json-schema
Andre Przywara [Thu, 30 Apr 2020 21:10:50 +0000 (22:10 +0100)]
dt-bindings: phy: Convert Calxeda ComboPHY binding to json-schema

Convert the Calxeda ComboPHY binding to DT schema format using
json-schema.
There is no driver in the Linux kernel matching the compatible
string, but the nodes are parsed by the SATA driver, which links to them
using its port-phys property.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: net: Convert Calxeda Ethernet binding to json-schema
Andre Przywara [Thu, 30 Apr 2020 21:10:49 +0000 (22:10 +0100)]
dt-bindings: net: Convert Calxeda Ethernet binding to json-schema

Convert the Calxeda XGMAC Ethernet device binding to DT schema format
using json-schema.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: sata: Convert Calxeda SATA controller to json-schema
Andre Przywara [Thu, 30 Apr 2020 21:10:48 +0000 (22:10 +0100)]
dt-bindings: sata: Convert Calxeda SATA controller to json-schema

Convert the Calxeda Highbank SATA controller binding to DT schema format
using json-schema.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: clock: Convert Calxeda clock bindings to json-schema
Andre Przywara [Thu, 30 Apr 2020 21:10:47 +0000 (22:10 +0100)]
dt-bindings: clock: Convert Calxeda clock bindings to json-schema

Convert the Calxeda clock bindings to DT schema format using json-schema.

This just covers the actual PLL and divider clock nodes. In the actual
DTs they are somewhat unconnected (no ranges or bus compatible) children
of the sregs node, but for the actual clock bindings this is not
relevant.

One oddity is that the addresses are relative to the parent node,
without that being pronounced using a ranges property.
But this is too late to fix now.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: Remove cases of 'allOf' containing a '$ref'
Rob Herring [Thu, 16 Apr 2020 00:55:49 +0000 (19:55 -0500)]
dt-bindings: Remove cases of 'allOf' containing a '$ref'

json-schema versions draft7 and earlier have a weird behavior in that
any keywords combined with a '$ref' are ignored (silently). The correct
form was to put a '$ref' under an 'allOf'. This behavior is now changed
in the 2019-09 json-schema spec and '$ref' can be mixed with other
keywords. The json-schema library doesn't yet support this, but the
tooling now does a fixup for this and either way works.

This has been a constant source of review comments, so let's change this
treewide so everyone copies the simpler syntax.

Scripted with ruamel.yaml with some manual fixups. Some minor whitespace
changes from the script.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-By: Vinod Koul <vkoul@kernel.org>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de> # for I2C
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> #for-iio
Reviewed-by: Stephen Boyd <sboyd@kernel.org> # clock
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: Add a minimum version check for dtschema
Rob Herring [Thu, 5 Mar 2020 22:37:48 +0000 (16:37 -0600)]
dt-bindings: Add a minimum version check for dtschema

The dtschema package must be somewhat up to date as the tools and
meta-schema checks are still evolving. Implement a version check,
so this can be enforced. This will help ensure new schema submissions
get checked against the latest meta-schemas.

Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: serial: Convert 8250 to json-schema
Lubomir Rintel [Sun, 19 Apr 2020 20:17:16 +0000 (22:17 +0200)]
dt-bindings: serial: Convert 8250 to json-schema

Some fixes were done during the conversion:

Slightly better examples. The original example was for an OMAP serial
port, which is not even described by this binding, but by
omap_serial.txt instead.

Added compatible strings, that were used, byt not documented:
andestech,uart16550, cavium,octeon-3860-uart, fsl,16550-FIFO64,
nvidia,tegra186-uart, nvidia,tegra194-uart, nxp,lpc1850-uart,
opencores,uart16550-rtlsvn105, ralink,mt7620a-uart, ralink,rt3052-uart,
ralink,rt3883-uart and xlnx,xps-uart16550-2.00.b.

Removed "serial" compatible string. It's redundant with the node name
(which, in OFW, serves the same purpose as the compatible string).

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
[robh: allow additional properties. clocks/clock-frequency can be
optional on original 8250 series with standard clocks]
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: serial: Move Marvell compatible string to 8250 binding doc
Lubomir Rintel [Sun, 19 Apr 2020 20:17:15 +0000 (22:17 +0200)]
dt-bindings: serial: Move Marvell compatible string to 8250 binding doc

These ports are compatible with NS8250 and handled by the same driver.
Get rid of the extra document that fails to document the properties that
are actually supported.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoMerge branch 'dt/linus' into 'dt/next'
Rob Herring [Thu, 30 Apr 2020 18:01:46 +0000 (13:01 -0500)]
Merge branch 'dt/linus' into 'dt/next'

4 years agoof: property: Do not link to disabled devices
Nicolas Saenz Julienne [Mon, 20 Apr 2020 12:01:02 +0000 (14:01 +0200)]
of: property: Do not link to disabled devices

When creating a consumer/supplier relationship between two devices,
make sure the supplier node is actually active. Otherwise this will
create a link relationship that will never be fulfilled. This, in the
worst case scenario, will hang the system during boot.

Note that, in practice, the fact that a device-tree represented
consumer/supplier relationship isn't fulfilled will not prevent devices
from successfully probing.

Fixes: a3e1d1a7f5fc ("of: property: Add functional dependency link from DT bindings")
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Saravana Kannan <saravanak@google.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoof: property: Fix create device links for all child-supplier dependencies
Nicolas Saenz Julienne [Mon, 20 Apr 2020 12:01:01 +0000 (14:01 +0200)]
of: property: Fix create device links for all child-supplier dependencies

Upon adding a new device from a DT node, we scan its properties and its
children's properties in order to create a consumer/supplier
relationship between the device and the property provider.

That said, it's possible for some of the node's children to be disabled,
which will create links that'll never be fulfilled.

To get around this, use the for_each_available_child_of_node() function
instead of for_each_available_node() when iterating over the node's
children.

Fixes: d4387cd11741 ("of: property: Create device links for all child-supplier depencencies")
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Saravana Kannan <saravanak@google.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoof: property: Don't retry device_link_add() upon failure
Saravana Kannan [Thu, 16 Apr 2020 20:58:38 +0000 (13:58 -0700)]
of: property: Don't retry device_link_add() upon failure

When of_link_to_phandle() was implemented initially, there was no way to
tell if device_link_add() was failing because the supplier device hasn't
been parsed yet, hasn't been added yet, the links were creating a cycle,
etc. Some of these were transient errors that'd go away at a later
point.

However, with the current set of improved checks, if device_link_add()
fails, it'll only be for permanent errors like cycles or out-of-memory
errors.

Also, with the addition of DL_FLAG_SYNC_STATE_ONLY flag [1] to device
links, all the valid dependency cycles due to "proxy" device links
(needed for correctness of sync_state() device callback) will never fail
device_link_add() due to cycles.

So, continuing to retry failing device links (by returning -EAGAIN) is
no longer useful. At worst, it prevents platforms from setting
fw_devlink=on (or better) because it prevents proper boot up. So, let's
not do that anymore.

[1] - https://lore.kernel.org/lkml/20191028220027.251605-1-saravanak@google.com/
Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: iio: adi,ltc2983: Add missing quotes on dependencies
Rob Herring [Wed, 22 Apr 2020 00:32:39 +0000 (19:32 -0500)]
dt-bindings: iio: adi,ltc2983: Add missing quotes on dependencies

With the bracketed list form, any strings with commas have to be quoted
or they are separated.

Fixes: 3986a14870cb ("dt-bindings: iio: Add ltc2983 documentation")
Cc: "Nuno Sá" <nuno.sa@analog.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org
Acked-by: Nuno Sá <nuno.sa@analog.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: i2c: i2c-stm32f7: add st,stm32mp15-i2c compatible
Alain Volmat [Thu, 23 Jan 2020 16:12:47 +0000 (17:12 +0100)]
dt-bindings: i2c: i2c-stm32f7: add st,stm32mp15-i2c compatible

Add a new stm32mp15 specific compatible to handle FastMode+
registers which are different on the stm32mp15 compared
to the stm32f7 or stm32h7.

Signed-off-by: Alain Volmat <alain.volmat@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: phy: qcom-qusb2: Fix defaults
Douglas Anderson [Thu, 23 Apr 2020 18:10:27 +0000 (11:10 -0700)]
dt-bindings: phy: qcom-qusb2: Fix defaults

The defaults listed in the bindings don't match what the code is
actually doing.  Presumably existing users care more about keeping
existing behavior the same, so change the bindings to match the code
in Linux.

The "qcom,preemphasis-level" default has been wrong for quite a long
time (May 2018).  The other two were recently added.

As some evidence that these values are wrong, this is from the Linux
driver:
- qcom,preemphasis-level: sets "PORT_TUNE1", lower 2 bits.  Driver
  programs PORT_TUNE1 to 0x30 by default and (0x30 & 0x3) = 0.
- qcom,bias-ctrl-value: sets "PLL_BIAS_CONTROL_2", lower 6 bits.
  Driver programs PLL_BIAS_CONTROL_2 to 0x20 by default and (0x20 &
  0x3f) = 0x20 = 32.
- qcom,hsdisc-trim-value: sets "PORT_TUNE2", lower 2 bits.  Driver
  programs PORT_TUNE2 to 0x29 by default and (0x29 & 0x3) = 1.

Fixes: 1e6f134eb67a ("dt-bindings: phy: qcom-qusb2: Add support for overriding Phy tuning parameters")
Fixes: a8b70ccf10e3 ("dt-bindings: phy-qcom-usb2: Add support to override tuning values")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: Fix erroneous 'additionalProperties'
Rob Herring [Fri, 24 Apr 2020 16:13:18 +0000 (11:13 -0500)]
dt-bindings: Fix erroneous 'additionalProperties'

There's several cases of json-schema 'additionalProperties' at the wrong
indentation level which has the effect of making them DT properties. This
is harmless, but let's fix them so a meta-schema check for this can be
added.

In all the cases, either the 'additionalProperties' was extra or doesn't
work because there's a $ref to more properties. In the latter case, we
can use 'unevaluatedProperties' instead.

Reported-by: Iskren Chernev <iskren.chernev@gmail.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Saravanan Sekar <sravanhome@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: Fix command line length limit calling dt-mk-schema
Rob Herring [Tue, 21 Apr 2020 20:42:02 +0000 (15:42 -0500)]
dt-bindings: Fix command line length limit calling dt-mk-schema

As the number of schemas has increased, we're starting to hit the error
"execvp: /bin/sh: Argument list too long". This is due to passing all the
schema files on the command line to dt-mk-schema. It currently is only
with out of tree builds and is intermittent depending on the file path
lengths.

Commit 2ba06cd8565b ("kbuild: Always validate DT binding examples") made
hitting this proplem more likely since the example validation now always
gets the full list of schemas.

Fix this by passing the schema file list in a pipe and using xargs. We end
up doing the find twice, but the time is insignificant compared to the
dt-mk-schema time.

Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: Re-enable core schemas for dtbs_check
Rob Herring [Tue, 21 Apr 2020 21:03:36 +0000 (16:03 -0500)]
dt-bindings: Re-enable core schemas for dtbs_check

In commit 2ba06cd8565b ("kbuild: Always validate DT binding examples"),
the core schemas (from dtschema repo) were inadvertently disabled for
dtbs_checks. Re-enable them.

Fixes: 2ba06cd8565b ("kbuild: Always validate DT binding examples")
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: Add an entry for Würth Elektronik, we
Saravanan Sekar [Wed, 15 Apr 2020 06:55:32 +0000 (08:55 +0200)]
dt-bindings: Add an entry for Würth Elektronik, we

Add an entry for Würth Elektronik GmbH, we

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: mailbox: imx-mu: correct example
Peng Fan [Tue, 14 Apr 2020 13:24:27 +0000 (21:24 +0800)]
dt-bindings: mailbox: imx-mu: correct example

The example use i.MX8QXP MU, but actually the MU is compatible with
i.MX6SX, so add the compatible.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: MIPS: Require SoC compatible string after board string
Paul Cercueil [Mon, 13 Apr 2020 15:26:25 +0000 (17:26 +0200)]
dt-bindings: MIPS: Require SoC compatible string after board string

All devicetree board files list a compatible string for the SoC after
the compatible string of the board.

Enhance the YAML format so that these SoC compatible strings appear
aside each supported Ingenic board.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: usb: ingenic,musb: Add usb-role-switch property
Paul Cercueil [Mon, 13 Apr 2020 15:26:24 +0000 (17:26 +0200)]
dt-bindings: usb: ingenic,musb: Add usb-role-switch property

Add the common usb-role-switch boolean property to the list of the
supported properties.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: dma: Convert jz4740-dma doc to YAML
Paul Cercueil [Mon, 13 Apr 2020 15:26:23 +0000 (17:26 +0200)]
dt-bindings: dma: Convert jz4740-dma doc to YAML

Convert the textual documentation for the Ingenic SoCs DMA Controller
devicetree binding to YAML.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: mmc: Convert jz4740-mmc doc to YAML
Paul Cercueil [Mon, 13 Apr 2020 15:26:22 +0000 (17:26 +0200)]
dt-bindings: mmc: Convert jz4740-mmc doc to YAML

Convert the jz4740-mmc.txt documentation to YAML.

The ingenic,jz4770-mmc compatible string was added in the process, with
a fallback to ingenic,jz4760-mmc.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: timer: Convert ingenic,tcu.txt to YAML
Paul Cercueil [Mon, 13 Apr 2020 15:26:21 +0000 (17:26 +0200)]
dt-bindings: timer: Convert ingenic,tcu.txt to YAML

Convert the ingenic,tcu.txt file to YAML.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: nvmem: Convert rockchip-efuse bindings to yaml
Ricardo Cañuelo [Mon, 13 Apr 2020 10:30:47 +0000 (12:30 +0200)]
dt-bindings: nvmem: Convert rockchip-efuse bindings to yaml

Convert the existing rockchip-efuse binding to json-schema. No changes
were done to the binding except for small changes in the documentation
strings.

This deletes the rockchip-efuse.txt binding and replaces it with
rockchip-efuse.yaml.

Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: gpu: mali-utgard: Add the #cooling-cells property
Martin Blumenstingl [Sat, 11 Apr 2020 16:57:00 +0000 (18:57 +0200)]
dt-bindings: gpu: mali-utgard: Add the #cooling-cells property

The GPU can be one of the big heat sources on a SoC. Allow the
"#cooling-cells" property to be specified for ARM Mali Utgard GPUs so
the GPU clock speeds (and voltages) can be reduced to prevent a SoC from
overheating.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agodt-bindings: sram: convert rockchip-pmu-sram bindings to yaml
Johan Jonker [Sat, 11 Apr 2020 12:25:07 +0000 (14:25 +0200)]
dt-bindings: sram: convert rockchip-pmu-sram bindings to yaml

Current dts files with 'rockchip-pmu-sram' compatible nodes
are now verified with sram.yaml, although the original
text document still exists. Merge rockchip-pmu-sram.txt
with sram.yaml by adding it as description with an example.
Make #address-cells, #size-cells and ranges optional
if there are no child nodes to prevent yaml warnings.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
4 years agoof: fix the warnings from command line.
tangjianqiang [Fri, 10 Apr 2020 08:32:04 +0000 (16:32 +0800)]
of: fix the warnings from command line.

Gerrit will complain with this warnings:
ERROR: (foo*) should be (foo *)

Signed-off-by: tangjianqiang <tangjianqiang@xiaomi.com>
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>