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

Pull devicetree updates from Rob Herring:
 "DT core:

   - Add support for handling multiple cells in "iommu-map" entries

   - Support only 1 entry in /reserved-memory "reg" entries. Support for
     more than 1 entry has been broken

   - Fix a UAF on alloc_reserved_mem_array() failure

   - Make "ibm,phandle" handling logic specific to PPC

   - Use memcpy() instead of strcpy() for known length strings

   - Ensure __of_find_n_match_cpu_property() handles malformed "reg"
     entries

   - Add various checks that expected strings are strings before
     accessing them

   - Drop redundant memset() when unflattening DT

  DT bindings:

   - Add a DTS style checker. Currently hooked up to dt_binding_check to
     check examples

   - Convert st,nomadik platform, ti,omap-dmm, and ti,irq-crossbar
     bindings to DT schema

   - Add Apple System Management Controller hwmon, Qualcomm Hamoa
     Embedded Controller, Qualcomm IPQ6018 PWM controller, fsl,mc1323,
     Samsung SOFEF01-M DDIC panel, Freescale i.MX53 Television Encoder,
     Samsung S2M series PMIC extcon, and MT6365 PMIC AuxADC schemas

   - Extend bindings for QCom Maili and Nord PDC, QCom Hali fastrpc,
     qcom,eliza-imem, qcom,oryon-1-5 CPU, and MT6365 Keys

   - Consolidate "sram" property definitions

   - Fix constraints on "nvmem" properties which only contain phandles
     and no arg cells

   - Another pass of fixing "phandle-array" constraints

   - Add Gira vendor prefix"

* tag 'devicetree-for-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (50 commits)
  dt-bindings: interrupt-controller: qcom,pdc: Add Maili compatible string
  dt-bindings: interrupt-controller: ti,irq-crossbar: Convert to DT schema
  dt-bindings: vendor-prefixes: add Gira
  dt-bindings: embedded-controller: Add Qualcomm reference device EC description
  dt-bindings: pwm: add IPQ6018 binding
  dt-bindings: hwmon: Add Apple System Management Controller hwmon schema
  docs: dt: writing-schema: Clarify what is required in a schema
  of: Respect #{iommu,msi}-cells in maps
  of: Factor arguments passed to of_map_id() into a struct
  of: Add convenience wrappers for of_map_id()
  of: reserved_mem: zero total_reserved_mem_cnt if no valid /reserved-memory entry
  of: reserved_mem: handle NULL name in of_reserved_mem_lookup()
  dt-bindings: cache: l2c2x0: Add missing power-domains
  dt-bindings: interrupt-controller: renesas,r9a09g077-icu: Fix reg size in example
  dt-bindings: nvmem: consumer: Make 'nvmem' an array of one-item entries
  drivers/of/overlay: Use memcpy() to copy known length strings
  dt-bindings: add self-test fixtures for style checker
  dt-bindings: wire style checker into dt_binding_check
  scripts/jobserver-exec: propagate child exit status
  dt-bindings: add DTS style checker
  ...
This commit is contained in:
Linus Torvalds
2026-06-17 11:54:57 -07:00
166 changed files with 3608 additions and 448 deletions

View File

@@ -46,6 +46,18 @@ quiet_cmd_chk_bindings = CHKDT $(src)
xargs -n200 -P$$(nproc) $(DT_DOC_CHECKER) -u $(src)) \
&& touch $@ || true
DT_CHK_STYLE = $(srctree)/scripts/dtc/dt-check-style
# Feed the file list to the checker via @argfile in a single Python
# process so the ruamel.yaml import is paid once. scripts/jobserver-exec
# claims slots from the GNU make jobserver and exposes the count via
# $PARALLELISM, which dt-check-style picks up to size its worker pool.
quiet_cmd_chk_style = STYLE $(src)
cmd_chk_style = f=$$(mktemp) && $(find_cmd) > $$f && \
$(PYTHON3) $(srctree)/scripts/jobserver-exec \
$(PYTHON3) $(DT_CHK_STYLE) @$$f \
&& touch $@ || true; rm -f $$f
quiet_cmd_mk_schema = SCHEMA $@
cmd_mk_schema = f=$$(mktemp) ; \
$(find_all_cmd) > $$f ; \
@@ -62,13 +74,16 @@ override DTC_FLAGS := \
$(obj)/processed-schema.json: $(DT_DOCS) check_dtschema_version FORCE
$(call if_changed,mk_schema)
targets += .dt-binding.checked .yamllint.checked
targets += .dt-binding.checked .yamllint.checked .dt-style.checked
$(obj)/.yamllint.checked: $(DT_DOCS) $(src)/.yamllint FORCE
$(if $(DT_SCHEMA_LINT),$(call if_changed,yamllint),)
$(obj)/.dt-binding.checked: $(DT_DOCS) FORCE
$(call if_changed,chk_bindings)
$(obj)/.dt-style.checked: $(DT_DOCS) FORCE
$(call if_changed,chk_style)
always-y += processed-schema.json
targets += $(patsubst $(obj)/%,%, $(CHK_DT_EXAMPLES))
targets += $(patsubst $(obj)/%.dtb,%.dts, $(CHK_DT_EXAMPLES))
@@ -82,7 +97,7 @@ dt_compatible_check: $(obj)/processed-schema.json
$(Q)$(srctree)/scripts/dtc/dt-extract-compatibles $(srctree) | xargs dt-check-compatible -v -s $<
PHONY += dt_binding_check_one
dt_binding_check_one: $(obj)/.dt-binding.checked $(obj)/.yamllint.checked
dt_binding_check_one: $(obj)/.dt-binding.checked $(obj)/.yamllint.checked $(obj)/.dt-style.checked
PHONY += dt_binding_check
dt_binding_check: dt_binding_check_one $(CHK_DT_EXAMPLES)

View File

@@ -223,6 +223,7 @@ properties:
- qcom,oryon-1-2
- qcom,oryon-1-3
- qcom,oryon-1-4
- qcom,oryon-1-5
- qcom,oryon-2-1
- qcom,oryon-2-2
- qcom,oryon-2-3

View File

@@ -1,55 +0,0 @@
Some socs have a large number of interrupts requests to service
the needs of its many peripherals and subsystems. All of the
interrupt lines from the subsystems are not needed at the same
time, so they have to be muxed to the irq-controller appropriately.
In such places a interrupt controllers are preceded by an CROSSBAR
that provides flexibility in muxing the device requests to the controller
inputs.
Required properties:
- compatible : Should be "ti,irq-crossbar"
- reg: Base address and the size of the crossbar registers.
- interrupt-controller: indicates that this block is an interrupt controller.
- ti,max-irqs: Total number of irqs available at the parent interrupt controller.
- ti,max-crossbar-sources: Maximum number of crossbar sources that can be routed.
- ti,reg-size: Size of a individual register in bytes. Every individual
register is assumed to be of same size. Valid sizes are 1, 2, 4.
- ti,irqs-reserved: List of the reserved irq lines that are not muxed using
crossbar. These interrupt lines are reserved in the soc,
so crossbar bar driver should not consider them as free
lines.
Optional properties:
- ti,irqs-skip: This is similar to "ti,irqs-reserved", but these are for
SOC-specific hard-wiring of those irqs which unexpectedly bypasses the
crossbar. These irqs have a crossbar register, but still cannot be used.
- ti,irqs-safe-map: integer which maps to a safe configuration to use
when the interrupt controller irq is unused (when not provided, default is 0)
Examples:
crossbar_mpu: crossbar@4a002a48 {
compatible = "ti,irq-crossbar";
reg = <0x4a002a48 0x130>;
ti,max-irqs = <160>;
ti,max-crossbar-sources = <400>;
ti,reg-size = <2>;
ti,irqs-reserved = <0 1 2 3 5 6 131 132>;
ti,irqs-skip = <10 133 139 140>;
};
Consumer:
========
See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt and
Documentation/devicetree/bindings/interrupt-controller/arm,gic.yaml for
further details.
An interrupt consumer on an SoC using crossbar will use:
interrupts = <GIC_SPI request_number interrupt_level>
Example:
device_x@4a023000 {
/* Crossbar 8 used */
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
...
};

View File

@@ -1,22 +0,0 @@
OMAP Dynamic Memory Manager (DMM) bindings
The dynamic memory manager (DMM) is a module located immediately in front of the
SDRAM controllers (called EMIFs on OMAP). DMM manages various aspects of memory
accesses such as priority generation amongst initiators, configuration of SDRAM
interleaving, optimizing transfer of 2D block objects, and provide MMU-like page
translation for initiators which need contiguous dma bus addresses.
Required properties:
- compatible: Should contain "ti,omap4-dmm" for OMAP4 family
Should contain "ti,omap5-dmm" for OMAP5 and DRA7x family
- reg: Contains DMM register address range (base address and length)
- interrupts: Should contain an interrupt-specifier for DMM_IRQ.
- ti,hwmods: Name of the hwmod associated to DMM, which is typically "dmm"
Example:
dmm@4e000000 {
compatible = "ti,omap4-dmm";
reg = <0x4e000000 0x800>;
ti,hwmods = "dmm";
};

View File

