Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'devicetree-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull devicetree updates from Rob Herring:
"DT Bindings:

- Convert and add a bunch of IBM FSI related bindings

- Add a new schema listing legacy compatibles which will (probably)
never be documented. This will silence various checks warning about
them.

- Add bindings for Sierra Wireless mangOH Green SPI IoT interface,
new Arm 2024 Cortex and Neoverse CPUs, QCom sc8180x PDC, QCom SDX75
GPI DMA, imx8mp/imx8qxp fsl,irqsteer, and Renesas RZ/G2UL CRU and
CSI-2 blocks

- Convert Spreadtrum sprd-timer, FSL cpm_qe, FSL fsl,ls-scfg-msi, FSL
q(b)man-*, FSL qoriq-mc, and img,pdc-wdt bindings to DT schema

- Drop obsolete stericsson,abx500.txt

DT core:

- Update dtc to upstream version v1.7.0-93-g1df7b047fe43

- Add support to run DT validation on DTs with applied overlays

- Add helper for creating boolean properties in dynamic nodes and use
that for dynamic PCI nodes

- Clean-up early parsing of '#{address,size}-cells'"

* tag 'devicetree-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (39 commits)
dt-bindings: timer: sprd-timer: convert to YAML
dt-bindings: incomplete-devices: document devices without bindings
dt-bindings: trivial-devices: document the Sierra Wireless mangOH Green SPI IoT interface
scripts/dtc: Update to upstream version v1.7.0-93-g1df7b047fe43
dt-bindings: soc: fsl: Add fsl,ls1028a-reset for reset syscon node
dt-bindings: soc: fsl: cpm_qe: convert to yaml format
dt-bindings: i2c: i2c-fsi: Convert to json-schema
dt-bindings: fsi: Document the FSI Hub Controller
dt-bindings: fsi: Document the AST2700 FSI controller
dt-bindings: fsi: ast2600-fsi-master: Convert to json-schema
dt-bindings: fsi: ibm,i2cr-fsi-master: Reference common FSI controller
dt-bindings: fsi: Document the FSI controller common properties
dt-bindings: fsi: Document the IBM SBEFIFO engine
dt-bindings: fsi: p9-occ: Convert to json-schema
dt-bindings: fsi: Document the IBM SCOM engine
dt-bindings: fsi: fsi2spi: Document SPI controller child nodes
dt-bindings: interrupt-controller: convert fsl,ls-scfg-msi to yaml
dt-bindings: soc: fsl: Convert q(b)man-* to yaml format
dt-bindings: misc: fsl,qoriq-mc: convert to yaml format
dt-bindings: drop stale Anson Huang from maintainers
...

