summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/arm/arm,cci-400.yaml6
-rw-r--r--Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml2
-rw-r--r--Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml4
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.yaml2
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek/mediatek,g3dsys.txt30
-rw-r--r--Documentation/devicetree/bindings/arm/omap/mpu.txt54
-rw-r--r--Documentation/devicetree/bindings/arm/ti/ti,omap-mpu.yaml58
-rw-r--r--Documentation/devicetree/bindings/arm/vexpress-config.yaml4
-rw-r--r--Documentation/devicetree/bindings/bus/hisilicon,hisi-localbus.yaml44
-rw-r--r--Documentation/devicetree/bindings/bus/omap-ocp2scp.txt29
-rw-r--r--Documentation/devicetree/bindings/bus/ti,omap-ocp2scp.yaml74
-rw-r--r--Documentation/devicetree/bindings/display/bridge/sil,sii9022.yaml2
-rw-r--r--Documentation/devicetree/bindings/display/hisilicon/dw-dsi.txt72
-rw-r--r--Documentation/devicetree/bindings/display/hisilicon/hisi-ade.txt64
-rw-r--r--Documentation/devicetree/bindings/display/hisilicon/hisilicon,hi6220-ade.yaml95
-rw-r--r--Documentation/devicetree/bindings/display/hisilicon/hisilicon,hi6220-dsi.yaml68
-rw-r--r--Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi-ddc.yaml11
-rw-r--r--Documentation/devicetree/bindings/dts-coding-style.rst5
-rw-r--r--Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.yaml6
-rw-r--r--Documentation/devicetree/bindings/gpio/delta,tn48m-gpio.yaml2
-rw-r--r--Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml25
-rw-r--r--Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml17
-rw-r--r--Documentation/devicetree/bindings/hwmon/adi,ltc2991.yaml2
-rw-r--r--Documentation/devicetree/bindings/hwmon/vexpress.txt23
-rw-r--r--Documentation/devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml4
-rw-r--r--Documentation/devicetree/bindings/iio/light/upisemi,us5182.yaml2
-rw-r--r--Documentation/devicetree/bindings/input/matrix-keymap.yaml3
-rw-r--r--Documentation/devicetree/bindings/input/ti,tca8418.yaml21
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/chrp,open-pic.yaml7
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml2
-rw-r--r--Documentation/devicetree/bindings/mailbox/allwinner,sun6i-a31-msgbox.yaml3
-rw-r--r--Documentation/devicetree/bindings/mailbox/altera-mailbox.txt12
-rw-r--r--Documentation/devicetree/bindings/mailbox/hisilicon,hi3660-mailbox.txt2
-rw-r--r--Documentation/devicetree/bindings/mailbox/hisilicon,hi6220-mailbox.txt2
-rw-r--r--Documentation/devicetree/bindings/mailbox/mailbox.txt60
-rw-r--r--Documentation/devicetree/bindings/mailbox/ti,omap-mailbox.yaml3
-rw-r--r--Documentation/devicetree/bindings/media/amlogic,c3-mipi-csi2.yaml4
-rw-r--r--Documentation/devicetree/bindings/media/arm,mali-c55.yaml2
-rw-r--r--Documentation/devicetree/bindings/media/atmel,isc.yaml14
-rw-r--r--Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml10
-rw-r--r--Documentation/devicetree/bindings/media/cdns,csi2rx.yaml58
-rw-r--r--Documentation/devicetree/bindings/media/hisilicon,hix5hd2-ir.yaml52
-rw-r--r--Documentation/devicetree/bindings/media/hix5hd2-ir.txt26
-rw-r--r--Documentation/devicetree/bindings/media/i2c/galaxycore,gc05a2.yaml2
-rw-r--r--Documentation/devicetree/bindings/media/i2c/ovti,ov2680.yaml30
-rw-r--r--Documentation/devicetree/bindings/media/i2c/ovti,ov2732.yaml6
-rw-r--r--Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml22
-rw-r--r--Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml2
-rw-r--r--Documentation/devicetree/bindings/media/mediatek-jpeg-decoder.yaml4
-rw-r--r--Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml2
-rw-r--r--Documentation/devicetree/bindings/media/microchip,csi2dc.yaml56
-rw-r--r--Documentation/devicetree/bindings/media/microchip,xisc.yaml14
-rw-r--r--Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml4
-rw-r--r--Documentation/devicetree/bindings/media/qcom,msm8996-venus.yaml40
-rw-r--r--Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml26
-rw-r--r--Documentation/devicetree/bindings/media/raspberrypi,pispbe.yaml12
-rw-r--r--Documentation/devicetree/bindings/media/rc.txt1
-rw-r--r--Documentation/devicetree/bindings/media/samsung,fimc.yaml14
-rw-r--r--Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml16
-rw-r--r--Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml14
-rw-r--r--Documentation/devicetree/bindings/media/ti,cal.yaml52
-rw-r--r--Documentation/devicetree/bindings/mfd/ti,tps65910.yaml2
-rw-r--r--Documentation/devicetree/bindings/mux/reg-mux.yaml2
-rw-r--r--Documentation/devicetree/bindings/nvmem/zii,rave-sp-eeprom.yaml2
-rw-r--r--Documentation/devicetree/bindings/pci/hisilicon,kirin-pcie.yaml4
-rw-r--r--Documentation/devicetree/bindings/phy/st,stm32-usb2phy.yaml68
-rw-r--r--Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml2
-rw-r--r--Documentation/devicetree/bindings/power/mediatek,mt2701-scpsys.yaml184
-rw-r--r--Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.yaml9
-rw-r--r--Documentation/devicetree/bindings/regulator/vexpress.txt32
-rw-r--r--Documentation/devicetree/bindings/reset/st,stm32-rcc.txt6
-rw-r--r--Documentation/devicetree/bindings/reset/st,stm32mp1-rcc.txt6
-rw-r--r--Documentation/devicetree/bindings/scsi/hisilicon,hip05-sas-v1.yaml158
-rw-r--r--Documentation/devicetree/bindings/scsi/hisilicon-sas.txt98
-rw-r--r--Documentation/devicetree/bindings/soc/hisilicon/hisilicon,hip05-cpld.yaml35
-rw-r--r--Documentation/devicetree/bindings/soc/mediatek/mediatek,mt2701-g3dsys.yaml58
-rw-r--r--Documentation/devicetree/bindings/soc/mediatek/scpsys.txt79
-rw-r--r--Documentation/devicetree/bindings/soc/nuvoton/nuvoton,npcm-gcr.yaml18
-rw-r--r--Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml2
-rw-r--r--Documentation/devicetree/bindings/sound/mediatek,mt8173-rt5650.yaml73
-rw-r--r--Documentation/devicetree/bindings/sound/mt8173-rt5650.txt31
-rw-r--r--Documentation/devicetree/bindings/spi/aspeed,ast2600-fmc.yaml6
-rw-r--r--Documentation/devicetree/bindings/thermal/thermal-idle.yaml2
-rw-r--r--Documentation/devicetree/bindings/trivial-devices.yaml4
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.yaml2
-rw-r--r--Documentation/devicetree/of_unittest.rst2
-rw-r--r--Documentation/devicetree/overlay-notes.rst4
-rw-r--r--Documentation/translations/zh_CN/devicetree/overlay-notes.rst3
-rw-r--r--MAINTAINERS4
-rw-r--r--drivers/of/fdt_address.c2
-rw-r--r--drivers/of/irq.c39
-rw-r--r--drivers/of/overlay.c23
-rw-r--r--drivers/of/property.c23
-rw-r--r--include/dt-bindings/clock/agilex-clock.h1
-rw-r--r--include/linux/of.h6
-rwxr-xr-xscripts/dtc/dt-check-style934
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-blank-lines.dts37
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-child-name-order.dtso33
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-cont-align.dts27
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dts40
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dtso41
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-extend-node-child-name-order.dtso26
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-extend-node-digit-node-order.dtso34
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-line-length.dts22
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-node-name.dts60
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-property-name.dts28
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-property-order.dts18
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-property-order.dtso62
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-redundant-ws-strict.dts27
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-redundant-ws.dts28
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-redundant-ws.dtso9
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-trailing-ws.dts16
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-unused-label.dts21
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-blank-lines.yaml54
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-child-addr-order.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-child-name-order.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml9
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-digit-node-order.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-hex-case.yaml7
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-indent-strict.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-label-in-string.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-line-length.yaml5
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml4
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-multi-close.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-node-close.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-node-name.yaml54
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-prop-order-device-type.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-prop-order.yaml7
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-prop-pairing.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-property-name.yaml46
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws-strict.yaml31
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws.yaml35
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-required-blank.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-tab.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-trailing-comment.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-trailing-ws.yaml7
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-unclosed-comment.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-unit-addr-prefix.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-unit-addr.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-unused-label.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-value-ws-multiline.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-value-ws.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-blank-lines.dts.txt6
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dts.txt1
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dtso.txt3
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-cont-align.dts.txt11
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dts.txt2
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dtso.txt2
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-extend-node-child-name-order.dtso.txt2
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-extend-node-digit-node-order.dtso.txt2
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-line-length.dts.txt3
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-mixed-indent.dts.txt1
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-node-name.dts.txt13
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-property-name.dts.txt14
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt16
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-property-order.dtso.txt12
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-redundant-ws-strict.dts.txt13
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dts.txt10
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dtso.txt2
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt3
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-unused-label.dts.txt2
-rw-r--r--scripts/dtc/dt-style-selftest/expected/yaml-blank-lines.yaml.txt6
-rw-r--r--scripts/dtc/dt-style-selftest/expected/yaml-cont-align.yaml.txt4
-rw-r--r--scripts/dtc/dt-style-selftest/expected/yaml-hex-case.yaml.txt2
-rw-r--r--scripts/dtc/dt-style-selftest/expected/yaml-line-length.yaml.txt1
-rw-r--r--scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt1
-rw-r--r--scripts/dtc/dt-style-selftest/expected/yaml-node-name.yaml.txt7
-rw-r--r--scripts/dtc/dt-style-selftest/expected/yaml-prop-order.yaml.txt1
-rw-r--r--scripts/dtc/dt-style-selftest/expected/yaml-prop-pairing.yaml.txt4
-rw-r--r--scripts/dtc/dt-style-selftest/expected/yaml-property-name.yaml.txt14
-rw-r--r--scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws-strict.yaml.txt5
-rw-r--r--scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws.yaml.txt4
-rw-r--r--scripts/dtc/dt-style-selftest/expected/yaml-trailing-ws.yaml.txt2
-rw-r--r--scripts/dtc/dt-style-selftest/expected/yaml-value-ws-multiline.yaml.txt1
-rw-r--r--scripts/dtc/dt-style-selftest/good/dts-child-name-order.dtso44
-rw-r--r--scripts/dtc/dt-style-selftest/good/dts-cont-align.dts14
-rw-r--r--scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dts3
-rw-r--r--scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dtso59
-rw-r--r--scripts/dtc/dt-style-selftest/good/dts-extend-node-child-name-order.dtso26
-rw-r--r--scripts/dtc/dt-style-selftest/good/dts-extend-node-digit-node-order.dtso34
-rw-r--r--scripts/dtc/dt-style-selftest/good/dts-property-order.dts8
-rw-r--r--scripts/dtc/dt-style-selftest/good/dts-property-order.dtso50
-rw-r--r--scripts/dtc/dt-style-selftest/good/yaml-4space.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/good/yaml-cont-align.yaml33
-rw-r--r--scripts/dtc/dt-style-selftest/good/yaml-tricky-parsing.yaml2
-rwxr-xr-xscripts/dtc/dt-style-selftest/run.sh2
186 files changed, 3106 insertions, 1392 deletions
diff --git a/Documentation/devicetree/bindings/arm/arm,cci-400.yaml b/Documentation/devicetree/bindings/arm/arm,cci-400.yaml
index d28303d909e1..a4f086c2f9c4 100644
--- a/Documentation/devicetree/bindings/arm/arm,cci-400.yaml
+++ b/Documentation/devicetree/bindings/arm/arm,cci-400.yaml
@@ -45,7 +45,11 @@ patternProperties:
properties:
compatible:
- const: arm,cci-400-ctrl-if
+ oneOf:
+ - const: arm,cci-400-ctrl-if
+ - items:
+ - const: arm,cci-400-ctrl-if
+ - const: syscon
interface-type:
enum:
diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
index 949444aba1f8..f4101f94241a 100644
--- a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
+++ b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
@@ -308,7 +308,7 @@ examples:
arm,trig-in-sigs = <0 1>;
arm,trig-in-types = <PE_DBGTRIGGER
PE_PMUIRQ>;
- arm,trig-out-sigs = <0 1 2 >;
+ arm,trig-out-sigs = <0 1 2>;
arm,trig-out-types = <PE_EDBGREQ
PE_DBGRESTART
PE_CTIIRQ>;
diff --git a/Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml b/Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml
index 25a2b42105e5..052e23966a8f 100644
--- a/Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml
+++ b/Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml
@@ -48,7 +48,7 @@ properties:
const: debug_messages
reg:
- minItems: 1
+ maxItems: 1
mbox-names:
description: |
@@ -59,7 +59,7 @@ properties:
- const: tx
mboxes:
- minItems: 2
+ maxItems: 2
ti,host-id:
$ref: /schemas/types.yaml#/definitions/uint32
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.yaml
index 9aa39b002361..5ede7d277488 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.yaml
@@ -19,7 +19,7 @@ properties:
- enum:
- mediatek,mt2701-audsys
- mediatek,mt6765-audsys
- - mediatek,mt6779-audsys
+ - mediatek,mt6779-audio
- mediatek,mt7622-audsys
- mediatek,mt8167-audsys
- mediatek,mt8173-audsys
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,g3dsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,g3dsys.txt
deleted file mode 100644
index 7de43bf41fdc..000000000000
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,g3dsys.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-MediaTek g3dsys controller
-============================
-
-The MediaTek g3dsys controller provides various clocks and reset controller to
-the GPU.
-
-Required Properties:
-
-- compatible: Should be:
- - "mediatek,mt2701-g3dsys", "syscon":
- for MT2701 SoC
- - "mediatek,mt7623-g3dsys", "mediatek,mt2701-g3dsys", "syscon":
- for MT7623 SoC
-- #clock-cells: Must be 1
-- #reset-cells: Must be 1
-
-The g3dsys controller uses the common clk binding from
-Documentation/devicetree/bindings/clock/clock-bindings.txt
-The available clocks are defined in dt-bindings/clock/mt*-clk.h.
-
-Example:
-
-g3dsys: clock-controller@13000000 {
- compatible = "mediatek,mt7623-g3dsys",
- "mediatek,mt2701-g3dsys",
- "syscon";
- reg = <0 0x13000000 0 0x200>;
- #clock-cells = <1>;
- #reset-cells = <1>;
-};
diff --git a/Documentation/devicetree/bindings/arm/omap/mpu.txt b/Documentation/devicetree/bindings/arm/omap/mpu.txt
deleted file mode 100644
index e41490e6979c..000000000000
--- a/Documentation/devicetree/bindings/arm/omap/mpu.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-* TI - MPU (Main Processor Unit) subsystem
-
-The MPU subsystem contain one or several ARM cores
-depending of the version.
-The MPU contain CPUs, GIC, L2 cache and a local PRCM.
-
-Required properties:
-- compatible : Should be "ti,omap3-mpu" for OMAP3
- Should be "ti,omap4-mpu" for OMAP4
- Should be "ti,omap5-mpu" for OMAP5
-- ti,hwmods: "mpu"
-
-Optional properties:
-- sram: Phandle to the ocmcram node
-
-am335x and am437x only:
-- pm-sram: Phandles to ocmcram nodes to be used for power management.
- First should be type 'protect-exec' for the driver to use to copy
- and run PM functions, second should be regular pool to be used for
- data region for code. See Documentation/devicetree/bindings/sram/sram.yaml
- for more details.
-
-Examples:
-
-- For an OMAP5 SMP system:
-
-mpu {
- compatible = "ti,omap5-mpu";
- ti,hwmods = "mpu"
-};
-
-- For an OMAP4 SMP system:
-
-mpu {
- compatible = "ti,omap4-mpu";
- ti,hwmods = "mpu";
-};
-
-
-- For an OMAP3 monocore system:
-
-mpu {
- compatible = "ti,omap3-mpu";
- ti,hwmods = "mpu";
-};
-
-- For an AM335x system:
-
-mpu {
- compatible = "ti,omap3-mpu";
- ti,hwmods = "mpu";
- pm-sram = <&pm_sram_code
- &pm_sram_data>;
-};
diff --git a/Documentation/devicetree/bindings/arm/ti/ti,omap-mpu.yaml b/Documentation/devicetree/bindings/arm/ti/ti,omap-mpu.yaml
new file mode 100644
index 000000000000..abd8c64e8e9f
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/ti/ti,omap-mpu.yaml
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/ti/ti,omap-mpu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI MPU (Main Processor Unit) subsystem
+
+maintainers:
+ - Benoit Cousson <b-cousson@ti.com>
+
+description:
+ The MPU subsystem contains one or several ARM cores depending on the version.
+ The MPU contains CPUs, GIC, L2 cache and a local PRCM.
+
+properties:
+ compatible:
+ enum:
+ - ti,omap3-mpu
+ - ti,omap4-mpu
+ - ti,omap5-mpu
+
+ ti,hwmods:
+ $ref: /schemas/types.yaml#/definitions/string
+ description: Name of the hwmod associated with the MPU
+ const: mpu
+ deprecated: true
+
+ sram:
+ description: ocmcram node
+
+ pm-sram:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ description: ocmcram nodes for power management. For am335x and am437x.
+ items:
+ - items:
+ - description: ocmcram node of type protect-exec for PM functions
+ - items:
+ - description: ocmcram node of regular pool to be used for data region
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ mpu {
+ compatible = "ti,omap5-mpu";
+ ti,hwmods = "mpu";
+ };
+
+ - |
+ mpu {
+ compatible = "ti,omap3-mpu";
+ ti,hwmods = "mpu";
+ pm-sram = <&pm_sram_code &pm_sram_data>;
+ };
diff --git a/Documentation/devicetree/bindings/arm/vexpress-config.yaml b/Documentation/devicetree/bindings/arm/vexpress-config.yaml
index 41c53e3acc12..b04e8e052181 100644
--- a/Documentation/devicetree/bindings/arm/vexpress-config.yaml
+++ b/Documentation/devicetree/bindings/arm/vexpress-config.yaml
@@ -139,6 +139,10 @@ patternProperties:
"^regulator-.+$":
$ref: /schemas/regulator/regulator.yaml#
+ description:
+ If regulator-min-microvolt and regulator-max-microvolt do not both
+ define a range, the supply is treated as fixed and only its voltage
+ can be read.
properties:
compatible:
const: arm,vexpress-volt
diff --git a/Documentation/devicetree/bindings/bus/hisilicon,hisi-localbus.yaml b/Documentation/devicetree/bindings/bus/hisilicon,hisi-localbus.yaml
new file mode 100644
index 000000000000..56f13e21f24d
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/hisilicon,hisi-localbus.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/hisilicon,hisi-localbus.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: HiSilicon local bus
+
+maintainers:
+ - Wei Xu <xuwei5@hisilicon.com>
+
+allOf:
+ - $ref: /schemas/simple-bus.yaml#
+
+properties:
+ compatible:
+ items:
+ - const: hisilicon,hisi-localbus
+ - const: simple-bus
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ local-bus@80380000 {
+ compatible = "hisilicon,hisi-localbus", "simple-bus";
+ reg = <0x0 0x80380000 0x0 0x10000>;
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 0x0 0x90000000 0x08000000>,
+ <1 0 0x0 0x98000000 0x08000000>;
+ };
+ };
diff --git a/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt b/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt
deleted file mode 100644
index 18729f6fe1e5..000000000000
--- a/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-* OMAP OCP2SCP - ocp interface to scp interface
-
-properties:
-- compatible : Should be "ti,am437x-ocp2scp" for AM437x processor
- Should be "ti,omap-ocp2scp" for all others
-- reg : Address and length of the register set for the device
-- #address-cells, #size-cells : Must be present if the device has sub-nodes
-- ranges : the child address space are mapped 1:1 onto the parent address space
-- ti,hwmods : must be "ocp2scp_usb_phy"
-
-Sub-nodes:
-All the devices connected to ocp2scp are described using sub-node to ocp2scp
-
-ocp2scp@4a0ad000 {
- compatible = "ti,omap-ocp2scp";
- reg = <0x4a0ad000 0x1f>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
- ti,hwmods = "ocp2scp_usb_phy";
-
- subnode1 {
- ...
- };
-
- subnode2 {
- ...
- };
-};
diff --git a/Documentation/devicetree/bindings/bus/ti,omap-ocp2scp.yaml b/Documentation/devicetree/bindings/bus/ti,omap-ocp2scp.yaml
new file mode 100644
index 000000000000..a8852185144d
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/ti,omap-ocp2scp.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/ti,omap-ocp2scp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI OMAP OCP to SCP bus bridge
+
+maintainers:
+ - Kishon Vijay Abraham I <kishon@ti.com>
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - const: ti,am437x-ocp2scp
+ - const: ti,omap-ocp2scp
+ - const: ti,omap-ocp2scp
+
+ reg:
+ maxItems: 1
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 1
+
+ ranges: true
+
+ ti,hwmods:
+ $ref: /schemas/types.yaml#/definitions/string
+ description: Name of the hwmod associated with the device.
+ deprecated: true
+
+required:
+ - compatible
+ - "#address-cells"
+ - "#size-cells"
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: ti,am437x-ocp2scp
+ then:
+ properties:
+ reg: false
+ else:
+ required:
+ - reg
+
+additionalProperties:
+ type: object
+
+examples:
+ - |
+ ocp2scp@4a0ad000 {
+ compatible = "ti,omap-ocp2scp";
+ reg = <0x4a0ad000 0x1f>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ phy@80 {
+ compatible = "ti,omap-usb2";
+ reg = <0x80 0x58>;
+ ctrl-module = <&omap_control_usb2phy>;
+ clocks = <&usb_phy_cm_clk32k>;
+ clock-names = "wkupclk";
+ #phy-cells = <0>;
+ };
+ };
diff --git a/Documentation/devicetree/bindings/display/bridge/sil,sii9022.yaml b/Documentation/devicetree/bindings/display/bridge/sil,sii9022.yaml
index 17ea06719b56..b869552596f4 100644
--- a/Documentation/devicetree/bindings/display/bridge/sil,sii9022.yaml
+++ b/Documentation/devicetree/bindings/display/bridge/sil,sii9022.yaml
@@ -128,7 +128,7 @@ examples:
cvcc12-supply = <&v1v2_hdmi>;
#sound-dai-cells = <0>;
- sil,i2s-data-lanes = < 0 1 2 >;
+ sil,i2s-data-lanes = <0 1 2>;
clocks = <&mclk>;
clock-names = "mclk";
diff --git a/Documentation/devicetree/bindings/display/hisilicon/dw-dsi.txt b/Documentation/devicetree/bindings/display/hisilicon/dw-dsi.txt
deleted file mode 100644
index d270bfe4e4e0..000000000000
--- a/Documentation/devicetree/bindings/display/hisilicon/dw-dsi.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-Device-Tree bindings for DesignWare DSI Host Controller v1.20a driver
-
-A DSI Host Controller resides in the middle of display controller and external
-HDMI converter or panel.
-
-Required properties:
-- compatible: value should be "hisilicon,hi6220-dsi".
-- reg: physical base address and length of dsi controller's registers.
-- clocks: contains APB clock phandle + clock-specifier pair.
-- clock-names: should be "pclk".
-- ports: contains DSI controller input and output sub port.
- The input port connects to ADE output port with the reg value "0".
- The output port with the reg value "1", it could connect to panel or
- any other bridge endpoints.
- See Documentation/devicetree/bindings/graph.txt for more device graph info.
-
-A example of HiKey board hi6220 SoC and board specific DT entry:
-Example:
-
-SoC specific:
- dsi: dsi@f4107800 {
- compatible = "hisilicon,hi6220-dsi";
- reg = <0x0 0xf4107800 0x0 0x100>;
- clocks = <&media_ctrl HI6220_DSI_PCLK>;
- clock-names = "pclk";
- status = "disabled";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- /* 0 for input port */
- port@0 {
- reg = <0>;
- dsi_in: endpoint {
- remote-endpoint = <&ade_out>;
- };
- };
- };
- };
-
-
-Board specific:
- &dsi {
- status = "ok";
-
- ports {
- /* 1 for output port */
- port@1 {
- reg = <1>;
-
- dsi_out0: endpoint@0 {
- remote-endpoint = <&adv7533_in>;
- };
- };
- };
- };
-
- &i2c2 {
- ...
-
- adv7533: adv7533@39 {
- ...
-
- port {
- adv7533_in: endpoint {
- remote-endpoint = <&dsi_out0>;
- };
- };
- };
- };
-
diff --git a/Documentation/devicetree/bindings/display/hisilicon/hisi-ade.txt b/Documentation/devicetree/bindings/display/hisilicon/hisi-ade.txt
deleted file mode 100644
index 305a0e72a900..000000000000
--- a/Documentation/devicetree/bindings/display/hisilicon/hisi-ade.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-Device-Tree bindings for hisilicon ADE display controller driver
-
-ADE (Advanced Display Engine) is the display controller which grab image
-data from memory, do composition, do post image processing, generate RGB
-timing stream and transfer to DSI.
-
-Required properties:
-- compatible: value should be "hisilicon,hi6220-ade".
-- reg: physical base address and length of the ADE controller's registers.
-- hisilicon,noc-syscon: ADE NOC QoS syscon.
-- resets: The ADE reset controller node.
-- interrupt: the ldi vblank interrupt number used.
-- clocks: a list of phandle + clock-specifier pairs, one for each entry
- in clock-names.
-- clock-names: should contain:
- "clk_ade_core" for the ADE core clock.
- "clk_codec_jpeg" for the media NOC QoS clock, which use the same clock with
- jpeg codec.
- "clk_ade_pix" for the ADE pixel clock.
-- assigned-clocks: Should contain "clk_ade_core" and "clk_codec_jpeg" clocks'
- phandle + clock-specifier pairs.
-- assigned-clock-rates: clock rates, one for each entry in assigned-clocks.
- The rate of "clk_ade_core" could be "360000000" or "180000000";
- The rate of "clk_codec_jpeg" could be or less than "1440000000".
- These rate values could be configured according to performance and power
- consumption.
-- port: the output port. This contains one endpoint subnode, with its
- remote-endpoint set to the phandle of the connected DSI input endpoint.
- See Documentation/devicetree/bindings/graph.txt for more device graph info.
-
-Optional properties:
-- dma-coherent: Present if dma operations are coherent.
-
-
-A example of HiKey board hi6220 SoC specific DT entry:
-Example:
-
- ade: ade@f4100000 {
- compatible = "hisilicon,hi6220-ade";
- reg = <0x0 0xf4100000 0x0 0x7800>;
- reg-names = "ade_base";
- hisilicon,noc-syscon = <&medianoc_ade>;
- resets = <&media_ctrl MEDIA_ADE>;
- interrupts = <0 115 4>; /* ldi interrupt */
-
- clocks = <&media_ctrl HI6220_ADE_CORE>,
- <&media_ctrl HI6220_CODEC_JPEG>,
- <&media_ctrl HI6220_ADE_PIX_SRC>;
- /*clock name*/
- clock-names = "clk_ade_core",
- "clk_codec_jpeg",
- "clk_ade_pix";
-
- assigned-clocks = <&media_ctrl HI6220_ADE_CORE>,
- <&media_ctrl HI6220_CODEC_JPEG>;
- assigned-clock-rates = <360000000>, <288000000>;
- dma-coherent;
-
- port {
- ade_out: endpoint {
- remote-endpoint = <&dsi_in>;
- };
- };
- };
diff --git a/Documentation/devicetree/bindings/display/hisilicon/hisilicon,hi6220-ade.yaml b/Documentation/devicetree/bindings/display/hisilicon/hisilicon,hi6220-ade.yaml
new file mode 100644
index 000000000000..ec3d4b775a88
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/hisilicon/hisilicon,hi6220-ade.yaml
@@ -0,0 +1,95 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/hisilicon/hisilicon,hi6220-ade.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hisilicon ADE Display Controller
+
+maintainers:
+ - Xinliang Liu <z.liuxinliang@hisilicon.com>
+
+description:
+ ADE (Advanced Display Engine) is the display controller which grab image
+ data from memory, do composition, do post image processing, generate RGB
+ timing stream and transfer to DSI.
+
+properties:
+ compatible:
+ const: hisilicon,hi6220-ade
+
+ reg:
+ maxItems: 1
+
+ reg-names:
+ items:
+ - const: ade_base
+
+ clocks:
+ maxItems: 3
+
+ clock-names:
+ items:
+ - const: clk_ade_core
+ - const: clk_codec_jpeg
+ - const: clk_ade_pix
+
+ dma-coherent: true
+
+ interrupts:
+ items:
+ - description: LDI vblank interrupt specifier.
+
+ resets:
+ maxItems: 1
+
+ hisilicon,noc-syscon:
+ description: ADE NOC QoS syscon.
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ port:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: Output port containing an endpoint subnode.
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - clocks
+ - clock-names
+ - interrupts
+ - resets
+ - hisilicon,noc-syscon
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/hi6220-clock.h>
+ #include <dt-bindings/reset/hisi,hi6220-resets.h>
+
+ bus {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ ade@f4100000 {
+ compatible = "hisilicon,hi6220-ade";
+ reg = <0x0 0xf4100000 0x0 0x7800>;
+ reg-names = "ade_base";
+ clocks = <&media_ctrl HI6220_ADE_CORE>,
+ <&media_ctrl HI6220_CODEC_JPEG>,
+ <&media_ctrl HI6220_ADE_PIX_SRC>;
+ clock-names = "clk_ade_core", "clk_codec_jpeg", "clk_ade_pix";
+ dma-coherent;
+ interrupts = <0 115 4>;
+ resets = <&media_ctrl MEDIA_ADE>;
+ hisilicon,noc-syscon = <&medianoc_ade>;
+
+ port {
+ endpoint {
+ remote-endpoint = <&dsi_in>;
+ };
+ };
+ };
+ };
diff --git a/Documentation/devicetree/bindings/display/hisilicon/hisilicon,hi6220-dsi.yaml b/Documentation/devicetree/bindings/display/hisilicon/hisilicon,hi6220-dsi.yaml
new file mode 100644
index 000000000000..868ab185a71a
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/hisilicon/hisilicon,hi6220-dsi.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/hisilicon/hisilicon,hi6220-dsi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: HiSilicon DesignWare DSI Host Controller
+
+maintainers:
+ - Xinliang Liu <z.liuxinliang@hisilicon.com>
+
+properties:
+ compatible:
+ const: hisilicon,hi6220-dsi
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: pclk
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+
+ properties:
+ port@0:
+ description: Input port, connects to ADE output endpoint.
+ $ref: /schemas/graph.yaml#/properties/port
+
+ port@1:
+ description: Output port, connects to panel or bridge endpoints.
+ $ref: /schemas/graph.yaml#/properties/port
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - ports
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/hi6220-clock.h>
+
+ dsi@f4107800 {
+ compatible = "hisilicon,hi6220-dsi";
+ reg = <0xf4107800 0x100>;
+ clocks = <&media_ctrl HI6220_DSI_PCLK>;
+ clock-names = "pclk";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dsi_in: endpoint {
+ remote-endpoint = <&ade_out>;
+ };
+ };
+ };
+ };
diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi-ddc.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi-ddc.yaml
index bd8f7b8ae0ff..966127e1ee63 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi-ddc.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi-ddc.yaml
@@ -15,10 +15,13 @@ description: |
properties:
compatible:
- enum:
- - mediatek,mt7623-hdmi-ddc
- - mediatek,mt8167-hdmi-ddc
- - mediatek,mt8173-hdmi-ddc
+ oneOf:
+ - const: mediatek,mt8173-hdmi-ddc
+ - items:
+ - enum:
+ - mediatek,mt7623-hdmi-ddc
+ - mediatek,mt8167-hdmi-ddc
+ - const: mediatek,mt8173-hdmi-ddc
reg:
maxItems: 1
diff --git a/Documentation/devicetree/bindings/dts-coding-style.rst b/Documentation/devicetree/bindings/dts-coding-style.rst
index 63648db377e1..441436b7fa80 100644
--- a/Documentation/devicetree/bindings/dts-coding-style.rst
+++ b/Documentation/devicetree/bindings/dts-coding-style.rst
@@ -135,8 +135,9 @@ The above-described ordering follows this approach:
3. Status is the last information to annotate that device node is or is not
finished (board resources are needed).
-The individual properties inside each group shall use natural sort order by
-the property name.
+The individual properties inside each group shall use usually natural sort
+order by the property name, with exceptions of logical grouping of properties,
+e.g. supplies.
Example::
diff --git a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.yaml b/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.yaml
index 3c44fe607e12..acdc5c1d3d8b 100644
--- a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.yaml
+++ b/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.yaml
@@ -18,11 +18,9 @@ description: |
which can create the interprocessor communication (IPC) between the
CPU and BPMP.
- This node is a mailbox consumer. See the following files for details
- of the mailbox subsystem, and the specifiers implemented by the
- relevant provider(s):
+ This node is a mailbox consumer. See the following file for details
+ of the mailbox specifiers implemented by the relevant provider(s):
- - .../mailbox/mailbox.txt
- .../mailbox/nvidia,tegra186-hsp.yaml
This node is a clock, power domain, and reset provider. See the
diff --git a/Documentation/devicetree/bindings/gpio/delta,tn48m-gpio.yaml b/Documentation/devicetree/bindings/gpio/delta,tn48m-gpio.yaml
index e3e668a12091..698cc14b027f 100644
--- a/Documentation/devicetree/bindings/gpio/delta,tn48m-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/delta,tn48m-gpio.yaml
@@ -14,7 +14,7 @@ description: |
details see ../mfd/delta,tn48m-cpld.yaml.
Delta TN48M has an onboard Lattice CPLD that is used as an GPIO expander.
- It provides 12 pins in total, they are input-only or ouput-only type.
+ It provides 12 pins in total, they are input-only or output-only type.
properties:
compatible:
diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml
index c8d0d9192d92..d68fe8c7d010 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml
@@ -112,7 +112,13 @@ properties:
maxItems: 1
resets:
- maxItems: 1
+ minItems: 1
+ maxItems: 2
+
+ reset-names:
+ items:
+ - const: ao_g3d
+ - const: media_g3d
operating-points-v2: true
@@ -134,6 +140,23 @@ allOf:
properties:
compatible:
contains:
+ const: hisilicon,hi6220-mali
+ then:
+ properties:
+ resets:
+ minItems: 2
+ required:
+ - reset-names
+ else:
+ properties:
+ resets:
+ maxItems: 1
+ reset-names: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
enum:
- allwinner,sun4i-a10-mali
- allwinner,sun7i-a20-mali
diff --git a/Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml b/Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml
index e9218e0f363d..600445cd506d 100644
--- a/Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml
+++ b/Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml
@@ -37,6 +37,12 @@ properties:
- const: img,img-rogue
- items:
- enum:
+ - spacemit,k1-gpu
+ - const: img,img-bxe-2-32
+ - const: img,img-rogue
+ - items:
+ - enum:
+ - spacemit,k3-gpu
- thead,th1520-gpu
- const: img,img-bxm-4-64
- const: img,img-rogue
@@ -102,6 +108,8 @@ allOf:
compatible:
contains:
enum:
+ - spacemit,k1-gpu
+ - spacemit,k3-gpu
- ti,am62-gpu
- ti,am62p-gpu
- ti,j721s2-gpu
@@ -162,13 +170,16 @@ allOf:
properties:
compatible:
contains:
- const: thead,th1520-gpu
+ enum:
+ - spacemit,k1-gpu
+ - spacemit,k3-gpu
+ - thead,th1520-gpu
then:
properties:
power-domains:
items:
- - description: The single, unified power domain for the GPU on the
- TH1520 SoC, integrating all internal IP power domains.
+ - description: The single, unified power domain for the GPU,
+ integrating all internal IP power domains.
power-domain-names: false
required:
- power-domains
diff --git a/Documentation/devicetree/bindings/hwmon/adi,ltc2991.yaml b/Documentation/devicetree/bindings/hwmon/adi,ltc2991.yaml
index 1ff44cb22ef4..2210764a81bb 100644
--- a/Documentation/devicetree/bindings/hwmon/adi,ltc2991.yaml
+++ b/Documentation/devicetree/bindings/hwmon/adi,ltc2991.yaml
@@ -49,7 +49,7 @@ patternProperties:
shunt-resistor-micro-ohms:
description:
- The value of curent sense resistor in micro ohms. Pin configuration is
+ The value of current sense resistor in micro ohms. Pin configuration is
set for differential input pair.
adi,temperature-enable:
diff --git a/Documentation/devicetree/bindings/hwmon/vexpress.txt b/Documentation/devicetree/bindings/hwmon/vexpress.txt
deleted file mode 100644
index 4a4df4ffc460..000000000000
--- a/Documentation/devicetree/bindings/hwmon/vexpress.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Versatile Express hwmon sensors
--------------------------------
-
-Requires node properties:
-- "compatible" value : one of
- "arm,vexpress-volt"
- "arm,vexpress-amp"
- "arm,vexpress-temp"
- "arm,vexpress-power"
- "arm,vexpress-energy"
-- "arm,vexpress-sysreg,func" when controlled via vexpress-sysreg
- (see Documentation/devicetree/bindings/arm/vexpress-config.yaml
- for more details)
-
-Optional node properties:
-- label : string describing the monitored value
-
-Example:
- energy@0 {
- compatible = "arm,vexpress-energy";
- arm,vexpress-sysreg,func = <13 0>;
- label = "A15 Jcore";
- };
diff --git a/Documentation/devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml b/Documentation/devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml
index d1f26d5015f7..57caebe7af35 100644
--- a/Documentation/devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml
+++ b/Documentation/devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml
@@ -52,8 +52,8 @@ examples:
axi_iic_0: i2c@40800000 {
compatible = "xlnx,xps-iic-2.00.a";
clocks = <&clkc 15>;
- interrupts = < 1 2 >;
- reg = < 0x40800000 0x10000 >;
+ interrupts = <1 2>;
+ reg = <0x40800000 0x10000>;
#size-cells = <0>;
#address-cells = <1>;
diff --git a/Documentation/devicetree/bindings/iio/light/upisemi,us5182.yaml b/Documentation/devicetree/bindings/iio/light/upisemi,us5182.yaml
index dd78abe0ec8d..979d7e782290 100644
--- a/Documentation/devicetree/bindings/iio/light/upisemi,us5182.yaml
+++ b/Documentation/devicetree/bindings/iio/light/upisemi,us5182.yaml
@@ -69,7 +69,7 @@ examples:
light-sensor@39 {
compatible = "upisemi,usd5182";
reg = <0x39>;
- upisemi,glass-coef = < 1000 >;
+ upisemi,glass-coef = <1000>;
upisemi,dark-ths = /bits/ 16 <170 200 512 512 800 2000 4000 8000>;
upisemi,upper-dark-gain = /bits/ 8 <0x00>;
upisemi,lower-dark-gain = /bits/ 8 <0x16>;
diff --git a/Documentation/devicetree/bindings/input/matrix-keymap.yaml b/Documentation/devicetree/bindings/input/matrix-keymap.yaml
index ce910e4ac823..bef8f9813535 100644
--- a/Documentation/devicetree/bindings/input/matrix-keymap.yaml
+++ b/Documentation/devicetree/bindings/input/matrix-keymap.yaml
@@ -41,8 +41,7 @@ examples:
- |
keypad {
/* ... */
- linux,keymap = < 0x00030012
- 0x0102003a >;
+ linux,keymap = <0x00030012 0x0102003a>;
keypad,num-rows = <2>;
keypad,num-columns = <8>;
};
diff --git a/Documentation/devicetree/bindings/input/ti,tca8418.yaml b/Documentation/devicetree/bindings/input/ti,tca8418.yaml
index 624a1830d0b0..a8897c5c4d9d 100644
--- a/Documentation/devicetree/bindings/input/ti,tca8418.yaml
+++ b/Documentation/devicetree/bindings/input/ti,tca8418.yaml
@@ -46,16 +46,15 @@ examples:
interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
keypad,num-rows = <4>;
keypad,num-columns = <4>;
- linux,keymap = < MATRIX_KEY(0x00, 0x01, BTN_0)
- MATRIX_KEY(0x00, 0x00, BTN_1)
- MATRIX_KEY(0x01, 0x01, BTN_2)
- MATRIX_KEY(0x01, 0x00, BTN_3)
- MATRIX_KEY(0x02, 0x00, BTN_4)
- MATRIX_KEY(0x00, 0x03, BTN_5)
- MATRIX_KEY(0x00, 0x02, BTN_6)
- MATRIX_KEY(0x01, 0x03, BTN_7)
- MATRIX_KEY(0x01, 0x02, BTN_8)
- MATRIX_KEY(0x02, 0x02, BTN_9)
- >;
+ linux,keymap = <MATRIX_KEY(0x00, 0x01, BTN_0)
+ MATRIX_KEY(0x00, 0x00, BTN_1)
+ MATRIX_KEY(0x01, 0x01, BTN_2)
+ MATRIX_KEY(0x01, 0x00, BTN_3)
+ MATRIX_KEY(0x02, 0x00, BTN_4)
+ MATRIX_KEY(0x00, 0x03, BTN_5)
+ MATRIX_KEY(0x00, 0x02, BTN_6)
+ MATRIX_KEY(0x01, 0x03, BTN_7)
+ MATRIX_KEY(0x01, 0x02, BTN_8)
+ MATRIX_KEY(0x02, 0x02, BTN_9)>;
};
};
diff --git a/Documentation/devicetree/bindings/interrupt-controller/chrp,open-pic.yaml b/Documentation/devicetree/bindings/interrupt-controller/chrp,open-pic.yaml
index 642738512f3c..294af57a7c37 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/chrp,open-pic.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/chrp,open-pic.yaml
@@ -12,8 +12,9 @@ maintainers:
description:
This binding specifies what properties must be available in the device tree
representation of an Open PIC compliant interrupt controller. This binding is
- based on the binding defined for Open PIC in [1] and is a superset of that
- binding.
+ based on the binding defined for Open PIC in the Devicetree Specification
+ (available from https://www.devicetree.org/specifications/) and is a superset
+ of that binding.
properties:
compatible:
@@ -24,7 +25,7 @@ properties:
- const: chrp,open-pic
device_type:
- const: open-pci
+ const: open-pic
deprecated: true
reg:
diff --git a/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml b/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml
index 8162a49d49a6..3d31f8ed8bc7 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml
@@ -30,6 +30,7 @@ properties:
- qcom,glymur-pdc
- qcom,hawi-pdc
- qcom,kaanapali-pdc
+ - qcom,kuno-pdc
- qcom,maili-pdc
- qcom,milos-pdc
- qcom,nord-pdc
@@ -50,6 +51,7 @@ properties:
- qcom,sdx75-pdc
- qcom,sm4450-pdc
- qcom,sm6350-pdc
+ - qcom,sm7250-pdc
- qcom,sm8150-pdc
- qcom,sm8250-pdc
- qcom,sm8350-pdc
diff --git a/Documentation/devicetree/bindings/mailbox/allwinner,sun6i-a31-msgbox.yaml b/Documentation/devicetree/bindings/mailbox/allwinner,sun6i-a31-msgbox.yaml
index 87d31963c1b7..f58b0d412186 100644
--- a/Documentation/devicetree/bindings/mailbox/allwinner,sun6i-a31-msgbox.yaml
+++ b/Documentation/devicetree/bindings/mailbox/allwinner,sun6i-a31-msgbox.yaml
@@ -17,9 +17,6 @@ description: |
hold four 32-bit messages; when a FIFO is full, clients must wait before
attempting more transmissions.
- Refer to ./mailbox.txt for generic information about mailbox device-tree
- bindings.
-
properties:
compatible:
oneOf:
diff --git a/Documentation/devicetree/bindings/mailbox/altera-mailbox.txt b/Documentation/devicetree/bindings/mailbox/altera-mailbox.txt
index c4dd93f1fed2..87749d251f09 100644
--- a/Documentation/devicetree/bindings/mailbox/altera-mailbox.txt
+++ b/Documentation/devicetree/bindings/mailbox/altera-mailbox.txt
@@ -31,12 +31,12 @@ Example:
Mailbox client
===============
-"mboxes" and the optional "mbox-names" (please see
-Documentation/devicetree/bindings/mailbox/mailbox.txt for details). Each value
-of the mboxes property should contain a phandle to the mailbox controller
-device node and second argument is the channel index. It must be 0 (hardware
-support only one channel).The equivalent "mbox-names" property value can be
-used to give a name to the communication channel to be used by the client user.
+The common mailbox binding properties "mboxes" and the optional "mbox-names"
+can be used. Each value of the mboxes property should contain a phandle to
+the mailbox controller device node and second argument is the channel index.
+It must be 0 (hardware support only one channel). The equivalent "mbox-names"
+property value can be used to give a name to the communication channel to be
+used by the client user.
Example:
mclient0: mclient0@400 {
diff --git a/Documentation/devicetree/bindings/mailbox/hisilicon,hi3660-mailbox.txt b/Documentation/devicetree/bindings/mailbox/hisilicon,hi3660-mailbox.txt
index 3e5b4537407d..ec2da5c9e647 100644
--- a/Documentation/devicetree/bindings/mailbox/hisilicon,hi3660-mailbox.txt
+++ b/Documentation/devicetree/bindings/mailbox/hisilicon,hi3660-mailbox.txt
@@ -35,7 +35,7 @@ Client
Required properties:
- compatible : See the client docs
-- mboxes : Standard property to specify a Mailbox (See ./mailbox.txt)
+- mboxes : Standard property to specify a Mailbox
Cells must match 'mbox-cells' (See Controller docs above)
Optional properties
diff --git a/Documentation/devicetree/bindings/mailbox/hisilicon,hi6220-mailbox.txt b/Documentation/devicetree/bindings/mailbox/hisilicon,hi6220-mailbox.txt
index 044b17f3a77a..de9fbf722bee 100644
--- a/Documentation/devicetree/bindings/mailbox/hisilicon,hi6220-mailbox.txt
+++ b/Documentation/devicetree/bindings/mailbox/hisilicon,hi6220-mailbox.txt
@@ -55,7 +55,7 @@ Mailbox client
Required properties:
--------------------
- compatible: Many (See the client docs).
-- mboxes: Standard property to specify a Mailbox (See ./mailbox.txt)
+- mboxes: Standard property to specify a Mailbox
Cells must match 'mbox-cells' (See Mailbox Device Node above).
Optional Properties:
diff --git a/Documentation/devicetree/bindings/mailbox/mailbox.txt b/Documentation/devicetree/bindings/mailbox/mailbox.txt
deleted file mode 100644
index af8ecee2ac68..000000000000
--- a/Documentation/devicetree/bindings/mailbox/mailbox.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-* Generic Mailbox Controller and client driver bindings
-
-Generic binding to provide a way for Mailbox controller drivers to
-assign appropriate mailbox channel to client drivers.
-
-* Mailbox Controller
-
-Required property:
-- #mbox-cells: Must be at least 1. Number of cells in a mailbox
- specifier.
-
-Example:
- mailbox: mailbox {
- ...
- #mbox-cells = <1>;
- };
-
-
-* Mailbox Client
-
-Required property:
-- mboxes: List of phandle and mailbox channel specifiers.
-
-Optional property:
-- mbox-names: List of identifier strings for each mailbox channel.
-- shmem : List of phandle pointing to the shared memory(SHM) area between the
- users of these mailboxes for IPC, one for each mailbox. This shared
- memory can be part of any memory reserved for the purpose of this
- communication between the mailbox client and the remote.
-
-
-Example:
- pwr_cntrl: power {
- ...
- mbox-names = "pwr-ctrl", "rpc";
- mboxes = <&mailbox 0 &mailbox 1>;
- };
-
-Example with shared memory(shmem):
-
- sram: sram@50000000 {
- compatible = "mmio-sram";
- reg = <0x50000000 0x10000>;
-
- #address-cells = <1>;
- #size-cells = <1>;
- ranges = <0 0x50000000 0x10000>;
-
- cl_shmem: shmem@0 {
- compatible = "client-shmem";
- reg = <0x0 0x200>;
- };
- };
-
- client@2e000000 {
- ...
- mboxes = <&mailbox 0>;
- shmem = <&cl_shmem>;
- ..
- };
diff --git a/Documentation/devicetree/bindings/mailbox/ti,omap-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/ti,omap-mailbox.yaml
index 8504ceb64806..7e3b7b68841c 100644
--- a/Documentation/devicetree/bindings/mailbox/ti,omap-mailbox.yaml
+++ b/Documentation/devicetree/bindings/mailbox/ti,omap-mailbox.yaml
@@ -53,8 +53,7 @@ description: |
==============
A device needing to communicate with a target processor device should specify
them using the common mailbox binding properties, "mboxes" and the optional
- "mbox-names" (please see Documentation/devicetree/bindings/mailbox/mailbox.txt
- for details). Each value of the mboxes property should contain a phandle to
+ "mbox-names". Each value of the mboxes property should contain a phandle to
the mailbox controller device node and an args specifier that will be the
phandle to the intended sub-mailbox child node to be used for communication.
The equivalent "mbox-names" property value can be used to give a name to the
diff --git a/Documentation/devicetree/bindings/media/amlogic,c3-mipi-csi2.yaml b/Documentation/devicetree/bindings/media/amlogic,c3-mipi-csi2.yaml
index b0129beab0c3..2f11e5f45839 100644
--- a/Documentation/devicetree/bindings/media/amlogic,c3-mipi-csi2.yaml
+++ b/Documentation/devicetree/bindings/media/amlogic,c3-mipi-csi2.yaml
@@ -96,8 +96,8 @@ examples:
<0x0 0xff01a000 0x0 0x100>;
reg-names = "aphy", "dphy", "host";
power-domains = <&pwrc PWRC_C3_MIPI_ISP_WRAP_ID>;
- clocks = <&clkc_periphs CLKID_VAPB>,
- <&clkc_periphs CLKID_CSI_PHY0>;
+ clocks = <&clkc_periphs CLKID_VAPB>,
+ <&clkc_periphs CLKID_CSI_PHY0>;
clock-names = "vapb", "phy0";
assigned-clocks = <&clkc_periphs CLKID_VAPB>,
<&clkc_periphs CLKID_CSI_PHY0>;
diff --git a/Documentation/devicetree/bindings/media/arm,mali-c55.yaml b/Documentation/devicetree/bindings/media/arm,mali-c55.yaml
index fc4fcd19922a..39af7ffc70b4 100644
--- a/Documentation/devicetree/bindings/media/arm,mali-c55.yaml
+++ b/Documentation/devicetree/bindings/media/arm,mali-c55.yaml
@@ -79,7 +79,7 @@ examples:
port {
isp_in: endpoint {
- remote-endpoint = <&csi2_rx_out>;
+ remote-endpoint = <&csi2_rx_out>;
};
};
};
diff --git a/Documentation/devicetree/bindings/media/atmel,isc.yaml b/Documentation/devicetree/bindings/media/atmel,isc.yaml
index dc8aba698d78..5c84f372e81a 100644
--- a/Documentation/devicetree/bindings/media/atmel,isc.yaml
+++ b/Documentation/devicetree/bindings/media/atmel,isc.yaml
@@ -102,12 +102,12 @@ examples:
clock-output-names = "isc-mck";
port {
- isc_0: endpoint {
- remote-endpoint = <&ov7740_0>;
- hsync-active = <1>;
- vsync-active = <0>;
- pclk-sample = <1>;
- bus-width = <8>;
- };
+ isc_0: endpoint {
+ remote-endpoint = <&ov7740_0>;
+ hsync-active = <1>;
+ vsync-active = <0>;
+ pclk-sample = <1>;
+ bus-width = <8>;
+ };
};
};
diff --git a/Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml b/Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml
index 5fb5d60f069a..bfec4daccd0a 100644
--- a/Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml
+++ b/Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml
@@ -117,11 +117,11 @@ examples:
power-domains = <&power RPI_POWER_DOMAIN_UNICAM1>;
brcm,num-data-lanes = <2>;
port {
- csi1_ep: endpoint {
- remote-endpoint = <&imx219_0>;
- bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
- data-lanes = <1 2>;
- };
+ csi1_ep: endpoint {
+ remote-endpoint = <&imx219_0>;
+ bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
+ data-lanes = <1 2>;
+ };
};
};
...
diff --git a/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml b/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml
index 6ed9a5621064..cbc6249e8803 100644
--- a/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml
+++ b/Documentation/devicetree/bindings/media/cdns,csi2rx.yaml
@@ -160,50 +160,50 @@ examples:
phy-names = "dphy";
ports {
- #address-cells = <1>;
- #size-cells = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
- port@0 {
- reg = <0>;
+ port@0 {
+ reg = <0>;
- csi2rx_in_sensor: endpoint {
- remote-endpoint = <&sensor_out_csi2rx>;
- clock-lanes = <0>;
- data-lanes = <1 2>;
- };
+ csi2rx_in_sensor: endpoint {
+ remote-endpoint = <&sensor_out_csi2rx>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
};
+ };
- port@1 {
- reg = <1>;
+ port@1 {
+ reg = <1>;
- csi2rx_out_grabber0: endpoint {
- remote-endpoint = <&grabber0_in_csi2rx>;
- };
+ csi2rx_out_grabber0: endpoint {
+ remote-endpoint = <&grabber0_in_csi2rx>;
};
+ };
- port@2 {
- reg = <2>;
+ port@2 {
+ reg = <2>;
- csi2rx_out_grabber1: endpoint {
- remote-endpoint = <&grabber1_in_csi2rx>;
- };
+ csi2rx_out_grabber1: endpoint {
+ remote-endpoint = <&grabber1_in_csi2rx>;
};
+ };
- port@3 {
- reg = <3>;
+ port@3 {
+ reg = <3>;
- csi2rx_out_grabber2: endpoint {
- remote-endpoint = <&grabber2_in_csi2rx>;
- };
+ csi2rx_out_grabber2: endpoint {
+ remote-endpoint = <&grabber2_in_csi2rx>;
};
+ };
- port@4 {
- reg = <4>;
+ port@4 {
+ reg = <4>;
- csi2rx_out_grabber3: endpoint {
- remote-endpoint = <&grabber3_in_csi2rx>;
- };
+ csi2rx_out_grabber3: endpoint {
+ remote-endpoint = <&grabber3_in_csi2rx>;
};
+ };
};
};
diff --git a/Documentation/devicetree/bindings/media/hisilicon,hix5hd2-ir.yaml b/Documentation/devicetree/bindings/media/hisilicon,hix5hd2-ir.yaml
new file mode 100644
index 000000000000..cd836f266e5a
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/hisilicon,hix5hd2-ir.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/hisilicon,hix5hd2-ir.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: HiSilicon HIX5HD2 IR controller
+
+maintainers:
+ - Wei Xu <xuwei5@hisilicon.com>
+
+allOf:
+ - $ref: rc.yaml#
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - hisilicon,hix5hd2-ir
+ - hisilicon,hi3796cv300-ir
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ hisilicon,power-syscon:
+ description: Provide correct clocks instead.
+ $ref: /schemas/types.yaml#/definitions/phandle
+ deprecated: true
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ ir@f8001000 {
+ compatible = "hisilicon,hix5hd2-ir";
+ reg = <0xf8001000 0x1000>;
+ interrupts = <0 47 4>;
+ clocks = <&clock 0>;
+ linux,rc-map-name = "rc-tivo";
+ };
diff --git a/Documentation/devicetree/bindings/media/hix5hd2-ir.txt b/Documentation/devicetree/bindings/media/hix5hd2-ir.txt
deleted file mode 100644
index ca4cf774662e..000000000000
--- a/Documentation/devicetree/bindings/media/hix5hd2-ir.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-Device-Tree bindings for hix5hd2 ir IP
-
-Required properties:
- - compatible: Should contain "hisilicon,hix5hd2-ir", or:
- - "hisilicon,hi3796cv300-ir" for Hi3796CV300 IR device.
- - reg: Base physical address of the controller and length of memory
- mapped region.
- - interrupts: interrupt-specifier for the sole interrupt generated by
- the device. The interrupt specifier format depends on the interrupt
- controller parent.
- - clocks: clock phandle and specifier pair.
-
-Optional properties:
- - linux,rc-map-name: see rc.txt file in the same directory.
- - hisilicon,power-syscon: DEPRECATED. Don't use this in new dts files.
- Provide correct clocks instead.
-
-Example node:
-
- ir: ir@f8001000 {
- compatible = "hisilicon,hix5hd2-ir";
- reg = <0xf8001000 0x1000>;
- interrupts = <0 47 4>;
- clocks = <&clock HIX5HD2_IR_CLOCK>;
- linux,rc-map-name = "rc-tivo";
- };
diff --git a/Documentation/devicetree/bindings/media/i2c/galaxycore,gc05a2.yaml b/Documentation/devicetree/bindings/media/i2c/galaxycore,gc05a2.yaml
index 0e7a7b5ac89f..99d728c47cfb 100644
--- a/Documentation/devicetree/bindings/media/i2c/galaxycore,gc05a2.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/galaxycore,gc05a2.yaml
@@ -88,7 +88,7 @@ examples:
#size-cells = <0>;
sensor@37 {
- compatible = "galaxycore,gc05a2";
+ compatible = "galaxycore,gc05a2";
reg = <0x37>;
clocks = <&gc05a2_clk>;
diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov2680.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov2680.yaml
index 634d3b821b8c..83f84a7828bf 100644
--- a/Documentation/devicetree/bindings/media/i2c/ovti,ov2680.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov2680.yaml
@@ -90,22 +90,22 @@ examples:
#size-cells = <0>;
ov2680: camera-sensor@36 {
- compatible = "ovti,ov2680";
- reg = <0x36>;
- clocks = <&osc>;
- clock-names = "xvclk";
- reset-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
-
- DOVDD-supply = <&sw2_reg>;
- DVDD-supply = <&sw2_reg>;
- AVDD-supply = <&reg_peri_3p15v>;
-
- port {
- ov2680_to_mipi: endpoint {
- remote-endpoint = <&mipi_from_sensor>;
- link-frequencies = /bits/ 64 <330000000>;
- };
+ compatible = "ovti,ov2680";
+ reg = <0x36>;
+ clocks = <&osc>;
+ clock-names = "xvclk";
+ reset-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
+
+ DOVDD-supply = <&sw2_reg>;
+ DVDD-supply = <&sw2_reg>;
+ AVDD-supply = <&reg_peri_3p15v>;
+
+ port {
+ ov2680_to_mipi: endpoint {
+ remote-endpoint = <&mipi_from_sensor>;
+ link-frequencies = /bits/ 64 <330000000>;
};
+ };
};
};
diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov2732.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov2732.yaml
index 814fc568c550..b6b5145802e7 100644
--- a/Documentation/devicetree/bindings/media/i2c/ovti,ov2732.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov2732.yaml
@@ -94,9 +94,9 @@ examples:
port {
camera_out: endpoint {
- data-lanes = <1 2>;
- link-frequencies = /bits/ 64 <360000000>;
- remote-endpoint = <&mipi_in_camera>;
+ data-lanes = <1 2>;
+ link-frequencies = /bits/ 64 <360000000>;
+ remote-endpoint = <&mipi_in_camera>;
};
};
};
diff --git a/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml b/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml
index 085020cb9e61..b6f80098beb7 100644
--- a/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml
+++ b/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml
@@ -61,15 +61,15 @@ examples:
#include <dt-bindings/interrupt-controller/irq.h>
soc {
- #address-cells = <2>;
- #size-cells = <2>;
- jpeg-encoder@fd20000 {
- compatible = "img,e5010-jpeg-enc";
- reg = <0x00 0xfd20000 0x00 0x100>,
- <0x00 0xfd20200 0x00 0x200>;
- reg-names = "core", "mmu";
- clocks = <&k3_clks 201 0>;
- power-domains = <&k3_pds 201 TI_SCI_PD_EXCLUSIVE>;
- interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
- };
+ #address-cells = <2>;
+ #size-cells = <2>;
+ jpeg-encoder@fd20000 {
+ compatible = "img,e5010-jpeg-enc";
+ reg = <0x00 0xfd20000 0x00 0x100>,
+ <0x00 0xfd20200 0x00 0x200>;
+ reg-names = "core", "mmu";
+ clocks = <&k3_clks 201 0>;
+ power-domains = <&k3_pds 201 TI_SCI_PD_EXCLUSIVE>;
+ interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+ };
};
diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
index 4505e66876a2..551e483f3e51 100644
--- a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
+++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
@@ -160,7 +160,7 @@ examples:
vcodec_enc_vp8: vcodec@19002000 {
compatible = "mediatek,mt8173-vcodec-enc-vp8";
- reg = <0x19002000 0x1000>; /* VENC_LT_SYS */
+ reg = <0x19002000 0x1000>; /* VENC_LT_SYS */
interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_LOW>;
iommus = <&iommu M4U_PORT_VENC_RCPU_SET2>,
<&iommu M4U_PORT_VENC_REC_FRM_SET2>,
diff --git a/Documentation/devicetree/bindings/media/mediatek-jpeg-decoder.yaml b/Documentation/devicetree/bindings/media/mediatek-jpeg-decoder.yaml
index 654360c19c48..0f5c397ea763 100644
--- a/Documentation/devicetree/bindings/media/mediatek-jpeg-decoder.yaml
+++ b/Documentation/devicetree/bindings/media/mediatek-jpeg-decoder.yaml
@@ -106,8 +106,8 @@ examples:
compatible = "mediatek,mt2701-jpgdec";
reg = <0x15004000 0x1000>;
interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&imgsys CLK_IMG_JPGDEC_SMI>,
- <&imgsys CLK_IMG_JPGDEC>;
+ clocks = <&imgsys CLK_IMG_JPGDEC_SMI>,
+ <&imgsys CLK_IMG_JPGDEC>;
clock-names = "jpgdec-smi",
"jpgdec";
power-domains = <&scpsys MT2701_POWER_DOMAIN_ISP>;
diff --git a/Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml b/Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml
index d2f035715a2e..1f636bc25438 100644
--- a/Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml
+++ b/Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml
@@ -93,7 +93,7 @@ examples:
"mediatek,mtk-jpgenc";
reg = <0x1500a000 0x1000>;
interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&imgsys CLK_IMG_VENC>;
+ clocks = <&imgsys CLK_IMG_VENC>;
clock-names = "jpgenc";
power-domains = <&scpsys MT2701_POWER_DOMAIN_ISP>;
iommus = <&iommu MT2701_M4U_PORT_JPGENC_RDMA>,
diff --git a/Documentation/devicetree/bindings/media/microchip,csi2dc.yaml b/Documentation/devicetree/bindings/media/microchip,csi2dc.yaml
index b3a345fc6464..d06987680ed8 100644
--- a/Documentation/devicetree/bindings/media/microchip,csi2dc.yaml
+++ b/Documentation/devicetree/bindings/media/microchip,csi2dc.yaml
@@ -149,22 +149,22 @@ examples:
clock-names = "pclk", "scck";
ports {
- #address-cells = <1>;
- #size-cells = <0>;
- port@0 {
- reg = <0>; /* must be 0, first child port */
- csi2dc_in: endpoint { /* input from IDI interface */
- bus-type = <4>; /* MIPI CSI2 D-PHY */
- remote-endpoint = <&csi2host_out>;
- };
- };
-
- port@1 {
- reg = <1>; /* must be 1, second child port */
- csi2dc_out: endpoint {
- remote-endpoint = <&xisc_in>; /* output to sensor controller */
- };
- };
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>; /* must be 0, first child port */
+ csi2dc_in: endpoint { /* input from IDI interface */
+ bus-type = <4>; /* MIPI CSI2 D-PHY */
+ remote-endpoint = <&csi2host_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>; /* must be 1, second child port */
+ csi2dc_out: endpoint {
+ remote-endpoint = <&xisc_in>; /* output to sensor controller */
+ };
+ };
};
};
@@ -181,18 +181,18 @@ examples:
dma-names = "rx";
ports {
- #address-cells = <1>;
- #size-cells = <0>;
- port@0 {
- reg = <0>; /* must be 0, first child port */
- csi2dc_input: endpoint { /* input from IDI interface */
- remote-endpoint = <&csi2host_out>;
- };
- };
-
- port@1 {
- reg = <1>;
- };
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>; /* must be 0, first child port */
+ csi2dc_input: endpoint { /* input from IDI interface */
+ remote-endpoint = <&csi2host_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ };
};
};
diff --git a/Documentation/devicetree/bindings/media/microchip,xisc.yaml b/Documentation/devicetree/bindings/media/microchip,xisc.yaml
index 25f5f79d40ce..6a9e56c486c2 100644
--- a/Documentation/devicetree/bindings/media/microchip,xisc.yaml
+++ b/Documentation/devicetree/bindings/media/microchip,xisc.yaml
@@ -118,12 +118,12 @@ examples:
clock-output-names = "isc-mck";
port {
- xisc_in: endpoint {
- bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
- remote-endpoint = <&csi2dc_out>;
- hsync-active = <1>;
- vsync-active = <1>;
- bus-width = <12>;
- };
+ xisc_in: endpoint {
+ bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
+ remote-endpoint = <&csi2dc_out>;
+ hsync-active = <1>;
+ vsync-active = <1>;
+ bus-width = <12>;
+ };
};
};
diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
index 6ba668aa633d..4727dd7040a8 100644
--- a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
+++ b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
@@ -95,7 +95,7 @@ examples:
jpegdec: jpegdec@58400000 {
compatible = "nxp,imx8qxp-jpgdec";
- reg = <0x58400000 0x00050000 >;
+ reg = <0x58400000 0x00050000>;
clocks = <&img_jpeg_dec_lpcg IMX_LPCG_CLK_0>,
<&img_jpeg_dec_lpcg IMX_LPCG_CLK_4>;
interrupts = <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
@@ -111,7 +111,7 @@ examples:
jpegenc: jpegenc@58450000 {
compatible = "nxp,imx8qm-jpgenc", "nxp,imx8qxp-jpgenc";
- reg = <0x58450000 0x00050000 >;
+ reg = <0x58450000 0x00050000>;
clocks = <&img_jpeg_enc_lpcg IMX_LPCG_CLK_0>,
<&img_jpeg__lpcg IMX_LPCG_CLK_4>;
interrupts = <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/Documentation/devicetree/bindings/media/qcom,msm8996-venus.yaml b/Documentation/devicetree/bindings/media/qcom,msm8996-venus.yaml
index 56c16458e3bb..389b545c9631 100644
--- a/Documentation/devicetree/bindings/media/qcom,msm8996-venus.yaml
+++ b/Documentation/devicetree/bindings/media/qcom,msm8996-venus.yaml
@@ -119,26 +119,26 @@ examples:
<&mmcc VIDEO_MAXI_CLK>;
clock-names = "core", "iface", "bus", "mbus";
power-domains = <&mmcc VENUS_GDSC>;
- iommus = <&venus_smmu 0x00>,
- <&venus_smmu 0x01>,
- <&venus_smmu 0x0a>,
- <&venus_smmu 0x07>,
- <&venus_smmu 0x0e>,
- <&venus_smmu 0x0f>,
- <&venus_smmu 0x08>,
- <&venus_smmu 0x09>,
- <&venus_smmu 0x0b>,
- <&venus_smmu 0x0c>,
- <&venus_smmu 0x0d>,
- <&venus_smmu 0x10>,
- <&venus_smmu 0x11>,
- <&venus_smmu 0x21>,
- <&venus_smmu 0x28>,
- <&venus_smmu 0x29>,
- <&venus_smmu 0x2b>,
- <&venus_smmu 0x2c>,
- <&venus_smmu 0x2d>,
- <&venus_smmu 0x31>;
+ iommus = <&venus_smmu 0x00>,
+ <&venus_smmu 0x01>,
+ <&venus_smmu 0x0a>,
+ <&venus_smmu 0x07>,
+ <&venus_smmu 0x0e>,
+ <&venus_smmu 0x0f>,
+ <&venus_smmu 0x08>,
+ <&venus_smmu 0x09>,
+ <&venus_smmu 0x0b>,
+ <&venus_smmu 0x0c>,
+ <&venus_smmu 0x0d>,
+ <&venus_smmu 0x10>,
+ <&venus_smmu 0x11>,
+ <&venus_smmu 0x21>,
+ <&venus_smmu 0x28>,
+ <&venus_smmu 0x29>,
+ <&venus_smmu 0x2b>,
+ <&venus_smmu 0x2c>,
+ <&venus_smmu 0x2d>,
+ <&venus_smmu 0x31>;
memory-region = <&venus_mem>;
video-decoder {
diff --git a/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml b/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml
index 57a838fe2d22..2599c3a1024b 100644
--- a/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml
+++ b/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml
@@ -302,19 +302,19 @@ examples:
"vfe_lite_cphy_rx",
"vfe_lite_csid";
- interrupts = <GIC_SPI 464 IRQ_TYPE_EDGE_RISING>,
- <GIC_SPI 466 IRQ_TYPE_EDGE_RISING>,
- <GIC_SPI 431 IRQ_TYPE_EDGE_RISING>,
- <GIC_SPI 468 IRQ_TYPE_EDGE_RISING>,
- <GIC_SPI 359 IRQ_TYPE_EDGE_RISING>,
- <GIC_SPI 477 IRQ_TYPE_EDGE_RISING>,
- <GIC_SPI 478 IRQ_TYPE_EDGE_RISING>,
- <GIC_SPI 479 IRQ_TYPE_EDGE_RISING>,
- <GIC_SPI 122 IRQ_TYPE_EDGE_RISING>,
- <GIC_SPI 465 IRQ_TYPE_EDGE_RISING>,
- <GIC_SPI 467 IRQ_TYPE_EDGE_RISING>,
- <GIC_SPI 469 IRQ_TYPE_EDGE_RISING>,
- <GIC_SPI 360 IRQ_TYPE_EDGE_RISING>;
+ interrupts = <GIC_SPI 464 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 466 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 431 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 468 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 359 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 477 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 478 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 479 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 122 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 465 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 467 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 469 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 360 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "csid0",
"csid1",
diff --git a/Documentation/devicetree/bindings/media/raspberrypi,pispbe.yaml b/Documentation/devicetree/bindings/media/raspberrypi,pispbe.yaml
index 1fc62a1d8eda..36fde927382a 100644
--- a/Documentation/devicetree/bindings/media/raspberrypi,pispbe.yaml
+++ b/Documentation/devicetree/bindings/media/raspberrypi,pispbe.yaml
@@ -53,11 +53,11 @@ examples:
#address-cells = <2>;
#size-cells = <2>;
- isp@880000 {
- compatible = "brcm,bcm2712-pispbe", "raspberrypi,pispbe";
- reg = <0x10 0x00880000 0x0 0x4000>;
- interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&firmware_clocks 7>;
- iommus = <&iommu2>;
+ isp@880000 {
+ compatible = "brcm,bcm2712-pispbe", "raspberrypi,pispbe";
+ reg = <0x10 0x00880000 0x0 0x4000>;
+ interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&firmware_clocks 7>;
+ iommus = <&iommu2>;
};
};
diff --git a/Documentation/devicetree/bindings/media/rc.txt b/Documentation/devicetree/bindings/media/rc.txt
deleted file mode 100644
index be629f7fa77e..000000000000
--- a/Documentation/devicetree/bindings/media/rc.txt
+++ /dev/null
@@ -1 +0,0 @@
-This file has been moved to rc.yaml.
diff --git a/Documentation/devicetree/bindings/media/samsung,fimc.yaml b/Documentation/devicetree/bindings/media/samsung,fimc.yaml
index 1bfba84f8854..1329d4ee0705 100644
--- a/Documentation/devicetree/bindings/media/samsung,fimc.yaml
+++ b/Documentation/devicetree/bindings/media/samsung,fimc.yaml
@@ -188,13 +188,13 @@ examples:
/* ... CSIS 1 */
fimc-lite@b90000 {
- compatible = "samsung,exynos4212-fimc-lite";
- reg = <0xb90000 0x1000>;
- interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&pd_isp>;
- clocks = <&isp_clock CLK_ISP_FIMC_LITE0>;
- clock-names = "flite";
- iommus = <&sysmmu_fimc_lite0>;
+ compatible = "samsung,exynos4212-fimc-lite";
+ reg = <0xb90000 0x1000>;
+ interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&pd_isp>;
+ clocks = <&isp_clock CLK_ISP_FIMC_LITE0>;
+ clock-names = "flite";
+ iommus = <&sysmmu_fimc_lite0>;
};
/* ... FIMC-LITE 1 */
diff --git a/Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml b/Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml
index 7c2ddd27780f..cb0116176c3f 100644
--- a/Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml
+++ b/Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml
@@ -120,14 +120,14 @@ examples:
dma-names = "tx";
port {
- dcmi_0: endpoint {
- remote-endpoint = <&ov5640_0>;
- bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
- bus-width = <8>;
- hsync-active = <0>;
- vsync-active = <0>;
- pclk-sample = <1>;
- };
+ dcmi_0: endpoint {
+ remote-endpoint = <&ov5640_0>;
+ bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
+ bus-width = <8>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ pclk-sample = <1>;
+ };
};
};
diff --git a/Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml b/Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml
index 162a0c526d5d..0bf7c674dd97 100644
--- a/Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml
+++ b/Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml
@@ -120,13 +120,13 @@ examples:
clocks = <&rcc DCMIPP_K>;
port {
- endpoint {
- remote-endpoint = <&mipid02_2>;
- bus-width = <8>;
- hsync-active = <0>;
- vsync-active = <0>;
- pclk-sample = <0>;
- };
+ endpoint {
+ remote-endpoint = <&mipid02_2>;
+ bus-width = <8>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ pclk-sample = <0>;
+ };
};
};
diff --git a/Documentation/devicetree/bindings/media/ti,cal.yaml b/Documentation/devicetree/bindings/media/ti,cal.yaml
index f1a940a110d2..c223b4f2d75a 100644
--- a/Documentation/devicetree/bindings/media/ti,cal.yaml
+++ b/Documentation/devicetree/bindings/media/ti,cal.yaml
@@ -136,17 +136,17 @@ examples:
ti,camerrx-control = <&scm_conf 0xE94>;
ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- csi2_0: port@0 {
- reg = <0>;
- csi2_phy0: endpoint {
- remote-endpoint = <&csi2_cam0>;
- clock-lanes = <0>;
- data-lanes = <1 2>;
- };
- };
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi2_0: port@0 {
+ reg = <0>;
+ csi2_phy0: endpoint {
+ remote-endpoint = <&csi2_cam0>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
};
};
@@ -156,21 +156,21 @@ examples:
#size-cells = <0>;
camera-sensor@3c {
- compatible = "ovti,ov5640";
- reg = <0x3c>;
- AVDD-supply = <&reg_2p8v>;
- DOVDD-supply = <&reg_1p8v>;
- DVDD-supply = <&reg_1p5v>;
- clocks = <&clk_ov5640_fixed>;
- clock-names = "xclk";
-
- port {
- csi2_cam0: endpoint {
- remote-endpoint = <&csi2_phy0>;
- clock-lanes = <0>;
- data-lanes = <1 2>;
- };
- };
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+ AVDD-supply = <&reg_2p8v>;
+ DOVDD-supply = <&reg_1p8v>;
+ DVDD-supply = <&reg_1p5v>;
+ clocks = <&clk_ov5640_fixed>;
+ clock-names = "xclk";
+
+ port {
+ csi2_cam0: endpoint {
+ remote-endpoint = <&csi2_phy0>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
};
};
diff --git a/Documentation/devicetree/bindings/mfd/ti,tps65910.yaml b/Documentation/devicetree/bindings/mfd/ti,tps65910.yaml
index 798d27099401..29f1901db6c9 100644
--- a/Documentation/devicetree/bindings/mfd/ti,tps65910.yaml
+++ b/Documentation/devicetree/bindings/mfd/ti,tps65910.yaml
@@ -222,7 +222,7 @@ examples:
compatible = "ti,tps65910";
reg = <0x2d>;
interrupt-parent = <&intc>;
- interrupts = < 0 118 0x04 >;
+ interrupts = <0 118 0x04>;
#gpio-cells = <2>;
gpio-controller;
diff --git a/Documentation/devicetree/bindings/mux/reg-mux.yaml b/Documentation/devicetree/bindings/mux/reg-mux.yaml
index dc4be092fc2f..c8de11a90d90 100644
--- a/Documentation/devicetree/bindings/mux/reg-mux.yaml
+++ b/Documentation/devicetree/bindings/mux/reg-mux.yaml
@@ -22,7 +22,7 @@ properties:
reg: true
'#mux-control-cells':
- const: 1
+ enum: [ 0, 1 ]
mux-reg-masks:
$ref: /schemas/types.yaml#/definitions/uint32-matrix
diff --git a/Documentation/devicetree/bindings/nvmem/zii,rave-sp-eeprom.yaml b/Documentation/devicetree/bindings/nvmem/zii,rave-sp-eeprom.yaml
index d073c51c2b9a..e0aacecd652d 100644
--- a/Documentation/devicetree/bindings/nvmem/zii,rave-sp-eeprom.yaml
+++ b/Documentation/devicetree/bindings/nvmem/zii,rave-sp-eeprom.yaml
@@ -27,7 +27,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/string
description:
Unique EEPROM identifier describing its function in the
- system. Will be used as created NVMEM deivce's name.
+ system. Will be used as created NVMEM device's name.
required:
- compatible
diff --git a/Documentation/devicetree/bindings/pci/hisilicon,kirin-pcie.yaml b/Documentation/devicetree/bindings/pci/hisilicon,kirin-pcie.yaml
index e863519f3161..b6801057e31e 100644
--- a/Documentation/devicetree/bindings/pci/hisilicon,kirin-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/hisilicon,kirin-pcie.yaml
@@ -160,7 +160,7 @@ examples:
reg = <0x2800 0 0 0 0>;
compatible = "pciclass,0604";
device_type = "pci";
- reset-gpios = <&gpio27 4 0 >;
+ reset-gpios = <&gpio27 4 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
@@ -170,7 +170,7 @@ examples:
reg = <0x03800 0 0 0 0>;
compatible = "pciclass,0604";
device_type = "pci";
- reset-gpios = <&gpio25 2 0 >;
+ reset-gpios = <&gpio25 2 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
diff --git a/Documentation/devicetree/bindings/phy/st,stm32-usb2phy.yaml b/Documentation/devicetree/bindings/phy/st,stm32-usb2phy.yaml
new file mode 100644
index 000000000000..c76e94c044e6
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/st,stm32-usb2phy.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/st,stm32-usb2phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics STM32 MPU High-Speed USB PHY
+
+description:
+ USB2 PHY block in STM32 is attached to USB 2.0 Host controller and
+ USB 2.0 side of DWC3 DRD controller, and provides the USB LS/FS/HS
+ connectivity. Both PHYs are the FEMTO-PHY, but their configuration
+ bits in the system control register are different for each variant.
+
+maintainers:
+ - Fabrice Gasnier <fabrice.gasnier@foss.st.com>
+ - Marek Vasut <marex@nabladev.com>
+ - Pankaj Dev <pankaj.dev@st.com>
+
+properties:
+ compatible:
+ enum:
+ - st,stm32mp25-usb2phy1
+ - st,stm32mp25-usb2phy2
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ vdd33-supply:
+ description: Phandle to regulator providing 3V3 power supply to the USB2 HS PHY
+
+ "#clock-cells":
+ const: 1
+
+ "#phy-cells":
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - resets
+ - vdd33-supply
+ - "#clock-cells"
+ - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/st,stm32mp25-rcc.h>
+ #include <dt-bindings/reset/st,stm32mp25-rcc.h>
+
+ usb-phy@2400 {
+ compatible = "st,stm32mp25-usb2phy1";
+ reg = <0x2400 0x24>;
+ #phy-cells = <0>;
+ #clock-cells = <1>;
+ clocks = <&rcc CK_KER_USB2PHY1>;
+ resets = <&rcc USB2PHY1_R>;
+ vdd33-supply = <&vdd33usb>;
+ };
diff --git a/Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml
index 94b868c7ceb1..0084350ec579 100644
--- a/Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml
@@ -339,7 +339,7 @@ examples:
sdcard-pins {
function = "SD_CARD";
groups = "SD_CARD";
- sunplus,pins = < SPPCTL_IOPAD(91, SPPCTL_PCTL_G_GPIO, 0, 0) >;
+ sunplus,pins = <SPPCTL_IOPAD(91, SPPCTL_PCTL_G_GPIO, 0, 0)>;
};
hdmi_A_tx1-pins {
diff --git a/Documentation/devicetree/bindings/power/mediatek,mt2701-scpsys.yaml b/Documentation/devicetree/bindings/power/mediatek,mt2701-scpsys.yaml
new file mode 100644
index 000000000000..75c84abc865f
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/mediatek,mt2701-scpsys.yaml
@@ -0,0 +1,184 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/mediatek,mt2701-scpsys.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek SCPSYS
+
+maintainers:
+ - Matthias Brugger <matthias.bgg@gmail.com>
+ - AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
+
+description: >
+ The System Control Processor System (SCPSYS) has several power management
+ related tasks in the system. The tasks include thermal measurement, dynamic
+ voltage frequency scaling (DVFS), interrupt filter and lowlevel sleep control.
+ The System Power Manager (SPM) inside the SCPSYS is for the MTCMOS power
+ domain control.
+
+ It provides the power domains defined in:
+ - include/dt-bindings/power/mt2701-power.h
+ - include/dt-bindings/power/mt2712-power.h
+ - include/dt-bindings/power/mt6797-power.h
+ - include/dt-bindings/power/mt7622-power.h
+ - include/dt-bindings/power/mt7623a-power.h
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - mediatek,mt7623a-scpsys
+ - mediatek,mt6797-scpsys
+ - items:
+ - enum:
+ - mediatek,mt2701-scpsys
+ - mediatek,mt2712-scpsys
+ - mediatek,mt7622-scpsys
+ - const: syscon
+ - items:
+ - const: mediatek,mt7623-scpsys
+ - const: mediatek,mt2701-scpsys
+ - const: syscon
+ - items:
+ - const: mediatek,mt7629-scpsys
+ - const: mediatek,mt7622-scpsys
+
+ '#power-domain-cells':
+ description: Always 1
+ const: 1
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 4
+
+ clocks:
+ minItems: 1
+ maxItems: 20
+
+ clock-names:
+ minItems: 1
+ maxItems: 6
+ items:
+ enum:
+ - mm
+ - mfg
+ - ethif
+ - venc
+ - jpgdec
+ - audio
+ - vdec
+ - hif_sel
+
+ vdec-supply: true
+ venc-supply: true
+ isp-supply: true
+ mm-supply: true
+ audio-supply: true
+ usb-supply: true
+ mfg_async-supply: true
+ mfg-supply: true
+
+ infracfg:
+ description: Infrastructure configuration controller phandle
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+required:
+ - compatible
+ - '#power-domain-cells'
+ - reg
+ - infracfg
+ - clocks
+ - clock-names
+
+additionalProperties: false
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt2701-scpsys
+ then:
+ properties:
+ clocks:
+ minItems: 3
+ maxItems: 3
+ clock-names:
+ items:
+ - const: mm
+ - const: mfg
+ - const: ethif
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt7623a-scpsys
+ then:
+ properties:
+ clocks:
+ maxItems: 1
+ clock-names:
+ items:
+ - const: ethif
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt2712-scpsys
+ then:
+ properties:
+ clocks:
+ minItems: 6
+ clock-names:
+ items:
+ - const: mm
+ - const: mfg
+ - const: venc
+ - const: jpgdec
+ - const: audio
+ - const: vdec
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt7622-scpsys
+ then:
+ properties:
+ clocks:
+ maxItems: 1
+ clock-names:
+ items:
+ - const: hif_sel
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt6797-scpsys
+ then:
+ properties:
+ clocks:
+ minItems: 3
+ maxItems: 3
+ clock-names:
+ items:
+ - const: mfg
+ - const: mm
+ - const: vdec
+
+examples:
+ - |
+ #include <dt-bindings/clock/mt2701-clk.h>
+
+ power-controller@10006000 {
+ #power-domain-cells = <1>;
+ compatible = "mediatek,mt2701-scpsys", "syscon";
+ reg = <0x10006000 0x1000>;
+ infracfg = <&infracfg>;
+ clocks = <&topckgen CLK_TOP_MM_SEL>,
+ <&topckgen CLK_TOP_MFG_SEL>,
+ <&topckgen CLK_TOP_ETHIF_SEL>;
+ clock-names = "mm", "mfg", "ethif";
+ };
diff --git a/Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.yaml b/Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.yaml
index 079ad977b907..60f0882f5381 100644
--- a/Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.yaml
+++ b/Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.yaml
@@ -27,12 +27,9 @@ properties:
mailbox controller device node and an args specifier
that will be the phandle to the intended sub-mailbox
child node to be used for communication. See
- Documentation/devicetree/bindings/mailbox/mailbox.txt
- for more details about the generic mailbox controller
- and client driver bindings. Also see
- Documentation/devicetree/bindings/mailbox/ \
- xlnx,zynqmp-ipi-mailbox.txt for typical controller that
- is used to communicate with this System controllers.
+ Documentation/devicetree/bindings/mailbox/xlnx,zynqmp-ipi-mailbox.yaml
+ for typical controller that is used to communicate with
+ this System controllers.
items:
- description: tx channel
- description: rx channel
diff --git a/Documentation/devicetree/bindings/regulator/vexpress.txt b/Documentation/devicetree/bindings/regulator/vexpress.txt
deleted file mode 100644
index 1c2e92c7831e..000000000000
--- a/Documentation/devicetree/bindings/regulator/vexpress.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-Versatile Express voltage regulators
-------------------------------------
-
-Requires node properties:
-- "compatible" value: "arm,vexpress-volt"
-- "arm,vexpress-sysreg,func" when controlled via vexpress-sysreg
- (see Documentation/devicetree/bindings/arm/vexpress-config.yaml
- for more details)
-
-Required regulator properties:
-- "regulator-name"
-- "regulator-always-on"
-
-Optional regulator properties:
-- "regulator-min-microvolt"
-- "regulator-max-microvolt"
-
-See Documentation/devicetree/bindings/regulator/regulator.txt
-for more details about the regulator properties.
-
-When no "regulator-[min|max]-microvolt" properties are defined,
-the device is treated as fixed (or rather "read-only") regulator.
-
-Example:
- volt@0 {
- compatible = "arm,vexpress-volt";
- arm,vexpress-sysreg,func = <2 0>;
- regulator-name = "Cores";
- regulator-min-microvolt = <800000>;
- regulator-max-microvolt = <1050000>;
- regulator-always-on;
- };
diff --git a/Documentation/devicetree/bindings/reset/st,stm32-rcc.txt b/Documentation/devicetree/bindings/reset/st,stm32-rcc.txt
deleted file mode 100644
index 384035e8e60b..000000000000
--- a/Documentation/devicetree/bindings/reset/st,stm32-rcc.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-STMicroelectronics STM32 Peripheral Reset Controller
-====================================================
-
-The RCC IP is both a reset and a clock controller.
-
-Please see Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml
diff --git a/Documentation/devicetree/bindings/reset/st,stm32mp1-rcc.txt b/Documentation/devicetree/bindings/reset/st,stm32mp1-rcc.txt
deleted file mode 100644
index 2880d5dda95e..000000000000
--- a/Documentation/devicetree/bindings/reset/st,stm32mp1-rcc.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-STMicroelectronics STM32MP1 Peripheral Reset Controller
-=======================================================
-
-The RCC IP is both a reset and a clock controller.
-
-Please see Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
diff --git a/Documentation/devicetree/bindings/scsi/hisilicon,hip05-sas-v1.yaml b/Documentation/devicetree/bindings/scsi/hisilicon,hip05-sas-v1.yaml
new file mode 100644
index 000000000000..27d4cf5078e6
--- /dev/null
+++ b/Documentation/devicetree/bindings/scsi/hisilicon,hip05-sas-v1.yaml
@@ -0,0 +1,158 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/scsi/hisilicon,hip05-sas-v1.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: HiSilicon SAS controller
+
+maintainers:
+ - Xingui Yang <yangxingui@huawei.com>
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - hisilicon,hip05-sas-v1
+ - hisilicon,hip06-sas-v2
+ - hisilicon,hip07-sas-v2
+
+ reg:
+ minItems: 1
+ items:
+ - description: SAS registers
+ - description: CPLD SGPIO control registers
+
+ clocks:
+ minItems: 1
+ maxItems: 2
+
+ dma-coherent: true
+
+ interrupts:
+ description: >
+ Interrupt specifiers for PHY, SATA, and completion queues; ordering and
+ number depend on controller version.
+
+ For v1 hw: Interrupts for phys, completion queues, and fatal
+ sources; the interrupts are ordered in 3 groups, as follows:
+
+ - Phy interrupts - Each phy has 3 interrupt sources:
+ - broadcast
+ - phyup
+ - abnormal
+ The phy interrupts are ordered into groups of 3 per phy
+ (broadcast, phyup, and abnormal) in increasing order.
+ - Completion queue interrupts - each completion queue has 1 interrupt
+ source.
+ - Fatal interrupts - the fatal interrupts are ordered as follows:
+ - ECC
+ - AXI bus
+
+ For v2 hw: Interrupts for phys, Sata, and completion queues;
+ the interrupts are ordered in 3 groups, as follows:
+
+ - Phy interrupts - Each controller has 2 phy interrupts:
+ - phy up/down
+ - channel interrupt
+ - Sata interrupts - Each phy on the controller has 1 Sata interrupt.
+ - Completion queue interrupts - each completion queue has 1 interrupt
+ source
+ minItems: 58
+ maxItems: 128
+
+ ctrl-reset-reg:
+ description: Offset to controller reset register in SAS syscon region.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ ctrl-reset-sts-reg:
+ description: Offset to controller reset status register in SAS syscon region.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ ctrl-clock-ena-reg:
+ description: Offset to controller clock enable register in SAS syscon region.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ hip06-sas-v2-quirk-amt:
+ description:
+ Indicates that the v2 controller has the "am-max-transmissions" limitation.
+ type: boolean
+
+ hisilicon,sas-syscon:
+ description: Phandle of syscon used for SAS control.
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ hisilicon,signal-attenuation:
+ description:
+ De-emphasis, preshoot, and boost attenuation readings for the board,
+ used to calculate signal attenuation (y = (x-10000)/10000).
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 3
+ maxItems: 3
+ items:
+ minimum: 7600
+ maximum: 12400
+
+ phy-count:
+ description: Number of PHYs accessible by the controller.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ queue-count:
+ description: Number of delivery and completion queues in the controller.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ sas-addr:
+ description: SAS address, array of 8 bytes representing host SAS address.
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ minItems: 8
+ maxItems: 8
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - ctrl-reset-reg
+ - ctrl-reset-sts-reg
+ - ctrl-clock-ena-reg
+ - hisilicon,sas-syscon
+ - phy-count
+ - queue-count
+ - sas-addr
+
+additionalProperties: false
+
+examples:
+ - |
+ sas@c1000000 {
+ compatible = "hisilicon,hip05-sas-v1";
+ reg = <0xc1000000 0x10000>;
+ dma-coherent;
+ interrupts = <259 4>, <263 4>, <264 4>, /* phy0 */
+ <269 4>, <273 4>, <274 4>, /* phy1 */
+ <279 4>, <283 4>, <284 4>, /* phy2 */
+ <289 4>, <293 4>, <294 4>, /* phy3 */
+ <299 4>, <303 4>, <304 4>, /* phy4 */
+ <309 4>, <313 4>, <314 4>, /* phy5 */
+ <319 4>, <323 4>, <324 4>, /* phy6 */
+ <329 4>, <333 4>, <334 4>, /* phy7 */
+ <336 1>, <337 1>, <338 1>, /* cq0-2 */
+ <339 1>, <340 1>, <341 1>, /* cq3-5 */
+ <342 1>, <343 1>, <344 1>, /* cq6-8 */
+ <345 1>, <346 1>, <347 1>, /* cq9-11 */
+ <348 1>, <349 1>, <350 1>, /* cq12-14 */
+ <351 1>, <352 1>, <353 1>, /* cq15-17 */
+ <354 1>, <355 1>, <356 1>, /* cq18-20 */
+ <357 1>, <358 1>, <359 1>, /* cq21-23 */
+ <360 1>, <361 1>, <362 1>, /* cq24-26 */
+ <363 1>, <364 1>, <365 1>, /* cq27-29 */
+ <366 1>, <367 1>, /* cq30-31 */
+ <376 4>, /* fatal ecc */
+ <381 4>; /* fatal axi */
+ ctrl-reset-reg = <0xa60>;
+ ctrl-reset-sts-reg = <0x5a30>;
+ ctrl-clock-ena-reg = <0x338>;
+ hisilicon,sas-syscon = <&pcie_sas>;
+ queue-count = <32>;
+ phy-count = <8>;
+ sas-addr = [50 01 88 20 16 00 00 0a];
+ };
diff --git a/Documentation/devicetree/bindings/scsi/hisilicon-sas.txt b/Documentation/devicetree/bindings/scsi/hisilicon-sas.txt
deleted file mode 100644
index 8c6659ed2cfc..000000000000
--- a/Documentation/devicetree/bindings/scsi/hisilicon-sas.txt
+++ /dev/null
@@ -1,98 +0,0 @@
-* HiSilicon SAS controller
-
-The HiSilicon SAS controller supports SAS/SATA.
-
-Main node required properties:
- - compatible : value should be as follows:
- (a) "hisilicon,hip05-sas-v1" for v1 hw in hip05 chipset
- (b) "hisilicon,hip06-sas-v2" for v2 hw in hip06 chipset
- (c) "hisilicon,hip07-sas-v2" for v2 hw in hip07 chipset
- - sas-addr : array of 8 bytes for host SAS address
- - reg : Contains two regions. The first is the address and length of the SAS
- register. The second is the address and length of CPLD register for
- SGPIO control. The second is optional, and should be set only when
- we use a CPLD for directly attached disk LED control.
- - hisilicon,sas-syscon: phandle of syscon used for sas control
- - ctrl-reset-reg : offset to controller reset register in ctrl reg
- - ctrl-reset-sts-reg : offset to controller reset status register in ctrl reg
- - ctrl-clock-ena-reg : offset to controller clock enable register in ctrl reg
- - queue-count : number of delivery and completion queues in the controller
- - phy-count : number of phys accessible by the controller
- - interrupts : For v1 hw: Interrupts for phys, completion queues, and fatal
- sources; the interrupts are ordered in 3 groups, as follows:
- - Phy interrupts
- - Completion queue interrupts
- - Fatal interrupts
- Phy interrupts : Each phy has 3 interrupt sources:
- - broadcast
- - phyup
- - abnormal
- The phy interrupts are ordered into groups of 3 per phy
- (broadcast, phyup, and abnormal) in increasing order.
- Completion queue interrupts : each completion queue has 1
- interrupt source.
- The interrupts are ordered in increasing order.
- Fatal interrupts : the fatal interrupts are ordered as follows:
- - ECC
- - AXI bus
- For v2 hw: Interrupts for phys, Sata, and completion queues;
- the interrupts are ordered in 3 groups, as follows:
- - Phy interrupts
- - Sata interrupts
- - Completion queue interrupts
- Phy interrupts : Each controller has 2 phy interrupts:
- - phy up/down
- - channel interrupt
- Sata interrupts : Each phy on the controller has 1 Sata
- interrupt. The interrupts are ordered in increasing
- order.
- Completion queue interrupts : each completion queue has 1
- interrupt source. The interrupts are ordered in
- increasing order.
-
-Optional main node properties:
- - hip06-sas-v2-quirk-amt : when set, indicates that the v2 controller has the
- "am-max-transmissions" limitation.
- - hisilicon,signal-attenuation : array of 3 32-bit values, containing de-emphasis,
- preshoot, and boost attenuation readings for the board. They
- are used to describe the signal attenuation of the board. These
- values' range is 7600 to 12400, and used to represent -24dB to
- 24dB.
- The formula is "y = (x-10000)/10000". For example, 10478
- means 4.78dB.
-
-Example:
- sas0: sas@c1000000 {
- compatible = "hisilicon,hip05-sas-v1";
- sas-addr = [50 01 88 20 16 00 00 0a];
- reg = <0x0 0xc1000000 0x0 0x10000>;
- hisilicon,sas-syscon = <&pcie_sas>;
- ctrl-reset-reg = <0xa60>;
- ctrl-reset-sts-reg = <0x5a30>;
- ctrl-clock-ena-reg = <0x338>;
- queue-count = <32>;
- phy-count = <8>;
- dma-coherent;
- interrupt-parent = <&mbigen_dsa>;
- interrupts = <259 4>,<263 4>,<264 4>,/* phy0 */
- <269 4>,<273 4>,<274 4>,/* phy1 */
- <279 4>,<283 4>,<284 4>,/* phy2 */
- <289 4>,<293 4>,<294 4>,/* phy3 */
- <299 4>,<303 4>,<304 4>,/* phy4 */
- <309 4>,<313 4>,<314 4>,/* phy5 */
- <319 4>,<323 4>,<324 4>,/* phy6 */
- <329 4>,<333 4>,<334 4>,/* phy7 */
- <336 1>,<337 1>,<338 1>,/* cq0-2 */
- <339 1>,<340 1>,<341 1>,/* cq3-5 */
- <342 1>,<343 1>,<344 1>,/* cq6-8 */
- <345 1>,<346 1>,<347 1>,/* cq9-11 */
- <348 1>,<349 1>,<350 1>,/* cq12-14 */
- <351 1>,<352 1>,<353 1>,/* cq15-17 */
- <354 1>,<355 1>,<356 1>,/* cq18-20 */
- <357 1>,<358 1>,<359 1>,/* cq21-23 */
- <360 1>,<361 1>,<362 1>,/* cq24-26 */
- <363 1>,<364 1>,<365 1>,/* cq27-29 */
- <366 1>,<367 1>/* cq30-31 */
- <376 4>,/* fatal ecc */
- <381 4>;/* fatal axi */
- };
diff --git a/Documentation/devicetree/bindings/soc/hisilicon/hisilicon,hip05-cpld.yaml b/Documentation/devicetree/bindings/soc/hisilicon/hisilicon,hip05-cpld.yaml
new file mode 100644
index 000000000000..eaaa8f917bdd
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/hisilicon/hisilicon,hip05-cpld.yaml
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/hisilicon/hisilicon,hip05-cpld.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: HiSilicon HIP05 CPLD registers
+
+maintainers:
+ - Wei Xu <xuwei5@hisilicon.com>
+
+properties:
+ compatible:
+ const: hisilicon,hip05-cpld
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ local-bus {
+ #address-cells = <2>;
+ #size-cells = <1>;
+
+ cpld@100000000 {
+ compatible = "hisilicon,hip05-cpld";
+ reg = <0x1 0x0 0x100>;
+ };
+ };
diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt2701-g3dsys.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt2701-g3dsys.yaml
new file mode 100644
index 000000000000..ad3df062d5db
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mt2701-g3dsys.yaml
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/mediatek/mediatek,mt2701-g3dsys.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek G3D System Controller
+
+maintainers:
+ - Sean Wang <sean.wang@mediatek.com>
+ - Ryder Lee <ryder.lee@mediatek.com>
+
+description: |
+ The MediaTek G3D system controller provides clocks and reset control
+ for the GPU subsystem on MediaTek SoCs.
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - const: mediatek,mt2701-g3dsys
+ - const: syscon
+ - items:
+ - const: mediatek,mt7623-g3dsys
+ - const: mediatek,mt2701-g3dsys
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+ "#clock-cells":
+ const: 1
+
+ "#reset-cells":
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - "#clock-cells"
+ - "#reset-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ g3dsys: syscon@13000000 {
+ compatible = "mediatek,mt7623-g3dsys",
+ "mediatek,mt2701-g3dsys",
+ "syscon";
+ reg = <0 0x13000000 0 0x200>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
+ };
diff --git a/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt b/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
deleted file mode 100644
index 3530a6668b48..000000000000
--- a/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
+++ /dev/null
@@ -1,79 +0,0 @@
-MediaTek SCPSYS
-===============
-
-The System Control Processor System (SCPSYS) has several power management
-related tasks in the system. The tasks include thermal measurement, dynamic
-voltage frequency scaling (DVFS), interrupt filter and lowlevel sleep control.
-The System Power Manager (SPM) inside the SCPSYS is for the MTCMOS power
-domain control.
-
-The driver implements the Generic PM domain bindings described in
-power/power-domain.yaml. It provides the power domains defined in
-- include/dt-bindings/power/mt8173-power.h
-- include/dt-bindings/power/mt6797-power.h
-- include/dt-bindings/power/mt6765-power.h
-- include/dt-bindings/power/mt2701-power.h
-- include/dt-bindings/power/mt2712-power.h
-- include/dt-bindings/power/mt7622-power.h
-
-Required properties:
-- compatible: Should be one of:
- - "mediatek,mt2701-scpsys"
- - "mediatek,mt2712-scpsys"
- - "mediatek,mt6735-scpsys"
- - "mediatek,mt6765-scpsys"
- - "mediatek,mt6797-scpsys"
- - "mediatek,mt7622-scpsys"
- - "mediatek,mt7623-scpsys", "mediatek,mt2701-scpsys": For MT7623 SoC
- - "mediatek,mt7623a-scpsys": For MT7623A SoC
- - "mediatek,mt7629-scpsys", "mediatek,mt7622-scpsys": For MT7629 SoC
- - "mediatek,mt8173-scpsys"
-- #power-domain-cells: Must be 1
-- reg: Address range of the SCPSYS unit
-- infracfg: must contain a phandle to the infracfg controller
-- clock, clock-names: clocks according to the common clock binding.
- These are clocks which hardware needs to be
- enabled before enabling certain power domains.
- Required clocks for MT2701 or MT7623: "mm", "mfg", "ethif"
- Required clocks for MT2712: "mm", "mfg", "venc", "jpgdec", "audio", "vdec"
- Required clocks for MT6765: MUX: "mm", "mfg"
- CG: "mm-0", "mm-1", "mm-2", "mm-3", "isp-0",
- "isp-1", "cam-0", "cam-1", "cam-2",
- "cam-3","cam-4"
- Required clocks for MT6797: "mm", "mfg", "vdec"
- Required clocks for MT7622 or MT7629: "hif_sel"
- Required clocks for MT7623A: "ethif"
- Required clocks for MT8173: "mm", "mfg", "venc", "venc_lt"
-
-Optional properties:
-- vdec-supply: Power supply for the vdec power domain
-- venc-supply: Power supply for the venc power domain
-- isp-supply: Power supply for the isp power domain
-- mm-supply: Power supply for the mm power domain
-- venc_lt-supply: Power supply for the venc_lt power domain
-- audio-supply: Power supply for the audio power domain
-- usb-supply: Power supply for the usb power domain
-- mfg_async-supply: Power supply for the mfg_async power domain
-- mfg_2d-supply: Power supply for the mfg_2d power domain
-- mfg-supply: Power supply for the mfg power domain
-
-Example:
-
- scpsys: scpsys@10006000 {
- #power-domain-cells = <1>;
- compatible = "mediatek,mt8173-scpsys";
- reg = <0 0x10006000 0 0x1000>;
- infracfg = <&infracfg>;
- clocks = <&clk26m>,
- <&topckgen CLK_TOP_MM_SEL>;
- <&topckgen CLK_TOP_VENC_SEL>,
- <&topckgen CLK_TOP_VENC_LT_SEL>;
- clock-names = "mfg", "mm", "venc", "venc_lt";
- };
-
-Example consumer:
-
- afe: mt8173-afe-pcm@11220000 {
- compatible = "mediatek,mt8173-afe-pcm";
- power-domains = <&scpsys MT8173_POWER_DOMAIN_AUDIO>;
- };
diff --git a/Documentation/devicetree/bindings/soc/nuvoton/nuvoton,npcm-gcr.yaml b/Documentation/devicetree/bindings/soc/nuvoton/nuvoton,npcm-gcr.yaml
index 23e7e4ea01ff..9f6f009ec991 100644
--- a/Documentation/devicetree/bindings/soc/nuvoton/nuvoton,npcm-gcr.yaml
+++ b/Documentation/devicetree/bindings/soc/nuvoton/nuvoton,npcm-gcr.yaml
@@ -17,13 +17,17 @@ description:
properties:
compatible:
- items:
- - enum:
- - nuvoton,wpcm450-gcr
- - nuvoton,npcm750-gcr
- - nuvoton,npcm845-gcr
- - const: syscon
- - const: simple-mfd
+ oneOf:
+ - items:
+ - enum:
+ - nuvoton,npcm845-gcr
+ - const: syscon
+ - items:
+ - enum:
+ - nuvoton,wpcm450-gcr
+ - nuvoton,npcm750-gcr
+ - const: syscon
+ - const: simple-mfd
reg:
maxItems: 1
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml
index d2ae2ae87a95..e94c4fd34177 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml
@@ -71,7 +71,7 @@ properties:
maxItems: 1
description:
Reference to the mailbox representing the outgoing doorbell in APCS for
- this client, as described in mailbox/mailbox.txt
+ this client.
"#clock-cells":
const: 0
diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt8173-rt5650.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt8173-rt5650.yaml
new file mode 100644
index 000000000000..a3166cc40a20
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/mediatek,mt8173-rt5650.yaml
@@ -0,0 +1,73 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/mediatek,mt8173-rt5650.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek MT8173 with RT5650 codecs and HDMI via I2S
+
+maintainers:
+ - Ariel D'Alessandro <ariel.dalessandro@collabora.com>
+
+properties:
+ compatible:
+ const: mediatek,mt8173-rt5650
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ mediatek,audio-codec:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ description:
+ The phandles of rt5650 codecs and of the HDMI encoder node.
+ minItems: 2
+
+ mediatek,platform:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ The phandle of MT8173 ASoC platform.
+
+ mediatek,mclk:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ The MCLK source.
+ 0: external oscillator, MCLK = 12.288M
+ 1: internal source from mt8173, MCLK = sampling rate * 256
+
+ codec-capture:
+ description: Subnode of rt5650 codec capture.
+ type: object
+
+ properties:
+ sound-dai:
+ maxItems: 1
+ description: phandle of the CPU DAI
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - mediatek,audio-codec
+ - mediatek,platform
+
+additionalProperties: false
+
+examples:
+ - |
+ sound {
+ compatible = "mediatek,mt8173-rt5650";
+ mediatek,audio-codec = <&rt5650 &hdmi0>;
+ mediatek,platform = <&afe>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&aud_i2s2>;
+
+ mediatek,mclk = <1>;
+ codec-capture {
+ sound-dai = <&rt5650 1>;
+ };
+ };
+
+...
diff --git a/Documentation/devicetree/bindings/sound/mt8173-rt5650.txt b/Documentation/devicetree/bindings/sound/mt8173-rt5650.txt
deleted file mode 100644
index 29dce2ac8773..000000000000
--- a/Documentation/devicetree/bindings/sound/mt8173-rt5650.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-MT8173 with RT5650 CODECS and HDMI via I2S
-
-Required properties:
-- compatible : "mediatek,mt8173-rt5650"
-- mediatek,audio-codec: the phandles of rt5650 codecs
- and of the hdmi encoder node
-- mediatek,platform: the phandle of MT8173 ASoC platform
-
-Optional subnodes:
-- codec-capture : the subnode of rt5650 codec capture
-Required codec-capture subnode properties:
-- sound-dai: audio codec dai name on capture path
- <&rt5650 0> : Default setting. Connect rt5650 I2S1 for capture. (dai_name = rt5645-aif1)
- <&rt5650 1> : Connect rt5650 I2S2 for capture. (dai_name = rt5645-aif2)
-
-- mediatek,mclk: the MCLK source
- 0 : external oscillator, MCLK = 12.288M
- 1 : internal source from mt8173, MCLK = sampling rate*256
-
-Example:
-
- sound {
- compatible = "mediatek,mt8173-rt5650";
- mediatek,audio-codec = <&rt5650 &hdmi0>;
- mediatek,platform = <&afe>;
- mediatek,mclk = <0>;
- codec-capture {
- sound-dai = <&rt5650 1>;
- };
- };
-
diff --git a/Documentation/devicetree/bindings/spi/aspeed,ast2600-fmc.yaml b/Documentation/devicetree/bindings/spi/aspeed,ast2600-fmc.yaml
index 80e542624cc6..ad830aebb798 100644
--- a/Documentation/devicetree/bindings/spi/aspeed,ast2600-fmc.yaml
+++ b/Documentation/devicetree/bindings/spi/aspeed,ast2600-fmc.yaml
@@ -62,21 +62,21 @@ examples:
interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
flash@0 {
- reg = < 0 >;
+ reg = <0>;
compatible = "jedec,spi-nor";
spi-max-frequency = <50000000>;
spi-rx-bus-width = <2>;
};
flash@1 {
- reg = < 1 >;
+ reg = <1>;
compatible = "jedec,spi-nor";
spi-max-frequency = <50000000>;
spi-rx-bus-width = <2>;
};
flash@2 {
- reg = < 2 >;
+ reg = <2>;
compatible = "jedec,spi-nor";
spi-max-frequency = <50000000>;
spi-rx-bus-width = <2>;
diff --git a/Documentation/devicetree/bindings/thermal/thermal-idle.yaml b/Documentation/devicetree/bindings/thermal/thermal-idle.yaml
index 1b77d542a7b8..6b4b16580adf 100644
--- a/Documentation/devicetree/bindings/thermal/thermal-idle.yaml
+++ b/Documentation/devicetree/bindings/thermal/thermal-idle.yaml
@@ -137,7 +137,7 @@ examples:
cooling-maps {
map0 {
trip = <&cpu_alert1>;
- cooling-device = <&cpu_b0_therm 0 15 >,
+ cooling-device = <&cpu_b0_therm 0 15>,
<&cpu_b1_therm 0 15>;
};
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index c7fd701ba030..d31da5554d75 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -189,7 +189,7 @@ properties:
- injoinic,ip5306
# Inspur Power System power supply unit version 1
- inspur,ipsps1
- # Intel common redudant power supply crps185
+ # Intel common redundant power supply crps185
- intel,crps185
# Intersil ISL29028 Ambient Light and Proximity Sensor
- isil,isl29028
@@ -411,6 +411,8 @@ properties:
- samsung,24ad0xd1
# Samsung Exynos SoC SATA PHY I2C device
- samsung,exynos-sataphy-i2c
+ # SDMC 1024bit EEPROM + 128bit OTP memory for key
+ - sdmc,dm2016
# Semtech sx1301 baseband processor
- semtech,sx1301
# Sensirion multi-pixel gas sensor with I2C interface
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 93b497965547..c981a133753e 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -114,6 +114,8 @@ patternProperties:
description: Amarula Solutions
"^amazon,.*":
description: Amazon.com, Inc.
+ "^ambarella,.*":
+ description: Ambarella, Inc.
"^amcc,.*":
description: Applied Micro Circuits Corporation (APM, formally AMCC)
"^amd,.*":
diff --git a/Documentation/devicetree/of_unittest.rst b/Documentation/devicetree/of_unittest.rst
index 6ed6e3291964..5ea8ee0e81ef 100644
--- a/Documentation/devicetree/of_unittest.rst
+++ b/Documentation/devicetree/of_unittest.rst
@@ -125,7 +125,7 @@ Figure 1: Generic structure of un-flattened device tree
Before executing OF unittest, it is required to attach the test data to
-machine's device tree (if present). So, when selftest_data_add() is called,
+machine's device tree (if present). So, when unittest_data_add() is called,
at first it reads the flattened device tree data linked into the kernel image
via the following kernel symbols::
diff --git a/Documentation/devicetree/overlay-notes.rst b/Documentation/devicetree/overlay-notes.rst
index ba401ef850e7..f2bb1145bd9f 100644
--- a/Documentation/devicetree/overlay-notes.rst
+++ b/Documentation/devicetree/overlay-notes.rst
@@ -115,10 +115,6 @@ The API is quite easy to use.
previously created via the call to of_overlay_fdt_apply(). Removal of an
overlay changeset that is stacked by another will not be permitted.
-Finally, if you need to remove all overlays in one-go, just call
-of_overlay_remove_all() which will remove every single one in the correct
-order.
-
There is the option to register notifiers that get called on
overlay operations. See of_overlay_notifier_register/unregister and
enum of_overlay_notify_action for details.
diff --git a/Documentation/translations/zh_CN/devicetree/overlay-notes.rst b/Documentation/translations/zh_CN/devicetree/overlay-notes.rst
index ba5edd05dc1e..f1217ea2ff44 100644
--- a/Documentation/translations/zh_CN/devicetree/overlay-notes.rst
+++ b/Documentation/translations/zh_CN/devicetree/overlay-notes.rst
@@ -116,9 +116,6 @@ DT中的适当位置。在这种情况下,可以提供目标路径。通过标
2) 调用of_overlay_remove()来删除和清理先前通过调用of_overlay_fdt_apply()
而创建的覆盖变更集。不允许删除一个被另一个覆盖的覆盖变化集。
-最后,如果你需要一次性删除所有的覆盖,只需调用of_overlay_remove_all(),
-它将以正确的顺序删除每一个覆盖。
-
你可以选择注册在覆盖操作中被调用的通知器。详见
of_overlay_notifier_register/unregister和enum of_overlay_notify_action。
diff --git a/MAINTAINERS b/MAINTAINERS
index 590df9617b46..d78802671e20 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12034,7 +12034,7 @@ HISILICON SAS Controller
M: Xingui Yang <yangxingui@huawei.com>
S: Supported
W: http://www.hisilicon.com
-F: Documentation/devicetree/bindings/scsi/hisilicon-sas.txt
+F: Documentation/devicetree/bindings/scsi/hisilicon,hip05-sas-v1.yaml
F: drivers/scsi/hisi_sas/
HISILICON SECURITY ENGINE V2 DRIVER (SEC2)
@@ -20800,6 +20800,8 @@ F: Documentation/devicetree/
F: Documentation/process/maintainer-devicetree.rst
F: arch/*/boot/dts/
F: include/dt-bindings/
+F: scripts/dtc/dt-check-style
+F: scripts/dtc/dt-style-selftest/
OPENCOMPUTE PTP CLOCK DRIVER
M: Vadim Fedorenko <vadim.fedorenko@linux.dev>
diff --git a/drivers/of/fdt_address.c b/drivers/of/fdt_address.c
index f358d2c80754..2e4e46a58cb6 100644
--- a/drivers/of/fdt_address.c
+++ b/drivers/of/fdt_address.c
@@ -172,7 +172,7 @@ static u64 __init fdt_translate_address(const void *blob, int node_offset)
goto bail;
bus = &of_busses[0];
- /* Cound address cells & copy address locally */
+ /* Count address cells & copy address locally */
bus->count_cells(blob, parent, &na, &ns);
if (!OF_CHECK_COUNTS(na, ns)) {
pr_err("Bad cell count for %s\n",
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index ef1ed9743907..162590c1d530 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -767,34 +767,27 @@ err:
}
}
-static int of_check_msi_parent(struct device_node *dev_node, struct device_node **msi_node)
+static int of_check_msi_parent(struct device_node *dev_node, struct device_node **msi_node,
+ struct of_phandle_args *msi_spec)
{
- struct of_phandle_args msi_spec;
int ret;
/*
* An msi-parent phandle with a missing or == 0 #msi-cells
* property identifies a 1:1 ID translation mapping.
*
- * Set the msi controller node if the firmware matches this
- * condition.
+ * @msi_spec keeps a reference to the target node whenever the
+ * phandle parses, -EINVAL included, and the caller releases it.
*/
ret = of_parse_phandle_with_optional_args(dev_node, "msi-parent", "#msi-cells",
- 0, &msi_spec);
+ 0, msi_spec);
if (ret)
return ret;
- if ((*msi_node && *msi_node != msi_spec.np) || msi_spec.args_count != 0)
- ret = -EINVAL;
-
- if (!ret) {
- /* Return with a node reference held */
- *msi_node = msi_spec.np;
- return 0;
- }
- of_node_put(msi_spec.np);
+ if ((*msi_node && *msi_node != msi_spec->np) || msi_spec->args_count != 0)
+ return -EINVAL;
- return ret;
+ return 0;
}
/**
@@ -808,7 +801,9 @@ static int of_check_msi_parent(struct device_node *dev_node, struct device_node
* @id_in: Device ID.
*
* Walk up the device hierarchy looking for devices with a "msi-map"
- * or "msi-parent" property. If found, apply the mapping to @id_in.
+ * or "msi-parent" property. If found, apply the mapping to @id_in. With
+ * @msi_np non-NULL, a device declaring an msi-parent ends the walk, usable
+ * or not.
*
* Returns: The mapped MSI id.
*/
@@ -823,6 +818,7 @@ u32 of_msi_xlate(struct device *dev, struct device_node **msi_np, u32 id_in)
*/
for (parent_dev = dev; parent_dev; parent_dev = parent_dev->parent) {
struct of_phandle_args msi_spec = {};
+ int ret;
if (!of_map_msi_id(parent_dev->of_node, id_in, msi_np, &msi_spec)) {
if (msi_spec.np) {
@@ -837,8 +833,17 @@ u32 of_msi_xlate(struct device *dev, struct device_node **msi_np, u32 id_in)
break;
}
/* -ENODEV: msi-map absent → check for msi-parent */
- if (msi_np && !of_check_msi_parent(parent_dev->of_node, msi_np))
+ if (!msi_np)
+ continue;
+
+ ret = of_check_msi_parent(parent_dev->of_node, msi_np, &msi_spec);
+ if (msi_spec.np) {
+ /* A declared msi-parent names the controller, usable or not */
+ if (!ret && !*msi_np)
+ *msi_np = of_node_get(msi_spec.np);
+ of_node_put(msi_spec.np);
break;
+ }
}
return id_out;
}
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index 83c56dd9b5d8..b2e1198fb41c 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -1282,26 +1282,3 @@ out:
return ret;
}
EXPORT_SYMBOL_GPL(of_overlay_remove);
-
-/**
- * of_overlay_remove_all() - Reverts and frees all overlay changesets
- *
- * Removes all overlays from the system in the correct order.
- *
- * Return: 0 on success, or a negative error number
- */
-int of_overlay_remove_all(void)
-{
- struct overlay_changeset *ovcs, *ovcs_n;
- int ret;
-
- /* the tail of list is guaranteed to be safe to remove */
- list_for_each_entry_safe_reverse(ovcs, ovcs_n, &ovcs_list, ovcs_list) {
- ret = of_overlay_remove(&ovcs->id);
- if (ret)
- return ret;
- }
-
- return 0;
-}
-EXPORT_SYMBOL_GPL(of_overlay_remove_all);
diff --git a/drivers/of/property.c b/drivers/of/property.c
index 72cf12907de0..45e55f618488 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -74,7 +74,7 @@ bool of_graph_is_present(const struct device_node *node)
struct device_node *port __free(device_node) = of_get_child_by_name(node, "port");
- return !!port;
+ return port;
}
EXPORT_SYMBOL(of_graph_is_present);
@@ -1471,6 +1471,22 @@ static struct device_node *parse_gpio_compat(struct device_node *np,
return sup_args.np;
}
+static struct device_node *parse_i2c_parent(struct device_node *np,
+ const char *prop_name, int index)
+{
+ if (strcmp(prop_name, "i2c-parent"))
+ return NULL;
+
+ /* tc9563 (pci1179,0623) is <phandle addr>; every other user is bare phandles */
+ if (of_device_is_compatible(np, "pci1179,0623")) {
+ if (index)
+ return NULL;
+ return of_parse_phandle(np, prop_name, 0);
+ }
+
+ return of_parse_phandle(np, prop_name, index);
+}
+
static struct device_node *parse_interrupts(struct device_node *np,
const char *prop_name, int index)
{
@@ -1562,6 +1578,7 @@ static const struct supplier_bindings of_supplier_bindings[] = {
{ .parse_prop = parse_resets, },
{ .parse_prop = parse_leds, },
{ .parse_prop = parse_backlight, },
+ { .parse_prop = parse_i2c_parent, },
{ .parse_prop = parse_panel, },
{ .parse_prop = parse_msi_parent, },
{ .parse_prop = parse_pses, },
@@ -1659,12 +1676,12 @@ static bool of_is_fwnode_add_links_supported(void)
return true;
if (is_supported != -1)
- return !!is_supported;
+ return is_supported;
is_supported = !((match_property_by_path("/soc", "compatible", "intel,ce4100-cp") >= 0) ||
(match_property_by_path("/", "architecture", "OLPC") >= 0));
- return !!is_supported;
+ return is_supported;
}
static int of_fwnode_add_links(struct fwnode_handle *fwnode)
diff --git a/include/dt-bindings/clock/agilex-clock.h b/include/dt-bindings/clock/agilex-clock.h
index 06feca07e08e..6206a45e007c 100644
--- a/include/dt-bindings/clock/agilex-clock.h
+++ b/include/dt-bindings/clock/agilex-clock.h
@@ -44,6 +44,7 @@
/* Gate clocks */
#define AGILEX_MPU_CLK 30
+/* Legacy ABI ID; do not use in new DTs, use AGILEX_MPU_CCU_CLK */
#define AGILEX_MPU_L2RAM_CLK 31
#define AGILEX_MPU_PERIPH_CLK 32
#define AGILEX_L4_MAIN_CLK 33
diff --git a/include/linux/of.h b/include/linux/of.h
index b920aac6b975..44d83133a65a 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -1837,7 +1837,6 @@ struct of_overlay_notify_data {
int of_overlay_fdt_apply(const void *overlay_fdt, u32 overlay_fdt_size,
int *ovcs_id, const struct device_node *target_base);
int of_overlay_remove(int *ovcs_id);
-int of_overlay_remove_all(void);
int of_overlay_notifier_register(struct notifier_block *nb);
int of_overlay_notifier_unregister(struct notifier_block *nb);
@@ -1855,11 +1854,6 @@ static inline int of_overlay_remove(int *ovcs_id)
return -ENOTSUPP;
}
-static inline int of_overlay_remove_all(void)
-{
- return -ENOTSUPP;
-}
-
static inline int of_overlay_notifier_register(struct notifier_block *nb)
{
return 0;
diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
index 96deffc0d8a7..6bbd12b308a1 100755
--- a/scripts/dtc/dt-check-style
+++ b/scripts/dtc/dt-check-style
@@ -5,12 +5,14 @@
# .dts/.dtsi/.dtso source files. Enforces rules from
# Documentation/devicetree/bindings/dts-coding-style.rst.
#
-# Two modes:
+# Three modes:
# --mode=relaxed (default)
# Only rules that produce zero warnings on the current tree.
# Suitable for dt_binding_check.
# --mode=strict
-# All rules. Required for new submissions.
+# Most of the rules. Required for new submissions.
+# --mode=stricter
+# All rules, including ones having false positives.
#
# Two input types (auto-detected by file extension):
# *.yaml -- DT binding; check each example block
@@ -42,7 +44,6 @@ class LineType(Enum):
NODE_OPEN = auto() # something { (with optional label/name/addr)
NODE_CLOSE = auto() # };
PROPERTY = auto() # name = value; or name;
- CONTINUATION = auto() # continuation of a multi-line property
re_cpp_directive = re.compile(
@@ -77,24 +78,30 @@ def is_preprocessor(stripped):
class DtsLine:
- __slots__ = ('lineno', 'raw', 'linetype', 'indent_str', 'stripped',
- 'prop_name', 'continuations',
- 'node_name', 'node_addr', 'label', 'ref_name', 'depth',
+ __slots__ = ('lineno', 'raw', 'code', 'linetype', 'indent_str', 'stripped', 'is_root',
+ 'prop_name', 'continuation', 'continuations',
+ 'node_name', 'node_addr', 'label', 'ref_name', 'parent', 'depth',
'closures')
- def __init__(self, lineno, raw, linetype, depth, indent_str, stripped):
+ def __init__(self, lineno, raw, linetype, depth, indent_str, stripped,
+ continuation = False, is_root = False):
self.lineno = lineno # 1-based within the block
- self.raw = raw
+ self.raw = raw # Entire raw line
self.linetype = linetype
self.indent_str = indent_str # leading whitespace as-is
self.depth = depth
- self.stripped = stripped
+ self.stripped = stripped # Code without indentation
+ # Only the code, skipping trailing comments and space between code and trailing comment
+ self.code = _strip_strings_and_comments(stripped).rstrip()
+ self.is_root = is_root
self.prop_name = None
+ self.continuation = continuation # Continuation of a multi-line property
self.continuations = []
self.node_name = None
self.node_addr = None
self.label = None
self.ref_name = None
+ self.parent = None # DtsLine of parent node
self.closures = 1 # count of '}' on a NODE_CLOSE line
@@ -169,7 +176,7 @@ def classify_lines(text):
continue
if not stripped:
- dl = DtsLine(i, raw, LineType.BLANK, depth, '', '')
+ dl = DtsLine(i, raw, LineType.BLANK, depth, '', '', continuation=not prev_complete)
out.append(dl)
continue
@@ -178,7 +185,7 @@ def classify_lines(text):
else LineType.COMMENT_BODY)
if ltype == LineType.COMMENT_END:
in_block_comment = False
- dl = DtsLine(i, raw, ltype, depth, indent_str, stripped)
+ dl = DtsLine(i, raw, ltype, depth, indent_str, stripped, continuation=not prev_complete)
out.append(dl)
continue
@@ -201,18 +208,10 @@ def classify_lines(text):
# structural classification entirely.
if not code:
ltype = LineType.COMMENT_START if opens_block else LineType.COMMENT
- dl = DtsLine(i, raw, ltype, depth, indent_str, stripped)
+ dl = DtsLine(i, raw, ltype, depth, indent_str, stripped, continuation=not prev_complete)
out.append(dl)
continue
- if not prev_complete:
- dl = DtsLine(i, raw, LineType.CONTINUATION, depth, indent_str, code)
- out.append(dl)
- prev_complete = (code.endswith(';') or
- code.endswith('{') or
- code.endswith('};'))
- continue
-
# NODE_CLOSE: the canonical form is "}" or "};" alone. A line
# that is nothing but closures (e.g. "}; };") is still treated
# as NODE_CLOSE for depth tracking, but the multi-closure case
@@ -228,7 +227,10 @@ def classify_lines(text):
continue
if code.endswith('{'):
- dl = DtsLine(i, raw, LineType.NODE_OPEN, depth, indent_str, code)
+ is_root = False
+ if re.search(r'&{/}\s*{', code) or re.search(r'^/\s*\{$', code):
+ is_root = True
+ dl = DtsLine(i, raw, LineType.NODE_OPEN, depth, indent_str, code, is_root=is_root)
parse_node_header(dl)
out.append(dl)
depth += 1
@@ -236,7 +238,8 @@ def classify_lines(text):
continue
# Property (or first line of a multi-line property).
- dl = DtsLine(i, raw, LineType.PROPERTY, depth, indent_str, code)
+ dl = DtsLine(i, raw, LineType.PROPERTY, depth, indent_str, code,
+ continuation=not prev_complete)
parse_property_name(dl)
out.append(dl)
prev_complete = code.endswith(';')
@@ -245,7 +248,7 @@ def classify_lines(text):
last_prop = None
grouped = []
for dl in out:
- if dl.linetype == LineType.CONTINUATION and last_prop is not None:
+ if dl.continuation and last_prop is not None:
last_prop.continuations.append(dl)
continue
if dl.linetype == LineType.PROPERTY:
@@ -272,7 +275,7 @@ def parse_node_header(dl):
def parse_property_name(dl):
- m = re.match(r'^([a-zA-Z0-9#][a-zA-Z0-9,._+#-]*)\s*[=;]', dl.stripped)
+ m = re.match(r'^([a-zA-Z0-9#][a-zA-Z0-9,._+?#-]*)\s*[=;]', dl.stripped)
if m:
dl.prop_name = m.group(1)
@@ -309,13 +312,13 @@ def collect_labels_and_refs(text):
class Ctx:
"""Context passed to each rule check. Carries the parsed lines,
- raw text, mode and kind."""
+ raw text, mode and file_type."""
- def __init__(self, lines, text, mode, kind):
+ def __init__(self, lines, text, mode, file_type):
self.lines = lines
self.text = text
- self.mode = mode # 'relaxed' or 'strict'
- if kind in DTS_FAMILY:
+ self.mode = mode # 'relaxed', 'strict' or 'stricter'
+ if file_type in DTS_FAMILY:
self.file_type = 'dts'
else:
self.file_type = 'yaml'
@@ -327,7 +330,7 @@ class Rule:
def __init__(self, name, mode, description, check,
applies_to=('yaml', 'dts', 'dtsi', 'dtso')):
self.name = name
- self.mode = mode # 'relaxed' or 'strict'
+ self.mode = mode # 'relaxed', 'strict' or 'stricter'
self.description = description
self.check = check
self.applies_to = applies_to # input types this rule covers
@@ -335,52 +338,8 @@ class Rule:
# --- individual rule check functions --------------------------------------
-def check_trailing_whitespace(ctx):
- for dl in ctx.lines:
- if dl.raw != dl.raw.rstrip():
- yield (dl.lineno, 'trailing whitespace')
-
-
-def check_tab_in_yaml_example(ctx):
- """Reject literal tabs in DTS lines when input is YAML.
- For YAML examples, indent and content must use spaces. Tabs inside
- a #define value are tolerated (those are CPP macros, not DTS).
- For .dts files, this rule does not apply -- tabs are required.
- """
- if ctx.file_type != 'yaml':
- return
- for dl in ctx.lines:
- if dl.linetype == LineType.PREPROCESSOR:
- continue
- if dl.linetype == LineType.BLANK:
- continue
- if '\t' in dl.raw:
- yield (dl.lineno, 'tab character not allowed in DTS example')
-
-
-def check_mixed_indent_chars(ctx):
- """Indent must be all-tabs, except for aligning indentation (comments
- or continued lines)."""
- for dl in ctx.lines:
- if not dl.indent_str:
- continue
- if dl.linetype == LineType.PREPROCESSOR:
- continue
- if re.search(r' \t', dl.indent_str):
- yield (dl.lineno, 'mixed tabs and spaces in indent')
- if dl.indent_str.count(' ') > 7:
- yield (dl.lineno, 'too many space characters in indent (more than 7)')
- for cont in dl.continuations:
- if not cont.indent_str:
- continue
- if cont.linetype == LineType.PREPROCESSOR:
- continue
- if re.search(r' \t', cont.indent_str):
- yield (cont.lineno, 'mixed tabs and spaces in indent')
-
-
-def detect_indent_unit(ctx):
+def _detect_indent_unit(ctx):
"""Find the indent unit used at depth 1 in this block.
Returns tuple of string (one of: ' ' (2 spaces), ' ' (4 spaces),
@@ -406,64 +365,70 @@ def detect_indent_unit(ctx):
return (None, None)
-def check_indent_unit_relaxed(ctx):
- """YAML examples: 2 or 4 spaces. Never tabs or other widths."""
- (unit, lineno) = detect_indent_unit(ctx)
- if unit is None:
- return
- if unit not in (' ', ' '):
- yield (lineno, 'indent unit must be 2 or 4 spaces, got %r' % unit)
-
+def _display_col(text):
+ """Visual column width of text, with tabs expanded to the next
+ 8-column stop, matching how printf and most editors render a
+ line and the kernel-wide line length convention."""
+ col = 0
+ for ch in text:
+ if ch == '\t':
+ col = (col // 8 + 1) * 8
+ else:
+ col += 1
+ return col
-def check_indent_unit_dts(ctx):
- """DTS files: 1 tab per level. Always required."""
- (unit, lineno) = detect_indent_unit(ctx)
- if unit is None:
- return
- if unit != '\t':
- yield (lineno, 'indent unit must be 1 tab in DTS, got %r' % unit)
+def _natural_sort_key(s):
+ """Split a string into a tuple of (kind, value) pairs that compares
+ numeric runs as ints, so 'foo10' sorts after 'foo2'."""
+ parts = []
+ for part in re.split(r'(\d+)', s):
+ if part.isdigit():
+ parts.append((0, int(part)))
+ else:
+ parts.append((1, part))
+ return tuple(parts)
-def check_indent_unit_strict(ctx):
- """YAML: must be exactly 4 spaces. DTS: 1 tab (same as relaxed)."""
- (unit, lineno) = detect_indent_unit(ctx)
- if unit is None:
- return
- if ctx.file_type == 'yaml':
- if unit != ' ':
- yield (lineno, 'indent unit must be 4 spaces in strict mode, '
- 'got %r' % unit)
+def _strip_strings_and_comments(text):
+ """Remove string literals and /* */ + // comments from a single
+ line, replacing them with empty strings. Used so syntactic checks
+ (whitespace, hex case, etc.) don't false-positive on contents of
+ quoted strings or comments. An unclosed /* on the line is treated
+ as a comment running to end of line."""
+ text = re.sub(r'"(?:[^"\\]|\\.)*"', '""', text)
+ text = re.sub(r'/\*.*?\*/', '', text)
+ text = re.sub(r'/\*.*$', '', text)
+ text = re.sub(r'//.*$', '', text)
+ return text
-def check_indent_consistent(ctx):
- """All indented lines must be a multiple of the detected unit."""
- (unit, lineno) = detect_indent_unit(ctx)
- if unit is None:
- return
- if ctx.file_type == 'yaml':
- if unit not in (' ', ' '):
- return # let check_indent_unit_* report this
- else:
- if unit != '\t':
- return
- for dl in ctx.lines:
- if dl.linetype in (LineType.BLANK, LineType.PREPROCESSOR):
- continue
- if dl.linetype == LineType.CONTINUATION:
- continue # continuations align to <, not to indent unit
- if dl.linetype in (LineType.COMMENT_BODY, LineType.COMMENT_END):
+def _walk_bodies(lines):
+ """Yield lists of immediate-child NODE_OPEN lines for each node body
+ in the input. Skips ref-nodes (&label) since those don't have an
+ intrinsic ordering."""
+ # Array of stacked nodes (parent/child)
+ body_stack = [[]]
+ # Current stack of nodes, purely to track parent relationship for each node
+ node_stack = []
+ parent_dl = None
+ for dl in lines:
+ if dl.linetype == LineType.NODE_OPEN:
+ dl.parent = parent_dl
+ node_stack.append(dl)
+ body_stack[-1].append(dl)
+ body_stack.append([])
+ parent_dl = dl
continue
- if not dl.indent_str:
+ if dl.linetype == LineType.NODE_CLOSE:
+ if len(body_stack) <= 1:
+ # Unbalanced; ignore to avoid crashing on malformed input
+ continue
+ parent_dl = node_stack.pop().parent
+ yield body_stack.pop()
continue
- # The indent must be 'unit' repeated dl.depth times, exactly.
- # NODE_CLOSE lines have depth equal to the post-decrement value,
- # which matches the indent expected.
- expected = unit * dl.depth
- if dl.indent_str != expected:
- yield (dl.lineno,
- 'indent mismatch (expected depth %d * %r)' %
- (dl.depth, unit))
+ while body_stack:
+ yield body_stack.pop()
def check_blank_lines(ctx):
@@ -475,6 +440,12 @@ def check_blank_lines(ctx):
if lines[i].linetype == LineType.BLANK and \
lines[i - 1].linetype == LineType.BLANK:
yield (lines[i].lineno, 'consecutive blank lines')
+ prev_is_blank = lines[i].linetype == LineType.BLANK
+ for cont in lines[i].continuations:
+ if cont.linetype == LineType.BLANK and prev_is_blank:
+ yield (cont.lineno, 'consecutive blank lines')
+ prev_is_blank = cont.linetype == LineType.BLANK
+
# Blank right after { or right before }
for i, dl in enumerate(lines):
if dl.linetype != LineType.BLANK:
@@ -487,46 +458,20 @@ def check_blank_lines(ctx):
yield (dl.lineno, 'blank line at end of node body')
-def _walk_bodies(lines):
- """Yield lists of immediate-child NODE_OPEN lines for each node body
- in the input. Skips ref-nodes (&label) since those don't have an
- intrinsic ordering."""
- body_stack = [[]]
- for dl in lines:
- if dl.linetype == LineType.NODE_OPEN:
- body_stack[-1].append(dl)
- body_stack.append([])
- continue
- if dl.linetype == LineType.NODE_CLOSE:
- if len(body_stack) <= 1:
- # Unbalanced; ignore to avoid crashing on malformed input
- continue
- yield body_stack.pop()
- continue
- while body_stack:
- yield body_stack.pop()
-
-
-def _natural_sort_key(s):
- """Split a string into a tuple of (kind, value) pairs that compares
- numeric runs as ints, so 'foo10' sorts after 'foo2'."""
- parts = []
- for part in re.split(r'(\d+)', s):
- if part.isdigit():
- parts.append((0, int(part)))
- else:
- parts.append((1, part))
- return tuple(parts)
-
-
def check_child_address_order(ctx):
"""Addressed siblings (foo@N) must appear in ascending address
- order within their parent node body."""
+ order within their parent node body.
+ Exception: Top-level in DTS follows name order, regardless of unit address
+ in memory@N and soc@N nodes
+ """
for children in _walk_bodies(ctx.lines):
addressed = []
for c in children:
if c.node_addr is None:
continue
+ if c.parent and c.parent.is_root:
+ # Top-level does not use unit address sorting usually
+ continue
try:
parts = tuple(int(p, 16) for p in c.node_addr.split(','))
except ValueError:
@@ -544,12 +489,16 @@ def check_child_name_order(ctx):
"""Unaddressed siblings must appear in natural-sort order by node
name within their parent node body. Addressed children are scoped
by check_child_address_order; reference nodes (&label { ... }) and
- the root node are skipped."""
+ the root node are skipped.
+ However root node has children with and without unit address, and
+ sorting should be only by name."""
for children in _walk_bodies(ctx.lines):
unaddressed = []
for c in children:
if c.node_addr is not None:
- continue
+ # Skip nodes with unit address, except when sorting top-level
+ if not c.parent or not c.parent.is_root:
+ continue
if c.node_name in (None, '/'):
continue
if c.ref_name is not None:
@@ -562,41 +511,245 @@ def check_child_name_order(ctx):
'child node %r out of name order' % dl.node_name)
-def _property_bucket(name):
- """Return the canonical bucket index for a property:
- 0 device_type
+def check_continuation_alignment(ctx):
+ """A multi-line property's continuation lines must align their
+ first non-whitespace character to the display column of:
+ 1. the first '<' or '"' after the '=' in the leading line, if continuation is with '<' or '"'
+ 2. the first value, if the continuation is still the same phandle.
+ Display columns are used so tab-indented .dts files (where a continuation
+ aligns with tabs plus spaces) are compared correctly."""
+ for dl in ctx.lines:
+ if dl.linetype != LineType.PROPERTY:
+ continue
+ if not dl.continuations:
+ continue
+ eq = dl.raw.find('=')
+ if eq < 0:
+ continue
+ # First '<' or '"' after '=', but ignore comments and strip trailing
+ # whitespace (e.g. remaining after removing the comment)
+ rest = _strip_strings_and_comments(dl.raw[eq + 1:]).rstrip()
+ m = re.search(r'\s*([<"])', rest)
+ if not m:
+ continue
+ dl_value_complete = rest.endswith('",') or rest.endswith('>,')
+ target_col = _display_col(_strip_strings_and_comments(dl.raw[:eq + 1 + m.start(1)]))
+ for cont in dl.continuations:
+ if cont.linetype == LineType.BLANK:
+ continue
+ target_offset = 0
+ err_msg_explanation = 'to < or "'
+ if not dl_value_complete:
+ target_offset = 1
+ err_msg_explanation = 'to the value under <'
+ if _display_col(cont.indent_str) != target_col + target_offset:
+ yield (cont.lineno,
+ 'continuation should align to column %d '
+ '(%s)' % (target_col + target_offset + 1, err_msg_explanation))
+ # Align to the value within <> or "" of continuation (so the previous line)
+ if len(cont.code):
+ dl_value_complete = cont.code.endswith('",') or cont.code.endswith('>,')
+
+
+def _check_hex_case(dl):
+ if dl.linetype in (LineType.BLANK, LineType.COMMENT,
+ LineType.COMMENT_START, LineType.COMMENT_BODY,
+ LineType.COMMENT_END, LineType.PREPROCESSOR):
+ return
+ for m in re.finditer(r'\b0[xX][0-9a-fA-F]+\b', dl.code):
+ lit = m.group(0)
+ if any(c.isupper() for c in lit[2:]) or lit[1] == 'X':
+ yield (dl.lineno,
+ 'hex literal %r must be lowercase' % lit)
+
+
+def check_hex_case(ctx):
+ """Hex literals (0xN) must use lowercase digits and prefix."""
+ for dl in ctx.lines:
+ yield from _check_hex_case(dl)
+ for cont in dl.continuations:
+ yield from _check_hex_case(cont)
+
+
+def check_indent_consistent(ctx):
+ """All indented lines must be a multiple of the detected unit."""
+ (unit, lineno) = _detect_indent_unit(ctx)
+ if unit is None:
+ return
+ if ctx.file_type == 'yaml':
+ if unit not in (' ', ' '):
+ return # let check_indent_unit_* report this
+ else:
+ if unit != '\t':
+ return
+
+ for dl in ctx.lines:
+ if dl.continuation:
+ continue # continuations align to <, not to indent unit
+ if dl.linetype in (LineType.BLANK, LineType.PREPROCESSOR):
+ continue
+ if dl.linetype in (LineType.COMMENT_BODY, LineType.COMMENT_END):
+ continue
+ if not dl.indent_str:
+ continue
+ # The indent must be 'unit' repeated dl.depth times, exactly.
+ # NODE_CLOSE lines have depth equal to the post-decrement value,
+ # which matches the indent expected.
+ expected = unit * dl.depth
+ if dl.indent_str != expected:
+ yield (dl.lineno,
+ 'indent mismatch (expected depth %d * %r)' %
+ (dl.depth, unit))
+
+
+def check_indent_unit_dts(ctx):
+ """DTS files: 1 tab per level. Always required."""
+ (unit, lineno) = _detect_indent_unit(ctx)
+ if unit is None:
+ return
+ if unit != '\t':
+ yield (lineno, 'indent unit must be 1 tab in DTS, got %r' % unit)
+
+
+def check_indent_unit_relaxed(ctx):
+ """YAML examples: 2 or 4 spaces. Never tabs or other widths."""
+ (unit, lineno) = _detect_indent_unit(ctx)
+ if unit is None:
+ return
+ if unit not in (' ', ' '):
+ yield (lineno, 'indent unit must be 2 or 4 spaces, got %r' % unit)
+
+
+def check_indent_unit_strict(ctx):
+ """YAML: must be exactly 4 spaces. DTS: 1 tab (same as relaxed)."""
+ (unit, lineno) = _detect_indent_unit(ctx)
+ if unit is None:
+ return
+ if ctx.file_type == 'yaml':
+ if unit != ' ':
+ yield (lineno, 'indent unit must be 4 spaces in strict mode, '
+ 'got %r' % unit)
+
+
+def _check_line_length(dl):
+ if dl.linetype == LineType.BLANK:
+ return
+ cols = _display_col(dl.raw)
+ if cols > 80:
+ yield (dl.lineno,
+ 'line exceeds 80 columns (%d)' % cols)
+
+
+def check_line_length(ctx):
+ """Lines must not exceed 80 columns; tabs count as 8 (see
+ _display_col)."""
+ for dl in ctx.lines:
+ yield from _check_line_length(dl)
+ for cont in dl.continuations:
+ yield from _check_line_length(cont)
+
+
+def _check_mixed_indent_chars(dl):
+ if not dl.indent_str:
+ return
+ if dl.linetype == LineType.PREPROCESSOR:
+ return
+ if re.search(r' \t', dl.indent_str):
+ yield (dl.lineno, 'mixed tabs and spaces in indent')
+ if dl.indent_str.count(' ') > 7:
+ yield (dl.lineno, 'too many space characters in indent (more than 7)')
+
+
+def check_mixed_indent_chars(ctx):
+ """Indent must be all-tabs, except for aligning indentation (comments
+ or continued lines)."""
+ for dl in ctx.lines:
+ yield from _check_mixed_indent_chars(dl)
+ for cont in dl.continuations:
+ yield from _check_mixed_indent_chars(cont)
+
+
+def check_node_close_alone(ctx):
+ """The closing '};' of a node must be on its own line. The
+ classifier accepts a canonical "}" or "};" as NODE_CLOSE; a line
+ that is all closures (e.g. "}; };") is still NODE_CLOSE for depth
+ tracking but is flagged here via dl.closures. Any other line that
+ still contains '};' (in code, not in strings or comments) is
+ mixing a node close with something else."""
+ for dl in ctx.lines:
+ if dl.linetype == LineType.NODE_CLOSE:
+ if dl.closures > 1:
+ yield (dl.lineno,
+ 'closing brace must be on its own line')
+ continue
+ if dl.linetype in (LineType.BLANK, LineType.COMMENT,
+ LineType.COMMENT_START, LineType.COMMENT_BODY,
+ LineType.COMMENT_END, LineType.PREPROCESSOR):
+ continue
+ if '};' in dl.code:
+ yield (dl.lineno,
+ 'closing brace must be on its own line')
+
+
+def check_node_name(ctx):
+ """Only recommended characters are used in node names."""
+ for dl in ctx.lines:
+ if not dl.node_name in (None, '/'):
+ if not re.match(r'[0-9a-z][0-9a-z-]*(?<!-)$', dl.node_name):
+ yield (dl.lineno, f'node name "{dl.node_name}" is using discouraged style')
+
+
+def check_property_name(ctx):
+ """Only recommended characters are used in property names."""
+ for dl in ctx.lines:
+ if dl.prop_name:
+ exceptions = ['cpu_off', 'cpu_on', 'cpu_suspend',
+ 'device_type', 'dr_mode',
+ 'mmc-hs200-1_2v', 'mmc-hs200-1_8v', 'mmc-hs400-1_2v', 'mmc-hs400-1_8v',
+ 'opp-avg-kBps', 'opp-peak-kBps', 'phy_type']
+
+ if re.match(r'\#([0-9a-z][0-9a-z-]*(?<!-),)?[a-z-]+-cells$', dl.prop_name):
+ continue
+ if dl.prop_name in exceptions:
+ continue
+ if not re.match(r'([0-9a-z][0-9a-z-]*(?<!-),)?[0-9a-z][0-9a-z-]*(?<!-)$', dl.prop_name):
+ yield (dl.lineno, f'property name "{dl.prop_name}" is using discouraged style')
+
+
+def _property_bucket(name, is_root=False):
+ """Return the canonical bucket (group) index for a property:
+ 0 device_type ('model' in the root node)
1 compatible
- 2 reg / reg-names
+ 2 reg, reg-names
3 ranges
4 standard properties (no vendor comma in #-stripped name)
5 vendor-specific properties
6 status
- Plus a sub-key inside the bucket for fixed slots (device_type, compatible,
- reg, reg-names, ranges, status). 'standard' and 'vendor' return None for
- the sub-key, signalling that the within-bucket key is computed by
- the pairing rules."""
+ Properties sharing a bucket compare equal: their relative order
+ within the group is not checked, only the pairing rules below
+ apply."""
stripped = name.lstrip('#')
- if name == 'device_type':
- return (0, 0)
+ if is_root:
+ if name == 'model':
+ return 0
+ elif name == 'device_type':
+ return 0
if name == 'compatible':
- return (1, 0)
- if name == 'reg':
- return (2, 0)
- if name == 'reg-names':
- return (2, 1)
+ return 1
+ if name in ('reg', 'reg-names'):
+ return 2
if name == 'ranges':
- return (3, 0)
+ return 3
if name == 'status':
- return (6, 0)
- return (5 if ',' in stripped else 4, None)
+ return 6
+ return 5 if ',' in stripped else 4
# Declarative pairing rules: each is a callable
# (name, all_names) -> anchor_name_or_None
-# If a rule returns an anchor, the property sorts immediately after the
+# If a rule returns an anchor, the property must be placed after the
# anchor. Rules are tried in order; the first match wins. If none
-# matches, the within-bucket key falls back to natural sort by the
-# #-stripped name.
+# matches, the property can be placed anywhere within its bucket.
def _pair_pinctrl_names(name, all_names):
"""pinctrl-names follows the highest pinctrl-N in the same node."""
@@ -611,8 +764,7 @@ def _pair_pinctrl_names(name, all_names):
def _pair_x_names(name, all_names):
"""Generic <x>-names follows its owning property. The owner is
usually plural (clocks/clock-names, dmas/dma-names,
- resets/reset-names) but occasionally singular (reg/reg-names is
- handled by the fixed slot above; this rule catches anything else)."""
+ resets/reset-names) but occasionally singular (reg/reg-names)."""
if not name.endswith('-names'):
return None
base = name[:-len('-names')]
@@ -627,30 +779,27 @@ def _pair_x_names(name, all_names):
PAIRING_RULES = (_pair_pinctrl_names, _pair_x_names)
-def _property_sort_key(name, all_names):
- """Sort key for a property among its node-body siblings.
-
- Format: (bucket, within_key, tiebreak). 'within_key' for
- standard/vendor buckets follows pairing rules: a property paired
- with anchor X sorts as if it were X with a higher tiebreak."""
- bucket, fixed_sub = _property_bucket(name)
- if fixed_sub is not None:
- return (bucket, (), fixed_sub)
-
+def _property_anchor(name, all_names):
+ """Return the property this one must be placed after, or None."""
for rule in PAIRING_RULES:
anchor = rule(name, all_names)
if anchor is not None:
- return (bucket, _natural_sort_key(anchor.lstrip('#')), 1)
-
- return (bucket, _natural_sort_key(name.lstrip('#')), 0)
+ return anchor
+ return None
def check_property_order(ctx):
- """Properties within a node body must appear in canonical order:
- compatible, reg(/reg-names), ranges, then the standard group, then
- the vendor-specific group, then status. Inside the standard and
- vendor groups, pairing rules apply (e.g. <x>-names follows <x>);
- everything else falls back to natural sort by the #-stripped name."""
+ """Properties within a node body must be grouped in canonical
+ order: device_type ('model' for the root node), compatible,
+ reg(/reg-names), ranges, then the standard group, then the
+ vendor-specific group, then status.
+
+ The order of properties within one group is free, e.g. it does not
+ matter whether '#address-cells' comes before or after 'clocks'.
+ Paired properties still keep their relative order: <x>-names
+ follows <x> (clocks/clock-names, reg/reg-names, ...), pinctrl-names
+ follows the pinctrl-N states and #size-cells follows
+ #address-cells."""
lines = ctx.lines
for i, dl in enumerate(lines):
if dl.linetype != LineType.NODE_OPEN:
@@ -668,29 +817,62 @@ def check_property_order(ctx):
if len(props) < 2:
continue
all_names = [p.prop_name for p in props]
- keyed = [(p, _property_sort_key(p.prop_name, all_names))
- for p in props]
- for k in range(1, len(keyed)):
- if keyed[k][1] < keyed[k - 1][1]:
- p = keyed[k][0]
- prev = keyed[k - 1][0]
- yield (p.lineno,
- 'property %r out of canonical order '
- '(should sort before %r)' %
- (p.prop_name, prev.prop_name))
+ buckets = [_property_bucket(p.prop_name, dl.is_root) for p in props]
+ findings = []
+ # Group (bucket) order
+ for k in range(1, len(props)):
+ if buckets[k] < buckets[k - 1]:
+ findings.append((props[k].lineno,
+ 'property %r out of canonical order '
+ '(should sort before %r)' %
+ (props[k].prop_name,
+ props[k - 1].prop_name)))
+ # Pairing within a group: the anchor must come first
+ seen = set()
+ for p in props:
+ anchor = _property_anchor(p.prop_name, all_names)
+ if anchor is not None and anchor not in seen:
+ findings.append((p.lineno,
+ 'property %r must be placed after %r' %
+ (p.prop_name, anchor)))
+ seen.add(p.prop_name)
+ yield from sorted(findings)
+
+
+def _check_redundant_whitespace(dl):
+ if dl.linetype in (LineType.COMMENT, LineType.COMMENT_BODY,
+ LineType.COMMENT_END, LineType.COMMENT_START,
+ LineType.PREPROCESSOR):
+ return
+ if re.search(r'(\s\s+|\t)\{', dl.code):
+ yield (dl.lineno, 'extra whitespace before {')
+ if re.search(r':(\s\s+|\t)', dl.code):
+ yield (dl.lineno, 'extra whitespace after :')
+ if re.search(r'\s+;', dl.code):
+ yield (dl.lineno, 'extra whitespace before ;')
-def _strip_strings_and_comments(text):
- """Remove string literals and /* */ + // comments from a single
- line, replacing them with empty strings. Used so syntactic checks
- (whitespace, hex case, etc.) don't false-positive on contents of
- quoted strings or comments. An unclosed /* on the line is treated
- as a comment running to end of line."""
- text = re.sub(r'"(?:[^"\\]|\\.)*"', '""', text)
- text = re.sub(r'/\*.*?\*/', '', text)
- text = re.sub(r'/\*.*$', '', text)
- text = re.sub(r'//.*$', '', text)
- return text
+def check_redundant_whitespace(ctx):
+ """No whitespace between brackets or other code elements.
+ See also check_value_whitespace() for more checks."""
+ for dl in ctx.lines:
+ yield from _check_redundant_whitespace(dl)
+ for cont in dl.continuations:
+ yield from _check_redundant_whitespace(cont)
+
+
+def check_redundant_whitespace_strict(ctx):
+ """No whitespace between brackets or other code elements.
+ See also check_value_whitespace() for more checks."""
+ for dl in ctx.lines:
+ if dl.linetype in (LineType.COMMENT, LineType.COMMENT_BODY,
+ LineType.COMMENT_END, LineType.COMMENT_START,
+ LineType.PREPROCESSOR):
+ continue
+ if re.search(r'(\s\s+|\t)=', dl.code):
+ yield (dl.lineno, 'extra whitespace before =')
+ if re.search(r'=(\s\s+|\t)', dl.code):
+ yield (dl.lineno, 'extra whitespace after =')
def check_required_blank_lines(ctx):
@@ -710,6 +892,8 @@ def check_required_blank_lines(ctx):
if d.linetype == LineType.NODE_CLOSE and \
d.depth == body_depth - 1 and depth_inside == 0:
break
+ if d.continuation:
+ continue
# Track depth inside nested children so we only look at
# immediate-body items.
if d.linetype == LineType.NODE_OPEN and \
@@ -729,8 +913,6 @@ def check_required_blank_lines(ctx):
LineType.COMMENT_BODY, LineType.COMMENT_END,
LineType.PREPROCESSOR):
continue
- if d.linetype == LineType.CONTINUATION:
- continue
needs_blank = False
if d.linetype == LineType.NODE_OPEN:
@@ -752,19 +934,58 @@ def check_required_blank_lines(ctx):
between_blanks = 0
-def check_hex_case(ctx):
- """Hex literals (0xN) must use lowercase digits and prefix."""
+def check_tab_in_yaml_example(ctx):
+ """Reject literal tabs in DTS lines when input is YAML.
+
+ For YAML examples, indent and content must use spaces. Tabs inside
+ a #define value are tolerated (those are CPP macros, not DTS).
+ For .dts files, this rule does not apply -- tabs are required.
+ """
+ if ctx.file_type != 'yaml':
+ return
for dl in ctx.lines:
- if dl.linetype in (LineType.BLANK, LineType.COMMENT,
- LineType.COMMENT_START, LineType.COMMENT_BODY,
- LineType.COMMENT_END, LineType.PREPROCESSOR):
+ if dl.linetype == LineType.PREPROCESSOR:
continue
- text = _strip_strings_and_comments(dl.raw)
- for m in re.finditer(r'\b0[xX][0-9a-fA-F]+\b', text):
- lit = m.group(0)
- if any(c.isupper() for c in lit[2:]) or lit[1] == 'X':
- yield (dl.lineno,
- 'hex literal %r must be lowercase' % lit)
+ if dl.linetype == LineType.BLANK:
+ continue
+ if '\t' in dl.raw:
+ yield (dl.lineno, 'tab character not allowed in DTS example')
+ for cont in dl.continuations:
+ if '\t' in cont.raw:
+ yield (cont.lineno, 'tab character not allowed in DTS example')
+
+
+def _check_trailing_whitespace(dl):
+ if dl.raw != dl.raw.rstrip():
+ yield (dl.lineno, 'trailing whitespace')
+
+
+def check_trailing_whitespace(ctx):
+ for dl in ctx.lines:
+ yield from _check_trailing_whitespace(dl)
+ for cont in dl.continuations:
+ yield from _check_trailing_whitespace(cont)
+
+
+def check_unclosed_block_comment(ctx):
+ """Every /* must have a matching */ in the same block. Catches both
+ a comment opened on its own line (COMMENT_START) and a tail comment
+ opened on a PROPERTY or other code line (where in_block_comment is
+ set by _split_code so the next line becomes COMMENT_BODY without a
+ preceding COMMENT_START)."""
+ open_lineno = None
+ for dl in ctx.lines:
+ if dl.linetype == LineType.COMMENT_START:
+ open_lineno = dl.lineno
+ elif dl.linetype == LineType.COMMENT_END:
+ open_lineno = None
+ elif dl.linetype == LineType.COMMENT_BODY and open_lineno is None:
+ # Block was opened by a /* tail on a code line; report at
+ # the first orphan body line since the originating line is
+ # already classified as something else.
+ open_lineno = dl.lineno
+ if open_lineno is not None:
+ yield (open_lineno, 'unclosed /* block comment')
def check_unit_address_format(ctx):
@@ -798,6 +1019,17 @@ def check_unit_address_format(ctx):
break
+def check_unused_labels(ctx):
+ """Labels defined but never referenced are clutter."""
+ defined, referenced = collect_labels_and_refs(ctx.text)
+ for label in sorted(defined - referenced):
+ # Find the line where this label is defined for line-number
+ # reporting.
+ m = re.search(r'(?m)^.*\b' + re.escape(label) + r'\s*:', ctx.text)
+ lineno = ctx.text[:m.start()].count('\n') + 1 if m else 1
+ yield (lineno, 'label %r defined but never &-referenced' % label)
+
+
def check_value_whitespace(ctx):
"""A <...> cell list must have no whitespace directly after '<'
or directly before '>'. Continuation lines are joined onto the
@@ -808,9 +1040,9 @@ def check_value_whitespace(ctx):
for dl in ctx.lines:
if dl.linetype != LineType.PROPERTY:
continue
- segs = [_strip_strings_and_comments(dl.raw).strip()]
+ segs = [dl.code.strip()]
for cont in dl.continuations:
- segs.append(_strip_strings_and_comments(cont.stripped).strip())
+ segs.append(cont.code.strip())
text = ''
for s in segs:
if not s:
@@ -826,131 +1058,13 @@ def check_value_whitespace(ctx):
break
-def check_node_close_alone(ctx):
- """The closing '};' of a node must be on its own line. The
- classifier accepts a canonical "}" or "};" as NODE_CLOSE; a line
- that is all closures (e.g. "}; };") is still NODE_CLOSE for depth
- tracking but is flagged here via dl.closures. Any other line that
- still contains '};' (in code, not in strings or comments) is
- mixing a node close with something else."""
- for dl in ctx.lines:
- if dl.linetype == LineType.NODE_CLOSE:
- if dl.closures > 1:
- yield (dl.lineno,
- 'closing brace must be on its own line')
- continue
- if dl.linetype in (LineType.BLANK, LineType.COMMENT,
- LineType.COMMENT_START, LineType.COMMENT_BODY,
- LineType.COMMENT_END, LineType.PREPROCESSOR):
- continue
- text = _strip_strings_and_comments(dl.raw)
- if '};' in text:
- yield (dl.lineno,
- 'closing brace must be on its own line')
-
-
-def _display_col(text):
- """Visual column width of text, with tabs expanded to the next
- 8-column stop, matching how printf and most editors render a
- line and the kernel-wide line length convention."""
- col = 0
- for ch in text:
- if ch == '\t':
- col = (col // 8 + 1) * 8
- else:
- col += 1
- return col
-
-
-def check_line_length(ctx):
- """Lines must not exceed 80 columns; tabs count as 8 (see
- _display_col)."""
- for dl in ctx.lines:
- if dl.linetype == LineType.BLANK:
- continue
- cols = _display_col(dl.raw)
- if cols > 80:
- yield (dl.lineno,
- 'line exceeds 80 columns (%d)' % cols)
-
-
-def check_continuation_alignment(ctx):
- """A multi-line property's continuation lines must align their
- first non-whitespace character to the display column of the first
- '<' or '"' after the '=' in the leading line. Display columns are
- used so tab-indented .dts files (where a continuation aligns with
- tabs plus spaces) are compared correctly."""
- for dl in ctx.lines:
- if dl.linetype != LineType.PROPERTY:
- continue
- if not dl.continuations:
- continue
- eq = dl.raw.find('=')
- if eq < 0:
- continue
- # First '<' or '"' after '='
- rest = dl.raw[eq + 1:]
- m = re.search(r'[<"]', rest)
- if not m:
- continue
- target_col = _display_col(dl.raw[:eq + 1 + m.start()])
- for cont in dl.continuations:
- if _display_col(cont.indent_str) != target_col:
- yield (cont.lineno,
- 'continuation should align to column %d '
- '(under "<" or \\")' % (target_col + 1))
-
-
-def check_unclosed_block_comment(ctx):
- """Every /* must have a matching */ in the same block. Catches both
- a comment opened on its own line (COMMENT_START) and a tail comment
- opened on a PROPERTY or other code line (where in_block_comment is
- set by _split_code so the next line becomes COMMENT_BODY without a
- preceding COMMENT_START)."""
- open_lineno = None
- for dl in ctx.lines:
- if dl.linetype == LineType.COMMENT_START:
- open_lineno = dl.lineno
- elif dl.linetype == LineType.COMMENT_END:
- open_lineno = None
- elif dl.linetype == LineType.COMMENT_BODY and open_lineno is None:
- # Block was opened by a /* tail on a code line; report at
- # the first orphan body line since the originating line is
- # already classified as something else.
- open_lineno = dl.lineno
- if open_lineno is not None:
- yield (open_lineno, 'unclosed /* block comment')
-
-
-def check_unused_labels(ctx):
- """Labels defined but never referenced are clutter."""
- defined, referenced = collect_labels_and_refs(ctx.text)
- for label in sorted(defined - referenced):
- # Find the line where this label is defined for line-number
- # reporting.
- m = re.search(r'(?m)^.*\b' + re.escape(label) + r'\s*:', ctx.text)
- lineno = ctx.text[:m.start()].count('\n') + 1 if m else 1
- yield (lineno, 'label %r defined but never &-referenced' % label)
-
-
# --- registry --------------------------------------------------------------
RULES = [
# 'relaxed' is the default; rules in this group must produce zero
# output on a clean kernel tree (post the small prep-cleanup
# commit at the head of this series).
- Rule('trailing-whitespace', 'relaxed',
- 'no trailing whitespace on any line',
- check_trailing_whitespace),
- Rule('tab-in-yaml', 'relaxed',
- 'YAML (also DTS examples) may not contain tab characters',
- check_tab_in_yaml_example, applies_to=('yaml',)),
- Rule('mixed-indent-chars', 'relaxed',
- 'indent must not mix tabs and spaces',
- check_mixed_indent_chars, applies_to=('dts', 'dtsi', 'dtso')),
- Rule('unclosed-block-comment', 'relaxed',
- 'every /* block comment must close with */',
- check_unclosed_block_comment),
+ # Rules are sorted here by group (relaxed, strict, stricter) and name
# DTS files always use tabs; this is not negotiable per kernel
# coding style (.dts files are real source). Relaxed mode.
@@ -958,19 +1072,26 @@ RULES = [
'DTS files: 1 tab per nesting level',
check_indent_unit_dts,
applies_to=('dts', 'dtsi', 'dtso')),
+ Rule('mixed-indent-chars', 'relaxed',
+ 'indent must not mix tabs and spaces',
+ check_mixed_indent_chars, applies_to=('dts', 'dtsi', 'dtso')),
+ # See also check_redundant_whitespace_strict() and check_value_whitespace()
+ Rule('redundant-whitespace', 'relaxed',
+ 'no redundant whitespace within code',
+ check_redundant_whitespace),
+ Rule('tab-in-yaml', 'relaxed',
+ 'YAML (also DTS examples) may not contain tab characters',
+ check_tab_in_yaml_example, applies_to=('yaml',)),
+ Rule('trailing-whitespace', 'relaxed',
+ 'no trailing whitespace on any line',
+ check_trailing_whitespace),
+ Rule('unclosed-block-comment', 'relaxed',
+ 'every /* block comment must close with */',
+ check_unclosed_block_comment),
# 'strict' rules are opt-in (e.g. for new submissions via
# checkpatch.pl in a follow-up series). They flag many existing
# files and can be promoted to relaxed once those are cleaned up.
- Rule('indent-unit', 'strict',
- 'YAML: 2 or 4 spaces per level',
- check_indent_unit_relaxed, applies_to=('yaml',)),
- Rule('indent-unit-strict', 'strict',
- 'YAML: must be 4 spaces per level',
- check_indent_unit_strict, applies_to=('yaml',)),
- Rule('indent-consistent', 'strict',
- 'every line indented at depth * unit',
- check_indent_consistent),
Rule('blank-lines', 'strict',
'no consecutive blanks; no blanks at node body edges',
check_blank_lines),
@@ -980,45 +1101,72 @@ RULES = [
Rule('child-name-order', 'strict',
'unaddressed siblings must be in natural-sort name order',
check_child_name_order),
+ Rule('continuation-alignment', 'strict',
+ 'multi-line property continuations align under <, " or the value under <',
+ check_continuation_alignment),
+ Rule('hex-case', 'strict',
+ 'hex literals must be lowercase',
+ check_hex_case),
+ Rule('indent-consistent', 'strict',
+ 'every line indented at depth * unit',
+ check_indent_consistent),
+ Rule('indent-unit', 'strict',
+ 'YAML: 2 or 4 spaces per level',
+ check_indent_unit_relaxed, applies_to=('yaml',)),
+ Rule('indent-unit-strict', 'strict',
+ 'YAML: must be 4 spaces per level',
+ check_indent_unit_strict, applies_to=('yaml',)),
+ Rule('line-length', 'strict',
+ 'lines must not exceed 80 columns',
+ check_line_length, applies_to=('yaml',)),
+ Rule('line-length-dts', 'stricter',
+ 'lines must not exceed 80 columns',
+ check_line_length, applies_to=('dts', 'dtsi', 'dtso')),
+ Rule('node-close-alone', 'strict',
+ 'closing brace must be on its own line',
+ check_node_close_alone),
+ Rule('node-name', 'strict',
+ 'node names use only recommended characters (see DTS Coding Style)',
+ check_node_name),
+ Rule('property-name', 'strict',
+ 'property names use only recommended characters (see DTS Coding Style)',
+ check_property_name),
Rule('property-order', 'strict',
- 'canonical bucket + pairing + natural-sort order of properties',
+ 'canonical group + pairing order of properties (order within '
+ 'a group is not checked)',
check_property_order),
+ # See also check_redundant_whitespace() and check_value_whitespace()
+ Rule('redundant-whitespace-strict', 'strict',
+ 'no redundant whitespace within code',
+ check_redundant_whitespace_strict),
Rule('required-blank-lines', 'strict',
'blank line before child nodes and before "status"',
check_required_blank_lines),
- Rule('hex-case', 'strict',
- 'hex literals must be lowercase',
- check_hex_case),
Rule('unit-address-format', 'strict',
'unit addresses must be lowercase hex without leading zeros',
check_unit_address_format),
- Rule('value-whitespace', 'strict',
- 'no whitespace directly inside <...> brackets',
- check_value_whitespace),
- Rule('node-close-alone', 'strict',
- 'closing brace must be on its own line',
- check_node_close_alone),
- Rule('line-length', 'strict',
- 'lines must not exceed 80 columns',
- check_line_length),
- Rule('continuation-alignment', 'strict',
- 'multi-line property continuations align under "<" or "\\""',
- check_continuation_alignment),
Rule('unused-labels', 'strict',
'every label must be &-referenced in the same example/file '
'(skipped for .dtsi/.dtso since labels there are exported)',
- check_unused_labels, applies_to=('yaml', 'dts')),
+ check_unused_labels, applies_to=('yaml',)),
+ Rule('unused-labels-dts', 'stricter',
+ 'every label must be &-referenced in the same example/file '
+ '(skipped for .dtsi/.dtso since labels there are exported)',
+ check_unused_labels, applies_to=('dts',)),
+ Rule('value-whitespace', 'strict',
+ 'no whitespace directly inside <...> brackets',
+ check_value_whitespace),
]
-def select_rules(mode, input_kind):
+def select_rules(mode, file_type):
"""Return rules that apply to the given mode and input type."""
- rank = {'relaxed': 0, 'strict': 1}
+ rank = {'relaxed': 0, 'strict': 1, 'stricter': 2}
out = []
for r in RULES:
if rank[r.mode] > rank[mode]:
continue
- if input_kind not in r.applies_to:
+ if file_type not in r.applies_to:
continue
out.append(r)
return out
@@ -1028,12 +1176,12 @@ def select_rules(mode, input_kind):
# Block runner
# ---------------------------------------------------------------------------
-def check_block(text, mode, input_type):
+def check_block(text, mode, file_type):
"""Run all selected rules on a single block of DTS text. Returns a
list of (lineno, rule_name, message) tuples."""
lines = classify_lines(text)
- ctx = Ctx(lines, text, mode, input_type)
- rules = select_rules(mode, input_type)
+ ctx = Ctx(lines, text, mode, file_type)
+ rules = select_rules(mode, file_type)
findings = []
for r in rules:
for lineno, msg in r.check(ctx):
@@ -1090,7 +1238,7 @@ def iter_dts_file(filepath):
# Top-level processing
# ---------------------------------------------------------------------------
-def input_kind(filepath):
+def get_file_type(filepath):
p = filepath.lower()
if p.endswith('.yaml') or p.endswith('.yml'):
return 'yaml'
@@ -1110,17 +1258,17 @@ DTS_FAMILY = ('dts', 'dtsi', 'dtso')
def collect_findings(filepath, mode):
"""Return a (lines, count) pair for filepath. lines is a list of
formatted output strings; count is the number of findings."""
- kind = input_kind(filepath)
- if kind == 'yaml':
+ file_type = get_file_type(filepath)
+ if file_type == 'yaml':
iterator = iter_yaml_examples(filepath)
- elif kind in DTS_FAMILY:
+ elif file_type in DTS_FAMILY:
iterator = iter_dts_file(filepath)
else:
return (['%s: unknown file type, skipping' % filepath], 0)
out = []
for text, base, idx in iterator:
- for lineno, rule, msg in check_block(text, mode, kind):
+ for lineno, rule, msg in check_block(text, mode, file_type):
abs_line = base + lineno - 1
ex_tag = '' if idx is None else ' example %d' % idx
out.append('%s:%d:%s [%s] %s' %
@@ -1141,7 +1289,7 @@ def main():
description='Check DTS coding style on YAML examples and '
'.dts/.dtsi/.dtso files.',
fromfile_prefix_chars='@')
- ap.add_argument('--mode', choices=('relaxed', 'strict'),
+ ap.add_argument('--mode', choices=('relaxed', 'strict', 'stricter'),
default='relaxed',
help='which rule set to apply (default: relaxed)')
ap.add_argument('-j', '--jobs', type=int, default=0,
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-blank-lines.dts b/scripts/dtc/dt-style-selftest/bad/dts-blank-lines.dts
new file mode 100644
index 000000000000..f2e99fb7bb29
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-blank-lines.dts
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+
+/ {
+ compatible = "example,test-board";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ interrupt-controller@10000 {
+ compatible = "example,intc";
+
+ reg = <0x10000 0x1000>;
+
+ clocks = <1 2 3>,
+
+
+ /* Comment is not a blank line */
+ <4 5 6>,
+
+ /* Comment is not a blank line */
+ <7 8 9>;
+
+
+ interrupts = <1>;
+
+ /* Comment is not a blank line */
+ qcom,calibration-variant = "foo";
+ };
+
+
+ interrupt-controller@20000 {
+
+ compatible = "example,intc";
+ reg = <0x20000 0x1000>;
+
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-child-name-order.dtso b/scripts/dtc/dt-style-selftest/bad/dts-child-name-order.dtso
new file mode 100644
index 000000000000..74b49be69e98
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-child-name-order.dtso
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ pmu {
+ compatible = "example,pmu";
+
+ /* Include labels to be sure they do not affect sorting */
+ foo: foo {
+ label = "foo";
+ };
+
+ label_bar: bar {
+ label = "bar";
+ };
+ };
+
+ memory@a0000000 {
+ device_type = "memory";
+ reg = <0x0 0xa0000000 0x0 0x0>;
+ };
+
+ pmu-2 {
+ compatible = "example,pmu";
+
+ /* Just reference labels to avoid strict warnings */
+ example,foo = <&foo>, <&label_bar>;
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-cont-align.dts b/scripts/dtc/dt-style-selftest/bad/dts-cont-align.dts
new file mode 100644
index 000000000000..91a74887c774
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-cont-align.dts
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+
+/ {
+ compatible = "example,test-board";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ interrupt-controller@10000 {
+ compatible = "example,intc";
+ reg = <0x10000 0x1000>;
+ clocks = <1 2 3>, /* comments with " < , should not matter */
+ <4 5 6>,
+ /* but comments should be placed properly */
+ <7 8 9>;
+ interrupts = <1 2 3>, /* comments with " < , should not ... */
+ <4 5 6>,
+ <7 8 9>;
+ pinmux = <0x01
+ 0x02>,
+ <0x03
+ 0x04>;
+ power-domain-names = "foo",
+ "bar", /* comments with " < , should not */
+ "baz";
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dts b/scripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dts
new file mode 100644
index 000000000000..74c956398324
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dts
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ memory@a0000000 {
+ device_type = "memory";
+ reg = <0x0 0xa0000000 0x0 0x0>;
+ };
+
+ pmu {
+ compatible = "example,pmu";
+ };
+
+ soc@0 {
+ compatible = "simple-bus";
+ ranges = <0 0 0 0xc0000000>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ serial@20000 {
+ compatible = "example,serial";
+ reg = <0x20000 0x1000>;
+ };
+
+ interrupt-controller@10000 {
+ compatible = "example,intc";
+ reg = <0x10000 0x1000>;
+ interrupts = <1 2 3>;
+ };
+
+ serial@30000 {
+ compatible = "example,serial";
+ reg = <0x30000 0x1000>;
+ };
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dtso b/scripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dtso
new file mode 100644
index 000000000000..052c02935a45
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dtso
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ memory@a0000000 {
+ device_type = "memory";
+ reg = <0x0 0xa0000000 0x0 0x0>;
+ };
+
+ pmu {
+ compatible = "example,pmu";
+ };
+
+ soc@0 {
+ compatible = "simple-bus";
+ ranges = <0 0 0 0xc0000000>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ serial@20000 {
+ compatible = "example,serial";
+ reg = <0x20000 0x1000>;
+ };
+
+ interrupt-controller@10000 {
+ compatible = "example,intc";
+ reg = <0x10000 0x1000>;
+ interrupts = <1 2 3>;
+ };
+
+ serial@30000 {
+ compatible = "example,serial";
+ reg = <0x30000 0x1000>;
+ };
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-extend-node-child-name-order.dtso b/scripts/dtc/dt-style-selftest/bad/dts-extend-node-child-name-order.dtso
new file mode 100644
index 000000000000..d9cf670f19f6
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-extend-node-child-name-order.dtso
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ pmu {
+ compatible = "example,pmu";
+
+ /* Just reference labels to avoid strict warnings */
+ example,foo = <&foo>, <&label_bar>;
+ };
+};
+
+&pmu {
+ /* Include labels to be sure they do not affect sorting */
+ foo: foo {
+ label = "foo";
+ };
+
+ label_bar: bar {
+ label = "bar";
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-extend-node-digit-node-order.dtso b/scripts/dtc/dt-style-selftest/bad/dts-extend-node-digit-node-order.dtso
new file mode 100644
index 000000000000..4b2cf60e5a92
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-extend-node-digit-node-order.dtso
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ soc: soc@0 {
+ compatible = "simple-bus";
+ ranges = <0 0 0 0xc0000000>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+};
+
+&soc {
+ serial@20000 {
+ compatible = "example,serial";
+ reg = <0x20000 0x1000>;
+ };
+
+ interrupt-controller@10000 {
+ compatible = "example,intc";
+ reg = <0x10000 0x1000>;
+ interrupts = <1 2 3>;
+ };
+
+ serial@30000 {
+ compatible = "example,serial";
+ reg = <0x30000 0x1000>;
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-line-length.dts b/scripts/dtc/dt-style-selftest/bad/dts-line-length.dts
new file mode 100644
index 000000000000..adf40e3c95f7
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-line-length.dts
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/*
+ * Test fixture: Line length in DTS
+ */
+
+/dts-v1/;
+
+/ {
+ soc@0 {
+ compatible = "simple-bus";
+ ranges = <0 0 0 0xc0000000>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ foo@1000 {
+ compatible = "example,test-line-length-this-is-a-very-long-name-indeed-yeah",
+ "example,test-line-length-this-is-a-very-long-name-indeed-yeah-second";
+ reg = <0x1000 0x100>;
+ };
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-node-name.dts b/scripts/dtc/dt-style-selftest/bad/dts-node-name.dts
new file mode 100644
index 000000000000..b897cbd74dd6
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-node-name.dts
@@ -0,0 +1,60 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ foo_bar {
+ compatible = "example,test-node-name";
+ };
+
+ foo,bar {
+ compatible = "example,test-node-name";
+ };
+
+ foo.bar {
+ compatible = "example,test-node-name";
+ };
+
+ foo+bar {
+ compatible = "example,test-node-name";
+ };
+
+ foo-bar- {
+ compatible = "example,test-node-name";
+ };
+
+ soc@0 {
+ compatible = "simple-bus";
+ ranges = <0 0 0 0xc0000000>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ foo_bar@1000 {
+ compatible = "example,test-node-name";
+ reg = <0x1000 0x100>;
+ };
+
+ foo,bar@2000 {
+ compatible = "example,test-node-name";
+ reg = <0x2000 0x100>;
+ };
+
+ foo.bar@3000 {
+ compatible = "example,test-node-name";
+ reg = <0x3000 0x100>;
+ };
+
+ foo+bar@4000 {
+ compatible = "example,test-node-name";
+ reg = <0x4000 0x100>;
+ };
+
+ foo-bar-@5000 {
+ compatible = "example,test-node-name";
+ reg = <0x5000 0x100>;
+ };
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-property-name.dts b/scripts/dtc/dt-style-selftest/bad/dts-property-name.dts
new file mode 100644
index 000000000000..110e33a524dd
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-property-name.dts
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ foo {
+ compatible = "example,test-property-name";
+
+ property#foo;
+ property+foo;
+ property-foo;
+ property-foo-;
+ property.foo;
+ property?foo;
+ property_foo;
+
+ vendor,property#foo;
+ vendor,property+foo;
+ vendor,property,foo;
+ vendor,property-foo;
+ vendor,property-foo-;
+ vendor,property.foo;
+ vendor,property?foo;
+ vendor,property_foo;
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-property-order.dts b/scripts/dtc/dt-style-selftest/bad/dts-property-order.dts
index f31abb6ceae4..eb36daa4fe72 100644
--- a/scripts/dtc/dt-style-selftest/bad/dts-property-order.dts
+++ b/scripts/dtc/dt-style-selftest/bad/dts-property-order.dts
@@ -6,6 +6,11 @@
/dts-v1/;
/ {
+ compatible = "example,test-board", "example,test-soc";
+ model = "DT style selftest";
+ qcom,board-id = <8 0>;
+ chassis-type = "handset";
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -38,6 +43,19 @@
<4 5 6>,
<7 8 9>;
compatible = "example,intc";
+ qcom,calibration-variant = "foo";
+ clocks = <6>;
+ qcom,opp-fuse-level = <1>;
};
};
};
+
+/ {
+ compatible = "example,test-board", "example,test-soc";
+ model = "DT style selftest";
+};
+
+/{
+ compatible = "example,test-board", "example,test-soc";
+ model = "DT style selftest";
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-property-order.dtso b/scripts/dtc/dt-style-selftest/bad/dts-property-order.dtso
new file mode 100644
index 000000000000..b2e564f2af2b
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-property-order.dtso
@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/*
+ * Test fixture: Incorrect property order
+ */
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ compatible = "example,test-board", "example,test-soc";
+ model = "DT style selftest";
+ qcom,board-id = <8 0>;
+ chassis-type = "handset";
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ reg = <0x0 0x0>;
+ compatible = "arm,cortex-a57";
+ device_type = "cpu";
+ enable-method = "psci";
+ };
+ };
+
+ pmu {
+ compatible = "example,pmu";
+
+ status = "disabled";
+ dma-coherent;
+ };
+
+ soc@0 {
+ ranges = <0 0 0 0xc0000000>;
+ compatible = "simple-bus";
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ interrupt-controller@10000 {
+ reg = <0x10000 0x1000>;
+ interrupts = <1 2 3>,
+ <4 5 6>,
+ <7 8 9>;
+ compatible = "example,intc";
+ qcom,calibration-variant = "foo";
+ clocks = <6>;
+ qcom,opp-fuse-level = <1>;
+ };
+ };
+};
+
+&{/} {
+ compatible = "example,test-board", "example,test-soc";
+ model = "DT style selftest";
+};
+
+&{/}{
+ compatible = "example,test-board", "example,test-soc";
+ model = "DT style selftest";
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws-strict.dts b/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws-strict.dts
new file mode 100644
index 000000000000..201e3940ba1c
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws-strict.dts
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+
+#define SOME_MACRO(foo) \
+ (foo) ? <1> : <2> ;
+
+/ {
+ compatible = "example,test-board";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ /* comments { are okay = though ; */
+ soc: soc@0 { /* comments { are okay = though ; */
+ compatible = "simple-bus"; /* comments { are okay = though ; */
+ ranges = <0 0 0 0xc0000000>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ } ;
+}; /* comments { are okay = though ; */
+
+&soc {
+ serial: serial@20000 { /* comments { are okay = though ; */
+ compatible = "example,serial";
+ reg = <0x20000 0x1000>;
+ } ;
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws.dts b/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws.dts
new file mode 100644
index 000000000000..f6480ddc508a
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws.dts
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+
+#define SOME_MACRO(foo) \
+ (foo) ? <1> : <2> ;
+
+/ {
+ compatible = "example,test-board";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ /* comments { are okay = though ; */
+ soc: soc@0 { /* comments { are okay = though ; */
+ compatible = "simple-bus"; /* comments { are okay = though ; */
+ ranges = <0 0 0 0xc0000000>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ } ;
+}; /* comments { are okay = though ; */
+
+&soc {
+ serial: serial@20000 { /* comments { are okay = though ; */
+ compatible = "example,serial";
+ reg = <0x20000 0x1000>,
+ <0x30000 0x1000> ;
+ } ; /* comments { are okay = though ; */
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws.dtso b/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws.dtso
new file mode 100644
index 000000000000..01d94e14071a
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws.dtso
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ compatible = "example,test-board";
+ #address-cells = <1>;
+ #size-cells = <1>;
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-trailing-ws.dts b/scripts/dtc/dt-style-selftest/bad/dts-trailing-ws.dts
new file mode 100644
index 000000000000..73c24525ce18
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-trailing-ws.dts
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+
+/ {
+ compatible = "example,test-board";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ interrupt-controller@10000 {
+ compatible = "example,intc";
+ reg = <0x10000 0x1000>;
+ clocks = <1 2 3>,
+ <4 5 6>,
+ <7 8 9>;
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-unused-label.dts b/scripts/dtc/dt-style-selftest/bad/dts-unused-label.dts
new file mode 100644
index 000000000000..90802ae107e1
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-unused-label.dts
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/*
+ * Test fixture: Unused label in DTS
+ */
+
+/dts-v1/;
+
+/ {
+ soc@0 {
+ compatible = "simple-bus";
+ ranges = <0 0 0 0xc0000000>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ dev: device@1000 {
+ compatible = "example,test-unused-label";
+ reg = <0x1000 0x100>;
+ };
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-blank-lines.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-blank-lines.yaml
new file mode 100644
index 000000000000..a58cd534a003
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-blank-lines.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/test-bad-blank-lines.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Test fixture with too many blank lines
+
+maintainers:
+ - Test User <test@example.com>
+
+properties:
+ compatible:
+ const: example,test-blank-lines
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ foo@1000 {
+ compatible = "example,test-blank-lines";
+
+ reg = <0x1000 0x100>;
+
+ clocks = <1 2 3>,
+
+
+ /* Comment is not a blank line */
+ <4 5 6>,
+
+ /* Comment is not a blank line */
+ <7 8 9>;
+
+
+ interrupts = <1>;
+
+ /* Comment is not a blank line */
+ qcom,calibration-variant = "foo";
+ };
+
+
+ foo@2000 {
+
+ compatible = "example,test-blank-lines";
+
+ reg = <0x2000 0x100>;
+
+ };
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-child-addr-order.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-child-addr-order.yaml
index 3df56e69a1ff..7c3b731e059a 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-child-addr-order.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-child-addr-order.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with addressed children out of order
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-child-name-order.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-child-name-order.yaml
index 35d85e5573c2..f3483033859a 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-child-name-order.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-child-name-order.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with unaddressed children out of name order
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml
index 92778540b056..0189b654a5b0 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with mis-aligned multi-line property
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
@@ -25,6 +25,9 @@ examples:
- |
foo@1000 {
compatible = "example,test-cont-align";
- reg = <0x1000 0x100>,
- <0x2000 0x100>;
+ reg = <0x1000 0x100>, /* comments with " < , should not matter */
+ <0x2000 0x100>, /* comments with " < , should not matter */
+ /* but comments should be placed properly */
+ <0x3000
+ 0x100>;
};
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-digit-node-order.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-digit-node-order.yaml
index 44a9d25e5ba0..068542a98576 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-digit-node-order.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-digit-node-order.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with digit-leading nodes out of address order
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-hex-case.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-hex-case.yaml
index b26d1bf58de9..b0b8683b883a 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-hex-case.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-hex-case.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with uppercase hex literals
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
@@ -25,5 +25,8 @@ examples:
- |
foo@1000 {
compatible = "example,test-hex-case";
- reg = <0xABCD 0x100>;
+ reg = <0xABCD 0x100>,
+ <0x2BCD 0x100>,
+ <0x3BCD
+ 0x100>;
};
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-indent-strict.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-indent-strict.yaml
index bee4cf118d73..155060a79887 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-indent-strict.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-indent-strict.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture using 2-space indent (rejected by strict mode)
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-label-in-string.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-label-in-string.yaml
index ba512869b702..4a69b503af4b 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-label-in-string.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-label-in-string.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture where a label is only "referenced" inside a string
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-line-length.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-line-length.yaml
index 64427bf1c385..6b1209ee4f26 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-line-length.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-line-length.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture exceeding 80 columns
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
@@ -24,6 +24,7 @@ additionalProperties: false
examples:
- |
foo@1000 {
- compatible = "example,test-line-length-this-is-a-very-long-name-indeed-yeah";
+ compatible = "example,test-line-length-this-is-a-very-long-name-indeed-yeah",
+ "example,test-line-length-this-is-a-very-long-name-indeed-yeah-second";
reg = <0x1000 0x100>;
};
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml
index 5401d1a423a1..4f76188b5e23 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture mixing tabs and spaces in indent
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
@@ -26,4 +26,6 @@ examples:
device@1000 {
compatible = "example,test-mixed";
reg = <0x1000 0x100>;
+ clocks = <1>,
+ <2>;
};
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-multi-close.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-multi-close.yaml
index 4d9fa27b50a2..afc202a698eb 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-multi-close.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-multi-close.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with two closing braces on one line
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-node-close.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-node-close.yaml
index e107659fd9e8..9e714f7e7d47 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-node-close.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-node-close.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with closing brace not on its own line
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-node-name.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-node-name.yaml
new file mode 100644
index 000000000000..03373cae9a66
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-node-name.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/test-node-name.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Test fixture with incorrect node names
+
+maintainers:
+ - Rob Herring <robh@kernel.org>
+
+properties:
+ compatible:
+ const: example,test-node-name
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ foo_bar@1000 {
+ compatible = "example,test-node-name";
+ reg = <0x1000 0x100>;
+ };
+
+ foo,bar@2000 {
+ compatible = "example,test-node-name";
+ reg = <0x2000 0x100>;
+ };
+
+ foo.bar@3000 {
+ compatible = "example,test-node-name";
+ reg = <0x3000 0x100>;
+ };
+
+ foo+bar@4000 {
+ compatible = "example,test-node-name";
+ reg = <0x4000 0x100>;
+ };
+
+ foo-bar-@5000 {
+ compatible = "example,test-node-name";
+ reg = <0x5000 0x100>;
+ };
+
+ // TODO handle also "-foo-bar" which is against spec but accepted by DTC
+
+ foo_bar {
+ compatible = "example,test-node-name";
+ };
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-prop-order-device-type.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-prop-order-device-type.yaml
index e2c69e9ff452..c71fb2c0a3e5 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-prop-order-device-type.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-prop-order-device-type.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with device_type
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-prop-order.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-prop-order.yaml
index 75582a3d2f6e..4d8a50d0e35a 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-prop-order.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-prop-order.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with reg before compatible
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
@@ -26,4 +26,9 @@ examples:
device@1000 {
reg = <0x1000 0x100>;
compatible = "example,test-prop-order";
+
+ interrupts = <1>;
+ qcom,calibration-variant = "foo";
+ clocks = <6>;
+ qcom,opp-fuse-level = <1>;
};
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-prop-pairing.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-prop-pairing.yaml
index 767ab21c39f3..51abc540af11 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-prop-pairing.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-prop-pairing.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture exercising <x>-names and pinctrl-names pairing
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-property-name.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-property-name.yaml
new file mode 100644
index 000000000000..08e0d1eb152a
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-property-name.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/test-property-name.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Test fixture with incorrect property names
+
+maintainers:
+ - Rob Herring <robh@kernel.org>
+
+properties:
+ compatible:
+ const: example,test-property-name
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ foo@1000 {
+ compatible = "example,test-property-name";
+ reg = <0x1000 0x100>;
+
+ property#foo;
+ property+foo;
+ property-foo;
+ property-foo-;
+ property.foo;
+ property?foo;
+ property_foo;
+
+ vendor,property#foo;
+ vendor,property+foo;
+ vendor,property,foo;
+ vendor,property-foo;
+ vendor,property-foo-;
+ vendor,property.foo;
+ vendor,property?foo;
+ vendor,property_foo;
+ };
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws-strict.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws-strict.yaml
new file mode 100644
index 000000000000..739c44fd7217
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws-strict.yaml
@@ -0,0 +1,31 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/yaml-redundant-ws-strict.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Test fixture with redundant whitespace
+
+maintainers:
+ - Rob Herring <robh@kernel.org>
+
+properties:
+ compatible:
+ const: example,test-redundant
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ device@1000 {
+ compatible = "example,test-trailing";
+ reg = <0x1000 0x100>;
+ clocks = <&clk 0>; /* comments { are okay = though ; */
+ clock-names = "bus"; /* comments { are okay = though ; */
+ } ;
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws.yaml
new file mode 100644
index 000000000000..b2f51969b0ff
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws.yaml
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/yaml-redundant-ws.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Test fixture with redundant whitespace
+
+maintainers:
+ - Rob Herring <robh@kernel.org>
+
+properties:
+ compatible:
+ const: example,test-redundant
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ device@1000 { /* comments { are okay = though ; */
+ compatible = "example,test-trailing";
+ reg = <0x1000 0x100>,
+ <0x3000 0x100> ;
+ } ;
+
+ device@2000 { /* comments { are okay = though ; */
+ compatible = "example,test-trailing";
+ reg = <0x2000 0x100>;
+ }; /* comments { are okay = though ; */
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-required-blank.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-required-blank.yaml
index 8bb53240cffa..0036d5e0c4ea 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-required-blank.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-required-blank.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture missing required blank lines
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-tab.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-tab.yaml
index 487d07ff8cb6..937ecdd923b0 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-tab.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-tab.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with a tab in a DTS line
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-trailing-comment.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-trailing-comment.yaml
index 2368ada8106f..695d046e8454 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-trailing-comment.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-trailing-comment.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with properties out of order behind trailing comments
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-trailing-ws.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-trailing-ws.yaml
index 5c4b4bd833c5..17eeed3411c6 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-trailing-ws.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-trailing-ws.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with trailing whitespace
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
@@ -25,5 +25,8 @@ examples:
- |
device@1000 {
compatible = "example,test-trailing";
- reg = <0x1000 0x100>;
+ reg = <0x1000 0x100>,
+ <0x2000 0x100>,
+ <0x3000
+ 0x100>;
};
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-unclosed-comment.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-unclosed-comment.yaml
index 63c1c08712a5..191ed775384b 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-unclosed-comment.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-unclosed-comment.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with an unclosed /* block comment
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-unit-addr-prefix.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-unit-addr-prefix.yaml
index 9b3fe508c5fd..62590948d2de 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-unit-addr-prefix.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-unit-addr-prefix.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with 0x-prefixed unit address
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-unit-addr.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-unit-addr.yaml
index 93705cd45410..5bb19fba5c19 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-unit-addr.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-unit-addr.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with malformed unit address
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-unused-label.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-unused-label.yaml
index 28d7176cbf08..7f862ae5a175 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-unused-label.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-unused-label.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with an unused label
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-value-ws-multiline.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-value-ws-multiline.yaml
index 504bf0931c27..1d7bc8142fd7 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-value-ws-multiline.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-value-ws-multiline.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with extra whitespace in a multi-line cell array
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-value-ws.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-value-ws.yaml
index 342ab9f399f1..a5082a158155 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-value-ws.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-value-ws.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture with extra whitespace inside <...>
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-blank-lines.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-blank-lines.dts.txt
new file mode 100644
index 000000000000..97617bc42a17
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-blank-lines.dts.txt
@@ -0,0 +1,6 @@
+# mode=strict
+bad/dts-blank-lines.dts:16: [blank-lines] consecutive blank lines
+bad/dts-blank-lines.dts:23: [blank-lines] consecutive blank lines
+bad/dts-blank-lines.dts:30: [blank-lines] consecutive blank lines
+bad/dts-blank-lines.dts:32: [blank-lines] blank line at start of node body
+bad/dts-blank-lines.dts:35: [blank-lines] blank line at end of node body
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dts.txt
index e2eea0862102..312a45ed913a 100644
--- a/scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dts.txt
+++ b/scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dts.txt
@@ -1,2 +1,3 @@
# mode=strict
bad/dts-child-name-order.dts:16: [child-name-order] child node 'bar' out of name order
+bad/dts-child-name-order.dts:21: [child-name-order] child node 'memory' out of name order
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dtso.txt b/scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dtso.txt
new file mode 100644
index 000000000000..e44ceb24ece8
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dtso.txt
@@ -0,0 +1,3 @@
+# mode=strict
+bad/dts-child-name-order.dtso:17: [child-name-order] child node 'bar' out of name order
+bad/dts-child-name-order.dtso:22: [child-name-order] child node 'memory' out of name order
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-cont-align.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-cont-align.dts.txt
new file mode 100644
index 000000000000..fd7f389d6cce
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-cont-align.dts.txt
@@ -0,0 +1,11 @@
+# mode=strict
+bad/dts-cont-align.dts:13: [continuation-alignment] continuation should align to column 26 (to < or ")
+bad/dts-cont-align.dts:14: [continuation-alignment] continuation should align to column 26 (to < or ")
+bad/dts-cont-align.dts:15: [continuation-alignment] continuation should align to column 26 (to < or ")
+bad/dts-cont-align.dts:17: [continuation-alignment] continuation should align to column 30 (to < or ")
+bad/dts-cont-align.dts:18: [continuation-alignment] continuation should align to column 30 (to < or ")
+bad/dts-cont-align.dts:20: [continuation-alignment] continuation should align to column 27 (to the value under <)
+bad/dts-cont-align.dts:21: [continuation-alignment] continuation should align to column 26 (to < or ")
+bad/dts-cont-align.dts:22: [continuation-alignment] continuation should align to column 27 (to the value under <)
+bad/dts-cont-align.dts:24: [continuation-alignment] continuation should align to column 38 (to < or ")
+bad/dts-cont-align.dts:25: [continuation-alignment] continuation should align to column 38 (to < or ")
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dts.txt
new file mode 100644
index 000000000000..1f41acdea0b0
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dts.txt
@@ -0,0 +1,2 @@
+# mode=strict
+bad/dts-digit-node-order.dts:29: [child-address-order] child node @10000 out of address order
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dtso.txt b/scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dtso.txt
new file mode 100644
index 000000000000..21db32f6e639
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dtso.txt
@@ -0,0 +1,2 @@
+# mode=strict
+bad/dts-digit-node-order.dtso:30: [child-address-order] child node @10000 out of address order
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-extend-node-child-name-order.dtso.txt b/scripts/dtc/dt-style-selftest/expected/dts-extend-node-child-name-order.dtso.txt
new file mode 100644
index 000000000000..d7941a891135
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-extend-node-child-name-order.dtso.txt
@@ -0,0 +1,2 @@
+# mode=strict
+bad/dts-extend-node-child-name-order.dtso:23: [child-name-order] child node 'bar' out of name order
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-extend-node-digit-node-order.dtso.txt b/scripts/dtc/dt-style-selftest/expected/dts-extend-node-digit-node-order.dtso.txt
new file mode 100644
index 000000000000..408796d5bb03
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-extend-node-digit-node-order.dtso.txt
@@ -0,0 +1,2 @@
+# mode=strict
+bad/dts-extend-node-digit-node-order.dtso:24: [child-address-order] child node @10000 out of address order
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-line-length.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-line-length.dts.txt
new file mode 100644
index 000000000000..9cdb7550b56c
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-line-length.dts.txt
@@ -0,0 +1,3 @@
+# mode=stricter
+bad/dts-line-length.dts:17: [line-length-dts] line exceeds 80 columns (101)
+bad/dts-line-length.dts:18: [line-length-dts] line exceeds 80 columns (108)
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-mixed-indent.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-mixed-indent.dts.txt
index 93146cfb51c7..1706390f5664 100644
--- a/scripts/dtc/dt-style-selftest/expected/dts-mixed-indent.dts.txt
+++ b/scripts/dtc/dt-style-selftest/expected/dts-mixed-indent.dts.txt
@@ -6,4 +6,5 @@ bad/dts-mixed-indent.dts:12: [mixed-indent-chars] mixed tabs and spaces in inden
bad/dts-mixed-indent.dts:13: [indent-consistent] indent mismatch (expected depth 2 * '\t')
bad/dts-mixed-indent.dts:13: [mixed-indent-chars] mixed tabs and spaces in indent
bad/dts-mixed-indent.dts:16: [mixed-indent-chars] mixed tabs and spaces in indent
+bad/dts-mixed-indent.dts:18: [mixed-indent-chars] too many space characters in indent (more than 7)
bad/dts-mixed-indent.dts:19: [indent-consistent] indent mismatch (expected depth 2 * '\t')
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-node-name.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-node-name.dts.txt
new file mode 100644
index 000000000000..bd8d7e21e243
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-node-name.dts.txt
@@ -0,0 +1,13 @@
+# mode=strict
+bad/dts-node-name.dts:8: [node-name] node name "foo_bar" is using discouraged style
+bad/dts-node-name.dts:12: [child-name-order] child node 'foo,bar' out of name order
+bad/dts-node-name.dts:12: [node-name] node name "foo,bar" is using discouraged style
+bad/dts-node-name.dts:16: [node-name] node name "foo.bar" is using discouraged style
+bad/dts-node-name.dts:20: [child-name-order] child node 'foo+bar' out of name order
+bad/dts-node-name.dts:20: [node-name] node name "foo+bar" is using discouraged style
+bad/dts-node-name.dts:24: [node-name] node name "foo-bar-" is using discouraged style
+bad/dts-node-name.dts:35: [node-name] node name "foo_bar" is using discouraged style
+bad/dts-node-name.dts:40: [node-name] node name "foo,bar" is using discouraged style
+bad/dts-node-name.dts:45: [node-name] node name "foo.bar" is using discouraged style
+bad/dts-node-name.dts:50: [node-name] node name "foo+bar" is using discouraged style
+bad/dts-node-name.dts:55: [node-name] node name "foo-bar-" is using discouraged style
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-property-name.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-property-name.dts.txt
new file mode 100644
index 000000000000..f447743383da
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-property-name.dts.txt
@@ -0,0 +1,14 @@
+# mode=strict
+bad/dts-property-name.dts:11: [property-name] property name "property#foo" is using discouraged style
+bad/dts-property-name.dts:12: [property-name] property name "property+foo" is using discouraged style
+bad/dts-property-name.dts:14: [property-name] property name "property-foo-" is using discouraged style
+bad/dts-property-name.dts:15: [property-name] property name "property.foo" is using discouraged style
+bad/dts-property-name.dts:16: [property-name] property name "property?foo" is using discouraged style
+bad/dts-property-name.dts:17: [property-name] property name "property_foo" is using discouraged style
+bad/dts-property-name.dts:19: [property-name] property name "vendor,property#foo" is using discouraged style
+bad/dts-property-name.dts:20: [property-name] property name "vendor,property+foo" is using discouraged style
+bad/dts-property-name.dts:21: [property-name] property name "vendor,property,foo" is using discouraged style
+bad/dts-property-name.dts:23: [property-name] property name "vendor,property-foo-" is using discouraged style
+bad/dts-property-name.dts:24: [property-name] property name "vendor,property.foo" is using discouraged style
+bad/dts-property-name.dts:25: [property-name] property name "vendor,property?foo" is using discouraged style
+bad/dts-property-name.dts:26: [property-name] property name "vendor,property_foo" is using discouraged style
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt
index 4bc21328625f..155b072f0ac2 100644
--- a/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt
+++ b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt
@@ -1,6 +1,12 @@
# mode=strict
-bad/dts-property-order.dts:15: [property-order] property 'compatible' out of canonical order (should sort before 'reg')
-bad/dts-property-order.dts:16: [property-order] property 'device_type' out of canonical order (should sort before 'compatible')
-bad/dts-property-order.dts:25: [property-order] property 'dma-coherent' out of canonical order (should sort before 'status')
-bad/dts-property-order.dts:30: [property-order] property 'compatible' out of canonical order (should sort before 'ranges')
-bad/dts-property-order.dts:40: [property-order] property 'compatible' out of canonical order (should sort before 'interrupts')
+bad/dts-property-order.dts:10: [property-order] property 'model' out of canonical order (should sort before 'compatible')
+bad/dts-property-order.dts:12: [property-order] property 'chassis-type' out of canonical order (should sort before 'qcom,board-id')
+bad/dts-property-order.dts:20: [property-order] property 'compatible' out of canonical order (should sort before 'reg')
+bad/dts-property-order.dts:21: [property-order] property 'device_type' out of canonical order (should sort before 'compatible')
+bad/dts-property-order.dts:30: [property-order] property 'dma-coherent' out of canonical order (should sort before 'status')
+bad/dts-property-order.dts:35: [property-order] property 'compatible' out of canonical order (should sort before 'ranges')
+bad/dts-property-order.dts:45: [property-order] property 'compatible' out of canonical order (should sort before 'interrupts')
+bad/dts-property-order.dts:47: [property-order] property 'clocks' out of canonical order (should sort before 'qcom,calibration-variant')
+bad/dts-property-order.dts:53: [redundant-whitespace] extra whitespace before {
+bad/dts-property-order.dts:55: [property-order] property 'model' out of canonical order (should sort before 'compatible')
+bad/dts-property-order.dts:60: [property-order] property 'model' out of canonical order (should sort before 'compatible')
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-property-order.dtso.txt b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dtso.txt
new file mode 100644
index 000000000000..48c020d21b64
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dtso.txt
@@ -0,0 +1,12 @@
+# mode=strict
+bad/dts-property-order.dtso:11: [property-order] property 'model' out of canonical order (should sort before 'compatible')
+bad/dts-property-order.dtso:13: [property-order] property 'chassis-type' out of canonical order (should sort before 'qcom,board-id')
+bad/dts-property-order.dtso:21: [property-order] property 'compatible' out of canonical order (should sort before 'reg')
+bad/dts-property-order.dtso:22: [property-order] property 'device_type' out of canonical order (should sort before 'compatible')
+bad/dts-property-order.dtso:31: [property-order] property 'dma-coherent' out of canonical order (should sort before 'status')
+bad/dts-property-order.dtso:36: [property-order] property 'compatible' out of canonical order (should sort before 'ranges')
+bad/dts-property-order.dtso:46: [property-order] property 'compatible' out of canonical order (should sort before 'interrupts')
+bad/dts-property-order.dtso:48: [property-order] property 'clocks' out of canonical order (should sort before 'qcom,calibration-variant')
+bad/dts-property-order.dtso:54: [redundant-whitespace] extra whitespace before {
+bad/dts-property-order.dtso:56: [property-order] property 'model' out of canonical order (should sort before 'compatible')
+bad/dts-property-order.dtso:61: [property-order] property 'model' out of canonical order (should sort before 'compatible')
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws-strict.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws-strict.dts.txt
new file mode 100644
index 000000000000..ac0d57bdecdf
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws-strict.dts.txt
@@ -0,0 +1,13 @@
+# mode=strict
+bad/dts-redundant-ws-strict.dts:7: [redundant-whitespace] extra whitespace before {
+bad/dts-redundant-ws-strict.dts:13: [redundant-whitespace] extra whitespace before {
+bad/dts-redundant-ws-strict.dts:13: [redundant-whitespace] extra whitespace after :
+bad/dts-redundant-ws-strict.dts:17: [redundant-whitespace-strict] extra whitespace before =
+bad/dts-redundant-ws-strict.dts:18: [redundant-whitespace-strict] extra whitespace after =
+bad/dts-redundant-ws-strict.dts:19: [redundant-whitespace] extra whitespace before ;
+bad/dts-redundant-ws-strict.dts:22: [redundant-whitespace] extra whitespace before {
+bad/dts-redundant-ws-strict.dts:23: [redundant-whitespace] extra whitespace before {
+bad/dts-redundant-ws-strict.dts:23: [redundant-whitespace] extra whitespace after :
+bad/dts-redundant-ws-strict.dts:24: [redundant-whitespace-strict] extra whitespace before =
+bad/dts-redundant-ws-strict.dts:25: [redundant-whitespace-strict] extra whitespace after =
+bad/dts-redundant-ws-strict.dts:26: [redundant-whitespace] extra whitespace before ;
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dts.txt
new file mode 100644
index 000000000000..3b2a989045ed
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dts.txt
@@ -0,0 +1,10 @@
+# mode=relaxed
+bad/dts-redundant-ws.dts:7: [redundant-whitespace] extra whitespace before {
+bad/dts-redundant-ws.dts:13: [redundant-whitespace] extra whitespace before {
+bad/dts-redundant-ws.dts:13: [redundant-whitespace] extra whitespace after :
+bad/dts-redundant-ws.dts:19: [redundant-whitespace] extra whitespace before ;
+bad/dts-redundant-ws.dts:22: [redundant-whitespace] extra whitespace before {
+bad/dts-redundant-ws.dts:23: [redundant-whitespace] extra whitespace before {
+bad/dts-redundant-ws.dts:23: [redundant-whitespace] extra whitespace after :
+bad/dts-redundant-ws.dts:26: [redundant-whitespace] extra whitespace before ;
+bad/dts-redundant-ws.dts:27: [redundant-whitespace] extra whitespace before ;
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dtso.txt b/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dtso.txt
new file mode 100644
index 000000000000..5f9a63061709
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dtso.txt
@@ -0,0 +1,2 @@
+# mode=strict
+bad/dts-redundant-ws.dtso:5: [redundant-whitespace] extra whitespace before {
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt
new file mode 100644
index 000000000000..a15a7d637c30
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt
@@ -0,0 +1,3 @@
+# mode=relaxed
+bad/dts-trailing-ws.dts:5: [trailing-whitespace] trailing whitespace
+bad/dts-trailing-ws.dts:13: [trailing-whitespace] trailing whitespace
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-unused-label.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-unused-label.dts.txt
new file mode 100644
index 000000000000..4cdcaba3ba2f
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-unused-label.dts.txt
@@ -0,0 +1,2 @@
+# mode=stricter
+bad/dts-unused-label.dts:16: [unused-labels-dts] label 'dev' defined but never &-referenced
diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-blank-lines.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-blank-lines.yaml.txt
new file mode 100644
index 000000000000..8a8db8d35b1e
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/yaml-blank-lines.yaml.txt
@@ -0,0 +1,6 @@
+# mode=strict
+bad/yaml-blank-lines.yaml:33: example 0 [blank-lines] consecutive blank lines
+bad/yaml-blank-lines.yaml:40: example 0 [blank-lines] consecutive blank lines
+bad/yaml-blank-lines.yaml:47: example 0 [blank-lines] consecutive blank lines
+bad/yaml-blank-lines.yaml:49: example 0 [blank-lines] blank line at start of node body
+bad/yaml-blank-lines.yaml:53: example 0 [blank-lines] blank line at end of node body
diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-cont-align.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-cont-align.yaml.txt
index b5576dd0f6b1..9e98c28867aa 100644
--- a/scripts/dtc/dt-style-selftest/expected/yaml-cont-align.yaml.txt
+++ b/scripts/dtc/dt-style-selftest/expected/yaml-cont-align.yaml.txt
@@ -1,2 +1,4 @@
# mode=strict
-bad/yaml-cont-align.yaml:29: example 0 [continuation-alignment] continuation should align to column 11 (under "<" or \")
+bad/yaml-cont-align.yaml:29: example 0 [continuation-alignment] continuation should align to column 11 (to < or ")
+bad/yaml-cont-align.yaml:30: example 0 [continuation-alignment] continuation should align to column 11 (to < or ")
+bad/yaml-cont-align.yaml:32: example 0 [continuation-alignment] continuation should align to column 12 (to the value under <)
diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-hex-case.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-hex-case.yaml.txt
index 6600f7cd1ba5..f42490256939 100644
--- a/scripts/dtc/dt-style-selftest/expected/yaml-hex-case.yaml.txt
+++ b/scripts/dtc/dt-style-selftest/expected/yaml-hex-case.yaml.txt
@@ -1,2 +1,4 @@
# mode=strict
bad/yaml-hex-case.yaml:28: example 0 [hex-case] hex literal '0xABCD' must be lowercase
+bad/yaml-hex-case.yaml:29: example 0 [hex-case] hex literal '0x2BCD' must be lowercase
+bad/yaml-hex-case.yaml:30: example 0 [hex-case] hex literal '0x3BCD' must be lowercase
diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-line-length.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-line-length.yaml.txt
index 89b36360caa4..f21b823c6136 100644
--- a/scripts/dtc/dt-style-selftest/expected/yaml-line-length.yaml.txt
+++ b/scripts/dtc/dt-style-selftest/expected/yaml-line-length.yaml.txt
@@ -1,2 +1,3 @@
# mode=strict
bad/yaml-line-length.yaml:27: example 0 [line-length] line exceeds 80 columns (81)
+bad/yaml-line-length.yaml:28: example 0 [line-length] line exceeds 80 columns (88)
diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt
index bc3fc3cf00cc..442f21f90e83 100644
--- a/scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt
+++ b/scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt
@@ -1,2 +1,3 @@
# mode=relaxed
bad/yaml-mixed-indent.yaml:27: example 0 [tab-in-yaml] tab character not allowed in DTS example
+bad/yaml-mixed-indent.yaml:30: example 0 [tab-in-yaml] tab character not allowed in DTS example
diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-node-name.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-node-name.yaml.txt
new file mode 100644
index 000000000000..d9cf749e35c2
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/yaml-node-name.yaml.txt
@@ -0,0 +1,7 @@
+# mode=strict
+bad/yaml-node-name.yaml:25: example 0 [node-name] node name "foo_bar" is using discouraged style
+bad/yaml-node-name.yaml:30: example 0 [node-name] node name "foo,bar" is using discouraged style
+bad/yaml-node-name.yaml:35: example 0 [node-name] node name "foo.bar" is using discouraged style
+bad/yaml-node-name.yaml:40: example 0 [node-name] node name "foo+bar" is using discouraged style
+bad/yaml-node-name.yaml:45: example 0 [node-name] node name "foo-bar-" is using discouraged style
+bad/yaml-node-name.yaml:52: example 0 [node-name] node name "foo_bar" is using discouraged style
diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-prop-order.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-prop-order.yaml.txt
index 578df7209170..bb0dd5db5135 100644
--- a/scripts/dtc/dt-style-selftest/expected/yaml-prop-order.yaml.txt
+++ b/scripts/dtc/dt-style-selftest/expected/yaml-prop-order.yaml.txt
@@ -1,2 +1,3 @@
# mode=strict
bad/yaml-prop-order.yaml:28: example 0 [property-order] property 'compatible' out of canonical order (should sort before 'reg')
+bad/yaml-prop-order.yaml:32: example 0 [property-order] property 'clocks' out of canonical order (should sort before 'qcom,calibration-variant')
diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-prop-pairing.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-prop-pairing.yaml.txt
index e6e21349a939..ee666559424a 100644
--- a/scripts/dtc/dt-style-selftest/expected/yaml-prop-pairing.yaml.txt
+++ b/scripts/dtc/dt-style-selftest/expected/yaml-prop-pairing.yaml.txt
@@ -1,3 +1,3 @@
# mode=strict
-bad/yaml-prop-pairing.yaml:30: example 0 [property-order] property 'clocks' out of canonical order (should sort before 'clock-names')
-bad/yaml-prop-pairing.yaml:32: example 0 [property-order] property 'pinctrl-0' out of canonical order (should sort before 'pinctrl-names')
+bad/yaml-prop-pairing.yaml:29: example 0 [property-order] property 'clock-names' must be placed after 'clocks'
+bad/yaml-prop-pairing.yaml:31: example 0 [property-order] property 'pinctrl-names' must be placed after 'pinctrl-0'
diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-property-name.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-property-name.yaml.txt
new file mode 100644
index 000000000000..6aa3a004532b
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/yaml-property-name.yaml.txt
@@ -0,0 +1,14 @@
+# mode=strict
+bad/yaml-property-name.yaml:30: example 0 [property-name] property name "property#foo" is using discouraged style
+bad/yaml-property-name.yaml:31: example 0 [property-name] property name "property+foo" is using discouraged style
+bad/yaml-property-name.yaml:33: example 0 [property-name] property name "property-foo-" is using discouraged style
+bad/yaml-property-name.yaml:34: example 0 [property-name] property name "property.foo" is using discouraged style
+bad/yaml-property-name.yaml:35: example 0 [property-name] property name "property?foo" is using discouraged style
+bad/yaml-property-name.yaml:36: example 0 [property-name] property name "property_foo" is using discouraged style
+bad/yaml-property-name.yaml:38: example 0 [property-name] property name "vendor,property#foo" is using discouraged style
+bad/yaml-property-name.yaml:39: example 0 [property-name] property name "vendor,property+foo" is using discouraged style
+bad/yaml-property-name.yaml:40: example 0 [property-name] property name "vendor,property,foo" is using discouraged style
+bad/yaml-property-name.yaml:42: example 0 [property-name] property name "vendor,property-foo-" is using discouraged style
+bad/yaml-property-name.yaml:43: example 0 [property-name] property name "vendor,property.foo" is using discouraged style
+bad/yaml-property-name.yaml:44: example 0 [property-name] property name "vendor,property?foo" is using discouraged style
+bad/yaml-property-name.yaml:45: example 0 [property-name] property name "vendor,property_foo" is using discouraged style
diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws-strict.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws-strict.yaml.txt
new file mode 100644
index 000000000000..fbf323832c91
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws-strict.yaml.txt
@@ -0,0 +1,5 @@
+# mode=strict
+bad/yaml-redundant-ws-strict.yaml:26: example 0 [redundant-whitespace] extra whitespace before {
+bad/yaml-redundant-ws-strict.yaml:27: example 0 [redundant-whitespace-strict] extra whitespace before =
+bad/yaml-redundant-ws-strict.yaml:28: example 0 [redundant-whitespace-strict] extra whitespace after =
+bad/yaml-redundant-ws-strict.yaml:31: example 0 [redundant-whitespace] extra whitespace before ;
diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws.yaml.txt
new file mode 100644
index 000000000000..a162967e4336
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws.yaml.txt
@@ -0,0 +1,4 @@
+# mode=relaxed
+bad/yaml-redundant-ws.yaml:26: example 0 [redundant-whitespace] extra whitespace before {
+bad/yaml-redundant-ws.yaml:29: example 0 [redundant-whitespace] extra whitespace before ;
+bad/yaml-redundant-ws.yaml:30: example 0 [redundant-whitespace] extra whitespace before ;
diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-trailing-ws.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-trailing-ws.yaml.txt
index cfdbc8476c73..4f2ec9572bc6 100644
--- a/scripts/dtc/dt-style-selftest/expected/yaml-trailing-ws.yaml.txt
+++ b/scripts/dtc/dt-style-selftest/expected/yaml-trailing-ws.yaml.txt
@@ -1,2 +1,4 @@
# mode=relaxed
bad/yaml-trailing-ws.yaml:27: example 0 [trailing-whitespace] trailing whitespace
+bad/yaml-trailing-ws.yaml:29: example 0 [trailing-whitespace] trailing whitespace
+bad/yaml-trailing-ws.yaml:30: example 0 [trailing-whitespace] trailing whitespace
diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-value-ws-multiline.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-value-ws-multiline.yaml.txt
index 3df55b1762d0..d25b5b425e3f 100644
--- a/scripts/dtc/dt-style-selftest/expected/yaml-value-ws-multiline.yaml.txt
+++ b/scripts/dtc/dt-style-selftest/expected/yaml-value-ws-multiline.yaml.txt
@@ -1,2 +1,3 @@
# mode=strict
bad/yaml-value-ws-multiline.yaml:25: example 0 [value-whitespace] extra whitespace inside <...>
+bad/yaml-value-ws-multiline.yaml:26: example 0 [continuation-alignment] continuation should align to column 12 (to the value under <)
diff --git a/scripts/dtc/dt-style-selftest/good/dts-child-name-order.dtso b/scripts/dtc/dt-style-selftest/good/dts-child-name-order.dtso
new file mode 100644
index 000000000000..1fd75a6285ce
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/good/dts-child-name-order.dtso
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ memory@a0000000 {
+ device_type = "memory";
+ reg = <0x0 0xa0000000 0x0 0x0>;
+ };
+
+ pmu {
+ compatible = "example,pmu";
+
+ /* Include labels to be sure they do not affect sorting */
+ label_bar: bar {
+ label = "bar";
+ };
+
+ foo: foo {
+ label = "foo";
+ };
+ };
+
+ pmu-2 {
+ compatible = "example,pmu";
+
+ /* Just reference labels to avoid strict warnings */
+ example,foo = <&foo>, <&label_bar>;
+ };
+};
+
+&pmu {
+ /* Include labels to be sure they do not affect sorting */
+ label_bar_2: bar-2 {
+ label = "bar";
+ };
+
+ foo_2: foo-2 {
+ label = "foo";
+ };
+}
diff --git a/scripts/dtc/dt-style-selftest/good/dts-cont-align.dts b/scripts/dtc/dt-style-selftest/good/dts-cont-align.dts
index 36fb4eefcd83..e6450a1d8209 100644
--- a/scripts/dtc/dt-style-selftest/good/dts-cont-align.dts
+++ b/scripts/dtc/dt-style-selftest/good/dts-cont-align.dts
@@ -15,12 +15,16 @@
interrupt-controller@10000 {
compatible = "example,intc";
reg = <0x10000 0x1000>;
- interrupts = <1 2 3>,
+ interrupts = <1 2 3>, /* comments with " < , should not ... */
<4 5 6>,
+ /* but comments should be placed properly */
<7 8 9>;
- pinmux = <
- 0x01
- 0x02
- >;
+ pinmux = <0x01
+ 0x02>,
+ <0x03 /* comments with " < , should not matter */
+ 0x04>;
+ power-domain-names = "foo", /* comments with " < , should not */
+ "bar",
+ "baz";
};
};
diff --git a/scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dts b/scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dts
index cdf3f91ebe01..2b21dde7f3c8 100644
--- a/scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dts
+++ b/scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dts
@@ -5,13 +5,10 @@
#address-cells = <1>;
#size-cells = <1>;
- /* TODO: uncomment when child-address-order is fixed for top-level */
- /*
memory@a0000000 {
device_type = "memory";
reg = <0x0 0xa0000000 0x0 0x0>;
};
- */
pmu {
compatible = "example,pmu";
diff --git a/scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dtso b/scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dtso
new file mode 100644
index 000000000000..efafa1cccc15
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dtso
@@ -0,0 +1,59 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ memory@a0000000 {
+ device_type = "memory";
+ reg = <0x0 0xa0000000 0x0 0x0>;
+ };
+
+ pmu {
+ compatible = "example,pmu";
+ };
+
+ soc@0 {
+ compatible = "simple-bus";
+ ranges = <0 0 0 0xc0000000>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ interrupt-controller@10000 {
+ compatible = "example,intc";
+ reg = <0x10000 0x1000>;
+ interrupts = <1 2 3>;
+ };
+
+ serial@20000 {
+ compatible = "example,serial";
+ reg = <0x20000 0x1000>;
+ };
+
+ serial@30000 {
+ compatible = "example,serial";
+ reg = <0x30000 0x1000>;
+ };
+ };
+};
+
+&soc {
+ interrupt-controller@110000 {
+ compatible = "example,intc";
+ reg = <0x110000 0x1000>;
+ interrupts = <1 2 3>;
+ };
+
+ serial@120000 {
+ compatible = "example,serial";
+ reg = <0x120000 0x1000>;
+ };
+
+ serial@130000 {
+ compatible = "example,serial";
+ reg = <0x130000 0x1000>;
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/good/dts-extend-node-child-name-order.dtso b/scripts/dtc/dt-style-selftest/good/dts-extend-node-child-name-order.dtso
new file mode 100644
index 000000000000..b00c2a195179
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/good/dts-extend-node-child-name-order.dtso
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ pmu {
+ compatible = "example,pmu";
+
+ /* Just reference labels to avoid strict warnings */
+ example,foo = <&foo>, <&label_bar>;
+ };
+};
+
+&pmu {
+ /* Include labels to be sure they do not affect sorting */
+ label_bar: bar {
+ label = "bar";
+ };
+
+ foo: foo {
+ label = "foo";
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/good/dts-extend-node-digit-node-order.dtso b/scripts/dtc/dt-style-selftest/good/dts-extend-node-digit-node-order.dtso
new file mode 100644
index 000000000000..1ce18afb80de
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/good/dts-extend-node-digit-node-order.dtso
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ soc: soc@0 {
+ compatible = "simple-bus";
+ ranges = <0 0 0 0xc0000000>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+};
+
+&soc {
+ interrupt-controller@10000 {
+ compatible = "example,intc";
+ reg = <0x10000 0x1000>;
+ interrupts = <1 2 3>;
+ };
+
+ serial@20000 {
+ compatible = "example,serial";
+ reg = <0x20000 0x1000>;
+ };
+
+ serial@30000 {
+ compatible = "example,serial";
+ reg = <0x30000 0x1000>;
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/good/dts-property-order.dts b/scripts/dtc/dt-style-selftest/good/dts-property-order.dts
index 0e183e3459cd..288fcfb9888f 100644
--- a/scripts/dtc/dt-style-selftest/good/dts-property-order.dts
+++ b/scripts/dtc/dt-style-selftest/good/dts-property-order.dts
@@ -6,6 +6,11 @@
/dts-v1/;
/ {
+ model = "DT style selftest";
+ compatible = "example,test-board", "example,test-soc";
+ chassis-type = "handset";
+ qcom,board-id = <8 0>;
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -35,7 +40,10 @@
interrupt-controller@10000 {
compatible = "example,intc";
reg = <0x10000 0x1000>;
+ clocks = <6>;
interrupts = <1 2 3>;
+ qcom,calibration-variant = "foo";
+ qcom,opp-fuse-level = <1>;
};
};
};
diff --git a/scripts/dtc/dt-style-selftest/good/dts-property-order.dtso b/scripts/dtc/dt-style-selftest/good/dts-property-order.dtso
new file mode 100644
index 000000000000..60c68b3f908a
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/good/dts-property-order.dtso
@@ -0,0 +1,50 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/*
+ * Test fixture: Incorrect property order
+ */
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ model = "DT style selftest";
+ compatible = "example,test-board", "example,test-soc";
+ chassis-type = "handset";
+ qcom,board-id = <8 0>;
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a57";
+ reg = <0x0 0x0>;
+ enable-method = "psci";
+ };
+ };
+
+ pmu {
+ compatible = "example,pmu";
+ dma-coherent;
+
+ status = "disabled";
+ };
+
+ soc@0 {
+ compatible = "simple-bus";
+ ranges = <0 0 0 0xc0000000>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ interrupt-controller@10000 {
+ compatible = "example,intc";
+ reg = <0x10000 0x1000>;
+ clocks = <6>;
+ interrupts = <1 2 3>;
+ qcom,calibration-variant = "foo";
+ qcom,opp-fuse-level = <1>;
+ };
+ };
+};
diff --git a/scripts/dtc/dt-style-selftest/good/yaml-4space.yaml b/scripts/dtc/dt-style-selftest/good/yaml-4space.yaml
index 1502f803c24c..b91b8a8a9512 100644
--- a/scripts/dtc/dt-style-selftest/good/yaml-4space.yaml
+++ b/scripts/dtc/dt-style-selftest/good/yaml-4space.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Test fixture for dt-check-style
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/good/yaml-cont-align.yaml b/scripts/dtc/dt-style-selftest/good/yaml-cont-align.yaml
new file mode 100644
index 000000000000..4a5b5ad43ee8
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/good/yaml-cont-align.yaml
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/test-good-cont-align.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Test fixture with aligned multi-line property
+
+maintainers:
+ - Rob Herring <robh@kernel.org>
+
+properties:
+ compatible:
+ const: example,test-cont-align
+ reg:
+ maxItems: 2
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ foo@1000 {
+ compatible = "example,test-cont-align";
+ reg = <0x1000 0x100>,
+ <0x2000 0x100>,
+ /* but comments should be placed properly */
+ <0x3000
+ 0x100>;
+ };
diff --git a/scripts/dtc/dt-style-selftest/good/yaml-tricky-parsing.yaml b/scripts/dtc/dt-style-selftest/good/yaml-tricky-parsing.yaml
index a836d5f36b93..a95d07f883ef 100644
--- a/scripts/dtc/dt-style-selftest/good/yaml-tricky-parsing.yaml
+++ b/scripts/dtc/dt-style-selftest/good/yaml-tricky-parsing.yaml
@@ -17,7 +17,7 @@ description: |
not leave the parser in block-comment state.
maintainers:
- - Test User <test@example.com>
+ - Rob Herring <robh@kernel.org>
properties:
compatible:
diff --git a/scripts/dtc/dt-style-selftest/run.sh b/scripts/dtc/dt-style-selftest/run.sh
index 8117dd9be90a..5691301d6a4a 100755
--- a/scripts/dtc/dt-style-selftest/run.sh
+++ b/scripts/dtc/dt-style-selftest/run.sh
@@ -26,7 +26,7 @@ run() {
# good/ -- must exit 0 and produce no output in both modes
for f in "$here"/good/*; do
[ -e "$f" ] || continue
- for mode in relaxed strict; do
+ for mode in relaxed strict stricter; do
out=$(run "$f" "$mode")
rc=$?
if [ -n "$out" ] || [ "$rc" -ne 0 ]; then