@@ -0,0 +1,23 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/arm/st,nomadik.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ST Nomadik SoC based Boards
maintainers:
- Linus Walleij <linusw@kernel.org>
description:
Boards using the Nomadik SoC platform
properties:
$nodename:
const: '/'
compatible:
enum:
- st,nomadik-nhk-15
- calaosystems,usb-s8815
additionalProperties: true

View File

@@ -1,38 +0,0 @@
ST-Ericsson Nomadik Device Tree Bindings
For various board the "board" node may contain specific properties
that pertain to this particular board, such as board-specific GPIOs.
Required root node property: src
- Nomadik System and reset controller used for basic chip control, clock
and reset line control.
- compatible: must be "stericsson,nomadik,src"
Boards with the Nomadik SoC include:
Nomadik NHK-15 board manufactured by ST Microelectronics:
Required root node property:
compatible="st,nomadik-nhk-15";
S8815 "MiniKit" manufactured by Calao Systems:
Required root node property:
compatible="calaosystems,usb-s8815";
Required node: usb-s8815
Example:
usb-s8815 {
ethernet-gpio {
gpios = <&gpio3 19 0x1>;
interrupts = <19 0x1>;
interrupt-parent = <&gpio3>;
};
mmcsd-gpio {
gpios = <&gpio3 16 0x1>;
};
};

View File

@@ -66,6 +66,9 @@ properties:
reg:
maxItems: 1
power-domains:
maxItems: 1
arm,data-latency:
description: Cycles of latency for Data RAM accesses. Specifies 3 cells of
read, write and setup latencies. Minimum valid values are 1. Controllers

View File

@@ -10,6 +10,7 @@ maintainers:
- Svyatoslav Ryhel <clamor95@gmail.com>
allOf:
- $ref: /schemas/display/dsi-controller.yaml#
- $ref: /schemas/spi/spi-peripheral-props.yaml#
properties:
@@ -86,7 +87,7 @@ required:
- compatible
- ports
additionalProperties: false
unevaluatedProperties: false
examples:
- |

View File

@@ -42,6 +42,17 @@ properties:
unevaluatedProperties: false
description: output port connected to a panel
port:
$ref: /schemas/graph.yaml#/properties/port
unevaluatedProperties: false
deprecated: true
description: input port connected to the IPU display interface, see port@0
display-timings:
$ref: /schemas/display/panel/display-timings.yaml#
unevaluatedProperties: false
deprecated: true
required:
- compatible

View File

@@ -0,0 +1,104 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/imx/fsl,imx53-tve.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale i.MX53 Television Encoder (TVE)
maintainers:
- Frank Li <Frank.Li@nxp.com>
description:
The Television Encoder (TVE) is a hardware block in the i.MX53 SoC that
converts digital video data into analog TV signals (NTSC/PAL).
properties:
compatible:
const: fsl,imx53-tve
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
items:
- description: TVE gate clock
- description: Display interface selector clock
clock-names:
items:
- const: tve
- const: di_sel
ddc-i2c-bus:
$ref: /schemas/types.yaml#/definitions/phandle
description:
Phandle to the I2C bus used for DDC (Display Data Channel) communication
to read EDID information from the connected display.
dac-supply:
description:
Regulator supply for the TVE DAC (Digital-to-Analog Converter).
fsl,tve-mode:
$ref: /schemas/types.yaml#/definitions/string
description:
TVE output mode selection.
enum:
- ntsc
- pal
- vga
fsl,hsync-pin:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Pin number for horizontal sync signal in VGA mode.
minimum: 0
maximum: 8
fsl,vsync-pin:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Pin number for vertical sync signal in VGA mode.
minimum: 0
maximum: 8
port:
$ref: /schemas/graph.yaml#/properties/port
description:
Port node with one endpoint connected to the IPU display interface.
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
- fsl,tve-mode
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/imx5-clock.h>
#include <dt-bindings/interrupt-controller/irq.h>
tve@63ff0000 {
compatible = "fsl,imx53-tve";
reg = <0x63ff0000 0x1000>;
interrupts = <92>;
clocks = <&clks IMX5_CLK_TVE_GATE>,
<&clks IMX5_CLK_IPU_DI1_SEL>;
clock-names = "tve", "di_sel";
fsl,tve-mode = "vga";
port {
endpoint {
remote-endpoint = <&ipu_di1_tve>;
};
};
};

View File

@@ -41,7 +41,7 @@ properties:
- const: sw3
sram:
$ref: /schemas/types.yaml#/definitions/phandle
maxItems: 1
description: phandle pointing to the mmio-sram device node
required:

View File

@@ -45,9 +45,8 @@ properties:
- description: OVL-2L Clock
iommus:
description:
This property should point to the respective IOMMU block with master port as argument,
see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details.
minItems: 1
maxItems: 2
mediatek,gce-client-reg:
description: The register of client driver can be configured by gce with

View File

@@ -66,9 +66,8 @@ properties:
- description: OVL Clock
iommus:
description:
This property should point to the respective IOMMU block with master port as argument,
see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details.
minItems: 1
maxItems: 2
mediatek,gce-client-reg:
description: The register of client driver can be configured by gce with

View File

@@ -65,9 +65,7 @@ properties:
- description: RDMA Clock
iommus:
description:
This property should point to the respective IOMMU block with master port as argument,
see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details.
maxItems: 1
mediatek,rdma-fifo-size:
description:

View File

@@ -45,9 +45,7 @@ properties:
- description: WDMA Clock
iommus:
description:
This property should point to the respective IOMMU block with master port as argument,
see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details.
maxItems: 1
mediatek,gce-client-reg:
description: The register of client driver can be configured by gce with

View File

@@ -84,13 +84,9 @@ properties:
maxItems: 64
sram:
$ref: /schemas/types.yaml#/definitions/phandle-array
minItems: 1
maxItems: 4
items:
maxItems: 1
description: |
phandles to one or more reserved on-chip SRAM regions.
description:
phandle to the On Chip Memory (OCMEM) that's present on some a3xx and
a4xx Snapdragon SoCs. See
Documentation/devicetree/bindings/sram/qcom,ocmem.yaml

View File

@@ -0,0 +1,94 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/samsung,sofef01-m.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Samsung SOFEF01-M DDI for 1080x2520@60Hz 6.0"/6.1" OLED DSI panels
maintainers:
- Marijn Suijten <marijn.suijten@somainline.org>
description: |
Samsung SOFEF01-M Display-Driver-IC found in multiple Sony smartphones, paired with
the following panel:
- Sony Xperia 5 (kumano bahamut): amb609tc01
- Sony Xperia 10 II (seine pdx201): ams597ut01
- Sony Xperia 10 III (lena pdx213): ams597ut04
- Sony Xperia 10 IV (murray pdx225): ams597ut05
- Sony Xperia 10 V (zambezi pdx235): ams605dk01
- Sony Xperia 10 VI (columbia pdx246): ams605dk01
The assembly features a Samsung touchscreen compatible with
samsung,s6sy761.
properties:
compatible:
enum:
- samsung,sofef01-m-amb609tc01 # 6.1"
- samsung,sofef01-m-ams597ut01 # 6.0"
- samsung,sofef01-m-ams597ut04 # 6.0"
- samsung,sofef01-m-ams597ut05 # 6.0"
- samsung,sofef01-m-ams605dk01 # 6.1"
port: true
reg:
maxItems: 1
description: DSI virtual channel
reset-gpios: true
vci-supply:
description: DisplayIC Operation supply (3.0V)
vddio-supply:
description: I/O voltage supply (1.8V)
required:
- compatible
- port
- reg
- reset-gpios
- vddio-supply
allOf:
- $ref: panel-common.yaml#
- if:
properties:
compatible:
contains:
const: samsung,sofef01-m-amb609tc01
then:
required:
- vci-supply
else:
properties:
vci-supply: false
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
dsi {
#address-cells = <1>;
#size-cells = <0>;
panel@0 {
compatible = "samsung,sofef01-m-amb609tc01";
reg = <0>;
reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
vci-supply = <&vreg_l17a_3p0>;
vddio-supply = <&vreg_l14a_1p8>;
port {
endpoint {
remote-endpoint = <&dsi0_out>;
};
};
};
};
...

View File

@@ -41,7 +41,9 @@ properties:
minItems: 1
items:
- description: Extcon device providing the cable state for DP PHY device 0
maxItems: 1
- description: Extcon device providing the cable state for DP PHY device 1
maxItems: 1
description:
List of phandle to the extcon device providing the cable state for the DP PHY.

View File

@@ -136,13 +136,9 @@ properties:
maxItems: 1
sram:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: A phandle array with inner size 1 (no arg cells).
First phandle is the LCPA (Logical Channel Parameter Address) memory.
Second phandle is the LCLA (Logical Channel Link base Address) memory.
maxItems: 2
items:
maxItems: 1
- description: LCPA (Logical Channel Parameter Address) memory.
- description: LCLA (Logical Channel Link base Address) memory.
memcpy-channels:
$ref: /schemas/types.yaml#/definitions/uint32-array

View File