+2751 -1301
+6
Documentation/devicetree/bindings/arm/cpus.yaml
··· 147 147 - arm,cortex-a710 148 148 - arm,cortex-a715 149 149 - arm,cortex-a720 150 + - arm,cortex-a725 150 151 - arm,cortex-m0 151 152 - arm,cortex-m0+ 152 153 - arm,cortex-m1 ··· 162 161 - arm,cortex-x2 163 162 - arm,cortex-x3 164 163 - arm,cortex-x4 164 + - arm,cortex-x925 165 165 - arm,neoverse-e1 166 166 - arm,neoverse-n1 167 167 - arm,neoverse-n2 168 + - arm,neoverse-n3 168 169 - arm,neoverse-v1 170 + - arm,neoverse-v2 171 + - arm,neoverse-v3 172 + - arm,neoverse-v3ae 169 173 - brcm,brahma-b15 170 174 - brcm,brahma-b53 171 175 - brcm,vulcan
+3 -1
Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-sim.yaml
··· 7 7 title: Freescale i.MX7ULP System Integration Module 8 8 9 9 maintainers: 10 - - Anson Huang <anson.huang@nxp.com> 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Sascha Hauer <s.hauer@pengutronix.de> 12 + - Fabio Estevam <festevam@gmail.com> 11 13 12 14 description: | 13 15 The system integration module (SIM) provides system control and chip configuration
+2 -1
Documentation/devicetree/bindings/clock/imx6q-clock.yaml
··· 7 7 title: Freescale i.MX6 Quad Clock Controller 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Abel Vesa <abelvesa@kernel.org> 11 + - Peng Fan <peng.fan@nxp.com> 11 12 12 13 properties: 13 14 compatible:
+2 -1
Documentation/devicetree/bindings/clock/imx6sl-clock.yaml
··· 7 7 title: Freescale i.MX6 SoloLite Clock Controller 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Abel Vesa <abelvesa@kernel.org> 11 + - Peng Fan <peng.fan@nxp.com> 11 12 12 13 properties: 13 14 compatible:
+2 -1
Documentation/devicetree/bindings/clock/imx6sll-clock.yaml
··· 7 7 title: Freescale i.MX6 SLL Clock Controller 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Abel Vesa <abelvesa@kernel.org> 11 + - Peng Fan <peng.fan@nxp.com> 11 12 12 13 properties: 13 14 compatible:
+2 -1
Documentation/devicetree/bindings/clock/imx6sx-clock.yaml
··· 7 7 title: Freescale i.MX6 SoloX Clock Controller 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Abel Vesa <abelvesa@kernel.org> 11 + - Peng Fan <peng.fan@nxp.com> 11 12 12 13 properties: 13 14 compatible:
+2 -1
Documentation/devicetree/bindings/clock/imx6ul-clock.yaml
··· 7 7 title: Freescale i.MX6 UltraLite Clock Controller 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Abel Vesa <abelvesa@kernel.org> 11 + - Peng Fan <peng.fan@nxp.com> 11 12 12 13 properties: 13 14 compatible:
-1
Documentation/devicetree/bindings/clock/imx7d-clock.yaml
··· 8 8 9 9 maintainers: 10 10 - Frank Li <Frank.Li@nxp.com> 11 - - Anson Huang <Anson.Huang@nxp.com> 12 11 13 12 description: | 14 13 The clock consumer should specify the desired clock by having the clock
+2 -1
Documentation/devicetree/bindings/clock/imx8m-clock.yaml
··· 7 7 title: NXP i.MX8M Family Clock Control Module 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Abel Vesa <abelvesa@kernel.org> 11 + - Peng Fan <peng.fan@nxp.com> 11 12 12 13 description: | 13 14 NXP i.MX8M Mini/Nano/Plus/Quad clock control module is an integrated clock
-20
Documentation/devicetree/bindings/clock/stericsson,abx500.txt
··· 1 - Clock bindings for ST-Ericsson ABx500 clocks 2 - 3 - Required properties : 4 - - compatible : shall contain the following: 5 - "stericsson,ab8500-clk" 6 - - #clock-cells should be <1> 7 - 8 - The ABx500 clocks need to be placed as a subnode of an AB8500 9 - device node, see mfd/ab8500.txt 10 - 11 - All available clocks are defined as preprocessor macros in 12 - dt-bindings/clock/ste-ab8500.h header and can be used in device 13 - tree sources. 14 - 15 - Example: 16 - 17 - clock-controller { 18 - compatible = "stericsson,ab8500-clk"; 19 - #clock-cells = <1>; 20 - };
+3 -1
Documentation/devicetree/bindings/display/panel/lg,sw43408.yaml
··· 21 21 items: 22 22 - const: lg,sw43408 23 23 24 - reg: true 24 + reg: 25 + maxItems: 1 26 + 25 27 port: true 26 28 vddi-supply: true 27 29 vpnl-supply: true
+3 -2
Documentation/devicetree/bindings/display/panel/raydium,rm69380.yaml
··· 28 28 to work with the indicated panel. The raydium,rm69380 compatible shall 29 29 always be provided as a fallback. 30 30 31 + reg: 32 + maxItems: 1 33 + 31 34 avdd-supply: 32 35 description: Analog voltage rail 33 36 ··· 40 37 reset-gpios: 41 38 maxItems: 1 42 39 description: phandle of gpio for reset line - This should be active low 43 - 44 - reg: true 45 40 46 41 required: 47 42 - compatible
+1
Documentation/devicetree/bindings/dma/qcom,gpi.yaml
··· 27 27 - qcom,qcm2290-gpi-dma 28 28 - qcom,qdu1000-gpi-dma 29 29 - qcom,sc7280-gpi-dma 30 + - qcom,sdx75-gpi-dma 30 31 - qcom,sm6115-gpi-dma 31 32 - qcom,sm6375-gpi-dma 32 33 - qcom,sm8350-gpi-dma
+121
Documentation/devicetree/bindings/fsi/aspeed,ast2600-fsi-master.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/fsi/aspeed,ast2600-fsi-master.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Aspeed FSI master 8 + 9 + maintainers: 10 + - Eddie James <eajames@linux.ibm.com> 11 + 12 + description: 13 + The AST2600 and later contain two identical FSI masters. They share a 14 + clock and have a separate interrupt line and output pins. 15 + 16 + properties: 17 + compatible: 18 + enum: 19 + - aspeed,ast2600-fsi-master 20 + - aspeed,ast2700-fsi-master 21 + 22 + clocks: 23 + maxItems: 1 24 + 25 + cfam-reset-gpios: 26 + maxItems: 1 27 + description: 28 + Output GPIO pin for CFAM reset 29 + 30 + fsi-routing-gpios: 31 + maxItems: 1 32 + description: 33 + Output GPIO pin for setting the FSI mux (internal or cabled) 34 + 35 + fsi-mux-gpios: 36 + maxItems: 1 37 + description: 38 + Input GPIO pin for detecting the desired FSI mux state 39 + 40 + interrupts: 41 + maxItems: 1 42 + 43 + if: 44 + properties: 45 + compatible: 46 + contains: 47 + enum: 48 + - aspeed,ast2600-fsi-master 49 + then: 50 + properties: 51 + reg: 52 + maxItems: 1 53 + else: 54 + properties: 55 + reg: 56 + minItems: 1 57 + items: 58 + - description: OPB control registers 59 + - description: FSI controller registers 60 + - description: FSI link address space 61 + reg-names: 62 + items: 63 + - const: opb 64 + - const: ctrl 65 + - const: fsi 66 + 67 + required: 68 + - compatible 69 + - reg 70 + - clocks 71 + - interrupts 72 + 73 + allOf: 74 + - $ref: fsi-controller.yaml# 75 + 76 + unevaluatedProperties: false 77 + 78 + examples: 79 + - | 80 + #include <dt-bindings/clock/ast2600-clock.h> 81 + #include <dt-bindings/gpio/aspeed-gpio.h> 82 + #include <dt-bindings/interrupt-controller/arm-gic.h> 83 + fsi-master@1e79b000 { 84 + compatible = "aspeed,ast2600-fsi-master"; 85 + reg = <0x1e79b000 0x94>; 86 + #address-cells = <2>; 87 + #size-cells = <0>; 88 + interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>; 89 + pinctrl-names = "default"; 90 + pinctrl-0 = <&pinctrl_fsi1_default>; 91 + clocks = <&syscon ASPEED_CLK_GATE_FSICLK>; 92 + fsi-routing-gpios = <&gpio0 ASPEED_GPIO(Q, 7) GPIO_ACTIVE_HIGH>; 93 + fsi-mux-gpios = <&gpio0 ASPEED_GPIO(B, 0) GPIO_ACTIVE_HIGH>; 94 + cfam-reset-gpios = <&gpio0 ASPEED_GPIO(Q, 0) GPIO_ACTIVE_LOW>; 95 + 96 + cfam@0,0 { 97 + reg = <0 0>; 98 + #address-cells = <1>; 99 + #size-cells = <1>; 100 + chip-id = <0>; 101 + }; 102 + }; 103 + - | 104 + bus { 105 + #address-cells = <2>; 106 + #size-cells = <2>; 107 + 108 + fsi-master@21800000 { 109 + compatible = "aspeed,ast2700-fsi-master"; 110 + reg = <0x0 0x21800000 0x0 0x100>, 111 + <0x0 0x21000000 0x0 0x1000>, 112 + <0x0 0x20000000 0x0 0x1000000>; 113 + reg-names = "opb", "ctrl", "fsi"; 114 + #interrupt-cells = <1>; 115 + interrupt-controller; 116 + interrupts-extended = <&intc 6>; 117 + pinctrl-names = "default"; 118 + pinctrl-0 = <&pinctrl_fsi0_default>; 119 + clocks = <&syscon 40>; 120 + }; 121 + };
+66
Documentation/devicetree/bindings/fsi/fsi-controller.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/fsi/fsi-controller.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: FSI Controller Common Properties 8 + 9 + maintainers: 10 + - Eddie James <eajames@linux.ibm.com> 11 + 12 + description: 13 + FSI (FRU (Field Replaceable Unit) Service Interface) is a two wire bus. The 14 + FSI bus is connected to a CFAM (Common FRU Access Macro) which contains 15 + various engines such as I2C controllers, SPI controllers, etc. 16 + 17 + properties: 18 + "#address-cells": 19 + const: 2 20 + 21 + "#size-cells": 22 + const: 0 23 + 24 + '#interrupt-cells': 25 + const: 1 26 + 27 + bus-frequency: 28 + minimum: 1 29 + maximum: 200000000 30 + 31 + interrupt-controller: true 32 + 33 + no-scan-on-init: 34 + $ref: /schemas/types.yaml#/definitions/flag 35 + description: 36 + The FSI controller cannot scan the bus during initialization. 37 + 38 + patternProperties: 39 + "cfam@[0-9a-f],[0-9a-f]": 40 + type: object 41 + properties: 42 + chip-id: 43 + $ref: /schemas/types.yaml#/definitions/uint32 44 + description: 45 + Processor index, a global unique chip ID which is used to identify 46 + the physical location of the chip in a system specific way. 47 + 48 + bus-frequency: 49 + minimum: 1 50 + maximum: 100000000 51 + 52 + reg: 53 + maxItems: 1 54 + 55 + "#address-cells": 56 + const: 1 57 + 58 + "#size-cells": 59 + const: 1 60 + 61 + required: 62 + - reg 63 + 64 + additionalProperties: true 65 + 66 + additionalProperties: true
-36
Documentation/devicetree/bindings/fsi/fsi-master-aspeed.txt
··· 1 - Device-tree bindings for AST2600 FSI master 2 - ------------------------------------------- 3 - 4 - The AST2600 contains two identical FSI masters. They share a clock and have a 5 - separate interrupt line and output pins. 6 - 7 - Required properties: 8 - - compatible: "aspeed,ast2600-fsi-master" 9 - - reg: base address and length 10 - - clocks: phandle and clock number 11 - - interrupts: platform dependent interrupt description 12 - - pinctrl-0: phandle to pinctrl node 13 - - pinctrl-names: pinctrl state 14 - 15 - Optional properties: 16 - - cfam-reset-gpios: GPIO for CFAM reset 17 - 18 - - fsi-routing-gpios: GPIO for setting the FSI mux (internal or cabled) 19 - - fsi-mux-gpios: GPIO for detecting the desired FSI mux state 20 - 21 - 22 - Examples: 23 - 24 - fsi-master { 25 - compatible = "aspeed,ast2600-fsi-master", "fsi-master"; 26 - reg = <0x1e79b000 0x94>; 27 - interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>; 28 - pinctrl-names = "default"; 29 - pinctrl-0 = <&pinctrl_fsi1_default>; 30 - clocks = <&syscon ASPEED_CLK_GATE_FSICLK>; 31 - 32 - fsi-routing-gpios = <&gpio0 ASPEED_GPIO(Q, 7) GPIO_ACTIVE_HIGH>; 33 - fsi-mux-gpios = <&gpio0 ASPEED_GPIO(B, 0) GPIO_ACTIVE_HIGH>; 34 - 35 - cfam-reset-gpios = <&gpio0 ASPEED_GPIO(Q, 0) GPIO_ACTIVE_LOW>; 36 - };
+32 -4
Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml
··· 9 9 maintainers: 10 10 - Eddie James <eajames@linux.ibm.com> 11 11 12 - description: | 12 + description: 13 13 This binding describes an FSI CFAM engine called the FSI2SPI. Therefore this 14 - node will always be a child of an FSI CFAM node; see fsi.txt for details on 15 - FSI slave and CFAM nodes. This FSI2SPI engine provides access to a number of 16 - SPI controllers. 14 + node will always be a child of an FSI CFAM node. This FSI2SPI engine provides 15 + access to a number of SPI controllers. 17 16 18 17 properties: 19 18 compatible: ··· 22 23 reg: 23 24 items: 24 25 - description: FSI slave address 26 + 27 + "#address-cells": 28 + const: 1 29 + 30 + "#size-cells": 31 + const: 0 32 + 33 + patternProperties: 34 + "^spi@[0-9a-f]+$": 35 + type: object 36 + $ref: /schemas/spi/ibm,spi-fsi.yaml 25 37 26 38 required: 27 39 - compatible ··· 45 35 fsi2spi@1c00 { 46 36 compatible = "ibm,fsi2spi"; 47 37 reg = <0x1c00 0x400>; 38 + #address-cells = <1>; 39 + #size-cells = <0>; 40 + 41 + spi@0 { 42 + compatible = "ibm,spi-fsi"; 43 + reg = <0>; 44 + #address-cells = <1>; 45 + #size-cells = <0>; 46 + 47 + eeprom@0 { 48 + compatible = "atmel,at25"; 49 + reg = <0>; 50 + address-width = <24>; 51 + pagesize = <256>; 52 + size = <0x80000>; 53 + spi-max-frequency = <1000000>; 54 + }; 55 + }; 48 56 };
+4 -1
Documentation/devicetree/bindings/fsi/ibm,i2cr-fsi-master.yaml
··· 26 26 - compatible 27 27 - reg 28 28 29 - additionalProperties: false 29 + allOf: 30 + - $ref: fsi-controller.yaml# 31 + 32 + unevaluatedProperties: false 30 33 31 34 examples: 32 35 - |
+45
Documentation/devicetree/bindings/fsi/ibm,p9-fsi-controller.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/fsi/ibm,p9-fsi-controller.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: IBM FSI-attached FSI Hub Controller 8 + 9 + maintainers: 10 + - Eddie James <eajames@linux.ibm.com> 11 + 12 + description: 13 + The FSI Hub Controller is an FSI controller, providing a number of FSI links, 14 + located on a CFAM. Therefore this node will always be a child of an FSI CFAM 15 + node. 16 + 17 + properties: 18 + compatible: 19 + enum: 20 + - ibm,p9-fsi-controller 21 + 22 + reg: 23 + items: 24 + - description: FSI slave address 25 + 26 + allOf: 27 + - $ref: fsi-controller.yaml# 28 + 29 + unevaluatedProperties: false 30 + 31 + examples: 32 + - | 33 + fsi@3400 { 34 + compatible = "ibm,p9-fsi-controller"; 35 + reg = <0x3400 0x400>; 36 + #address-cells = <2>; 37 + #size-cells = <0>; 38 + 39 + cfam@0,0 { 40 + reg = <0 0>; 41 + #address-cells = <1>; 42 + #size-cells = <1>; 43 + chip-id = <0>; 44 + }; 45 + };
-16
Documentation/devicetree/bindings/fsi/ibm,p9-occ.txt
··· 1 - Device-tree bindings for FSI-attached POWER9/POWER10 On-Chip Controller (OCC) 2 - ----------------------------------------------------------------------------- 3 - 4 - This is the binding for the P9 or P10 On-Chip Controller accessed over FSI from 5 - a service processor. See fsi.txt for details on bindings for FSI slave and CFAM 6 - nodes. The OCC is not an FSI slave device itself, rather it is accessed 7 - through the SBE FIFO. 8 - 9 - Required properties: 10 - - compatible = "ibm,p9-occ" or "ibm,p10-occ" 11 - 12 - Examples: 13 - 14 - occ { 15 - compatible = "ibm,p9-occ"; 16 - };
+40
Documentation/devicetree/bindings/fsi/ibm,p9-occ.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/fsi/ibm,p9-occ.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: IBM FSI-attached On-Chip Controller (OCC) 8 + 9 + maintainers: 10 + - Eddie James <eajames@linux.ibm.com> 11 + 12 + description: 13 + The POWER processor On-Chip Controller (OCC) helps manage power and 14 + thermals for the system, accessed through the FSI-attached SBEFIFO 15 + from a service processor. 16 + 17 + properties: 18 + compatible: 19 + enum: 20 + - ibm,p9-occ 21 + - ibm,p10-occ 22 + 23 + hwmon: 24 + type: object 25 + $ref: /schemas/hwmon/ibm,occ-hwmon.yaml 26 + 27 + required: 28 + - compatible 29 + 30 + additionalProperties: false 31 + 32 + examples: 33 + - | 34 + occ { 35 + compatible = "ibm,p9-occ"; 36 + 37 + hwmon { 38 + compatible = "ibm,p9-occ-hwmon"; 39 + }; 40 + };
+46
Documentation/devicetree/bindings/fsi/ibm,p9-sbefifo.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/fsi/ibm,p9-sbefifo.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: IBM FSI-attached SBEFIFO engine 8 + 9 + maintainers: 10 + - Eddie James <eajames@linux.ibm.com> 11 + 12 + description: 13 + The SBEFIFO is an FSI CFAM engine that provides an interface to the 14 + POWER processor Self Boot Engine (SBE). This node will always be a child 15 + of an FSI CFAM node. 16 + 17 + properties: 18 + compatible: 19 + enum: 20 + - ibm,p9-sbefifo 21 + - ibm,odyssey-sbefifo 22 + 23 + reg: 24 + items: 25 + - description: FSI slave address 26 + 27 + occ: 28 + type: object 29 + $ref: ibm,p9-occ.yaml# 30 + 31 + required: 32 + - compatible 33 + - reg 34 + 35 + additionalProperties: false 36 + 37 + examples: 38 + - | 39 + fsi-slave-engine@2400 { 40 + compatible = "ibm,p9-sbefifo"; 41 + reg = <0x2400 0x400>; 42 + 43 + occ { 44 + compatible = "ibm,p9-occ"; 45 + }; 46 + };
+37
Documentation/devicetree/bindings/fsi/ibm,p9-scom.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/fsi/ibm,p9-scom.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: IBM FSI-attached SCOM engine 8 + 9 + maintainers: 10 + - Eddie James <eajames@linux.ibm.com> 11 + 12 + description: 13 + The SCOM engine is an interface to the POWER processor PIB (Pervasive 14 + Interconnect Bus). This node will always be a child of an FSI CFAM node. 15 + 16 + properties: 17 + compatible: 18 + enum: 19 + - ibm,p9-scom 20 + - ibm,i2cr-scom 21 + 22 + reg: 23 + items: 24 + - description: FSI slave address 25 + 26 + required: 27 + - compatible 28 + - reg 29 + 30 + additionalProperties: false 31 + 32 + examples: 33 + - | 34 + scom@1000 { 35 + compatible = "ibm,p9-scom"; 36 + reg = <0x1000 0x400>; 37 + };
+3 -1
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
··· 7 7 title: Freescale i.MX/MXC GPIO controller 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Sascha Hauer <s.hauer@pengutronix.de> 12 + - Fabio Estevam <festevam@gmail.com> 11 13 12 14 properties: 13 15 compatible:
-1
Documentation/devicetree/bindings/gpio/gpio-mxs.yaml
··· 8 8 9 9 maintainers: 10 10 - Shawn Guo <shawnguo@kernel.org> 11 - - Anson Huang <Anson.Huang@nxp.com> 12 11 13 12 description: | 14 13 The Freescale MXS GPIO controller is part of MXS PIN controller.
-40
Documentation/devicetree/bindings/i2c/i2c-fsi.txt
··· 1 - Device-tree bindings for FSI-attached I2C master and busses 2 - ----------------------------------------------------------- 3 - 4 - Required properties: 5 - - compatible = "ibm,i2c-fsi"; 6 - - reg = < address size >; : The FSI CFAM address and address 7 - space size. 8 - - #address-cells = <1>; : Number of address cells in child 9 - nodes. 10 - - #size-cells = <0>; : Number of size cells in child nodes. 11 - - child nodes : Nodes to describe busses off the I2C 12 - master. 13 - 14 - Child node required properties: 15 - - reg = < port number > : The port number on the I2C master. 16 - 17 - Child node optional properties: 18 - - child nodes : Nodes to describe devices on the I2C 19 - bus. 20 - 21 - Examples: 22 - 23 - i2c@1800 { 24 - compatible = "ibm,i2c-fsi"; 25 - reg = < 0x1800 0x400 >; 26 - #address-cells = <1>; 27 - #size-cells = <0>; 28 - 29 - i2c-bus@0 { 30 - reg = <0>; 31 - }; 32 - 33 - i2c-bus@1 { 34 - reg = <1>; 35 - 36 - eeprom@50 { 37 - compatible = "vendor,dev-name"; 38 - }; 39 - }; 40 - };
+3 -1
Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml
··· 7 7 title: Freescale Low Power Inter IC (LPI2C) for i.MX 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Sascha Hauer <s.hauer@pengutronix.de> 12 + - Fabio Estevam <festevam@gmail.com> 11 13 12 14 allOf: 13 15 - $ref: /schemas/i2c/i2c-controller.yaml#
+76
Documentation/devicetree/bindings/i2c/ibm,i2c-fsi.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/i2c/ibm,i2c-fsi.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: IBM FSI-attached I2C controller 8 + 9 + maintainers: 10 + - Eddie James <eajames@linux.ibm.com> 11 + 12 + description: 13 + This I2C controller is an FSI CFAM engine, providing access to a number of 14 + I2C busses. Therefore this node will always be a child of an FSI CFAM node. 15 + 16 + properties: 17 + compatible: 18 + enum: 19 + - ibm,i2c-fsi 20 + 21 + reg: 22 + items: 23 + - description: FSI slave address 24 + 25 + "#address-cells": 26 + const: 1 27 + 28 + "#size-cells": 29 + const: 0 30 + 31 + patternProperties: 32 + "^i2c-bus@[0-9a-f]+$": 33 + type: object 34 + properties: 35 + reg: 36 + maxItems: 1 37 + 38 + required: 39 + - reg 40 + 41 + allOf: 42 + - $ref: /schemas/i2c/i2c-controller.yaml# 43 + 44 + unevaluatedProperties: false 45 + 46 + required: 47 + - compatible 48 + - reg 49 + 50 + additionalProperties: false 51 + 52 + examples: 53 + - | 54 + i2c@1800 { 55 + compatible = "ibm,i2c-fsi"; 56 + reg = <0x1800 0x400>; 57 + #address-cells = <1>; 58 + #size-cells = <0>; 59 + 60 + i2c-bus@0 { 61 + reg = <0>; 62 + #address-cells = <1>; 63 + #size-cells = <0>; 64 + }; 65 + 66 + i2c-bus@1 { 67 + reg = <1>; 68 + #address-cells = <1>; 69 + #size-cells = <0>; 70 + 71 + eeprom@50 { 72 + compatible = "atmel,24c64"; 73 + reg = <0x50>; 74 + }; 75 + }; 76 + };
+1 -1
Documentation/devicetree/bindings/iio/magnetometer/fsl,mag3110.yaml
··· 7 7 title: Freescale MAG3110 magnetometer sensor 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Jonathan Cameron <jic23@kernel.org> 11 11 12 12 properties: 13 13 compatible:
+137
Documentation/devicetree/bindings/incomplete-devices.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/incomplete-devices.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Rejected, Legacy or Incomplete Devices 8 + 9 + maintainers: 10 + - Rob Herring <robh@kernel.org> 11 + 12 + description: 13 + Some devices will not or should not get a proper Devicetree bindings, but 14 + their compatibles are present in Linux drivers for various reasons. 15 + 16 + Examples are devices using ACPI PRP0001 with non-updatable firmware/ACPI 17 + tables or old PowerPC platforms without in-tree DTS. 18 + 19 + Following list of devices is an incomplete schema with a goal to pass DT schema 20 + checks on undocumented compatibles but also reject any DTS file using such 21 + un-approved compatible. 22 + 23 + Usage of any of following compatibles is not allowed in Devicetree sources, 24 + even if they come from immutable firmware. 25 + 26 + properties: 27 + compatible: 28 + oneOf: 29 + - description: 30 + Rejected compatibles in Devicetree, but used in ACPI-based devices 31 + with non-updatable firmware/ACPI tables (via ACPI PRP0001) 32 + enum: 33 + - broadcom,bcm5241 34 + - ltr,ltrf216a 35 + 36 + - description: Legacy compatibles used on Macintosh devices 37 + enum: 38 + - adm1030 39 + - bmac+ 40 + - heathrow-media-bay 41 + - keylargo-media-bay 42 + - lm87cimt 43 + - MAC,adm1030 44 + - MAC,ds1775 45 + - max6690 46 + - ohare-media-bay 47 + - ohare-swim3 48 + - smu-sat 49 + - swim3 50 + 51 + - description: Legacy compatibles used on other PowerPC devices 52 + enum: 53 + - 1682m-rng 54 + - IBM,lhca 55 + - IBM,lhea 56 + - IBM,lhea-ethernet 57 + - mpc5200b-fec-phy 58 + - mpc5200-serial 59 + - mpc5200-sram 60 + - ohci-be 61 + - ohci-bigendian 62 + - ohci-le 63 + 64 + - description: Legacy compatibles used on SPARC devices 65 + enum: 66 + - bq4802 67 + - ds1287 68 + - isa-m5819p 69 + - isa-m5823p 70 + - m5819 71 + - sab82532 72 + - SUNW,bbc-beep 73 + - SUNW,bbc-i2c 74 + - SUNW,CS4231 75 + - SUNW,ebus-pic16f747-env 76 + - SUNW,kt-cwq 77 + - SUNW,kt-mau 78 + - SUNW,n2-cwq 79 + - SUNW,n2-mau 80 + - SUNW,niusl 81 + - SUNW,smbus-beep 82 + - SUNW,sun4v-console 83 + - SUNW,sun4v-pci 84 + - SUNW,vf-cwq 85 + - SUNW,vf-mau 86 + 87 + - description: Incomplete and/or legacy compatibles for unknown devices 88 + enum: 89 + - electra-cf 90 + - i2cpcf,8584 91 + - virtio,uml 92 + 93 + - description: Linux kernel unit tests and sample code 94 + enum: 95 + - audio-graph-card2-custom-sample 96 + - compat1 97 + - compat2 98 + - compat3 99 + - linux,spi-loopback-test 100 + - mailbox-test 101 + - regulator-virtual-consumer 102 + 103 + - description: 104 + Devices on MIPS platform, without any DTS users. These are 105 + unlikely to get converted to DT schema. 106 + enum: 107 + - mti,ranchu 108 + 109 + - description: 110 + Devices on PowerPC platform, without any DTS users. These are 111 + unlikely to get converted to DT schema. 112 + enum: 113 + - fujitsu,coral 114 + - fujitsu,lime 115 + - fujitsu,MB86276 116 + - fujitsu,MB86277 117 + - fujitsu,MB86293 118 + - fujitsu,MB86294 119 + - fujitsu,mint 120 + - ibm,axon-msic 121 + - ibm,pmemory 122 + - ibm,pmemory-v2 123 + - ibm,power-rng 124 + - ibm,ppc4xx-spi 125 + - ibm,sdram-4xx-ddr2 126 + - ibm,secureboot 127 + - ibm,secureboot-v1 128 + - ibm,secureboot-v2 129 + - ibm,secvar-backend 130 + - sgy,gpio-halt 131 + - wrs,epld-localbus 132 + 133 + required: 134 + - compatible 135 + - broken-usage-of-incorrect-compatible 136 + 137 + additionalProperties: false
+22 -1
Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.yaml
··· 14 14 oneOf: 15 15 - const: fsl,imx-irqsteer 16 16 - items: 17 - - const: fsl,imx8m-irqsteer 17 + - enum: 18 + - fsl,imx8m-irqsteer 19 + - fsl,imx8mp-irqsteer 20 + - fsl,imx8qxp-irqsteer 18 21 - const: fsl,imx-irqsteer 19 22 20 23 reg: ··· 44 41 45 42 clock-names: 46 43 const: ipg 44 + 45 + power-domains: 46 + maxItems: 1 47 47 48 48 interrupt-controller: true 49 49 ··· 75 69 - "#interrupt-cells" 76 70 - fsl,channel 77 71 - fsl,num-irqs 72 + 73 + allOf: 74 + - if: 75 + properties: 76 + compatible: 77 + contains: 78 + enum: 79 + - fsl,imx8mp-irqsteer 80 + - fsl,imx8qxp-irqsteer 81 + then: 82 + required: 83 + - power-domains 84 + else: 85 + properties: 86 + power-domains: false 78 87 79 88 additionalProperties: false 80 89
+79
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/interrupt-controller/fsl,ls-msi.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale Layerscape SCFG PCIe MSI controller 8 + 9 + description: | 10 + This interrupt controller hardware is a second level interrupt controller that 11 + is hooked to a parent interrupt controller: e.g: ARM GIC for ARM-based 12 + platforms. If interrupt-parent is not provided, the default parent interrupt 13 + controller will be used. 14 + 15 + Each PCIe node needs to have property msi-parent that points to 16 + MSI controller node 17 + 18 + maintainers: 19 + - Frank Li <Frank.Li@nxp.com> 20 + 21 + properties: 22 + compatible: 23 + enum: 24 + - fsl,ls1012a-msi 25 + - fsl,ls1021a-msi 26 + - fsl,ls1043a-msi 27 + - fsl,ls1043a-v1.1-msi 28 + - fsl,ls1046a-msi 29 + 30 + reg: 31 + maxItems: 1 32 + 33 + '#msi-cells': 34 + const: 1 35 + 36 + interrupts: 37 + items: 38 + - description: Shared MSI interrupt group 0 39 + - description: Shared MSI interrupt group 1 40 + - description: Shared MSI interrupt group 2 41 + - description: Shared MSI interrupt group 3 42 + minItems: 1 43 + 44 + required: 45 + - compatible 46 + - reg 47 + - msi-controller 48 + - interrupts 49 + 50 + allOf: 51 + - $ref: msi-controller.yaml 52 + - if: 53 + properties: 54 + compatible: 55 + contains: 56 + enum: 57 + - fsl,ls1046a-msi 58 + then: 59 + properties: 60 + interrupts: 61 + minItems: 4 62 + else: 63 + properties: 64 + interrupts: 65 + maxItems: 1 66 + 67 + unevaluatedProperties: false 68 + 69 + examples: 70 + - | 71 + #include <dt-bindings/interrupt-controller/arm-gic.h> 72 + 73 + interrupt-controller@1571000 { 74 + compatible = "fsl,ls1043a-msi"; 75 + reg = <0x1571000 0x8>; 76 + msi-controller; 77 + #msi-cells = <1>; 78 + interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>; 79 + };
-30
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-scfg-msi.txt
··· 1 - * Freescale Layerscape SCFG PCIe MSI controller 2 - 3 - Required properties: 4 - 5 - - compatible: should be "fsl,<soc-name>-msi" to identify 6 - Layerscape PCIe MSI controller block such as: 7 - "fsl,ls1021a-msi" 8 - "fsl,ls1043a-msi" 9 - "fsl,ls1046a-msi" 10 - "fsl,ls1043a-v1.1-msi" 11 - "fsl,ls1012a-msi" 12 - - msi-controller: indicates that this is a PCIe MSI controller node 13 - - reg: physical base address of the controller and length of memory mapped. 14 - - interrupts: an interrupt to the parent interrupt controller. 15 - 16 - This interrupt controller hardware is a second level interrupt controller that 17 - is hooked to a parent interrupt controller: e.g: ARM GIC for ARM-based 18 - platforms. If interrupt-parent is not provided, the default parent interrupt 19 - controller will be used. 20 - Each PCIe node needs to have property msi-parent that points to 21 - MSI controller node 22 - 23 - Examples: 24 - 25 - msi1: msi-controller@1571000 { 26 - compatible = "fsl,ls1043a-msi"; 27 - reg = <0x0 0x1571000 0x0 0x8>, 28 - msi-controller; 29 - interrupts = <0 116 0x4>; 30 - };
+1
Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml
··· 30 30 - qcom,sa8775p-pdc 31 31 - qcom,sc7180-pdc 32 32 - qcom,sc7280-pdc 33 + - qcom,sc8180x-pdc 33 34 - qcom,sc8280xp-pdc 34 35 - qcom,sdm670-pdc 35 36 - qcom,sdm845-pdc
+31 -4
Documentation/devicetree/bindings/media/renesas,rzg2l-cru.yaml
··· 19 19 compatible: 20 20 items: 21 21 - enum: 22 + - renesas,r9a07g043-cru # RZ/G2UL 22 23 - renesas,r9a07g044-cru # RZ/G2{L,LC} 23 24 - renesas,r9a07g054-cru # RZ/V2L 24 25 - const: renesas,rzg2l-cru ··· 88 87 Input port node, describing the Image Processing module connected to the 89 88 CSI-2 receiver. 90 89 91 - required: 92 - - port@0 93 - - port@1 94 - 95 90 required: 96 91 - compatible 97 92 - reg ··· 98 101 - resets 99 102 - reset-names 100 103 - power-domains 104 + 105 + allOf: 106 + - if: 107 + properties: 108 + compatible: 109 + contains: 110 + enum: 111 + - renesas,r9a07g044-cru 112 + - renesas,r9a07g054-cru 113 + then: 114 + properties: 115 + ports: 116 + required: 117 + - port@0 118 + - port@1 119 + 120 + - if: 121 + properties: 122 + compatible: 123 + contains: 124 + enum: 125 + - renesas,r9a07g043-cru 126 + then: 127 + properties: 128 + ports: 129 + properties: 130 + port@0: false 131 + 132 + required: 133 + - port@1 101 134 102 135 additionalProperties: false 103 136
+1
Documentation/devicetree/bindings/media/renesas,rzg2l-csi2.yaml
··· 19 19 compatible: 20 20 items: 21 21 - enum: 22 + - renesas,r9a07g043-csi2 # RZ/G2UL 22 23 - renesas,r9a07g044-csi2 # RZ/G2{L,LC} 23 24 - renesas,r9a07g054-csi2 # RZ/V2L 24 25 - const: renesas,rzg2l-csi2
+3 -1
Documentation/devicetree/bindings/memory-controllers/fsl/mmdc.yaml
··· 7 7 title: Freescale Multi Mode DDR controller (MMDC) 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Sascha Hauer <s.hauer@pengutronix.de> 12 + - Fabio Estevam <festevam@gmail.com> 11 13 12 14 properties: 13 15 compatible:
-196
Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt
··· 1 - * Freescale Management Complex 2 - 3 - The Freescale Management Complex (fsl-mc) is a hardware resource 4 - manager that manages specialized hardware objects used in 5 - network-oriented packet processing applications. After the fsl-mc 6 - block is enabled, pools of hardware resources are available, such as 7 - queues, buffer pools, I/O interfaces. These resources are building 8 - blocks that can be used to create functional hardware objects/devices 9 - such as network interfaces, crypto accelerator instances, L2 switches, 10 - etc. 11 - 12 - For an overview of the DPAA2 architecture and fsl-mc bus see: 13 - Documentation/networking/device_drivers/ethernet/freescale/dpaa2/overview.rst 14 - 15 - As described in the above overview, all DPAA2 objects in a DPRC share the 16 - same hardware "isolation context" and a 10-bit value called an ICID 17 - (isolation context id) is expressed by the hardware to identify 18 - the requester. 19 - 20 - The generic 'iommus' property is insufficient to describe the relationship 21 - between ICIDs and IOMMUs, so an iommu-map property is used to define 22 - the set of possible ICIDs under a root DPRC and how they map to 23 - an IOMMU. 24 - 25 - For generic IOMMU bindings, see 26 - Documentation/devicetree/bindings/iommu/iommu.txt. 27 - 28 - For arm-smmu binding, see: 29 - Documentation/devicetree/bindings/iommu/arm,smmu.yaml. 30 - 31 - The MSI writes are accompanied by sideband data which is derived from the ICID. 32 - The msi-map property is used to associate the devices with both the ITS 33 - controller and the sideband data which accompanies the writes. 34 - 35 - For generic MSI bindings, see 36 - Documentation/devicetree/bindings/interrupt-controller/msi.txt. 37 - 38 - For GICv3 and GIC ITS bindings, see: 39 - Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml. 40 - 41 - Required properties: 42 - 43 - - compatible 44 - Value type: <string> 45 - Definition: Must be "fsl,qoriq-mc". A Freescale Management Complex 46 - compatible with this binding must have Block Revision 47 - Registers BRR1 and BRR2 at offset 0x0BF8 and 0x0BFC in 48 - the MC control register region. 49 - 50 - - reg 51 - Value type: <prop-encoded-array> 52 - Definition: A standard property. Specifies one or two regions 53 - defining the MC's registers: 54 - 55 - -the first region is the command portal for the 56 - this machine and must always be present 57 - 58 - -the second region is the MC control registers. This 59 - region may not be present in some scenarios, such 60 - as in the device tree presented to a virtual machine. 61 - 62 - - ranges 63 - Value type: <prop-encoded-array> 64 - Definition: A standard property. Defines the mapping between the child 65 - MC address space and the parent system address space. 66 - 67 - The MC address space is defined by 3 components: 68 - <region type> <offset hi> <offset lo> 69 - 70 - Valid values for region type are 71 - 0x0 - MC portals 72 - 0x1 - QBMAN portals 73 - 74 - - #address-cells 75 - Value type: <u32> 76 - Definition: Must be 3. (see definition in 'ranges' property) 77 - 78 - - #size-cells 79 - Value type: <u32> 80 - Definition: Must be 1. 81 - 82 - Sub-nodes: 83 - 84 - The fsl-mc node may optionally have dpmac sub-nodes that describe 85 - the relationship between the Ethernet MACs which belong to the MC 86 - and the Ethernet PHYs on the system board. 87 - 88 - The dpmac nodes must be under a node named "dpmacs" which contains 89 - the following properties: 90 - 91 - - #address-cells 92 - Value type: <u32> 93 - Definition: Must be present if dpmac sub-nodes are defined and must 94 - have a value of 1. 95 - 96 - - #size-cells 97 - Value type: <u32> 98 - Definition: Must be present if dpmac sub-nodes are defined and must 99 - have a value of 0. 100 - 101 - These nodes must have the following properties: 102 - 103 - - compatible 104 - Value type: <string> 105 - Definition: Must be "fsl,qoriq-mc-dpmac". 106 - 107 - - reg 108 - Value type: <prop-encoded-array> 109 - Definition: Specifies the id of the dpmac. 110 - 111 - - phy-handle 112 - Value type: <phandle> 113 - Definition: Specifies the phandle to the PHY device node associated 114 - with the this dpmac. 115 - Optional properties: 116 - 117 - - iommu-map: Maps an ICID to an IOMMU and associated iommu-specifier 118 - data. 119 - 120 - The property is an arbitrary number of tuples of 121 - (icid-base,iommu,iommu-base,length). 122 - 123 - Any ICID i in the interval [icid-base, icid-base + length) is 124 - associated with the listed IOMMU, with the iommu-specifier 125 - (i - icid-base + iommu-base). 126 - 127 - - msi-map: Maps an ICID to a GIC ITS and associated msi-specifier 128 - data. 129 - 130 - The property is an arbitrary number of tuples of 131 - (icid-base,gic-its,msi-base,length). 132 - 133 - Any ICID in the interval [icid-base, icid-base + length) is 134 - associated with the listed GIC ITS, with the msi-specifier 135 - (i - icid-base + msi-base). 136 - 137 - Deprecated properties: 138 - 139 - - msi-parent 140 - Value type: <phandle> 141 - Definition: Describes the MSI controller node handling message 142 - interrupts for the MC. When there is no translation 143 - between the ICID and deviceID this property can be used 144 - to describe the MSI controller used by the devices on the 145 - mc-bus. 146 - The use of this property for mc-bus is deprecated. Please 147 - use msi-map. 148 - 149 - Example: 150 - 151 - smmu: iommu@5000000 { 152 - compatible = "arm,mmu-500"; 153 - #iommu-cells = <1>; 154 - stream-match-mask = <0x7C00>; 155 - ... 156 - }; 157 - 158 - gic: interrupt-controller@6000000 { 159 - compatible = "arm,gic-v3"; 160 - ... 161 - } 162 - its: gic-its@6020000 { 163 - compatible = "arm,gic-v3-its"; 164 - msi-controller; 165 - ... 166 - }; 167 - 168 - fsl_mc: fsl-mc@80c000000 { 169 - compatible = "fsl,qoriq-mc"; 170 - reg = <0x00000008 0x0c000000 0 0x40>, /* MC portal base */ 171 - <0x00000000 0x08340000 0 0x40000>; /* MC control reg */ 172 - /* define map for ICIDs 23-64 */ 173 - iommu-map = <23 &smmu 23 41>; 174 - /* define msi map for ICIDs 23-64 */ 175 - msi-map = <23 &its 23 41>; 176 - #address-cells = <3>; 177 - #size-cells = <1>; 178 - 179 - /* 180 - * Region type 0x0 - MC portals 181 - * Region type 0x1 - QBMAN portals 182 - */ 183 - ranges = <0x0 0x0 0x0 0x8 0x0c000000 0x4000000 184 - 0x1 0x0 0x0 0x8 0x18000000 0x8000000>; 185 - 186 - dpmacs { 187 - #address-cells = <1>; 188 - #size-cells = <0>; 189 - 190 - dpmac@1 { 191 - compatible = "fsl,qoriq-mc-dpmac"; 192 - reg = <1>; 193 - phy-handle = <&mdio0_phy0>; 194 - } 195 - } 196 - };
+187
Documentation/devicetree/bindings/misc/fsl,qoriq-mc.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/misc/fsl,qoriq-mc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale Management Complex 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + description: | 13 + The Freescale Management Complex (fsl-mc) is a hardware resource 14 + manager that manages specialized hardware objects used in 15 + network-oriented packet processing applications. After the fsl-mc 16 + block is enabled, pools of hardware resources are available, such as 17 + queues, buffer pools, I/O interfaces. These resources are building 18 + blocks that can be used to create functional hardware objects/devices 19 + such as network interfaces, crypto accelerator instances, L2 switches, 20 + etc. 21 + 22 + For an overview of the DPAA2 architecture and fsl-mc bus see: 23 + Documentation/networking/device_drivers/ethernet/freescale/dpaa2/overview.rst 24 + 25 + As described in the above overview, all DPAA2 objects in a DPRC share the 26 + same hardware "isolation context" and a 10-bit value called an ICID 27 + (isolation context id) is expressed by the hardware to identify 28 + the requester. 29 + 30 + The generic 'iommus' property is insufficient to describe the relationship 31 + between ICIDs and IOMMUs, so an iommu-map property is used to define 32 + the set of possible ICIDs under a root DPRC and how they map to 33 + an IOMMU. 34 + 35 + For generic IOMMU bindings, see 36 + Documentation/devicetree/bindings/iommu/iommu.txt. 37 + 38 + For arm-smmu binding, see: 39 + Documentation/devicetree/bindings/iommu/arm,smmu.yaml. 40 + 41 + The MSI writes are accompanied by sideband data which is derived from the ICID. 42 + The msi-map property is used to associate the devices with both the ITS 43 + controller and the sideband data which accompanies the writes. 44 + 45 + For generic MSI bindings, see 46 + Documentation/devicetree/bindings/interrupt-controller/msi.txt. 47 + 48 + For GICv3 and GIC ITS bindings, see: 49 + Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml. 50 + 51 + properties: 52 + compatible: 53 + enum: 54 + - fsl,qoriq-mc 55 + description: 56 + Must be "fsl,qoriq-mc". A Freescale Management Complex 57 + compatible with this binding must have Block Revision 58 + Registers BRR1 and BRR2 at offset 0x0BF8 and 0x0BFC in 59 + the MC control register region. 60 + 61 + reg: 62 + items: 63 + - description: 64 + the first region is the command portal for the 65 + this machine and must always be present 66 + 67 + - description: 68 + the second region is the MC control registers. This 69 + region may not be present in some scenarios, such 70 + as in the device tree presented to a virtual machine. 71 + 72 + ranges: 73 + description: | 74 + A standard property. Defines the mapping between the child 75 + MC address space and the parent system address space. 76 + 77 + The MC address space is defined by 3 components: 78 + <region type> <offset hi> <offset lo> 79 + 80 + Valid values for region type are 81 + 0x0 - MC portals 82 + 0x1 - QBMAN portals 83 + 84 + "#address-cells": 85 + const: 3 86 + 87 + "#size-cells": 88 + const: 1 89 + 90 + iommu-map: 91 + description: | 92 + Maps an ICID to an IOMMU and associated iommu-specifier 93 + data. 94 + 95 + The property is an arbitrary number of tuples of 96 + (icid-base,iommu,iommu-base,length). 97 + 98 + Any ICID i in the interval [icid-base, icid-base + length) is 99 + associated with the listed IOMMU, with the iommu-specifier 100 + (i - icid-base + iommu-base). 101 + 102 + msi-map: 103 + description: | 104 + Maps an ICID to a GIC ITS and associated msi-specifier 105 + data. 106 + 107 + The property is an arbitrary number of tuples of 108 + (icid-base,gic-its,msi-base,length). 109 + 110 + Any ICID in the interval [icid-base, icid-base + length) is 111 + associated with the listed GIC ITS, with the msi-specifier 112 + (i - icid-base + msi-base). 113 + 114 + msi-parent: 115 + deprecated: true 116 + $ref: /schemas/types.yaml#/definitions/phandle 117 + description: 118 + Describes the MSI controller node handling message 119 + interrupts for the MC. When there is no translation 120 + between the ICID and deviceID this property can be used 121 + to describe the MSI controller used by the devices on the 122 + mc-bus. 123 + The use of this property for mc-bus is deprecated. Please 124 + use msi-map. 125 + 126 + dma-coherent: true 127 + 128 + dpmacs: 129 + type: object 130 + description: 131 + The fsl-mc node may optionally have dpmac sub-nodes that describe 132 + the relationship between the Ethernet MACs which belong to the MC 133 + and the Ethernet PHYs on the system board. 134 + 135 + properties: 136 + "#address-cells": 137 + const: 1 138 + 139 + "#size-cells": 140 + const: 0 141 + 142 + patternProperties: 143 + '^ethernet@[a-f0-9]+$': 144 + $ref: /schemas/net/fsl,qoriq-mc-dpmac.yaml 145 + 146 + additionalProperties: false 147 + 148 + required: 149 + - compatible 150 + - reg 151 + - ranges 152 + - "#address-cells" 153 + - "#size-cells" 154 + 155 + additionalProperties: false 156 + 157 + examples: 158 + - | 159 + fsl-mc@80c000000 { 160 + compatible = "fsl,qoriq-mc"; 161 + reg = <0x0c000000 0x40>, /* MC portal base */ 162 + <0x08340000 0x40000>; /* MC control reg */ 163 + /* 164 + * Region type 0x0 - MC portals 165 + * Region type 0x1 - QBMAN portals 166 + */ 167 + ranges = <0x0 0x0 0x8 0x0c000000 0x4000000 168 + 0x1 0x0 0x8 0x18000000 0x8000000>; 169 + 170 + /* define map for ICIDs 23-64 */ 171 + iommu-map = <23 &smmu 23 41>; 172 + /* define msi map for ICIDs 23-64 */ 173 + msi-map = <23 &its 23 41>; 174 + #address-cells = <3>; 175 + #size-cells = <1>; 176 + 177 + dpmacs { 178 + #address-cells = <1>; 179 + #size-cells = <0>; 180 + 181 + ethernet@1 { 182 + compatible = "fsl,qoriq-mc-dpmac"; 183 + reg = <1>; 184 + phy-handle = <&mdio0_phy0>; 185 + }; 186 + }; 187 + };
+3 -1
Documentation/devicetree/bindings/nvmem/imx-iim.yaml
··· 7 7 title: Freescale i.MX IC Identification Module (IIM) 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Sascha Hauer <s.hauer@pengutronix.de> 12 + - Fabio Estevam <festevam@gmail.com> 11 13 12 14 description: | 13 15 This binding represents the IC Identification Module (IIM) found on
+3 -1
Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml
··· 7 7 title: Freescale i.MX On-Chip OTP Controller (OCOTP) 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Sascha Hauer <s.hauer@pengutronix.de> 12 + - Fabio Estevam <festevam@gmail.com> 11 13 12 14 description: | 13 15 This binding represents the on-chip eFuse OTP controller found on
+3 -1
Documentation/devicetree/bindings/nvmem/mxs-ocotp.yaml
··· 7 7 title: On-Chip OTP Memory for Freescale i.MX23/i.MX28 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Sascha Hauer <s.hauer@pengutronix.de> 12 + - Fabio Estevam <festevam@gmail.com> 11 13 12 14 allOf: 13 15 - $ref: nvmem.yaml#
+3 -1
Documentation/devicetree/bindings/pwm/imx-tpm-pwm.yaml
··· 7 7 title: Freescale i.MX TPM PWM controller 8 8 9 9 maintainers: 10 - - Anson Huang <anson.huang@nxp.com> 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Sascha Hauer <s.hauer@pengutronix.de> 12 + - Fabio Estevam <festevam@gmail.com> 11 13 12 14 description: | 13 15 The TPM counter and period counter are shared between multiple
-1
Documentation/devicetree/bindings/pwm/mxs-pwm.yaml
··· 8 8 9 9 maintainers: 10 10 - Shawn Guo <shawnguo@kernel.org> 11 - - Anson Huang <anson.huang@nxp.com> 12 11 13 12 allOf: 14 13 - $ref: pwm.yaml#
-56
Documentation/devicetree/bindings/soc/fsl/bman-portals.txt
··· 1 - QorIQ DPAA Buffer Manager Portals Device Tree Binding 2 - 3 - Copyright (C) 2008 - 2014 Freescale Semiconductor Inc. 4 - 5 - CONTENTS 6 - 7 - - BMan Portal 8 - - Example 9 - 10 - BMan Portal Node 11 - 12 - Portals are memory mapped interfaces to BMan that allow low-latency, lock-less 13 - interaction by software running on processor cores, accelerators and network 14 - interfaces with the BMan 15 - 16 - PROPERTIES 17 - 18 - - compatible 19 - Usage: Required 20 - Value type: <stringlist> 21 - Definition: Must include "fsl,bman-portal-<hardware revision>" 22 - May include "fsl,<SoC>-bman-portal" or "fsl,bman-portal" 23 - 24 - - reg 25 - Usage: Required 26 - Value type: <prop-encoded-array> 27 - Definition: Two regions. The first is the cache-enabled region of 28 - the portal. The second is the cache-inhibited region of 29 - the portal 30 - 31 - - interrupts 32 - Usage: Required 33 - Value type: <prop-encoded-array> 34 - Definition: Standard property 35 - 36 - EXAMPLE 37 - 38 - The example below shows a (P4080) BMan portals container/bus node with two portals 39 - 40 - bman-portals@ff4000000 { 41 - #address-cells = <1>; 42 - #size-cells = <1>; 43 - compatible = "simple-bus"; 44 - ranges = <0 0xf 0xf4000000 0x200000>; 45 - 46 - bman-portal@0 { 47 - compatible = "fsl,bman-portal-1.0.0", "fsl,bman-portal"; 48 - reg = <0x0 0x4000>, <0x100000 0x1000>; 49 - interrupts = <105 2 0 0>; 50 - }; 51 - bman-portal@4000 { 52 - compatible = "fsl,bman-portal-1.0.0", "fsl,bman-portal"; 53 - reg = <0x4000 0x4000>, <0x101000 0x1000>; 54 - interrupts = <107 2 0 0>; 55 - }; 56 - };
-137
Documentation/devicetree/bindings/soc/fsl/bman.txt
··· 1 - QorIQ DPAA Buffer Manager Device Tree Bindings 2 - 3 - Copyright (C) 2008 - 2014 Freescale Semiconductor Inc. 4 - 5 - CONTENTS 6 - 7 - - BMan Node 8 - - BMan Private Memory Node 9 - - Example 10 - 11 - BMan Node 12 - 13 - The Buffer Manager is part of the Data-Path Acceleration Architecture (DPAA). 14 - BMan supports hardware allocation and deallocation of buffers belonging to pools 15 - originally created by software with configurable depletion thresholds. This 16 - binding covers the CCSR space programming model 17 - 18 - PROPERTIES 19 - 20 - - compatible 21 - Usage: Required 22 - Value type: <stringlist> 23 - Definition: Must include "fsl,bman" 24 - May include "fsl,<SoC>-bman" 25 - 26 - - reg 27 - Usage: Required 28 - Value type: <prop-encoded-array> 29 - Definition: Registers region within the CCSR address space 30 - 31 - The BMan revision information is located in the BMAN_IP_REV_1/2 registers which 32 - are located at offsets 0xbf8 and 0xbfc 33 - 34 - - interrupts 35 - Usage: Required 36 - Value type: <prop-encoded-array> 37 - Definition: Standard property. The error interrupt 38 - 39 - - fsl,bman-portals 40 - Usage: Required 41 - Value type: <phandle> 42 - Definition: Phandle to this BMan instance's portals 43 - 44 - - fsl,liodn 45 - Usage: See pamu.txt 46 - Value type: <prop-encoded-array> 47 - Definition: PAMU property used for static LIODN assignment 48 - 49 - - fsl,iommu-parent 50 - Usage: See pamu.txt 51 - Value type: <phandle> 52 - Definition: PAMU property used for dynamic LIODN assignment 53 - 54 - For additional details about the PAMU/LIODN binding(s) see pamu.txt 55 - 56 - Devices connected to a BMan instance via Direct Connect Portals (DCP) must link 57 - to the respective BMan instance 58 - 59 - - fsl,bman 60 - Usage: Required 61 - Value type: <prop-encoded-array> 62 - Description: List of phandle and DCP index pairs, to the BMan instance 63 - to which this device is connected via the DCP 64 - 65 - BMan Private Memory Node 66 - 67 - BMan requires a contiguous range of physical memory used for the backing store 68 - for BMan Free Buffer Proxy Records (FBPR). This memory is reserved/allocated as 69 - a node under the /reserved-memory node. 70 - 71 - The BMan FBPR memory node must be named "bman-fbpr" 72 - 73 - PROPERTIES 74 - 75 - - compatible 76 - Usage: required 77 - Value type: <stringlist> 78 - Definition: PPC platforms: Must include "fsl,bman-fbpr" 79 - ARM platforms: Must include "shared-dma-pool" 80 - as well as the "no-map" property 81 - 82 - The following constraints are relevant to the FBPR private memory: 83 - - The size must be 2^(size + 1), with size = 11..33. That is 4 KiB to 84 - 16 GiB 85 - - The alignment must be a muliptle of the memory size 86 - 87 - The size of the FBPR must be chosen by observing the hardware features configured 88 - via the Reset Configuration Word (RCW) and that are relevant to a specific board 89 - (e.g. number of MAC(s) pinned-out, number of offline/host command FMan ports, 90 - etc.). The size configured in the DT must reflect the hardware capabilities and 91 - not the specific needs of an application 92 - 93 - For additional details about reserved memory regions see reserved-memory.txt 94 - 95 - EXAMPLE 96 - 97 - The example below shows a BMan FBPR dynamic allocation memory node 98 - 99 - reserved-memory { 100 - #address-cells = <2>; 101 - #size-cells = <2>; 102 - ranges; 103 - 104 - bman_fbpr: bman-fbpr { 105 - compatible = "shared-mem-pool"; 106 - size = <0 0x1000000>; 107 - alignment = <0 0x1000000>; 108 - no-map; 109 - }; 110 - }; 111 - 112 - The example below shows a (P4080) BMan CCSR-space node 113 - 114 - bportals: bman-portals@ff4000000 { 115 - ... 116 - }; 117 - 118 - crypto@300000 { 119 - ... 120 - fsl,bman = <&bman, 2>; 121 - ... 122 - }; 123 - 124 - bman: bman@31a000 { 125 - compatible = "fsl,bman"; 126 - reg = <0x31a000 0x1000>; 127 - interrupts = <16 2 1 2>; 128 - fsl,liodn = <0x17>; 129 - fsl,bman-portals = <&bportals>; 130 - memory-region = <&bman_fbpr>; 131 - }; 132 - 133 - fman@400000 { 134 - ... 135 - fsl,bman = <&bman, 0>; 136 - ... 137 - };
+48
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qe-firmware.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,qe-firmware.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale QUICC Engine module Firmware Node 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + description: | 13 + This node defines a firmware binary that is embedded in the device tree, for 14 + the purpose of passing the firmware from bootloader to the kernel, or from 15 + the hypervisor to the guest. 16 + 17 + The firmware node itself contains the firmware binary contents, a compatible 18 + property, and any firmware-specific properties. The node should be placed 19 + inside a QE node that needs it. Doing so eliminates the need for a 20 + fsl,firmware-phandle property. Other QE nodes that need the same firmware 21 + should define an fsl,firmware-phandle property that points to the firmware node 22 + in the first QE node. 23 + 24 + The fsl,firmware property can be specified in the DTS (possibly using incbin) 25 + or can be inserted by the boot loader at boot time. 26 + 27 + properties: 28 + compatible: 29 + enum: 30 + - fsl,qe-firmware 31 + 32 + fsl,firmware: 33 + $ref: /schemas/types.yaml#/definitions/uint8-array 34 + description: 35 + A standard property. This property contains the firmware binary "blob". 36 + 37 + required: 38 + - compatible 39 + - fsl,firmware 40 + 41 + additionalProperties: false 42 + 43 + examples: 44 + - | 45 + qe-firmware { 46 + compatible = "fsl,qe-firmware"; 47 + fsl,firmware = <0x70 0xcd 0x00 0x00 0x01 0x46 0x45>; 48 + };
+47
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qe-ic.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,qe-ic.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale QUICC Engine module Interrupt Controller (IC) 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + properties: 13 + compatible: 14 + const: fsl,qe-ic 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + interrupts: 20 + items: 21 + - description: QE interrupt 22 + - description: QE critical 23 + - description: QE error 24 + minItems: 1 25 + 26 + interrupt-controller: true 27 + 28 + "#interrupt-cells": 29 + const: 1 30 + 31 + required: 32 + - compatible 33 + - reg 34 + - interrupt-controller 35 + - "#interrupt-cells" 36 + 37 + additionalProperties: false 38 + 39 + examples: 40 + - | 41 + interrupt-controller@80 { 42 + compatible = "fsl,qe-ic"; 43 + reg = <0x80 0x80>; 44 + #interrupt-cells = <1>; 45 + interrupt-controller; 46 + interrupts = <95 2 0 0 94 2 0 0>; 47 + };
+71
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qe-muram.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,qe-muram.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale QUICC Engine Multi-User RAM (MURAM) 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + description: Multi-User RAM (MURAM) 13 + 14 + properties: 15 + compatible: 16 + items: 17 + - const: fsl,qe-muram 18 + - const: fsl,cpm-muram 19 + 20 + ranges: 21 + maxItems: 1 22 + 23 + "#address-cells": 24 + const: 1 25 + 26 + "#size-cells": 27 + const: 1 28 + 29 + mode: 30 + $ref: /schemas/types.yaml#/definitions/string 31 + enum: [host, slave] 32 + 33 + 34 + patternProperties: 35 + '^data\-only@[a-f0-9]+$': 36 + type: object 37 + properties: 38 + compatible: 39 + items: 40 + - const: fsl,qe-muram-data 41 + - const: fsl,cpm-muram-data 42 + 43 + reg: 44 + maxItems: 1 45 + 46 + required: 47 + - compatible 48 + - reg 49 + 50 + additionalProperties: false 51 + 52 + required: 53 + - compatible 54 + - ranges 55 + 56 + additionalProperties: false 57 + 58 + examples: 59 + - | 60 + muram@10000 { 61 + compatible = "fsl,qe-muram", "fsl,cpm-muram"; 62 + ranges = <0 0x00010000 0x0000c000>; 63 + #address-cells = <1>; 64 + #size-cells = <1>; 65 + 66 + data-only@0{ 67 + compatible = "fsl,qe-muram-data", 68 + "fsl,cpm-muram-data"; 69 + reg = <0 0xc000>; 70 + }; 71 + };
+40
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qe-si.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,qe-si.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale QUICC Engine module Serial Interface Block (SI) 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + description: 13 + The SI manages the routing of eight TDM lines to the QE block serial drivers, 14 + the MCC and the UCCs, for receive and transmit. 15 + 16 + properties: 17 + compatible: 18 + oneOf: 19 + - items: 20 + - enum: 21 + - fsl,ls1043-qe-si 22 + - const: fsl,t1040-qe-si 23 + - enum: 24 + - fsl,t1040-qe-si 25 + 26 + reg: 27 + maxItems: 1 28 + 29 + required: 30 + - compatible 31 + - reg 32 + 33 + additionalProperties: false 34 + 35 + examples: 36 + - | 37 + si@700 { 38 + compatible = "fsl,t1040-qe-si"; 39 + reg = <0x700 0x80>; 40 + };
+39
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qe-siram.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,qe-siram.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale QUICC Engine module Serial Interface Block RAM(SIRAM) 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + description: 13 + store the routing entries of SI 14 + 15 + properties: 16 + compatible: 17 + oneOf: 18 + - items: 19 + - enum: 20 + - fsl,ls1043-qe-siram 21 + - const: fsl,t1040-qe-siram 22 + - const: fsl,t1040-qe-siram 23 + 24 + reg: 25 + maxItems: 1 26 + 27 + required: 28 + - compatible 29 + - reg 30 + 31 + additionalProperties: false 32 + 33 + examples: 34 + - | 35 + siram@1000 { 36 + compatible = "fsl,t1040-qe-siram"; 37 + reg = <0x1000 0x800>; 38 + }; 39 +
+148
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qe.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,qe.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale QUICC Engine module (QE) 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + description: | 13 + This represents qe module that is installed on PowerQUICC II Pro. 14 + 15 + NOTE: This is an interim binding; it should be updated to fit 16 + in with the CPM binding later in this document. 17 + 18 + Basically, it is a bus of devices, that could act more or less 19 + as a complete entity (UCC, USB etc ). All of them should be siblings on 20 + the "root" qe node, using the common properties from there. 21 + The description below applies to the qe of MPC8360 and 22 + more nodes and properties would be extended in the future. 23 + 24 + properties: 25 + compatible: 26 + items: 27 + - const: fsl,qe 28 + - const: simple-bus 29 + 30 + reg: 31 + maxItems: 1 32 + 33 + ranges: 34 + maxItems: 1 35 + 36 + model: 37 + $ref: /schemas/types.yaml#/definitions/string 38 + enum: [QE, CPM, CPM2] 39 + 40 + bus-frequency: 41 + $ref: /schemas/types.yaml#/definitions/uint32 42 + description: the clock frequency for QUICC Engine. 43 + 44 + fsl,qe-num-riscs: 45 + $ref: /schemas/types.yaml#/definitions/uint32 46 + description: define how many RISC engines the QE has. 47 + 48 + fsl,qe-snums: 49 + $ref: /schemas/types.yaml#/definitions/uint8-array 50 + maxItems: 28 51 + description: 52 + defining the array of serial number (SNUM) values for the virtual 53 + threads. 54 + 55 + fsl,firmware-phandle: 56 + $ref: /schemas/types.yaml#/definitions/phandle 57 + description: | 58 + required only if there is no fsl,qe-firmware child node 59 + 60 + Points to a firmware node (see "QE Firmware Node" below) 61 + that contains the firmware that should be uploaded for this QE. 62 + The compatible property for the firmware node should say, 63 + "fsl,qe-firmware". 64 + 65 + brg-frequency: 66 + $ref: /schemas/types.yaml#/definitions/uint32 67 + description: 68 + the internal clock source frequency for baud-rate 69 + generators in Hz. 70 + 71 + fsl,qe-num-snums: 72 + $ref: /schemas/types.yaml#/definitions/uint32 73 + deprecated: true 74 + description: | 75 + define how many serial number(SNUM) the QE can use 76 + for the threads. Use fsl,qe-snums instead to not only specify the 77 + number of snums, but also their values. 78 + 79 + patternProperties: 80 + '^muram@[a-f0-9]+$': 81 + $ref: fsl,qe-muram.yaml 82 + 83 + '^interrupt-controller@[a-f0-9]+$': 84 + $ref: fsl,qe-ic.yaml 85 + 86 + '^si@[a-f0-9]+$': 87 + $ref: fsl,qe-si.yaml 88 + 89 + '^siram@[a-f0-9]+$': 90 + $ref: fsl,qe-siram.yaml 91 + 92 + required: 93 + - compatible 94 + - reg 95 + - bus-frequency 96 + 97 + allOf: 98 + - $ref: /schemas/simple-bus.yaml# 99 + 100 + unevaluatedProperties: false 101 + 102 + examples: 103 + - | 104 + qe-bus@e0100000 { 105 + compatible = "fsl,qe", "simple-bus"; 106 + reg = <0xe0100000 0x480>; 107 + ranges = <0 0xe0100000 0x00100000>; 108 + #address-cells = <1>; 109 + #size-cells = <1>; 110 + brg-frequency = <0>; 111 + bus-frequency = <0x179a7b00>; 112 + fsl,qe-snums = /bits/ 8 < 113 + 0x04 0x05 0x0c 0x0d 0x14 0x15 0x1c 0x1d 114 + 0x24 0x25 0x2c 0x2d 0x34 0x35 0x88 0x89 115 + 0x98 0x99 0xa8 0xa9 0xb8 0xb9 0xc8 0xc9 116 + 0xd8 0xd9 0xe8 0xe9>; 117 + 118 + interrupt-controller@80 { 119 + compatible = "fsl,qe-ic"; 120 + reg = <0x80 0x80>; 121 + #interrupt-cells = <1>; 122 + interrupt-controller; 123 + interrupts = <95 2 0 0 94 2 0 0>; 124 + }; 125 + 126 + si@700 { 127 + compatible = "fsl,t1040-qe-si"; 128 + reg = <0x700 0x80>; 129 + }; 130 + 131 + siram@1000 { 132 + compatible = "fsl,t1040-qe-siram"; 133 + reg = <0x1000 0x800>; 134 + }; 135 + 136 + muram@10000 { 137 + compatible = "fsl,qe-muram", "fsl,cpm-muram"; 138 + ranges = <0 0x00010000 0x0000c000>; 139 + #address-cells = <1>; 140 + #size-cells = <1>; 141 + 142 + data-only@0{ 143 + compatible = "fsl,qe-muram-data", 144 + "fsl,cpm-muram-data"; 145 + reg = <0 0xc000>; 146 + }; 147 + }; 148 + };
-178
Documentation/devicetree/bindings/soc/fsl/cpm_qe/qe.txt
··· 1 - * Freescale QUICC Engine module (QE) 2 - This represents qe module that is installed on PowerQUICC II Pro. 3 - 4 - NOTE: This is an interim binding; it should be updated to fit 5 - in with the CPM binding later in this document. 6 - 7 - Basically, it is a bus of devices, that could act more or less 8 - as a complete entity (UCC, USB etc ). All of them should be siblings on 9 - the "root" qe node, using the common properties from there. 10 - The description below applies to the qe of MPC8360 and 11 - more nodes and properties would be extended in the future. 12 - 13 - i) Root QE device 14 - 15 - Required properties: 16 - - compatible : should be "fsl,qe"; 17 - - model : precise model of the QE, Can be "QE", "CPM", or "CPM2" 18 - - reg : offset and length of the device registers. 19 - - bus-frequency : the clock frequency for QUICC Engine. 20 - - fsl,qe-num-riscs: define how many RISC engines the QE has. 21 - - fsl,qe-snums: This property has to be specified as '/bits/ 8' value, 22 - defining the array of serial number (SNUM) values for the virtual 23 - threads. 24 - 25 - Optional properties: 26 - - fsl,firmware-phandle: 27 - Usage: required only if there is no fsl,qe-firmware child node 28 - Value type: <phandle> 29 - Definition: Points to a firmware node (see "QE Firmware Node" below) 30 - that contains the firmware that should be uploaded for this QE. 31 - The compatible property for the firmware node should say, 32 - "fsl,qe-firmware". 33 - 34 - Recommended properties 35 - - brg-frequency : the internal clock source frequency for baud-rate 36 - generators in Hz. 37 - 38 - Deprecated properties 39 - - fsl,qe-num-snums: define how many serial number(SNUM) the QE can use 40 - for the threads. Use fsl,qe-snums instead to not only specify the 41 - number of snums, but also their values. 42 - 43 - Example: 44 - qe@e0100000 { 45 - #address-cells = <1>; 46 - #size-cells = <1>; 47 - #interrupt-cells = <2>; 48 - compatible = "fsl,qe"; 49 - ranges = <0 e0100000 00100000>; 50 - reg = <e0100000 480>; 51 - brg-frequency = <0>; 52 - bus-frequency = <179A7B00>; 53 - fsl,qe-snums = /bits/ 8 < 54 - 0x04 0x05 0x0C 0x0D 0x14 0x15 0x1C 0x1D 55 - 0x24 0x25 0x2C 0x2D 0x34 0x35 0x88 0x89 56 - 0x98 0x99 0xA8 0xA9 0xB8 0xB9 0xC8 0xC9 57 - 0xD8 0xD9 0xE8 0xE9>; 58 - } 59 - 60 - * Multi-User RAM (MURAM) 61 - 62 - Required properties: 63 - - compatible : should be "fsl,qe-muram", "fsl,cpm-muram". 64 - - mode : the could be "host" or "slave". 65 - - ranges : Should be defined as specified in 1) to describe the 66 - translation of MURAM addresses. 67 - - data-only : sub-node which defines the address area under MURAM 68 - bus that can be allocated as data/parameter 69 - 70 - Example: 71 - 72 - muram@10000 { 73 - compatible = "fsl,qe-muram", "fsl,cpm-muram"; 74 - ranges = <0 00010000 0000c000>; 75 - 76 - data-only@0{ 77 - compatible = "fsl,qe-muram-data", 78 - "fsl,cpm-muram-data"; 79 - reg = <0 c000>; 80 - }; 81 - }; 82 - 83 - * Interrupt Controller (IC) 84 - 85 - Required properties: 86 - - compatible : should be "fsl,qe-ic". 87 - - reg : Address range of IC register set. 88 - - interrupts : interrupts generated by the device. 89 - - interrupt-controller : this device is a interrupt controller. 90 - 91 - Example: 92 - 93 - qeic: interrupt-controller@80 { 94 - interrupt-controller; 95 - compatible = "fsl,qe-ic"; 96 - #address-cells = <0>; 97 - #interrupt-cells = <1>; 98 - reg = <0x80 0x80>; 99 - interrupts = <95 2 0 0 94 2 0 0>; 100 - }; 101 - 102 - * Serial Interface Block (SI) 103 - 104 - The SI manages the routing of eight TDM lines to the QE block serial drivers 105 - , the MCC and the UCCs, for receive and transmit. 106 - 107 - Required properties: 108 - - compatible : must be "fsl,<chip>-qe-si". For t1040, must contain 109 - "fsl,t1040-qe-si". 110 - - reg : Address range of SI register set. 111 - 112 - Example: 113 - 114 - si1: si@700 { 115 - compatible = "fsl,t1040-qe-si"; 116 - reg = <0x700 0x80>; 117 - }; 118 - 119 - * Serial Interface Block RAM(SIRAM) 120 - 121 - store the routing entries of SI 122 - 123 - Required properties: 124 - - compatible : should be "fsl,<chip>-qe-siram". For t1040, must contain 125 - "fsl,t1040-qe-siram". 126 - - reg : Address range of SI RAM. 127 - 128 - Example: 129 - 130 - siram1: siram@1000 { 131 - compatible = "fsl,t1040-qe-siram"; 132 - reg = <0x1000 0x800>; 133 - }; 134 - 135 - * QE Firmware Node 136 - 137 - This node defines a firmware binary that is embedded in the device tree, for 138 - the purpose of passing the firmware from bootloader to the kernel, or from 139 - the hypervisor to the guest. 140 - 141 - The firmware node itself contains the firmware binary contents, a compatible 142 - property, and any firmware-specific properties. The node should be placed 143 - inside a QE node that needs it. Doing so eliminates the need for a 144 - fsl,firmware-phandle property. Other QE nodes that need the same firmware 145 - should define an fsl,firmware-phandle property that points to the firmware node 146 - in the first QE node. 147 - 148 - The fsl,firmware property can be specified in the DTS (possibly using incbin) 149 - or can be inserted by the boot loader at boot time. 150 - 151 - Required properties: 152 - - compatible 153 - Usage: required 154 - Value type: <string> 155 - Definition: A standard property. Specify a string that indicates what 156 - kind of firmware it is. For QE, this should be "fsl,qe-firmware". 157 - 158 - - fsl,firmware 159 - Usage: required 160 - Value type: <prop-encoded-array>, encoded as an array of bytes 161 - Definition: A standard property. This property contains the firmware 162 - binary "blob". 163 - 164 - Example: 165 - qe1@e0080000 { 166 - compatible = "fsl,qe"; 167 - qe_firmware:qe-firmware { 168 - compatible = "fsl,qe-firmware"; 169 - fsl,firmware = [0x70 0xcd 0x00 0x00 0x01 0x46 0x45 ...]; 170 - }; 171 - ... 172 - }; 173 - 174 - qe2@e0090000 { 175 - compatible = "fsl,qe"; 176 - fsl,firmware-phandle = <&qe_firmware>; 177 - ... 178 - };
+52
Documentation/devicetree/bindings/soc/fsl/fsl,bman-portal.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/soc/fsl/fsl,bman-portal.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: QorIQ DPAA Queue Manager Portals 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + description: 13 + QorIQ DPAA Buffer Manager Portal 14 + 15 + Portals are memory mapped interfaces to BMan that allow low-latency, lock-less 16 + interaction by software running on processor cores, accelerators and network 17 + interfaces with the BMan 18 + 19 + properties: 20 + compatible: 21 + oneOf: 22 + - const: fsl,bman-portal 23 + - items: 24 + - enum: 25 + - fsl,bman-portal-1.0.0 26 + - fsl,ls1043a-bmap-portal 27 + - fsl,ls1046a-bmap-portal 28 + - const: fsl,bman-portal 29 + reg: 30 + items: 31 + - description: the cache-enabled region of the portal 32 + - description: the cache-inhibited region of the portal 33 + 34 + interrupts: 35 + maxItems: 1 36 + 37 + required: 38 + - compatible 39 + - reg 40 + - interrupts 41 + 42 + additionalProperties: false 43 + 44 + examples: 45 + - | 46 + #include <dt-bindings/interrupt-controller/irq.h> 47 + 48 + bman-portal@0 { 49 + compatible = "fsl,bman-portal-1.0.0", "fsl,bman-portal"; 50 + reg = <0x0 0x4000>, <0x100000 0x1000>; 51 + interrupts = <105 IRQ_TYPE_EDGE_FALLING 0 0>; 52 + };
+83
Documentation/devicetree/bindings/soc/fsl/fsl,bman.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/soc/fsl/fsl,bman.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: QorIQ DPAA Buffer Manager 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + description: 13 + The Buffer Manager is part of the Data-Path Acceleration Architecture (DPAA). 14 + BMan supports hardware allocation and deallocation of buffers belonging to 15 + pools originally created by software with configurable depletion thresholds. 16 + This binding covers the CCSR space programming model 17 + 18 + properties: 19 + compatible: 20 + oneOf: 21 + - const: fsl,bman 22 + - items: 23 + - enum: 24 + - fsl,ls1043a-bman 25 + - fsl,ls1046a-bman 26 + - const: fsl,bman 27 + 28 + reg: 29 + items: 30 + - description: | 31 + Registers region within the CCSR address space 32 + 33 + The BMan revision information is located in the BMAN_IP_REV_1/2 34 + registers which are located at offsets 0xbf8 and 0xbfc 35 + 36 + interrupts: 37 + items: 38 + - description: The error interrupt 39 + 40 + memory-region: 41 + minItems: 1 42 + maxItems: 2 43 + description: 44 + List of phandles referencing the BMan private memory 45 + nodes (described below). The bman-fqd node must be 46 + first followed by bman-pfdr node. Only used on ARM 47 + 48 + Devices connected to a BMan instance via Direct Connect Portals (DCP) must link 49 + to the respective BMan instance 50 + 51 + fsl,bman-portals: 52 + $ref: /schemas/types.yaml#/definitions/phandle 53 + description: ref fsl,bman-port.yaml 54 + 55 + fsl,liodn: 56 + $ref: /schemas/types.yaml#/definitions/uint32-array 57 + description: 58 + See pamu.txt, PAMU property used for static LIODN assignment 59 + 60 + fsl,iommu-parent: 61 + $ref: /schemas/types.yaml#/definitions/phandle 62 + description: 63 + See pamu.txt, PAMU property used for dynamic LIODN assignment 64 + 65 + required: 66 + - compatible 67 + - reg 68 + - interrupts 69 + 70 + additionalProperties: false 71 + 72 + examples: 73 + - | 74 + #include <dt-bindings/interrupt-controller/irq.h> 75 + 76 + bman@31a000 { 77 + compatible = "fsl,bman"; 78 + reg = <0x31a000 0x1000>; 79 + interrupts = <16 IRQ_TYPE_EDGE_FALLING 1 2>; 80 + fsl,liodn = <0x17>; 81 + fsl,bman-portals = <&bportals>; 82 + memory-region = <&bman_fbpr>; 83 + };
+56
Documentation/devicetree/bindings/soc/fsl/fsl,ls1028a-reset.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas//soc/fsl/fsl,ls1028a-reset.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale Layerscape Reset Registers Module 8 + 9 + maintainers: 10 + - Frank Li 11 + 12 + description: 13 + Reset Module includes chip reset, service processor control and Reset Control 14 + Word (RCW) status. 15 + 16 + properties: 17 + $nodename: 18 + pattern: "^syscon@[0-9a-f]+$" 19 + 20 + compatible: 21 + items: 22 + - enum: 23 + - fsl,ls1028a-reset 24 + - const: syscon 25 + - const: simple-mfd 26 + 27 + reg: 28 + maxItems: 1 29 + 30 + little-endian: true 31 + 32 + reboot: 33 + $ref: /schemas/power/reset/syscon-reboot.yaml# 34 + unevaluatedProperties: false 35 + 36 + required: 37 + - compatible 38 + - reg 39 + - reboot 40 + 41 + additionalProperties: false 42 + 43 + examples: 44 + - | 45 + syscon@1e60000 { 46 + compatible = "fsl,ls1028a-reset", "syscon", "simple-mfd"; 47 + reg = <0x1e60000 0x10000>; 48 + little-endian; 49 + 50 + reboot { 51 + compatible = "syscon-reboot"; 52 + offset = <0>; 53 + mask = <0x02>; 54 + }; 55 + }; 56 +
+69
Documentation/devicetree/bindings/soc/fsl/fsl,qman-fqd.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/soc/fsl/fsl,qman-fqd.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: QMan Private Memory Nodes 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + description: | 13 + QMan requires two contiguous range of physical memory used for the backing store 14 + for QMan Frame Queue Descriptor (FQD) and Packed Frame Descriptor Record (PFDR). 15 + This memory is reserved/allocated as a node under the /reserved-memory node. 16 + 17 + BMan requires a contiguous range of physical memory used for the backing store 18 + for BMan Free Buffer Proxy Records (FBPR). This memory is reserved/allocated as 19 + a node under the /reserved-memory node. 20 + 21 + The QMan FQD memory node must be named "qman-fqd" 22 + The QMan PFDR memory node must be named "qman-pfdr" 23 + The BMan FBPR memory node must be named "bman-fbpr" 24 + 25 + The following constraints are relevant to the FQD and PFDR private memory: 26 + - The size must be 2^(size + 1), with size = 11..29. That is 4 KiB to 27 + 1 GiB 28 + - The alignment must be a muliptle of the memory size 29 + 30 + The size of the FQD and PFDP must be chosen by observing the hardware features 31 + configured via the Reset Configuration Word (RCW) and that are relevant to a 32 + specific board (e.g. number of MAC(s) pinned-out, number of offline/host command 33 + FMan ports, etc.). The size configured in the DT must reflect the hardware 34 + capabilities and not the specific needs of an application 35 + 36 + For additional details about reserved memory regions see 37 + reserved-memory/reserved-memory.yaml in dtschema project. 38 + 39 + properties: 40 + $nodename: 41 + pattern: '^(qman-fqd|qman-pfdr|bman-fbpr)+$' 42 + 43 + compatible: 44 + enum: 45 + - fsl,qman-fqd 46 + - fsl,qman-pfdr 47 + - fsl,bman-fbpr 48 + 49 + required: 50 + - compatible 51 + 52 + allOf: 53 + - $ref: reserved-memory.yaml 54 + 55 + unevaluatedProperties: false 56 + 57 + examples: 58 + - | 59 + reserved-memory { 60 + #address-cells = <2>; 61 + #size-cells = <2>; 62 + 63 + qman-fqd { 64 + compatible = "shared-dma-pool"; 65 + size = <0 0x400000>; 66 + alignment = <0 0x400000>; 67 + no-map; 68 + }; 69 + };
+110
Documentation/devicetree/bindings/soc/fsl/fsl,qman-portal.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/soc/fsl/fsl,qman-portal.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: QorIQ DPAA Queue Manager Portals 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + description: 13 + Portals are memory mapped interfaces to QMan that allow low-latency, lock-less 14 + interaction by software running on processor cores, accelerators and network 15 + interfaces with the QMan 16 + 17 + properties: 18 + compatible: 19 + oneOf: 20 + - const: fsl,qman-portal 21 + - items: 22 + - enum: 23 + - fsl,ls1043-qman-portal 24 + - fsl,ls1046-qman-portal 25 + - fsl,qman-portal-1.2.0 26 + - const: fsl,qman-portal 27 + 28 + reg: 29 + items: 30 + - description: the cache-enabled region of the portal 31 + - description: the cache-inhibited region of the portal 32 + 33 + interrupts: 34 + maxItems: 1 35 + 36 + fsl,liodn: 37 + $ref: /schemas/types.yaml#/definitions/uint32-array 38 + description: See pamu.txt. Two LIODN(s). DQRR LIODN (DLIODN) and Frame LIODN 39 + (FLIODN) 40 + 41 + fsl,iommu-parent: 42 + $ref: /schemas/types.yaml#/definitions/phandle 43 + description: See pamu.txt. 44 + 45 + fsl,qman-channel-id: 46 + $ref: /schemas/types.yaml#/definitions/uint32 47 + description: qman channel id. 48 + 49 + cell-index: 50 + $ref: /schemas/types.yaml#/definitions/uint32 51 + description: 52 + The hardware index of the channel. This can also be 53 + determined by dividing any of the channel's 8 work queue 54 + IDs by 8 55 + 56 + In addition to these properties the qman-portals should have sub-nodes to 57 + represent the HW devices/portals that are connected to the software portal 58 + described here 59 + 60 + required: 61 + - compatible 62 + - reg 63 + - interrupts 64 + 65 + additionalProperties: false 66 + 67 + patternProperties: 68 + '^(fman0|fman1|pme|crypto)+$': 69 + type: object 70 + properties: 71 + fsl,liodn: 72 + description: See pamu.txt, PAMU property used for static LIODN assignment 73 + 74 + fsl,iommu-parent: 75 + description: See pamu.txt, PAMU property used for dynamic LIODN assignment 76 + 77 + dev-handle: 78 + $ref: /schemas/types.yaml#/definitions/phandle 79 + description: 80 + The phandle to the particular hardware device that this 81 + portal is connected to. 82 + 83 + additionalProperties: false 84 + 85 + examples: 86 + - | 87 + #include <dt-bindings/interrupt-controller/irq.h> 88 + 89 + qman-portal@0 { 90 + compatible = "fsl,qman-portal-1.2.0", "fsl,qman-portal"; 91 + reg = <0 0x4000>, <0x100000 0x1000>; 92 + interrupts = <104 IRQ_TYPE_EDGE_FALLING 0 0>; 93 + fsl,liodn = <1 2>; 94 + fsl,qman-channel-id = <0>; 95 + 96 + fman0 { 97 + fsl,liodn = <0x21>; 98 + dev-handle = <&fman0>; 99 + }; 100 + 101 + fman1 { 102 + fsl,liodn = <0xa1>; 103 + dev-handle = <&fman1>; 104 + }; 105 + 106 + crypto { 107 + fsl,liodn = <0x41 0x66>; 108 + dev-handle = <&crypto>; 109 + }; 110 + };
+93
Documentation/devicetree/bindings/soc/fsl/fsl,qman.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/soc/fsl/fsl,qman.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: QorIQ DPAA Queue Manager 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + description: 13 + The Queue Manager is part of the Data-Path Acceleration Architecture (DPAA). QMan 14 + supports queuing and QoS scheduling of frames to CPUs, network interfaces and 15 + DPAA logic modules, maintains packet ordering within flows. Besides providing 16 + flow-level queuing, is also responsible for congestion management functions such 17 + as RED/WRED, congestion notifications and tail discards. This binding covers the 18 + CCSR space programming model 19 + 20 + properties: 21 + compatible: 22 + oneOf: 23 + - const: fsl,qman 24 + - items: 25 + - enum: 26 + - fsl,ls1043a-qman 27 + - fsl,ls1046a-qman 28 + - const: fsl,qman 29 + reg: 30 + items: 31 + - description: | 32 + Registers region within the CCSR address space 33 + 34 + The QMan revision information is located in the QMAN_IP_REV_1/2 35 + registers which are located at offsets 0xbf8 and 0xbfc 36 + 37 + interrupts: 38 + items: 39 + - description: The error interrupt 40 + 41 + fsl,qman-portals: 42 + $ref: /schemas/types.yaml#/definitions/phandle 43 + description: ref fsl,qman-port.yaml 44 + 45 + fsl,liodn: 46 + $ref: /schemas/types.yaml#/definitions/uint32-array 47 + description: 48 + See pamu.txt, PAMU property used for static LIODN assignment 49 + 50 + fsl,iommu-parent: 51 + $ref: /schemas/types.yaml#/definitions/phandle 52 + description: 53 + See pamu.txt, PAMU property used for dynamic LIODN assignment 54 + 55 + clocks: 56 + maxItems: 1 57 + description: 58 + Reference input clock. Its frequency is half of the platform clock 59 + 60 + memory-region: 61 + maxItems: 2 62 + description: 63 + List of phandles referencing the QMan private memory nodes (described 64 + below). The qman-fqd node must be first followed by qman-pfdr node. 65 + Only used on ARM Devices connected to a QMan instance via Direct Connect 66 + Portals (DCP) must link to the respective QMan instance. 67 + 68 + fsl,qman: 69 + $ref: /schemas/types.yaml#/definitions/uint32-array 70 + description: 71 + List of phandle and DCP index pairs, to the QMan instance 72 + to which this device is connected via the DCP 73 + 74 + required: 75 + - compatible 76 + - reg 77 + - interrupts 78 + 79 + additionalProperties: false 80 + 81 + examples: 82 + - | 83 + #include <dt-bindings/interrupt-controller/irq.h> 84 + 85 + qman: qman@318000 { 86 + compatible = "fsl,qman"; 87 + reg = <0x318000 0x1000>; 88 + interrupts = <16 IRQ_TYPE_EDGE_FALLING 1 3>; 89 + fsl,liodn = <0x16>; 90 + fsl,qman-portals = <&qportals>; 91 + memory-region = <&qman_fqd &qman_pfdr>; 92 + clocks = <&platform_pll 1>; 93 + };
-134
Documentation/devicetree/bindings/soc/fsl/qman-portals.txt
··· 1 - QorIQ DPAA Queue Manager Portals Device Tree Binding 2 - 3 - Copyright (C) 2008 - 2014 Freescale Semiconductor Inc. 4 - 5 - CONTENTS 6 - 7 - - QMan Portal 8 - - Example 9 - 10 - QMan Portal Node 11 - 12 - Portals are memory mapped interfaces to QMan that allow low-latency, lock-less 13 - interaction by software running on processor cores, accelerators and network 14 - interfaces with the QMan 15 - 16 - PROPERTIES 17 - 18 - - compatible 19 - Usage: Required 20 - Value type: <stringlist> 21 - Definition: Must include "fsl,qman-portal-<hardware revision>" 22 - May include "fsl,<SoC>-qman-portal" or "fsl,qman-portal" 23 - 24 - - reg 25 - Usage: Required 26 - Value type: <prop-encoded-array> 27 - Definition: Two regions. The first is the cache-enabled region of 28 - the portal. The second is the cache-inhibited region of 29 - the portal 30 - 31 - - interrupts 32 - Usage: Required 33 - Value type: <prop-encoded-array> 34 - Definition: Standard property 35 - 36 - - fsl,liodn 37 - Usage: See pamu.txt 38 - Value type: <prop-encoded-array> 39 - Definition: Two LIODN(s). DQRR LIODN (DLIODN) and Frame LIODN 40 - (FLIODN) 41 - 42 - - fsl,iommu-parent 43 - Usage: See pamu.txt 44 - Value type: <phandle> 45 - Definition: PAMU property used for dynamic LIODN assignment 46 - 47 - For additional details about the PAMU/LIODN binding(s) see pamu.txt 48 - 49 - - cell-index 50 - Usage: Required 51 - Value type: <u32> 52 - Definition: The hardware index of the channel. This can also be 53 - determined by dividing any of the channel's 8 work queue 54 - IDs by 8 55 - 56 - In addition to these properties the qman-portals should have sub-nodes to 57 - represent the HW devices/portals that are connected to the software portal 58 - described here 59 - 60 - The currently supported sub-nodes are: 61 - * fman0 62 - * fman1 63 - * pme 64 - * crypto 65 - 66 - These subnodes should have the following properties: 67 - 68 - - fsl,liodn 69 - Usage: See pamu.txt 70 - Value type: <prop-encoded-array> 71 - Definition: PAMU property used for static LIODN assignment 72 - 73 - - fsl,iommu-parent 74 - Usage: See pamu.txt 75 - Value type: <phandle> 76 - Definition: PAMU property used for dynamic LIODN assignment 77 - 78 - - dev-handle 79 - Usage: Required 80 - Value type: <phandle> 81 - Definition: The phandle to the particular hardware device that this 82 - portal is connected to. 83 - 84 - EXAMPLE 85 - 86 - The example below shows a (P4080) QMan portals container/bus node with two portals 87 - 88 - qman-portals@ff4200000 { 89 - #address-cells = <1>; 90 - #size-cells = <1>; 91 - compatible = "simple-bus"; 92 - ranges = <0 0xf 0xf4200000 0x200000>; 93 - 94 - qman-portal@0 { 95 - compatible = "fsl,qman-portal-1.2.0", "fsl,qman-portal"; 96 - reg = <0 0x4000>, <0x100000 0x1000>; 97 - interrupts = <104 2 0 0>; 98 - fsl,liodn = <1 2>; 99 - fsl,qman-channel-id = <0>; 100 - 101 - fman0 { 102 - fsl,liodn = <0x21>; 103 - dev-handle = <&fman0>; 104 - }; 105 - fman1 { 106 - fsl,liodn = <0xa1>; 107 - dev-handle = <&fman1>; 108 - }; 109 - crypto { 110 - fsl,liodn = <0x41 0x66>; 111 - dev-handle = <&crypto>; 112 - }; 113 - }; 114 - qman-portal@4000 { 115 - compatible = "fsl,qman-portal-1.2.0", "fsl,qman-portal"; 116 - reg = <0x4000 0x4000>, <0x101000 0x1000>; 117 - interrupts = <106 2 0 0>; 118 - fsl,liodn = <3 4>; 119 - cell-index = <1>; 120 - 121 - fman0 { 122 - fsl,liodn = <0x22>; 123 - dev-handle = <&fman0>; 124 - }; 125 - fman1 { 126 - fsl,liodn = <0xa2>; 127 - dev-handle = <&fman1>; 128 - }; 129 - crypto { 130 - fsl,liodn = <0x42 0x67>; 131 - dev-handle = <&crypto>; 132 - }; 133 - }; 134 - };
-187
Documentation/devicetree/bindings/soc/fsl/qman.txt
··· 1 - QorIQ DPAA Queue Manager Device Tree Binding 2 - 3 - Copyright (C) 2008 - 2014 Freescale Semiconductor Inc. 4 - 5 - CONTENTS 6 - 7 - - QMan Node 8 - - QMan Private Memory Nodes 9 - - Example 10 - 11 - QMan Node 12 - 13 - The Queue Manager is part of the Data-Path Acceleration Architecture (DPAA). QMan 14 - supports queuing and QoS scheduling of frames to CPUs, network interfaces and 15 - DPAA logic modules, maintains packet ordering within flows. Besides providing 16 - flow-level queuing, is also responsible for congestion management functions such 17 - as RED/WRED, congestion notifications and tail discards. This binding covers the 18 - CCSR space programming model 19 - 20 - PROPERTIES 21 - 22 - - compatible 23 - Usage: Required 24 - Value type: <stringlist> 25 - Definition: Must include "fsl,qman" 26 - May include "fsl,<SoC>-qman" 27 - 28 - - reg 29 - Usage: Required 30 - Value type: <prop-encoded-array> 31 - Definition: Registers region within the CCSR address space 32 - 33 - The QMan revision information is located in the QMAN_IP_REV_1/2 registers which 34 - are located at offsets 0xbf8 and 0xbfc 35 - 36 - - interrupts 37 - Usage: Required 38 - Value type: <prop-encoded-array> 39 - Definition: Standard property. The error interrupt 40 - 41 - - fsl,qman-portals 42 - Usage: Required 43 - Value type: <phandle> 44 - Definition: Phandle to this QMan instance's portals 45 - 46 - - fsl,liodn 47 - Usage: See pamu.txt 48 - Value type: <prop-encoded-array> 49 - Definition: PAMU property used for static LIODN assignment 50 - 51 - - fsl,iommu-parent 52 - Usage: See pamu.txt 53 - Value type: <phandle> 54 - Definition: PAMU property used for dynamic LIODN assignment 55 - 56 - For additional details about the PAMU/LIODN binding(s) see pamu.txt 57 - 58 - - clocks 59 - Usage: See clock-bindings.txt and qoriq-clock.txt 60 - Value type: <prop-encoded-array> 61 - Definition: Reference input clock. Its frequency is half of the 62 - platform clock 63 - - memory-regions 64 - Usage: Required for ARM 65 - Value type: <phandle array> 66 - Definition: List of phandles referencing the QMan private memory 67 - nodes (described below). The qman-fqd node must be 68 - first followed by qman-pfdr node. Only used on ARM 69 - 70 - Devices connected to a QMan instance via Direct Connect Portals (DCP) must link 71 - to the respective QMan instance 72 - 73 - - fsl,qman 74 - Usage: Required 75 - Value type: <prop-encoded-array> 76 - Description: List of phandle and DCP index pairs, to the QMan instance 77 - to which this device is connected via the DCP 78 - 79 - QMan Private Memory Nodes 80 - 81 - QMan requires two contiguous range of physical memory used for the backing store 82 - for QMan Frame Queue Descriptor (FQD) and Packed Frame Descriptor Record (PFDR). 83 - This memory is reserved/allocated as a node under the /reserved-memory node. 84 - 85 - For additional details about reserved memory regions see reserved-memory.txt 86 - 87 - The QMan FQD memory node must be named "qman-fqd" 88 - 89 - PROPERTIES 90 - 91 - - compatible 92 - Usage: required 93 - Value type: <stringlist> 94 - Definition: PPC platforms: Must include "fsl,qman-fqd" 95 - ARM platforms: Must include "shared-dma-pool" 96 - as well as the "no-map" property 97 - 98 - The QMan PFDR memory node must be named "qman-pfdr" 99 - 100 - PROPERTIES 101 - 102 - - compatible 103 - Usage: required 104 - Value type: <stringlist> 105 - Definition: PPC platforms: Must include "fsl,qman-pfdr" 106 - ARM platforms: Must include "shared-dma-pool" 107 - as well as the "no-map" property 108 - 109 - The following constraints are relevant to the FQD and PFDR private memory: 110 - - The size must be 2^(size + 1), with size = 11..29. That is 4 KiB to 111 - 1 GiB 112 - - The alignment must be a muliptle of the memory size 113 - 114 - The size of the FQD and PFDP must be chosen by observing the hardware features 115 - configured via the Reset Configuration Word (RCW) and that are relevant to a 116 - specific board (e.g. number of MAC(s) pinned-out, number of offline/host command 117 - FMan ports, etc.). The size configured in the DT must reflect the hardware 118 - capabilities and not the specific needs of an application 119 - 120 - For additional details about reserved memory regions see reserved-memory.txt 121 - 122 - EXAMPLE 123 - 124 - The example below shows a QMan FQD and a PFDR dynamic allocation memory nodes 125 - 126 - reserved-memory { 127 - #address-cells = <2>; 128 - #size-cells = <2>; 129 - ranges; 130 - 131 - qman_fqd: qman-fqd { 132 - compatible = "shared-dma-pool"; 133 - size = <0 0x400000>; 134 - alignment = <0 0x400000>; 135 - no-map; 136 - }; 137 - qman_pfdr: qman-pfdr { 138 - compatible = "shared-dma-pool"; 139 - size = <0 0x2000000>; 140 - alignment = <0 0x2000000>; 141 - no-map; 142 - }; 143 - }; 144 - 145 - The example below shows a (P4080) QMan CCSR-space node 146 - 147 - qportals: qman-portals@ff4200000 { 148 - ... 149 - }; 150 - 151 - clockgen: global-utilities@e1000 { 152 - ... 153 - sysclk: sysclk { 154 - ... 155 - }; 156 - ... 157 - platform_pll: platform-pll@c00 { 158 - #clock-cells = <1>; 159 - reg = <0xc00 0x4>; 160 - compatible = "fsl,qoriq-platform-pll-1.0"; 161 - clocks = <&sysclk>; 162 - clock-output-names = "platform-pll", "platform-pll-div2"; 163 - }; 164 - ... 165 - }; 166 - 167 - crypto@300000 { 168 - ... 169 - fsl,qman = <&qman, 2>; 170 - ... 171 - }; 172 - 173 - qman: qman@318000 { 174 - compatible = "fsl,qman"; 175 - reg = <0x318000 0x1000>; 176 - interrupts = <16 2 1 3> 177 - fsl,liodn = <0x16>; 178 - fsl,qman-portals = <&qportals>; 179 - memory-region = <&qman_fqd &qman_pfdr>; 180 - clocks = <&platform_pll 1>; 181 - }; 182 - 183 - fman@400000 { 184 - ... 185 - fsl,qman = <&qman, 0>; 186 - ... 187 - };
+3 -1
Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml
··· 7 7 title: Freescale Low Power SPI (LPSPI) for i.MX 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Sascha Hauer <s.hauer@pengutronix.de> 12 + - Fabio Estevam <festevam@gmail.com> 11 13 12 14 allOf: 13 15 - $ref: /schemas/spi/spi-controller.yaml#
-1
Documentation/devicetree/bindings/thermal/imx-thermal.yaml
··· 8 8 9 9 maintainers: 10 10 - Shawn Guo <shawnguo@kernel.org> 11 - - Anson Huang <Anson.Huang@nxp.com> 12 11 13 12 properties: 14 13 compatible:
+3 -1
Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml
··· 7 7 title: NXP i.MX8M Mini Thermal 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Sascha Hauer <s.hauer@pengutronix.de> 12 + - Fabio Estevam <festevam@gmail.com> 11 13 12 14 description: | 13 15 i.MX8MM has TMU IP to allow temperature measurement, there are
+3 -1
Documentation/devicetree/bindings/thermal/qoriq-thermal.yaml
··· 7 7 title: Thermal Monitoring Unit (TMU) on Freescale QorIQ SoCs 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Sascha Hauer <s.hauer@pengutronix.de> 12 + - Fabio Estevam <festevam@gmail.com> 11 13 12 14 $ref: thermal-sensor.yaml# 13 15
+1
Documentation/devicetree/bindings/timer/renesas,tmu.yaml
··· 95 95 - compatible 96 96 - reg 97 97 - interrupts 98 + - interrupt-names 98 99 - clocks 99 100 - clock-names 100 101 - power-domains
+68
Documentation/devicetree/bindings/timer/sprd,sc9860-timer.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/timer/sprd,sc9860-timer.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Spreadtrum SC9860 timer 8 + 9 + maintainers: 10 + - Orson Zhai <orsonzhai@gmail.com> 11 + - Baolin Wang <baolin.wang7@gmail.com> 12 + - Chunyan Zhang <zhang.lyra@gmail.com> 13 + 14 + description: 15 + The Spreadtrum SC9860 platform provides 3 general-purpose timers. 16 + These timers can support 32bit or 64bit counter, as well as supporting 17 + period mode or one-shot mode, and they can be a wakeup source 18 + during deep sleep. 19 + 20 + properties: 21 + compatible: 22 + enum: 23 + - sprd,sc9860-timer 24 + - sprd,sc9860-suspend-timer 25 + 26 + reg: 27 + maxItems: 1 28 + 29 + interrupts: 30 + maxItems: 1 31 + 32 + clocks: 33 + maxItems: 1 34 + 35 + required: 36 + - compatible 37 + - reg 38 + - clocks 39 + 40 + allOf: 41 + - if: 42 + properties: 43 + compatible: 44 + contains: 45 + const: sprd,sc9860-timer 46 + then: 47 + required: 48 + - interrupts 49 + 50 + additionalProperties: false 51 + 52 + examples: 53 + - | 54 + #include <dt-bindings/interrupt-controller/arm-gic.h> 55 + #include <dt-bindings/interrupt-controller/irq.h> 56 + 57 + soc { 58 + #address-cells = <2>; 59 + #size-cells = <2>; 60 + 61 + timer@40050000 { 62 + compatible = "sprd,sc9860-timer"; 63 + reg = <0 0x40050000 0 0x20>; 64 + interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; 65 + clocks = <&ext_32k>; 66 + }; 67 + }; 68 + ...
-20
Documentation/devicetree/bindings/timer/spreadtrum,sprd-timer.txt
··· 1 - Spreadtrum timers 2 - 3 - The Spreadtrum SC9860 platform provides 3 general-purpose timers. 4 - These timers can support 32bit or 64bit counter, as well as supporting 5 - period mode or one-shot mode, and they are can be wakeup source 6 - during deep sleep. 7 - 8 - Required properties: 9 - - compatible: should be "sprd,sc9860-timer" for SC9860 platform. 10 - - reg: The register address of the timer device. 11 - - interrupts: Should contain the interrupt for the timer device. 12 - - clocks: The phandle to the source clock (usually a 32.768 KHz fixed clock). 13 - 14 - Example: 15 - timer@40050000 { 16 - compatible = "sprd,sc9860-timer"; 17 - reg = <0 0x40050000 0 0x20>; 18 - interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; 19 - clocks = <&ext_32k>; 20 - };
+2
Documentation/devicetree/bindings/trivial-devices.yaml
··· 364 364 - sparkfun,qwiic-joystick 365 365 # i2c serial eeprom (24cxx) 366 366 - st,24c256 367 + # Sierra Wireless mangOH Green SPI IoT interface 368 + - swir,mangoh-iotport-spi 367 369 # Ambient Light Sensor with SMBUS/Two Wire Serial Interface 368 370 - taos,tsl2550 369 371 # Temperature Monitoring and Fan Control
+5 -7
Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
··· 46 46 47 47 clocks: 48 48 minItems: 7 49 - maxItems: 11 49 + maxItems: 9 50 50 51 51 clock-names: 52 52 minItems: 7 53 - maxItems: 11 53 + maxItems: 9 54 54 55 55 dma-coherent: true 56 56 ··· 217 217 then: 218 218 properties: 219 219 clocks: 220 - minItems: 11 221 - maxItems: 11 220 + minItems: 9 221 + maxItems: 9 222 222 clock-names: 223 223 items: 224 - - const: core_clk_src 225 224 - const: core_clk 226 225 - const: bus_clk 227 226 - const: bus_aggr_clk 228 227 - const: iface_clk 229 - - const: core_clk_unipro_src 230 228 - const: core_clk_unipro 231 229 - const: core_clk_ice 232 230 - const: ref_clk ··· 285 287 maxItems: 2 286 288 clocks: 287 289 minItems: 7 288 - maxItems: 11 290 + maxItems: 9 289 291 290 292 unevaluatedProperties: false 291 293
+3 -1
Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.yaml
··· 7 7 title: Freescale i.MX Watchdog Timer (WDT) Controller 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Sascha Hauer <s.hauer@pengutronix.de> 12 + - Fabio Estevam <festevam@gmail.com> 11 13 12 14 properties: 13 15 compatible:
+3 -1
Documentation/devicetree/bindings/watchdog/fsl-imx7ulp-wdt.yaml
··· 7 7 title: Freescale i.MX7ULP Watchdog Timer (WDT) Controller 8 8 9 9 maintainers: 10 - - Anson Huang <Anson.Huang@nxp.com> 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Sascha Hauer <s.hauer@pengutronix.de> 12 + - Fabio Estevam <festevam@gmail.com> 11 13 12 14 allOf: 13 15 - $ref: watchdog.yaml#
+55
Documentation/devicetree/bindings/watchdog/img,pdc-wdt.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/watchdog/img,pdc-wdt.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: ImgTec PowerDown Controller (PDC) Watchdog Timer (WDT) 8 + 9 + maintainers: 10 + - Shresth Prasad <shresthprasad7@gmail.com> 11 + 12 + allOf: 13 + - $ref: watchdog.yaml# 14 + 15 + properties: 16 + compatible: 17 + enum: 18 + - img,pdc-wdt 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + clocks: 24 + items: 25 + - description: watchdog counter clock 26 + - description: register interface clock 27 + 28 + clock-names: 29 + items: 30 + - const: wdt 31 + - const: sys 32 + 33 + interrupts: 34 + maxItems: 1 35 + 36 + required: 37 + - compatible 38 + - reg 39 + - clocks 40 + - clock-names 41 + - interrupts 42 + 43 + unevaluatedProperties: false 44 + 45 + examples: 46 + - | 47 + #include <dt-bindings/interrupt-controller/irq.h> 48 + 49 + watchdog@18102100 { 50 + compatible = "img,pdc-wdt"; 51 + reg = <0x18102100 0x100>; 52 + clocks = <&pdc_wdt_clk>, <&sys_clk>; 53 + clock-names = "wdt", "sys"; 54 + interrupts = <0 52 IRQ_TYPE_LEVEL_HIGH>; 55 + };
-19
Documentation/devicetree/bindings/watchdog/imgpdc-wdt.txt
··· 1 - *ImgTec PowerDown Controller (PDC) Watchdog Timer (WDT) 2 - 3 - Required properties: 4 - - compatible : Should be "img,pdc-wdt" 5 - - reg : Should contain WDT registers location and length 6 - - clocks: Must contain an entry for each entry in clock-names. 7 - - clock-names: Should contain "wdt" and "sys"; the watchdog counter 8 - clock and register interface clock respectively. 9 - - interrupts : Should contain WDT interrupt 10 - 11 - Examples: 12 - 13 - watchdog@18102100 { 14 - compatible = "img,pdc-wdt"; 15 - reg = <0x18102100 0x100>; 16 - clocks = <&pdc_wdt_clk>, <&sys_clk>; 17 - clock-names = "wdt", "sys"; 18 - interrupts = <0 52 IRQ_TYPE_LEVEL_HIGH>; 19 - };
+1 -1
Documentation/networking/device_drivers/ethernet/freescale/dpaa2/overview.rst
··· 339 339 a bind of the root DPRC to the DPRC driver 340 340 341 341 The binding for the MC-bus device-tree node can be consulted at 342 - *Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt*. 342 + *Documentation/devicetree/bindings/misc/fsl,qoriq-mc.yaml*. 343 343 The sysfs bind/unbind interfaces for the MC-bus can be consulted at 344 344 *Documentation/ABI/testing/sysfs-bus-fsl-mc*. 345 345
+1 -1
MAINTAINERS
··· 9082 9082 L: linux-i2c@vger.kernel.org 9083 9083 L: openbmc@lists.ozlabs.org (moderated for non-subscribers) 9084 9084 S: Maintained 9085 - F: Documentation/devicetree/bindings/i2c/i2c-fsi.txt 9085 + F: Documentation/devicetree/bindings/i2c/ibm,i2c-fsi.yaml 9086 9086 F: drivers/i2c/busses/i2c-fsi.c 9087 9087 9088 9088 FSI-ATTACHED SPI DRIVER
+26 -1
drivers/of/dynamic.c
··· 984 984 int of_changeset_add_prop_string_array(struct of_changeset *ocs, 985 985 struct device_node *np, 986 986 const char *prop_name, 987 - const char **str_array, size_t sz) 987 + const char * const *str_array, size_t sz) 988 988 { 989 989 struct property prop; 990 990 int i, ret; ··· 1047 1047 return of_changeset_add_prop_helper(ocs, np, &prop); 1048 1048 } 1049 1049 EXPORT_SYMBOL_GPL(of_changeset_add_prop_u32_array); 1050 + 1051 + /** 1052 + * of_changeset_add_prop_bool - Add a boolean property (i.e. a property without 1053 + * any values) to a changeset. 1054 + * 1055 + * @ocs: changeset pointer 1056 + * @np: device node pointer 1057 + * @prop_name: name of the property to be added 1058 + * 1059 + * Create a boolean property and add it to a changeset. 1060 + * 1061 + * Return: 0 on success, a negative error value in case of an error. 1062 + */ 1063 + int of_changeset_add_prop_bool(struct of_changeset *ocs, struct device_node *np, 1064 + const char *prop_name) 1065 + { 1066 + struct property prop; 1067 + 1068 + prop.name = (char *)prop_name; 1069 + prop.length = 0; 1070 + prop.value = NULL; 1071 + 1072 + return of_changeset_add_prop_helper(ocs, np, &prop); 1073 + } 1074 + EXPORT_SYMBOL_GPL(of_changeset_add_prop_bool);
+5 -25
drivers/of/fdt.c
··· 52 52 int memory; 53 53 int len; 54 54 const void *val; 55 - int nr_address_cells = OF_ROOT_NODE_ADDR_CELLS_DEFAULT; 56 - int nr_size_cells = OF_ROOT_NODE_SIZE_CELLS_DEFAULT; 57 - const __be32 *addr_prop; 58 - const __be32 *size_prop; 59 - int root_offset; 60 - int cell_size; 61 - 62 - root_offset = fdt_path_offset(initial_boot_params, "/"); 63 - if (root_offset < 0) 64 - return; 65 - 66 - addr_prop = fdt_getprop(initial_boot_params, root_offset, 67 - "#address-cells", NULL); 68 - if (addr_prop) 69 - nr_address_cells = fdt32_to_cpu(*addr_prop); 70 - 71 - size_prop = fdt_getprop(initial_boot_params, root_offset, 72 - "#size-cells", NULL); 73 - if (size_prop) 74 - nr_size_cells = fdt32_to_cpu(*size_prop); 75 - 76 - cell_size = sizeof(uint32_t)*(nr_address_cells + nr_size_cells); 55 + int cell_size = sizeof(uint32_t)*(dt_root_addr_cells + dt_root_size_cells); 77 56 78 57 memory = fdt_path_offset(initial_boot_params, "/memory"); 79 58 if (memory > 0) { ··· 1149 1170 initial_boot_params = params; 1150 1171 of_fdt_crc32 = crc32_be(~0, initial_boot_params, 1151 1172 fdt_totalsize(initial_boot_params)); 1173 + 1174 + /* Initialize {size,address}-cells info */ 1175 + early_init_dt_scan_root(); 1176 + 1152 1177 return true; 1153 1178 } 1154 1179 ··· 1160 1177 void __init early_init_dt_scan_nodes(void) 1161 1178 { 1162 1179 int rc; 1163 - 1164 - /* Initialize {size,address}-cells info */ 1165 - early_init_dt_scan_root(); 1166 1180 1167 1181 /* Retrieve various information from the /chosen node */ 1168 1182 rc = early_init_dt_scan_chosen(boot_command_line);
+166
drivers/of/unittest.c
··· 917 917 #endif 918 918 } 919 919 920 + static void __init __maybe_unused changeset_check_string(struct device_node *np, 921 + const char *prop_name, 922 + const char *expected_str) 923 + { 924 + const char *str; 925 + int ret; 926 + 927 + ret = of_property_read_string(np, prop_name, &str); 928 + if (unittest(ret == 0, "failed to read %s\n", prop_name)) 929 + return; 930 + 931 + unittest(strcmp(str, expected_str) == 0, 932 + "%s value mismatch (read '%s', exp '%s')\n", 933 + prop_name, str, expected_str); 934 + } 935 + 936 + static void __init __maybe_unused changeset_check_string_array(struct device_node *np, 937 + const char *prop_name, 938 + const char * const *expected_array, 939 + unsigned int count) 940 + { 941 + const char *str; 942 + unsigned int i; 943 + int ret; 944 + int cnt; 945 + 946 + cnt = of_property_count_strings(np, prop_name); 947 + if (unittest(cnt >= 0, "failed to get %s count\n", prop_name)) 948 + return; 949 + 950 + if (unittest(cnt == count, 951 + "%s count mismatch (read %d, exp %u)\n", 952 + prop_name, cnt, count)) 953 + return; 954 + 955 + for (i = 0; i < count; i++) { 956 + ret = of_property_read_string_index(np, prop_name, i, &str); 957 + if (unittest(ret == 0, "failed to read %s[%d]\n", prop_name, i)) 958 + continue; 959 + 960 + unittest(strcmp(str, expected_array[i]) == 0, 961 + "%s[%d] value mismatch (read '%s', exp '%s')\n", 962 + prop_name, i, str, expected_array[i]); 963 + } 964 + } 965 + 966 + static void __init __maybe_unused changeset_check_u32(struct device_node *np, 967 + const char *prop_name, 968 + u32 expected_u32) 969 + { 970 + u32 val32; 971 + int ret; 972 + 973 + ret = of_property_read_u32(np, prop_name, &val32); 974 + if (unittest(ret == 0, "failed to read %s\n", prop_name)) 975 + return; 976 + 977 + unittest(val32 == expected_u32, 978 + "%s value mismatch (read '%u', exp '%u')\n", 979 + prop_name, val32, expected_u32); 980 + } 981 + 982 + static void __init __maybe_unused changeset_check_u32_array(struct device_node *np, 983 + const char *prop_name, 984 + const u32 *expected_array, 985 + unsigned int count) 986 + { 987 + unsigned int i; 988 + u32 val32; 989 + int ret; 990 + int cnt; 991 + 992 + cnt = of_property_count_u32_elems(np, prop_name); 993 + if (unittest(cnt >= 0, "failed to get %s count\n", prop_name)) 994 + return; 995 + 996 + if (unittest(cnt == count, 997 + "%s count mismatch (read %d, exp %u)\n", 998 + prop_name, cnt, count)) 999 + return; 1000 + 1001 + for (i = 0; i < count; i++) { 1002 + ret = of_property_read_u32_index(np, prop_name, i, &val32); 1003 + if (unittest(ret == 0, "failed to read %s[%d]\n", prop_name, i)) 1004 + continue; 1005 + 1006 + unittest(val32 == expected_array[i], 1007 + "%s[%d] value mismatch (read '%u', exp '%u')\n", 1008 + prop_name, i, val32, expected_array[i]); 1009 + } 1010 + } 1011 + 1012 + static void __init __maybe_unused changeset_check_bool(struct device_node *np, 1013 + const char *prop_name) 1014 + { 1015 + unittest(of_property_read_bool(np, prop_name), 1016 + "%s value mismatch (read 'false', exp 'true')\n", prop_name); 1017 + } 1018 + 1019 + static void __init of_unittest_changeset_prop(void) 1020 + { 1021 + #ifdef CONFIG_OF_DYNAMIC 1022 + static const char * const str_array[] = { "abc", "defg", "hij" }; 1023 + static const u32 u32_array[] = { 123, 4567, 89, 10, 11 }; 1024 + struct device_node *nchangeset, *np; 1025 + struct of_changeset chgset; 1026 + int ret; 1027 + 1028 + nchangeset = of_find_node_by_path("/testcase-data/changeset"); 1029 + if (!nchangeset) { 1030 + pr_err("missing testcase data\n"); 1031 + return; 1032 + } 1033 + 1034 + of_changeset_init(&chgset); 1035 + 1036 + np = of_changeset_create_node(&chgset, nchangeset, "test-prop"); 1037 + if (unittest(np, "failed to create test-prop node\n")) 1038 + goto end_changeset_destroy; 1039 + 1040 + ret = of_changeset_add_prop_string(&chgset, np, "prop-string", "abcde"); 1041 + unittest(ret == 0, "failed to add prop-string\n"); 1042 + 1043 + ret = of_changeset_add_prop_string_array(&chgset, np, "prop-string-array", 1044 + str_array, ARRAY_SIZE(str_array)); 1045 + unittest(ret == 0, "failed to add prop-string-array\n"); 1046 + 1047 + ret = of_changeset_add_prop_u32(&chgset, np, "prop-u32", 1234); 1048 + unittest(ret == 0, "failed to add prop-u32\n"); 1049 + 1050 + ret = of_changeset_add_prop_u32_array(&chgset, np, "prop-u32-array", 1051 + u32_array, ARRAY_SIZE(u32_array)); 1052 + unittest(ret == 0, "failed to add prop-u32-array\n"); 1053 + 1054 + ret = of_changeset_add_prop_bool(&chgset, np, "prop-bool"); 1055 + unittest(ret == 0, "failed to add prop-bool\n"); 1056 + 1057 + of_node_put(np); 1058 + 1059 + ret = of_changeset_apply(&chgset); 1060 + if (unittest(ret == 0, "failed to apply changeset\n")) 1061 + goto end_changeset_destroy; 1062 + 1063 + np = of_find_node_by_path("/testcase-data/changeset/test-prop"); 1064 + if (unittest(np, "failed to find test-prop node\n")) 1065 + goto end_revert_changeset; 1066 + 1067 + changeset_check_string(np, "prop-string", "abcde"); 1068 + changeset_check_string_array(np, "prop-string-array", str_array, ARRAY_SIZE(str_array)); 1069 + changeset_check_u32(np, "prop-u32", 1234); 1070 + changeset_check_u32_array(np, "prop-u32-array", u32_array, ARRAY_SIZE(u32_array)); 1071 + changeset_check_bool(np, "prop-bool"); 1072 + 1073 + of_node_put(np); 1074 + 1075 + end_revert_changeset: 1076 + ret = of_changeset_revert(&chgset); 1077 + unittest(ret == 0, "failed to revert changeset\n"); 1078 + 1079 + end_changeset_destroy: 1080 + of_changeset_destroy(&chgset); 1081 + of_node_put(nchangeset); 1082 + #endif 1083 + } 1084 + 920 1085 static void __init of_unittest_dma_get_max_cpu_address(void) 921 1086 { 922 1087 struct device_node *np; ··· 4266 4101 of_unittest_property_string(); 4267 4102 of_unittest_property_copy(); 4268 4103 of_unittest_changeset(); 4104 + of_unittest_changeset_prop(); 4269 4105 of_unittest_parse_interrupts(); 4270 4106 of_unittest_parse_interrupts_extended(); 4271 4107 of_unittest_dma_get_max_cpu_address();
+24
drivers/pci/of_property.c
··· 183 183 return of_changeset_add_prop_u32(ocs, np, "interrupts", (u32)pin); 184 184 } 185 185 186 + static int of_pci_prop_intr_ctrl(struct pci_dev *pdev, struct of_changeset *ocs, 187 + struct device_node *np) 188 + { 189 + int ret; 190 + u8 pin; 191 + 192 + ret = pci_read_config_byte(pdev, PCI_INTERRUPT_PIN, &pin); 193 + if (ret != 0) 194 + return ret; 195 + 196 + if (!pin) 197 + return 0; 198 + 199 + ret = of_changeset_add_prop_u32(ocs, np, "#interrupt-cells", 1); 200 + if (ret) 201 + return ret; 202 + 203 + return of_changeset_add_prop_bool(ocs, np, "interrupt-controller"); 204 + } 205 + 186 206 static int of_pci_prop_intr_map(struct pci_dev *pdev, struct of_changeset *ocs, 187 207 struct device_node *np) 188 208 { ··· 354 334 return ret; 355 335 356 336 ret = of_pci_prop_intr_map(pdev, ocs, np); 337 + if (ret) 338 + return ret; 339 + } else { 340 + ret = of_pci_prop_intr_ctrl(pdev, ocs, np); 357 341 if (ret) 358 342 return ret; 359 343 }
+4 -1
include/linux/of.h
··· 1639 1639 int of_changeset_add_prop_string_array(struct of_changeset *ocs, 1640 1640 struct device_node *np, 1641 1641 const char *prop_name, 1642 - const char **str_array, size_t sz); 1642 + const char * const *str_array, size_t sz); 1643 1643 int of_changeset_add_prop_u32_array(struct of_changeset *ocs, 1644 1644 struct device_node *np, 1645 1645 const char *prop_name, ··· 1651 1651 { 1652 1652 return of_changeset_add_prop_u32_array(ocs, np, prop_name, &val, 1); 1653 1653 } 1654 + 1655 + int of_changeset_add_prop_bool(struct of_changeset *ocs, struct device_node *np, 1656 + const char *prop_name); 1654 1657 1655 1658 #else /* CONFIG_OF_DYNAMIC */ 1656 1659 static inline int of_reconfig_notifier_register(struct notifier_block *nb)
+8 -1
scripts/Makefile.lib
··· 407 407 -d $(depfile).dtc.tmp $(dtc-tmp) ; \ 408 408 cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) 409 409 410 + DT_CHECK_CMD = $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) 411 + 412 + ifneq ($(CHECK_DTBS),) 413 + quiet_cmd_fdtoverlay = DTOVLCH $@ 414 + cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(real-prereqs) ; $(DT_CHECK_CMD) $@ || true 415 + else 410 416 quiet_cmd_fdtoverlay = DTOVL $@ 411 417 cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(real-prereqs) 418 + endif 412 419 413 420 $(multi-dtb-y): FORCE 414 421 $(call if_changed,fdtoverlay) ··· 428 421 DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.json 429 422 430 423 quiet_cmd_dtb = DTC_CHK $@ 431 - cmd_dtb = $(cmd_dtc) ; $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true 424 + cmd_dtb = $(cmd_dtc) ; $(DT_CHECK_CMD) $@ || true 432 425 else 433 426 quiet_cmd_dtb = $(quiet_cmd_dtc) 434 427 cmd_dtb = $(cmd_dtc)
+48 -37
scripts/dtc/checks.c
··· 31 31 struct check { 32 32 const char *name; 33 33 check_fn fn; 34 - void *data; 34 + const void *data; 35 35 bool warn, error; 36 36 enum checkstatus status; 37 37 bool inprogress; ··· 114 114 } 115 115 116 116 fputs(str, stderr); 117 + free(str); 117 118 } 118 119 119 120 #define FAIL(c, dti, node, ...) \ ··· 208 207 struct node *node) 209 208 { 210 209 struct property *prop; 211 - char *propname = c->data; 210 + const char *propname = c->data; 212 211 213 212 prop = get_property(node, propname); 214 213 if (!prop) ··· 227 226 { 228 227 int rem, l; 229 228 struct property *prop; 230 - char *propname = c->data; 229 + const char *propname = c->data; 231 230 char *str; 232 231 233 232 prop = get_property(node, propname); ··· 255 254 struct node *node) 256 255 { 257 256 struct property *prop; 258 - char *propname = c->data; 257 + const char *propname = c->data; 259 258 260 259 prop = get_property(node, propname); 261 260 if (!prop) ··· 1079 1078 /* Ignore I2C_OWN_SLAVE_ADDRESS */ 1080 1079 reg &= ~I2C_OWN_SLAVE_ADDRESS; 1081 1080 1082 - if ((reg & I2C_TEN_BIT_ADDRESS) && ((reg & ~I2C_TEN_BIT_ADDRESS) > 0x3ff)) 1083 - FAIL_PROP(c, dti, node, prop, "I2C address must be less than 10-bits, got \"0x%x\"", 1081 + if (reg & I2C_TEN_BIT_ADDRESS) { 1082 + if ((reg & ~I2C_TEN_BIT_ADDRESS) > 0x3ff) 1083 + FAIL_PROP(c, dti, node, prop, "I2C address must be less than 10-bits, got \"0x%x\"", 1084 1084 reg); 1085 - else if (reg > 0x7f) 1085 + } else if (reg > 0x7f) 1086 1086 FAIL_PROP(c, dti, node, prop, "I2C address must be less than 7-bits, got \"0x%x\". Set I2C_TEN_BIT_ADDRESS for 10 bit addresses or fix the property", 1087 1087 reg); 1088 1088 } ··· 1110 1108 for_each_child(node, child) { 1111 1109 struct property *prop; 1112 1110 for_each_property(child, prop) { 1113 - if (strprefixeq(prop->name, 4, "spi-")) { 1111 + if (strstarts(prop->name, "spi-")) { 1114 1112 node->bus = &spi_bus; 1115 1113 break; 1116 1114 } ··· 1182 1180 /* skip over 0x for next test */ 1183 1181 unitname += 2; 1184 1182 } 1185 - if (unitname[0] == '0' && isxdigit(unitname[1])) 1183 + if (unitname[0] == '0' && isxdigit((unsigned char)unitname[1])) 1186 1184 FAIL(c, dti, node, "unit name should not have leading 0s"); 1187 1185 } 1188 1186 WARNING(unit_address_format, check_unit_address_format, NULL, ··· 1224 1222 if (!node->parent || node->addr_cells < 0 || node->size_cells < 0) 1225 1223 return; 1226 1224 1227 - if (get_property(node, "ranges") || !node->children) 1225 + if (get_property(node, "ranges") || get_property(node, "dma-ranges") || !node->children) 1228 1226 return; 1229 1227 1230 1228 for_each_child(node, child) { ··· 1234 1232 } 1235 1233 1236 1234 if (!has_reg) 1237 - FAIL(c, dti, node, "unnecessary #address-cells/#size-cells without \"ranges\" or child \"reg\" property"); 1235 + FAIL(c, dti, node, "unnecessary #address-cells/#size-cells without \"ranges\", \"dma-ranges\" or child \"reg\" property"); 1238 1236 } 1239 1237 WARNING(avoid_unnecessary_addr_size, check_avoid_unnecessary_addr_size, NULL, &avoid_default_addr_size); 1240 1238 ··· 1467 1465 struct dt_info *dti, 1468 1466 struct node *node) 1469 1467 { 1470 - struct provider *provider = c->data; 1468 + const struct provider *provider = c->data; 1471 1469 struct property *prop; 1472 1470 1473 1471 prop = get_property(node, provider->prop_name); ··· 1675 1673 parent_cellsize += propval_cell(cellprop); 1676 1674 1677 1675 cell += 1 + parent_cellsize; 1676 + if (cell > map_cells) 1677 + FAIL_PROP(c, dti, node, irq_map_prop, 1678 + "property size (%d) mismatch, expected %zu", 1679 + irq_map_prop->val.len, cell * sizeof(cell_t)); 1678 1680 } 1679 1681 } 1680 1682 WARNING(interrupt_map, check_interrupt_map, NULL, &phandle_references, &addr_size_cells, &interrupt_provider); ··· 1771 1765 get_property(child, "remote-endpoint"))) 1772 1766 continue; 1773 1767 1768 + /* The root node cannot be a port */ 1769 + if (!node->parent) { 1770 + FAIL(c, dti, node, "root node contains endpoint node '%s', potentially misplaced remote-endpoint property", child->name); 1771 + continue; 1772 + } 1774 1773 node->bus = &graph_port_bus; 1775 1774 1776 1775 /* The parent of 'port' nodes can be either 'ports' or a device */ ··· 1788 1777 1789 1778 } 1790 1779 WARNING(graph_nodes, check_graph_nodes, NULL); 1791 - 1792 - static void check_graph_child_address(struct check *c, struct dt_info *dti, 1793 - struct node *node) 1794 - { 1795 - int cnt = 0; 1796 - struct node *child; 1797 - 1798 - if (node->bus != &graph_ports_bus && node->bus != &graph_port_bus) 1799 - return; 1800 - 1801 - for_each_child(node, child) { 1802 - struct property *prop = get_property(child, "reg"); 1803 - 1804 - /* No error if we have any non-zero unit address */ 1805 - if (prop && propval_cell(prop) != 0) 1806 - return; 1807 - 1808 - cnt++; 1809 - } 1810 - 1811 - if (cnt == 1 && node->addr_cells != -1) 1812 - FAIL(c, dti, node, "graph node has single child node '%s', #address-cells/#size-cells are not necessary", 1813 - node->children->name); 1814 - } 1815 - WARNING(graph_child_address, check_graph_child_address, NULL, &graph_nodes); 1816 1780 1817 1781 static void check_graph_reg(struct check *c, struct dt_info *dti, 1818 1782 struct node *node) ··· 1878 1892 remote_node->fullpath); 1879 1893 } 1880 1894 WARNING(graph_endpoint, check_graph_endpoint, NULL, &graph_nodes); 1895 + 1896 + static void check_graph_child_address(struct check *c, struct dt_info *dti, 1897 + struct node *node) 1898 + { 1899 + int cnt = 0; 1900 + struct node *child; 1901 + 1902 + if (node->bus != &graph_ports_bus && node->bus != &graph_port_bus) 1903 + return; 1904 + 1905 + for_each_child(node, child) { 1906 + struct property *prop = get_property(child, "reg"); 1907 + 1908 + /* No error if we have any non-zero unit address */ 1909 + if (prop && propval_cell(prop) != 0 ) 1910 + return; 1911 + 1912 + cnt++; 1913 + } 1914 + 1915 + if (cnt == 1 && node->addr_cells != -1) 1916 + FAIL(c, dti, node, "graph node has single child node '%s', #address-cells/#size-cells are not necessary", 1917 + node->children->name); 1918 + } 1919 + WARNING(graph_child_address, check_graph_child_address, NULL, &graph_nodes, &graph_port, &graph_endpoint); 1881 1920 1882 1921 static struct check *check_table[] = { 1883 1922 &duplicate_node_names, &duplicate_property_names,
+5
scripts/dtc/dtc-parser.y
··· 284 284 DT_PROPNODENAME '=' propdata ';' 285 285 { 286 286 $$ = build_property($1, $3, &@$); 287 + free($1); 287 288 } 288 289 | DT_PROPNODENAME ';' 289 290 { 290 291 $$ = build_property($1, empty_data, &@$); 292 + free($1); 291 293 } 292 294 | DT_DEL_PROP DT_PROPNODENAME ';' 293 295 { 294 296 $$ = build_property_delete($2); 297 + free($2); 295 298 } 296 299 | DT_LABEL propdef 297 300 { ··· 573 570 DT_PROPNODENAME nodedef 574 571 { 575 572 $$ = name_node($2, $1); 573 + free($1); 576 574 } 577 575 | DT_DEL_NODE DT_PROPNODENAME ';' 578 576 { 579 577 $$ = name_node(build_node_delete(&@$), $2); 578 + free($2); 580 579 } 581 580 | DT_OMIT_NO_REF subnode 582 581 {
+8 -1
scripts/dtc/dtc.c
··· 47 47 48 48 /* Usage related data. */ 49 49 static const char usage_synopsis[] = "dtc [options] <input file>"; 50 - static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:a:fb:i:H:sW:E:@AThv"; 50 + static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:a:fb:i:H:sW:E:@LAThv"; 51 51 static struct option const usage_long_opts[] = { 52 52 {"quiet", no_argument, NULL, 'q'}, 53 53 {"in-format", a_argument, NULL, 'I'}, ··· 67 67 {"warning", a_argument, NULL, 'W'}, 68 68 {"error", a_argument, NULL, 'E'}, 69 69 {"symbols", no_argument, NULL, '@'}, 70 + {"local-fixups", no_argument, NULL, 'L'}, 70 71 {"auto-alias", no_argument, NULL, 'A'}, 71 72 {"annotate", no_argument, NULL, 'T'}, 72 73 {"help", no_argument, NULL, 'h'}, ··· 105 104 "\n\tEnable/disable warnings (prefix with \"no-\")", 106 105 "\n\tEnable/disable errors (prefix with \"no-\")", 107 106 "\n\tEnable generation of symbols", 107 + "\n\tPossibly generates a __local_fixups__ and a __fixups__ node at the root node", 108 108 "\n\tEnable auto-alias of labels", 109 109 "\n\tAnnotate output .dts with input source file and line (-T -T for more details)", 110 110 "\n\tPrint this help and exit", ··· 254 252 case '@': 255 253 generate_symbols = 1; 256 254 break; 255 + 256 + case 'L': 257 + generate_fixups = 1; 258 + break; 259 + 257 260 case 'A': 258 261 auto_label_aliases = 1; 259 262 break;
+6 -6
scripts/dtc/dtc.h
··· 260 260 void add_label(struct label **labels, char *label); 261 261 void delete_labels(struct label **labels); 262 262 263 - struct property *build_property(char *name, struct data val, 263 + struct property *build_property(const char *name, struct data val, 264 264 struct srcpos *srcpos); 265 - struct property *build_property_delete(char *name); 265 + struct property *build_property_delete(const char *name); 266 266 struct property *chain_property(struct property *first, struct property *list); 267 267 struct property *reverse_properties(struct property *first); 268 268 269 269 struct node *build_node(struct property *proplist, struct node *children, 270 270 struct srcpos *srcpos); 271 271 struct node *build_node_delete(struct srcpos *srcpos); 272 - struct node *name_node(struct node *node, char *name); 272 + struct node *name_node(struct node *node, const char *name); 273 273 struct node *omit_node_if_unused(struct node *node); 274 274 struct node *reference_node(struct node *node); 275 275 struct node *chain_node(struct node *first, struct node *list); ··· 336 336 struct reserve_info *reservelist, 337 337 struct node *tree, uint32_t boot_cpuid_phys); 338 338 void sort_tree(struct dt_info *dti); 339 - void generate_label_tree(struct dt_info *dti, char *name, bool allocph); 340 - void generate_fixups_tree(struct dt_info *dti, char *name); 341 - void generate_local_fixups_tree(struct dt_info *dti, char *name); 339 + void generate_label_tree(struct dt_info *dti, const char *name, bool allocph); 340 + void generate_fixups_tree(struct dt_info *dti, const char *name); 341 + void generate_local_fixups_tree(struct dt_info *dti, const char *name); 342 342 343 343 /* Checks */ 344 344
+2 -4
scripts/dtc/fdtoverlay.c
··· 23 23 /* Usage related data. */ 24 24 static const char usage_synopsis[] = 25 25 "apply a number of overlays to a base blob\n" 26 - " fdtoverlay <options> [<overlay.dtbo> [<overlay.dtbo>]]\n" 27 - "\n" 28 - USAGE_TYPE_MSG; 26 + " fdtoverlay <options> [<overlay.dtbo> [<overlay.dtbo>]]"; 29 27 static const char usage_short_opts[] = "i:o:v" USAGE_COMMON_SHORT_OPTS; 30 28 static struct option const usage_long_opts[] = { 31 29 {"input", required_argument, NULL, 'i'}, ··· 48 50 int ret; 49 51 50 52 /* 51 - * We take a copies first, because a a failed apply can trash 53 + * We take a copies first, because a failed apply can trash 52 54 * both the base blob and the overlay 53 55 */ 54 56 tmpo = xmalloc(fdt_totalsize(overlay));
+9 -12
scripts/dtc/flattree.c
··· 604 604 die("Premature end of data parsing flat device tree\n"); 605 605 } 606 606 607 - static char *flat_read_string(struct inbuf *inb) 607 + static const char *flat_read_string(struct inbuf *inb) 608 608 { 609 609 int len = 0; 610 610 const char *p = inb->ptr; 611 - char *str; 611 + const char *str; 612 612 613 613 do { 614 614 if (p >= inb->limit) ··· 616 616 len++; 617 617 } while ((*p++) != '\0'); 618 618 619 - str = xstrdup(inb->ptr); 619 + str = inb->ptr; 620 620 621 621 inb->ptr += len; 622 622 ··· 711 711 } 712 712 713 713 714 - static char *nodename_from_path(const char *ppath, const char *cpath) 714 + static const char *nodename_from_path(const char *ppath, const char *cpath) 715 715 { 716 716 int plen; 717 717 ··· 725 725 if (!streq(ppath, "/")) 726 726 plen++; 727 727 728 - return xstrdup(cpath + plen); 728 + return cpath + plen; 729 729 } 730 730 731 731 static struct node *unflatten_tree(struct inbuf *dtbuf, ··· 733 733 const char *parent_flatname, int flags) 734 734 { 735 735 struct node *node; 736 - char *flatname; 736 + const char *flatname; 737 737 uint32_t val; 738 738 739 739 node = build_node(NULL, NULL, NULL); ··· 741 741 flatname = flat_read_string(dtbuf); 742 742 743 743 if (flags & FTF_FULLPATH) 744 - node->name = nodename_from_path(parent_flatname, flatname); 744 + node->name = xstrdup(nodename_from_path(parent_flatname, 745 + flatname)); 745 746 else 746 - node->name = flatname; 747 + node->name = xstrdup(flatname); 747 748 748 749 do { 749 750 struct property *prop; ··· 785 784 val); 786 785 } 787 786 } while (val != FDT_END_NODE); 788 - 789 - if (node->name != flatname) { 790 - free(flatname); 791 - } 792 787 793 788 return node; 794 789 }
+1 -1
scripts/dtc/fstree.c
··· 43 43 "WARNING: Cannot open %s: %s\n", 44 44 tmpname, strerror(errno)); 45 45 } else { 46 - prop = build_property(xstrdup(de->d_name), 46 + prop = build_property(de->d_name, 47 47 data_copy_file(pfile, 48 48 st.st_size), 49 49 NULL);
+292 -57
scripts/dtc/libfdt/fdt_overlay.c
··· 101 101 static int overlay_phandle_add_offset(void *fdt, int node, 102 102 const char *name, uint32_t delta) 103 103 { 104 - const fdt32_t *val; 105 - uint32_t adj_val; 104 + fdt32_t *valp, val; 106 105 int len; 107 106 108 - val = fdt_getprop(fdt, node, name, &len); 109 - if (!val) 107 + valp = fdt_getprop_w(fdt, node, name, &len); 108 + if (!valp) 110 109 return len; 111 110 112 - if (len != sizeof(*val)) 111 + if (len != sizeof(val)) 113 112 return -FDT_ERR_BADPHANDLE; 114 113 115 - adj_val = fdt32_to_cpu(*val); 116 - if ((adj_val + delta) < adj_val) 114 + val = fdt32_ld(valp); 115 + if (val + delta < val || val + delta == (uint32_t)-1) 117 116 return -FDT_ERR_NOPHANDLES; 118 117 119 - adj_val += delta; 120 - if (adj_val == (uint32_t)-1) 121 - return -FDT_ERR_NOPHANDLES; 122 - 123 - return fdt_setprop_inplace_u32(fdt, node, name, adj_val); 118 + fdt32_st(valp, val + delta); 119 + return 0; 124 120 } 125 121 126 122 /** ··· 209 213 210 214 fdt_for_each_property_offset(fixup_prop, fdto, fixup_node) { 211 215 const fdt32_t *fixup_val; 212 - const char *tree_val; 213 216 const char *name; 217 + char *tree_val; 214 218 int fixup_len; 215 219 int tree_len; 216 220 int i; ··· 224 228 return -FDT_ERR_BADOVERLAY; 225 229 fixup_len /= sizeof(uint32_t); 226 230 227 - tree_val = fdt_getprop(fdto, tree_node, name, &tree_len); 231 + tree_val = fdt_getprop_w(fdto, tree_node, name, &tree_len); 228 232 if (!tree_val) { 229 233 if (tree_len == -FDT_ERR_NOTFOUND) 230 234 return -FDT_ERR_BADOVERLAY; ··· 233 237 } 234 238 235 239 for (i = 0; i < fixup_len; i++) { 236 - fdt32_t adj_val; 237 - uint32_t poffset; 240 + fdt32_t *refp; 238 241 239 - poffset = fdt32_to_cpu(fixup_val[i]); 242 + refp = (fdt32_t *)(tree_val + fdt32_ld_(fixup_val + i)); 240 243 241 244 /* 242 - * phandles to fixup can be unaligned. 243 - * 244 - * Use a memcpy for the architectures that do 245 - * not support unaligned accesses. 245 + * phandles to fixup can be unaligned, so use 246 + * fdt32_{ld,st}() to read/write them. 246 247 */ 247 - memcpy(&adj_val, tree_val + poffset, sizeof(adj_val)); 248 - 249 - adj_val = cpu_to_fdt32(fdt32_to_cpu(adj_val) + delta); 250 - 251 - ret = fdt_setprop_inplace_namelen_partial(fdto, 252 - tree_node, 253 - name, 254 - strlen(name), 255 - poffset, 256 - &adj_val, 257 - sizeof(adj_val)); 258 - if (ret == -FDT_ERR_NOSPACE) 259 - return -FDT_ERR_BADOVERLAY; 260 - 261 - if (ret) 262 - return ret; 248 + fdt32_st(refp, fdt32_ld(refp) + delta); 263 249 } 264 250 } 265 251 ··· 315 337 * @name: Name of the property holding the phandle reference in the overlay 316 338 * @name_len: number of name characters to consider 317 339 * @poffset: Offset within the overlay property where the phandle is stored 318 - * @label: Label of the node referenced by the phandle 340 + * @phandle: Phandle referencing the node 319 341 * 320 342 * overlay_fixup_one_phandle() resolves an overlay phandle pointing to 321 343 * a node in the base device tree. ··· 332 354 int symbols_off, 333 355 const char *path, uint32_t path_len, 334 356 const char *name, uint32_t name_len, 335 - int poffset, const char *label) 357 + int poffset, uint32_t phandle) 336 358 { 337 - const char *symbol_path; 338 - uint32_t phandle; 339 359 fdt32_t phandle_prop; 340 - int symbol_off, fixup_off; 341 - int prop_len; 360 + int fixup_off; 342 361 343 362 if (symbols_off < 0) 344 363 return symbols_off; 345 - 346 - symbol_path = fdt_getprop(fdt, symbols_off, label, 347 - &prop_len); 348 - if (!symbol_path) 349 - return prop_len; 350 - 351 - symbol_off = fdt_path_offset(fdt, symbol_path); 352 - if (symbol_off < 0) 353 - return symbol_off; 354 - 355 - phandle = fdt_get_phandle(fdt, symbol_off); 356 - if (!phandle) 357 - return -FDT_ERR_NOTFOUND; 358 364 359 365 fixup_off = fdt_path_offset_namelen(fdto, path, path_len); 360 366 if (fixup_off == -FDT_ERR_NOTFOUND) ··· 378 416 const char *value; 379 417 const char *label; 380 418 int len; 419 + const char *symbol_path; 420 + int prop_len; 421 + int symbol_off; 422 + uint32_t phandle; 381 423 382 424 value = fdt_getprop_by_offset(fdto, property, 383 425 &label, &len); ··· 391 425 392 426 return len; 393 427 } 428 + 429 + symbol_path = fdt_getprop(fdt, symbols_off, label, &prop_len); 430 + if (!symbol_path) 431 + return prop_len; 432 + 433 + symbol_off = fdt_path_offset(fdt, symbol_path); 434 + if (symbol_off < 0) 435 + return symbol_off; 436 + 437 + phandle = fdt_get_phandle(fdt, symbol_off); 438 + if (!phandle) 439 + return -FDT_ERR_NOTFOUND; 394 440 395 441 do { 396 442 const char *path, *name, *fixup_end; ··· 445 467 446 468 ret = overlay_fixup_one_phandle(fdt, fdto, symbols_off, 447 469 path, path_len, name, name_len, 448 - poffset, label); 470 + poffset, phandle); 449 471 if (ret) 450 472 return ret; 451 473 } while (len > 0); ··· 491 513 int ret; 492 514 493 515 ret = overlay_fixup_phandle(fdt, fdto, symbols_off, property); 516 + if (ret) 517 + return ret; 518 + } 519 + 520 + return 0; 521 + } 522 + 523 + /** 524 + * overlay_adjust_local_conflicting_phandle: Changes a phandle value 525 + * @fdto: Device tree overlay 526 + * @node: The node the phandle is set for 527 + * @fdt_phandle: The new value for the phandle 528 + * 529 + * returns: 530 + * 0 on success 531 + * Negative error code on failure 532 + */ 533 + static int overlay_adjust_local_conflicting_phandle(void *fdto, int node, 534 + uint32_t fdt_phandle) 535 + { 536 + const fdt32_t *php; 537 + int len, ret; 538 + 539 + php = fdt_getprop(fdto, node, "phandle", &len); 540 + if (php && len == sizeof(*php)) { 541 + ret = fdt_setprop_inplace_u32(fdto, node, "phandle", fdt_phandle); 542 + if (ret) 543 + return ret; 544 + } 545 + 546 + php = fdt_getprop(fdto, node, "linux,phandle", &len); 547 + if (php && len == sizeof(*php)) { 548 + ret = fdt_setprop_inplace_u32(fdto, node, "linux,phandle", fdt_phandle); 549 + if (ret) 550 + return ret; 551 + } 552 + 553 + return 0; 554 + } 555 + 556 + /** 557 + * overlay_update_node_conflicting_references - Recursively replace phandle values 558 + * @fdto: Device tree overlay blob 559 + * @tree_node: Node to recurse into 560 + * @fixup_node: Node offset of the matching local fixups node 561 + * @fdt_phandle: Value to replace phandles with 562 + * @fdto_phandle: Value to be replaced 563 + * 564 + * Replaces all phandles with value @fdto_phandle by @fdt_phandle. 565 + * 566 + * returns: 567 + * 0 on success 568 + * Negative error code on failure 569 + */ 570 + static int overlay_update_node_conflicting_references(void *fdto, int tree_node, 571 + int fixup_node, 572 + uint32_t fdt_phandle, 573 + uint32_t fdto_phandle) 574 + { 575 + int fixup_prop; 576 + int fixup_child; 577 + int ret; 578 + 579 + fdt_for_each_property_offset(fixup_prop, fdto, fixup_node) { 580 + const fdt32_t *fixup_val; 581 + const char *name; 582 + char *tree_val; 583 + int fixup_len; 584 + int tree_len; 585 + int i; 586 + 587 + fixup_val = fdt_getprop_by_offset(fdto, fixup_prop, 588 + &name, &fixup_len); 589 + if (!fixup_val) 590 + return fixup_len; 591 + 592 + if (fixup_len % sizeof(uint32_t)) 593 + return -FDT_ERR_BADOVERLAY; 594 + fixup_len /= sizeof(uint32_t); 595 + 596 + tree_val = fdt_getprop_w(fdto, tree_node, name, &tree_len); 597 + if (!tree_val) { 598 + if (tree_len == -FDT_ERR_NOTFOUND) 599 + return -FDT_ERR_BADOVERLAY; 600 + 601 + return tree_len; 602 + } 603 + 604 + for (i = 0; i < fixup_len; i++) { 605 + fdt32_t *refp; 606 + uint32_t valp; 607 + 608 + refp = (fdt32_t *)(tree_val + fdt32_ld_(fixup_val + i)); 609 + valp = fdt32_ld(refp); 610 + 611 + if (valp == fdto_phandle) 612 + fdt32_st(refp, fdt_phandle); 613 + } 614 + } 615 + 616 + fdt_for_each_subnode(fixup_child, fdto, fixup_node) { 617 + const char *fixup_child_name = fdt_get_name(fdto, fixup_child, NULL); 618 + int tree_child; 619 + 620 + tree_child = fdt_subnode_offset(fdto, tree_node, fixup_child_name); 621 + 622 + if (tree_child == -FDT_ERR_NOTFOUND) 623 + return -FDT_ERR_BADOVERLAY; 624 + if (tree_child < 0) 625 + return tree_child; 626 + 627 + ret = overlay_update_node_conflicting_references(fdto, tree_child, 628 + fixup_child, 629 + fdt_phandle, 630 + fdto_phandle); 631 + if (ret) 632 + return ret; 633 + } 634 + 635 + return 0; 636 + } 637 + 638 + /** 639 + * overlay_update_local_conflicting_references - Recursively replace phandle values 640 + * @fdto: Device tree overlay blob 641 + * @fdt_phandle: Value to replace phandles with 642 + * @fdto_phandle: Value to be replaced 643 + * 644 + * Replaces all phandles with value @fdto_phandle by @fdt_phandle. 645 + * 646 + * returns: 647 + * 0 on success 648 + * Negative error code on failure 649 + */ 650 + static int overlay_update_local_conflicting_references(void *fdto, 651 + uint32_t fdt_phandle, 652 + uint32_t fdto_phandle) 653 + { 654 + int fixups; 655 + 656 + fixups = fdt_path_offset(fdto, "/__local_fixups__"); 657 + if (fixups == -FDT_ERR_NOTFOUND) 658 + return 0; 659 + if (fixups < 0) 660 + return fixups; 661 + 662 + return overlay_update_node_conflicting_references(fdto, 0, fixups, 663 + fdt_phandle, 664 + fdto_phandle); 665 + } 666 + 667 + /** 668 + * overlay_prevent_phandle_overwrite_node - Helper function for overlay_prevent_phandle_overwrite 669 + * @fdt: Base Device tree blob 670 + * @fdtnode: Node in fdt that is checked for an overwrite 671 + * @fdto: Device tree overlay blob 672 + * @fdtonode: Node in fdto matching @fdtnode 673 + * 674 + * returns: 675 + * 0 on success 676 + * Negative error code on failure 677 + */ 678 + static int overlay_prevent_phandle_overwrite_node(void *fdt, int fdtnode, 679 + void *fdto, int fdtonode) 680 + { 681 + uint32_t fdt_phandle, fdto_phandle; 682 + int fdtochild; 683 + 684 + fdt_phandle = fdt_get_phandle(fdt, fdtnode); 685 + fdto_phandle = fdt_get_phandle(fdto, fdtonode); 686 + 687 + if (fdt_phandle && fdto_phandle) { 688 + int ret; 689 + 690 + ret = overlay_adjust_local_conflicting_phandle(fdto, fdtonode, 691 + fdt_phandle); 692 + if (ret) 693 + return ret; 694 + 695 + ret = overlay_update_local_conflicting_references(fdto, 696 + fdt_phandle, 697 + fdto_phandle); 698 + if (ret) 699 + return ret; 700 + } 701 + 702 + fdt_for_each_subnode(fdtochild, fdto, fdtonode) { 703 + const char *name = fdt_get_name(fdto, fdtochild, NULL); 704 + int fdtchild; 705 + int ret; 706 + 707 + fdtchild = fdt_subnode_offset(fdt, fdtnode, name); 708 + if (fdtchild == -FDT_ERR_NOTFOUND) 709 + /* 710 + * no further overwrites possible here as this node is 711 + * new 712 + */ 713 + continue; 714 + 715 + ret = overlay_prevent_phandle_overwrite_node(fdt, fdtchild, 716 + fdto, fdtochild); 717 + if (ret) 718 + return ret; 719 + } 720 + 721 + return 0; 722 + } 723 + 724 + /** 725 + * overlay_prevent_phandle_overwrite - Fixes overlay phandles to not overwrite base phandles 726 + * @fdt: Base Device Tree blob 727 + * @fdto: Device tree overlay blob 728 + * 729 + * Checks recursively if applying fdto overwrites phandle values in the base 730 + * dtb. When such a phandle is found, the fdto is changed to use the fdt's 731 + * phandle value to not break references in the base. 732 + * 733 + * returns: 734 + * 0 on success 735 + * Negative error code on failure 736 + */ 737 + static int overlay_prevent_phandle_overwrite(void *fdt, void *fdto) 738 + { 739 + int fragment; 740 + 741 + fdt_for_each_subnode(fragment, fdto, 0) { 742 + int overlay; 743 + int target; 744 + int ret; 745 + 746 + overlay = fdt_subnode_offset(fdto, fragment, "__overlay__"); 747 + if (overlay == -FDT_ERR_NOTFOUND) 748 + continue; 749 + 750 + if (overlay < 0) 751 + return overlay; 752 + 753 + target = fdt_overlay_target_offset(fdt, fdto, fragment, NULL); 754 + if (target == -FDT_ERR_NOTFOUND) 755 + /* 756 + * The subtree doesn't exist in the base, so nothing 757 + * will be overwritten. 758 + */ 759 + continue; 760 + else if (target < 0) 761 + return target; 762 + 763 + ret = overlay_prevent_phandle_overwrite_node(fdt, target, 764 + fdto, overlay); 494 765 if (ret) 495 766 return ret; 496 767 } ··· 1051 824 if (ret) 1052 825 goto err; 1053 826 827 + /* Increase all phandles in the fdto by delta */ 1054 828 ret = overlay_adjust_local_phandles(fdto, delta); 1055 829 if (ret) 1056 830 goto err; 1057 831 832 + /* Adapt the phandle values in fdto to the above increase */ 1058 833 ret = overlay_update_local_references(fdto, delta); 1059 834 if (ret) 1060 835 goto err; 1061 836 837 + /* Update fdto's phandles using symbols from fdt */ 1062 838 ret = overlay_fixup_phandles(fdt, fdto); 839 + if (ret) 840 + goto err; 841 + 842 + /* Don't overwrite phandles in fdt */ 843 + ret = overlay_prevent_phandle_overwrite(fdt, fdto); 1063 844 if (ret) 1064 845 goto err; 1065 846
+33 -4
scripts/dtc/libfdt/fdt_ro.c
··· 255 255 256 256 FDT_RO_PROBE(fdt); 257 257 258 + if (!can_assume(VALID_INPUT) && namelen <= 0) 259 + return -FDT_ERR_BADPATH; 260 + 258 261 /* see if we have an alias */ 259 262 if (*path != '/') { 260 263 const char *q = memchr(path, '/', end - p); ··· 525 522 return fdt32_ld_(php); 526 523 } 527 524 525 + static const void *fdt_path_getprop_namelen(const void *fdt, const char *path, 526 + const char *propname, int propnamelen, 527 + int *lenp) 528 + { 529 + int offset = fdt_path_offset(fdt, path); 530 + 531 + if (offset < 0) 532 + return NULL; 533 + 534 + return fdt_getprop_namelen(fdt, offset, propname, propnamelen, lenp); 535 + } 536 + 528 537 const char *fdt_get_alias_namelen(const void *fdt, 529 538 const char *name, int namelen) 530 539 { 531 - int aliasoffset; 540 + int len; 541 + const char *alias; 532 542 533 - aliasoffset = fdt_path_offset(fdt, "/aliases"); 534 - if (aliasoffset < 0) 543 + alias = fdt_path_getprop_namelen(fdt, "/aliases", name, namelen, &len); 544 + 545 + if (!can_assume(VALID_DTB) && 546 + !(alias && len > 0 && alias[len - 1] == '\0' && *alias == '/')) 535 547 return NULL; 536 548 537 - return fdt_getprop_namelen(fdt, aliasoffset, name, namelen, NULL); 549 + return alias; 538 550 } 539 551 540 552 const char *fdt_get_alias(const void *fdt, const char *name) 541 553 { 542 554 return fdt_get_alias_namelen(fdt, name, strlen(name)); 555 + } 556 + 557 + const char *fdt_get_symbol_namelen(const void *fdt, 558 + const char *name, int namelen) 559 + { 560 + return fdt_path_getprop_namelen(fdt, "/__symbols__", name, namelen, NULL); 561 + } 562 + 563 + const char *fdt_get_symbol(const void *fdt, const char *name) 564 + { 565 + return fdt_get_symbol_namelen(fdt, name, strlen(name)); 543 566 } 544 567 545 568 int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen)
+64 -3
scripts/dtc/libfdt/libfdt.h
··· 524 524 * level matching the given component, differentiated only by unit 525 525 * address). 526 526 * 527 + * If the path is not absolute (i.e. does not begin with '/'), the 528 + * first component is treated as an alias. That is, the property by 529 + * that name is looked up in the /aliases node, and the value of that 530 + * property used in place of that first component. 531 + * 532 + * For example, for this small fragment 533 + * 534 + * / { 535 + * aliases { 536 + * i2c2 = &foo; // RHS compiles to "/soc@0/i2c@30a40000/eeprom@52" 537 + * }; 538 + * soc@0 { 539 + * foo: i2c@30a40000 { 540 + * bar: eeprom@52 { 541 + * }; 542 + * }; 543 + * }; 544 + * }; 545 + * 546 + * these would be equivalent: 547 + * 548 + * /soc@0/i2c@30a40000/eeprom@52 549 + * i2c2/eeprom@52 550 + * 527 551 * returns: 528 552 * structure block offset of the node with the requested path (>=0), on 529 553 * success 530 - * -FDT_ERR_BADPATH, given path does not begin with '/' or is invalid 554 + * -FDT_ERR_BADPATH, given path does not begin with '/' and the first 555 + * component is not a valid alias 531 556 * -FDT_ERR_NOTFOUND, if the requested node does not exist 532 557 * -FDT_ERR_BADMAGIC, 533 558 * -FDT_ERR_BADVERSION, ··· 893 868 * NULL, if the given alias or the /aliases node does not exist 894 869 */ 895 870 const char *fdt_get_alias(const void *fdt, const char *name); 871 + 872 + /** 873 + * fdt_get_symbol_namelen - get symbol based on substring 874 + * @fdt: pointer to the device tree blob 875 + * @name: name of the symbol to look up 876 + * @namelen: number of characters of name to consider 877 + * 878 + * Identical to fdt_get_symbol(), but only examine the first @namelen 879 + * characters of @name for matching the symbol name. 880 + * 881 + * Return: a pointer to the expansion of the symbol named @name, if it exists, 882 + * NULL otherwise 883 + */ 884 + #ifndef SWIG /* Not available in Python */ 885 + const char *fdt_get_symbol_namelen(const void *fdt, 886 + const char *name, int namelen); 887 + #endif 888 + 889 + /** 890 + * fdt_get_symbol - retrieve the path referenced by a given symbol 891 + * @fdt: pointer to the device tree blob 892 + * @name: name of the symbol to look up 893 + * 894 + * fdt_get_symbol() retrieves the value of a given symbol. That is, 895 + * the value of the property named @name in the node 896 + * /__symbols__. Such a node exists only for a device tree blob that 897 + * has been compiled with the -@ dtc option. Each property corresponds 898 + * to a label appearing in the device tree source, with the name of 899 + * the property being the label and the value being the full path of 900 + * the node it is attached to. 901 + * 902 + * returns: 903 + * a pointer to the expansion of the symbol named 'name', if it exists 904 + * NULL, if the given symbol or the /__symbols__ node does not exist 905 + */ 906 + const char *fdt_get_symbol(const void *fdt, const char *name); 896 907 897 908 /** 898 909 * fdt_get_path - determine the full path of a node ··· 1511 1450 * fdt_create_with_flags() begins the process of creating a new fdt with 1512 1451 * the sequential write interface. 1513 1452 * 1514 - * fdt creation process must end with fdt_finished() to produce a valid fdt. 1453 + * fdt creation process must end with fdt_finish() to produce a valid fdt. 1515 1454 * 1516 1455 * returns: 1517 1456 * 0, on success ··· 2029 1968 * address and size) to the value of the named property in the given 2030 1969 * node, or creates a new property with that value if it does not 2031 1970 * already exist. 2032 - * If "name" is not specified, a default "reg" is used. 1971 + * 2033 1972 * Cell sizes are determined by parent's #address-cells and #size-cells. 2034 1973 * 2035 1974 * This function may insert data into the blob, and will therefore
+32 -24
scripts/dtc/livetree.c
··· 36 36 label->deleted = 1; 37 37 } 38 38 39 - struct property *build_property(char *name, struct data val, 39 + struct property *build_property(const char *name, struct data val, 40 40 struct srcpos *srcpos) 41 41 { 42 42 struct property *new = xmalloc(sizeof(*new)); 43 43 44 44 memset(new, 0, sizeof(*new)); 45 45 46 - new->name = name; 46 + new->name = xstrdup(name); 47 47 new->val = val; 48 48 new->srcpos = srcpos_copy(srcpos); 49 49 50 50 return new; 51 51 } 52 52 53 - struct property *build_property_delete(char *name) 53 + struct property *build_property_delete(const char *name) 54 54 { 55 55 struct property *new = xmalloc(sizeof(*new)); 56 56 57 57 memset(new, 0, sizeof(*new)); 58 58 59 - new->name = name; 59 + new->name = xstrdup(name); 60 60 new->deleted = 1; 61 61 62 62 return new; ··· 116 116 return new; 117 117 } 118 118 119 - struct node *name_node(struct node *node, char *name) 119 + struct node *name_node(struct node *node, const char *name) 120 120 { 121 121 assert(node->name == NULL); 122 122 123 - node->name = name; 123 + node->name = xstrdup(name); 124 124 125 125 return node; 126 126 } ··· 250 250 name_node(new_node, "__overlay__"); 251 251 node = build_node(p, new_node, NULL); 252 252 name_node(node, name); 253 + free(name); 253 254 254 255 add_child(dt, node); 255 256 return dt; ··· 441 440 442 441 cell_t propval_cell_n(struct property *prop, unsigned int n) 443 442 { 444 - assert(prop->val.len / sizeof(cell_t) >= n); 443 + assert(prop->val.len / sizeof(cell_t) > n); 445 444 return fdt32_to_cpu(*((fdt32_t *)prop->val.val + n)); 446 445 } 447 446 ··· 617 616 return target; 618 617 } 619 618 619 + static void add_phandle_property(struct node *node, 620 + const char *name, int format) 621 + { 622 + struct data d; 623 + 624 + if (!(phandle_format & format)) 625 + return; 626 + if (get_property(node, name)) 627 + return; 628 + 629 + d = data_add_marker(empty_data, TYPE_UINT32, NULL); 630 + d = data_append_cell(d, node->phandle); 631 + 632 + add_property(node, build_property(name, d, NULL)); 633 + } 634 + 620 635 cell_t get_node_phandle(struct node *root, struct node *node) 621 636 { 622 637 static cell_t phandle = 1; /* FIXME: ick, static local */ 623 - struct data d = empty_data; 624 638 625 639 if (phandle_is_valid(node->phandle)) 626 640 return node->phandle; ··· 645 629 646 630 node->phandle = phandle; 647 631 648 - d = data_add_marker(d, TYPE_UINT32, NULL); 649 - d = data_append_cell(d, phandle); 650 - 651 - if (!get_property(node, "linux,phandle") 652 - && (phandle_format & PHANDLE_LEGACY)) 653 - add_property(node, build_property("linux,phandle", d, NULL)); 654 - 655 - if (!get_property(node, "phandle") 656 - && (phandle_format & PHANDLE_EPAPR)) 657 - add_property(node, build_property("phandle", d, NULL)); 632 + add_phandle_property(node, "linux,phandle", PHANDLE_LEGACY); 633 + add_phandle_property(node, "phandle", PHANDLE_EPAPR); 658 634 659 635 /* If the node *does* have a phandle property, we must 660 636 * be dealing with a self-referencing phandle, which will be ··· 816 808 } 817 809 818 810 /* utility helper to avoid code duplication */ 819 - static struct node *build_and_name_child_node(struct node *parent, char *name) 811 + static struct node *build_and_name_child_node(struct node *parent, const char *name) 820 812 { 821 813 struct node *node; 822 814 823 815 node = build_node(NULL, NULL, NULL); 824 - name_node(node, xstrdup(name)); 816 + name_node(node, name); 825 817 add_child(parent, node); 826 818 827 819 return node; 828 820 } 829 821 830 - static struct node *build_root_node(struct node *dt, char *name) 822 + static struct node *build_root_node(struct node *dt, const char *name) 831 823 { 832 824 struct node *an; 833 825 ··· 1048 1040 generate_local_fixups_tree_internal(dti, lfn, c); 1049 1041 } 1050 1042 1051 - void generate_label_tree(struct dt_info *dti, char *name, bool allocph) 1043 + void generate_label_tree(struct dt_info *dti, const char *name, bool allocph) 1052 1044 { 1053 1045 if (!any_label_tree(dti, dti->dt)) 1054 1046 return; ··· 1056 1048 dti->dt, allocph); 1057 1049 } 1058 1050 1059 - void generate_fixups_tree(struct dt_info *dti, char *name) 1051 + void generate_fixups_tree(struct dt_info *dti, const char *name) 1060 1052 { 1061 1053 if (!any_fixup_tree(dti, dti->dt)) 1062 1054 return; ··· 1064 1056 dti->dt); 1065 1057 } 1066 1058 1067 - void generate_local_fixups_tree(struct dt_info *dti, char *name) 1059 + void generate_local_fixups_tree(struct dt_info *dti, const char *name) 1068 1060 { 1069 1061 if (!any_local_fixup_tree(dti, dti->dt)) 1070 1062 return;
+8 -6
scripts/dtc/srcpos.c
··· 3 3 * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc. 4 4 */ 5 5 6 + #ifndef _GNU_SOURCE 6 7 #define _GNU_SOURCE 8 + #endif 7 9 8 10 #include <stdio.h> 9 11 ··· 313 311 static char * 314 312 srcpos_string_comment(struct srcpos *pos, bool first_line, int level) 315 313 { 316 - char *pos_str, *fname, *first, *rest; 317 - bool fresh_fname = false; 314 + char *pos_str, *fresh_fname = NULL, *first, *rest; 315 + const char *fname; 318 316 319 317 if (!pos) { 320 318 if (level > 1) { ··· 332 330 else if (level > 1) 333 331 fname = pos->file->name; 334 332 else { 335 - fname = shorten_to_initial_path(pos->file->name); 336 - if (fname) 337 - fresh_fname = true; 333 + fresh_fname = shorten_to_initial_path(pos->file->name); 334 + if (fresh_fname) 335 + fname = fresh_fname; 338 336 else 339 337 fname = pos->file->name; 340 338 } ··· 348 346 first_line ? pos->first_line : pos->last_line); 349 347 350 348 if (fresh_fname) 351 - free(fname); 349 + free(fresh_fname); 352 350 353 351 if (pos->next != NULL) { 354 352 rest = srcpos_string_comment(pos->next, first_line, level);
+26
scripts/dtc/treesource.c
··· 139 139 [TYPE_STRING] = "", 140 140 }; 141 141 142 + static void add_string_markers(struct property *prop) 143 + { 144 + int l, len = prop->val.len; 145 + const char *p = prop->val.val; 146 + 147 + for (l = strlen(p) + 1; l < len; l += strlen(p + l) + 1) { 148 + struct marker *m, **nextp; 149 + 150 + m = xmalloc(sizeof(*m)); 151 + m->offset = l; 152 + m->type = TYPE_STRING; 153 + m->ref = NULL; 154 + m->next = NULL; 155 + 156 + /* Find the end of the markerlist */ 157 + nextp = &prop->val.markers; 158 + while (*nextp) 159 + nextp = &((*nextp)->next); 160 + *nextp = m; 161 + } 162 + } 163 + 142 164 static enum markertype guess_value_type(struct property *prop) 143 165 { 144 166 int len = prop->val.len; ··· 186 164 187 165 if ((p[len-1] == '\0') && (nnotstring == 0) && (nnul <= (len-nnul)) 188 166 && (nnotstringlbl == 0)) { 167 + if (nnul > 1) 168 + add_string_markers(prop); 189 169 return TYPE_STRING; 190 170 } else if (((len % sizeof(cell_t)) == 0) && (nnotcelllbl == 0)) { 191 171 return TYPE_UINT32; ··· 265 241 } else { 266 242 write_propval_int(f, p, chunk_len, 4); 267 243 } 244 + if (data_len > chunk_len) 245 + fputc(' ', f); 268 246 break; 269 247 case TYPE_UINT64: 270 248 write_propval_int(f, p, chunk_len, 8);
+4 -2
scripts/dtc/util.h
··· 13 13 */ 14 14 15 15 #ifdef __GNUC__ 16 - #if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) 16 + #ifdef __MINGW_PRINTF_FORMAT 17 + #define PRINTF(i, j) __attribute__((format (__MINGW_PRINTF_FORMAT, i, j))) 18 + #elif __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) 17 19 #define PRINTF(i, j) __attribute__((format (gnu_printf, i, j))) 18 20 #else 19 21 #define PRINTF(i, j) __attribute__((format (printf, i, j))) ··· 67 65 68 66 extern int PRINTF(2, 3) xasprintf(char **strp, const char *fmt, ...); 69 67 extern int PRINTF(2, 3) xasprintf_append(char **strp, const char *fmt, ...); 70 - extern int xavsprintf_append(char **strp, const char *fmt, va_list ap); 68 + extern int PRINTF(2, 0) xavsprintf_append(char **strp, const char *fmt, va_list ap); 71 69 extern char *join_path(const char *path, const char *name); 72 70 73 71 /**
+1 -1
scripts/dtc/version_gen.h
··· 1 - #define DTC_VERSION "DTC 1.6.1-gabbd523b" 1 + #define DTC_VERSION "DTC 1.7.0-g1df7b047"