@@ -0,0 +1,56 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/embedded-controller/qcom,hamoa-crd-ec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Hamoa Embedded Controller
maintainers:
- Sibi Sankar <sibi.sankar@oss.qualcomm.com>
- Anvesh Jain P <anvesh.p@oss.qualcomm.com>
description:
Qualcomm Snapdragon based Hamoa/Purwa and Glymur reference devices have an
EC running on different MCU chips. The EC handles things like fan control,
temperature sensors, access to EC internal state changes.
properties:
compatible:
oneOf:
- items:
- enum:
- qcom,glymur-crd-ec
- qcom,hamoa-iot-evk-ec
- const: qcom,hamoa-crd-ec
- enum:
- qcom,hamoa-crd-ec
reg:
const: 0x76
interrupts:
maxItems: 1
required:
- compatible
- reg
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
embedded-controller@76 {
compatible = "qcom,hamoa-crd-ec";
reg = <0x76>;
interrupts-extended = <&tlmm 66 IRQ_TYPE_LEVEL_HIGH>;
};
};
...

View File

@@ -0,0 +1,40 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/extcon/samsung,s2mu005-muic.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MUIC Device for Samsung S2M series PMICs
maintainers:
- Kaustabh Chakraborty <kauschluss@disroot.org>
description: |
The Samsung S2M series PMIC MUIC device is a USB port accessory
detector. It reports multiple states depending on the ID-GND
resistance measured by an internal ADC.
This is a part of device tree bindings for S2M and S5M family of Power
Management IC (PMIC).
See also Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml for
additional information and example.
properties:
compatible:
enum:
- samsung,s2mu005-muic
connector:
$ref: /schemas/connector/usb-connector.yaml#
port:
$ref: /schemas/graph.yaml#/properties/port
description: Port connecting to the USB controller or PHY.
required:
- compatible
- connector
- port
additionalProperties: false

View File

@@ -0,0 +1,85 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/apple,smc-hwmon.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Apple SMC Hardware Monitoring
description:
Apple's System Management Controller (SMC) exposes a vast array of
hardware monitoring sensors, including temperature probes, current and
voltage sense, power meters, and fan speeds. It also provides endpoints
to manually control the speed of each fan individually. Each Apple
Silicon device exposes a different set of endpoints via SMC keys. This
is true even when two machines share an SoC. The CPU core temperature
sensor keys on an M1 Mac mini are different to those on an M1 MacBook
Pro, for example.
maintainers:
- James Calligeros <jcalligeros99@gmail.com>
$defs:
sensor:
type: object
properties:
apple,key-id:
$ref: /schemas/types.yaml#/definitions/string
pattern: "^[A-Za-z0-9]{4}$"
description: The SMC FourCC key of the desired sensor.
Must match the node's suffix.
label:
description: Human-readable name for the sensor
required:
- apple,key-id
properties:
compatible:
const: apple,smc-hwmon
patternProperties:
"^current-[A-Za-z0-9]{4}$":
$ref: "#/$defs/sensor"
unevaluatedProperties: false
"^fan-[A-Za-z0-9]{4}$":
$ref: "#/$defs/sensor"
unevaluatedProperties: false
properties:
apple,fan-minimum:
$ref: /schemas/types.yaml#/definitions/string
pattern: "^[A-Za-z0-9]{4}$"
description: SMC key containing the fan's minimum speed
apple,fan-maximum:
$ref: /schemas/types.yaml#/definitions/string
pattern: "^[A-Za-z0-9]{4}$"
description: SMC key containing the fan's maximum speed
apple,fan-target:
$ref: /schemas/types.yaml#/definitions/string
pattern: "^[A-Za-z0-9]{4}$"
description: Writeable endpoint for setting desired fan speed
apple,fan-mode:
$ref: /schemas/types.yaml#/definitions/string
pattern: "^[A-Za-z0-9]{4}$"
description: Writeable key to enable/disable manual fan control
"^power-[A-Za-z0-9]{4}$":
$ref: "#/$defs/sensor"
unevaluatedProperties: false
"^temperature-[A-Za-z0-9]{4}$":
$ref: "#/$defs/sensor"
unevaluatedProperties: false
"^voltage-[A-Za-z0-9]{4}$":
$ref: "#/$defs/sensor"
unevaluatedProperties: false
additionalProperties: false

View File

@@ -40,6 +40,7 @@ properties:
i2c-parent:
$ref: /schemas/types.yaml#/definitions/phandle-array
minItems: 2
items:
maxItems: 1
description:

View File

@@ -95,8 +95,8 @@ examples:
interrupts = <10>;
opencores,ip-clock-frequency = <20000000>;
reg-shift = <0>; /* 8 bit registers */
reg-io-width = <1>; /* 8 bit read/write */
reg-shift = <0>; /* 8 bit registers */
reg-io-width = <1>; /* 8 bit read/write */
};
i2c@b0000000 {
@@ -108,7 +108,7 @@ examples:
clocks = <&osc>;
clock-frequency = <400000>; /* i2c bus frequency 400 KHz */
reg-shift = <0>; /* 8 bit registers */
reg-io-width = <1>; /* 8 bit read/write */
reg-shift = <0>; /* 8 bit registers */
reg-io-width = <1>; /* 8 bit read/write */
};
...

View File

@@ -18,12 +18,17 @@ description:
properties:
compatible:
enum:
- mediatek,mt6357-auxadc
- mediatek,mt6358-auxadc
- mediatek,mt6359-auxadc
- mediatek,mt6363-auxadc
- mediatek,mt6373-auxadc
oneOf:
- enum:
- mediatek,mt6357-auxadc
- mediatek,mt6358-auxadc
- mediatek,mt6359-auxadc
- mediatek,mt6363-auxadc
- mediatek,mt6373-auxadc
- items:
- enum:
- mediatek,mt6365-auxadc
- const: mediatek,mt6359-auxadc
"#io-channel-cells":
const: 1

View File

@@ -65,5 +65,5 @@ examples:
interrupt-parent = <&vic1>;
interrupts = <6>;
sampling-frequency = <5000000>;
vref-external = <2500>; /* 2.5V VRef */
vref-external = <2500>; /* 2.5V VRef */
};

View File

@@ -88,8 +88,7 @@ properties:
- 2 # ATMEL_MXT_WAKEUP_GPIO
default: 0
wakeup-source:
type: boolean
wakeup-source: true
required:
- compatible

View File

@@ -66,20 +66,20 @@ examples:
clocks = <&clks 0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_kpp_1>;
linux,keymap = <0x00000067 /* KEY_UP */
0x0001006c /* KEY_DOWN */
0x00020072 /* KEY_VOLUMEDOWN */
0x00030066 /* KEY_HOME */
0x0100006a /* KEY_RIGHT */
0x01010069 /* KEY_LEFT */
0x0102001c /* KEY_ENTER */
0x01030073 /* KEY_VOLUMEUP */
0x02000040 /* KEY_F6 */
0x02010042 /* KEY_F8 */
0x02020043 /* KEY_F9 */
0x02030044 /* KEY_F10 */
0x0300003b /* KEY_F1 */
0x0301003c /* KEY_F2 */
0x0302003d /* KEY_F3 */
0x03030074>; /* KEY_POWER */
linux,keymap = <0x00000067 /* KEY_UP */
0x0001006c /* KEY_DOWN */
0x00020072 /* KEY_VOLUMEDOWN */
0x00030066 /* KEY_HOME */
0x0100006a /* KEY_RIGHT */
0x01010069 /* KEY_LEFT */
0x0102001c /* KEY_ENTER */
0x01030073 /* KEY_VOLUMEUP */
0x02000040 /* KEY_F6 */
0x02010042 /* KEY_F8 */
0x02020043 /* KEY_F9 */
0x02030044 /* KEY_F10 */
0x0300003b /* KEY_F1 */
0x0301003c /* KEY_F2 */
0x0302003d /* KEY_F3 */
0x03030074>; /* KEY_POWER */
};

View File

@@ -23,14 +23,19 @@ description: |
properties:
compatible:
enum:
- mediatek,mt6323-keys
- mediatek,mt6328-keys
- mediatek,mt6331-keys
- mediatek,mt6357-keys
- mediatek,mt6358-keys
- mediatek,mt6359-keys
- mediatek,mt6397-keys
oneOf:
- enum:
- mediatek,mt6323-keys
- mediatek,mt6328-keys
- mediatek,mt6331-keys
- mediatek,mt6357-keys
- mediatek,mt6358-keys
- mediatek,mt6359-keys
- mediatek,mt6397-keys
- items:
- enum:
- mediatek,mt6365-keys
- const: mediatek,mt6359-keys
power-off-time-sec: true

View File

@@ -197,12 +197,12 @@ examples:
microchip,sensitivity-delta-sense = <16>;
microchip,input-threshold = <21>, <18>, <46>, <46>, <46>, <21>;
linux,keycodes = <103>, /* KEY_UP */
<106>, /* KEY_RIGHT */
<108>, /* KEY_DOWN */
<105>, /* KEY_LEFT */
<109>, /* KEY_PAGEDOWN */
<104>; /* KEY_PAGEUP */
linux,keycodes = <103>, /* KEY_UP */
<106>, /* KEY_RIGHT */
<108>, /* KEY_DOWN */
<105>, /* KEY_LEFT */
<109>, /* KEY_PAGEDOWN */
<104>; /* KEY_PAGEUP */
#address-cells = <1>;
#size-cells = <0>;

View File

@@ -165,9 +165,9 @@ examples:
touchscreen@0 {
compatible = "ti,tsc2046";
reg = <0>; /* CS0 */
reg = <0>; /* CS0 */
interrupt-parent = <&gpio1>;
interrupts = <8 0>; /* BOOT6 / GPIO 8 */
interrupts = <8 0>; /* BOOT6 / GPIO 8 */
pendown-gpio = <&gpio1 8 0>;
spi-max-frequency = <1000000>;
vcc-supply = <&reg_vcc3>;

View File

@@ -30,7 +30,9 @@ properties:
- qcom,glymur-pdc
- qcom,hawi-pdc
- qcom,kaanapali-pdc
- qcom,maili-pdc
- qcom,milos-pdc
- qcom,nord-pdc
- qcom,qcs615-pdc
- qcom,qcs8300-pdc
- qcom,qdu1000-pdc

View File

@@ -165,7 +165,7 @@ examples:
icu: interrupt-controller@802a0000 {
compatible = "renesas,r9a09g077-icu";
reg = <0x802a0000 0x10000>,
<0x812a0000 0x50>;
<0x812a0000 0x10000>;
#interrupt-cells = <2>;
#address-cells = <0>;
interrupt-controller;

View File

@@ -0,0 +1,96 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/interrupt-controller/ti,irq-crossbar.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments IRQ Crossbar
maintainers:
- Sricharan R <r.sricharan@ti.com>
description:
Some socs have a large number of interrupts requests to service the needs of
its many peripherals and subsystems. All of the interrupt lines from the
subsystems are not needed at the same time, so they have to be muxed to the
irq-controller appropriately. In such places a interrupt controllers are
preceded by an CROSSBAR that provides flexibility in muxing the device
requests to the controller inputs.
properties:
compatible:
const: ti,irq-crossbar
reg:
maxItems: 1
interrupt-controller: true
'#interrupt-cells':
const: 3
ti,max-irqs:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Total number of irqs available at the parent interrupt controller.
minimum: 1
ti,max-crossbar-sources:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Maximum number of crossbar sources that can be routed.
minimum: 1
ti,reg-size:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Size of a individual register in bytes. Every individual
register is assumed to be of same size.
enum: [1, 2, 4]
ti,irqs-reserved:
$ref: /schemas/types.yaml#/definitions/uint32-array
description:
List of the reserved irq lines that are not muxed using crossbar. These
interrupt lines are reserved in the soc, so crossbar bar driver should not
consider them as free lines.
ti,irqs-skip:
$ref: /schemas/types.yaml#/definitions/uint32-array
description:
Similar to "ti,irqs-reserved", but these are for SOC-specific hard-wiring
of those irqs which unexpectedly bypasses the crossbar. These irqs have a
crossbar register, but still cannot be used.
ti,irqs-safe-map:
$ref: /schemas/types.yaml#/definitions/uint32
description:
integer which maps to a safe configuration to use when the interrupt
controller irq is unused.
default: 0
required:
- compatible
- reg
- interrupt-controller
- '#interrupt-cells'
- ti,max-irqs
- ti,max-crossbar-sources
- ti,reg-size
- ti,irqs-reserved
additionalProperties: false
examples:
- |
crossbar@4a002a48 {
compatible = "ti,irq-crossbar";
reg = <0x4a002a48 0x130>;
interrupt-controller;
#interrupt-cells = <3>;
ti,max-irqs = <160>;
ti,max-crossbar-sources = <400>;
ti,reg-size = <2>;
ti,irqs-reserved = <0 1 2 3 5 6 131 132>;
ti,irqs-skip = <10 133 139 140>;
};

View File

@@ -183,7 +183,7 @@ examples:
compatible = "ti,lp8501";
reg = <0x32>;
clock-mode = /bits/ 8 <2>;
pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */
pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */
ti,charge-pump-mode = <LP55XX_CP_BYPASS>;
led@0 {

View File

@@ -37,7 +37,7 @@ properties:
maxItems: 1
sram:
$ref: /schemas/types.yaml#/definitions/phandle
maxItems: 1
description:
The VPU uses the SRAM to store some of the reference data instead of
storing it on DMA memory. It is mainly used for the purpose of reducing

View File

@@ -15,6 +15,9 @@ description: |-
an I2C interface and outputs image data over a 8-bit parallel or 1-lane MIPI
CSI-2 connection.
allOf:
- $ref: /schemas/media/video-interface-devices.yaml#
properties:
compatible:
enum:
@@ -90,7 +93,7 @@ required:
- vaa-supply
- port
additionalProperties: false
unevaluatedProperties: false
examples:
- |

View File

@@ -160,7 +160,7 @@ examples:
vcodec_enc_vp8: vcodec@19002000 {
compatible = "mediatek,mt8173-vcodec-enc-vp8";
reg = <0x19002000 0x1000>; /* VENC_LT_SYS */
reg = <0x19002000 0x1000>; /* VENC_LT_SYS */
interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_LOW>;
iommus = <&iommu M4U_PORT_VENC_RCPU_SET2>,
<&iommu M4U_PORT_VENC_REC_FRM_SET2>,

View File

@@ -232,7 +232,7 @@ examples:
#address-cells = <2>;
#size-cells = <2>;
ranges = <0 0 0 0x16000000 0 0x40000>;
reg = <0 0x16000000 0 0x1000>; /* VDEC_SYS */
reg = <0 0x16000000 0 0x1000>; /* VDEC_SYS */
video-codec@10000 {
compatible = "mediatek,mtk-vcodec-lat";
reg = <0 0x10000 0 0x800>;

View File

@@ -56,10 +56,10 @@ properties:
maxItems: 5 # Wrapper and 4 slots
sram:
$ref: /schemas/types.yaml#/definitions/phandle
maxItems: 1
description:
Optional phandle to a reserved on-chip SRAM regions. The SRAM can
be used for descriptor storage, which may improve bus utilization.
The SRAM can be used for descriptor storage, which may improve bus
utilization.
required:
- compatible

View File

@@ -91,9 +91,8 @@ properties:
maxItems: 1
sram:
$ref: /schemas/types.yaml#/definitions/phandle
description: |
phandle to a reserved on-chip SRAM regions.
maxItems: 1
description:
Some SoCs, like rk3588 provide on-chip SRAM to store temporary
buffers during decoding.

View File

@@ -47,10 +47,10 @@ properties:
maxItems: 1
sram:
$ref: /schemas/types.yaml#/definitions/phandle
maxItems: 1
description:
phandle to a reserved SRAM region which is used as temporary
storage memory between DMA and MDMA engines.
SRAM region which is used as temporary storage memory between DMA and
MDMA engines.
port:
$ref: /schemas/graph.yaml#/$defs/port-base

View File

@@ -66,8 +66,8 @@ examples:
- |
memory-controller@7000f000 {
compatible = "nvidia,tegra20-mc-gart";
reg = <0x7000f000 0x400>, /* Controller registers */
<0x58000000 0x02000000>; /* GART aperture */
reg = <0x7000f000 0x400>, /* Controller registers */
<0x58000000 0x02000000>; /* GART aperture */
clocks = <&clock_controller 32>;
clock-names = "mc";

View File

@@ -128,7 +128,7 @@ examples:
"mout_mx_mspll_ccore",
"mout_mclk_cdrex";
operating-points-v2 = <&dmc_opp_table>;
devfreq-events = <&ppmu_event3_dmc0_0>, <&ppmu_event3_dmc0_1>,
devfreq-events = <&ppmu_event3_dmc0_0>, <&ppmu_event3_dmc0_1>,
<&ppmu_event3_dmc1_0>, <&ppmu_event3_dmc1_1>;
device-handle = <&samsung_K3QF2F20DB>;
vdd-supply = <&buck1_reg>;

View File

@@ -49,6 +49,9 @@ properties:
rtc:
$ref: /schemas/rtc/apple,smc-rtc.yaml
hwmon:
$ref: /schemas/hwmon/apple,smc-hwmon.yaml
additionalProperties: false
required:
@@ -89,5 +92,38 @@ examples:
nvmem-cells = <&rtc_offset>;
nvmem-cell-names = "rtc_offset";
};
hwmon {
compatible = "apple,smc-hwmon";
current-ID0R {
apple,key-id = "ID0R";
label = "AC Input Current";
};
fan-F0Ac {
apple,key-id = "F0Ac";
apple,fan-minimum = "F0Mn";
apple,fan-maximum = "F0Mx";
apple,fan-target = "F0Tg";
apple,fan-mode = "F0Md";
label = "Fan 1";
};
power-PSTR {
apple,key-id = "PSTR";
label = "Total System Power";
};
temperature-TW0P {
apple,key-id = "TW0P";
label = "WiFi/BT Module Temperature";
};
voltage-VD0R {
apple,key-id = "VD0R";
label = "AC Input Voltage";
};
};
};
};

View File

@@ -44,8 +44,7 @@ properties:
description:
Telling whether or not this PMIC is controlling the system power.
wakeup-source:
type: boolean
wakeup-source: true
vcc1-supply:
description:

View File

@@ -166,7 +166,7 @@ examples:
*/
ranges = <0x0 0x0 0x8 0x0c000000 0x4000000
0x1 0x0 0x8 0x18000000 0x8000000>;
/* define map for ICIDs 23-64 */
iommu-map = <23 &smmu 23 41>;
/* define msi map for ICIDs 23-64 */

View File

@@ -25,6 +25,7 @@ properties:
- items:
- enum:
- qcom,glymur-fastrpc
- qcom,hawi-fastrpc
- const: qcom,kaanapali-fastrpc
label:

View File

@@ -39,10 +39,11 @@ properties:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: |
DWMMC core on Hi3798MV2x SoCs has a delay-locked-loop(DLL) attached to card data input path.
It is integrated into CRG core on the SoC and has to be controlled during tuning.
It is integrated into CRG core on the SoC and has to be controlled during tuning
items:
- description: A phandle pointed to the CRG syscon node
- description: Sample DLL register offset in CRG address space
- items:
- description: A phandle pointed to the CRG syscon node
- description: Sample DLL register offset in CRG address space
required:
- compatible

View File

@@ -67,8 +67,7 @@ properties:
- const: ppe
sram:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to mmio SRAM
maxItems: 1
mediatek,ethsys:
$ref: /schemas/types.yaml#/definitions/phandle

View File

@@ -42,7 +42,19 @@ properties:
description: State bits used by the AP to signal the modem.
items:
- description: Power control
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
- description: Power control acknowledgment
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
qcom,smem-state-names:
description: Names for the state bits used by the AP to signal the modem.

View File

@@ -128,7 +128,19 @@ properties:
description: State bits used in by the AP to signal the modem.
items:
- description: Whether the "ipa-clock-enabled" state bit is valid
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
- description: Whether the IPA clock is enabled (if valid)
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
qcom,smem-state-names:
description: The names of the state bits used for SMP2P output

View File

@@ -21,7 +21,7 @@ properties:
- ti,am654-sr1-icssg-prueth # for AM65x SoC family, SR1.0
sram:
$ref: /schemas/types.yaml#/definitions/phandle
maxItems: 1
description:
phandle to MSMC SRAM node

View File

@@ -24,7 +24,7 @@ properties:
- ti,am3359-prueth # for AM33x SoC family
sram:
$ref: /schemas/types.yaml#/definitions/phandle
maxItems: 1
description:
phandle to OCMC SRAM node

View File

@@ -158,7 +158,13 @@ properties:
description: State bits used by the AP to signal the WLAN Q6.
items:
- description: Signal bits used to enable/disable low power mode
on WCN in the case of WoW (Wake on Wireless).
on WCN in the case of WoW (Wake on Wireless).
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
qcom,smem-state-names:
description: The names of the state bits used for SMP2P output.

View File

@@ -80,7 +80,13 @@ properties:
description: State bits used by the AP to signal the WLAN Q6.
items:
- description: Signal bits used to enable/disable low power mode
on WCN6750 in the case of WoW (Wake on Wireless).
on WCN6750 in the case of WoW (Wake on Wireless).
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
qcom,smem-state-names:
description: The names of the state bits used for SMP2P output.

View File

@@ -168,8 +168,26 @@ properties:
description: States used by the AP to signal the remote processor
items:
- description: Shutdown WCSS pd
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
- description: Stop WCSS pd
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
- description: Spawn WCSS pd
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
qcom,smem-state-names:
description:

View File

@@ -16,6 +16,8 @@ properties:
$ref: /schemas/types.yaml#/definitions/phandle-array
description:
List of phandle to the nvmem providers.
items:
maxItems: 1
nvmem-cells:
$ref: /schemas/types.yaml#/definitions/phandle-array

View File

@@ -125,8 +125,8 @@ examples:
phy-names = "pcie-phy0", "pcie-phy1", "pcie-phy2";
power-domains = <&scpsys MT2701_POWER_DOMAIN_HIF>;
bus-range = <0x00 0xff>;
ranges = <0x81000000 0 0x1a160000 0 0x1a160000 0 0x00010000>, /* I/O space */
<0x83000000 0 0x60000000 0 0x60000000 0 0x10000000>; /* memory space */
ranges = <0x81000000 0 0x1a160000 0 0x1a160000 0 0x00010000>, /* I/O space */
<0x83000000 0 0x60000000 0 0x60000000 0 0x10000000>; /* memory space */
pcie@0,0 {
device_type = "pci";

View File

@@ -109,7 +109,7 @@ examples:
num-lanes = <1>;
num-viewport = <3>;
bus-range = <0x00 0xff>;
ranges = <0x81000000 0 0 0x0c001000 0 0x00010000>,
ranges = <0x81000000 0 0 0x0c001000 0 0x00010000>,
<0x82000000 0 0x0c011000 0x0c011000 0 0x03feefff>;
vdd10-supply = <&ldo6_reg>;
vdd18-supply = <&ldo7_reg>;

View File

@@ -49,8 +49,9 @@ properties:
A phandle to the parent I2C node and the slave address of the device
used to configure tc9563 to change FTS, tx amplitude etc.
items:
- description: Phandle to the I2C controller node
- description: I2C slave address
- items:
- description: Phandle to the I2C controller node
- description: I2C slave address
patternProperties:
"^pcie@[1-3],0$":

View File

@@ -0,0 +1,51 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/pwm/qcom,ipq6018-pwm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm IPQ6018 PWM controller
maintainers:
- George Moussalem <george.moussalem@outlook.com>
properties:
compatible:
oneOf:
- items:
- enum:
- qcom,ipq5018-pwm
- qcom,ipq5332-pwm
- qcom,ipq9574-pwm
- const: qcom,ipq6018-pwm
- const: qcom,ipq6018-pwm
reg:
maxItems: 1
clocks:
maxItems: 1
"#pwm-cells":
const: 3
required:
- compatible
- reg
- clocks
- "#pwm-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-ipq6018.h>
pwm: pwm@1941010 {
compatible = "qcom,ipq6018-pwm";
reg = <0x01941010 0x20>;
clocks = <&gcc GCC_ADSS_PWM_CLK>;
assigned-clocks = <&gcc GCC_ADSS_PWM_CLK>;
assigned-clock-rates = <100000000>;
#pwm-cells = <3>;
};

View File

@@ -48,12 +48,7 @@ properties:
minItems: 1
sram:
$ref: /schemas/types.yaml#/definitions/phandle
description:
phandles to a reserved SRAM region which is used as the memory of
the ARC core. The region should be defined as child nodes of the
AHB SRAM node as per the generic bindings in
Documentation/devicetree/bindings/sram/sram.yaml
maxItems: 1
amlogic,secbus2:
$ref: /schemas/types.yaml#/definitions/phandle

View File

@@ -108,6 +108,12 @@ properties:
description: States used by the AP to signal the Hexagon core
items:
- description: Stop modem
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
qcom,smem-state-names:
description: Names of the states used by the AP to signal the Hexagon core

View File

@@ -101,6 +101,13 @@ properties:
description: States used by the AP to signal the Hexagon core
items:
- description: Stop modem
items:
- description: Phandle to the Shared Memory Point 2 Point or Shared
Memory Manager device handling the communication with a remote
processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
qcom,smem-state-names:
description: Names of the states used by the AP to signal the Hexagon core

View File

@@ -60,6 +60,12 @@ properties:
description: States used by the AP to signal the Hexagon core
items:
- description: Stop the modem
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
qcom,smem-state-names:
description: The names of the state bits used for SMP2P output

View File

@@ -92,6 +92,12 @@ properties:
description: States used by the AP to signal the Hexagon core
items:
- description: Stop the modem
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
qcom,smem-state-names:
description: The names of the state bits used for SMP2P output

View File

@@ -133,6 +133,12 @@ properties:
description: States used by the AP to signal the Hexagon core
items:
- description: Stop the modem
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
qcom,smem-state-names:
description: The names of the state bits used for SMP2P output

View File

@@ -91,6 +91,12 @@ properties:
description: States used by the AP to signal the Hexagon core
items:
- description: Stop the modem
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
qcom,smem-state-names:
description: The names of the state bits used for SMP2P output

View File

@@ -147,6 +147,12 @@ properties:
description: States used by the AP to signal the Hexagon core
items:
- description: Stop the modem
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
qcom,smem-state-names:
description: The names of the state bits used for SMP2P output

View File

@@ -104,6 +104,12 @@ properties:
description: States used by the AP to signal the Hexagon core
items:
- description: Stop the modem
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
qcom,smem-state-names:
description: The names of the state bits used for SMP2P output

View File

@@ -92,6 +92,12 @@ properties:
description: States used by the AP to signal the Hexagon core
items:
- description: Stop the modem
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
qcom,smem-state-names:
description: The names of the state bits used for SMP2P output

View File

@@ -84,6 +84,12 @@ properties:
States used by the AP to signal the WCNSS core that it should shutdown
items:
- description: Stop the modem
items:
- description: Phandle to the Shared Memory Point 2 Point device
handling the communication with a remote processor
- description: Single bit index to toggle in the value sent to
the remote processor
maximum: 32
qcom,smem-state-names:
description: The names of the state bits used for SMP2P output

View File

@@ -75,16 +75,8 @@ properties:
# --------------------
sram:
$ref: /schemas/types.yaml#/definitions/phandle-array
minItems: 1
maxItems: 4
items:
maxItems: 1
description: |
phandles to one or more reserved on-chip SRAM regions. The regions
should be defined as child nodes of the respective SRAM node, and
should be defined as per the generic bindings in,
Documentation/devicetree/bindings/sram/sram.yaml
allOf:
- if:

View File

@@ -224,16 +224,8 @@ patternProperties:
at 0x0) or 0 (BTCM at 0x0), default value is 1 if omitted.
sram:
$ref: /schemas/types.yaml#/definitions/phandle-array
minItems: 1
maxItems: 4
items:
maxItems: 1
description: |
phandles to one or more reserved on-chip SRAM regions. The regions
should be defined as child nodes of the respective SRAM node, and
should be defined as per the generic bindings in,
Documentation/devicetree/bindings/sram/sram.yaml
required:
- compatible

View File

@@ -106,20 +106,13 @@ patternProperties:
- const: rx
sram:
$ref: /schemas/types.yaml#/definitions/phandle-array
minItems: 1
maxItems: 8
items:
maxItems: 1
description: |
description:
phandles to one or more reserved on-chip SRAM regions. Other than TCM,
the RPU can execute instructions and access data from the OCM memory,
the main DDR memory, and other system memories.
The regions should be defined as child nodes of the respective SRAM
node, and should be defined as per the generic bindings in
Documentation/devicetree/bindings/sram/sram.yaml
memory-region:
description: |
List of phandles to the reserved memory regions associated with the

View File

@@ -0,0 +1,53 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/soc/ti/ti,omap-dmm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: OMAP Dynamic Memory Manager (DMM)
maintainers:
- Bhargav Joshi <j.bhargav.u@gmail.com>
description:
The dynamic memory manager (DMM) is a module located immediately in front of
the SDRAM controllers (called EMIFs on OMAP). DMM manages various aspects of
memory accesses such as priority generation amongst initiators, configuration
of SDRAM interleaving, optimizing transfer of 2D block objects, and provide
MMU-like page translation for initiators which need contiguous dma bus
addresses.
properties:
compatible:
enum:
- ti,omap4-dmm
- ti,omap5-dmm
reg:
maxItems: 1
interrupts:
maxItems: 1
ti,hwmods:
$ref: /schemas/types.yaml#/definitions/string
description: Name of the hwmod associated to DMM, which is typically "dmm"
deprecated: true
required:
- compatible
- reg
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
dmm@4e000000 {
compatible = "ti,omap4-dmm";
reg = <0x4e000000 0x800>;
interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
ti,hwmods = "dmm";
};

View File

@@ -248,13 +248,13 @@ examples:
reg-names = "mpu";
interrupts = <82>, <83>;
interrupt-names = "tx", "rx";
op-mode = <0>; /* MCASP_IIS_MODE */
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
ti,async-mode;
dmas = <&main_udmap 0xc400>, <&main_udmap 0x4400>;
dma-names = "tx", "rx";
serial-dir = <
0 0 0 0 /* 0: INACTIVE, 1: TX, 2: RX */
0 0 0 0 /* 0: INACTIVE, 1: TX, 2: RX */
0 0 0 0
0 0 0 1
2 0 0 0 >;

View File

@@ -45,8 +45,12 @@ properties:
description: Phandles to the I2S controllers.
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- description: Phandle to I2S0.
- description: Phandle to I2S1.
- items:
- description: Phandle to I2S0
- description: Unused
- items:
- description: Phandle to I2S1
- description: Unused
mic-bias-gpios:
description: GPIO pin that enables the Main Mic bias regulator.

View File

@@ -315,7 +315,7 @@ examples:
#address-cells = <1>;
#size-cells = <0>;
simple-audio-card,dai-link@0 { /* I2S - HDMI */
simple-audio-card,dai-link@0 { /* I2S - HDMI */
reg = <0>;
format = "i2s";
cpu {
@@ -326,7 +326,7 @@ examples:
};
};
simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
reg = <1>;
cpu {
sound-dai = <&audio1>;
@@ -336,7 +336,7 @@ examples:
};
};
simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
reg = <2>;
cpu {
sound-dai = <&audio2>;

View File

@@ -89,12 +89,10 @@ properties:
- const: rxm2m
sram:
$ref: /schemas/types.yaml#/definitions/phandle
description: |
Phandles to a reserved SRAM region which is used as temporary
storage memory between DMA and MDMA engines.
The region should be defined as child node of the AHB SRAM node
as per the generic bindings in Documentation/devicetree/bindings/sram/sram.yaml
maxItems: 1
description:
SRAM region which is used as temporary storage memory between DMA and
MDMA engines.
power-domains:
maxItems: 1

View File

@@ -49,8 +49,9 @@ properties:
description: configure OCTOSPI delay block.
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- description: phandle to syscfg
- description: register offset within syscfg
- items:
- description: phandle to syscfg
- description: register offset within syscfg
access-controllers:
description: phandle to the rifsc device to check access right

View File

@@ -0,0 +1,26 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sram/sram-consumer.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: SRAM Consumers
maintainers:
- Rob Herring <robh@kernel.org>
select: true
properties:
sram:
description:
Phandles to one or more reserved on-chip SRAM regions. The regions
should be defined as child nodes of the respective SRAM node, and
should be defined as per the generic bindings in,
Documentation/devicetree/bindings/sram/sram.yaml
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
maxItems: 1
additionalProperties: true
...

View File

@@ -34,6 +34,7 @@ properties:
- nvidia,tegra186-sysram
- nvidia,tegra194-sysram
- nvidia,tegra234-sysram
- qcom,eliza-imem
- qcom,hawi-imem
- qcom,kaanapali-imem
- qcom,milos-imem

View File

@@ -64,9 +64,10 @@ I. For patch submitters
7) DTS is treated in general as driver-independent hardware description, thus
any DTS patches, regardless whether using existing or new bindings, should
be placed at the end of patchset to indicate no dependency of drivers on
the DTS. DTS will be anyway applied through separate tree or branch, so
different order would indicate the series is non-bisectable.
be a separate posting or, when combined with driver patches, placed at the
end of the patchset to indicate no dependency of drivers on the DTS. DTS
will be anyway applied through separate tree or branch, so different order
would indicate the series is non-bisectable.
If a driver subsystem maintainer prefers to apply entire set, instead of
their relevant portion of patchset, please split the DTS patches into

View File

@@ -131,6 +131,8 @@ properties:
- domintech,dmard09
# DMARD10: 3-axis Accelerometer
- domintech,dmard10
# Freescale 2.4 GHz IEEE® 802.15.4/ZigBee
- fsl,mc1323
# MMA7660FC: 3-Axis Orientation/Motion Detection Sensor
- fsl,mma7660
# MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer

View File

@@ -97,7 +97,9 @@ properties:
minItems: 1
items:
- description: vbus extcon
maxItems: 1
- description: id extcon
maxItems: 1
phy-clkgate-delay-us:
description:

View File

@@ -61,9 +61,10 @@ properties:
offset, and phy index
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- description: phandle to TCSR node
- description: register offset
- description: phy index
- items:
- description: phandle to TCSR node
- description: register offset
- description: phy index
nvidia,phy:
description: phandle of usb phy that connects to the port. Use "phys" instead.

View File

@@ -43,8 +43,7 @@ properties:
vbus-supply:
description: VBUS power supply
wakeup-source:
type: boolean
wakeup-source: true
connector:
type: object

View File

@@ -88,7 +88,7 @@ examples:
power-domains = <&k3_pds 288 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 288 15>, <&k3_clks 288 3>;
clock-names = "ref", "lpm";
assigned-clocks = <&k3_clks 288 15>; /* USB2_REFCLK */
assigned-clocks = <&k3_clks 288 15>; /* USB2_REFCLK */
assigned-clock-parents = <&k3_clks 288 16>; /* HFOSC0 */
#address-cells = <2>;
#size-cells = <2>;
@@ -99,9 +99,9 @@ examples:
<0x00 0x6010000 0x00 0x10000>,
<0x00 0x6020000 0x00 0x10000>;
reg-names = "otg", "xhci", "dev";
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, /* irq.0 */
<GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, /* irq.6 */
<GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>; /* otgirq.0 */
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, /* irq.0 */
<GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, /* irq.6 */
<GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>; /* otgirq.0 */
interrupt-names = "host",
"peripheral",
"otg";

View File

@@ -658,6 +658,8 @@ patternProperties:
description: Giantec Semiconductor, Inc.
"^giantplus,.*":
description: Giantplus Technology Co., Ltd.
"^gira,.*":
description: Gira Giersiepen GmbH & Co. KG
"^glinet,.*":
description: GL Intelligence, Inc.
"^globalscale,.*":

View File

@@ -53,7 +53,17 @@ Properties
- DON'T use wildcards or device-family names in compatible strings.
- DO use fallback compatibles when devices are the same as or a superset of
prior implementations.
prior implementations. Fallback compatibles are applicable especially
when sharing a programming interface or when able to discover the
variants.
- DON'T add fake fallback compatibles when software cannot use such to match
and bind to a device, and still operate correctly.
- DO use the commit message to explain why devices that may appear
compatible in a diff (e.g. no differences in property use, same handling
by the software) but are not made compatible in the binding, are not
compatible.
- DO add new compatibles in case there are new features or bugs.

View File

@@ -132,7 +132,7 @@ examples
provider binding, other nodes referenced by phandle.
Note: YAML doesn't allow leading tabs, so spaces must be used instead.
Unless noted otherwise, all properties are required.
Unless noted otherwise, all above schema properties are required.
Property Schema
---------------

View File

@@ -2543,6 +2543,7 @@ F: Documentation/devicetree/bindings/cpufreq/apple,cluster-cpufreq.yaml
F: Documentation/devicetree/bindings/dma/apple,admac.yaml
F: Documentation/devicetree/bindings/gpio/apple,smc-gpio.yaml
F: Documentation/devicetree/bindings/gpu/apple,agx.yaml
F: Documentation/devicetree/bindings/hwmon/apple,smc-hwmon.yaml
F: Documentation/devicetree/bindings/i2c/apple,i2c.yaml
F: Documentation/devicetree/bindings/input/touchscreen/apple,z2-multitouch.yaml
F: Documentation/devicetree/bindings/interrupt-controller/apple,*
@@ -3185,7 +3186,7 @@ M: Linus Walleij <linusw@kernel.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git
F: Documentation/devicetree/bindings/arm/ste-*
F: Documentation/devicetree/bindings/arm/st,nomadik.yaml
F: Documentation/devicetree/bindings/arm/ux500.yaml
F: Documentation/devicetree/bindings/arm/ux500/
F: Documentation/devicetree/bindings/gpio/st,nomadik-gpio.yaml
@@ -8359,6 +8360,11 @@ S: Maintained
F: Documentation/devicetree/bindings/display/panel/samsung,sofef00.yaml
F: drivers/gpu/drm/panel/panel-samsung-sofef00.c
DRM DRIVER FOR SAMSUNG SOFEF01 DDIC
M: Marijn Suijten <marijn.suijten@somainline.org>
S: Maintained
F: Documentation/devicetree/bindings/display/panel/samsung,sofef01-m.yaml
DRM DRIVER FOR SHARP MEMORY LCD
M: Alex Lanzano <lanzano.alex@gmail.com>
S: Maintained

View File

@@ -296,6 +296,7 @@ no-dot-config-targets := $(clean-targets) \
kconfig-sym-check \
$(version_h) headers headers_% archheaders archscripts \
%asm-generic kernelversion %src-pkg dt_binding_check \
dt_style_selftest \
outputmakefile rustavailable rustfmt rustfmtcheck \
run-command
no-sync-config-targets := $(no-dot-config-targets) %install modules_sign kernelrelease \
@@ -1653,6 +1654,10 @@ PHONY += dt_compatible_check
dt_compatible_check: dt_binding_schemas
$(Q)$(MAKE) $(build)=$(dtbindingtree) $@
PHONY += dt_style_selftest
dt_style_selftest:
$(Q)$(srctree)/scripts/dtc/dt-style-selftest/run.sh
# ---------------------------------------------------------------------------
# Modules
@@ -1858,6 +1863,7 @@ help:
echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'; \
echo ' dt_binding_check - Validate device tree binding documents and examples'; \
echo ' dt_binding_schemas - Build processed device tree binding schemas'; \
echo ' dt_style_selftest - Run dt-check-style fixture tests'; \
echo ' dtbs_check - Validate device tree source files';\
echo '')

View File

@@ -121,23 +121,23 @@ static int cdx_msi_prepare(struct irq_domain *msi_domain,
struct device *dev,
int nvec, msi_alloc_info_t *info)
{
struct of_phandle_args msi_spec = {};
struct cdx_device *cdx_dev = to_cdx_device(dev);
struct device *parent = cdx_dev->cdx->dev;
struct msi_domain_info *msi_info;
u32 dev_id;
int ret;
/* Retrieve device ID from requestor ID using parent device */
ret = of_map_id(parent->of_node, cdx_dev->msi_dev_id, "msi-map", "msi-map-mask",
NULL, &dev_id);
ret = of_map_msi_id(parent->of_node, cdx_dev->msi_dev_id, NULL, &msi_spec);
if (ret) {
dev_err(dev, "of_map_id failed for MSI: %d\n", ret);
dev_err(dev, "of_map_msi_id failed for MSI: %d\n", ret);
return ret;
}
of_node_put(msi_spec.np);
#ifdef GENERIC_MSI_DOMAIN_OPS
/* Set the device Id to be passed to the GIC-ITS */
info->scratchpad[0].ul = dev_id;
info->scratchpad[0].ul = msi_spec.args[0];
#endif
msi_info = msi_get_domain_info(msi_domain->parent);

View File

@@ -45,12 +45,10 @@ static int of_iommu_configure_dev_id(struct device_node *master_np,
struct device *dev,
const u32 *id)
{
struct of_phandle_args iommu_spec = { .args_count = 1 };
struct of_phandle_args iommu_spec = {};
int err;
err = of_map_id(master_np, *id, "iommu-map",
"iommu-map-mask", &iommu_spec.np,
iommu_spec.args);
err = of_map_iommu_id(master_np, *id, &iommu_spec);
if (err)
return err;

View File

@@ -152,6 +152,8 @@ static int its_v5_pci_msi_prepare(struct irq_domain *domain, struct device *dev,
static int of_pmsi_get_msi_info(struct irq_domain *domain, struct device *dev, u32 *dev_id,
phys_addr_t *pa)
{
struct device_node *msi_ctrl = NULL;
struct of_phandle_args msi_spec = {};
struct of_phandle_iterator it;
int ret;
@@ -178,9 +180,11 @@ static int of_pmsi_get_msi_info(struct irq_domain *domain, struct device *dev, u
}
}
struct device_node *msi_ctrl __free(device_node) = NULL;
return of_map_id(dev->of_node, dev->id, "msi-map", "msi-map-mask", &msi_ctrl, dev_id);
ret = of_map_msi_id(dev->of_node, dev->id, &msi_ctrl, &msi_spec);
if (!ret)
*dev_id = msi_spec.args[0];
of_node_put(msi_spec.np);
return ret;
}
static int its_pmsi_prepare(struct irq_domain *domain, struct device *dev,

View File

@@ -82,9 +82,17 @@ EXPORT_SYMBOL(of_node_name_prefix);
static bool __of_node_is_type(const struct device_node *np, const char *type)
{
const char *match = __of_get_property(np, "device_type", NULL);
const char *match;
int len;
return np && match && type && !strcmp(match, type);
if (!np || !type)
return false;
match = __of_get_property(np, "device_type", &len);
if (!match || len <= 0 || strnlen(match, len) >= len)
return false;
return !strcmp(match, type);
}
#define EXCLUDED_DEFAULT_CELLS_PLATFORMS ( \
@@ -511,22 +519,22 @@ static bool __of_device_is_status(const struct device_node *device,
return false;
status = __of_get_property(device, "status", &statlen);
if (status == NULL)
if (!status || statlen <= 0)
return false;
if (strnlen(status, statlen) >= statlen)
return false;
if (statlen > 0) {
while (*strings) {
unsigned int len = strlen(*strings);
while (*strings) {
unsigned int len = strlen(*strings);
if ((*strings)[len - 1] == '-') {
if (!strncmp(status, *strings, len))
return true;
} else {
if (!strcmp(status, *strings))
return true;
}
strings++;
if ((*strings)[len - 1] == '-') {
if (!strncmp(status, *strings, len))
return true;
} else {
if (!strcmp(status, *strings))
return true;
}
strings++;
}
return false;
@@ -1237,10 +1245,11 @@ EXPORT_SYMBOL(of_find_matching_node_and_match);
int of_alias_from_compatible(const struct device_node *node, char *alias, int len)
{
const char *compatible, *p;
int cplen;
int ret;
compatible = of_get_property(node, "compatible", &cplen);
if (!compatible || strlen(compatible) > cplen)
ret = of_property_read_string_index(node, "compatible", 0,
&compatible);
if (ret)
return -ENODEV;
p = strchr(compatible, ',');
strscpy(alias, p ? p + 1 : compatible, len);
@@ -2116,50 +2125,84 @@ int of_find_last_cache_level(unsigned int cpu)
return cache_level;
}
/*
* Some DTs have an iommu-map targeting a 2-cell IOMMU node while
* specifying only 1 cell. Fortunately they all consist of value '1'
* as the 2nd cell entry with the same target, so check for that pattern.
*
* Example:
* IOMMU node:
* #iommu-cells = <2>;
*
* Device node:
* iommu-map = <0x0000 &smmu 0x0000 0x1>,
* <0x0100 &smmu 0x0100 0x1>;
*/
static bool of_check_bad_map(const __be32 *map, int len)
{
__be32 phandle = map[1];
if (len % 4)
return false;
for (int i = 0; i < len; i += 4) {
if (map[i + 1] != phandle || map[i + 3] != cpu_to_be32(1))
return false;
}
return true;
}
/**
* of_map_id - Translate an ID through a downstream mapping.
* @np: root complex device node.
* @id: device ID to map.
* @map_name: property name of the map to use.
* @cells_name: property name of target specifier cells.
* @map_mask_name: optional property name of the mask to use.
* @target: optional pointer to a target device node.
* @id_out: optional pointer to receive the translated ID.
* @filter_np: pointer to an optional filter node, or NULL to allow bypass.
* If non-NULL, the map property must exist (-ENODEV if absent). If
* *filter_np is also non-NULL, only entries targeting that node match.
* @arg: pointer to a &struct of_phandle_args for the result. On success,
* @arg->args_count will be set to the number of output specifier cells
* as defined by @cells_name in the target node, and
* @arg->args[0..args_count-1] will contain the translated output
* specifier values. If a map entry was matched, @arg->np will be set
* to the target node with a reference held that the caller must release
* with of_node_put().
*
* Given a device ID, look up the appropriate implementation-defined
* platform ID and/or the target device which receives transactions on that
* ID, as per the "iommu-map" and "msi-map" bindings. Either of @target or
* @id_out may be NULL if only the other is required. If @target points to
* a non-NULL device node pointer, only entries targeting that node will be
* matched; if it points to a NULL value, it will receive the device node of
* the first matching target phandle, with a reference held.
* ID, as per the "iommu-map" and "msi-map" bindings.
*
* Return: 0 on success or a standard error code on failure.
*/
int of_map_id(const struct device_node *np, u32 id,
const char *map_name, const char *map_mask_name,
struct device_node **target, u32 *id_out)
const char *map_name, const char *cells_name,
const char *map_mask_name,
struct device_node * const *filter_np, struct of_phandle_args *arg)
{
u32 map_mask, masked_id;
int map_len;
int map_bytes, map_len, offset = 0;
bool bad_map = false;
const __be32 *map = NULL;
if (!np || !map_name || (!target && !id_out))
if (!np || !map_name || !cells_name || !arg)
return -EINVAL;
/* Ensure bypass/no-match success never returns a stale target node. */
arg->np = NULL;
map = of_get_property(np, map_name, &map_len);
map = of_get_property(np, map_name, &map_bytes);
if (!map) {
if (target)
if (filter_np)
return -ENODEV;
/* Otherwise, no map implies no translation */
*id_out = id;
arg->args[0] = id;
arg->args_count = 1;
return 0;
}
if (!map_len || map_len % (4 * sizeof(*map))) {
pr_err("%pOF: Error: Bad %s length: %d\n", np,
map_name, map_len);
return -EINVAL;
}
if (map_bytes % sizeof(*map))
goto err_map_len;
map_len = map_bytes / sizeof(*map);
/* The default is to select all bits. */
map_mask = 0xffffffff;
@@ -2172,52 +2215,157 @@ int of_map_id(const struct device_node *np, u32 id,
of_property_read_u32(np, map_mask_name, &map_mask);
masked_id = map_mask & id;
for ( ; map_len > 0; map_len -= 4 * sizeof(*map), map += 4) {
while (offset < map_len) {
struct device_node *phandle_node;
u32 id_base = be32_to_cpup(map + 0);
u32 phandle = be32_to_cpup(map + 1);
u32 out_base = be32_to_cpup(map + 2);
u32 id_len = be32_to_cpup(map + 3);
u32 id_base, phandle, id_len, id_off, cells = 0;
const __be32 *out_base;
if (map_len - offset < 2)
goto err_map_len;
id_base = be32_to_cpup(map + offset);
if (id_base & ~map_mask) {
pr_err("%pOF: Invalid %s translation - %s-mask (0x%x) ignores id-base (0x%x)\n",
np, map_name, map_name,
map_mask, id_base);
pr_err("%pOF: Invalid %s translation - %s (0x%x) ignores id-base (0x%x)\n",
np, map_name, map_mask_name, map_mask, id_base);
return -EFAULT;
}
if (masked_id < id_base || masked_id >= id_base + id_len)
continue;
phandle = be32_to_cpup(map + offset + 1);
phandle_node = of_find_node_by_phandle(phandle);
if (!phandle_node)
return -ENODEV;
if (target) {
if (*target)
of_node_put(phandle_node);
else
*target = phandle_node;
/*
* Assume 1-cell output specifier if the target node lacks the
* #cells property, for backward compatibility with controllers
* that predate the property (e.g. arm,gic-v2m-frame).
*/
if (bad_map || of_property_read_u32(phandle_node, cells_name, &cells))
cells = 1;
if (*target != phandle_node)
continue;
if (cells > MAX_PHANDLE_ARGS) {
pr_err("%pOF: %s cell count %d exceeds maximum\n",
phandle_node, cells_name, cells);
of_node_put(phandle_node);
return -EINVAL;
}
if (id_out)
*id_out = masked_id - id_base + out_base;
if (offset == 0 && cells == 2) {
bad_map = of_check_bad_map(map, map_len);
if (bad_map) {
pr_warn_once("%pOF: %s has 1-cell entries targeting 2-cell %s, treating as 1-cell output\n",
np, map_name, cells_name);
cells = 1;
}
}
if (map_len - offset < 3 + cells) {
of_node_put(phandle_node);
goto err_map_len;
}
out_base = map + offset + 2;
offset += 3 + cells;
id_len = be32_to_cpup(map + offset - 1);
id_off = masked_id - id_base;
if (masked_id < id_base || id_off >= id_len) {
of_node_put(phandle_node);
continue;
}
if (id_len > 1 && cells > 1) {
/*
* With 1 output cell we reasonably assume its value
* has a linear relationship to the input; with more,
* we'd need help from the provider to know what to do.
*/
pr_err("%pOF: Unsupported %s - cannot handle %d-ID range with %d-cell output specifier\n",
np, map_name, id_len, cells);
of_node_put(phandle_node);
return -EINVAL;
}
if (filter_np && *filter_np && *filter_np != phandle_node) {
of_node_put(phandle_node);
continue;
}
arg->np = phandle_node;
for (int i = 0; i < cells; i++)
arg->args[i] = id_off + be32_to_cpu(out_base[i]);
arg->args_count = cells;
pr_debug("%pOF: %s, using mask %08x, id-base: %08x, out-base: %08x, length: %08x, id: %08x -> %08x\n",
np, map_name, map_mask, id_base, out_base,
id_len, id, masked_id - id_base + out_base);
np, map_name, map_mask, id_base,
cells ? be32_to_cpup(out_base) : 0,
id_len, id,
cells ? id_off + be32_to_cpup(out_base) : id_off);
return 0;
}
pr_info("%pOF: no %s translation for id 0x%x on %pOF\n", np, map_name,
id, target && *target ? *target : NULL);
id, filter_np && *filter_np ? *filter_np : NULL);
/* Bypasses translation */
if (id_out)
*id_out = id;
arg->args[0] = id;
arg->args_count = 1;
return 0;
err_map_len:
pr_err("%pOF: Error: Bad %s length: %d\n", np, map_name, map_bytes);
return -EINVAL;
}
EXPORT_SYMBOL_GPL(of_map_id);
/**
* of_map_iommu_id - Translate an ID using "iommu-map" bindings.
* @np: root complex device node.
* @id: Requester ID of the device (e.g. PCI RID/BDF or a platform
* stream/device ID) used as the lookup key in the iommu-map table.
* @arg: pointer to a &struct of_phandle_args for the result. On success,
* @arg->args_count will be set to the number of output specifier cells
* and @arg->args[0..args_count-1] will contain the translated output
* specifier values. If a map entry was matched, @arg->np holds a
* reference to the target node that the caller must release with
* of_node_put().
*
* Convenience wrapper around of_map_id() using "iommu-map", "#iommu-cells",
* and "iommu-map-mask".
*
* Return: 0 on success or a standard error code on failure.
*/
int of_map_iommu_id(const struct device_node *np, u32 id,
struct of_phandle_args *arg)
{
return of_map_id(np, id, "iommu-map", "#iommu-cells", "iommu-map-mask", NULL, arg);
}
EXPORT_SYMBOL_GPL(of_map_iommu_id);
/**
* of_map_msi_id - Translate an ID using "msi-map" bindings.
* @np: root complex device node.
* @id: Requester ID of the device (e.g. PCI RID/BDF or a platform
* stream/device ID) used as the lookup key in the msi-map table.
* @filter_np: pointer to an optional filter node, or NULL to allow bypass.
* If non-NULL, the map property must exist (-ENODEV if absent). If
* *filter_np is also non-NULL, only entries targeting that node match.
* @arg: pointer to a &struct of_phandle_args for the result. On success,
* @arg->args_count will be set to the number of output specifier cells
* and @arg->args[0..args_count-1] will contain the translated output
* specifier values. If a map entry was matched, @arg->np holds a
* reference to the target node that the caller must release with
* of_node_put().
*
* Convenience wrapper around of_map_id() using "msi-map", "#msi-cells",
* and "msi-map-mask".
*
* Return: 0 on success or a standard error code on failure.
*/
int of_map_msi_id(const struct device_node *np, u32 id,
struct device_node * const *filter_np, struct of_phandle_args *arg)
{
return of_map_id(np, id, "msi-map", "#msi-cells", "msi-map-mask", filter_np, arg);
}
EXPORT_SYMBOL_GPL(of_map_msi_id);

View File

@@ -60,7 +60,7 @@ static bool __of_find_n_match_cpu_property(struct device_node *cpun,
cell = of_get_property(cpun, prop_name, &prop_len);
if (!cell && !ac && arch_match_cpu_phys_id(cpu, 0))
return true;
if (!cell || !ac)
if (!cell || !ac || ac > 2)
return false;
prop_len /= sizeof(*cell) * ac;
for (tid = 0; tid < prop_len; tid++) {

Some files were not shown because too many files have changed in this diff Show More