# Device tree

---

# Open Firmware and Devicetree

_Peios Kernel / Hardware and drivers / Device tree_

> Reference for Open Firmware and Devicetree.

<a id="rst-open-firmware-and-devicetree"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

<a id="rst-kernel-devicetree-usage"></a>

## Kernel Devicetree Usage

- [Linux and the Devicetree](</kernel/hardware/devicetree/usage-model.md>)
- [Open Firmware Devicetree Unittest](</kernel/hardware/devicetree/of-unittest.md>)
- [DeviceTree Kernel API](</kernel/hardware/devicetree/kernel-api.md>)

<a id="rst-devicetree-overlays"></a>

## Devicetree Overlays

- [Devicetree Changesets](</kernel/hardware/devicetree/changesets.md>)
- [Devicetree Dynamic Resolver Notes](<https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/devicetree/dynamic-resolution-notes.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92>)
- [Devicetree Overlay Notes](</kernel/hardware/devicetree/overlay-notes.md>)

<a id="rst-devicetree-bindings"></a>

## Devicetree Bindings

- [index](<https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/devicetree/bindings/index.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92>)

---

# Device-tree binding catalogue

_Peios Kernel / Hardware and drivers / Device tree_

> Hardware binding references generated from the kernel device-tree schemas.

These references describe how hardware is represented in a device tree. Each
page comes directly from its YAML binding, including descriptions, properties,
child nodes, constraints and examples.

## Reading the rules

“Required here” means a property appears in the required list for that object.
“Not listed as required here” does not guarantee that it is optional: a shared
schema or a conditional rule may still require it. Follow shared-schema links
for the rules they contribute.

- **All of these rules** means every branch must match.
- **At least one** means one or more branches must match.
- **Exactly one** means one branch must match, and the others must not.
- **Condition**, **when it matches** and **when it does not match** retain the
  original if/then/else relationship.
- A false property rule forbids that property in its scope. A true rule adds no
  constraints there; shared device-tree rules can still apply.

Properties not matched by a schema's own property declarations are different
from properties not evaluated by all applicable rules. The references retain
that distinction rather than combining the two restrictions.

The pages show the authored schemas. The dt-schema validator also applies common
device-tree conventions and normalization, including fixed-length item lists.
Use the kernel's binding and device-tree validation commands when checking an
actual device tree; these references do not replace those checks.

The shared definitions used by the catalogue are included from dt-schema 2026.9.
Source notes retain comments and licence notices. The YAML remains authoritative.

## Browse by hardware category

- [Access controllers bindings](</kernel/hardware/devicetree-bindings/dt-access-controllers/access-controllers.md>)
- [Arc bindings](</kernel/hardware/devicetree-bindings/dt-arc/snps-archs-pct.md>)
- [ARM platform bindings](</kernel/hardware/devicetree-bindings/dt-arm/actions.md>)
- [Ata bindings](</kernel/hardware/devicetree-bindings/dt-ata/ahci-common.md>)
- [Auxdisplay bindings](</kernel/hardware/devicetree-bindings/dt-auxdisplay/arm-versatile-lcd.md>)
- [Board bindings](</kernel/hardware/devicetree-bindings/dt-board/fsl-bcsr.md>)
- [Bus bindings](</kernel/hardware/devicetree-bindings/dt-bus/allwinner-sun50i-a64-de2.md>)
- [Cache bindings](</kernel/hardware/devicetree-bindings/dt-cache/andestech-ax45mp-cache.md>)
- [Chrome bindings](</kernel/hardware/devicetree-bindings/dt-chrome/google-cros-ec-typec.md>)
- [Clock bindings](</kernel/hardware/devicetree-bindings/dt-clock/actions-owl-cmu.md>)
- [Common bindings](</kernel/hardware/devicetree-bindings/dt-common/example-schema.md>)
- [Connector bindings](</kernel/hardware/devicetree-bindings/dt-connector/gocontroll-moduline-module-slot.md>)
- [Counter bindings](</kernel/hardware/devicetree-bindings/dt-counter/fsl-ftm-quaddec.md>)
- [Cpu bindings](</kernel/hardware/devicetree-bindings/dt-cpu/idle-states.md>)
- [Cpufreq bindings](</kernel/hardware/devicetree-bindings/dt-cpufreq/airoha-en7581-cpufreq.md>)
- [Crypto bindings](</kernel/hardware/devicetree-bindings/dt-crypto/allwinner-sun4i-a10-crypto.md>)
- [Devfreq bindings](</kernel/hardware/devicetree-bindings/dt-devfreq/event/rockchip-dfi.md>)
- [Display bindings](</kernel/hardware/devicetree-bindings/dt-display/allwinner-sun4i-a10-display-backend.md>)
- [Dma bindings](</kernel/hardware/devicetree-bindings/dt-dma/adi-axi-dmac.md>)
- [Dpll bindings](</kernel/hardware/devicetree-bindings/dt-dpll/dpll-device.md>)
- [Dsp bindings](</kernel/hardware/devicetree-bindings/dt-dsp/fsl-dsp.md>)
- [Dvfs bindings](</kernel/hardware/devicetree-bindings/dt-dvfs/performance-domain.md>)
- [Edac bindings](</kernel/hardware/devicetree-bindings/dt-edac/altr-socfpga-ecc-manager.md>)
- [Eeprom bindings](</kernel/hardware/devicetree-bindings/dt-eeprom/at24.md>)
- [Embedded controller bindings](</kernel/hardware/devicetree-bindings/dt-embedded-controller/acer-aspire1-ec.md>)
- [Extcon bindings](</kernel/hardware/devicetree-bindings/dt-extcon/extcon-ptn5150.md>)
- [Firmware bindings](</kernel/hardware/devicetree-bindings/dt-firmware/amlogic-meson-gxbb-sm.md>)
- [Fpga bindings](</kernel/hardware/devicetree-bindings/dt-fpga/altr-fpga-passive-serial.md>)
- [Fsi bindings](</kernel/hardware/devicetree-bindings/dt-fsi/aspeed-ast2400-cf-fsi-master.md>)
- [Fuse bindings](</kernel/hardware/devicetree-bindings/dt-fuse/nvidia-tegra20-fuse.md>)
- [Gnss bindings](</kernel/hardware/devicetree-bindings/dt-gnss/brcm-bcm4751.md>)
- [Gpio bindings](</kernel/hardware/devicetree-bindings/dt-gpio/abilis-tb10x-gpio.md>)
- [Gpu bindings](</kernel/hardware/devicetree-bindings/dt-gpu/apple-agx.md>)
- [Hwinfo bindings](</kernel/hardware/devicetree-bindings/dt-hwinfo/loongson-ls2k-chipid.md>)
- [Hwlock bindings](</kernel/hardware/devicetree-bindings/dt-hwlock/allwinner-sun6i-a31-hwspinlock.md>)
- [Hwmon bindings](</kernel/hardware/devicetree-bindings/dt-hwmon/adi-ad741x.md>)
- [I2C bindings](</kernel/hardware/devicetree-bindings/dt-i2c/allwinner-sun6i-a31-p2wi.md>)
- [I3c bindings](</kernel/hardware/devicetree-bindings/dt-i3c/adi-i3c-master.md>)
- [Industrial I/O bindings](</kernel/hardware/devicetree-bindings/dt-iio/accel/adi-adis16201.md>)
- [Input bindings](</kernel/hardware/devicetree-bindings/dt-input/adafruit-seesaw-gamepad.md>)
- [Interconnect bindings](</kernel/hardware/devicetree-bindings/dt-interconnect/fsl-imx8m-noc.md>)
- [Interrupt controller bindings](</kernel/hardware/devicetree-bindings/dt-interrupt-controller/abilis-tb10x-ictl.md>)
- [Iommu bindings](</kernel/hardware/devicetree-bindings/dt-iommu/allwinner-sun50i-h6-iommu.md>)
- [Ipmi bindings](</kernel/hardware/devicetree-bindings/dt-ipmi/aspeed-ast2400-ibt-bmc.md>)
- [LED bindings](</kernel/hardware/devicetree-bindings/dt-leds/allwinner-sun50i-a100-ledc.md>)
- [Loongarch bindings](</kernel/hardware/devicetree-bindings/dt-loongarch/cpus.md>)
- [Mailbox bindings](</kernel/hardware/devicetree-bindings/dt-mailbox/allwinner-sun6i-a31-msgbox.md>)
- [Media bindings](</kernel/hardware/devicetree-bindings/dt-media/allegro-al5e.md>)
- [Memory controllers bindings](</kernel/hardware/devicetree-bindings/dt-memory-controllers/arm-pl172.md>)
- [Mfd bindings](</kernel/hardware/devicetree-bindings/dt-mfd/actions-atc260x.md>)
- [Mips bindings](</kernel/hardware/devicetree-bindings/dt-mips/brcm/soc.md>)
- [Misc bindings](</kernel/hardware/devicetree-bindings/dt-misc/aspeed-ast2400-cvic.md>)
- [Mmc bindings](</kernel/hardware/devicetree-bindings/dt-mmc/allwinner-sun4i-a10-mmc.md>)
- [Mtd bindings](</kernel/hardware/devicetree-bindings/dt-mtd/allwinner-sun4i-a10-nand.md>)
- [Mux bindings](</kernel/hardware/devicetree-bindings/dt-mux/gpio-mux.md>)
- [Network bindings](</kernel/hardware/devicetree-bindings/dt-net/actions-owl-emac.md>)
- [Npu bindings](</kernel/hardware/devicetree-bindings/dt-npu/arm-ethos.md>)
- [Nvme bindings](</kernel/hardware/devicetree-bindings/dt-nvme/apple-nvme-ans.md>)
- [Nvmem bindings](</kernel/hardware/devicetree-bindings/dt-nvmem/airoha-an8855-efuse.md>)
- [Opp bindings](</kernel/hardware/devicetree-bindings/dt-opp/allwinner-sun50i-h6-operating-points.md>)
- [PCI bindings](</kernel/hardware/devicetree-bindings/dt-pci/altr-pcie-root-port.md>)
- [Peci bindings](</kernel/hardware/devicetree-bindings/dt-peci/nuvoton-npcm-peci.md>)
- [Perf bindings](</kernel/hardware/devicetree-bindings/dt-perf/amlogic-g12-ddr-pmu.md>)
- [PHY bindings](</kernel/hardware/devicetree-bindings/dt-phy/airoha-en7581-pcie-phy.md>)
- [Pin control bindings](</kernel/hardware/devicetree-bindings/dt-pinctrl/actions-s500-pinctrl.md>)
- [Pmem bindings](</kernel/hardware/devicetree-bindings/dt-pmem/pmem-region.md>)
- [Power bindings](</kernel/hardware/devicetree-bindings/dt-power/actions-s500-sps.md>)
- [Powerpc bindings](</kernel/hardware/devicetree-bindings/dt-powerpc/fsl/fsl-mpc83xx.md>)
- [Pps bindings](</kernel/hardware/devicetree-bindings/dt-pps/pps-gpio.md>)
- [Ptp bindings](</kernel/hardware/devicetree-bindings/dt-ptp/amazon-vmclock.md>)
- [Pwm bindings](</kernel/hardware/devicetree-bindings/dt-pwm/adi-axi-pwmgen.md>)
- [Regulator bindings](</kernel/hardware/devicetree-bindings/dt-regulator/active-semi-act8600.md>)
- [Remoteproc bindings](</kernel/hardware/devicetree-bindings/dt-remoteproc/amlogic-meson-mx-ao-arc.md>)
- [Reserved memory bindings](</kernel/hardware/devicetree-bindings/dt-reserved-memory/google-open-dice.md>)
- [Reset bindings](</kernel/hardware/devicetree-bindings/dt-reset/allwinner-sun6i-a31-clock-reset.md>)
- [Riscv bindings](</kernel/hardware/devicetree-bindings/dt-riscv/andes.md>)
- [Rng bindings](</kernel/hardware/devicetree-bindings/dt-rng/sunw-n2-rng.md>)
- [Rtc bindings](</kernel/hardware/devicetree-bindings/dt-rtc/abracon-abx80x.md>)
- [Serial bindings](</kernel/hardware/devicetree-bindings/dt-serial/8250.md>)
- [Serio bindings](</kernel/hardware/devicetree-bindings/dt-serio/allwinner-sun4i-a10-ps2.md>)
- [Shared binding definitions](</kernel/hardware/devicetree-bindings/dt-shared/cache-controller.md>)
- [Siox bindings](</kernel/hardware/devicetree-bindings/dt-siox/eckelmann-siox-gpio.md>)
- [Slimbus bindings](</kernel/hardware/devicetree-bindings/dt-slimbus/qcom-slim-ngd.md>)
- [Soc bindings](</kernel/hardware/devicetree-bindings/dt-soc/altera/altr-sys-mgr.md>)
- [Audio bindings](</kernel/hardware/devicetree-bindings/dt-sound/adi-adau1372.md>)
- [Soundwire bindings](</kernel/hardware/devicetree-bindings/dt-soundwire/qcom-soundwire.md>)
- [Spi bindings](</kernel/hardware/devicetree-bindings/dt-spi/adi-axi-spi-engine.md>)
- [Spmi bindings](</kernel/hardware/devicetree-bindings/dt-spmi/apple-spmi.md>)
- [Sram bindings](</kernel/hardware/devicetree-bindings/dt-sram/allwinner-sun4i-a10-system-control.md>)
- [Thermal bindings](</kernel/hardware/devicetree-bindings/dt-thermal/airoha-en7581-thermal.md>)
- [Timer bindings](</kernel/hardware/devicetree-bindings/dt-timer/actions-owl-timer.md>)
- [Timestamp bindings](</kernel/hardware/devicetree-bindings/dt-timestamp/hardware-timestamps-common.md>)
- [Tpm bindings](</kernel/hardware/devicetree-bindings/dt-tpm/google-cr50.md>)
- [Trigger source bindings](</kernel/hardware/devicetree-bindings/dt-trigger-source/adi-util-sigma-delta-spi.md>)
- [Ufs bindings](</kernel/hardware/devicetree-bindings/dt-ufs/amd-versal2-ufs.md>)
- [USB bindings](</kernel/hardware/devicetree-bindings/dt-usb/allwinner-sun4i-a10-musb.md>)
- [Virtio bindings](</kernel/hardware/devicetree-bindings/dt-virtio/mmio.md>)
- [W1 bindings](</kernel/hardware/devicetree-bindings/dt-w1/amd-axi-1wire-host.md>)
- [Watchdog bindings](</kernel/hardware/devicetree-bindings/dt-watchdog/airoha-en7581-wdt.md>)

---

# Devicetree Changesets

_Peios Kernel / Hardware and drivers / Device tree_

> A Devicetree changeset is a method which allows one to apply changes in the live tree in such a way that either the full set of changes will be applied, or none of them will be. If an error occurs partway through applying the changeset,…

<a id="rst-devicetree-changesets"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

A Devicetree changeset is a method which allows one to apply changes in the live tree in such a way that either the full set of changes will be applied, or none of them will be. If an error occurs partway through applying the changeset, then the tree will be rolled back to the previous state. A changeset can also be removed after it has been applied.

When a changeset is applied, all of the changes get applied to the tree at once before emitting OF_RECONFIG notifiers. This is so that the receiver sees a complete and consistent state of the tree when it receives the notifier.

The sequence of a changeset is as follows.

1. of_changeset_init() - initializes a changeset

2. A number of DT tree change calls, of_changeset_attach_node(), of_changeset_detach_node(), of_changeset_add_property(), of_changeset_remove_property, of_changeset_update_property() to prepare a set of changes. No changes to the active tree are made at this point. All the change operations are recorded in the of_changeset 'entries' list.

3. of_changeset_apply() - Apply the changes to the tree. Either the entire changeset will get applied, or if there is an error the tree will be restored to the previous state. The core ensures proper serialization through locking. An unlocked version \__of_changeset_apply is available, if needed.

If a successfully applied changeset needs to be removed, it can be done with of_changeset_revert().

---

# Devicetree Dynamic Resolver Notes

_Peios Kernel / Hardware and drivers / Device tree_

> This document describes the implementation of the in-kernel DeviceTree resolver, residing in drivers/of/resolver.c

<a id="rst-devicetree-dynamic-resolver-notes"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

This document describes the implementation of the in-kernel DeviceTree resolver, residing in drivers/of/resolver.c

<a id="rst-how-the-resolver-works"></a>

## How the resolver works

The resolver is given as an input an arbitrary tree compiled with the proper dtc option and having a /plugin/ tag. This generates the appropriate \_\_fixups\_\_ &amp; \_\_local\_fixups\_\_ nodes.

In sequence the resolver works by the following steps:

1. Get the maximum device tree phandle value from the live tree + 1.

2. Adjust all the local phandles of the tree to resolve by that amount.

3. Using the \_\_local\_\_fixups\_\_ node information adjust all local references by the same amount.

4. For each property in the \_\_fixups\_\_ node locate the node it references in the live tree. This is the label used to tag the node.

5. Retrieve the phandle of the target of the fixup.

6. For each fixup in the property locate the node:property:offset location and replace it with the phandle value.

---

# DeviceTree Kernel API

_Peios Kernel / Hardware and drivers / Device tree_

> Reference for DeviceTree Kernel API.

<a id="rst-devicetree-kernel-api"></a>
<a id="rst-devicetree"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

<a id="rst-core-functions"></a>

## Core functions


#### <a id="c-of_find_all_nodes"></a>`of_find_all_nodes()`

```c
struct device_node * of_find_all_nodes(struct device_node *prev)
```

Get next node in global list

**Parameters**

- `struct device_node *prev`: Previous node or NULL to start iteration
  [`of_node_put()`](#c-of_node_put) will be called on it

**Return**

A node pointer with refcount incremented, use
[`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_machine_compatible_match"></a>`of_machine_compatible_match()`

```c
bool of_machine_compatible_match(const char *const *compats)
```

Test root of device tree against a compatible array

**Parameters**

- `const char *const *compats`: NULL terminated array of compatible strings to look for in root node's compatible property.

**Description**

Returns true if the root node has any of the given compatible values in its
compatible property.

#### <a id="c-of_machine_device_match"></a>`of_machine_device_match()`

```c
bool of_machine_device_match(const struct of_device_id *matches)
```

Test root of device tree against a of_device_id array

**Parameters**

- `const struct of_device_id *matches`: NULL terminated array of of_device_id match structures to search in

**Description**

Returns true if the root node has any of the given compatible values in its
compatible property.

#### <a id="c-of_machine_get_match_data"></a>`of_machine_get_match_data()`

```c
const void * of_machine_get_match_data(const struct of_device_id *matches)
```

Tell if root of device tree has a matching of_match structure

**Parameters**

- `const struct of_device_id *matches`: NULL terminated array of of_device_id match structures to search in

**Description**

Returns data associated with matched entry or NULL

#### <a id="c-of_device_is_available"></a>`of_device_is_available()`

```c
bool of_device_is_available(const struct device_node *device)
```

check if a device is available for use

**Parameters**

- `const struct device_node *device`: Node to check for availability

**Return**

True if the status property is absent or set to "okay" or "ok",
false otherwise

#### <a id="c-of_device_is_big_endian"></a>`of_device_is_big_endian()`

```c
bool of_device_is_big_endian(const struct device_node *device)
```

check if a device has BE registers

**Parameters**

- `const struct device_node *device`: Node to check for endianness

**Return**

True if the device has a "big-endian" property, or if the kernel
was compiled for BE *and* the device has a "native-endian" property.
Returns false otherwise.

**Description**

Callers would nominally use ioread32be/iowrite32be if
[`of_device_is_big_endian()`](#c-of_device_is_big_endian) == true, or readl/writel otherwise.

#### <a id="c-of_get_parent"></a>`of_get_parent()`

```c
struct device_node * of_get_parent(const struct device_node *node)
```

Get a node's parent if any

**Parameters**

- `const struct device_node *node`: Node to get parent

**Return**

A node pointer with refcount incremented, use
[`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_get_next_parent"></a>`of_get_next_parent()`

```c
struct device_node * of_get_next_parent(struct device_node *node)
```

Iterate to a node's parent

**Parameters**

- `struct device_node *node`: Node to get parent of

**Description**

This is like [`of_get_parent()`](#c-of_get_parent) except that it drops the
refcount on the passed node, making it suitable for iterating
through a node's parents.

**Return**

A node pointer with refcount incremented, use
[`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_get_next_child"></a>`of_get_next_child()`

```c
struct device_node * of_get_next_child(const struct device_node *node, struct device_node *prev)
```

Iterate a node childs

**Parameters**

- `const struct device_node *node`: parent node
- `struct device_node *prev`: previous child of the parent node, or NULL to get first

**Return**

A node pointer with refcount incremented, use [`of_node_put()`](#c-of_node_put) on
it when done. Returns NULL when prev is the last child. Decrements the
refcount of prev.

#### <a id="c-of_get_next_child_with_prefix"></a>`of_get_next_child_with_prefix()`

```c
struct device_node * of_get_next_child_with_prefix(const struct device_node *node, struct device_node *prev, const char *prefix)
```

Find the next child node with prefix

**Parameters**

- `const struct device_node *node`: parent node
- `struct device_node *prev`: previous child of the parent node, or NULL to get first
- `const char *prefix`: prefix that the node name should have

**Description**

This function is like [`of_get_next_child()`](#c-of_get_next_child), except that it automatically
skips any nodes whose name doesn't have the given prefix.

**Return**

A node pointer with refcount incremented, use
[`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_get_next_available_child"></a>`of_get_next_available_child()`

```c
struct device_node * of_get_next_available_child(const struct device_node *node, struct device_node *prev)
```

Find the next available child node

**Parameters**

- `const struct device_node *node`: parent node
- `struct device_node *prev`: previous child of the parent node, or NULL to get first

**Description**

This function is like [`of_get_next_child()`](#c-of_get_next_child), except that it
automatically skips any disabled nodes (i.e. status = "disabled").

#### <a id="c-of_get_next_reserved_child"></a>`of_get_next_reserved_child()`

```c
struct device_node * of_get_next_reserved_child(const struct device_node *node, struct device_node *prev)
```

Find the next reserved child node

**Parameters**

- `const struct device_node *node`: parent node
- `struct device_node *prev`: previous child of the parent node, or NULL to get first

**Description**

This function is like [`of_get_next_child()`](#c-of_get_next_child), except that it
automatically skips any disabled nodes (i.e. status = "disabled").

#### <a id="c-of_get_next_cpu_node"></a>`of_get_next_cpu_node()`

```c
struct device_node * of_get_next_cpu_node(struct device_node *prev)
```

Iterate on cpu nodes

**Parameters**

- `struct device_node *prev`: previous child of the /cpus node, or NULL to get first

**Description**

Unusable CPUs (those with the status property set to "fail" or "fail-...")
will be skipped.

**Return**

A cpu node pointer with refcount incremented, use [`of_node_put()`](#c-of_node_put)
on it when done. Returns NULL when prev is the last child. Decrements
the refcount of prev.

#### <a id="c-of_get_compatible_child"></a>`of_get_compatible_child()`

```c
struct device_node * of_get_compatible_child(const struct device_node *parent, const char *compatible)
```

Find compatible child node

**Parameters**

- `const struct device_node *parent`: parent node
- `const char *compatible`: compatible string

**Description**

Lookup child node whose compatible property contains the given compatible
string.

**Return**

a node pointer with refcount incremented, use [`of_node_put()`](#c-of_node_put) on it
when done; or NULL if not found.

#### <a id="c-of_get_child_by_name"></a>`of_get_child_by_name()`

```c
struct device_node * of_get_child_by_name(const struct device_node *node, const char *name)
```

Find the child node by name for a given parent

**Parameters**

- `const struct device_node *node`: parent node
- `const char *name`: child name to look for.

**Description**

This function looks for child node for given matching name

**Return**

A node pointer if found, with refcount incremented, use
[`of_node_put()`](#c-of_node_put) on it when done.
Returns NULL if node is not found.

#### <a id="c-of_get_available_child_by_name"></a>`of_get_available_child_by_name()`

```c
struct device_node * of_get_available_child_by_name(const struct device_node *node, const char *name)
```

Find the available child node by name for a given parent

**Parameters**

- `const struct device_node *node`: parent node
- `const char *name`: child name to look for.

**Description**

This function looks for child node for given matching name and checks the
device's availability for use.

**Return**

A node pointer if found, with refcount incremented, use
[`of_node_put()`](#c-of_node_put) on it when done.
Returns NULL if node is not found.

#### <a id="c-of_find_node_opts_by_path"></a>`of_find_node_opts_by_path()`

```c
struct device_node * of_find_node_opts_by_path(const char *path, const char **opts)
```

Find a node matching a full OF path

**Parameters**

- `const char *path`: Either the full path to match, or if the path does not
  start with '/', the name of a property of the /aliases
  node (an alias).  In the case of an alias, the node
  matching the alias' value will be returned.
- `const char **opts`: Address of a pointer into which to store the start of
  an options string appended to the end of the path with
  a ':' separator.

**Description**

- Valid paths:
  * /foo/bar  Full path
  * foo       Valid alias
  * foo/bar   Valid alias + relative path

**Return**

A node pointer with refcount incremented, use
[`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_find_node_by_name"></a>`of_find_node_by_name()`

```c
struct device_node * of_find_node_by_name(struct device_node *from, const char *name)
```

Find a node by its "name" property

**Parameters**

- `struct device_node *from`: The node to start searching from or NULL; the node
  you pass will not be searched, only the next one
  will. Typically, you pass what the previous call
  returned. [`of_node_put()`](#c-of_node_put) will be called on **from**.
- `const char *name`: The name string to match against

**Return**

A node pointer with refcount incremented, use
[`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_find_node_by_type"></a>`of_find_node_by_type()`

```c
struct device_node * of_find_node_by_type(struct device_node *from, const char *type)
```

Find a node by its "device_type" property

**Parameters**

- `struct device_node *from`: The node to start searching from, or NULL to start searching
  the entire device tree. The node you pass will not be
  searched, only the next one will; typically, you pass
  what the previous call returned. [`of_node_put()`](#c-of_node_put) will be
  called on from for you.
- `const char *type`: The type string to match against

**Return**

A node pointer with refcount incremented, use
[`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_find_compatible_node"></a>`of_find_compatible_node()`

```c
struct device_node * of_find_compatible_node(struct device_node *from, const char *type, const char *compatible)
```

Find a node based on type and one of the tokens in its "compatible" property

**Parameters**

- `struct device_node *from`: The node to start searching from or NULL, the node
  you pass will not be searched, only the next one
  will; typically, you pass what the previous call
  returned. [`of_node_put()`](#c-of_node_put) will be called on it
- `const char *type`: The type string to match "device_type" or NULL to ignore
- `const char *compatible`: The string to match to one of the tokens in the device
  "compatible" list.

**Return**

A node pointer with refcount incremented, use
[`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_find_node_with_property"></a>`of_find_node_with_property()`

```c
struct device_node * of_find_node_with_property(struct device_node *from, const char *prop_name)
```

Find a node which has a property with the given name.

**Parameters**

- `struct device_node *from`: The node to start searching from or NULL, the node
  you pass will not be searched, only the next one
  will; typically, you pass what the previous call
  returned. [`of_node_put()`](#c-of_node_put) will be called on it
- `const char *prop_name`: The name of the property to look for.

**Return**

A node pointer with refcount incremented, use
[`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_match_node"></a>`of_match_node()`

```c
const struct of_device_id * of_match_node(const struct of_device_id *matches, const struct device_node *node)
```

Tell if a device_node has a matching of_match structure

**Parameters**

- `const struct of_device_id *matches`: array of of device match structures to search in
- `const struct device_node *node`: the of device structure to match against

**Description**

Low level utility function used by device matching.

#### <a id="c-of_find_matching_node_and_match"></a>`of_find_matching_node_and_match()`

```c
struct device_node * of_find_matching_node_and_match(struct device_node *from, const struct of_device_id *matches, const struct of_device_id **match)
```

Find a node based on an of_device_id match table.

**Parameters**

- `struct device_node *from`: The node to start searching from or NULL, the node
  you pass will not be searched, only the next one
  will; typically, you pass what the previous call
  returned. [`of_node_put()`](#c-of_node_put) will be called on it
- `const struct of_device_id *matches`: array of of device match structures to search in
- `const struct of_device_id **match`: Updated to point at the matches entry which matched

**Return**

A node pointer with refcount incremented, use
[`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_alias_from_compatible"></a>`of_alias_from_compatible()`

```c
int of_alias_from_compatible(const struct device_node *node, char *alias, int len)
```

Lookup appropriate alias for a device node depending on compatible

**Parameters**

- `const struct device_node *node`: pointer to a device tree node
- `char *alias`: Pointer to buffer that alias value will be copied into
- `int len`: Length of alias value

**Description**

Based on the value of the compatible property, this routine will attempt
to choose an appropriate alias value for a particular device tree node.
It does this by stripping the manufacturer prefix (as delimited by a ',')
from the first entry in the compatible list property.

**Note**

The matching on just the "product" side of the compatible is a relic
from I2C and SPI. Please do not add any new user.

**Return**

This routine returns 0 on success, \<0 on failure.

#### <a id="c-of_find_node_by_phandle"></a>`of_find_node_by_phandle()`

```c
struct device_node * of_find_node_by_phandle(phandle handle)
```

Find a node given a phandle

**Parameters**

- `phandle handle`: phandle of the node to find

**Return**

A node pointer with refcount incremented, use
[`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_parse_phandle_with_args_map"></a>`of_parse_phandle_with_args_map()`

```c
int of_parse_phandle_with_args_map(const struct device_node *np, const char *list_name, const char *stem_name, int index, struct of_phandle_args *out_args)
```

Find a node pointed by phandle in a list and remap it

**Parameters**

- `const struct device_node *np`: pointer to a device tree node containing a list
- `const char *list_name`: property name that contains a list
- `const char *stem_name`: stem of property names that specify phandles' arguments count
- `int index`: index of a phandle to parse out
- `struct of_phandle_args *out_args`: optional pointer to output arguments structure (will be filled)

**Description**

This function is useful to parse lists of phandles and their arguments.
Returns 0 on success and fills out_args, on error returns appropriate errno
value. The difference between this function and [`of_parse_phandle_with_args()`](#c-of_parse_phandle_with_args)
is that this API remaps a phandle if the node the phandle points to has
a \<**stem_name**>-map property.

Caller is responsible to call [`of_node_put()`](#c-of_node_put) on the returned out_args->np
pointer.

Example:

```text
phandle1: node1 {
    #list-cells = <2>;
};

phandle2: node2 {
    #list-cells = <1>;
};

phandle3: node3 {
    #list-cells = <1>;
    list-map = <0 &phandle2 3>,
               <1 &phandle2 2>,
               <2 &phandle1 5 1>;
    list-map-mask = <0x3>;
};

node4 {
    list = <&phandle1 1 2 &phandle3 0>;
};
```

To get a device_node of the `node2` node you may call this:
of_parse_phandle_with_args(node4, "list", "list", 1, `args`);

#### <a id="c-of_count_phandle_with_args"></a>`of_count_phandle_with_args()`

```c
int of_count_phandle_with_args(const struct device_node *np, const char *list_name, const char *cells_name)
```

Find the number of phandles references in a property

**Parameters**

- `const struct device_node *np`: pointer to a device tree node containing a list
- `const char *list_name`: property name that contains a list
- `const char *cells_name`: property name that specifies phandles' arguments count

**Return**

The number of phandle + argument tuples within a property. It
is a typical pattern to encode a list of phandle and variable
arguments into a single property. The number of arguments is encoded
by a property in the phandle-target node. For example, a gpios
property would contain a list of GPIO specifies consisting of a
phandle and 1 or more arguments. The number of arguments are
determined by the #gpio-cells property in the node pointed to by the
phandle.

#### <a id="c-of_add_property"></a>`of_add_property()`

```c
int of_add_property(struct device_node *np, struct property *prop)
```

Add a property to a node

**Parameters**

- `struct device_node *np`: Caller's Device Node
- `struct property *prop`: Property to add

#### <a id="c-of_remove_property"></a>`of_remove_property()`

```c
int of_remove_property(struct device_node *np, struct property *prop)
```

Remove a property from a node.

**Parameters**

- `struct device_node *np`: Caller's Device Node
- `struct property *prop`: Property to remove

**Description**

Note that we don't actually remove it, since we have given out
who-knows-how-many pointers to the data using get-property.
Instead we just move the property to the "dead properties"
list, so it won't be found any more.

#### <a id="c-of_alias_get_id"></a>`of_alias_get_id()`

```c
int of_alias_get_id(const struct device_node *np, const char *stem)
```

Get alias id for the given device_node

**Parameters**

- `const struct device_node *np`: Pointer to the given device_node
- `const char *stem`: Alias stem of the given device_node

**Description**

The function travels the lookup table to get the alias id for the given
device_node and alias stem.

**Return**

The alias id if found.

#### <a id="c-of_alias_get_highest_id"></a>`of_alias_get_highest_id()`

```c
int of_alias_get_highest_id(const char *stem)
```

Get highest alias id for the given stem

**Parameters**

- `const char *stem`: Alias stem to be examined

**Description**

The function travels the lookup table to get the highest alias id for the
given alias stem.  It returns the alias id if found.

#### <a id="c-of_console_check"></a>`of_console_check()`

```c
bool of_console_check(const struct device_node *dn, char *name, int index)
```

Test and setup console for DT setup

**Parameters**

- `const struct device_node *dn`: Pointer to device node
- `char *name`: Name to use for preferred console without index. ex. "ttyS"
- `int index`: Index to use for preferred console.

**Description**

Check if the given device node matches the stdout-path property in the
/chosen node. If it does then register it as the preferred console.

**Return**

TRUE if console successfully setup. Otherwise return FALSE.

#### <a id="c-of_map_id"></a>`of_map_id()`

```c
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)
```

Translate an ID through a downstream mapping.

**Parameters**

- `const struct device_node *np`: root complex device node.
- `u32 id`: device ID to map.
- `const char *map_name`: property name of the map to use.
- `const char *map_mask_name`: optional property name of the mask to use.
- `struct device_node **target`: optional pointer to a target device node.
- `u32 *id_out`: optional pointer to receive the translated ID.

**Description**

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.

**Return**

0 on success or a standard error code on failure.



#### <a id="c-of_node_init"></a>`of_node_init()`

```c
void of_node_init(struct device_node *node)
```

initialize a devicetree node

**Parameters**

- `struct device_node *node`: Pointer to device node that has been created by [`kzalloc()`](/kernel/internals/core-api/mm-api.md#c-kzalloc)

**Description**

On return the device_node refcount is set to one.  Use [`of_node_put()`](#c-of_node_put)
on **node** when done to free the memory allocated for it.  If the node
is NOT a dynamic node the memory will not be freed. The decision of
whether to free the memory will be done by node->`release()`, which is
`of_node_release()`.

#### <a id="c-of_machine_is_compatible"></a>`of_machine_is_compatible()`

```c
bool of_machine_is_compatible(const char *compat)
```

Test root of device tree for a given compatible value

**Parameters**

- `const char *compat`: compatible string to look for in root node's compatible property.

**Return**

true if the root node has the given value in its compatible property.

#### <a id="c-of_parse_phandle"></a>`of_parse_phandle()`

```c
struct device_node * of_parse_phandle(const struct device_node *np, const char *phandle_name, int index)
```

Resolve a phandle property to a device_node pointer

**Parameters**

- `const struct device_node *np`: Pointer to device node holding phandle property
- `const char *phandle_name`: Name of property holding a phandle value
- `int index`: For properties holding a table of phandles, this is the index into
  the table

**Return**

The device_node pointer with refcount incremented.  Use
[`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_parse_phandle_with_args"></a>`of_parse_phandle_with_args()`

```c
int of_parse_phandle_with_args(const struct device_node *np, const char *list_name, const char *cells_name, int index, struct of_phandle_args *out_args)
```

Find a node pointed by phandle in a list

**Parameters**

- `const struct device_node *np`: pointer to a device tree node containing a list
- `const char *list_name`: property name that contains a list
- `const char *cells_name`: property name that specifies phandles' arguments count
- `int index`: index of a phandle to parse out
- `struct of_phandle_args *out_args`: optional pointer to output arguments structure (will be filled)

**Description**

This function is useful to parse lists of phandles and their arguments.
Returns 0 on success and fills out_args, on error returns appropriate
errno value.

Caller is responsible to call [`of_node_put()`](#c-of_node_put) on the returned out_args->np
pointer.

Example:

```text
phandle1: node1 {
    #list-cells = <2>;
};

phandle2: node2 {
    #list-cells = <1>;
};

node3 {
    list = <&phandle1 1 2 &phandle2 3>;
};
```

To get a device_node of the `node2` node you may call this:
of_parse_phandle_with_args(node3, "list", "#list-cells", 1, `args`);

#### <a id="c-of_parse_phandle_with_fixed_args"></a>`of_parse_phandle_with_fixed_args()`

```c
int of_parse_phandle_with_fixed_args(const struct device_node *np, const char *list_name, int cell_count, int index, struct of_phandle_args *out_args)
```

Find a node pointed by phandle in a list

**Parameters**

- `const struct device_node *np`: pointer to a device tree node containing a list
- `const char *list_name`: property name that contains a list
- `int cell_count`: number of argument cells following the phandle
- `int index`: index of a phandle to parse out
- `struct of_phandle_args *out_args`: optional pointer to output arguments structure (will be filled)

**Description**

This function is useful to parse lists of phandles and their arguments.
Returns 0 on success and fills out_args, on error returns appropriate
errno value.

Caller is responsible to call [`of_node_put()`](#c-of_node_put) on the returned out_args->np
pointer.

Example:

```text
phandle1: node1 {
};

phandle2: node2 {
};

node3 {
    list = <&phandle1 0 2 &phandle2 2 3>;
};
```

To get a device_node of the `node2` node you may call this:
of_parse_phandle_with_fixed_args(node3, "list", 2, 1, `args`);

#### <a id="c-of_parse_phandle_with_optional_args"></a>`of_parse_phandle_with_optional_args()`

```c
int of_parse_phandle_with_optional_args(const struct device_node *np, const char *list_name, const char *cells_name, int index, struct of_phandle_args *out_args)
```

Find a node pointed by phandle in a list

**Parameters**

- `const struct device_node *np`: pointer to a device tree node containing a list
- `const char *list_name`: property name that contains a list
- `const char *cells_name`: property name that specifies phandles' arguments count
- `int index`: index of a phandle to parse out
- `struct of_phandle_args *out_args`: optional pointer to output arguments structure (will be filled)

**Description**

Same as [`of_parse_phandle_with_args()`](#c-of_parse_phandle_with_args) except that if the cells_name property
is not found, cell_count of 0 is assumed.

This is used to useful, if you have a phandle which didn't have arguments
before and thus doesn't have a '#*-cells' property but is now migrated to
having arguments while retaining backwards compatibility.

#### <a id="c-of_phandle_args_equal"></a>`of_phandle_args_equal()`

```c
bool of_phandle_args_equal(const struct of_phandle_args *a1, const struct of_phandle_args *a2)
```

Compare two of_phandle_args

**Parameters**

- `const struct of_phandle_args *a1`: First of_phandle_args to compare
- `const struct of_phandle_args *a2`: Second of_phandle_args to compare

**Return**

True if a1 and a2 are the same (same node pointer, same phandle
args), false otherwise.

#### <a id="c-of_property_count_u8_elems"></a>`of_property_count_u8_elems()`

```c
int of_property_count_u8_elems(const struct device_node *np, const char *propname)
```

Count the number of u8 elements in a property

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.

**Description**

Search for a property in a device node and count the number of u8 elements
in it.

**Return**

The number of elements on success, -EINVAL if the property does
not exist or its length does not match a multiple of u8 and -ENODATA if the
property does not have a value.

#### <a id="c-of_property_count_u16_elems"></a>`of_property_count_u16_elems()`

```c
int of_property_count_u16_elems(const struct device_node *np, const char *propname)
```

Count the number of u16 elements in a property

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.

**Description**

Search for a property in a device node and count the number of u16 elements
in it.

**Return**

The number of elements on success, -EINVAL if the property does
not exist or its length does not match a multiple of u16 and -ENODATA if the
property does not have a value.

#### <a id="c-of_property_count_u32_elems"></a>`of_property_count_u32_elems()`

```c
int of_property_count_u32_elems(const struct device_node *np, const char *propname)
```

Count the number of u32 elements in a property

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.

**Description**

Search for a property in a device node and count the number of u32 elements
in it.

**Return**

The number of elements on success, -EINVAL if the property does
not exist or its length does not match a multiple of u32 and -ENODATA if the
property does not have a value.

#### <a id="c-of_property_count_u64_elems"></a>`of_property_count_u64_elems()`

```c
int of_property_count_u64_elems(const struct device_node *np, const char *propname)
```

Count the number of u64 elements in a property

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.

**Description**

Search for a property in a device node and count the number of u64 elements
in it.

**Return**

The number of elements on success, -EINVAL if the property does
not exist or its length does not match a multiple of u64 and -ENODATA if the
property does not have a value.

#### <a id="c-of_property_read_string_array"></a>`of_property_read_string_array()`

```c
int of_property_read_string_array(const struct device_node *np, const char *propname, const char **out_strs, size_t sz)
```

Read an array of strings from a multiple strings property.

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `const char **out_strs`: output array of string pointers.
- `size_t sz`: number of array elements to read.

**Description**

Search for a property in a device tree node and retrieve a list of
terminated string values (pointer to data, not a copy) in that property.

**Return**

If **out_strs** is NULL, the number of strings in the property is returned.

#### <a id="c-of_property_count_strings"></a>`of_property_count_strings()`

```c
int of_property_count_strings(const struct device_node *np, const char *propname)
```

Find and return the number of strings from a multiple strings property.

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.

**Description**

Search for a property in a device tree node and retrieve the number of null
terminated string contain in it.

**Return**

The number of strings on success, -EINVAL if the property does not
exist, -ENODATA if property does not have a value, and -EILSEQ if the string
is not null-terminated within the length of the property data.

#### <a id="c-of_property_read_string_index"></a>`of_property_read_string_index()`

```c
int of_property_read_string_index(const struct device_node *np, const char *propname, int index, const char **output)
```

Find and read a string from a multiple strings property.

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `int index`: index of the string in the list of strings
- `const char **output`: pointer to null terminated return string, modified only if
  return value is 0.

**Description**

Search for a property in a device tree node and retrieve a null
terminated string value (pointer to data, not a copy) in the list of strings
contained in that property.

The out_string pointer is modified only if a valid string can be decoded.

**Return**

0 on success, -EINVAL if the property does not exist, -ENODATA if
property does not have a value, and -EILSEQ if the string is not
null-terminated within the length of the property data.

#### <a id="c-of_property_present"></a>`of_property_present()`

```c
bool of_property_present(const struct device_node *np, const char *propname)
```

Test if a property is present in a node

**Parameters**

- `const struct device_node *np`: device node to search for the property.
- `const char *propname`: name of the property to be searched.

**Description**

Test for a property present in a device node.

**Return**

true if the property exists false otherwise.

#### <a id="c-of_property_read_u8_array"></a>`of_property_read_u8_array()`

```c
int of_property_read_u8_array(const struct device_node *np, const char *propname, u8 *out_values, size_t sz)
```

Find and read an array of u8 from a property.

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `u8 *out_values`: pointer to return value, modified only if return value is 0.
- `size_t sz`: number of array elements to read

**Description**

Search for a property in a device node and read 8-bit value(s) from
it.

- dts entry of array should be like:
  `property = /bits/ 8 <0x50 0x60 0x70>;`

The out_values is modified only if a valid u8 value can be decoded.

**Return**

0 on success, -EINVAL if the property does not exist,
-ENODATA if property does not have a value, and -EOVERFLOW if the
property data isn't large enough.

#### <a id="c-of_property_read_u16_array"></a>`of_property_read_u16_array()`

```c
int of_property_read_u16_array(const struct device_node *np, const char *propname, u16 *out_values, size_t sz)
```

Find and read an array of u16 from a property.

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `u16 *out_values`: pointer to return value, modified only if return value is 0.
- `size_t sz`: number of array elements to read

**Description**

Search for a property in a device node and read 16-bit value(s) from
it.

- dts entry of array should be like:
  `property = /bits/ 16 <0x5000 0x6000 0x7000>;`

The out_values is modified only if a valid u16 value can be decoded.

**Return**

0 on success, -EINVAL if the property does not exist,
-ENODATA if property does not have a value, and -EOVERFLOW if the
property data isn't large enough.

#### <a id="c-of_property_read_u32_array"></a>`of_property_read_u32_array()`

```c
int of_property_read_u32_array(const struct device_node *np, const char *propname, u32 *out_values, size_t sz)
```

Find and read an array of 32 bit integers from a property.

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `u32 *out_values`: pointer to return value, modified only if return value is 0.
- `size_t sz`: number of array elements to read

**Description**

Search for a property in a device node and read 32-bit value(s) from
it.

The out_values is modified only if a valid u32 value can be decoded.

**Return**

0 on success, -EINVAL if the property does not exist,
-ENODATA if property does not have a value, and -EOVERFLOW if the
property data isn't large enough.

#### <a id="c-of_property_read_u64_array"></a>`of_property_read_u64_array()`

```c
int of_property_read_u64_array(const struct device_node *np, const char *propname, u64 *out_values, size_t sz)
```

Find and read an array of 64 bit integers from a property.

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `u64 *out_values`: pointer to return value, modified only if return value is 0.
- `size_t sz`: number of array elements to read

**Description**

Search for a property in a device node and read 64-bit value(s) from
it.

The out_values is modified only if a valid u64 value can be decoded.

**Return**

0 on success, -EINVAL if the property does not exist,
-ENODATA if property does not have a value, and -EOVERFLOW if the
property data isn't large enough.

#### <a id="c-struct-of_changeset_entry"></a>`struct of_changeset_entry`

Holds a changeset entry

**Definition**

```c
struct of_changeset_entry {
    struct list_head node;
    unsigned long action;
    struct device_node *np;
    struct property *prop;
    struct property *old_prop;
};
```

**Members**

- `node`: list_head for the log list
- `action`: notifier action
- `np`: pointer to the device node affected
- `prop`: pointer to the property affected
- `old_prop`: hold a pointer to the original property

**Description**

Every modification of the device tree during a changeset
is held in a list of of_changeset_entry structures.
That way we can recover from a partial application, or we can
revert the changeset

#### <a id="c-struct-of_changeset"></a>`struct of_changeset`

changeset tracker structure

**Definition**

```c
struct of_changeset {
    struct list_head entries;
};
```

**Members**

- `entries`: list_head for the changeset entries

**Description**

changesets are a convenient way to apply bulk changes to the
live tree. In case of an error, changes are rolled-back.
changesets live on after initial application, and if not
destroyed after use, they can be reverted in one single call.

#### <a id="c-of_device_is_system_power_controller"></a>`of_device_is_system_power_controller()`

```c
bool of_device_is_system_power_controller(const struct device_node *np)
```

Tells if system-power-controller is found for device_node

**Parameters**

- `const struct device_node *np`: Pointer to the given device_node

**Return**

true if present false otherwise

#### <a id="c-of_have_populated_dt"></a>`of_have_populated_dt()`

```c
bool of_have_populated_dt(void)
```

Has DT been populated by bootloader

**Parameters**

- `void`: no arguments

**Return**

True if a DTB has been populated by the bootloader and it isn't the
empty builtin one. False otherwise.



#### <a id="c-of_property_read_bool"></a>`of_property_read_bool()`

```c
bool of_property_read_bool(const struct device_node *np, const char *propname)
```

Find a property

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.

**Description**

Search for a boolean property in a device node. Usage on non-boolean
property types is deprecated.

**Return**

true if the property exists false otherwise.

#### <a id="c-of_graph_is_present"></a>`of_graph_is_present()`

```c
bool of_graph_is_present(const struct device_node *node)
```

check graph's presence

**Parameters**

- `const struct device_node *node`: pointer to device_node containing graph port

**Return**

True if **node** has a port or ports (with a port) sub-node,
false otherwise.

#### <a id="c-of_property_count_elems_of_size"></a>`of_property_count_elems_of_size()`

```c
int of_property_count_elems_of_size(const struct device_node *np, const char *propname, int elem_size)
```

Count the number of elements in a property

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `int elem_size`: size of the individual element

**Description**

Search for a property in a device node and count the number of elements of
size elem_size in it.

**Return**

The number of elements on sucess, -EINVAL if the property does not
exist or its length does not match a multiple of elem_size and -ENODATA if
the property does not have a value.

#### <a id="c-of_property_read_u8_index"></a>`of_property_read_u8_index()`

```c
int of_property_read_u8_index(const struct device_node *np, const char *propname, u32 index, u8 *out_value)
```

Find and read a u8 from a multi-value property.

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `u32 index`: index of the u8 in the list of values
- `u8 *out_value`: pointer to return value, modified only if no error.

**Description**

Search for a property in a device node and read nth 8-bit value from
it.

The out_value is modified only if a valid u8 value can be decoded.

**Return**

0 on success, -EINVAL if the property does not exist,
-ENODATA if property does not have a value, and -EOVERFLOW if the
property data isn't large enough.

#### <a id="c-of_property_read_u16_index"></a>`of_property_read_u16_index()`

```c
int of_property_read_u16_index(const struct device_node *np, const char *propname, u32 index, u16 *out_value)
```

Find and read a u16 from a multi-value property.

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `u32 index`: index of the u16 in the list of values
- `u16 *out_value`: pointer to return value, modified only if no error.

**Description**

Search for a property in a device node and read nth 16-bit value from
it.

The out_value is modified only if a valid u16 value can be decoded.

**Return**

0 on success, -EINVAL if the property does not exist,
-ENODATA if property does not have a value, and -EOVERFLOW if the
property data isn't large enough.

#### <a id="c-of_property_read_u32_index"></a>`of_property_read_u32_index()`

```c
int of_property_read_u32_index(const struct device_node *np, const char *propname, u32 index, u32 *out_value)
```

Find and read a u32 from a multi-value property.

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `u32 index`: index of the u32 in the list of values
- `u32 *out_value`: pointer to return value, modified only if no error.

**Description**

Search for a property in a device node and read nth 32-bit value from
it.

The out_value is modified only if a valid u32 value can be decoded.

**Return**

0 on success, -EINVAL if the property does not exist,
-ENODATA if property does not have a value, and -EOVERFLOW if the
property data isn't large enough.

#### <a id="c-of_property_read_u64_index"></a>`of_property_read_u64_index()`

```c
int of_property_read_u64_index(const struct device_node *np, const char *propname, u32 index, u64 *out_value)
```

Find and read a u64 from a multi-value property.

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `u32 index`: index of the u64 in the list of values
- `u64 *out_value`: pointer to return value, modified only if no error.

**Description**

Search for a property in a device node and read nth 64-bit value from
it.

The out_value is modified only if a valid u64 value can be decoded.

**Return**

0 on success, -EINVAL if the property does not exist,
-ENODATA if property does not have a value, and -EOVERFLOW if the
property data isn't large enough.

#### <a id="c-of_property_read_variable_u8_array"></a>`of_property_read_variable_u8_array()`

```c
int of_property_read_variable_u8_array(const struct device_node *np, const char *propname, u8 *out_values, size_t sz_min, size_t sz_max)
```

Find and read an array of u8 from a property, with bounds on the minimum and maximum array size.

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `u8 *out_values`: pointer to found values.
- `size_t sz_min`: minimum number of array elements to read
- `size_t sz_max`: maximum number of array elements to read, if zero there is no
  upper limit on the number of elements in the dts entry but only
  sz_min will be read.

**Description**

Search for a property in a device node and read 8-bit value(s) from
it.

- dts entry of array should be like:
  `property = /bits/ 8 <0x50 0x60 0x70>;`

The out_values is modified only if a valid u8 value can be decoded.

**Return**

The number of elements read on success, -EINVAL if the property
does not exist, -ENODATA if property does not have a value, and -EOVERFLOW
if the property data is smaller than sz_min or longer than sz_max.

#### <a id="c-of_property_read_variable_u16_array"></a>`of_property_read_variable_u16_array()`

```c
int of_property_read_variable_u16_array(const struct device_node *np, const char *propname, u16 *out_values, size_t sz_min, size_t sz_max)
```

Find and read an array of u16 from a property, with bounds on the minimum and maximum array size.

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `u16 *out_values`: pointer to found values.
- `size_t sz_min`: minimum number of array elements to read
- `size_t sz_max`: maximum number of array elements to read, if zero there is no
  upper limit on the number of elements in the dts entry but only
  sz_min will be read.

**Description**

Search for a property in a device node and read 16-bit value(s) from
it.

- dts entry of array should be like:
  `property = /bits/ 16 <0x5000 0x6000 0x7000>;`

The out_values is modified only if a valid u16 value can be decoded.

**Return**

The number of elements read on success, -EINVAL if the property
does not exist, -ENODATA if property does not have a value, and -EOVERFLOW
if the property data is smaller than sz_min or longer than sz_max.

#### <a id="c-of_property_read_variable_u32_array"></a>`of_property_read_variable_u32_array()`

```c
int of_property_read_variable_u32_array(const struct device_node *np, const char *propname, u32 *out_values, size_t sz_min, size_t sz_max)
```

Find and read an array of 32 bit integers from a property, with bounds on the minimum and maximum array size.

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `u32 *out_values`: pointer to return found values.
- `size_t sz_min`: minimum number of array elements to read
- `size_t sz_max`: maximum number of array elements to read, if zero there is no
  upper limit on the number of elements in the dts entry but only
  sz_min will be read.

**Description**

Search for a property in a device node and read 32-bit value(s) from
it.

The out_values is modified only if a valid u32 value can be decoded.

**Return**

The number of elements read on success, -EINVAL if the property
does not exist, -ENODATA if property does not have a value, and -EOVERFLOW
if the property data is smaller than sz_min or longer than sz_max.

#### <a id="c-of_property_read_u64"></a>`of_property_read_u64()`

```c
int of_property_read_u64(const struct device_node *np, const char *propname, u64 *out_value)
```

Find and read a 64 bit integer from a property

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `u64 *out_value`: pointer to return value, modified only if return value is 0.

**Description**

Search for a property in a device node and read a 64-bit value from
it.

The out_value is modified only if a valid u64 value can be decoded.

**Return**

0 on success, -EINVAL if the property does not exist,
-ENODATA if property does not have a value, and -EOVERFLOW if the
property data isn't large enough.

#### <a id="c-of_property_read_variable_u64_array"></a>`of_property_read_variable_u64_array()`

```c
int of_property_read_variable_u64_array(const struct device_node *np, const char *propname, u64 *out_values, size_t sz_min, size_t sz_max)
```

Find and read an array of 64 bit integers from a property, with bounds on the minimum and maximum array size.

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `u64 *out_values`: pointer to found values.
- `size_t sz_min`: minimum number of array elements to read
- `size_t sz_max`: maximum number of array elements to read, if zero there is no
  upper limit on the number of elements in the dts entry but only
  sz_min will be read.

**Description**

Search for a property in a device node and read 64-bit value(s) from
it.

The out_values is modified only if a valid u64 value can be decoded.

**Return**

The number of elements read on success, -EINVAL if the property
does not exist, -ENODATA if property does not have a value, and -EOVERFLOW
if the property data is smaller than sz_min or longer than sz_max.

#### <a id="c-of_property_read_string"></a>`of_property_read_string()`

```c
int of_property_read_string(const struct device_node *np, const char *propname, const char **out_string)
```

Find and read a string from a property

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `const char **out_string`: pointer to null terminated return string, modified only if
  return value is 0.

**Description**

Search for a property in a device tree node and retrieve a null
terminated string value (pointer to data, not a copy).

Note that the empty string "" has length of 1, thus -ENODATA cannot
be interpreted as an empty string.

The out_string pointer is modified only if a valid string can be decoded.

**Return**

0 on success, -EINVAL if the property does not exist, -ENODATA if
property does not have a value, and -EILSEQ if the string is not
null-terminated within the length of the property data.

#### <a id="c-of_property_match_string"></a>`of_property_match_string()`

```c
int of_property_match_string(const struct device_node *np, const char *propname, const char *string)
```

Find string in a list and return index

**Parameters**

- `const struct device_node *np`: pointer to the node containing the string list property
- `const char *propname`: string list property name
- `const char *string`: pointer to the string to search for in the string list

**Description**

Search for an exact match of string in a device node property which is a
string of lists.

**Return**

the index of the first occurrence of the string on success, -EINVAL
if the property does not exist, -ENODATA if the property does not have a
value, and -EILSEQ if the string is not null-terminated within the length of
the property data.

#### <a id="c-of_property_read_string_helper"></a>`of_property_read_string_helper()`

```c
int of_property_read_string_helper(const struct device_node *np, const char *propname, const char **out_strs, size_t sz, int skip)
```

Utility helper for parsing string properties

**Parameters**

- `const struct device_node *np`: device node from which the property value is to be read.
- `const char *propname`: name of the property to be searched.
- `const char **out_strs`: output array of string pointers.
- `size_t sz`: number of array elements to read.
- `int skip`: Number of strings to skip over at beginning of list.

**Description**

Don't call this function directly. It is a utility helper for the
of_property_read_string*() family of functions.

#### <a id="c-of_graph_parse_endpoint"></a>`of_graph_parse_endpoint()`

```c
int of_graph_parse_endpoint(const struct device_node *node, struct of_endpoint *endpoint)
```

parse common endpoint node properties

**Parameters**

- `const struct device_node *node`: pointer to endpoint device_node
- `struct of_endpoint *endpoint`: pointer to the OF endpoint data structure

**Description**

The caller should hold a reference to **node**.

#### <a id="c-of_graph_get_port_by_id"></a>`of_graph_get_port_by_id()`

```c
struct device_node * of_graph_get_port_by_id(struct device_node *parent, u32 id)
```

get the port matching a given id

**Parameters**

- `struct device_node *parent`: pointer to the parent device node
- `u32 id`: id of the port

**Return**

A 'port' node pointer with refcount incremented. The caller
has to use [`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_graph_get_next_port"></a>`of_graph_get_next_port()`

```c
struct device_node * of_graph_get_next_port(const struct device_node *parent, struct device_node *prev)
```

get next port node.

**Parameters**

- `const struct device_node *parent`: pointer to the parent device node, or parent ports node
- `struct device_node *prev`: previous port node, or NULL to get first

**Description**

Parent device node can be used as **parent** whether device node has ports node
or not. It will work same as ports@0 node.

**Return**

A 'port' node pointer with refcount incremented. Refcount
of the passed **prev** node is decremented.

#### <a id="c-of_graph_get_next_port_endpoint"></a>`of_graph_get_next_port_endpoint()`

```c
struct device_node * of_graph_get_next_port_endpoint(const struct device_node *port, struct device_node *prev)
```

get next endpoint node in port. If it reached to end of the port, it will return NULL.

**Parameters**

- `const struct device_node *port`: pointer to the target port node
- `struct device_node *prev`: previous endpoint node, or NULL to get first

**Return**

An 'endpoint' node pointer with refcount incremented. Refcount
of the passed **prev** node is decremented.

#### <a id="c-of_graph_get_next_endpoint"></a>`of_graph_get_next_endpoint()`

```c
struct device_node * of_graph_get_next_endpoint(const struct device_node *parent, struct device_node *prev)
```

get next endpoint node

**Parameters**

- `const struct device_node *parent`: pointer to the parent device node
- `struct device_node *prev`: previous endpoint node, or NULL to get first

**Return**

An 'endpoint' node pointer with refcount incremented. Refcount
of the passed **prev** node is decremented.

#### <a id="c-of_graph_get_endpoint_by_regs"></a>`of_graph_get_endpoint_by_regs()`

```c
struct device_node * of_graph_get_endpoint_by_regs(const struct device_node *parent, int port_reg, int reg)
```

get endpoint node of specific identifiers

**Parameters**

- `const struct device_node *parent`: pointer to the parent device node
- `int port_reg`: identifier (value of reg property) of the parent port node
- `int reg`: identifier (value of reg property) of the endpoint node

**Return**

An 'endpoint' node pointer which is identified by reg and at the same
is the child of a port node identified by port_reg. reg and port_reg are
ignored when they are -1. Use [`of_node_put()`](#c-of_node_put) on the pointer when done.

#### <a id="c-of_graph_get_remote_endpoint"></a>`of_graph_get_remote_endpoint()`

```c
struct device_node * of_graph_get_remote_endpoint(const struct device_node *node)
```

get remote endpoint node

**Parameters**

- `const struct device_node *node`: pointer to a local endpoint device_node

**Return**

Remote endpoint node associated with remote endpoint node linked
to **node**. Use [`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_graph_get_port_parent"></a>`of_graph_get_port_parent()`

```c
struct device_node * of_graph_get_port_parent(struct device_node *node)
```

get port's parent node

**Parameters**

- `struct device_node *node`: pointer to a local endpoint device_node

**Return**

device node associated with endpoint node linked
to **node**. Use [`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_graph_get_remote_port_parent"></a>`of_graph_get_remote_port_parent()`

```c
struct device_node * of_graph_get_remote_port_parent(const struct device_node *node)
```

get remote port's parent node

**Parameters**

- `const struct device_node *node`: pointer to a local endpoint device_node

**Return**

Remote device node associated with remote endpoint node linked
to **node**. Use [`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_graph_get_remote_port"></a>`of_graph_get_remote_port()`

```c
struct device_node * of_graph_get_remote_port(const struct device_node *node)
```

get remote port node

**Parameters**

- `const struct device_node *node`: pointer to a local endpoint device_node

**Return**

Remote port node associated with remote endpoint node linked
to **node**. Use [`of_node_put()`](#c-of_node_put) on it when done.

#### <a id="c-of_graph_get_endpoint_count"></a>`of_graph_get_endpoint_count()`

```c
unsigned int of_graph_get_endpoint_count(const struct device_node *np)
```

get the number of endpoints in a device node

**Parameters**

- `const struct device_node *np`: parent device node containing ports and endpoints

**Return**

count of endpoint of this device node

#### <a id="c-of_graph_get_port_count"></a>`of_graph_get_port_count()`

```c
unsigned int of_graph_get_port_count(struct device_node *np)
```

get the number of port in a device or ports node

**Parameters**

- `struct device_node *np`: pointer to the device or ports node

**Return**

count of port of this device or ports node

#### <a id="c-of_graph_get_remote_node"></a>`of_graph_get_remote_node()`

```c
struct device_node * of_graph_get_remote_node(const struct device_node *node, u32 port, u32 endpoint)
```

get remote parent device_node for given port/endpoint

**Parameters**

- `const struct device_node *node`: pointer to parent device_node containing graph port/endpoint
- `u32 port`: identifier (value of reg property) of the parent port node
- `u32 endpoint`: identifier (value of reg property) of the endpoint node

**Return**

Remote device node associated with remote endpoint node linked
to **node**. Use [`of_node_put()`](#c-of_node_put) on it when done.



#### <a id="c-struct-of_endpoint"></a>`struct of_endpoint`

the OF graph endpoint data structure

**Definition**

```c
struct of_endpoint {
    unsigned int port;
    unsigned int id;
    const struct device_node *local_node;
};
```

**Members**

- `port`: identifier (value of reg property) of a port this endpoint belongs to
- `id`: identifier (value of reg property) of this endpoint
- `local_node`: pointer to device_node of this endpoint

#### <a id="c-for_each_endpoint_of_node"></a>`for_each_endpoint_of_node()`

```c
for_each_endpoint_of_node(parent, child)
```

iterate over every endpoint in a device node

**Parameters**

- `parent`: parent device node containing ports and endpoints
- `child`: loop variable pointing to the current endpoint node

**Description**

When breaking out of the loop, of_node_put(child) has to be called manually.

#### <a id="c-for_each_of_graph_port"></a>`for_each_of_graph_port()`

```c
for_each_of_graph_port(parent, child)
```

iterate over every port in a device or ports node

**Parameters**

- `parent`: parent device or ports node containing port
- `child`: loop variable pointing to the current port node

**Description**

When breaking out of the loop, and continue to use the **child**, you need to
use return_ptr(**child**) or no_free_ptr(**child**) not to call `__free()` for it.

#### <a id="c-for_each_of_graph_port_endpoint"></a>`for_each_of_graph_port_endpoint()`

```c
for_each_of_graph_port_endpoint(parent, child)
```

iterate over every endpoint in a port node

**Parameters**

- `parent`: parent port node
- `child`: loop variable pointing to the current endpoint node

**Description**

When breaking out of the loop, and continue to use the **child**, you need to
use return_ptr(**child**) or no_free_ptr(**child**) not to call `__free()` for it.



#### <a id="c-of_translate_dma_region"></a>`of_translate_dma_region()`

```c
const __be32 * of_translate_dma_region(struct device_node *dev, const __be32 *prop, phys_addr_t *start, size_t *length)
```

Translate device tree address and size tuple

**Parameters**

- `struct device_node *dev`: device tree node for which to translate
- `const __be32 *prop`: pointer into array of cells
- `phys_addr_t *start`: return value for the start of the DMA range
- `size_t *length`: return value for the length of the DMA range

**Description**

Returns a pointer to the cell immediately following the translated DMA region.

#### <a id="c-of_property_read_reg"></a>`of_property_read_reg()`

```c
int of_property_read_reg(struct device_node *np, int idx, u64 *addr, u64 *size)
```

Retrieve the specified "reg" entry index without translating

**Parameters**

- `struct device_node *np`: device tree node for which to retrieve "reg" from
- `int idx`: "reg" entry index to read
- `u64 *addr`: return value for the untranslated address
- `u64 *size`: return value for the entry size

**Description**

Returns -EINVAL if "reg" is not found. Returns 0 on success with addr and
size values filled in.

#### <a id="c-of_dma_is_coherent"></a>`of_dma_is_coherent()`

```c
bool of_dma_is_coherent(struct device_node *np)
```

Check if device is coherent

**Parameters**

- `struct device_node *np`: device node

**Description**

It returns true if "dma-coherent" property was found
for this device in the DT, or if DMA is coherent by
default for OF devices on the current platform and no
"dma-noncoherent" property was found for this device.

#### <a id="c-of_address_to_resource"></a>`of_address_to_resource()`

```c
int of_address_to_resource(struct device_node *dev, int index, struct resource *r)
```

Translate device tree address and return as resource

**Parameters**

- `struct device_node *dev`: Caller's Device Node
- `int index`: Index into the array
- `struct resource *r`: Pointer to resource array

**Description**

Returns -EINVAL if the range cannot be converted to resource.

Note that if your address is a PIO address, the conversion will fail if
the physical address can't be internally converted to an IO token with
`pci_address_to_pio()`, that is because it's either called too early or it
can't be matched to any host bridge IO space

#### <a id="c-of_iomap"></a>`of_iomap()`

```c
void __iomem * of_iomap(struct device_node *np, int index)
```

Maps the memory mapped IO for a given device_node

**Parameters**

- `struct device_node *np`: the device whose io range will be mapped
- `int index`: index of the io range

**Description**

Returns a pointer to the mapped memory



#### <a id="c-irq_of_parse_and_map"></a>`irq_of_parse_and_map()`

```c
unsigned int irq_of_parse_and_map(struct device_node *dev, int index)
```

Parse and map an interrupt into linux virq space

**Parameters**

- `struct device_node *dev`: Device node of the device whose interrupt is to be mapped
- `int index`: Index of the interrupt to map

**Description**

This function is a wrapper that chains [`of_irq_parse_one()`](#c-of_irq_parse_one) and
`irq_create_of_mapping()` to make things easier to callers

#### <a id="c-of_irq_find_parent"></a>`of_irq_find_parent()`

```c
struct device_node * of_irq_find_parent(struct device_node *child)
```

Given a device node, find its interrupt parent node

**Parameters**

- `struct device_node *child`: pointer to device node

**Return**

A pointer to the interrupt parent node with refcount increased
or NULL if the interrupt parent could not be determined.

#### <a id="c-of_irq_parse_raw"></a>`of_irq_parse_raw()`

```c
int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
```

Low level interrupt tree parsing

**Parameters**

- `const __be32 *addr`: address specifier (start of "reg" property of the device) in be32 format
- `struct of_phandle_args *out_irq`: structure of_phandle_args updated by this function

**Description**

This function is a low-level interrupt tree walking function. It
can be used to do a partial walk with synthesized reg and interrupts
properties, for example when resolving PCI interrupts when no device
node exist for the parent. It takes an interrupt specifier structure as
input, walks the tree looking for any interrupt-map properties, translates
the specifier for each map, and then returns the translated map.

**Return**

0 on success and a negative number on error

**Note**

refcount of node **out_irq->np** is increased by 1 on success.

#### <a id="c-of_irq_parse_one"></a>`of_irq_parse_one()`

```c
int of_irq_parse_one(struct device_node *device, int index, struct of_phandle_args *out_irq)
```

Resolve an interrupt for a device

**Parameters**

- `struct device_node *device`: the device whose interrupt is to be resolved
- `int index`: index of the interrupt to resolve
- `struct of_phandle_args *out_irq`: structure of_phandle_args filled by this function

**Description**

This function resolves an interrupt for a node by walking the interrupt tree,
finding which interrupt controller node it is attached to, and returning the
interrupt specifier that can be used to retrieve a Linux IRQ number.

**Note**

refcount of node **out_irq->np** is increased by 1 on success.

#### <a id="c-of_irq_to_resource"></a>`of_irq_to_resource()`

```c
int of_irq_to_resource(struct device_node *dev, int index, struct resource *r)
```

Decode a node's IRQ and return it as a resource

**Parameters**

- `struct device_node *dev`: pointer to device tree node
- `int index`: zero-based index of the irq
- `struct resource *r`: pointer to resource structure to return result into.

#### <a id="c-of_irq_get"></a>`of_irq_get()`

```c
int of_irq_get(struct device_node *dev, int index)
```

Decode a node's IRQ and return it as a Linux IRQ number

**Parameters**

- `struct device_node *dev`: pointer to device tree node
- `int index`: zero-based index of the IRQ

**Return**

Linux IRQ number on success, or 0 on the IRQ mapping failure, or
-EPROBE_DEFER if the IRQ domain is not yet created, or error code in case
of any other failure.

#### <a id="c-of_irq_get_byname"></a>`of_irq_get_byname()`

```c
int of_irq_get_byname(struct device_node *dev, const char *name)
```

Decode a node's IRQ and return it as a Linux IRQ number

**Parameters**

- `struct device_node *dev`: pointer to device tree node
- `const char *name`: IRQ name

**Return**

Linux IRQ number on success, or 0 on the IRQ mapping failure, or
-EPROBE_DEFER if the IRQ domain is not yet created, or error code in case
of any other failure.

#### <a id="c-of_irq_count"></a>`of_irq_count()`

```c
int of_irq_count(struct device_node *dev)
```

Count the number of IRQs a node uses

**Parameters**

- `struct device_node *dev`: pointer to device tree node

#### <a id="c-of_irq_to_resource_table"></a>`of_irq_to_resource_table()`

```c
int of_irq_to_resource_table(struct device_node *dev, struct resource *res, int nr_irqs)
```

Fill in resource table with node's IRQ info

**Parameters**

- `struct device_node *dev`: pointer to device tree node
- `struct resource *res`: array of resources to fill in
- `int nr_irqs`: the number of IRQs (and upper bound for num of **res** elements)

**Return**

The size of the filled in table (up to **nr_irqs**).

#### <a id="c-of_msi_xlate"></a>`of_msi_xlate()`

```c
u32 of_msi_xlate(struct device *dev, struct device_node **msi_np, u32 id_in)
```

map a MSI ID and find relevant MSI controller node

**Parameters**

- `struct device *dev`: device for which the mapping is to be done.
- `struct device_node **msi_np`: Pointer to target MSI controller node
- `u32 id_in`: Device ID.

**Description**

Walk up the device hierarchy looking for devices with a "msi-map"
or "msi-parent" property. If found, apply the mapping to **id_in**.
If **msi_np** 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.

**Return**

The mapped MSI id.

#### <a id="c-of_msi_get_domain"></a>`of_msi_get_domain()`

```c
struct irq_domain * of_msi_get_domain(struct device *dev, const struct device_node *np, enum irq_domain_bus_token token)
```

Use msi-parent to find the relevant MSI domain

**Parameters**

- `struct device *dev`: device for which the domain is requested
- `const struct device_node *np`: device node for **dev**
- `enum irq_domain_bus_token token`: bus type for this domain

**Description**

Parse the msi-parent property and returns the corresponding MSI domain.

**Return**

the MSI domain for this device (or NULL on failure).

#### <a id="c-of_msi_configure"></a>`of_msi_configure()`

```c
void of_msi_configure(struct device *dev, const struct device_node *np)
```

Set the msi_domain field of a device

**Parameters**

- `struct device *dev`: device structure to associate with an MSI irq domain
- `const struct device_node *np`: device node for that device



#### <a id="c-of_fdt_unflatten_tree"></a>`of_fdt_unflatten_tree()`

```c
void * of_fdt_unflatten_tree(const unsigned long *blob, struct device_node *dad, struct device_node **mynodes)
```

create tree of device_nodes from flat blob

**Parameters**

- `const unsigned long *blob`: Flat device tree blob
- `struct device_node *dad`: Parent device node
- `struct device_node **mynodes`: The device tree created by the call

**Description**

unflattens the device-tree passed by the firmware, creating the
tree of struct device_node. It also fills the "name" and "type"
pointers of the nodes so the normal device-tree walking functions
can be used.

**Return**

NULL on failure or the memory chunk containing the unflattened
device tree on success.


<a id="rst-driver-model-functions"></a>

## Driver model functions


#### <a id="c-of_driver_match_device"></a>`of_driver_match_device()`

```c
int of_driver_match_device(struct device *dev, const struct device_driver *drv)
```

Tell if a driver's of_match_table matches a device.

**Parameters**

- `struct device *dev`: the device structure to match against
- `const struct device_driver *drv`: the device_driver structure to test



#### <a id="c-of_match_device"></a>`of_match_device()`

```c
const struct of_device_id * of_match_device(const struct of_device_id *matches, const struct device *dev)
```

Tell if a struct device matches an of_device_id list

**Parameters**

- `const struct of_device_id *matches`: array of of_device_id match structures to search in
- `const struct device *dev`: the OF device structure to match against

**Description**

Used by a driver to check whether an platform_device present in the
system is in its list of supported devices.

#### <a id="c-of_dma_configure_id"></a>`of_dma_configure_id()`

```c
int of_dma_configure_id(struct device *dev, struct device_node *np, bool force_dma, const u32 *id)
```

Setup DMA configuration

**Parameters**

- `struct device *dev`: Device to apply DMA configuration
- `struct device_node *np`: Pointer to OF node having DMA configuration
- `bool force_dma`: Whether device is to be set up by `of_dma_configure()` even if
  DMA capability is not explicitly described by firmware.
- `const u32 *id`: Optional const pointer value input id

**Description**

Try to get devices's DMA configuration from DT and update it
accordingly.

If platform code needs to use its own special DMA configuration, it
can use a platform bus notifier and handle BUS_NOTIFY_ADD_DEVICE events
to fix up DMA configuration.

#### <a id="c-of_device_modalias"></a>`of_device_modalias()`

```c
ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len)
```

Fill buffer with newline terminated modalias string

**Parameters**

- `struct device *dev`: Calling device
- `char *str`: Modalias string
- `ssize_t len`: Size of **str**

#### <a id="c-of_device_uevent"></a>`of_device_uevent()`

```c
void of_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
```

Display OF related uevent information

**Parameters**

- `const struct device *dev`: Device to display the uevent information for
- `struct kobj_uevent_env *env`: Kernel object's userspace event reference to fill up

#### <a id="c-of_device_make_bus_id"></a>`of_device_make_bus_id()`

```c
void of_device_make_bus_id(struct device *dev)
```

Use the device node data to assign a unique name

**Parameters**

- `struct device *dev`: pointer to device structure that is linked to a device tree node

**Description**

This routine will first try using the translated bus address to
derive a unique name. If it cannot, then it will prepend names from
parent nodes until a unique name can be derived.



#### <a id="c-struct-of_dev_auxdata"></a>`struct of_dev_auxdata`

lookup table entry for device names & platform_data

**Definition**

```c
struct of_dev_auxdata {
    char *compatible;
    resource_size_t phys_addr;
    char *name;
    void *platform_data;
};
```

**Members**

- `compatible`: compatible value of node to match against node
- `phys_addr`: Start address of registers to match against node
- `name`: Name to assign for matching nodes
- `platform_data`: platform_data to assign for matching nodes

**Description**

This lookup table allows the caller of [`of_platform_populate()`](#c-of_platform_populate) to override
the names of devices when creating devices from the device tree.  The table
should be terminated with an empty entry.  It also allows the platform_data
pointer to be set.

The reason for this functionality is that some Linux infrastructure uses
the device name to look up a specific device, but the Linux-specific names
are not encoded into the device tree, so the kernel needs to provide specific
values.

**Note**

Using an auxdata lookup table should be considered a last resort when
converting a platform to use the DT.  Normally the automatically generated
device name will not matter, and drivers should obtain data from the device
node instead of from an anonymous platform_data pointer.



#### <a id="c-of_find_device_by_node"></a>`of_find_device_by_node()`

```c
struct platform_device * of_find_device_by_node(struct device_node *np)
```

Find the platform_device associated with a node

**Parameters**

- `struct device_node *np`: Pointer to device tree node

**Description**

Takes a reference to the embedded struct device which needs to be dropped
after use.

**Return**

platform_device pointer, or NULL if not found

#### <a id="c-of_device_alloc"></a>`of_device_alloc()`

```c
struct platform_device * of_device_alloc(struct device_node *np, const char *bus_id, struct device *parent)
```

Allocate and initialize an of_device

**Parameters**

- `struct device_node *np`: device node to assign to device
- `const char *bus_id`: Name to assign to the device.  May be null to use default name.
- `struct device *parent`: Parent device.

#### <a id="c-of_platform_device_create"></a>`of_platform_device_create()`

```c
struct platform_device * of_platform_device_create(struct device_node *np, const char *bus_id, struct device *parent)
```

Alloc, initialize and register an of_device

**Parameters**

- `struct device_node *np`: pointer to node to create device for
- `const char *bus_id`: name to assign device
- `struct device *parent`: Linux device model parent device.

**Return**

Pointer to created platform device, or NULL if a device was not
registered.  Unavailable devices will not get registered.

#### <a id="c-of_platform_bus_probe"></a>`of_platform_bus_probe()`

```c
int of_platform_bus_probe(struct device_node *root, const struct of_device_id *matches, struct device *parent)
```

Probe the device-tree for platform buses

**Parameters**

- `struct device_node *root`: parent of the first level to probe or NULL for the root of the tree
- `const struct of_device_id *matches`: match table for bus nodes
- `struct device *parent`: parent to hook devices from, NULL for toplevel

**Description**

Note that children of the provided root are not instantiated as devices
unless the specified root itself matches the bus list and is not NULL.

#### <a id="c-of_platform_populate"></a>`of_platform_populate()`

```c
int of_platform_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup, struct device *parent)
```

Populate platform_devices from device tree data

**Parameters**

- `struct device_node *root`: parent of the first level to probe or NULL for the root of the tree
- `const struct of_device_id *matches`: match table, NULL to use the default
- `const struct of_dev_auxdata *lookup`: auxdata table for matching id and platform_data with device nodes
- `struct device *parent`: parent to hook devices from, NULL for toplevel

**Description**

Similar to [`of_platform_bus_probe()`](#c-of_platform_bus_probe), this function walks the device tree
and creates devices from nodes.  It differs in that it follows the modern
convention of requiring all device nodes to have a 'compatible' property,
and it is suitable for creating devices which are children of the root
node (of_platform_bus_probe will only create children of the root which
are selected by the **matches** argument).

New board support should be using this function instead of
[`of_platform_bus_probe()`](#c-of_platform_bus_probe).

**Return**

0 on success, \< 0 on failure.

#### <a id="c-of_platform_depopulate"></a>`of_platform_depopulate()`

```c
void of_platform_depopulate(struct device *parent)
```

Remove devices populated from device tree

**Parameters**

- `struct device *parent`: device which children will be removed

**Description**

Complementary to [`of_platform_populate()`](#c-of_platform_populate), this function removes children
of the given device (and, recursively, their children) that have been
created from their respective device tree nodes (and only those,
leaving others - eg. manually created - unharmed).

#### <a id="c-devm_of_platform_populate"></a>`devm_of_platform_populate()`

```c
int devm_of_platform_populate(struct device *dev)
```

Populate platform_devices from device tree data

**Parameters**

- `struct device *dev`: device that requested to populate from device tree data

**Description**

Similar to [`of_platform_populate()`](#c-of_platform_populate), but will automatically call
[`of_platform_depopulate()`](#c-of_platform_depopulate) when the device is unbound from the bus.

**Return**

0 on success, \< 0 on failure.

#### <a id="c-devm_of_platform_depopulate"></a>`devm_of_platform_depopulate()`

```c
void devm_of_platform_depopulate(struct device *dev)
```

Remove devices populated from device tree

**Parameters**

- `struct device *dev`: device that requested to depopulate from device tree data

**Description**

Complementary to [`devm_of_platform_populate()`](#c-devm_of_platform_populate), this function removes children
of the given device (and, recursively, their children) that have been
created from their respective device tree nodes (and only those,
leaving others - eg. manually created - unharmed).


<a id="rst-overlay-and-dynamic-dt-functions"></a>

## Overlay and Dynamic DT functions


#### <a id="c-of_resolve_phandles"></a>`of_resolve_phandles()`

```c
int of_resolve_phandles(struct device_node *overlay)
```

Relocate and resolve overlay against live tree

**Parameters**

- `struct device_node *overlay`: Pointer to devicetree overlay to relocate and resolve

**Description**

Modify (relocate) values of local phandles in **overlay** to a range that
does not conflict with the live expanded devicetree.  Update references
to the local phandles in **overlay**.  Update (resolve) phandle references
in **overlay** that refer to the live expanded devicetree.

Phandle values in the live tree are in the range of
1 .. `live_tree_max_phandle()`.  The range of phandle values in the overlay
also begin with at 1.  Adjust the phandle values in the overlay to begin
at `live_tree_max_phandle()` + 1.  Update references to the phandles to
the adjusted phandle values.

The name of each property in the "__fixups__" node in the overlay matches
the name of a symbol (a label) in the live tree.  The values of each
property in the "__fixups__" node is a list of the property values in the
overlay that need to be updated to contain the phandle reference
corresponding to that symbol in the live tree.  Update the references in
the overlay with the phandle values in the live tree.

**overlay** must be detached.

Resolving and applying **overlay** to the live expanded devicetree must be
protected by a mechanism to ensure that multiple overlays are processed
in a single threaded manner so that multiple overlays will not relocate
phandles to overlapping ranges.  The mechanism to enforce this is not
yet implemented.

**Return**

`0` on success or a negative error value on error.



#### <a id="c-of_node_get"></a>`of_node_get()`

```c
struct device_node * of_node_get(struct device_node *node)
```

Increment refcount of a node

**Parameters**

- `struct device_node *node`: Node to inc refcount, NULL is supported to simplify writing of
  callers

**Return**

The node with refcount incremented.

#### <a id="c-of_node_put"></a>`of_node_put()`

```c
void of_node_put(struct device_node *node)
```

Decrement refcount of a node

**Parameters**

- `struct device_node *node`: Node to dec refcount, NULL is supported to simplify writing of
  callers

#### <a id="c-of_detach_node"></a>`of_detach_node()`

```c
int of_detach_node(struct device_node *np)
```

"Unplug" a node from the device tree.

**Parameters**

- `struct device_node *np`: Pointer to the caller's Device Node

#### <a id="c-of_changeset_create_node"></a>`of_changeset_create_node()`

```c
struct device_node * of_changeset_create_node(struct of_changeset *ocs, struct device_node *parent, const char *full_name)
```

Dynamically create a device node and attach to a given changeset.

**Parameters**

- `struct of_changeset *ocs`: Pointer to changeset
- `struct device_node *parent`: Pointer to parent device node
- `const char *full_name`: Node full name

**Return**

Pointer to the created device node or NULL in case of an error.

#### <a id="c-of_changeset_init"></a>`of_changeset_init()`

```c
void of_changeset_init(struct of_changeset *ocs)
```

Initialize a changeset for use

**Parameters**

- `struct of_changeset *ocs`: changeset pointer

**Description**

Initialize a changeset structure

#### <a id="c-of_changeset_destroy"></a>`of_changeset_destroy()`

```c
void of_changeset_destroy(struct of_changeset *ocs)
```

Destroy a changeset

**Parameters**

- `struct of_changeset *ocs`: changeset pointer

**Description**

Destroys a changeset. Note that if a changeset is applied,
its changes to the tree cannot be reverted.

#### <a id="c-of_changeset_apply"></a>`of_changeset_apply()`

```c
int of_changeset_apply(struct of_changeset *ocs)
```

Applies a changeset

**Parameters**

- `struct of_changeset *ocs`: changeset pointer

**Description**

Applies a changeset to the live tree.
Any side-effects of live tree state changes are applied here on
success, like creation/destruction of devices and side-effects
like creation of sysfs properties and directories.

**Return**

0 on success, a negative error value in case of an error.
On error the partially applied effects are reverted.

#### <a id="c-of_changeset_revert"></a>`of_changeset_revert()`

```c
int of_changeset_revert(struct of_changeset *ocs)
```

Reverts an applied changeset

**Parameters**

- `struct of_changeset *ocs`: changeset pointer

**Description**

Reverts a changeset returning the state of the tree to what it
was before the application.
Any side-effects like creation/destruction of devices and
removal of sysfs properties and directories are applied.

**Return**

0 on success, a negative error value in case of an error.

#### <a id="c-of_changeset_action"></a>`of_changeset_action()`

```c
int of_changeset_action(struct of_changeset *ocs, unsigned long action, struct device_node *np, struct property *prop)
```

Add an action to the tail of the changeset list

**Parameters**

- `struct of_changeset *ocs`: changeset pointer
- `unsigned long action`: action to perform
- `struct device_node *np`: Pointer to device node
- `struct property *prop`: Pointer to property

**Description**

On action being one of:
+ OF_RECONFIG_ATTACH_NODE
+ OF_RECONFIG_DETACH_NODE,
+ OF_RECONFIG_ADD_PROPERTY
+ OF_RECONFIG_REMOVE_PROPERTY,
+ OF_RECONFIG_UPDATE_PROPERTY

**Return**

0 on success, a negative error value in case of an error.

#### <a id="c-of_changeset_add_prop_string"></a>`of_changeset_add_prop_string()`

```c
int of_changeset_add_prop_string(struct of_changeset *ocs, struct device_node *np, const char *prop_name, const char *str)
```

Add a string property to a changeset

**Parameters**

- `struct of_changeset *ocs`: changeset pointer
- `struct device_node *np`: device node pointer
- `const char *prop_name`: name of the property to be added
- `const char *str`: pointer to null terminated string

**Description**

Create a string property and add it to a changeset.

**Return**

0 on success, a negative error value in case of an error.

#### <a id="c-of_changeset_add_prop_string_array"></a>`of_changeset_add_prop_string_array()`

```c
int of_changeset_add_prop_string_array(struct of_changeset *ocs, struct device_node *np, const char *prop_name, const char * const *str_array, size_t sz)
```

Add a string list property to a changeset

**Parameters**

- `struct of_changeset *ocs`: changeset pointer
- `struct device_node *np`: device node pointer
- `const char *prop_name`: name of the property to be added
- `const char * const *str_array`: pointer to an array of null terminated strings
- `size_t sz`: number of string array elements

**Description**

Create a string list property and add it to a changeset.

**Return**

0 on success, a negative error value in case of an error.

#### <a id="c-of_changeset_add_prop_u32_array"></a>`of_changeset_add_prop_u32_array()`

```c
int of_changeset_add_prop_u32_array(struct of_changeset *ocs, struct device_node *np, const char *prop_name, const u32 *array, size_t sz)
```

Add a property of 32 bit integers property to a changeset

**Parameters**

- `struct of_changeset *ocs`: changeset pointer
- `struct device_node *np`: device node pointer
- `const char *prop_name`: name of the property to be added
- `const u32 *array`: pointer to an array of 32 bit integers
- `size_t sz`: number of array elements

**Description**

Create a property of 32 bit integers and add it to a changeset.

**Return**

0 on success, a negative error value in case of an error.

#### <a id="c-of_changeset_add_prop_bool"></a>`of_changeset_add_prop_bool()`

```c
int of_changeset_add_prop_bool(struct of_changeset *ocs, struct device_node *np, const char *prop_name)
```

Add a boolean property (i.e. a property without any values) to a changeset.

**Parameters**

- `struct of_changeset *ocs`: changeset pointer
- `struct device_node *np`: device node pointer
- `const char *prop_name`: name of the property to be added

**Description**

Create a boolean property and add it to a changeset.

**Return**

0 on success, a negative error value in case of an error.

#### <a id="c-of_changeset_update_prop_string"></a>`of_changeset_update_prop_string()`

```c
int of_changeset_update_prop_string(struct of_changeset *ocs, struct device_node *np, const char *prop_name, const char *str)
```

Add a string property update to a changeset

**Parameters**

- `struct of_changeset *ocs`: changeset pointer
- `struct device_node *np`: device node pointer
- `const char *prop_name`: name of the property to be updated
- `const char *str`: pointer to null terminated string

**Description**

Create a string property to be updated and add it to a changeset.

**Return**

0 on success, a negative error value in case of an error.



#### <a id="c-of_overlay_notifier_register"></a>`of_overlay_notifier_register()`

```c
int of_overlay_notifier_register(struct notifier_block *nb)
```

Register notifier for overlay operations

**Parameters**

- `struct notifier_block *nb`: Notifier block to register

**Description**

Register for notification on overlay operations on device tree nodes. The
reported actions defined by **of_reconfig_change**. The notifier callback
furthermore receives a pointer to the affected device tree node.

Note that a notifier callback is not supposed to store pointers to a device
tree node or its content beyond **OF_OVERLAY_POST_REMOVE** corresponding to the
respective node it received.

#### <a id="c-of_overlay_notifier_unregister"></a>`of_overlay_notifier_unregister()`

```c
int of_overlay_notifier_unregister(struct notifier_block *nb)
```

Unregister notifier for overlay operations

**Parameters**

- `struct notifier_block *nb`: Notifier block to unregister

#### <a id="c-of_overlay_fdt_apply"></a>`of_overlay_fdt_apply()`

```c
int of_overlay_fdt_apply(const void *overlay_fdt, u32 overlay_fdt_size, int *ret_ovcs_id, const struct device_node *base)
```

Create and apply an overlay changeset

**Parameters**

- `const void *overlay_fdt`: pointer to overlay FDT
- `u32 overlay_fdt_size`: number of bytes in **overlay_fdt**
- `int *ret_ovcs_id`: pointer for returning created changeset id
- `const struct device_node *base`: pointer for the target node to apply overlay

**Description**

Creates and applies an overlay changeset.

See `of_overlay_apply()` for important behavior information.

On error return, the changeset may be partially applied.  This is especially
likely if an OF_OVERLAY_POST_APPLY notifier returns an error.  In this case
the caller should call [`of_overlay_remove()`](#c-of_overlay_remove) with the value in **\*ret_ovcs_id**.

**Return**

0 on success, or a negative error number.  **\*ret_ovcs_id** is set to
the value of overlay changeset id, which can be passed to [`of_overlay_remove()`](#c-of_overlay_remove)
to remove the overlay.

#### <a id="c-of_overlay_remove"></a>`of_overlay_remove()`

```c
int of_overlay_remove(int *ovcs_id)
```

Revert and free an overlay changeset

**Parameters**

- `int *ovcs_id`: Pointer to overlay changeset id

**Description**

Removes an overlay if it is permissible.  **ovcs_id** was previously returned
by [`of_overlay_fdt_apply()`](#c-of_overlay_fdt_apply).

If an error occurred while attempting to revert the overlay changeset,
then an attempt is made to re-apply any changeset entry that was
reverted.  If an error occurs on re-apply then the state of the device
tree can not be determined, and any following attempt to apply or remove
an overlay changeset will be refused.

- A non-zero return value will not revert the changeset if error is from:
  - parameter checks
  - overlay changeset pre-remove notifier
  - overlay changeset entry revert

If an error is returned by an overlay changeset pre-remove notifier
then no further overlay changeset pre-remove notifier will be called.

If more than one notifier returns an error, then the last notifier
error to occur is returned.

- A non-zero return value will revert the changeset if error is from:
  - overlay changeset entry notifier
  - overlay changeset post-remove notifier

If an error is returned by an overlay changeset post-remove notifier
then no further overlay changeset post-remove notifier will be called.

**Return**

0 on success, or a negative error number.  **\*ovcs_id** is set to
zero after reverting the changeset, even if a subsequent error occurs.

#### <a id="c-of_overlay_remove_all"></a>`of_overlay_remove_all()`

```c
int of_overlay_remove_all(void)
```

Reverts and frees all overlay changesets

**Parameters**

- `void`: no arguments

**Description**

Removes all overlays from the system in the correct order.

**Return**

0 on success, or a negative error number

---

# Open Firmware Devicetree Unittest

_Peios Kernel / Hardware and drivers / Device tree_

> Author: Gaurav Minocha <gaurav.minocha.os@gmail.com>

<a id="rst-open-firmware-devicetree-unittest"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

Author: Gaurav Minocha &lt;[gaurav.minocha.os@gmail.com](<mailto:gaurav.minocha.os@gmail.com>)&gt;

<a id="rst-introduction"></a>

## 1. Introduction

This document explains how the test data required for executing OF unittest is attached to the live tree dynamically, independent of the machine's architecture.

It is recommended to read the following documents before moving ahead.

1. [Documentation/devicetree/usage-model.rst](/kernel/hardware/devicetree/usage-model.md)

2. [http://www.devicetree.org/Device_Tree_Usage](<http://www.devicetree.org/Device_Tree_Usage>)

OF Selftest has been designed to test the interface (include/linux/of.h) provided to device driver developers to fetch the device information..etc. from the unflattened device tree data structure. This interface is used by most of the device drivers in various use cases.

<a id="rst-verbose-output-expect"></a>

## 2. Verbose Output (EXPECT)

If unittest detects a problem it will print a warning or error message to the console.  Unittest also triggers warning and error messages from other kernel code as a result of intentionally bad unittest data.  This has led to confusion as to whether the triggered messages are an expected result of a test or whether there is a real problem that is independent of unittest.

'EXPECT : text' (begin) and 'EXPECT / : text' (end) messages have been added to unittest to report that a warning or error is expected.  The begin is printed before triggering the warning or error, and the end is printed after triggering the warning or error.

The EXPECT messages result in very noisy console messages that are difficult to read.  The script scripts/dtc/of_unittest_expect was created to filter this verbosity and highlight mismatches between triggered warnings and errors vs expected warnings and errors.  More information is available from 'scripts/dtc/of_unittest_expect --help'.

<a id="rst-test-data"></a>

## 3. Test-data

The Device Tree Source file (drivers/of/unittest-data/testcases.dts) contains the test data required for executing the unit tests automated in drivers/of/unittest.c. See the content of the folder:



```text
drivers/of/unittest-data/tests-*.dtsi
```

for the Device Tree Source Include files (.dtsi) included in testcases.dts.

When the kernel is built with CONFIG_OF_UNITTEST enabled, then the following make rule:



```text
$(obj)/%.dtb: $(src)/%.dts FORCE
        $(call if_changed_dep, dtc)
```

is used to compile the DT source file (testcases.dts) into a binary blob (testcases.dtb), also referred as flattened DT.

After that, using the following rule the binary blob above is wrapped as an assembly file (testcases.dtb.S):



```text
$(obj)/%.dtb.S: $(obj)/%.dtb
        $(call cmd, dt_S_dtb)
```

The assembly file is compiled into an object file (testcases.dtb.o), and is linked into the kernel image.

<a id="rst-adding-the-test-data"></a>

### 3.1. Adding the test data

Un-flattened device tree structure:

Un-flattened device tree consists of connected device_node(s) in form of a tree structure described below:



```text
// following struct members are used to construct the tree
struct device_node {
    ...
    struct  device_node *parent;
    struct  device_node *child;
    struct  device_node *sibling;
    ...
};
```

Figure 1, describes a generic structure of machine's un-flattened device tree considering only child and sibling pointers. There exists another pointer, `*parent`, that is used to traverse the tree in the reverse direction. So, at a particular level the child node and all the sibling nodes will have a parent pointer pointing to a common node (e.g. child1, sibling2, sibling3, sibling4's parent points to root node):



```text
root ('/')
|
child1 -> sibling2 -> sibling3 -> sibling4 -> null
|         |           |           |
|         |           |          null
|         |           |
|         |        child31 -> sibling32 -> null
|         |           |          |
|         |          null       null
|         |
|      child21 -> sibling22 -> sibling23 -> null
|         |          |            |
|        null       null         null
|
child11 -> sibling12 -> sibling13 -> sibling14 -> null
|           |           |            |
|           |           |           null
|           |           |
null        null       child131 -> null
                        |
                        null
```

Figure 1: Generic structure of un-flattened device tree

Before executing OF unittest, it is required to attach the test data to machine's device tree (if present). So, when selftest_data_add() is called, at first it reads the flattened device tree data linked into the kernel image via the following kernel symbols:



```text
__dtb_testcases_begin - address marking the start of test data blob
__dtb_testcases_end   - address marking the end of test data blob
```

Secondly, it calls of_fdt_unflatten_tree() to unflatten the flattened blob. And finally, if the machine's device tree (i.e. live tree) is present, then it attaches the unflattened test data tree to the live tree, else it attaches itself as a live device tree.

attach_node_and_children() uses of_attach_node() to attach the nodes into the live tree as explained below. To explain the same, the test data tree described in Figure 2 is attached to the live tree described in Figure 1:



```text
root ('/')
    |
testcase-data
    |
test-child0 -> test-sibling1 -> test-sibling2 -> test-sibling3 -> null
    |               |                |                |
test-child01      null             null             null
```

Figure 2: Example test data tree to be attached to live tree.

According to the scenario above, the live tree is already present so it isn't required to attach the root('/') node. All other nodes are attached by calling of_attach_node() on each node.

In the function of_attach_node(), the new node is attached as the child of the given parent in live tree. But, if parent already has a child then the new node replaces the current child and turns it into its sibling. So, when the testcase data node is attached to the live tree above (Figure 1), the final structure is as shown in Figure 3:



```text
root ('/')
|
testcase-data -> child1 -> sibling2 -> sibling3 -> sibling4 -> null
|               |          |           |           |
(...)             |          |           |          null
                |          |         child31 -> sibling32 -> null
                |          |           |           |
                |          |          null        null
                |          |
                |        child21 -> sibling22 -> sibling23 -> null
                |          |           |            |
                |         null        null         null
                |
                child11 -> sibling12 -> sibling13 -> sibling14 -> null
                |          |            |            |
                null       null          |           null
                                        |
                                        child131 -> null
                                        |
                                        null
-----------------------------------------------------------------------

root ('/')
|
testcase-data -> child1 -> sibling2 -> sibling3 -> sibling4 -> null
|               |          |           |           |
|             (...)      (...)       (...)        null
|
test-sibling3 -> test-sibling2 -> test-sibling1 -> test-child0 -> null
|                |                   |                |
null             null                null         test-child01
```

Figure 3: Live device tree structure after attaching the testcase-data.

Astute readers would have noticed that test-child0 node becomes the last sibling compared to the earlier structure (Figure 2). After attaching first test-child0 the test-sibling1 is attached that pushes the child node (i.e. test-child0) to become a sibling and makes itself a child node, as mentioned above.

If a duplicate node is found (i.e. if a node with same full_name property is already present in the live tree), then the node isn't attached rather its properties are updated to the live tree's node by calling the function update_node_properties().

<a id="rst-removing-the-test-data"></a>

### 3.2. Removing the test data

Once the test case execution is complete, selftest_data_remove is called in order to remove the device nodes attached initially (first the leaf nodes are detached and then moving up the parent nodes are removed, and eventually the whole tree). selftest_data_remove() calls detach_node_and_children() that uses of_detach_node() to detach the nodes from the live device tree.

To detach a node, of_detach_node() either updates the child pointer of given node's parent to its sibling or attaches the previous sibling to the given node's sibling, as appropriate. That is it :)

---

# Devicetree Overlay Notes

_Peios Kernel / Hardware and drivers / Device tree_

> This document describes the implementation of the in-kernel device tree overlay functionality residing in drivers/of/overlay.c and is a companion document to Documentation/devicetree/dynamic-resolution-notes.rst[1]

<a id="rst-devicetree-overlay-notes"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

This document describes the implementation of the in-kernel device tree overlay functionality residing in drivers/of/overlay.c and is a companion document to [Documentation/devicetree/dynamic-resolution-notes.rst](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/devicetree/dynamic-resolution-notes.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92)\[1\]

<a id="rst-how-overlays-work"></a>

## How overlays work

A Devicetree's overlay purpose is to modify the kernel's live tree, and have the modification affecting the state of the kernel in a way that is reflecting the changes. Since the kernel mainly deals with devices, any new device node that results in an active device should have it created while if the device node is either disabled or removed all together, the affected device should be deregistered.

Let's take an example where we have a foo board with the following base tree:



```text
---- foo.dts ---------------------------------------------------------------
    /* FOO platform */
    /dts-v1/;
    / {
            compatible = "corp,foo";

            /* shared resources */
            res: res {
            };

            /* On chip peripherals */
            ocp: ocp {
                    /* peripherals that are always instantiated */
                    peripheral1 { ... };
            };
    };
---- foo.dts ---------------------------------------------------------------
```

The overlay bar.dtso,



```text
---- bar.dtso - overlay target location by label ---------------------------
    /dts-v1/;
    /plugin/;
    &ocp {
            /* bar peripheral */
            bar {
                    compatible = "corp,bar";
                    ... /* various properties and child nodes */
            };
    };
---- bar.dtso --------------------------------------------------------------
```

when loaded (and resolved as described in \[1\]) should result in foo+bar.dts:



```text
---- foo+bar.dts -----------------------------------------------------------
    /* FOO platform + bar peripheral */
    / {
            compatible = "corp,foo";

            /* shared resources */
            res: res {
            };

            /* On chip peripherals */
            ocp: ocp {
                    /* peripherals that are always instantiated */
                    peripheral1 { ... };

                    /* bar peripheral */
                    bar {
                            compatible = "corp,bar";
                            ... /* various properties and child nodes */
                    };
            };
    };
---- foo+bar.dts -----------------------------------------------------------
```

As a result of the overlay, a new device node (bar) has been created so a bar platform device will be registered and if a matching device driver is loaded the device will be created as expected.

If the base DT was not compiled with the -@ option then the "&amp;ocp" label will not be available to resolve the overlay node(s) to the proper location in the base DT. In this case, the target path can be provided. The target location by label syntax is preferred because the overlay can be applied to any base DT containing the label, no matter where the label occurs in the DT.

The above bar.dtso example modified to use target path syntax is:



```text
---- bar.dtso - overlay target location by explicit path -------------------
    /dts-v1/;
    /plugin/;
    &{/ocp} {
            /* bar peripheral */
            bar {
                    compatible = "corp,bar";
                    ... /* various properties and child nodes */
            }
    };
---- bar.dtso --------------------------------------------------------------
```

<a id="rst-overlay-in-kernel-api"></a>

## Overlay in-kernel API

The API is quite easy to use.

1. Call of_overlay_fdt_apply() to create and apply an overlay changeset. The return value is an error or a cookie identifying this overlay.

2. Call of_overlay_remove() to remove and clean up the overlay changeset previously created via the call to of_overlay_fdt_apply(). Removal of an overlay changeset that is stacked by another will not be permitted.

Finally, if you need to remove all overlays in one-go, just call of_overlay_remove_all() which will remove every single one in the correct order.

There is the option to register notifiers that get called on overlay operations. See of_overlay_notifier_register/unregister and enum of_overlay_notify_action for details.

A notifier callback for OF_OVERLAY_PRE_APPLY, OF_OVERLAY_POST_APPLY, or OF_OVERLAY_PRE_REMOVE may store pointers to a device tree node in the overlay or its content but these pointers must not persist past the notifier callback for OF_OVERLAY_POST_REMOVE.  The memory containing the overlay will be kfree()ed after OF_OVERLAY_POST_REMOVE notifiers are called.  Note that the memory will be kfree()ed even if the notifier for OF_OVERLAY_POST_REMOVE returns an error.

The changeset notifiers in drivers/of/dynamic.c are a second type of notifier that could be triggered by applying or removing an overlay.  These notifiers are not allowed to store pointers to a device tree node in the overlay or its content.  The overlay code does not protect against such pointers remaining active when the memory containing the overlay is freed as a result of removing the overlay.

Any other code that retains a pointer to the overlay nodes or data is considered to be a bug because after removing the overlay the pointer will refer to freed memory.

Users of overlays must be especially aware of the overall operations that occur on the system to ensure that other kernel code does not retain any pointers to the overlay nodes or data.  Any example of an inadvertent use of such pointers is if a driver or subsystem module is loaded after an overlay has been applied, and the driver or subsystem scans the entire devicetree or a large portion of it, including the overlay nodes.

---

# Linux and the Devicetree

_Peios Kernel / Hardware and drivers / Device tree_

> The Linux usage model for device tree data

<a id="rst-linux-and-the-devicetree"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

The Linux usage model for device tree data

**Author:** Grant Likely &lt;[grant.likely@secretlab.ca](<mailto:grant.likely@secretlab.ca>)&gt;

This article describes how Linux uses the device tree.  An overview of the device tree data format can be found on the device tree usage page at devicetree.org<a id="rst-footnote-reference-1"></a>[1](#rst-footnote-1).

<a id="rst-footnote-1"></a>



**[1]** [https://www.devicetree.org/specifications/](<https://www.devicetree.org/specifications/>)

The "Open Firmware Device Tree", or simply Devicetree (DT), is a data structure and language for describing hardware.  More specifically, it is a description of hardware that is readable by an operating system so that the operating system doesn't need to hard code details of the machine.

Structurally, the DT is a tree, or acyclic graph with named nodes, and nodes may have an arbitrary number of named properties encapsulating arbitrary data.  A mechanism also exists to create arbitrary links from one node to another outside of the natural tree structure.

Conceptually, a common set of usage conventions, called 'bindings', is defined for how data should appear in the tree to describe typical hardware characteristics including data busses, interrupt lines, GPIO connections, and peripheral devices.

As much as possible, hardware is described using existing bindings to maximize use of existing support code, but since property and node names are simply text strings, it is easy to extend existing bindings or create new ones by defining new nodes and properties.  Be wary, however, of creating a new binding without first doing some homework about what already exists.  There are currently two different, incompatible, bindings for i2c busses that came about because the new binding was created without first investigating how i2c devices were already being enumerated in existing systems.

<a id="rst-history"></a>

## 1. History

The DT was originally created by Open Firmware as part of the communication method for passing data from Open Firmware to a client program (like to an operating system).  An operating system used the Device Tree to discover the topology of the hardware at runtime, and thereby supported a majority of available hardware without hard coded information (assuming drivers were available for all devices).

Since Open Firmware is commonly used on PowerPC and SPARC platforms, the Linux support for those architectures has for a long time used the Device Tree.

In 2005, when PowerPC Linux began a major cleanup and to merge 32-bit and 64-bit support, the decision was made to require DT support on all powerpc platforms, regardless of whether or not they used Open Firmware.  To do this, a DT representation called the Flattened Device Tree (FDT) was created which could be passed to the kernel as a binary blob without requiring a real Open Firmware implementation.  U-Boot, kexec, and other bootloaders were modified to support both passing a Device Tree Binary (dtb) and to modify a dtb at boot time.  DT was also added to the PowerPC boot wrapper (`arch/powerpc/boot/*`) so that a dtb could be wrapped up with the kernel image to support booting existing non-DT aware firmware.

Some time later, FDT infrastructure was generalized to be usable by all architectures.  At the time of this writing, 6 mainlined architectures (arm, microblaze, mips, powerpc, sparc, and x86) and 1 out of mainline (nios) have some level of DT support.

<a id="rst-data-model"></a>

## 2. Data Model

If you haven't already read the Device Tree Usage<a id="rst-footnote-reference-2"></a>[1](#rst-footnote-1) page, then go read it now.  It's okay, I'll wait....

<a id="rst-high-level-view"></a>

## 2.1 High Level View

The most important thing to understand is that the DT is simply a data structure that describes the hardware.  There is nothing magical about it, and it doesn't magically make all hardware configuration problems go away.  What it does do is provide a language for decoupling the hardware configuration from the board and device driver support in the Linux kernel (or any other operating system for that matter).  Using it allows board and device support to become data driven; to make setup decisions based on data passed into the kernel instead of on per-machine hard coded selections.

Ideally, data driven platform setup should result in less code duplication and make it easier to support a wide range of hardware with a single kernel image.

Linux uses DT data for three major purposes:

1. platform identification,

2. runtime configuration, and

3. device population.

<a id="rst-platform-identification"></a>

## 2.2 Platform Identification

First and foremost, the kernel will use data in the DT to identify the specific machine.  In a perfect world, the specific platform shouldn't matter to the kernel because all platform details would be described perfectly by the device tree in a consistent and reliable manner. Hardware is not perfect though, and so the kernel must identify the machine during early boot so that it has the opportunity to run machine-specific fixups.

In the majority of cases, the machine identity is irrelevant, and the kernel will instead select setup code based on the machine's core CPU or SoC.  On ARM for example, setup_arch() in arch/arm/kernel/setup.c will call setup_machine_fdt() in arch/arm/kernel/devtree.c which searches through the machine_desc table and selects the machine_desc which best matches the device tree data.  It determines the best match by looking at the 'compatible' property in the root device tree node, and comparing it with the dt_compat list in struct machine_desc (which is defined in arch/arm/include/asm/mach/arch.h if you're curious).

The 'compatible' property contains a sorted list of strings starting with the exact name of the machine, followed by an optional list of boards it is compatible with sorted from most compatible to least.  For example, the root compatible properties for the TI BeagleBoard and its successor, the BeagleBoard xM board might look like, respectively:



```text
compatible = "ti,omap3-beagleboard", "ti,omap3450", "ti,omap3";
compatible = "ti,omap3-beagleboard-xm", "ti,omap3450", "ti,omap3";
```

Where "ti,omap3-beagleboard-xm" specifies the exact model, it also claims that it is compatible with the OMAP 3450 SoC, and the omap3 family of SoCs in general.  You'll notice that the list is sorted from most specific (exact board) to least specific (SoC family).

Astute readers might point out that the Beagle xM could also claim compatibility with the original Beagle board.  However, one should be cautioned about doing so at the board level since there is typically a high level of change from one board to another, even within the same product line, and it is hard to nail down exactly what is meant when one board claims to be compatible with another.  For the top level, it is better to err on the side of caution and not claim one board is compatible with another.  The notable exception would be when one board is a carrier for another, such as a CPU module attached to a carrier board.

One more note on compatible values.  Any string used in a compatible property must be documented as to what it indicates.  Add documentation for compatible strings in Documentation/devicetree/bindings.

Again on ARM, for each machine_desc, the kernel looks to see if any of the dt_compat list entries appear in the compatible property. If one does, then that machine_desc is a candidate for driving the machine.  After searching the entire table of machine_descs, setup_machine_fdt() returns the 'most compatible' machine_desc based on which entry in the compatible property each machine_desc matches against.  If no matching machine_desc is found, then it returns NULL.

The reasoning behind this scheme is the observation that in the majority of cases, a single machine_desc can support a large number of boards if they all use the same SoC, or same family of SoCs.  However, invariably there will be some exceptions where a specific board will require special setup code that is not useful in the generic case. Special cases could be handled by explicitly checking for the troublesome board(s) in generic setup code, but doing so very quickly becomes ugly and/or unmaintainable if it is more than just a couple of cases.

Instead, the compatible list allows a generic machine_desc to provide support for a wide common set of boards by specifying "less compatible" values in the dt_compat list.  In the example above, generic board support can claim compatibility with "ti,omap3" or "ti,omap3450".  If a bug was discovered on the original beagleboard that required special workaround code during early boot, then a new machine_desc could be added which implements the workarounds and only matches on "ti,omap3-beagleboard".

PowerPC uses a slightly different scheme where it calls the .probe() hook from each machine_desc, and the first one returning TRUE is used. However, this approach does not take into account the priority of the compatible list, and probably should be avoided for new architecture support.

<a id="rst-runtime-configuration"></a>

## 2.3 Runtime configuration

In most cases, a DT will be the sole method of communicating data from firmware to the kernel, so also gets used to pass in runtime and configuration data like the kernel parameters string and the location of an initrd image.

Most of this data is contained in the /chosen node, and when booting Linux it will look something like this:



```text
chosen {
        bootargs = "console=ttyS0,115200 loglevel=8";
        initrd-start = <0xc8000000>;
        initrd-end = <0xc8200000>;
};
```

The bootargs property contains the kernel arguments, and the initrd-\* properties define the address and size of an initrd blob.  Note that initrd-end is the first address after the initrd image, so this doesn't match the usual semantic of struct resource.  The chosen node may also optionally contain an arbitrary number of additional properties for platform-specific configuration data.

During early boot, the architecture setup code calls of_scan_flat_dt() several times with different helper callbacks to parse device tree data before paging is set up.  The of_scan_flat_dt() code scans through the device tree and uses the helpers to extract information required during early boot.  Typically the early_init_dt_scan_chosen() helper is used to parse the chosen node including kernel parameters, early_init_dt_scan_root() to initialize the DT address space model, and early_init_dt_scan_memory() to determine the size and location of usable RAM.

On ARM, the function setup_machine_fdt() is responsible for early scanning of the device tree after selecting the correct machine_desc that supports the board.

<a id="rst-device-population"></a>

## 2.4 Device population

After the board has been identified, and after the early configuration data has been parsed, then kernel initialization can proceed in the normal way.  At some point in this process, unflatten_device_tree() is called to convert the data into a more efficient runtime representation. This is also when machine-specific setup hooks will get called, like the machine_desc .init_early(), .init_irq() and .init_machine() hooks on ARM.  The remainder of this section uses examples from the ARM implementation, but all architectures will do pretty much the same thing when using a DT.

As can be guessed by the names, .init_early() is used for any machine- specific setup that needs to be executed early in the boot process, and .init_irq() is used to set up interrupt handling.  Using a DT doesn't materially change the behaviour of either of these functions. If a DT is provided, then both .init_early() and .init_irq() are able to call any of the DT query functions (of\_\* in include/linux/of\*.h) to get additional data about the platform.

The most interesting hook in the DT context is .init_machine() which is primarily responsible for populating the Linux device model with data about the platform.  Historically this has been implemented on embedded platforms by defining a set of static clock structures, platform_devices, and other data in the board support .c file, and registering it en-masse in .init_machine().  When DT is used, then instead of hard coding static devices for each platform, the list of devices can be obtained by parsing the DT, and allocating device structures dynamically.

The simplest case is when .init_machine() is only responsible for registering a block of platform_devices.  A platform_device is a concept used by Linux for memory or I/O mapped devices which cannot be detected by hardware, and for 'composite' or 'virtual' devices (more on those later).  While there is no 'platform device' terminology for the DT, platform devices roughly correspond to device nodes at the root of the tree and children of simple memory mapped bus nodes.

About now is a good time to lay out an example.  Here is part of the device tree for the NVIDIA Tegra board:



```text
/{
      compatible = "nvidia,harmony", "nvidia,tegra20";
      #address-cells = <1>;
      #size-cells = <1>;
      interrupt-parent = <&intc>;

      chosen { };
      aliases { };

      memory {
              device_type = "memory";
              reg = <0x00000000 0x40000000>;
      };

      soc {
              compatible = "nvidia,tegra20-soc", "simple-bus";
              #address-cells = <1>;
              #size-cells = <1>;
              ranges;

              intc: interrupt-controller@50041000 {
                      compatible = "nvidia,tegra20-gic";
                      interrupt-controller;
                      #interrupt-cells = <1>;
                      reg = <0x50041000 0x1000>, < 0x50040100 0x0100 >;
              };

              serial@70006300 {
                      compatible = "nvidia,tegra20-uart";
                      reg = <0x70006300 0x100>;
                      interrupts = <122>;
              };

              i2s1: i2s@70002800 {
                      compatible = "nvidia,tegra20-i2s";
                      reg = <0x70002800 0x100>;
                      interrupts = <77>;
                      codec = <&wm8903>;
              };

              i2c@7000c000 {
                      compatible = "nvidia,tegra20-i2c";
                      #address-cells = <1>;
                      #size-cells = <0>;
                      reg = <0x7000c000 0x100>;
                      interrupts = <70>;

                      wm8903: codec@1a {
                              compatible = "wlf,wm8903";
                              reg = <0x1a>;
                              interrupts = <347>;
                      };
              };
      };

      sound {
              compatible = "nvidia,harmony-sound";
              i2s-controller = <&i2s1>;
              i2s-codec = <&wm8903>;
      };
};
```

At .init_machine() time, Tegra board support code will need to look at this DT and decide which nodes to create platform_devices for. However, looking at the tree, it is not immediately obvious what kind of device each node represents, or even if a node represents a device at all.  The /chosen, /aliases, and /memory nodes are informational nodes that don't describe devices (although arguably memory could be considered a device).  The children of the /soc node are memory mapped devices, but the [codec@1a](<mailto:codec@1a>) is an i2c device, and the sound node represents not a device, but rather how other devices are connected together to create the audio subsystem.  I know what each device is because I'm familiar with the board design, but how does the kernel know what to do with each node?

The trick is that the kernel starts at the root of the tree and looks for nodes that have a 'compatible' property.  First, it is generally assumed that any node with a 'compatible' property represents a device of some kind, and second, it can be assumed that any node at the root of the tree is either directly attached to the processor bus, or is a miscellaneous system device that cannot be described any other way. For each of these nodes, Linux allocates and registers a platform_device, which in turn may get bound to a platform_driver.

Why is using a platform_device for these nodes a safe assumption? Well, for the way that Linux models devices, just about all bus_types assume that its devices are children of a bus controller.  For example, each i2c_client is a child of an i2c_master.  Each spi_device is a child of an SPI bus.  Similarly for USB, PCI, MDIO, etc.  The same hierarchy is also found in the DT, where I2C device nodes only ever appear as children of an I2C bus node.  Ditto for SPI, MDIO, USB, etc.  The only devices which do not require a specific type of parent device are platform_devices (and amba_devices, but more on that later), which will happily live at the base of the Linux /sys/devices tree.  Therefore, if a DT node is at the root of the tree, then it really probably is best registered as a platform_device.

Linux board support code calls of_platform_populate(NULL, NULL, NULL, NULL) to kick off discovery of devices at the root of the tree.  The parameters are all NULL because when starting from the root of the tree, there is no need to provide a starting node (the first NULL), a parent struct device (the last NULL), and we're not using a match table (yet).  For a board that only needs to register devices, .init_machine() can be completely empty except for the of_platform_populate() call.

In the Tegra example, this accounts for the /soc and /sound nodes, but what about the children of the SoC node?  Shouldn't they be registered as platform devices too?  For Linux DT support, the generic behaviour is for child devices to be registered by the parent's device driver at driver .probe() time.  So, an i2c bus device driver will register a i2c_client for each child node, an SPI bus driver will register its spi_device children, and similarly for other bus_types. According to that model, a driver could be written that binds to the SoC node and simply registers platform_devices for each of its children.  The board support code would allocate and register an SoC device, a (theoretical) SoC device driver could bind to the SoC device, and register platform_devices for /soc/interrupt-controller, /soc/serial, /soc/i2s, and /soc/i2c in its .probe() hook.  Easy, right?

Actually, it turns out that registering children of some platform_devices as more platform_devices is a common pattern, and the device tree support code reflects that and makes the above example simpler.  The second argument to of_platform_populate() is an of_device_id table, and any node that matches an entry in that table will also get its child nodes registered.  In the Tegra case, the code can look something like this:



```text
static void __init harmony_init_machine(void)
{
      /* ... */
      of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
```

"simple-bus" is defined in the Devicetree Specification as a property meaning a simple memory mapped bus, so the of_platform_populate() code could be written to just assume simple-bus compatible nodes will always be traversed.  However, we pass it in as an argument so that board support code can always override the default behaviour.

\[Need to add discussion of adding i2c/spi/etc child devices\]

<a id="rst-appendix-a-amba-devices"></a>

## Appendix A: AMBA devices

ARM Primecells are a certain kind of device attached to the ARM AMBA bus which include some support for hardware detection and power management.  In Linux, struct amba_device and the amba_bus_type is used to represent Primecell devices.  However, the fiddly bit is that not all devices on an AMBA bus are Primecells, and for Linux it is typical for both amba_device and platform_device instances to be siblings of the same bus segment.

When using the DT, this creates problems for of_platform_populate() because it must decide whether to register each node as either a platform_device or an amba_device.  This unfortunately complicates the device creation model a little bit, but the solution turns out not to be too invasive.  If a node is compatible with "arm,primecell", then of_platform_populate() will register it as an amba_device instead of a platform_device.

---

# Device tree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings_

> Reference for Device tree bindings.

<!-- SPDX-License-Identifier: GPL-2.0 -->

- [Devicetree (DT) ABI](</kernel/hardware/devicetree/bindings/abi.md>)
- [Devicetree Sources (DTS) Coding Style](</kernel/hardware/devicetree/bindings/dts-coding-style.md>)
- [DOs and DON'Ts for designing and writing Devicetree bindings](</kernel/hardware/devicetree/bindings/writing-bindings.md>)
- [writing-schema](<https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/devicetree/bindings/writing-schema.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92>)
- [Submitting Devicetree (DT) binding patches](</kernel/hardware/devicetree/bindings/submitting-patches.md>)

---

# Devicetree (DT) ABI

_Peios Kernel / Hardware and drivers / Device tree / bindings_

> Regarding stable bindings/ABI, we quote from the 2013 ARM mini-summit summary document:

<a id="rst-devicetree-dt-abi"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

- **I.** Regarding stable bindings/ABI, we quote from the 2013 ARM mini-summit summary document:

  > "That still leaves the question of, what does a stable binding look like?  Certainly a stable binding means that a newer kernel will not break on an older device tree, but that doesn't mean the binding is frozen for all time. Grant said there are ways to change bindings that don't result in breakage. For instance, if a new property is added, then default to the previous behaviour if it is missing. If a binding truly needs an incompatible change, then change the compatible string at the same time.  The driver can bind against both the old and the new. These guidelines aren't new, but they desperately need to be documented."

- **II.** General binding rules

> 1. Maintainers, don't let perfect be the enemy of good.  Don't hold up a binding because it isn't perfect.
>
> 2. Use specific compatible strings so that if we need to add a feature (DMA) in the future, we can create a new compatible string.  See I.
>
> 3. Bindings can be augmented, but the driver shouldn't break when given the old binding. ie. add additional properties, but don't change the meaning of an existing property. For drivers, default to the original behaviour when a newly added property is missing.
>
> 4. Don't submit bindings for staging or unstable.  That will be decided by the devicetree maintainers *after* discussion on the mailinglist.

- **III.** Notes

> 1. This document is intended as a general familiarization with the process as decided at the 2013 Kernel Summit.  When in doubt, the current word of the devicetree maintainers overrules this document.  In that situation, a patch updating this document would be appreciated.

---

# Devicetree Sources (DTS) Coding Style

_Peios Kernel / Hardware and drivers / Device tree / bindings_

> When writing Devicetree Sources (DTS) please observe below guidelines. They should be considered complementary to any rules expressed already in the Devicetree Specification and the dtc compiler (including W=1 and W=2 builds).

<a id="rst-devicetree-sources-dts-coding-style"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

When writing Devicetree Sources (DTS) please observe below guidelines.  They should be considered complementary to any rules expressed already in the Devicetree Specification and the dtc compiler (including W=1 and W=2 builds).

Individual architectures and subarchitectures can define additional rules, making the coding style stricter.

<a id="rst-naming-and-valid-characters"></a>

## Naming and Valid Characters

The Devicetree Specification allows a broad range of characters in node and property names, but this coding style narrows the range down to achieve better code readability.

1. Node and property names can use only the following characters:

   - Lowercase characters: \[a-z\]

   - Digits: \[0-9\]

   - Dash: -

2. Labels can use only the following characters:

   - Lowercase characters: \[a-z\]

   - Digits: \[0-9\]

   - Underscore: \_

3. Unless a bus defines differently, unit addresses shall use lowercase hexadecimal digits, without leading zeros (padding).

4. Hex values in properties, e.g. "reg", shall use lowercase hex.  The address part can be padded with leading zeros.

Example:



```text
gpi_dma2: dma-controller@a00000 {
        compatible = "qcom,sm8550-gpi-dma", "qcom,sm6350-gpi-dma";
        reg = <0x0 0x00a00000 0x0 0x60000>;
}
```

<a id="rst-order-of-nodes"></a>

## Order of Nodes

1. Nodes on any bus, thus using unit addresses for children, shall be ordered by unit address in ascending order. Alternatively for some subarchitectures, nodes of the same type can be grouped together, e.g. all I2C controllers one after another even if this breaks unit address ordering.

2. Nodes without unit addresses shall be ordered alpha-numerically by the node name.  For a few node types, they can be ordered by the main property, e.g. pin configuration states ordered by value of "pins" property.

3. When extending nodes in the board DTS via &amp;label, the entries shall be ordered either alpha-numerically or by keeping the order from DTSI, where the choice depends on the subarchitecture.

The above-described ordering rules are easy to enforce during review, reduce chances of conflicts for simultaneous additions of new nodes to a file and help in navigating through the DTS source.

Example:



```text
/* SoC DTSI */

/ {
        cpus {
                /* ... */
        };

        psci {
                /* ... */
        };

        soc@0 {
                dma: dma-controller@10000 {
                        /* ... */
                };

                clk: clock-controller@80000 {
                        /* ... */
                };
        };
};

/* Board DTS - alphabetical order */

&clk {
        /* ... */
};

&dma {
        /* ... */
};

/* Board DTS - alternative order, keep as DTSI */

&dma {
        /* ... */
};

&clk {
        /* ... */
};
```

<a id="rst-order-of-properties-in-device-node"></a>

## Order of Properties in Device Node

The following order of properties in device nodes is preferred:

1. "compatible"

2. "reg"

3. "ranges"

4. Standard/common properties (defined by common bindings, e.g. without vendor-prefixes)

5. Vendor-specific properties

6. "status" (if applicable), preceded by a blank line if there is content before the property

7. Child nodes, where each node is preceded with a blank line

The "status" property is by default "okay", thus it can be omitted.

The above-described ordering follows this approach:

1. Most important properties start the node: compatible then bus addressing to match unit address.

2. Each node will have common properties in similar place.

3. Status is the last information to annotate that device node is or is not finished (board resources are needed).

The individual properties inside each group shall use natural sort order by the property name.

Example:



```text
/* SoC DTSI */

device_node: device-class@6789abc {
        compatible = "vendor,device";
        reg = <0x0 0x06789abc 0x0 0xa123>;
        ranges = <0x0 0x0 0x06789abc 0x1000>;
        #dma-cells = <1>;
        clocks = <&clock_controller 0>, <&clock_controller 1>;
        clock-names = "bus", "host";
        #address-cells = <1>;
        #size-cells = <1>;
        vendor,custom-property = <2>;

        status = "disabled";

        child_node: child-class@100 {
                reg = <0x100 0x200>;
                /* ... */
        };
};

/* Board DTS */

&device_node {
        vdd-0v9-supply = <&board_vreg1>;
        vdd-1v8-supply = <&board_vreg4>;
        vdd-3v3-supply = <&board_vreg2>;
        vdd-12v-supply = <&board_vreg3>;

        status = "okay";
}
```

<a id="rst-indentation-and-wrapping"></a>

## Indentation and wrapping

1. Use indentation and wrap lines according to [Documentation/process/coding-style.rst](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/process/coding-style.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92).

2. Each entry in arrays with multiple cells, e.g. "reg" with two IO addresses, shall be enclosed in &lt;&gt;.

3. For arrays spanning across lines, it is preferred to split on item boundary and align the continued entries with opening &lt; from the first line. Usually avoid splitting individual items unless they significantly exceed line wrap limit.

Example:



```text
thermal-sensor@c271000 {
        compatible = "qcom,sm8550-tsens", "qcom,tsens-v2";
        reg = <0x0 0x0c271000 0x0 0x1000>,
              <0x0 0x0c222000 0x0 0x1000>;
        /* Lines exceeding coding style line wrap limit: */
        interconnects = <&aggre1_noc MASTER_USB3_0 0 &mc_virt SLAVE_EBI1 0>,
                        <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_USB3_0 0>;
};
```

<a id="rst-organizing-dtsi-and-dts"></a>

## Organizing DTSI and DTS

The DTSI and DTS files shall be organized in a way representing the common, reusable parts of hardware.  Typically, this means organizing DTSI and DTS files into several files:

1. DTSI with contents of the entire SoC, without nodes for hardware not present on the SoC.

2. If applicable: DTSI with common or re-usable parts of the hardware, e.g. entire System-on-Module.

3. DTS representing the board.

Hardware components that are present on the board shall be placed in the board DTS, not in the SoC or SoM DTSI.  A partial exception is a common external reference SoC input clock, which could be coded as a fixed-clock in the SoC DTSI with its frequency provided by each board DTS.

---

# Submitting Devicetree (DT) binding patches

_Peios Kernel / Hardware and drivers / Device tree / bindings_

> Normal patch submission rules from Documentation/process/submitting-patches.rst applies.

<a id="rst-submitting-devicetree-dt-binding-patches"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

<a id="rst-i-for-patch-submitters"></a>

## I. For patch submitters

> 0. Normal patch submission rules from [Documentation/process/submitting-patches.rst](/kernel/development/process/submitting-patches.md) applies.
>
> 1. The Documentation/ and include/dt-bindings/ portion of the patch should be a separate patch. The preferred subject prefix for binding patches is:
>
>
>
>    ```text
>    "dt-bindings: <binding dir>: ..."
>    ```
>
>    Few subsystems, like ASoC, media, regulators, SCSI, SPI and UFS, expect reverse order of the prefixes, based on subsystem name:
>
>
>
>    ```text
>    "<binding dir>: dt-bindings: ..."
>    ```
>
>    The 80 characters of the subject are precious. It is recommended to not use "Documentation", "doc" or "YAML" because that is implied. All bindings are docs and all new bindings are supposed to be in Devicetree schema format.  Repeating "binding" again should also be avoided, so for a new device it is often enough for example:
>
>
>
>    ```text
>    "dt-bindings: iio: adc: Add ROHM BD79100G"
>    ```
>
>    Conversion of other formats to DT schema:
>
>
>
>    ```text
>    "dt-bindings: iio: adc: adi,ad7476: Convert to DT schema"
>    ```
>
> 2. DT binding files are written in DT schema format using json-schema vocabulary and YAML file format. The DT binding files must pass validation by running:
>
>
>
>    ```text
>    make dt_binding_check
>    ```
>
>    See [Documentation/devicetree/bindings/writing-schema.rst](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/devicetree/bindings/writing-schema.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92) for more details about schema and tools setup.
>
> 3. DT binding files should be dual licensed. The preferred license tag is (GPL-2.0-only OR BSD-2-Clause).
>
> 4. Submit the entire series to the devicetree mailinglist at
>
>    > [devicetree@vger.kernel.org](<mailto:devicetree@vger.kernel.org>)
>
>    and Cc: the DT maintainers. Use scripts/get_maintainer.pl to identify all of the DT maintainers.
>
> 5. The Documentation/ portion of the patch should come in the series before the code implementing the binding.
>
> 6. Any compatible strings used in a chip or board DTS file must be previously documented in the corresponding DT binding file in Documentation/devicetree/bindings.  This rule applies even if the Linux device driver does not yet match on the compatible string.  \[ checkpatch will emit warnings if this step is not followed as of commit bff5da4335256513497cc8c79f9a9d1665e09864 ("checkpatch: add DT compatible string documentation checks"). \]
>
> 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.
>
>    If a driver subsystem maintainer prefers to apply entire set, instead of their relevant portion of patchset, please split the DTS patches into separate patchset with a reference in changelog or cover letter to the bindings submission on the mailing list.
>
> 8. If a documented compatible string is not yet matched by the driver, the documentation should also include a compatible string that is matched by the driver.
>
> 9. Bindings are actively used by multiple projects other than the Linux Kernel, extra care and consideration may need to be taken when making changes to existing bindings.

<a id="rst-ii-for-kernel-maintainers"></a>

## II. For kernel maintainers

> 1. If you aren't comfortable reviewing a given binding, reply to it and ask the devicetree maintainers for guidance.  This will help them prioritize which ones to review and which ones are ok to let go.
>
> 2. For driver (not subsystem) bindings: If you are comfortable with the binding, and it hasn't received an Acked-by from the devicetree maintainers after a few weeks, go ahead and take it.
>
>    For subsystem bindings (anything affecting more than a single device), getting a devicetree maintainer to review it is required.
>
> 3. For a series going through multiple trees, the binding patch should be kept with the driver using the binding.
>
> 4. The DTS files should however never be applied via driver subsystem tree, but always via platform SoC trees on dedicated branches (see also [Documentation/process/maintainer-soc.rst](/kernel/development/process/maintainer-soc.md)).

<a id="rst-iii-notes"></a>

## III. Notes

> 0. Please see [Documentation/devicetree/bindings/ABI.rst](/kernel/hardware/devicetree/bindings/abi.md) for details regarding devicetree ABI.
>
> 1. This document is intended as a general familiarization with the process as decided at the 2013 Kernel Summit.  When in doubt, the current word of the devicetree maintainers overrules this document.  In that situation, a patch updating this document would be appreciated.

---

# DOs and DON'Ts for designing and writing Devicetree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings_

> This is a list of common review feedback items focused on binding design. With every rule, there are exceptions and bindings have many gray areas.

<a id="rst-dos-and-don-ts-for-designing-and-writing-devicetree-bindings"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

This is a list of common review feedback items focused on binding design. With every rule, there are exceptions and bindings have many gray areas.

For guidelines related to patches, see [Documentation/devicetree/bindings/submitting-patches.rst](/kernel/hardware/devicetree/bindings/submitting-patches.md)

<a id="rst-overall-design"></a>

## Overall design

- DO attempt to make bindings complete even if a driver doesn't support some features. For example, if a device has an interrupt, then include the 'interrupts' property even if the driver is only polled mode.

- DON'T refer to Linux or "device driver" in bindings. Bindings should be based on what the hardware has, not what an OS and driver currently support.

- DO use node names matching the class of the device. Many standard names are defined in the DT Spec. If there isn't one, consider adding it.

- DO check that the example matches the documentation especially after making review changes.

- DON'T create nodes just for the sake of instantiating drivers. Multi-function devices only need child nodes when the child nodes have their own DT resources. A single node can be multiple providers (e.g. clocks and resets).

- DON'T treat device node names as a stable ABI, but instead use phandles or compatibles to find sibling devices. Exception: sub-nodes of given device could be treated as ABI, if explicitly documented in the bindings.

- DON'T use 'syscon' alone without a specific compatible string. A 'syscon' hardware block should have a compatible string unique enough to infer the register layout of the entire block (at a minimum).

- DON'T use 'simple-mfd' compatible for non-trivial devices, where children depend on some resources from the parent. Similarly, 'simple-bus' should not be used for complex buses and even 'regs' property means device is not a simple bus.

<a id="rst-properties"></a>

## Properties

- DO make 'compatible' properties specific.

  > - 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.
  >
  > - DO add new compatibles in case there are new features or bugs.
  >
  > - DO use a SoC-specific compatible for all SoC devices, followed by a fallback if appropriate. SoC-specific compatibles are also preferred for the fallbacks.
  >
  > - DON'T use bus suffixes to encode the type of interface device is using. The parent bus node already implies that interface.  DON'T add the type of device, if the device cannot be anything else.

- DO use a vendor prefix on device-specific property names. Consider if properties could be common among devices of the same class. Check other existing bindings for similar devices.

- DON'T redefine common properties. Just reference the definition and define constraints specific to the device.

- DON'T add properties to avoid a specific compatible. DON'T add properties if they are implied by (deducible from) the compatible.

- DO use common property unit suffixes for properties with scientific units. Recommended suffixes are listed at [https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml](<https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml>)

- DO define properties in terms of constraints. How many entries? What are possible values? What is the order? All these constraints represent the ABI as well.

- DON'T make changes that break the ABI without explicit and detailed rationale for why the changes have to be made and their impact. ABI impact goes beyond the Linux kernel, because it also covers other open-source upstream projects.

<a id="rst-typical-cases-and-caveats"></a>

## Typical cases and caveats

- Phandle entries, like clocks/dmas/interrupts/resets, should always be explicitly ordered. Include the \{clock,dma,interrupt,reset\}-names if there is more than one phandle. When used, both of these fields need the same constraints (e.g. list of items).

- For names used in \{clock,dma,interrupt,reset\}-names, do not add any suffix, e.g.: "tx" instead of "txirq" (for interrupt).

- Properties without schema types (e.g. without standard suffix or not defined by schema) need the type, even if this is an enum.

- If schema includes other schema (e.g. /schemas/i2c/i2c-controller.yaml) use "unevaluatedProperties:false". In other cases, usually use "additionalProperties:false".

- For sub-blocks/components of bigger device (e.g. SoC blocks) use rather device-based compatible (e.g. SoC-based compatible), instead of custom versioning of that component. For example use "vendor,soc1234-i2c" instead of "vendor,i2c-v2".

- "syscon" is not a generic property. Use vendor and type, e.g. "vendor,power-manager-syscon".

- Do not add instance index (IDs) properties or custom OF aliases.  If the devices have different programming model, they might need different compatibles.  If such devices use some other device in a different way, e.g. they program the phy differently, use cell/phandle arguments.

- Bindings files should be named like compatible: vendor,device.yaml. In case of multiple compatibles in the binding, use one of the fallbacks or a more generic name, yet still matching compatible style.

<a id="rst-board-soc-dts-files"></a>

## Board/SoC .dts Files

- DO put all MMIO devices under a bus node and not at the top-level.

- DO use non-empty 'ranges' to limit the size of child buses/devices. 64-bit platforms don't need all devices to have 64-bit address and size.

---

# Writing Devicetree Bindings in json-schema

_Peios Kernel / Hardware and drivers / Device tree / bindings_

> Devicetree bindings are written using json-schema vocabulary. Schema files are written in a JSON-compatible subset of YAML. YAML is used instead of JSON as it is considered more human readable and has some advantages such as allowing…

<a id="rst-writing-devicetree-bindings-in-json-schema"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

Devicetree bindings are written using json-schema vocabulary. Schema files are written in a JSON-compatible subset of YAML. YAML is used instead of JSON as it is considered more human readable and has some advantages such as allowing comments (Prefixed with '\#').

Also see [Annotated Example Schema](<#rst-example-schema>).

<a id="rst-schema-contents"></a>

## Schema Contents

Each schema doc is a structured json-schema which is defined by a set of top-level properties. Generally, there is one binding defined per file. The top-level json-schema properties used are:

- **$id**

  A json-schema unique identifier string. The string must be a valid URI typically containing the binding's filename and path. For DT schema, it must begin with "[http://devicetree.org/schemas/](<http://devicetree.org/schemas/>)". The URL is used in constructing references to other files specified in schema "$ref" properties. A $ref value with a leading '/' will have the hostname prepended. A $ref value with only a relative path or filename will be prepended with the hostname and path components of the current schema file's '$id' value. A URL is used even for local files, but there may not actually be files present at those locations.

- **$schema**

  Indicates the meta-schema the schema file adheres to.

- **title**

  A one-line description of the hardware being described in the binding schema.

- **maintainers**

  A DT specific property. Contains a list of email address(es) for maintainers of this binding.

- **description**

  Optional. A multi-line text block containing any detailed information about this hardware. It should contain things such as what the block or device does, standards the device conforms to, and links to datasheets for more information.

  The YAML format has several options for defining the formatting of the text block. The options are controlled with indicator characters following the key (e.g. "description: \|"). The minimum formatting needed for a block should be used. The formatting controls can not only affect whether the YAML can be parsed correctly, but are important when the text blocks are rendered to another form. The options are as follows.

  The default without any indicators is flowed, plain scalar style where single line breaks and leading whitespace are stripped. Paragraphs are delimited by blank lines (i.e. double line break). This style cannot contain ": " in it as it will be interpreted as a key. Any " \#" sequence will be interpreted as a comment. There's other restrictions on characters as well. Most restrictions are on what the first character can be.

  The second style is folded which is indicated by "&gt;" character. In addition to maintaining line breaks on double line breaks, the folded style also maintains leading whitespace beyond indentation of the first line. The line breaks on indented lines are also maintained.

  The third style is literal which is indicated by "\|" character. The literal style maintains all line breaks and whitespace (beyond indentation of the first line).

  The above is not a complete description of YAML text blocks. More details on multi-line YAML text blocks can be found online:

  [https://yaml-multiline.info/](<https://yaml-multiline.info/>)

  [https://www.yaml.info/learn/quote.html](<https://www.yaml.info/learn/quote.html>)

- **select**

  Optional. A json-schema used to match nodes for applying the schema. By default, without 'select', nodes are matched against their possible compatible-string values or node name. Most bindings should not need select.

- **allOf**

  Optional. A list of other schemas to include. This is used to include other schemas the binding conforms to. This may be schemas for a particular class of devices such as I2C or SPI controllers.

- **properties**

  A set of sub-schema defining all the DT properties for the binding. The exact schema syntax depends on whether properties are known, common properties (e.g. 'interrupts') or are binding/vendor-specific properties.

A property can also define a child DT node with child properties defined under it.

For more details on properties sections, see 'Property Schema' section.

- **patternProperties**

  Optional. Similar to 'properties', but names are regex.

- **required**

  A list of DT properties from the 'properties' section that must always be present.

- **additionalProperties / unevaluatedProperties**

  Keywords controlling how schema will validate properties not matched by this schema's 'properties' or 'patternProperties'. Each schema is supposed to have exactly one of these keywords in top-level part, so either additionalProperties or unevaluatedProperties. Nested nodes, so properties being objects, are supposed to have one as well.

  - - **additionalProperties: false**

      Most common case, where no additional schema is referenced or if this binding allows subset of properties from other referenced schemas.

  - - **unevaluatedProperties: false**

      Used when this binding references other schema whose all properties should be allowed.

  - - **additionalProperties: true**

      - Top-level part: Rare case, used for schemas implementing common set of properties. Such schemas are supposed to be referenced by other schemas, which then use 'unevaluatedProperties: false'.  Typically bus or common-part schemas.

      - Nested node: When listing only the expected compatible of the nested node and there is an another schema matching that compatible which ends with one of two above cases ('false').

- **examples**

  Optional. A list of one or more DTS hunks implementing this binding only. Example should not contain unrelated device nodes, e.g. consumer nodes in a 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.

<a id="rst-property-schema"></a>

## Property Schema

The 'properties' section of the schema contains all the DT properties for a binding. Each property contains a set of constraints using json-schema vocabulary for that property. The properties schemas are what are used for validation of DT files.

For common properties, only additional constraints not covered by the common, binding schema need to be defined such as how many values are valid or what possible values are valid.

Vendor-specific properties will typically need more detailed schema. With the exception of boolean properties, they should have a reference to a type in schemas/types.yaml. A "description" property is always required.

The Devicetree schemas don't exactly match the YAML-encoded DT data produced by dtc. They are simplified to make them more compact and avoid a bunch of boilerplate. The tools process the schema files to produce the final schema for validation. There are currently 2 transformations the tools perform.

The default for arrays in json-schema is they are variable-sized and allow more entries than explicitly defined. This can be restricted by defining 'minItems', 'maxItems', and 'additionalItems'. However, for DeviceTree Schemas, a fixed size is desired in most cases, so these properties are added based on the number of entries in an 'items' list.

The YAML Devicetree format also makes all string values an array and scalar values a matrix (in order to define groupings) even when only a single value is present. Single entries in schemas are fixed up to match this encoding.

When bindings cover multiple similar devices that differ in some properties, those properties should be constrained for each device. This usually means:

> - In top level 'properties' define the property with the broadest constraints.
>
> - In 'if:then:' blocks, further narrow the constraints for those properties.
>
> - Do not define the properties within an 'if:then:' block (note that 'additionalItems' also won't allow that).

<a id="rst-coding-style"></a>

## Coding style

Use YAML coding style (two-space indentation). For DTS examples in the schema, preferred is four-space indentation.

Place entries in 'properties' and 'required' sections in the same order, using style from [Documentation/devicetree/bindings/dts-coding-style.rst](/kernel/hardware/devicetree/bindings/dts-coding-style.md).

<a id="rst-testing"></a>

## Testing

<a id="rst-dependencies"></a>

### Dependencies

The DT schema project must be installed in order to validate the DT schema binding documents and validate DTS files using the DT schema. The DT schema project can be installed with pip:



```text
pip3 install dtschema
```

Note that 'dtschema' installation requires 'swig' and Python development files installed first. On Debian/Ubuntu systems:



```text
apt install swig python3-dev
```

Several executables (dt-doc-validate, dt-mk-schema, dt-validate) will be installed. Ensure they are in your PATH (\~/.local/bin by default).

Recommended is also to install yamllint (used by dtschema when present).

<a id="rst-running-checks"></a>

### Running checks

The DT schema binding documents must be validated using the meta-schema (the schema for the schema) to ensure they are both valid json-schema and valid binding schema. All of the DT binding documents can be validated using the `dt_binding_check` target:



```text
make dt_binding_check
```

Or to validate a single schema and its example:



```text
make sram/sram.yaml
```

In order to perform validation of DT source files, use the `dtbs_check` target:



```text
make dtbs_check
```

Note that `dtbs_check` will skip any binding schema files with errors. It is necessary to use `dt_binding_check` to get all the validation errors in the binding schema files.

It is possible to run both in a single command:



```text
make dt_binding_check dtbs_check
```

It is also possible to combine running the above commands with a subset of matching schema files by setting the `DT_SCHEMA_FILES` variable to 1 or more specific schema files or patterns (partial match of a fixed string). Each file or pattern should be separated by ':'.



```text
make dt_binding_check DT_SCHEMA_FILES=trivial-devices.yaml
make dt_binding_check DT_SCHEMA_FILES=trivial-devices.yaml:rtc.yaml
make dt_binding_check DT_SCHEMA_FILES=/gpio/
make dtbs_check DT_SCHEMA_FILES=trivial-devices.yaml
```

<a id="rst-json-schema-resources"></a>

## json-schema Resources

[JSON-Schema Specifications](<http://json-schema.org/>)<a id="rst-json-schema-specifications"></a>

[Using JSON Schema Book](<http://usingjsonschema.com/>)<a id="rst-using-json-schema-book"></a>

<a id="rst-annotated-example-schema"></a>
<a id="rst-example-schema"></a>

## Annotated Example Schema

Also available as a separate file: [example-schema.yaml](/kernel/hardware/devicetree-bindings/dt-common/example-schema.md)


```text
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright 2018 Linaro Ltd.
%YAML 1.2
---
# All the top-level keys are standard json-schema keywords except for
# 'maintainers' and 'select'

# $id is a unique identifier based on the filename. There may or may not be a
# file present at the URL.
$id: http://devicetree.org/schemas/example-schema.yaml#
# $schema is the meta-schema this schema should be validated with.
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: An Example Device

maintainers:
  - Rob Herring <robh@kernel.org>

description: |
  A more detailed multi-line description of the binding.

  Details about the hardware device and any links to datasheets can go here.

  Literal blocks are marked with the '|' at the beginning. The end is marked by
  indentation less than the first line of the literal block. Lines also cannot
  begin with a tab character.

select: false
  # 'select' is a schema applied to a DT node to determine if this binding
  # schema should be applied to the node. It is optional and by default the
  # possible compatible strings are extracted and used to match.

  # In this case, a 'false' schema will never match.

properties:
  # A dictionary of DT properties for this binding schema
  compatible:
    # More complicated schema can use oneOf (XOR), anyOf (OR), or allOf (AND)
    # to handle different conditions.
    # In this case, it's needed to handle a variable number of values as there
    # isn't another way to express a constraint of the last string value.
    # The boolean schema must be a list of schemas.
    oneOf:
      - items:
          # items is a list of possible values for the property. The number of
          # values is determined by the number of elements in the list.
          # Order in lists is significant, order in dicts is not
          # Must be one of the 1st enums followed by the 2nd enum
          #
          # Each element in items should be 'enum' or 'const'
          - enum:
              - vendor,soc4-ip
              - vendor,soc3-ip
              - vendor,soc2-ip
          - const: vendor,soc1-ip
        # additionalItems being false is implied
        # minItems/maxItems equal to 2 is implied
      - items:
          # 'const' is just a special case of an enum with a single possible value
          - const: vendor,soc1-ip

  reg:
    # The core schema already checks that reg values are numbers, so device
    # specific schema don't need to do those checks.
    # The description of each element defines the order and implicitly defines
    # the number of reg entries.
    items:
      - description: core registers
      - description: aux registers
    # minItems/maxItems equal to 2 is implied

  reg-names:
    # The core schema enforces this (*-names) is a string array
    items:
      - const: core
      - const: aux

  clocks:
    # Cases that have only a single entry just need to express that with maxItems
    maxItems: 1
    description: bus clock. A description is only needed for a single item if
      there's something unique to add.
      The items should have a fixed order, so pattern matching names are
      discouraged.

  clock-names:
    # For single-entry lists in clocks, resets etc., the xxx-names often do not
    # bring any value, especially if they copy the IP block name.  In such case
    # just skip the xxx-names.
    items:
      - const: bus

  interrupts:
    # Either 1 or 2 interrupts can be present
    minItems: 1
    items:
      - description: tx or combined interrupt
      - description: rx interrupt
    description:
      A variable number of interrupts warrants a description of what conditions
      affect the number of interrupts. Otherwise, descriptions on standard
      properties are not necessary.
      The items should have a fixed order, so pattern matching names are
      discouraged.

  interrupt-names:
    # minItems must be specified here because the default would be 2
    minItems: 1
    items:
      - const: tx irq
      - const: rx irq

  # Property names starting with '#' must be quoted
  '#interrupt-cells':
    # A simple case where the value must always be '2'.
    # The core schema handles that this must be a single integer.
    const: 2

  interrupt-controller: true
    # The core checks this is a boolean, so just have to list it here to be
    # valid for this binding.

  clock-frequency:
    # The type is set in the core schema. Per-device schema only need to set
    # constraints on the possible values.
    minimum: 100
    maximum: 400000
    # The value that should be used if the property is not present
    default: 200

  foo-gpios:
    maxItems: 1
    description: A connection of the 'foo' gpio line.

  # *-supply is always a single phandle, so nothing more to define.
  foo-supply: true

  # Vendor-specific properties
  #
  # Vendor-specific properties have slightly different schema requirements than
  # common properties. They must have at least a type definition and
  # 'description'.
  vendor,int-property:
    description: Vendor-specific properties must have a description
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [2, 4, 6, 8, 10]

  vendor,bool-property:
    description: Vendor-specific properties must have a description. Boolean
      properties are one case where the json-schema 'type' keyword can be used
      directly.
    type: boolean

  vendor,string-array-property:
    description: Vendor-specific properties should reference a type in the
      core schema.
    $ref: /schemas/types.yaml#/definitions/string-array
    items:
      - enum: [foo, bar]
      - enum: [baz, boo]

  vendor,property-in-standard-units-microvolt:
    description: Vendor-specific properties having a standard unit suffix
      don't need a type.
    enum: [ 100, 200, 300 ]

  vendor,int-array-variable-length-and-constrained-values:
    description: Array might define what type of elements might be used (e.g.
      their range).
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 2
    maxItems: 3
    items:
      minimum: 0
      maximum: 8

  child-node:
    description: Child nodes are just another property from a json-schema
      perspective.
    type: object  # DT nodes are json objects
    # Child nodes also need additionalProperties or unevaluatedProperties, where
    # 'false' should be used in most cases (see 'child-node-with-own-schema'
    # below).
    additionalProperties: false
    properties:
      vendor,a-child-node-property:
        description: Child node properties have all the same schema
          requirements.
        type: boolean

    required:
      - vendor,a-child-node-property

  child-node-with-own-schema:
    description: |
      Child node with their own compatible and device schema which ends in
      'additionalProperties: false' or 'unevaluatedProperties: false' can
      mention only the compatible and use here 'additionalProperties: true'.
    type: object
    additionalProperties: true
    properties:
      compatible:
        const: vendor,sub-device

# Describe the relationship between different properties
dependencies:
  # 'vendor,bool-property' is only allowed when 'vendor,string-array-property'
  # is present
  vendor,bool-property: [ 'vendor,string-array-property' ]
  # Expressing 2 properties in both orders means all of the set of properties
  # must be present or none of them.
  vendor,string-array-property: [ 'vendor,bool-property' ]

required:
  - compatible
  - reg
  - interrupts
  - interrupt-controller

# if/then schema can be used to handle conditions on a property affecting
# another property. A typical case is a specific 'compatible' value changes the
# constraints on other properties.
#
# For multiple 'if' schema, group them under an 'allOf'.
#
# If the conditionals become too unwieldy, then it may be better to just split
# the binding into separate schema documents.
allOf:
  - if:
      properties:
        compatible:
          contains:
            const: vendor,soc2-ip
    then:
      required:
        - foo-supply
    else:
      # If otherwise the property is not allowed:
      properties:
        foo-supply: false
  # Altering schema depending on presence of properties is usually done by
  # dependencies (see above), however some adjustments might require if:
  - if:
      required:
        - vendor,bool-property
    then:
      properties:
        vendor,int-property:
          enum: [2, 4, 6]

# Ideally, the schema should have this line otherwise any other properties
# present are allowed. There's a few common properties such as 'status' and
# 'pinctrl-*' which are added automatically by the tooling.
#
# This can't be used in cases where another schema is referenced
# (i.e. allOf: [{$ref: ...}]).
# If and only if another schema is referenced and arbitrary children nodes can
# appear, "unevaluatedProperties: false" could be used.  A typical example is
# an I2C controller where no name pattern matching for children can be added.
additionalProperties: false

examples:
  # Examples are now compiled with dtc and validated against the schemas
  #
  # Examples have a default #address-cells and #size-cells value of 1. This can
  # be overridden or an appropriate parent bus node should be shown (such as on
  # i2c buses).
  #
  # Any includes used have to be explicitly included. Use 4-space indentation.
  - |
    node@1000 {
        compatible = "vendor,soc4-ip", "vendor,soc1-ip";
        reg = <0x1000 0x80>,
              <0x3000 0x80>;
        reg-names = "core", "aux";
        interrupts = <10>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

```

---

# Common properties

_Peios Kernel / Hardware and drivers / Device tree / bindings_

> Device-tree binding reference for Common properties.

## Endianness

The Devicetree Specification does not define any properties related to hardware
byte swapping, but endianness issues show up frequently in porting drivers to
different machine types.  This document attempts to provide a consistent
way of handling byte swapping across drivers.

## Optional properties:

- big-endian: Boolean; force big endian register accesses
  unconditionally (e.g. ioread32be/iowrite32be).  Use this if you
  know the peripheral always needs to be accessed in big endian (BE) mode.
- little-endian: Boolean; force little endian register accesses
  unconditionally (e.g. readl/writel).  Use this if you know the
  peripheral always needs to be accessed in little endian (LE) mode.
- native-endian: Boolean; always use register accesses matched to the
  endianness of the kernel binary (e.g. LE vmlinux -&gt; readl/writel,
  BE vmlinux -&gt; ioread32be/iowrite32be).  In this case no byte swaps
  will ever be performed.  Use this if the hardware "self-adjusts"
  register endianness based on the CPU's configured endianness.

If a binding supports these properties, then the binding should also
specify the default behavior if none of these properties are present.
In such cases, little-endian is the preferred default, but it is not
a requirement.  Some implementations assume that little-endian is
the default, because most existing (PCI-based) drivers implicitly
default to LE for their MMIO accesses.

## Examples:

Scenario 1 : CPU in LE mode &amp; device in LE mode.

```dts
dev: dev@40031000 {
	      compatible = "name";
	      reg = <0x40031000 0x1000>;
	      ...
	      native-endian;
};
```

Scenario 2 : CPU in LE mode &amp; device in BE mode.

```dts
dev: dev@40031000 {
	      compatible = "name";
	      reg = <0x40031000 0x1000>;
	      ...
	      big-endian;
};
```

Scenario 3 : CPU in BE mode &amp; device in BE mode.

```dts
dev: dev@40031000 {
	      compatible = "name";
	      reg = <0x40031000 0x1000>;
	      ...
	      native-endian;
};
```

Scenario 4 : CPU in BE mode &amp; device in LE mode.

```dts
dev: dev@40031000 {
	      compatible = "name";
	      reg = <0x40031000 0x1000>;
	      ...
	      little-endian;
};
```

## Daisy-chained devices

Many serially-attached GPIO and IIO devices are daisy-chainable.  To the
host controller, a daisy-chain appears as a single device, but the number
of inputs and outputs it provides is the sum of inputs and outputs provided
by all of its devices.  The driver needs to know how many devices the
daisy-chain comprises to determine the amount of data exchanged, how many
inputs and outputs to register and so on.

## Optional properties:

- #daisy-chained-devices: Number of devices in the daisy-chain (default is 1).

## Example:

```dts
gpio@0 {
	      compatible = "name";
	      reg = <0>;
	      gpio-controller;
	      #gpio-cells = <2>;
	      #daisy-chained-devices = <3>;
};
```

---

# Graph bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings_

> Device-tree binding reference for Graph bindings.

This file has moved to graph.yaml in dt-schema repo

---

# Jailhouse non-root cell device tree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings_

> Device-tree binding reference for Jailhouse non-root cell device tree bindings.

When running in a non-root Jailhouse cell (partition), the device tree of this
platform shall have a top-level "hypervisor" node with the following
properties:

- compatible = "jailhouse,cell"

---

# Resource names bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings_

> Device-tree binding reference for Resource names bindings.

Some properties contain an ordered list of 1 or more datum which are
normally accessed by index.  However, some devices will have multiple
values which are more naturally accessed by name.  Device nodes can
include a supplemental property for assigning names to each of the list
items.  The names property consists of a list of strings in the same
order as the data in the resource property.

The following supplemental names properties are defined.

```text
Resource Property	Supplemental Names Property
-----------------	---------------------------
reg			reg-names
clocks			clock-names
interrupts		interrupt-names
```

## Usage:

The -names property must be used in conjunction with the normal resource
property. If not it will be ignored.

## Examples:

```dts
l4-abe {
	compatible = "simple-bus";
	#address-cells = <2>;
	#size-cells = <1>;
	ranges = <0 0 0x48000000 0x00001000>, /* MPU path */
		 <1 0 0x49000000 0x00001000>; /* L3 path */
	mcasp {
		compatible = "ti,mcasp";
		reg = <0 0x10 0x10>, <0 0x20 0x10>,
		      <1 0x10 0x10>, <1 0x20 0x10>;
		reg-names = "mpu", "dat",
			    "dma", "dma_dat";
		interrupts = <11>, <12>;
		interrupt-names = "rx", "tx";
	};

	timer {
		compatible = "ti,timer";
		reg = <0 0x40 0x10>, <1 0x40 0x10>;
		reg-names = "mpu", "dma";
	};
};
```

```dts
usb {
	compatible = "ti,usb-host";
	reg = <0x4a064000 0x800>, <0x4a064800 0x200>,
	      <0x4a064c00 0x200>;
	reg-names = "config", "ohci", "ehci";
	interrupts = <14>, <15>;
	interrupt-names = "ohci", "ehci";
};
```

---

# 1) OF unittest platform device

_Peios Kernel / Hardware and drivers / Device tree / bindings_

> Device-tree binding reference for 1) OF unittest platform device.

\*\* unittest

## Required properties:

- compatible: must be "unittest"

All other properties are optional.

## Example:

```dts
	unittest {
		compatible = "unittest";
	};
```

2) OF unittest i2c adapter platform device

\*\* platform device unittest adapter

## Required properties:

- compatible: must be unittest-i2c-bus

Children nodes contain unittest i2c devices.

## Example:

```dts
	unittest-i2c-bus {
		compatible = "unittest-i2c-bus";
	};
```

3) OF unittest i2c device

\*\* I2C unittest device

## Required properties:

- compatible: must be unittest-i2c-dev

All other properties are optional

## Example:

```dts
	unittest-i2c-dev {
		compatible = "unittest-i2c-dev";
	};
```

4) OF unittest i2c mux device

\*\* I2C unittest mux

## Required properties:

- compatible: must be unittest-i2c-mux

Children nodes contain unittest i2c bus nodes per channel.

## Example:

```dts
	unittest-i2c-mux {
		compatible = "unittest-i2c-mux";
		#address-cells = <1>;
		#size-cells = <0>;
		channel-0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;
			i2c-dev {
				reg = <8>;
				compatible = "unittest-i2c-dev";
			};
		};
	};
```

---

# d) Xilinx IP cores

_Peios Kernel / Hardware and drivers / Device tree / bindings_

> Device-tree binding reference for d) Xilinx IP cores.

```text
   The Xilinx EDK toolchain ships with a set of IP cores (devices) for use
   in Xilinx Spartan and Virtex FPGAs.  The devices cover the whole range
   of standard device types (network, serial, etc.) and miscellaneous
   devices (gpio, LCD, spi, etc).  Also, since these devices are
   implemented within the fpga fabric every instance of the device can be
   synthesised with different options that change the behaviour.
```

```text
   Each IP-core has a set of parameters which the FPGA designer can use to
   control how the core is synthesized.  Historically, the EDK tool would
   extract the device parameters relevant to device drivers and copy them
   into an 'xparameters.h' in the form of #define symbols.  This tells the
   device drivers how the IP cores are configured, but it requires the kernel
   to be recompiled every time the FPGA bitstream is resynthesized.
```

```text
   The new approach is to export the parameters into the device tree and
   generate a new device tree each time the FPGA bitstream changes.  The
   parameters which used to be exported as #defines will now become
   properties of the device node.  In general, device nodes for IP-cores
   will take the following form:
```

```text
	(name): (generic-name)@(base-address) {
		compatible = "xlnx,(ip-core-name)-(HW_VER)"
			     [, (list of compatible devices), ...];
		reg = <(baseaddr) (size)>;
		interrupt-parent = <&interrupt-controller-phandle>;
		interrupts = < ... >;
		xlnx,(parameter1) = "(string-value)";
		xlnx,(parameter2) = <(int-value)>;
	};
```

```text
	(generic-name):   an open firmware-style name that describes the
			generic class of device.  Preferably, this is one word, such
			as 'serial' or 'ethernet'.
	(ip-core-name):	the name of the ip block (given after the BEGIN
			directive in system.mhs).  Should be in lowercase
			and all underscores '_' converted to dashes '-'.
	(name):		is derived from the "PARAMETER INSTANCE" value.
	(parameter#):	C_* parameters from system.mhs.  The C_ prefix is
			dropped from the parameter name, the name is converted
			to lowercase and all underscore '_' characters are
			converted to dashes '-'.
	(baseaddr):	the baseaddr parameter value (often named C_BASEADDR).
	(HW_VER):	from the HW_VER parameter.
	(size):		the address range size (often C_HIGHADDR - C_BASEADDR + 1).
```

```text
   Typically, the compatible list will include the exact IP core version
   followed by an older IP core version which implements the same
   interface or any other device with the same interface.
```

```text
   'reg' and 'interrupts' are all optional properties.
```

## For example, the following block from system.mhs:

```text
	BEGIN opb_uartlite
		PARAMETER INSTANCE = opb_uartlite_0
		PARAMETER HW_VER = 1.00.b
		PARAMETER C_BAUDRATE = 115200
		PARAMETER C_DATA_BITS = 8
		PARAMETER C_ODD_PARITY = 0
		PARAMETER C_USE_PARITY = 0
		PARAMETER C_CLK_FREQ = 50000000
		PARAMETER C_BASEADDR = 0xEC100000
		PARAMETER C_HIGHADDR = 0xEC10FFFF
		BUS_INTERFACE SOPB = opb_7
		PORT OPB_Clk = CLK_50MHz
		PORT Interrupt = opb_uartlite_0_Interrupt
		PORT RX = opb_uartlite_0_RX
		PORT TX = opb_uartlite_0_TX
		PORT OPB_Rst = sys_bus_reset_0
	END
```

## becomes the following device tree node:

```dts
	opb_uartlite_0: serial@ec100000 {
		device_type = "serial";
		compatible = "xlnx,opb-uartlite-1.00.b";
		reg = <ec100000 10000>;
		interrupt-parent = <&opb_intc_0>;
		interrupts = <1 0>; // got this from the opb_intc parameters
		current-speed = <d#115200>;	// standard serial device prop
		clock-frequency = <d#50000000>;	// standard serial device prop
		xlnx,data-bits = <8>;
		xlnx,odd-parity = <0>;
		xlnx,use-parity = <0>;
	};
```

```text
   That covers the general approach to binding xilinx IP cores into the
   device tree.  The following are bindings for specific devices:
```

```text
      i) Xilinx ML300 Framebuffer
```

```text
      Simple framebuffer device from the ML300 reference design (also on the
      ML403 reference design as well as others).
```

## Optional properties:

- resolution = &lt;xres yres&gt; : pixel resolution of framebuffer.  Some
  implementations use a different resolution.
  Default is &lt;d#640 d#480&gt;
- virt-resolution = &lt;xvirt yvirt&gt; : Size of framebuffer in memory.
  Default is &lt;d#1024 d#480&gt;.
- rotate-display (empty) : rotate display 180 degrees.

```text
      iii) Xilinx EMAC and Xilinx TEMAC
```

```text
      Xilinx Ethernet devices.  In addition to general xilinx properties
      listed above, nodes for these devices should include a phy-handle
      property, and may include other common network device properties
      like local-mac-address.
```

```text
      v) Xilinx hwicap
```

```text
		Xilinx hwicap devices provide access to the configuration logic
		of the FPGA through the Internal Configuration Access Port
		(ICAP).  The ICAP enables partial reconfiguration of the FPGA,
		readback of the configuration information, and some control over
		'warm boots' of the FPGA fabric.
```

## Required properties:

- xlnx,family : The family of the FPGA, necessary since the
  capabilities of the underlying ICAP hardware
  differ between different families.  May be
  'virtex2p', 'virtex4', or 'virtex5'.
- compatible : should contain "xlnx,xps-hwicap-1.00.a" or
  "xlnx,opb-hwicap-1.00.b".

```text
      vii) Xilinx USB Host controller
```

```text
      The Xilinx USB host controller is EHCI compatible but with a different
      base address for the EHCI registers, and it is always a big-endian
      USB Host controller. The hardware can be configured as high speed only,
      or high speed/full speed hybrid.
```

## Required properties:

- xlnx,support-usb-fs: A value 0 means the core is built as high speed
  only. A value 1 means the core also supports
  full speed devices.

---

# Synopsys DesignWare ARC Software Development Platforms Device Tree Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arc_

> Device-tree binding reference for Synopsys DesignWare ARC Software Development Platforms Device Tree Bindings.

SDP Main Board with an AXC001 CPU Card hoisting ARC700 core in silicon

## Required root node properties:

- compatible = "snps,axs101", "snps,arc-sdp";

---

# Synopsys DesignWare ARC Software Development Platforms Device Tree Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arc_

> Device-tree binding reference for Synopsys DesignWare ARC Software Development Platforms Device Tree Bindings.

SDP Main Board with an AXC003 FPGA Card which can contain various flavours of
HS38x cores.

## Required root node properties:

- compatible = "snps,axs103", "snps,arc-sdp";

---

# EZchip NPS Network Processor Platforms Device Tree Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arc_

> Device-tree binding reference for EZchip NPS Network Processor Platforms Device Tree Bindings.

Appliance main board with NPS400 ASIC.

## Required root node properties:

- compatible = "ezchip,arc-nps";

---

# Synopsys DesignWare ARC HS Development Kit Device Tree Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arc_

> Device-tree binding reference for Synopsys DesignWare ARC HS Development Kit Device Tree Bindings.

ARC HSDK Board with quad-core ARC HS38x4 in silicon.

## Required root node properties:

- compatible = "snps,hsdk";

---

# ARC Performance Counters

_Peios Kernel / Hardware and drivers / Device tree / bindings/arc_

> Device-tree binding reference for ARC Performance Counters.

The ARC700 can be configured with a pipeline performance monitor for counting
CPU and cache events like cache misses and hits. Like conventional PCT there
are 100+ hardware conditions dynamically mapped to up to 32 counters

## Note that:

- The ARC 700 PCT does not support interrupts; although HW events may be
  counted, the HW events themselves cannot serve as a trigger for a sample.

## Required properties:

- compatible : should contain
  "snps,arc700-pct"

## Example:

```dts
pmu {
        compatible = "snps,arc700-pct";
};
```

---

# Atmel system registers

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm_

> Device-tree binding reference for Atmel system registers.

## Chipid required properties:

- compatible: Should be "atmel,sama5d2-chipid" or "microchip,sama7g5-chipid"
  "microchip,sama7d65-chipid"
- reg : Should contain registers location and length

## PIT Timer required properties:

- compatible: Should be "atmel,at91sam9260-pit"
- reg: Should contain registers location and length
- interrupts: Should contain interrupt for the PIT which is the IRQ line
  shared across all System Controller members.

## PIT64B Timer required properties:

- compatible: Should be "microchip,sam9x60-pit64b" or
  "microchip,sam9x7-pit64b", "microchip,sam9x60-pit64b"
  "microchip,sama7d65-pit64b", "microchip,sam9x60-pit64b"
- reg: Should contain registers location and length
- interrupts: Should contain interrupt for PIT64B timer
- clocks: Should contain the available clock sources for PIT64B timer.

## System Timer (ST) required properties:

- compatible: Should be "atmel,at91rm9200-st", "syscon", "simple-mfd"
- reg: Should contain registers location and length
- interrupts: Should contain interrupt for the ST which is the IRQ line
  shared across all System Controller members.
- clocks: phandle to input clock.
  Its subnodes can be:
- watchdog: compatible should be "atmel,at91rm9200-wdt"

## RAMC SDRAM/DDR Controller required properties:

- compatible: Should be "atmel,at91rm9200-sdramc", "syscon" or
  "atmel,at91sam9260-sdramc" or
  "atmel,at91sam9g45-ddramc" or
  "atmel,sama5d3-ddramc" or
  "microchip,sam9x60-ddramc" or
  "microchip,sama7g5-uddrc" or
  "microchip,sama7d65-uddrc", "microchip,sama7g5-uddrc" or
  "microchip,sam9x7-ddramc", "atmel,sama5d3-ddramc".
- reg: Should contain registers location and length

## Examples:

```dts
	ramc0: ramc@ffffe800 {
		compatible = "atmel,at91sam9g45-ddramc";
		reg = <0xffffe800 0x200>;
	};
```

---

# ARM Secure world bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm_

> Device-tree binding reference for ARM Secure world bindings.

ARM CPUs with TrustZone support have two distinct address spaces,
"Normal" and "Secure". Most devicetree consumers (including the Linux
kernel) are not TrustZone aware and run entirely in either the Normal
world or the Secure world. However some devicetree consumers are
TrustZone aware and need to be able to determine whether devices are
visible only in the Secure address space, only in the Normal address
space, or visible in both. (One example of that situation would be a
virtual machine which boots Secure firmware and wants to tell the
firmware about the layout of the machine via devicetree.)

The general principle of the naming scheme for Secure world bindings
is that any property that needs a different value in the Secure world
can be supported by prefixing the property name with "secure-". So for
instance "secure-foo" would override "foo". For property names with
a vendor prefix, the Secure variant of "vendor,foo" would be
"vendor,secure-foo". If there is no "secure-" property then the Secure
world value is the same as specified for the Normal world by the
non-prefixed property. However, only the properties listed below may
validly have "secure-" versions; this list will be enlarged on a
case-by-case basis.

Defining the bindings in this way means that a device tree which has
been annotated to indicate the presence of Secure-only devices can
still be processed unmodified by existing Non-secure software (and in
particular by the kernel).

Note that it is still valid for bindings intended for purely Secure
world consumers (like kernels that run entirely in Secure) to simply
describe the view of Secure world using the standard bindings. These
secure- bindings only need to be used where both the Secure and Normal
world views need to be described in a single device tree.

## Valid Secure world properties

- secure-status : specifies whether the device is present and usable
  in the secure world. The combination of this with "status" allows
  the various possible combinations of device visibility to be
  specified. If "secure-status" is not specified it defaults to the
  same value as "status"; if "status" is not specified either then
  both default to "okay". This means the following combinations are
  possible:

```text
   /* Neither specified: default to visible in both S and NS */
```

```dts
   secure-status = "okay";                          /* visible in both */
   status = "okay";                                 /* visible in both */
   status = "okay"; secure-status = "okay";         /* visible in both */
   secure-status = "disabled";                      /* NS-only */
   status = "okay"; secure-status = "disabled";     /* NS-only */
   status = "disabled"; secure-status = "okay";     /* S-only */
   status = "disabled";                             /* disabled in both */
   status = "disabled"; secure-status = "disabled"; /* disabled in both */
```

## The secure-chosen node

Similar to the /chosen node which serves as a place for passing data
between firmware and the operating system, the /secure-chosen node may
be used to pass data to the Secure OS. Only the properties defined
below may appear in the /secure-chosen node.

- stdout-path : specifies the device to be used by the Secure OS for
  its console output. The syntax is the same as for /chosen/stdout-path.
  If the /secure-chosen node exists but the stdout-path property is not
  present, the Secure OS should not perform any console output. If
  /secure-chosen does not exist, the Secure OS should use the value of
  /chosen/stdout-path instead (that is, use the same device as the
  Normal world OS).

---

# ST-Ericsson Nomadik Device Tree Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm_

> Device-tree binding reference for 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:

```dts
compatible="st,nomadik-nhk-15";
```

## S8815 "MiniKit" manufactured by Calao Systems:

## Required root node property:

```dts
compatible="calaosystems,usb-s8815";
```

Required node: usb-s8815

## Example:

```dts
usb-s8815 {
		ethernet-gpio {
			gpios = <&gpio3 19 0x1>;
			interrupts = <19 0x1>;
			interrupt-parent = <&gpio3>;
		};
		mmcsd-gpio {
			gpios = <&gpio3 16 0x1>;
		};
};
```

---

# ARM Versatile Express Serial Configuration Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm_

> Device-tree binding reference for ARM Versatile Express Serial Configuration Controller.

Test chips for ARM Versatile Express platform implement SCC (Serial
Configuration Controller) interface, used to set initial conditions
for the test chip.

In some cases its registers are also mapped in normal address space
and can be used to obtain runtime information about the chip internals
(like silicon temperature sensors) and as interface to other subsystems
like platform configuration control and power management.

## Required properties:

```text
- compatible value: "arm,vexpress-scc,<model>", "arm,vexpress-scc";
		    where <model> is the full tile model name (as used
		    in the tile's Technical Reference Manual),
		    eg. for Coretile Express A15x2 A7x3 (V2P-CA15_A7):
	compatible = "arm,vexpress-scc,v2p-ca15_a7", "arm,vexpress-scc";
```

## Optional properties:

- reg: when the SCC is memory mapped, physical address and size of the
  registers window
- interrupts: when the SCC can generate a system-level interrupt

## Example:

```dts
	scc@7fff0000 {
		compatible = "arm,vexpress-scc,v2p-ca15_a7", "arm,vexpress-scc";
		reg = <0 0x7fff0000 0 0x1000>;
		interrupts = <0 95 4>;
	};
```

---

# Xen hypervisor device tree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm_

> Device-tree binding reference for Xen hypervisor device tree bindings.

Xen ARM virtual platforms shall have a top-level "hypervisor" node with
the following properties:

```text
- compatible:
	compatible = "xen,xen-<version>", "xen,xen";
  where <version> is the version of the Xen ABI of the platform.
```

- reg: specifies the base physical address and size of the regions in memory
  where the special resources should be mapped to, using an HYPERVISOR\_memory\_op
  hypercall.
  Region 0 is reserved for mapping grant table, it must be always present.
  The memory region is large enough to map the whole grant table (it is larger
  or equal to gnttab\_max\_grant\_frames()).
  Regions 1...N are extended regions (unused address space) for mapping foreign
  GFNs and grants, they might be absent if there is nothing to expose.

- interrupts: the interrupt used by Xen to inject event notifications.
  A GIC node is also required.

To support UEFI on Xen ARM virtual platforms, Xen populates the FDT "uefi" node
under /hypervisor with following parameters:

---

## Name                      | Size   | Description

```text
xen,uefi-system-table     | 64-bit | Guest physical address of the UEFI System
```

## |	   | Table.

```text
xen,uefi-mmap-start       | 64-bit | Guest physical address of the UEFI memory
```

## |	   | map.

```text
xen,uefi-mmap-size        | 32-bit | Size in bytes of the UEFI memory map
```

## |        | pointed to in previous entry.

```text
xen,uefi-mmap-desc-size   | 32-bit | Size in bytes of each entry in the UEFI
```

## |        | memory map.

## xen,uefi-mmap-desc-ver    | 32-bit | Version of the mmap descriptor format.

Example (assuming #address-cells = &lt;2&gt; and #size-cells = &lt;2&gt;):

```dts
hypervisor {
	compatible = "xen,xen-4.3", "xen,xen";
	reg = <0 0xb0000000 0 0x20000>;
	interrupts = <1 15 0xf08>;
	uefi {
		xen,uefi-system-table = <0xXXXXXXXX>;
		xen,uefi-mmap-start = <0xXXXXXXXX>;
		xen,uefi-mmap-size = <0xXXXXXXXX>;
		xen,uefi-mmap-desc-size = <0xXXXXXXXX>;
		xen,uefi-mmap-desc-ver = <0xXXXXXXXX>;
        };
};
```

The format and meaning of the "xen,uefi-\*" parameters are similar to those in
[Documentation/arch/arm/uefi.rst](</kernel/hardware/arch/arm/uefi.md>), which are provided by the regular UEFI stub. However
they differ because they are provided by the Xen hypervisor, together with a set
of UEFI runtime services implemented via hypercalls, see
http://xenbits.xen.org/docs/unstable/hypercall/x86\_64/include,public,platform.h.html.

---

# Broadcom BCM63138 DSL System-on-a-Chip device tree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/bcm_

> Device-tree binding reference for Broadcom BCM63138 DSL System-on-a-Chip device tree bindings.

Boards compatible with the BCM63138 DSL System-on-a-Chip should have the
following properties:

## Required root node property:

compatible: should be "brcm,bcm63138"

An optional Boot lookup table Device Tree node is required for secondary CPU
initialization as well as a 'resets' phandle to the correct PMB controller as
defined in reset/brcm,bcm63138-pmb.txt for this secondary CPU, and an
'enable-method' property.

## Required properties for the Boot lookup table node:

- compatible: should be "brcm,bcm63138-bootlut"
- reg: register base address and length for the Boot Lookup table

## Optional properties for the primary CPU node:

- enable-method: should be "brcm,bcm63138"

## Optional properties for the secondary CPU node:

- enable-method: should be "brcm,bcm63138"
- resets: phandle to the relevant PMB controller, one integer indicating the internal
  bus number, and a second integer indicating the address of the CPU in the PMB
  internal bus number.

## Example:

```dts
	cpus {
		cpu@0 {
			compatible = "arm,cortex-a9";
			reg = <0>;
			...
			enable-method = "brcm,bcm63138";
		};

		cpu@1 {
			compatible = "arm,cortex-a9";
			reg = <1>;
			...
			enable-method = "brcm,bcm63138";
			resets = <&pmb0 4 1>;
		};
	};
```

```dts
	bootlut: bootlut@8000 {
		compatible = "brcm,bcm63138-bootlut";
		reg = <0x8000 0x50>;
	};
```

---

## reboot

Two nodes are required for software reboot: a timer node and a syscon-reboot node.

## Timer node:

- compatible: Must be "brcm,bcm6328-timer", "syscon"
- reg: Register base address and length

## Syscon reboot node:

See [Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml](</kernel/hardware/devicetree-bindings/dt-power/reset/syscon-reboot.md>) for the
detailed list of properties, the two values defined below are specific to the
BCM6328-style timer:

- offset: Should be 0x34 to denote the offset of the TIMER\_WD\_TIMER\_RESET register
  from the beginning of the TIMER block
- mask: Should be 1 for the SoftRst bit.

## Example:

```dts
	timer: timer@80 {
		compatible = "brcm,bcm6328-timer", "syscon";
		reg = <0x80 0x3c>;
	};
```

```dts
	reboot {
		compatible = "syscon-reboot";
		regmap = <&timer>;
		offset = <0x34>;
		mask = <0x1>;
	};
```

---

# ARM Broadcom STB platforms Device Tree Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/bcm_

> Device-tree binding reference for ARM Broadcom STB platforms Device Tree Bindings.

Boards with Broadcom Brahma15 ARM-based BCMxxxx (generally BCM7xxx variants)
SoC shall have the following DT organization:

## Required root node properties:

- compatible: "brcm,bcm&lt;chip\_id&gt;", "brcm,brcmstb"

## example:

```dts
/ {
    #address-cells = <2>;
    #size-cells = <2>;
    model = "Broadcom STB (bcm7445)";
    compatible = "brcm,bcm7445", "brcm,brcmstb";

Further, syscon nodes that map platform-specific registers used for general
system control is required:

    - compatible: "brcm,bcm<chip_id>-sun-top-ctrl", "syscon"
    - compatible: "brcm,bcm<chip_id>-cpu-biu-ctrl",
		  "brcm,brcmstb-cpu-biu-ctrl",
		  "syscon"
    - compatible: "brcm,bcm<chip_id>-hif-continuation", "syscon"

cpu-biu-ctrl node
-------------------
SoCs with Broadcom Brahma15 ARM-based and Brahma53 ARM64-based CPUs have a
specific Bus Interface Unit (BIU) block which controls and interfaces the CPU
complex to the different Memory Controller Ports (MCP), one per memory
controller (MEMC). This BIU block offers a feature called Write Pairing which
consists in collapsing two adjacent cache lines into a single (bursted) write
transaction towards the memory controller (MEMC) to maximize write bandwidth.

Required properties:

    - compatible: must be "brcm,bcm7445-cpu-biu-ctrl", "brcm,brcmstb-cpu-biu-ctrl", "syscon"

Optional properties:

    - brcm,write-pairing:
	Boolean property, which when present indicates that the chip
	supports write-pairing.

example:
    rdb {
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "simple-bus";
        ranges = <0 0x00 0xf0000000 0x1000000>;

        sun_top_ctrl: syscon@404000 {
            compatible = "brcm,bcm7445-sun-top-ctrl", "syscon";
            reg = <0x404000 0x51c>;
        };

        hif_cpubiuctrl: syscon@3e2400 {
            compatible = "brcm,bcm7445-cpu-biu-ctrl", "brcm,brcmstb-cpu-biu-ctrl", "syscon";
            reg = <0x3e2400 0x5b4>;
            brcm,write-pairing;
        };

        hif_continuation: syscon@452000 {
            compatible = "brcm,bcm7445-hif-continuation", "syscon";
            reg = <0x452000 0x100>;
        };
    };

Nodes that allow for support of SMP initialization and reboot are required:

smpboot
-------
Required properties:

    - compatible
        The string "brcm,brcmstb-smpboot".

    - syscon-cpu
        A phandle / integer array property which lets the BSP know the location
        of certain CPU power-on registers.

        The layout of the property is as follows:
            o a phandle to the "hif_cpubiuctrl" syscon node
            o offset to the base CPU power zone register
            o offset to the base CPU reset register

    - syscon-cont
        A phandle pointing to the syscon node which describes the CPU boot
        continuation registers.
            o a phandle to the "hif_continuation" syscon node

example:
    smpboot {
        compatible = "brcm,brcmstb-smpboot";
        syscon-cpu = <&hif_cpubiuctrl 0x88 0x178>;
        syscon-cont = <&hif_continuation>;
    };

reboot
-------
Required properties

    - compatible
        The string property "brcm,brcmstb-reboot" for 40nm/28nm chips with
        the new SYS_CTRL interface, or "brcm,bcm7038-reboot" for 65nm
        chips with the old SUN_TOP_CTRL interface.

    - syscon
        A phandle / integer array that points to the syscon node which describes
        the general system reset registers.
            o a phandle to "sun_top_ctrl"
            o offset to the "reset source enable" register
            o offset to the "software master reset" register

example:
    reboot {
        compatible = "brcm,brcmstb-reboot";
        syscon = <&sun_top_ctrl 0x304 0x308>;
    };



Power management
----------------

For power management (particularly, S2/S3/S5 system suspend), the following SoC
components are needed:

= Always-On control block (AON CTRL)

This hardware provides control registers for the "always-on" (even in low-power
modes) hardware, such as the Power Management State Machine (PMSM).

Required properties:
- compatible     : should contain "brcm,brcmstb-aon-ctrl"
- reg            : the register start and length for the AON CTRL block

Example:

aon-ctrl@410000 {
	compatible = "brcm,brcmstb-aon-ctrl";
	reg = <0x410000 0x400>;
};

= Memory controllers

A Broadcom STB SoC typically has a number of independent memory controllers,
each of which may have several associated hardware blocks, which are versioned
independently (control registers, DDR PHYs, etc.). One might consider
describing these controllers as a parent "memory controllers" block, which
contains N sub-nodes (one for each controller in the system), each of which is
associated with a number of hardware register resources (e.g., its PHY). See
the example device tree snippet below.

== MEMC (MEMory Controller)

Represents a single memory controller instance.

Required properties:
- compatible     : should contain "brcm,brcmstb-memc" and "simple-bus"

Should contain subnodes for any of the following relevant hardware resources:

== DDR PHY control

Control registers for this memory controller's DDR PHY.

Required properties:
- compatible     : should contain one of these
	"brcm,brcmstb-ddr-phy-v71.1"
	"brcm,brcmstb-ddr-phy-v72.0"
	"brcm,brcmstb-ddr-phy-v225.1"
	"brcm,brcmstb-ddr-phy-v240.1"
	"brcm,brcmstb-ddr-phy-v240.2"

- reg            : the DDR PHY register range

== DDR SHIMPHY

Control registers for this memory controller's DDR SHIMPHY.

Required properties:
- compatible     : should contain "brcm,brcmstb-ddr-shimphy-v1.0"
- reg            : the DDR SHIMPHY register range

== MEMC DDR control

Sequencer DRAM parameters and control registers. Used for Self-Refresh
Power-Down (SRPD), among other things.

See Documentation/devicetree/bindings/memory-controllers/brcm,brcmstb-memc-ddr.yaml for a
full list of supported compatible strings and properties.

Example:

memory_controllers {
	ranges;
	compatible = "simple-bus";

	memc@0 {
		compatible = "brcm,brcmstb-memc", "simple-bus";
		ranges;

		ddr-phy@f1106000 {
			compatible = "brcm,brcmstb-ddr-phy-v240.1";
			reg = <0xf1106000 0x21c>;
		};

		shimphy@f1108000 {
			compatible = "brcm,brcmstb-ddr-shimphy-v1.0";
			reg = <0xf1108000 0xe4>;
		};

		memc-ddr@f1102000 {
			reg = <0xf1102000 0x800>;
			compatible = "brcm,brcmstb-memc-ddr";
		};
	};

	memc@1 {
		compatible = "brcm,brcmstb-memc", "simple-bus";
		ranges;

		ddr-phy@f1186000 {
			compatible = "brcm,brcmstb-ddr-phy-v240.1";
			reg = <0xf1186000 0x21c>;
		};

		shimphy@f1188000 {
			compatible = "brcm,brcmstb-ddr-shimphy-v1.0";
			reg = <0xf1188000 0xe4>;
		};

		memc-ddr@f1182000 {
			reg = <0xf1182000 0x800>;
			compatible = "brcm,brcmstb-memc-ddr";
		};
	};

	memc@2 {
		compatible = "brcm,brcmstb-memc", "simple-bus";
		ranges;

		ddr-phy@f1206000 {
			compatible = "brcm,brcmstb-ddr-phy-v240.1";
			reg = <0xf1206000 0x21c>;
		};

		shimphy@f1208000 {
			compatible = "brcm,brcmstb-ddr-shimphy-v1.0";
			reg = <0xf1208000 0xe4>;
		};

		memc-ddr@f1202000 {
			reg = <0xf1202000 0x800>;
			compatible = "brcm,brcmstb-memc-ddr";
		};
	};
};
```

---

# Software Delegated Exception Interface (SDEI)

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/firmware_

> Device-tree binding reference for Software Delegated Exception Interface (SDEI).

Firmware implementing the SDEI functions described in ARM document number
ARM DEN 0054A ("Software Delegated Exception Interface") can be used by
Linux to receive notification of events such as those generated by
firmware-first error handling, or from an IRQ that has been promoted to
a firmware-assisted NMI.

The interface provides a number of API functions for registering callbacks
and enabling/disabling events. Functions are invoked by trapping to the
privilege level of the SDEI firmware (specified as part of the binding
below) and passing arguments in a manner specified by the "SMC Calling
Convention (ARM DEN 0028B):

```dts
	 r0		=> 32-bit Function ID / return value
	{r1 - r3}	=> Parameters
```

Note that the immediate field of the trapping instruction must be set
to #0.

The SDEI\_EVENT\_REGISTER function registers a callback in the kernel
text to handle the specified event number.

The sdei node should be a child node of '/firmware' and have required
properties:

```text
 - compatible    : should contain:
	* "arm,sdei-1.0" : For implementations complying to SDEI version 1.x.
```

```text
 - method        : The method of calling the SDEI firmware. Permitted
                   values are:
	* "smc" : SMC #0, with the register assignments specified in this
	          binding.
	* "hvc" : HVC #0, with the register assignments specified in this
	          binding.
Example:
	firmware {
		sdei {
			compatible	= "arm,sdei-1.0";
			method		= "smc";
		};
	};
```

---

# Resume Control

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/marvell_

> Device-tree binding reference for Resume Control.

Available on Marvell SOCs: 98DX3336 and 98DX4251

## Required properties:

- compatible: must be "marvell,98dx3336-resume-ctrl"

- reg: Should contain resume control registers location and length

## Example:

```dts
resume@20980 {
	compatible = "marvell,98dx3336-resume-ctrl";
	reg = <0x20980 0x10>;
};
```

---

# Power Management Service Unit(PMSU)

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/marvell_

> Device-tree binding reference for Power Management Service Unit(PMSU).

Available on Marvell SOCs: Armada 370, Armada 38x and Armada XP

## Required properties:

```text
- compatible: should be one of:
  - "marvell,armada-370-pmsu" for Armada 370 or Armada XP
  - "marvell,armada-380-pmsu" for Armada 38x
  - "marvell,armada-370-xp-pmsu" was used for Armada 370/XP but is now
    deprecated and will be removed
```

- reg: Should contain PMSU registers location and length.

## Example:

```dts
armada-370-xp-pmsu@22000 {
	compatible = "marvell,armada-370-pmsu";
	reg = <0x22000 0x1000>;
};
```

---

# Marvell Armada 38x CA9 MPcore SoC Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/marvell_

> Device-tree binding reference for Marvell Armada 38x CA9 MPcore SoC Controller.

## Required properties:

- compatible: Should be "marvell,armada-380-mpcore-soc-ctrl".

- reg: should be the register base and length as documented in the
  datasheet for the CA9 MPcore SoC Control registers

```dts
mpcore-soc-ctrl@20d20 {
	compatible = "marvell,armada-380-mpcore-soc-ctrl";
	reg = <0x20d20 0x6c>;
};
```

---

# Marvell Armada CPU reset controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/marvell_

> Device-tree binding reference for Marvell Armada CPU reset controller.

## Required properties:

- compatible: Should be "marvell,armada-370-cpu-reset".

- reg: should be register base and length as documented in the
  datasheet for the CPU reset registers

```dts
cpurst: cpurst@20800 {
       compatible = "marvell,armada-370-cpu-reset";
       reg = <0x20800 0x20>;
};
```

---

# Coherency fabric

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/marvell_

> Device-tree binding reference for Coherency fabric.

Available on Marvell SOCs: Armada 370, Armada 375, Armada 38x and Armada XP

## Required properties:

- compatible: the possible values are:

- "marvell,coherency-fabric", to be used for the coherency fabric of
  the Armada 370 and Armada XP.

- "marvell,armada-375-coherency-fabric", for the Armada 375 coherency
  fabric.

- "marvell,armada-380-coherency-fabric", for the Armada 38x coherency
  fabric.

- reg: Should contain coherency fabric registers location and
  length.

- For "marvell,coherency-fabric", the first pair for the coherency
  fabric registers, second pair for the per-CPU fabric registers.

- For "marvell,armada-375-coherency-fabric", only one pair is needed
  for the per-CPU fabric registers.

- For "marvell,armada-380-coherency-fabric", only one pair is needed
  for the per-CPU fabric registers.

## Optional properties:

- broken-idle: boolean to set when the Idle mode is not supported by the
  hardware.

## Examples:

```dts
coherency-fabric@d0020200 {
	compatible = "marvell,coherency-fabric";
	reg = <0xd0020200 0xb0>,
		<0xd0021810 0x1c>;

};
```

```dts
coherency-fabric@21810 {
	compatible = "marvell,armada-375-coherency-fabric";
	reg = <0x21810 0x1c>;
};
```

---

# MVEBU CPU Config registers

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/marvell_

> Device-tree binding reference for MVEBU CPU Config registers.

MVEBU (Marvell SOCs: Armada 370/XP)

## Required properties:

```text
- compatible: one of:
	- "marvell,armada-370-cpu-config"
	- "marvell,armada-xp-cpu-config"
```

- reg: Should contain CPU config registers location and length, in
  their per-CPU variant

## Example:

```dts
	cpu-config@21000 {
		compatible = "marvell,armada-xp-cpu-config";
		reg = <0x21000 0x8>;
	};
```

---

# MVEBU System Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/marvell_

> Device-tree binding reference for MVEBU System Controller.

MVEBU (Marvell SOCs: Armada 370/375/XP, Dove, mv78xx0, Kirkwood, Orion5x)

## Required properties:

```text
- compatible: one of:
	- "marvell,orion-system-controller"
	- "marvell,armada-370-xp-system-controller"
	- "marvell,armada-375-system-controller"
- reg: Should contain system controller registers location and length.
```

## Example:

```dts
	system-controller@d0018200 {
		compatible = "marvell,armada-370-xp-system-controller";
		reg = <0xd0018200 0x500>;
	};
```

---

# MediaTek g3dsys controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/mediatek_

> Device-tree binding reference for MediaTek g3dsys controller.

The MediaTek g3dsys controller provides various clocks and reset controller to
the GPU.

## Required Properties:

```text
- compatible: Should be:
	- "mediatek,mt2701-g3dsys", "syscon":
		for MT2701 SoC
	- "mediatek,mt7623-g3dsys", "mediatek,mt2701-g3dsys", "syscon":
		for MT7623 SoC
- #clock-cells: Must be 1
- #reset-cells: Must be 1
```

The g3dsys controller uses the common clk binding from
[Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)
The available clocks are defined in dt-bindings/clock/mt\*-clk.h.

## Example:

```dts
g3dsys: clock-controller@13000000 {
	compatible = "mediatek,mt7623-g3dsys",
		     "mediatek,mt2701-g3dsys",
		     "syscon";
	reg = <0 0x13000000 0 0x200>;
	#clock-cells = <1>;
	#reset-cells = <1>;
};
```

---

# OMAP Counter-32K bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/omap_

> Device-tree binding reference for OMAP Counter-32K bindings.

## Required properties:

- compatible:	Must be "ti,omap-counter32k" for OMAP controllers
- reg:		Contains timer register address range (base address and length)
- ti,hwmods:	Name of the hwmod associated to the counter, which is typically
  "counter\_32k"

## Example:

```dts
counter32k: counter@4a304000 {
	compatible = "ti,omap-counter32k";
	reg = <0x4a304000 0x20>;
	ti,hwmods = "counter_32k";
};
```

---

# Crossbar bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/omap_

> Device-tree binding reference for Crossbar bindings.

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:

```dts
		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](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>) and
[Documentation/devicetree/bindings/interrupt-controller/arm,gic.yaml](</kernel/hardware/devicetree-bindings/dt-interrupt-controller/arm-gic.md>) for
further details.

An interrupt consumer on an SoC using crossbar will use:

```dts
	interrupts = <GIC_SPI request_number interrupt_level>
```

## Example:

```dts
	device_x@4a023000 {
		/* Crossbar 8 used */
		interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
		...
	};
```

---

# OMAP Control Module bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/omap_

> Device-tree binding reference for OMAP Control Module bindings.

Control Module contains miscellaneous features under it based on SoC type.
Pincontrol is one common feature, and it has a specialized support
described in \[1\]. Typically some clock nodes are also under control module.
Syscon is used to share register level access to drivers external to
control module driver itself.

See \[2\] for documentation about clock/clockdomain nodes.

\[1\] [Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml](</kernel/hardware/devicetree-bindings/dt-pinctrl/pinctrl-single.md>)
\[2\] Documentation/devicetree/bindings/clock/ti/\*

## Required properties:

- compatible:	Must be one of:
  "ti,am3-scm"
  "ti,am4-scm"
  "ti,dm814-scrm"
  "ti,dm816-scrm"
  "ti,omap2-scm"
  "ti,omap3-scm"
  "ti,omap4-scm-core"
  "ti,omap4-scm-padconf-core"
  "ti,omap4-scm-wkup"
  "ti,omap4-scm-padconf-wkup"
  "ti,omap5-scm-core"
  "ti,omap5-scm-padconf-core"
  "ti,omap5-scm-wkup-pad-conf"
  "ti,dra7-scm-core"
- reg:		Contains Control Module register address range
  (base address and length)

## Optional properties:

- clocks:	clocks for this module
- clockdomains:	clockdomains for this module

## Examples:

```dts
scm: scm@2000 {
	compatible = "ti,omap3-scm", "simple-bus";
	reg = <0x2000 0x2000>;
	#address-cells = <1>;
	#size-cells = <1>;
	ranges = <0 0x2000 0x2000>;

	omap3_pmx_core: pinmux@30 {
		compatible = "ti,omap3-padconf",
			     "pinctrl-single";
		reg = <0x30 0x230>;
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		interrupt-controller;
		pinctrl-single,register-width = <16>;
		pinctrl-single,function-mask = <0xff1f>;
	};

	scm_conf: scm_conf@270 {
		compatible = "syscon";
		reg = <0x270 0x330>;
		#address-cells = <1>;
		#size-cells = <1>;

		scm_clocks: clocks {
			#address-cells = <1>;
			#size-cells = <0>;
		};
	};

	scm_clockdomains: clockdomains {
	};
}
```

```dts
&scm_clocks {
	mcbsp5_mux_fck: mcbsp5_mux_fck {
		#clock-cells = <0>;
		compatible = "ti,composite-mux-clock";
		clocks = <&core_96m_fck>, <&mcbsp_clks>;
		ti,bit-shift = <4>;
		reg = <0x02d8>;
	};
};
```

---

# OMAP Dynamic Memory Manager (DMM) bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/omap_

> Device-tree binding reference for 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:

```dts
dmm@4e000000 {
	compatible = "ti,omap4-dmm";
	reg = <0x4e000000 0x800>;
	ti,hwmods = "dmm";
};
```

---

# TI - DSP (Digital Signal Processor)

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/omap_

> Device-tree binding reference for TI - DSP (Digital Signal Processor).

TI DSP included in OMAP SoC

## Required properties:

- compatible : Should be "ti,omap3-c64" for OMAP3 &amp; 4
- ti,hwmods: "dsp"

## Examples:

```dts
dsp {
    compatible = "ti,omap3-c64";
    ti,hwmods = "dsp";
};
```

---

# TI - IVA (Imaging and Video Accelerator) subsystem

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/omap_

> Device-tree binding reference for TI - IVA (Imaging and Video Accelerator) subsystem.

The IVA contain various audio, video or imaging HW accelerator
depending of the version.

## Required properties:

```text
- compatible : Should be:
  - "ti,ivahd" for OMAP4
  - "ti,iva2.2" for OMAP3
  - "ti,iva2.1" for OMAP2430
  - "ti,iva1" for OMAP2420
- ti,hwmods: "iva"
```

## Examples:

```dts
iva {
    compatible = "ti,ivahd", "ti,iva";
    ti,hwmods = "iva";
};
```

---

# TI - L3 Network On Chip (NoC)

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/omap_

> Device-tree binding reference for TI - L3 Network On Chip (NoC).

This version is an implementation of the generic NoC IP
provided by Arteris.

## Required properties:

- compatible : Should be "ti,omap3-l3-smx" for OMAP3 family
  Should be "ti,omap4-l3-noc" for OMAP4 family
  Should be "ti,omap5-l3-noc" for OMAP5 family
  Should be "ti,dra7-l3-noc" for DRA7 family
  Should be "ti,am4372-l3-noc" for AM43 family
- reg:	Contains L3 register address range for each noc domain.
- ti,hwmods: "l3\_main\_1", ... One hwmod for each noc domain.

## Examples:

```dts
ocp {
	compatible = "ti,omap4-l3-noc", "simple-bus";
	#address-cells = <1>;
	#size-cells = <1>;
	ranges;
	ti,hwmods = "l3_main_1", "l3_main_2", "l3_main_3";
};
```

---

# L4 interconnect bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/omap_

> Device-tree binding reference for L4 interconnect bindings.

These bindings describe the OMAP SoCs L4 interconnect bus.

## Required properties:

- compatible : Should be "ti,omap2-l4" for OMAP2 family l4 core bus
  Should be "ti,omap2-l4-wkup" for OMAP2 family l4 wkup bus
  Should be "ti,omap3-l4-core" for OMAP3 family l4 core bus
  Should be "ti,omap4-l4-cfg" for OMAP4 family l4 cfg bus
  Should be "ti,omap4-l4-per" for OMAP4 family l4 per bus
  Should be "ti,omap4-l4-wkup" for OMAP4 family l4 wkup bus
  Should be "ti,omap5-l4-cfg" for OMAP5 family l4 cfg bus
  Should be "ti,omap5-l4-wkup" for OMAP5 family l4 wkup bus
  Should be "ti,dra7-l4-cfg" for DRA7 family l4 cfg bus
  Should be "ti,dra7-l4-wkup" for DRA7 family l4 wkup bus
  Should be "ti,am3-l4-wkup" for AM33xx family l4 wkup bus
  Should be "ti,am4-l4-wkup" for AM43xx family l4 wkup bus
- ranges : contains the IO map range for the bus
- reg : registers link agent and interconnect agent and access protection
- reg-names : "la" for link agent, "ia0" to "ia3" for one to three
  interconnect agent instances, "ap" for access if it exists

## Examples:

```dts
l4: interconnect@48000000 {
	compatible "ti,omap4-l4-per", "simple-bus";
	reg = <0x48000000 0x800>,
	      <0x48000800 0x800>,
	      <0x48001000 0x400>,
	      <0x48001400 0x400>,
	      <0x48001800 0x400>,
	      <0x48001c00 0x400>;
	reg-names = "ap", "la", "ia0", "ia1", "ia2", "ia3";
	#address-cells = <1>;
	#size-cells = <1>;
	ranges = <0 0x48000000 0x100000>;
};
```

---

# TI - MPU (Main Processor Unit) subsystem

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/omap_

> Device-tree binding reference for TI - MPU (Main Processor Unit) subsystem.

The MPU subsystem contain one or several ARM cores
depending of the version.
The MPU contain CPUs, GIC, L2 cache and a local PRCM.

## Required properties:

- compatible : Should be "ti,omap3-mpu" for OMAP3
  Should be "ti,omap4-mpu" for OMAP4
  Should be "ti,omap5-mpu" for OMAP5
- ti,hwmods: "mpu"

## Optional properties:

- sram:	Phandle to the ocmcram node

## am335x and am437x only:

- pm-sram: Phandles to ocmcram nodes to be used for power management.
  First should be type 'protect-exec' for the driver to use to copy
  and run PM functions, second should be regular pool to be used for
  data region for code. See [Documentation/devicetree/bindings/sram/sram.yaml](</kernel/hardware/devicetree-bindings/dt-sram/sram.md>)
  for more details.

## Examples:

- For an OMAP5 SMP system:

```dts
mpu {
    compatible = "ti,omap5-mpu";
    ti,hwmods = "mpu"
};
```

- For an OMAP4 SMP system:

```dts
mpu {
    compatible = "ti,omap4-mpu";
    ti,hwmods = "mpu";
};
```

- For an OMAP3 monocore system:

```dts
mpu {
    compatible = "ti,omap3-mpu";
    ti,hwmods = "mpu";
};
```

- For an AM335x system:

```dts
mpu {
	compatible = "ti,omap3-mpu";
	ti,hwmods = "mpu";
	pm-sram = <&pm_sram_code
		   &pm_sram_data>;
};
```

---

# Texas Instruments OMAP

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/omap_

> Device-tree binding reference for Texas Instruments OMAP.

OMAP is currently using a static file per SoC family to describe the
IPs present in the SoC.
On top of that an omap\_device is created to extend the platform\_device
capabilities and to allow binding with one or several hwmods.
The hwmods will contain all the information to build the device:
address range, irq lines, dma lines, interconnect, PRCM register,
clock domain, input clocks.
For the moment just point to the existing hwmod, the next step will be
to move data from hwmod to device-tree representation.

## Required properties:

- compatible: Every devices present in OMAP SoC should be in the
  form: "ti,XXX"
- ti,hwmods: list of hwmod names (ascii strings), that comes from the OMAP
  HW documentation, attached to a device. Must contain at least
  one hwmod.

## Optional properties:

- ti,no\_idle\_on\_suspend: When present, it prevents the PM to idle the module
  during suspend.
- ti,no-reset-on-init: When present, the module should not be reset at init
- ti,no-idle-on-init: When present, the module should not be idled at init
- ti,no-idle: When present, the module is never allowed to idle.

## Example:

```dts
spinlock@1 {
    compatible = "ti,omap4-spinlock";
    ti,hwmods = "spinlock";
};
```

## SoC Type (optional):

```text
- General Purpose devices
  compatible = "ti,gp"
- High Security devices
  compatible = "ti,hs"
```

## SoC Families:

```text
- DRA7 generic - defaults to DRA742
  compatible = "ti,dra7"
- AM33x generic
  compatible = "ti,am33xx"
- AM43x generic - defaults to AM4372
  compatible = "ti,am43"
```

## SoCs:

```text
- DRA762
  compatible = "ti,dra762", "ti,dra7"
```

```text
- DRA742
  compatible = "ti,dra742", "ti,dra74", "ti,dra7"
```

```text
- DRA722
  compatible = "ti,dra722", "ti,dra72", "ti,dra7"
```

```text
- DRA718
  compatible = "ti,dra718", "ti,dra722", "ti,dra72", "ti,dra7"
```

```text
- AM5748
  compatible = "ti,am5748", "ti,dra762", "ti,dra7"
```

```text
- AM5728
  compatible = "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7"
```

```text
- AM5726
  compatible = "ti,am5726", "ti,dra742", "ti,dra74", "ti,dra7"
```

```text
- AM5718
  compatible = "ti,am5718", "ti,dra722", "ti,dra72", "ti,dra7"
```

```text
- AM5716
  compatible = "ti,am5716", "ti,dra722", "ti,dra72", "ti,dra7"
```

```text
- AM4372
  compatible = "ti,am4372", "ti,am43"
```

## Boards (incomplete list of examples):

```text
- AM437x CM-T43
  compatible = "compulab,am437x-cm-t43", "ti,am4372", "ti,am43"
```

```text
- AM437x SBC-T43
  compatible = "compulab,am437x-sbc-t43", "compulab,am437x-cm-t43", "ti,am4372", "ti,am43"
```

```text
- AM43x EPOS EVM
  compatible = "ti,am43x-epos-evm", "ti,am43", "ti,am438x"
```

```text
- AM437x GP EVM
  compatible = "ti,am437x-gp-evm", "ti,am4372", "ti,am43"
```

```text
- AM437x SK EVM: AM437x StarterKit Evaluation Module
  compatible = "ti,am437x-sk-evm", "ti,am4372", "ti,am43"
```

```text
- AM57XX CL-SOM-AM57x
  compatible = "compulab,cl-som-am57x", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7"
```

```text
- AM57XX SBC-AM57x
  compatible = "compulab,sbc-am57x", "compulab,cl-som-am57x", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7"
```

```text
- AM5748 IDK
  compatible = "ti,am5748-idk", "ti,am5748", "ti,dra762", "ti,dra7";
```

```text
- AM5728 IDK
  compatible = "ti,am5728-idk", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7"
```

```text
- AM5718 IDK
  compatible = "ti,am5718-idk", "ti,am5718", "ti,dra7"
```

```text
- DRA762 EVM:  Software Development Board for DRA762
  compatible = "ti,dra76-evm", "ti,dra762", "ti,dra7"
```

```text
- DRA742 EVM:  Software Development Board for DRA742
  compatible = "ti,dra7-evm", "ti,dra742", "ti,dra74", "ti,dra7"
```

```text
- DRA722 EVM: Software Development Board for DRA722
  compatible = "ti,dra72-evm", "ti,dra722", "ti,dra72", "ti,dra7"
```

```text
- DRA718 EVM: Software Development Board for DRA718
  compatible = "ti,dra718-evm", "ti,dra718", "ti,dra722", "ti,dra72", "ti,dra7"
```

---

# OMAP PRCM bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/omap_

> Device-tree binding reference for OMAP PRCM bindings.

Power Reset and Clock Manager lists the device clocks and clockdomains under
a DT hierarchy. Each TI SoC can have multiple PRCM entities listed for it,
each describing one module and the clock hierarchy under it. see \[1\] for
documentation about the individual clock/clockdomain nodes.

\[1\] Documentation/devicetree/bindings/clock/ti/\*

## Required properties:

- compatible:	Must be one of:
  "ti,am3-prcm"
  "ti,am4-prcm"
  "ti,omap2-prcm"
  "ti,omap3-prm"
  "ti,omap3-cm"
  "ti,omap4-cm1"
  "ti,omap4-prm"
  "ti,omap4-cm2"
  "ti,omap4-scrm"
  "ti,omap5-prm"
  "ti,omap5-cm-core-aon"
  "ti,omap5-scrm"
  "ti,omap5-cm-core"
  "ti,dra7-prm"
  "ti,dra7-cm-core-aon"
  "ti,dra7-cm-core"
  "ti,dm814-prcm"
  "ti,dm816-prcm"
- reg:		Contains PRCM module register address range
  (base address and length)
- clocks:	clocks for this module
- clockdomains:	clockdomains for this module
- #clock-cells: From common clock binding
- clock-output-names: From common clock binding

## Example:

```dts
cm: clock@48004000 {
	compatible = "ti,omap3-cm";
	reg = <0x48004000 0x4000>;
	#clock-cells = <0>;
	clock-output-names = "cm";

	cm_clocks: clocks {
		#address-cells = <1>;
		#size-cells = <0>;
	};

	cm_clockdomains: clockdomains {
	};
}
```

```dts
&cm_clocks {
	omap2_32k_fck: omap_32k_fck {
		#clock-cells = <0>;
		compatible = "fixed-clock";
		clock-frequency = <32768>;
	};
};
```

```dts
&cm_clockdomains {
	core_l3_clkdm: core_l3_clkdm {
		compatible = "ti,clockdomain";
		clocks = <&sdrc_ick>;
	};
};
```

---

# ST-Ericsson Ux500 boards

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/ux500_

> Device-tree binding reference for ST-Ericsson Ux500 boards.

## Required properties (in root node) one of these:

```dts
	compatible = "st-ericsson,mop500" (legacy)
	compatible = "st-ericsson,u8500"
```

## Required node (under root node):

soc: represents the system-on-chip and contains the chip
peripherals

## Required property of soc node, one of these:

```dts
	compatible = "stericsson,db8500"
```

## Required subnodes under soc node:

backupram: (used for CPU spin tables and for storing data
during retention, system won't boot without this):

```dts
	compatible = "ste,dbx500-backupram"
```

## scu:

```text
	see binding for arm/arm,scu.yaml
```

## interrupt-controller:

```text
	see binding for interrupt-controller/arm,gic.txt
```

## timer:

```text
	see binding for timer/arm,twd-timer.yaml
```

## clocks:

```text
	see binding for clocks/ux500.txt
```

## Example:

```dts
/dts-v1/;
```

```dts
/ {
        model = "ST-Ericsson HREF (pre-v60) and ST UIB";
        compatible = "st-ericsson,mop500", "st-ericsson,u8500";

        soc {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "stericsson,db8500";
		interrupt-parent = <&intc>;
		ranges;

		backupram@80150000 {
			compatible = "ste,dbx500-backupram";
			reg = <0x80150000 0x2000>;
		};

		intc: interrupt-controller@a0411000 {
			compatible = "arm,cortex-a9-gic";
			#interrupt-cells = <3>;
			#address-cells = <1>;
			interrupt-controller;
			reg = <0xa0411000 0x1000>,
			      <0xa0410100 0x100>;
		};

		scu@a0410000 {
			compatible = "arm,cortex-a9-scu";
			reg = <0xa0410000 0x100>;
		};

		timer@a0410600 {
			compatible = "arm,cortex-a9-twd-timer";
			reg = <0xa0410600 0x20>;
			interrupts = <1 13 0x304>; /* IRQ level high per-CPU */
			clocks = <&smp_twd_clk>;
		};

		clocks {
			compatible = "stericsson,u8500-clks";

			smp_twd_clk: smp-twd-clock {
				#clock-cells = <0>;
			};
		};
        };
};
```

---

# ST-Ericsson UX500 PM Domains

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/ux500_

> Device-tree binding reference for ST-Ericsson UX500 PM Domains.

UX500 supports multiple PM domains which are used to gate power to one or
more peripherals on the SOC.

The implementation of PM domains for UX500 are based upon the generic PM domain
and use the corresponding DT bindings.

==PM domain providers==

## Required properties:

- compatible: Must be "stericsson,ux500-pm-domains".
- #power-domain-cells : Number of cells in a power domain specifier, must be 1.

## Example:

```dts
	pm_domains: pm_domains0 {
		compatible = "stericsson,ux500-pm-domains";
		#power-domain-cells = <1>;
	};
```

==PM domain consumers==

## Required properties:

- power-domains: A phandle and PM domain specifier. Below are the list of
  valid specifiers:

```text
		Index	Specifier
		-----	---------
		0	DOMAIN_VAPE
```

## Example:

```dts
	sdi0_per1@80126000 {
		compatible = "arm,pl18x", "arm,primecell";
		power-domains = <&pm_domains DOMAIN_VAPE>
	};
```

---

# VIA/Wondermedia VT8500 Power Management Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/vt8500_

> Device-tree binding reference for VIA/Wondermedia VT8500 Power Management Controller.

## Required properties:

- compatible : "via,vt8500-pmc"
- reg : Should contain 1 register ranges(address and length)

## Example:

```dts
	pmc@d8130000 {
		compatible = "via,vt8500-pmc";
		reg = <0xd8130000 0x1000>;
	};
```

---

# Driver for ARM AXI Bus with Broadcom Plugins (bcma)

_Peios Kernel / Hardware and drivers / Device tree / bindings/bus_

> Device-tree binding reference for Driver for ARM AXI Bus with Broadcom Plugins (bcma).

## Required properties:

- compatible : brcm,bus-axi

- reg : iomem address range of chipcommon core

The cores on the AXI bus are automatically detected by bcma with the
memory ranges they are using and they get registered afterwards.
Automatic detection of the IRQ number is not working on
BCM47xx/BCM53xx ARM SoCs. To assign IRQ numbers to the cores, provide
them manually through device tree. Use an interrupt-map to specify the
IRQ used by the devices on the bus. The first address is just an index,
because we do not have any special register.

The top-level axi bus may contain children representing attached cores
(devices). This is needed since some hardware details can't be auto
detected (e.g. IRQ numbers). Also some of the cores may be responsible
for extra things, e.g. ChipCommon providing access to the GPIO chip.

## Example:

```dts
	axi@18000000 {
		compatible = "brcm,bus-axi";
		reg = <0x18000000 0x1000>;
		ranges = <0x00000000 0x18000000 0x00100000>;
		#address-cells = <1>;
		#size-cells = <1>;
		#interrupt-cells = <1>;
		interrupt-map-mask = <0x000fffff 0xffff>;
		interrupt-map =
			/* Ethernet Controller 0 */
			<0x00024000 0 &gic GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,

			/* Ethernet Controller 1 */
			<0x00025000 0 &gic GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;

			/* PCIe Controller 0 */
			<0x00012000 0 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
			<0x00012000 1 &gic GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>,
			<0x00012000 2 &gic GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
			<0x00012000 3 &gic GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
			<0x00012000 4 &gic GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
			<0x00012000 5 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;

		chipcommon {
			reg = <0x00000000 0x1000>;

			gpio-controller;
			#gpio-cells = <2>;
		};
	};
```

---

# Marvell MBus

_Peios Kernel / Hardware and drivers / Device tree / bindings/bus_

> Device-tree binding reference for Marvell MBus.

## Required properties:

- compatible:	 Should be set to one of the following:
  marvell,armada370-mbus
  marvell,armadaxp-mbus
  marvell,armada375-mbus
  marvell,armada380-mbus
  marvell,kirkwood-mbus
  marvell,dove-mbus
  marvell,orion5x-88f5281-mbus
  marvell,orion5x-88f5182-mbus
  marvell,orion5x-88f5181-mbus
  marvell,orion5x-88f6183-mbus
  marvell,mv78xx0-mbus

- address-cells: Must be '2'. The first cell for the MBus ID encoding,
  the second cell for the address offset within the window.

- size-cells:    Must be '1'.

- ranges:        Must be set up to provide a proper translation for each child.
  See the examples below.

- controller:    Contains a single phandle referring to the MBus controller
  node. This allows to specify the node that contains the
  registers that control the MBus, which is typically contained
  within the internal register window (see below).

## Optional properties:

- pcie-mem-aperture:	This optional property contains the aperture for
  the memory region of the PCIe driver.
  If it's defined, it must encode the base address and
  size for the address decoding windows allocated for
  the PCIe memory region.

- pcie-io-aperture:	Just as explained for the above property, this
  optional property contains the aperture for the
  I/O region of the PCIe driver.

- Marvell MBus controller

## Required properties:

- compatible:	Should be set to "marvell,mbus-controller".

- reg:          Device's register space.
  Two or three entries are expected (see the examples below):
  the first one controls the devices decoding window,
  the second one controls the SDRAM decoding window and
  the third controls the MBus bridge (only with the
  marvell,armada370-mbus and marvell,armadaxp-mbus
  compatible strings)

## Example:

```dts
	soc {
		compatible = "marvell,armada370-mbus", "simple-bus";
		#address-cells = <2>;
		#size-cells = <1>;
		controller = <&mbusc>;
		pcie-mem-aperture = <0xe0000000 0x8000000>;
		pcie-io-aperture  = <0xe8000000 0x100000>;

		internal-regs {
			compatible = "simple-bus";

			mbusc: mbus-controller@20000 {
				compatible = "marvell,mbus-controller";
				reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>;
			};

			/* more children ...*/
		};
	};
```

\*\* MBus address decoding window specification

The MBus children address space is comprised of two cells: the first one for
the window ID and the second one for the offset within the window.
In order to allow to describe valid and non-valid window entries, the
following encoding is used:

```text
  0xSIAA0000 0x00oooooo
```

## Where:

```dts
  S = 0x0 for a MBus valid window
  S = 0xf for a non-valid window (see below)
```

If S = 0x0, then:

```dts
   I = 4-bit window target ID
  AA = windpw attribute
```

If S = 0xf, then:

```dts
   I = don't care
   AA = 1 for internal register
```

Following the above encoding, for each ranges entry for a MBus valid window
(S = 0x0), an address decoding window is allocated. On the other side,
entries for translation that do not correspond to valid windows (S = 0xf)
are skipped.

```dts
	soc {
		compatible = "marvell,armada370-mbus", "simple-bus";
		#address-cells = <2>;
		#size-cells = <1>;
		controller = <&mbusc>;

		ranges = <0xf0010000 0 0 0xd0000000 0x100000
			  0x01e00000 0 0 0xfff00000 0x100000>;

		bootrom {
			compatible = "marvell,bootrom";
			reg = <0x01e00000 0 0x100000>;
		};

		/* other children */
		...

		internal-regs {
			compatible = "simple-bus";
			ranges = <0 0xf0010000 0 0x100000>;

			mbusc: mbus-controller@20000 {
				compatible = "marvell,mbus-controller";
				reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>;
			};

			/* more children ...*/
		};
	};
```

In the shown example, the translation entry in the 'ranges' property is what
makes the MBus driver create a static decoding window for the corresponding
given child device. Note that the binding does not require child nodes to be
present. Of course, child nodes are needed to probe the devices.

Since each window is identified by its target ID and attribute ID there's
a special macro that can be use to simplify the translation entries:

#define MBUS\_ID(target,attributes) (((target) &lt;&lt; 24) | ((attributes) &lt;&lt; 16))

## Using this macro, the above example would be:

```dts
	soc {
		compatible = "marvell,armada370-mbus", "simple-bus";
		#address-cells = <2>;
		#size-cells = <1>;
		controller = <&mbusc>;

		ranges = < MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000
			   MBUS_ID(0x01, 0xe0) 0 0 0xfff00000 0x100000>;

		bootrom {
			compatible = "marvell,bootrom";
			reg = <MBUS_ID(0x01, 0xe0) 0 0x100000>;
		};

		/* other children */
		...

		internal-regs {
			compatible = "simple-bus";
			#address-cells = <1>;
			#size-cells = <1>;
			ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>;

			mbusc: mbus-controller@20000 {
				compatible = "marvell,mbus-controller";
				reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>;
			};

			/* other children */
			...
		};
	};
```

\*\* About the window base address

Remember the MBus controller allows a great deal of flexibility for choosing
the decoding window base address. When planning the device tree layout it's
possible to choose any address as the base address, provided of course there's
a region large enough available, and with the required alignment.

Yet in other words: there's nothing preventing us from setting a base address
of 0xf0000000, or 0xd0000000 for the NOR device shown above, if such region is
unused.

\*\* Window allocation policy

The mbus-node ranges property defines a set of mbus windows that are expected
to be set by the operating system and that are guaranteed to be free of overlaps
with one another or with the system memory ranges.

Each entry in the property refers to exactly one window. If the operating system
chooses to use a different set of mbus windows, it must ensure that any address
translations performed from downstream devices are adapted accordingly.

The operating system may insert additional mbus windows that do not conflict
with the ones listed in the ranges, e.g. for mapping PCIe devices.
As a special case, the internal register window must be set up by the boot
loader at the address listed in the ranges property, since access to that region
is needed to set up the other windows.

\*\* Example

See the example below, where a more complete device tree is shown:

```dts
	soc {
		compatible = "marvell,armadaxp-mbus", "simple-bus";
		controller = <&mbusc>;

		ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000   /* internal-regs */
			  MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
			  MBUS_ID(0x01, 0x2f) 0 0 0xf0000000 0x8000000>;

		bootrom {
			compatible = "marvell,bootrom";
			reg = <MBUS_ID(0x01, 0x1d) 0 0x100000>;
		};

		devbus-bootcs {
			ranges = <0 MBUS_ID(0x01, 0x2f) 0 0x8000000>;

			/* NOR */
			nor {
				compatible = "cfi-flash";
				reg = <0 0x8000000>;
				bank-width = <2>;
			};
		};

		pcie-controller {
			compatible = "marvell,armada-xp-pcie";
			device_type = "pci";

			#address-cells = <3>;
			#size-cells = <2>;

			ranges =
			       <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000   /* Port 0.0 registers */
				0x82000000 0 0x42000 MBUS_ID(0xf0, 0x01) 0x42000 0 0x00002000   /* Port 2.0 registers */
				0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000   /* Port 0.1 registers */
				0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000   /* Port 0.2 registers */
				0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000   /* Port 0.3 registers */
				0x82000800 0 0xe0000000 MBUS_ID(0x04, 0xe8) 0xe0000000 0 0x08000000 /* Port 0.0 MEM */
				0x81000800 0 0          MBUS_ID(0x04, 0xe0) 0xe8000000 0 0x00100000 /* Port 0.0 IO */>;


			pcie@1,0 {
				/* Port 0, Lane 0 */
			};
		};

		internal-regs {
			compatible = "simple-bus";
			#address-cells = <1>;
			#size-cells = <1>;
			ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>;

			mbusc: mbus-controller@20000 {
				reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>;
			};

			interrupt-controller@20000 {
			      reg = <0x20a00 0x2d0>, <0x21070 0x58>;
			};
		};
	};
```

---

# Device tree bindings for NVIDIA Tegra Generic Memory Interface bus

_Peios Kernel / Hardware and drivers / Device tree / bindings/bus_

> Device-tree binding reference for Device tree bindings for NVIDIA Tegra Generic Memory Interface bus.

The Generic Memory Interface bus enables memory transfers between internal and
external memory. Can be used to attach various high speed devices such as
synchronous/asynchronous NOR, FPGA, UARTS and more.

The actual devices are instantiated from the child nodes of a GMI node.

## Required properties:

- compatible : Should contain one of the following:
  For Tegra20 must contain "nvidia,tegra20-gmi".
  For Tegra30 must contain "nvidia,tegra30-gmi".
- reg: Should contain GMI controller registers location and length.
- clocks: Must contain an entry for each entry in clock-names.
- clock-names: Must include the following entries: "gmi"
- resets : Must contain an entry for each entry in reset-names.
- reset-names : Must include the following entries: "gmi"
- #address-cells: The number of cells used to represent physical base
  addresses in the GMI address space. Should be 2.
- #size-cells: The number of cells used to represent the size of an address
  range in the GMI address space. Should be 1.
- ranges: Must be set up to reflect the memory layout with three integer values
  for each chip-select line in use (only one entry is supported, see below
  comments):
  &lt;cs-number&gt; &lt;offset&gt; &lt;physical address of mapping&gt; &lt;size&gt;

Note that the GMI controller does not have any internal chip-select address
decoding, because of that chip-selects either need to be managed via software
or by employing external chip-select decoding logic.

If external chip-select logic is used to support multiple devices it is assumed
that the devices use the same timing and so are probably the same type. It also
assumes that they can fit in the 256MB address range. In this case only one
child device is supported which represents the active chip-select line, see
examples for more insight.

The chip-select number is decoded from the child nodes second address cell of
'ranges' property, if 'ranges' property is not present or empty chip-select will
then be decoded from the first cell of the 'reg' property.

## Optional child cs node properties:

- nvidia,snor-data-width-32bit: Use 32bit data-bus, default is 16bit.
- nvidia,snor-mux-mode: Enable address/data MUX mode.
- nvidia,snor-rdy-active-before-data: Assert RDY signal one cycle before data.
  If omitted it will be asserted with data.
- nvidia,snor-rdy-active-high: RDY signal is active high
- nvidia,snor-adv-active-high: ADV signal is active high
- nvidia,snor-oe-active-high: WE/OE signal is active high
- nvidia,snor-cs-active-high: CS signal is active high

```text
  Note that there is some special handling for the timing values.
  From Tegra TRM:
  Programming 0 means 1 clock cycle: actual cycle = programmed cycle + 1
```

- nvidia,snor-muxed-width: Number of cycles MUX address/data asserted on the
  bus. Valid values are 0-15, default is 1
- nvidia,snor-hold-width: Number of cycles CE stays asserted after the
  de-assertion of WR\_N (in case of SLAVE/MASTER Request) or OE\_N
  (in case of MASTER Request). Valid values are 0-15, default is 1
- nvidia,snor-adv-width: Number of cycles during which ADV stays asserted.
  Valid values are 0-15, default is 1.
- nvidia,snor-ce-width: Number of cycles before CE is asserted.
  Valid values are 0-15, default is 4
- nvidia,snor-we-width: Number of cycles during which WE stays asserted.
  Valid values are 0-15, default is 1
- nvidia,snor-oe-width: Number of cycles during which OE stays asserted.
  Valid values are 0-255, default is 1
- nvidia,snor-wait-width: Number of cycles before READY is asserted.
  Valid values are 0-255, default is 3

Example with two SJA1000 CAN controllers connected to the GMI bus. We wrap the
controllers with a simple-bus node since they are all connected to the same
chip-select (CS4), in this example external address decoding is provided:

```dts
gmi@70009000 {
	compatible = "nvidia,tegra20-gmi";
	reg = <0x70009000 0x1000>;
	#address-cells = <2>;
	#size-cells = <1>;
	clocks = <&tegra_car TEGRA20_CLK_NOR>;
	clock-names = "gmi";
	resets = <&tegra_car 42>;
	reset-names = "gmi";
	ranges = <4 0 0xd0000000 0xfffffff>;

	bus@4,0 {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <1>;
		ranges = <0 4 0 0x40100>;

		nvidia,snor-mux-mode;
		nvidia,snor-adv-active-high;

		can@0 {
			reg = <0 0x100>;
			...
		};

		can@40000 {
			reg = <0x40000 0x100>;
			...
		};
	};
};
```

Example with one SJA1000 CAN controller connected to the GMI bus
on CS4:

```dts
gmi@70009000 {
	compatible = "nvidia,tegra20-gmi";
	reg = <0x70009000 0x1000>;
	#address-cells = <2>;
	#size-cells = <1>;
	clocks = <&tegra_car TEGRA20_CLK_NOR>;
	clock-names = "gmi";
	resets = <&tegra_car 42>;
	reset-names = "gmi";
	ranges = <4 0 0xd0000000 0xfffffff>;

	can@4,0 {
		reg = <4 0 0x100>;
		nvidia,snor-mux-mode;
		nvidia,snor-adv-active-high;
		...
	};
};
```

---

# OMAP OCP2SCP - ocp interface to scp interface

_Peios Kernel / Hardware and drivers / Device tree / bindings/bus_

> Device-tree binding reference for OMAP OCP2SCP - ocp interface to scp interface.

## properties:

- compatible : Should be "ti,am437x-ocp2scp" for AM437x processor
  Should be "ti,omap-ocp2scp" for all others
- reg : Address and length of the register set for the device
- #address-cells, #size-cells : Must be present if the device has sub-nodes
- ranges : the child address space are mapped 1:1 onto the parent address space
- ti,hwmods : must be "ocp2scp\_usb\_phy"

## Sub-nodes:

All the devices connected to ocp2scp are described using sub-node to ocp2scp

```dts
ocp2scp@4a0ad000 {
	compatible = "ti,omap-ocp2scp";
	reg = <0x4a0ad000 0x1f>;
	#address-cells = <1>;
	#size-cells = <1>;
	ranges;
	ti,hwmods = "ocp2scp_usb_phy";

	subnode1 {
	...
	};

	subnode2 {
	...
	};
};
```

---

# Device tree bindings for Texas Instruments da8xx master peripheral

_Peios Kernel / Hardware and drivers / Device tree / bindings/bus_

> Device-tree binding reference for Device tree bindings for Texas Instruments da8xx master peripheral.

```text
  priority driver
```

DA8XX SoCs feature a set of registers allowing to change the priority of all
peripherals classified as masters.

## Documentation:

OMAP-L138 (DA850) - http://www.ti.com/lit/ug/spruh82c/spruh82c.pdf

## Required properties:

- compatible:		"ti,da850-mstpri" - for da850 based boards
- reg:			offset and length of the mstpri registers

Example for da850-lcdk is shown below.

```dts
mstpri {
	compatible = "ti,da850-mstpri";
	reg = <0x14110 0x0c>;
};
```

---

# Technologic Systems NBUS

_Peios Kernel / Hardware and drivers / Device tree / bindings/bus_

> Device-tree binding reference for Technologic Systems NBUS.

The NBUS is a bus used to interface with peripherals in the Technologic
Systems FPGA on the TS-4600 SoM.

## Required properties :

- compatible		: "technologic,ts-nbus"
- #address-cells	: must be 1
- #size-cells		: must be 0
- pwms			: The PWM bound to the FPGA
- ts,data-gpios	: The 8 GPIO pins connected to the data lines on the FPGA
- ts,csn-gpios		: The GPIO pin connected to the csn line on the FPGA
- ts,txrx-gpios	: The GPIO pin connected to the txrx line on the FPGA
- ts,strobe-gpios	: The GPIO pin connected to the stobe line on the FPGA
- ts,ale-gpios		: The GPIO pin connected to the ale line on the FPGA
- ts,rdy-gpios		: The GPIO pin connected to the rdy line on the FPGA

## Child nodes:

The NBUS node can contain zero or more child nodes representing peripherals
on the bus.

## Example:

```dts
	nbus {
		compatible = "technologic,ts-nbus";
		pinctrl-0 = <&nbus_pins>;
		#address-cells = <1>;
		#size-cells = <0>;
		pwms = <&pwm 2 83>;
		ts,data-gpios   = <&gpio0 0 GPIO_ACTIVE_HIGH
				   &gpio0 1 GPIO_ACTIVE_HIGH
				   &gpio0 2 GPIO_ACTIVE_HIGH
				   &gpio0 3 GPIO_ACTIVE_HIGH
				   &gpio0 4 GPIO_ACTIVE_HIGH
				   &gpio0 5 GPIO_ACTIVE_HIGH
				   &gpio0 6 GPIO_ACTIVE_HIGH
				   &gpio0 7 GPIO_ACTIVE_HIGH>;
		ts,csn-gpios    = <&gpio0 16 GPIO_ACTIVE_HIGH>;
		ts,txrx-gpios   = <&gpio0 24 GPIO_ACTIVE_HIGH>;
		ts,strobe-gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
		ts,ale-gpios    = <&gpio0 26 GPIO_ACTIVE_HIGH>;
		ts,rdy-gpios    = <&gpio0 21 GPIO_ACTIVE_HIGH>;

		watchdog@2a {
			compatible = "...";

			/* ... */
		};
	};
```

---

# Freescale L2 Cache Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/cache_

> Device-tree binding reference for Freescale L2 Cache Controller.

L2 cache is present in Freescale's QorIQ and QorIQ Qonverge platforms.
The cache bindings explained below are Devicetree Specification compliant

## Required Properties:

- compatible	: Should include one of the following:
  "fsl,b4420-l2-cache-controller"
  "fsl,b4860-l2-cache-controller"
  "fsl,bsc9131-l2-cache-controller"
  "fsl,bsc9132-l2-cache-controller"
  "fsl,c293-l2-cache-controller"
  "fsl,mpc8536-l2-cache-controller"
  "fsl,mpc8540-l2-cache-controller"
  "fsl,mpc8541-l2-cache-controller"
  "fsl,mpc8544-l2-cache-controller"
  "fsl,mpc8548-l2-cache-controller"
  "fsl,mpc8555-l2-cache-controller"
  "fsl,mpc8560-l2-cache-controller"
  "fsl,mpc8568-l2-cache-controller"
  "fsl,mpc8569-l2-cache-controller"
  "fsl,mpc8572-l2-cache-controller"
  "fsl,p1010-l2-cache-controller"
  "fsl,p1011-l2-cache-controller"
  "fsl,p1012-l2-cache-controller"
  "fsl,p1013-l2-cache-controller"
  "fsl,p1014-l2-cache-controller"
  "fsl,p1015-l2-cache-controller"
  "fsl,p1016-l2-cache-controller"
  "fsl,p1020-l2-cache-controller"
  "fsl,p1021-l2-cache-controller"
  "fsl,p1022-l2-cache-controller"
  "fsl,p1023-l2-cache-controller"
  "fsl,p1024-l2-cache-controller"
  "fsl,p1025-l2-cache-controller"
  "fsl,p2010-l2-cache-controller"
  "fsl,p2020-l2-cache-controller"
  "fsl,t2080-l2-cache-controller"
  "fsl,t4240-l2-cache-controller"
  and "cache".
- reg		: Address and size of L2 cache controller registers
- cache-size	: Size of the entire L2 cache
- interrupts	: Error interrupt of L2 controller
- cache-line-size : Size of L2 cache lines

## Example:

```dts
	L2: l2-cache-controller@20000 {
		compatible = "fsl,bsc9132-l2-cache-controller", "cache";
		reg = <0x20000 0x1000>;
		cache-line-size = <32>; // 32 bytes
		cache-size = <0x40000>; // L2,256K
		interrupts = <16 2 1 0>;
	};
```

---

# Binding for the AXS10X I2S PLL clock

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Binding for the AXS10X I2S PLL clock.

This binding uses the common clock binding\[1\].

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Required properties:

- compatible: shall be "snps,axs10x-i2s-pll-clock"
- reg : address and length of the I2S PLL register set.
- clocks: shall be the input parent clock phandle for the PLL.
- #clock-cells: from common clock binding; Should always be set to 0.

## Example:

```dts
	pll_clock: pll_clock {
		compatible = "fixed-clock";
		clock-frequency = <27000000>;
		#clock-cells = <0>;
	};
```

```dts
	i2s_clock@100a0 {
		compatible = "snps,axs10x-i2s-pll-clock";
		reg = <0x100a0 0x10>;
		clocks = <&pll_clock>;
		#clock-cells = <0>;
	};
```

---

# Palmas 32KHz clocks *

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Palmas 32KHz clocks *.

Palmas device has two clock output pins for 32KHz, KG and KG\_AUDIO.

This binding uses the common clock binding [./clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>).

## Required properties:

- compatible :	"ti,palmas-clk32kg" for clk32kg clock
  "ti,palmas-clk32kgaudio" for clk32kgaudio clock
- #clock-cells : shall be set to 0.

## Optional property:

- ti,external-sleep-control: The external enable input pins controlled the
  enable/disable of clocks.  The external enable input pins ENABLE1,
  ENABLE2 and NSLEEP. The valid values for the external pins are:
  PALMAS\_EXT\_CONTROL\_PIN\_ENABLE1 for ENABLE1 pin
  PALMAS\_EXT\_CONTROL\_PIN\_ENABLE2 for ENABLE2 pin
  PALMAS\_EXT\_CONTROL\_PIN\_NSLEEP for NSLEEP pin
  Option 0 or missing this property means the clock is enabled/disabled
  via register access and these pins do not have any control.
  The macros of external control pins for DTS is defined at
  dt-bindings/mfd/palmas.h

## Example:

```dts
	#include <dt-bindings/mfd/palmas.h>
	...
	palmas: tps65913@58 {
		...
		clk32kg: palmas_clk32k@0 {
			compatible = "ti,palmas-clk32kg";
			#clock-cells = <0>;
			ti,external-sleep-control = <PALMAS_EXT_CONTROL_PIN_NSLEEP>;
		};
		...
	};
```

---

# Clock bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Clock bindings.

## This file has moved to the clock binding schema:

https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/clock/clock.yaml

---

# Hisilicon Hi3660 Clock Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Hisilicon Hi3660 Clock Controller.

The Hi3660 clock controller generates and supplies clock to various
controllers within the Hi3660 SoC.

## Required Properties:

- compatible: the compatible should be one of the following strings to
  indicate the clock controller functionality.

- "hisilicon,hi3660-crgctrl"
- "hisilicon,hi3660-pctrl"
- "hisilicon,hi3660-pmuctrl"
- "hisilicon,hi3660-sctrl"
- "hisilicon,hi3660-iomcu"
- "hisilicon,hi3660-stub-clk"

- reg: physical base address of the controller and length of memory mapped
  region.

- #clock-cells: should be 1.

## Optional Properties:

- mboxes: Phandle to the mailbox for sending message to MCU.
  (See: [../mailbox/hisilicon,hi3660-mailbox.txt](</kernel/hardware/devicetree/bindings-mailbox/hisilicon-hi3660-mailbox.md>) for more info)

Each clock is assigned an identifier and client nodes use this identifier
to specify the clock which they consume.

All these identifier could be found in &lt;dt-bindings/clock/hi3660-clock.h&gt;.

## Examples:

```dts
	crg_ctrl: clock-controller@fff35000 {
		compatible = "hisilicon,hi3660-crgctrl", "syscon";
		reg = <0x0 0xfff35000 0x0 0x1000>;
		#clock-cells = <1>;
	};
```

```dts
	uart0: serial@fdf02000 {
		compatible = "arm,pl011", "arm,primecell";
		reg = <0x0 0xfdf02000 0x0 0x1000>;
		interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
		clocks = <&crg_ctrl HI3660_CLK_MUX_UART0>,
			 <&crg_ctrl HI3660_PCLK>;
		clock-names = "uartclk", "apb_pclk";
	};
```

---

# Hisilicon Hi3670 Clock Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Hisilicon Hi3670 Clock Controller.

The Hi3670 clock controller generates and supplies clock to various
controllers within the Hi3670 SoC.

## Required Properties:

- compatible: the compatible should be one of the following strings to
  indicate the clock controller functionality.

- "hisilicon,hi3670-crgctrl"
- "hisilicon,hi3670-pctrl"
- "hisilicon,hi3670-pmuctrl"
- "hisilicon,hi3670-sctrl"
- "hisilicon,hi3670-iomcu"
- "hisilicon,hi3670-media1-crg"
- "hisilicon,hi3670-media2-crg"

- reg: physical base address of the controller and length of memory mapped
  region.

- #clock-cells: should be 1.

Each clock is assigned an identifier and client nodes use this identifier
to specify the clock which they consume.

All these identifier could be found in &lt;dt-bindings/clock/hi3670-clock.h&gt;.

## Examples:

```dts
	crg_ctrl: clock-controller@fff35000 {
		compatible = "hisilicon,hi3670-crgctrl", "syscon";
		reg = <0x0 0xfff35000 0x0 0x1000>;
		#clock-cells = <1>;
	};
```

```dts
	uart0: serial@fdf02000 {
		compatible = "arm,pl011", "arm,primecell";
		reg = <0x0 0xfdf02000 0x0 0x1000>;
		interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
		clocks = <&crg_ctrl HI3670_CLK_GATE_UART0>,
			 <&crg_ctrl HI3670_PCLK>;
		clock-names = "uartclk", "apb_pclk";
	};
```

---

# Hisilicon Hi6220 Clock Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Hisilicon Hi6220 Clock Controller.

Clock control registers reside in different Hi6220 system controllers,
please refer the following document to know more about the binding rules
for these system controllers:

[Documentation/devicetree/bindings/arm/hisilicon/hisilicon.yaml](</kernel/hardware/devicetree-bindings/dt-arm/hisilicon/hisilicon.md>)

## Required Properties:

- compatible: the compatible should be one of the following strings to
  indicate the clock controller functionality.

- "hisilicon,hi6220-acpu-sctrl"
- "hisilicon,hi6220-aoctrl"
- "hisilicon,hi6220-sysctrl"
- "hisilicon,hi6220-mediactrl"
- "hisilicon,hi6220-pmctrl"
- "hisilicon,hi6220-stub-clk"

- reg: physical base address of the controller and length of memory mapped
  region.

- #clock-cells: should be 1.

## Optional Properties:

- hisilicon,hi6220-clk-sram: phandle to the syscon managing the SoC internal sram;
  the driver need use the sram to pass parameters for frequency change.

- mboxes: use the label reference for the mailbox as the first parameter, the
  second parameter is the channel number.

## Example 1:

```dts
	sys_ctrl: sys_ctrl@f7030000 {
		compatible = "hisilicon,hi6220-sysctrl", "syscon";
		reg = <0x0 0xf7030000 0x0 0x2000>;
		#clock-cells = <1>;
	};
```

## Example 2:

```dts
	stub_clock: stub_clock {
		compatible = "hisilicon,hi6220-stub-clk";
		hisilicon,hi6220-clk-sram = <&sram>;
		#clock-cells = <1>;
		mboxes = <&mailbox 1>;
	};
```

Each clock is assigned an identifier and client nodes use this identifier
to specify the clock which they consume.

All these identifier could be found in &lt;dt-bindings/clock/hi6220-clock.h&gt;.

---

# HiSilicon Clock and Reset Generator(CRG)

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for HiSilicon Clock and Reset Generator(CRG).

The CRG module provides clock and reset signals to various
modules within the SoC.

## This binding uses the following bindings:

```text
    Documentation/devicetree/bindings/clock/clock-bindings.txt
    Documentation/devicetree/bindings/reset/reset.txt
```

## Required Properties:

```text
- compatible: should be one of the following.
  - "hisilicon,hi3516cv300-crg"
  - "hisilicon,hi3516cv300-sysctrl"
  - "hisilicon,hi3519-crg"
  - "hisilicon,hi3798cv200-crg"
  - "hisilicon,hi3798cv200-sysctrl"
```

- reg: physical base address of the controller and length of memory mapped
  region.

- #clock-cells: should be 1.

Each clock is assigned an identifier and client nodes use this identifier
to specify the clock which they consume.

All these identifier could be found in &lt;dt-bindings/clock/hi3519-clock.h&gt;.

- #reset-cells: should be 2.

A reset signal can be controlled by writing a bit register in the CRG module.
The reset specifier consists of two cells. The first cell represents the
register offset relative to the base address. The second cell represents the
bit index in the register.

Example: CRG nodes

```dts
CRG: clock-reset-controller@12010000 {
	compatible = "hisilicon,hi3519-crg";
	reg = <0x12010000 0x10000>;
	#clock-cells = <1>;
	#reset-cells = <2>;
};
```

Example: consumer nodes

```dts
i2c0: i2c@12110000 {
	compatible = "hisilicon,hi3519-i2c";
	reg = <0x12110000 0x1000>;
	clocks = <&CRG HI3519_I2C0_RST>;
	resets = <&CRG 0xe4 0>;
};
```

---

# Binding for Imagination Technologies MIPS Boston clock sources.

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Binding for Imagination Technologies MIPS Boston clock sources..

This binding uses the common clock binding\[1\].

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

The device node must be a child node of the syscon node corresponding to the
Boston system's platform registers.

## Required properties:

- compatible : Should be "img,boston-clock".
- #clock-cells : Should be set to 1.
  Values available for clock consumers can be found in the header file:
  &lt;dt-bindings/clock/boston-clock.h&gt;

## Example:

```dts
	system-controller@17ffd000 {
		compatible = "img,boston-platform-regs", "syscon";
		reg = <0x17ffd000 0x1000>;

		clk_boston: clock {
			compatible = "img,boston-clock";
			#clock-cells = <1>;
		};
	};
```

```dts
	uart0: uart@17ffe000 {
		/* ... */
		clocks = <&clk_boston BOSTON_CLK_SYS>;
	};
```

---

# Binding for Keystone gate control driver which uses PSC controller IP.

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Binding for Keystone gate control driver which uses PSC controller IP..

This binding uses the common clock binding\[1\].

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Required properties:

- compatible : shall be "ti,keystone,psc-clock".
- #clock-cells : from common clock binding; shall be set to 0.
- clocks : parent clock phandle
- reg :	psc control and domain address address space
- reg-names : psc control and domain registers
- domain-id : psc domain id needed to check the transition state register

## Optional properties:

```text
- clock-output-names : From common clock binding to override the
			default output clock name
Example:
	clkusb: clkusb {
		#clock-cells = <0>;
		compatible = "ti,keystone,psc-clock";
		clocks = <&chipclk16>;
		clock-output-names = "usb";
		reg = <0x02350008 0xb00>, <0x02350000 0x400>;
		reg-names = "control", "domain";
		domain-id = <0>;
	};
```

---

# Keystone pll bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Keystone pll bindings.

Binding for keystone PLLs. The main PLL IP typically has a multiplier,
a divider and a post divider. The additional PLL IPs like ARMPLL, DDRPLL
and PAPLL are controlled by the memory mapped register where as the Main
PLL is controlled by a PLL controller registers along with memory mapped
registers.

This binding uses the common clock binding\[1\].

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Required properties:

- #clock-cells : from common clock binding; shall be set to 0.
- compatible : shall be "ti,keystone,main-pll-clock" or "ti,keystone,pll-clock"
- clocks : parent clock phandle
- reg - pll control0 and pll multiplier registers
- reg-names : control, multiplier and post-divider. The multiplier and
  post-divider registers are applicable only for main pll clock
- fixed-postdiv : fixed post divider value. If absent, use clkod register bits
  for postdiv

## Example:

```dts
	mainpllclk: mainpllclk@2310110 {
		#clock-cells = <0>;
		compatible = "ti,keystone,main-pll-clock";
		clocks = <&refclksys>;
		reg = <0x02620350 4>, <0x02310110 4>, <0x02310108 4>;
		reg-names = "control", "multiplier", "post-divider";
		fixed-postdiv = <2>;
	};
```

```dts
	papllclk: papllclk@2620358 {
		#clock-cells = <0>;
		compatible = "ti,keystone,pll-clock";
		clocks = <&refclkpass>;
		clock-output-names = "pa-pll-clk";
		reg = <0x02620358 4>;
		reg-names = "control";
	};
```

## Required properties:

- #clock-cells : from common clock binding; shall be set to 0.
- compatible : shall be "ti,keystone,pll-mux-clock"
- clocks : link phandles of parent clocks
- reg - pll mux register
- bit-shift : number of bits to shift the bit-mask
- bit-mask : arbitrary bitmask for programming the mux

## Optional properties:

- clock-output-names : From common clock binding.

## Example:

```dts
	mainmuxclk: mainmuxclk@2310108 {
		#clock-cells = <0>;
		compatible = "ti,keystone,pll-mux-clock";
		clocks = <&mainpllclk>, <&refclkmain>;
		reg = <0x02310108 4>;
		bit-shift = <23>;
		bit-mask = <1>;
		clock-output-names = "mainmuxclk";
	};
```

## Required properties:

- #clock-cells : from common clock binding; shall be set to 0.
- compatible : shall be "ti,keystone,pll-divider-clock"
- clocks : parent clock phandle
- reg - pll mux register
- bit-shift : number of bits to shift the bit-mask
- bit-mask : arbitrary bitmask for programming the divider

## Optional properties:

- clock-output-names : From common clock binding.

## Example:

```dts
	gemtraceclk: gemtraceclk@2310120 {
		#clock-cells = <0>;
		compatible = "ti,keystone,pll-divider-clock";
		clocks = <&mainmuxclk>;
		reg = <0x02310120 4>;
		bit-shift = <0>;
		bit-mask = <8>;
		clock-output-names = "gemtraceclk";
	};
```

---

# Marvell PXA168 Clock Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Marvell PXA168 Clock Controller.

The PXA168 clock subsystem generates and supplies clock to various
controllers within the PXA168 SoC.

## Required Properties:

```text
- compatible: should be one of the following.
  - "marvell,pxa168-clock" - controller compatible with PXA168 SoC.
```

- reg: physical base address of the clock subsystem and length of memory mapped
  region. There are 3 places in SOC has clock control logic:
  "mpmu", "apmu", "apbc". So three reg spaces need to be defined.

- #clock-cells: should be 1.
- #reset-cells: should be 1.

Each clock is assigned an identifier and client nodes use this identifier
to specify the clock which they consume.

All these identifier could be found in &lt;dt-bindings/clock/marvell,pxa168.h&gt;.

---

# Marvell PXA1928 Clock Controllers

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Marvell PXA1928 Clock Controllers.

The PXA1928 clock subsystem generates and supplies clock to various
controllers within the PXA1928 SoC. The PXA1928 contains 3 clock controller
blocks called APMU, MPMU, and APBC roughly corresponding to internal buses.

## Required Properties:

```text
- compatible: should be one of the following.
  - "marvell,pxa1928-apmu" - APMU controller compatible
  - "marvell,pxa1928-mpmu" - MPMU controller compatible
  - "marvell,pxa1928-apbc" - APBC controller compatible
- reg: physical base address of the clock controller and length of memory mapped
  region.
- #clock-cells: should be 1.
- #reset-cells: should be 1.
```

Each clock is assigned an identifier and client nodes use the clock controller
phandle and this identifier to specify the clock which they consume.

All these identifiers can be found in &lt;dt-bindings/clock/marvell,pxa1928.h&gt;.

---

# Marvell PXA910 Clock Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Marvell PXA910 Clock Controller.

The PXA910 clock subsystem generates and supplies clock to various
controllers within the PXA910 SoC.

## Required Properties:

```text
- compatible: should be one of the following.
  - "marvell,pxa910-clock" - controller compatible with PXA910 SoC.
```

- reg: physical base address of the clock subsystem and length of memory mapped
  region. There are 4 places in SOC has clock control logic:
  "mpmu", "apmu", "apbc", "apbcp". So four reg spaces need to be defined.

- #clock-cells: should be 1.
- #reset-cells: should be 1.

Each clock is assigned an identifier and client nodes use this identifier
to specify the clock which they consume.

All these identifier could be found in &lt;dt-bindings/clock/marvell-pxa910.h&gt;.

---

# NVIDIA Tegra124 DFLL FCPU clocksource

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for NVIDIA Tegra124 DFLL FCPU clocksource.

## This binding uses the common clock binding:

[Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

The DFLL IP block on Tegra is a root clocksource designed for clocking
the fast CPU cluster. It consists of a free-running voltage controlled
oscillator connected to the CPU voltage rail (VDD\_CPU), and a closed loop
control module that will automatically adjust the VDD\_CPU voltage by
communicating with an off-chip PMIC either via an I2C bus or via PWM signals.

## Required properties:

```text
- compatible : should be one of:
  - "nvidia,tegra124-dfll": for Tegra124
  - "nvidia,tegra210-dfll": for Tegra210
- reg : Defines the following set of registers, in the order listed:
        - registers for the DFLL control logic.
        - registers for the I2C output logic.
        - registers for the integrated I2C master controller.
        - look-up table RAM for voltage register values.
- interrupts: Should contain the DFLL block interrupt.
- clocks: Must contain an entry for each entry in clock-names.
  See clock-bindings.txt for details.
- clock-names: Must include the following entries:
  - soc: Clock source for the DFLL control logic.
  - ref: The closed loop reference clock
  - i2c: Clock source for the integrated I2C master.
- resets: Must contain an entry for each entry in reset-names.
  See ../reset/reset.txt for details.
- reset-names: Must include the following entries:
  - dvco: Reset control for the DFLL DVCO.
- #clock-cells: Must be 0.
- clock-output-names: Name of the clock output.
- vdd-cpu-supply: Regulator for the CPU voltage rail that the DFLL
  hardware will start controlling. The regulator will be queried for
  the I2C register, control values and supported voltages.
```

## Required properties for the control loop parameters:

- nvidia,sample-rate: Sample rate of the DFLL control loop.
- nvidia,droop-ctrl: See the register CL\_DVFS\_DROOP\_CTRL in the TRM.
- nvidia,force-mode: See the field DFLL\_PARAMS\_FORCE\_MODE in the TRM.
- nvidia,cf: Numeric value, see the field DFLL\_PARAMS\_CF\_PARAM in the TRM.
- nvidia,ci: Numeric value, see the field DFLL\_PARAMS\_CI\_PARAM in the TRM.
- nvidia,cg: Numeric value, see the field DFLL\_PARAMS\_CG\_PARAM in the TRM.

## Optional properties for the control loop parameters:

- nvidia,cg-scale: Boolean value, see the field DFLL\_PARAMS\_CG\_SCALE in the TRM.

## Optional properties for mode selection:

- nvidia,pwm-to-pmic: Use PWM to control regulator rather then I2C.

## Required properties for I2C mode:

- nvidia,i2c-fs-rate: I2C transfer rate, if using full speed mode.

## Required properties for PWM mode:

```text
- nvidia,pwm-period-nanoseconds: period of PWM square wave in nanoseconds.
- nvidia,pwm-tristate-microvolts: Regulator voltage in micro volts when PWM
  control is disabled and the PWM output is tristated. Note that this voltage is
  configured in hardware, typically via a resistor divider.
- nvidia,pwm-min-microvolts: Regulator voltage in micro volts when PWM control
  is enabled and PWM output is low. Hence, this is the minimum output voltage
  that the regulator supports when PWM control is enabled.
- nvidia,pwm-voltage-step-microvolts: Voltage increase in micro volts
  corresponding to a 1/33th increase in duty cycle. Eg the voltage for 2/33th
  duty cycle would be: nvidia,pwm-min-microvolts +
  nvidia,pwm-voltage-step-microvolts * 2.
- pinctrl-0: I/O pad configuration when PWM control is enabled.
- pinctrl-1: I/O pad configuration when PWM control is disabled.
- pinctrl-names: must include the following entries:
  - dvfs_pwm_enable: I/O pad configuration when PWM control is enabled.
  - dvfs_pwm_disable: I/O pad configuration when PWM control is disabled.
```

## Example for I2C:

```dts
clock@70110000 {
        compatible = "nvidia,tegra124-dfll";
        reg = <0 0x70110000 0 0x100>, /* DFLL control */
              <0 0x70110000 0 0x100>, /* I2C output control */
              <0 0x70110100 0 0x100>, /* Integrated I2C controller */
              <0 0x70110200 0 0x100>; /* Look-up table RAM */
        interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
        clocks = <&tegra_car TEGRA124_CLK_DFLL_SOC>,
                 <&tegra_car TEGRA124_CLK_DFLL_REF>,
                 <&tegra_car TEGRA124_CLK_I2C5>;
        clock-names = "soc", "ref", "i2c";
        resets = <&tegra_car TEGRA124_RST_DFLL_DVCO>;
        reset-names = "dvco";
        #clock-cells = <0>;
        clock-output-names = "dfllCPU_out";
        vdd-cpu-supply = <&vdd_cpu>;

        nvidia,sample-rate = <12500>;
        nvidia,droop-ctrl = <0x00000f00>;
        nvidia,force-mode = <1>;
        nvidia,cf = <10>;
        nvidia,ci = <0>;
        nvidia,cg = <2>;

        nvidia,i2c-fs-rate = <400000>;
};
```

## Example for PWM:

```dts
clock@70110000 {
	compatible = "nvidia,tegra124-dfll";
	reg = <0 0x70110000 0 0x100>, /* DFLL control */
	      <0 0x70110000 0 0x100>, /* I2C output control */
	      <0 0x70110100 0 0x100>, /* Integrated I2C controller */
	      <0 0x70110200 0 0x100>; /* Look-up table RAM */
	interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
	clocks = <&tegra_car TEGRA210_CLK_DFLL_SOC>,
	         <&tegra_car TEGRA210_CLK_DFLL_REF>,
		 <&tegra_car TEGRA124_CLK_I2C5>;;
	clock-names = "soc", "ref", "i2c";
	resets = <&tegra_car TEGRA124_RST_DFLL_DVCO>;
	reset-names = "dvco";
	#clock-cells = <0>;
	clock-output-names = "dfllCPU_out";

	nvidia,sample-rate = <25000>;
	nvidia,droop-ctrl = <0x00000f00>;
	nvidia,force-mode = <1>;
	nvidia,cf = <6>;
	nvidia,ci = <0>;
	nvidia,cg = <2>;

	nvidia,pwm-min-microvolts = <708000>; /* 708mV */
	nvidia,pwm-period-nanoseconds = <2500>; /* 2.5us */
	nvidia,pwm-to-pmic;
	nvidia,pwm-tristate-microvolts = <1000000>;
	nvidia,pwm-voltage-step-microvolts = <19200>; /* 19.2mV */

	pinctrl-names = "dvfs_pwm_enable", "dvfs_pwm_disable";
	pinctrl-0 = <&dvfs_pwm_active_state>;
	pinctrl-1 = <&dvfs_pwm_inactive_state>;
};
```

/\* pinmux nodes added for completeness. Binding doc can be found in:

- [Documentation/devicetree/bindings/pinctrl/nvidia,tegra210-pinmux.yaml](</kernel/hardware/devicetree-bindings/dt-pinctrl/nvidia-tegra210-pinmux.md>)
  \*/

```dts
pinmux: pinmux@700008d4 {
	dvfs_pwm_active_state: dvfs_pwm_active {
		dvfs_pwm_pbb1 {
			nvidia,pins = "dvfs_pwm_pbb1";
			nvidia,tristate = <TEGRA_PIN_DISABLE>;
		};
	};
	dvfs_pwm_inactive_state: dvfs_pwm_inactive {
		dvfs_pwm_pbb1 {
			nvidia,pins = "dvfs_pwm_pbb1";
			nvidia,tristate = <TEGRA_PIN_ENABLE>;
		};
	};
};
```

---

# Clock bindings for Marvell PXA chips

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Clock bindings for Marvell PXA chips.

## Required properties:

- compatible: Should be "marvell,pxa-clocks"
- #clock-cells: Should be &lt;1&gt;

The clock consumer should specify the desired clock by having the clock
ID in its "clocks" phandle cell (see include/.../pxa-clock.h).

## Examples:

```dts
pxa2xx_clks: pxa2xx_clks@41300004 {
        compatible = "marvell,pxa-clocks";
        #clock-cells = <1>;
};
```

---

# Binding for the HSDK Generic PLL clock

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Binding for the HSDK Generic PLL clock.

This binding uses the common clock binding\[1\].

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Required properties:

- compatible: should be "snps,hsdk-&lt;name&gt;-pll-clock"
  "snps,hsdk-core-pll-clock"
  "snps,hsdk-gp-pll-clock"
  "snps,hsdk-hdmi-pll-clock"
- reg : should contain base register location and length.
- clocks: shall be the input parent clock phandle for the PLL.
- #clock-cells: from common clock binding; Should always be set to 0.

## Example:

```dts
	input_clk: input-clk {
		clock-frequency = <33333333>;
		compatible = "fixed-clock";
		#clock-cells = <0>;
	};
```

```dts
	cpu_clk: cpu-clk@0 {
		compatible = "snps,hsdk-core-pll-clock";
		reg = <0x00 0x10>;
		#clock-cells = <0>;
		clocks = <&input_clk>;
	};
```

---

# Binding for the AXS10X Generic PLL clock

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Binding for the AXS10X Generic PLL clock.

This binding uses the common clock binding\[1\].

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Required properties:

- compatible: should be "snps,axs10x-&lt;name&gt;-pll-clock"
  "snps,axs10x-arc-pll-clock"
  "snps,axs10x-pgu-pll-clock"
- reg: should always contain 2 pairs address - length: first for PLL config
  registers and second for corresponding LOCK CGU register.
- clocks: shall be the input parent clock phandle for the PLL.
- #clock-cells: from common clock binding; Should always be set to 0.

## Example:

```dts
	input-clk: input-clk {
		clock-frequency = <33333333>;
		compatible = "fixed-clock";
		#clock-cells = <0>;
	};
```

```dts
	core-clk: core-clk@80 {
		compatible = "snps,axs10x-arc-pll-clock";
		reg = <0x80 0x10>, <0x100 0x10>;
		#clock-cells = <0>;
		clocks = <&input-clk>;
	};
```

---

# ST Microelectronics Nomadik SRC System Reset and Control

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for ST Microelectronics Nomadik SRC System Reset and Control.

## This binding uses the common clock binding:

[Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

The Nomadik SRC controller is responsible of controlling chrystals,
PLLs and clock gates.

## Required properties for the SRC node:

- compatible: must be "stericsson,nomadik-src"
- reg: must contain the SRC register base and size

## Optional properties for the SRC node:

- disable-sxtalo: if present this will disable the SXTALO
  i.e. the driver output for the slow 32kHz chrystal, if the
  board has its own circuitry for providing this oscillator
- disable-mxtal: if present this will disable the MXTALO,
  i.e. the driver output for the main (~19.2 MHz) chrystal,
  if the board has its own circuitry for providing this
  oscillator

PLL nodes: these nodes represent the two PLLs on the system,
which should both have the main chrystal, represented as a
fixed frequency clock, as parent.

## Required properties for the two PLL nodes:

- compatible: must be "st,nomadik-pll-clock"
- clock-cells: must be 0
- clock-id: must be 1 or 2 for PLL1 and PLL2 respectively
- clocks: this clock will have main chrystal as parent

HCLK nodes: these represent the clock gates on individual
lines from the HCLK clock tree and the gate for individual
lines from the PCLK clock tree.

## Requires properties for the HCLK nodes:

- compatible: must be "st,nomadik-hclk-clock"
- clock-cells: must be 0
- clock-id: must be the clock ID from 0 to 63 according to
  this table:

```text
	0:  HCLKDMA0
	1:  HCLKSMC
	2:  HCLKSDRAM
	3:  HCLKDMA1
	4:  HCLKCLCD
	5:  PCLKIRDA
	6:  PCLKSSP
	7:  PCLKUART0
	8:  PCLKSDI
	9:  PCLKI2C0
	10: PCLKI2C1
	11: PCLKUART1
	12: PCLMSP0
	13: HCLKUSB
	14: HCLKDIF
	15: HCLKSAA
	16: HCLKSVA
	17: PCLKHSI
	18: PCLKXTI
	19: PCLKUART2
	20: PCLKMSP1
	21: PCLKMSP2
	22: PCLKOWM
	23: HCLKHPI
	24: PCLKSKE
	25: PCLKHSEM
	26: HCLK3D
	27: HCLKHASH
	28: HCLKCRYP
	29: PCLKMSHC
	30: HCLKUSBM
	31: HCLKRNG
	(32, 33, 34, 35 RESERVED)
	36: CLDCLK
	37: IRDACLK
	38: SSPICLK
	39: UART0CLK
	40: SDICLK
	41: I2C0CLK
	42: I2C1CLK
	43: UART1CLK
	44: MSPCLK0
	45: USBCLK
	46: DIFCLK
	47: IPI2CCLK
	48: IPBMCCLK
	49: HSICLKRX
	50: HSICLKTX
	51: UART2CLK
	52: MSPCLK1
	53: MSPCLK2
	54: OWMCLK
	(55 RESERVED)
	56: SKECLK
	(57 RESERVED)
	58: 3DCLK
	59: PCLKMSP3
	60: MSPCLK3
	61: MSHCCLK
	62: USBMCLK
	63: RNGCCLK
```

---

# Ti,cdce706 bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Ti,cdce706 bindings.

Bindings for Texas Instruments CDCE706 programmable 3-PLL clock
synthesizer/multiplier/divider.

Reference: https://www.ti.com/lit/ds/symlink/cdce706.pdf

## I2C device node required properties:

- compatible: shall be "ti,cdce706".
- reg: i2c device address, shall be in range \[0x68...0x6b\].
- #clock-cells: from common clock binding; shall be set to 1.
- clocks: from common clock binding; list of parent clock
  handles, shall be reference clock(s) connected to CLK\_IN0
  and CLK\_IN1 pins.
- clock-names: shall be clk\_in0 and/or clk\_in1. Use clk\_in0
  in case of crystal oscillator or differential signal input
  configuration. Use clk\_in0 and clk\_in1 in case of independent
  single-ended LVCMOS inputs configuration.

## Example:

```dts
	clocks {
		clk54: clk54 {
			#clock-cells = <0>;
			compatible = "fixed-clock";
			clock-frequency = <54000000>;
		};
	};
	...
	i2c0: i2c-master@d090000 {
		...
		cdce706: clock-synth@69 {
			compatible = "ti,cdce706";
			#clock-cells = <1>;
			reg = <0x69>;
			clocks = <&clk54>;
			clock-names = "clk_in0";
		};
	};
	...
	simple-audio-card,codec {
		...
		clocks = <&cdce706 4>;
	};
```

---

# Device Tree Clock bindings for arch-vt8500

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Device Tree Clock bindings for arch-vt8500.

This binding uses the common clock binding\[1\].

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Required properties:

- compatible : shall be one of the following:
  "via,vt8500-pll-clock" - for a VT8500/WM8505 PLL clock
  "wm,wm8650-pll-clock" - for a WM8650 PLL clock
  "wm,wm8750-pll-clock" - for a WM8750 PLL clock
  "wm,wm8850-pll-clock" - for a WM8850 PLL clock
  "via,vt8500-device-clock" - for a VT/WM device clock

## Required properties for PLL clocks:

- reg : shall be the control register offset from PMC base for the pll clock.
- clocks : shall be the input parent clock phandle for the clock. This should
  be the reference clock.
- #clock-cells : from common clock binding; shall be set to 0.

## Required properties for device clocks:

- clocks : shall be the input parent clock phandle for the clock. This should
  be a pll output.
- #clock-cells : from common clock binding; shall be set to 0.

Device Clocks

Device clocks are required to have one or both of the following sets of
properties:

## Gated device clocks:

## Required properties:

- enable-reg : shall be the register offset from PMC base for the enable
  register.
- enable-bit : shall be the bit within enable-reg to enable/disable the clock.

## Divisor device clocks:

## Required property:

- divisor-reg : shall be the register offset from PMC base for the divisor
  register.
  Optional property:
- divisor-mask : shall be the mask for the divisor register. Defaults to 0x1f
  if not specified.

## For example:

```dts
ref25: ref25M {
	#clock-cells = <0>;
	compatible = "fixed-clock";
	clock-frequency = <25000000>;
};
```

```dts
plla: plla {
	#clock-cells = <0>;
	compatible = "wm,wm8650-pll-clock";
	clocks = <&ref25>;
	reg = <0x200>;
};
```

```dts
sdhc: sdhc {
	#clock-cells = <0>;
	compatible = "via,vt8500-device-clock";
	clocks = <&pllb>;
	divisor-reg = <0x328>;
	divisor-mask = <0x3f>;
	enable-reg = <0x254>;
	enable-bit = <18>;
};
```

---

# Device Tree Clock bindings for the Zynq 7000 EPP

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock_

> Device-tree binding reference for Device Tree Clock bindings for the Zynq 7000 EPP.

The Zynq EPP has several different clk providers, each with there own bindings.
The purpose of this document is to document their usage.

See clock\_bindings.txt for more information on the generic clock bindings.
See Chapter 25 of Zynq TRM for more information about Zynq clocks.

== Clock Controller ==
The clock controller is a logical abstraction of Zynq's clock tree. It reads
required input clock frequencies from the devicetree and acts as clock provider
for all clock consumers of PS clocks.

## Required properties:

- #clock-cells : Must be 1
- compatible : "xlnx,ps7-clkc"
- reg : SLCR offset and size taken via syscon &lt; 0x100 0x100 &gt;
- ps-clk-frequency : Frequency of the oscillator providing ps\_clk in HZ
  (usually 33 MHz oscillators are used for Zynq platforms)
- clock-output-names : List of strings used to name the clock outputs. Shall be
  a list of the outputs given below.

## Optional properties:

- clocks : as described in the clock bindings
- clock-names : as described in the clock bindings
- fclk-enable : Bit mask to enable FCLKs statically at boot time.
  Bit \[0..3\] correspond to FCLK0..FCLK3. The corresponding
  FCLK will only be enabled if it is actually running at
  boot time.

## Clock inputs:

The following strings are optional parameters to the 'clock-names' property in
order to provide an optional (E)MIO clock source.

- swdt\_ext\_clk
- gem0\_emio\_clk
- gem1\_emio\_clk
- mio\_clk\_XX		# with XX = 00..53
  ...

## Clock outputs:

```text
 0:  armpll
 1:  ddrpll
 2:  iopll
 3:  cpu_6or4x
 4:  cpu_3or2x
 5:  cpu_2x
 6:  cpu_1x
 7:  ddr2x
 8:  ddr3x
 9:  dci
 10: lqspi
 11: smc
 12: pcap
 13: gem0
 14: gem1
 15: fclk0
 16: fclk1
 17: fclk2
 18: fclk3
 19: can0
 20: can1
 21: sdio0
 22: sdio1
 23: uart0
 24: uart1
 25: spi0
 26: spi1
 27: dma
 28: usb0_aper
 29: usb1_aper
 30: gem0_aper
 31: gem1_aper
 32: sdio0_aper
 33: sdio1_aper
 34: spi0_aper
 35: spi1_aper
 36: can0_aper
 37: can1_aper
 38: i2c0_aper
 39: i2c1_aper
 40: uart0_aper
 41: uart1_aper
 42: gpio_aper
 43: lqspi_aper
 44: smc_aper
 45: swdt
 46: dbg_trc
 47: dbg_apb
```

## Example:

```dts
	clkc: clkc@100 {
		#clock-cells = <1>;
		compatible = "xlnx,ps7-clkc";
		ps-clk-frequency = <33333333>;
		reg = <0x100 0x100>;
		clock-output-names = "armpll", "ddrpll", "iopll", "cpu_6or4x",
				"cpu_3or2x", "cpu_2x", "cpu_1x", "ddr2x", "ddr3x",
				"dci", "lqspi", "smc", "pcap", "gem0", "gem1",
				"fclk0", "fclk1", "fclk2", "fclk3", "can0", "can1",
				"sdio0", "sdio1", "uart0", "uart1", "spi0", "spi1",
				"dma", "usb0_aper", "usb1_aper", "gem0_aper",
				"gem1_aper", "sdio0_aper", "sdio1_aper",
				"spi0_aper", "spi1_aper", "can0_aper", "can1_aper",
				"i2c0_aper", "i2c1_aper", "uart0_aper", "uart1_aper",
				"gpio_aper", "lqspi_aper", "smc_aper", "swdt",
				"dbg_trc", "dbg_apb";
		# optional props
		clocks = <&clkc 16>, <&clk_foo>;
		clock-names = "gem1_emio_clk", "can_mio_clk_23";
	};
```

---

# Binding for a ST multiplexed clock driver.

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock/st_

> Device-tree binding reference for Binding for a ST multiplexed clock driver..

This binding supports only simple indexed multiplexers, it does not
support table based parent index to hardware value translations.

This binding uses the common clock binding\[1\].

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Required properties:

- compatible : shall be:
  "st,stih407-clkgen-a9-mux"

- #clock-cells : from common clock binding; shall be set to 0.

- reg : A Base address and length of the register set.

- clocks : from common clock binding

## Example:

```dts
	clk_m_a9: clk-m-a9@92b0000 {
		#clock-cells = <0>;
		compatible = "st,stih407-clkgen-a9-mux";
		reg = <0x92b0000 0x10000>;

		clocks = <&clockgen_a9_pll 0>,
			 <&clockgen_a9_pll 0>,
			 <&clk_s_c0_flexgen 13>,
			 <&clk_m_a9_ext2f_div2>;
	};
```

---

# Binding for a ST pll clock driver.

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock/st_

> Device-tree binding reference for Binding for a ST pll clock driver..

This binding uses the common clock binding\[1\].
Base address is located to the parent node. See clock binding\[2\]

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)
\[2\] [Documentation/devicetree/bindings/clock/st/st,clkgen.txt](</kernel/hardware/devicetree/bindings-clock-st/st-clkgen.md>)

## Required properties:

- compatible : shall be:
  "st,clkgen-pll0"
  "st,clkgen-pll0-a0"
  "st,clkgen-pll0-c0"
  "st,clkgen-pll1"
  "st,clkgen-pll1-c0"
  "st,stih407-clkgen-plla9"
  "st,stih418-clkgen-plla9"

- #clock-cells : From common clock binding; shall be set to 1.

- clocks : From common clock binding

- clock-output-names : From common clock binding.

## Example:

```dts
	clockgen-a9@92b0000 {
		compatible = "st,clkgen-c32";
		reg = <0x92b0000 0xffff>;

		clockgen_a9_pll: clockgen-a9-pll {
			#clock-cells = <1>;
			compatible = "st,stih407-clkgen-plla9";

			clocks = <&clk_sysin>;

			clock-output-names = "clockgen-a9-pll-odf";
		};
	};
```

---

# St,clkgen bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock/st_

> Device-tree binding reference for St,clkgen bindings.

Binding for a Clockgen hardware block found on
certain STMicroelectronics consumer electronics SoC devices.

A Clockgen node can contain pll, diviser or multiplexer nodes.

We will find only the base address of the Clockgen, this base
address is common of all subnode.

```dts
	clockgen_node {
		reg = <>;

		pll_node {
			...
		};

		quadfs_node {
			...
		};

		mux_node {
			...
		};

		flexgen_node {
			...
		};
		...
	};
```

This binding uses the common clock binding\[1\].
Each subnode should use the binding described in \[2\]..\[7\]

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)
\[3\] [Documentation/devicetree/bindings/clock/st/st,clkgen-mux.txt](</kernel/hardware/devicetree/bindings-clock-st/st-clkgen-mux.md>)
\[4\] [Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt](</kernel/hardware/devicetree/bindings-clock-st/st-clkgen-pll.md>)
\[7\] [Documentation/devicetree/bindings/clock/st/st,quadfs.txt](</kernel/hardware/devicetree/bindings-clock-st/st-quadfs.md>)
\[8\] [Documentation/devicetree/bindings/clock/st/st,flexgen.txt](</kernel/hardware/devicetree/bindings-clock-st/st-flexgen.md>)

## Required properties:

- reg : A Base address and length of the register set.

## Example:

```dts
	clockgen-a@90ff000 {
		compatible = "st,clkgen-c32";
		reg = <0x90ff000 0x1000>;

		clk_s_a0_pll: clk-s-a0-pll {
			#clock-cells = <1>;
			compatible = "st,clkgen-pll0";

			clocks = <&clk_sysin>;

			clock-output-names = "clk-s-a0-pll-ofd-0";
		};

		clk_s_a0_flexgen: clk-s-a0-flexgen {
			compatible = "st,flexgen";

			#clock-cells = <1>;

			clocks = <&clk_s_a0_pll 0>,
				 <&clk_sysin>;

			clock-output-names = "clk-ic-lmi0";
		};
	};
```

---

# St,flexgen bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock/st_

> Device-tree binding reference for St,flexgen bindings.

Binding for a type of flexgen structure found on certain
STMicroelectronics consumer electronics SoC devices

## This structure includes:

- a clock cross bar (represented by a mux element)
- a pre and final dividers (represented by a divider and gate elements)

Flexgen structure is a part of Clockgen\[1\].

## Please find an example below:

## Clockgen block diagram

```text
   |                     Flexgen structure                             |
   |                  ---------------------------------------------    |
   |                 |    -------       --------       --------    |   |
clk_sysin            |   |       |     |        |     |        |   |   |
---|-----------------|-->|       |     |        |     |        |   |   |
   | |               |   |       |     |        |     |        |   |   |
   | |   -------     |   |       |     |Pre     |     |Final   |   |   |
   | |  |PLL0   |    |   |       |     |Dividers|     |Dividers|   |   |
   | |->|       |    |   |       |     |  x32   |     |  x32   |   |   |
   | |  |  odf_0|----|-->|       |     |        |     |        |   |   |
   | |  |       |    |   |       |     |        |     |        |   |   |
   | |  |       |    |   |       |     |        |     |        |   |   |
   | |  |       |    |   |       |     |        |     |        |   |   |
   | |  |       |    |   |       |     |        |     |        |   |   |
   | |   -------     |   |       |     |        |     |        |   |   |
   | |               |   |       |     |        |     |        |   |   |
   | |   -------     |   | Clock |     |        |     |        |   |   |
   | |  |PLL1   |    |   |       |     |        |     |        |   |   |
   | |->|       |    |   | Cross |     |        |     |        |   |   |
   | |  |  odf_0|----|-->|       |     |        |     |        | CLK_DIV[31:0]
   | |  |       |    |   | Bar   |====>|        |====>|        |===|=========>
   | |  |       |    |   |       |     |        |     |        |   |   |
   | |  |       |    |   |       |     |        |     |        |   |   |
   | |  |       |    |   |       |     |        |     |        |   |   |
   | |   -------     |   |       |     |        |     |        |   |   |
   | |               |   |       |     |        |     |        |   |   |
   | |   -------     |   |       |     |        |     |        |   |   |
   | |  |QUADFS |    |   |       |     |        |     |        |   |   |
   | |->|    ch0|----|-->|       |     |        |     |        |   |   |
   |    |       |    |   |       |     |        |     |        |   |   |
   |    |    ch1|----|-->|       |     |        |     |        |   |   |
   |    |       |    |   |       |     |        |     |        |   |   |
   |    |    ch2|----|-->|       |     | DIV    |     | DIV    |   |   |
   |    |       |    |   |       |     |  1 to  |     |  1 to  |   |   |
   |    |    ch3|----|-->|       |     |   1024 |     |     64 |   |   |
   |     -------     |   |       |     |        |     |        |   |   |
   |                 |    -------       --------       --------    |   |
   |                   --------------------------------------------    |
```

## |                                                                   |

This binding uses the common clock binding\[2\].

\[1\] [Documentation/devicetree/bindings/clock/st/st,clkgen.txt](</kernel/hardware/devicetree/bindings-clock-st/st-clkgen.md>)
\[2\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Required properties:

- compatible : shall be:
  "st,flexgen"
  "st,flexgen-audio", "st,flexgen" (enable clock propagation on parent for
  audio use case)
  "st,flexgen-video", "st,flexgen" (enable clock propagation on parent
  and activate synchronous mode)
  "st,flexgen-stih410-a0"
  "st,flexgen-stih410-c0"
  "st,flexgen-stih418-c0"
  "st,flexgen-stih410-d0"
  "st,flexgen-stih407-d2"
  "st,flexgen-stih418-d2"
  "st,flexgen-stih407-d3"

- #clock-cells : from common clock binding; shall be set to 1 (multiple clock
  outputs).

- clocks : must be set to the parent's phandle. it could be output clocks of
  a quadsfs or/and a pll or/and clk\_sysin (up to 7 clocks)

- clock-output-names : List of strings used to name the clock outputs.

## Example:

```dts
	clk_s_c0_flexgen: clk-s-c0-flexgen {

		#clock-cells = <1>;
		compatible = "st,flexgen";

		clocks = <&clk_s_c0_pll0 0>,
			 <&clk_s_c0_pll1 0>,
			 <&clk_s_c0_quadfs 0>,
			 <&clk_s_c0_quadfs 1>,
			 <&clk_s_c0_quadfs 2>,
			 <&clk_s_c0_quadfs 3>,
			 <&clk_sysin>;

		clock-output-names = "clk-icn-gpu",
				     "clk-fdma",
				     "clk-nand",
				     "clk-hva",
				     "clk-proc-stfe",
				     "clk-proc-tp",
				     "clk-rx-icn-dmu",
				     "clk-rx-icn-hva",
				     "clk-icn-cpu",
				     "clk-tx-icn-dmu",
				     "clk-mmc-0",
				     "clk-mmc-1",
				     "clk-jpegdec",
				     "clk-ext2fa9",
				     "clk-ic-bdisp-0",
				     "clk-ic-bdisp-1",
				     "clk-pp-dmu",
				     "clk-vid-dmu",
				     "clk-dss-lpc",
				     "clk-st231-aud-0",
				     "clk-st231-gp-1",
				     "clk-st231-dmu",
				     "clk-icn-lmi",
				     "clk-tx-icn-disp-1",
				     "clk-icn-sbc",
				     "clk-stfe-frc2",
				     "clk-eth-phy",
				     "clk-eth-ref-phyclk",
				     "clk-flash-promip",
				     "clk-main-disp",
				     "clk-aux-disp",
				     "clk-compo-dvp";
	};
```

---

# St,quadfs bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock/st_

> Device-tree binding reference for St,quadfs bindings.

Binding for a type of quad channel digital frequency synthesizer found on
certain STMicroelectronics consumer electronics SoC devices.

This version contains a programmable PLL which can generate up to 216, 432
or 660MHz (from a 30MHz oscillator input) as the input to the digital
synthesizers.

This binding uses the common clock binding\[1\].

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Required properties:

- compatible : shall be:
  "st,quadfs"
  "st,quadfs-d0"
  "st,quadfs-d2"
  "st,quadfs-d3"
  "st,quadfs-pll"

- #clock-cells : from common clock binding; shall be set to 1.

- reg : A Base address and length of the register set.

- clocks : from common clock binding

- clock-output-names : From common clock binding. The block has 4
  clock outputs but not all of them in a specific instance
  have to be used in the SoC. If a clock name is left as
  an empty string then no clock will be created for the
  output associated with that string index. If fewer than
  4 strings are provided then no clocks will be created
  for the remaining outputs.

## Example:

```dts
	clk_s_c0_quadfs: clk-s-c0-quadfs@9103000 {
		#clock-cells = <1>;
		compatible = "st,quadfs-pll";
		reg = <0x9103000 0x1000>;

		clocks = <&clk_sysin>;

		clock-output-names = "clk-s-c0-fs0-ch0",
				     "clk-s-c0-fs0-ch1",
				     "clk-s-c0-fs0-ch2",
				     "clk-s-c0-fs0-ch3";
	};
```

---

# Binding for Texas Instruments ADPLL clock.

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock/ti_

> Device-tree binding reference for Binding for Texas Instruments ADPLL clock..

This binding uses the common clock binding\[1\]. It assumes a
register-mapped ADPLL with two to three selectable input clocks
and three to four children.

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Required properties:

- compatible : shall be one of "ti,dm814-adpll-s-clock" or
  "ti,dm814-adpll-lj-clock" depending on the type of the ADPLL
- #clock-cells : from common clock binding; shall be set to 1.
- clocks : link phandles of parent clocks clkinp and clkinpulow, note
  that the adpll-s-clock also has an optional clkinphif
- reg : address and length of the register set for controlling the ADPLL.

## Examples:

```dts
	adpll_mpu_ck: adpll@40 {
		#clock-cells = <1>;
		compatible = "ti,dm814-adpll-s-clock";
		reg = <0x40 0x40>;
		clocks = <&devosc_ck &devosc_ck &devosc_ck>;
		clock-names = "clkinp", "clkinpulow", "clkinphif";
		clock-output-names = "481c5040.adpll.dcoclkldo",
				     "481c5040.adpll.clkout",
				     "481c5040.adpll.clkoutx2",
				     "481c5040.adpll.clkouthif";
	};
```

```dts
	adpll_dsp_ck: adpll@80 {
		#clock-cells = <1>;
		compatible = "ti,dm814-adpll-lj-clock";
		reg = <0x80 0x30>;
		clocks = <&devosc_ck &devosc_ck>;
		clock-names = "clkinp", "clkinpulow";
		clock-output-names = "481c5080.adpll.dcoclkldo",
				     "481c5080.adpll.clkout",
				     "481c5080.adpll.clkoutldo";
	};
```

---

# Binding for Texas Instruments APLL clock.

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock/ti_

> Device-tree binding reference for Binding for Texas Instruments APLL clock..

This binding uses the common clock binding\[1\].  It assumes a
register-mapped APLL with usually two selectable input clocks
(reference clock and bypass clock), with analog phase locked
loop logic for multiplying the input clock to a desired output
clock. This clock also typically supports different operation
modes (locked, low power stop etc.) APLL mostly behaves like
a subtype of a DPLL \[2\], although a simplified one at that.

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)
\[2\] [Documentation/devicetree/bindings/clock/ti/dpll.txt](</kernel/hardware/devicetree/bindings-clock-ti/dpll.md>)

## Required properties:

- compatible : shall be "ti,dra7-apll-clock" or "ti,omap2-apll-clock"
- #clock-cells : from common clock binding; shall be set to 0.
- clocks : link phandles of parent clocks (clk-ref and clk-bypass)
- reg : address and length of the register set for controlling the APLL.
  It contains the information of registers in the following order:
  "control" - contains the control register offset
  "idlest" - contains the idlest register offset
  "autoidle" - contains the autoidle register offset (OMAP2 only)
- ti,clock-frequency : static clock frequency for the clock (OMAP2 only)
- ti,idlest-shift : bit-shift for the idlest field (OMAP2 only)
- ti,bit-shift : bit-shift for enable and autoidle fields (OMAP2 only)

## Examples:

```dts
	apll_pcie_ck: apll_pcie_ck {
		#clock-cells = <0>;
		clocks = <&apll_pcie_in_clk_mux>, <&dpll_pcie_ref_ck>;
		reg = <0x021c>, <0x0220>;
		compatible = "ti,dra7-apll-clock";
	};
```

```dts
	apll96_ck: apll96_ck {
		#clock-cells = <0>;
		compatible = "ti,omap2-apll-clock";
		clocks = <&sys_ck>;
		ti,bit-shift = <2>;
		ti,idlest-shift = <8>;
		ti,clock-frequency = <96000000>;
		reg = <0x0500>, <0x0530>, <0x0520>;
	};
```

---

# Binding for Texas Instruments clockdomain.

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock/ti_

> Device-tree binding reference for Binding for Texas Instruments clockdomain..

This binding uses the common clock binding\[1\] in consumer role.
Every clock on TI SoC belongs to one clockdomain, but software
only needs this information for specific clocks which require
their parent clockdomain to be controlled when the clock is
enabled/disabled. This binding doesn't define a new clock
binding type, it is used to group existing clock nodes under
hardware hierarchy.

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Required properties:

- compatible : shall be "ti,clockdomain"
- #clock-cells : from common clock binding; shall be set to 0.
- clocks : link phandles of clocks within this domain

## Optional properties:

- clock-output-names : from common clock binding.

## Examples:

```dts
	dss_clkdm: dss_clkdm {
		compatible = "ti,clockdomain";
		clocks = <&dss1_alwon_fck_3430es2>, <&dss_ick_3430es2>;
	};
```

---

# Binding for Texas Instruments DPLL clock.

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock/ti_

> Device-tree binding reference for Binding for Texas Instruments DPLL clock..

This binding uses the common clock binding\[1\].  It assumes a
register-mapped DPLL with usually two selectable input clocks
(reference clock and bypass clock), with digital phase locked
loop logic for multiplying the input clock to a desired output
clock. This clock also typically supports different operation
modes (locked, low power stop etc.) This binding has several
sub-types, which effectively result in slightly different setup
for the actual DPLL clock.

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Required properties:

- compatible : shall be one of:
  "ti,omap3-dpll-clock",
  "ti,omap3-dpll-core-clock",
  "ti,omap3-dpll-per-clock",
  "ti,omap3-dpll-per-j-type-clock",
  "ti,omap4-dpll-clock",
  "ti,omap4-dpll-x2-clock",
  "ti,omap4-dpll-core-clock",
  "ti,omap4-dpll-m4xen-clock",
  "ti,omap4-dpll-j-type-clock",
  "ti,omap5-mpu-dpll-clock",
  "ti,am3-dpll-no-gate-clock",
  "ti,am3-dpll-j-type-clock",
  "ti,am3-dpll-no-gate-j-type-clock",
  "ti,am3-dpll-clock",
  "ti,am3-dpll-core-clock",
  "ti,am3-dpll-x2-clock",
  "ti,omap2-dpll-core-clock",

- #clock-cells : from common clock binding; shall be set to 0.
- clocks : link phandles of parent clocks, first entry lists reference clock
  and second entry bypass clock
- reg : offsets for the register set for controlling the DPLL.
  Registers are listed in following order:
  "control" - contains the control register base address
  "idlest" - contains the idle status register base address
  "mult-div1" - contains the multiplier / divider register base address
  "autoidle" - contains the autoidle register base address (optional)
  "ssc-deltam" - DPLL supports spread spectrum clocking (SSC), contains
  the frequency spreading register base address (optional)
  "ssc-modfreq" - DPLL supports spread spectrum clocking (SSC), contains
  the modulation frequency register base address
  (optional)
  ti,am3-\* dpll types do not have autoidle register
  ti,omap2-\* dpll type does not support idlest / autoidle registers

## Optional properties:

```text
- DPLL mode setting - defining any one or more of the following overrides
  default setting.
	- ti,low-power-stop : DPLL supports low power stop mode, gating output
	- ti,low-power-bypass : DPLL output matches rate of parent bypass clock
	- ti,lock : DPLL locks in programmed rate
	- ti,min-div : the minimum divisor to start from to round the DPLL
		       target rate
	- ti,ssc-deltam : DPLL supports spread spectrum clocking, frequency
			  spreading in permille (10th of a percent)
	- ti,ssc-modfreq-hz : DPLL supports spread spectrum clocking, spread
			      spectrum modulation frequency
	- ti,ssc-downspread : DPLL supports spread spectrum clocking, boolean
			      to enable the downspread feature
```

## Examples:

```dts
	dpll_core_ck: dpll_core_ck@44e00490 {
		#clock-cells = <0>;
		compatible = "ti,omap4-dpll-core-clock";
		clocks = <&sys_clkin_ck>, <&sys_clkin_ck>;
		reg = <0x490>, <0x45c>, <0x488>, <0x468>;
	};
```

```dts
	dpll2_ck: dpll2_ck@48004004 {
		#clock-cells = <0>;
		compatible = "ti,omap3-dpll-clock";
		clocks = <&sys_ck>, <&dpll2_fck>;
		ti,low-power-stop;
		ti,low-power-bypass;
		ti,lock;
		reg = <0x4>, <0x24>, <0x34>, <0x40>;
	};
```

```dts
	dpll_core_ck: dpll_core_ck@44e00490 {
		#clock-cells = <0>;
		compatible = "ti,am3-dpll-core-clock";
		clocks = <&sys_clkin_ck>, <&sys_clkin_ck>;
		reg = <0x90>, <0x5c>, <0x68>;
	};
```

```dts
	dpll_ck: dpll_ck {
		#clock-cells = <0>;
		compatible = "ti,omap2-dpll-core-clock";
		clocks = <&sys_ck>, <&sys_ck>;
		reg = <0x0500>, <0x0540>;
	};
```

```dts
	dpll_disp_ck: dpll_disp_ck {
		#clock-cells = <0>;
		compatible = "ti,am3-dpll-no-gate-clock";
		clocks = <&sys_clkin_ck>, <&sys_clkin_ck>;
		reg = <0x0498>, <0x0448>, <0x0454>, <0x044c>, <0x0450>;
	};
```

---

# Device Tree Clock bindings for ATL (Audio Tracking Logic) of DRA7 SoC.

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock/ti_

> Device-tree binding reference for Device Tree Clock bindings for ATL (Audio Tracking Logic) of DRA7 SoC..

The ATL IP is used to generate clock to be used to synchronize baseband and
audio codec. A single ATL IP provides four ATL clock instances sharing the same
functional clock but can be configured to provide different clocks.
ATL can maintain a clock averages to some desired frequency based on the bws/aws
signals - can compensate the drift between the two ws signal.

In order to provide the support for ATL and its output clocks (which can be used
internally within the SoC or external components) two sets of bindings is needed:

## Clock tree binding:

This binding uses the common clock binding\[1\].
To be able to integrate the ATL clocks with DT clock tree.
Provides ccf level representation of the ATL clocks to be used by drivers.
Since the clock instances are part of a single IP this binding is used as a node
for the DT clock tree, the IP driver is needed to handle the actual configuration
of the IP.

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Required properties:

- compatible : shall be "ti,dra7-atl-clock"
- #clock-cells : from common clock binding; shall be set to 0.
- clocks : link phandles to functional clock of ATL

## Binding for the IP driver:

This binding is used to configure the IP driver which is going to handle the
configuration of the IP for the ATL clock instances.

## Required properties:

- compatible : shall be "ti,dra7-atl"
- reg : base address for the ATL IP
- ti,provided-clocks : List of phandles to the clocks associated with the ATL
- clocks : link phandles to functional clock of ATL
- clock-names : Shall be set to "fck"
- ti,hwmods : Shall be set to "atl"

## Optional properties:

Configuration of ATL instances:

```dts
- atl{0/1/2/3} {
	- bws : Baseband word select signal selection
	- aws : Audio word select signal selection
};
```

For valid word select signals, see the dt-bindings/clock/ti-dra7-atl.h include
file.

## Examples:

/\* clock bindings for atl provided clocks \*/

```dts
atl_clkin0_ck: atl_clkin0_ck {
	#clock-cells = <0>;
	compatible = "ti,dra7-atl-clock";
	clocks = <&atl_gfclk_mux>;
};
```

```dts
atl_clkin1_ck: atl_clkin1_ck {
	#clock-cells = <0>;
	compatible = "ti,dra7-atl-clock";
	clocks = <&atl_gfclk_mux>;
};
```

```dts
atl_clkin2_ck: atl_clkin2_ck {
	#clock-cells = <0>;
	compatible = "ti,dra7-atl-clock";
	clocks = <&atl_gfclk_mux>;
};
```

```dts
atl_clkin3_ck: atl_clkin3_ck {
	#clock-cells = <0>;
	compatible = "ti,dra7-atl-clock";
	clocks = <&atl_gfclk_mux>;
};
```

/\* binding for the IP \*/

```dts
atl: atl@4843c000 {
	compatible = "ti,dra7-atl";
	reg = <0x4843c000 0x3ff>;
	ti,hwmods = "atl";
	ti,provided-clocks = <&atl_clkin0_ck>, <&atl_clkin1_ck>,
				<&atl_clkin2_ck>, <&atl_clkin3_ck>;
	clocks = <&atl_gfclk_mux>;
	clock-names = "fck";
};
```

```dts
#include <dt-bindings/clock/ti-dra7-atl.h>
```

```dts
&atl {

	atl2 {
		bws = <DRA7_ATL_WS_MCASP2_FSX>;
		aws = <DRA7_ATL_WS_MCASP3_FSX>;
	};
};
```

---

# Binding for Texas Instruments FAPLL clock.

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock/ti_

> Device-tree binding reference for Binding for Texas Instruments FAPLL clock..

This binding uses the common clock binding\[1\]. It assumes a
register-mapped FAPLL with usually two selectable input clocks
(reference clock and bypass clock), and one or more child
syntesizers.

\[1\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Required properties:

- compatible : shall be "ti,dm816-fapll-clock"
- #clock-cells : from common clock binding; shall be set to 0.
- clocks : link phandles of parent clocks (clk-ref and clk-bypass)
- reg : address and length of the register set for controlling the FAPLL.

## Examples:

```dts
	main_fapll: main_fapll {
		#clock-cells = <1>;
		compatible = "ti,dm816-fapll-clock";
		reg = <0x400 0x40>;
		clocks = <&sys_clkin_ck &sys_clkin_ck>;
		clock-indices = <1>, <2>, <3>, <4>, <5>,
				<6>, <7>;
		clock-output-names = "main_pll_clk1",
				     "main_pll_clk2",
				     "main_pll_clk3",
				     "main_pll_clk4",
				     "main_pll_clk5",
				     "main_pll_clk6",
				     "main_pll_clk7";
	};
```

---

# Binding for TI DA8XX/OMAP-L13X/AM17XX/AM18XX CFGCHIP clocks

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock/ti/davinci_

> Device-tree binding reference for Binding for TI DA8XX/OMAP-L13X/AM17XX/AM18XX CFGCHIP clocks.

TI DA8XX/OMAP-L13X/AM17XX/AM18XX SoCs contain a general purpose set of
registers call CFGCHIPn. Some of these registers function as clock
gates. This document describes the bindings for those clocks.

All of the clock nodes described below must be child nodes of a CFGCHIP node
(compatible = "ti,da830-cfgchip").

## USB PHY clocks

Required properties:

- compatible: shall be "ti,da830-usb-phy-clocks".
- #clock-cells: from common clock binding; shall be set to 1.
- clocks: phandles to the parent clocks corresponding to clock-names
- clock-names: shall be "fck", "usb\_refclkin", "auxclk"

This node provides two clocks. The clock at index 0 is the USB 2.0 PHY 48MHz
clock and the clock at index 1 is the USB 1.1 PHY 48MHz clock.

## eHRPWM Time Base Clock (TBCLK)

Required properties:

- compatible: shall be "ti,da830-tbclksync".
- #clock-cells: from common clock binding; shall be set to 0.
- clocks: phandle to the parent clock
- clock-names: shall be "fck"

## PLL DIV4.5 divider

Required properties:

- compatible: shall be "ti,da830-div4p5ena".
- #clock-cells: from common clock binding; shall be set to 0.
- clocks: phandle to the parent clock
- clock-names: shall be "pll0\_pllout"

## EMIFA clock source (ASYNC1)

Required properties:

- compatible: shall be "ti,da850-async1-clksrc".
- #clock-cells: from common clock binding; shall be set to 0.
- clocks: phandles to the parent clocks corresponding to clock-names
- clock-names: shall be "pll0\_sysclk3", "div4.5"

## ASYNC3 clock source

Required properties:

- compatible: shall be "ti,da850-async3-clksrc".
- #clock-cells: from common clock binding; shall be set to 0.
- clocks: phandles to the parent clocks corresponding to clock-names
- clock-names: shall be "pll0\_sysclk2", "pll1\_sysclk2"

## Examples:

```dts
	cfgchip: syscon@1417c {
		compatible = "ti,da830-cfgchip", "syscon", "simple-mfd";
		reg = <0x1417c 0x14>;

		usb_phy_clk: usb-phy-clocks {
			compatible = "ti,da830-usb-phy-clocks";
			#clock-cells = <1>;
			clocks = <&psc1 1>, <&usb_refclkin>, <&pll0_auxclk>;
			clock-names = "fck", "usb_refclkin", "auxclk";
		};
		ehrpwm_tbclk: ehrpwm_tbclk {
			compatible = "ti,da830-tbclksync";
			#clock-cells = <0>;
			clocks = <&psc1 17>;
			clock-names = "fck";
		};
		div4p5_clk: div4.5 {
			compatible = "ti,da830-div4p5ena";
			#clock-cells = <0>;
			clocks = <&pll0_pllout>;
			clock-names = "pll0_pllout";
		};
		async1_clk: async1 {
			compatible = "ti,da850-async1-clksrc";
			#clock-cells = <0>;
			clocks = <&pll0_sysclk 3>, <&div4p5_clk>;
			clock-names = "pll0_sysclk3", "div4.5";
		};
		async3_clk: async3 {
			compatible = "ti,da850-async3-clksrc";
			#clock-cells = <0>;
			clocks = <&pll0_sysclk 2>, <&pll1_sysclk 2>;
			clock-names = "pll0_sysclk2", "pll1_sysclk2";
		};
	};
```

## Also see:

- [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

---

# Binding for TI DaVinci PLL Controllers

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock/ti/davinci_

> Device-tree binding reference for Binding for TI DaVinci PLL Controllers.

The PLL provides clocks to most of the components on the SoC. In addition
to the PLL itself, this controller also contains bypasses, gates, dividers,
an multiplexers for various clock signals.

## Required properties:

```text
- compatible: shall be one of:
	- "ti,da850-pll0" for PLL0 on DA850/OMAP-L138/AM18XX
	- "ti,da850-pll1" for PLL1 on DA850/OMAP-L138/AM18XX
- reg: physical base address and size of the controller's register area.
- clocks: phandles corresponding to the clock names
- clock-names: names of the clock sources - depends on compatible string
	- for "ti,da850-pll0", shall be "clksrc", "extclksrc"
	- for "ti,da850-pll1", shall be "clksrc"
```

## Optional properties:

- ti,clkmode-square-wave: Indicates that the board is supplying a square
  wave input on the OSCIN pin instead of using a crystal oscillator.
  This property is only valid when compatible = "ti,da850-pll0".

## Optional child nodes:

pllout

```text
	Describes the main PLL clock output (before POSTDIV). The node name must
	be "pllout".
```

## Required properties:

- #clock-cells: shall be 0

sysclk

```text
	Describes the PLLDIVn divider clocks that provide the SYSCLKn clock
	domains. The node name must be "sysclk". Consumers of this node should
	use "n" in "SYSCLKn" as the index parameter for the clock cell.
```

## Required properties:

- #clock-cells: shall be 1

auxclk

```text
	Describes the AUXCLK output of the PLL. The node name must be "auxclk".
	This child node is only valid when compatible = "ti,da850-pll0".
```

## Required properties:

- #clock-cells: shall be 0

obsclk

```text
	Describes the OBSCLK output of the PLL. The node name must be "obsclk".
```

## Required properties:

- #clock-cells: shall be 0

## Examples:

```dts
	pll0: clock-controller@11000 {
		compatible = "ti,da850-pll0";
		reg = <0x11000 0x1000>;
		clocks = <&ref_clk>, <&pll1_sysclk 3>;
		clock-names = "clksrc", "extclksrc";
		ti,clkmode-square-wave;

		pll0_pllout: pllout {
			#clock-cells = <0>;
		};

		pll0_sysclk: sysclk {
			#clock-cells = <1>;
		};

		pll0_auxclk: auxclk {
			#clock-cells = <0>;
		};

		pll0_obsclk: obsclk {
			#clock-cells = <0>;
		};
	};
```

```dts
	pll1: clock-controller@21a000 {
		compatible = "ti,da850-pll1";
		reg = <0x21a000 0x1000>;
		clocks = <&ref_clk>;
		clock-names = "clksrc";

		pll0_sysclk: sysclk {
			#clock-cells = <1>;
		};

		pll0_obsclk: obsclk {
			#clock-cells = <0>;
		};
	};
```

## Also see:

- [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

---

# Binding for TI DaVinci Power Sleep Controller (PSC)

_Peios Kernel / Hardware and drivers / Device tree / bindings/clock/ti/davinci_

> Device-tree binding reference for Binding for TI DaVinci Power Sleep Controller (PSC).

The PSC provides power management, clock gating and reset functionality. It is
primarily used for clocking.

## Required properties:

```text
- compatible: shall be one of:
	- "ti,da850-psc0" for PSC0 on DA850/OMAP-L138/AM18XX
	- "ti,da850-psc1" for PSC1 on DA850/OMAP-L138/AM18XX
- reg: physical base address and size of the controller's register area
- #clock-cells: from common clock binding; shall be set to 1
- #power-domain-cells: from generic power domain binding; shall be set to 1.
- clocks: phandles to clocks corresponding to the clock-names property
- clock-names: list of parent clock names - depends on compatible value
	- for "ti,da850-psc0", shall be "pll0_sysclk1", "pll0_sysclk2",
	  "pll0_sysclk4", "pll0_sysclk6", "async1"
	- for "ti,da850-psc1", shall be "pll0_sysclk2", "pll0_sysclk4", "async3"
```

## Optional properties:

- #reset-cells: from reset binding; shall be set to 1 - only applicable when
  at least one local domain provides a local reset.

## Consumers:

```text
	Clock, power domain and reset consumers shall use the local power domain
	module ID (LPSC) as the index corresponding to the clock cell. Refer to
	the device-specific datasheet to find these numbers. NB: Most local
	domains	only provide a clock/power domain and not a reset.
```

## Examples:

```dts
	psc0: clock-controller@10000 {
		compatible = "ti,da850-psc0";
		reg = <0x10000 0x1000>;
		#clock-cells = <1>;
		#power-domain-cells = <1>;
		#reset-cells = <1>;
		clocks = <&pll0_sysclk 1>, <&pll0_sysclk 2>,
			 <&pll0_sysclk 4>, <&pll0_sysclk 6>, <&async1_clk>;
		clock_names = "pll0_sysclk1", "pll0_sysclk2",
			      "pll0_sysclk4", "pll0_sysclk6", "async1";
	};
	psc1: clock-controller@227000 {
		compatible = "ti,da850-psc1";
		reg = <0x227000 0x1000>;
		#clock-cells = <1>;
		#power-domain-cells = <1>;
		clocks = <&pll0_sysclk 2>, <&pll0_sysclk 4>, <&async3_clk>;
		clock_names = "pll0_sysclk2", "pll0_sysclk4", "async3";
	};
```

```text
	/* consumer */
	dsp: dsp@11800000 {
		compatible = "ti,da850-dsp";
		reg = <0x11800000 0x40000>,
		      <0x11e00000 0x8000>,
		      <0x11f00000 0x8000>,
		      <0x01c14044 0x4>,
		      <0x01c14174 0x8>;
		reg-names = "l2sram", "l1pram", "l1dram", "host1cfg", "chipsig";
		interrupt-parent = <&intc>;
		interrupts = <28>;
		clocks = <&psc0 15>;
		power-domains = <&psc0 15>;
		resets = <&psc0 15>;
	};
```

## Also see:

- [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)
- [Documentation/devicetree/bindings/power/power-domain.yaml](</kernel/hardware/devicetree-bindings/dt-power/power-domain.md>)
- [Documentation/devicetree/bindings/reset/reset.txt](</kernel/hardware/devicetree/bindings-reset/reset.md>)

---

# CPU capacity bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/cpu_

> Device-tree binding reference for CPU capacity bindings.

---

---

## 1 - Introduction

Some systems may be configured to have cpus with different power/performance
characteristics within the same chip. In this case, additional information has
to be made available to the kernel for it to be aware of such differences and
take decisions accordingly.

---

## 2 - CPU capacity definition

CPU capacity is a number that provides the scheduler information about CPUs
heterogeneity. Such heterogeneity can come from micro-architectural differences
(e.g., ARM big.LITTLE systems) or maximum frequency at which CPUs can run
(e.g., SMP systems with multiple frequency domains). Heterogeneity in this
context is about differing performance characteristics; this binding tries to
capture a first-order approximation of the relative performance of CPUs.

CPU capacities are obtained by running a suitable benchmark. This binding makes
no guarantees on the validity or suitability of any particular benchmark, the
final capacity should, however, be:

- A "single-threaded" or CPU affine benchmark
- Divided by the running frequency of the CPU executing the benchmark
- Not subject to dynamic frequency scaling of the CPU

For the time being we however advise usage of the Dhrystone benchmark. What
above thus becomes:

CPU capacities are obtained by running the Dhrystone benchmark on each CPU at
max frequency (with caches enabled). The obtained DMIPS score is then divided
by the frequency (in MHz) at which the benchmark has been run, so that
DMIPS/MHz are obtained.  Such values are then normalized w.r.t. the highest
score obtained in the system.

---

## 3 - capacity-dmips-mhz

capacity-dmips-mhz is an optional cpu node \[1\] property: u32 value
representing CPU capacity expressed in normalized DMIPS/MHz. At boot time, the
maximum frequency available to the cpu is then used to calculate the capacity
value internally used by the kernel.

capacity-dmips-mhz property is all-or-nothing: if it is specified for a cpu
node, it has to be specified for every other cpu nodes, or the system will
fall back to the default capacity value for every CPU. If cpufreq is not
available, final capacities are calculated by directly using capacity-dmips-
mhz values (normalized w.r.t. the highest value found while parsing the DT).

---

## 4 - Examples

## Example 1 (ARM 64-bit, 6-cpu system, two clusters):

The capacities-dmips-mhz or DMIPS/MHz values (scaled to 1024)
are 1024 and 578 for cluster0 and cluster1. Further normalization
is done by the operating system based on cluster0@max-freq=1100 and
cluster1@max-freq=850, final capacities are 1024 for cluster0 and
446 for cluster1 (578\*850/1100).

```dts
cpus {
	#address-cells = <2>;
	#size-cells = <0>;

	cpu-map {
		cluster0 {
			core0 {
				cpu = <&A57_0>;
			};
			core1 {
				cpu = <&A57_1>;
			};
		};

		cluster1 {
			core0 {
				cpu = <&A53_0>;
			};
			core1 {
				cpu = <&A53_1>;
			};
			core2 {
				cpu = <&A53_2>;
			};
			core3 {
				cpu = <&A53_3>;
			};
		};
	};

	idle-states {
		entry-method = "psci";

		CPU_SLEEP_0: cpu-sleep-0 {
			compatible = "arm,idle-state";
			arm,psci-suspend-param = <0x0010000>;
			local-timer-stop;
			entry-latency-us = <100>;
			exit-latency-us = <250>;
			min-residency-us = <150>;
		};

		CLUSTER_SLEEP_0: cluster-sleep-0 {
			compatible = "arm,idle-state";
			arm,psci-suspend-param = <0x1010000>;
			local-timer-stop;
			entry-latency-us = <800>;
			exit-latency-us = <700>;
			min-residency-us = <2500>;
		};
	};

	A57_0: cpu@0 {
		compatible = "arm,cortex-a57";
		reg = <0x0 0x0>;
		device_type = "cpu";
		enable-method = "psci";
		next-level-cache = <&A57_L2>;
		clocks = <&scpi_dvfs 0>;
		cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
		capacity-dmips-mhz = <1024>;
	};

	A57_1: cpu@1 {
		compatible = "arm,cortex-a57";
		reg = <0x0 0x1>;
		device_type = "cpu";
		enable-method = "psci";
		next-level-cache = <&A57_L2>;
		clocks = <&scpi_dvfs 0>;
		cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
		capacity-dmips-mhz = <1024>;
	};

	A53_0: cpu@100 {
		compatible = "arm,cortex-a53";
		reg = <0x0 0x100>;
		device_type = "cpu";
		enable-method = "psci";
		next-level-cache = <&A53_L2>;
		clocks = <&scpi_dvfs 1>;
		cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
		capacity-dmips-mhz = <578>;
	};

	A53_1: cpu@101 {
		compatible = "arm,cortex-a53";
		reg = <0x0 0x101>;
		device_type = "cpu";
		enable-method = "psci";
		next-level-cache = <&A53_L2>;
		clocks = <&scpi_dvfs 1>;
		cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
		capacity-dmips-mhz = <578>;
	};

	A53_2: cpu@102 {
		compatible = "arm,cortex-a53";
		reg = <0x0 0x102>;
		device_type = "cpu";
		enable-method = "psci";
		next-level-cache = <&A53_L2>;
		clocks = <&scpi_dvfs 1>;
		cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
		capacity-dmips-mhz = <578>;
	};

	A53_3: cpu@103 {
		compatible = "arm,cortex-a53";
		reg = <0x0 0x103>;
		device_type = "cpu";
		enable-method = "psci";
		next-level-cache = <&A53_L2>;
		clocks = <&scpi_dvfs 1>;
		cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
		capacity-dmips-mhz = <578>;
	};

	A57_L2: l2-cache0 {
		compatible = "cache";
	};

	A53_L2: l2-cache1 {
		compatible = "cache";
	};
};
```

Example 2 (ARM 32-bit, 4-cpu system, two clusters,

```text
	   cpus 0,1@1GHz, cpus 2,3@500MHz):
```

capacities-dmips-mhz are scaled w.r.t. 2 (cpu@0 and cpu@1), this means that first
cpu@0 and cpu@1 are twice fast than cpu@2 and cpu@3 (at the same frequency)

```dts
cpus {
	#address-cells = <1>;
	#size-cells = <0>;

	cpu0: cpu@0 {
		device_type = "cpu";
		compatible = "arm,cortex-a15";
		reg = <0>;
		capacity-dmips-mhz = <2>;
	};

	cpu1: cpu@1 {
		device_type = "cpu";
		compatible = "arm,cortex-a15";
		reg = <1>;
		capacity-dmips-mhz = <2>;
	};

	cpu2: cpu@2 {
		device_type = "cpu";
		compatible = "arm,cortex-a15";
		reg = <0x100>;
		capacity-dmips-mhz = <1>;
	};

	cpu3: cpu@3 {
		device_type = "cpu";
		compatible = "arm,cortex-a15";
		reg = <0x101>;
		capacity-dmips-mhz = <1>;
	};
};
```

---

## 5 - References

\[1\] ARM Linux Kernel documentation - CPUs bindings

```text
    Documentation/devicetree/bindings/arm/cpus.yaml
```

---

# Broadcom AVS mail box and interrupt register bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/cpufreq_

> Device-tree binding reference for Broadcom AVS mail box and interrupt register bindings.

A total of three DT nodes are required. One node (brcm,avs-cpu-data-mem)
references the mailbox register used to communicate with the AVS CPU\[1\]. The
second node (brcm,avs-cpu-l2-intr) is required to trigger an interrupt on
the AVS CPU. The interrupt tells the AVS CPU that it needs to process a
command sent to it by a driver. Interrupting the AVS CPU is mandatory for
commands to be processed.

The interface also requires a reference to the AVS host interrupt controller,
so a driver can react to interrupts generated by the AVS CPU whenever a command
has been processed. See \[2\] for more information on the brcm,l2-intc node.

\[1\] The AVS CPU is an independent co-processor that runs proprietary
firmware. On some SoCs, this firmware supports DFS and DVFS in addition to
Adaptive Voltage Scaling.

\[2\] [Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.yaml](</kernel/hardware/devicetree-bindings/dt-interrupt-controller/brcm-l2-intc.md>)

## Node brcm,avs-cpu-data-mem

## Required properties:

- compatible: must include: brcm,avs-cpu-data-mem and
  should include: one of brcm,bcm7271-avs-cpu-data-mem or
  brcm,bcm7268-avs-cpu-data-mem
- reg: Specifies base physical address and size of the registers.
- interrupts: The interrupt that the AVS CPU will use to interrupt the host
  when a command completed.
- interrupt-names: The name of the interrupt used to interrupt the host.

## Optional properties:

- None

## Node brcm,avs-cpu-l2-intr

## Required properties:

- compatible: must include: brcm,avs-cpu-l2-intr and
  should include: one of brcm,bcm7271-avs-cpu-l2-intr or
  brcm,bcm7268-avs-cpu-l2-intr
- reg: Specifies base physical address and size of the registers.

## Optional properties:

- None

## Example

```dts
	avs_host_l2_intc: interrupt-controller@f04d1200 {
		#interrupt-cells = <1>;
		compatible = "brcm,l2-intc";
		interrupt-parent = <&intc>;
		reg = <0xf04d1200 0x48>;
		interrupt-controller;
		interrupts = <0x0 0x19 0x0>;
		interrupt-names = "avs";
	};
```

```dts
	avs-cpu-data-mem@f04c4000 {
		compatible = "brcm,bcm7271-avs-cpu-data-mem",
				"brcm,avs-cpu-data-mem";
		reg = <0xf04c4000 0x60>;
		interrupts = <0x1a>;
		interrupt-parent = <&avs_host_l2_intc>;
		interrupt-names = "sw_intr";
	};
```

```dts
	avs-cpu-l2-intr@f04d1100 {
		compatible = "brcm,bcm7271-avs-cpu-l2-intr",
				"brcm,avs-cpu-l2-intr";
		reg = <0xf04d1100 0x10>;
	};
```

---

# SPEAr cpufreq driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/cpufreq_

> Device-tree binding reference for SPEAr cpufreq driver.

SPEAr SoC cpufreq driver for CPU frequency scaling.
It supports both uniprocessor (UP) and symmetric multiprocessor (SMP) systems
which share clock across all CPUs.

## Required properties:

- cpufreq\_tbl: Table of frequencies CPU could be transitioned into, in the
  increasing order.

## Optional properties:

- clock-latency: Specify the possible maximum transition latency for clock, in
  unit of nanoseconds.

Both required and optional properties listed above must be defined under node
/cpus/cpu@0.

## Examples:

```dts
cpus {

	<...>

	cpu@0 {
		compatible = "arm,cortex-a9";
		reg = <0>;

		<...>

		cpufreq_tbl = < 166000
				200000
				250000
				300000
				400000
				500000
				600000 >;
	};

	<...>

};
```

---

# Binding for ST's CPUFreq driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/cpufreq_

> Device-tree binding reference for Binding for ST's CPUFreq driver.

ST's CPUFreq driver attempts to read 'process' and 'version' attributes
from the SoC, then supplies the OPP framework with 'prop' and 'supported
hardware' information respectively.  The framework is then able to read
the DT and operate in the usual way.

## Frequency Scaling only

No vendor specific driver required for this.

## Located in CPU's node:

- operating-points		: \[See: ../power/opp-v1.yaml\]

## Example \[safe\]

```dts
cpus {
	cpu@0 {
				 /* kHz     uV   */
		operating-points = <1500000 0
				    1200000 0
				    800000  0
				    500000  0>;
	};
};
```

## Dynamic Voltage and Frequency Scaling (DVFS)

This requires the ST CPUFreq driver to supply 'process' and 'version' info.

## Located in CPU's node:

- operating-points-v2		: \[See ../power/opp-v2.yaml\]

## Example \[unsafe\]

```dts
cpus {
	cpu@0 {
		operating-points-v2	= <&cpu0_opp_table>;
	};
};
```

```dts
cpu0_opp_table: opp_table {
	compatible = "operating-points-v2";

	/* ############################################################### */
	/* # WARNING: Do not attempt to copy/replicate these nodes,      # */
	/* #          they are only to be supplied by the bootloader !!! # */
	/* ############################################################### */
	opp0 {
		/*			   Major       Minor       Substrate */
		/*			   2           all         all       */
		opp-supported-hw	= <0x00000004  0xffffffff  0xffffffff>;
		opp-hz			= /bits/ 64 <1500000000>;
		clock-latency-ns	= <10000000>;

		opp-microvolt-pcode0	= <1200000>;
		opp-microvolt-pcode1	= <1200000>;
		opp-microvolt-pcode2	= <1200000>;
		opp-microvolt-pcode3	= <1200000>;
		opp-microvolt-pcode4	= <1170000>;
		opp-microvolt-pcode5	= <1140000>;
		opp-microvolt-pcode6	= <1100000>;
		opp-microvolt-pcode7	= <1070000>;
	};

	opp1 {
		/*			   Major       Minor       Substrate */
		/*			   all         all         all       */
		opp-supported-hw	= <0xffffffff  0xffffffff  0xffffffff>;
		opp-hz			= /bits/ 64 <1200000000>;
		clock-latency-ns	= <10000000>;

		opp-microvolt-pcode0	= <1110000>;
		opp-microvolt-pcode1	= <1150000>;
		opp-microvolt-pcode2	= <1100000>;
		opp-microvolt-pcode3	= <1080000>;
		opp-microvolt-pcode4	= <1040000>;
		opp-microvolt-pcode5	= <1020000>;
		opp-microvolt-pcode6	= <980000>;
		opp-microvolt-pcode7	= <930000>;
	};
};
```

---

# i.MX CPUFreq-DT OPP bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/cpufreq_

> Device-tree binding reference for i.MX CPUFreq-DT OPP bindings.

Certain i.MX SoCs support different OPPs depending on the "market segment" and
"speed grading" value which are written in fuses. These bits are combined with
the opp-supported-hw values for each OPP to check if the OPP is allowed.

## Required properties:

## For each opp entry in 'operating-points-v2' table:

```text
- opp-supported-hw: Two bitmaps indicating:
  - Supported speed grade mask
  - Supported market segment mask
    0: Consumer
    1: Extended Consumer
    2: Industrial
    3: Automotive
```

## Example:

```dts
opp_table {
	compatible = "operating-points-v2";
	opp-1000000000 {
		opp-hz = /bits/ 64 <1000000000>;
		/* grade >= 0, consumer only */
		opp-supported-hw = <0xf>, <0x3>;
	};

	opp-1300000000 {
		opp-hz = /bits/ 64 <1300000000>;
		opp-microvolt = <1000000>;
		/* grade >= 1, all segments */
		opp-supported-hw = <0xe>, <0x7>;
	};
}
```

---

# Tegra124 CPU frequency scaling driver bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/cpufreq_

> Device-tree binding reference for Tegra124 CPU frequency scaling driver bindings.

Both required and optional properties listed below must be defined
under node /cpus/cpu@0.

## Required properties:

```text
- clocks: Must contain an entry for each entry in clock-names.
  See ../clocks/clock-bindings.txt for details.
- clock-names: Must include the following entries:
  - cpu_g: Clock mux for the fast CPU cluster.
  - pll_x: Fast PLL clocksource.
  - pll_p: Auxiliary PLL used during fast PLL rate changes.
  - dfll: Fast DFLL clocksource that also automatically scales CPU voltage.
```

## Optional properties:

- clock-latency: Specify the possible maximum transition latency for clock,
  in unit of nanoseconds.

## Example:

```dts
cpus {
	#address-cells = <1>;
	#size-cells = <0>;

	cpu@0 {
		device_type = "cpu";
		compatible = "arm,cortex-a15";
		reg = <0>;

		clocks = <&tegra_car TEGRA124_CLK_CCLK_G>,
			 <&tegra_car TEGRA124_CLK_PLL_X>,
			 <&tegra_car TEGRA124_CLK_PLL_P>,
			 <&dfll>;
		clock-names = "cpu_g", "pll_x", "pll_p", "dfll";
		clock-latency = <300000>;
	};

	<...>
};
```

---

# Binding for NVIDIA Tegra20 CPUFreq

_Peios Kernel / Hardware and drivers / Device tree / bindings/cpufreq_

> Device-tree binding reference for Binding for NVIDIA Tegra20 CPUFreq.

## Required properties:

- clocks: Must contain an entry for the CPU clock.
  See ../clocks/clock-bindings.txt for details.
- operating-points-v2: See ../bindings/opp/opp-v2.yaml for details.
- #cooling-cells: Should be 2. See [../thermal/thermal-cooling-devices.yaml](</kernel/hardware/devicetree-bindings/dt-thermal/thermal-cooling-devices.md>) for details.

## For each opp entry in 'operating-points-v2' table:

```text
- opp-supported-hw: Two bitfields indicating:
	On Tegra20:
	1. CPU process ID mask
	2. SoC speedo ID mask
```

## On Tegra30:

1. CPU process ID mask
2. CPU speedo ID mask

```text
	A bitwise AND is performed against these values and if any bit
	matches, the OPP gets enabled.
```

- opp-microvolt: CPU voltage triplet.

## Optional properties:

- cpu-supply: Phandle to the CPU power supply.

## Example:

```dts
	regulators {
		cpu_reg: regulator0 {
			regulator-name = "vdd_cpu";
		};
	};
```

```dts
	cpu0_opp_table: opp_table0 {
		compatible = "operating-points-v2";

		opp@456000000 {
			clock-latency-ns = <125000>;
			opp-microvolt = <825000 825000 1125000>;
			opp-supported-hw = <0x03 0x0001>;
			opp-hz = /bits/ 64 <456000000>;
		};

		...
	};
```

```dts
	cpus {
		cpu@0 {
			compatible = "arm,cortex-a9";
			clocks = <&tegra_car TEGRA20_CLK_CCLK>;
			operating-points-v2 = <&cpu0_opp_table>;
			cpu-supply = <&cpu_reg>;
			#cooling-cells = <2>;
		};
	};
```

---

# C-SKY CPU Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/csky_

> Device-tree binding reference for C-SKY CPU Bindings.

---

The device tree allows to describe the layout of CPUs in a system through
the "cpus" node, which in turn contains a number of subnodes (ie "cpu")
defining properties for every cpu.

Only SMP system need to care about the cpus node and single processor
needn't define cpus node at all.

---

## cpus and cpu node bindings definition

- cpus node

```text
	Description: Container of cpu nodes
```

```text
	The node name must be "cpus".
```

## A cpus node must define the following properties:

- #address-cells
  Usage: required
  Value type: &lt;u32&gt;
  Definition: must be set to 1
- #size-cells
  Usage: required
  Value type: &lt;u32&gt;
  Definition: must be set to 0

- cpu node

```text
	Description: Describes one of SMP cores
```

```text
	PROPERTIES
```

- device\_type
  Usage: required
  Value type: &lt;string&gt;
  Definition: must be "cpu"
- reg
  Usage: required
  Value type: &lt;u32&gt;
  Definition: CPU index
- compatible:
  Usage: required
  Value type: &lt;string&gt;
  Definition: must contain "csky", eg:
  "csky,610"
  "csky,807"
  "csky,810"
  "csky,860"

## Example:

```dts
	cpus {
		#address-cells = <1>;
		#size-cells = <0>;
		cpu@0 {
			device_type = "cpu";
			reg = <0>;
			status = "ok";
		};

		cpu@1 {
			device_type = "cpu";
			reg = <1>;
			status = "ok";
		};
	};
```

---

# C-SKY Performance Monitor Units

_Peios Kernel / Hardware and drivers / Device tree / bindings/csky_

> Device-tree binding reference for C-SKY Performance Monitor Units.

---

C-SKY Performance Monitor is designed for ck807/ck810/ck860 SMP soc and
it could count cpu's events for helping analysis performance issues.

---

## PMU node bindings definition

```text
	Description: Describes PMU
```

```text
	PROPERTIES
```

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: must be "csky,csky-pmu"
- interrupts
  Usage: required
  Value type: &lt;u32 IRQ\_TYPE\_XXX&gt;
  Definition: must be pmu irq num defined by soc
- count-width
  Usage: optional
  Value type: &lt;u32&gt;
  Definition: the width of pmu counter

## Examples:

```dts
#include <dt-bindings/interrupt-controller/irq.h>
```

```dts
	pmu: performace-monitor {
		compatible = "csky,csky-pmu";
		interrupts = <23 IRQ_TYPE_EDGE_RISING>;
		interrupt-parent = <&intc>;
		count-width = <48>;
        };
```

---

# Device Tree bindings for Armada DRM CRTC driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/display/armada_

> Device-tree binding reference for Device Tree bindings for Armada DRM CRTC driver.

## Required properties:

- compatible: value should be "marvell,dove-lcd".
- reg: base address and size of the LCD controller
- interrupts: single interrupt number for the LCD controller
- port: video output port with endpoints, as described by graph.txt

## Optional properties:

- clocks: as described by clock-bindings.txt
- clock-names: as described by clock-bindings.txt
  "axiclk" - axi bus clock for pixel clock
  "plldivider" - pll divider clock for pixel clock
  "ext\_ref\_clk0" - external clock 0 for pixel clock
  "ext\_ref\_clk1" - external clock 1 for pixel clock

Note: all clocks are optional but at least one must be specified.
Further clocks may be added in the future according to requirements of
different SoCs.

## Example:

```dts
	lcd0: lcd-controller@820000 {
		compatible = "marvell,dove-lcd";
		reg = <0x820000 0x1000>;
		interrupts = <47>;
		clocks = <&si5351 0>;
		clock-names = "ext_ref_clk_1";
	};
```

---

# Cirrus Logic CLPS711X Framebuffer

_Peios Kernel / Hardware and drivers / Device tree / bindings/display_

> Device-tree binding reference for Cirrus Logic CLPS711X Framebuffer.

## Required properties:

```text
- compatible: Shall contain "cirrus,ep7209-fb".
- reg       : Physical base address and length of the controller's registers +
              location and size of the framebuffer memory.
- clocks    : phandle + clock specifier pair of the FB reference clock.
- display   : phandle to a display node as described in
              Documentation/devicetree/bindings/display/panel/display-timing.txt.
              Additionally, the display node has to define properties:
  - bits-per-pixel: Bits per pixel.
  - ac-prescale   : LCD AC bias frequency. This frequency is the required
                    AC bias frequency for a given manufacturer's LCD plate.
  - cmap-invert   : Invert the color levels (Optional).
```

## Optional properties:

- lcd-supply: Regulator for LCD supply voltage.

## Example:

```dts
	fb: fb@800002c0 {
		compatible = "cirrus,ep7312-fb", "cirrus,ep7209-fb";
		reg = <0x800002c0 0xd44>, <0x60000000 0xc000>;
		clocks = <&clks 2>;
		lcd-supply = <&reg5v0>;
		display = <&display>;
	};
```

```dts
	display: display {
		model = "320x240x4";
		bits-per-pixel = <4>;
		ac-prescale = <17>;

		display-timings {
			native-mode = <&timing0>;
			timing0: 320x240 {
				hactive = <320>;
				hback-porch = <0>;
				hfront-porch = <0>;
				hsync-len = <0>;
				vactive = <240>;
				vback-porch = <0>;
				vfront-porch = <0>;
				vsync-len = <0>;
				clock-frequency = <6500000>;
			};
		};
	};
```

---

# Ilitek ILI9225 display panels

_Peios Kernel / Hardware and drivers / Device tree / bindings/display_

> Device-tree binding reference for Ilitek ILI9225 display panels.

This binding is for display panels using an Ilitek ILI9225 controller in SPI
mode.

## Required properties:

- compatible:	"vot,v220hf01a-t", "ilitek,ili9225"
- rs-gpios:	Register select signal
- reset-gpios:	Reset pin

The node for this driver must be a child node of a SPI controller, hence
all mandatory properties described in [../spi/spi-bus.txt](</kernel/hardware/devicetree/bindings-spi/spi-bus.md>) must be specified.

## Optional properties:

- rotation:	panel rotation in degrees counter clockwise (0,90,180,270)

## Example:

```dts
	display@0{
		compatible = "vot,v220hf01a-t", "ilitek,ili9225";
		reg = <0>;
		spi-max-frequency = <12000000>;
		rs-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
		rotation = <270>;
	};
```

---

# PXA LCD Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/display_

> Device-tree binding reference for PXA LCD Controller.

## Required properties:

- compatible : one of these
  "marvell,pxa2xx-lcdc",
  "marvell,pxa270-lcdc",
  "marvell,pxa300-lcdc"
- reg : should contain 1 register range (address and length).
- interrupts : framebuffer controller interrupt.
- clocks: phandle to input clocks

## Optional properties:

- lcd-supply: A phandle to a power regulator that controls the LCD voltage.

## Required nodes:

- port: connection to the LCD panel (see video-interfaces.txt)
  This node must have its properties bus-width and remote-endpoint set.
  If the panel is not a TFT color panel, then a "lcd-type" property in
  the panel should specify the panel type.
  This panel node should be in the board dts.

## Example:

```dts
	lcd-controller@40500000 {
		compatible = "marvell,pxa2xx-lcdc";
		reg = <0x44000000 0x10000>;
		interrupts = <17>;
		clocks = <&clks CLK_LCD>;

		port {
			lcdc_out: endpoint {
				remote-endpoint = <&panel_in>;
				bus-width = <16>;
			};
		};
	};
```

---

# PXA3xx GCU Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/display_

> Device-tree binding reference for PXA3xx GCU Controller.

## Required properties:

- compatible : "marvell,pxa300-gcu"
- reg : should contain the register range (address and length).
- interrupts : Controller interrupt.
- clocks: phandle to the PXA specific input clock.

## Example for PXA300:

```dts
	display-controller@54000000 {
		compatible = "marvell,pxa300-gcu";
		reg = <0x54000000 0x1000>;
		interrupts = <39>;
		clocks = <&clks CLK_PXA300_GCU>;
	};
```

---

# MIPI DSI (Display Serial Interface) busses

_Peios Kernel / Hardware and drivers / Device tree / bindings/display_

> Device-tree binding reference for MIPI DSI (Display Serial Interface) busses.

The MIPI Display Serial Interface specifies a serial bus and a protocol for
communication between a host and up to four peripherals. This document will
define the syntax used to represent a DSI bus in a device tree.

This document describes DSI bus-specific properties only or defines existing
standard properties in the context of the DSI bus.

Each DSI host provides a DSI bus. The DSI host controller's node contains a
set of properties that characterize the bus. Child nodes describe individual
peripherals on that bus.

The following assumes that only a single peripheral is connected to a DSI
host. Experience shows that this is true for the large majority of setups.

## DSI host

In addition to the standard properties and those defined by the parent bus of
a DSI host, the following properties apply to a node representing a DSI host.

## Required properties:

- #address-cells: The number of cells required to represent an address on the
  bus. DSI peripherals are addressed using a 2-bit virtual channel number, so
  a maximum of 4 devices can be addressed on a single bus. Hence the value of
  this property should be 1.
- #size-cells: Should be 0. There are cases where it makes sense to use a
  different value here. See below.

## Optional properties:

- clock-master: boolean. Should be enabled if the host is being used in
  conjunction with another DSI host to drive the same peripheral. Hardware
  supporting such a configuration generally requires the data on both the busses
  to be driven by the same clock. Only the DSI host instance controlling this
  clock should contain this property.

## DSI peripheral

## Peripherals with DSI as control bus, or no control bus

Peripherals with the DSI bus as the primary control bus, or peripherals with
no control bus but use the DSI bus to transmit pixel data are represented
as child nodes of the DSI host's node. Properties described here apply to all
DSI peripherals, but individual bindings may want to define additional,
device-specific properties.

## Required properties:

- reg: The virtual channel number of a DSI peripheral. Must be in the range
  from 0 to 3.

Some DSI peripherals respond to more than a single virtual channel. In that
case two alternative representations can be chosen:

- The reg property can take multiple entries, one for each virtual channel
  that the peripheral responds to.
- If the virtual channels that a peripheral responds to are consecutive, the
  #size-cells can be set to 1. The first cell of each entry in the reg
  property is the number of the first virtual channel and the second cell is
  the number of consecutive virtual channels.

## Peripherals with a different control bus

There are peripherals that have I2C/SPI (or some other non-DSI bus) as the
primary control bus, but are also connected to a DSI bus (mostly for the data
path). Connections between such peripherals and a DSI host can be represented
using the graph bindings \[1\], \[2\].

## Peripherals that support dual channel DSI

Peripherals with higher bandwidth requirements can be connected to 2 DSI
busses. Each DSI bus/channel drives some portion of the pixel data (generally
left/right half of each line of the display, or even/odd lines of the display).
The graph bindings should be used to represent the multiple DSI busses that are
connected to this peripheral. Each DSI host's output endpoint can be linked to
an input endpoint of the DSI peripheral.

\[1\] [Documentation/devicetree/bindings/graph.txt](</kernel/hardware/devicetree/bindings/graph.md>)
\[2\] [Documentation/devicetree/bindings/media/video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>)

## Examples

- (1), (2) and (3) are examples of a DSI host and peripheral on the DSI bus
  with different virtual channel configurations.
- (4) is an example of a peripheral on a I2C control bus connected to a
  DSI host using of-graph bindings.
- (5) is an example of 2 DSI hosts driving a dual-channel DSI peripheral,
  which uses I2C as its primary control bus.

```text
1)
	dsi-host {
		...
```

```dts
		#address-cells = <1>;
		#size-cells = <0>;
```

```text
		/* peripheral responds to virtual channel 0 */
		peripheral@0 {
			compatible = "...";
			reg = <0>;
		};
```

```text
		...
	};
```

```text
2)
	dsi-host {
		...
```

```dts
		#address-cells = <1>;
		#size-cells = <0>;
```

```text
		/* peripheral responds to virtual channels 0 and 2 */
		peripheral@0 {
			compatible = "...";
			reg = <0, 2>;
		};
```

```text
		...
	};
```

```text
3)
	dsi-host {
		...
```

```dts
		#address-cells = <1>;
		#size-cells = <1>;
```

```text
		/* peripheral responds to virtual channels 1, 2 and 3 */
		peripheral@1 {
			compatible = "...";
			reg = <1 3>;
		};
```

```text
		...
	};
```

```text
4)
	i2c-host {
		...
```

```dts
		dsi-bridge@35 {
			compatible = "...";
			reg = <0x35>;

			ports {
				...

				port {
					bridge_mipi_in: endpoint {
						remote-endpoint = <&host_mipi_out>;
					};
				};
			};
		};
	};
```

```dts
	dsi-host {
		...

		ports {
			...

			port {
				host_mipi_out: endpoint {
					remote-endpoint = <&bridge_mipi_in>;
				};
			};
		};
	};
```

```text
5)
	i2c-host {
		dsi-bridge@35 {
			compatible = "...";
			reg = <0x35>;
```

```dts
			ports {
				#address-cells = <1>;
				#size-cells = <0>;

				port@0 {
					reg = <0>;
					dsi0_in: endpoint {
						remote-endpoint = <&dsi0_out>;
					};
				};

				port@1 {
					reg = <1>;
					dsi1_in: endpoint {
						remote-endpoint = <&dsi1_out>;
					};
				};
			};
		};
	};
```

```dts
	dsi0-host {
		...

		/*
		 * this DSI instance drives the clock for both the host
		 * controllers
		 */
		clock-master;

		ports {
			...

			port {
				dsi0_out: endpoint {
					remote-endpoint = <&dsi0_in>;
				};
			};
		};
	};
```

```dts
	dsi1-host {
		...

		ports {
			...

			port {
				dsi1_out: endpoint {
					remote-endpoint = <&dsi1_in>;
				};
			};
		};
	};
```

---

# Multi-Inno MI0283QT display panel

_Peios Kernel / Hardware and drivers / Device tree / bindings/display_

> Device-tree binding reference for Multi-Inno MI0283QT display panel.

## Required properties:

- compatible:	"multi-inno,mi0283qt".

The node for this driver must be a child node of a SPI controller, hence
all mandatory properties described in [../spi/spi-bus.txt](</kernel/hardware/devicetree/bindings-spi/spi-bus.md>) must be specified.

## Optional properties:

```text
- dc-gpios:	D/C pin. The presence/absence of this GPIO determines
		the panel interface mode (IM[3:0] pins):
		- present: IM=x110 4-wire 8-bit data serial interface
		- absent:  IM=x101 3-wire 9-bit data serial interface
- reset-gpios:	Reset pin
- power-supply:	A regulator node for the supply voltage.
- backlight:	phandle of the backlight device attached to the panel
- rotation:	panel rotation in degrees counter clockwise (0,90,180,270)
```

## Example:

```dts
	mi0283qt@0{
		compatible = "multi-inno,mi0283qt";
		reg = <0>;
		spi-max-frequency = <32000000>;
		rotation = <90>;
		dc-gpios = <&gpio 25 0>;
		backlight = <&backlight>;
	};
```

---

# Pervasive Displays RePaper branded e-ink displays

_Peios Kernel / Hardware and drivers / Device tree / bindings/display_

> Device-tree binding reference for Pervasive Displays RePaper branded e-ink displays.

## Required properties:

- compatible:		"pervasive,e1144cs021" for 1.44" display
  "pervasive,e1190cs021" for 1.9" display
  "pervasive,e2200cs021" for 2.0" display
  "pervasive,e2271cs021" for 2.7" display

- panel-on-gpios:	Timing controller power control
- discharge-gpios:	Discharge control
- reset-gpios:		RESET pin
- busy-gpios:		BUSY pin

## Required property for e2271cs021:

- border-gpios:		Border control

The node for this driver must be a child node of a SPI controller, hence
all mandatory properties described in [../spi/spi-bus.txt](</kernel/hardware/devicetree/bindings-spi/spi-bus.md>) must be specified.

## Optional property:

- pervasive,thermal-zone:	name of thermometer's thermal zone

## Example:

```dts
	display_temp: lm75@48 {
		compatible = "lm75b";
		reg = <0x48>;
		#thermal-sensor-cells = <0>;
	};
```

```dts
	thermal-zones {
		display {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&display_temp>;
		};
	};
```

```dts
	papirus27@0{
		compatible = "pervasive,e2271cs021";
		reg = <0>;

		spi-max-frequency = <8000000>;

		panel-on-gpios = <&gpio 23 0>;
		border-gpios = <&gpio 14 0>;
		discharge-gpios = <&gpio 15 0>;
		reset-gpios = <&gpio 24 0>;
		busy-gpios = <&gpio 25 0>;

		pervasive,thermal-zone = "display";
	};
```

---

# SM SM501

_Peios Kernel / Hardware and drivers / Device tree / bindings/display_

> Device-tree binding reference for SM SM501.

The SM SM501 is a LCD controller, with proper hardware, it can also
drive DVI monitors.

## Required properties:

```text
- compatible : should be "smi,sm501".
- reg : contain two entries:
    - First entry: System Configuration register
    - Second entry: IO space (Display Controller register)
- interrupts : SMI interrupt to the cpu should be described here.
```

## Optional properties:

- mode : select a video mode:
  &lt;xres&gt;x&lt;yres&gt;\[-&lt;bpp&gt;\]\[@&lt;refresh&gt;\]
- edid : verbatim EDID data block describing attached display.
  Data from the detailed timing descriptor will be used to
  program the display controller.
- little-endian: available on big endian systems, to
  set different foreign endian.
- big-endian: available on little endian systems, to
  set different foreign endian.

## Example for MPC5200:

```dts
	display@1,0 {
		compatible = "smi,sm501";
		reg = <1 0x00000000 0x00800000
		       1 0x03e00000 0x00200000>;
		interrupts = <1 1 3>;
		mode = "640x480-32@60";
		edid = [edid-data];
	};
```

---

# ARC PGU

_Peios Kernel / Hardware and drivers / Device tree / bindings/display_

> Device-tree binding reference for ARC PGU.

This is a display controller found on several development boards produced
by Synopsys. The ARC PGU is an RGB streamer that reads the data from a
framebuffer and sends it to a single digital encoder (usually HDMI).

## Required properties:

```text
  - compatible: "snps,arcpgu"
  - reg: Physical base address and length of the controller's registers.
  - clocks: A list of phandle + clock-specifier pairs, one for each
    entry in 'clock-names'.
  - clock-names: A list of clock names. For ARC PGU it should contain:
      - "pxlclk" for the clock feeding the output PLL of the controller.
```

## Required sub-nodes:

- port: The PGU connection to an encoder chip.

## Example:

```dts
/ {
	...

	pgu@XXXXXXXX {
		compatible = "snps,arcpgu";
		reg = <0xXXXXXXXX 0x400>;
		clocks = <&clock_node>;
		clock-names = "pxlclk";

		port {
			pgu_output: endpoint {
				remote-endpoint = <&hdmi_enc_input>;
			};
		};
	};
};
```

---

# Solomon SSD1289 Framebuffer Driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/display_

> Device-tree binding reference for Solomon SSD1289 Framebuffer Driver.

## Required properties:

- compatible: Should be "solomon,ssd1289fb". The only supported bus for
  now is lbc.
- reg: Should contain address of the controller on the LBC bus. The detail
  was described in [Documentation/devicetree/bindings/powerpc/fsl/lbc.txt](</kernel/hardware/devicetree/bindings-powerpc-fsl/lbc.md>)

## Examples:

```dts
display@2,0 {
	compatible = "solomon,ssd1289fb";
	reg = <0x2 0x0000 0x0004>;
};
```

---

# STMicroelectronics stih4xx platforms

_Peios Kernel / Hardware and drivers / Device tree / bindings/display_

> Device-tree binding reference for STMicroelectronics stih4xx platforms.

```text
- sti-vtg: video timing generator
  Required properties:
  - compatible: "st,vtg"
  - reg: Physical base address of the IP registers and length of memory mapped region.
  Optional properties:
  - interrupts : VTG interrupt number to the CPU.
  - st,slave: phandle on a slave vtg
```

```text
- sti-vtac: video timing advanced inter dye communication Rx and TX
  Required properties:
  - compatible: "st,vtac-main" or "st,vtac-aux"
  - reg: Physical base address of the IP registers and length of memory mapped region.
  - clocks: from common clock binding: handle hardware IP needed clocks, the
    number of clocks may depend of the SoC type.
    See ../clocks/clock-bindings.txt for details.
  - clock-names: names of the clocks listed in clocks property in the same
    order.
```

```text
- sti-display-subsystem: Master device for DRM sub-components
  This device must be the parent of all the sub-components and is responsible
  of bind them.
  Required properties:
  - compatible: "st,sti-display-subsystem"
  - ranges: to allow probing of subdevices
```

```text
- sti-compositor: frame compositor engine
  must be a child of sti-display-subsystem
  Required properties:
  - compatible: "st,stih<chip>-compositor"
  - reg: Physical base address of the IP registers and length of memory mapped region.
  - clocks: from common clock binding: handle hardware IP needed clocks, the
    number of clocks may depend of the SoC type.
    See ../clocks/clock-bindings.txt for details.
  - clock-names: names of the clocks listed in clocks property in the same
    order.
  - resets: resets to be used by the device
    See ../reset/reset.txt for details.
  - reset-names: names of the resets listed in resets property in the same
    order.
  - st,vtg: phandle(s) on vtg device (main and aux) nodes.
```

```text
- sti-tvout: video out hardware block
  must be a child of sti-display-subsystem
  Required properties:
  - compatible: "st,stih<chip>-tvout"
  - reg: Physical base address of the IP registers and length of memory mapped region.
  - reg-names: names of the mapped memory regions listed in regs property in
    the same order.
  - resets: resets to be used by the device
    See ../reset/reset.txt for details.
  - reset-names: names of the resets listed in resets property in the same
    order.
```

```text
- sti-hdmi: hdmi output block
  must be a child of sti-display-subsystem
  Required properties:
  - compatible: "st,stih<chip>-hdmi";
  - reg: Physical base address of the IP registers and length of memory mapped region.
  - reg-names: names of the mapped memory regions listed in regs property in
    the same order.
  - interrupts : HDMI interrupt number to the CPU.
  - interrupt-names: names of the interrupts listed in interrupts property in
    the same order
  - clocks: from common clock binding: handle hardware IP needed clocks, the
    number of clocks may depend of the SoC type.
  - clock-names: names of the clocks listed in clocks property in the same
    order.
  - ddc: phandle of an I2C controller used for DDC EDID probing
```

## sti-hda:

```text
  Required properties:
  must be a child of sti-display-subsystem
```

- compatible: "st,stih&lt;chip&gt;-hda"
- reg: Physical base address of the IP registers and length of memory mapped region.
- reg-names: names of the mapped memory regions listed in regs property in
  the same order.
- clocks: from common clock binding: handle hardware IP needed clocks, the
  number of clocks may depend of the SoC type.
  See ../clocks/clock-bindings.txt for details.
- clock-names: names of the clocks listed in clocks property in the same
  order.

## sti-dvo:

```text
  Required properties:
  must be a child of sti-display-subsystem
```

- compatible: "st,stih&lt;chip&gt;-dvo"
- reg: Physical base address of the IP registers and length of memory mapped region.
- reg-names: names of the mapped memory regions listed in regs property in
  the same order.
- clocks: from common clock binding: handle hardware IP needed clocks, the
  number of clocks may depend of the SoC type.
  See ../clocks/clock-bindings.txt for details.
- clock-names: names of the clocks listed in clocks property in the same
  order.
- pinctrl-0: pin control handle
- pinctrl-names: names of the pin control states to use
- sti,panel: phandle of the panel connected to the DVO output

## sti-hqvdp:

```text
  must be a child of sti-display-subsystem
  Required properties:
```

- compatible: "st,stih&lt;chip&gt;-hqvdp"
- reg: Physical base address of the IP registers and length of memory mapped region.
- clocks: from common clock binding: handle hardware IP needed clocks, the
  number of clocks may depend of the SoC type.
  See ../clocks/clock-bindings.txt for details.
- clock-names: names of the clocks listed in clocks property in the same
  order.
- resets: resets to be used by the device
  See [../reset/reset.txt](</kernel/hardware/devicetree/bindings-reset/reset.md>) for details.
- reset-names: names of the resets listed in resets property in the same
  order.
- st,vtg: phandle on vtg main device node.

## Example:

```dts
/ {
	...

	vtg_main_slave: sti-vtg-main-slave@fe85a800 {
		compatible	= "st,vtg";
		reg		= <0xfe85A800 0x300>;
		interrupts	= <GIC_SPI 175 IRQ_TYPE_NONE>;
	};

	vtg_main: sti-vtg-main-master@fd348000 {
		compatible	= "st,vtg";
		reg		= <0xfd348000 0x400>;
		st,slave	= <&vtg_main_slave>;
	};

	vtg_aux_slave: sti-vtg-aux-slave@fd348400 {
		compatible	= "st,vtg";
		reg		= <0xfe858200 0x300>;
		interrupts	= <GIC_SPI 176 IRQ_TYPE_NONE>;
	};

	vtg_aux: sti-vtg-aux-master@fd348400 {
		compatible	= "st,vtg";
		reg		= <0xfd348400 0x400>;
		st,slave	= <&vtg_aux_slave>;
	};


	sti-vtac-rx-main@fee82800 {
		compatible	= "st,vtac-main";
		reg		= <0xfee82800 0x200>;
		clock-names     = "vtac";
		clocks          = <&clk_m_a2_div0 CLK_M_VTAC_MAIN_PHY>;
	};

	sti-vtac-rx-aux@fee82a00 {
		compatible	= "st,vtac-aux";
		reg		= <0xfee82a00 0x200>;
		clock-names     = "vtac";
		clocks          = <&clk_m_a2_div0 CLK_M_VTAC_AUX_PHY>;
	};

	sti-vtac-tx-main@fd349000 {
		compatible	= "st,vtac-main";
		reg		= <0xfd349000 0x200>, <0xfd320000 0x10000>;
		clock-names     = "vtac";
		clocks           = <&clk_s_a1_hs CLK_S_VTAC_TX_PHY>;
	};

	sti-vtac-tx-aux@fd349200 {
		compatible	= "st,vtac-aux";
		reg		= <0xfd349200 0x200>, <0xfd320000 0x10000>;
		clock-names     = "vtac";
		clocks          = <&clk_s_a1_hs CLK_S_VTAC_TX_PHY>;
	};

	sti-display-subsystem {
		compatible = "st,sti-display-subsystem";
		ranges;

		sti-compositor@fd340000 {
			compatible	= "st,stih416-compositor";
			reg		= <0xfd340000 0x1000>;
			clock-names	= "compo_main", "compo_aux",
			                  "pix_main", "pix_aux";
			clocks          = <&clk_m_a2_div1 CLK_M_COMPO_MAIN>, <&clk_m_a2_div1 CLK_M_COMPO_AUX>,
					  <&clockgen_c_vcc CLK_S_PIX_MAIN>, <&clockgen_c_vcc CLK_S_PIX_AUX>;
			reset-names     = "compo-main", "compo-aux";
			resets          = <&softreset STIH416_COMPO_M_SOFTRESET>, <&softreset STIH416_COMPO_A_SOFTRESET>;
			st,vtg		= <&vtg_main>, <&vtg_aux>;
		};

		sti-tvout@fe000000 {
			compatible	= "st,stih416-tvout";
			reg		= <0xfe000000 0x1000>, <0xfe85a000 0x400>, <0xfe830000 0x10000>;
			reg-names	= "tvout-reg", "hda-reg", "syscfg";
			reset-names     = "tvout";
			resets          = <&softreset STIH416_HDTVOUT_SOFTRESET>;
		};

		sti-hdmi@fe85c000 {
			compatible	= "st,stih416-hdmi";
			reg		= <0xfe85c000 0x1000>, <0xfe830000 0x10000>;
			reg-names	= "hdmi-reg", "syscfg";
			interrupts	= <GIC_SPI 173 IRQ_TYPE_NONE>;
			interrupt-names	= "irq";
			clock-names	= "pix", "tmds", "phy", "audio";
			clocks          = <&clockgen_c_vcc CLK_S_PIX_HDMI>, <&clockgen_c_vcc CLK_S_TMDS_HDMI>, <&clockgen_c_vcc CLK_S_HDMI_REJECT_PLL>, <&clockgen_b1 CLK_S_PCM_0>;
		};

		sti-hda@fe85a000 {
			compatible	= "st,stih416-hda";
			reg		= <0xfe85a000 0x400>, <0xfe83085c 0x4>;
			reg-names	= "hda-reg", "video-dacs-ctrl";
			clock-names	= "pix", "hddac";
			clocks          = <&clockgen_c_vcc CLK_S_PIX_HD>, <&clockgen_c_vcc CLK_S_HDDAC>;
		};

		sti-dvo@8d00400 {
			compatible	= "st,stih407-dvo";
			reg		= <0x8d00400 0x200>;
			reg-names	= "dvo-reg";
			clock-names	= "dvo_pix", "dvo",
					  "main_parent", "aux_parent";
			clocks		= <&clk_s_d2_flexgen CLK_PIX_DVO>, <&clk_s_d2_flexgen CLK_DVO>,
					  <&clk_s_d2_quadfs 0>, <&clk_s_d2_quadfs 1>;
			pinctrl-names	= "default";
			pinctrl-0	= <&pinctrl_dvo>;
			sti,panel	= <&panel_dvo>;
		};

		sti-hqvdp@9c000000 {
				compatible	= "st,stih407-hqvdp";
				reg		= <0x9C00000 0x100000>;
				clock-names	= "hqvdp", "pix_main";
				clocks		= <&clk_s_c0_flexgen CLK_MAIN_DISP>, <&clk_s_d2_flexgen CLK_PIX_MAIN_DISP>;
				reset-names     = "hqvdp";
				resets          = <&softreset STIH407_HDQVDP_SOFTRESET>;
				st,vtg		= <&vtg_main>;
		};
	};
	...
};
```

---

# VIA VT8500 Framebuffer

_Peios Kernel / Hardware and drivers / Device tree / bindings/display_

> Device-tree binding reference for VIA VT8500 Framebuffer.

## Required properties:

- compatible : "via,vt8500-fb"
- reg : Should contain 1 register ranges(address and length)
- interrupts : framebuffer controller interrupt
- bits-per-pixel : bit depth of framebuffer (16 or 32)

## Required subnodes:

- display-timings: see display-timing.txt for information

## Example:

```dts
	fb@d8050800 {
		compatible = "via,vt8500-fb";
		reg = <0xd800e400 0x400>;
		interrupts = <12>;
		bits-per-pixel = <16>;

		display-timings {
			native-mode = <&timing0>;
			timing0: 800x480 {
				clock-frequency = <0>; /* unused but required */
				hactive = <800>;
				vactive = <480>;
				hfront-porch = <40>;
				hback-porch = <88>;
				hsync-len = <0>;
				vback-porch = <32>;
				vfront-porch = <11>;
				vsync-len = <1>;
			};
		};
	};
```

---

# VIA/Wondermedia Graphics Engine Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/display_

> Device-tree binding reference for VIA/Wondermedia Graphics Engine Controller.

## Required properties:

- compatible : "wm,prizm-ge-rops"
- reg : Should contain 1 register ranges(address and length)

## Example:

```dts
	ge_rops@d8050400 {
		compatible = "wm,prizm-ge-rops";
		reg = <0xd8050400 0x100>;
	};
```

---

# Wondermedia WM8505 Framebuffer

_Peios Kernel / Hardware and drivers / Device tree / bindings/display_

> Device-tree binding reference for Wondermedia WM8505 Framebuffer.

## Required properties:

- compatible : "wm,wm8505-fb"
- reg : Should contain 1 register ranges(address and length)
- bits-per-pixel : bit depth of framebuffer (16 or 32)

## Required subnodes:

- display-timings: see display-timing.txt for information

## Example:

```dts
	fb@d8051700 {
		compatible = "wm,wm8505-fb";
		reg = <0xd8051700 0x200>;
		bits-per-pixel = <16>;

		display-timings {
			native-mode = <&timing0>;
			timing0: 800x480 {
				clock-frequency = <0>; /* unused but required */
				hactive = <800>;
				vactive = <480>;
				hfront-porch = <40>;
				hback-porch = <88>;
				hsync-len = <0>;
				vback-porch = <32>;
				vfront-porch = <11>;
				vsync-len = <1>;
			};
		};
	};
```

---

# Device-Tree bindings for DesignWare DSI Host Controller v1.20a driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/display/hisilicon_

> Device-tree binding reference for Device-Tree bindings for DesignWare DSI Host Controller v1.20a driver.

A DSI Host Controller resides in the middle of display controller and external
HDMI converter or panel.

## Required properties:

- compatible: value should be "hisilicon,hi6220-dsi".
- reg: physical base address and length of dsi controller's registers.
- clocks: contains APB clock phandle + clock-specifier pair.
- clock-names: should be "pclk".
- ports: contains DSI controller input and output sub port.
  The input port connects to ADE output port with the reg value "0".
  The output port with the reg value "1", it could connect to panel or
  any other bridge endpoints.
  See [Documentation/devicetree/bindings/graph.txt](</kernel/hardware/devicetree/bindings/graph.md>) for more device graph info.

A example of HiKey board hi6220 SoC and board specific DT entry:
Example:

## SoC specific:

```dts
	dsi: dsi@f4107800 {
		compatible = "hisilicon,hi6220-dsi";
		reg = <0x0 0xf4107800 0x0 0x100>;
		clocks = <&media_ctrl  HI6220_DSI_PCLK>;
		clock-names = "pclk";
		status = "disabled";

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			/* 0 for input port */
			port@0 {
				reg = <0>;
				dsi_in: endpoint {
					remote-endpoint = <&ade_out>;
				};
			};
		};
	};
```

## Board specific:

```dts
	&dsi {
		status = "ok";

		ports {
			/* 1 for output port */
			port@1 {
				reg = <1>;

				dsi_out0: endpoint@0 {
					remote-endpoint = <&adv7533_in>;
				};
			};
		};
	};
```

```dts
	&i2c2 {
		...

		adv7533: adv7533@39 {
			...

			port {
				adv7533_in: endpoint {
					remote-endpoint = <&dsi_out0>;
				};
			};
		};
	};
```

---

# Device-Tree bindings for hisilicon ADE display controller driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/display/hisilicon_

> Device-tree binding reference for Device-Tree bindings for hisilicon ADE display controller driver.

ADE (Advanced Display Engine) is the display controller which grab image
data from memory, do composition, do post image processing, generate RGB
timing stream and transfer to DSI.

## Required properties:

- compatible: value should be "hisilicon,hi6220-ade".
- reg: physical base address and length of the ADE controller's registers.
- hisilicon,noc-syscon: ADE NOC QoS syscon.
- resets: The ADE reset controller node.
- interrupt: the ldi vblank interrupt number used.
- clocks: a list of phandle + clock-specifier pairs, one for each entry
  in clock-names.
- clock-names: should contain:
  "clk\_ade\_core" for the ADE core clock.
  "clk\_codec\_jpeg" for the media NOC QoS clock, which use the same clock with
  jpeg codec.
  "clk\_ade\_pix" for the ADE pixel clock.
- assigned-clocks: Should contain "clk\_ade\_core" and "clk\_codec\_jpeg" clocks'
  phandle + clock-specifier pairs.
- assigned-clock-rates: clock rates, one for each entry in assigned-clocks.
  The rate of "clk\_ade\_core" could be "360000000" or "180000000";
  The rate of "clk\_codec\_jpeg" could be or less than "1440000000".
  These rate values could be configured according to performance and power
  consumption.
- port: the output port. This contains one endpoint subnode, with its
  remote-endpoint set to the phandle of the connected DSI input endpoint.
  See [Documentation/devicetree/bindings/graph.txt](</kernel/hardware/devicetree/bindings/graph.md>) for more device graph info.

## Optional properties:

- dma-coherent: Present if dma operations are coherent.

A example of HiKey board hi6220 SoC specific DT entry:
Example:

```dts
	ade: ade@f4100000 {
		compatible = "hisilicon,hi6220-ade";
		reg = <0x0 0xf4100000 0x0 0x7800>;
		reg-names = "ade_base";
		hisilicon,noc-syscon = <&medianoc_ade>;
		resets = <&media_ctrl MEDIA_ADE>;
		interrupts = <0 115 4>; /* ldi interrupt */

		clocks = <&media_ctrl HI6220_ADE_CORE>,
			 <&media_ctrl HI6220_CODEC_JPEG>,
			 <&media_ctrl HI6220_ADE_PIX_SRC>;
		/*clock name*/
		clock-names  = "clk_ade_core",
			       "clk_codec_jpeg",
			       "clk_ade_pix";

		assigned-clocks = <&media_ctrl HI6220_ADE_CORE>,
			<&media_ctrl HI6220_CODEC_JPEG>;
		assigned-clock-rates = <360000000>, <288000000>;
		dma-coherent;

		port {
			ade_out: endpoint {
				remote-endpoint = <&dsi_in>;
			};
		};
	};
```

---

# Display timing bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/display/panel_

> Device-tree binding reference for Display timing bindings.

See [display-timings.yaml](</kernel/hardware/devicetree-bindings/dt-display/panel/display-timings.md>) in this directory.

---

# Texas Instruments DRA7x Display Subsystem

_Peios Kernel / Hardware and drivers / Device tree / bindings/display/ti_

> Device-tree binding reference for Texas Instruments DRA7x Display Subsystem.

See [Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt](</kernel/hardware/devicetree/bindings-display-ti/ti-omap-dss.md>) for generic
description about OMAP Display Subsystem bindings.

## DSS Core

## Required properties:

- compatible: "ti,dra7-dss"
- reg: address and length of the register spaces for 'dss'
- ti,hwmods: "dss\_core"
- clocks: handle to fclk
- clock-names: "fck"
- syscon: phandle to control module core syscon node

## Optional properties:

Some DRA7xx SoCs have one dedicated video PLL, some have two. These properties
can be used to describe the video PLLs:

- reg: address and length of the register spaces for 'pll1\_clkctrl',
  'pll1', 'pll2\_clkctrl', 'pll2'
- clocks: handle to video1 pll clock and video2 pll clock
- clock-names: "video1\_clk" and "video2\_clk"

## Required nodes:

- DISPC

## Optional nodes:

- DSS Submodules: HDMI
- Video port for DPI output

## DPI Endpoint required properties:

- data-lines: number of lines used

## DISPC

## Required properties:

- compatible: "ti,dra7-dispc"
- reg: address and length of the register space
- ti,hwmods: "dss\_dispc"
- interrupts: the DISPC interrupt
- clocks: handle to fclk
- clock-names: "fck"

## Optional properties:

- max-memory-bandwidth: Input memory (from main memory to dispc) bandwidth limit
  in bytes per second

## HDMI

## Required properties:

- compatible: "ti,dra7-hdmi"
- reg: addresses and lengths of the register spaces for 'wp', 'pll', 'phy',
  'core'
- reg-names: "wp", "pll", "phy", "core"
- interrupts: the HDMI interrupt line
- ti,hwmods: "dss\_hdmi"
- vdda-supply: vdda power supply
- clocks: handles to fclk and pll clock
- clock-names: "fck", "sys\_clk"

## Optional nodes:

- Video port for HDMI output

## HDMI Endpoint optional properties:

- lanes: list of 8 pin numbers for the HDMI lanes: CLK+, CLK-, D0+, D0-,
  D1+, D1-, D2+, D2-. (default: 0,1,2,3,4,5,6,7)

---

# Texas Instruments OMAP Display Subsystem

_Peios Kernel / Hardware and drivers / Device tree / bindings/display/ti_

> Device-tree binding reference for Texas Instruments OMAP Display Subsystem.

## Generic Description

This document is a generic description of the OMAP Display Subsystem bindings.
Binding details for each OMAP SoC version are described in respective binding
documentation.

The OMAP Display Subsystem (DSS) hardware consists of DSS Core, DISPC module and
a number of encoder modules. All DSS versions contain DSS Core and DISPC, but
the encoder modules vary.

The DSS Core is the parent of the other DSS modules, and manages clock routing,
integration to the SoC, etc.

DISPC is the display controller, which reads pixels from the memory and outputs
a RGB pixel stream to encoders.

The encoder modules encode the received RGB pixel stream to a video output like
HDMI, MIPI DPI, etc.

## Video Ports

The DSS Core and the encoders have video port outputs. The structure of the
video ports is described in [Documentation/devicetree/bindings/graph.txt](</kernel/hardware/devicetree/bindings/graph.md>),
and the properties for the ports and endpoints for each encoder are
described in the SoC's DSS binding documentation.

The video ports are used to describe the connections to external hardware, like
panels or external encoders.

## Aliases

The board dts file may define aliases for displays to assign "displayX" style
name for each display. If no aliases are defined, a semi-random number is used
for the display.

## Example

A shortened example of the DSS description for OMAP4, with non-relevant parts
removed, defined in omap4.dtsi:

```dts
dss: dss@58000000 {
	compatible = "ti,omap4-dss";
	reg = <0x58000000 0x80>;
	status = "disabled";
	ti,hwmods = "dss_core";
	clocks = <&dss_dss_clk>;
	clock-names = "fck";
	#address-cells = <1>;
	#size-cells = <1>;
	ranges;

	dispc@58001000 {
		compatible = "ti,omap4-dispc";
		reg = <0x58001000 0x1000>;
		interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
		ti,hwmods = "dss_dispc";
		clocks = <&dss_dss_clk>;
		clock-names = "fck";
	};

	hdmi: encoder@58006000 {
		compatible = "ti,omap4-hdmi";
		reg = <0x58006000 0x200>,
		      <0x58006200 0x100>,
		      <0x58006300 0x100>,
		      <0x58006400 0x1000>;
		reg-names = "wp", "pll", "phy", "core";
		interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
		status = "disabled";
		ti,hwmods = "dss_hdmi";
		clocks = <&dss_48mhz_clk>, <&dss_sys_clk>;
		clock-names = "fck", "sys_clk";
	};
};
```

A shortened example of the board description for OMAP4 Panda board, defined in
omap4-panda.dts.

The Panda board has a DVI and a HDMI connector, and the board contains a TFP410
chip (MIPI DPI to DVI encoder) and a TPD12S015 chip (HDMI ESD protection &amp; level
shifter). The video pipelines for the connectors are formed as follows:

DSS Core --(MIPI DPI)--&gt; TFP410 --(DVI)--&gt; DVI Connector
OMAP HDMI --(HDMI)--&gt; TPD12S015 --(HDMI)--&gt; HDMI Connector

```dts
/ {
	aliases {
		display0 = &dvi0;
		display1 = &hdmi0;
	};

	tfp410: encoder@0 {
		compatible = "ti,tfp410";
		gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;	/* 0, power-down */

		pinctrl-names = "default";
		pinctrl-0 = <&tfp410_pins>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;

				tfp410_in: endpoint@0 {
					remote-endpoint = <&dpi_out>;
				};
			};

			port@1 {
				reg = <1>;

				tfp410_out: endpoint@0 {
					remote-endpoint = <&dvi_connector_in>;
				};
			};
		};
	};

	dvi0: connector@0 {
		compatible = "dvi-connector";
		label = "dvi";

		i2c-bus = <&i2c3>;

		port {
			dvi_connector_in: endpoint {
				remote-endpoint = <&tfp410_out>;
			};
		};
	};

	tpd12s015: encoder@1 {
		compatible = "ti,tpd12s015";

		pinctrl-names = "default";
		pinctrl-0 = <&tpd12s015_pins>;

		gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
			<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
			<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;

				tpd12s015_in: endpoint@0 {
					remote-endpoint = <&hdmi_out>;
				};
			};

			port@1 {
				reg = <1>;

				tpd12s015_out: endpoint@0 {
					remote-endpoint = <&hdmi_connector_in>;
				};
			};
		};
	};

	hdmi0: connector@1 {
		compatible = "hdmi-connector";
		label = "hdmi";

		port {
			hdmi_connector_in: endpoint {
				remote-endpoint = <&tpd12s015_out>;
			};
		};
	};
};
```

```dts
&dss {
	status = "ok";

	pinctrl-names = "default";
	pinctrl-0 = <&dss_dpi_pins>;

	port {
		dpi_out: endpoint {
			remote-endpoint = <&tfp410_in>;
			data-lines = <24>;
		};
	};
};
```

```dts
&hdmi {
	status = "ok";
	vdda-supply = <&vdac>;

	pinctrl-names = "default";
	pinctrl-0 = <&dss_hdmi_pins>;

	port {
		hdmi_out: endpoint {
			remote-endpoint = <&tpd12s015_in>;
		};
	};
};
```

---

# Texas Instruments OMAP2 Display Subsystem

_Peios Kernel / Hardware and drivers / Device tree / bindings/display/ti_

> Device-tree binding reference for Texas Instruments OMAP2 Display Subsystem.

See [Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt](</kernel/hardware/devicetree/bindings-display-ti/ti-omap-dss.md>) for generic
description about OMAP Display Subsystem bindings.

## DSS Core

## Required properties:

- compatible: "ti,omap2-dss"
- reg: address and length of the register space
- ti,hwmods: "dss\_core"

## Optional nodes:

- Video port for DPI output

## DPI Endpoint required properties:

- data-lines: number of lines used

## DISPC

## Required properties:

- compatible: "ti,omap2-dispc"
- reg: address and length of the register space
- ti,hwmods: "dss\_dispc"
- interrupts: the DISPC interrupt

## Optional properties:

- max-memory-bandwidth: Input memory (from main memory to dispc) bandwidth limit
  in bytes per second

## RFBI

## Required properties:

- compatible: "ti,omap2-rfbi"
- reg: address and length of the register space
- ti,hwmods: "dss\_rfbi"

## VENC

## Required properties:

- compatible: "ti,omap2-venc"
- reg: address and length of the register space
- ti,hwmods: "dss\_venc"
- vdda-supply: power supply for DAC

## VENC Endpoint required properties:

## Required properties:

- ti,invert-polarity: invert the polarity of the video signal
- ti,channels: 1 for composite, 2 for s-video

---

# Texas Instruments OMAP3 Display Subsystem

_Peios Kernel / Hardware and drivers / Device tree / bindings/display/ti_

> Device-tree binding reference for Texas Instruments OMAP3 Display Subsystem.

See [Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt](</kernel/hardware/devicetree/bindings-display-ti/ti-omap-dss.md>) for generic
description about OMAP Display Subsystem bindings.

## DSS Core

## Required properties:

- compatible: "ti,omap3-dss"
- reg: address and length of the register space
- ti,hwmods: "dss\_core"
- clocks: handle to fclk
- clock-names: "fck"

## Optional nodes:

```text
- Video ports:
	- Port 0: DPI output
	- Port 1: SDI output
```

## DPI Endpoint required properties:

- data-lines: number of lines used

## SDI Endpoint required properties:

- datapairs: number of datapairs used

## DISPC

## Required properties:

- compatible: "ti,omap3-dispc"
- reg: address and length of the register space
- ti,hwmods: "dss\_dispc"
- interrupts: the DISPC interrupt
- clocks: handle to fclk
- clock-names: "fck"

## Optional properties:

- max-memory-bandwidth: Input memory (from main memory to dispc) bandwidth limit
  in bytes per second

## RFBI

## Required properties:

- compatible: "ti,omap3-rfbi"
- reg: address and length of the register space
- ti,hwmods: "dss\_rfbi"
- clocks: handles to fclk and iclk
- clock-names: "fck", "ick"

## VENC

## Required properties:

- compatible: "ti,omap3-venc"
- reg: address and length of the register space
- ti,hwmods: "dss\_venc"
- vdda-supply: power supply for DAC
- clocks: handle to fclk
- clock-names: "fck"

## VENC Endpoint required properties:

- ti,invert-polarity: invert the polarity of the video signal
- ti,channels: 1 for composite, 2 for s-video

## DSI

## Required properties:

- compatible: "ti,omap3-dsi"
- reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll'
- reg-names: "proto", "phy", "pll"
- interrupts: the DSI interrupt line
- ti,hwmods: "dss\_dsi1"
- vdd-supply: power supply for DSI
- clocks: handles to fclk and pll clock
- clock-names: "fck", "sys\_clk"

## DSI Endpoint required properties:

- lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-,
  DATA1+, DATA1-, ...

---

# Texas Instruments OMAP4 Display Subsystem

_Peios Kernel / Hardware and drivers / Device tree / bindings/display/ti_

> Device-tree binding reference for Texas Instruments OMAP4 Display Subsystem.

See [Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt](</kernel/hardware/devicetree/bindings-display-ti/ti-omap-dss.md>) for generic
description about OMAP Display Subsystem bindings.

## DSS Core

## Required properties:

- compatible: "ti,omap4-dss"
- reg: address and length of the register space
- ti,hwmods: "dss\_core"
- clocks: handle to fclk
- clock-names: "fck"

## Required nodes:

- DISPC

## Optional nodes:

- DSS Submodules: RFBI, VENC, DSI, HDMI
- Video port for DPI output

## DPI Endpoint required properties:

- data-lines: number of lines used

## DISPC

## Required properties:

- compatible: "ti,omap4-dispc"
- reg: address and length of the register space
- ti,hwmods: "dss\_dispc"
- interrupts: the DISPC interrupt
- clocks: handle to fclk
- clock-names: "fck"

## Optional properties:

- max-memory-bandwidth: Input memory (from main memory to dispc) bandwidth limit
  in bytes per second

## RFBI

## Required properties:

- compatible: "ti,omap4-rfbi"
- reg: address and length of the register space
- ti,hwmods: "dss\_rfbi"
- clocks: handles to fclk and iclk
- clock-names: "fck", "ick"

## Optional nodes:

- Video port for RFBI output
- RFBI controlled peripherals

## VENC

## Required properties:

- compatible: "ti,omap4-venc"
- reg: address and length of the register space
- ti,hwmods: "dss\_venc"
- vdda-supply: power supply for DAC
- clocks: handle to fclk
- clock-names: "fck"

## Optional nodes:

- Video port for VENC output

## VENC Endpoint required properties:

- ti,invert-polarity: invert the polarity of the video signal
- ti,channels: 1 for composite, 2 for s-video

## DSI

## Required properties:

- compatible: "ti,omap4-dsi"
- reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll'
- reg-names: "proto", "phy", "pll"
- interrupts: the DSI interrupt line
- ti,hwmods: "dss\_dsi1" or "dss\_dsi2"
- vdd-supply: power supply for DSI
- clocks: handles to fclk and pll clock
- clock-names: "fck", "sys\_clk"

## Optional nodes:

- Video port for DSI output
- DSI controlled peripherals

## DSI Endpoint required properties:

- lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-,
  DATA1+, DATA1-, ...

## HDMI

## Required properties:

- compatible: "ti,omap4-hdmi"
- reg: addresses and lengths of the register spaces for 'wp', 'pll', 'phy',
  'core'
- reg-names: "wp", "pll", "phy", "core"
- interrupts: the HDMI interrupt line
- ti,hwmods: "dss\_hdmi"
- vdda-supply: vdda power supply
- clocks: handles to fclk and pll clock
- clock-names: "fck", "sys\_clk"

## Optional nodes:

- Video port for HDMI output

## HDMI Endpoint optional properties:

- lanes: list of 8 pin numbers for the HDMI lanes: CLK+, CLK-, D0+, D0-,
  D1+, D1-, D2+, D2-. (default: 0,1,2,3,4,5,6,7)

---

# Texas Instruments OMAP5 Display Subsystem

_Peios Kernel / Hardware and drivers / Device tree / bindings/display/ti_

> Device-tree binding reference for Texas Instruments OMAP5 Display Subsystem.

See [Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt](</kernel/hardware/devicetree/bindings-display-ti/ti-omap-dss.md>) for generic
description about OMAP Display Subsystem bindings.

## DSS Core

## Required properties:

- compatible: "ti,omap5-dss"
- reg: address and length of the register space
- ti,hwmods: "dss\_core"
- clocks: handle to fclk
- clock-names: "fck"

## Required nodes:

- DISPC

## Optional nodes:

- DSS Submodules: RFBI, DSI, HDMI
- Video port for DPI output

## DPI Endpoint required properties:

- data-lines: number of lines used

## DISPC

## Required properties:

- compatible: "ti,omap5-dispc"
- reg: address and length of the register space
- ti,hwmods: "dss\_dispc"
- interrupts: the DISPC interrupt
- clocks: handle to fclk
- clock-names: "fck"

## Optional properties:

- max-memory-bandwidth: Input memory (from main memory to dispc) bandwidth limit
  in bytes per second

## RFBI

## Required properties:

- compatible: "ti,omap5-rfbi"
- reg: address and length of the register space
- ti,hwmods: "dss\_rfbi"
- clocks: handles to fclk and iclk
- clock-names: "fck", "ick"

## Optional nodes:

- Video port for RFBI output
- RFBI controlled peripherals

## DSI

## Required properties:

- compatible: "ti,omap5-dsi"
- reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll'
- reg-names: "proto", "phy", "pll"
- interrupts: the DSI interrupt line
- ti,hwmods: "dss\_dsi1" or "dss\_dsi2"
- vdd-supply: power supply for DSI
- clocks: handles to fclk and pll clock
- clock-names: "fck", "sys\_clk"

## Optional nodes:

- Video port for DSI output
- DSI controlled peripherals

## DSI Endpoint required properties:

- lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-,
  DATA1+, DATA1-, ...

## HDMI

## Required properties:

- compatible: "ti,omap5-hdmi"
- reg: addresses and lengths of the register spaces for 'wp', 'pll', 'phy',
  'core'
- reg-names: "wp", "pll", "phy", "core"
- interrupts: the HDMI interrupt line
- ti,hwmods: "dss\_hdmi"
- vdda-supply: vdda power supply
- clocks: handles to fclk and pll clock
- clock-names: "fck", "sys\_clk"

## Optional nodes:

- Video port for HDMI output

## HDMI Endpoint optional properties:

- lanes: list of 8 pin numbers for the HDMI lanes: CLK+, CLK-, D0+, D0-,
  D1+, D1-, D2+, D2-. (default: 0,1,2,3,4,5,6,7)

---

# TPD12S015 HDMI level shifter and ESD protection chip

_Peios Kernel / Hardware and drivers / Device tree / bindings/display/ti_

> Device-tree binding reference for TPD12S015 HDMI level shifter and ESD protection chip.

## Required properties:

- compatible: "ti,tpd12s015"

## Optional properties:

- gpios: CT CP HPD, LS OE and HPD gpios

## Required nodes:

- Video port 0 for HDMI input
- Video port 1 for HDMI output

## Example

```dts
tpd12s015: encoder@1 {
	compatible = "ti,tpd12s015";

	gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
		<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
		<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */

	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port@0 {
			reg = <0>;

			tpd12s015_in: endpoint@0 {
				remote-endpoint = <&hdmi_out>;
			};
		};

		port@1 {
			reg = <1>;

			tpd12s015_out: endpoint@0 {
				remote-endpoint = <&hdmi_connector_in>;
			};
		};
	};
};
```

---

# Device-Tree bindings for tilcdc DRM generic panel output driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/display/tilcdc_

> Device-tree binding reference for Device-Tree bindings for tilcdc DRM generic panel output driver.

## Required properties:

```text
 - compatible: value should be "ti,tilcdc,panel".
 - panel-info: configuration info to configure LCDC correctly for the panel
   - ac-bias: AC Bias Pin Frequency
   - ac-bias-intrpt: AC Bias Pin Transitions per Interrupt
   - dma-burst-sz: DMA burst size
   - bpp: Bits per pixel
   - fdd: FIFO DMA Request Delay
   - sync-edge: Horizontal and Vertical Sync Edge: 0=rising 1=falling
   - sync-ctrl: Horizontal and Vertical Sync: Control: 0=ignore
   - raster-order: Raster Data Order Select: 1=Most-to-least 0=Least-to-most
   - fifo-th: DMA FIFO threshold
 - display-timings: typical videomode of lcd panel.  Multiple video modes
   can be listed if the panel supports multiple timings, but the 'native-mode'
   should be the preferred/default resolution.  Refer to
   Documentation/devicetree/bindings/display/panel/display-timing.txt for display
   timing binding details.
```

## Optional properties:

- backlight: phandle of the backlight device attached to the panel
- enable-gpios: GPIO pin to enable or disable the panel

## Recommended properties:

- pinctrl-names, pinctrl-0: the pincontrol settings to configure
  muxing properly for pins that connect to TFP410 device

## Example:

```text
	/* Settings for CDTech_S035Q01 / LCD3 cape: */
	lcd3 {
		compatible = "ti,tilcdc,panel";
		pinctrl-names = "default";
		pinctrl-0 = <&bone_lcd3_cape_lcd_pins>;
		backlight = <&backlight>;
		enable-gpios = <&gpio3 19 0>;
```

```dts
		panel-info {
			ac-bias           = <255>;
			ac-bias-intrpt    = <0>;
			dma-burst-sz      = <16>;
			bpp               = <16>;
			fdd               = <0x80>;
			sync-edge         = <0>;
			sync-ctrl         = <1>;
			raster-order      = <0>;
			fifo-th           = <0>;
		};
		display-timings {
			native-mode = <&timing0>;
			timing0: 320x240 {
				hactive         = <320>;
				vactive         = <240>;
				hback-porch     = <21>;
				hfront-porch    = <58>;
				hsync-len       = <47>;
				vback-porch     = <11>;
				vfront-porch    = <23>;
				vsync-len       = <2>;
				clock-frequency = <8000000>;
				hsync-active    = <0>;
				vsync-active    = <0>;
			};
		};
	};
```

---

# Device-Tree bindings for tilcdc DRM driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/display/tilcdc_

> Device-tree binding reference for Device-Tree bindings for tilcdc DRM driver.

## Required properties:

```text
 - compatible: value should be one of the following:
    - "ti,am33xx-tilcdc" for AM335x based boards
    - "ti,da850-tilcdc" for DA850/AM18x/OMAP-L138 based boards
 - interrupts: the interrupt number
 - reg: base address and size of the LCDC device
```

## Recommended properties:

- ti,hwmods: Name of the hwmod associated to the LCDC

## Optional properties:

```text
 - max-bandwidth: The maximum pixels per second that the memory
   interface / lcd controller combination can sustain
 - max-width: The maximum horizontal pixel width supported by
   the lcd controller.
 - max-pixelclock: The maximum pixel clock that can be supported
   by the lcd controller in KHz.
 - blue-and-red-wiring: Recognized values "straight" or "crossed".
   This property deals with the LCDC revision 2 (found on AM335x)
   color errata [1].
    - "straight" indicates normal wiring that supports RGB565,
      BGR888, and XBGR8888 color formats.
    - "crossed" indicates wiring that has blue and red wires
      crossed. This setup supports BGR565, RGB888 and XRGB8888
      formats.
    - If the property is not present or its value is not recognized
      the legacy mode is assumed. This configuration supports RGB565,
      RGB888 and XRGB8888 formats. However, depending on wiring, the red
      and blue colors are swapped in either 16 or 24-bit color modes.
```

## Optional nodes:

- port/ports: to describe a connection to an external encoder. The
  binding follows [Documentation/devicetree/bindings/graph.txt](</kernel/hardware/devicetree/bindings/graph.md>) and
  supports a single port with a single endpoint.

- See also [Documentation/devicetree/bindings/display/tilcdc/panel.txt](</kernel/hardware/devicetree/bindings-display-tilcdc/panel.md>) and
  [Documentation/devicetree/bindings/display/bridge/ti,tfp410.yaml](</kernel/hardware/devicetree-bindings/dt-display/bridge/ti-tfp410.md>) for connecting
  tfp410 DVI encoder or lcd panel to lcdc

\[1\] There is an errata about AM335x color wiring. For 16-bit color mode

```text
    the wires work as they should (LCD_DATA[0:4] is for Blue[3:7]),
    but for 24 bit color modes the wiring of blue and red components is
    crossed and LCD_DATA[0:4] is for Red[3:7] and LCD_DATA[11:15] is
    for Blue[3-7]. For more details see section 3.1.1 in AM335x
    Silicon Errata:
    https://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprz360
```

## Example:

```dts
	fb: fb@4830e000 {
		compatible = "ti,am33xx-tilcdc", "ti,da850-tilcdc";
		reg = <0x4830e000 0x1000>;
		interrupt-parent = <&intc>;
		interrupts = <36>;
		ti,hwmods = "lcdc";

		blue-and-red-wiring = "crossed";

		port {
			lcdc_0: endpoint {
				remote-endpoint = <&hdmi_0>;
			};
		};
	};
```

```dts
	tda19988: tda19988 {
		compatible = "nxp,tda998x";
		reg = <0x70>;

		pinctrl-names = "default", "off";
		pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
		pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;

		port {
			hdmi_0: endpoint {
				remote-endpoint = <&lcdc_0>;
			};
		};
	};
```

---

# Dma bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/dma_

> Device-tree binding reference for Dma bindings.

This file has been moved to [dma-controller.yaml](</kernel/hardware/devicetree-bindings/dt-dma/dma-controller.md>).

---

# IMG Multi-threaded DMA Controller (MDC)

_Peios Kernel / Hardware and drivers / Device tree / bindings/dma_

> Device-tree binding reference for IMG Multi-threaded DMA Controller (MDC).

## Required properties:

```text
- compatible: Must be "img,pistachio-mdc-dma".
- reg: Must contain the base address and length of the MDC registers.
- interrupts: Must contain all the per-channel DMA interrupts.
- clocks: Must contain an entry for each entry in clock-names.
  See ../clock/clock-bindings.txt for details.
- clock-names: Must include the following entries:
  - sys: MDC system interface clock.
- img,cr-periph: Must contain a phandle to the peripheral control syscon
  node which contains the DMA request to channel mapping registers.
- img,max-burst-multiplier: Must be the maximum supported burst size multiplier.
  The maximum burst size is this value multiplied by the hardware-reported bus
  width.
- #dma-cells: Must be 3:
  - The first cell is the peripheral's DMA request line.
  - The second cell is a bitmap specifying to which channels the DMA request
    line may be mapped (i.e. bit N set indicates channel N is usable).
  - The third cell is the thread ID to be used by the channel.
```

## Optional properties:

- dma-channels: Number of supported DMA channels, up to 32.  If not specified
  the number reported by the hardware is used.

## Example:

```dts
mdc: dma-controller@18143000 {
	compatible = "img,pistachio-mdc-dma";
	reg = <0x18143000 0x1000>;
	interrupts = <GIC_SHARED 27 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SHARED 28 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SHARED 29 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SHARED 30 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SHARED 31 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SHARED 32 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SHARED 33 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SHARED 34 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SHARED 35 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SHARED 36 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SHARED 37 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SHARED 38 IRQ_TYPE_LEVEL_HIGH>;
	clocks = <&system_clk>;
	clock-names = "sys";

	img,max-burst-multiplier = <16>;
	img,cr-periph = <&cr_periph>;

	#dma-cells = <3>;
};
```

```dts
spi@18100f00 {
	...
	dmas = <&mdc 9 0xffffffff 0>, <&mdc 10 0xffffffff 0>;
	dma-names = "tx", "rx";
	...
};
```

---

# Hisilicon K3 DMA controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/dma_

> Device-tree binding reference for Hisilicon K3 DMA controller.

See [dma.txt](</kernel/hardware/devicetree/bindings-dma/dma.md>) first

## Required properties:

- compatible: Must be one of
- "hisilicon,k3-dma-1.0"
- "hisilicon,hisi-pcm-asp-dma-1.0"
- reg: Should contain DMA registers location and length.
- interrupts: Should contain one interrupt shared by all channel
- #dma-cells: see [dma.txt](</kernel/hardware/devicetree/bindings-dma/dma.md>), should be 1, para number
- dma-channels: physical channels supported
- dma-requests: virtual channels supported, each virtual channel
  have specific request line
- clocks: clock required

## Example:

## Controller:

```dts
		dma0: dma@fcd02000 {
			compatible = "hisilicon,k3-dma-1.0";
			reg = <0xfcd02000 0x1000>;
			#dma-cells = <1>;
			dma-channels = <16>;
			dma-requests = <27>;
			interrupts = <0 12 4>;
			clocks = <&pclk>;
		};
```

## Client:

Use specific request line passing from dmax
For example, i2c0 read channel request line is 18, while write channel use 19

```dts
		i2c0: i2c@fcb08000 {
			compatible = "snps,designware-i2c";
			dmas =	<&dma0 18          /* read channel */
				 &dma0 19>;        /* write channel */
			dma-names = "rx", "tx";
		};
```

```dts
		i2c1: i2c@fcb09000 {
			compatible = "snps,designware-i2c";
			dmas =	<&dma0 20          /* read channel */
				 &dma0 21>;        /* write channel */
			dma-names = "rx", "tx";
		};
```

---

# Milbeaut AHB DMA Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/dma_

> Device-tree binding reference for Milbeaut AHB DMA Controller.

Milbeaut AHB DMA controller has transfer capability below.

- device to memory transfer
- memory to device transfer

## Required property:

- compatible:       Should be  "socionext,milbeaut-m10v-hdmac"
- reg:              Should contain DMA registers location and length.
- interrupts:       Should contain all of the per-channel DMA interrupts.
  Number of channels is configurable - 2, 4 or 8, so
  the number of interrupts specified should be {2,4,8}.
- #dma-cells:       Should be 1. Specify the ID of the slave.
- clocks:           Phandle to the clock used by the HDMAC module.

## Example:

```dts
	hdmac1: dma-controller@1e110000 {
		compatible = "socionext,milbeaut-m10v-hdmac";
		reg = <0x1e110000 0x10000>;
		interrupts = <0 132 4>,
			     <0 133 4>,
			     <0 134 4>,
			     <0 135 4>,
			     <0 136 4>,
			     <0 137 4>,
			     <0 138 4>,
			     <0 139 4>;
		#dma-cells = <1>;
		clocks = <&dummy_clk>;
	};
```

---

# Milbeaut AXI DMA Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/dma_

> Device-tree binding reference for Milbeaut AXI DMA Controller.

Milbeaut AXI DMA controller has only memory to memory transfer capability.

- DMA controller

## Required property:

- compatible: 	Should be  "socionext,milbeaut-m10v-xdmac"
- reg:		Should contain DMA registers location and length.
- interrupts: 	Should contain all of the per-channel DMA interrupts.
  Number of channels is configurable - 2, 4 or 8, so
  the number of interrupts specified should be {2,4,8}.
- #dma-cells: 	Should be 1.

## Example:

```dts
	xdmac0: dma-controller@1c250000 {
		compatible = "socionext,milbeaut-m10v-xdmac";
		reg = <0x1c250000 0x1000>;
		interrupts = <0 17 0x4>,
			     <0 18 0x4>,
			     <0 19 0x4>,
			     <0 20 0x4>;
		#dma-cells = <1>;
	};
```

---

# MOXA ART DMA Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/dma_

> Device-tree binding reference for MOXA ART DMA Controller.

See [dma.txt](</kernel/hardware/devicetree/bindings-dma/dma.md>) first

## Required properties:

- compatible :	Must be "moxa,moxart-dma"
- reg :		Should contain registers location and length
- interrupts :	Should contain an interrupt-specifier for the sole
  interrupt generated by the device
- #dma-cells :	Should be 1, a single cell holding a line request number

## Example:

```dts
	dma: dma@90500000 {
		compatible = "moxa,moxart-dma";
		reg = <0x90500080 0x40>;
		interrupts = <24 0>;
		#dma-cells = <1>;
	};
```

## Clients:

DMA clients connected to the MOXA ART DMA controller must use the format
described in the [dma.txt](</kernel/hardware/devicetree/bindings-dma/dma.md>) file, using a two-cell specifier for each channel:
a phandle plus one integer cells.
The two cells in order are:

1. A phandle pointing to the DMA controller.
2. Peripheral identifier for the hardware handshaking interface.

## Example:

Use specific request line passing from dma
For example, MMC request line is 5

```dts
	mmc: mmc@98e00000 {
		compatible = "moxa,moxart-mmc";
		reg = <0x98e00000 0x5C>;
		interrupts = <5 0>;
		clocks = <&clk_apb>;
		dmas =  <&dma 5>,
			<&dma 5>;
		dma-names = "tx", "rx";
	};
```

---

# Freescale MPC512x and MPC8308 DMA Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/dma_

> Device-tree binding reference for Freescale MPC512x and MPC8308 DMA Controller.

The DMA controller in Freescale MPC512x and MPC8308 SoCs can move
blocks of memory contents between memory and peripherals or
from memory to memory.

Refer to "Generic DMA Controller and DMA request bindings" in
the dma/dma.txt file for a more detailed description of binding.

## Required properties:

- compatible: should be "fsl,mpc5121-dma" or "fsl,mpc8308-dma";
- reg: should contain the DMA controller registers location and length;
- interrupt for the DMA controller: syntax of interrupt client node
  is described in interrupt-controller/interrupts.txt file.
- #dma-cells: the length of the DMA specifier, must be &lt;1&gt;.
  Each channel of this DMA controller has a peripheral request line,
  the assignment is fixed in hardware. This one cell
  in dmas property of a client device represents the channel number.

## Example:

```dts
	dma0: dma@14000 {
		compatible = "fsl,mpc5121-dma";
		reg = <0x14000 0x1800>;
		interrupts = <65 0x8>;
		#dma-cells = <1>;
	};
```

DMA clients must use the format described in dma/dma.txt file.

---

# Renesas "Type-AXI" NBPFAXI* DMA controllers

_Peios Kernel / Hardware and drivers / Device tree / bindings/dma_

> Device-tree binding reference for Renesas "Type-AXI" NBPFAXI* DMA controllers.

- DMA controller

Required properties

- compatible:	must be one of
  "renesas,nbpfaxi64dmac1b4"
  "renesas,nbpfaxi64dmac1b8"
  "renesas,nbpfaxi64dmac1b16"
  "renesas,nbpfaxi64dmac4b4"
  "renesas,nbpfaxi64dmac4b8"
  "renesas,nbpfaxi64dmac4b16"
  "renesas,nbpfaxi64dmac8b4"
  "renesas,nbpfaxi64dmac8b8"
  "renesas,nbpfaxi64dmac8b16"
- #dma-cells:	must be 2: the first integer is a terminal number, to which this
  slave is connected, the second one is flags. Flags is a bitmask
  with the following bits defined:

```text
#define NBPF_SLAVE_RQ_HIGH	1
#define NBPF_SLAVE_RQ_LOW	2
#define NBPF_SLAVE_RQ_LEVEL	4
```

## Optional properties:

- max-burst-mem-read:	limit burst size for memory reads
  (DMA\_MEM\_TO\_MEM/DMA\_MEM\_TO\_DEV) to this value, specified in bytes, rather
  than using the maximum burst size allowed by the hardware's buffer size.
- max-burst-mem-write:	limit burst size for memory writes
  (DMA\_DEV\_TO\_MEM/DMA\_MEM\_TO\_MEM) to this value, specified in bytes, rather
  than using the maximum burst size allowed by the hardware's buffer size.
  If both max-burst-mem-read and max-burst-mem-write are set, DMA\_MEM\_TO\_MEM
  will use the lower value.

You can use dma-channels and dma-requests as described in [dma.txt](</kernel/hardware/devicetree/bindings-dma/dma.md>), although they
won't be used, this information is derived from the compatibility string.

## Example:

```dts
	dma: dma-controller@48000000 {
		compatible = "renesas,nbpfaxi64dmac8b4";
		reg = <0x48000000 0x400>;
		interrupts = <0 12 0x4
			      0 13 0x4
			      0 14 0x4
			      0 15 0x4
			      0 16 0x4
			      0 17 0x4
			      0 18 0x4
			      0 19 0x4>;
		#dma-cells = <2>;
		dma-channels = <8>;
		dma-requests = <8>;
	};
```

- DMA client

## Required properties:

dmas and dma-names are required, as described in [dma.txt](</kernel/hardware/devicetree/bindings-dma/dma.md>).

## Example:

```dts
#include <dt-bindings/dma/nbpfaxi.h>
```

...

```dts
		dmas = <&dma 0 (NBPF_SLAVE_RQ_HIGH | NBPF_SLAVE_RQ_LEVEL)
			&dma 1 (NBPF_SLAVE_RQ_HIGH | NBPF_SLAVE_RQ_LEVEL)>;
		dma-names = "rx", "tx";
```

---

# STMicroelectronics Flexible Direct Memory Access Device Tree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/dma_

> Device-tree binding reference for STMicroelectronics Flexible Direct Memory Access Device Tree bindings.

The FDMA is a general-purpose direct memory access controller capable of
supporting 16 independent DMA channels. It accepts up to 32 DMA requests.
The FDMA is based on a Slim processor which requires a firmware.

- FDMA Controller

## Required properties:

```text
- compatible	: Should be one of
		 - st,stih407-fdma-mpe31-11, "st,slim-rproc";
		 - st,stih407-fdma-mpe31-12, "st,slim-rproc";
		 - st,stih407-fdma-mpe31-13, "st,slim-rproc";
- reg		: Should contain an entry for each name in reg-names
- reg-names	: Must contain "slimcore", "dmem", "peripherals", "imem" entries
- interrupts	: Should contain one interrupt shared by all channels
- dma-channels	: Number of channels supported by the controller
- #dma-cells	: Must be <3>. See DMA client section below
- clocks	: Must contain an entry for each clock
See: Documentation/devicetree/bindings/clock/clock-bindings.txt
```

## Example:

```dts
	fdma0: dma-controller@8e20000 {
		compatible = "st,stih407-fdma-mpe31-11", "st,slim-rproc";
		reg = <0x8e20000 0x8000>,
		      <0x8e30000 0x3000>,
		      <0x8e37000 0x1000>,
		      <0x8e38000 0x8000>;
		reg-names = "slimcore", "dmem", "peripherals", "imem";
		clocks = <&clk_s_c0_flexgen CLK_FDMA>,
			 <&clk_s_c0_flexgen CLK_EXT2F_A9>,
			 <&clk_s_c0_flexgen CLK_EXT2F_A9>,
			 <&clk_s_c0_flexgen CLK_EXT2F_A9>;
		interrupts = <GIC_SPI 5 IRQ_TYPE_NONE>;
		dma-channels = <16>;
		#dma-cells = <3>;
	};
```

- DMA client

## Required properties:

- dmas: Comma separated list of dma channel requests
- dma-names: Names of the aforementioned requested channels

## Each dmas request consists of 4 cells:

1. A phandle pointing to the FDMA controller
2. The request line number
3. A 32bit mask specifying (see include/linux/platform\_data/dma-st-fdma.h)
   -bit 2-0: Holdoff value, dreq will be masked for
   0x0: 0-0.5us
   0x1: 0.5-1us
   0x2: 1-1.5us
   -bit 17: data swap
   0x0: disabled
   0x1: enabled
   -bit 21: Increment Address
   0x0: no address increment between transfers
   0x1: increment address between transfers
   -bit 22: 2 STBus Initiator Coprocessor interface
   0x0: high priority port
   0x1: low priority port
4. transfers type
   0 free running
   1 paced

## Example:

```dts
	sti_uni_player2: sti-uni-player@2 {
		compatible = "st,sti-uni-player";
		#sound-dai-cells = <0>;
		st,syscfg = <&syscfg_core>;
		clocks = <&clk_s_d0_flexgen CLK_PCM_2>;
		assigned-clocks = <&clk_s_d0_flexgen CLK_PCM_2>;
		assigned-clock-parents = <&clk_s_d0_quadfs 2>;
		assigned-clock-rates = <50000000>;
		reg = <0x8D82000 0x158>;
		interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
		dmas = <&fdma0 4 0 1>;
		dai-name = "Uni Player #1 (DAC)";
		dma-names = "tx";
		st,uniperiph-id = <2>;
		st,version = <5>;
		st,mode = "PCM";
	};
```

---

# Texas Instruments DMA Crossbar (DMA request router)

_Peios Kernel / Hardware and drivers / Device tree / bindings/dma_

> Device-tree binding reference for Texas Instruments DMA Crossbar (DMA request router).

## Required properties:

- compatible:	"ti,dra7-dma-crossbar" for DRA7xx DMA crossbar
  "ti,am335x-edma-crossbar" for AM335x and AM437x
- reg:		Memory map for accessing module
- #dma-cells:	Should be set to match with the DMA controller's dma-cells
  for ti,dra7-dma-crossbar and &lt;3&gt; for ti,am335x-edma-crossbar.
- dma-requests:	Number of DMA requests the crossbar can receive
- dma-masters:	phandle pointing to the DMA controller

The DMA controller node need to have the following poroperties:

- dma-requests:	Number of DMA requests the controller can handle

## Optional properties:

- ti,dma-safe-map: Safe routing value for unused request lines
- ti,reserved-dma-request-ranges: DMA request ranges which should not be used
  when mapping xbar input to DMA request, they are either
  allocated to be used by for example the DSP or they are used as
  memcpy channels in eDMA.

## Notes:

When requesting channel via ti,dra7-dma-crossbar, the DMA client must request
the DMA event number as crossbar ID (input to the DMA crossbar).

For ti,am335x-edma-crossbar: the meaning of parameters of dmas for clients:

```dts
dmas = <&edma_xbar 12 0 1>; where <12> is the DMA request number, <0> is the TC
```

the event should be assigned and &lt;1&gt; is the mux selection for in the crossbar.
When mux 0 is used the DMA channel can be requested directly from edma node.

## Example:

/\* DMA controller \*/

```dts
sdma: dma-controller@4a056000 {
	compatible = "ti,omap4430-sdma";
	reg = <0x4a056000 0x1000>;
	interrupts =	<GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
	#dma-cells = <1>;
	dma-channels = <32>;
	dma-requests = <127>;
};
```

/\* DMA crossbar \*/

```dts
sdma_xbar: dma-router@4a002b78 {
	compatible = "ti,dra7-dma-crossbar";
	reg = <0x4a002b78 0xfc>;
	#dma-cells = <1>;
	dma-requests = <205>;
	ti,dma-safe-map = <0>;
	/* Protect the sDMA request ranges: 10-14 and 100-126 */
	ti,reserved-dma-request-ranges = <10 5>, <100 27>;
	dma-masters = <&sdma>;
};
```

/\* DMA client \*/

```dts
uart1: serial@4806a000 {
	compatible = "ti,omap4-uart";
	reg = <0x4806a000 0x100>;
	interrupts-extended = <&gic GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
	ti,hwmods = "uart1";
	clock-frequency = <48000000>;
	/* Requesting crossbar input 49 and 50 */
	dmas = <&sdma_xbar 49>, <&sdma_xbar 50>;
	dma-names = "tx", "rx";
};
```

---

# Texas Instruments eDMA

_Peios Kernel / Hardware and drivers / Device tree / bindings/dma_

> Device-tree binding reference for Texas Instruments eDMA.

The eDMA3 consists of two components: Channel controller (CC) and Transfer
Controller(s) (TC). The CC is the main entry for DMA users since it is
responsible for the DMA channel handling, while the TCs are responsible to
execute the actual DMA tansfer.

---

eDMA3 Channel Controller

## Required properties:

```text
- compatible:	Should be:
		- "ti,edma3-tpcc" for the channel controller(s) on OMAP,
		  AM33xx and AM43xx SoCs.
		- "ti,k2g-edma3-tpcc", "ti,edma3-tpcc" for the
		  channel controller(s) on 66AK2G.
- #dma-cells:	Should be set to <2>. The first number is the DMA request
		number and the second is the TC the channel is serviced on.
- reg:		Memory map of eDMA CC
- reg-names:	"edma3_cc"
- interrupts:	Interrupt lines for CCINT, MPERR and CCERRINT.
- interrupt-names: "edma3_ccint", "edma3_mperr" and "edma3_ccerrint"
- ti,tptcs:	List of TPTCs associated with the eDMA in the following form:
		<&tptc_phandle TC_priority_number>. The highest priority is 0.
```

## SoC-specific Required properties:

The following are mandatory properties for OMAP, AM33xx and AM43xx SoCs only:

- ti,hwmods:	Name of the hwmods associated to the eDMA CC.

## The following are mandatory properties for 66AK2G SoCs only:

- power-domains:Should contain a phandle to a PM domain provider node
  and an args specifier containing the device id
  value. This property is as per the binding,
  [Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml](</kernel/hardware/devicetree-bindings/dt-soc/ti/sci-pm-domain.md>)

## Optional properties:

- ti,edma-memcpy-channels: List of channels allocated to be used for memcpy, iow
  these channels will be SW triggered channels. See example.
- ti,edma-reserved-slot-ranges: PaRAM slot ranges which should not be used by
  the driver, they are allocated to be used by for example the
  DSP. See example.
- dma-channel-mask: Mask of usable channels.
  Single uint32 for EDMA with 32 channels, array of two uint32 for
  EDMA with 64 channels. See example and
  [Documentation/devicetree/bindings/dma/dma-common.yaml](</kernel/hardware/devicetree-bindings/dt-dma/dma-common.md>)

---

eDMA3 Transfer Controller

## Required properties:

```text
- compatible:	Should be:
		- "ti,edma3-tptc" for the transfer controller(s) on OMAP,
		  AM33xx and AM43xx SoCs.
		- "ti,k2g-edma3-tptc", "ti,edma3-tptc" for the
		  transfer controller(s) on 66AK2G.
- reg:		Memory map of eDMA TC
- interrupts:	Interrupt number for TCerrint.
```

## SoC-specific Required properties:

The following are mandatory properties for OMAP, AM33xx and AM43xx SoCs only:

- ti,hwmods:	Name of the hwmods associated to the eDMA TC.

## The following are mandatory properties for 66AK2G SoCs only:

- power-domains:Should contain a phandle to a PM domain provider node
  and an args specifier containing the device id
  value. This property is as per the binding,
  [Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml](</kernel/hardware/devicetree-bindings/dt-soc/ti/sci-pm-domain.md>)

## Optional properties:

- interrupt-names: "edma3\_tcerrint"

---

Examples:

```text
1.
edma: edma@49000000 {
	compatible = "ti,edma3-tpcc";
	ti,hwmods = "tpcc";
	reg =	<0x49000000 0x10000>;
	reg-names = "edma3_cc";
	interrupts = <12 13 14>;
	interrupt-names = "edma3_ccint", "edma3_mperr", "edma3_ccerrint";
	dma-requests = <64>;
	#dma-cells = <2>;
```

```dts
	ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 7>, <&edma_tptc2 0>;
```

```text
	/* Channel 20 and 21 is allocated for memcpy */
	ti,edma-memcpy-channels = <20 21>;
	/* The following PaRAM slots are reserved: 35-44 and 100-109 */
	ti,edma-reserved-slot-ranges = <35 10>, <100 10>;
	/* The following channels are reserved: 35-44 */
	dma-channel-mask = <0xffffffff /* Channel 0-31 */
			    0xffffe007>; /* Channel 32-63 */
```

```dts
};
```

```dts
edma_tptc0: tptc@49800000 {
	compatible = "ti,edma3-tptc";
	ti,hwmods = "tptc0";
	reg =	<0x49800000 0x100000>;
	interrupts = <112>;
	interrupt-names = "edm3_tcerrint";
};
```

```dts
edma_tptc1: tptc@49900000 {
	compatible = "ti,edma3-tptc";
	ti,hwmods = "tptc1";
	reg =	<0x49900000 0x100000>;
	interrupts = <113>;
	interrupt-names = "edm3_tcerrint";
};
```

```dts
edma_tptc2: tptc@49a00000 {
	compatible = "ti,edma3-tptc";
	ti,hwmods = "tptc2";
	reg =	<0x49a00000 0x100000>;
	interrupts = <114>;
	interrupt-names = "edm3_tcerrint";
};
```

```dts
sham: sham@53100000 {
	compatible = "ti,omap4-sham";
	ti,hwmods = "sham";
	reg = <0x53100000 0x200>;
	interrupts = <109>;
	/* DMA channel 36 executed on eDMA TC0 - low priority queue */
	dmas = <&edma 36 0>;
	dma-names = "rx";
};
```

```dts
mcasp0: mcasp@48038000 {
	compatible = "ti,am33xx-mcasp-audio";
	ti,hwmods = "mcasp0";
	reg = <0x48038000 0x2000>,
		<0x46000000 0x400000>;
	reg-names = "mpu", "dat";
	interrupts = <80>, <81>;
	interrupt-names = "tx", "rx";
	/* DMA channels 8 and 9 executed on eDMA TC2 - high priority queue */
	dmas = <&edma 8 2>,
	       <&edma 9 2>;
	dma-names = "tx", "rx";
};
```

```text
2.
edma1: edma@2728000 {
	compatible = "ti,k2g-edma3-tpcc", "ti,edma3-tpcc";
	reg =	<0x02728000 0x8000>;
	reg-names = "edma3_cc";
	interrupts = <GIC_SPI 208 IRQ_TYPE_EDGE_RISING>,
			<GIC_SPI 219 IRQ_TYPE_EDGE_RISING>,
			<GIC_SPI 220 IRQ_TYPE_EDGE_RISING>;
	interrupt-names = "edma3_ccint", "emda3_mperr",
			  "edma3_ccerrint";
	dma-requests = <64>;
	#dma-cells = <2>;
```

```dts
	ti,tptcs = <&edma1_tptc0 7>, <&edma1_tptc1 0>;
```

```text
	/*
	 * memcpy is disabled, can be enabled with:
	 * ti,edma-memcpy-channels = <12 13 14 15>;
	 * for example.
	 */
```

```dts
	power-domains = <&k2g_pds 0x4f>;
};
```

```dts
edma1_tptc0: tptc@27b0000 {
	compatible = "ti,k2g-edma3-tptc", "ti,edma3-tptc";
	reg =	<0x027b0000 0x400>;
	power-domains = <&k2g_pds 0x4f>;
};
```

```dts
edma1_tptc1: tptc@27b8000 {
	compatible = "ti,k2g-edma3-tptc", "ti,edma3-tptc";
	reg =	<0x027b8000 0x400>;
	power-domains = <&k2g_pds 0x4f>;
};
```

```dts
mmc0: mmc@23000000 {
	compatible = "ti,k2g-hsmmc", "ti,omap4-hsmmc";
	reg = <0x23000000 0x400>;
	interrupts = <GIC_SPI 96 IRQ_TYPE_EDGE_RISING>;
	dmas = <&edma1 24 0>, <&edma1 25 0>;
	dma-names = "tx", "rx";
	bus-width = <4>;
	ti,needs-special-reset;
	no-1-8-v;
	max-frequency = <96000000>;
	power-domains = <&k2g_pds 0xb>;
	clocks = <&k2g_clks 0xb 1>, <&k2g_clks 0xb 2>;
	clock-names = "fck", "mmchsdb_fck";
};
```

---

DEPRECATED binding, new DTS files must use the ti,edma3-tpcc/ti,edma3-tptc
binding.

## Required properties:

```text
- compatible : "ti,edma3"
- #dma-cells: Should be set to <1>
              Clients should use a single channel number per DMA request.
- reg: Memory map for accessing module
- interrupts: Exactly 3 interrupts need to be specified in the order:
              1. Transfer completion interrupt.
              2. Memory protection interrupt.
              3. Error interrupt.
Optional properties:
- ti,hwmods: Name of the hwmods associated to the EDMA
- ti,edma-xbar-event-map: Crossbar event to channel map
```

## Deprecated properties:

Listed here in case one wants to boot an old kernel with new DTB. These
properties might need to be added to the new DTS files.

- ti,edma-regions: Number of regions
- ti,edma-slots: Number of slots
- dma-channels: Specify total DMA channels per CC

## Example:

```dts
edma: edma@49000000 {
	reg = <0x49000000 0x10000>;
	interrupt-parent = <&intc>;
	interrupts = <12 13 14>;
	compatible = "ti,edma3";
	ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
	#dma-cells = <1>;
	ti,edma-xbar-event-map = /bits/ 16 <1 12
					    2 13>;
};
```

---

# Xilinx dma bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/dma/xilinx_

> Device-tree binding reference for Xilinx dma bindings.

Xilinx AXI VDMA engine, it does transfers between memory and video devices.
It can be configured to have one channel or two channels. If configured
as two channels, one is to transmit to the video device and another is
to receive from the video device.

Xilinx AXI DMA engine, it does transfers between memory and AXI4 stream
target devices. It can be configured to have one channel or two channels.
If configured as two channels, one is to transmit to the device and another
is to receive from the device.

Xilinx AXI CDMA engine, it does transfers between memory-mapped source
address and a memory-mapped destination address.

Xilinx AXI MCDMA engine, it does transfer between memory and AXI4 stream
target devices. It can be configured to have up to 16 independent transmit
and receive channels.

## Required properties:

- compatible: Should be one of-
  "xlnx,axi-vdma-1.00.a"
  "xlnx,axi-dma-1.00.a"
  "xlnx,axi-cdma-1.00.a"
  "xlnx,axi-mcdma-1.00.a"
- #dma-cells: Should be &lt;1&gt;, see "dmas" property below
- reg: Should contain VDMA registers location and length.
- xlnx,addrwidth: Should be the vdma addressing size in bits(ex: 32 bits).
- dma-ranges: Should be as the following &lt;dma\_addr cpu\_addr max\_len&gt;.
- dma-channel child node: Should have at least one channel and can have up to
  two channels per device. This node specifies the properties of each
  DMA channel (see child node properties below).
- clocks: Input clock specifier. Refer to common clock bindings.
- clock-names: List of input clocks
  For VDMA:
  Required elements: "s\_axi\_lite\_aclk"
  Optional elements: "m\_axi\_mm2s\_aclk" "m\_axi\_s2mm\_aclk",
  "m\_axis\_mm2s\_aclk", "s\_axis\_s2mm\_aclk"
  For CDMA:
  Required elements: "s\_axi\_lite\_aclk", "m\_axi\_aclk"
  For AXIDMA and MCDMA:
  Required elements: "s\_axi\_lite\_aclk"
  Optional elements: "m\_axi\_mm2s\_aclk", "m\_axi\_s2mm\_aclk",
  "m\_axi\_sg\_aclk"

## Required properties for VDMA:

- xlnx,num-fstores: Should be the number of framebuffers as configured in h/w.

## Optional properties for AXI DMA and MCDMA:

- xlnx,sg-length-width: Should be set to the width in bits of the length
  register as configured in h/w. Takes values {8...26}. If the property
  is missing or invalid then the default value 23 is used. This is the
  maximum value that is supported by all IP versions.

## Optional properties for AXI DMA:

- xlnx,axistream-connected: Tells whether DMA is connected to AXI stream IP.
- xlnx,irq-delay: Tells the interrupt delay timeout value. Valid range is from
  0-255. Setting this value to zero disables the delay timer interrupt.
  1 timeout interval = 125 \* clock period of SG clock.
  Optional properties for VDMA:
- xlnx,flush-fsync: Tells which channel to Flush on Frame sync.
  It takes following values:
  {1}, flush both channels
  {2}, flush mm2s channel
  {3}, flush s2mm channel

## Required child node properties:

- compatible:
  For VDMA: It should be either "xlnx,axi-vdma-mm2s-channel" or
  "xlnx,axi-vdma-s2mm-channel".
  For CDMA: It should be "xlnx,axi-cdma-channel".
  For AXIDMA and MCDMA: It should be either "xlnx,axi-dma-mm2s-channel"
  or "xlnx,axi-dma-s2mm-channel".
- interrupts: Should contain per channel VDMA interrupts.
- xlnx,datawidth: Should contain the stream data width, take values
  {32,64...1024}.

## Optional child node properties:

- xlnx,include-dre: Tells hardware is configured for Data
  Realignment Engine.
  Optional child node properties for VDMA:
- xlnx,genlock-mode: Tells Genlock synchronization is
  enabled/disabled in hardware.
- xlnx,enable-vert-flip: Tells vertical flip is
  enabled/disabled in hardware(S2MM path).
  Optional child node properties for MCDMA:
- dma-channels: Number of dma channels in child node.

## Example:

```text
++++++++
```

```dts
axi_vdma_0: axivdma@40030000 {
	compatible = "xlnx,axi-vdma-1.00.a";
	#dma_cells = <1>;
	reg = < 0x40030000 0x10000 >;
	dma-ranges = <0x00000000 0x00000000 0x40000000>;
	xlnx,num-fstores = <0x8>;
	xlnx,flush-fsync = <0x1>;
	xlnx,addrwidth = <0x20>;
	clocks = <&clk 0>, <&clk 1>, <&clk 2>, <&clk 3>, <&clk 4>;
	clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk",
		      "m_axis_mm2s_aclk", "s_axis_s2mm_aclk";
	dma-channel@40030000 {
		compatible = "xlnx,axi-vdma-mm2s-channel";
		interrupts = < 0 54 4 >;
		xlnx,datawidth = <0x40>;
	} ;
	dma-channel@40030030 {
		compatible = "xlnx,axi-vdma-s2mm-channel";
		interrupts = < 0 53 4 >;
		xlnx,datawidth = <0x40>;
	} ;
} ;
```

---

# Maxim Integrated MAX3355 USB OTG chip

_Peios Kernel / Hardware and drivers / Device tree / bindings/extcon_

> Device-tree binding reference for Maxim Integrated MAX3355 USB OTG chip.

MAX3355 integrates a charge pump and comparators to enable a system with an
integrated USB OTG dual-role transceiver to function as a USB OTG dual-role
device.

## Required properties:

- compatible: should be "maxim,max3355";
- maxim,shdn-gpios: should contain a phandle and GPIO specifier for the GPIO pin
  connected to the MAX3355's SHDN# pin;
- id-gpios: should contain a phandle and GPIO specifier for the GPIO pin
  connected to the MAX3355's ID\_OUT pin.

## Example:

```dts
	usb-otg {
		compatible = "maxim,max3355";
		maxim,shdn-gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
		id-gpios = <&gpio5 31 GPIO_ACTIVE_HIGH>;
	};
```

---

# EXTCON FOR PALMAS/TWL CHIPS

_Peios Kernel / Hardware and drivers / Device tree / bindings/extcon_

> Device-tree binding reference for EXTCON FOR PALMAS/TWL CHIPS.

PALMAS USB COMPARATOR
Required Properties:

```text
 - compatible: should contain one of:
   * "ti,palmas-usb-vid".
   * "ti,twl6035-usb-vid".
   * "ti,palmas-usb" (DEPRECATED - use "ti,palmas-usb-vid").
   * "ti,twl6035-usb" (DEPRECATED - use "ti,twl6035-usb-vid").
```

## Optional Properties:

- ti,wakeup : To enable the wakeup comparator in probe
- ti,enable-id-detection: Perform ID detection. If id-gpio is specified
  it performs id-detection using GPIO else using OTG core.
- ti,enable-vbus-detection: Perform VBUS detection.
- id-gpio: gpio for GPIO ID detection. See gpio binding.
- debounce-delay-ms: debounce delay for GPIO ID pin in milliseconds.

```dts
palmas-usb {
       compatible = "ti,twl6035-usb", "ti,palmas-usb";
       ti,wakeup;
};
```

---

# COREBOOT firmware information

_Peios Kernel / Hardware and drivers / Device tree / bindings/firmware_

> Device-tree binding reference for COREBOOT firmware information.

The device tree node to communicate the location of coreboot's memory-resident
bookkeeping structures to the kernel. Since coreboot itself cannot boot a
device-tree-based kernel (yet), this node needs to be inserted by a
second-stage bootloader (a coreboot "payload").

## Required properties:

- compatible: Should be "coreboot"
- reg: Address and length of the following two memory regions, in order:
  1.) The coreboot table. This is a list of variable-sized descriptors
  that contain various compile- and run-time generated firmware
  parameters. It is identified by the magic string "LBIO" in its first
  four bytes.
  See coreboot's src/commonlib/include/commonlib/coreboot\_tables.h for
  details.
  2.) The CBMEM area. This is a downward-growing memory region used by
  coreboot to dynamically allocate data structures that remain resident.
  It may or may not include the coreboot table as one of its members. It
  is identified by a root node descriptor with the magic number
  0xc0389481 that resides in the topmost 8 bytes of the area.
  See coreboot's src/include/imd.h for details.

## Example:

```dts
	firmware {
		ranges;

		coreboot {
			compatible = "coreboot";
			reg = <0xfdfea000 0x264>,
			      <0xfdfea000 0x16000>;
		}
	};
```

---

# NVIDIA Tegra210 Boot and Power Management Processor (BPMP)

_Peios Kernel / Hardware and drivers / Device tree / bindings/firmware_

> Device-tree binding reference for NVIDIA Tegra210 Boot and Power Management Processor (BPMP).

The Boot and Power Management Processor (BPMP) is a co-processor found
in Tegra210 SoC. It is designed to handle the early stages of the boot
process as well as to assisting in entering deep low power state
(suspend to ram), and also offloading DRAM memory clock scaling on
some platforms. The binding document defines the resources that would
be used by the BPMP T210 firmware driver, which can create the
interprocessor communication (IPC) between the CPU and BPMP.

## Required properties:

```text
- compatible
    Array of strings
    One of:
    - "nvidia,tegra210-bpmp"
- reg: physical base address and length for HW synchornization primitives
       1) base address and length to Tegra 'atomics' hardware
       2) base address and length to Tegra 'semaphore' hardware
- interrupts: specifies the interrupt number for receiving messages ("rx")
              and for triggering messages ("tx")
```

## Optional properties:

- #clock-cells : Should be 1 for platforms where DRAM clock control is
  offloaded to bpmp.

## Example:

```dts
bpmp@70016000 {
	compatible = "nvidia,tegra210-bpmp";
	reg = <0x0 0x70016000 0x0 0x2000
	       0x0 0x60001000 0x0 0x1000>;
	interrupts = <GIC_SPI 6 IRQ_TYPE_EDGE_RISING>,
		     <GIC_SPI 4 IRQ_TYPE_EDGE_RISING>;
	interrupt-names = "tx", "rx";
};
```

---

# Altera Arria10 Partial Reconfiguration IP

_Peios Kernel / Hardware and drivers / Device tree / bindings/fpga_

> Device-tree binding reference for Altera Arria10 Partial Reconfiguration IP.

## Required properties:

- compatible : should contain "altr,a10-pr-ip"
- reg        : base address and size for memory mapped io.

## Example:

```dts
	fpga_mgr: fpga-mgr@ff20c000 {
		compatible = "altr,a10-pr-ip";
		reg = <0xff20c000 0x10>;
	};
```

---

# Altera SOCFPGA Arria10 FPGA Manager

_Peios Kernel / Hardware and drivers / Device tree / bindings/fpga_

> Device-tree binding reference for Altera SOCFPGA Arria10 FPGA Manager.

## Required properties:

```text
- compatible : should contain "altr,socfpga-a10-fpga-mgr"
- reg        : base address and size for memory mapped io.
               - The first index is for FPGA manager register access.
               - The second index is for writing FPGA configuration data.
- resets     : Phandle and reset specifier for the device's reset.
- clocks     : Clocks used by the device.
```

## Example:

```dts
	fpga_mgr: fpga-mgr@ffd03000 {
		compatible = "altr,socfpga-a10-fpga-mgr";
		reg = <0xffd03000 0x100
		       0xffcfe400 0x20>;
		clocks = <&l4_mp_clk>;
		resets = <&rst FPGAMGR_RESET>;
	};
```

---

# Altera SOCFPGA FPGA Manager

_Peios Kernel / Hardware and drivers / Device tree / bindings/fpga_

> Device-tree binding reference for Altera SOCFPGA FPGA Manager.

## Required properties:

```text
- compatible : should contain "altr,socfpga-fpga-mgr"
- reg        : base address and size for memory mapped io.
               - The first index is for FPGA manager register access.
               - The second index is for writing FPGA configuration data.
- interrupts : interrupt for the FPGA Manager device.
```

## Example:

```dts
	hps_0_fpgamgr: fpgamgr@ff706000 {
		compatible = "altr,socfpga-fpga-mgr";
		reg = <0xFF706000 0x1000
		       0xFFB90000 0x1000>;
		interrupts = <0 175 4>;
	};
```

---

# Lattice MachXO2 Slave SPI FPGA Manager

_Peios Kernel / Hardware and drivers / Device tree / bindings/fpga_

> Device-tree binding reference for Lattice MachXO2 Slave SPI FPGA Manager.

Lattice MachXO2 FPGAs support a method of loading the bitstream over
'slave SPI' interface.

See 'MachXO2ProgrammingandConfigurationUsageGuide.pdf' on www.latticesemi.com

## Required properties:

- compatible: should contain "lattice,machxo2-slave-spi"
- reg: spi chip select of the FPGA

## Example for full FPGA configuration:

```dts
	fpga-region0 {
		compatible = "fpga-region";
		fpga-mgr = <&fpga_mgr_spi>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
	};
```

```dts
	spi1: spi@2000 {
        ...

		fpga_mgr_spi: fpga-mgr@0 {
			compatible = "lattice,machxo2-slave-spi";
			spi-max-frequency = <8000000>;
			reg = <0>;
		};
	};
```

---

# FSI bus & engine generic device tree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/fsi_

> Device-tree binding reference for FSI bus & engine generic device tree bindings.

The FSI bus is probe-able, so the OS is able to enumerate FSI slaves, and
engines within those slaves. However, we have a facility to match devicetree
nodes to probed engines. This allows for fsi engines to expose non-probeable
busses, which are then exposed by the device tree. For example, an FSI engine
that is an I2C master - the I2C bus can be described by the device tree under
the engine's device tree node.

FSI masters may require their own DT nodes (to describe the master HW itself);
that requirement is defined by the master's implementation, and is described by
the fsi-master-\* binding specifications.

Under the masters' nodes, we can describe the bus topology using nodes to
represent the FSI slaves and their slave engines. As a basic outline:

```dts
  fsi-master {
      /* top-level of FSI bus topology, bound to an FSI master driver and
       * exposes an FSI bus */

      fsi-slave@<link,id> {
          /* this node defines the FSI slave device, and is handled
           * entirely with FSI core code */

          fsi-slave-engine@<addr> {
              /* this node defines the engine endpoint & address range, which
               * is bound to the relevant fsi device driver */
               ...
          };

          fsi-slave-engine@<addr> {
              ...
          };

      };
  };
```

Note that since the bus is probe-able, some (or all) of the topology may
not be described; this binding only provides an optional facility for
adding subordinate device tree nodes as children of FSI engines.

## FSI masters

FSI master nodes declare themselves as such with the "fsi-master" compatible
value. It's likely that an implementation-specific compatible value will
be needed as well, for example:

```dts
    compatible = "fsi-master-gpio", "fsi-master";
```

Since the master nodes describe the top-level of the FSI topology, they also
need to declare the FSI-standard addressing scheme. This requires two cells for
addresses (link index and slave ID), and no size:

```dts
    #address-cells = <2>;
    #size-cells = <0>;
```

An optional boolean property can be added to indicate that a particular master
should not scan for connected devices at initialization time.  This is
necessary in cases where a scan could cause arbitration issues with other
masters that may be present on the bus.

```text
    no-scan-on-init;
```

## FSI slaves

Slaves are identified by a (link-index, slave-id) pair, so require two cells
for an address identifier. Since these are not a range, no size cells are
required. For an example, a slave on link 1, with ID 2, could be represented
as:

```dts
    cfam@1,2 {
        reg = <1 2>;
	[...];
    }
```

Each slave provides an address-space, under which the engines are accessible.
That address space has a maximum of 23 bits, so we use one cell to represent
addresses and sizes in the slave address space:

```dts
    #address-cells = <1>;
    #size-cells = <1>;
```

Optionally, a slave can provide a global unique chip ID which is used to
identify the physical location of the chip in a system specific way

```dts
    chip-id = <0>;
```

## FSI engines (devices)

Engines are identified by their address under the slaves' address spaces. We
use a single cell for address and size. Engine nodes represent the endpoint
FSI device, and are passed to those FSI device drivers' -&gt;probe() functions.

For example, for a slave using a single 0x400-byte page starting at address
0xc00:

```dts
    engine@c00 {
        reg = <0xc00 0x400>;
    };
```

## Full example

## Here's an example that illustrates:

```text
 - an FSI master
   - connected to an FSI slave
     - that contains an engine that is an I2C master
       - connected to an I2C EEPROM
```

The FSI master may be connected to additional slaves, and slaves may have
additional engines, but they don't necessarily need to be describe in the
device tree if no extra platform information is required.

```text
    /* The GPIO-based FSI master node, describing the top level of the
     * FSI bus
     */
    gpio-fsi {
        compatible = "fsi-master-gpio", "fsi-master";
        #address-cells = <2>;
        #size-cells = <0>;
```

```text
        /* A FSI slave (aka. CFAM) at link 0, ID 0. */
        cfam@0,0 {
            reg = <0 0>;
            #address-cells = <1>;
            #size-cells = <1>;
	    chip-id = <0>;
```

```text
            /* FSI engine at 0xc00, using a single page. In this example,
             * it's an I2C master controller, so subnodes describe the
             * I2C bus.
             */
            i2c-controller@c00 {
                reg = <0xc00 0x400>;
```

```text
                /* Engine-specific data. In this case, we're describing an
                 * I2C bus, so we're conforming to the generic I2C binding
                 */
                compatible = "some-vendor,fsi-i2c-controller";
                #address-cells = <1>;
                #size-cells = <1>;
```

```text
                /* I2C endpoint device: an Atmel EEPROM */
                eeprom@50 {
                    compatible = "atmel,24c256";
                    reg = <0x50>;
                    pagesize = <64>;
                };
            };
        };
    };
```

---

# Avionic Design N-bit GPIO expander bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/gpio_

> Device-tree binding reference for Avionic Design N-bit GPIO expander bindings.

## Required properties:

```text
- compatible: should be "ad,gpio-adnp"
- reg: The I2C slave address for this device.
- interrupts: Interrupt specifier for the controllers interrupt.
- #gpio-cells: Should be 2. The first cell is the GPIO number and the
  second cell is used to specify optional parameters:
  - bit 0: polarity (0: normal, 1: inverted)
- gpio-controller: Marks the device as a GPIO controller
- nr-gpios: The number of pins supported by the controller.
```

The GPIO expander can optionally be used as an interrupt controller, in
which case it uses the default two cell specifier as described in
[Documentation/devicetree/bindings/interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>).

## Example:

```dts
	gpioext: gpio-controller@41 {
		compatible = "ad,gpio-adnp";
		reg = <0x41>;

		interrupt-parent = <&gpio>;
		interrupts = <160 1>;

		gpio-controller;
		#gpio-cells = <2>;

		interrupt-controller;
		#interrupt-cells = <2>;

		nr-gpios = <64>;
	};
```

---

# Exportable MPIO interface of Exar UART chips

_Peios Kernel / Hardware and drivers / Device tree / bindings/gpio_

> Device-tree binding reference for Exportable MPIO interface of Exar UART chips.

## Required properties of the device:

- exar,first-pin: first exportable pins (0..15)
- ngpios: number of exportable pins (1..16)

---

# Aeroflex Gaisler GRGPIO General Purpose I/O cores.

_Peios Kernel / Hardware and drivers / Device tree / bindings/gpio_

> Device-tree binding reference for Aeroflex Gaisler GRGPIO General Purpose I/O cores..

The GRGPIO GPIO core is available in the GRLIB VHDL IP core library.

Note: In the ordinary environment for the GRGPIO core, a Leon SPARC system,
these properties are built from information in the AMBA plug&amp;play.

## Required properties:

- name : Should be "GAISLER\_GPIO" or "01\_01a"

- reg : Address and length of the register set for the device

- interrupts : Interrupt numbers for this device

## Optional properties:

- nbits : The number of gpio lines. If not present driver assumes 32 lines.

- irqmap : An array with an index for each gpio line. An index is either a valid
  index into the interrupts property array, or 0xffffffff that indicates
  no irq for that line. Driver provides no interrupt support if not
  present.

For further information look in the documentation for the GLIB IP core library:
http://www.gaisler.com/products/grlib/grip.pdf

---

# Cavium ThunderX/OCTEON-TX GPIO controller bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/gpio_

> Device-tree binding reference for Cavium ThunderX/OCTEON-TX GPIO controller bindings.

## Required Properties:

```text
- reg: The controller bus address.
- gpio-controller: Marks the device node as a GPIO controller.
- #gpio-cells: Must be 2.
  - First cell is the GPIO pin number relative to the controller.
  - Second cell is a standard generic flag bitfield as described in gpio.txt.
```

## Optional Properties:

```text
- compatible: "cavium,thunder-8890-gpio", unused as PCI driver binding is used.
- interrupt-controller: Marks the device node as an interrupt controller.
- #interrupt-cells: Must be present and have value of 2 if
                    "interrupt-controller" is present.
  - First cell is the GPIO pin number relative to the controller.
  - Second cell is triggering flags as defined in interrupts.txt.
```

## Example:

```dts
gpio_6_0: gpio@6,0 {
	compatible = "cavium,thunder-8890-gpio";
	reg = <0x3000 0 0 0 0>; /*  DEVFN = 0x30 (6:0) */
	gpio-controller;
	#gpio-cells = <2>;
	interrupt-controller;
	#interrupt-cells = <2>;
};
```

---

# Specifying GPIO information for devices

_Peios Kernel / Hardware and drivers / Device tree / bindings/gpio_

> Device-tree binding reference for Specifying GPIO information for devices.

## 1\) gpios property

GPIO properties should be named "\[&lt;name&gt;-\]gpios", with &lt;name&gt; being the purpose
of this GPIO for the device. While a non-existent &lt;name&gt; is considered valid
for compatibility reasons (resolving to the "gpios" property), it is not allowed
for new bindings. Also, GPIO properties named "\[&lt;name&gt;-\]gpio" are valid and old
bindings use it, but are only supported for compatibility reasons and should not
be used for newer bindings since it has been deprecated.

GPIO properties can contain one or more GPIO phandles, but only in exceptional
cases should they contain more than one. If your device uses several GPIOs with
distinct functions, reference each of them under its own property, giving it a
meaningful name. The only case where an array of GPIOs is accepted is when
several GPIOs serve the same function (e.g. a parallel data line).

The exact purpose of each gpios property must be documented in the device tree
binding of the device.

The following example could be used to describe GPIO pins used as device enable
and bit-banged data signals:

```dts
	gpio1: gpio1 {
		gpio-controller;
		#gpio-cells = <2>;
	};
	[...]
```

```dts
	data-gpios = <&gpio1 12 0>,
		     <&gpio1 13 0>,
		     <&gpio1 14 0>,
		     <&gpio1 15 0>;
```

In the above example, &amp;gpio1 uses 2 cells to specify a gpio. The first cell is
a local offset to the GPIO line and the second cell represents consumer flags,
such as if the consumer desires the line to be active low (inverted) or open
drain. This is the recommended practice.

The exact meaning of each specifier cell is controller specific, and must be
documented in the device tree binding for the device, but it is strongly
recommended to use the two-cell approach.

Most controllers are specifying a generic flag bitfield in the last cell, so
for these, use the macros defined in
include/dt-bindings/gpio/gpio.h whenever possible:

## Example of a node using GPIOs:

```dts
	node {
		enable-gpios = <&qe_pio_e 18 GPIO_ACTIVE_HIGH>;
	};
```

GPIO\_ACTIVE\_HIGH is 0, so in this example gpio-specifier is "18 0" and encodes
GPIO pin number, and GPIO flags as accepted by the "qe\_pio\_e" gpio-controller.

## Optional standard bitfield specifiers for the last cell:

- Bit 0: 0 means active high, 1 means active low
- Bit 1: 0 means push-pull wiring, see:
  https://en.wikipedia.org/wiki/Push-pull\_output
  1 means single-ended wiring, see:
  https://en.wikipedia.org/wiki/Single-ended\_triode
- Bit 2: 0 means open-source, 1 means open drain, see:
  https://en.wikipedia.org/wiki/Open\_collector
- Bit 3: 0 means the output should be maintained during sleep/low-power mode
  1 means the output state can be lost during sleep/low-power mode
- Bit 4: 0 means no pull-up resistor should be enabled
  1 means a pull-up resistor should be enabled
  This setting only applies to hardware with a simple on/off
  control for pull-up configuration. If the hardware has more
  elaborate pull-up configuration, it should be represented
  using a pin control binding.
- Bit 5: 0 means no pull-down resistor should be enabled
  1 means a pull-down resistor should be enabled
  This setting only applies to hardware with a simple on/off
  control for pull-down configuration. If the hardware has more
  elaborate pull-down configuration, it should be represented
  using a pin control binding.

## 1.1) GPIO specifier best practices

A gpio-specifier should contain a flag indicating the GPIO polarity; active-
high or active-low. If it does, the following best practices should be
followed:

The gpio-specifier's polarity flag should represent the physical level at the
GPIO controller that achieves (or represents, for inputs) a logically asserted
value at the device. The exact definition of logically asserted should be
defined by the binding for the device. If the board inverts the signal between
the GPIO controller and the device, then the gpio-specifier will represent the
opposite physical level than the signal at the device's pin.

When the device's signal polarity is configurable, the binding for the
device must either:

a) Define a single static polarity for the signal, with the expectation that
any software using that binding would statically program the device to use
that signal polarity.

## The static choice of polarity may be either:

a1) (Preferred) Dictated by a binding-specific DT property.

## or:

a2) Defined statically by the DT binding itself.

In particular, the polarity cannot be derived from the gpio-specifier, since
that would prevent the DT from separately representing the two orthogonal
concepts of configurable signal polarity in the device, and possible board-
level signal inversion.

## or:

b) Pick a single option for device signal polarity, and document this choice
in the binding. The gpio-specifier should represent the polarity of the signal
(at the GPIO controller) assuming that the device is configured for this
particular signal polarity choice. If software chooses to program the device
to generate or receive a signal of the opposite polarity, software will be
responsible for correctly interpreting (inverting) the GPIO signal at the GPIO
controller.

## 2\) gpio-controller nodes

Every GPIO controller node must contain both an empty "gpio-controller"
property, and a #gpio-cells integer property, which indicates the number of
cells in a gpio-specifier.

Some system-on-chips (SoCs) use the concept of GPIO banks. A GPIO bank is an
instance of a hardware IP core on a silicon die, usually exposed to the
programmer as a coherent range of I/O addresses. Usually each such bank is
exposed in the device tree as an individual gpio-controller node, reflecting
the fact that the hardware was synthesized by reusing the same IP block a
few times over.

Optionally, a GPIO controller may have a "ngpios" property. This property
indicates the number of in-use slots of available slots for GPIOs. The
typical example is something like this: the hardware register is 32 bits
wide, but only 18 of the bits have a physical counterpart. The driver is
generally written so that all 32 bits can be used, but the IP block is reused
in a lot of designs, some using all 32 bits, some using 18 and some using

12. In this case, setting "ngpios = &lt;18&gt;;" informs the driver that only the
    first 18 GPIOs, at local offset 0 .. 17, are in use.

If these GPIOs do not happen to be the first N GPIOs at offset 0...N-1, an
additional set of tuples is needed to specify which GPIOs are unusable, with
the gpio-reserved-ranges binding. This property indicates the start and size
of the GPIOs that can't be used.

Optionally, a GPIO controller may have a "gpio-line-names" property. This is
an array of strings defining the names of the GPIO lines going out of the
GPIO controller.

For lines which are routed to on-board devices, this name should be
the most meaningful producer name for the system, such as a rail name
indicating the usage. Package names, such as a pin name, are discouraged:
such lines have opaque names (since they are by definition general-purpose)
and such names are usually not very helpful. For example "MMC-CD", "Red LED
Vdd" and "ethernet reset" are reasonable line names as they describe what
the line is used for. "GPIO0" is not a good name to give to a GPIO line
that is hard-wired to a specific device.

However, in the case of lines that are routed to a general purpose header
(e.g. the Raspberry Pi 40-pin header), and therefore are not hard-wired to
specific devices, using a pin number or the names on the header is fine
provided these are real (preferably unique) names. Using an SoC's pad name
or package name, or names made up from kernel-internal software constructs,
are strongly discouraged. For example "pin8 \[gpio14/uart0\_txd\]" is fine
if the board's documentation labels pin 8 as such. However "PortB\_24" (an
example of a name from an SoC's reference manual) would not be desirable.

In either case placeholders are discouraged: rather use the "" (blank
string) if the use of the GPIO line is undefined in your design. Ideally,
try to add comments to the dts file describing the naming convention
you have chosen, and specifying from where the names are derived.

The names are assigned starting from line offset 0, from left to right,
from the passed array. An incomplete array (where the number of passed
names is less than ngpios) will be used up until the last provided valid
line index.

## Example:

```dts
gpio-controller@00000000 {
	compatible = "foo";
	reg = <0x00000000 0x1000>;
	gpio-controller;
	#gpio-cells = <2>;
	ngpios = <18>;
	gpio-reserved-ranges = <0 4>, <12 2>;
	gpio-line-names = "MMC-CD", "MMC-WP", "VDD eth", "RST eth", "LED R",
		"LED G", "LED B", "Col A", "Col B", "Col C", "Col D",
		"Row A", "Row B", "Row C", "Row D", "NMI button",
		"poweroff", "reset";
}
```

The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism
providing automatic GPIO request and configuration as part of the
gpio-controller's driver probe function.

Each GPIO hog definition is represented as a child node of the GPIO controller.
Required properties:

- gpio-hog:   A property specifying that this child node represents a GPIO hog.
- gpios:      Store the GPIO information (id, flags, ...) for each GPIO to
  affect. Shall contain an integer multiple of the number of cells
  specified in its parent node (GPIO controller node).
  Only one of the following properties scanned in the order shown below.
  This means that when multiple properties are present they will be searched
  in the order presented below and the first match is taken as the intended
  configuration.
- input:      A property specifying to set the GPIO direction as input.
- output-low  A property specifying to set the GPIO direction as output with
  the value low.
- output-high A property specifying to set the GPIO direction as output with
  the value high.

## Optional properties:

- line-name:  The GPIO label name. If not present the node name is used.

Example of two SOC GPIO banks defined as gpio-controller nodes:

```dts
	qe_pio_a: gpio-controller@1400 {
		compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank";
		reg = <0x1400 0x18>;
		gpio-controller;
		#gpio-cells = <2>;

		line_b-hog {
			gpio-hog;
			gpios = <6 0>;
			output-low;
			line-name = "foo-bar-gpio";
		};
	};
```

```dts
	qe_pio_e: gpio-controller@1460 {
		compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";
		reg = <0x1460 0x18>;
		gpio-controller;
		#gpio-cells = <2>;
	};
```

## 2.1) gpio- and pin-controller interaction

Some or all of the GPIOs provided by a GPIO controller may be routed to pins
on the package via a pin controller. This allows muxing those pins between
GPIO and other functions. It is a fairly common practice among silicon
engineers.

## 2.2) Ordinary (numerical) GPIO ranges

It is useful to represent which GPIOs correspond to which pins on which pin
controllers. The gpio-ranges property described below represents this with
a discrete set of ranges mapping pins from the pin controller local number space
to pins in the GPIO controller local number space.

The format is: &lt;\[pin controller phandle\], \[GPIO controller offset\],

```text
                [pin controller offset], [number of pins]>;
```

The GPIO controller offset pertains to the GPIO controller node containing the
range definition.

The pin controller node referenced by the phandle must conform to the bindings
described in pinctrl/pinctrl-bindings.txt.

Each offset runs from 0 to N. It is perfectly fine to pile any number of
ranges with just one pin-to-GPIO line mapping if the ranges are concocted, but
in practice these ranges are often lumped in discrete sets.

## Example:

```dts
    gpio-ranges = <&foo 0 20 10>, <&bar 10 50 20>;
```

## This means:

- pins 20..29 on pin controller "foo" is mapped to GPIO line 0..9 and
- pins 50..69 on pin controller "bar" is mapped to GPIO line 10..29

## Verbose example:

```dts
	qe_pio_e: gpio-controller@1460 {
		#gpio-cells = <2>;
		compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";
		reg = <0x1460 0x18>;
		gpio-controller;
		gpio-ranges = <&pinctrl1 0 20 10>, <&pinctrl2 10 50 20>;
	};
```

Here, a single GPIO controller has GPIOs 0..9 routed to pin controller
pinctrl1's pins 20..29, and GPIOs 10..29 routed to pin controller pinctrl2's
pins 50..69.

## 2.3) GPIO ranges from named pin groups

It is also possible to use pin groups for gpio ranges when pin groups are the
easiest and most convenient mapping.

Both &lt;pinctrl-base&gt; and &lt;count&gt; must be set to 0 when using named pin groups
names.

The property gpio-ranges-group-names must contain exactly one string for each
range.

Elements of gpio-ranges-group-names must contain the name of a pin group
defined in the respective pin controller. The number of pins/GPIO lines in the
range is the number of pins in that pin group. The number of pins of that
group is defined in the implementation and not in the device tree.

If numerical and named pin groups are mixed, the string corresponding to a
numerical pin range in gpio-ranges-group-names must be empty.

## Example:

```dts
	gpio_pio_i: gpio-controller@14b0 {
		#gpio-cells = <2>;
		compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";
		reg = <0x1480 0x18>;
		gpio-controller;
		gpio-ranges =			<&pinctrl1 0 20 10>,
						<&pinctrl2 10 0 0>,
						<&pinctrl1 15 0 10>,
						<&pinctrl2 25 0 0>;
		gpio-ranges-group-names =	"",
						"foo",
						"",
						"bar";
	};
```

Here, three GPIO ranges are defined referring to two pin controllers.

pinctrl1 GPIO ranges are defined using pin numbers whereas the GPIO ranges
in pinctrl2 are defined using the pin groups named "foo" and "bar".

Previous versions of this binding required all pin controller nodes that
were referenced by any gpio-ranges property to contain a property named
#gpio-range-cells with value &lt;3&gt;. This requirement is now deprecated.
However, that property may still exist in older device trees for
compatibility reasons, and would still be required even in new device
trees that need to be compatible with older software.

---

# GPIO controller on CE4100 / Sodaville SoCs

_Peios Kernel / Hardware and drivers / Device tree / bindings/gpio_

> Device-tree binding reference for GPIO controller on CE4100 / Sodaville SoCs.

The bindings for CE4100's GPIO controller match the generic description
which is covered by the [gpio.txt](</kernel/hardware/devicetree/bindings-gpio/gpio.md>) file in this folder.

The only additional property is the intel,muxctl property which holds the
value which is written into the MUXCNTL register.

There is no compatible property for now because the driver is probed via
PCI id (vendor 0x8086 device 0x2e67).

The interrupt specifier consists of two cells encoded as follows:

- &lt;1st cell&gt;: The interrupt-number that identifies the interrupt source.
- &lt;2nd cell&gt;: The level-sense information, encoded as follows:
  4 - active high level-sensitive
  8 - active low level-sensitive

## Example of the GPIO device and one user:

```dts
	pcigpio: gpio@b,1 {
			/* two cells for GPIO and interrupt */
			#gpio-cells = <2>;
			#interrupt-cells = <2>;
			compatible = "pci8086,2e67.2",
					   "pci8086,2e67",
					   "pciclassff0000",
					   "pciclassff00";

			reg = <0x15900 0x0 0x0 0x0 0x0>;
			/* Interrupt line of the gpio device */
			interrupts = <15 1>;
			/* It is an interrupt and GPIO controller itself */
			interrupt-controller;
			gpio-controller;
			intel,muxctl = <0>;
	};
```

```dts
	testuser@20 {
			compatible = "example,testuser";
			/* User the 11th GPIO line as an active high triggered
			 * level interrupt
			 */
			interrupts = <11 8>;
			interrupt-parent = <&pcigpio>;
			/* Use this GPIO also with the gpio functions */
			gpios = <&pcigpio 11 0>;
	};
```

---

# Client devices bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/hsi_

> Device-tree binding reference for Client devices bindings.

Each HSI port is supposed to have one child node, which
symbols the remote device connected to the HSI port. The
following properties are standardized for HSI clients:

## Required HSI configuration properties:

- hsi-channel-ids:	A list of channel ids

- hsi-rx-mode:		Receiver Bit transmission mode ("stream" or "frame")
- hsi-tx-mode:		Transmitter Bit transmission mode ("stream" or "frame")
- hsi-mode:		May be used instead hsi-rx-mode and hsi-tx-mode if
  the transmission mode is the same for receiver and
  transmitter
- hsi-speed-kbps:	Max bit transmission speed in kbit/s
- hsi-flow:		RX flow type ("synchronized" or "pipeline")
- hsi-arb-mode:		Arbitration mode for TX frame ("round-robin", "priority")

## Optional HSI configuration properties:

- hsi-channel-names:	A list with one name per channel specified in the
  hsi-channel-ids property

## Device Tree node example for an HSI client:

```dts
hsi-controller {
	hsi-port {
		modem: hsi-client {
			compatible = "nokia,n900-modem";

			hsi-channel-ids = <0>, <1>, <2>, <3>;
			hsi-channel-names = "mcsaab-control",
					    "speech-control",
					    "speech-data",
					    "mcsaab-data";
			hsi-speed-kbps = <55000>;
			hsi-mode = "frame";
			hsi-flow = "synchronized";
			hsi-arb-mode = "round-robin";

			/* more client specific properties */
		};
	};
};
```

---

# Nokia modem client bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/hsi_

> Device-tree binding reference for Nokia modem client bindings.

The Nokia modem HSI client follows the common HSI client binding
and inherits all required properties. The following additional
properties are needed by the Nokia modem HSI client:

## Required properties:

- compatible:		Should be one of
  "nokia,n900-modem"
  "nokia,n950-modem"
  "nokia,n9-modem"
- hsi-channel-names:	Should contain the following strings
  "mcsaab-control"
  "speech-control"
  "speech-data"
  "mcsaab-data"
- gpios:		Should provide a GPIO handler for each GPIO listed in
  gpio-names
- gpio-names:		Should contain the following strings
  "cmt\_apeslpx" (for n900, n950, n9)
  "cmt\_rst\_rq"  (for n900, n950, n9)
  "cmt\_en"      (for n900, n950, n9)
  "cmt\_rst"     (for n900)
  "cmt\_bsi"     (for n900)
- interrupts:		Should be IRQ handle for modem's reset indication

## Example:

```dts
&ssi_port {
	modem: hsi-client {
		compatible = "nokia,n900-modem";

		pinctrl-names = "default";
		pinctrl-0 = <&modem_pins>;

		hsi-channel-ids = <0>, <1>, <2>, <3>;
		hsi-channel-names = "mcsaab-control",
				    "speech-control",
				    "speech-data",
				    "mcsaab-data";
		hsi-speed-kbps = <55000>;
		hsi-mode = "frame";
		hsi-flow = "synchronized";
		hsi-arb-mode = "round-robin";

		interrupts-extended = <&gpio3 8 IRQ_TYPE_EDGE_FALLING>; /* 72 */

		gpios = <&gpio3  6 GPIO_ACTIVE_HIGH>, /* 70 */
			<&gpio3  9 GPIO_ACTIVE_HIGH>, /* 73 */
			<&gpio3 10 GPIO_ACTIVE_HIGH>, /* 74 */
			<&gpio3 11 GPIO_ACTIVE_HIGH>, /* 75 */
			<&gpio5 29 GPIO_ACTIVE_HIGH>; /* 157 */
		gpio-names = "cmt_apeslpx",
			     "cmt_rst_rq",
			     "cmt_en",
			     "cmt_rst",
			     "cmt_bsi";
	};
};
```

---

# OMAP SSI controller bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/hsi_

> Device-tree binding reference for OMAP SSI controller bindings.

OMAP3's Synchronous Serial Interface (SSI) controller implements a
legacy variant of MIPI's High Speed Synchronous Serial Interface (HSI),
while the controller found inside OMAP4 is supposed to be fully compliant
with the HSI standard.

## Required properties:

- compatible:		Should include "ti,omap3-ssi" or "ti,omap4-hsi"
- reg-names:		Contains the values "sys" and "gdd" (in this order).
- reg:			Contains a matching register specifier for each entry
  in reg-names.
- interrupt-names:	Contains the value "gdd\_mpu".
- interrupts: 		Contains matching interrupt information for each entry
  in interrupt-names.
- ranges:		Represents the bus address mapping between the main
  controller node and the child nodes below.
- clock-names:		Must include the following entries:
  "ssi\_ssr\_fck": The OMAP clock of that name
  "ssi\_sst\_fck": The OMAP clock of that name
  "ssi\_ick": The OMAP clock of that name
- clocks:		Contains a matching clock specifier for each entry in
  clock-names.
- #address-cells:	Should be set to &lt;1&gt;
- #size-cells:		Should be set to &lt;1&gt;

Each port is represented as a sub-node of the ti,omap3-ssi device.

## Required Port sub-node properties:

- compatible:		Should be set to the following value
  ti,omap3-ssi-port (applicable to OMAP34xx devices)
  ti,omap4-hsi-port (applicable to OMAP44xx devices)
- reg-names:		Contains the values "tx" and "rx" (in this order).
- reg:			Contains a matching register specifier for each entry
  in reg-names.
- interrupts:		Should contain interrupt specifiers for mpu interrupts
  0 and 1 (in this order).
- ti,ssi-cawake-gpio:	Defines which GPIO pin is used to signify CAWAKE
  events for the port. This is an optional board-specific
  property. If it's missing the port will not be
  enabled.

## Optional properties:

- ti,hwmods:		Shall contain TI interconnect module name if needed
  by the SoC

## Example for Nokia N900:

```dts
ssi-controller@48058000 {
	compatible = "ti,omap3-ssi";

	/* needed until hwmod is updated to use the compatible string */
	ti,hwmods = "ssi";

	reg = <0x48058000 0x1000>,
	      <0x48059000 0x1000>;
	reg-names = "sys",
		    "gdd";

	interrupts = <55>;
	interrupt-names = "gdd_mpu";

	clocks = <&ssi_ssr_fck>,
		 <&ssi_sst_fck>,
		 <&ssi_ick>;
	clock-names = "ssi_ssr_fck",
		      "ssi_sst_fck",
		      "ssi_ick";

	#address-cells = <1>;
	#size-cells = <1>;
	ranges;

	ssi-port@4805a000 {
		compatible = "ti,omap3-ssi-port";

		reg = <0x4805a000 0x800>,
		      <0x4805a800 0x800>;
		reg-names = "tx",
			    "rx";

		interrupt-parent = <&intc>;
		interrupts = <67>,
			     <68>;

		ti,ssi-cawake-gpio = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* 151 */
	}

	ssi-port@4805a000 {
		compatible = "ti,omap3-ssi-port";

		reg = <0x4805b000 0x800>,
		      <0x4805b800 0x800>;
		reg-names = "tx",
			    "rx";

		interrupt-parent = <&intc>;
		interrupts = <69>,
			     <70>;

	}
}
```

---

# Generic hwlock bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/hwlock_

> Device-tree binding reference for Generic hwlock bindings.

Generic bindings that are common to all the hwlock platform specific driver
implementations.

Please also look through the individual platform specific hwlock binding
documentations for identifying any additional properties specific to that
platform.

## hwlock providers:

## Required properties:

- #hwlock-cells:        Specifies the number of cells needed to represent a
  specific lock.

## hwlock users:

Consumers that require specific hwlock(s) should specify them using the
property "hwlocks", and an optional "hwlock-names" property.

## Required properties:

- hwlocks:              List of phandle to a hwlock provider node and an
  associated hwlock args specifier as indicated by
  #hwlock-cells. The list can have just a single hwlock
  or multiple hwlocks, with each hwlock represented by
  a phandle and a corresponding args specifier.

## Optional properties:

- hwlock-names:         List of hwlock name strings defined in the same order
  as the hwlocks, with one name per hwlock. Consumers can
  use the hwlock-names to match and get a specific hwlock.

1. Example of a node using a single specific hwlock:

The following example has a node requesting a hwlock in the bank defined by
the node hwlock1. hwlock1 is a hwlock provider with an argument specifier
of length 1.

```dts
	node {
		...
		hwlocks = <&hwlock1 2>;
		...
	};
```

2. Example of a node using multiple specific hwlocks:

The following example has a node requesting two hwlocks, a hwlock within
the hwlock device node 'hwlock1' with #hwlock-cells value of 1, and another
hwlock within the hwlock device node 'hwlock2' with #hwlock-cells value of 2.

```dts
	node {
		...
		hwlocks = <&hwlock1 2>, <&hwlock2 0 3>;
		...
	};
```

---

# ltc2990: Linear Technology LTC2990 power monitor

_Peios Kernel / Hardware and drivers / Device tree / bindings/hwmon_

> Device-tree binding reference for ltc2990: Linear Technology LTC2990 power monitor.

## Required properties:

- compatible: Must be "lltc,ltc2990"
- reg: I2C slave address
- lltc,meas-mode:
  An array of two integers for configuring the chip measurement mode.

```text
	The first integer defines the bits 2..0 in the control register. In all
	cases the internal temperature and supply voltage are measured. In
	addition the following input measurements are enabled per mode:
```

```text
		0: V1, V2, TR2
		1: V1-V2, TR2
		2: V1-V2, V3, V4
		3: TR1, V3, V4
		4: TR1, V3-V4
		5: TR1, TR2
		6: V1-V2, V3-V4
		7: V1, V2, V3, V4
```

```text
	The second integer defines the bits 4..3 in the control register. This
	allows a subset of the measurements to be enabled:
```

```text
		0: Internal temperature and supply voltage only
		1: TR1, V1 or V1-V2 only per mode
		2: TR2, V3 or V3-V4 only per mode
		3: All measurements per mode
```

## Example:

```dts
ltc2990@4c {
	compatible = "lltc,ltc2990";
	reg = <0x4c>;
	lltc,meas-mode = <7 3>;	/* V1, V2, V3, V4 */
};
```

---

# max6697 properties

_Peios Kernel / Hardware and drivers / Device tree / bindings/hwmon_

> Device-tree binding reference for max6697 properties.

## Required properties:

- compatible:
  Should be one of
  maxim,max6581
  maxim,max6602
  maxim,max6622
  maxim,max6636
  maxim,max6689
  maxim,max6693
  maxim,max6694
  maxim,max6697
  maxim,max6698
  maxim,max6699
- reg: I2C address

## Optional properties:

- smbus-timeout-disable
  Set to disable SMBus timeout. If not specified, SMBus timeout will be
  enabled.
- extended-range-enable
  Only valid for MAX6581. Set to enable extended temperature range.
  Extended temperature will be disabled if not specified.
- beta-compensation-enable
  Only valid for MAX6693 and MX6694. Set to enable beta compensation on
  remote temperature channel 1.
  Beta compensation will be disabled if not specified.
- alert-mask
  Alert bit mask. Alert disabled for bits set.
  Select bit 0 for local temperature, bit 1..7 for remote temperatures.
  If not specified, alert will be enabled for all channels.
- over-temperature-mask
  Over-temperature bit mask. Over-temperature reporting disabled for
  bits set.
  Select bit 0 for local temperature, bit 1..7 for remote temperatures.
  If not specified, over-temperature reporting will be enabled for all
  channels.
- resistance-cancellation
  Boolean for all chips other than MAX6581. Set to enable resistance
  cancellation on remote temperature channel 1.
  For MAX6581, resistance cancellation enabled for all channels if
  specified as boolean, otherwise as per bit mask specified.
  Only supported for remote temperatures (bit 1..7).
  If not specified, resistance cancellation will be disabled for all
  channels.
- transistor-ideality
  For MAX6581 only. Two values; first is bit mask, second is ideality
  select value as per MAX6581 data sheet. Select bit 1..7 for remote
  channels.
  Transistor ideality will be initialized to default (1.008) if not
  specified.

## Example:

```dts
temp-sensor@1a {
	compatible = "maxim,max6697";
	reg = <0x1a>;
	smbus-timeout-disable;
	resistance-cancellation;
	alert-mask = <0x72>;
	over-temperature-mask = <0x7f>;
};
```

---

# Nuvoton NPCM PWM and Fan Tacho controller device

_Peios Kernel / Hardware and drivers / Device tree / bindings/hwmon_

> Device-tree binding reference for Nuvoton NPCM PWM and Fan Tacho controller device.

The Nuvoton BMC NPCM7XX supports 8 Pulse-width modulation (PWM)
controller outputs and 16 Fan tachometer controller inputs.

The Nuvoton BMC NPCM8XX supports 12 Pulse-width modulation (PWM)
controller outputs and 16 Fan tachometer controller inputs.

Required properties for pwm-fan node

```text
- #address-cells : should be 1.
- #size-cells	: should be 0.
- compatible	: "nuvoton,npcm750-pwm-fan" for Poleg NPCM7XX.
				: "nuvoton,npcm845-pwm-fan" for Arbel NPCM8XX.
- reg			: specifies physical base address and size of the registers.
- reg-names	: must contain:
					* "pwm" for the PWM registers.
					* "fan" for the Fan registers.
- clocks		: phandle of reference clocks.
- clock-names	: must contain
					* "pwm" for PWM controller operating clock.
					* "fan" for Fan controller operating clock.
- interrupts	: contain the Fan interrupts with flags for falling edge.
- pinctrl-names	: a pinctrl state named "default" must be defined.
- pinctrl-0	: phandle referencing pin configuration of the PWM and Fan
					controller ports.
```

## fan subnode format:

Under fan subnode can be upto 8 child nodes, each child node representing a fan.
Each fan subnode must have one PWM channel and at least one Fan tach channel.

For PWM channel can be configured cooling-levels to create cooling device.
Cooling device could be bound to a thermal zone for the thermal control.

## Required properties for each child node:

- reg : specify the PWM output channel.
  integer value in the range 0 through 7, that represent
  the PWM channel number that used.

- fan-tach-ch : specify the Fan tach input channel.
  integer value in the range 0 through 15, that represent
  the fan tach channel number that used.

```text
		At least one Fan tach input channel is required
```

## Optional property for each child node:

- cooling-levels: PWM duty cycle values in a range from 0 to 255
  which correspond to thermal cooling states.

## Examples:

```dts
pwm_fan:pwm-fan-controller@103000 {
	#address-cells = <1>;
	#size-cells = <0>;
	compatible = "nuvoton,npcm750-pwm-fan";
	reg = <0x103000 0x2000>,
		<0x180000 0x8000>;
	reg-names = "pwm", "fan";
	clocks = <&clk NPCM7XX_CLK_APB3>,
		<&clk NPCM7XX_CLK_APB4>;
	clock-names = "pwm","fan";
	interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
	pinctrl-names = "default";
	pinctrl-0 = <&pwm0_pins &pwm1_pins &pwm2_pins
			&fanin0_pins &fanin1_pins &fanin2_pins
			&fanin3_pins &fanin4_pins>;
	fan@0 {
		reg = <0x00>;
		fan-tach-ch = /bits/ 8 <0x00 0x01>;
		cooling-levels = <127 255>;
	};
	fan@1 {
		reg = <0x01>;
		fan-tach-ch = /bits/ 8 <0x02 0x03>;
	};
	fan@2 {
		reg = <0x02>;
		fan-tach-ch = /bits/ 8 <0x04>;
	};

};
```

---

# Nsa320 mcu bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/hwmon_

> Device-tree binding reference for Nsa320 mcu bindings.

Bindings for the fan / temperature monitor microcontroller used on
the Zyxel NSA 320 and several subsequent models.

## Required properties:

- compatible	: "zyxel,nsa320-mcu"
- data-gpios	: The GPIO pin connected to the data line on the MCU
- clk-gpios	: The GPIO pin connected to the clock line on the MCU
- act-gpios	: The GPIO pin connected to the active line on the MCU

## Example:

```dts
	hwmon {
		compatible = "zyxel,nsa320-mcu";
		pinctrl-0 = <&pmx_mcu_data &pmx_mcu_clk &pmx_mcu_act>;
		pinctrl-names = "default";

		data-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
		clk-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
		act-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
	};
```

---

# Versatile Express hwmon sensors

_Peios Kernel / Hardware and drivers / Device tree / bindings/hwmon_

> Device-tree binding reference for Versatile Express hwmon sensors.

## Requires node properties:

- "compatible" value : one of
  "arm,vexpress-volt"
  "arm,vexpress-amp"
  "arm,vexpress-temp"
  "arm,vexpress-power"
  "arm,vexpress-energy"
- "arm,vexpress-sysreg,func" when controlled via vexpress-sysreg
  (see [Documentation/devicetree/bindings/arm/vexpress-config.yaml](</kernel/hardware/devicetree-bindings/dt-arm/vexpress-config.md>)
  for more details)

## Optional node properties:

- label : string describing the monitored value

## Example:

```dts
	energy@0 {
		compatible = "arm,vexpress-energy";
		arm,vexpress-sysreg,func = <13 0>;
		label = "A15 Jcore";
	};
```

---

# Altera I2C Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/i2c_

> Device-tree binding reference for Altera I2C Controller.

- This is Altera's synthesizable logic block I2C Controller for use
- in Altera's FPGAs.

## Required properties :

- compatible : should be "altr,softip-i2c-v1.0"
- reg        : Offset and length of the register set for the device
- interrupts : &lt;IRQ&gt; where IRQ is the interrupt number.
- clocks     : phandle to input clock.
- #address-cells = &lt;1&gt;;
- #size-cells = &lt;0&gt;;

## Recommended properties :

- clock-frequency : desired I2C bus clock frequency in Hz.

## Optional properties :

- fifo-size : Size of the RX and TX FIFOs in bytes.
- Child nodes conforming to i2c bus binding

## Example :

```dts
	i2c@100080000 {
		compatible = "altr,softip-i2c-v1.0";
		reg = <0x00000001 0x00080000 0x00000040>;
		interrupt-parent = <&intc>;
		interrupts = <0 43 4>;
		clocks = <&clk_0>;
		clock-frequency = <100000>;
		#address-cells = <1>;
		#size-cells = <0>;
		fifo-size = <4>;

		eeprom@51 {
			compatible = "atmel,24c32";
			reg = <0x51>;
			pagesize = <32>;
		};
	};
```

---

# LSI Axxia I2C

_Peios Kernel / Hardware and drivers / Device tree / bindings/i2c_

> Device-tree binding reference for LSI Axxia I2C.

## Required properties :

- compatible : Must be "lsi,api2c"
- reg : Offset and length of the register set for the device
- interrupts : the interrupt specifier
- #address-cells : Must be &lt;1&gt;;
- #size-cells : Must be &lt;0&gt;;
- clock-names : Must contain "i2c".
- clocks: Must contain an entry for each name in clock-names. See the common
  clock bindings.

## Optional properties :

- clock-frequency : Desired I2C bus clock frequency in Hz. If not specified,
  the default 100 kHz frequency will be used. As only Normal and Fast modes
  are supported, possible values are 100000 and 400000.

## Example :

```dts
i2c@2010084000 {
	compatible = "lsi,api2c";
	device_type = "i2c";
	#address-cells = <1>;
	#size-cells = <0>;
	reg = <0x20 0x10084000 0x00 0x1000>;
	interrupts = <0 19 4>;
	clocks = <&clk_per>;
	clock-names = "i2c";
	clock-frequency = <400000>;
};
```

---

# Device tree bindings for i2c-cbus-gpio driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/i2c_

> Device-tree binding reference for Device tree bindings for i2c-cbus-gpio driver.

## Required properties:

- compatible = "i2c-cbus-gpio";
- gpios: clk, dat, sel
- #address-cells = &lt;1&gt;;
- #size-cells = &lt;0&gt;;

## Optional properties:

- child nodes conforming to i2c bus binding

## Example:

```dts
i2c@0 {
	compatible = "i2c-cbus-gpio";
	gpios = <&gpio 66 0 /* clk */
		 &gpio 65 0 /* dat */
		 &gpio 64 0 /* sel */
		>;
	#address-cells = <1>;
	#size-cells = <0>;

	retu: retu@1 {
		compatible = "nokia,retu";
		reg = <0x1>;
	};
};
```

---

# Texas Instruments Davinci/Keystone I2C

_Peios Kernel / Hardware and drivers / Device tree / bindings/i2c_

> Device-tree binding reference for Texas Instruments Davinci/Keystone I2C.

This file provides information, what the device node for the
davinci/keystone i2c interface contains.

## Required properties:

- compatible: "ti,davinci-i2c" or "ti,keystone-i2c";
- reg : Offset and length of the register set for the device
- clocks: I2C functional clock phandle.
  For 66AK2G this property should be set per binding,
  [Documentation/devicetree/bindings/clock/ti,sci-clk.yaml](</kernel/hardware/devicetree-bindings/dt-clock/ti-sci-clk.md>)

## SoC-specific Required Properties:

The following are mandatory properties for Keystone 2 66AK2G SoCs only:

- power-domains:	Should contain a phandle to a PM domain provider node
  and an args specifier containing the I2C device id
  value. This property is as per the binding,
  [Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml](</kernel/hardware/devicetree-bindings/dt-soc/ti/sci-pm-domain.md>)

## Recommended properties :

- interrupts : standard interrupt property.
- clock-frequency : desired I2C bus clock frequency in Hz.
- ti,has-pfunc: boolean; if defined, it indicates that SoC supports PFUNC
  registers. PFUNC registers allow to switch I2C pins to function as
  GPIOs, so they can be toggled manually.

## Example (enbw\_cmc board):

```dts
	i2c@1c22000 {
		compatible = "ti,davinci-i2c";
		reg = <0x22000 0x1000>;
		clock-frequency = <100000>;
		interrupts = <15>;
		interrupt-parent = <&intc>;
		#address-cells = <1>;
		#size-cells = <0>;

		dtt@48 {
			compatible = "national,lm75";
			reg = <0x48>;
		};
	};
```

---

# Conexant Digicolor I2C controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/i2c_

> Device-tree binding reference for Conexant Digicolor I2C controller.

## Required properties:

- compatible: must be "cnxt,cx92755-i2c"
- reg: physical address and length of the device registers
- interrupts: a single interrupt specifier
- clocks: clock for the device
- #address-cells: should be &lt;1&gt;
- #size-cells: should be &lt;0&gt;

## Optional properties:

- clock-frequency: the desired I2C bus clock frequency in Hz; in
  absence of this property the default value is used (100 kHz).

## Example:

```dts
	i2c: i2c@f0000120 {
		compatible = "cnxt,cx92755-i2c";
		reg = <0xf0000120 0x10>;
		interrupts = <28>;
		clocks = <&main_clk>;
		clock-frequency = <100000>;
		#address-cells = <1>;
		#size-cells = <0>;
	};
```

---

# IMG Serial Control Bus (SCB) I2C Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/i2c_

> Device-tree binding reference for IMG Serial Control Bus (SCB) I2C Controller.

## Required Properties:

- compatible: "img,scb-i2c"
- reg: Physical base address and length of controller registers
- interrupts: Interrupt number used by the controller
- clocks : Should contain a clock specifier for each entry in clock-names
- clock-names : Should contain the following entries:
  "scb", for the SCB core clock.
  "sys", for the system clock.
- clock-frequency: The I2C bus frequency in Hz
- #address-cells: Should be &lt;1&gt;
- #size-cells: Should be &lt;0&gt;

## Example:

```dts
i2c@18100000 {
	compatible = "img,scb-i2c";
	reg = <0x18100000 0x200>;
	interrupts = <GIC_SHARED 2 IRQ_TYPE_LEVEL_HIGH>;
	clocks = <&i2c0_clk>, <&system_clk>;
	clock-names = "scb", "sys";
	clock-frequency = <400000>;
	#address-cells = <1>;
	#size-cells = <0>;
};
```

---

# i2c Controller on XScale platforms such as IOP3xx and IXP4xx

_Peios Kernel / Hardware and drivers / Device tree / bindings/i2c_

> Device-tree binding reference for i2c Controller on XScale platforms such as IOP3xx and IXP4xx.

## Required properties:

- compatible : Must be one of
  "intel,iop3xx-i2c"
  "intel,ixp4xx-i2c";
- reg
- #address-cells = &lt;1&gt;;
- #size-cells = &lt;0&gt;;

## Optional properties:

- Child nodes conforming to i2c bus binding

## Example:

```dts
i2c@c8011000 {
	compatible = "intel,ixp4xx-i2c";
	reg = <0xc8011000 0x18>;
	interrupts = <33 IRQ_TYPE_LEVEL_LOW>;
};
```

---

# Linear Technology / Analog Devices I2C bus switch

_Peios Kernel / Hardware and drivers / Device tree / bindings/i2c_

> Device-tree binding reference for Linear Technology / Analog Devices I2C bus switch.

## Required Properties:

- compatible: Must contain one of the following.
  "lltc,ltc4305", "lltc,ltc4306"
- reg: The I2C address of the device.

## The following required properties are defined externally:

- Standard I2C mux properties. See [i2c-mux.yaml](</kernel/hardware/devicetree-bindings/dt-i2c/i2c-mux.md>) in this directory.
- I2C child bus nodes. See [i2c-mux.yaml](</kernel/hardware/devicetree-bindings/dt-i2c/i2c-mux.md>) in this directory.

## Optional Properties:

- enable-gpios: Reference to the GPIO connected to the enable input.
- i2c-mux-idle-disconnect: Boolean; if defined, forces mux to disconnect all
  children in idle state. This is necessary for example, if there are several
  multiplexers on the bus and the devices behind them use same I2C addresses.
- gpio-controller: Marks the device node as a GPIO Controller.
- #gpio-cells: Should be two.  The first cell is the pin number and
  the second cell is used to specify flags.
  See [../gpio/gpio.txt](</kernel/hardware/devicetree/bindings-gpio/gpio.md>) for more information.
- ltc,downstream-accelerators-enable: Enables the rise time accelerators
  on the downstream port.
- ltc,upstream-accelerators-enable: Enables the rise time accelerators
  on the upstream port.

## Example:

```dts
	ltc4306: i2c-mux@4a {
		compatible = "lltc,ltc4306";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x4a>;

		gpio-controller;
		#gpio-cells = <2>;

		i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;

			eeprom@50 {
				compatible = "atmel,24c02";
				reg = <0x50>;
			};
		};

		i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;

			eeprom@50 {
				compatible = "atmel,24c02";
				reg = <0x50>;
			};
		};
	};
```

---

# Register-based I2C Bus Mux

_Peios Kernel / Hardware and drivers / Device tree / bindings/i2c_

> Device-tree binding reference for Register-based I2C Bus Mux.

This binding describes an I2C bus multiplexer that uses a single register
to route the I2C signals.

## Required properties:

- compatible: i2c-mux-reg
- i2c-parent: The phandle of the I2C bus that this multiplexer's master-side
  port is connected to.
- Standard I2C mux properties. See [i2c-mux.yaml](</kernel/hardware/devicetree-bindings/dt-i2c/i2c-mux.md>) in this directory.
- I2C child bus nodes. See [i2c-mux.yaml](</kernel/hardware/devicetree-bindings/dt-i2c/i2c-mux.md>) in this directory.

## Optional properties:

- reg: this pair of &lt;offset size&gt; specifies the register to control the mux.
  The &lt;offset size&gt; depends on its parent node. It can be any memory-mapped
  address. The size must be either 1, 2, or 4 bytes. If reg is omitted, the
  resource of this device will be used.
- little-endian: The existence indicates the register is in little endian.
- big-endian: The existence indicates the register is in big endian.
  If both little-endian and big-endian are omitted, the endianness of the
  CPU will be used.
- write-only: The existence indicates the register is write-only.
- idle-state: value to set the muxer to when idle. When no value is
  given, it defaults to the last value used.

Whenever an access is made to a device on a child bus, the value set
in the relevant node's reg property will be output to the register.

If an idle state is defined, using the idle-state (optional) property,
whenever an access is not being made to a device on a child bus, the
register will be set according to the idle value.

If an idle state is not defined, the most recently used value will be
left programmed into the register.

Example of a mux on PCIe card, the host is a powerpc SoC (big endian):

```dts
	i2c-mux {
		/* the <offset size> depends on the address translation
		 * of the parent device. If omitted, device resource
		 * will be used instead. The size is to determine
		 * whether iowrite32, iowrite16, or iowrite8 will be used.
		 */
		reg = <0x6028 0x4>;
		little-endian;		/* little endian register on PCIe */
		compatible = "i2c-mux-reg";
		#address-cells = <1>;
		#size-cells = <0>;
		i2c-parent = <&i2c1>;
		i2c@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;

			si5338: clock-generator@70 {
				compatible = "silabs,si5338";
				reg = <0x70>;
				/* other stuff */
			};
		};

		i2c@1 {
			/* data is written using iowrite32 */
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;

			si5338: clock-generator@70 {
				compatible = "silabs,si5338";
				reg = <0x70>;
				/* other stuff */
			};
		};
	};
```

---

# Two Wire Serial Interface (TWSI) / I2C

_Peios Kernel / Hardware and drivers / Device tree / bindings/i2c_

> Device-tree binding reference for Two Wire Serial Interface (TWSI) / I2C.

- compatible: "cavium,octeon-3860-twsi"

```text
  Compatibility with all cn3XXX, cn5XXX and cn6XXX SOCs.
```

```text
  or
```

```text
  compatible: "cavium,octeon-7890-twsi"
```

```text
  Compatibility with cn78XX SOCs.
```

- reg: The base address of the TWSI/I2C bus controller register bank.

- #address-cells: Must be &lt;1&gt;.

- #size-cells: Must be &lt;0&gt;.  I2C addresses have no size component.

- interrupts: A single interrupt specifier.

- clock-frequency: The I2C bus clock rate in Hz.

## Example:

```dts
	twsi0: i2c@1180000001000 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "cavium,octeon-3860-twsi";
		reg = <0x11800 0x00001000 0x0 0x200>;
		interrupts = <0 45>;
		clock-frequency = <100000>;

		rtc@68 {
			compatible = "dallas,ds1337";
			reg = <0x68>;
		};
		tmp@4c {
			compatible = "ti,tmp421";
			reg = <0x4c>;
		};
	};
```

---

# Device-tree bindings for I2C OPAL driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/i2c_

> Device-tree binding reference for Device-tree bindings for I2C OPAL driver.

Most of the device node and properties layout is specific to the firmware and
used by the firmware itself for configuring the port. From the linux
perspective, the properties of use are "ibm,port-name" and "ibm,opal-id".

## Required properties:

- reg: Port-id within a given master
- compatible: must be "ibm,opal-i2c"
- ibm,opal-id: Refers to a specific bus and used to identify it when calling
  the relevant OPAL functions.
- bus-frequency: Operating frequency of the i2c bus (in HZ). Informational for
  linux, used by the FW though.

## Optional properties:

- ibm,port-name: Firmware provides this name that uniquely identifies the i2c
  port.

The node contains a number of other properties that are used by the FW itself
and depend on the specific hardware implementation. The example below depicts
a P8 on-chip bus.

## Example:

```dts
i2c-bus@0 {
	reg = <0x0>;
	bus-frequency = <0x61a80>;
	compatible = "ibm,power8-i2c-port", "ibm,opal-i2c";
	ibm,opal-id = <0x1>;
	ibm,port-name = "p8_00000000_e1p0";
	#address-cells = <0x1>;
	phandle = <0x10000006>;
	#size-cells = <0x0>;
	linux,phandle = <0x10000006>;
};
```

---

# NXP PCA PCA9564/PCA9665 I2C controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/i2c_

> Device-tree binding reference for NXP PCA PCA9564/PCA9665 I2C controller.

The PCA9564/PCA9665 serves as an interface between most standard
parallel-bus microcontrollers/microprocessors and the serial I2C-bus
and allows the parallel bus system to communicate bi-directionally
with the I2C-bus.

## Required properties :

- reg : Offset and length of the register set for the device
- compatible : one of "nxp,pca9564" or "nxp,pca9665"

Optional properties

- interrupts : the interrupt number
- reset-gpios : gpio specifier for gpio connected to RESET\_N pin. As the line
  is active low, it should be marked GPIO\_ACTIVE\_LOW.
- clock-frequency : I2C bus frequency.

## Example:

```dts
	i2c0: i2c@80000 {
		compatible = "nxp,pca9564";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x80000 0x4>;
		reset-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
		clock-frequency = <100000>;
	};
```

---

# CE4100 I2C

_Peios Kernel / Hardware and drivers / Device tree / bindings/i2c_

> Device-tree binding reference for CE4100 I2C.

CE4100 has one PCI device which is described as the I2C-Controller. This
PCI device has three PCI-bars, each bar contains a complete I2C
controller. So we have a total of three independent I2C-Controllers
which share only an interrupt line.
The driver is probed via the PCI-ID and is gathering the information of
attached devices from the devices tree.
Grant Likely recommended to use the ranges property to map the PCI-Bar
number to its physical address and to use this to find the child nodes
of the specific I2C controller. This were his exact words:

```text
       Here's where the magic happens.  Each entry in
       ranges describes how the parent pci address space
       (middle group of 3) is translated to the local
       address space (first group of 2) and the size of
       each range (last cell).  In this particular case,
       the first cell of the local address is chosen to be
       1:1 mapped to the BARs, and the second is the
       offset from be base of the BAR (which would be
       non-zero if you had 2 or more devices mapped off
       the same BAR)
```

```text
       ranges allows the address mapping to be described
       in a way that the OS can interpret without
       requiring custom device driver code.
```

## This is an example which is used on FalconFalls:

```dts
	i2c-controller@b,2 {
		#address-cells = <2>;
		#size-cells = <1>;
		compatible = "pci8086,2e68.2",
				"pci8086,2e68",
				"pciclass,ff0000",
				"pciclass,ff00";

		reg = <0x15a00 0x0 0x0 0x0 0x0>;
		interrupts = <16 1>;

		/* as described by Grant, the first number in the group of
		* three is the bar number followed by the 64bit bar address
		* followed by size of the mapping. The bar address
		* requires also a valid translation in parents ranges
		* property.
		*/
		ranges = <0 0   0x02000000 0 0xdffe0500 0x100
			  1 0   0x02000000 0 0xdffe0600 0x100
			  2 0   0x02000000 0 0xdffe0700 0x100>;

		i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			compatible = "intel,ce4100-i2c-controller";

			/* The first number in the reg property is the
			* number of the bar
			*/
			reg = <0 0 0x100>;

			/* This I2C controller has no devices */
		};

		i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			compatible = "intel,ce4100-i2c-controller";
			reg = <1 0 0x100>;

			/* This I2C controller has one gpio controller */
			gpio@26 {
				#gpio-cells = <2>;
				compatible = "nxp,pcf8575";
				reg = <0x26>;
				gpio-controller;
			};
		};

		i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			compatible = "intel,ce4100-i2c-controller";
			reg = <2 0 0x100>;

			gpio@26 {
				#gpio-cells = <2>;
				compatible = "nxp,pcf8575";
				reg = <0x26>;
				gpio-controller;
			};
		};
	};
```

---

# LIS302 accelerometer devicetree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/iio/accel_

> Device-tree binding reference for LIS302 accelerometer devicetree bindings.

This device is matched via its bus drivers, and has a number of properties
that apply in on the generic device (independent from the bus).

## Required properties for the SPI bindings:

- compatible: 		should be set to "st,lis3lv02d-spi"
- reg:			the chipselect index
- spi-max-frequency:	maximal bus speed, should be set to 1000000 unless
  constrained by external circuitry
- interrupts:		the interrupt generated by the device

## Required properties for the I2C bindings:

- compatible:		should be set to "st,lis3lv02d"
- reg:			i2c slave address
- Vdd-supply:		The input supply for Vdd
- Vdd\_IO-supply:	The input supply for Vdd\_IO

## Optional properties for all bus drivers:

- st,click-single-{x,y,z}:	if present, tells the device to issue an
  interrupt on single click events on the
  x/y/z axis.
- st,click-double-{x,y,z}:	if present, tells the device to issue an
  interrupt on double click events on the
  x/y/z axis.
- st,click-thresh-{x,y,z}:	set the x/y/z axis threshold
- st,click-click-time-limit:	click time limit, from 0 to 127.5msec
  with step of 0.5 msec
- st,click-latency:		click latency, from 0 to 255 msec with
  step of 1 msec.
- st,click-window:		click window, from 0 to 255 msec with
  step of 1 msec.
- st,irq{1,2}-disable:		disable IRQ 1/2
- st,irq{1,2}-ff-wu-1:		raise IRQ 1/2 on FF\_WU\_1 condition
- st,irq{1,2}-ff-wu-2:		raise IRQ 1/2 on FF\_WU\_2 condition
- st,irq{1,2}-data-ready:	raise IRQ 1/2 on data ready condition
- st,irq{1,2}-click:		raise IRQ 1/2 on click condition
- st,irq-open-drain:		consider IRQ lines open-drain
- st,irq-active-low:		make IRQ lines active low
- st,wu-duration-1:		duration register for Free-Fall/Wake-Up
  interrupt 1
- st,wu-duration-2:		duration register for Free-Fall/Wake-Up
  interrupt 2
- st,wakeup-{x,y,z}-{lo,hi}:	set wakeup condition on x/y/z axis for
  upper/lower limit
- st,wakeup-threshold:		set wakeup threshold
- st,wakeup2-{x,y,z}-{lo,hi}:	set wakeup condition on x/y/z axis for
  upper/lower limit for second wakeup
  engine.
- st,wakeup2-threshold:	set wakeup threshold for second wakeup
  engine.
- st,highpass-cutoff-hz=:	1, 2, 4 or 8 for 1Hz, 2Hz, 4Hz or 8Hz of
  highpass cut-off frequency
- st,hipass{1,2}-disable:	disable highpass 1/2.
- st,default-rate=:		set the default rate
- st,axis-{x,y,z}=:		set the axis to map to the three coordinates.
  Negative values can be used for inverted axis.
- st,{min,max}-limit-{x,y,z}	set the min/max limits for x/y/z axis
  (used by self-test)

## Example for a SPI device node:

```dts
	accelerometer@0 {
		compatible = "st,lis302dl-spi";
		reg = <0>;
		spi-max-frequency = <1000000>;
		interrupt-parent = <&gpio>;
		interrupts = <104 0>;

		st,click-single-x;
		st,click-single-y;
		st,click-single-z;
		st,click-thresh-x = <10>;
		st,click-thresh-y = <10>;
		st,click-thresh-z = <10>;
		st,irq1-click;
		st,irq2-click;
		st,wakeup-x-lo;
		st,wakeup-x-hi;
		st,wakeup-y-lo;
		st,wakeup-y-hi;
		st,wakeup-z-lo;
		st,wakeup-z-hi;
	};
```

## Example for a I2C device node:

```dts
	lis331dlh: accelerometer@18 {
		compatible = "st,lis331dlh", "st,lis3lv02d";
		reg = <0x18>;
		Vdd-supply = <&lis3_reg>;
		Vdd_IO-supply = <&lis3_reg>;

		st,click-single-x;
		st,click-single-y;
		st,click-single-z;
		st,click-thresh-x = <10>;
		st,click-thresh-y = <10>;
		st,click-thresh-z = <10>;
		st,irq1-click;
		st,irq2-click;
		st,wakeup-x-lo;
		st,wakeup-x-hi;
		st,wakeup-y-lo;
		st,wakeup-y-hi;
		st,wakeup-z-lo;
		st,wakeup-z-hi;
		st,min-limit-x = <120>;
		st,min-limit-y = <120>;
		st,min-limit-z = <140>;
		st,max-limit-x = <550>;
		st,max-limit-y = <550>;
		st,max-limit-z = <750>;
	};
```

---

# Xilinx XADC device driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/iio/adc_

> Device-tree binding reference for Xilinx XADC device driver.

This binding document describes the bindings for the Xilinx 7 Series XADC as well
as the UltraScale/UltraScale+ System Monitor.

The Xilinx XADC is an ADC that can be found in the Series 7 FPGAs from Xilinx.
The XADC has a DRP interface for communication. Currently two different
frontends for the DRP interface exist. One that is only available on the ZYNQ
family as a hardmacro in the SoC portion of the ZYNQ. The other one is available
on all series 7 platforms and is a softmacro with a AXI interface. This binding
document describes the bindings for both of them since the bindings are very
similar.

The Xilinx System Monitor is an ADC that is found in the UltraScale and
UltraScale+ FPGAs from Xilinx. The System Monitor provides a DRP interface for
communication. Xilinx provides a standard IP core that can be used to access the
System Monitor through an AXI interface in the FPGA fabric. This IP core is
called the Xilinx System Management Wizard. This document describes the bindings
for this IP.

## Required properties:

```text
	- compatible: Should be one of
		* "xlnx,zynq-xadc-1.00.a": When using the ZYNQ device
		  configuration interface to interface to the XADC hardmacro.
		* "xlnx,axi-xadc-1.00.a": When using the axi-xadc pcore to
		  interface to the XADC hardmacro.
		* "xlnx,system-management-wiz-1.3": When using the
		  Xilinx System Management Wizard fabric IP core to access the
		  UltraScale and UltraScale+ System Monitor.
	- reg: Address and length of the register set for the device
	- interrupts: Interrupt for the XADC control interface.
	- clocks: When using the ZYNQ this must be the ZYNQ PCAP clock,
	  when using the axi-xadc or the axi-system-management-wizard this must be
	  the clock that provides the clock to the AXI bus interface of the core.
```

## Optional properties:

```text
	- xlnx,external-mux:
		* "none": No external multiplexer is used, this is the default
		  if the property is omitted.
		* "single": External multiplexer mode is used with one
		   multiplexer.
		* "dual": External multiplexer mode is used with two
		  multiplexers for simultaneous sampling.
	- xlnx,external-mux-channel: Configures which pair of pins is used to
	  sample data in external mux mode.
	  Valid values for single external multiplexer mode are:
		0: VP/VN
		1: VAUXP[0]/VAUXN[0]
		2: VAUXP[1]/VAUXN[1]
		...
		16: VAUXP[15]/VAUXN[15]
	  Valid values for dual external multiplexer mode are:
		1: VAUXP[0]/VAUXN[0] - VAUXP[8]/VAUXN[8]
		2: VAUXP[1]/VAUXN[1] - VAUXP[9]/VAUXN[9]
		...
		8: VAUXP[7]/VAUXN[7] - VAUXP[15]/VAUXN[15]
```

```text
	  This property needs to be present if the device is configured for
	  external multiplexer mode (either single or dual). If the device is
	  not using external multiplexer mode the property is ignored.
	- xnlx,channels: List of external channels that are connected to the ADC
	  Required properties:
		* #address-cells: Should be 1.
		* #size-cells: Should be 0.
```

```text
	  The child nodes of this node represent the external channels which are
	  connected to the ADC. If the property is no present no external
	  channels will be assumed to be connected.
```

```text
	  Each child node represents one channel and has the following
	  properties:
		Required properties:
			* reg: Pair of pins the channel is connected to.
				0: VP/VN
				1: VAUXP[0]/VAUXN[0]
				2: VAUXP[1]/VAUXN[1]
				...
				16: VAUXP[15]/VAUXN[15]
			  Note each channel number should only be used at most
			  once.
		Optional properties:
			* xlnx,bipolar: If set the channel is used in bipolar
			  mode.
```

## Examples:

```dts
	xadc@f8007100 {
		compatible = "xlnx,zynq-xadc-1.00.a";
		reg = <0xf8007100 0x20>;
		interrupts = <0 7 4>;
		interrupt-parent = <&gic>;
		clocks = <&pcap_clk>;

		xlnx,channels {
			#address-cells = <1>;
			#size-cells = <0>;
			channel@0 {
				reg = <0>;
			};
			channel@1 {
				reg = <1>;
			};
			channel@8 {
				reg = <8>;
			};
		};
	};
```

```dts
	xadc@43200000 {
		compatible = "xlnx,axi-xadc-1.00.a";
		reg = <0x43200000 0x1000>;
		interrupts = <0 53 4>;
		interrupt-parent = <&gic>;
		clocks = <&fpga1_clk>;

		xlnx,channels {
			#address-cells = <1>;
			#size-cells = <0>;
			channel@0 {
				reg = <0>;
				xlnx,bipolar;
			};
		};
	};
```

```dts
	adc@80000000 {
		compatible = "xlnx,system-management-wiz-1.3";
		reg = <0x80000000 0x1000>;
		interrupts = <0 81 4>;
		interrupt-parent = <&gic>;
		clocks = <&fpga1_clk>;

		xlnx,channels {
			#address-cells = <1>;
			#size-cells = <0>;
			channel@0 {
				reg = <0>;
				xlnx,bipolar;
			};
		};
	};
```

---

# IIO mount matrix

_Peios Kernel / Hardware and drivers / Device tree / bindings/iio_

> Device-tree binding reference for IIO mount matrix.

## For discussion. Unclear are:

- is the definition of +/- values practical or counterintuitive?
- are the definitions unambiguous and easy to follow?
- are the examples correct?
- should we have HOWTO engineer a correct matrix for a new device (without comparing to a different one)?

---

Mounting matrix

The mounting matrix is a device tree property used to orient any device
that produce three-dimensional data in relation to the world where it is
deployed.

The purpose of the mounting matrix is to translate the sensor frame of
reference into the device frame of reference using a translation matrix as
defined in linear algebra.

The typical usecase is that where a component has an internal representation
of the (x,y,z) triplets, such as different registers to read these coordinates,
and thus implying that the component should be mounted in a certain orientation
relative to some specific device frame of reference.

For example a device with some kind of screen, where the user is supposed to
interact with the environment using an accelerometer, gyroscope or magnetometer
mounted on the same chassis as this screen, will likely take the screen as
reference to (x,y,z) orientation, with (x,y) corresponding to these axes on the
screen and (z) being depth, the axis perpendicular to the screen.

For a screen you probably want (x) coordinates to go from negative on the left
to positive on the right, (y) from negative on the bottom to positive on top
and (z) depth to be negative under the screen and positive in front of it,
toward the face of the user.

A sensor can be mounted in any angle along the axes relative to the frame of
reference. This means that the sensor may be flipped upside-down, left-right,
or tilted at any angle relative to the frame of reference.

Another frame of reference is how the device with its sensor relates to the
external world, the environment where the device is deployed. Usually the data
from the sensor is used to figure out how the device is oriented with respect
to this world. When using the mounting matrix, the sensor and device orientation
becomes identical and we can focus on the data as it relates to the surrounding
world.

## Device-to-world examples for some three-dimensional sensor types:

- Accelerometers have their world frame of reference toward the center of
  gravity, usually to the core of the planet. A reading of the (x,y,z) values
  from the sensor will give a projection of the gravity vector through the
  device relative to the center of the planet, i.e. relative to its surface at
  this point. Up and down in the world relative to the device frame of
  reference can thus be determined. and users would likely expect a value of
  9.81 m/s^2 upwards along the (z) axis, i.e. out of the screen when the device
  is held with its screen flat on the planets surface and 0 on the other axes,
  as the gravity vector is projected 1:1 onto the sensors (z)-axis.

```text
  If you tilt the device, the g vector virtually coming out of the display
  is projected onto the (x,y) plane of the display panel.
```

## Example:

```text
         ^ z: +g                   ^ z: > 0
         !                        /!
         ! x=y=0                 / ! x: > 0
     +--------+             +--------+
     !        !             !        !
     +--------+             +--------+
         !                    /
         !                   /
         v                  v
      center of         center of
       gravity           gravity
```

```text
  If the device is tilted to the left, you get a positive x value. If you point
  its top towards surface, you get a negative y axis.
```

```text
     (---------)
     !         !           y: -g
     !         !             ^
     !         !             !
     !         !
     !         !  x: +g <- z: +g  -> x: -g
     ! 1  2  3 !
     ! 4  5  6 !             !
     ! 7  8  9 !             v
     ! *  0  # !           y: +g
     (---------)
```

- Magnetometers (compasses) have their world frame of reference relative to the
  geomagnetic field. The system orientation vis-a-vis the world is defined with
  respect to the local earth geomagnetic reference frame where (y) is in the
  ground plane and positive towards magnetic North, (x) is in the ground plane,
  perpendicular to the North axis and positive towards the East and (z) is
  perpendicular to the ground plane and positive upwards.

```text
     ^^^ North: y > 0
```

```text
     (---------)
     !         !
     !         !
     !         !
     !         !  >
     !         !  > North: x > 0
     ! 1  2  3 !  >
     ! 4  5  6 !
     ! 7  8  9 !
     ! *  0  # !
     (---------)
```

```text
  Since the geomagnetic field is not uniform this definition fails if we come
  closer to the poles.
```

```text
  Sensors and driver can not and should not take care of this because there
  are complex calculations and empirical data to be taken care of. We leave
  this up to user space.
```

## The definition we take:

```text
  If the device is placed at the equator and the top is pointing north, the
  display is readable by a person standing upright on the earth surface, this
  defines a positive y value.
```

- Gyroscopes detects the movement relative the device itself. The angular
  velocity is defined as orthogonal to the plane of rotation, so if you put the
  device on a flat surface and spin it around the z axis (such as rotating a
  device with a screen lying flat on a table), you should get a negative value
  along the (z) axis if rotated clockwise, and a positive value if rotated
  counter-clockwise according to the right-hand rule.

```text
     (---------)     y > 0
     !         !     v---\
     !         !
     !         !
     !         !      <--\
     !         !         ! z > 0
     ! 1  2  3 !       --/
     ! 4  5  6 !
     ! 7  8  9 !
     ! *  0  # !
     (---------)
```

So unless the sensor is ideally mounted, we need a means to indicate the
relative orientation of any given sensor of this type with respect to the
frame of reference.

To achieve this, use the device tree property "mount-matrix" for the sensor.

This supplies a 3x3 rotation matrix in the strict linear algebraic sense,
to orient the senor axes relative to a desired point of reference. This means
the resulting values from the sensor, after scaling to proper units, should be
multiplied by this matrix to give the proper vectors values in three-dimensional
space, relative to the device or world point of reference.

## For more information, consult:

https://en.wikipedia.org/wiki/Rotation\_matrix

## The mounting matrix has the layout:

```text
 (mxx, myx, mzx)
 (mxy, myy, mzy)
 (mxz, myz, mzz)
```

## Values are intended to be multiplied as:

```text
  x' = mxx * x + myx * y + mzx * z
  y' = mxy * x + myy * y + mzy * z
  z' = mxz * x + myz * y + mzz * z
```

It is represented as an array of strings containing the real values for
producing the transformation matrix.

## Examples:

Identity matrix (nothing happens to the coordinates, which means the device was
mechanically mounted in an ideal way and we need no transformation):

```dts
mount-matrix = "1", "0", "0",
               "0", "1", "0",
               "0", "0", "1";
```

The sensor is mounted 30 degrees (Pi/6 radians) tilted along the X axis, so we
compensate by performing a -30 degrees rotation around the X axis:

```dts
mount-matrix = "1", "0", "0",
               "0", "0.866", "0.5",
               "0", "-0.5", "0.866";
```

The sensor is flipped 180 degrees (Pi radians) around the Z axis, i.e. mounted
upside-down:

```dts
mount-matrix = "0.998", "0.054", "0",
               "-0.054", "0.998", "0",
               "0", "0", "1";
```

???: this does not match "180 degrees" - factors indicate ca. 3 degrees compensation

---

# Hisilicon RoCE DT description

_Peios Kernel / Hardware and drivers / Device tree / bindings/infiniband_

> Device-tree binding reference for Hisilicon RoCE DT description.

Hisilicon RoCE engine is a part of network subsystem.
It works depending on other part of network subsystem, such as gmac and
dsa fabric.

## Additional properties are described here:

## Required properties:

```text
- compatible: Should contain "hisilicon,hns-roce-v1".
- reg: Physical base address of the RoCE driver and
length of memory mapped region.
- eth-handle: phandle, specifies a reference to a node
representing a ethernet device.
- dsaf-handle: phandle, specifies a reference to a node
representing a dsaf device.
- node_guid: a number that uniquely identifies a device or component
- #address-cells: must be 2
- #size-cells: must be 2
Optional properties:
- dma-coherent: Present if DMA operations are coherent.
- interrupts: should contain 32 completion event irq,1 async event irq
and 1 event overflow irq.
- interrupt-names:should be one of 34 irqs for roce device
  - hns-roce-comp-0 ~ hns-roce-comp-31: 32 complete event irq
  - hns-roce-async: 1 async event irq
  - hns-roce-common: named common exception warning irq
Example:
	infiniband@c4000000 {
			compatible = "hisilicon,hns-roce-v1";
			reg = <0x0 0xc4000000 0x0 0x100000>;
			dma-coherent;
			eth-handle = <&eth2 &eth3 &eth4 &eth5 &eth6 &eth7>;
			dsaf-handle = <&soc0_dsa>;
			node-guid = [00 9A CD 00 00 01 02 03];
			#address-cells = <2>;
			#size-cells = <2>;
			interrupt-parent = <&mbigen_dsa>;
			interrupts = <722 1>,
					<723 1>,
					<724 1>,
					<725 1>,
					<726 1>,
					<727 1>,
					<728 1>,
					<729 1>,
					<730 1>,
					<731 1>,
					<732 1>,
					<733 1>,
					<734 1>,
					<735 1>,
					<736 1>,
					<737 1>,
					<738 1>,
					<739 1>,
					<740 1>,
					<741 1>,
					<742 1>,
					<743 1>,
					<744 1>,
					<745 1>,
					<746 1>,
					<747 1>,
					<748 1>,
					<749 1>,
					<750 1>,
					<751 1>,
					<752 1>,
					<753 1>,
					<785 1>,
					<754 4>;
```

```dts
			interrupt-names = "hns-roce-comp-0",
					"hns-roce-comp-1",
					"hns-roce-comp-2",
					"hns-roce-comp-3",
					"hns-roce-comp-4",
					"hns-roce-comp-5",
					"hns-roce-comp-6",
					"hns-roce-comp-7",
					"hns-roce-comp-8",
					"hns-roce-comp-9",
					"hns-roce-comp-10",
					"hns-roce-comp-11",
					"hns-roce-comp-12",
					"hns-roce-comp-13",
					"hns-roce-comp-14",
					"hns-roce-comp-15",
					"hns-roce-comp-16",
					"hns-roce-comp-17",
					"hns-roce-comp-18",
					"hns-roce-comp-19",
					"hns-roce-comp-20",
					"hns-roce-comp-21",
					"hns-roce-comp-22",
					"hns-roce-comp-23",
					"hns-roce-comp-24",
					"hns-roce-comp-25",
					"hns-roce-comp-26",
					"hns-roce-comp-27",
					"hns-roce-comp-28",
					"hns-roce-comp-29",
					"hns-roce-comp-30",
					"hns-roce-comp-31",
					"hns-roce-async",
					"hns-roce-common";
		};
```

---

# Broadcom Keypad Controller device tree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for Broadcom Keypad Controller device tree bindings.

Broadcom Keypad controller is used to interface a SoC with a matrix-type
keypad device. The keypad controller supports multiple row and column lines.
A key can be placed at each intersection of a unique row and a unique column.
The keypad controller can sense a key-press and key-release and report the
event using a interrupt to the cpu.

This binding is based on the matrix-keymap binding with the following
changes:

keypad,num-rows and keypad,num-columns are required.

## Required SoC Specific Properties:

- compatible: should be "brcm,bcm-keypad"

- reg: physical base address of the controller and length of memory mapped
  region.

- interrupts: The interrupt number to the cpu.

## Board Specific Properties:

- keypad,num-rows: Number of row lines connected to the keypad
  controller.

- keypad,num-columns: Number of column lines connected to the
  keypad controller.

- col-debounce-filter-period: The debounce period for the Column filter.

```dts
	KEYPAD_DEBOUNCE_1_ms	=	0
	KEYPAD_DEBOUNCE_2_ms	=	1
	KEYPAD_DEBOUNCE_4_ms	=	2
	KEYPAD_DEBOUNCE_8_ms	=	3
	KEYPAD_DEBOUNCE_16_ms	=	4
	KEYPAD_DEBOUNCE_32_ms	=	5
	KEYPAD_DEBOUNCE_64_ms	=	6
	KEYPAD_DEBOUNCE_128_ms	=	7
```

- status-debounce-filter-period: The debounce period for the Status filter.

```dts
	KEYPAD_DEBOUNCE_1_ms	=	0
	KEYPAD_DEBOUNCE_2_ms	=	1
	KEYPAD_DEBOUNCE_4_ms	=	2
	KEYPAD_DEBOUNCE_8_ms	=	3
	KEYPAD_DEBOUNCE_16_ms	=	4
	KEYPAD_DEBOUNCE_32_ms	=	5
	KEYPAD_DEBOUNCE_64_ms	=	6
	KEYPAD_DEBOUNCE_128_ms	=	7
```

- row-output-enabled: An optional property indicating whether the row or
  column is being used as output. If specified the row is being used
  as the output. Else defaults to column.

- pull-up-enabled: An optional property indicating the Keypad scan mode.
  If specified implies the keypad scan pull-up has been enabled.

- autorepeat: Boolean, Enable auto repeat feature of Linux input
  subsystem (optional).

- linux,keymap: The keymap for keys as described in the binding document
  [devicetree/bindings/input/matrix-keymap.txt](</kernel/hardware/devicetree/bindings-input/matrix-keymap.md>).

## Example:

```dts
#include "dt-bindings/input/input.h"
```

```dts
/ {
	keypad: keypad@180ac000 {
		/* Required SoC specific properties */
		compatible = "brcm,bcm-keypad";

		/* Required Board specific properties */
		keypad,num-rows = <5>;
		keypad,num-columns = <5>;

		linux,keymap = <MATRIX_KEY(0x00, 0x02, KEY_F) /* key_forward */
		MATRIX_KEY(0x00, 0x03, KEY_HOME) /* key_home */
		MATRIX_KEY(0x00, 0x04, KEY_M) /* key_message */
		MATRIX_KEY(0x01, 0x00, KEY_A) /* key_contacts */
		MATRIX_KEY(0x01, 0x01, KEY_1) /* key_1 */
		MATRIX_KEY(0x01, 0x02, KEY_2) /* key_2 */
		MATRIX_KEY(0x01, 0x03, KEY_3) /* key_3 */
		MATRIX_KEY(0x01, 0x04, KEY_S) /* key_speaker */
		MATRIX_KEY(0x02, 0x00, KEY_P) /* key_phone */
		MATRIX_KEY(0x02, 0x01, KEY_4) /* key_4 */
		MATRIX_KEY(0x02, 0x02, KEY_5) /* key_5 */
		MATRIX_KEY(0x02, 0x03, KEY_6) /* key_6 */
		MATRIX_KEY(0x02, 0x04, KEY_VOLUMEUP) /* key_vol_up */
		MATRIX_KEY(0x03, 0x00, KEY_C) /* key_call_log */
		MATRIX_KEY(0x03, 0x01, KEY_7) /* key_7 */
		MATRIX_KEY(0x03, 0x02, KEY_8) /* key_8 */
		MATRIX_KEY(0x03, 0x03, KEY_9) /* key_9 */
		MATRIX_KEY(0x03, 0x04, KEY_VOLUMEDOWN) /* key_vol_down */
		MATRIX_KEY(0x04, 0x00, KEY_H) /* key_headset */
		MATRIX_KEY(0x04, 0x01, KEY_KPASTERISK) /* key_* */
		MATRIX_KEY(0x04, 0x02, KEY_0) /* key_0 */
		MATRIX_KEY(0x04, 0x03, KEY_GRAVE) /* key_# */
		MATRIX_KEY(0x04, 0x04, KEY_MUTE) /* key_mute */
		>;

		/* Optional board specific properties */
		col-debounce-filter-period = <5>;
		row-output-enabled;
		pull-up-enabled;

	};
};
```

---

# Cirrus Logic CLPS711X matrix keypad device tree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for Cirrus Logic CLPS711X matrix keypad device tree bindings.

## Required Properties:

- compatible:    Shall contain "cirrus,ep7209-keypad".
- row-gpios:     List of GPIOs used as row lines.
- poll-interval: Poll interval time in milliseconds.
- linux,keymap:  The definition can be found at
  bindings/input/matrix-keymap.txt.

## Optional Properties:

- autorepeat:    Enable autorepeat feature.

## Example:

```dts
	keypad {
		compatible = "cirrus,ep7312-keypad", "cirrus,ep7209-keypad";
		autorepeat;
		poll-interval = <120>;
		row-gpios = <&porta 0 0>,
			    <&porta 1 0>;

		linux,keymap = <
			MATRIX_KEY(0, 0, KEY_UP)
			MATRIX_KEY(0, 1, KEY_DOWN)
			MATRIX_KEY(1, 0, KEY_LEFT)
			MATRIX_KEY(1, 1, KEY_RIGHT)
		>;
	};
```

---

# Motorola CPCAP on key

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for Motorola CPCAP on key.

This module is part of the CPCAP. For more details about the whole
chip see [Documentation/devicetree/bindings/mfd/motorola-cpcap.txt](</kernel/hardware/devicetree/bindings-mfd/motorola-cpcap.md>).

This module provides a simple power button event via an Interrupt.

## Required properties:

```text
- compatible: should be one of the following
   - "motorola,cpcap-pwrbutton"
- interrupts: irq specifier for CPCAP's ON IRQ
```

## Example:

```dts
&cpcap {
	cpcap_pwrbutton: pwrbutton {
		compatible = "motorola,cpcap-pwrbutton";
		interrupts = <23 IRQ_TYPE_NONE>;
	};
};
```

---

# D-Link DIR-685 Touchkeys

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for D-Link DIR-685 Touchkeys.

This is a I2C one-off touchkey controller based on the Cypress Semiconductor
CY8C214 MCU with some firmware in its internal 8KB flash. The circuit
board inside the router is named E119921.

The touchkey device node should be placed inside an I2C bus node.

## Required properties:

- compatible: must be "dlink,dir685-touchkeys"
- reg: the I2C address of the touchkeys
- interrupts: reference to the interrupt number

## Example:

```dts
touchkeys@26 {
	compatible = "dlink,dir685-touchkeys";
	reg = <0x26>;
	interrupt-parent = <&gpio0>;
	interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
};
```

---

# National Instruments Ettus Research USRP E3x0 button driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for National Instruments Ettus Research USRP E3x0 button driver.

This module is part of the NI Ettus Research USRP E3x0 SDR.

This module provides a simple power button event via two interrupts.

## Required properties:

```text
- compatible: should be one of the following
  - "ettus,e3x0-button": For devices such as the NI Ettus Research USRP E3x0
- interrupts: should be one of the following
  - <0 30 1>, <0 31 1>: For devices such as the NI Ettus Research USRP E3x0
- interrupt-names: should be one of the following
  - "press", "release": For devices such as the NI Ettus Research USRP E3x0
```

Note: Interrupt numbers might vary depending on the FPGA configuration.

## Example:

```dts
	button {
		compatible = "ettus,e3x0-button";
		interrupt-parent = <&intc>;
		interrupts = <0 30 1>, <0 31 1>;
		interrupt-names = "press", "release";
	}
```

---

# GPIO Decoder DT bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for GPIO Decoder DT bindings.

## Required Properties:

- compatible: should be "gpio-decoder"
- gpios: a spec of gpios (at least two) to be decoded to a number with
  first entry representing the MSB.

## Optional Properties:

- decoder-max-value: Maximum possible value that can be reported by
  the gpios.
- linux,axis: the input subsystem axis to map to (ABS\_X/ABS\_Y).
  Defaults to 0 (ABS\_X).

## Example:

```dts
	gpio-decoder0 {
		compatible = "gpio-decoder";
		gpios = <&pca9536 3 GPIO_ACTIVE_HIGH>,
			<&pca9536 2 GPIO_ACTIVE_HIGH>,
			<&pca9536 1 GPIO_ACTIVE_HIGH>,
			<&pca9536 0 GPIO_ACTIVE_HIGH>;
		linux,axis = <0>; /* ABS_X */
		decoder-max-value = <9>;
	};
```

---

# Input: sysrq reset sequence

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for Input: sysrq reset sequence.

A simple binding to represent a set of keys as described in
include/uapi/linux/input.h. This is to communicate a sequence of keys to the
sysrq driver. Upon holding the keys for a specified amount of time (if
specified) the system is sync'ed and reset.

Key sequences are global to the system but all the keys in a set must be coming
from the same input device.

The /chosen node should contain a 'linux,sysrq-reset-seq' child node to define
a set of keys.

## Required property:

keyset: array of Linux keycodes, one keycode per cell.

## Optional property:

timeout-ms: duration keys must be pressed together in milliseconds before
generating a sysrq. If omitted the system is rebooted immediately when a valid
sequence has been recognized.

## Example:

```dts
 chosen {
                linux,sysrq-reset-seq {
                        keyset = <0x03
                                  0x04
                                  0x0a>;
                        timeout-ms = <3000>;
                };
         };
```

Would represent KEY\_2, KEY\_3 and KEY\_9.

---

# Matrix keymap bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for Matrix keymap bindings.

This file has been moved to [matrix-keymap.yaml](</kernel/hardware/devicetree-bindings/dt-input/matrix-keymap.md>)

---

# Microchip AT42QT1050 Five-channel Touch Sensor IC

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for Microchip AT42QT1050 Five-channel Touch Sensor IC.

The AT42QT1050 (QT1050) is a QTouchADC sensor device. The device can sense from
one to five keys, dependent on mode. The QT1050 includes all signal processing
functions necessary to provide stable sensing under a wide variety of changing
conditions, and the outputs are fully debounced.

The touchkey device node should be placed inside an I2C bus node.

## Required properties:

- compatible: Must be "microchip,qt1050"
- reg: The I2C address of the device
- interrupts: The sink for the touchpad's IRQ output,
  see [../interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>)

## Optional properties:

- wakeup-source: touch keys can be used as a wakeup source

## Each button (key) is represented as a sub-node:

Each not specified key or key with linux,code set to KEY\_RESERVED gets disabled
in HW.

## Subnode properties:

- linux,code: Keycode to emit.
- reg: The key number. Valid values: 0, 1, 2, 3, 4.

## Optional subnode-properties:

If a optional property is missing or has a invalid value the default value is
taken.

- microchip,pre-charge-time-ns:
  Each touchpad need some time to precharge. The value depends on the mechanical
  layout.
  Valid value range: 0 - 637500; values must be a multiple of 2500;
  default is 0.
- microchip,average-samples:
  Number of data samples which are averaged for each read.
  Valid values: 1, 4, 16, 64, 256, 1024, 4096, 16384; default is 1.
- microchip,average-scaling:
  The scaling factor which is used to scale the average-samples.
  Valid values: 1, 2, 4, 8, 16, 32, 64, 128; default is 1.
- microchip,threshold:
  Number of counts to register a touch detection.
  Valid value range: 0 - 255; default is 20.

## Example:

QT1050 with 3 non continuous keys, key2 and key4 are disabled.

```dts
touchkeys@41 {
	compatible = "microchip,qt1050";
	reg = <0x41>;
	interrupt-parent = <&gpio0>;
	interrupts = <17 IRQ_TYPE_EDGE_FALLING>;

	up@0 {
		reg = <0>;
		linux,code = <KEY_UP>;
		microchip,average-samples = <64>;
		microchip,average-scaling = <16>;
		microchip,pre-charge-time-ns = <10000>;
	};

	right@1 {
		reg = <1>;
		linux,code = <KEY_RIGHT>;
		microchip,average-samples = <64>;
		microchip,average-scaling = <8>;
	};

	down@3 {
		reg = <3>;
		linux,code = <KEY_DOWN>;
		microchip,average-samples = <256>;
		microchip,average-scaling = <16>;
	};
};
```

---

# Tegra keyboard controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for Tegra keyboard controller.

The key controller has maximum 24 pins to make matrix keypad. Any pin
can be configured as row or column. The maximum column pin can be 8
and maximum row pins can be 16 for Tegra20/Tegra30.

## Required properties:

```text
- compatible: "nvidia,tegra20-kbc"
- reg: Register base address of KBC.
- interrupts: Interrupt number for the KBC.
- nvidia,kbc-row-pins: The KBC pins which are configured as row. This is an
  array of pin numbers which is used as rows.
- nvidia,kbc-col-pins: The KBC pins which are configured as column. This is an
  array of pin numbers which is used as column.
- linux,keymap: The keymap for keys as described in the binding document
  devicetree/bindings/input/matrix-keymap.txt.
- clocks: Must contain one entry, for the module clock.
  See ../clocks/clock-bindings.txt for details.
- resets: Must contain an entry for each entry in reset-names.
  See ../reset/reset.txt for details.
- reset-names: Must include the following entries:
  - kbc
```

Optional properties, in addition to those specified by the shared
matrix-keyboard bindings:

- linux,fn-keymap: a second keymap, same specification as the
  matrix-keyboard-controller spec but to be used when the KEY\_FN modifier
  key is pressed.
- nvidia,debounce-delay-ms: delay in milliseconds per row scan for debouncing
- nvidia,repeat-delay-ms: delay in milliseconds before repeat starts
- nvidia,ghost-filter: enable ghost filtering for this device
- wakeup-source: configure keyboard as a wakeup source for suspend/resume
  (Legacy property supported: "nvidia,wakeup-source")

## Example:

```dts
keyboard: keyboard {
	compatible = "nvidia,tegra20-kbc";
	reg = <0x7000e200 0x100>;
	interrupts = <0 85 0x04>;
	clocks = <&tegra_car 36>;
	resets = <&tegra_car 36>;
	reset-names = "kbc";
	nvidia,ghost-filter;
	nvidia,debounce-delay-ms = <640>;
	nvidia,kbc-row-pins = <0 1 2>;    /* pin 0, 1, 2 as rows */
	nvidia,kbc-col-pins = <11 12 13>; /* pin 11, 12, 13 as columns */
	linux,keymap = <0x00000074
			0x00010067
			0x00020066
			0x01010068
			0x02000069
			0x02010070
			0x02020071>;
};
```

---

# TI's Keypad Controller device tree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for TI's Keypad Controller device tree bindings.

TI's Keypad controller is used to interface a SoC with a matrix-type
keypad device. The keypad controller supports multiple row and column lines.
A key can be placed at each intersection of a unique row and a unique column.
The keypad controller can sense a key-press and key-release and report the
event using a interrupt to the cpu.

This binding is based on the matrix-keymap binding with the following
changes:

keypad,num-rows and keypad,num-columns are required.

## Required SoC Specific Properties:

```text
- compatible: should be one of the following
   - "ti,omap4-keypad": For controllers compatible with omap4 keypad
      controller.
```

## Optional Properties specific to linux:

- linux,keypad-no-autorepeat: do no enable autorepeat feature.

## Example:

```dts
	keypad@4ae1c000{
		compatible = "ti,omap4-keypad";
		keypad,num-rows = <2>;
		keypad,num-columns = <8>;
		linux,keypad-no-autorepeat;
	};
```

---

# Aeroflex Gaisler APBPS2 PS/2 Core, supporting Keyboard or Mouse.

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for Aeroflex Gaisler APBPS2 PS/2 Core, supporting Keyboard or Mouse..

The APBPS2 PS/2 core is available in the GRLIB VHDL IP core library.

Note: In the ordinary environment for the APBPS2 core, a LEON SPARC system,
these properties are built from information in the AMBA plug&amp;play and from
bootloader settings.

## Required properties:

- name : Should be "GAISLER\_APBPS2" or "01\_060"
- reg : Address and length of the register set for the device
- interrupts : Interrupt numbers for this device

For further information look in the documentation for the GLIB IP core library:
http://www.gaisler.com/products/grlib/grip.pdf

---

# Marvell PXA Keypad controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for Marvell PXA Keypad controller.

Required Properties

- compatible : should be "marvell,pxa27x-keypad"
- reg : Address and length of the register set for the device
- interrupts : The interrupt for the keypad controller
- marvell,debounce-interval : How long time the key will be
  recognized when it is pressed. It is a u32 value, and bit\[31:16\]
  is debounce interval for direct key and bit\[15:0\] is debounce
  interval for matrix key. The value is in binary number of 2ms

Optional Properties For Matrix Keyes
Please refer to [matrix-keymap.txt](</kernel/hardware/devicetree/bindings-input/matrix-keymap.md>)

Optional Properties for Direct Keyes

- marvell,direct-key-count : How many direct keyes are used.
- marvell,direct-key-mask : The mask indicates which keyes
  are used. If bit\[X\] of the mask is set, the direct key X
  is used.
- marvell,direct-key-low-active : Direct key status register
  tells the level of pins that connects to the direct keyes.
  When this property is set, it means that when the pin level
  is low, the key is pressed(active).
- marvell,direct-key-map : It is a u16 array. Each item indicates
  the linux key-code for the direct key.

Optional Properties For Rotary

- marvell,rotary0 : It is a u32 value. Bit\[31:16\] is the
  linux key-code for rotary up. Bit\[15:0\] is the linux key-code
  for rotary down. It is for rotary 0.
- marvell,rotary1 : Same as marvell,rotary0. It is for rotary 1.
- marvell,rotary-rel-key : When rotary is used for relative axes
  in the device, the value indicates the key-code for relative
  axes measurement in the device. It is a u32 value. Bit\[31:16\]
  is for rotary 1, and Bit\[15:0\] is for rotary 0.

## Examples:

```dts
	keypad: keypad@d4012000 {
		keypad,num-rows = <3>;
		keypad,num-columns = <5>;
		linux,keymap = <0x0000000e	/* KEY_BACKSPACE */
				0x0001006b	/* KEY_END */
				0x00020061	/* KEY_RIGHTCTRL */
				0x0003000b	/* KEY_0 */
				0x00040002	/* KEY_1 */
				0x0100008b	/* KEY_MENU */
				0x01010066	/* KEY_HOME */
				0x010200e7	/* KEY_SEND */
				0x01030009	/* KEY_8 */
				0x0104000a	/* KEY_9 */
				0x02000160	/* KEY_OK */
				0x02010003	/* KEY_2 */
				0x02020004	/* KEY_3 */
				0x02030005	/* KEY_4 */
				0x02040006>;	/* KEY_5 */
		marvell,rotary0 = <0x006c0067>;	/* KEY_UP & KEY_DOWN */
		marvell,direct-key-count = <1>;
		marvell,direct-key-map = <0x001c>;
		marvell,debounce-interval = <0x001e001e>;
	};
```

---

# Raydium I2C touchscreen

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for Raydium I2C touchscreen.

## Required properties:

- compatible: must be "raydium,rm32380"
- reg: The I2C address of the device
- interrupts: interrupt to which the chip is connected
  See [../interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>)
  Optional properties:
- avdd-supply: analog power supply needed to power device
- vccio-supply: IO Power source
- reset-gpios: reset gpio the chip is connected to.

## Example:

```dts
	touchscreen@39 {
		compatible = "raydium,rm32380";
		reg = <0x39>;
		interrupt-parent = <&gpio>;
		interrupts = <0x0 IRQ_TYPE_EDGE_FALLING>;
	};
```

---

# SPEAr keyboard controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for SPEAr keyboard controller.

## Required properties:

- compatible: "st,spear300-kbd"

Optional properties, in addition to those specified by the shared
matrix-keyboard bindings:

- autorepeat: bool: enables key autorepeat
- st,mode: keyboard mode: 0 - 9x9, 1 - 6x6, 2 - 2x2

## Example:

```dts
kbd@fc400000 {
	compatible = "st,spear300-kbd";
	reg = <0xfc400000 0x100>;
	linux,keymap = < 0x00030012
			 0x0102003a >;
	autorepeat;
	st,mode = <0>;
};
```

---

# ST Keyscan controller Device Tree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for ST Keyscan controller Device Tree bindings.

The ST keyscan controller Device Tree binding is based on the
matrix-keymap.

## Required properties:

- compatible: "st,sti-keyscan"

- reg: Register base address and size of st-keyscan controller.

- interrupts: Interrupt number for the st-keyscan controller.

- clocks: Must contain one entry, for the module clock.
  See ../clocks/clock-bindings.txt for details.

- pinctrl: Should specify pin control groups used for this controller.
  See [../pinctrl/pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) for details.

- linux,keymap: The keymap for keys as described in the binding document
  [devicetree/bindings/input/matrix-keymap.txt](</kernel/hardware/devicetree/bindings-input/matrix-keymap.md>).

- keypad,num-rows: Number of row lines connected to the keypad controller.

- keypad,num-columns: Number of column lines connected to the keypad
  controller.

## Optional property:

- st,debounce\_us: Debouncing interval time in microseconds

## Example:

```dts
keyscan: keyscan@fe4b0000 {
	compatible = "st,sti-keyscan";
	reg = <0xfe4b0000 0x2000>;
	interrupts = <GIC_SPI 212 IRQ_TYPE_NONE>;
	clocks	= <&CLK_SYSIN>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_keyscan>;

	keypad,num-rows = <4>;
	keypad,num-columns = <4>;
	st,debounce_us = <5000>;

	linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_F13)
			 MATRIX_KEY(0x00, 0x01, KEY_F9)
			 MATRIX_KEY(0x00, 0x02, KEY_F5)
			 MATRIX_KEY(0x00, 0x03, KEY_F1)
			 MATRIX_KEY(0x01, 0x00, KEY_F14)
			 MATRIX_KEY(0x01, 0x01, KEY_F10)
			 MATRIX_KEY(0x01, 0x02, KEY_F6)
			 MATRIX_KEY(0x01, 0x03, KEY_F2)
			 MATRIX_KEY(0x02, 0x00, KEY_F15)
			 MATRIX_KEY(0x02, 0x01, KEY_F11)
			 MATRIX_KEY(0x02, 0x02, KEY_F7)
			 MATRIX_KEY(0x02, 0x03, KEY_F3)
			 MATRIX_KEY(0x03, 0x00, KEY_F16)
			 MATRIX_KEY(0x03, 0x01, KEY_F12)
			 MATRIX_KEY(0x03, 0x02, KEY_F8)
			 MATRIX_KEY(0x03, 0x03, KEY_F4) >;
	};
```

---

# Texas Instruments Palmas family power button module

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for Texas Instruments Palmas family power button module.

This module is part of the Palmas family of PMICs. For more details
about the whole chip see:
[Documentation/devicetree/bindings/mfd/palmas.txt](</kernel/hardware/devicetree/bindings-mfd/palmas.md>).

This module provides a simple power button event via an Interrupt.

## Required properties:

```text
- compatible: should be one of the following
   - "ti,palmas-pwrbutton": For Palmas compatible power on button
- interrupts: Interrupt number of power button submodule on device.
```

## Optional Properties:

- ti,palmas-long-press-seconds: Duration in seconds which the power
  button should be kept pressed for Palmas to power off automatically.
  NOTE: This depends on OTP support and POWERHOLD signal configuration
  on platform. Valid values are 6, 8, 10 and 12.
- ti,palmas-pwron-debounce-milli-seconds: Duration in milliseconds
  which the power button should be kept pressed for Palmas to register
  a press for debouncing purposes. NOTE: This depends on specific
  Palmas variation capability. Valid values are 15, 100, 500 and 1000.

## Example:

```dts
&palmas {
	palmas_pwr_button: pwrbutton {
		compatible = "ti,palmas-pwrbutton";
		interrupt-parent = <&tps659038>;
		interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
		ti,palmas-long-press-seconds = <12>;
		ti,palmas-pwron-debounce-milli-seconds = <15>;
	};
};
```

---

# Texas Instruments TPS65217 and TPS65218 power button

_Peios Kernel / Hardware and drivers / Device tree / bindings/input_

> Device-tree binding reference for Texas Instruments TPS65217 and TPS65218 power button.

This module is part of the TPS65217/TPS65218. For more details about the whole
TPS65217 chip see [Documentation/devicetree/bindings/regulator/tps65217.txt](</kernel/hardware/devicetree/bindings-regulator/tps65217.md>).

This driver provides a simple power button event via an Interrupt.

## Required properties:

- compatible: should be "ti,tps65217-pwrbutton" or "ti,tps65218-pwrbutton"

## Required properties:

```text
- interrupts: should be one of the following
   - <2>: For controllers compatible with tps65217
   - <3 IRQ_TYPE_EDGE_BOTH>: For controllers compatible with tps65218
```

## Examples:

```dts
&tps {
	tps65217-pwrbutton {
		compatible = "ti,tps65217-pwrbutton";
		interrupts = <2>;
	};
};
```

```dts
&tps {
	power-button {
		compatible = "ti,tps65218-pwrbutton";
		interrupts = <3 IRQ_TYPE_EDGE_BOTH>;
	};
};
```

---

# AUO in-cell touchscreen controller using Pixcir sensors

_Peios Kernel / Hardware and drivers / Device tree / bindings/input/touchscreen_

> Device-tree binding reference for AUO in-cell touchscreen controller using Pixcir sensors.

## Required properties:

- compatible: must be "auo,auo\_pixcir\_ts"
- reg: I2C address of the chip
- interrupts: interrupt to which the chip is connected
- gpios: gpios the chip is connected to
  first one is the interrupt gpio and second one the reset gpio
- x-size: horizontal resolution of touchscreen
- y-size: vertical resolution of touchscreen

## Example:

```dts
	i2c@00000000 {
		/* ... */

		auo_pixcir_ts@5c {
			compatible = "auo,auo_pixcir_ts";
			reg = <0x5c>;
			interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;

			gpios = <&gpf 2 0 GPIO_LEVEL_HIGH>, /* INT */
				<&gpf 5 1 GPIO_LEVEL_LOW>; /* RST */

			x-size = <800>;
			y-size = <600>;
		};

		/* ... */
	};
```

---

# Broadcom's IPROC Touchscreen Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/input/touchscreen_

> Device-tree binding reference for Broadcom's IPROC Touchscreen Controller.

## Required properties:

- compatible: must be "brcm,iproc-touchscreen"
- ts\_syscon: handler of syscon node defining physical base
  address of the controller and length of memory mapped region.
  If this property is selected please make sure MFD\_SYSCON config
  is enabled in the defconfig file.
- clocks:  The clock provided by the SOC to driver the tsc
- clock-names:  name for the clock
- interrupts: The touchscreen controller's interrupt
- address-cells: Specify the number of u32 entries needed in child nodes.
  Should set to 1.
- size-cells: Specify number of u32 entries needed to specify child nodes size
  in reg property. Should set to 1.

## Optional properties:

```text
- scanning_period: Time between scans. Each step is 1024 us.  Valid 1-256.
- debounce_timeout: Each step is 512 us.  Valid 0-255
- settling_timeout: The settling duration (in ms) is the amount of time
                    the tsc waits to allow the voltage to settle after
                    turning on the drivers in detection mode.
                    Valid values: 0-11
                    0 =  0.008 ms
                    1 =  0.01 ms
                    2 =  0.02 ms
                    3 =  0.04 ms
                    4 =  0.08 ms
                    5 =  0.16 ms
                    6 =  0.32 ms
                    7 =  0.64 ms
                    8 =  1.28 ms
                    9 =  2.56 ms
                   10 =  5.12 ms
                   11 = 10.24 ms
- touch_timeout: The continuous number of scan periods in which touch is
                not detected before the controller returns to idle state.
                Valid values 0-255.
- average_data: Number of data samples which are averaged before a final
                data point is placed into the FIFO
                Valid values 0-7
                0 =   1 sample
                1 =   2 samples
                2 =   4 samples
                3 =   8 samples
                4 =  16 samples
                5 =  32 samples
                6 =  64 samples
                7 = 128 samples
- fifo_threshold: Interrupt is generated whenever the number of fifo
                entries exceeds this value
                Valid values 0-31
- touchscreen-size-x: horizontal resolution of touchscreen (in pixels)
- touchscreen-size-y: vertical resolution of touchscreen (in pixels)
- touchscreen-fuzz-x: horizontal noise value of the absolute input
                      device (in pixels)
- touchscreen-fuzz-y: vertical noise value of the absolute input
                      device (in pixels)
- touchscreen-inverted-x: X axis is inverted (boolean)
- touchscreen-inverted-y: Y axis is inverted (boolean)
```

Example: An example of touchscreen node

```dts
	ts_adc_syscon: ts_adc_syscon@180a6000 {
		compatible = "brcm,iproc-ts-adc-syscon","syscon";
		reg = <0x180a6000 0xc30>;
	};
```

```dts
	touchscreen: touchscreen@180a6000 {
		compatible = "brcm,iproc-touchscreen";
		#address-cells = <1>;
		#size-cells = <1>;
		ts_syscon = <&ts_adc_syscon>;
		clocks = <&adc_clk>;
		clock-names = "tsc_clk";
		interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;

		scanning_period = <5>;
		debounce_timeout = <40>;
		settling_timeout = <7>;
		touch_timeout = <10>;
		average_data = <5>;
		fifo_threshold = <1>;
		/* Touchscreen is rotated 180 degrees. */
		touchscreen-inverted-x;
		touchscreen-inverted-y;
	};
```

---

# Rohm BU21029 Touch Screen Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/input/touchscreen_

> Device-tree binding reference for Rohm BU21029 Touch Screen Controller.

## Required properties:

- compatible              : must be "rohm,bu21029"
- reg                     : i2c device address of the chip (0x40 or 0x41)
- interrupt-parent        : the phandle for the gpio controller
- interrupts              : (gpio) interrupt to which the chip is connected
- rohm,x-plate-ohms       : x-plate resistance in Ohm

## Optional properties:

- reset-gpios             : gpio pin to reset the chip (active low)
- touchscreen-size-x      : horizontal resolution of touchscreen (in pixels)
- touchscreen-size-y      : vertical resolution of touchscreen (in pixels)
- touchscreen-max-pressure: maximum pressure value
- vdd-supply              : power supply for the controller

## Example:

```dts
	&i2c1 {
		/* ... */

		bu21029: bu21029@40 {
			compatible = "rohm,bu21029";
			reg = <0x40>;
			interrupt-parent = <&gpio1>;
			interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
			reset-gpios = <&gpio6 16 GPIO_ACTIVE_LOW>;
			rohm,x-plate-ohms = <600>;
			touchscreen-size-x = <800>;
			touchscreen-size-y = <480>;
			touchscreen-max-pressure = <4095>;
		};

		/* ... */
	};
```

---

# Freescale mx25 TS conversion queue module

_Peios Kernel / Hardware and drivers / Device tree / bindings/input/touchscreen_

> Device-tree binding reference for Freescale mx25 TS conversion queue module.

mx25 touchscreen conversion queue module which controls the ADC unit of the
mx25 for attached touchscreens.

## Required properties:

- compatible: Should be "fsl,imx25-tcq".
- reg: Memory range of the device.
- interrupts: Should be the interrupt number associated with this module within
  the tscadc unit (&lt;0&gt;).
- fsl,wires: Should be '&lt;4&gt;' or '&lt;5&gt;'

## Optional properties:

- fsl,pen-debounce-ns: Pen debounce time in nanoseconds.
- fsl,pen-threshold: Pen-down threshold for the touchscreen. This is a value
  between 1 and 4096. It is the ratio between the internal reference voltage
  and the measured voltage after the plate was precharged. Resistance between
  plates and therefore the voltage decreases with pressure so that a smaller
  value is equivalent to a higher pressure.
- fsl,settling-time-ns: Settling time in nanoseconds. The settling time is before
  the actual touch detection to wait for an even charge distribution in the
  plate.

This device includes two conversion queues which can be added as subnodes.
The first queue is for the touchscreen, the second for general purpose ADC.

## Example:

```dts
	tsc: tcq@50030400 {
		compatible = "fsl,imx25-tcq";
		reg = <0x50030400 0x60>;
		interrupt-parent = <&tscadc>;
		interrupts = <0>;
		fsl,wires = <4>;
	};
```

---

# HiDeep Finger and Stylus touchscreen controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/input/touchscreen_

> Device-tree binding reference for HiDeep Finger and Stylus touchscreen controller.

## Required properties:

- compatible		: must be "hideep,hideep-ts"
- reg			: I2C slave address, (e.g. 0x6C).
- interrupts : Interrupt to which the chip is connected.

## Optional properties:

- vdd-supply	: It is the controller supply for controlling
  main voltage(3.3V) through the regulator.
- vid-supply	: It is the controller supply for controlling
  IO voltage(1.8V) through the regulator.
- reset-gpios	: Define for reset gpio pin.
  It is to use for reset IC.
- touchscreen-size-x	: X axis size of touchscreen
- touchscreen-size-y	: Y axis size of touchscreen
- linux,keycodes	: Specifies an array of numeric keycode values to
  be used for reporting button presses. The array can
  contain up to 3 entries.

## Example:

```dts
#include "dt-bindings/input/input.h"
```

```dts
i2c@00000000 {

	/* ... */

	touchscreen@6c {
		compatible = "hideep,hideep-ts";
		reg = <0x6c>;
		interrupt-parent = <&gpx1>;
		interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
		vdd-supply = <&ldo15_reg>;
		vid-supply = <&ldo18_reg>;
		reset-gpios = <&gpx1 5 0>;
		touchscreen-size-x = <1080>;
		touchscreen-size-y = <1920>;
		linux,keycodes = <KEY_HOME>, <KEY_MENU>, <KEY_BACK>;
	};
};
```

---

# SiS I2C Multiple Touch Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/input/touchscreen_

> Device-tree binding reference for SiS I2C Multiple Touch Controller.

## Required properties:

- compatible: must be "sis,9200-ts"
- reg: i2c slave address
- interrupts: touch controller interrupt (see interrupt
  binding \[0\])

## Optional properties:

- pinctrl-names: should be "default" (see pinctrl binding \[1\]).
- pinctrl-0: a phandle pointing to the pin settings for the
  device (see pinctrl binding \[1\]).
- attn-gpios: the gpio pin used as attention line
- reset-gpios: the gpio pin used to reset the controller
- wakeup-source: touchscreen can be used as a wakeup source

\[0\]: [Documentation/devicetree/bindings/interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>)
\[1\]: [Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)

## Example:

```dts
	sis9255@5c  {
		compatible = "sis,9200-ts";
		reg = <0x5c>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_sis>;
		interrupt-parent = <&gpio3>;
		interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
		irq-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>;
		reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>;
	};
```

---

# TS-4800 Touchscreen bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/input/touchscreen_

> Device-tree binding reference for TS-4800 Touchscreen bindings.

## Required properties:

```text
- compatible: must be "technologic,ts4800-ts"
- reg: physical base address of the controller and length of memory mapped
  region.
- syscon: phandle / integers array that points to the syscon node which
          describes the FPGA's syscon registers.
          - phandle to FPGA's syscon
          - offset to the touchscreen register
          - offset to the touchscreen enable bit
```

---

# Interconnect Provider Device Tree Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/interconnect_

> Device-tree binding reference for Interconnect Provider Device Tree Bindings.

The purpose of this document is to define a common set of generic interconnect
providers/consumers properties.

= interconnect providers =

The interconnect provider binding is intended to represent the interconnect
controllers in the system. Each provider registers a set of interconnect
nodes, which expose the interconnect related capabilities of the interconnect
to consumer drivers. These capabilities can be throughput, latency, priority
etc. The consumer drivers set constraints on interconnect path (or endpoints)
depending on the use case. Interconnect providers can also be interconnect
consumers, such as in the case where two network-on-chip fabrics interface
directly.

## Required properties:

- compatible : contains the interconnect provider compatible string
- #interconnect-cells : number of cells in a interconnect specifier needed to
  encode the interconnect node id and optionally add a
  path tag

## Example:

```dts
		snoc: interconnect@580000 {
			compatible = "qcom,msm8916-snoc";
			#interconnect-cells = <1>;
			reg = <0x580000 0x14000>;
			clock-names = "bus_clk", "bus_a_clk";
			clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
				 <&rpmcc RPM_SMD_SNOC_A_CLK>;
		};
```

= interconnect consumers =

The interconnect consumers are device nodes which dynamically express their
bandwidth requirements along interconnect paths they are connected to. There
can be multiple interconnect providers on a SoC and the consumer may consume
multiple paths from different providers depending on use case and the
components it has to interact with.

## Required properties:

interconnects : Pairs of phandles and interconnect provider specifier to denote

```text
	        the edge source and destination ports of the interconnect path.
		An optional path tag value could specified as additional argument
		to both endpoints and in such cases, this information will be passed
		to the interconnect framework to do aggregation based on the attached
		tag.
```

## Optional properties:

interconnect-names : List of interconnect path name strings sorted in the same

```text
		     order as the interconnects property. Consumers drivers will use
		     interconnect-names to match interconnect paths with interconnect
		     specifier pairs.
```

## Reserved interconnect names:

- dma-mem: Path from the device to the main memory of
  the system

## Example:

```dts
	sdhci@7864000 {
		...
		interconnects = <&pnoc MASTER_SDCC_1 &bimc SLAVE_EBI_CH0>;
		interconnect-names = "sdhc-mem";
	};
```

## Example with path tags:

```dts
	gnoc: interconnect@17900000 {
		...
		interconnect-cells = <2>;
	};
```

```dts
	mnoc: interconnect@1380000 {
		...
		interconnect-cells = <2>;
	};
```

```dts
	cpu@0 {
		...
		interconnects = <&gnoc MASTER_APPSS_PROC 3 &mnoc SLAVE_EBI1 3>;
	}
```

---

# Specifying interrupt information for devices

_Peios Kernel / Hardware and drivers / Device tree / bindings/interrupt-controller_

> Device-tree binding reference for Specifying interrupt information for devices.

## 1\) Interrupt client nodes

Nodes that describe devices which generate interrupts must contain an
"interrupts" property, an "interrupts-extended" property, or both. If both are
present, the latter should take precedence; the former may be provided simply
for compatibility with software that does not recognize the latter. These
properties contain a list of interrupt specifiers, one per output interrupt. The
format of the interrupt specifier is determined by the interrupt controller to
which the interrupts are routed; see section 2 below for details.

## Example:

```dts
	interrupt-parent = <&intc1>;
	interrupts = <5 0>, <6 0>;
```

The "interrupt-parent" property is used to specify the controller to which
interrupts are routed and contains a single phandle referring to the interrupt
controller node. This property is inherited, so it may be specified in an
interrupt client node or in any of its parent nodes. Interrupts listed in the
"interrupts" property are always in reference to the node's interrupt parent.

The "interrupts-extended" property is a special form; useful when a node needs
to reference multiple interrupt parents or a different interrupt parent than
the inherited one. Each entry in this property contains both the parent phandle
and the interrupt specifier.

## Example:

```dts
	interrupts-extended = <&intc1 5 1>, <&intc2 1 0>;
```

## 2\) Interrupt controller nodes

A device is marked as an interrupt controller with the "interrupt-controller"
property. This is a empty, boolean property. An additional "#interrupt-cells"
property defines the number of cells needed to specify a single interrupt.

It is the responsibility of the interrupt controller's binding to define the
length and format of the interrupt specifier. The following two variants are
commonly used:

## a) one cell

```text
  The #interrupt-cells property is set to 1 and the single cell defines the
  index of the interrupt within the controller.
```

## Example:

```dts
	vic: intc@10140000 {
		compatible = "arm,versatile-vic";
		interrupt-controller;
		#interrupt-cells = <1>;
		reg = <0x10140000 0x1000>;
	};
```

```dts
	sic: intc@10003000 {
		compatible = "arm,versatile-sic";
		interrupt-controller;
		#interrupt-cells = <1>;
		reg = <0x10003000 0x1000>;
		interrupt-parent = <&vic>;
		interrupts = <31>; /* Cascaded to vic */
	};
```

## b) two cells

```text
  The #interrupt-cells property is set to 2 and the first cell defines the
  index of the interrupt within the controller, while the second cell is used
  to specify any of the following flags:
```

```text
    - bits[3:0] trigger type and level flags
        1 = low-to-high edge triggered
        2 = high-to-low edge triggered
        4 = active high level-sensitive
        8 = active low level-sensitive
```

## Example:

```dts
	i2c@7000c000 {
		gpioext: gpio-adnp@41 {
			compatible = "ad,gpio-adnp";
			reg = <0x41>;

			interrupt-parent = <&gpio>;
			interrupts = <160 1>;

			gpio-controller;
			#gpio-cells = <1>;

			interrupt-controller;
			#interrupt-cells = <2>;

			nr-gpios = <64>;
		};

		sx8634@2b {
			compatible = "smtc,sx8634";
			reg = <0x2b>;

			interrupt-parent = <&gpioext>;
			interrupts = <3 0x8>;

			#address-cells = <1>;
			#size-cells = <0>;

			threshold = <0x40>;
			sensitivity = <7>;
		};
	};
```

## 3\) Interrupt wakeup parent

Some interrupt controllers in a SoC, are always powered on and have a select
interrupts routed to them, so that they can wakeup the SoC from suspend. These
interrupt controllers do not fall into the category of a parent interrupt
controller and can be specified by the "wakeup-parent" property and contain a
single phandle referring to the wakeup capable interrupt controller.

## Example:

```dts
	wakeup-parent = <&pdc_intc>;
```

---

# Msi bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/interrupt-controller_

> Device-tree binding reference for Msi bindings.

This document describes the generic device tree binding for MSI controllers and
their master(s).

Message Signaled Interrupts (MSIs) are a class of interrupts generated by a
write to an MMIO address.

MSIs were originally specified by PCI (and are used with PCIe), but may also be
used with other busses, and hence a mechanism is required to relate devices on
those busses to the MSI controllers which they are capable of using,
potentially including additional information.

## MSIs are distinguished by some combination of:

- The doorbell (the MMIO address written to).

```text
  Devices may be configured by software to write to arbitrary doorbells which
  they can address. An MSI controller may feature a number of doorbells.
```

- The payload (the value written to the doorbell).

```text
  Devices may be configured to write an arbitrary payload chosen by software.
  MSI controllers may have restrictions on permitted payloads.
```

- Sideband information accompanying the write.

```text
  Typically this is neither configurable nor probeable, and depends on the path
  taken through the memory system (i.e. it is a property of the combination of
  MSI controller and device rather than a property of either in isolation).
```

## MSI controllers:

An MSI controller signals interrupts to a CPU when a write is made to an MMIO
address by some master. An MSI controller may feature a number of doorbells.

## Required properties:

- msi-controller: Identifies the node as an MSI controller.

## Optional properties:

- #msi-cells: The number of cells in an msi-specifier, required if not zero.

```text
  Typically this will encode information related to sideband data, and will
  not encode doorbells or payloads as these can be configured dynamically.
```

```text
  The meaning of the msi-specifier is defined by the device tree binding of
  the specific MSI controller. 
```

## MSI clients

MSI clients are devices which generate MSIs. For each MSI they wish to
generate, the doorbell and payload may be configured, though sideband
information may not be configurable.

## Required properties:

- msi-parent: A list of phandle + msi-specifier pairs, one for each MSI
  controller which the device is capable of using.

```text
  This property is unordered, and MSIs may be allocated from any combination of
  MSI controllers listed in the msi-parent property.
```

```text
  If a device has restrictions on the allocation of MSIs, these restrictions
  must be described with additional properties.
```

```text
  When #msi-cells is non-zero, busses with an msi-parent will require
  additional properties to describe the relationship between devices on the bus
  and the set of MSIs they can potentially generate.
```

## Example

```dts
/ {
	#address-cells = <1>;
	#size-cells = <1>;

	msi_a: msi-controller@a {
		reg = <0xa 0xf00>;
		compatible = "vendor-a,some-controller";
		msi-controller;
		/* No sideband data, so #msi-cells omitted */
	};

	msi_b: msi-controller@b {
		reg = <0xb 0xf00>;
		compatible = "vendor-b,another-controller";
		msi-controller;
		/* Each device has some unique ID */
		#msi-cells = <1>;
	};

	msi_c: msi-controller@c {
		reg = <0xc 0xf00>;
		compatible = "vendor-b,another-controller";
		msi-controller;
		/* Each device has some unique ID */
		#msi-cells = <1>;
	};

	dev@0 {
		reg = <0x0 0xf00>;
		compatible = "vendor-c,some-device";

		/* Can only generate MSIs to msi_a */
		msi-parent = <&msi_a>;
	};

	dev@1 {
		reg = <0x1 0xf00>;
		compatible = "vendor-c,some-device";

		/* 
		 * Can generate MSIs to either A or B.
		 */
		msi-parent = <&msi_a>, <&msi_b 0x17>;
	};

	dev@2 {
		reg = <0x2 0xf00>;
		compatible = "vendor-c,some-device";
		/*
		 * Has different IDs at each MSI controller.
		 * Can generate MSIs to all of the MSI controllers.
		 */
		msi-parent = <&msi_a>, <&msi_b 0x17>, <&msi_c 0x53>;
	};
};
```

---

# Iommu bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/iommu_

> Device-tree binding reference for Iommu bindings.

This document describes the generic device tree binding for IOMMUs and their
master(s).

## IOMMU device node:

## An IOMMU can provide the following services:

- Remap address space to allow devices to access physical memory ranges that
  they otherwise wouldn't be capable of accessing.

```text
  Example: 32-bit DMA to 64-bit physical addresses
```

- Implement scatter-gather at page level granularity so that the device does
  not have to.

- Provide system protection against "rogue" DMA by forcing all accesses to go
  through the IOMMU and faulting when encountering accesses to unmapped
  address regions.

- Provide address space isolation between multiple contexts.

```text
  Example: Virtualization
```

Device nodes compatible with this binding represent hardware with some of the
above capabilities.

IOMMUs can be single-master or multiple-master. Single-master IOMMU devices
typically have a fixed association to the master device, whereas multiple-
master IOMMU devices can translate accesses from more than one master.

The device tree node of the IOMMU device's parent bus must contain a valid
"dma-ranges" property that describes how the physical address space of the
IOMMU maps to memory. An empty "dma-ranges" property means that there is a
1:1 mapping from IOMMU to memory.

## Required properties:

- #iommu-cells: The number of cells in an IOMMU specifier needed to encode an
  address.

The meaning of the IOMMU specifier is defined by the device tree binding of
the specific IOMMU. Below are a few examples of typical use-cases:

- #iommu-cells = &lt;0&gt;: Single master IOMMU devices are not configurable and
  therefore no additional information needs to be encoded in the specifier.
  This may also apply to multiple master IOMMU devices that do not allow the
  association of masters to be configured. Note that an IOMMU can by design
  be multi-master yet only expose a single master in a given configuration.
  In such cases the number of cells will usually be 1 as in the next case.
- #iommu-cells = &lt;1&gt;: Multiple master IOMMU devices may need to be configured
  in order to enable translation for a given master. In such cases the single
  address cell corresponds to the master device's ID. In some cases more than
  one cell can be required to represent a single master ID.
- #iommu-cells = &lt;4&gt;: Some IOMMU devices allow the DMA window for masters to
  be configured. The first cell of the address in this may contain the master
  device's ID for example, while the second cell could contain the start of
  the DMA window for the given device. The length of the DMA window is given
  by the third and fourth cells.

Note that these are merely examples and real-world use-cases may use different
definitions to represent their individual needs. Always refer to the specific
IOMMU binding for the exact meaning of the cells that make up the specifier.

## IOMMU master node:

Devices that access memory through an IOMMU are called masters. A device can
have multiple master interfaces (to one or more IOMMU devices).

## Required properties:

- iommus: A list of phandle and IOMMU specifier pairs that describe the IOMMU
  master interfaces of the device. One entry in the list describes one master
  interface of the device.

When an "iommus" property is specified in a device tree node, the IOMMU will
be used for address translation. If a "dma-ranges" property exists in the
device's parent node it will be ignored. An exception to this rule is if the
referenced IOMMU is disabled, in which case the "dma-ranges" property of the
parent shall take effect. Note that merely disabling a device tree node does
not guarantee that the IOMMU is really disabled since the hardware may not
have a means to turn off translation. But it is invalid in such cases to
disable the IOMMU's device tree node in the first place because it would
prevent any driver from properly setting up the translations.

## Optional properties:

- pasid-num-bits: Some masters support multiple address spaces for DMA, by
  tagging DMA transactions with an address space identifier. By default,
  this is 0, which means that the device only has one address space.

- dma-can-stall: When present, the master can wait for a transaction to
  complete for an indefinite amount of time. Upon translation fault some
  IOMMUs, instead of aborting the translation immediately, may first
  notify the driver and keep the transaction in flight. This allows the OS
  to inspect the fault and, for example, make physical pages resident
  before updating the mappings and completing the transaction. Such IOMMU
  accepts a limited number of simultaneous stalled transactions before
  having to either put back-pressure on the master, or abort new faulting
  transactions.

```text
  Firmware has to opt-in stalling, because most buses and masters don't
  support it. In particular it isn't compatible with PCI, where
  transactions have to complete before a time limit. More generally it
  won't work in systems and masters that haven't been designed for
  stalling. For example the OS, in order to handle a stalled transaction,
  may attempt to retrieve pages from secondary storage in a stalled
  domain, leading to a deadlock.
```

## Notes:

One possible extension to the above is to use an "iommus" property along with
a "dma-ranges" property in a bus device node (such as PCI host bridges). This
can be useful to describe how children on the bus relate to the IOMMU if they
are not explicitly listed in the device tree (e.g. PCI devices). However, the
requirements of that use-case haven't been fully determined yet. Implementing
this is therefore not recommended without further discussion and extension of
this binding.

## Examples:

## Single-master IOMMU:

```dts
	iommu {
		#iommu-cells = <0>;
	};
```

```dts
	master {
		iommus = <&{/iommu}>;
	};
```

## Multiple-master IOMMU with fixed associations:

```text
	/* multiple-master IOMMU */
	iommu {
		/*
		 * Masters are statically associated with this IOMMU and share
		 * the same address translations because the IOMMU does not
		 * have sufficient information to distinguish between masters.
		 *
		 * Consequently address translation is always on or off for
		 * all masters at any given point in time.
		 */
		#iommu-cells = <0>;
	};
```

```text
	/* static association with IOMMU */
	master@1 {
		reg = <1>;
		iommus = <&{/iommu}>;
	};
```

```text
	/* static association with IOMMU */
	master@2 {
		reg = <2>;
		iommus = <&{/iommu}>;
	};
```

## Multiple-master IOMMU:

```dts
	iommu {
		/* the specifier represents the ID of the master */
		#iommu-cells = <1>;
	};
```

```dts
	master@1 {
		/* device has master ID 42 in the IOMMU */
		iommus = <&{/iommu} 42>;
	};
```

```dts
	master@2 {
		/* device has master IDs 23 and 24 in the IOMMU */
		iommus = <&{/iommu} 23>, <&{/iommu} 24>;
	};
```

## Multiple-master IOMMU with configurable DMA window:

```dts
	/ {
		iommu {
			/*
			 * One cell for the master ID and one cell for the
			 * address of the DMA window. The length of the DMA
			 * window is encoded in two cells.
			 *
			 * The DMA window is the range addressable by the
			 * master (i.e. the I/O virtual address space).
			 */
			#iommu-cells = <4>;
		};

		master {
			/* master ID 42, 4 GiB DMA window starting at 0 */
			iommus = <&{/iommu}  42  0  0x1 0x0>;
		};
	};
```

---

# NVIDIA Tegra 30 IOMMU H/W, SMMU (System Memory Management Unit)

_Peios Kernel / Hardware and drivers / Device tree / bindings/iommu_

> Device-tree binding reference for NVIDIA Tegra 30 IOMMU H/W, SMMU (System Memory Management Unit).

## Required properties:

- compatible : "nvidia,tegra30-smmu"
- reg : Should contain 3 register banks(address and length) for each
  of the SMMU register blocks.
- interrupts : Should contain MC General interrupt.
- nvidia,#asids : # of ASIDs
- dma-window : IOVA start address and length.
- nvidia,ahb : phandle to the ahb bus connected to SMMU.

## Example:

```dts
	smmu {
		compatible = "nvidia,tegra30-smmu";
		reg = <0x7000f010 0x02c
		       0x7000f1f0 0x010
		       0x7000f228 0x05c>;
		nvidia,#asids = <4>;		/* # of ASIDs */
		dma-window = <0 0x40000000>;	/* IOVA start & length */
		nvidia,ahb = <&ahb>;
	};
```

---

# OMAP2+ IOMMU

_Peios Kernel / Hardware and drivers / Device tree / bindings/iommu_

> Device-tree binding reference for OMAP2+ IOMMU.

## Required properties:

- compatible : Should be one of,
  "ti,omap2-iommu" for OMAP2/OMAP3 IOMMU instances
  "ti,omap4-iommu" for OMAP4/OMAP5 IOMMU instances
  "ti,dra7-dsp-iommu" for DRA7xx DSP IOMMU instances
  "ti,dra7-iommu" for DRA7xx IOMMU instances
- ti,hwmods  : Name of the hwmod associated with the IOMMU instance
- reg        : Address space for the configuration registers
- interrupts : Interrupt specifier for the IOMMU instance
- #iommu-cells : Should be 0. OMAP IOMMUs are all "single-master" devices,
  and needs no additional data in the pargs specifier. Please
  also refer to the generic bindings document for more info
  on this property,
  [Documentation/devicetree/bindings/iommu/iommu.txt](</kernel/hardware/devicetree/bindings-iommu/iommu.md>)

## Optional properties:

- ti,#tlb-entries : Number of entries in the translation look-aside buffer.
  Should be either 8 or 32 (default: 32)
- ti,iommu-bus-err-back : Indicates the IOMMU instance supports throwing
  back a bus error response on MMU faults.
- ti,syscon-mmuconfig : Should be a pair of the phandle to the DSP\_SYSTEM
  syscon node that contains the additional control
  register for enabling the MMU, and the MMU instance
  number (0-indexed) within the sub-system. This property
  is required for DSP IOMMU instances on DRA7xx SoCs. The
  instance number should be 0 for DSP MDMA MMUs and 1 for
  DSP EDMA MMUs.

## Example:

```text
	/* OMAP3 ISP MMU */
	mmu_isp: mmu@480bd400 {
		#iommu-cells = <0>;
		compatible = "ti,omap2-iommu";
		reg = <0x480bd400 0x80>;
		interrupts = <24>;
		ti,hwmods = "mmu_isp";
		ti,#tlb-entries = <8>;
	};
```

```text
	/* DRA74x DSP2 MMUs */
	mmu0_dsp2: mmu@41501000 {
		compatible = "ti,dra7-dsp-iommu";
		reg = <0x41501000 0x100>;
		interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
		ti,hwmods = "mmu0_dsp2";
		#iommu-cells = <0>;
		ti,syscon-mmuconfig = <&dsp2_system 0x0>;
	};
```

```dts
	mmu1_dsp2: mmu@41502000 {
		compatible = "ti,dra7-dsp-iommu";
		reg = <0x41502000 0x100>;
		interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
		ti,hwmods = "mmu1_dsp2";
		#iommu-cells = <0>;
		ti,syscon-mmuconfig = <&dsp2_system 0x1>;
	};
```

---

# 88pm860x-backlight bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds/backlight_

> Device-tree binding reference for 88pm860x-backlight bindings.

## Optional properties:

- marvell,88pm860x-iset: Current supplies on backlight device.
- marvell,88pm860x-pwm: PWM frequency on backlight device.

## Example:

```dts
	backlights {
		backlight-0 {
			marvell,88pm860x-iset = <4>;
			marvell,88pm860x-pwm = <3>;
		};
		backlight-2 {
		};
```

---

# SKY81452-backlight bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds/backlight_

> Device-tree binding reference for SKY81452-backlight bindings.

## Required properties:

- compatible		: Must be "skyworks,sky81452-backlight"

## Optional properties:

- name			: Name of backlight device. Default is 'lcd-backlight'.
- gpios			: GPIO to use to EN pin.
  See [Documentation/devicetree/bindings/gpio/gpio.txt](</kernel/hardware/devicetree/bindings-gpio/gpio.md>)
- led-sources		: List of enabled channels from 0 to 5.
  See [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- skyworks,ignore-pwm	: Ignore both PWM input
- skyworks,dpwm-mode	: Enable DPWM dimming mode, otherwise Analog dimming.
- skyworks,phase-shift	: Enable phase shift mode
- skyworks,short-detection-threshold-volt
  : It should be one of 4, 5, 6 and 7V.
- skyworks,current-limit-mA
  : It should be 2300mA or 2750mA.

## Example:

```dts
	backlight {
		compatible = "skyworks,sky81452-backlight";
		name = "pwm-backlight";
		led-sources = <0 1 2 5>;
		skyworks,ignore-pwm;
		skyworks,phase-shift;
		skyworks,current-limit-mA = <2300>;
	};
```

---

# TPS65217 family of regulators

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds/backlight_

> Device-tree binding reference for TPS65217 family of regulators.

The TPS65217 chip contains a boost converter and current sinks which can be
used to drive LEDs for use as backlights.

## Required properties:

- compatible: "ti,tps65217"
- reg: I2C slave address
- backlight: node for specifying WLED1 and WLED2 lines in TPS65217
- isel: selection bit, valid values: 1 for ISEL1 (low-level) and 2 for ISEL2 (high-level)
- fdim: PWM dimming frequency, valid values: 100, 200, 500, 1000
- default-brightness: valid values: 0-100

Each regulator is defined using the standard binding for regulators.

## Example:

```dts
	tps: tps@24 {
		reg = <0x24>;
		compatible = "ti,tps65217";
		backlight {
			isel = <1>;  /* 1 - ISET1, 2 ISET2 */
			fdim = <100>; /* TPS65217_BL_FDIM_100HZ */
			default-brightness = <50>;
		};
	};
```

---

# Common bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds_

> Device-tree binding reference for Common bindings.

This file has moved to [./common.yaml](</kernel/hardware/devicetree-bindings/dt-leds/common.md>).

---

# LEDs connected to Broadcom BCM6358 controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds_

> Device-tree binding reference for LEDs connected to Broadcom BCM6358 controller.

This controller is present on BCM6358 and BCM6368.
In these SoCs there are Serial LEDs (LEDs connected to a 74x164 controller),
which can either be controlled by software (exporting the 74x164 as spi-gpio.
See [Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml](</kernel/hardware/devicetree-bindings/dt-gpio/fairchild-74hc595.md>)), or
by hardware using this driver.

## Required properties:

- compatible : should be "brcm,bcm6358-leds".
- #address-cells : must be 1.
- #size-cells : must be 0.
- reg : BCM6358 LED controller address and size.

## Optional properties:

- brcm,clk-div : SCK signal divider. Possible values are 1, 2, 4 and 8.
  Default : 1
- brcm,clk-dat-low : Boolean, makes clock and data signals active low.
  Default : false

Each LED is represented as a sub-node of the brcm,bcm6358-leds device.

## LED sub-node required properties:

- reg : LED pin number (only LEDs 0 to 31 are valid).

## LED sub-node optional properties:

- label : see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- default-state : see
  [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- linux,default-trigger : see
  [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)

## Examples:

Scenario 1 : BCM6358

```dts
	leds0: led-controller@fffe00d0 {
		compatible = "brcm,bcm6358-leds";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0xfffe00d0 0x8>;

		alarm_white {
			reg = <0>;
			active-low;
			label = "white:alarm";
		};
		tv_white {
			reg = <2>;
			active-low;
			label = "white:tv";
		};
		tel_white {
			reg = <3>;
			active-low;
			label = "white:tel";
		};
		adsl_white {
			reg = <4>;
			active-low;
			label = "white:adsl";
		};
	};
```

Scenario 2 : BCM6368

```dts
	leds0: led-controller@100000d0 {
		compatible = "brcm,bcm6358-leds";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x100000d0 0x8>;
		brcm,pol-low;
		brcm,clk-div = <4>;

		power_red {
			reg = <0>;
			active-low;
			label = "red:power";
		};
		power_green {
			reg = <1>;
			active-low;
			label = "green:power";
			default-state = "on";
		};
		power_blue {
			reg = <2>;
			label = "blue:power";
		};
		broadband_red {
			reg = <3>;
			active-low;
			label = "red:broadband";
		};
		broadband_green {
			reg = <4>;
			label = "green:broadband";
		};
		broadband_blue {
			reg = <5>;
			active-low;
			label = "blue:broadband";
		};
		wireless_red {
			reg = <6>;
			active-low;
			label = "red:wireless";
		};
		wireless_green {
			reg = <7>;
			active-low;
			label = "green:wireless";
		};
		wireless_blue {
			reg = <8>;
			label = "blue:wireless";
		};
		phone_red {
			reg = <9>;
			active-low;
			label = "red:phone";
		};
		phone_green {
			reg = <10>;
			active-low;
			label = "green:phone";
		};
		phone_blue {
			reg = <11>;
			label = "blue:phone";
		};
		upgrading_red {
			reg = <12>;
			active-low;
			label = "red:upgrading";
		};
		upgrading_green {
			reg = <13>;
			active-low;
			label = "green:upgrading";
		};
		upgrading_blue {
			reg = <14>;
			label = "blue:upgrading";
		};
	};
```

---

# Motorola CPCAP PMIC LEDs

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds_

> Device-tree binding reference for Motorola CPCAP PMIC LEDs.

This module is part of the CPCAP. For more details about the whole
chip see [Documentation/devicetree/bindings/mfd/motorola-cpcap.txt](</kernel/hardware/devicetree/bindings-mfd/motorola-cpcap.md>).

## Requires node properties:

```text
- compatible: should be one of
   * "motorola,cpcap-led-mdl"		(Main Display Lighting)
   * "motorola,cpcap-led-kl"		(Keyboard Lighting)
   * "motorola,cpcap-led-adl"		(Aux Display Lighting)
   * "motorola,cpcap-led-red"		(Red Triode)
   * "motorola,cpcap-led-green"		(Green Triode)
   * "motorola,cpcap-led-blue"		(Blue Triode)
   * "motorola,cpcap-led-cf"		(Camera Flash)
   * "motorola,cpcap-led-bt"		(Bluetooth)
   * "motorola,cpcap-led-cp"		(Camera Privacy LED)
- label: see Documentation/devicetree/bindings/leds/common.txt
- vdd-supply: A phandle to the regulator powering the LED
```

## Example:

```dts
&cpcap {
	cpcap_led_red: red-led {
		compatible = "motorola,cpcap-led-red";
		label = "cpcap:red";
		vdd-supply = <&sw5>;
	};
};
```

---

# Crane Merchandising System - cr0014114 LED driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds_

> Device-tree binding reference for Crane Merchandising System - cr0014114 LED driver.

This LED Board is widely used in vending machines produced
by Crane Merchandising Systems.

## Required properties:

- compatible: "crane,cr0014114"

Property rules described in [Documentation/devicetree/bindings/spi/spi-bus.txt](</kernel/hardware/devicetree/bindings-spi/spi-bus.md>)
apply. In particular, "reg" and "spi-max-frequency" properties must be given.

## LED sub-node properties:

- function :
  see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- color :
  see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- label :
  see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>) (deprecated)
- linux,default-trigger : (optional)
  see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)

## Example

```dts
#include <dt-bindings/leds/common.h>
```

```dts
led-controller@0 {
	compatible = "crane,cr0014114";
	reg = <0>;
	spi-max-frequency = <50000>;
	#address-cells = <1>;
	#size-cells = <0>;

	led@0 {
		reg = <0>;
		function = "coin";
		color = <LED_COLOR_ID_RED>;
	};
	led@1 {
		reg = <1>;
		function = "coin";
		color = <LED_COLOR_ID_GREEN>;
	};
	led@2 {
		reg = <2>;
		function = "coin";
		color = <LED_COLOR_ID_BLUE>;
	};
	led@3 {
		reg = <3>;
		function = "bill";
		color = <LED_COLOR_ID_RED>;
	};
	led@4 {
		reg = <4>;
		function = "bill";
		color = <LED_COLOR_ID_GREEN>;
	};
	led@5 {
		reg = <5>;
		function = "bill";
		color = <LED_COLOR_ID_BLUE>;
	};
	...
};
```

---

# Crane Merchandising System - EL15203000 LED driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds_

> Device-tree binding reference for Crane Merchandising System - EL15203000 LED driver.

This LED Board (aka RED LEDs board) is widely used in
coffee vending machines produced by Crane Merchandising Systems.
The board manages 3 LEDs and supports predefined blinking patterns
for specific leds.

Vending area LED encoded with symbol 'V' (hex code 0x56).
Doesn't have any hardware blinking pattern.

Screen light tube LED which surrounds vending machine screen and
encoded with symbol 'S' (hex code 0x53). Supports blinking breathing pattern.

Water Pipe LED encoded with symbol 'P' (hex code 0x50) and
actually consists of 5 LEDs that exposed by protocol like one LED.
Supports next patterns:

- cascade pattern
- inversed cascade pattern
- bounce pattern
- inversed bounce pattern

## Required properties:

- compatible : "crane,el15203000"
- #address-cells : must be 1
- #size-cells : must be 0

Property rules described in [Documentation/devicetree/bindings/spi/spi-bus.txt](</kernel/hardware/devicetree/bindings-spi/spi-bus.md>)
apply. In particular, "reg" and "spi-max-frequency" properties must be given.

## Optional LED sub-node properties:

- function:
  see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- color:
  see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)

## Example

```dts
#include <dt-bindings/leds/common.h>
```

```dts
led-controller@0 {
	compatible = "crane,el15203000";
	reg = <0>;
	spi-max-frequency = <50000>;
	#address-cells = <1>;
	#size-cells = <0>;

	/* water pipe */
	led@50 {
		reg = <0x50>;
		function = "pipe";
		color = <LED_COLOR_ID_RED>;
	};

	/* screen frame */
	led@53 {
		reg = <0x53>;
		function = "screen";
		color = <LED_COLOR_ID_RED>;
	};

	/* vending area */
	led@56 {
		reg = <0x56>;
		function = "vend";
		color = <LED_COLOR_ID_RED>;
	};
};
```

---

# Binding for ISSI IS31FL32xx and Si-En SN32xx LED Drivers

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds_

> Device-tree binding reference for Binding for ISSI IS31FL32xx and Si-En SN32xx LED Drivers.

The IS31FL32xx/SN32xx family of LED drivers are I2C devices with multiple
constant-current channels, each with independent 256-level PWM control.
Each LED is represented as a sub-node of the device.

## Required properties:

- compatible: one of
  issi,is31fl3236
  issi,is31fl3235
  issi,is31fl3218
  issi,is31fl3216
  issi,is31fl3293
  si-en,sn3218
  si-en,sn3216
- reg: I2C slave address
- address-cells : must be 1
- size-cells : must be 0

## LED sub-node properties:

- reg : LED channel number (1..N)
- label :  (optional)
  see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- linux,default-trigger :  (optional)
  see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)

## Example:

```dts
is31fl3236: led-controller@3c {
	compatible = "issi,is31fl3236";
	reg = <0x3c>;
	#address-cells = <1>;
	#size-cells = <0>;

	led@1 {
		reg = <1>;
		label = "EB:blue:usr0";
	};
	led@2 {
		reg = <2>;
		label = "EB:blue:usr1";
	};
	...
	led@36 {
		reg = <36>;
		label = "EB:blue:usr35";
	};
};
```

## For more product information please see the links below:

http://www.issi.com/US/product-analog-fxled-driver.shtml
http://www.si-en.com/product.asp?parentid=890

---

# Texas Instruments - lm3532 White LED driver with ambient light sensing

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds_

> Device-tree binding reference for Texas Instruments - lm3532 White LED driver with ambient light sensing.

capability.

The LM3532 provides the 3 high-voltage, low-side current sinks. The device is
programmable over an I2C-compatible interface and has independent
current control for all three channels. The adaptive current regulation
method allows for different LED currents in each current sink thus allowing
for a wide variety of backlight and keypad applications.

The main features of the LM3532 include dual ambient light sensor inputs
each with 32 internal voltage setting resistors, 8-bit logarithmic and linear
brightness control, dual external PWM brightness control inputs, and up to
1000:1 dimming ratio with programmable fade in and fade out settings.

## Required properties:

- compatible : "ti,lm3532"
- reg : I2C slave address
- #address-cells : 1
- #size-cells : 0

## Optional properties:

- enable-gpios : gpio pin to enable (active high)/disable the device.
- ramp-up-us - The Run time ramp rates/step are from one current
  set-point to another after the device has reached its
  initial target set point from turn-on
- ramp-down-us - The Run time ramp rates/step are from one current
  set-point to another after the device has reached its
  initial target set point from turn-on
  Range for ramp settings: 8us - 65536us

## Optional properties if ALS mode is used:

- ti,als-vmin - Minimum ALS voltage defined in Volts
- ti,als-vmax - Maximum ALS voltage defined in Volts
  Per the data sheet the max ALS voltage is 2V and the min is 0V

- ti,als1-imp-sel - ALS1 impedance resistor selection in Ohms
- ti,als2-imp-sel - ALS2 impedance resistor selection in Ohms
  Range for impedance select: 37000 Ohms - 1190 Ohms
  Values above 37kohms will be set to the "High Impedance" setting

- ti,als-avrg-time-us - Determines the length of time the device needs to
  average the two ALS inputs.  This is only used if
  the input mode is LM3532\_ALS\_INPUT\_AVRG.
  Range: 17920us - 2293760us
- ti,als-input-mode - Determines how the device uses the attached ALS
  devices.
  0x00 - ALS1 and ALS2 input average
  0x01 - ALS1 Input
  0x02 - ALS2 Input
  0x03 - Max of ALS1 and ALS2

## Required child properties:

- reg : Indicates control bank the LED string is controlled by
- led-sources : see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- ti,led-mode : Defines if the LED strings are manually controlled or
  if the LED strings are controlled by the ALS.
  0x00 - LED strings are I2C controlled via full scale
  brightness control register
  0x01 - LED strings are ALS controlled

## Optional LED child properties:

- label : see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- linux,default-trigger :
  see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- led-max-microamp : Defines the full scale current value for each control
  bank.  The range is from 5000uA-29800uA in increments
  of 800uA.

## Example:

```dts
led-controller@38 {
	compatible = "ti,lm3532";
	#address-cells = <1>;
	#size-cells = <0>;
	reg = <0x38>;

	enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
	ramp-up-us = <1024>;
	ramp-down-us = <65536>;

	ti,als-vmin = <0>;
	ti,als-vmax = <2000>;
	ti,als1-imp-sel = <4110>;
	ti,als2-imp-sel = <2180>;
	ti,als-avrg-time-us = <17920>;
	ti,als-input-mode = <0x00>;

	led@0 {
		reg = <0>;
		led-sources = <2>;
		ti,led-mode = <1>;
		led-max-microamp = <21800>;
		label = ":backlight";
		linux,default-trigger = "backlight";
	};

	led@1 {
		reg = <1>;
		led-sources = <1>;
		ti,led-mode = <0>;
		label = ":kbd_backlight";
	};
};
```

## For more product information please see the links below:

https://www.ti.com/product/LM3532

---

# Texas Instruments - lm3601x Single-LED Flash Driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds_

> Device-tree binding reference for Texas Instruments - lm3601x Single-LED Flash Driver.

The LM3601X are ultra-small LED flash drivers that
provide a high level of adjustability.

## Required properties:

- compatible : Can be one of the following
  "ti,lm36010"
  "ti,lm36011"
- reg : I2C slave address
- #address-cells : 1
- #size-cells : 0

## Required child properties:

- reg : 0 - Indicates a IR mode
  1 - Indicates a Torch (white LED) mode

## Required properties for flash LED child nodes:

```text
	See Documentation/devicetree/bindings/leds/common.txt
	- flash-max-microamp : Range from 11mA - 1.5A
	- flash-max-timeout-us : Range from 40ms - 1600ms
	- led-max-microamp : Range from 2.4mA - 376mA
```

## Optional child properties:

- function : see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- color : see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- label : see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>) (deprecated)

## Example:

```dts
#include <dt-bindings/leds/common.h>
```

```dts
led-controller@64 {
	compatible = "ti,lm36010";
	#address-cells = <1>;
	#size-cells = <0>;
	reg = <0x64>;

	led@0 {
		reg = <1>;
		function = LED_FUNCTION_TORCH;
		color = <LED_COLOR_ID_WHITE>;
		led-max-microamp = <376000>;
		flash-max-microamp = <1500000>;
		flash-max-timeout-us = <1600000>;
	};
}
```

## For more product information please see the links below:

https://www.ti.com/product/LM36010
https://www.ti.com/product/LM36011

---

# Texas Instruments LM36274 4-Channel LCD Backlight Driver w/Integrated Bias

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds_

> Device-tree binding reference for Texas Instruments LM36274 4-Channel LCD Backlight Driver w/Integrated Bias.

The LM36274 is an integrated four-channel WLED driver and LCD bias supply.
The backlight boost provides the power to bias four parallel LED strings with
up to 29V total output voltage. The 11-bit LED current is programmable via
the I2C bus and/or controlled via a logic level PWM input from 60 uA to 30 mA.

Parent device properties are documented in
[Documentation/devicetree/bindings/mfd/ti-lmu.txt](</kernel/hardware/devicetree/bindings-mfd/ti-lmu.md>)

Regulator properties are documented in
[Documentation/devicetree/bindings/regulator/lm363x-regulator.txt](</kernel/hardware/devicetree/bindings-regulator/lm363x-regulator.md>)

## Required backlight properties:

- compatible:
  "ti,lm36274-backlight"
- reg : 0
- #address-cells : 1
- #size-cells : 0
- led-sources : Indicates which LED strings will be enabled.
  Values from 0-3, sources is 0 based so strings will be
  source value + 1.

## Optional backlight properties:

- label : see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- linux,default-trigger :
  see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)

## Example:

HVLED string 1 and 3 are controlled by control bank A and HVLED 2 string is
controlled by control bank B.

```dts
lm36274@11 {
	compatible = "ti,lm36274";
	#address-cells = <1>;
	#size-cells = <0>;
	reg = <0x11>;

	enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;

	regulators {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "ti,lm363x-regulator";

		enable-gpios = <&pioC 0 GPIO_ACTIVE_HIGH>,
			       <&pioC 1 GPIO_ACTIVE_HIGH>;

		vboost {
			regulator-name = "lcd_boost";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <7150000>;
			regulator-always-on;
		};

		vpos {
			regulator-name = "lcd_vpos";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <6500000>;
		};

		vneg {
			regulator-name = "lcd_vneg";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <6500000>;
		};
	};

	backlight {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "ti,lm36274-backlight";

		led@0 {
			reg = <0>;
			led-sources = <0 2>;
			label = "white:backlight_cluster";
			linux,default-trigger = "backlight";
		};
	};
};
```

## For more product information please see the link below:

https://www.ti.com/lit/ds/symlink/lm36274.pdf

---

# Bindings for Linear Technologies LT3593 LED controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds_

> Device-tree binding reference for Bindings for Linear Technologies LT3593 LED controller.

## Required properties:

- compatible:		Should be "lltc,lt3593".
- lltc,ctrl-gpios:	A handle to the GPIO that is connected to the 'CTRL'
  pin of the chip.

The hardware supports only one LED. The properties of this LED are
configured in a sub-node in the device node.

## Optional sub-node properties:

- function:		See [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- color:		See [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- label:		A label for the LED. If none is given, the LED will be
  named "lt3595::" (deprecated)
- linux,default-trigger: The default trigger for the LED.
  See [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- default-state:	The initial state of the LED.
  See [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)

If multiple chips of this type are found in a design, each one needs to
be handled by its own device node.

## Example:

```dts
#include <dt-bindings/leds/common.h>
```

```dts
led-controller {
	compatible = "lltc,lt3593";
	lltc,ctrl-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;

	led {
		function = LED_FUNCTION_BACKLIGHT;
		color = <LED_COLOR_ID_WHITE>;
		default-state = "on";
	};
};
```

---

# Leds netxbig bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds_

> Device-tree binding reference for Leds netxbig bindings.

Binding for the CPLD LEDs (GPIO extension bus) found on some LaCie/Seagate
boards (Example: 2Big/5Big Network v2, 2Big NAS).

## Required properties:

- compatible: "lacie,netxbig-leds".
- gpio-ext: Phandle for the gpio-ext bus.

## Optional properties:

- timers: Timer array. Each timer entry is represented by three integers:
  Mode (gpio-ext bus), delay\_on and delay\_off.

Each LED is represented as a sub-node of the netxbig-leds device.

## Required sub-node properties:

- mode-addr: Mode register address on gpio-ext bus.
- mode-val: Mode to value mapping. Each entry is represented by two integers:
  A mode and the corresponding value on the gpio-ext bus.
- bright-addr: Brightness register address on gpio-ext bus.
- max-brightness: Maximum brightness value.

## Optional sub-node properties:

- label: Name for this LED. If omitted, the label is taken from the node name.
- linux,default-trigger: Trigger assigned to the LED.

## Example:

```dts
netxbig-leds {
	compatible = "lacie,netxbig-leds";

	gpio-ext = &gpio_ext;

	timers = <NETXBIG_LED_TIMER1 500 500
		  NETXBIG_LED_TIMER2 500 1000>;

	blue-power {
		label = "netxbig:blue:power";
		mode-addr = <0>;
		mode-val = <NETXBIG_LED_OFF 0
			    NETXBIG_LED_ON 1
			    NETXBIG_LED_TIMER1 3
			    NETXBIG_LED_TIMER2 7>;
		bright-addr = <1>;
		max-brightness = <7>;
	};
	red-power {
		label = "netxbig:red:power";
		mode-addr = <0>;
		mode-val = <NETXBIG_LED_OFF 0
			    NETXBIG_LED_ON 2
			    NETXBIG_LED_TIMER1 4>;
		bright-addr = <1>;
		max-brightness = <7>;
	};
	blue-sata0 {
		label = "netxbig:blue:sata0";
		mode-addr = <3>;
		mode-val = <NETXBIG_LED_OFF 0
			    NETXBIG_LED_ON 7
			    NETXBIG_LED_SATA 1
			    NETXBIG_LED_TIMER1 3>;
		bright-addr = <2>;
		max-brightness = <7>;
	};
	red-sata0 {
		label = "netxbig:red:sata0";
		mode-addr = <3>;
		mode-val = <NETXBIG_LED_OFF 0
			    NETXBIG_LED_ON 2
			    NETXBIG_LED_TIMER1 4>;
		bright-addr = <2>;
		max-brightness = <7>;
	};
	blue-sata1 {
		label = "netxbig:blue:sata1";
		mode-addr = <4>;
		mode-val = <NETXBIG_LED_OFF 0
			    NETXBIG_LED_ON 7
			    NETXBIG_LED_SATA 1
			    NETXBIG_LED_TIMER1 3>;
		bright-addr = <2>;
		max-brightness = <7>;
	};
	red-sata1 {
		label = "netxbig:red:sata1";
		mode-addr = <4>;
		mode-val = <NETXBIG_LED_OFF 0
			    NETXBIG_LED_ON 2
			    NETXBIG_LED_TIMER1 4>;
		bright-addr = <2>;
		max-brightness = <7>;
	};
};
```

---

# Binding for dual-GPIO LED found on Network Space v2 (and parents).

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds_

> Device-tree binding reference for Binding for dual-GPIO LED found on Network Space v2 (and parents)..

## Required properties:

- compatible: "lacie,ns2-leds".

Each LED is represented as a sub-node of the ns2-leds device.

## Required sub-node properties:

- cmd-gpio: Command LED GPIO. See OF device-tree GPIO specification.
- slow-gpio: Slow LED GPIO. See OF device-tree GPIO specification.
- modes-map: A mapping between LED modes (off, on or SATA activity blinking) and
  the corresponding cmd-gpio/slow-gpio values. All the GPIO values combinations
  should be given in order to avoid having an unknown mode at driver probe time.

## Optional sub-node properties:

- label: Name for this LED. If omitted, the label is taken from the node name.
- linux,default-trigger: Trigger assigned to the LED.

## Example:

```dts
#include <dt-bindings/leds/leds-ns2.h>
```

```dts
ns2-leds {
	compatible = "lacie,ns2-leds";

	blue-sata {
		label = "ns2:blue:sata";
		slow-gpio = <&gpio0 29 0>;
		cmd-gpio = <&gpio0 30 0>;
		modes-map = <NS_V2_LED_OFF  0 1
			     NS_V2_LED_ON   1 0
			     NS_V2_LED_ON   0 0
			     NS_V2_LED_SATA 1 1>;
	};
};
```

---

# Device Tree binding for LEDs on IBM Power Systems

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds_

> Device-tree binding reference for Device Tree binding for LEDs on IBM Power Systems.

## Required properties:

- compatible : Should be "ibm,opal-v3-led".
- led-mode   : Should be "lightpath" or "guidinglight".

Each location code of FRU/Enclosure must be expressed in the
form of a sub-node.

## Required properties for the sub nodes:

- led-types : Supported LED types (attention/identify/fault) provided
  in the form of string array.

## Example:

```dts
leds {
	compatible = "ibm,opal-v3-led";
	led-mode = "lightpath";

	U78C9.001.RST0027-P1-C1 {
		led-types = "identify", "fault";
	};
	...
	...
};
```

---

# Single Byte SPI LED Device Driver.

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds_

> Device-tree binding reference for Single Byte SPI LED Device Driver..

The driver can be used for controllers with a very simple SPI protocol:

- one LED is controlled by a single byte on MOSI
- the value of the byte gives the brightness between two values (lowest to
  highest)
- no return value is necessary (no MISO signal)

The value for lowest and highest brightness is dependent on the device and
therefore on the compatible string.

Depending on the compatible string some special functions (like hardware
accelerated blinking) might can be supported too.

The driver currently only supports one LED. The properties of the LED are
configured in a sub-node in the device node.

## Required properties:

```text
- compatible: should be one of
   * "ubnt,acb-spi-led"		microcontroller (SONiX 8F26E611LA) based device
				used for example in Ubiquiti airCube ISP
```

Property rules described in [Documentation/devicetree/bindings/spi/spi-bus.txt](</kernel/hardware/devicetree/bindings-spi/spi-bus.md>)
apply.

## LED sub-node properties:

- label:
  see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- default-state:
  see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
  Only "on" and "off" are supported.

## Example:

```dts
led-controller@0 {
	compatible = "ubnt,acb-spi-led";
	reg = <0>;
	spi-max-frequency = <100000>;

	led {
		label = "white:status";
		default-state = "on";
	};
};
```

---

# Pattern format for LED pattern trigger

_Peios Kernel / Hardware and drivers / Device tree / bindings/leds_

> Device-tree binding reference for Pattern format for LED pattern trigger.

The pattern is given by a series of tuples, of brightness and duration (ms).
The LED is expected to traverse the series and each brightness value for the
specified duration. Duration of 0 means brightness should immediately change to
new value, and writing malformed pattern deactivates any active one.

1. For gradual dimming, the dimming interval now is set as 50 milliseconds. So
   the tuple with duration less than dimming interval (50ms) is treated as a step
   change of brightness, i.e. the subsequent brightness will be applied without
   adding intervening dimming intervals.

The gradual dimming format of the software pattern values should be:
"brightness\_1 duration\_1 brightness\_2 duration\_2 brightness\_3 duration\_3 ...".
For example (using sysfs interface):

echo 0 1000 255 2000 &gt; pattern

It will make the LED go gradually from zero-intensity to max (255) intensity in
1000 milliseconds, then back to zero intensity in 2000 milliseconds:

LED brightness

```text
    ^
```

255-|       / \\            / \\            /

```text
    |      /    \         /    \         /
    |     /       \      /       \      /
    |    /          \   /          \   /
  0-|   /             \/             \/
    +---0----1----2----3----4----5----6------------> time (s)
```

2. To make the LED go instantly from one brightness value to another, we should
   use zero-time lengths (the brightness must be same as the previous tuple's). So
   the format should be: "brightness\_1 duration\_1 brightness\_1 0 brightness\_2
   duration\_2 brightness\_2 0 ...".
   For example (using sysfs interface):

echo 0 1000 0 0 255 2000 255 0 &gt; pattern

It will make the LED stay off for one second, then stay at max brightness for
two seconds:

LED brightness

```text
    ^
```

```text
255-|        +---------+    +---------+
```

```text
    |        |         |    |         |
    |        |         |    |         |
    |        |         |    |         |
  0-|   -----+         +----+         +----
    +---0----1----2----3----4----5----6------------> time (s)
```

---

# Altera Mailbox Driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/mailbox_

> Device-tree binding reference for Altera Mailbox Driver.

## Required properties:

- compatible :	"altr,mailbox-1.0".
- reg : 	physical base address of the mailbox and length of
  memory mapped region.
- #mbox-cells:	Common mailbox binding property to identify the number
  of cells required for the mailbox specifier. Should be 1.

## Optional properties:

- interrupts :		interrupt number. The interrupt specifier format
  depends on the interrupt controller parent.

## Example:

```dts
	mbox_tx: mailbox@100 {
		compatible = "altr,mailbox-1.0";
		reg = <0x100 0x8>;
		interrupt-parent = < &gic_0 >;
		interrupts = <5>;
		#mbox-cells = <1>;
	};
```

```dts
	mbox_rx: mailbox@200 {
		compatible = "altr,mailbox-1.0";
		reg = <0x200 0x8>;
		interrupt-parent = < &gic_0 >;
		interrupts = <6>;
		#mbox-cells = <1>;
	};
```

## Mailbox client

"mboxes" and the optional "mbox-names" (please see
[Documentation/devicetree/bindings/mailbox/mailbox.txt](</kernel/hardware/devicetree/bindings-mailbox/mailbox.md>) for details). Each value
of the mboxes property should contain a phandle to the mailbox controller
device node and second argument is the channel index. It must be 0 (hardware
support only one channel).The equivalent "mbox-names" property value can be
used to give a name to the communication channel to be used by the client user.

## Example:

```dts
	mclient0: mclient0@400 {
		compatible = "client-1.0";
		reg = <0x400 0x10>;
		mbox-names = "mbox-tx", "mbox-rx";
		mboxes = <&mbox_tx 0>,
			 <&mbox_rx 0>;
	};
```

---

# Hisilicon Hi3660 Mailbox Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/mailbox_

> Device-tree binding reference for Hisilicon Hi3660 Mailbox Controller.

Hisilicon Hi3660 mailbox controller supports up to 32 channels.  Messages
are passed between processors, including application &amp; communication
processors, MCU, HIFI, etc.  Each channel is unidirectional and accessed
by using MMIO registers; it supports maximum to 8 words message.

## Controller

## Required properties:

- compatible:		: Shall be "hisilicon,hi3660-mbox"
- reg:			: Offset and length of the device's register set
- #mbox-cells:		: Must be 3
  &lt;&amp;phandle channel dst\_irq ack\_irq&gt;
  phandle	: Label name of controller
  channel	: Channel number
  dst\_irq	: Remote interrupt vector
  ack\_irq	: Local interrupt vector

- interrupts:		: Contains the two IRQ lines for mailbox.

## Example:

```dts
mailbox: mailbox@e896b000 {
	compatible = "hisilicon,hi3660-mbox";
	reg = <0x0 0xe896b000 0x0 0x1000>;
	interrupts = <0x0 0xc0 0x4>,
		     <0x0 0xc1 0x4>;
	#mbox-cells = <3>;
};
```

## Client

## Required properties:

- compatible		: See the client docs
- mboxes		: Standard property to specify a Mailbox (See [./mailbox.txt](</kernel/hardware/devicetree/bindings-mailbox/mailbox.md>))
  Cells must match 'mbox-cells' (See Controller docs above)

Optional properties

- mbox-names		: Name given to channels seen in the 'mboxes' property.

## Example:

```dts
stub_clock: stub_clock@e896b500 {
	compatible = "hisilicon,hi3660-stub-clk";
	reg = <0x0 0xe896b500 0x0 0x0100>;
	#clock-cells = <1>;
	mboxes = <&mailbox 13 3 0>;
};
```

---

# Hisilicon Hi6220 Mailbox Driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/mailbox_

> Device-tree binding reference for Hisilicon Hi6220 Mailbox Driver.

Hisilicon Hi6220 mailbox supports up to 32 channels. Each channel
is unidirectional with a maximum message size of 8 words. I/O is
performed using register access (there is no DMA) and the cell
raises an interrupt when messages are received.

## Mailbox Device Node:

## Required properties:

- compatible:		Shall be "hisilicon,hi6220-mbox"
- reg:			Contains the mailbox register address range (base
  address and length); the first item is for IPC
  registers, the second item is shared buffer for
  slots.
- #mbox-cells:		Common mailbox binding property to identify the number
  of cells required for the mailbox specifier. Must be 3.
  &lt;&amp;phandle slot\_id dst\_irq ack\_irq&gt;
  phandle: Label name of mailbox controller
  slot\_id: Slot id used either for TX or RX
  dst\_irq: IRQ identifier index number which used by MCU
  ack\_irq: IRQ identifier index number with generating a
  TX/RX interrupt to application processor,
  mailbox driver uses it to acknowledge interrupt
- interrupts:		Contains the interrupt information for the mailbox
  device. The format is dependent on which interrupt
  controller the SoCs use.

## Optional Properties:

- hi6220,mbox-tx-noirq: Property of MCU firmware's feature, so mailbox driver
  use this flag to ask MCU to enable "automatic idle
  flag" mode or IRQ generated mode to acknowledge a TX
  completion.

## Example:

```dts
	mailbox: mailbox@f7510000 {
		compatible = "hisilicon,hi6220-mbox";
		reg = <0x0 0xf7510000 0x0 0x1000>, /* IPC_S */
		      <0x0 0x06dff800 0x0 0x0800>; /* Mailbox */
		interrupt-parent = <&gic>;
		interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
		#mbox-cells = <3>;
	};
```

## Mailbox client

## Required properties:

- compatible:		Many (See the client docs).
- mboxes:		Standard property to specify a Mailbox (See [./mailbox.txt](</kernel/hardware/devicetree/bindings-mailbox/mailbox.md>))
  Cells must match 'mbox-cells' (See Mailbox Device Node above).

## Optional Properties:

- mbox-names:		Name given to channels seen in the 'mboxes' property.

## Example:

```dts
	stub_clock: stub_clock {
		compatible = "hisilicon,hi6220-stub-clk";
		hisilicon,hi6220-clk-sram = <&sram>;
		#clock-cells = <1>;
		mbox-names = "mbox-tx", "mbox-rx";
		mboxes = <&mailbox 1 0 11>, <&mailbox 0 1 10>;
	};
```

---

# Generic Mailbox Controller and client driver bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/mailbox_

> Device-tree binding reference for Generic Mailbox Controller and client driver bindings.

Generic binding to provide a way for Mailbox controller drivers to
assign appropriate mailbox channel to client drivers.

- Mailbox Controller

## Required property:

- #mbox-cells: Must be at least 1. Number of cells in a mailbox
  specifier.

## Example:

```dts
	mailbox: mailbox {
		...
		#mbox-cells = <1>;
	};
```

- Mailbox Client

## Required property:

- mboxes: List of phandle and mailbox channel specifiers.

## Optional property:

- mbox-names: List of identifier strings for each mailbox channel.
- shmem : List of phandle pointing to the shared memory(SHM) area between the
  users of these mailboxes for IPC, one for each mailbox. This shared
  memory can be part of any memory reserved for the purpose of this
  communication between the mailbox client and the remote.

## Example:

```dts
	pwr_cntrl: power {
		...
		mbox-names = "pwr-ctrl", "rpc";
		mboxes = <&mailbox 0 &mailbox 1>;
	};
```

## Example with shared memory(shmem):

```dts
	sram: sram@50000000 {
		compatible = "mmio-sram";
		reg = <0x50000000 0x10000>;

		#address-cells = <1>;
		#size-cells = <1>;
		ranges = <0 0x50000000 0x10000>;

		cl_shmem: shmem@0 {
			compatible = "client-shmem";
			reg = <0x0 0x200>;
		};
	};
```

```dts
	client@2e000000 {
		...
		mboxes = <&mailbox 0>;
		shmem = <&cl_shmem>;
		..
	};
```

---

# Texas Instruments' Message Manager Driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/mailbox_

> Device-tree binding reference for Texas Instruments' Message Manager Driver.

The Texas Instruments' Message Manager is a mailbox controller that has
configurable queues selectable at SoC(System on Chip) integration. The Message
manager is broken up into queues in different address regions that are called
"proxies" - each instance is unidirectional and is instantiated at SoC
integration level to indicate receive or transmit path.

## Message Manager Device Node:

## Required properties:

- compatible:		Shall be: "ti,k2g-message-manager"
- reg-names 		queue\_proxy\_region - Map the queue proxy region.
  queue\_state\_debug\_region - Map the queue state debug
  region.
- reg:			Contains the register map per reg-names.
- #mbox-cells		Shall be 2. Contains the queue ID and proxy ID in that
  order referring to the transfer path.
- interrupt-names:	Contains interrupt names matching the rx transfer path
  for a given SoC. Receive interrupts shall be of the
  format: "rx\_&lt;QID&gt;".
  For ti,k2g-message-manager, this shall contain:
  "rx\_005", "rx\_057"
- interrupts:		Contains the interrupt information corresponding to
  interrupt-names property.

## Example(K2G):

```dts
	msgmgr: msgmgr@2a00000 {
		compatible = "ti,k2g-message-manager";
		#mbox-cells = <2>;
		reg-names = "queue_proxy_region", "queue_state_debug_region";
		reg = <0x02a00000 0x400000>, <0x028c3400 0x400>;
		interrupt-names = "rx_005", "rx_057";
		interrupts = <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>;
	};
```

```dts
	pmmc: pmmc {
		[...]
		mbox-names = "rx", "tx";
		# RX queue ID is 5, proxy ID is 2
		# TX queue ID is 0, proxy ID is 0
		mboxes= <&msgmgr 5 2>,
			<&msgmgr 0 0>;
		[...]
	};
```

---

# Atmel Image Sensor Interface (ISI)

_Peios Kernel / Hardware and drivers / Device tree / bindings/media_

> Device-tree binding reference for Atmel Image Sensor Interface (ISI).

## Required properties for ISI:

- compatible: must be "atmel,at91sam9g45-isi" or "microchip,sam9x60-isi".
- reg: physical base address and length of the registers set for the device.
- interrupts: should contain IRQ line for the ISI.
- clocks: list of clock specifiers, corresponding to entries in the clock-names
  property; please refer to clock-bindings.txt.
- clock-names: required elements: "isi\_clk".
- pinctrl-names, pinctrl-0: please refer to pinctrl-bindings.txt.

ISI supports a single port node with parallel bus. It shall contain one
'port' child node with child 'endpoint' node. Please refer to the bindings
defined in [Documentation/devicetree/bindings/media/video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>).

## Endpoint node properties

- bus-width: &lt;8&gt; or &lt;10&gt; (mandatory)
- hsync-active (default: active high)
- vsync-active (default: active high)
- pclk-sample (default: sample on falling edge)
- remote-endpoint: A phandle to the bus receiver's endpoint node (mandatory).

## Example:

```dts
isi: isi@f0034000 {
	compatible = "atmel,at91sam9g45-isi";
	reg = <0xf0034000 0x4000>;
	interrupts = <37 IRQ_TYPE_LEVEL_HIGH 5>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_isi_data_0_7>;
	clocks = <&isi_clk>;
	clock-names = "isi_clk";
	port {
		isi_0: endpoint {
			remote-endpoint = <&ov2640_0>;
			bus-width = <8>;
			vsync-active = <1>;
			hsync-active = <1>;
		};
	};
};
```

```dts
i2c1: i2c@f0018000 {
	ov2640: camera@30 {
		compatible = "ovti,ov2640";
		reg = <0x30>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_pck0_as_isi_mck &pinctrl_sensor_power &pinctrl_sensor_reset>;
		resetb-gpios = <&pioE 11 GPIO_ACTIVE_LOW>;
		pwdn-gpios = <&pioE 13 GPIO_ACTIVE_HIGH>;
		clocks = <&pck0>;
		clock-names = "xvclk";
		assigned-clocks = <&pck0>;
		assigned-clock-rates = <25000000>;

		port {
			ov2640_0: endpoint {
				remote-endpoint = <&isi_0>;
				bus-width = <8>;
			};
		};
	};
};
```

---

# Cadence MIPI-CSI2 TX controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/media_

> Device-tree binding reference for Cadence MIPI-CSI2 TX controller.

The Cadence MIPI-CSI2 TX controller is a CSI-2 bridge supporting up to
4 CSI lanes in output, and up to 4 different pixel streams in input.

## Required properties:

```text
  - compatible: must be set to "cdns,csi2tx" or "cdns,csi2tx-1.3"
    for version 1.3 of the controller, "cdns,csi2tx-2.1" for v2.1
  - reg: base address and size of the memory mapped region
  - clocks: phandles to the clocks driving the controller
  - clock-names: must contain:
    * esc_clk: escape mode clock
    * p_clk: register bank clock
    * pixel_if[0-3]_clk: pixel stream output clock, one for each stream
                         implemented in hardware, between 0 and 3
```

Optional properties

- phys: phandle to the D-PHY. If it is set, phy-names need to be set
- phy-names: must contain "dphy"

## Required subnodes:

- ports: A ports node with one port child node per device input and output
  port, in accordance with the video interface bindings defined in
  [Documentation/devicetree/bindings/media/video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>). The
  port nodes are numbered as follows.

## Port Description

```text
           0    CSI-2 output
           1    Stream 0 input
           2    Stream 1 input
           3    Stream 2 input
           4    Stream 3 input
```

```text
           The stream input port nodes are optional if they are not
           connected to anything at the hardware level or implemented
           in the design. Since there is only one endpoint per port,
           the endpoints are not numbered.
```

## Example:

```dts
csi2tx: csi-bridge@0d0e1000 {
	compatible = "cdns,csi2tx";
	reg = <0x0d0e1000 0x1000>;
	clocks = <&byteclock>, <&byteclock>,
		 <&coreclock>, <&coreclock>,
		 <&coreclock>, <&coreclock>;
	clock-names = "p_clk", "esc_clk",
		      "pixel_if0_clk", "pixel_if1_clk",
		      "pixel_if2_clk", "pixel_if3_clk";

	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port@0 {
			reg = <0>;

			csi2tx_out: endpoint {
				remote-endpoint = <&remote_in>;
				clock-lanes = <0>;
				data-lanes = <1 2>;
			};
		};

		port@1 {
			reg = <1>;

			csi2tx_in_stream0: endpoint {
				remote-endpoint = <&stream0_out>;
			};
		};

		port@2 {
			reg = <2>;

			csi2tx_in_stream1: endpoint {
				remote-endpoint = <&stream1_out>;
			};
		};

		port@3 {
			reg = <3>;

			csi2tx_in_stream2: endpoint {
				remote-endpoint = <&stream2_out>;
			};
		};

		port@4 {
			reg = <4>;

			csi2tx_in_stream3: endpoint {
				remote-endpoint = <&stream3_out>;
			};
		};
	};
};
```

---

# Device-Tree bindings for hix5hd2 ir IP

_Peios Kernel / Hardware and drivers / Device tree / bindings/media_

> Device-tree binding reference for Device-Tree bindings for hix5hd2 ir IP.

## Required properties:

```text
	- compatible: Should contain "hisilicon,hix5hd2-ir", or:
		- "hisilicon,hi3796cv300-ir" for Hi3796CV300 IR device.
	- reg: Base physical address of the controller and length of memory
	  mapped region.
	- interrupts: interrupt-specifier for the sole interrupt generated by
	  the device. The interrupt specifier format depends on the interrupt
	  controller parent.
	- clocks: clock phandle and specifier pair.
```

## Optional properties:

- linux,rc-map-name: see [rc.txt](</kernel/hardware/devicetree/bindings-media/rc.md>) file in the same directory.
- hisilicon,power-syscon: DEPRECATED. Don't use this in new dts files.
  Provide correct clocks instead.

## Example node:

```dts
	ir: ir@f8001000 {
		compatible = "hisilicon,hix5hd2-ir";
		reg = <0xf8001000 0x1000>;
		interrupts = <0 47 4>;
		clocks = <&clock HIX5HD2_IR_CLOCK>;
		linux,rc-map-name = "rc-tivo";
	};
```

---

# ImgTec Infrared (IR) decoder version 1

_Peios Kernel / Hardware and drivers / Device tree / bindings/media_

> Device-tree binding reference for ImgTec Infrared (IR) decoder version 1.

This binding is for Imagination Technologies' Infrared decoder block,
specifically major revision 1.

## Required properties:

- compatible:		Should be "img,ir-rev1"
- reg:			Physical base address of the controller and length of
  memory mapped region.
- interrupts:		The interrupt specifier to the cpu.

## Optional properties:

- clocks:		List of clock specifiers as described in standard
  clock bindings.
  Up to 3 clocks may be specified in the following order:
  1st:	Core clock (defaults to 32.768KHz if omitted).
  2nd:	System side (fast) clock.
  3rd:	Power modulation clock.
- clock-names:		List of clock names corresponding to the clocks
  specified in the clocks property.
  Accepted clock names are:
  "core":	Core clock.
  "sys":	System clock.
  "mod":	Power modulation clock.

## Example:

```dts
	ir@2006200 {
		compatible = "img,ir-rev1";
		reg = <0x02006200 0x100>;
		interrupts = <29 4>;
		clocks = <&clk_32khz>;
		clock-names =  "core";
	};
```

---

# Marvell PXA camera host interface

_Peios Kernel / Hardware and drivers / Device tree / bindings/media_

> Device-tree binding reference for Marvell PXA camera host interface.

## Required properties:

- compatible: Should be "marvell,pxa270-qci"
- reg: register base and size
- interrupts: the interrupt number
- any required generic properties defined in [video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>)

## Optional properties:

- clocks: input clock (see clock-bindings.txt)
- clock-output-names: should contain the name of the clock driving the
  sensor master clock MCLK
- clock-frequency: host interface is driving MCLK, and MCLK rate is this rate

## Example:

```dts
	pxa_camera: pxa_camera@50000000 {
		compatible = "marvell,pxa270-qci";
		reg = <0x50000000 0x1000>;
		interrupts = <33>;

		clocks = <&pxa2xx_clks 24>;
		clock-names = "ciclk";
		clock-frequency = <50000000>;
		clock-output-names = "qci_mclk";


		port {
			#address-cells = <1>;
			#size-cells = <0>;

			/* Parallel bus endpoint */
			qci: endpoint@0 {
				reg = <0>;		/* Local endpoint # */
				remote-endpoint = <&mt9m111_1>;
				bus-width = <8>;	/* Used data lines */
				hsync-active = <0>;	/* Active low */
				vsync-active = <0>;	/* Active low */
				pclk-sample = <1>;	/* Rising */
			};
		};
	};
```

---

# Rc bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/media_

> Device-tree binding reference for Rc bindings.

This file has been moved to [rc.yaml](</kernel/hardware/devicetree-bindings/dt-media/rc.md>).

---

# Silicon Labs FM Radio transmitter

_Peios Kernel / Hardware and drivers / Device tree / bindings/media_

> Device-tree binding reference for Silicon Labs FM Radio transmitter.

The Silicon Labs Si4713 is an FM radio transmitter with receive power scan
supporting 76-108 MHz. It includes an RDS encoder and has both, a stereo-analog
and a digital interface, which supports I2S, left-justified and a custom
DSP-mode format. It is programmable through an I2C interface.

## Required Properties:

- compatible: Should contain "silabs,si4713"
- reg: the I2C address of the device

## Optional Properties:

- interrupts-extended: Interrupt specifier for the chips interrupt
- reset-gpios: GPIO specifier for the chips reset line
- vdd-supply: phandle for Vdd regulator
- vio-supply: phandle for Vio regulator

## Example:

```dts
&i2c2 {
        fmtx: si4713@63 {
                compatible = "silabs,si4713";
                reg = <0x63>;

                interrupts-extended = <&gpio2 21 IRQ_TYPE_EDGE_FALLING>; /* 53 */
                reset-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>; /* 163 */
                vio-supply = <&vio>;
                vdd-supply = <&vaux1>;
        };
};
```

---

# STMicroelectronics DELTA multi-format video decoder

_Peios Kernel / Hardware and drivers / Device tree / bindings/media_

> Device-tree binding reference for STMicroelectronics DELTA multi-format video decoder.

## Required properties:

- compatible: should be "st,st-delta".
- clocks: from common clock binding: handle hardware IP needed clocks, the
  number of clocks may depend on the SoC type.
  See [../clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>) for details.
- clock-names: names of the clocks listed in clocks property in the same order.

## Example:

```dts
	delta0 {
		compatible = "st,st-delta";
		clock-names = "delta", "delta-st231", "delta-flash-promip";
		clocks = <&clk_s_c0_flexgen CLK_VID_DMU>,
			 <&clk_s_c0_flexgen CLK_ST231_DMU>,
			 <&clk_s_c0_flexgen CLK_FLASH_PROMIP>;
	};
```

---

# st-hva: multi-format video encoder for STMicroelectronics SoC.

_Peios Kernel / Hardware and drivers / Device tree / bindings/media_

> Device-tree binding reference for st-hva: multi-format video encoder for STMicroelectronics SoC..

## Required properties:

- compatible: should be "st,st-hva".
- reg: HVA physical address location and length, esram address location and
  length.
- reg-names: names of the registers listed in registers property in the same
  order.
- interrupts: HVA interrupt number.
- clocks: from common clock binding: handle hardware IP needed clocks, the
  number of clocks may depend on the SoC type.
  See [../clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>) for details.
- clock-names: names of the clocks listed in clocks property in the same order.

## Example:

```dts
	hva@8c85000{
		compatible = "st,st-hva";
		reg = <0x8c85000 0x400>, <0x6000000 0x40000>;
		reg-names = "hva_registers", "hva_esram";
		interrupts = <GIC_SPI 58 IRQ_TYPE_NONE>,
			     <GIC_SPI 59 IRQ_TYPE_NONE>;
		clock-names = "clk_hva";
		clocks = <&clk_s_c0_flexgen CLK_HVA>;
	};
```

---

# STMicroelectronics stih4xx platforms

_Peios Kernel / Hardware and drivers / Device tree / bindings/media_

> Device-tree binding reference for STMicroelectronics stih4xx platforms.

bdisp: 2D blitter for STMicroelectronics SoC.

## Required properties:

- compatible: should be "st,stih407-bdisp".
- reg: BDISP physical address location and length.
- interrupts: BDISP interrupt number.
- clocks: from common clock binding: handle hardware IP needed clocks, the
  number of clocks may depend on the SoC type.
  See ../clocks/clock-bindings.txt for details.
- clock-names: names of the clocks listed in clocks property in the same order.

## Example:

```dts
	bdisp0:bdisp@9f10000 {
		compatible = "st,stih407-bdisp";
		reg = <0x9f10000 0x1000>;
		interrupts = <GIC_SPI 38 IRQ_TYPE_NONE>;
		clock-names = "bdisp";
		clocks = <&clk_s_c0_flexgen CLK_IC_BDISP_0>;
	};
```

## Aliases:

Each BDISP should have a numbered alias in the aliases node, in the form of
bdispN, N = 0 or 1.

## Example:

```dts
	aliases {
		bdisp0 = &bdisp0;
	};
```

---

# Device-Tree bindings for ST IRB IP

_Peios Kernel / Hardware and drivers / Device tree / bindings/media_

> Device-tree binding reference for Device-Tree bindings for ST IRB IP.

## Required properties:

- compatible: Should contain "st,comms-irb".
- reg: Base physical address of the controller and length of memory
  mapped region.
- interrupts: interrupt-specifier for the sole interrupt generated by
  the device. The interrupt specifier format depends on the interrupt
  controller parent.
- rx-mode: can be "infrared" or "uhf". This property specifies the L1
  protocol used for receiving remote control signals. rx-mode should
  be present iff the rx pins are wired up.
- tx-mode: should be "infrared". This property specifies the L1
  protocol used for transmitting remote control signals. tx-mode should
  be present iff the tx pins are wired up.

## Optional properties:

- pinctrl-names, pinctrl-0: the pincontrol settings to configure muxing
  properly for IRB pins.
- clocks : phandle with clock-specifier pair for IRB.

## Example node:

```dts
	rc: rc@fe518000 {
		compatible	= "st,comms-irb";
		reg		= <0xfe518000 0x234>;
		interrupts	= <0 203 0>;
		rx-mode		= "infrared";
	};
```

---

# Texas Instruments VPIF

_Peios Kernel / Hardware and drivers / Device tree / bindings/media_

> Device-tree binding reference for Texas Instruments VPIF.

The TI Video Port InterFace (VPIF) is the primary component for video
capture and display on the DA850/AM18x family of TI DaVinci/Sitara
SoCs.

TI Document reference: SPRUH82C, Chapter 35
http://www.ti.com/lit/pdf/spruh82

## Required properties:

- compatible: must be "ti,da850-vpif"
- reg: physical base address and length of the registers set for the device;
- interrupts: should contain IRQ line for the VPIF

## Video Capture:

VPIF has a 16-bit parallel bus input, supporting 2 8-bit channels or a
single 16-bit channel. It should contain one or two port child nodes
with child 'endpoint' node. If there are two ports then port@0 must
describe the input and port@1 output channels. Please refer to the
bindings defined in
[Documentation/devicetree/bindings/media/video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>).

Example using 2 8-bit input channels, one of which is connected to an
I2C-connected TVP5147 decoder:

```dts
	vpif: vpif@217000 {
		compatible = "ti,da850-vpif";
		reg = <0x217000 0x1000>;
		interrupts = <92>;

		port@0 {
			vpif_input_ch0: endpoint@0 {
				reg = <0>;
				bus-width = <8>;
				remote-endpoint = <&composite_in>;
			};

			vpif_input_ch1: endpoint@1 {
				reg = <1>;
				bus-width = <8>;
				data-shift = <8>;
			};
		};

		port@1 {
			vpif_output_ch0: endpoint {
				bus-width = <8>;
				remote-endpoint = <&composite_out>;
			};
		};
	};
```

\[ ... \]

```dts
&i2c0 {

	tvp5147@5d {
		compatible = "ti,tvp5147";
		reg = <0x5d>;

		port {
			composite_in: endpoint {
				hsync-active = <1>;
				vsync-active = <1>;
				pclk-sample = <0>;

				/* VPIF channel 0 (lower 8-bits) */
				remote-endpoint = <&vpif_input_ch0>;
				bus-width = <8>;
			};
		};
	};

	adv7343@2a {
		compatible = "adi,adv7343";
		reg = <0x2a>;

		port {
			composite_out: endpoint {
				adi,dac-enable = <1 1 1>;
				adi,sd-dac-enable = <1>;

				remote-endpoint = <&vpif_output_ch0>;
				bus-width = <8>;
			};
		};
	};
};
```

Alternatively, an example when the bus is configured as a single
16-bit input (e.g. for raw-capture mode):

```dts
	vpif: vpif@217000 {
		compatible = "ti,da850-vpif";
		reg = <0x217000 0x1000>;
		interrupts = <92>;

		port {
			vpif_ch0: endpoint {
				  bus-width = <16>;
			};
		};
	};
```

---

# Texas Instruments AM437x CAMERA (VPFE)

_Peios Kernel / Hardware and drivers / Device tree / bindings/media_

> Device-tree binding reference for Texas Instruments AM437x CAMERA (VPFE).

The Video Processing Front End (VPFE) is a key component for image capture
applications. The capture module provides the system interface and the
processing capability to connect RAW image-sensor modules and video decoders
to the AM437x device.

## Required properties:

- compatible: must be "ti,am437x-vpfe"
- reg: physical base address and length of the registers set for the device;
- interrupts: should contain IRQ line for the VPFE;
- ti,am437x-vpfe-interface: can be one of the following,
  0 - Raw Bayer Interface.
  1 - 8 Bit BT656 Interface.
  2 - 10 Bit BT656 Interface.
  3 - YCbCr 8 Bit Interface.
  4 - YCbCr 16 Bit Interface.

VPFE supports a single port node with parallel bus. It should contain one
'port' child node with child 'endpoint' node. Please refer to the bindings
defined in [Documentation/devicetree/bindings/media/video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>).

## Example:

```dts
	vpfe: vpfe@f0034000 {
		compatible = "ti,am437x-vpfe";
		reg = <0x48328000 0x2000>;
		interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;

		pinctrl-names = "default", "sleep";
		pinctrl-0 = <&vpfe_pins_default>;
		pinctrl-1 = <&vpfe_pins_sleep>;

		port {
			#address-cells = <1>;
			#size-cells = <0>;

			vpfe0_ep: endpoint {
				remote-endpoint = <&ov2659_1>;
				ti,am437x-vpfe-interface = <0>;
				bus-width = <8>;
				hsync-active = <0>;
				vsync-active = <0>;
			};
		};
	};
```

```dts
	i2c1: i2c@4802a000 {

		ov2659@30 {
			compatible = "ti,ov2659";
			reg = <0x30>;

			port {
				ov2659_1: endpoint {
					remote-endpoint = <&vpfe0_ep>;
					bus-width = <8>;
					mclk-frequency = <12000000>;
				};
			};
	};
```

---

# Video interfaces bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/media_

> Device-tree binding reference for Video interfaces bindings.

This file has moved to [video-interfaces.yaml](</kernel/hardware/devicetree-bindings/dt-media/video-interfaces.md>) and [video-interface-devices.yaml](</kernel/hardware/devicetree-bindings/dt-media/video-interface-devices.md>).

---

# Analog Devices ADP1653 flash LED driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for Analog Devices ADP1653 flash LED driver.

## Required Properties:

- compatible: Must contain "adi,adp1653"

- reg: I2C slave address

- enable-gpios: Specifier of the GPIO connected to EN pin

There are two LED outputs available - flash and indicator. One LED is
represented by one child node, nodes need to be named "flash" and "indicator".

## Required properties of the LED child node:

- led-max-microamp : see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)

## Required properties of the flash LED child node:

- flash-max-microamp : see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- flash-timeout-us : see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)
- led-max-microamp : see [Documentation/devicetree/bindings/leds/common.txt](</kernel/hardware/devicetree/bindings-leds/common.md>)

## Example:

```dts
	adp1653: led-controller@30 {
		compatible = "adi,adp1653";
		reg = <0x30>;
		enable-gpios = <&gpio3 24 GPIO_ACTIVE_HIGH>; /* 88 */

		flash {
			flash-timeout-us = <500000>;
			flash-max-microamp = <320000>;
			led-max-microamp = <50000>;
		};
		indicator {
			led-max-microamp = <17500>;
		};
	};
```

---

# Analog Devices adv7343 video encoder

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for Analog Devices adv7343 video encoder.

The ADV7343 are high speed, digital-to-analog video encoders in a 64-lead LQFP
package. Six high speed, 3.3 V, 11-bit video DACs provide support for composite
(CVBS), S-Video (Y-C), and component (YPrPb/RGB) analog outputs in standard
definition (SD), enhanced definition (ED), or high definition (HD) video
formats.

## Required Properties :

- compatible: Must be "adi,adv7343"

## Optional Properties :

```text
- adi,power-mode-sleep-mode: on enable the current consumption is reduced to
			      micro ampere level. All DACs and the internal PLL
			      circuit are disabled.
- adi,power-mode-pll-ctrl: PLL and oversampling control. This control allows
			   internal PLL 1 circuit to be powered down and the
			   oversampling to be switched off.
- ad,adv7343-power-mode-dac: array configuring the power on/off DAC's 1..6,
			      0 = OFF and 1 = ON, Default value when this
			      property is not specified is <0 0 0 0 0 0>.
- ad,adv7343-sd-config-dac-out: array configure SD DAC Output's 1 and 2, 0 = OFF
				 and 1 = ON, Default value when this property is
				 not specified is <0 0>.
```

## Example:

```dts
i2c0@1c22000 {
	...
	...

	adv7343@2a {
		compatible = "adi,adv7343";
		reg = <0x2a>;

		port {
			adv7343_1: endpoint {
					adi,power-mode-sleep-mode;
					adi,power-mode-pll-ctrl;
					/* Use DAC1..3, DAC6 */
					adi,dac-enable = <1 1 1 0 0 1>;
					/* Use SD DAC output 1 */
					adi,sd-dac-enable = <1 0>;
			};
		};
	};
	...
};
```

---

# Aptina 1/3-Inch WVGA CMOS Digital Image Sensor

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for Aptina 1/3-Inch WVGA CMOS Digital Image Sensor.

The Aptina MT9V032 is a 1/3-inch CMOS active pixel digital image sensor with
an active array size of 752H x 480V. It is programmable through a simple
two-wire serial interface.

## Required Properties:

- compatible: value should be either one among the following
  (a) "aptina,mt9v022" for MT9V022 color sensor
  (b) "aptina,mt9v022m" for MT9V022 monochrome sensor
  (c) "aptina,mt9v024" for MT9V024 color sensor
  (d) "aptina,mt9v024m" for MT9V024 monochrome sensor
  (e) "aptina,mt9v032" for MT9V032 color sensor
  (f) "aptina,mt9v032m" for MT9V032 monochrome sensor
  (g) "aptina,mt9v034" for MT9V034 color sensor
  (h) "aptina,mt9v034m" for MT9V034 monochrome sensor

## Optional Properties:

- link-frequencies: List of allowed link frequencies in Hz. Each frequency is
  expressed as a 64-bit big-endian integer.
- reset-gpios: GPIO handle which is connected to the reset pin of the chip.
- standby-gpios: GPIO handle which is connected to the standby pin of the chip.

For further reading on port node refer to
[Documentation/devicetree/bindings/media/video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>).

## Example:

```dts
	mt9v032@5c {
		compatible = "aptina,mt9v032";
		reg = <0x5c>;

		port {
			mt9v032_out: endpoint {
				link-frequencies = /bits/ 64
					<13000000 26600000 27000000>;
			};
		};
	};
```

---

# Maxim Integrated MAX2175 RF to Bits tuner

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for Maxim Integrated MAX2175 RF to Bits tuner.

The MAX2175 IC is an advanced analog/digital hybrid-radio receiver with
RF to Bits® front-end designed for software-defined radio solutions.

## Required properties:

- compatible: "maxim,max2175" for MAX2175 RF-to-bits tuner.
- clocks: clock specifier.
- port: child port node corresponding to the I2S output, in accordance with
  the video interface bindings defined in
  [Documentation/devicetree/bindings/media/video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>). The port
  node must contain at least one endpoint.

## Optional properties:

- maxim,master	      : phandle to the master tuner if it is a slave. This
  is used to define two tuners in diversity mode
  (1 master, 1 slave). By default each tuner is an
  individual master.
- maxim,refout-load   : load capacitance value (in picofarads) on reference
  output drive level. The possible load values are:
  0 (default - refout disabled)
  10
  20
  30
  40
  60
  70
- maxim,am-hiz-filter : empty property indicates the AM Hi-Z filter is used
  in this hardware for AM antenna input.

## Example:

Board specific DTS file

/\* Fixed XTAL clock node \*/

```dts
maxim_xtal: clock {
	compatible = "fixed-clock";
	#clock-cells = <0>;
	clock-frequency = <36864000>;
};
```

/\* A tuner device instance under i2c bus \*/

```dts
max2175_0: tuner@60 {
	compatible = "maxim,max2175";
	reg = <0x60>;
	clocks = <&maxim_xtal>;
	maxim,refout-load = <10>;

	port {
		max2175_0_ep: endpoint {
			remote-endpoint = <&slave_rx_device>;
		};
	};

};
```

---

# Melexis MLX90640 FIR Sensor

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for Melexis MLX90640 FIR Sensor.

Melexis MLX90640 FIR sensor support which allows recording of thermal data
with 32x24 resolution excluding 2 lines of coefficient data that is used by
userspace to render processed frames.

## Required Properties:

- compatible : Must be "melexis,mlx90640"
- reg : i2c address of the device

## Example:

```dts
	i2c0@1c22000 {
		...
		mlx90640@33 {
			compatible = "melexis,mlx90640";
			reg = <0x33>;
		};
		...
	};
```

---

# Micron 1.3Mp CMOS Digital Image Sensor

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for Micron 1.3Mp CMOS Digital Image Sensor.

The Micron MT9M111 is a CMOS active pixel digital image sensor with an active
array size of 1280H x 1024V. It is programmable through a simple two-wire serial
interface.

## Required Properties:

- compatible: value should be "micron,mt9m111"
- clocks: reference to the master clock.
- clock-names: shall be "mclk".

The device node must contain one 'port' child node with one 'endpoint' child
sub-node for its digital output video port, in accordance with the video
interface bindings defined in:
[Documentation/devicetree/bindings/media/video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>)

## Optional endpoint properties:

- pclk-sample: For information see [../video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>). The value is set to
  0 if it isn't specified.

## Example:

```dts
	i2c_master {
		mt9m111@5d {
			compatible = "micron,mt9m111";
			reg = <0x5d>;
			clocks = <&mclk>;
			clock-names = "mclk";

			port {
				mt9m111_1: endpoint {
					remote-endpoint = <&pxa_camera>;
					pclk-sample = <1>;
				};
			};
		};
	};
```

---

# MT9M001: 1/2-Inch Megapixel Digital Image Sensor

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for MT9M001: 1/2-Inch Megapixel Digital Image Sensor.

The MT9M001 is an SXGA-format with a 1/2-inch CMOS active-pixel digital
image sensor. It is programmable through I2C interface.

## Required Properties:

- compatible: shall be "onnn,mt9m001".
- clocks: reference to the master clock into sensor

## Optional Properties:

- reset-gpios: GPIO handle which is connected to the reset pin of the chip.
  Active low.
- standby-gpios: GPIO handle which is connected to the standby pin of the chip.
  Active high.

The device node must contain one 'port' child node with one 'endpoint' child
sub-node for its digital output video port, in accordance with the video
interface bindings defined in:
[Documentation/devicetree/bindings/media/video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>)

## Example:

```dts
	&i2c1 {
		camera-sensor@5d {
			compatible = "onnn,mt9m001";
			reg = <0x5d>;
			reset-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
			standby-gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
			clocks = <&camera_clk>;
			port {
				mt9m001_out: endpoint {
					remote-endpoint = <&vcap_in>;
				};
			};
		};
	};
```

---

# Omnivision OV2640 CMOS sensor

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for Omnivision OV2640 CMOS sensor.

The Omnivision OV2640 sensor supports multiple resolutions output, such as
CIF, SVGA, UXGA. It also can support the YUV422/420, RGB565/555 or raw RGB
output formats.

## Required Properties:

- compatible: should be "ovti,ov2640"
- clocks: reference to the xvclk input clock.
- clock-names: should be "xvclk".

## Optional Properties:

- resetb-gpios: reference to the GPIO connected to the resetb pin, if any.
- pwdn-gpios: reference to the GPIO connected to the pwdn pin, if any.

The device node must contain one 'port' child node for its digital output
video port, in accordance with the video interface bindings defined in
[Documentation/devicetree/bindings/media/video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>).

## Example:

```dts
	i2c1: i2c@f0018000 {
		ov2640: camera@30 {
			compatible = "ovti,ov2640";
			reg = <0x30>;
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_pck0_as_isi_mck &pinctrl_sensor_power &pinctrl_sensor_reset>;
			resetb-gpios = <&pioE 11 GPIO_ACTIVE_LOW>;
			pwdn-gpios = <&pioE 13 GPIO_ACTIVE_HIGH>;
			clocks = <&pck0>;
			clock-names = "xvclk";
			assigned-clocks = <&pck0>;
			assigned-clock-rates = <25000000>;

			port {
				ov2640_0: endpoint {
					remote-endpoint = <&isi_0>;
				};
			};
		};
	};
```

---

# OV2659 1/5-Inch 2Mp SOC Camera

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for OV2659 1/5-Inch 2Mp SOC Camera.

The Omnivision OV2659 is a 1/5-inch SOC camera, with an active array size of
1632H x 1212V. It is programmable through a SCCB. The OV2659 sensor supports
multiple resolutions output, such as UXGA, SVGA, 720p. It also can support
YUV422, RGB565/555 or raw RGB output formats.

## Required Properties:

- compatible: Must be "ovti,ov2659"
- reg: I2C slave address
- clocks: reference to the xvclk input clock.
- clock-names: should be "xvclk".
- link-frequencies: target pixel clock frequency.

## Optional Properties:

- powerdown-gpios: reference to the GPIO connected to the pwdn pin, if any.
  Active high with internal pull down resistor.
- reset-gpios: reference to the GPIO connected to the resetb pin, if any.
  Active low with internal pull up resistor.

For further reading on port node refer to
[Documentation/devicetree/bindings/media/video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>).

## Example:

```dts
	i2c0@1c22000 {
		...
		...
		 ov2659@30 {
			compatible = "ovti,ov2659";
			reg = <0x30>;

			clocks = <&clk_ov2659 0>;
			clock-names = "xvclk";

			powerdown-gpios = <&gpio6 14 GPIO_ACTIVE_HIGH>;
			reset-gpios = <&gpio6 15 GPIO_ACTIVE_LOW>;

			port {
				ov2659_0: endpoint {
					remote-endpoint = <&vpfe_ep>;
					link-frequencies = /bits/ 64 <70000000>;
				};
			};
		};
		...
	};
```

---

# Omnivision OV7670 CMOS sensor

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for Omnivision OV7670 CMOS sensor.

The Omnivision OV7670 sensor supports multiple resolutions output, such as
CIF, SVGA, UXGA. It also can support the YUV422/420, RGB565/555 or raw RGB
output formats.

## Required Properties:

- compatible: should be "ovti,ov7670"
- clocks: reference to the xclk input clock.
- clock-names: should be "xclk".

## Required Endpoint Properties:

- hsync-active: active state of the HSYNC signal, 0/1 for LOW/HIGH respectively.
- vsync-active: active state of the VSYNC signal, 0/1 for LOW/HIGH respectively.

## Optional Properties:

- reset-gpios: reference to the GPIO connected to the resetb pin, if any.
  Active is low.
- powerdown-gpios: reference to the GPIO connected to the pwdn pin, if any.
  Active is high.
- ov7670,pclk-hb-disable: a boolean property to suppress pixel clock output
  signal during horizontal blankings.

The device node must contain one 'port' child node with one 'endpoint' child
sub-node for its digital output video port, in accordance with the video
interface bindings defined in:
[Documentation/devicetree/bindings/media/video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>).

## Example:

```dts
	i2c1: i2c@f0018000 {
		ov7670: camera@21 {
			compatible = "ovti,ov7670";
			reg = <0x21>;
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_pck0_as_isi_mck &pinctrl_sensor_power &pinctrl_sensor_reset>;
			reset-gpios = <&pioE 11 GPIO_ACTIVE_LOW>;
			powerdown-gpios = <&pioE 13 GPIO_ACTIVE_HIGH>;
			clocks = <&pck0>;
			clock-names = "xclk";
			assigned-clocks = <&pck0>;
			assigned-clock-rates = <25000000>;

			ov7670,pclk-hb-disable;

			port {
				ov7670_0: endpoint {
					hsync-active = <0>;
					vsync-active = <0>;

					remote-endpoint = <&isi_0>;
				};
			};
		};
	};
```

---

# Omnivision OV7740 CMOS image sensor

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for Omnivision OV7740 CMOS image sensor.

The Omnivision OV7740 image sensor supports multiple output image
size, such as VGA, and QVGA, CIF and any size smaller. It also
supports the RAW RGB and YUV output formats.

The common video interfaces bindings (see video-interfaces.txt) should
be used to specify link to the image data receiver. The OV7740 device
node should contain one 'port' child node with an 'endpoint' subnode.

## Required Properties:

- compatible:	"ovti,ov7740".
- reg:		I2C slave address of the sensor.
- clocks:	Reference to the xvclk input clock.
- clock-names:	"xvclk".

## Optional Properties:

- reset-gpios: Rreference to the GPIO connected to the reset\_b pin,
  if any. Active low with pull-ip resistor.
- powerdown-gpios: Reference to the GPIO connected to the pwdn pin,
  if any. Active high with pull-down resistor.

## Endpoint node mandatory properties:

- remote-endpoint: A phandle to the bus receiver's endpoint node.

## Example:

```dts
	i2c1: i2c@fc028000 {
		ov7740: camera@21 {
			compatible = "ovti,ov7740";
			reg = <0x21>;
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_sensor_power &pinctrl_sensor_reset>;
			clocks = <&isc>;
			clock-names = "xvclk";
			assigned-clocks = <&isc>;
			assigned-clock-rates = <24000000>;
			reset-gpios = <&pioA 43 GPIO_ACTIVE_LOW>;
			powerdown-gpios = <&pioA 44 GPIO_ACTIVE_HIGH>;

			port {
				ov7740_0: endpoint {
					remote-endpoint = <&isc_0>;
				};
			};
		};
	};
```

---

# Omnivision OV9650/OV9652 CMOS sensor

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for Omnivision OV9650/OV9652 CMOS sensor.

## Required Properties:

- compatible: shall be one of
  "ovti,ov9650"
  "ovti,ov9652"
- clocks: reference to the xvclk input clock.

## Optional Properties:

- reset-gpios: reference to the GPIO connected to the resetb pin, if any.
  Active is high.
- powerdown-gpios: reference to the GPIO connected to the pwdn pin, if any.
  Active is high.

The device node shall contain one 'port' child node with one child 'endpoint'
subnode for its digital output video port, in accordance with the video
interface bindings defined in Documentation/devicetree/bindings/media/
video-interfaces.txt.

## Example:

```dts
&i2c0 {
	ov9650: camera@30 {
		compatible = "ovti,ov9650";
		reg = <0x30>;
		reset-gpios = <&axi_gpio_0 0 GPIO_ACTIVE_HIGH>;
		powerdown-gpios = <&axi_gpio_0 1 GPIO_ACTIVE_HIGH>;
		clocks = <&xclk>;

		port {
			ov9650_0: endpoint {
				remote-endpoint = <&vcap1_in0>;
			};
		};
	};
};
```

---

# Panasonic AMG88xx

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for Panasonic AMG88xx.

The Panasonic family of AMG88xx Grid-Eye sensors allow recording
8x8 10Hz video which consists of thermal datapoints

## Required Properties:

- compatible : Must be "panasonic,amg88xx"
- reg : i2c address of the device

## Example:

```dts
	i2c0@1c22000 {
		...
		amg88xx@69 {
			compatible = "panasonic,amg88xx";
			reg = <0x69>;
		};
		...
	};
```

---

# Texas Instruments THS8200 video encoder

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for Texas Instruments THS8200 video encoder.

The ths8200 device is a digital to analog converter used in DVD players, video
recorders, set-top boxes.

## Required Properties :

- compatible : value must be "ti,ths8200"

## Example:

```dts
	i2c0@1c22000 {
		...
		...
		ths8200@5c {
			compatible = "ti,ths8200";
			reg = <0x5c>;
		};
		...
	};
```

---

# Texas Instruments TVP514x video decoder

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for Texas Instruments TVP514x video decoder.

The TVP5146/TVP5146m2/TVP5147/TVP5147m1 device is high quality, single-chip
digital video decoder that digitizes and decodes all popular baseband analog
video formats into digital video component. The tvp514x decoder supports analog-
to-digital (A/D) conversion of component RGB and YPbPr signals as well as A/D
conversion and decoding of NTSC, PAL and SECAM composite and S-video into
component YCbCr.

## Required Properties :

- compatible : value should be either one among the following
  (a) "ti,tvp5146" for tvp5146 decoder.
  (b) "ti,tvp5146m2" for tvp5146m2 decoder.
  (c) "ti,tvp5147" for tvp5147 decoder.
  (d) "ti,tvp5147m1" for tvp5147m1 decoder.

- hsync-active: HSYNC Polarity configuration for endpoint.

- vsync-active: VSYNC Polarity configuration for endpoint.

- pclk-sample: Clock polarity of the endpoint.

For further reading on port node refer to Documentation/devicetree/bindings/
media/video-interfaces.txt.

## Example:

```dts
	i2c0@1c22000 {
		...
		...
		tvp514x@5c {
			compatible = "ti,tvp5146";
			reg = <0x5c>;

			port {
				tvp514x_1: endpoint {
					hsync-active = <1>;
					vsync-active = <1>;
					pclk-sample = <0>;
				};
			};
		};
		...
	};
```

---

# Texas Instruments TV7002 video decoder

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for Texas Instruments TV7002 video decoder.

The TVP7002 device supports digitizing of video and graphics signal in RGB and
YPbPr color space.

## Required Properties :

- compatible : Must be "ti,tvp7002"

## Optional Properties:

- hsync-active: HSYNC Polarity configuration for the bus. Default value when
  this property is not specified is &lt;0&gt;.

- vsync-active: VSYNC Polarity configuration for the bus. Default value when
  this property is not specified is &lt;0&gt;.

- pclk-sample: Clock polarity of the bus. Default value when this property is
  not specified is &lt;0&gt;.

```text
- sync-on-green-active: Active state of Sync-on-green signal property of the
  endpoint.
  0 = Normal Operation (Active Low, Default)
  1 = Inverted operation
```

```text
- field-even-active: Active-high Field ID output polarity control of the bus.
  Under normal operation, the field ID output is set to logic 1 for an odd field
  (field 1) and set to logic 0 for an even field (field 0).
  0 = Normal Operation (Active Low, Default)
  1 = FID output polarity inverted
```

For further reading of port node refer Documentation/devicetree/bindings/media/
video-interfaces.txt.

## Example:

```dts
	i2c0@1c22000 {
		...
		...
		tvp7002@5c {
			compatible = "ti,tvp7002";
			reg = <0x5c>;

			port {
				tvp7002_1: endpoint {
					hsync-active = <1>;
					vsync-active = <1>;
					pclk-sample = <0>;
					sync-on-green-active = <1>;
					field-even-active = <0>;
				};
			};
		};
		...
	};
```

---

# Toshiba TC358743 HDMI-RX to MIPI CSI2-TX Bridge

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/i2c_

> Device-tree binding reference for Toshiba TC358743 HDMI-RX to MIPI CSI2-TX Bridge.

The Toshiba TC358743 HDMI-RX to MIPI CSI2-TX (H2C) is a bridge that converts
a HDMI stream to MIPI CSI-2 TX. It is programmable through I2C.

## Required Properties:

- compatible: value should be "toshiba,tc358743"
- clocks, clock-names: should contain a phandle link to the reference clock
  source, the clock input is named "refclk".

## Optional Properties:

- reset-gpios: gpio phandle GPIO connected to the reset pin
- interrupts: GPIO connected to the interrupt pin
- data-lanes: should be &lt;1 2 3 4&gt; for four-lane operation,
  or &lt;1 2&gt; for two-lane operation
- clock-lanes: should be &lt;0&gt;
- clock-noncontinuous: Presence of this boolean property decides whether the
  MIPI CSI-2 clock is continuous or non-continuous.
- link-frequencies: List of allowed link frequencies in Hz. Each frequency is
  expressed as a 64-bit big-endian integer. The frequency
  is half of the bps per lane due to DDR transmission.

For further information on the MIPI CSI-2 endpoint node properties, see
[Documentation/devicetree/bindings/media/video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>).

## Example:

```dts
	tc358743@f {
		compatible = "toshiba,tc358743";
		reg = <0x0f>;
		clocks = <&hdmi_osc>;
		clock-names = "refclk";
		reset-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>;
		interrupt-parent = <&gpio2>;
		interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;

		port {
			tc358743_out: endpoint {
				remote-endpoint = <&mipi_csi2_in>;
				data-lanes = <1 2 3 4>;
				clock-lanes = <0>;
				clock-noncontinuous;
				link-frequencies = /bits/ 64 <297000000>;
			};
		};
	};
```

---

# Sony CXD2880 DVB-T2/T tuner + demodulator driver SPI adapter

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/spi_

> Device-tree binding reference for Sony CXD2880 DVB-T2/T tuner + demodulator driver SPI adapter.

## Required properties:

- compatible: Should be "sony,cxd2880".
- reg: SPI chip select number for the device.
- spi-max-frequency: Maximum bus speed, should be set to &lt;55000000&gt; (55MHz).

## Optional properties:

- vcc-supply: Optional phandle to the vcc regulator to power the adapter,
  as described in the file ../regulator/regulator.txt

## Example:

```dts
cxd2880@0 {
	compatible = "sony,cxd2880";
	reg = <0>; /* CE0 */
	spi-max-frequency = <55000000>; /* 55MHz */
};
```

---

# DT bindings for Xilinx video IP cores

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/xilinx_

> Device-tree binding reference for DT bindings for Xilinx video IP cores.

Xilinx video IP cores process video streams by acting as video sinks and/or
sources. They are connected by links through their input and output ports,
creating a video pipeline.

Each video IP core is represented by an AMBA bus child node in the device
tree using bindings documented in this directory. Connections between the IP
cores are represented as defined in [../video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>).

The whole  pipeline is represented by an AMBA bus child node in the device
tree using bindings documented in [./xlnx,video.txt](</kernel/hardware/devicetree/bindings-media-xilinx/xlnx-video.md>).

## Common properties

The following properties are common to all Xilinx video IP cores.

- xlnx,video-format: This property represents a video format transmitted on an
  AXI bus between video IP cores, using its VF code as defined in "AXI4-Stream
  Video IP and System Design Guide" \[UG934\]. How the format relates to the IP
  core is described in the IP core bindings documentation.

- xlnx,video-width: This property qualifies the video format with the sample
  width expressed as a number of bits per pixel component. All components must
  use the same width.

- xlnx,cfa-pattern: When the video format is set to Mono/Sensor, this property
  describes the sensor's color filter array pattern. Supported values are
  "bggr", "gbrg", "grbg", "rggb" and "mono". If not specified, the pattern
  defaults to "mono".

\[UG934\] https://www.xilinx.com/support/documentation/ip\_documentation/axi\_videoip/v1\_0/ug934\_axi\_videoIP.pdf

---

# Xilinx Video Timing Controller (VTC)

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/xilinx_

> Device-tree binding reference for Xilinx Video Timing Controller (VTC).

The Video Timing Controller is a general purpose video timing generator and
detector.

## Required properties:

- compatible: Must be "xlnx,v-tc-6.1".

- reg: Physical base address and length of the registers set for the device.

- clocks: Must contain a clock specifier for the VTC core and timing
  interfaces clock.

## Optional properties:

- xlnx,detector: The VTC has a timing detector
- xlnx,generator: The VTC has a timing generator

```text
  At least one of the xlnx,detector and xlnx,generator properties must be
  specified.
```

## Example:

```dts
	vtc: vtc@43c40000 {
		compatible = "xlnx,v-tc-6.1";
		reg = <0x43c40000 0x10000>;

		clocks = <&clkc 15>;
		xlnx,generator;
	};
```

---

# Xilinx Video Test Pattern Generator (TPG)

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/xilinx_

> Device-tree binding reference for Xilinx Video Test Pattern Generator (TPG).

## Required properties:

- compatible: Must contain at least one of

```text
    "xlnx,v-tpg-5.0" (TPG version 5.0)
    "xlnx,v-tpg-6.0" (TPG version 6.0)
```

```text
  TPG versions backward-compatible with previous versions should list all
  compatible versions in the newer to older order.
```

- reg: Physical base address and length of the registers set for the device.

- clocks: Reference to the video core clock.

- xlnx,video-format, xlnx,video-width: Video format and width, as defined in
  [video.txt](</kernel/hardware/devicetree/bindings-media-xilinx/video.md>).

- port: Video port, using the DT bindings defined in [../video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>).
  The TPG has a single output port numbered 0.

## Optional properties:

- xlnx,vtc: A phandle referencing the Video Timing Controller that generates
  video timings for the TPG test patterns.

- timing-gpios: Specifier for a GPIO that controls the timing mux at the TPG
  input. The GPIO active level corresponds to the selection of VTC-generated
  video timings.

The xlnx,vtc and timing-gpios properties are mandatory when the TPG is
synthesized with two ports and forbidden when synthesized with one port.

## Example:

```dts
	tpg_0: tpg@40050000 {
		compatible = "xlnx,v-tpg-6.0", "xlnx,v-tpg-5.0";
		reg = <0x40050000 0x10000>;
		clocks = <&clkc 15>;

		xlnx,vtc = <&vtc_3>;
		timing-gpios = <&ps7_gpio_0 55 GPIO_ACTIVE_LOW>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;

				xlnx,video-format = <XVIP_VF_YUV_422>;
				xlnx,video-width = <8>;

				tpg_in: endpoint {
					remote-endpoint = <&adv7611_out>;
				};
			};
			port@1 {
				reg = <1>;

				xlnx,video-format = <XVIP_VF_YUV_422>;
				xlnx,video-width = <8>;

				tpg1_out: endpoint {
					remote-endpoint = <&switch_in0>;
				};
			};
		};
	};
```

---

# Xilinx Video IP Pipeline (VIPP)

_Peios Kernel / Hardware and drivers / Device tree / bindings/media/xilinx_

> Device-tree binding reference for Xilinx Video IP Pipeline (VIPP).

## General concept

Xilinx video IP pipeline processes video streams through one or more Xilinx
video IP cores. Each video IP core is represented as documented in [video.txt](</kernel/hardware/devicetree/bindings-media-xilinx/video.md>)
and IP core specific documentation, xlnx,v-\*.txt, in this directory. The DT
node of the VIPP represents as a top level node of the pipeline and defines
mappings between DMAs and the video IP cores.

## Required properties:

- compatible: Must be "xlnx,video".

- dmas, dma-names: List of one DMA specifier and identifier string (as defined
  in [Documentation/devicetree/bindings/dma/dma.txt](</kernel/hardware/devicetree/bindings-dma/dma.md>)) per port. Each port
  requires a DMA channel with the identifier string set to "port" followed by
  the port index.

- ports: Video port, using the DT bindings defined in [../video-interfaces.txt](</kernel/hardware/devicetree/bindings-media/video-interfaces.md>).

## Required port properties:

- direction: should be either "input" or "output" depending on the direction
  of stream.

## Example:

```dts
	video_cap {
		compatible = "xlnx,video";
		dmas = <&vdma_1 1>, <&vdma_3 1>;
		dma-names = "port0", "port1";

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				direction = "input";
				vcap0_in0: endpoint {
					remote-endpoint = <&scaler0_out>;
				};
			};
			port@1 {
				reg = <1>;
				direction = "input";
				vcap0_in1: endpoint {
					remote-endpoint = <&switch_out1>;
				};
			};
		};
	};
```

---

# Device tree bindings for Atmel EBI

_Peios Kernel / Hardware and drivers / Device tree / bindings/memory-controllers_

> Device-tree binding reference for Device tree bindings for Atmel EBI.

The External Bus Interface (EBI) controller is a bus where you can connect
asynchronous (NAND, NOR, SRAM, ....) and synchronous memories (SDR/DDR SDRAMs).
The EBI provides a glue-less interface to asynchronous memories through the SMC
(Static Memory Controller).

## Required properties:

- compatible:		"atmel,at91sam9260-ebi"
  "atmel,at91sam9261-ebi"
  "atmel,at91sam9263-ebi0"
  "atmel,at91sam9263-ebi1"
  "atmel,at91sam9rl-ebi"
  "atmel,at91sam9g45-ebi"
  "atmel,at91sam9x5-ebi"
  "atmel,sama5d3-ebi"
  "microchip,sam9x60-ebi"

- reg:			Contains offset/length value for EBI memory mapping.
  This property might contain several entries if the EBI
  memory range is not contiguous

- #address-cells:	Must be 2.
  The first cell encodes the CS.
  The second cell encode the offset into the CS memory
  range.

- #size-cells:		Must be set to 1.

- ranges:		Encodes CS to memory region association.

- clocks:		Clock feeding the EBI controller.
  See clock-bindings.txt

Children device nodes are representing device connected to the EBI bus.

## Required device node properties:

- reg:			Contains the chip-select id, the offset and the length
  of the memory region requested by the device.

EBI bus configuration will be defined directly in the device subnode.

## Optional EBI/SMC properties:

- atmel,smc-bus-width:		width of the asynchronous device's data bus
  8, 16 or 32.
  Default to 8 when undefined.

- atmel,smc-byte-access-type	"write" or "select" (see Atmel datasheet).
  Default to "select" when undefined.

- atmel,smc-read-mode		"nrd" or "ncs".
  Default to "ncs" when undefined.

- atmel,smc-write-mode		"nwe" or "ncs".
  Default to "ncs" when undefined.

- atmel,smc-exnw-mode		"disabled", "frozen" or "ready".
  Default to "disabled" when undefined.

- atmel,smc-page-mode		enable page mode if present. The provided value
  defines the page size (supported values: 4, 8,
  16 and 32).

- atmel,smc-tdf-mode:		"normal" or "optimized". When set to
  "optimized" the data float time is optimized
  depending on the next device being accessed
  (next device setup time is subtracted to the
  current device data float time).
  Default to "normal" when undefined.

If at least one atmel,smc- property is defined the following SMC timing
properties become mandatory. In the other hand, if none of the atmel,smc-
properties are specified, we assume that the EBI bus configuration will be
handled by the sub-device driver, and none of those properties should be
defined.

All the timings are expressed in nanoseconds (see Atmel datasheet for a full
description).

- atmel,smc-ncs-rd-setup-ns
- atmel,smc-nrd-setup-ns
- atmel,smc-ncs-wr-setup-ns
- atmel,smc-nwe-setup-ns
- atmel,smc-ncs-rd-pulse-ns
- atmel,smc-nrd-pulse-ns
- atmel,smc-ncs-wr-pulse-ns
- atmel,smc-nwe-pulse-ns
- atmel,smc-nwe-cycle-ns
- atmel,smc-nrd-cycle-ns
- atmel,smc-tdf-ns

## Example:

```dts
	ebi: ebi@10000000 {
		compatible = "atmel,sama5d3-ebi";
		#address-cells = <2>;
		#size-cells = <1>;
		atmel,smc = <&hsmc>;
		atmel,matrix = <&matrix>;
		reg = <0x10000000 0x10000000
		       0x40000000 0x30000000>;
		ranges = <0x0 0x0 0x10000000 0x10000000
			  0x1 0x0 0x40000000 0x10000000
			  0x2 0x0 0x50000000 0x10000000
			  0x3 0x0 0x60000000 0x10000000>;
		clocks = <&mck>;

		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_ebi_addr>;

		nor: flash@0,0 {
			compatible = "cfi-flash";
			#address-cells = <1>;
			#size-cells = <1>;
			reg = <0x0 0x0 0x1000000>;
			bank-width = <2>;

			atmel,smc-read-mode = "nrd";
			atmel,smc-write-mode = "nwe";
			atmel,smc-bus-width = <16>;
			atmel,smc-ncs-rd-setup-ns = <0>;
			atmel,smc-ncs-wr-setup-ns = <0>;
			atmel,smc-nwe-setup-ns = <8>;
			atmel,smc-nrd-setup-ns = <16>;
			atmel,smc-ncs-rd-pulse-ns = <84>;
			atmel,smc-ncs-wr-pulse-ns = <84>;
			atmel,smc-nrd-pulse-ns = <76>;
			atmel,smc-nwe-pulse-ns = <76>;
			atmel,smc-nrd-cycle-ns = <107>;
			atmel,smc-nwe-cycle-ns = <84>;
			atmel,smc-tdf-ns = <16>;
		};
	};
```

---

# Device tree bindings for MVEBU Device Bus controllers

_Peios Kernel / Hardware and drivers / Device tree / bindings/memory-controllers_

> Device-tree binding reference for Device tree bindings for MVEBU Device Bus controllers.

The Device Bus controller available in some Marvell's SoC allows to control
different types of standard memory and I/O devices such as NOR, NAND, and FPGA.
The actual devices are instantiated from the child nodes of a Device Bus node.

## Required properties:

- compatible:          Armada 370/XP SoC are supported using the
  "marvell,mvebu-devbus" compatible string.

```text
                        Orion5x SoC are supported using the
                        "marvell,orion-devbus" compatible string.
```

- reg:                 A resource specifier for the register space.
  This is the base address of a chip select within
  the controller's register space.
  (see the example below)

- #address-cells:      Must be set to 1
- #size-cells:         Must be set to 1
- ranges:              Must be set up to reflect the memory layout with four
  integer values for each chip-select line in use:
  0 &lt;physical address of mapping&gt; &lt;size&gt;

## Optional properties:

- devbus,keep-config   This property can optionally be used to keep
  using the timing parameters set by the
  bootloader. It makes all the timing properties
  described below unused.

## Timing properties for child nodes:

## Read parameters:

- devbus,turn-off-ps:  Defines the time during which the controller does not
  drive the AD bus after the completion of a device read.
  This prevents contentions on the Device Bus after a read
  cycle from a slow device.
  Mandatory, except if devbus,keep-config is used.

- devbus,bus-width:    Defines the bus width, in bits (e.g. &lt;16&gt;).
  Mandatory, except if devbus,keep-config is used.

- devbus,badr-skew-ps: Defines the time delay from from A\[2:0\] toggle,
  to read data sample. This parameter is useful for
  synchronous pipelined devices, where the address
  precedes the read data by one or two cycles.
  Mandatory, except if devbus,keep-config is used.

- devbus,acc-first-ps: Defines the time delay from the negation of
  ALE\[0\] to the cycle that the first read data is sampled
  by the controller.
  Mandatory, except if devbus,keep-config is used.

- devbus,acc-next-ps:  Defines the time delay between the cycle that
  samples data N and the cycle that samples data N+1
  (in burst accesses).
  Mandatory, except if devbus,keep-config is used.

- devbus,rd-setup-ps:  Defines the time delay between DEV\_CSn assertion to
  DEV\_OEn assertion. If set to 0 (default),
  DEV\_OEn and DEV\_CSn are asserted at the same cycle.
  This parameter has no affect on &lt;acc-first-ps&gt; parameter
  (no affect on first data sample). Set &lt;rd-setup-ps&gt;
  to a value smaller than &lt;acc-first-ps&gt;.
  Mandatory for "marvell,mvebu-devbus" compatible string,
  except if devbus,keep-config is used.

- devbus,rd-hold-ps:   Defines the time between the last data sample to the
  de-assertion of DEV\_CSn. If set to 0 (default),
  DEV\_OEn and DEV\_CSn are de-asserted at the same cycle
  (the cycle of the last data sample).
  This parameter has no affect on DEV\_OEn de-assertion.
  DEV\_OEn is always de-asserted the next cycle after
  last data sampled. Also this parameter has no
  affect on &lt;turn-off-ps&gt; parameter.
  Set &lt;rd-hold-ps&gt; to a value smaller than &lt;turn-off-ps&gt;.
  Mandatory for "marvell,mvebu-devbus" compatible string,
  except if devbus,keep-config is used.

## Write parameters:

- devbus,ale-wr-ps:    Defines the time delay from the ALE\[0\] negation cycle
  to the DEV\_WEn assertion.
  Mandatory.

- devbus,wr-low-ps:    Defines the time during which DEV\_WEn is active.
  A\[2:0\] and Data are kept valid as long as DEV\_WEn
  is active. This parameter defines the setup time of
  address and data to DEV\_WEn rise.
  Mandatory.

- devbus,wr-high-ps:   Defines the time during which DEV\_WEn is kept
  inactive (high) between data beats of a burst write.
  DEV\_A\[2:0\] and Data are kept valid (do not toggle) for
  &lt;wr-high-ps&gt; - &lt;tick&gt; ps.
  This parameter defines the hold time of address and
  data after DEV\_WEn rise.
  Mandatory.

- devbus,sync-enable: Synchronous device enable.
  1: True
  0: False
  Mandatory for "marvell,mvebu-devbus" compatible string,
  except if devbus,keep-config is used.

An example for an Armada XP GP board, with a 16 MiB NOR device as child
is showed below. Note that the Device Bus driver is in charge of allocating
the mbus address decoding window for each of its child devices.
The window is created using the chip select specified in the child
device node together with the base address and size specified in the ranges
property. For instance, in the example below the allocated decoding window
will start at base address 0xf0000000, with a size 0x1000000 (16 MiB)
for chip select 0 (a.k.a DEV\_BOOTCS).

This address window handling is done in this mvebu-devbus only as a temporary
solution. It will be removed when the support for mbus device tree binding is
added.

The reg property implicitly specifies the chip select as this:

```text
  0x10400: DEV_BOOTCS
  0x10408: DEV_CS0
  0x10410: DEV_CS1
  0x10418: DEV_CS2
  0x10420: DEV_CS3
```

## Example:

```dts
	devbus-bootcs@d0010400 {
		ranges = <0 0xf0000000 0x1000000>; /* @addr 0xf0000000, size 0x1000000 */
		#address-cells = <1>;
		#size-cells = <1>;

		/* Device Bus parameters are required */

		/* Read parameters */
		devbus,bus-width    = <8>;
		devbus,turn-off-ps  = <60000>;
		devbus,badr-skew-ps = <0>;
		devbus,acc-first-ps = <124000>;
		devbus,acc-next-ps  = <248000>;
		devbus,rd-setup-ps  = <0>;
		devbus,rd-hold-ps   = <0>;

		/* Write parameters */
		devbus,sync-enable = <0>;
		devbus,wr-high-ps  = <60000>;
		devbus,wr-low-ps   = <60000>;
		devbus,ale-wr-ps   = <60000>;

		flash@0 {
			compatible = "cfi-flash";

			/* 16 MiB */
			reg = <0 0x1000000>;
			bank-width = <2>;
			#address-cells = <1>;
			#size-cells = <1>;

			/*
			 * We split the 16 MiB in two partitions,
			 * just as an example.
			 */
			partition@0 {
				label = "First";
				reg = <0 0x800000>;
			};

			partition@800000 {
				label = "Second";
				reg = <0x800000 0x800000>;
			};
		};
	};
```

---

# Device tree bindings for Texas instruments AEMIF controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/memory-controllers_

> Device-tree binding reference for Device tree bindings for Texas instruments AEMIF controller.

The Async External Memory Interface (EMIF16/AEMIF) controller is intended to
provide a glue-less interface to a variety of asynchronous memory devices like
ASRA M, NOR and NAND memory. A total of 256M bytes of any of these memories
can be accessed at any given time via four chip selects with 64M byte access
per chip select. Synchronous memories such as DDR1 SD RAM, SDR SDRAM
and Mobile SDR are not supported.

## Documentation:

Davinci DM646x - http://www.ti.com/lit/ug/sprueq7c/sprueq7c.pdf
OMAP-L138 (DA850) - http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf
Kestone - http://www.ti.com/lit/ug/sprugz3a/sprugz3a.pdf

## Required properties:

- compatible:		"ti,davinci-aemif"
  "ti,keystone-aemif"
  "ti,da850-aemif"

- reg:			contains offset/length value for AEMIF control registers
  space.

- #address-cells:	Must be 2. The partition number has to be encoded in the
  first address cell and it may accept values 0..N-1
  (N - total number of partitions). It's recommended to
  assign N-1 number for the control partition. The second
  cell is the offset into the partition.

- #size-cells:		Must be set to 1.

```text
- ranges:		Contains memory regions. There are two types of
			ranges/partitions:
			- CS-specific partition/range. If continuous, must be
			set up to reflect the memory layout for 4 chipselects,
			if not then additional range/partition can be added and
			child device can select the proper one.
			- control partition which is common for all CS
			interfaces.
```

- clocks:		the clock feeding the controller clock. Required only
  if clock tree data present in device tree.
  See clock-bindings.txt

- clock-names:		clock name. It has to be "aemif". Required only if clock
  tree data present in device tree, in another case don't
  use it.
  See clock-bindings.txt

- clock-ranges:		Empty property indicating that child nodes can inherit
  named clocks. Required only if clock tree data present
  in device tree.
  See clock-bindings.txt

Child chip-select (cs) nodes contain the memory devices nodes connected to
such as NOR (e.g. cfi-flash) and NAND (ti,davinci-nand, see davinci-nand.txt).
There might be board specific devices like FPGAs.

## Required child cs node properties:

- #address-cells:	Must be 2.

- #size-cells:		Must be 1.

- ranges:		Empty property indicating that child nodes can inherit
  memory layout.

- clock-ranges:		Empty property indicating that child nodes can inherit
  named clocks. Required only if clock tree data present
  in device tree.

- ti,cs-chipselect:	number of chipselect. Indicates on the aemif driver
  which chipselect is used for accessing the memory. For
  compatibles "ti,davinci-aemif" and "ti,keystone-aemif"
  it can be in range \[0-3\]. For compatible
  "ti,da850-aemif" range is \[2-5\].

## Optional child cs node properties:

- ti,cs-bus-width:		width of the asynchronous device's data bus
  8 or 16 if not preset 8

- ti,cs-select-strobe-mode:	enable/disable select strobe mode
  In select strobe mode chip select behaves as
  the strobe and is active only during the strobe
  period. If present then enable.

- ti,cs-extended-wait-mode:	enable/disable extended wait mode
  if set, the controller monitors the EMIFWAIT pin
  mapped to that chip select to determine if the
  device wants to extend the strobe period. If
  present then enable.

- ti,cs-min-turnaround-ns:	minimum turn around time, ns
  Time between the end of one asynchronous memory
  access and the start of another asynchronous
  memory access. This delay is not incurred
  between a read followed by read or a write
  followed by a write to same chip select.

- ti,cs-read-setup-ns:		read setup width, ns
  Time between the beginning of a memory cycle
  and the activation of read strobe.
  Minimum value is 1 (0 treated as 1).

- ti,cs-read-strobe-ns:		read strobe width, ns
  Time between the activation and deactivation of
  the read strobe.
  Minimum value is 1 (0 treated as 1).

- ti,cs-read-hold-ns:		read hold width, ns
  Time between the deactivation of the read
  strobe and the end of the cycle (which may be
  either an address change or the deactivation of
  the chip select signal.
  Minimum value is 1 (0 treated as 1).

- ti,cs-write-setup-ns:		write setup width, ns
  Time between the beginning of a memory cycle
  and the activation of write strobe.
  Minimum value is 1 (0 treated as 1).

- ti,cs-write-strobe-ns:	write strobe width, ns
  Time between the activation and deactivation of
  the write strobe.
  Minimum value is 1 (0 treated as 1).

- ti,cs-write-hold-ns:		write hold width, ns
  Time between the deactivation of the write
  strobe and the end of the cycle (which may be
  either an address change or the deactivation of
  the chip select signal.
  Minimum value is 1 (0 treated as 1).

If any of the above parameters are absent, current parameter value will be taken
from the corresponding HW reg.

Example for aemif, davinci nand and nor flash chip select shown below.

```dts
memory-controller@21000a00 {
	compatible = "ti,davinci-aemif";
	#address-cells = <2>;
	#size-cells = <1>;
	clocks = <&clkaemif 0>;
	clock-names = "aemif";
	clock-ranges;
	reg = <0x21000A00 0x00000100>;
	ranges = <0 0 0x70000000 0x10000000
		  1 0 0x21000A00 0x00000100>;
		  /*
		   * Partition0: CS-specific memory range which is
		   * implemented as continuous physical memory region
		   * Partition1: control memory range
		   */

	nand:cs2 {
		#address-cells = <2>;
		#size-cells = <1>;
		clock-ranges;
		ranges;

		ti,cs-chipselect = <2>;
		/* all timings in nanoseconds */
		ti,cs-min-turnaround-ns = <0>;
		ti,cs-read-hold-ns = <7>;
		ti,cs-read-strobe-ns = <42>;
		ti,cs-read-setup-ns = <14>;
		ti,cs-write-hold-ns = <7>;
		ti,cs-write-strobe-ns = <42>;
		ti,cs-write-setup-ns = <14>;

		nand@0,0x8000000 {
			compatible = "ti,davinci-nand";
			reg = <0 0x8000000 0x4000000
			       1 0x0000000 0x0000100>;
			/*
			 * Partition0, offset 0x8000000, size 0x4000000
			 * Partition1, offset 0x0000000, size 0x0000100
			 */

			.. see davinci-nand.txt
		};
	};

	nor:cs0 {
		#address-cells = <2>;
		#size-cells = <1>;
		clock-ranges;
		ranges;

		ti,cs-chipselect = <0>;
		/* all timings in nanoseconds */
		ti,cs-min-turnaround-ns = <0>;
		ti,cs-read-hold-ns = <8>;
		ti,cs-read-strobe-ns = <40>;
		ti,cs-read-setup-ns = <14>;
		ti,cs-write-hold-ns = <7>;
		ti,cs-write-strobe-ns = <40>;
		ti,cs-write-setup-ns = <14>;
		ti,cs-bus-width = <16>;

		flash@0,0x0000000 {
			compatible = "cfi-flash";
			reg = <0 0x0000000 0x4000000>;

			...
		};
	};
};
```

---

# EMIF family of TI SDRAM controllers

_Peios Kernel / Hardware and drivers / Device tree / bindings/memory-controllers/ti_

> Device-tree binding reference for EMIF family of TI SDRAM controllers.

EMIF - External Memory Interface - is an SDRAM controller used in
TI SoCs. EMIF supports, based on the IP revision, one or more of
DDR2/DDR3/LPDDR2 protocols. This binding describes a given instance
of the EMIF IP and memory parts attached to it. Certain revisions
of the EMIF controller also contain optional ECC support, which
corrects one bit errors and detects two bit errors.

## Required properties:

- compatible	: Should be of the form "ti,emif-&lt;ip-rev&gt;" where &lt;ip-rev&gt;
  is the IP revision of the specific EMIF instance. For newer controllers,
  compatible should be one of the following:
  "ti,emif-am3352"
  "ti,emif-am4372"
  "ti,emif-dra7xx"
  "ti,emif-keystone"

- phy-type	: &lt;u32&gt; indicating the DDR phy type. Following are the
  allowed values
  &lt;1&gt;	: Attila PHY
  &lt;2&gt;	: Intelli PHY

- device-handle	: phandle to a "lpddr2" node representing the memory part

- ti,hwmods	: For TI hwmods processing and omap device creation
  the value shall be "emif&lt;n&gt;" where &lt;n&gt; is the number of the EMIF
  instance with base 1.
- interrupts	: interrupt used by the controller

## Required only for "ti,emif-am3352" and "ti,emif-am4372":

- sram			: Phandles for generic sram driver nodes,
  first should be type 'protect-exec' for the driver to use to copy
  and run PM functions, second should be regular pool to be used for
  data region for code. See [Documentation/devicetree/bindings/sram/sram.yaml](</kernel/hardware/devicetree-bindings/dt-sram/sram.md>)
  for more details.

## Optional properties:

- cs1-used		: Have this property if CS1 of this EMIF
  instance has a memory part attached to it. If there is a memory
  part attached to CS1, it should be the same type as the one on CS0,
  so there is no need to give the details of this memory part.

- cal-resistor-per-cs	: Have this property if the board has one
  calibration resistor per chip-select.

- hw-caps-read-idle-ctrl: Have this property if the controller
  supports read idle window programming

- hw-caps-dll-calib-ctrl: Have this property if the controller
  supports dll calibration control

- hw-caps-ll-interface	: Have this property if the controller
  has a low latency interface and corresponding interrupt events

- hw-caps-temp-alert	: Have this property if the controller
  has capability for generating SDRAM temperature alerts

## -Examples:

```dts
emif1: emif@4c000000 {
	compatible	= "ti,emif-4d";
	ti,hwmods	= "emif2";
	phy-type	= <1>;
	device-handle	= <&elpida_ECB240ABACN>;
	cs1-used;
	hw-caps-read-idle-ctrl;
	hw-caps-ll-interface;
	hw-caps-temp-alert;
};
```

/\* From am33xx.dtsi \*/

```dts
emif: emif@4c000000 {
        compatible = "ti,emif-am3352";
        reg =   <0x4C000000 0x1000>;
        sram = <&pm_sram_code
                &pm_sram_data>;
};
```

```dts
emif1: emif@4c000000 {
	compatible = "ti,emif-dra7xx";
	reg = <0x4c000000 0x200>;
	interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
};
```

---

# Marvell 88PM860x Power Management IC

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for Marvell 88PM860x Power Management IC.

## Required parent device properties:

```text
- compatible : "marvell,88pm860x"
- reg : the I2C slave address for the 88pm860x chip
- interrupts : IRQ line for the 88pm860x chip
- interrupt-controller: describes the 88pm860x as an interrupt controller (has its own domain)
- #interrupt-cells : should be 1.
		- The cell is the 88pm860x local IRQ number
```

## Optional parent device properties:

- marvell,88pm860x-irq-read-clr: inicates whether interrupt status is cleared by read
- marvell,88pm860x-slave-addr: 88pm860x are two chips solution. &lt;reg&gt; stores the I2C address
  of one chip, and this property stores the I2C address of
  another chip.

88pm860x consists of a large and varied group of sub-devices:

```text
Device			 Supply Names	 Description
------			 ------------	 -----------
88pm860x-onkey		:		: On key
88pm860x-rtc		:		: RTC
88pm8607		:		: Regulators
88pm860x-backlight	:		: Backlight
88pm860x-led		:		: Led
88pm860x-touch		:		: Touchscreen
```

## Example:

```dts
	pmic: 88pm860x@34 {
		compatible = "marvell,88pm860x";
		reg = <0x34>;
		interrupts = <4>;
		interrupt-parent = <&intc>;
		interrupt-controller;
		#interrupt-cells = <1>;

		marvell,88pm860x-irq-read-clr;
		marvell,88pm860x-slave-addr = <0x11>;

		regulators {
			BUCK1 {
				regulator-min-microvolt = <1000000>;
				regulator-max-microvolt = <1500000>;
				regulator-boot-on;
				regulator-always-on;
			};
			LDO1 {
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <2800000>;
				regulator-boot-on;
				regulator-always-on;
			};
		};
		rtc {
			marvell,88pm860x-vrtc = <1>;
		};
		touch {
			marvell,88pm860x-gpadc-prebias = <1>;
			marvell,88pm860x-gpadc-slot-cycle = <1>;
			marvell,88pm860x-tsi-prebias = <6>;
			marvell,88pm860x-pen-prebias = <16>;
			marvell,88pm860x-pen-prechg = <2>;
			marvell,88pm860x-resistor-X = <300>;
		};
		backlights {
			backlight-0 {
				marvell,88pm860x-iset = <4>;
				marvell,88pm860x-pwm = <3>;
			};
			backlight-2 {
			};
		};
		leds {
			led0-red {
				marvell,88pm860x-iset = <12>;
			};
			led0-green {
				marvell,88pm860x-iset = <12>;
			};
			led0-blue {
				marvell,88pm860x-iset = <12>;
			};
		};
	};
```

---

# Altera Arria10 Development Kit System Resource Chip

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for Altera Arria10 Development Kit System Resource Chip.

## Required parent device properties:

- compatible		: "altr,a10sr"
- spi-max-frequency	: Maximum SPI frequency.
- reg			: The SPI Chip Select address for the Arria10
  System Resource chip
- interrupts		: The interrupt line the device is connected to.
- interrupt-controller	: Marks the device node as an interrupt controller.
- #interrupt-cells	: The number of cells to describe an IRQ, should be 2.
  The first cell is the IRQ number.
  The second cell is the flags, encoded as trigger
  masks from [../interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>).

## The A10SR consists of these sub-devices:

```text
Device                   Description
------                   ----------
a10sr_gpio               GPIO Controller
a10sr_rst                Reset Controller
```

Arria10 GPIO
Required Properties:

- compatible        : Should be "altr,a10sr-gpio"
- gpio-controller   : Marks the device node as a GPIO Controller.
- #gpio-cells       : Should be two.  The first cell is the pin number and
  the second cell is used to specify flags.
  See [../gpio/gpio.txt](</kernel/hardware/devicetree/bindings-gpio/gpio.md>) for more information.

Arria10 Peripheral PHY Reset
Required Properties:

- compatible        : Should be "altr,a10sr-reset"
- #reset-cells      : Should be one.

## Example:

```dts
        resource-manager@0 {
		compatible = "altr,a10sr";
		reg = <0>;
		spi-max-frequency = <100000>;
		interrupt-parent = <&portb>;
		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
		interrupt-controller;
		#interrupt-cells = <2>;

		a10sr_gpio: gpio-controller {
			compatible = "altr,a10sr-gpio";
			gpio-controller;
			#gpio-cells = <2>;
		};

		a10sr_rst: reset-controller {
			compatible = "altr,a10sr-reset";
			#reset-cells = <1>;
		};
	};
```

---

# ams AS3722 Power management IC.

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for ams AS3722 Power management IC..

## Required properties:

- compatible: Must be "ams,as3722".
- reg: I2C device address.
- interrupt-controller: AS3722 has internal interrupt controller which takes the
  interrupt request from internal sub-blocks like RTC, regulators, GPIOs as well
  as external input.
- #interrupt-cells: Should be set to 2 for IRQ number and flags.
  The first cell is the IRQ number. IRQ numbers for different interrupt source
  of AS3722 are defined at dt-bindings/mfd/as3722.h
  The second cell is the flags, encoded as the trigger masks from binding document
  interrupts.txt, using dt-bindings/irq.

## Optional properties:

- ams,enable-internal-int-pullup: Boolean property, to enable internal pullup on
  interrupt pin. Missing this will disable internal pullup on INT pin.
- ams,enable-internal-i2c-pullup: Boolean property, to enable internal pullup on
  i2c scl/sda pins. Missing this will disable internal pullup on i2c
  scl/sda lines.
- ams,enable-ac-ok-power-on: Boolean property, to enable exit out of power off
  mode with AC\_OK pin (pin enabled in power off mode).

## Optional submodule and their properties:

## Pinmux and GPIO:

Device has 8 GPIO pins which can be configured as GPIO as well as the special IO
functions.

Please refer to pinctrl-bindings.txt in this directory for details of the
common pinctrl bindings used by client devices, including the meaning of the
phrase "pin configuration node".

Following are properties which is needed if GPIO and pinmux functionality
is required:

## Required properties:

- gpio-controller: Marks the device node as a GPIO controller.
- #gpio-cells: Number of GPIO cells. Refer to binding document
  gpio/gpio.txt

## Optional properties:

```text
	Following properties are require if pin control setting is required
	at boot.
	- pinctrl-names: A pinctrl state named "default" be defined, using the
		bindings in pinctrl/pinctrl-bindings.txt.
	- pinctrl[0...n]: Properties to contain the phandle that refer to
		different nodes of pin control settings. These nodes represents
		the pin control setting of state 0 to state n. Each of these
		nodes contains different subnodes to represents some desired
		configuration for a list of pins. This configuration can
		include the mux function to select on those pin(s), and
		various pin configuration parameters, such as pull-up,
		open drain.
```

## Each subnode have following properties:

```text
		Required properties:
		    - pins: List of pins. Valid values of pins properties are:
				gpio0, gpio1, gpio2, gpio3, gpio4, gpio5,
				gpio6, gpio7
```

## Optional properties:

```text
			function, bias-disable, bias-pull-up, bias-pull-down,
			bias-high-impedance, drive-open-drain.
```

## Valid values for function properties are:

```text
				gpio, interrupt-out, gpio-in-interrupt,
				vsup-vbat-low-undebounce-out,
				vsup-vbat-low-debounce-out,
				voltage-in-standby, oc-pg-sd0, oc-pg-sd6,
				powergood-out, pwm-in, pwm-out, clk32k-out,
				watchdog-in, soft-reset-in
```

## Regulators:

Device has multiple DCDC and LDOs. The node "regulators" is require if regulator
functionality is needed.

Following are properties of regulator subnode.

## Optional properties:

```text
	The input supply of regulators are the optional properties on the
	regulator node. The input supply of these regulators are provided
	through following properties:
		vsup-sd2-supply: Input supply for SD2.
		vsup-sd3-supply: Input supply for SD3.
		vsup-sd4-supply: Input supply for SD4.
		vsup-sd5-supply: Input supply for SD5.
		vin-ldo0-supply: Input supply for LDO0.
		vin-ldo1-6-supply: Input supply for LDO1 and LDO6.
		vin-ldo2-5-7-supply: Input supply for LDO2, LDO5 and LDO7.
		vin-ldo3-4-supply: Input supply for LDO3 and LDO4.
		vin-ldo9-10-supply: Input supply for LDO9 and LDO10.
		vin-ldo11-supply: Input supply for LDO11.
```

## Optional sub nodes for regulators:

```text
	The subnodes name is the name of regulator and it must be one of:
	sd[0-6], ldo[0-7], ldo[9-11]
```

```text
	Each sub-node should contain the constraints and initialization
	information for that regulator. See regulator.txt for a description
	of standard properties for these sub-nodes.
	Additional optional custom properties  are listed below.
		ams,ext-control: External control of the rail. The option of
			this properties will tell which external input is
			controlling this rail. Valid values are 0, 1, 2 ad 3.
			0: There is no external control of this rail.
			1: Rail is controlled by ENABLE1 input pin.
			2: Rail is controlled by ENABLE2 input pin.
			3: Rail is controlled by ENABLE3 input pin.
			Missing this property on DT will be assume as no
			external control. The external control pin macros
			are defined @dt-bindings/mfd/as3722.h
```

```text
		ams,enable-tracking: Enable tracking with SD1, only supported
			by LDO3.
```

## Power-off:

AS3722 supports the system power off by turning off all its rails.
The device node should have the following properties to enable this
functionality
ams,system-power-controller: Boolean, to enable the power off functionality

```text
        through this device.
```

## Example:

```dts
#include <dt-bindings/mfd/as3722.h>
```

...

```dts
ams3722 {
	compatible = "ams,as3722";
	reg = <0x48>;

	ams,system-power-controller;

	interrupt-parent = <&intc>;
	interrupt-controller;
	#interrupt-cells = <2>;

	gpio-controller;
	#gpio-cells = <2>;

	pinctrl-names = "default";
	pinctrl-0 = <&as3722_default>;

	as3722_default: pinmux {
			gpio0 {
				pins = "gpio0";
				function = "gpio";
				bias-pull-down;
			};

			gpio1_2_4_7 {
				pins = "gpio1", "gpio2", "gpio4", "gpio7";
				function = "gpio";
				bias-pull-up;
			};

			gpio5 {
				pins = "gpio5";
				function = "clk32k_out";
			};
	}

	regulators {
			vsup-sd2-supply = <...>;
			...

			sd0 {
				regulator-name = "vdd_cpu";
				regulator-min-microvolt = <700000>;
				regulator-max-microvolt = <1400000>;
				regulator-always-on;
				ams,ext-control = <2>;
			};

			sd1 {
				regulator-name = "vdd_core";
				regulator-min-microvolt = <700000>;
				regulator-max-microvolt = <1400000>;
				regulator-always-on;
				ams,ext-control = <1>;
			};

			sd2 {
				regulator-name = "vddio_ddr";
				regulator-min-microvolt = <1350000>;
				regulator-max-microvolt = <1350000>;
				regulator-always-on;
			};

			sd4 {
				regulator-name = "avdd-hdmi-pex";
				regulator-min-microvolt = <1050000>;
				regulator-max-microvolt = <1050000>;
				regulator-always-on;
			};

			sd5 {
				regulator-name = "vdd-1v8";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-always-on;
			};
			....
	};
};
```

---

# Device tree bindings for Atmel SMC (Static Memory Controller)

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for Device tree bindings for Atmel SMC (Static Memory Controller).

The SMC registers are used to configure Atmel EBI (External Bus Interface)
to interface with standard memory devices (NAND, NOR, SRAM or specialized
devices like FPGAs).

## Required properties:

- compatible:		Should be one of the following
  "atmel,at91sam9260-smc", "syscon"
  "atmel,sama5d3-smc", "syscon"
  "atmel,sama5d2-smc", "syscon"
  "microchip,sam9x60-smc", "syscon"
  "microchip,sam9x7-smc", "atmel,at91sam9260-smc", "syscon"
- reg:			Contains offset/length value of the SMC memory
  region.

## Example:

```dts
smc: smc@ffffc000 {
	compatible = "atmel,sama5d3-smc", "syscon";
	reg = <0xffffc000 0x1000>;
};
```

---

# KEYMILE bfticu Chassis Management FPGA

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for KEYMILE bfticu Chassis Management FPGA.

The bfticu is a multifunction device that manages the whole chassis.
Its main functionality is to collect IRQs from the whole chassis and signals
them to a single controller.

## Required properties:

- compatible: "keymile,bfticu"
- interrupt-controller: the bfticu FPGA is an interrupt controller
- interrupts: the main IRQ line to signal the collected IRQs
- #interrupt-cells : is 2 and their usage is compliant to the 2 cells variant
  of [Documentation/devicetree/bindings/interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>)
- reg: access on the parent local bus (chip select, offset in chip select, size)

## Example:

```dts
	chassis-mgmt@3,0 {
		compatible = "keymile,bfticu";
		interrupt-controller;
		#interrupt-cells = <2>;
		reg = <3 0 0x100>;
		interrupt-parent = <&mpic>;
		interrupts = <6 1 0 0>;
	};
```

---

# Dialog DA9055 Power Management Integrated Circuit (PMIC)

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for Dialog DA9055 Power Management Integrated Circuit (PMIC).

DA9055 consists of a large and varied group of sub-devices (I2C Only):

```text
Device			 Supply Names	 Description
------			 ------------	 -----------
da9055-gpio		:		: GPIOs
da9055-regulator	:		: Regulators
da9055-onkey		:		: On key
da9055-rtc		:		: RTC
da9055-hwmon		:		: ADC
da9055-watchdog		:		: Watchdog
```

The CODEC device in DA9055 has a separate, configurable I2C address and so
is instantiated separately from the PMIC.

For details on accompanying CODEC I2C device, see the following:
[Documentation/devicetree/bindings/sound/trivial-codec.yaml](</kernel/hardware/devicetree-bindings/dt-sound/trivial-codec.md>)

---

## Required properties:

- compatible : Should be "dlg,da9055-pmic"
- reg: Specifies the I2C slave address (defaults to 0x5a but can be modified)
- interrupts: IRQ line info for da9055 chip.
- interrupt-controller: da9055 has internal IRQs (has own IRQ domain).
- #interrupt-cells: Should be 1, is the local IRQ number for da9055.

## Sub-nodes:

- regulators : Contain the regulator nodes. The DA9055 regulators are
  bound using their names as listed below:

```text
    buck1     : regulator BUCK1
    buck2     : regulator BUCK2
    ldo1      : regulator LDO1
    ldo2      : regulator LDO2
    ldo3      : regulator LDO3
    ldo4      : regulator LDO4
    ldo5      : regulator LDO5
    ldo6      : regulator LDO6
```

```text
  The bindings details of individual regulator device can be found in:
  Documentation/devicetree/bindings/regulator/regulator.txt
```

## Example:

```dts
	pmic: da9055-pmic@5a {
		compatible = "dlg,da9055-pmic";
		reg = <0x5a>;
		interrupt-parent = <&intc>;
		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
		interrupt-controller;
		#interrupt-cells = <1>;

		regulators {
			buck1: BUCK1 {
				regulator-min-microvolt = <725000>;
				regulator-max-microvolt = <2075000>;
			};
			buck2: BUCK2 {
				regulator-min-microvolt = <925000>;
				regulator-max-microvolt = <2500000>;
			};
			ldo1: LDO1 {
				regulator-min-microvolt = <900000>;
				regulator-max-microvolt = <3300000>;
			};
		};
	};
```

---

# Dialog Semiconductor DA9150 Combined Charger/Fuel-Gauge MFD bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for Dialog Semiconductor DA9150 Combined Charger/Fuel-Gauge MFD bindings.

## DA9150 consists of a group of sub-devices:

```text
Device			 Description
------			 -----------
da9150-gpadc		: General Purpose ADC
da9150-charger		: Battery Charger
da9150-fg		: Battery Fuel-Gauge
```

---

## Required properties:

- compatible : Should be "dlg,da9150"
- reg: Specifies the I2C slave address
- interrupts: IRQ line info for da9150 chip.
- interrupt-controller: da9150 has internal IRQs (own IRQ domain).
  (See [../interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>) for
  further information relating to interrupt properties)

## Sub-devices:

- da9150-gpadc: See ../iio/adc/da9150-gpadc.txt
- da9150-charger: See ../power/da9150-charger.txt
- da9150-fg: See ../power/da9150-fg.txt

## Example:

```dts
	charger_fg: da9150@58 {
		compatible = "dlg,da9150";
		reg = <0x58>;
		interrupt-parent = <&gpio6>;
		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
		interrupt-controller;

		gpadc: da9150-gpadc {
			compatible = "dlg,da9150-gpadc";
			#io-channel-cells = <1>;
		};

		charger {
			compatible = "dlg,da9150-charger";

			io-channels = <&gpadc 0>,
				      <&gpadc 2>,
				      <&gpadc 8>,
				      <&gpadc 5>;
			io-channel-names = "CHAN_IBUS",
					   "CHAN_VBUS",
					   "CHAN_TJUNC",
					   "CHAN_VBAT";
		};

		fuel-gauge {
			compatible = "dlg,da9150-fuel-gauge";

			dlg,update-interval = <10000>;
			dlg,warn-soc-level = /bits/ 8 <15>;
			dlg,crit-soc-level = /bits/ 8 <5>
		};
	};
```

---

# Freescale MX25 ADC/TSC MultiFunction Device (MFD)

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for Freescale MX25 ADC/TSC MultiFunction Device (MFD).

This device combines two general purpose conversion queues one used for general
ADC and the other used for touchscreens.

## Required properties:

- compatible:			Should be "fsl,imx25-tsadc".
- reg:				Start address and size of the memory area of
  the device
- interrupts:			Interrupt for this device
  (See: [../interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>))
- clocks:			An 'ipg' clock (See: [../clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>))
- interrupt-controller:	This device is an interrupt controller. It
  controls the interrupts of both
  conversion queues.
- #interrupt-cells:		Should be '&lt;1&gt;'.
- #address-cells:		Should be '&lt;1&gt;'.
- #size-cells:			Should be '&lt;1&gt;'.

This device includes two conversion queues which can be added as subnodes.
The first queue is for the touchscreen, the second for general purpose ADC.

## Example:

```dts
	tscadc: tscadc@50030000 {
		compatible = "fsl,imx25-tsadc";
		reg = <0x50030000 0xc>;
		interrupts = <46>;
		clocks = <&clks 119>;
		clock-names = "ipg";
		interrupt-controller;
		#interrupt-cells = <1>;
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		tsc: tcq@50030400 {
			compatible = "fsl,imx25-tcq";
			reg = <0x50030400 0x60>;
			...
		};

		adc: gcq@50030800 {
			compatible = "fsl,imx25-gcq";
			reg = <0x50030800 0x60>;
			...
		};
	};
```

---

# HI6421 Multi-Functional Device (MFD), by HiSilicon Ltd.

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for HI6421 Multi-Functional Device (MFD), by HiSilicon Ltd..

## Required parent device properties:

- compatible    : One of the following chip-specific strings:
  "hisilicon,hi6421-pmic";
  "hisilicon,hi6421v530-pmic";
- reg		: register range space of hi6421;

## Supported Hi6421 sub-devices include:

```text
Device                     IRQ Names              Supply Names   Description
------                     ---------              ------------   -----------
regulators               :  None                 : None         : Regulators
```

## Required child device properties:

None.

## Example:

```dts
	hi6421 {
		compatible = "hisilicon,hi6421-pmic";
		reg = <0xfcc00000 0x0180>; /* 0x60 << 2 */

		regulators {
			// supply for MLC NAND/ eMMC
			hi6421_vout0_reg: hi6421_vout0 {
				regulator-name = "VOUT0";
				regulator-min-microvolt = <2850000>;
				regulator-max-microvolt = <2850000>;
			};

			// supply for 26M Oscillator
			hi6421_vout1_reg: hi6421_vout1 {
				regulator-name = "VOUT1";
				regulator-min-microvolt = <1700000>;
				regulator-max-microvolt = <2000000>;
				regulator-boot-on;
				regulator-always-on;
			};
		};
	};
```

---

# Hisilicon Hi655x Power Management Integrated Circuit (PMIC)

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for Hisilicon Hi655x Power Management Integrated Circuit (PMIC).

The hardware layout for access PMIC Hi655x from AP SoC Hi6220.
Between PMIC Hi655x and Hi6220, the physical signal channel is SSI.
We can use memory-mapped I/O to communicate.

```text
+----------------+             +-------------+
|                |             |             |
|    Hi6220      |   SSI bus   |   Hi655x    |
|                |-------------|             |
|                |(REGMAP_MMIO)|             |
+----------------+             +-------------+
```

## Required properties:

- compatible:           Should be "hisilicon,hi655x-pmic".
- reg:                  Base address of PMIC on Hi6220 SoC.
- interrupt-controller: Hi655x has internal IRQs (has own IRQ domain).
- pmic-gpios:           The GPIO used by PMIC IRQ.
- #clock-cells:		From common clock binding; shall be set to 0

## Optional properties:

- clock-output-names: From common clock binding to override the
  default output clock name

## Example:

```dts
	pmic: pmic@f8000000 {
		compatible = "hisilicon,hi655x-pmic";
		reg = <0x0 0xf8000000 0x0 0x1000>;
		interrupt-controller;
		#interrupt-cells = <2>;
		pmic-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
		#clock-cells = <0>;
	}
```

---

# TI/National Semiconductor LP3943 MFD driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for TI/National Semiconductor LP3943 MFD driver.

## Required properties:

- compatible: "ti,lp3943"
- reg: I2C slave address. From 0x60 to 0x67.

LP3943 consists of two sub-devices, lp3943-gpio and lp3943-pwm.

## For the LP3943 GPIO properties please refer to:

[Documentation/devicetree/bindings/gpio/trivial-gpio.yaml](</kernel/hardware/devicetree-bindings/dt-gpio/trivial-gpio.md>)

## For the LP3943 PWM properties please refer to:

[Documentation/devicetree/bindings/pwm/pwm-lp3943.txt](</kernel/hardware/devicetree/bindings-pwm/pwm-lp3943.md>)

## Example:

```dts
lp3943@60 {
	compatible = "ti,lp3943";
	reg = <0x60>;

	gpioex: gpio {
		compatible = "ti,lp3943-gpio";
		gpio-controller;
		#gpio-cells = <2>;
	};

	pwm3943: pwm {
		compatible = "ti,lp3943-pwm";
		#pwm-cells = <2>;
		ti,pwm0 = <8 9 10>;
		ti,pwm1 = <15>;
	};
};
```

---

# MAX77620 Power management IC from Maxim Semiconductor.

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for MAX77620 Power management IC from Maxim Semiconductor..

## Required properties:

- compatible: Must be one of
  "maxim,max77620"
  "maxim,max20024"
  "maxim,max77663"
- reg: I2C device address.

## Optional properties:

- interrupts:		The interrupt on the parent the controller is
  connected to.
- interrupt-controller: Marks the device node as an interrupt controller.
- #interrupt-cells:	is &lt;2&gt; and their usage is compliant to the 2 cells
  variant of &lt;[../interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>)&gt;
  IRQ numbers for different interrupt source of MAX77620
  are defined at dt-bindings/mfd/max77620.h.

- system-power-controller: Indicates that this PMIC is controlling the
  system power, see \[1\] for more details.

\[1\] [Documentation/devicetree/bindings/power/power-controller.txt](</kernel/hardware/devicetree/bindings-power/power-controller.md>)

## Optional subnodes and their properties:

## Flexible power sequence configurations:

The Flexible Power Sequencer (FPS) allows each regulator to power up under
hardware or software control. Additionally, each regulator can power on
independently or among a group of other regulators with an adjustable power-up
and power-down delays (sequencing). GPIO1, GPIO2, and GPIO3 can be programmed
to be part of a sequence allowing external regulators to be sequenced along
with internal regulators. 32KHz clock can be programmed to be part of a
sequence.

The flexible sequencing structure consists of two hardware enable inputs
(EN0, EN1), and 3 master sequencing timers called FPS0, FPS1 and FPS2.
Each master sequencing timer is programmable through its configuration
register to have a hardware enable source (EN1 or EN2) or a software enable
source (SW). When enabled/disabled, the master sequencing timer generates
eight sequencing events on different time periods called slots. The time
period between each event is programmable within the configuration register.
Each regulator, GPIO1, GPIO2, GPIO3, and 32KHz clock has a flexible power
sequence slave register which allows its enable source to be specified as
a flexible power sequencer timer or a software bit. When a FPS source of
regulators, GPIOs and clocks specifies the enable source to be a flexible
power sequencer, the power up and power down delays can be specified in
the regulators, GPIOs and clocks flexible power sequencer configuration
registers.

When FPS event cleared (set to LOW), regulators, GPIOs and 32KHz
clock are set into following state at the sequencing event that
corresponds to its flexible sequencer configuration register.

```text
	Sleep state: 			In this state, regulators, GPIOs
					and 32KHz clock get disabled at
					the sequencing event.
	Global Low Power Mode (GLPM):	In this state, regulators are set in
					low power mode at the sequencing event.
```

The configuration parameters of FPS is provided through sub-node "fps"
and their child for FPS specific. The child node name for FPS are "fps0",
"fps1", and "fps2" for FPS0, FPS1 and FPS2 respectively.

The FPS configurations like FPS source, power up and power down slots for
regulators, GPIOs and 32kHz clocks are provided in their respective
configuration nodes which is explained in respective sub-system DT
binding document.

There is need for different FPS configuration parameters based on system
state like when system state changed from active to suspend or active to
power off (shutdown).

## Optional properties:

-maxim,fps-event-source:		u32, FPS event source like external

```text
					hardware input to PMIC i.e. EN0, EN1 or
					software (SW).
					The macros are defined on
						dt-bindings/mfd/max77620.h
					for different control source.
					- MAX77620_FPS_EVENT_SRC_EN0
						for hardware input pin EN0.
					- MAX77620_FPS_EVENT_SRC_EN1
						for hardware input pin EN1.
					- MAX77620_FPS_EVENT_SRC_SW
						for software control.
```

-maxim,shutdown-fps-time-period-us:	u32, FPS time period in microseconds

```text
					when system enters in to shutdown
					state.
```

-maxim,suspend-fps-time-period-us:	u32, FPS time period in microseconds

```text
					when system enters in to suspend state.
```

-maxim,device-state-on-disabled-event:	u32, describe the PMIC state when FPS

```text
					event cleared (set to LOW) whether it
					should go to sleep state or low-power
					state. Following are valid values:
					- MAX77620_FPS_INACTIVE_STATE_SLEEP
						to set the PMIC state to sleep.
					- MAX77620_FPS_INACTIVE_STATE_LOW_POWER
						to set the PMIC state to low
						power.
					Absence of this property or other value
					will not change device state when FPS
					event get cleared.
```

Here supported time periods by device in microseconds are as follows:
MAX77620 supports 40, 80, 160, 320, 640, 1280, 2560 and 5120 microseconds.
MAX20024 supports 20, 40, 80, 160, 320, 640, 1280 and 2540 microseconds.
MAX77663 supports 20, 40, 80, 160, 320, 640, 1280 and 2540 microseconds.

-maxim,power-ok-control: configure map power ok bit

```text
			1: Enables POK(Power OK) to control nRST_IO and GPIO1
			POK function.
			0: Disables POK control.
			if property missing, do not configure MPOK bit.
			If POK mapping is enabled for GPIO1/nRST_IO then,
			GPIO1/nRST_IO pins are HIGH only if all rails
			that have POK control enabled are HIGH.
			If any of the rails goes down(which are enabled for POK
			control) then, GPIO1/nRST_IO goes LOW.
			this property is valid for max20024 only.
```

For DT binding details of different sub modules like GPIO, pincontrol,
regulator, power, please refer respective device-tree binding document
under their respective sub-system directories.

## Example:

```dts
#include <dt-bindings/mfd/max77620.h>
```

```dts
max77620@3c {
	compatible = "maxim,max77620";
	reg = <0x3c>;

	interrupt-parent = <&intc>;
	interrupts = <0 86 IRQ_TYPE_NONE>;

	interrupt-controller;
	#interrupt-cells = <2>;

	fps {
		fps0 {
			maxim,shutdown-fps-time-period-us = <1280>;
			maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN1>;
		};

		fps1 {
			maxim,shutdown-fps-time-period-us = <1280>;
			maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN0>;
		};

		fps2 {
			maxim,shutdown-fps-time-period-us = <1280>;
			maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_SW>;
		};
	};
};
```

---

# Multi-Function Devices (MFD)

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for Multi-Function Devices (MFD).

These devices comprise a nexus for heterogeneous hardware blocks containing
more than one non-unique yet varying hardware functionality.

## A typical MFD can be:

- A mixed signal ASIC on an external bus, sometimes a PMIC (Power Management
  Integrated Circuit) that is manufactured in a lower technology node (rough
  silicon) that handles analog drivers for things like audio amplifiers, LED
  drivers, level shifters, PHY (physical interfaces to things like USB or
  ethernet), regulators etc.

- A range of memory registers containing "miscellaneous system registers" also
  known as a system controller "syscon" or any other memory range containing a
  mix of unrelated hardware devices.

## Optional properties:

- compatible : "simple-mfd" - this signifies that the operating system
  should consider all subnodes of the MFD device as separate and independent
  devices, so not needing any resources to be provided by the parent device.
  Similarly to how "simple-bus" indicates when to see subnodes as children for
  a simple memory-mapped bus.
  For more complex devices, when the nexus driver has to probe registers to
  figure out what child devices exist etc, this should not be used. In the
  latter case the child devices will be determined by the operating system.

- ranges: Describes the address mapping relationship to the parent. Should set
  the child's base address to 0, the physical address within parent's address
  space, and the length of the address map.

- #address-cells: Specifies the number of cells used to represent physical base
  addresses. Must be present if ranges is used.

- #size-cells: Specifies the number of cells used to represent the size of an
  address. Must be present if ranges is used.

## Example:

```dts
foo@1000 {
	compatible = "syscon", "simple-mfd";
	reg = <0x01000 0x1000>;

	led@8.0 {
		compatible = "register-bit-led";
		offset = <0x08>;
		mask = <0x01>;
		label = "myled";
		default-state = "on";
	};
};
```

---

# Motorola CPCAP PMIC device tree binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for Motorola CPCAP PMIC device tree binding.

## Required properties:

- compatible		: One or both of "motorola,cpcap" or "ste,6556002"
- reg			: SPI chip select
- interrupts		: The interrupt line the device is connected to
- interrupt-controller	: Marks the device node as an interrupt controller
- #interrupt-cells	: The number of cells to describe an IRQ, should be 2
- #address-cells	: Child device offset number of cells, should be 1
- #size-cells		: Child device size number of cells, should be 0
- spi-max-frequency	: Typically set to 3000000
- spi-cs-high		: SPI chip select direction

## Optional subnodes:

The sub-functions of CPCAP get their own node with their own compatible values,
which are described in the following files:

- [Documentation/devicetree/bindings/power/supply/cpcap-battery.yaml](</kernel/hardware/devicetree-bindings/dt-power/supply/cpcap-battery.md>)
- [Documentation/devicetree/bindings/power/supply/cpcap-charger.yaml](</kernel/hardware/devicetree-bindings/dt-power/supply/cpcap-charger.md>)
- [Documentation/devicetree/bindings/regulator/cpcap-regulator.txt](</kernel/hardware/devicetree/bindings-regulator/cpcap-regulator.md>)
- [Documentation/devicetree/bindings/phy/motorola,cpcap-usb-phy.yaml](</kernel/hardware/devicetree-bindings/dt-phy/motorola-cpcap-usb-phy.md>)
- [Documentation/devicetree/bindings/input/cpcap-pwrbutton.txt](</kernel/hardware/devicetree/bindings-input/cpcap-pwrbutton.md>)
- Documentation/devicetree/bindings/rtc/cpcap-rtc.txt
- [Documentation/devicetree/bindings/leds/leds-cpcap.txt](</kernel/hardware/devicetree/bindings-leds/leds-cpcap.md>)
- [Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml](</kernel/hardware/devicetree-bindings/dt-iio/adc/motorola-cpcap-adc.md>)

The only exception is the audio codec. Instead of a compatible value its
node must be named "audio-codec".

## Required properties for the audio-codec subnode:

- #sound-dai-cells = &lt;1&gt;;
- interrupts		: should contain jack detection interrupts, with headset
  detect interrupt matching "hs" and microphone bias 2
  detect interrupt matching "mb2" in interrupt-names.
- interrupt-names	: Contains "hs", "mb2"

The audio-codec provides two DAIs. The first one is connected to the
Stereo HiFi DAC and the second one is connected to the Voice DAC.

## Example:

```dts
&mcspi1 {
	cpcap: pmic@0 {
		compatible = "motorola,cpcap", "ste,6556002";
		reg = <0>;	/* cs0 */
		interrupt-parent = <&gpio1>;
		interrupts = <7 IRQ_TYPE_EDGE_RISING>;
		interrupt-controller;
		#interrupt-cells = <2>;
		#address-cells = <1>;
		#size-cells = <0>;
		spi-max-frequency = <3000000>;
		spi-cs-high;

		audio-codec {
			#sound-dai-cells = <1>;
			interrupts-extended = <&cpcap 9 0>, <&cpcap 10 0>;
			interrupt-names = "hs", "mb2";

			/* HiFi */
			port@0 {
				endpoint {
					remote-endpoint = <&cpu_dai1>;
				};
			};

			/* Voice */
			port@1 {
				endpoint {
					remote-endpoint = <&cpu_dai2>;
				};
			};
		};
	};
};
```

---

# OMAP HS USB Host

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for OMAP HS USB Host.

## Required properties:

- compatible: should be "ti,usbhs-host"
- reg: should contain one register range i.e. start and length
- ti,hwmods: must contain "usb\_host\_hs"

## Optional properties:

- num-ports: number of USB ports. Usually this is automatically detected
  from the IP's revision register but can be overridden by specifying
  this property. A maximum of 3 ports are supported at the moment.

- portN-mode: String specifying the port mode for port N, where N can be
  from 1 to 3. If the port mode is not specified, that port is treated
  as unused. When specified, it must be one of the following.
  "ehci-phy",
  "ehci-tll",
  "ehci-hsic",
  "ohci-phy-6pin-datse0",
  "ohci-phy-6pin-dpdm",
  "ohci-phy-3pin-datse0",
  "ohci-phy-4pin-dpdm",
  "ohci-tll-6pin-datse0",
  "ohci-tll-6pin-dpdm",
  "ohci-tll-3pin-datse0",
  "ohci-tll-4pin-dpdm",
  "ohci-tll-2pin-datse0",
  "ohci-tll-2pin-dpdm",

- single-ulpi-bypass: Must be present if the controller contains a single
  ULPI bypass control bit. e.g. OMAP3 silicon &lt;= ES2.1

- clocks: a list of phandles and clock-specifier pairs, one for each entry in
  clock-names.

```text
- clock-names: should include:
  For OMAP3
  * "usbhost_120m_fck" - 120MHz Functional clock.
```

```text
  For OMAP4+
```

- "refclk\_60m\_int" - 60MHz internal reference clock for UTMI clock mux
- "refclk\_60m\_ext\_p1" - 60MHz external ref. clock for Port 1's UTMI clock mux.
- "refclk\_60m\_ext\_p2" - 60MHz external ref. clock for Port 2's UTMI clock mux
- "utmi\_p1\_gfclk" - Port 1 UTMI clock mux.
- "utmi\_p2\_gfclk" - Port 2 UTMI clock mux.
- "usb\_host\_hs\_utmi\_p1\_clk" - Port 1 UTMI clock gate.
- "usb\_host\_hs\_utmi\_p2\_clk" - Port 2 UTMI clock gate.
- "usb\_host\_hs\_utmi\_p3\_clk" - Port 3 UTMI clock gate.
- "usb\_host\_hs\_hsic480m\_p1\_clk" - Port 1 480MHz HSIC clock gate.
- "usb\_host\_hs\_hsic480m\_p2\_clk" - Port 2 480MHz HSIC clock gate.
- "usb\_host\_hs\_hsic480m\_p3\_clk" - Port 3 480MHz HSIC clock gate.
- "usb\_host\_hs\_hsic60m\_p1\_clk" - Port 1 60MHz HSIC clock gate.
- "usb\_host\_hs\_hsic60m\_p2\_clk" - Port 2 60MHz HSIC clock gate.
- "usb\_host\_hs\_hsic60m\_p3\_clk" - Port 3 60MHz HSIC clock gate.

## Required properties if child node exists:

- #address-cells: Must be 1
- #size-cells: Must be 1
- ranges: must be present

## Properties for children:

The OMAP HS USB Host subsystem contains EHCI and OHCI controllers.
See [Documentation/devicetree/bindings/usb/generic-ehci.yaml](</kernel/hardware/devicetree-bindings/dt-usb/generic-ehci.md>) and
[Documentation/devicetree/bindings/usb/generic-ohci.yaml](</kernel/hardware/devicetree-bindings/dt-usb/generic-ohci.md>).

## Example for OMAP4:

```dts
usbhshost: usbhshost@4a064000 {
	compatible = "ti,usbhs-host";
	reg = <0x4a064000 0x800>;
	ti,hwmods = "usb_host_hs";
	#address-cells = <1>;
	#size-cells = <1>;
	ranges;

	usbhsohci: ohci@4a064800 {
		compatible = "ti,ohci-omap3";
		reg = <0x4a064800 0x400>;
		interrupt-parent = <&gic>;
		interrupts = <0 76 0x4>;
	};

	usbhsehci: ehci@4a064c00 {
		compatible = "ti,ehci-omap";
		reg = <0x4a064c00 0x400>;
		interrupt-parent = <&gic>;
		interrupts = <0 77 0x4>;
	};
};
```

```dts
&usbhshost {
	port1-mode = "ehci-phy";
	port2-mode = "ehci-tll";
	port3-mode = "ehci-phy";
};
```

```dts
&usbhsehci {
	phys = <&hsusb1_phy 0 &hsusb3_phy>;
};
```

---

# OMAP HS USB Host TLL (Transceiver-Less Interface)

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for OMAP HS USB Host TLL (Transceiver-Less Interface).

## Required properties:

- compatible : should be "ti,usbhs-tll"
- reg : should contain one register range i.e. start and length
- interrupts : should contain the TLL module's interrupt
- ti,hwmod : must contain "usb\_tll\_hs"

## Optional properties:

- clocks: a list of phandles and clock-specifier pairs, one for each entry in
  clock-names.

```text
- clock-names: should include:
  * "usb_tll_hs_usb_ch0_clk" - USB TLL channel 0 clock
  * "usb_tll_hs_usb_ch1_clk" - USB TLL channel 1 clock
  * "usb_tll_hs_usb_ch2_clk" - USB TLL channel 2 clock
```

## Example:

```dts
	usbhstll: usbhstll@4a062000 {
		compatible = "ti,usbhs-tll";
		reg = <0x4a062000 0x1000>;
		interrupts = <78>;
		ti,hwmods = "usb_tll_hs";
	  };
```

---

# palmas device tree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for palmas device tree bindings.

The TI palmas family current members :-
twl6035 (palmas)
twl6037 (palmas)
tps65913 (palmas)
tps65914 (palmas)
tps659038
tps65917

## Required properties:

- compatible : Should be from the list
  ti,twl6035
  ti,twl6036
  ti,twl6037
  ti,tps65913
  ti,tps65914
  ti,tps80036
  ti,tps659038
  ti,tps65917
  and also the generic series names
  ti,palmas
- interrupt-controller : palmas has its own internal IRQs
- #interrupt-cells : should be set to 2 for IRQ number and flags
  The first cell is the IRQ number.
  The second cell is the flags, encoded as the trigger masks from
  [Documentation/devicetree/bindings/interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>)

## Optional properties:

```text
  ti,mux-padX : set the pad register X (1-2) to the correct muxing for the
```

```text
		hardware, if not set will use muxing in OTP.
```

## Example:

```dts
palmas {
	compatible = "ti,twl6035", "ti,palmas";
	reg = <0x48>
	interrupt-parent = <&intc>;
	interrupt-controller;
	#interrupt-cells = <2>;

	ti,mux-pad1 = <0>;
	ti,mux-pad2 = <0>;

	#address-cells = <1>;
	#size-cells = <0>;

	pmic {
		compatible = "ti,twl6035-pmic", "ti,palmas-pmic";
		....
	};
}
```

---

# KEYMILE qrio Board Control CPLD

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for KEYMILE qrio Board Control CPLD.

The qrio is a multifunction device that controls the KEYMILE boards based on
the kmp204x design.
It is consists of a reset controller, watchdog timer, LEDs, and 2 IRQ capable
GPIO blocks.

## Required properties:

- compatible: "keymile,qriox"
- reg: access on the parent local bus (chip select, offset in chip select, size)

## Example:

```dts
	board-control@1,0 {
		compatible = "keymile,qriox";
		reg = <1 0 0x80>;
	};
```

---

# Device tree bindings for Nokia Retu and Tahvo multi-function device

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for Device tree bindings for Nokia Retu and Tahvo multi-function device.

Retu and Tahvo are a multi-function devices found on Nokia Internet
Tablets (770, N800 and N810). The Retu chip provides watchdog timer
and power button control functionalities while Tahvo chip provides
USB transceiver functionality.

## Required properties:

- compatible:		"nokia,retu" or "nokia,tahvo"
- reg:			Specifies the CBUS slave address of the ASIC chip
- interrupts: 		The interrupt line the device is connected to

## Example:

```dts
cbus0 {
	compatible = "i2c-cbus-gpio";
	...
	retu: retu@1 {
		compatible = "nokia,retu";
		interrupt-parent = <&gpio4>;
		interrupts = <12 IRQ_TYPE_EDGE_RISING>;
		reg = <0x1>;
	};
};
```

---

# SKY81452 bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for SKY81452 bindings.

## Required properties:

- compatible	: Must be "skyworks,sky81452"
- reg		: I2C slave address

## Required child nodes:

- backlight	: container node for backlight following the binding
  in leds/backlight/sky81452-backlight.txt
- regulator	: container node for regulators following the binding
  in regulator/sky81452-regulator.txt

## Example:

```dts
	sky81452@2c {
		compatible = "skyworks,sky81452";
		reg = <0x2c>;

		backlight {
			compatible = "skyworks,sky81452-backlight";
			name = "pwm-backlight";
			led-sources = <0 1 2 3 6>;
			skyworks,ignore-pwm;
			skyworks,phase-shift;
			skyworks,current-limit = <2300>;
		};

		regulator {
			lout {
				regulator-name = "sky81452-lout";
				regulator-min-microvolt = <4500000>;
				regulator-max-microvolt = <8000000>;
			};
		};
	};
```

---

# Toshiba TC3589x multi-purpose expander

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for Toshiba TC3589x multi-purpose expander.

The Toshiba TC3589x series are I2C-based MFD devices which may expose the
following built-in devices: gpio, keypad, rotator (vibrator), PWM (for
e.g. LEDs or vibrators) The included models are:

- TC35890
- TC35892
- TC35893
- TC35894
- TC35895
- TC35896

## Required properties:

- compatible : must be "toshiba,tc35890", "toshiba,tc35892", "toshiba,tc35893",
  "toshiba,tc35894", "toshiba,tc35895" or "toshiba,tc35896"
- reg : I2C address of the device
- interrupts : the interrupt on the parent the controller is connected to
- interrupt-controller : marks the device node as an interrupt controller
- #interrupt-cells : should be &lt;1&gt;, the first cell is the IRQ offset on this
  TC3589x interrupt controller.

## Optional nodes:

```text
- GPIO
  This GPIO module inside the TC3589x has 24 (TC35890, TC35892) or 20
  (other models) GPIO lines.
 - compatible : must be "toshiba,tc3589x-gpio"
 - interrupts : interrupt on the parent, which must be the tc3589x MFD device
 - interrupt-controller : marks the device node as an interrupt controller
 - #interrupt-cells : should be <2>, the first cell is the IRQ offset on this
   TC3589x GPIO interrupt controller, the second cell is the interrupt flags
   in accordance with <dt-bindings/interrupt-controller/irq.h>. The following
   flags are valid:
   - IRQ_TYPE_LEVEL_LOW
   - IRQ_TYPE_LEVEL_HIGH
   - IRQ_TYPE_EDGE_RISING
   - IRQ_TYPE_EDGE_FALLING
   - IRQ_TYPE_EDGE_BOTH
 - gpio-controller : marks the device node as a GPIO controller
 - #gpio-cells : should be <2>, the first cell is the GPIO offset on this
   GPIO controller, the second cell is the flags.
```

```text
- Keypad
  This keypad is the same on all variants, supporting up to 96 different
  keys. The linux-specific properties are modeled on those already existing
  in other input drivers.
 - compatible : must be "toshiba,tc3589x-keypad"
 - debounce-delay-ms : debounce interval in milliseconds
 - keypad,num-rows : number of rows in the matrix, see
   bindings/input/matrix-keymap.txt
 - keypad,num-columns : number of columns in the matrix, see
   bindings/input/matrix-keymap.txt
 - linux,keymap: the definition can be found in
   bindings/input/matrix-keymap.txt
 - linux,no-autorepeat: do no enable autorepeat feature.
 - wakeup-source: use any event on keypad as wakeup event.
		  (Legacy property supported: "linux,wakeup")
```

## Example:

```dts
tc35893@44 {
	compatible = "toshiba,tc35893";
	reg = <0x44>;
	interrupt-parent = <&gpio6>;
	interrupts = <26 IRQ_TYPE_EDGE_RISING>;

	interrupt-controller;
	#interrupt-cells = <1>;

	tc3589x_gpio {
		compatible = "toshiba,tc3589x-gpio";
		interrupts = <0>;

		interrupt-controller;
		#interrupt-cells = <2>;
		gpio-controller;
		#gpio-cells = <2>;
	};
	tc3589x_keypad {
		compatible = "toshiba,tc3589x-keypad";
		interrupts = <6>;
		debounce-delay-ms = <4>;
		keypad,num-columns = <8>;
		keypad,num-rows = <8>;
		linux,no-autorepeat;
		linux,keymap = <0x0301006b
				0x04010066
				0x06040072
				0x040200d7
				0x0303006a
				0x0205000e
				0x0607008b
				0x0500001c
				0x0403000b
				0x03040034
				0x05020067
				0x0305006c
				0x040500e7
				0x0005009e
				0x06020073
				0x01030039
				0x07060069
				0x050500d9>;
		wakeup-source;
	};
};
```

---

# Device tree bindings for Texas Instruments keystone device state control

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for Device tree bindings for Texas Instruments keystone device state control.

The Keystone II devices have a set of registers that are used to control
the status of its peripherals. This node is intended to allow access to
this functionality.

## Required properties:

- compatible:		"ti,keystone-devctrl", "syscon"

- reg:			contains offset/length value for device state control
  registers space.

## Example:

```dts
devctrl: device-state-control@02620000 {
	compatible = "ti,keystone-devctrl", "syscon";
	reg = <0x02620000 0x1000>;
};
```

---

# TI LMU (Lighting Management Unit) device tree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for TI LMU (Lighting Management Unit) device tree bindings.

TI LMU driver supports lighting devices below.

```text
   Name                  Child nodes
  ------      ---------------------------------
  LM3631       Backlight and regulator
  LM3632       Backlight and regulator
  LM3633       Backlight, LED and fault monitor
  LM3695       Backlight
  LM36274      Backlight and regulator
```

## Required properties:

- compatible: Should be one of:
  "ti,lm3631"
  "ti,lm3632"
  "ti,lm3633"
  "ti,lm3695"
  "ti,lm36274"
- reg: I2C slave address.
  0x11 for LM3632
  0x29 for LM3631
  0x36 for LM3633
  0x63 for LM3695
  0x11 for LM36274

## Optional properties:

- enable-gpios: A GPIO specifier for hardware enable pin.
- ramp-up-us: Current ramping from one brightness level to
  the a higher brightness level.
  Range from 2048 us - 117.44 s
- ramp-down-us: Current ramping from one brightness level to
  the a lower brightness level.
  Range from 2048 us - 117.44 s
- ti,brightness-resolution - This determines whether to use 8 bit brightness
  mode or 11 bit brightness mode.  If this value is
  not set the device is defaulted to the preferred
  8bit brightness mode per 7.3.4.1 of the data
  sheet.  This setting can either be in the parent
  node or as part of the LED child nodes.  This
  is determined by the part itself if the strings
  have a common brightness register or individual
  brightness registers.
  The values are 255 (8bit) or 2047 (11bit).

## Required node:

- backlight: All LMU devices have backlight child nodes.
  For the properties, please refer to \[1\].

## Optional nodes:

```text
  - fault-monitor: Hardware fault monitoring driver for LM3633 and LM3697.
    Required properties:
      - compatible: Should be one of:
                    "ti,lm3633-fault-monitor"
  - leds: LED properties for LM3633. Please refer to [2].
	  LED properties for LM36274. Please refer to [4].
  - regulators: Regulator properties for LM3631 and LM3632.
                Please refer to [3].
```

\[1\] ../leds/backlight/ti-lmu-backlight.txt
\[2\] ../leds/leds-lm3633.txt
\[3\] [../regulator/lm363x-regulator.txt](</kernel/hardware/devicetree/bindings-regulator/lm363x-regulator.md>)
\[4\] [../leds/leds-lm36274.txt](</kernel/hardware/devicetree/bindings-leds/leds-lm36274.md>)

```dts
lm3631@29 {
	compatible = "ti,lm3631";
	reg = <0x29>;

	regulators {
		compatible = "ti,lm363x-regulator";

		vboost {
			regulator-name = "lcd_boost";
			regulator-min-microvolt = <4500000>;
			regulator-max-microvolt = <6350000>;
			regulator-always-on;
		};

		vcont {
			regulator-name = "lcd_vcont";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <3300000>;
		};

		voref {
			regulator-name = "lcd_voref";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <6000000>;
		};

		vpos {
			regulator-name = "lcd_vpos";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <6000000>;
			regulator-boot-on;
		};

		vneg {
			regulator-name = "lcd_vneg";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <6000000>;
			regulator-boot-on;
		};
	};

	backlight {
		compatible = "ti,lm3631-backlight";

		lcd_bl {
			led-sources = <0 1>;
			ramp-up-us = <300000>;
		};
	};
};
```

```dts
lm3632@11 {
	compatible = "ti,lm3632";
	reg = <0x11>;

	enable-gpios = <&pioC 2 GPIO_ACTIVE_HIGH>; /* PC2 */

	regulators {
		compatible = "ti,lm363x-regulator";

		enable-gpios = <&pioC 0 GPIO_ACTIVE_HIGH>,
			       <&pioC 1 GPIO_ACTIVE_HIGH>;

		vboost {
			regulator-name = "lcd_boost";
			regulator-min-microvolt = <4500000>;
			regulator-max-microvolt = <6400000>;
			regulator-always-on;
		};

		vpos {
			regulator-name = "lcd_vpos";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <6000000>;
		};

		vneg {
			regulator-name = "lcd_vneg";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <6000000>;
		};
	};

	backlight {
		compatible = "ti,lm3632-backlight";

		pwms = <&pwm0 0 10000 0>; /* pwm number, period, polarity */
		pwm-names = "lmu-backlight";

		lcd {
			led-sources = <0 1>;
			pwm-period = <10000>;
		};
	};
};
```

```dts
lm3633@36 {
	compatible = "ti,lm3633";
	reg = <0x36>;

	enable-gpios = <&pioC 2 GPIO_ACTIVE_HIGH>;

	backlight {
		compatible = "ti,lm3633-backlight";

		main {
			label = "main_lcd";
			led-sources = <1 2>;
			ramp-up-us = <500000>;
			ramp-down-us = <500000>;
		};

		front {
			label = "front_lcd";
			led-sources = <0>;
			ramp-up-us = <1000000>;
			ramp-down-us = <0>;
		};
	};

	leds {
		compatible = "ti,lm3633-leds";

		chan1 {
			label = "status";
			led-sources = <1>;
			led-max-microamp = <6000>;
		};

		chan345 {
			label = "rgb";
			led-sources = <3 4 5>;
			led-max-microamp = <10000>;
		};
	};

	fault-monitor {
		compatible = "ti,lm3633-fault-monitor";
	};
};
```

```dts
lm3695@63 {
	compatible = "ti,lm3695";
	reg = <0x63>;

	enable-gpios = <&pioC 2 GPIO_ACTIVE_HIGH>;

	backlight {
		compatible = "ti,lm3695-backlight";

		lcd {
			label = "bl";
			led-sources = <0 1>;
		};
	};
};
```

```dts
lm36274@11 {
	compatible = "ti,lm36274";
	#address-cells = <1>;
	#size-cells = <0>;
	reg = <0x11>;

	enable-gpios = <&pioC 2 GPIO_ACTIVE_HIGH>;
	regulators {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "ti,lm363x-regulator";

		enable-gpios = <&pioC 0 GPIO_ACTIVE_HIGH>,
			       <&pioC 1 GPIO_ACTIVE_HIGH>;

		vboost {
			regulator-name = "lcd_boost";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <7150000>;
			regulator-always-on;
		};

		vpos {
			regulator-name = "lcd_vpos";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <6500000>;
		};

		vneg {
			regulator-name = "lcd_vneg";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <6500000>;
		};
	};

	backlight {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "ti,lm36274-backlight";

		led@0 {
			reg = <0>;
			led-sources = <0 2>;
			label = "white:backlight_cluster";
			linux,default-trigger = "backlight";
		};
	};
};
```

---

# Device tree bindings for TI TPS61050/61052 Boost Converters

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for Device tree bindings for TI TPS61050/61052 Boost Converters.

The TP61050/TPS61052 is a high-power "white LED driver". The
device provides LED, GPIO and regulator functionalities.

## Required properties:

- compatible:		"ti,tps61050" or "ti,tps61052"
- reg:			Specifies the I2C slave address

## Optional sub-node:

This subnode selects the chip's operational mode.
There can be at most one single available subnode.

- regulator: presence of this sub-node puts the chip in regulator mode.
  see [../regulator/regulator.yaml](</kernel/hardware/devicetree-bindings/dt-regulator/regulator.md>)

```text
- led: presence of this sub-node puts the chip in led mode.
	Optional properties:
	- function : see ../leds/common.txt
	- color    : see ../leds/common.txt
	- label    : see ../leds/common.txt
			(deprecated)
```

## Example (GPIO operation only):

```dts
i2c0 {
	tps61052@33 {
		compatible = "ti,tps61052";
		reg = <0x33>;
	};
};
```

## Example (GPIO + regulator operation):

```dts
i2c0 {
	tps61052@33 {
		compatible = "ti,tps61052";
		reg = <0x33>;

		regulator {
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			regulator-always-on;
		};
	};
};
```

## Example (GPIO + led operation):

```dts
#include <dt-bindings/leds/common.h>
```

```dts
i2c0 {
	tps61052@33 {
		compatible = "ti,tps61052";
		reg = <0x33>;

		led {
			color = <LED_COLOR_ID_WHITE>;
		};
	};
};
```

---

# TPS6507x Power Management Integrated Circuit

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for TPS6507x Power Management Integrated Circuit.

## Required properties:

- compatible: "ti,tps6507x"
- reg: I2C slave address
- regulators: This is the list of child nodes that specify the regulator
  initialization data for defined regulators. Not all regulators for the
  given device need to be present. The definition for each of these nodes
  is defined using the standard binding for regulators found at
  [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).
  The regulator is matched with the regulator-compatible.

## The valid regulator-compatible values are:

```text
  tps6507x: vdcdc1, vdcdc2, vdcdc3, vldo1, vldo2
```

- xxx-supply: Input voltage supply regulator.
  These entries are required if regulators are enabled for a device.
  Missing of these properties can cause the regulator registration
  fails.
  If some of input supply is powered through battery or always-on
  supply then also it is require to have these parameters with proper
  node handle of always on power supply.
  tps6507x:
  vindcdc1\_2-supply: VDCDC1 and VDCDC2 input.
  vindcdc3-supply  : VDCDC3 input.
  vldo1\_2-supply   : VLDO1 and VLDO2 input.

## Regulator Optional properties:

- defdcdc\_default: It's property of DCDC2 and DCDC3 regulators.
  0: If defdcdc pin of DCDC2/DCDC3 is pulled to GND.
  1: If defdcdc pin of DCDC2/DCDC3 is driven HIGH.
  If this property is not defined, it defaults to 0 (not enabled).

## Example:

```dts
	pmu: tps6507x@48 {
		compatible = "ti,tps6507x";
		reg = <0x48>;

		vindcdc1_2-supply = <&vbat>;
		vindcdc3-supply = <...>;
		vinldo1_2-supply = <...>;

		regulators {
			#address-cells = <1>;
			#size-cells = <0>;

			vdcdc1_reg: regulator@0 {
				regulator-compatible = "VDCDC1";
				reg = <0>;
				regulator-min-microvolt = <3150000>;
				regulator-max-microvolt = <3450000>;
				regulator-always-on;
				regulator-boot-on;
			};
			vdcdc2_reg: regulator@1 {
				regulator-compatible = "VDCDC2";
				reg = <1>;
				regulator-min-microvolt = <1710000>;
				regulator-max-microvolt = <3450000>;
				regulator-always-on;
				regulator-boot-on;
				defdcdc_default = <1>;
			};
			vdcdc3_reg: regulator@2 {
				regulator-compatible = "VDCDC3";
				reg = <2>;
				regulator-min-microvolt = <950000>
				regulator-max-microvolt = <1350000>;
				regulator-always-on;
				regulator-boot-on;
				defdcdc_default = <1>;
			};
			ldo1_reg: regulator@3 {
				regulator-compatible = "LDO1";
				reg = <3>;
				regulator-min-microvolt = <1710000>;
				regulator-max-microvolt = <1890000>;
				regulator-always-on;
				regulator-boot-on;
			};
			ldo2_reg: regulator@4 {
				regulator-compatible = "LDO2";
				reg = <4>;
				regulator-min-microvolt = <1140000>;
				regulator-max-microvolt = <1320000>;
				regulator-always-on;
				regulator-boot-on;
			};
		};

	};
```

---

# TPS65912 Power Management Integrated Circuit bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for TPS65912 Power Management Integrated Circuit bindings.

## Required properties:

- compatible		: Should be "ti,tps65912".
- reg			: Slave address or chip select number (I2C / SPI).
- interrupts		: The interrupt line the device is connected to.
- interrupt-controller	: Marks the device node as an interrupt controller.
- #interrupt-cells	: The number of cells to describe an IRQ, should be 2.
  The first cell is the IRQ number.
  The second cell is the flags, encoded as trigger
  masks from [../interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>).
- gpio-controller	: Marks the device node as a GPIO Controller.
- #gpio-cells		: Should be two.  The first cell is the pin number and
  the second cell is used to specify flags.
  See [../gpio/gpio.txt](</kernel/hardware/devicetree/bindings-gpio/gpio.md>) for more information.
- regulators:		: List of child nodes that specify the regulator
  initialization data. Child nodes must be named
  after their hardware counterparts: dcdc\[1-4\] and
  ldo\[1-10\]. Each child nodes is defined using the
  standard binding for regulators.

## Example:

```dts
	pmic: tps65912@2d {
		compatible = "ti,tps65912";
		reg = <0x2d>;
		interrupt-parent = <&gpio1>;
		interrupts = <28 IRQ_TYPE_LEVEL_LOW>;
		interrupt-controller;
		#interrupt-cells = <2>;
		gpio-controller;
		#gpio-cells = <2>;

		regulators {
			dcdc1 {
				regulator-name = "vdd_core";
				regulator-min-microvolt = <912000>;
				regulator-max-microvolt = <1144000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldo1 {
				regulator-name = "ldo1";
				regulator-min-microvolt = <1900000>;
				regulator-max-microvolt = <1900000>;
			};
		};
	};
```

---

# Texas Instruments TWL6040 family

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for Texas Instruments TWL6040 family.

The TWL6040s are 8-channel high quality low-power audio codecs providing audio,
vibra and GPO functionality on OMAP4+ platforms.
They are connected to the host processor via i2c for commands, McPDM for audio
data and commands.

## Required properties:

- compatible : "ti,twl6040" for twl6040, "ti,twl6041" for twl6041
- reg: must be 0x4b for i2c address
- interrupts: twl6040 has one interrupt line connecteded to the main SoC
- gpio-controller:
- #gpio-cells = &lt;1&gt;: twl6040 provides GPO lines.
- #clock-cells = &lt;0&gt;; twl6040 is a provider of pdmclk which is used by McPDM
- twl6040,audpwron-gpio: Power on GPIO line for the twl6040

- vio-supply: Regulator for the twl6040 VIO supply
- v2v1-supply: Regulator for the twl6040 V2V1 supply

## Optional properties, nodes:

- enable-active-high: To power on the twl6040 during boot.
- clocks: phandle to the clk32k and/or to mclk clock provider
- clock-names: Must be "clk32k" for the 32K clock and "mclk" for the MCLK.

Vibra functionality
Required properties:

- vddvibl-supply: Regulator for the left vibra motor
- vddvibr-supply: Regulator for the right vibra motor
- vibra { }: Configuration section for vibra parameters containing the following
  properties:
- ti,vibldrv-res: Resistance parameter for left driver
- ti,vibrdrv-res: Resistance parameter for right driver
- ti,viblmotor-res: Resistance parameter for left motor
- ti,viblmotor-res: Resistance parameter for right motor

Optional properties within vibra { } section:

- vddvibl\_uV: If the vddvibl default voltage need to be changed
- vddvibr\_uV: If the vddvibr default voltage need to be changed

## Example:

```dts
&i2c1 {
	twl6040: twl@4b {
		compatible = "ti,twl6040";

		interrupts = <0 119 4>;
		interrupt-parent = <&gic>;
		twl6040,audpwron-gpio = <&gpio4 31 0>;

		vio-supply = <&v1v8>;
		v2v1-supply = <&v2v1>;
		enable-active-high;

		/* regulators for vibra motor */
		vddvibl-supply = <&vbat>;
		vddvibr-supply = <&vbat>;

		vibra {
			/* Vibra driver, motor resistance parameters */
			ti,vibldrv-res = <8>;
			ti,vibrdrv-res = <3>;
			ti,viblmotor-res = <10>;
			ti,vibrmotor-res = <10>;
		};
	};
};
```

/include/ "twl6040.dtsi"

---

# Cirrus Logic/Wolfson Microelectronics wm831x PMICs

_Peios Kernel / Hardware and drivers / Device tree / bindings/mfd_

> Device-tree binding reference for Cirrus Logic/Wolfson Microelectronics wm831x PMICs.

System PMICs with a wide range of additional features.

## Required properties:

- compatible : One of the following chip-specific strings:
  "wlf,wm8310"
  "wlf,wm8311"
  "wlf,wm8312"
  "wlf,wm8320"
  "wlf,wm8321"
  "wlf,wm8325"
  "wlf,wm8326"

- reg : I2C slave address when connected using I2C, chip select number
  when using SPI.

- gpio-controller : Indicates this device is a GPIO controller.
- #gpio-cells : Must be 2. The first cell is the pin number and the
  second cell is used to specify optional parameters (currently unused).

- interrupts : The interrupt line the IRQ signal for the device is
  connected to.

- interrupt-controller : wm831x devices contain interrupt controllers and
  may provide interrupt services to other devices.
- #interrupt-cells: Must be 2. The first cell is the IRQ number, and the
  second cell is the flags, encoded as the trigger masks from
  [../interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>)

## Optional sub-nodes:

- phys : Contains a phandle to the USB PHY.
- regulators : Contains sub-nodes for each of the regulators supplied by
  the device. The regulators are bound using their names listed below:

```text
    dcdc1 : DCDC1
    dcdc2 : DCDC2
    dcdc3 : DCDC3
    dcdc4 : DCDC3
    isink1 : ISINK1
    isink2 : ISINK2
    ldo1 : LDO1
    ldo2 : LDO2
    ldo3 : LDO3
    ldo4 : LDO4
    ldo5 : LDO5
    ldo7 : LDO7
    ldo11 : LDO11
```

```text
    The bindings details of each regulator can be found in:
    ../regulator/regulator.txt
```

## Example:

```dts
wm8310: pmic@36 {
	compatible = "wlf,wm8310";
	reg = <0x36>;

	gpio-controller;
	#gpio-cells = <2>;

	interrupts = <347>;
	interrupt-parent = <&gic>;

	interrupt-controller;
	#interrupt-cells = <2>;

	regulators {
		dcdc1: dcdc1 {
			regulator-name = "DCDC1";
			regulator-min-microvolt = <600000>;
			regulator-max-microvolt = <600000>;
		};
		ldo1: ldo1 {
			regulator-name = "LDO1";
			regulator-min-microvolt = <1700000>;
			regulator-max-microvolt = <1700000>;
		};
	};
};
```

---

# Binding for Qualcomm Atheros AR7xxx/AR9XXX SoC

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips_

> Device-tree binding reference for Binding for Qualcomm Atheros AR7xxx/AR9XXX SoC.

Each device tree must specify a compatible value for the AR SoC
it uses in the compatible property of the root node. The compatible
value must be one of the following values:

- qca,ar7130
- qca,ar7141
- qca,ar7161
- qca,ar7240
- qca,ar7241
- qca,ar7242
- qca,ar9130
- qca,ar9132
- qca,ar9330
- qca,ar9331
- qca,ar9341
- qca,ar9342
- qca,ar9344
- qca,qca9556
- qca,qca9558

---

# Microsemi MIPS CPUs

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips_

> Device-tree binding reference for Microsemi MIPS CPUs.

Boards with a SoC of the Microsemi MIPS family shall have the following
properties:

## Required properties:

- compatible: "mscc,ocelot", "mscc,luton", "mscc,serval" or "mscc,jr2"

- Other peripherals:

## o CPU chip regs:

The SoC has a few registers (DEVCPU\_GCB:CHIP\_REGS) handling miscellaneous
functionalities: chip ID, general purpose register for software use, reset
controller, hardware status and configuration, efuses.

## Required properties:

- compatible: Should be "mscc,ocelot-chip-regs", "simple-mfd", "syscon"
- reg : Should contain registers location and length

## Example:

```dts
	syscon@71070000 {
		compatible = "mscc,ocelot-chip-regs", "simple-mfd", "syscon";
		reg = <0x71070000 0x1c>;
	};
```

## o HSIO regs:

The SoC has a few registers (HSIO) handling miscellaneous functionalities:
configuration and status of PLL5, RCOMP, SyncE, SerDes configurations and
status, SerDes muxing and a thermal sensor.

## Required properties:

- compatible: Should be "mscc,ocelot-hsio", "syscon", "simple-mfd"
- reg : Should contain registers location and length

## Example:

```dts
	syscon@10d0000 {
		compatible = "mscc,ocelot-hsio", "syscon", "simple-mfd";
		reg = <0x10d0000 0x10000>;
	};
```

---

# National Instruments MIPS platforms

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips_

> Device-tree binding reference for National Instruments MIPS platforms.

## required root node properties:

- compatible: must be "ni,169445"

CPU Nodes

- compatible: must be "mti,mips14KEc"

---

# Broadcom cable/DSL/settop platforms

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips/brcm_

> Device-tree binding reference for Broadcom cable/DSL/settop platforms.

## Required properties:

- compatible: "brcm,bcm3368", "brcm,bcm3384", "brcm,bcm33843"
  "brcm,bcm3384-viper", "brcm,bcm33843-viper"
  "brcm,bcm6328", "brcm,bcm6358", "brcm,bcm6362", "brcm,bcm6368",
  "brcm,bcm63168", "brcm,bcm63268",
  "brcm,bcm7125", "brcm,bcm7346", "brcm,bcm7358", "brcm,bcm7360",
  "brcm,bcm7362", "brcm,bcm7420", "brcm,bcm7425"

The experimental -viper variants are for running Linux on the 3384's
BMIPS4355 cable modem CPU instead of the BMIPS5000 application processor.

## Power management

For power management (particularly, S2/S3/S5 system suspend), the following SoC
components are needed:

= Always-On control block (AON CTRL)

This hardware provides control registers for the "always-on" (even in low-power
modes) hardware, such as the Power Management State Machine (PMSM).

## Required properties:

- compatible     : should be one of
  "brcm,bcm7425-aon-ctrl"
  "brcm,bcm7429-aon-ctrl"
  "brcm,bcm7435-aon-ctrl" and
  "brcm,brcmstb-aon-ctrl"
- reg            : the register start and length for the AON CTRL block

## Example:

```dts
syscon@410000 {
	compatible = "brcm,bcm7425-aon-ctrl", "brcm,brcmstb-aon-ctrl";
	reg = <0x410000 0x400>;
};
```

= Memory controllers

A Broadcom STB SoC typically has a number of independent memory controllers,
each of which may have several associated hardware blocks, which are versioned
independently (control registers, DDR PHYs, etc.). One might consider
describing these controllers as a parent "memory controllers" block, which
contains N sub-nodes (one for each controller in the system), each of which is
associated with a number of hardware register resources (e.g., its PHY.

== MEMC (MEMory Controller)

Represents a single memory controller instance.

## Required properties:

- compatible     : should contain "brcm,brcmstb-memc" and "simple-bus"
- ranges	 : should contain the child address in the parent address
  space, must be 0 here, and the register start and length of
  the entire memory controller (including all sub nodes: DDR PHY,
  arbiter, etc.)
- #address-cells : must be 1
- #size-cells	 : must be 1

## Example:

```dts
	memory-controller@0 {
		compatible = "brcm,brcmstb-memc", "simple-bus";
		ranges = <0x0 0x0 0xa000>;
		#address-cells = <1>;
		#size-cells = <1>;

		memc-arb@1000 {
			...
		};

		memc-ddr@2000 {
			...
		};

		ddr-phy@6000 {
			...
		};
	};
```

Should contain subnodes for any of the following relevant hardware resources:

== DDR PHY control

Control registers for this memory controller's DDR PHY.

## Required properties:

- compatible     : should contain one of these
  "brcm,brcmstb-ddr-phy-v64.5"
  "brcm,brcmstb-ddr-phy"

- reg            : the DDR PHY register range and length

## Example:

```dts
	ddr-phy@6000 {
		compatible = "brcm,brcmstb-ddr-phy-v64.5";
		reg = <0x6000 0xc8>;
	};
```

== DDR memory controller sequencer

Control registers for this memory controller's DDR memory sequencer

## Required properties:

- compatible     : should contain one of these
  "brcm,bcm7425-memc-ddr"
  "brcm,bcm7429-memc-ddr"
  "brcm,bcm7435-memc-ddr" and
  "brcm,brcmstb-memc-ddr"

- reg            : the DDR sequencer register range and length

## Example:

```dts
	memc-ddr@2000 {
		compatible = "brcm,bcm7425-memc-ddr", "brcm,brcmstb-memc-ddr";
		reg = <0x2000 0x300>;
	};
```

== MEMC Arbiter

The memory controller arbiter is responsible for memory clients allocation
(bandwidth, priorities etc.) and needs to have its contents restored during
deep sleep states (S3).

## Required properties:

- compatible	: should contain one of these
  "brcm,brcmstb-memc-arb-v10.0.0.0"
  "brcm,brcmstb-memc-arb"

- reg		: the DDR Arbiter register range and length

## Example:

```dts
	memc-arb@1000 {
		compatible = "brcm,brcmstb-memc-arb-v10.0.0.0";
		reg = <0x1000 0x248>;
	};
```

== Timers

The Broadcom STB chips contain a timer block with several general purpose
timers that can be used.

## Required properties:

- compatible	: should contain one of:
  "brcm,bcm7425-timers"
  "brcm,bcm7429-timers"
  "brcm,bcm7435-timers" and
  "brcm,brcmstb-timers"
- reg		: the timers register range
- interrupts	: the interrupt line for this timer block

## Example:

```dts
	timers: timer@4067c0 {
		compatible = "brcm,bcm7425-timers", "brcm,brcmstb-timers";
		reg = <0x4067c0 0x40>;
		interrupts = <&periph_intc 19>;
	};
```

---

# Boot Bus

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips/cavium_

> Device-tree binding reference for Boot Bus.

The Octeon Boot Bus is a configurable parallel bus with 8 chip
selects.  Each chip select is independently configurable.

## Properties:

- compatible: "cavium,octeon-3860-bootbus"

```text
  Compatibility with all cn3XXX, cn5XXX and cn6XXX SOCs.
```

- reg: The base address of the Boot Bus' register bank.

- #address-cells: Must be &lt;2&gt;.  The first cell is the chip select
  within the bootbus.  The second cell is the offset from the chip select.

- #size-cells: Must be &lt;1&gt;.

- ranges: There must be one one triplet of (child-bus-address,
  parent-bus-address, length) for each active chip select.  If the
  length element for any triplet is zero, the chip select is disabled,
  making it inactive.

The configuration parameters for each chip select are stored in child
nodes.

## Configuration Properties:

- compatible:  "cavium,octeon-3860-bootbus-config"

- cavium,cs-index: A single cell indicating the chip select that
  corresponds to this configuration.

- cavium,t-adr: A cell specifying the ADR timing (in nS).

- cavium,t-ce: A cell specifying the CE timing (in nS).

- cavium,t-oe: A cell specifying the OE timing (in nS).

- cavium,t-we: A cell specifying the WE timing (in nS).

- cavium,t-rd-hld: A cell specifying the RD\_HLD timing (in nS).

- cavium,t-wr-hld: A cell specifying the WR\_HLD timing (in nS).

- cavium,t-pause: A cell specifying the PAUSE timing (in nS).

- cavium,t-wait: A cell specifying the WAIT timing (in nS).

- cavium,t-page: A cell specifying the PAGE timing (in nS).

- cavium,t-rd-dly: A cell specifying the RD\_DLY timing (in nS).

- cavium,pages: A cell specifying the PAGES parameter (0 = 8 bytes, 1
  = 2 bytes, 2 = 4 bytes, 3 = 8 bytes).

- cavium,wait-mode: Optional.  If present, wait mode (WAITM) is selected.

- cavium,page-mode: Optional.  If present, page mode (PAGEM) is selected.

- cavium,bus-width: A cell specifying the WIDTH parameter (in bits) of
  the bus for this chip select.

- cavium,ale-mode: Optional.  If present, ALE mode is selected.

- cavium,sam-mode: Optional.  If present, SAM mode is selected.

- cavium,or-mode: Optional.  If present, OR mode is selected.

## Example:

```dts
	bootbus: bootbus@1180000000000 {
		compatible = "cavium,octeon-3860-bootbus";
		reg = <0x11800 0x00000000 0x0 0x200>;
		/* The chip select number and offset */
		#address-cells = <2>;
		/* The size of the chip select region */
		#size-cells = <1>;
		ranges = <0 0  0x0 0x1f400000  0xc00000>,
			 <1 0  0x10000 0x30000000  0>,
			 <2 0  0x10000 0x40000000  0>,
			 <3 0  0x10000 0x50000000  0>,
			 <4 0  0x0 0x1d020000  0x10000>,
			 <5 0  0x0 0x1d040000  0x10000>,
			 <6 0  0x0 0x1d050000  0x10000>,
			 <7 0  0x10000 0x90000000  0>;

			cavium,cs-config@0 {
			compatible = "cavium,octeon-3860-bootbus-config";
			cavium,cs-index = <0>;
			cavium,t-adr  = <20>;
			cavium,t-ce   = <60>;
			cavium,t-oe   = <60>;
			cavium,t-we   = <45>;
			cavium,t-rd-hld = <35>;
			cavium,t-wr-hld = <45>;
			cavium,t-pause  = <0>;
			cavium,t-wait   = <0>;
			cavium,t-page   = <35>;
			cavium,t-rd-dly = <0>;

			cavium,pages     = <0>;
			cavium,bus-width = <8>;
		};
		.
		.
		.
		cavium,cs-config@6 {
			compatible = "cavium,octeon-3860-bootbus-config";
			cavium,cs-index = <6>;
			cavium,t-adr  = <5>;
			cavium,t-ce   = <300>;
			cavium,t-oe   = <270>;
			cavium,t-we   = <150>;
			cavium,t-rd-hld = <100>;
			cavium,t-wr-hld = <70>;
			cavium,t-pause  = <0>;
			cavium,t-wait   = <0>;
			cavium,t-page   = <320>;
			cavium,t-rd-dly = <0>;

			cavium,pages     = <0>;
			cavium,wait-mode;
			cavium,bus-width = <16>;
		};
		.
		.
		.
	};
```

---

# Cavium Interrupt Bus widget

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips/cavium_

> Device-tree binding reference for Cavium Interrupt Bus widget.

## Properties:

- compatible: "cavium,octeon-7130-cib"

```text
  Compatibility with cn70XX SoCs.
```

- interrupt-controller:  This is an interrupt controller.

- reg: Two elements consisting of the addresses of the RAW and EN
  registers of the CIB block

- cavium,max-bits: The index (zero based) of the highest numbered bit
  in the CIB block.

- interrupts: The CIU line to which the CIB block is connected.

- #interrupt-cells: Must be &lt;2&gt;.  The first cell is the bit within the
  CIB.  The second cell specifies the triggering semantics of the
  line.

## Example:

```dts
	interrupt-controller@107000000e000 {
		compatible = "cavium,octeon-7130-cib";
		reg = <0x10700 0x0000e000 0x0 0x8>, /* RAW */
		      <0x10700 0x0000e100 0x0 0x8>; /* EN */
		cavium,max-bits = <23>;

		interrupt-controller;
		interrupt-parent = <&ciu>;
		interrupts = <1 24>;
		/* Interrupts are specified by two parts:
		 * 1) Bit number in the CIB* registers
		 * 2) Triggering (1 - edge rising
		 *		  2 - edge falling
		 *		  4 - level active high
		 *		  8 - level active low)
		 */
		#interrupt-cells = <2>;
	};
```

---

# Central Interrupt Unit

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips/cavium_

> Device-tree binding reference for Central Interrupt Unit.

## Properties:

- compatible: "cavium,octeon-3860-ciu"

```text
  Compatibility with all cn3XXX, cn5XXX and cn63XX SOCs.
```

- interrupt-controller:  This is an interrupt controller.

- reg: The base address of the CIU's register bank.

- #interrupt-cells: Must be &lt;2&gt;.  The first cell is the bank within
  the CIU and may have a value of 0 or 1.  The second cell is the bit
  within the bank and may have a value between 0 and 63.

## Example:

```dts
	interrupt-controller@1070000000000 {
		compatible = "cavium,octeon-3860-ciu";
		interrupt-controller;
		/* Interrupts are specified by two parts:
		 * 1) Controller register (0 or 1)
		 * 2) Bit within the register (0..63)
		 */
		#interrupt-cells = <2>;
		reg = <0x10700 0x00000000 0x0 0x7000>;
	};
```

---

# Central Interrupt Unit

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips/cavium_

> Device-tree binding reference for Central Interrupt Unit.

## Properties:

- compatible: "cavium,octeon-6880-ciu2"

```text
  Compatibility with 68XX SOCs.
```

- interrupt-controller:  This is an interrupt controller.

- reg: The base address of the CIU's register bank.

- #interrupt-cells: Must be &lt;2&gt;.  The first cell is the bank within
  the CIU and may have a value between 0 and 63.  The second cell is
  the bit within the bank and may also have a value between 0 and 63.

## Example:

```dts
	interrupt-controller@1070100000000 {
		compatible = "cavium,octeon-6880-ciu2";
		interrupt-controller;
		/* Interrupts are specified by two parts:
		 * 1) Controller register (0..63)
		 * 2) Bit within the register (0..63)
		 */
		#address-cells = <0>;
		#interrupt-cells = <2>;
		reg = <0x10701 0x00000000 0x0 0x4000000>;
	};
```

---

# Central Interrupt Unit v3

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips/cavium_

> Device-tree binding reference for Central Interrupt Unit v3.

## Properties:

- compatible: "cavium,octeon-7890-ciu3"

```text
  Compatibility with 78XX and 73XX SOCs.
```

- interrupt-controller:  This is an interrupt controller.

- reg: The base address of the CIU's register bank.

- #interrupt-cells: Must be &lt;2&gt;.  The first cell is source number.
  The second cell indicates the triggering semantics, and may have a
  value of either 4 for level semantics, or 1 for edge semantics.

## Example:

```dts
	interrupt-controller@1010000000000 {
		compatible = "cavium,octeon-7890-ciu3";
		interrupt-controller;
		/* Interrupts are specified by two parts:
		 * 1) Source number (20 significant bits)
		 * 2) Trigger type: (4 == level, 1 == edge)
		 */
		#address-cells = <0>;
		#interrupt-cells = <2>;
		reg = <0x10100 0x00000000 0x0 0xb0000000>;
	};
```

---

# DMA Engine.

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips/cavium_

> Device-tree binding reference for DMA Engine..

The Octeon DMA Engine transfers between the Boot Bus and main memory.
The DMA Engine will be referred to by phandle by any device that is
connected to it.

## Properties:

- compatible: "cavium,octeon-5750-bootbus-dma"

```text
  Compatibility with all cn52XX, cn56XX and cn6XXX SOCs.
```

- reg: The base address of the DMA Engine's register bank.

- interrupts: A single interrupt specifier.

## Example:

```dts
	dma0: dma-engine@1180000000100 {
		compatible = "cavium,octeon-5750-bootbus-dma";
		reg = <0x11800 0x00000100 0x0 0x8>;
		interrupts = <0 63>;
	};
```

---

# UCTL SATA controller glue

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips/cavium_

> Device-tree binding reference for UCTL SATA controller glue.

UCTL is the bridge unit between the I/O interconnect (an internal bus)
and the SATA AHCI host controller (UAHC). It performs the following functions:

```text
	- provides interfaces for the applications to access the UAHC AHCI
	  registers on the CN71XX I/O space.
	- provides a bridge for UAHC to fetch AHCI command table entries and data
	  buffers from Level 2 Cache.
	- posts interrupts to the CIU.
	- contains registers that:
		- control the behavior of the UAHC
		- control the clock/reset generation to UAHC
		- control endian swapping for all UAHC registers and DMA accesses
```

## Properties:

- compatible: "cavium,octeon-7130-sata-uctl"

```text
  Compatibility with the cn7130 SOC.
```

- reg: The base address of the UCTL register bank.

- #address-cells, #size-cells, ranges and dma-ranges must be present and hold
  suitable values to map all child nodes.

## Example:

```dts
	uctl@118006c000000 {
		compatible = "cavium,octeon-7130-sata-uctl";
		reg = <0x11800 0x6c000000 0x0 0x100>;
		ranges; /* Direct mapping */
		dma-ranges;
		#address-cells = <2>;
		#size-cells = <2>;

		sata: sata@16c0000000000 {
			compatible = "cavium,octeon-7130-ahci";
			reg = <0x16c00 0x00000000 0x0 0x200>;
			interrupt-parent = <&cibsata>;
			interrupts = <2 4>; /* Bit: 2, level */
		};
	};
```

---

# UCTL USB controller glue

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips/cavium_

> Device-tree binding reference for UCTL USB controller glue.

## Properties:

- compatible: "cavium,octeon-6335-uctl"

```text
  Compatibility with all cn6XXX SOCs.
```

- reg: The base address of the UCTL register bank.

- #address-cells: Must be &lt;2&gt;.

- #size-cells: Must be &lt;2&gt;.

- ranges: Empty to signify direct mapping of the children.

- refclk-frequency: A single cell containing the reference clock
  frequency in Hz.

- refclk-type: A string describing the reference clock connection
  either "crystal" or "external".

## Example:

```dts
	uctl@118006f000000 {
		compatible = "cavium,octeon-6335-uctl";
		reg = <0x11800 0x6f000000 0x0 0x100>;
		ranges; /* Direct mapping */
		#address-cells = <2>;
		#size-cells = <2>;
		/* 12MHz, 24MHz and 48MHz allowed */
		refclk-frequency = <24000000>;
		/* Either "crystal" or "external" */
		refclk-type = "crystal";

		ehci@16f0000000000 {
			compatible = "cavium,octeon-6335-ehci","usb-ehci";
			reg = <0x16f00 0x00000000 0x0 0x100>;
			interrupts = <0 56>;
			big-endian-regs;
		};
		ohci@16f0000000400 {
			compatible = "cavium,octeon-6335-ohci","usb-ohci";
			reg = <0x16f00 0x00000400 0x0 0x100>;
			interrupts = <0 56>;
			big-endian-regs;
		};
	};
```

---

# Imagination Technologies' Pistachio SoC based Marduk Board

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips/img_

> Device-tree binding reference for Imagination Technologies' Pistachio SoC based Marduk Board.

Compatible string must be "img,pistachio-marduk", "img,pistachio"

Hardware and other related documentation is available at
https://docs.creatordev.io/ci40/

It is also known as Creator Ci40. Marduk is legacy name and will
be there for decades.

---

# Imagination Pistachio SoC

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips/img_

> Device-tree binding reference for Imagination Pistachio SoC.

## Required properties:

- compatible: Must include "img,pistachio".

## CPU nodes:

A "cpus" node is required.  Required properties:

```text
 - #address-cells: Must be 1.
 - #size-cells: Must be 0.
A CPU sub-node is also required for at least CPU 0.  Since the topology may
be probed via CPS, it is not necessary to specify secondary CPUs.  Required
propertis:
 - device_type: Must be "cpu".
 - compatible: Must be "mti,interaptiv".
 - reg: CPU number.
 - clocks: Must include the CPU clock.  See ../../clock/clock-bindings.txt for
   details on clock bindings.
Example:
	cpus {
		#address-cells = <1>;
		#size-cells = <0>;
```

```dts
		cpu0: cpu@0 {
			device_type = "cpu";
			compatible = "mti,interaptiv";
			reg = <0>;
			clocks = <&clk_core CLK_MIPS>;
		};
	};
```

## Boot protocol:

In accordance with the MIPS UHI specification\[1\], the bootloader must pass the
following arguments to the kernel:

- $a0: -2.
- $a1: KSEG0 address of the flattened device-tree blob.

\[1\] http://prplfoundation.org/wiki/MIPS\_documentation

---

# Imagination University Program MIPSfpga

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips/img_

> Device-tree binding reference for Imagination University Program MIPSfpga.

Under the Imagination University Program, a microAptiv UP core has been
released for academic usage.

As we are dealing with a MIPS core instantiated on an FPGA, specifications
are fluid and can be varied in RTL.

This binding document is provided as baseline guidance for the example
project provided by IMG.

The example project runs on the Nexys4DDR board by Digilent powered by
the ARTIX-7 FPGA by Xilinx.

Relevant details about the example project and the Nexys4DDR board:

- microAptiv UP core m14Kc
- 50MHz clock speed
- 128Mbyte DDR RAM	at 0x0000\_0000
- 8Kbyte RAM		at 0x1000\_0000
- axi\_intc		at 0x1020\_0000
- axi\_uart16550		at 0x1040\_0000
- axi\_gpio		at 0x1060\_0000
- axi\_i2c		at 0x10A0\_0000
- custom\_gpio		at 0x10C0\_0000
- axi\_ethernetlite	at 0x10E0\_0000
- 8Kbyte BootRAM	at 0x1FC0\_0000

## Required properties:

- compatible: Must include "digilent,nexys4ddr","img,xilfpga".

## CPU nodes:

A "cpus" node is required.  Required properties:

- #address-cells: Must be 1.
- #size-cells: Must be 0.
  A CPU sub-node is also required for at least CPU 0. Required properties:
- device\_type: Must be "cpu".
- compatible: Must be "mips,m14Kc".
- reg: Must be &lt;0&gt;.
- clocks: phandle to ext clock for fixed-clock received by MIPS core.

## Example:

```dts
	compatible = "img,xilfpga","digilent,nexys4ddr";
	cpus {
		#address-cells = <1>;
		#size-cells = <0>;

		cpu0: cpu@0 {
			device_type = "cpu";
			compatible = "mips,m14Kc";
			reg = <0>;
			clocks	= <&ext>;
		};
	};
```

```dts
	ext: ext {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <50000000>;
	};
```

## Boot protocol:

The BootRAM is a writeable "RAM" in FPGA at 0x1FC0\_0000.
This is for easy reprogrammibility via JTAG.

The BootRAM initializes the cache and the axi\_uart peripheral.

DDR initialization is already handled by a HW IP block.

When the example project bitstream is loaded, the cpu\_reset button
needs to be pressed.

The bootram initializes the cache and axi\_uart.
Then outputs MIPSFPGA\\n\\r on the serial port on the Nexys4DDR board.

At this point, the board is ready to load the Linux kernel
vmlinux file via JTAG.

---

# Lantiq XWAY SoC FPI BUS binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips/lantiq_

> Device-tree binding reference for Lantiq XWAY SoC FPI BUS binding.

---

Required properties:

- compatible			: Should be one of
  "lantiq,xrx200-fpi"
- reg				: The address and length of the XBAR
  configuration register.
  Address and length of the FPI bus itself.
- lantiq,rcu			: A phandle to the RCU syscon
- lantiq,offset-endianness	: Offset of the endianness configuration
  register

---

Example for the FPI on the xrx200 SoCs:

```dts
	fpi@10000000 {
		compatible = "lantiq,xrx200-fpi";
		ranges = <0x0 0x10000000 0xf000000>;
		reg =	<0x1f400000 0x1000>,
			<0x10000000 0xf000000>;
		lantiq,rcu = <&rcu0>;
		lantiq,offset-endianness = <0x4c>;
		#address-cells = <1>;
		#size-cells = <1>;

		gptu@e100a00 {
			......
		};
	};
```

---

# Lantiq XWAY SoC RCU binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips/lantiq_

> Device-tree binding reference for Lantiq XWAY SoC RCU binding.

This binding describes the RCU (reset controller unit) multifunction device,
where each sub-device has its own set of registers.

The RCU register range is used for multiple purposes. Mostly one device
uses one or multiple register exclusively, but for some registers some
bits are for one driver and some other bits are for a different driver.
With this patch all accesses to the RCU registers will go through
syscon.

---

Required properties:

- compatible	: The first and second values must be:
  "lantiq,xrx200-rcu", "simple-mfd", "syscon"
- reg		: The address and length of the system control registers

---

Example of the RCU bindings on a xRX200 SoC:

```dts
	rcu0: rcu@203000 {
		compatible = "lantiq,xrx200-rcu", "simple-mfd", "syscon";
		reg = <0x203000 0x100>;
		ranges = <0x0 0x203000 0x100>;
		big-endian;

		reset0: reset-controller@10 {
			compatible = "lantiq,xrx200-reset";
			reg = <0x10 4>, <0x14 4>;

			#reset-cells = <2>;
		};

		reset1: reset-controller@48 {
			compatible = "lantiq,xrx200-reset";
			reg = <0x48 4>, <0x24 4>;

			#reset-cells = <2>;
		};

		usb_phy0: usb2-phy@18 {
			compatible = "lantiq,xrx200-usb2-phy";
			reg = <0x18 4>, <0x38 4>;

			resets = <&reset1 4 4>, <&reset0 4 4>;
			reset-names = "phy", "ctrl";
			#phy-cells = <0>;
		};

		usb_phy1: usb2-phy@34 {
			compatible = "lantiq,xrx200-usb2-phy";
			reg = <0x34 4>, <0x3C 4>;

			resets = <&reset1 5 4>, <&reset0 4 4>;
			reset-names = "phy", "ctrl";
			#phy-cells = <0>;
		};

		reboot@10 {
			compatible = "syscon-reboot";
			reg = <0x10 4>;

			regmap = <&rcu0>;
			offset = <0x10>;
			mask = <0x40000000>;
		};
	};
```

---

# Microchip PIC32MZDA Platforms

_Peios Kernel / Hardware and drivers / Device tree / bindings/mips/pic32_

> Device-tree binding reference for Microchip PIC32MZDA Platforms.

PIC32MZDA Starter Kit
Required root node properties:

- compatible = "microchip,pic32mzda-sk", "microchip,pic32mzda"

## CPU nodes:

A "cpus" node is required.  Required properties:

```text
 - #address-cells: Must be 1.
 - #size-cells: Must be 0.
A CPU sub-node is also required.  Required properties:
 - device_type: Must be "cpu".
 - compatible: Must be "mti,mips14KEc".
Example:
	cpus {
		#address-cells = <1>;
		#size-cells = <0>;
```

```dts
		cpu0: cpu@0 {
			device_type = "cpu";
			compatible = "mti,mips14KEc";
		};
	};
```

## Boot protocol

In accordance with Unified Hosting Interface Reference Manual (MD01069), the
bootloader must pass the following arguments to the kernel:

- $a0: -2.
- $a1: KSEG0 address of the flattened device-tree blob.

---

# IFM camera sensor interface on mpc5200 LocalPlus bus

_Peios Kernel / Hardware and drivers / Device tree / bindings/misc_

> Device-tree binding reference for IFM camera sensor interface on mpc5200 LocalPlus bus.

## Required properties:

- compatible: "ifm,o2d-csi"
- reg: specifies sensor chip select number and associated address range
- interrupts: external interrupt line number and interrupt sense mode
  of the interrupt line signaling frame valid events
- gpios: three gpio-specifiers for "capture", "reset" and "master enable"
  GPIOs (strictly in this order).
- ifm,csi-clk-handle: the phandle to a node in the DT describing the sensor
  clock generator. This node is usually a general purpose timer controller.
- ifm,csi-addr-bus-width: address bus width (valid values are 16, 24, 25)
- ifm,csi-data-bus-width: data bus width (valid values are 8 and 16)
- ifm,csi-wait-cycles: sensor bus wait cycles

## Optional properties:

- ifm,csi-byte-swap: if this property is present, the byte swapping on
  the bus will be enabled.

## Example:

```dts
	csi@3,0 {
		compatible = "ifm,o2d-csi";
		reg = <3 0 0x00100000>;		/* CS 3, 1 MiB range */
		interrupts = <1 1 2>;		/* IRQ1, edge falling */

		ifm,csi-clk-handle = <&timer7>;
		gpios = <&gpio_simple 23 0	/* image_capture */
			 &gpio_simple 26 0	/* image_reset */
			 &gpio_simple 29 0>;	/* image_master_en */

		ifm,csi-addr-bus-width = <24>;
		ifm,csi-data-bus-width = <8>;
		ifm,csi-wait-cycles = <0>;
	};
```

The base address of the used chip select is specified in the
ranges property of the parent localbus node, for example:

```dts
	ranges = <0 0 0xff000000 0x01000000
		  3 0 0xe3000000 0x00100000>;
```

---

# QEMU PVPANIC MMIO Configuration bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/misc_

> Device-tree binding reference for QEMU PVPANIC MMIO Configuration bindings.

QEMU's emulation / virtualization targets provide the following PVPANIC
MMIO Configuration interface on the "virt" machine.
type:

- a read-write, 16-bit wide data register.

QEMU exposes the data register to guests as memory mapped registers.

## Required properties:

```text
- compatible: "qemu,pvpanic-mmio".
- reg: the MMIO region used by the device.
  * Bytes 0x0  Write panic event to the reg when guest OS panics.
  * Bytes 0x1  Reserved.
```

## Example:

```dts
/ {
        #size-cells = <0x2>;
        #address-cells = <0x2>;

        pvpanic-mmio@9060000 {
                compatible = "qemu,pvpanic-mmio";
                reg = <0x0 0x9060000 0x0 0x2>;
        };
};
```

---

# Mellanox Bluefield SoC specific extensions to the Synopsys Designware

_Peios Kernel / Hardware and drivers / Device tree / bindings/mmc_

> Device-tree binding reference for Mellanox Bluefield SoC specific extensions to the Synopsys Designware.

```text
  Mobile Storage Host Controller
```

Read synopsys-dw-mshc.txt for more details

The Synopsys designware mobile storage host controller is used to interface
a SoC with storage medium such as eMMC or SD/MMC cards. This file documents
differences between the core Synopsys dw mshc controller properties described
by synopsys-dw-mshc.txt and the properties used by the Mellanox Bluefield SoC
specific extensions to the Synopsys Designware Mobile Storage Host Controller.

## Required Properties:

```text
* compatible: should be one of the following.
  - "mellanox,bluefield-dw-mshc": for controllers with Mellanox Bluefield SoC
    specific extensions.
```

## Example:

```text
	/* Mellanox Bluefield SoC MMC */
	mmc@6008000 {
		compatible = "mellanox,bluefield-dw-mshc";
		reg = <0x6008000 0x400>;
		interrupts = <32>;
		fifo-depth = <0x100>;
		clock-frequency = <24000000>;
		bus-width = <8>;
		cap-mmc-highspeed;
	};
```

---

# Cavium Octeon & ThunderX MMC controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/mmc_

> Device-tree binding reference for Cavium Octeon & ThunderX MMC controller.

The highspeed MMC host controller on Caviums SoCs provides an interface
for MMC and SD types of memory cards.

Supported maximum speeds are the ones of the eMMC standard 4.41 as well
as the speed of SD standard 4.0. Only 3.3 Volt is supported.

## Required properties:

- compatible : should be one of:
  cavium,octeon-6130-mmc
  cavium,octeon-7890-mmc
  cavium,thunder-8190-mmc
  cavium,thunder-8390-mmc
  mmc-slot
- reg : mmc controller base registers
- clocks : phandle

## Optional properties:

- for cd, bus-width and additional generic mmc parameters
  please refer to [mmc.txt](</kernel/hardware/devicetree/bindings-mmc/mmc.md>) within this directory
- cavium,cmd-clk-skew : number of coprocessor clocks before sampling command
- cavium,dat-clk-skew : number of coprocessor clocks before sampling data

## Deprecated properties:

- spi-max-frequency : use max-frequency instead
- cavium,bus-max-width : use bus-width instead
- power-gpios : use vmmc-supply instead
- cavium,octeon-6130-mmc-slot : use mmc-slot instead

## Examples:

```dts
	mmc_1_4: mmc@1,4 {
		compatible = "cavium,thunder-8390-mmc";
		reg = <0x0c00 0 0 0 0>;	/* DEVFN = 0x0c (1:4) */
		#address-cells = <1>;
		#size-cells = <0>;
		clocks = <&sclk>;

		mmc-slot@0 {
			compatible = "mmc-slot";
			reg = <0>;
			vmmc-supply = <&mmc_supply_3v3>;
			max-frequency = <42000000>;
			bus-width = <4>;
			cap-sd-highspeed;
		};

		mmc-slot@1 {
			compatible = "mmc-slot";
			reg = <1>;
			vmmc-supply = <&mmc_supply_3v3>;
			max-frequency = <42000000>;
			bus-width = <8>;
			cap-mmc-highspeed;
			non-removable;
		};
	};
```

---

# Hisilicon specific extensions to the Synopsys Designware Mobile

_Peios Kernel / Hardware and drivers / Device tree / bindings/mmc_

> Device-tree binding reference for Hisilicon specific extensions to the Synopsys Designware Mobile.

```text
  Storage Host Controller
```

Read synopsys-dw-mshc.txt for more details

The Synopsys designware mobile storage host controller is used to interface
a SoC with storage medium such as eMMC or SD/MMC cards. This file documents
differences between the core Synopsys dw mshc controller properties described
by synopsys-dw-mshc.txt and the properties used by the Hisilicon specific
extensions to the Synopsys Designware Mobile Storage Host Controller.

## Required Properties:

```text
* compatible: should be one of the following.
  - "hisilicon,hi3660-dw-mshc": for controllers with hi3660 specific extensions.
  - "hisilicon,hi3670-dw-mshc", "hisilicon,hi3660-dw-mshc": for controllers
     with hi3670 specific extensions.
  - "hisilicon,hi4511-dw-mshc": for controllers with hi4511 specific extensions.
  - "hisilicon,hi6220-dw-mshc": for controllers with hi6220 specific extensions.
```

## Optional Properties:

- hisilicon,peripheral-syscon: phandle of syscon used to control peripheral.

## Example:

```text
	/* for Hi3620 */
```

```text
	/* SoC portion */
	dwmmc_0: dwmmc0@fcd03000 {
		compatible = "hisilicon,hi4511-dw-mshc";
		reg = <0xfcd03000 0x1000>;
		interrupts = <0 16 4>;
		#address-cells = <1>;
		#size-cells = <0>;
		clocks = <&mmc_clock HI3620_SD_CIUCLK>, <&clock HI3620_DDRC_PER_CLK>;
		clock-names = "ciu", "biu";
	};
```

```text
	/* Board portion */
	dwmmc0@fcd03000 {
		vmmc-supply = <&ldo12>;
		fifo-depth = <0x100>;
		pinctrl-names = "default";
		pinctrl-0 = <&sd_pmx_pins &sd_cfg_func1 &sd_cfg_func2>;
		bus-width = <4>;
		disable-wp;
		cd-gpios = <&gpio10 3 0>;
		cap-mmc-highspeed;
		cap-sd-highspeed;
	};
```

```text
	/* for Hi6220 */
```

```dts
	dwmmc_1: dwmmc1@f723e000 {
		compatible = "hisilicon,hi6220-dw-mshc";
		bus-width = <0x4>;
		disable-wp;
		cap-sd-highspeed;
		sd-uhs-sdr12;
		sd-uhs-sdr25;
		card-detect-delay = <200>;
		hisilicon,peripheral-syscon = <&ao_ctrl>;
		reg = <0x0 0xf723e000 0x0 0x1000>;
		interrupts = <0x0 0x49 0x4>;
		clocks = <&clock_sys HI6220_MMC1_CIUCLK>, <&clock_sys HI6220_MMC1_CLK>;
		clock-names = "ciu", "biu";
		cd-gpios = <&gpio1 0 1>;
		pinctrl-names = "default", "idle";
		pinctrl-0 = <&sd_pmx_func &sd_clk_cfg_func &sd_cfg_func>;
		pinctrl-1 = <&sd_pmx_idle &sd_clk_cfg_idle &sd_cfg_idle>;
		vqmmc-supply = <&ldo7>;
		vmmc-supply = <&ldo10>;
	};
```

---

# Mmc bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/mmc_

> Device-tree binding reference for Mmc bindings.

This file has moved to [mmc-controller.yaml](</kernel/hardware/devicetree-bindings/dt-mmc/mmc-controller.md>).

---

# MOXA ART MMC Host Controller Interface

_Peios Kernel / Hardware and drivers / Device tree / bindings/mmc_

> Device-tree binding reference for MOXA ART MMC Host Controller Interface.

```text
  Inherits from mmc binding[1].
```

```text
  [1] Documentation/devicetree/bindings/mmc/mmc.txt
```

## Required properties:

- compatible :	Must be "moxa,moxart-mmc" or "faraday,ftsdc010"
- reg :		Should contain registers location and length
- interrupts :	Should contain the interrupt number
- clocks :	Should contain phandle for the clock feeding the MMC controller

## Optional properties:

- dmas :	Should contain two DMA channels, line request number must be 5 for
  both channels
- dma-names :	Must be "tx", "rx"

## Example:

```dts
	mmc: mmc@98e00000 {
		compatible = "moxa,moxart-mmc";
		reg = <0x98e00000 0x5C>;
		interrupts = <5 0>;
		clocks = <&clk_apb>;
		dmas =  <&dma 5>,
			<&dma 5>;
		dma-names = "tx", "rx";
	};
```

---

# PXA MMC drivers

_Peios Kernel / Hardware and drivers / Device tree / bindings/mmc_

> Device-tree binding reference for PXA MMC drivers.

Driver bindings for the PXA MCI (MMC/SDIO) interfaces

## Required properties:

- compatible: Should be "marvell,pxa-mmc".
- vmmc-supply: A regulator for VMMC

## Optional properties:

- marvell,detect-delay-ms: sets the detection delay timeout in ms.

In addition to the properties described in this document, the details
described in [mmc.txt](</kernel/hardware/devicetree/bindings-mmc/mmc.md>) are supported.

## Examples:

```dts
mmc0: mmc@41100000 {
	compatible = "marvell,pxa-mmc";
	reg = <0x41100000 0x1000>;
	interrupts = <23>;
	vmmc-supply = <&mmc_regulator>;
	cd-gpios = <&gpio 23 0>;
	wp-gpios = <&gpio 24 0>;
};
```

---

# SPEAr SDHCI Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/mmc_

> Device-tree binding reference for SPEAr SDHCI Controller.

This file documents differences between the core properties in [mmc.txt](</kernel/hardware/devicetree/bindings-mmc/mmc.md>)
and the properties used by the sdhci-spear driver.

## Required properties:

- compatible: "st,spear300-sdhci"

## Optional properties:

- cd-gpios: card detect gpio, with zero flags.

## Example:

```dts
	sdhci@fc000000 {
		compatible = "st,spear300-sdhci";
		reg = <0xfc000000 0x1000>;
		cd-gpios = <&gpio0 6 0>;
	};
```

---

# STMicroelectronics sdhci-st MMC/SD controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/mmc_

> Device-tree binding reference for STMicroelectronics sdhci-st MMC/SD controller.

This file documents the differences between the core properties in
[Documentation/devicetree/bindings/mmc/mmc.txt](</kernel/hardware/devicetree/bindings-mmc/mmc.md>) and the properties
used by the sdhci-st driver.

## Required properties:

- compatible:		Must be "st,sdhci" and it can be compatible to "st,sdhci-stih407"
  to set the internal glue logic used for configuring the MMC
  subsystem (mmcss) inside the FlashSS (available in STiH407 SoC
  family).

- clock-names:		Should be "mmc" and "icn".  (NB: The latter is not compulsory)
  See: [Documentation/devicetree/bindings/resource-names.txt](</kernel/hardware/devicetree/bindings/resource-names.md>)
- clocks:		Phandle to the clock.
  See: [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

- interrupts:		One mmc interrupt should be described here.
- interrupt-names:	Should be "mmcirq".

- pinctrl-names:	A pinctrl state names "default" must be defined.
- pinctrl-0:		Phandle referencing pin configuration of the sd/emmc controller.
  See: [Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)

- reg:			This must provide the host controller base address and it can also
  contain the FlashSS Top register for TX/RX delay used by the driver
  to configure DLL inside the flashSS, if so reg-names must also be
  specified.

## Optional properties:

- reg-names:		Should be "mmc" and "top-mmc-delay". "top-mmc-delay" is optional
  for eMMC on stih407 family silicon to configure DLL inside FlashSS.

- non-removable:	Non-removable slot. Also used for configuring mmcss in STiH407 SoC
  family.
  See:  [Documentation/devicetree/bindings/mmc/mmc.txt](</kernel/hardware/devicetree/bindings-mmc/mmc.md>).

- bus-width:		Number of data lines.
  See:  [Documentation/devicetree/bindings/mmc/mmc.txt](</kernel/hardware/devicetree/bindings-mmc/mmc.md>).

- max-frequency:	Can be 200MHz, 100MHz or 50MHz (default) and used for
  configuring the CCONFIG3 in the mmcss.
  See:  [Documentation/devicetree/bindings/mmc/mmc.txt](</kernel/hardware/devicetree/bindings-mmc/mmc.md>).

- resets:		Phandle and reset specifier pair to softreset line of HC IP.
  See: [Documentation/devicetree/bindings/reset/reset.txt](</kernel/hardware/devicetree/bindings-reset/reset.md>)

- vqmmc-supply:		Phandle to the regulator dt node, mentioned as the vcc/vdd
  supply in eMMC/SD specs.

- sd-uhs-sdr50:	To enable the SDR50 in the mmcss.
  See:  [Documentation/devicetree/bindings/mmc/mmc.txt](</kernel/hardware/devicetree/bindings-mmc/mmc.md>).

- sd-uhs-sdr104:	To enable the SDR104 in the mmcss.
  See:  [Documentation/devicetree/bindings/mmc/mmc.txt](</kernel/hardware/devicetree/bindings-mmc/mmc.md>).

- sd-uhs-ddr50:		To enable the DDR50 in the mmcss.
  See:  [Documentation/devicetree/bindings/mmc/mmc.txt](</kernel/hardware/devicetree/bindings-mmc/mmc.md>).

## Example:

/\* Example stih416e eMMC configuration \*/

```dts
mmc0: sdhci@fe81e000 {
	compatible	= "st,sdhci";
	reg		= <0xfe81e000 0x1000>;
	interrupts	= <GIC_SPI 127 IRQ_TYPE_NONE>;
	interrupt-names	= "mmcirq";
	pinctrl-names	= "default";
	pinctrl-0	= <&pinctrl_mmc0>;
	clock-names	= "mmc";
	clocks		= <&clk_s_a1_ls 1>;
	bus-width	= <8>

/* Example SD stih407 family configuration */

mmc1: sdhci@9080000 {
	compatible	= "st,sdhci-stih407", "st,sdhci";
	reg		= <0x09080000 0x7ff>;
	reg-names	= "mmc";
	interrupts	= <GIC_SPI 90 IRQ_TYPE_NONE>;
	interrupt-names	= "mmcirq";
	pinctrl-names	= "default";
	pinctrl-0	= <&pinctrl_sd1>;
	clock-names	= "mmc";
	clocks		= <&clk_s_c0_flexgen CLK_MMC_1>;
	resets		= <&softreset STIH407_MMC1_SOFTRESET>;
	bus-width	= <4>;
};

/* Example eMMC stih407 family configuration */

mmc0: sdhci@9060000 {
	compatible	= "st,sdhci-stih407", "st,sdhci";
	reg		= <0x09060000 0x7ff>, <0x9061008 0x20>;
	reg-names	= "mmc", "top-mmc-delay";
	interrupts	= <GIC_SPI 92 IRQ_TYPE_NONE>;
	interrupt-names	= "mmcirq";
	pinctrl-names	= "default";
	pinctrl-0	= <&pinctrl_mmc0>;
	clock-names	= "mmc";
	clocks		= <&clk_s_c0_flexgen CLK_MMC_0>;
	vqmmc-supply	= <&vmmc_reg>;
	max-frequency	= <200000000>;
	bus-width	= <8>;
	non-removable;
	sd-uhs-sdr50;
	sd-uhs-sdr104;
	sd-uhs-ddr50;
};
```

---

# TI Highspeed MMC host controller for OMAP and 66AK2G family.

_Peios Kernel / Hardware and drivers / Device tree / bindings/mmc_

> Device-tree binding reference for TI Highspeed MMC host controller for OMAP and 66AK2G family..

The Highspeed MMC Host Controller on TI OMAP and 66AK2G family
provides an interface for MMC, SD, and SDIO types of memory cards.

This file documents differences between the core properties described
by [mmc.txt](</kernel/hardware/devicetree/bindings-mmc/mmc.md>) and the properties used by the omap\_hsmmc driver.

## Required properties:

- compatible:
  Should be "ti,omap2-hsmmc", for OMAP2 controllers
  Should be "ti,omap3-hsmmc", for OMAP3 controllers
  Should be "ti,omap3-pre-es3-hsmmc" for OMAP3 controllers pre ES3.0
  Should be "ti,omap4-hsmmc", for OMAP4 controllers
  Should be "ti,am33xx-hsmmc", for AM335x controllers
  Should be "ti,k2g-hsmmc", "ti,omap4-hsmmc" for 66AK2G controllers.

## SoC specific required properties:

The following are mandatory properties for OMAPs, AM33xx and AM43xx SoCs only:

- ti,hwmods: Must be "mmc&lt;n&gt;", n is controller instance starting 1.

## The following are mandatory properties for 66AK2G SoCs only:

- power-domains:Should contain a phandle to a PM domain provider node
  and an args specifier containing the MMC device id
  value. This property is as per the binding,
  [Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml](</kernel/hardware/devicetree-bindings/dt-soc/ti/sci-pm-domain.md>)
- clocks:	Must contain an entry for each entry in clock-names. Should
  be defined as per the he appropriate clock bindings consumer
  usage in [Documentation/devicetree/bindings/clock/ti,sci-clk.yaml](</kernel/hardware/devicetree-bindings/dt-clock/ti-sci-clk.md>)
- clock-names:	Shall be "fck" for the functional clock,
  and "mmchsdb\_fck" for the debounce clock.

## Optional properties:

- ti,dual-volt:		boolean, supports dual voltage cards
- &lt;supply-name&gt;-supply:	phandle to the regulator device tree node
  "supply-name" examples are "vmmc",
  "vmmc\_aux"(deprecated)/"vqmmc" etc
- ti,non-removable:	non-removable slot (like eMMC)
- ti,needs-special-reset:	Requires a special softreset sequence
- ti,needs-special-hs-handling:	HSMMC IP needs special setting
  for handling High Speed
- dmas:			List of DMA specifiers with the controller specific
  format as described in the generic DMA client
  binding. A tx and rx specifier is required.
- dma-names:		List of DMA request names. These strings correspond
  1:1 with the DMA specifiers listed in dmas.
  The string naming is to be "rx" and "tx" for
  RX and TX DMA requests, respectively.

## Examples:

\[hwmod populated DMA resources\]

```dts
	mmc1: mmc@4809c000 {
		compatible = "ti,omap4-hsmmc";
		reg = <0x4809c000 0x400>;
		ti,hwmods = "mmc1";
		ti,dual-volt;
		bus-width = <4>;
		vmmc-supply = <&vmmc>; /* phandle to regulator node */
		ti,non-removable;
	};
```

\[generic DMA request binding\]

```dts
	mmc1: mmc@4809c000 {
		compatible = "ti,omap4-hsmmc";
		reg = <0x4809c000 0x400>;
		ti,hwmods = "mmc1";
		ti,dual-volt;
		bus-width = <4>;
		vmmc-supply = <&vmmc>; /* phandle to regulator node */
		ti,non-removable;
		dmas = <&edma 24
			&edma 25>;
		dma-names = "tx", "rx";
	};
```

\[workaround for missing swakeup on am33xx\]

This SOC is missing the swakeup line, it will not detect SDIO irq
while in suspend.

---

## | PRCM |

```text
                               ^ |
                       swakeup | | fclk
                               | v
       ------                -------               -----
      | card | -- CIRQ -->  | hsmmc | -- IRQ -->  | CPU |
       ------                -------               -----
```

In suspend the fclk is off and the module is dysfunctional. Even register reads
will fail. A small logic in the host will request fclk restore, when an
external event is detected. Once the clock is restored, the host detects the
event normally. Since am33xx doesn't have this line it never wakes from
suspend.

The workaround is to reconfigure the dat1 line as a GPIO upon suspend. To make
this work, we need to set the named pinctrl states "default" and "idle".
Prepare idle to remux dat1 as a gpio, and default to remux it back as sdio
dat1. The MMC driver will then toggle between idle and default state during
runtime.

## In summary:

1. select matching 'compatible' section, see example below.
2. specify pinctrl states "default" and "idle", "sleep" is optional.
3. specify the gpio irq used for detecting sdio irq in suspend

If configuration is incomplete, a warning message is emitted "falling back to
polling". Also check the "sdio irq mode" in /sys/kernel/debug/mmc0/regs. Mind
not every application needs SDIO irq, e.g. MMC cards.

```dts
	mmc1: mmc@48060100 {
		compatible = "ti,am33xx-hsmmc";
		...
		pinctrl-names = "default", "idle", "sleep"
		pinctrl-0 = <&mmc1_pins>;
		pinctrl-1 = <&mmc1_idle>;
		pinctrl-2 = <&mmc1_sleep>;
		...
		interrupts-extended = <&intc 64 &gpio2 28 IRQ_TYPE_LEVEL_LOW>;
	};
```

```dts
	mmc1_idle : pinmux_cirq_pin {
		pinctrl-single,pins = <
		        0x0f8 0x3f      /* GPIO2_28 */
		>;
	};
```

---

# TI MMC host controller for OMAP1 and 2420

_Peios Kernel / Hardware and drivers / Device tree / bindings/mmc_

> Device-tree binding reference for TI MMC host controller for OMAP1 and 2420.

The MMC Host Controller on TI OMAP1 and 2420 family provides
an interface for MMC, SD, and SDIO types of memory cards.

This file documents differences between the core properties described
by [mmc.txt](</kernel/hardware/devicetree/bindings-mmc/mmc.md>) and the properties used by the omap mmc driver.

Note that this driver will not work with omap2430 or later omaps,
please see the omap hsmmc driver for the current omaps.

## Required properties:

- compatible: Must be "ti,omap2420-mmc", for OMAP2420 controllers
- ti,hwmods: For 2420, must be "msdi&lt;n&gt;", where n is controller
  instance starting 1

## Examples:

```dts
	msdi1: mmc@4809c000 {
		compatible = "ti,omap2420-mmc";
		ti,hwmods = "msdi1";
		reg = <0x4809c000 0x80>;
		interrupts = <83>;
		dmas = <&sdma 61 &sdma 62>;
		dma-names = "tx", "rx";
	};
```

---

# Renesas usdhi6rol0 SD/SDIO host controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/mmc_

> Device-tree binding reference for Renesas usdhi6rol0 SD/SDIO host controller.

## Required properties:

- compatible:	must be
  "renesas,usdhi6rol0"
- interrupts:	3 interrupts, named "card detect", "data" and "SDIO" must be
  specified
- clocks:	a clock binding for the IMCLK input

## Optional properties:

- vmmc-supply:	a phandle of a regulator, supplying Vcc to the card
- vqmmc-supply:	a phandle of a regulator, supplying VccQ to the card
- pinctrl-names: Can contain a "default" entry and a "state\_uhs"
  entry. The state\_uhs entry is used together with the default
  entry when the board requires distinct settings for UHS speeds.

- pinctrl-N: One property for each name listed in pinctrl-names, see
  [../pinctrl/pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>).

Additionally any standard mmc bindings from [mmc.txt](</kernel/hardware/devicetree/bindings-mmc/mmc.md>) can be used.

## Example:

```dts
sd0: sd@ab000000 {
	compatible = "renesas,usdhi6rol0";
	reg = <0xab000000 0x200>;
	interrupts = <0 23 0x4
		      0 24 0x4
		      0 25 0x4>;
	interrupt-names = "card detect", "data", "SDIO";
	bus-width = <4>;
	max-frequency = <50000000>;
	cap-power-off-card;
	clocks = <&imclk>;
	vmmc-supply = <&vcc_sd0>;
	vqmmc-supply = <&vccq_sd0>;
};
```

---

# Atmel NAND flash controller bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/mtd_

> Device-tree binding reference for Atmel NAND flash controller bindings.

The NAND flash controller node should be defined under the EBI bus (see
[Documentation/devicetree/bindings/memory-controllers/atmel,ebi.txt](</kernel/hardware/devicetree/bindings-memory-controllers/atmel-ebi.md>)).
One or several NAND devices can be defined under this NAND controller.
The NAND controller might be connected to an ECC engine.

- NAND controller bindings:

## Required properties:

- compatible: should be one of the following
  "atmel,at91rm9200-nand-controller"
  "atmel,at91sam9260-nand-controller"
  "atmel,at91sam9261-nand-controller"
  "atmel,at91sam9g45-nand-controller"
  "atmel,sama5d3-nand-controller"
  "microchip,sam9x60-nand-controller"
- ranges: empty ranges property to forward EBI ranges definitions.
- #address-cells: should be set to 2.
- #size-cells: should be set to 1.
- atmel,nfc-io: phandle to the NFC IO block. Only required for sama5d3
  controllers.
- atmel,nfc-sram: phandle to the NFC SRAM block. Only required for sama5d3
  controllers.

## Optional properties:

- ecc-engine: phandle to the PMECC block. Only meaningful if the SoC embeds
  a PMECC engine.

- NAND device/chip bindings:

## Required properties:

- reg: describes the CS lines assigned to the NAND device. If the NAND device
  exposes multiple CS lines (multi-dies chips), your reg property will
  contain X tuples of 3 entries.
  1st entry: the CS line this NAND chip is connected to
  2nd entry: the base offset of the memory region assigned to this
  device (always 0)
  3rd entry: the memory region size (always 0x800000)

## Optional properties:

- rb-gpios: the GPIO(s) used to check the Ready/Busy status of the NAND.
- cs-gpios: the GPIO(s) used to control the CS line.
- det-gpios: the GPIO used to detect if a Smartmedia Card is present.
- atmel,rb: an integer identifying the native Ready/Busy pin. Only meaningful
  on sama5 SoCs.

All generic properties are described in the generic yaml files under
Documentation/devicetree/bindings/mtd/.

- ECC engine (PMECC) bindings:

## Required properties:

- compatible: should be one of the following
  "atmel,at91sam9g45-pmecc"
  "atmel,sama5d4-pmecc"
  "atmel,sama5d2-pmecc"
  "microchip,sam9x60-pmecc"
  "microchip,sam9x7-pmecc", "atmel,at91sam9g45-pmecc"
- reg: should contain 2 register ranges. The first one is pointing to the PMECC
  block, and the second one to the PMECC\_ERRLOC block.

## Example:

```dts
	nfc_io: nfc-io@70000000 {
		compatible = "atmel,sama5d3-nfc-io", "syscon";
		reg = <0x70000000 0x8000000>;
	};
```

```dts
	pmecc: ecc-engine@ffffc070 {
		compatible = "atmel,at91sam9g45-pmecc";
                reg = <0xffffc070 0x490>,
                      <0xffffc500 0x100>;
	};
```

```dts
	ebi: ebi@10000000 {
		compatible = "atmel,sama5d3-ebi";
		#address-cells = <2>;
		#size-cells = <1>;
		atmel,smc = <&hsmc>;
		reg = <0x10000000 0x10000000
		       0x40000000 0x30000000>;
		ranges = <0x0 0x0 0x10000000 0x10000000
			  0x1 0x0 0x40000000 0x10000000
			  0x2 0x0 0x50000000 0x10000000
			  0x3 0x0 0x60000000 0x10000000>;
		clocks = <&mck>;

                nand_controller: nand-controller {
			compatible = "atmel,sama5d3-nand-controller";
			atmel,nfc-sram = <&nfc_sram>;
			atmel,nfc-io = <&nfc_io>;
			ecc-engine = <&pmecc>;
			#address-cells = <2>;
			#size-cells = <1>;
			ranges;

			nand@3 {
				reg = <0x3 0x0 0x800000>;
				atmel,rb = <0>;

				/*
				 * Put generic NAND/MTD properties and
				 * subnodes here.
				 */
			};
		};
	};
```

---

Deprecated bindings (should not be used in new device trees):

## Required properties:

- compatible: The possible values are:
  "atmel,at91rm9200-nand"
  "atmel,sama5d2-nand"
  "atmel,sama5d4-nand"
- reg : should specify localbus address and size used for the chip,
  and hardware ECC controller if available.
  If the hardware ECC is PMECC, it should contain address and size for
  PMECC and PMECC Error Location controller.
  The PMECC lookup table address and size in ROM is optional. If not
  specified, driver will build it in runtime.
- atmel,nand-addr-offset : offset for the address latch.
- atmel,nand-cmd-offset : offset for the command latch.
- #address-cells, #size-cells : Must be present if the device has sub-nodes
  representing partitions.

- gpios : specifies the gpio pins to control the NAND device. detect is an
  optional gpio and may be set to 0 if not present.

## Optional properties:

- atmel,nand-has-dma : boolean to support dma transfer for nand read/write.
- nand-ecc-mode : String, operation mode of the NAND ecc mode, soft by default.
  Supported values are: "none", "soft", "hw", "hw\_syndrome", "hw\_oob\_first",
  "soft\_bch".
- atmel,has-pmecc : boolean to enable Programmable Multibit ECC hardware,
  capable of BCH encoding and decoding, on devices where it is present.
- atmel,pmecc-cap : error correct capability for Programmable Multibit ECC
  Controller. Supported values are: 2, 4, 8, 12, 24. If the compatible string
  is "atmel,sama5d2-nand", 32 is also valid.
- atmel,pmecc-sector-size : sector size for ECC computation. Supported values
  are: 512, 1024.
- atmel,pmecc-lookup-table-offset : includes two offsets of lookup table in ROM
  for different sector size. First one is for sector size 512, the next is for
  sector size 1024. If not specified, driver will build the table in runtime.
- nand-bus-width : 8 or 16 bus width if not present 8
- nand-on-flash-bbt: boolean to enable on flash bbt option if not present false

Nand Flash Controller(NFC) is an optional sub-node
Required properties:

- compatible : "atmel,sama5d3-nfc".
- reg : should specify the address and size used for NFC command registers,
  NFC registers and NFC SRAM. NFC SRAM address and size can be absent
  if don't want to use it.
- clocks: phandle to the peripheral clock
  Optional properties:
- atmel,write-by-sram: boolean to enable NFC write by SRAM.

## Examples:

```dts
nand0: nand@40000000,0 {
	compatible = "atmel,at91rm9200-nand";
	#address-cells = <1>;
	#size-cells = <1>;
	reg = <0x40000000 0x10000000
	       0xffffe800 0x200
	      >;
	atmel,nand-addr-offset = <21>;	/* ale */
	atmel,nand-cmd-offset = <22>;	/* cle */
	nand-on-flash-bbt;
	nand-ecc-mode = "soft";
	gpios = <&pioC 13 0	/* rdy */
		 &pioC 14 0 	/* nce */
		 0		/* cd */
		>;
	partition@0 {
		...
	};
};
```

/\* for PMECC supported chips \*/

```dts
nand0: nand@40000000 {
	compatible = "atmel,at91rm9200-nand";
	#address-cells = <1>;
	#size-cells = <1>;
	reg = < 0x40000000 0x10000000	/* bus addr & size */
		0xffffe000 0x00000600	/* PMECC addr & size */
		0xffffe600 0x00000200	/* PMECC ERRLOC addr & size */
		0x00100000 0x00100000	/* ROM addr & size */
		>;
	atmel,nand-addr-offset = <21>;	/* ale */
	atmel,nand-cmd-offset = <22>;	/* cle */
	nand-on-flash-bbt;
	nand-ecc-mode = "hw";
	atmel,has-pmecc;	/* enable PMECC */
	atmel,pmecc-cap = <2>;
	atmel,pmecc-sector-size = <512>;
	atmel,pmecc-lookup-table-offset = <0x8000 0x10000>;
	gpios = <&pioD 5 0	/* rdy */
		 &pioD 4 0	/* nce */
		 0		/* cd */
		>;
	partition@0 {
		...
	};
};
```

/\* for NFC supported chips \*/

```dts
nand0: nand@40000000 {
	compatible = "atmel,at91rm9200-nand";
	#address-cells = <1>;
	#size-cells = <1>;
	ranges;
        ...
        nfc@70000000 {
		compatible = "atmel,sama5d3-nfc";
		#address-cells = <1>;
		#size-cells = <1>;
		clocks = <&hsmc_clk>
		reg = <
			0x70000000 0x10000000	/* NFC Command Registers */
			0xffffc000 0x00000070	/* NFC HSMC regs */
			0x00200000 0x00100000	/* NFC SRAM banks */
		>;
	};
};
```

---

# M-Systems and Sandisk DiskOnChip devices

_Peios Kernel / Hardware and drivers / Device tree / bindings/mtd_

> Device-tree binding reference for M-Systems and Sandisk DiskOnChip devices.

## M-System DiskOnChip G3

The Sandisk (formerly M-Systems) docg3 is a nand device of 64M to 256MB.

## Required properties:

- compatible: should be "m-systems,diskonchip-g3"
- reg: register base and size

## Example:

```dts
	docg3: flash@0 {
		compatible = "m-systems,diskonchip-g3";
		reg = <0x0 0x2000>;
	};
```

---

# FLCTL NAND controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/mtd_

> Device-tree binding reference for FLCTL NAND controller.

## Required properties:

- compatible : "renesas,shmobile-flctl-sh7372"
- reg : Address range of the FLCTL
- interrupts : flste IRQ number
- nand-bus-width : bus width to NAND chip

## Optional properties:

- dmas: DMA specifier(s)
- dma-names: name for each DMA specifier. Valid names are
  "data\_tx", "data\_rx", "ecc\_tx", "ecc\_rx"

The DMA fields are not used yet in the driver but are listed here for
completing the bindings.

The device tree may optionally contain sub-nodes describing partitions of the
address space. See [mtd.yaml](</kernel/hardware/devicetree-bindings/dt-mtd/mtd.md>) for more detail.

## Example:

```dts
	flctl@e6a30000 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "renesas,shmobile-flctl-sh7372";
		reg = <0xe6a30000 0x100>;
		interrupts = <0x0d80>;

		nand-bus-width = <16>;

		dmas = <&dmac 1 /* data_tx */
			&dmac 2;> /* data_rx */
		dma-names = "data_tx", "data_rx";

		system@0 {
			label = "system";
			reg = <0x0 0x8000000>;
		};

		userdata@8000000 {
			label = "userdata";
			reg = <0x8000000 0x10000000>;
		};

		cache@18000000 {
			label = "cache";
			reg = <0x18000000 0x8000000>;
		};
	};
```

---

# Freescale Localbus UPM programmed to work with NAND flash

_Peios Kernel / Hardware and drivers / Device tree / bindings/mtd_

> Device-tree binding reference for Freescale Localbus UPM programmed to work with NAND flash.

## Required properties:

- compatible : "fsl,upm-nand".
- reg : should specify localbus chip select and size used for the chip.
- fsl,upm-addr-offset : UPM pattern offset for the address latch.
- fsl,upm-cmd-offset : UPM pattern offset for the command latch.

## Optional properties:

- fsl,upm-addr-line-cs-offsets : address offsets for multi-chip support.
  The corresponding address lines are used to select the chip.
- gpios : may specify optional GPIOs connected to the Ready-Not-Busy pins
  (R/B#). For multi-chip devices, "n" GPIO definitions are required
  according to the number of chips.

## Deprecated properties:

- fsl,upm-wait-flags : add chip-dependent short delays after running the
  UPM pattern (0x1), after writing a data byte (0x2) or after
  writing out a buffer (0x4).
- chip-delay : chip dependent delay for transferring data from array to
  read registers (tR). Required if property "gpios" is not used
  (R/B# pins not connected).

Each flash chip described may optionally contain additional sub-nodes
describing partitions of the address space. See [mtd.yaml](</kernel/hardware/devicetree-bindings/dt-mtd/mtd.md>) for more
detail.

## Examples:

```dts
upm@1,0 {
	compatible = "fsl,upm-nand";
	reg = <1 0 1>;
	fsl,upm-addr-offset = <16>;
	fsl,upm-cmd-offset = <8>;
	gpios = <&qe_pio_e 18 0>;

	flash {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "...";

		partition@0 {
			...
		};
	};
};
```

```dts
upm@3,0 {
	#address-cells = <0>;
	#size-cells = <0>;
	compatible = "tqc,tqm8548-upm-nand", "fsl,upm-nand";
	reg = <3 0x0 0x800>;
	fsl,upm-addr-offset = <0x10>;
	fsl,upm-cmd-offset = <0x08>;
	/* Multi-chip NAND device */
	fsl,upm-addr-line-cs-offsets = <0x0 0x200>;

	nand@0 {
		#address-cells = <1>;
		#size-cells = <1>;

		partition@0 {
			    label = "fs";
			    reg = <0x00000000 0x10000000>;
		};
	};
};
```

---

# Fsmc nand bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/mtd_

> Device-tree binding reference for Fsmc nand bindings.

ST Microelectronics Flexible Static Memory Controller (FSMC)
NAND Interface

## Required properties:

- compatible : "st,spear600-fsmc-nand", "stericsson,fsmc-nand"
- reg : Address range of the mtd chip
- reg-names: Should contain the reg names "fsmc\_regs", "nand\_data", "nand\_addr" and "nand\_cmd"

## Optional properties:

- bank-width : Width (in bytes) of the device.  If not present, the width
  defaults to 1 byte
- nand-skip-bbtscan: Indicates the BBT scanning should be skipped
- timings: array of 6 bytes for NAND timings. The meanings of these bytes
  are:
  byte 0 TCLR  : CLE to RE delay in number of AHB clock cycles, only 4 bits
  are valid. Zero means one clockcycle, 15 means 16 clock
  cycles.
  byte 1 TAR   : ALE to RE delay, 4 bits are valid. Same format as TCLR.
  byte 2 THIZ  : number of HCLK clock cycles during which the data bus is
  kept in Hi-Z (tristate) after the start of a write access.
  Only valid for write transactions. Zero means zero cycles,
  255 means 255 cycles.
  byte 3 THOLD : number of HCLK clock cycles to hold the address (and data
  when writing) after the command deassertation. Zero means
  one cycle, 255 means 256 cycles.
  byte 4 TWAIT : number of HCLK clock cycles to assert the command to the
  NAND flash in response to SMWAITn. Zero means 1 cycle,
  255 means 256 cycles.
  byte 5 TSET  : number of HCLK clock cycles to assert the address before the
  command is asserted. Zero means one cycle, 255 means 256
  cycles.
- bank: default NAND bank to use (0-3 are valid, 0 is the default).
- nand-ecc-mode      : see [nand-controller.yaml](</kernel/hardware/devicetree-bindings/dt-mtd/nand-controller.md>)
- nand-ecc-strength  : see [nand-controller.yaml](</kernel/hardware/devicetree-bindings/dt-mtd/nand-controller.md>)
- nand-ecc-step-size : see [nand-controller.yaml](</kernel/hardware/devicetree-bindings/dt-mtd/nand-controller.md>)

Can support 1-bit HW ECC (default) or if stronger correction is required,
software-based BCH.

## Example:

```dts
	fsmc: flash@d1800000 {
		compatible = "st,spear600-fsmc-nand";
		#address-cells = <1>;
		#size-cells = <1>;
		reg = <0xd1800000 0x1000	/* FSMC Register */
		       0xd2000000 0x0010	/* NAND Base DATA */
		       0xd2020000 0x0010	/* NAND Base ADDR */
		       0xd2010000 0x0010>;	/* NAND Base CMD */
		reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";

		bank-width = <1>;
		nand-skip-bbtscan;
		timings = /bits/ 8 <0 0 0 2 3 0>;
		bank = <1>;

		partition@0 {
			...
		};
	};
```

---

# GPIO assisted NAND flash

_Peios Kernel / Hardware and drivers / Device tree / bindings/mtd_

> Device-tree binding reference for GPIO assisted NAND flash.

The GPIO assisted NAND flash uses a memory mapped interface to
read/write the NAND commands and data and GPIO pins for the control
signals.

## Required properties:

- compatible : "gpio-control-nand"
- reg : should specify localbus chip select and size used for the chip.  The
  resource describes the data bus connected to the NAND flash and all accesses
  are made in native endianness.
- #address-cells, #size-cells : Must be present if the device has sub-nodes
  representing partitions.
- gpios : Specifies the GPIO pins to control the NAND device.  The order of
  GPIO references is:  RDY, nCE, ALE, CLE, and nWP. nCE and nWP are optional.

## Optional properties:

- bank-width : Width (in bytes) of the device.  If not present, the width
  defaults to 1 byte.
- chip-delay : chip dependent delay for transferring data from array to
  read registers (tR).  If not present then a default of 20us is used.
- gpio-control-nand,io-sync-reg : A 64-bit physical address for a read
  location used to guard against bus reordering with regards to accesses to
  the GPIO's and the NAND flash data bus.  If present, then after changing
  GPIO state and before and after command byte writes, this register will be
  read to ensure that the GPIO accesses have completed.

The device tree may optionally contain sub-nodes describing partitions of the
address space. See [mtd.yaml](</kernel/hardware/devicetree-bindings/dt-mtd/mtd.md>) for more detail.

## Examples:

```dts
gpio-nand@1,0 {
	compatible = "gpio-control-nand";
	reg = <1 0x0000 0x2>;
	#address-cells = <1>;
	#size-cells = <1>;
	gpios = <&banka 1 0>,	/* RDY */
		<0>, 		/* nCE */
		<&banka 3 0>, 	/* ALE */
		<&banka 4 0>, 	/* CLE */
		<0>;		/* nWP */

	partition@0 {
	...
	};
};
```

---

# Hisilicon Hip04 Soc NAND controller DT binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/mtd_

> Device-tree binding reference for Hisilicon Hip04 Soc NAND controller DT binding.

## Required properties:

- compatible:          Should be "hisilicon,504-nfc".
- reg:                 The first contains base physical address and size of
  NAND controller's registers. The second contains base
  physical address and size of NAND controller's buffer.
- interrupts:          Interrupt number for nfc.
- nand-bus-width:      See [nand-controller.yaml](</kernel/hardware/devicetree-bindings/dt-mtd/nand-controller.md>).
- nand-ecc-mode:       Support none and hw ecc mode.
- #address-cells:      Partition address, should be set 1.
- #size-cells:         Partition size, should be set 1.

## Optional properties:

- nand-ecc-strength:   Number of bits to correct per ECC step.
- nand-ecc-step-size:  Number of data bytes covered by a single ECC step.

The following ECC strength and step size are currently supported:

- nand-ecc-strength = &lt;16&gt;, nand-ecc-step-size = &lt;1024&gt;

Flash chip may optionally contain additional sub-nodes describing partitions of
the address space. See [mtd.yaml](</kernel/hardware/devicetree-bindings/dt-mtd/mtd.md>) for more detail.

## Example:

```dts
	nand: nand@4020000 {
		compatible = "hisilicon,504-nfc";
		reg = <0x4020000 0x10000>, <0x5000000 0x1000>;
		interrupts = <0 379 4>;
		nand-bus-width = <8>;
		nand-ecc-mode = "hw";
		nand-ecc-strength = <16>;
		nand-ecc-step-size = <1024>;
		#address-cells = <1>;
		#size-cells = <1>;

		partition@0 {
			label = "nand_text";
			reg = <0x00000000 0x00400000>;
		};

		...

	};
```

---

# HiSilicon SPI-NOR Flash Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/mtd_

> Device-tree binding reference for HiSilicon SPI-NOR Flash Controller.

## Required properties:

- compatible : Should be "hisilicon,fmc-spi-nor" and one of the following strings:
  "hisilicon,hi3519-spi-nor"
- address-cells : Should be 1.
- size-cells : Should be 0.
- reg : Offset and length of the register set for the controller device.
- reg-names : Must include the following two entries: "control", "memory".
- clocks : handle to spi-nor flash controller clock.

## Example:

```dts
spi-nor-controller@10000000 {
	compatible = "hisilicon,hi3519-spi-nor", "hisilicon,fmc-spi-nor";
	#address-cells = <1>;
	#size-cells = <0>;
	reg = <0x10000000 0x1000>, <0x14000000 0x1000000>;
	reg-names = "control", "memory";
	clocks = <&clock HI3519_FMC_CLK>;
	flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
	};
};
```

---

# AMCC NDFC (NanD Flash Controller)

_Peios Kernel / Hardware and drivers / Device tree / bindings/mtd_

> Device-tree binding reference for AMCC NDFC (NanD Flash Controller).

## Required properties:

- compatible : "ibm,ndfc".
- reg : should specify chip select and size used for the chip (0x2000).

## Optional properties:

- ccr : NDFC config and control register value (default 0).
- bank-settings : NDFC bank configuration register value (default 0).

## Notes:

- partition(s) - follows the OF MTD standard for partitions

## Example:

```dts
ndfc@1,0 {
	compatible = "ibm,ndfc";
	reg = <0x00000001 0x00000000 0x00002000>;
	ccr = <0x00001000>;
	bank-settings = <0x80002222>;
	#address-cells = <1>;
	#size-cells = <1>;

	nand {
		#address-cells = <1>;
		#size-cells = <1>;

		partition@0 {
			label = "kernel";
			reg = <0x00000000 0x00200000>;
		};
		partition@200000 {
			label = "root";
			reg = <0x00200000 0x03E00000>;
		};
	};
};
```

---

# NXP LPC32xx SoC NAND MLC controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/mtd_

> Device-tree binding reference for NXP LPC32xx SoC NAND MLC controller.

## Required properties:

- compatible: "nxp,lpc3220-mlc"
- reg: Address and size of the controller
- interrupts: The NAND interrupt specification
- gpios: GPIO specification for NAND write protect

The following required properties are very controller specific. See the LPC32xx
User Manual 7.5.14 MLC NAND Timing Register (the values here are specified in
Hz, to make them independent of actual clock speed and to provide for good
accuracy:)

- nxp,tcea\_delay: TCEA\_DELAY
- nxp,busy\_delay: BUSY\_DELAY
- nxp,nand\_ta: NAND\_TA
- nxp,rd\_high: RD\_HIGH
- nxp,rd\_low: RD\_LOW
- nxp,wr\_high: WR\_HIGH
- nxp,wr\_low: WR\_LOW

## Optional subnodes:

- Partitions, see [Documentation/devicetree/bindings/mtd/mtd.yaml](</kernel/hardware/devicetree-bindings/dt-mtd/mtd.md>)

## Example:

```dts
	mlc: flash@200a8000 {
		compatible = "nxp,lpc3220-mlc";
		reg = <0x200A8000 0x11000>;
		interrupts = <11 0>;
		#address-cells = <1>;
		#size-cells = <1>;

		nxp,tcea-delay = <333333333>;
		nxp,busy-delay = <10000000>;
		nxp,nand-ta = <18181818>;
		nxp,rd-high = <31250000>;
		nxp,rd-low = <45454545>;
		nxp,wr-high = <40000000>;
		nxp,wr-low = <83333333>;
		gpios = <&gpio 5 19 1>; /* GPO_P3 19, active low */

		mtd0@00000000 {
			label = "boot";
			reg = <0x00000000 0x00064000>;
			read-only;
		};

		...

	};
```

---

# NXP LPC32xx SoC NAND SLC controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/mtd_

> Device-tree binding reference for NXP LPC32xx SoC NAND SLC controller.

## Required properties:

- compatible: "nxp,lpc3220-slc"
- reg: Address and size of the controller
- nand-on-flash-bbt: Use bad block table on flash
- gpios: GPIO specification for NAND write protect

The following required properties are very controller specific. See the LPC32xx
User Manual:

- nxp,wdr-clks: Delay before Ready signal is tested on write (W\_RDY)
- nxp,rdr-clks: Delay before Ready signal is tested on read (R\_RDY)
  (The following values are specified in Hz, to make them independent of actual
  clock speed:)
- nxp,wwidth: Write pulse width (W\_WIDTH)
- nxp,whold: Write hold time (W\_HOLD)
- nxp,wsetup: Write setup time (W\_SETUP)
- nxp,rwidth: Read pulse width (R\_WIDTH)
- nxp,rhold: Read hold time (R\_HOLD)
- nxp,rsetup: Read setup time (R\_SETUP)

## Optional subnodes:

- Partitions, see [Documentation/devicetree/bindings/mtd/mtd.yaml](</kernel/hardware/devicetree-bindings/dt-mtd/mtd.md>)

## Example:

```dts
	slc: flash@20020000 {
		compatible = "nxp,lpc3220-slc";
		reg = <0x20020000 0x1000>;
		#address-cells = <1>;
		#size-cells = <1>;

		nxp,wdr-clks = <14>;
		nxp,wwidth = <40000000>;
		nxp,whold = <100000000>;
		nxp,wsetup = <100000000>;
		nxp,rdr-clks = <14>;
		nxp,rwidth = <40000000>;
		nxp,rhold = <66666666>;
		nxp,rsetup = <100000000>;
		nand-on-flash-bbt;
		gpios = <&gpio 5 19 1>; /* GPO_P3 19, active low */

		mtd0@00000000 {
			label = "phy3250-boot";
			reg = <0x00000000 0x00064000>;
			read-only;
		};

		...

	};
```

---

# Macronix NANDs Device Tree Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/mtd_

> Device-tree binding reference for Macronix NANDs Device Tree Bindings.

Macronix NANDs support randomizer operation for scrambling user data,
which can be enabled with a SET\_FEATURE. The penalty when using the
randomizer are subpage accesses prohibited and more time period needed
for program operation, i.e., tPROG 300us to 340us (randomizer enabled).
Enabling the randomizer is a one time persistent and non reversible
operation.

For more high-reliability concern, if subpage write is not available
with hardware ECC and not enabled at UBI level, then enabling the
randomizer is recommended by default by adding a new specific property
in children nodes.

## Required NAND chip properties in children mode:

- randomizer enable: should be "mxic,enable-randomizer-otp"

## Example:

```dts
	nand: nand-controller@unit-address {

		nand@0 {
			reg = <0>;
			mxic,enable-randomizer-otp;
		};
	};
```

---

# NAND support for Marvell Orion SoC platforms

_Peios Kernel / Hardware and drivers / Device tree / bindings/mtd_

> Device-tree binding reference for NAND support for Marvell Orion SoC platforms.

## Required properties:

- compatible : "marvell,orion-nand".
- reg : Base physical address of the NAND and length of memory mapped
  region

## Optional properties:

- cle : Address line number connected to CLE. Default is 0
- ale : Address line number connected to ALE. Default is 1
- bank-width : Width in bytes of the device. Default is 1
- chip-delay : Chip dependent delay for transferring data from array to read
  registers in usecs

The device tree may optionally contain sub-nodes describing partitions of the
address space. See [mtd.yaml](</kernel/hardware/devicetree-bindings/dt-mtd/mtd.md>) for more detail.

## Example:

```dts
nand@f4000000 {
	#address-cells = <1>;
	#size-cells = <1>;
	cle = <0>;
	ale = <1>;
	bank-width = <1>;
	chip-delay = <25>;
	compatible = "marvell,orion-nand";
	reg = <0xf4000000 0x400>;

	partition@0 {
		label = "u-boot";
		reg = <0x0000000 0x100000>;
		read-only;
	};

	partition@100000 {
		label = "uImage";
		reg = <0x0100000 0x200000>;
	};

	partition@300000 {
		label = "dtb";
		reg = <0x0300000 0x100000>;
	};

	partition@400000 {
		label = "root";
		reg = <0x0400000 0x7d00000>;
	};
};
```

---

# Broadcom BCM963XX CFE Loader NOR Flash Partitions

_Peios Kernel / Hardware and drivers / Device tree / bindings/mtd/partitions_

> Device-tree binding reference for Broadcom BCM963XX CFE Loader NOR Flash Partitions.

Most Broadcom BCM63XX SoC based devices follow the Broadcom reference layout for
NOR. The first erase block used for the CFE bootloader, the last for an
NVRAM partition, and the remainder in-between for one to two firmware partitions
at fixed offsets. A valid firmware partition is identified by the ImageTag
header found at beginning of the second erase block, containing the rootfs and
kernel offsets and sizes within the firmware partition.

## Required properties:

- compatible : must be "brcm,bcm963xx-cfe-nor-partitions"

## Example:

```dts
flash@1fc00000 {
	compatible = "cfi-flash";
	reg = <0x1fc00000 0x400000>;
	bank-width = <2>;

	partitions {
		compatible = "brcm,bcm963xx-cfe-nor-partitions";
	};
};
```

---

# Bindings for Analog Devices ADG792A/G Triple 4:1 Multiplexers

_Peios Kernel / Hardware and drivers / Device tree / bindings/mux_

> Device-tree binding reference for Bindings for Analog Devices ADG792A/G Triple 4:1 Multiplexers.

## Required properties:

- compatible : "adi,adg792a" or "adi,adg792g"
- #mux-control-cells : &lt;0&gt; if parallel (the three muxes are bound together
  with a single mux controller controlling all three muxes), or &lt;1&gt; if
  not (one mux controller for each mux).
- Standard mux-controller bindings as described in [mux-controller.yaml](</kernel/hardware/devicetree-bindings/dt-mux/mux-controller.md>)

## Optional properties for ADG792G:

```text
- gpio-controller : if present, #gpio-cells below is required.
- #gpio-cells : should be <2>
			  - First cell is the GPO line number, i.e. 0 or 1
			  - Second cell is used to specify active high (0)
			    or active low (1)
```

## Optional properties:

- idle-state : if present, array of states that the mux controllers will have
  when idle. The special state MUX\_IDLE\_AS\_IS is the default and
  MUX\_IDLE\_DISCONNECT is also supported.

States 0 through 3 correspond to signals A through D in the datasheet.

## Example:

```text
	/*
	 * Three independent mux controllers (of which one is used).
	 * Mux 0 is disconnected when idle, mux 1 idles in the previously
	 * selected state and mux 2 idles with signal B.
	 */
	&i2c0 {
		mux: mux-controller@50 {
			compatible = "adi,adg792a";
			reg = <0x50>;
			#mux-control-cells = <1>;
```

```dts
			idle-state = <MUX_IDLE_DISCONNECT MUX_IDLE_AS_IS 1>;
		};
	};
```

```dts
	adc-mux {
		compatible = "io-channel-mux";
		io-channels = <&adc 0>;
		io-channel-names = "parent";

		mux-controls = <&mux 2>;

		channels = "sync-1", "", "out";
	};
```

```text
	/*
	 * Three parallel muxes with one mux controller, useful e.g. if
	 * the adc is differential, thus needing two signals to be muxed
	 * simultaneously for correct operation.
	 */
	&i2c0 {
		pmux: mux-controller@50 {
			compatible = "adi,adg792a";
			reg = <0x50>;
			#mux-control-cells = <0>;
```

```dts
			idle-state = <1>;
		};
	};
```

```dts
	diff-adc-mux {
		compatible = "io-channel-mux";
		io-channels = <&adc 0>;
		io-channel-names = "parent";

		mux-controls = <&pmux>;

		channels = "sync-1", "", "out";
	};
```

---

# Bindings for Analog Devices ADGS1408/1409 8:1/Dual 4:1 Mux

_Peios Kernel / Hardware and drivers / Device tree / bindings/mux_

> Device-tree binding reference for Bindings for Analog Devices ADGS1408/1409 8:1/Dual 4:1 Mux.

## Required properties:

```text
- compatible : Should be one of
	* "adi,adgs1408"
	* "adi,adgs1409"
* Standard mux-controller bindings as described in mux-controller.yaml
```

## Optional properties for ADGS1408/1409:

```text
- gpio-controller : if present, #gpio-cells is required.
- #gpio-cells : should be <2>
			- First cell is the GPO line number, i.e. 0 to 3
			for ADGS1408 and 0 to 4 for ADGS1409
			- Second cell is used to specify active high (0)
			or active low (1)
```

## Optional properties:

- idle-state : if present, the state that the mux controller will have
  when idle. The special state MUX\_IDLE\_AS\_IS is the default and
  MUX\_IDLE\_DISCONNECT is also supported.

States 0 through 7 correspond to signals S1 through S8 in the datasheet.
For ADGS1409 only states 0 to 3 are available.

## Example:

```text
	/*
	 * One mux controller.
	 * Mux state set to idle as is (no idle-state declared)
	 */
	&spi0 {
		mux: mux-controller@0 {
			compatible = "adi,adgs1408";
			reg = <0>;
			spi-max-frequency = <1000000>;
			#mux-control-cells = <0>;
		};
	}
```

```dts
	adc-mux {
		compatible = "io-channel-mux";
		io-channels = <&adc 1>;
		io-channel-names = "parent";
		mux-controls = <&mux>;

		channels = "out_a0", "out_a1", "test0", "test1",
			"out_b0", "out_b1", "testb0", "testb1";
	};
```

---

# Adaptrum Anarion ethernet controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Adaptrum Anarion ethernet controller.

This device is a platform glue layer for stmmac.
Please see [stmmac.txt](</kernel/hardware/devicetree/bindings-net/stmmac.md>) for the other unchanged properties.

## Required properties:

- compatible:  Should be "adaptrum,anarion-gmac", "snps,dwmac"
- phy-mode:    Should be "rgmii". Other modes are not currently supported.

## Examples:

```dts
	gmac1: ethernet@f2014000 {
		compatible = "adaptrum,anarion-gmac", "snps,dwmac";
		reg = <0xf2014000 0x4000>, <0xf2018100 8>;

		interrupt-parent = <&core_intc>;
		interrupts = <21>;
		interrupt-names = "macirq";

		clocks = <&core_clk>;
		clock-names = "stmmaceth";

		phy-mode = "rgmii";
	};
```

---

# Broadcom bcm87xx bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Broadcom bcm87xx bindings.

The Broadcom BCM87XX devices are a family of 10G Ethernet PHYs.  They
have these bindings in addition to the standard PHY bindings.

Compatible: Should contain "broadcom,bcm8706" or "broadcom,bcm8727" and

```text
            "ethernet-phy-ieee802.3-c45"
```

## Optional Properties:

- broadcom,c45-reg-init : one of more sets of 4 cells.  The first cell
  is the MDIO Manageable Device (MMD) address, the second a register
  address within the MMD, the third cell contains a mask to be ANDed
  with the existing register value, and the fourth cell is ORed with
  he result to yield the new register value.  If the third cell has a
  value of zero, no read of the existing value is performed.

## Example:

```dts
	ethernet-phy@5 {
		reg = <5>;
		compatible = "broadcom,bcm8706", "ethernet-phy-ieee802.3-c45";
		interrupt-parent = <&gpio>;
		interrupts = <12 8>; /* Pin 12, active low */
		/*
		 * Set PMD Digital Control Register for
		 * GPIO[1] Tx/Rx
		 * GPIO[0] R64 Sync Acquired
		 */
		broadcom,c45-reg-init = <1 0xc808 0xff8f 0x70>;
	};
```

---

# Generic Bluetooth controller over USB (btusb driver)

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Generic Bluetooth controller over USB (btusb driver).

## Required properties:

- compatible : should comply with the format "usbVID,PID" specified in
  [Documentation/devicetree/bindings/usb/usb-device.yaml](</kernel/hardware/devicetree-bindings/dt-usb/usb-device.md>)
  At the time of writing, the only OF supported devices
  (more may be added later) are:

```text
		  "usb1286,204e" (Marvell 8997)
		  "usbcf3,e300" (Qualcomm QCA6174A)
		  "usb4ca,301a" (Qualcomm QCA6174A (Lite-On))
```

Also, vendors that use btusb may have device additional properties, e.g:
[Documentation/devicetree/bindings/net/bluetooth/marvell,sd8897-bt.yaml](</kernel/hardware/devicetree-bindings/dt-net/bluetooth/marvell-sd8897-bt.md>)

## Optional properties:

- interrupt-names: (see below)
- interrupts : The interrupt specified by the name "wakeup" is the interrupt
  that shall be used for out-of-band wake-on-bt. Driver will
  request this interrupt for wakeup. During system suspend, the
  irq will be enabled so that the bluetooth chip can wakeup host
  platform out of band. During system resume, the irq will be
  disabled to make sure unnecessary interrupt is not received.

## Example:

Following example uses irq pin number 3 of gpio0 for out of band wake-on-bt:

```dts
&usb_host1_ehci {
    #address-cells = <1>;
    #size-cells = <0>;

    mvl_bt1: bt@1 {
	compatible = "usb1286,204e";
	reg = <1>;
	interrupt-parent = <&gpio0>;
	interrupt-names = "wakeup";
	interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
    };
};
```

---

# System Management Interface (SMI) / MDIO

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for System Management Interface (SMI) / MDIO.

## Properties:

- compatible: One of:

```text
   "cavium,octeon-3860-mdio": Compatibility with all cn3XXX, cn5XXX
```

```text
                       and cn6XXX SOCs.
```

```text
   "cavium,thunder-8890-mdio": Compatibility with all cn8XXX SOCs.
```

- reg: The base address of the MDIO bus controller register bank.

- #address-cells: Must be &lt;1&gt;.

- #size-cells: Must be &lt;0&gt;.  MDIO addresses have no size component.

Typically an MDIO bus might have several children.

## Example:

```dts
	mdio@1180000001800 {
		compatible = "cavium,octeon-3860-mdio";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x11800 0x00001800 0x0 0x40>;

		ethernet-phy@0 {
			...
			reg = <0>;
		};
	};
```

- System Management Interface (SMI) / MDIO Nexus

```text
  Several mdio buses may be gathered as children of a single PCI
  device, this PCI device is the nexus of the buses.
```

## Properties:

- compatible: "cavium,thunder-8890-mdio-nexus";

- reg: The PCI device and function numbers of the nexus device.

- #address-cells: Must be &lt;2&gt;.

- #size-cells: Must be &lt;2&gt;.

- ranges: As needed for mapping of the MDIO bus device registers.

- assigned-addresses: As needed for mapping of the MDIO bus device registers.

## Example:

```dts
        mdio-nexus@1,3 {
                compatible = "cavium,thunder-8890-mdio-nexus";
                #address-cells = <2>;
                #size-cells = <2>;
                reg = <0x0b00 0 0 0 0>; /* DEVFN = 0x0b (1:3) */
                assigned-addresses = <0x03000000 0x87e0 0x05000000 0x0 0x800000>;
                ranges = <0x87e0 0x05000000 0x03000000 0x87e0 0x05000000 0x0 0x800000>;

                mdio0@87e0,05003800 {
                        compatible = "cavium,thunder-8890-mdio";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0x87e0 0x05003800 0x0 0x30>;

                        ethernet-phy@0 {
                                ...
                                reg = <0>;
                        };
                };
                mdio0@87e0,05003880 {
                        compatible = "cavium,thunder-8890-mdio";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0x87e0 0x05003880 0x0 0x30>;

                        ethernet-phy@0 {
                                ...
                                reg = <0>;
                        };
                };
        };
```

---

# MIX Ethernet controller.

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for MIX Ethernet controller..

## Properties:

- compatible: "cavium,octeon-5750-mix"

```text
  Compatibility with all cn5XXX and cn6XXX SOCs populated with MIX
  devices.
```

- reg: The base addresses of four separate register banks.  The first
  bank contains the MIX registers.  The second bank the corresponding
  AGL registers.  The third bank are the AGL registers shared by all
  MIX devices present.  The fourth bank is the AGL\_PRT\_CTL shared by
  all MIX devices present.

- cell-index: A single cell specifying which portion of the shared
  register banks corresponds to this MIX device.

- interrupts: Two interrupt specifiers.  The first is the MIX
  interrupt routing and the second the routing for the AGL interrupts.

- phy-handle: Optional, see [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) file in the same directory.

## Example:

```dts
	ethernet@1070000100800 {
		compatible = "cavium,octeon-5750-mix";
		reg = <0x10700 0x00100800 0x0 0x100>, /* MIX */
		      <0x11800 0xE0000800 0x0 0x300>, /* AGL */
		      <0x11800 0xE0000400 0x0 0x400>, /* AGL_SHARED  */
		      <0x11800 0xE0002008 0x0 0x8>;   /* AGL_PRT_CTL */
		cell-index = <1>;
		interrupts = <1 18>, < 1 46>;
		local-mac-address = [ 00 0f b7 10 63 54 ];
		phy-handle = <&phy1>;
	};
```

---

# PIP Ethernet nexus.

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for PIP Ethernet nexus..

The PIP Ethernet nexus can control several data packet input/output
devices.  The devices have a two level grouping scheme.  There may be
several interfaces, and each interface may have several ports.  These
ports might be an individual Ethernet PHY.

## Properties for the PIP nexus:

- compatible: "cavium,octeon-3860-pip"

```text
  Compatibility with all cn3XXX, cn5XXX and cn6XXX SOCs.
```

- reg: The base address of the PIP's register bank.

- #address-cells: Must be &lt;1&gt;.

- #size-cells: Must be &lt;0&gt;.

Properties for PIP interfaces which is a child the PIP nexus:

- compatible: "cavium,octeon-3860-pip-interface"

```text
  Compatibility with all cn3XXX, cn5XXX and cn6XXX SOCs.
```

- reg: The interface number.

- #address-cells: Must be &lt;1&gt;.

- #size-cells: Must be &lt;0&gt;.

Properties for PIP port which is a child the PIP interface:

- compatible: "cavium,octeon-3860-pip-port"

```text
  Compatibility with all cn3XXX, cn5XXX and cn6XXX SOCs.
```

- reg: The port number within the interface group.

- phy-handle: Optional, see [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) file in the same directory.

- rx-delay: Delay value for RGMII receive clock. Optional. Disabled if 0.
  Value range is 1-31, and mapping to the actual delay varies depending on HW.

- tx-delay: Delay value for RGMII transmit clock. Optional. Disabled if 0.
  Value range is 1-31, and mapping to the actual delay varies depending on HW.

## Example:

```dts
	pip@11800a0000000 {
		compatible = "cavium,octeon-3860-pip";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x11800 0xa0000000 0x0 0x2000>;

		interface@0 {
			compatible = "cavium,octeon-3860-pip-interface";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>; /* interface */

			ethernet@0 {
				compatible = "cavium,octeon-3860-pip-port";
				reg = <0x0>; /* Port */
				local-mac-address = [ 00 0f b7 10 63 60 ];
				phy-handle = <&phy2>;
			};
			ethernet@1 {
				compatible = "cavium,octeon-3860-pip-port";
				reg = <0x1>; /* Port */
				local-mac-address = [ 00 0f b7 10 63 61 ];
				phy-handle = <&phy3>;
			};
			ethernet@2 {
				compatible = "cavium,octeon-3860-pip-port";
				reg = <0x2>; /* Port */
				local-mac-address = [ 00 0f b7 10 63 62 ];
				phy-handle = <&phy4>;
			};
			ethernet@3 {
				compatible = "cavium,octeon-3860-pip-port";
				reg = <0x3>; /* Port */
				local-mac-address = [ 00 0f b7 10 63 63 ];
				phy-handle = <&phy5>;
			};
		};

		interface@1 {
			compatible = "cavium,octeon-3860-pip-interface";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>; /* interface */

			ethernet@0 {
				compatible = "cavium,octeon-3860-pip-port";
				reg = <0x0>; /* Port */
				local-mac-address = [ 00 0f b7 10 63 64 ];
				phy-handle = <&phy6>;
			};
		};
	};
```

---

# Cirrus Logic CS8900/CS8920 Network Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Cirrus Logic CS8900/CS8920 Network Controller.

## Required properties:

- compatible	: Should be "cirrus,cs8900" or "cirrus,cs8920".
- reg		: Address and length of the IO space.
- interrupts	: Should contain the controller interrupt line.

## Examples:

```dts
	eth0: eth@10000000 {
		compatible = "cirrus,cs8900";
		reg = <0x10000000 0x400>;
		interrupts = <10>;
	};
```

---

# Cortina Phy Driver Device Tree Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Cortina Phy Driver Device Tree Bindings.

CORTINA is a registered trademark of Cortina Systems, Inc.

The driver supports the Cortina Electronic Dispersion Compensation (EDC)
devices, equipped with clock and data recovery (CDR) circuits. These
devices make use of registers that are not compatible with Clause 45 or
Clause 22, therefore they need to be described using the
"ethernet-phy-id" compatible.

Since the driver only implements  polling mode support, interrupts info
can be skipped.

## Example (CS4340 phy):

```dts
	mdio {
		cs4340_phy@10 {
			compatible = "ethernet-phy-id13e5.1002";
			reg = <0x10>;
		};
	};
```

---

# TI CPSW Phy mode Selection Device Tree Bindings (DEPRECATED)

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for TI CPSW Phy mode Selection Device Tree Bindings (DEPRECATED).

## Required properties:

- compatible		: Should be "ti,am3352-cpsw-phy-sel" for am335x platform and
  "ti,dra7xx-cpsw-phy-sel" for dra7xx platform
  "ti,am43xx-cpsw-phy-sel" for am43xx platform
- reg			: physical base address and size of the cpsw
  registers map
- reg-names		: names of the register map given in "reg" node

## Optional properties:

-rmii-clock-ext		: If present, the driver will configure the RMII

```text
			  interface to external clock usage
```

## Examples:

```dts
	phy_sel: cpsw-phy-sel@44e10650 {
		compatible = "ti,am3352-cpsw-phy-sel";
		reg= <0x44e10650 0x4>;
		reg-names = "gmii-sel";
	};
```

(or)

```dts
	phy_sel: cpsw-phy-sel@44e10650 {
		compatible = "ti,am3352-cpsw-phy-sel";
		reg= <0x44e10650 0x4>;
		reg-names = "gmii-sel";
		rmii-clock-ext;
	};
```

---

# TI SoC Ethernet Switch Controller Device Tree Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for TI SoC Ethernet Switch Controller Device Tree Bindings.

## Required properties:

- compatible		: Should be one of the below:-
  "ti,cpsw" for backward compatible
  "ti,am335x-cpsw" for AM335x controllers
  "ti,am4372-cpsw" for AM437x controllers
  "ti,dra7-cpsw" for DRA7x controllers
- reg			: physical base address and size of the cpsw
  registers map
- interrupts		: property with a value describing the interrupt
  number
- cpdma\_channels 	: Specifies number of channels in CPDMA
- ale\_entries		: Specifies No of entries ALE can hold
- bd\_ram\_size		: Specifies internal descriptor RAM size
- mac\_control		: Specifies Default MAC control register content
  for the specific platform
- slaves		: Specifies number for slaves
- active\_slave		: Specifies the slave to use for time stamping,
  ethtool and SIOCGMIIPHY
- cpsw-phy-sel		: Specifies the phandle to the CPSW phy mode selection
  device. See also [cpsw-phy-sel.txt](</kernel/hardware/devicetree/bindings-net/cpsw-phy-sel.md>) for its binding.
  Note that in legacy cases cpsw-phy-sel may be
  a child device instead of a phandle
  (DEPRECATED, use phys property instead).

## Optional properties:

- ti,hwmods		: Must be "cpgmac0"
- dual\_emac		: Specifies Switch to act as Dual EMAC
- syscon		: Phandle to the system control device node, which is
  the control module device of the am33x
- mode-gpios		: Should be added if one/multiple gpio lines are
  required to be driven so that cpsw data lines
  can be connected to the phy via selective mux.
  For example in dra72x-evm, pcf gpio has to be
  driven low so that cpsw slave 0 and phy data
  lines are connected via mux.
- cpts\_clock\_mult	: Numerator to convert input clock ticks into nanoseconds
- cpts\_clock\_shift	: Denominator to convert input clock ticks into nanoseconds
  Mult and shift will be calculated basing on CPTS
  rftclk frequency if both cpts\_clock\_shift and
  cpts\_clock\_mult properties are not provided.

## Slave Properties:

Required properties:

- phy-mode		: See [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) file in the same directory
- phys			: phandle on phy-gmii-sel PHY (see phy/ti-phy-gmii-sel.txt)

## Optional properties:

- dual\_emac\_res\_vlan	: Specifies VID to be used to segregate the ports
- phy\_id		: Specifies slave phy id (deprecated, use phy-handle)
- phy-handle		: See [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) file in the same directory

The MAC address will be determined using the optional properties
defined in [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>).

## Slave sub-nodes:

- fixed-link		: See [fixed-link.txt](</kernel/hardware/devicetree/bindings-net/fixed-link.md>) file in the same directory

Note: Exactly one of phy\_id, phy-handle, or fixed-link must be specified.

Note: "ti,hwmods" field is used to fetch the base address and irq
resources from TI, omap hwmod data base during device registration.
Future plan is to migrate hwmod data base contents into device tree
blob so that, all the required data will be used from device tree dts
file.

## Examples:

```dts
	mac: ethernet@4a100000 {
		compatible = "ti,cpsw";
		reg = <0x4A100000 0x1000>;
		interrupts = <55 0x4>;
		interrupt-parent = <&intc>;
		cpdma_channels = <8>;
		ale_entries = <1024>;
		bd_ram_size = <0x2000>;
		rx_descs = <64>;
		mac_control = <0x20>;
		slaves = <2>;
		active_slave = <0>;
		cpts_clock_mult = <0x80000000>;
		cpts_clock_shift = <29>;
		syscon = <&cm>;
		cpsw-phy-sel = <&phy_sel>;
		cpsw_emac0: slave@0 {
			phy_id = <&davinci_mdio>, <0>;
			phy-mode = "rgmii-txid";
			/* Filled in by U-Boot */
			mac-address = [ 00 00 00 00 00 00 ];
			phys = <&phy_gmii_sel 1 0>;
		};
		cpsw_emac1: slave@1 {
			phy_id = <&davinci_mdio>, <1>;
			phy-mode = "rgmii-txid";
			/* Filled in by U-Boot */
			mac-address = [ 00 00 00 00 00 00 ];
			phys = <&phy_gmii_sel 2 0>;
		};
	};
```

(or)

```dts
	mac: ethernet@4a100000 {
		compatible = "ti,cpsw";
		ti,hwmods = "cpgmac0";
		cpdma_channels = <8>;
		ale_entries = <1024>;
		bd_ram_size = <0x2000>;
		rx_descs = <64>;
		mac_control = <0x20>;
		slaves = <2>;
		active_slave = <0>;
		cpts_clock_mult = <0x80000000>;
		cpts_clock_shift = <29>;
		syscon = <&cm>;
		cpsw-phy-sel = <&phy_sel>;
		cpsw_emac0: slave@0 {
			phy_id = <&davinci_mdio>, <0>;
			phy-mode = "rgmii-txid";
			/* Filled in by U-Boot */
			mac-address = [ 00 00 00 00 00 00 ];
			phys = <&phy_gmii_sel 1 0>;
		};
		cpsw_emac1: slave@1 {
			phy_id = <&davinci_mdio>, <1>;
			phy-mode = "rgmii-txid";
			/* Filled in by U-Boot */
			mac-address = [ 00 00 00 00 00 00 ];
			phys = <&phy_gmii_sel 2 0>;
		};
	};
```

---

# Texas Instruments Davinci EMAC

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Texas Instruments Davinci EMAC.

This file provides information, what the device node
for the davinci\_emac interface contains.

## Required properties:

- compatible: "ti,davinci-dm6467-emac", "ti,am3517-emac" or
  "ti,dm816-emac"
- reg: Offset and length of the register set for the device
- ti,davinci-ctrl-reg-offset: offset to control register
- ti,davinci-ctrl-mod-reg-offset: offset to control module register
- ti,davinci-ctrl-ram-offset: offset to control module ram
- ti,davinci-ctrl-ram-size: size of control module ram
- interrupts: interrupt mapping for the davinci emac interrupts sources:
  4 sources: &lt;Receive Threshold Interrupt
  Receive Interrupt
  Transmit Interrupt
  Miscellaneous Interrupt&gt;

## Optional properties:

- phy-handle: See [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) file in the same directory.
  If absent, davinci\_emac driver defaults to 100/FULL.
- ti,davinci-rmii-en: 1 byte, 1 means use RMII
- ti,davinci-no-bd-ram: boolean, does EMAC have BD RAM?

The MAC address will be determined using the optional properties
defined in [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>).

## Example (enbw\_cmc board):

```dts
	eth0: emac@1e20000 {
		compatible = "ti,davinci-dm6467-emac";
		reg = <0x220000 0x4000>;
		ti,davinci-ctrl-reg-offset = <0x3000>;
		ti,davinci-ctrl-mod-reg-offset = <0x2000>;
		ti,davinci-ctrl-ram-offset = <0>;
		ti,davinci-ctrl-ram-size = <0x2000>;
		local-mac-address = [ 00 00 00 00 00 00 ];
		interrupts = <33
				34
				35
				36
				>;
		interrupt-parent = <&intc>;
	};
```

---

# Ethernet bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Ethernet bindings.

This file has moved to [ethernet-controller.yaml](</kernel/hardware/devicetree-bindings/dt-net/ethernet-controller.md>).

---

# EZchip NPS Management Ethernet port driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for EZchip NPS Management Ethernet port driver.

## Required properties:

- compatible: Should be "ezchip,nps-mgt-enet"
- reg: Address and length of the register set for the device
- interrupts: Should contain the ENET interrupt

## Examples:

```dts
	ethernet@f0003000 {
		compatible = "ezchip,nps-mgt-enet";
		reg = <0xf0003000 0x44>;
		interrupts = <7>;
		mac-address = [ 00 11 22 33 44 55 ];
	};
```

---

# Faraday Ethernet Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Faraday Ethernet Controller.

## Required properties:

- compatible : Must contain "faraday,ftmac", as well as one of
  the SoC specific identifiers:
  "andestech,atmac100"
  "moxa,moxart-mac"
- reg : Should contain register location and length
- interrupts : Should contain the mac interrupt number

## Example:

```dts
	mac0: mac@90900000 {
		compatible = "moxa,moxart-mac";
		reg =	<0x90900000 0x100>;
		interrupts = <25 0>;
	};
```

```dts
	mac1: mac@92000000 {
		compatible = "moxa,moxart-mac";
		reg =	<0x92000000 0x100>;
		interrupts = <27 0>;
	};
```

---

# Fixed link bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Fixed link bindings.

This file has moved to [ethernet-controller.yaml](</kernel/hardware/devicetree-bindings/dt-net/ethernet-controller.md>).

---

# MDIO IO device

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for MDIO IO device.

Refer to [Documentation/devicetree/bindings/net/fsl,gianfar-mdio.yaml](</kernel/hardware/devicetree-bindings/dt-net/fsl-gianfar-mdio.md>)

- TBI Internal MDIO bus

Refer to [Documentation/devicetree/bindings/net/fsl,gianfar-mdio.yaml](</kernel/hardware/devicetree-bindings/dt-net/fsl-gianfar-mdio.md>)

- Gianfar-compatible ethernet nodes

Refer to [Documentation/devicetree/bindings/net/fsl,gianfar.yaml](</kernel/hardware/devicetree-bindings/dt-net/fsl-gianfar.md>)

- Gianfar PTP clock nodes

Refer to [Documentation/devicetree/bindings/ptp/fsl,ptp.yaml](</kernel/hardware/devicetree-bindings/dt-ptp/fsl-ptp.md>)

---

# Hisilicon Fast Ethernet MDIO Controller interface

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Hisilicon Fast Ethernet MDIO Controller interface.

## Required properties:

- compatible: should be "hisilicon,hisi-femac-mdio".
- reg: address and length of the register set for the device.
- clocks: A phandle to the reference clock for this device.

- PHY subnode: inherits from phy binding \[1\]
  \[1\] [Documentation/devicetree/bindings/net/phy.txt](</kernel/hardware/devicetree/bindings-net/phy.md>)

## Example:

```dts
mdio: mdio@10091100 {
	compatible = "hisilicon,hisi-femac-mdio";
	reg = <0x10091100 0x10>;
	clocks = <&crg HI3516CV300_MDIO_CLK>;
	#address-cells = <1>;
	#size-cells = <0>;

	phy0: phy@1 {
		reg = <1>;
	};
};
```

---

# Hisilicon Fast Ethernet MAC controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Hisilicon Fast Ethernet MAC controller.

## Required properties:

```text
- compatible: should contain one of the following version strings:
	* "hisilicon,hisi-femac-v1"
	* "hisilicon,hisi-femac-v2"
	and the soc string "hisilicon,hi3516cv300-femac".
- reg: specifies base physical address(s) and size of the device registers.
  The first region is the MAC core register base and size.
  The second region is the global MAC control register.
- interrupts: should contain the MAC interrupt.
- clocks: A phandle to the MAC main clock.
- resets: should contain the phandle to the MAC reset signal(required) and
	the PHY reset signal(optional).
- reset-names: should contain the reset signal name "mac"(required)
	and "phy"(optional).
- phy-mode: see ethernet.txt [1].
- phy-handle: see ethernet.txt [1].
- hisilicon,phy-reset-delays-us: triplet of delays if PHY reset signal given.
	The 1st cell is reset pre-delay in micro seconds.
	The 2nd cell is reset pulse in micro seconds.
	The 3rd cell is reset post-delay in micro seconds.
```

The MAC address will be determined using the optional properties
defined in [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>)\[1\].

\[1\] [Documentation/devicetree/bindings/net/ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>)

## Example:

```dts
	hisi_femac: ethernet@10090000 {
		compatible = "hisilicon,hi3516cv300-femac","hisilicon,hisi-femac-v2";
		reg = <0x10090000 0x1000>,<0x10091300 0x200>;
		interrupts = <12>;
		clocks = <&crg HI3518EV200_ETH_CLK>;
		resets = <&crg 0xec 0>,<&crg 0xec 3>;
		reset-names = "mac","phy";
		mac-address = [00 00 00 00 00 00];
		phy-mode = "mii";
		phy-handle = <&phy0>;
		hisilicon,phy-reset-delays-us = <10000 20000 20000>;
	};
```

---

# Hisilicon hip04 Ethernet Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Hisilicon hip04 Ethernet Controller.

- Ethernet controller node

## Required properties:

- compatible: should be "hisilicon,hip04-mac".
- reg: address and length of the register set for the device.
- interrupts: interrupt for the device.
- port-handle: &lt;phandle port channel&gt;
  phandle, specifies a reference to the syscon ppe node
  port, port number connected to the controller
  channel, recv channel start from channel \* number (RX\_DESC\_NUM)
  group, field in the pkg desc, in general, it is the same as the port.
- phy-mode: see [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) \[1\].

## Optional properties:

- phy-handle: see [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) \[1\].

\[1\] [Documentation/devicetree/bindings/net/ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>)

- MDIO bus node:

## Required properties:

- compatible: should be "hisilicon,mdio".
- Inherits from MDIO bus node binding \[2\]
  \[2\] [Documentation/devicetree/bindings/net/phy.txt](</kernel/hardware/devicetree/bindings-net/phy.md>)

## Example:

```dts
	mdio {
		compatible = "hisilicon,mdio";
		reg = <0x28f1000 0x1000>;
		#address-cells = <1>;
		#size-cells = <0>;

		phy0: ethernet-phy@0 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <0>;
			marvell,reg-init = <18 0x14 0 0x8001>;
		};

		phy1: ethernet-phy@1 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <1>;
			marvell,reg-init = <18 0x14 0 0x8001>;
		};
	};
```

```dts
	ppe: ppe@28c0000 {
		compatible = "hisilicon,hip04-ppe", "syscon";
		reg = <0x28c0000 0x10000>;
	};
```

```dts
	fe: ethernet@28b0000 {
		compatible = "hisilicon,hip04-mac";
		reg = <0x28b0000 0x10000>;
		interrupts = <0 413 4>;
		phy-mode = "mii";
		port-handle = <&ppe 31 0 31>;
	};
```

```dts
	ge0: ethernet@2800000 {
		compatible = "hisilicon,hip04-mac";
		reg = <0x2800000 0x10000>;
		interrupts = <0 402 4>;
		phy-mode = "sgmii";
		port-handle = <&ppe 0 1 0>;
		phy-handle = <&phy0>;
	};
```

```dts
	ge8: ethernet@2880000 {
		compatible = "hisilicon,hip04-mac";
		reg = <0x2880000 0x10000>;
		interrupts = <0 410 4>;
		phy-mode = "sgmii";
		port-handle = <&ppe 8 2 8>;
		phy-handle = <&phy1>;
	};
```

---

# Hisilicon hix5hd2 gmac controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Hisilicon hix5hd2 gmac controller.

## Required properties:

```text
- compatible: should contain one of the following SoC strings:
	* "hisilicon,hix5hd2-gmac"
	* "hisilicon,hi3798cv200-gmac"
	* "hisilicon,hi3516a-gmac"
	and one of the following version string:
	* "hisilicon,hisi-gmac-v1"
	* "hisilicon,hisi-gmac-v2"
  The version v1 includes SoCs hix5hd2.
  The version v2 includes SoCs hi3798cv200, hi3516a.
- reg: specifies base physical address(s) and size of the device registers.
  The first region is the MAC register base and size.
  The second region is external interface control register.
- interrupts: should contain the MAC interrupt.
- #address-cells: must be <1>.
- #size-cells: must be <0>.
- phy-mode: see ethernet.txt [1].
- phy-handle: see ethernet.txt [1].
- clocks: clock phandle and specifier pair.
- clock-names: contain the clock name "mac_core"(required) and "mac_ifc"(optional).
- resets: should contain the phandle to the MAC core reset signal(optional),
	the MAC interface reset signal(optional)
	and the PHY reset signal(optional).
- reset-names: contain the reset signal name "mac_core"(optional),
	"mac_ifc"(optional) and "phy"(optional).
- hisilicon,phy-reset-delays-us: triplet of delays if PHY reset signal given.
	The 1st cell is reset pre-delay in micro seconds.
	The 2nd cell is reset pulse in micro seconds.
	The 3rd cell is reset post-delay in micro seconds.
```

The MAC address will be determined using the properties defined in
[ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>)\[1\].

- PHY subnode: inherits from phy binding \[2\]

\[1\] [Documentation/devicetree/bindings/net/ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>)
\[2\] [Documentation/devicetree/bindings/net/phy.txt](</kernel/hardware/devicetree/bindings-net/phy.md>)

## Example:

```dts
	gmac0: ethernet@f9840000 {
		compatible = "hisilicon,hi3798cv200-gmac", "hisilicon,hisi-gmac-v2";
		reg = <0xf9840000 0x1000>,<0xf984300c 0x4>;
		interrupts = <0 71 4>;
		#address-cells = <1>;
		#size-cells = <0>;
		phy-mode = "rgmii";
		phy-handle = <&phy2>;
		mac-address = [00 00 00 00 00 00];
		clocks = <&crg HISTB_ETH0_MAC_CLK>, <&crg HISTB_ETH0_MACIF_CLK>;
		clock-names = "mac_core", "mac_ifc";
		resets = <&crg 0xcc 8>, <&crg 0xcc 10>, <&crg 0xcc 12>;
		reset-names = "mac_core", "mac_ifc", "phy";
		hisilicon,phy-reset-delays-us = <10000 10000 30000>;

		phy2: ethernet-phy@2 {
			reg = <2>;
		};
	};
```

---

# Hisilicon DSA Fabric device controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Hisilicon DSA Fabric device controller.

## Required properties:

- compatible: should be "hisilicon,hns-dsaf-v1" or "hisilicon,hns-dsaf-v2".
  "hisilicon,hns-dsaf-v1" is for hip05.
  "hisilicon,hns-dsaf-v2" is for Hi1610 and Hi1612.
- mode: dsa fabric mode string. only support one of dsaf modes like these:
  "2port-64vf",
  "6port-16rss",
  "6port-16vf",
  "single-port".
- interrupts: should contain the DSA Fabric and rcb interrupt.
- reg: specifies base physical address(es) and size of the device registers.
  The first region is external interface control register base and size(optional,
  only used when subctrl-syscon does not exist). It is recommended using
  subctrl-syscon rather than this address.
  The second region is SerDes base register and size(optional, only used when
  serdes-syscon in port node does not exist). It is recommended using
  serdes-syscon rather than this address.
  The third region is the PPE register base and size.
  The fourth region is dsa fabric base register and size. It is not required for
  single-port mode.
- reg-names: may be ppe-base and(or) dsaf-base. It is used to find the
  corresponding reg's index.

- phy-handle: phy handle of physical port, 0 if not any phy device. It is optional
  attribute. If port node exists, phy-handle in each port node will be used.
  see [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) \[1\].
- subctrl-syscon: is syscon handle for external interface control register.
- reset-field-offset: is offset of reset field. Its value depends on the hardware
  user manual.
- buf-size: rx buffer size, should be 16-1024.
- desc-num: number of description in TX and RX queue, should be 512, 1024, 2048 or 4096.

- port: subnodes of dsaf. A dsaf node may contain several port nodes(Depending
  on mode of dsaf). Port node contain some attributes listed below:
- reg: is physical port index in one dsaf.
- phy-handle: phy handle of physical port. It is not required if there isn't
  phy device. see [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) \[1\].
- serdes-syscon: is syscon handle for SerDes register.
- cpld-syscon: is syscon handle + register offset pair for cpld register. It is
  not required if there isn't cpld device.
- port-rst-offset: is offset of reset field for each port in dsaf. Its value
  depends on the hardware user manual.
- port-mode-offset: is offset of port mode field for each port in dsaf. Its
  value depends on the hardware user manual.
- mc-mac-mask: mask of multicast address, determines bit in multicast address
  to set:
  1 stands for this bit will be precisely matched, TCAM will check this bit of
  MAC address.
  0 stands for this bit will be fuzzy matched, TCAM won't care about this bit
  of MAC address.

\[1\] [Documentation/devicetree/bindings/net/phy.txt](</kernel/hardware/devicetree/bindings-net/phy.md>)

## Example:

```dts
dsaf0: dsa@c7000000 {
	compatible = "hisilicon,hns-dsaf-v1";
	mode = "6port-16rss";
	interrupt-parent = <&mbigen_dsa>;
	reg = <0x0 0xc5000000 0x0 0x890000
	       0x0 0xc7000000 0x0 0x60000>;
	reg-names = "ppe-base", "dsaf-base";
	subctrl-syscon = <&subctrl>;
	reset-field-offset = 0;
	interrupts = <131 4>,<132 4>, <133 4>,<134 4>,
		     <135 4>,<136 4>, <137 4>,<138 4>,
		     <139 4>,<140 4>, <141 4>,<142 4>,
		     <143 4>,<144 4>, <145 4>,<146 4>,
		     <147 4>,<148 4>, <384 1>,<385 1>,
		     <386 1>,<387 1>, <388 1>,<389 1>,
		     <390 1>,<391 1>,
	buf-size = <4096>;
	desc-num = <1024>;
	dma-coherent;

	port@0 {
		reg = 0;
		phy-handle = <&phy0>;
		serdes-syscon = <&serdes>;
		mc-mac-mask = [ff f0 00 00 00 00];
	};

	port@1 {
                reg = 1;
                serdes-syscon = <&serdes>;
		mc-mac-mask = [ff f0 00 00 00 00];
        };
};
```

---

# Hisilicon MDIO bus controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Hisilicon MDIO bus controller.

## Properties:

- compatible: can be one of:
  "hisilicon,hns-mdio"
  "hisilicon,mdio"
  "hisilicon,hns-mdio" is recommended to be used for hip05 and later SOCs,
  while "hisilicon,mdio" is optional for backwards compatibility only on
  hip04 Soc.
- reg: The base address of the MDIO bus controller register bank.
- #address-cells: Must be &lt;1&gt;.
- #size-cells: Must be &lt;0&gt;.  MDIO addresses have no size component.

Typically an MDIO bus might have several children.

## Example:

```dts
         mdio@803c0000 {
                   #address-cells = <1>;
                   #size-cells = <0>;
                   compatible = "hisilicon,hns-mdio","hisilicon,mdio";
                   reg = <0x0 0x803c0000 0x0 0x10000>;

                   ethernet-phy@0 {
                            ...
                            reg = <0>;
                   };
         };
```

---

# Hisilicon Network Subsystem NIC controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Hisilicon Network Subsystem NIC controller.

## Required properties:

- compatible: "hisilicon,hns-nic-v1" or "hisilicon,hns-nic-v2".
  "hisilicon,hns-nic-v1" is for hip05.
  "hisilicon,hns-nic-v2" is for Hi1610 and Hi1612.
- ae-handle: accelerator engine handle for hns,
  specifies a reference to the associating hardware driver node.
  see [Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt](</kernel/hardware/devicetree/bindings-net/hisilicon-hns-dsaf.md>)
- port-id: is the index of port provided by DSAF (the accelerator). DSAF can
  connect to 8 PHYs. Port 0 to 1 are both used for administration purpose. They
  are called debug ports.

```text
  The remaining 6 PHYs are taken according to the mode of DSAF.
```

```text
  In NIC mode of DSAF, all 6 PHYs are taken as ethernet ports to the CPU. The
  port-id can be 2 to 7. Here is the diagram:
```

```text
            +-----+---------------+
            |            CPU      |
            +-+-+-+---+-+-+-+-+-+-+
              | |     | | | | | |
             debug       service
             port         port
             (0,1)       (2-7)
```

```text
  In Switch mode of DSAF, all 6 PHYs are taken as physical ports connect to a
  LAN Switch while the CPU side assume itself have one single NIC connect to
  this switch. In this case, the port-id will be 2 only.
```

```text
            +-----+---------------+
            |            CPU      |
            +-+-+-+---+-+-+-+-+-+-+
              | |   service| port(2)
             debug   +------------+
             port    |   switch   |
             (0,1)   +-+-+-+-+-+-++
                       | | | | | |
                      external port
```

```text
  This attribute is remained for compatible purpose. It is not recommended to
  use it in new code.
```

- port-idx-in-ae: is the index of port provided by AE.
  In NIC mode of DSAF, all 6 PHYs of service DSAF are taken as ethernet ports
  to the CPU. The port-idx-in-ae can be 0 to 5. Here is the diagram:
  +-----+---------------+
  |            CPU      |
  +-+-+-+---+-+-+-+-+-+-+
  |    |   | | | | | |
  debug debug   service
  port  port     port
  (0)   (0)     (0-5)

```text
  In Switch mode of DSAF, all 6 PHYs of service DSAF are taken as physical
  ports connected to a LAN Switch while the CPU side assume itself have one
  single NIC connected to this switch. In this case, the port-idx-in-ae
  will be 0 only.
```

```text
            +-----+-----+------+------+
            |                CPU      |
            +-+-+-+-+-+-+-+-+-+-+-+-+-+
              |    |     service| port(0)
            debug debug  +------------+
            port  port   |   switch   |
            (0)   (0)    +-+-+-+-+-+-++
                          | | | | | |
                         external port
```

- local-mac-address: mac addr of the ethernet interface

## Example:

```dts
	ethernet@0{
		compatible = "hisilicon,hns-nic-v1";
		ae-handle = <&dsaf0>;
		port-idx-in-ae = <0>;
		local-mac-address = [a2 14 e4 4b 56 76];
	};
```

---

# 4xx/Axon EMAC ethernet nodes

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for 4xx/Axon EMAC ethernet nodes.

```text
    The EMAC ethernet controller in IBM and AMCC 4xx chips, and also
    the Axon bridge.  To operate this needs to interact with a this
    special McMAL DMA controller, and sometimes an RGMII or ZMII
    interface.  In addition to the nodes and properties described
    below, the node for the OPB bus on which the EMAC sits must have a
    correct clock-frequency property.
```

```text
      i) The EMAC node itself
```

## Required properties:

- device\_type       : "network"

- compatible        : compatible list, contains 2 entries, first is
  "ibm,emac-CHIP" where CHIP is the host ASIC (440gx,
  405gp, Axon) and second is either "ibm,emac" or
  "ibm,emac4".  For Axon, thus, we have: "ibm,emac-axon",
  "ibm,emac4"
- interrupts        : &lt;interrupt mapping for EMAC IRQ and WOL IRQ&gt;
- reg               : &lt;registers mapping&gt;
- local-mac-address : 6 bytes, MAC address
- mal-device        : phandle of the associated McMAL node
- mal-tx-channel    : 1 cell, index of the tx channel on McMAL associated
  with this EMAC
- mal-rx-channel    : 1 cell, index of the rx channel on McMAL associated
  with this EMAC
- cell-index        : 1 cell, hardware index of the EMAC cell on a given
  ASIC (typically 0x0 and 0x1 for EMAC0 and EMAC1 on
  each Axon chip)
- max-frame-size    : 1 cell, maximum frame size supported in bytes
- rx-fifo-size      : 1 cell, Rx fifo size in bytes for 10 and 100 Mb/sec
  operations.
  For Axon, 2048
- tx-fifo-size      : 1 cell, Tx fifo size in bytes for 10 and 100 Mb/sec
  operations.
  For Axon, 2048.
- fifo-entry-size   : 1 cell, size of a fifo entry (used to calculate
  thresholds).
  For Axon, 0x00000010
- mal-burst-size    : 1 cell, MAL burst size (used to calculate thresholds)
  in bytes.
  For Axon, 0x00000100 (I think ...)
- phy-mode          : string, mode of operations of the PHY interface.
  Supported values are: "mii", "rmii", "smii", "rgmii",
  "tbi", "gmii", rtbi", "sgmii".
  For Axon on CAB, it is "rgmii"
- mdio-device       : 1 cell, required iff using shared MDIO registers
  (440EP).  phandle of the EMAC to use to drive the
  MDIO lines for the PHY used by this EMAC.
- zmii-device       : 1 cell, required iff connected to a ZMII.  phandle of
  the ZMII device node
- zmii-channel      : 1 cell, required iff connected to a ZMII.  Which ZMII
  channel or 0xffffffff if ZMII is only used for MDIO.
- rgmii-device      : 1 cell, required iff connected to an RGMII. phandle
  of the RGMII device node.
  For Axon: phandle of plb5/plb4/opb/rgmii
- rgmii-channel     : 1 cell, required iff connected to an RGMII.  Which
  RGMII channel is used by this EMAC.
  Fox Axon: present, whatever value is appropriate for each
  EMAC, that is the content of the current (bogus) "phy-port"
  property.

## Optional properties:

```text
    - phy-address       : 1 cell, optional, MDIO address of the PHY. If absent,
			  a search is performed.
    - phy-map           : 1 cell, optional, bitmap of addresses to probe the PHY
			  for, used if phy-address is absent. bit 0x00000001 is
			  MDIO address 0.
			  For Axon it can be absent, though my current driver
			  doesn't handle phy-address yet so for now, keep
			  0x00ffffff in it.
    - phy-handle	: Used to describe configurations where a external PHY
			  is used. Please refer to:
			  Documentation/devicetree/bindings/net/ethernet.txt
    - rx-fifo-size-gige : 1 cell, Rx fifo size in bytes for 1000 Mb/sec
			  operations (if absent the value is the same as
			  rx-fifo-size).  For Axon, either absent or 2048.
    - tx-fifo-size-gige : 1 cell, Tx fifo size in bytes for 1000 Mb/sec
			  operations (if absent the value is the same as
			  tx-fifo-size). For Axon, either absent or 2048.
    - tah-device        : 1 cell, optional. If connected to a TAH engine for
			  offload, phandle of the TAH device node.
    - tah-channel       : 1 cell, optional. If appropriate, channel used on the
			  TAH engine.
    - fixed-link	: Fixed-link subnode describing a link to a non-MDIO
			  managed entity. See
			  Documentation/devicetree/bindings/net/fixed-link.txt
			  for details.
    - mdio subnode	: When the EMAC has a phy connected to its local
			  mdio, which us supported by the kernel's network
			  PHY library in drivers/net/phy, there must be device
			  tree subnode with the following required properties:
				- #address-cells: Must be <1>.
				- #size-cells: Must be <0>.
```

```text
			  For PHY definitions: Please refer to
			  Documentation/devicetree/bindings/net/phy.txt and
			  Documentation/devicetree/bindings/net/ethernet.txt
```

## Examples:

```dts
	EMAC0: ethernet@40000800 {
		device_type = "network";
		compatible = "ibm,emac-440gp", "ibm,emac";
		interrupt-parent = <&UIC1>;
		interrupts = <1c 4 1d 4>;
		reg = <40000800 70>;
		local-mac-address = [00 04 AC E3 1B 1E];
		mal-device = <&MAL0>;
		mal-tx-channel = <0 1>;
		mal-rx-channel = <0>;
		cell-index = <0>;
		max-frame-size = <5dc>;
		rx-fifo-size = <1000>;
		tx-fifo-size = <800>;
		phy-mode = "rmii";
		phy-map = <00000001>;
		zmii-device = <&ZMII0>;
		zmii-channel = <0>;
	};
```

```dts
	EMAC1: ethernet@ef600c00 {
		device_type = "network";
		compatible = "ibm,emac-apm821xx", "ibm,emac4sync";
		interrupt-parent = <&EMAC1>;
		interrupts = <0 1>;
		#interrupt-cells = <1>;
		#address-cells = <0>;
		#size-cells = <0>;
		interrupt-map = <0 &UIC2 0x10 IRQ_TYPE_LEVEL_HIGH /* Status */
				 1 &UIC2 0x14 IRQ_TYPE_LEVEL_HIGH /* Wake */>;
		reg = <0xef600c00 0x000000c4>;
		local-mac-address = [000000000000]; /* Filled in by U-Boot */
		mal-device = <&MAL0>;
		mal-tx-channel = <0>;
		mal-rx-channel = <0>;
		cell-index = <0>;
		max-frame-size = <9000>;
		rx-fifo-size = <16384>;
		tx-fifo-size = <2048>;
		fifo-entry-size = <10>;
		phy-mode = "rgmii";
		phy-handle = <&phy0>;
		phy-map = <0x00000000>;
		rgmii-device = <&RGMII0>;
		rgmii-channel = <0>;
		tah-device = <&TAH0>;
		tah-channel = <0>;
		has-inverted-stacr-oc;
		has-new-stacr-staopc;

	        mdio {
			#address-cells = <1>;
			#size-cells = <0>;

			phy0: ethernet-phy@0 {
				compatible = "ethernet-phy-ieee802.3-c22";
				reg = <0>;
			};
		};
	};
```

```text
      ii) McMAL node
```

## Required properties:

- device\_type        : "dma-controller"
- compatible         : compatible list, containing 2 entries, first is
  "ibm,mcmal-CHIP" where CHIP is the host ASIC (like
  emac) and the second is either "ibm,mcmal" or
  "ibm,mcmal2".
  For Axon, "ibm,mcmal-axon","ibm,mcmal2"
- interrupts         : &lt;interrupt mapping for the MAL interrupts sources:
  5 sources: tx\_eob, rx\_eob, serr, txde, rxde&gt;.
  For Axon: This is \_different\_ from the current
  firmware.  We use the "delayed" interrupts for txeob
  and rxeob. Thus we end up with mapping those 5 MPIC
  interrupts, all level positive sensitive: 10, 11, 32,
  33, 34 (in decimal)
- dcr-reg            : &lt; DCR registers range &gt;
- dcr-parent         : if needed for dcr-reg
- num-tx-chans       : 1 cell, number of Tx channels
- num-rx-chans       : 1 cell, number of Rx channels

```text
      iii) ZMII node
```

## Required properties:

- compatible         : compatible list, containing 2 entries, first is
  "ibm,zmii-CHIP" where CHIP is the host ASIC (like
  EMAC) and the second is "ibm,zmii".
  For Axon, there is no ZMII node.
- reg                : &lt;registers mapping&gt;

```text
      iv) RGMII node
```

## Required properties:

- compatible         : compatible list, containing 2 entries, first is
  "ibm,rgmii-CHIP" where CHIP is the host ASIC (like
  EMAC) and the second is "ibm,rgmii".
  For Axon, "ibm,rgmii-axon","ibm,rgmii"
- reg                : &lt;registers mapping&gt;
- revision           : as provided by the RGMII new version register if
  available.
  For Axon: 0x0000012a

---

# IC Plus Corp. IP101A / IP101G Ethernet PHYs

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for IC Plus Corp. IP101A / IP101G Ethernet PHYs.

## There are different models of the IP101G Ethernet PHY:

- IP101GR (32-pin QFN package)
- IP101G (die only, no package)
- IP101GA (48-pin LQFP package)

There are different models of the IP101A Ethernet PHY (which is the
predecessor of the IP101G):

- IP101A (48-pin LQFP package)
- IP101AH (48-pin LQFP package)

## Optional properties for the IP101GR (32-pin QFN package):

- icplus,select-rx-error:
  pin 21 ("RXER/INTR\_32") will output the receive error status.
  interrupts are not routed outside the PHY in this mode.
- icplus,select-interrupt:
  pin 21 ("RXER/INTR\_32") will output the interrupt signal.

---

# IPQ806x DWMAC Ethernet controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for IPQ806x DWMAC Ethernet controller.

The device inherits all the properties of the dwmac/stmmac devices
described in the file net/stmmac.txt with the following changes.

## Required properties:

- compatible: should be "qcom,ipq806x-gmac" along with "snps,dwmac"
  and any applicable more detailed version number
  described in net/stmmac.txt

- qcom,nss-common: should contain a phandle to a syscon device mapping the
  nss-common registers.

- qcom,qsgmii-csr: should contain a phandle to a syscon device mapping the
  qsgmii-csr registers.

## Example:

```dts
	gmac: ethernet@37000000 {
		device_type = "network";
		compatible = "qcom,ipq806x-gmac";
		reg = <0x37000000 0x200000>;
		interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "macirq";

		qcom,nss-common = <&nss_common>;
		qcom,qsgmii-csr = <&qsgmii_csr>;

		clocks = <&gcc GMAC_CORE1_CLK>;
		clock-names = "stmmaceth";

		resets = <&gcc GMAC_CORE1_RESET>;
		reset-names = "stmmaceth";
	};
```

---

# Keystone netcp bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Keystone netcp bindings.

This document describes the device tree bindings associated with the
keystone network coprocessor(NetCP) driver support.

The network coprocessor (NetCP) is a hardware accelerator that processes
Ethernet packets. NetCP has a gigabit Ethernet (GbE) subsystem with a ethernet
switch sub-module to send and receive packets. NetCP also includes a packet
accelerator (PA) module to perform packet classification operations such as
header matching, and packet modification operations such as checksum
generation. NetCP can also optionally include a Security Accelerator (SA)
capable of performing IPSec operations on ingress/egress packets.

Keystone II SoC's also have a 10 Gigabit Ethernet Subsystem (XGbE) which
includes a 3-port Ethernet switch sub-module capable of 10Gb/s and 1Gb/s rates
per Ethernet port.

Keystone NetCP driver has a plug-in module architecture where each of the NetCP
sub-modules exist as a loadable kernel module which plug in to the netcp core.
These sub-modules are represented as "netcp-devices" in the dts bindings. It is
mandatory to have the ethernet switch sub-module for the ethernet interface to
be operational. Any other sub-module like the PA is optional.

## NetCP Ethernet SubSystem Layout:

---

## NetCP subsystem(10G or 1G)

```text
	|
	|-> NetCP Devices ->	|
	|			|-> GBE/XGBE Switch
	|			|
	|			|-> Packet Accelerator
	|			|
	|			|-> Security Accelerator
	|
	|
	|
	|-> NetCP Interfaces ->	|
				|-> Ethernet Port 0
				|
				|-> Ethernet Port 1
				|
				|-> Ethernet Port 2
				|
				|-> Ethernet Port 3
```

## NetCP subsystem properties:

Required properties:

- compatible:	Should be "ti,netcp-1.0"
- clocks:	phandle to the reference clocks for the subsystem.
- dma-id:	Navigator packet dma instance id.
- ranges:	address range of NetCP (includes, Ethernet SS, PA and SA)

## Optional properties:

```text
- reg:		register location and the size for the following register
		regions in the specified order.
		- Efuse MAC address register
- dma-coherent:	Present if dma operations are coherent
- big-endian:	Keystone devices can be operated in a mode where the DSP is in
		the big endian mode. In such cases enable this option. This
		option should also be enabled if the ARM is operated in
		big endian mode with the DSP in little endian.
```

NetCP device properties: Device specification for NetCP sub-modules.
1Gb/10Gb (gbe/xgbe) ethernet switch sub-module specifications.
Required properties:

- label:	Must be "netcp-gbe" for 1Gb &amp; "netcp-xgbe" for 10Gb.
- compatible:	Must be one of below:-
  "ti,netcp-gbe" for 1GbE on NetCP 1.4
  "ti,netcp-gbe-5" for 1GbE N NetCP 1.5 (N=5)
  "ti,netcp-gbe-9" for 1GbE N NetCP 1.5 (N=9)
  "ti,netcp-gbe-2" for 1GbE N NetCP 1.5 (N=2)
  "ti,netcp-xgbe" for 10 GbE

```text
- reg:		register location and the size for the following register
		regions in the specified order.
		- switch subsystem registers
		- sgmii port3/4 module registers (only for NetCP 1.4)
		- switch module registers
		- serdes registers (only for 10G)
```

```text
		NetCP 1.4 ethss, here is the order
			index #0 - switch subsystem registers
			index #1 - sgmii port3/4 module registers
			index #2 - switch module registers
```

```text
		NetCP 1.5 ethss 9 port, 5 port and 2 port
			index #0 - switch subsystem registers
			index #1 - switch module registers
			index #2 - serdes registers
```

```text
- tx-channel:	the navigator packet dma channel name for tx.
- tx-queue:	the navigator queue number associated with the tx dma channel.
- interfaces:	specification for each of the switch port to be registered as a
		network interface in the stack.
-- slave-port:	Switch port number, 0 based numbering.
-- link-interface:	type of link interface, supported options are
			- mac<->mac auto negotiate mode: 0
			- mac<->phy mode: 1
			- mac<->mac forced mode: 2
			- mac<->fiber mode: 3
			- mac<->phy mode with no mdio: 4
			- 10Gb mac<->phy mode : 10
			- 10Gb mac<->mac forced mode : 11
----phy-handle:	phandle to PHY device
```

- cpts:		sub-node time synchronization (CPTS) submodule configuration
  -- clocks:	CPTS reference clock. Should point on cpts-refclk-mux clock.
  -- clock-names: should be "cpts"
  -- cpts-refclk-mux: multiplexer clock definition sub-node for CPTS reference (RFTCLK) clock
  --- #clock-cells: should be 0
  --- clocks:	list of CPTS reference (RFTCLK) clock's parents as defined in Data manual
  --- ti,mux-tbl: array of multiplexer indexes as defined in Data manual
  --- assigned-clocks: should point on cpts-refclk-mux clock
  --- assigned-clock-parents: should point on required RFTCLK clock parent to be selected
  -- cpts\_clock\_mult: (optional) Numerator to convert input clock ticks
  into nanoseconds
  -- cpts\_clock\_shift: (optional) Denominator to convert input clock ticks into
  nanoseconds.
  Mult and shift will be calculated basing on CPTS
  rftclk frequency if both cpts\_clock\_shift and
  cpts\_clock\_mult properties are not provided.

## Optional properties:

- enable-ale:	NetCP driver keeps the address learning feature in the ethernet
  switch module disabled. This attribute is to enable the address
  learning.
- secondary-slave-ports:	specification for each of the switch port not be
  registered as a network interface. NetCP driver
  will only initialize these ports and attach PHY
  driver to them if needed.

NetCP interface properties: Interface specification for NetCP sub-modules.
Required properties:

- rx-channel:	the navigator packet dma channel name for rx.
- rx-queue:	the navigator queue number associated with rx dma channel.
- rx-pool:	specifies the number of descriptors to be used &amp; the region-id
  for creating the rx descriptor pool.
- tx-pool:	specifies the number of descriptors to be used &amp; the region-id
  for creating the tx descriptor pool.
- rx-queue-depth:	number of descriptors in each of the free descriptor
  queue (FDQ) for the pktdma Rx flow. There can be at
  present a maximum of 4 queues per Rx flow.
- rx-buffer-size:	the buffer size for each of the Rx flow FDQ.
- tx-completion-queue:	the navigator queue number where the descriptors are
  recycled after Tx DMA completion.

## Optional properties:

- efuse-mac:	If this is 1, then the MAC address for the interface is
  obtained from the device efuse mac address register.
  If this is 2, the two DWORDs occupied by the MAC address
  are swapped.  The netcp driver will swap the two DWORDs
  back to the proper order when this property is set to 2
  when it obtains the mac address from efuse.
- "netcp-device label":	phandle to the device specification for each of NetCP
  sub-module attached to this interface.

The MAC address will be determined using the optional properties defined in
[ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) and only if efuse-mac is set to 0. If all of the optional MAC
address properties are not present, then the driver will use a random MAC
address.

## Example binding:

```dts
netcp: netcp@2000000 {
	reg = <0x2620110 0x8>;
	reg-names = "efuse";
	compatible = "ti,netcp-1.0";
	#address-cells = <1>;
	#size-cells = <1>;
	ranges  = <0 0x2000000 0xfffff>;
	clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>;
	dma-coherent;
	/* big-endian; */
	dma-id = <0>;

	netcp-devices {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
		gbe@90000 {
			label = "netcp-gbe";
			reg = <0x90000 0x300>, <0x90400 0x400>, <0x90800 0x700>;
			/* enable-ale; */
			tx-queue = <648>;
			tx-channel = <8>;

			cpts {
				clocks = <&cpts_refclk_mux>;
				clock-names = "cpts";

				cpts_refclk_mux: cpts-refclk-mux {
					#clock-cells = <0>;
					clocks = <&chipclk12>, <&chipclk13>,
						 <&timi0>, <&timi1>,
						 <&tsipclka>, <&tsrefclk>,
						 <&tsipclkb>;
					ti,mux-tbl = <0x0>, <0x1>, <0x2>,
						<0x3>, <0x4>, <0x8>, <0xC>;
					assigned-clocks = <&cpts_refclk_mux>;
					assigned-clock-parents = <&chipclk12>;
				};
			};

			interfaces {
				gbe0: interface-0 {
					slave-port = <0>;
					link-interface	= <4>;
				};
				gbe1: interface-1 {
					slave-port = <1>;
					link-interface	= <4>;
				};
			};

			secondary-slave-ports {
				port-2 {
					slave-port = <2>;
					link-interface	= <2>;
				};
				port-3 {
					slave-port = <3>;
					link-interface	= <2>;
				};
			};
		};
	};

	netcp-interfaces {
		interface-0 {
			rx-channel = <22>;
			rx-pool = <1024 12>;
			tx-pool = <1024 12>;
			rx-queue-depth = <128 128 0 0>;
			rx-buffer-size = <1518 4096 0 0>;
			rx-queue = <8704>;
			tx-completion-queue = <8706>;
			efuse-mac = <1>;
			netcp-gbe = <&gbe0>;

		};
		interface-1 {
			rx-channel = <23>;
			rx-pool = <1024 12>;
			tx-pool = <1024 12>;
			rx-queue-depth = <128 128 0 0>;
			rx-buffer-size = <1518 4096 0 0>;
			rx-queue = <8705>;
			tx-completion-queue = <8707>;
			efuse-mac = <0>;
			local-mac-address = [02 18 31 7e 3e 6f];
			netcp-gbe = <&gbe1>;
		};
	};
};
```

## CPTS board configuration - select external CPTS RFTCLK:

```dts
&tsrefclk{
	clock-frequency = <500000000>;
};
```

```dts
&cpts_refclk_mux {
	assigned-clock-parents = <&tsrefclk>;
};
```

---

# Marvell Orion/Discovery ethernet controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Marvell Orion/Discovery ethernet controller.

The Marvell Discovery ethernet controller can be found on Marvell Orion SoCs
(Kirkwood, Dove, Orion5x, and Discovery Innovation) and as part of Marvell
Discovery system controller chips (mv64\[345\]60).

The Discovery ethernet controller is described with two levels of nodes. The
first level describes the ethernet controller itself and the second level
describes up to 3 ethernet port nodes within that controller. The reason for
the multiple levels is that the port registers are interleaved within a single
set of controller registers. Each port node describes port-specific properties.

Note: The above separation is only true for Discovery system controllers.
For Orion SoCs we stick to the separation, although there each controller has
only one port associated. Multiple ports are implemented as multiple single-port
controllers. As Kirkwood has some issues with proper initialization after reset,
an extra compatible string is added for it.

- Ethernet controller node

## Required controller properties:

- #address-cells: shall be 1.
- #size-cells: shall be 0.
- compatible: shall be one of "marvell,orion-eth", "marvell,kirkwood-eth".
- reg: address and length of the controller registers.

## Optional controller properties:

- clocks: phandle reference to the controller clock.
- marvell,tx-checksum-limit: max tx packet size for hardware checksum.

- Ethernet port node

## Required port properties:

- compatible: shall be one of "marvell,orion-eth-port",
  "marvell,kirkwood-eth-port".
- reg: port number relative to ethernet controller, shall be 0, 1, or 2.
- interrupts: port interrupt.
- local-mac-address: See [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) file in the same directory.

## Optional port properties:

- marvell,tx-queue-size: size of the transmit ring buffer.
- marvell,tx-sram-addr: address of transmit descriptor buffer located in SRAM.
- marvell,tx-sram-size: size of transmit descriptor buffer located in SRAM.
- marvell,rx-queue-size: size of the receive ring buffer.
- marvell,rx-sram-addr: address of receive descriptor buffer located in SRAM.
- marvell,rx-sram-size: size of receive descriptor buffer located in SRAM.

and

- phy-handle: See [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) file in the same directory.
- phy-mode: See [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) file in the same directory.

or

- speed: port speed if no PHY connected.
- duplex: port mode if no PHY connected.

- Node example:

```dts
mdio-bus {
	...
	ethphy: ethernet-phy@8 {
		...
	};
};
```

```dts
eth: ethernet-controller@72000 {
	compatible = "marvell,orion-eth";
	#address-cells = <1>;
	#size-cells = <0>;
	reg = <0x72000 0x2000>;
	clocks = <&gate_clk 2>;
	marvell,tx-checksum-limit = <1600>;

	ethernet@0 {
		compatible = "marvell,orion-eth-port";
		reg = <0>;
		interrupts = <29>;
		phy-handle = <&ethphy>;
		local-mac-address = [00 00 00 00 00 00];
	};
};
```

---

# Marvell PXA168 Ethernet Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Marvell PXA168 Ethernet Controller.

## Required properties:

- compatible: should be "marvell,pxa168-eth".
- reg: address and length of the register set for the device.
- interrupts: interrupt for the device.
- clocks: pointer to the clock for the device.

## Optional properties:

- port-id: Ethernet port number. Should be '0','1' or '2'.
- #address-cells: must be 1 when using sub-nodes.
- #size-cells: must be 0 when using sub-nodes.
- phy-handle: see [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) file in the same directory.

The MAC address will be determined using the optional properties
defined in [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>).

## Sub-nodes:

Each PHY can be represented as a sub-node. This is not mandatory.

## Sub-nodes required properties:

- reg: the MDIO address of the PHY.

## Example:

```dts
	eth0: ethernet@f7b90000 {
		compatible = "marvell,pxa168-eth";
		reg = <0xf7b90000 0x10000>;
		clocks = <&chip CLKID_GETH0>;
		interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
		#address-cells = <1>;
		#size-cells = <0>;
		phy-handle = <&ethphy0>;

		ethphy0: ethernet-phy@0 {
			reg = <0>;
		};
	};
```

---

# Mdio bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Mdio bindings.

This file has moved to [mdio.yaml](</kernel/hardware/devicetree-bindings/dt-net/mdio.md>).

---

# Microchip ENC28J60

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Microchip ENC28J60.

This is a standalone 10 MBit ethernet controller with SPI interface.

For each device connected to a SPI bus, define a child node within
the SPI master node.

## Required properties:

- compatible: Should be "microchip,enc28j60"
- reg: Specify the SPI chip select the ENC28J60 is wired to
- interrupts: Specify the interrupt index within the interrupt controller (referred
  to above in interrupt-parent) and interrupt type. The ENC28J60 natively
  generates falling edge interrupts, however, additional board logic
  might invert the signal.
- pinctrl-names: List of assigned state names, see pinctrl binding documentation.
- pinctrl-0: List of phandles to configure the GPIO pin used as interrupt line,
  see also generic and your platform specific pinctrl binding
  documentation.

## Optional properties:

- spi-max-frequency: Maximum frequency of the SPI bus when accessing the ENC28J60.
  According to the ENC28J80 datasheet, the chip allows a maximum of 20 MHz, however,
  board designs may need to limit this value.

The MAC address will be determined using the optional properties
defined in [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>).

Example (for NXP i.MX28 with pin control stuff for GPIO irq):

```dts
        ssp2: ssp@80014000 {
                compatible = "fsl,imx28-spi";
                pinctrl-names = "default";
                pinctrl-0 = <&spi2_pins_b &spi2_sck_cfg>;

                enc28j60: ethernet@0 {
                        compatible = "microchip,enc28j60";
                        pinctrl-names = "default";
                        pinctrl-0 = <&enc28j60_pins>;
                        reg = <0>;
                        interrupt-parent = <&gpio3>;
                        interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
                        spi-max-frequency = <12000000>;
                };
        };
```

```dts
        pinctrl@80018000 {
                enc28j60_pins: enc28j60_pins@0 {
                        reg = <0>;
                        fsl,pinmux-ids = <
                                MX28_PAD_AUART0_RTS__GPIO_3_3    /* Interrupt */
                        >;
                        fsl,drive-strength = <MXS_DRIVE_4mA>;
                        fsl,voltage = <MXS_VOLTAGE_HIGH>;
                        fsl,pull-up = <MXS_PULL_DISABLE>;
                };
        };
```

---

# Microchip LAN78xx Gigabit Ethernet controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Microchip LAN78xx Gigabit Ethernet controller.

The LAN78XX devices are usually configured by programming their OTP or with
an external EEPROM, but some platforms (e.g. Raspberry Pi 3 B+) have neither.
The Device Tree properties, if present, override the OTP and EEPROM.

## Required properties:

- compatible: Should be one of "usb424,7800", "usb424,7801" or "usb424,7850".

The MAC address will be determined using the optional properties
defined in [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>).

## Optional properties of the embedded PHY:

- microchip,led-modes: a 0..4 element vector, with each element configuring
  the operating mode of an LED. Omitted LEDs are turned off. Allowed values
  are defined in "include/dt-bindings/net/microchip-lan78xx.h".

## Example:

/\* Based on the configuration for a Raspberry Pi 3 B+ \*/

```dts
&usb {
	usb-port@1 {
		compatible = "usb424,2514";
		reg = <1>;
		#address-cells = <1>;
		#size-cells = <0>;

		usb-port@1 {
			compatible = "usb424,2514";
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;

			ethernet: ethernet@1 {
				compatible = "usb424,7800";
				reg = <1>;
				local-mac-address = [ 00 11 22 33 44 55 ];

				mdio {
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					eth_phy: ethernet-phy@1 {
						reg = <1>;
						microchip,led-modes = <
							LAN78XX_LINK_1000_ACTIVITY
							LAN78XX_LINK_10_100_ACTIVITY
						>;
					};
				};
			};
		};
	};
};
```

---

# NI XGE Ethernet controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for NI XGE Ethernet controller.

## Required properties:

- compatible: Should be "ni,xge-enet-3.00", but can be "ni,xge-enet-2.00" for
  older device trees with DMA engines co-located in the address map,
  with the one reg entry to describe the whole device.
- reg: Address and length of the register set for the device. It contains the
  information of registers in the same order as described by reg-names.
- reg-names: Should contain the reg names
  "dma":  DMA engine control and status region
  "ctrl": MDIO and PHY control and status region
- interrupts: Should contain tx and rx interrupt
- interrupt-names: Should be "rx" and "tx"
- phy-mode: See [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) file in the same directory.
- nvmem-cells: Phandle of nvmem cell containing the MAC address
- nvmem-cell-names: Should be "address"

## Optional properties:

- mdio subnode to indicate presence of MDIO controller
- fixed-link : Assume a fixed link. See [fixed-link.txt](</kernel/hardware/devicetree/bindings-net/fixed-link.md>) in the same directory.
  Use instead of phy-handle.
- phy-handle: See [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) file in the same directory.

## Examples (10G generic PHY):

```dts
	nixge0: ethernet@40000000 {
		compatible = "ni,xge-enet-3.00";
		reg = <0x40000000 0x4000
		       0x41002000 0x2000>;
		reg-names = "dma", "ctrl";

		nvmem-cells = <&eth1_addr>;
		nvmem-cell-names = "address";

		interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>, <0 30 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "rx", "tx";
		interrupt-parent = <&intc>;

		phy-mode = "xgmii";
		phy-handle = <&ethernet_phy1>;

		mdio {
			ethernet_phy1: ethernet-phy@4 {
				compatible = "ethernet-phy-ieee802.3-c45";
				reg = <4>;
			};
		};
	};
```

## Examples (10G generic PHY, no MDIO):

```dts
	nixge0: ethernet@40000000 {
		compatible = "ni,xge-enet-2.00";
		reg = <0x40000000 0x6000>;

		nvmem-cells = <&eth1_addr>;
		nvmem-cell-names = "address";

		interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>, <0 30 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "rx", "tx";
		interrupt-parent = <&intc>;

		phy-mode = "xgmii";
		phy-handle = <&ethernet_phy1>;
	};
```

## Examples (1G generic fixed-link + MDIO):

```dts
	nixge0: ethernet@40000000 {
		compatible = "ni,xge-enet-2.00";
		reg = <0x40000000 0x6000>;

		nvmem-cells = <&eth1_addr>;
		nvmem-cell-names = "address";

		interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>, <0 30 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "rx", "tx";
		interrupt-parent = <&intc>;

		phy-mode = "xgmii";

		fixed-link {
			speed = <1000>;
			pause;
			link-gpios = <&gpio0 63 GPIO_ACTIVE_HIGH>;
		};

		mdio {
			ethernet_phy1: ethernet-phy@4 {
				compatible = "ethernet-phy-ieee802.3-c22";
				reg = <4>;
			};
		};

	};
```

---

# OpenCores MAC 10/100 Mbps

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for OpenCores MAC 10/100 Mbps.

## Required properties:

- compatible: Should be "opencores,ethoc".
- reg: two memory regions (address and length),
  first region is for the device registers and descriptor rings,
  second is for the device packet memory.
- interrupts: interrupt for the device.

## Optional properties:

- clocks: phandle to refer to the clk used as per
  [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Examples:

```dts
	enet0: ethoc@fd030000 {
		compatible = "opencores,ethoc";
		reg = <0xfd030000 0x4000 0xfd800000 0x4000>;
		interrupts = <1>;
		local-mac-address = [00 50 c2 13 6f 00];
		clocks = <&osc>;
        };
```

---

# Phy bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Phy bindings.

This file has moved to [ethernet-phy.yaml](</kernel/hardware/devicetree-bindings/dt-net/ethernet-phy.md>).

---

# Qualcomm Technologies EMAC Gigabit Ethernet Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Qualcomm Technologies EMAC Gigabit Ethernet Controller.

This network controller consists of two devices: a MAC and an SGMII
internal PHY.  Each device is represented by a device tree node.  A phandle
connects the MAC node to its corresponding internal phy node.  Another
phandle points to the external PHY node.

## Required properties:

## MAC node:

- compatible : Should be "qcom,fsm9900-emac".
- reg : Offset and length of the register regions for the device
- interrupts : Interrupt number used by this controller
- mac-address : The 6-byte MAC address. If present, it is the default
  MAC address.
- internal-phy : phandle to the internal PHY node
- phy-handle : phandle to the external PHY node

## Internal PHY node:

- compatible : Should be "qcom,fsm9900-emac-sgmii" or "qcom,qdf2432-emac-sgmii".
- reg : Offset and length of the register region(s) for the device
- interrupts : Interrupt number used by this controller

## The external phy child node:

- reg : The phy address

## Example:

## FSM9900:

```dts
soc {
	#address-cells = <1>;
	#size-cells = <1>;

	emac0: ethernet@feb20000 {
		compatible = "qcom,fsm9900-emac";
		reg = <0xfeb20000 0x10000>,
		      <0xfeb36000 0x1000>;
		interrupts = <76>;

		clocks = <&gcc 0>, <&gcc 1>, <&gcc 3>, <&gcc 4>, <&gcc 5>,
			<&gcc 6>, <&gcc 7>;
		clock-names = "axi_clk", "cfg_ahb_clk", "high_speed_clk",
			"mdio_clk", "tx_clk", "rx_clk", "sys_clk";

		internal-phy = <&emac_sgmii>;

		phy-handle = <&phy0>;

		#address-cells = <1>;
		#size-cells = <0>;
		phy0: ethernet-phy@0 {
			reg = <0>;
		};

		pinctrl-names = "default";
		pinctrl-0 = <&mdio_pins_a>;
	};

	emac_sgmii: ethernet@feb38000 {
		compatible = "qcom,fsm9900-emac-sgmii";
		reg = <0xfeb38000 0x1000>;
		interrupts = <80>;
	};

	tlmm: pinctrl@fd510000 {
		compatible = "qcom,fsm9900-pinctrl";

		mdio_pins_a: mdio {
			state {
				pins = "gpio123", "gpio124";
				function = "mdio";
			};
		};
	};


QDF2432:

soc {
	#address-cells = <2>;
	#size-cells = <2>;

	emac0: ethernet@38800000 {
		compatible = "qcom,fsm9900-emac";
		reg = <0x0 0x38800000 0x0 0x10000>,
		      <0x0 0x38816000 0x0 0x1000>;
		interrupts = <0 256 4>;

		clocks = <&gcc 0>, <&gcc 1>, <&gcc 3>, <&gcc 4>, <&gcc 5>,
			 <&gcc 6>, <&gcc 7>;
		clock-names = "axi_clk", "cfg_ahb_clk", "high_speed_clk",
			"mdio_clk", "tx_clk", "rx_clk", "sys_clk";

		internal-phy = <&emac_sgmii>;

		phy-handle = <&phy0>;

		#address-cells = <1>;
		#size-cells = <0>;
		phy0: ethernet-phy@4 {
			reg = <4>;
		};
	};

	emac_sgmii: ethernet@410400 {
		compatible = "qcom,qdf2432-emac-sgmii";
		reg = <0x0 0x00410400 0x0 0xc00>, /* Base address */
		      <0x0 0x00410000 0x0 0x400>; /* Per-lane digital */
		interrupts = <0 254 1>;
	};
```

---

# Samsung 10G Ethernet driver (SXGBE)

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Samsung 10G Ethernet driver (SXGBE).

## Required properties:

- compatible: Should be "samsung,sxgbe-v2.0a"
- reg: Address and length of the register set for the device
- interrupts: Should contain the SXGBE interrupts
  These interrupts are ordered by fixed and follows variable
  transmit DMA interrupts, receive DMA interrupts and lpi interrupt.
  index 0 - this is fixed common interrupt of SXGBE and it is always
  available.
  index 1 to 25 - 8 variable transmit interrupts, variable 16 receive interrupts
  and 1 optional lpi interrupt.
- phy-mode: String, operation mode of the PHY interface.
  Supported values are: "sgmii", "xgmii".
- samsung,pbl: Integer, Programmable Burst Length.
  Supported values are 1, 2, 4, 8, 16, or 32.
- samsung,burst-map: Integer, Program the possible bursts supported by sxgbe
  This is an integer and represents allowable DMA bursts when fixed burst.
  Allowable range is 0x01-0x3F. When this field is set fixed burst is enabled.
  When fixed length is needed for burst mode, it can be set within allowable
  range.

## Optional properties:

- max-frame-size: Maximum Transfer Unit (IEEE defined MTU), rather
  than the maximum frame size.

The MAC address will be determined using the optional properties
defined in [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>).

## Example:

```dts
	aliases {
		ethernet0 = <&sxgbe0>;
	};
```

```dts
	sxgbe0: ethernet@1a040000 {
		compatible = "samsung,sxgbe-v2.0a";
		reg = <0 0x1a040000 0 0x10000>;
		interrupt-parent = <&gic>;
		interrupts = <0 209 4>, <0 185 4>, <0 186 4>, <0 187 4>,
			     <0 188 4>, <0 189 4>, <0 190 4>, <0 191 4>,
			     <0 192 4>, <0 193 4>, <0 194 4>, <0 195 4>,
			     <0 196 4>, <0 197 4>, <0 198 4>, <0 199 4>,
			     <0 200 4>, <0 201 4>, <0 202 4>, <0 203 4>,
			     <0 204 4>, <0 205 4>, <0 206 4>, <0 207 4>,
			     <0 208 4>, <0 210 4>;
		samsung,pbl = <0x08>
		samsung,burst-map = <0x20>
		mac-address = [ 00 11 22 33 44 55 ]; /* Filled in by U-Boot */
		max-frame-size = <9000>;
		phy-mode = "xgmii";
	};
```

---

# SMSC LAN87xx Ethernet PHY

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for SMSC LAN87xx Ethernet PHY.

Some boards require special tuning values. Configure them
through an Ethernet OF device node.

## Optional properties:

- clocks:
  The clock used as phy reference clock and is connected to phy
  pin XTAL1/CLKIN.

- smsc,disable-energy-detect:
  If set, do not enable energy detect mode for the SMSC phy.
  default: enable energy detect mode

## Examples:

smsc phy with disabled energy detect mode on an am335x based board.

```dts
&davinci_mdio {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&davinci_mdio_default>;
	pinctrl-1 = <&davinci_mdio_sleep>;

	ethernetphy0: ethernet-phy@0 {
		reg = <0>;
		smsc,disable-energy-detect;
	};
};
```

---

# Synopsys DWC Ethernet QoS IP version 4.10 driver (GMAC)

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Synopsys DWC Ethernet QoS IP version 4.10 driver (GMAC).

This binding is deprecated, but it continues to be supported, but new
features should be preferably added to the stmmac binding document.

This binding supports the Synopsys Designware Ethernet QoS (Quality Of Service)
IP block. The IP supports multiple options for bus type, clocking and reset
structure, and feature list. Consequently, a number of properties and list
entries in properties are marked as optional, or only required in specific HW
configurations.

## Required properties:

```text
- compatible: One of:
  - "axis,artpec6-eqos", "snps,dwc-qos-ethernet-4.10"
    Represents the IP core when integrated into the Axis ARTPEC-6 SoC.
  - "nvidia,tegra186-eqos", "snps,dwc-qos-ethernet-4.10"
    Represents the IP core when integrated into the NVIDIA Tegra186 SoC.
  - "snps,dwc-qos-ethernet-4.10"
    This combination is deprecated. It should be treated as equivalent to
    "axis,artpec6-eqos", "snps,dwc-qos-ethernet-4.10". It is supported to be
    compatible with earlier revisions of this binding.
- reg: Address and length of the register set for the device
- clocks: Phandle and clock specifiers for each entry in clock-names, in the
  same order. See ../clock/clock-bindings.txt.
- clock-names: May contain any/all of the following depending on the IP
  configuration, in any order:
  - "tx"
    The EQOS transmit path clock. The HW signal name is clk_tx_i.
    In some configurations (e.g. GMII/RGMII), this clock also drives the PHY TX
    path. In other configurations, other clocks (such as tx_125, rmii) may
    drive the PHY TX path.
  - "rx"
    The EQOS receive path clock. The HW signal name is clk_rx_i.
    In some configurations (e.g. GMII/RGMII), this clock is derived from the
    PHY's RX clock output. In other configurations, other clocks (such as
    rx_125, rmii) may drive the EQOS RX path.
    In cases where the PHY clock is directly fed into the EQOS receive path
    without intervening logic, the DT need not represent this clock, since it
    is assumed to be fully under the control of the PHY device/driver. In
    cases where SoC integration adds additional logic to this path, such as a
    SW-controlled clock gate, this clock should be represented in DT.
  - "slave_bus"
    The CPU/slave-bus (CSR) interface clock. This applies to any bus type;
    APB, AHB, AXI, etc. The HW signal name is hclk_i (AHB) or clk_csr_i (other
    buses).
  - "master_bus"
    The master bus interface clock. Only required in configurations that use a
    separate clock for the master and slave bus interfaces. The HW signal name
    is hclk_i (AHB) or aclk_i (AXI).
  - "ptp_ref"
    The PTP reference clock. The HW signal name is clk_ptp_ref_i.
  - "phy_ref_clk"
    This clock is deprecated and should not be used by new compatible values.
    It is equivalent to "tx".
  - "apb_pclk"
    This clock is deprecated and should not be used by new compatible values.
    It is equivalent to "slave_bus".
```

```text
  Note: Support for additional IP configurations may require adding the
  following clocks to this list in the future: clk_rx_125_i, clk_tx_125_i,
  clk_pmarx_0_i, clk_pmarx1_i, clk_rmii_i, clk_revmii_rx_i, clk_revmii_tx_i.
  Configurations exist where multiple similar clocks are used at once, e.g. all
  of clk_rx_125_i, clk_pmarx_0_i, clk_pmarx1_i. For this reason it is best to
  extend the binding with a separate clock-names entry for each of those RX
  clocks, rather than repurposing the existing "rx" clock-names entry as a
  generic/logical clock in a similar fashion to "master_bus" and "slave_bus".
  This will allow easy support for configurations that support multiple PHY
  interfaces using a mux, and hence need to have explicit control over
  specific RX clocks.
```

```text
  The following compatible values require the following set of clocks:
```

```text
  - "nvidia,tegra186-eqos", "snps,dwc-qos-ethernet-4.10":
    - "slave_bus"
    - "master_bus"
    - "rx"
    - "tx"
    - "ptp_ref"
  - "axis,artpec6-eqos", "snps,dwc-qos-ethernet-4.10":
    - "slave_bus"
    - "master_bus"
    - "tx"
    - "ptp_ref"
  - "snps,dwc-qos-ethernet-4.10" (deprecated):
    - "phy_ref_clk"
    - "apb_clk"
- interrupts: Should contain the core's combined interrupt signal
- phy-mode: See ethernet.txt file in the same directory
- resets: Phandle and reset specifiers for each entry in reset-names, in the
  same order. See ../reset/reset.txt.
- reset-names: May contain any/all of the following depending on the IP
  configuration, in any order:
  - "eqos". The reset to the entire module. The HW signal name is hreset_n
    (AHB) or aresetn_i (AXI).
```

```text
  The following compatible values require the following set of resets:
  (the reset properties may be omitted if empty)
```

```text
  - "nvidia,tegra186-eqos", "snps,dwc-qos-ethernet-4.10":
    - "eqos".
  - "axis,artpec6-eqos", "snps,dwc-qos-ethernet-4.10":
    - None.
  - "snps,dwc-qos-ethernet-4.10" (deprecated):
    - None.
```

## Optional properties:

```text
- dma-coherent: Present if dma operations are coherent
- phy-reset-gpios: Phandle and specifier for any GPIO used to reset the PHY.
  See ../gpio/gpio.txt.
- snps,en-lpi: If present it enables use of the AXI low-power interface
- snps,write-requests: Number of write requests that the AXI port can issue.
  It depends on the SoC configuration.
- snps,read-requests: Number of read requests that the AXI port can issue.
  It depends on the SoC configuration.
- snps,burst-map: Bitmap of allowed AXI burst lengths, with the LSB
  representing 4, then 8 etc.
- snps,txpbl: DMA Programmable burst length for the TX DMA
- snps,rxpbl: DMA Programmable burst length for the RX DMA
- snps,en-tx-lpi-clockgating: Enable gating of the MAC TX clock during
  TX low-power mode.
- phy-handle: See ethernet.txt file in the same directory
- mdio device tree subnode: When the GMAC has a phy connected to its local
    mdio, there must be device tree subnode with the following
    required properties:
    - compatible: Must be "snps,dwc-qos-ethernet-mdio".
    - #address-cells: Must be <1>.
    - #size-cells: Must be <0>.
```

```text
    For each phy on the mdio bus, there must be a node with the following
    fields:
```

- reg: phy id used to communicate to phy.
- device\_type: Must be "ethernet-phy".
- fixed-mode device tree subnode: see [fixed-link.txt](</kernel/hardware/devicetree/bindings-net/fixed-link.md>) in the same directory

The MAC address will be determined using the optional properties
defined in [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>).

## Examples:

```dts
ethernet2@40010000 {
	clock-names = "phy_ref_clk", "apb_pclk";
	clocks = <&clkc 17>, <&clkc 15>;
	compatible = "snps,dwc-qos-ethernet-4.10";
	interrupt-parent = <&intc>;
	interrupts = <0x0 0x1e 0x4>;
	reg = <0x40010000 0x4000>;
	phy-handle = <&phy2>;
	phy-mode = "gmii";
	phy-reset-gpios = <&gpioctlr 43 GPIO_ACTIVE_LOW>;

	snps,en-tx-lpi-clockgating;
	snps,en-lpi;
	snps,write-requests = <2>;
	snps,read-requests = <16>;
	snps,burst-map = <0x7>;
	snps,txpbl = <8>;
	snps,rxpbl = <2>;

	dma-coherent;

	mdio {
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		phy2: phy@1 {
			compatible = "ethernet-phy-ieee802.3-c22";
			device_type = "ethernet-phy";
			reg = <0x1>;
		};
	};
};
```

---

# STMicroelectronics SoC DWMAC glue layer controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for STMicroelectronics SoC DWMAC glue layer controller.

This file documents differences between the core properties in
[Documentation/devicetree/bindings/net/stmmac.txt](</kernel/hardware/devicetree/bindings-net/stmmac.md>)
and what is needed on STi platforms to program the stmmac glue logic.

The device node has following properties.

## Required properties:

- compatible	: "st,stih407-dwmac"
- st,syscon : Should be phandle/offset pair. The phandle to the syscon node which
  encompases the glue register, and the offset of the control register.
- st,gmac\_en: this is to enable the gmac into a dedicated sysctl control
  register available on STiH407 SoC.
- pinctrl-0: pin-control for all the MII mode supported.

## Optional properties:

- resets : phandle pointing to the system reset controller with correct
  reset line index for ethernet reset.
- st,ext-phyclk: valid only for RMII where PHY can generate 50MHz clock or
  MAC can generate it.
- st,tx-retime-src: This specifies which clk is wired up to the mac for
  retimeing tx lines. This is totally board dependent and can take one of the
  possible values from "txclk", "clk\_125" or "clkgen".
  If not passed, the internal clock will be used by default.
- sti-ethclk: this is the phy clock.
- sti-clkconf: this is an extra sysconfig register, available in new SoCs,
  to program the clk retiming.
- st,gmac\_en: to enable the GMAC, this only is present in some SoCs; e.g.
  STiH407.

## Example:

```dts
ethernet0: dwmac@9630000 {
	device_type = "network";
	compatible = "st,stih407-dwmac", "snps,dwmac", "snps,dwmac-3.710";
	reg = <0x9630000 0x8000>;
	reg-names = "stmmaceth";

	st,syscon = <&syscfg_sbc_reg 0x80>;
	st,gmac_en;
	resets = <&softreset STIH407_ETH1_SOFTRESET>;
	reset-names = "stmmaceth";

	interrupts = <GIC_SPI 98 IRQ_TYPE_NONE>,
		     <GIC_SPI 99 IRQ_TYPE_NONE>,
		     <GIC_SPI 100 IRQ_TYPE_NONE>;
	interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";

	snps,pbl = <32>;
	snps,mixed-burst;

	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_rgmii1>;

	clock-names = "stmmaceth", "sti-ethclk";
	clocks = <&CLK_S_C0_FLEXGEN CLK_EXT2F_A9>,
		 <&CLK_S_C0_FLEXGEN CLK_ETH_PHY>;
};
```

---

# Stmmac bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Stmmac bindings.

This file has moved to [snps,dwmac.yaml](</kernel/hardware/devicetree-bindings/dt-net/snps-dwmac.md>).

---

# VIA Velocity 10/100/1000 Network Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for VIA Velocity 10/100/1000 Network Controller.

## Required properties:

- compatible : Should be "via,velocity-vt6110"
- reg : Address and length of the io space
- interrupts : Should contain the controller interrupt line

## Optional properties:

- no-eeprom : PCI network cards use an external EEPROM to store data. Embedded
  devices quite often set this data in uboot and do not provide an eeprom.
  Specify this option if you have no external eeprom.

## Examples:

```dts
eth0@d8004000 {
	compatible = "via,velocity-vt6110";
	reg = <0xd8004000 0x400>;
	interrupts = <10>;
	no-eeprom;
};
```

---

# Wiznet w5x00

_Peios Kernel / Hardware and drivers / Device tree / bindings/net_

> Device-tree binding reference for Wiznet w5x00.

This is a standalone 10/100 MBit Ethernet controller with SPI interface.

For each device connected to a SPI bus, define a child node within
the SPI master node.

## Required properties:

- compatible: Should be one of the following strings:
  "wiznet,w5100"
  "wiznet,w5200"
  "wiznet,w5500"
- reg: Specify the SPI chip select the chip is wired to.
- interrupts: Specify the interrupt index within the interrupt controller (referred
  to above in interrupt-parent) and interrupt type. w5x00 natively
  generates falling edge interrupts, however, additional board logic
  might invert the signal.
- pinctrl-names: List of assigned state names, see pinctrl binding documentation.
- pinctrl-0: List of phandles to configure the GPIO pin used as interrupt line,
  see also generic and your platform specific pinctrl binding
  documentation.

## Optional properties:

- spi-max-frequency: Maximum frequency of the SPI bus when accessing the w5500.
  According to the w5500 datasheet, the chip allows a maximum of 80 MHz, however,
  board designs may need to limit this value.
- local-mac-address: See [ethernet.txt](</kernel/hardware/devicetree/bindings-net/ethernet.md>) in the same directory.

Example (for Raspberry Pi with pin control stuff for GPIO irq):

```dts
&spi {
	ethernet@0: w5500@0 {
		compatible = "wiznet,w5500";
		reg = <0>;
		pinctrl-names = "default";
		pinctrl-0 = <&eth1_pins>;
		interrupt-parent = <&gpio>;
		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
		spi-max-frequency = <30000000>;
	};
};
```

```dts
&gpio {
	eth1_pins: eth1_pins {
		brcm,pins = <25>;
		brcm,function = <0>; /* in */
		brcm,pull = <0>; /* none */
	};
};
```

---

# MediaTek UART based Bluetooth Devices

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/bluetooth_

> Device-tree binding reference for MediaTek UART based Bluetooth Devices.

This device is a serial attached device to UART device and thus it must be a
child node of the serial node with UART.

## Please refer to the following documents for generic properties:

```text
	Documentation/devicetree/bindings/serial/serial.yaml
```

## Required properties:

- compatible:	Must be
  "mediatek,mt7663u-bluetooth": for MT7663U device
  "mediatek,mt7668u-bluetooth": for MT7668U device
- vcc-supply:	Main voltage regulator

If the pin controller on the platform can support both pinmux and GPIO
control such as the most of MediaTek platform. Please use below properties.

- pinctrl-names: Should be "default", "runtime"
- pinctrl-0: Should contain UART RXD low when the device is powered up to
  enter proper bootstrap mode.
- pinctrl-1: Should contain UART mode pin ctrl

Else, the pin controller on the platform only can support pinmux control and
the GPIO control still has to rely on the dedicated GPIO controller such as
a legacy MediaTek SoC, MT7621. Please use the below properties.

- boot-gpios:	GPIO same to the pin as UART RXD and used to keep LOW when
  the device is powered up to enter proper bootstrap mode when
- pinctrl-names: Should be "default"
- pinctrl-0: Should contain UART mode pin ctrl

## Optional properties:

- reset-gpios:	GPIO used to reset the device whose initial state keeps low,
  if the GPIO is missing, then board-level design should be
  guaranteed.
- clocks:	Should be the clock specifiers corresponding to the entry in
  clock-names property. If the clock is missing, then board-level
  design should be guaranteed.
- clock-names:	Should contain "osc" entry for the external oscillator.
- current-speed:  Current baud rate of the device whose defaults to 921600

## Example:

```dts
	uart1_pins_boot: uart1-default {
		pins-dat {
			pinmux = <MT7623_PIN_81_URXD1_FUNC_GPIO81>;
			output-low;
		};
	};
```

```dts
	uart1_pins_runtime: uart1-runtime {
		pins-dat {
			pinmux = <MT7623_PIN_81_URXD1_FUNC_URXD1>,
				 <MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
		};
	};
```

```dts
	uart1: serial@11003000 {
		compatible = "mediatek,mt7623-uart",
			     "mediatek,mt6577-uart";
		reg = <0 0x11003000 0 0x400>;
		interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
		clocks = <&pericfg CLK_PERI_UART1_SEL>,
			 <&pericfg CLK_PERI_UART1>;
		clock-names = "baud", "bus";

		bluetooth {
			compatible = "mediatek,mt7663u-bluetooth";
			vcc-supply = <&reg_5v>;
			reset-gpios = <&pio 24 GPIO_ACTIVE_LOW>;
			pinctrl-names = "default", "runtime";
			pinctrl-0 = <&uart1_pins_boot>;
			pinctrl-1 = <&uart1_pins_runtime>;
			current-speed = <921600>;
		};
	};
```

---

# Nokia Bluetooth Chips

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/bluetooth_

> Device-tree binding reference for Nokia Bluetooth Chips.

Nokia phones often come with UART connected bluetooth chips from different
vendors and modified device API. Those devices speak a protocol named H4+
(also known as h4p) by Nokia, which is similar to the H4 protocol from the
Bluetooth standard. In addition to the H4 protocol it specifies two more
UART status lines for wakeup of UART transceivers to improve power management
and a few new packet types used to negotiate uart speed.

## Required properties:

```text
 - compatible: should contain "nokia,h4p-bluetooth" as well as one of the following:
   * "brcm,bcm2048-nokia"
   * "ti,wl1271-bluetooth-nokia"
 - reset-gpios: GPIO specifier, used to reset the BT module (active low)
 - bluetooth-wakeup-gpios: GPIO specifier, used to wakeup the BT module (active high)
 - host-wakeup-gpios: GPIO specifier, used to wakeup the host processor (active high)
 - clock-names: should be "sysclk"
 - clocks: should contain a clock specifier for every name in clock-names
```

## Optional properties:

- None

## Example:

```dts
/ {
       /* controlled (enabled/disabled) directly by BT module */
       bluetooth_clk: vctcxo {
               compatible = "fixed-clock";
               #clock-cells = <0>;
               clock-frequency = <38400000>;
       };
};
```

```dts
&uart2 {
       pinctrl-names = "default";
       pinctrl-0 = <&uart2_pins>;

       bluetooth {
               compatible = "ti,wl1271-bluetooth-nokia", "nokia,h4p-bluetooth";

               reset-gpios = <&gpio1 26 GPIO_ACTIVE_LOW>; /* gpio26 */
               host-wakeup-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>; /* gpio101 */
               bluetooth-wakeup-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>; /* gpio37 */

               clocks = <&bluetooth_clk>;
               clock-names = "sysclk";
       };
};
```

---

# Memory mapped Bosch CC770 and Intel AN82527 CAN controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/can_

> Device-tree binding reference for Memory mapped Bosch CC770 and Intel AN82527 CAN controller.

Note: The CC770 is a CAN controller from Bosch, which is 100%
compatible with the old AN82527 from Intel, but with "bugs" being fixed.

## Required properties:

- compatible : should be "bosch,cc770" for the CC770 and "intc,82527"
  for the AN82527.

- reg : should specify the chip select, address offset and size required
  to map the registers of the controller. The size is usually 0x80.

- interrupts : property with a value describing the interrupt source
  (number and sensitivity) required for the controller.

## Optional properties:

- bosch,external-clock-frequency : frequency of the external oscillator
  clock in Hz. Note that the internal clock frequency used by the
  controller is half of that value. If not specified, a default
  value of 16000000 (16 MHz) is used.

- bosch,clock-out-frequency : slock frequency in Hz on the CLKOUT pin.
  If not specified or if the specified value is 0, the CLKOUT pin
  will be disabled.

- bosch,slew-rate : slew rate of the CLKOUT signal. If not specified,
  a reasonable value will be calculated.

- bosch,disconnect-rx0-input : see data sheet.

- bosch,disconnect-rx1-input : see data sheet.

- bosch,disconnect-tx1-output : see data sheet.

- bosch,polarity-dominant : see data sheet.

- bosch,divide-memory-clock : see data sheet.

- bosch,iso-low-speed-mux : see data sheet.

For further information, please have a look to the CC770 or AN82527.

## Examples:

```dts
can@3,100 {
	compatible = "bosch,cc770";
	reg = <3 0x100 0x80>;
	interrupts = <2 0>;
	interrupt-parent = <&mpic>;
	bosch,external-clock-frequency = <16000000>;
};
```

---

# Aeroflex Gaisler GRCAN and GRHCAN CAN controllers.

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/can_

> Device-tree binding reference for Aeroflex Gaisler GRCAN and GRHCAN CAN controllers..

The GRCAN and CRHCAN CAN controllers are available in the GRLIB VHDL IP core
library.

Note: These properties are built from the AMBA plug&amp;play in a Leon SPARC system
(the ordinary environment for GRCAN and GRHCAN). There are no dts files for
sparc.

## Required properties:

- name : Should be "GAISLER\_GRCAN", "01\_03d", "GAISLER\_GRHCAN" or "01\_034"

- reg : Address and length of the register set for the device

- freq : Frequency of the external oscillator clock in Hz (the frequency of
  the amba bus in the ordinary case)

- interrupts : Interrupt number for this device

## Optional properties:

- systemid : If not present or if the value of the least significant 16 bits
  of this 32-bit property is smaller than GRCAN\_TXBUG\_SAFE\_GRLIB\_VERSION
  a bug workaround is activated.

For further information look in the documentation for the GLIB IP core library:
http://www.gaisler.com/products/grlib/grip.pdf

---

# Holt HI-311X stand-alone CAN controller device tree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/can_

> Device-tree binding reference for Holt HI-311X stand-alone CAN controller device tree bindings.

## Required properties:

```text
 - compatible: Should be one of the following:
   - "holt,hi3110" for HI-3110
 - reg: SPI chip select.
 - clocks: The clock feeding the CAN controller.
 - interrupts: Should contain IRQ line for the CAN controller.
```

## Optional properties:

- vdd-supply: Regulator that powers the CAN controller.
- xceiver-supply: Regulator that powers the CAN transceiver.

## Example:

```dts
	can0: can@1 {
		compatible = "holt,hi3110";
		reg = <1>;
		clocks = <&clk32m>;
		interrupt-parent = <&gpio4>;
		interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
		vdd-supply = <&reg5v0>;
		xceiver-supply = <&reg5v0>;
	};
```

---

# IFI CANFD controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/can_

> Device-tree binding reference for IFI CANFD controller.

## Required properties:

- compatible: Should be "ifi,canfd-1.0"
- reg: Should contain CAN controller registers location and length
- interrupts: Should contain IRQ line for the CAN controller

## Example:

```dts
	canfd0: canfd@ff220000 {
		compatible = "ifi,canfd-1.0";
		reg = <0xff220000 0x00001000>;
		interrupts = <0 43 0>;
	};
```

---

# CAN Device Tree Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/can_

> Device-tree binding reference for CAN Device Tree Bindings.

(c) 2006-2009 Secret Lab Technologies Ltd
Grant Likely &lt;grant.likely@secretlab.ca&gt;

## fsl,mpc5200-mscan nodes

In addition to the required compatible-, reg- and interrupt-properties, you can
also specify which clock source shall be used for the controller:

- fsl,mscan-clock-source : a string describing the clock source. Valid values
  are:	"ip" for ip bus clock
  "ref" for reference clock (XTAL)
  "ref" is default in case this property is not
  present.

## fsl,mpc5121-mscan nodes

In addition to the required compatible-, reg- and interrupt-properties, you can
also specify which clock source and divider shall be used for the controller:

- fsl,mscan-clock-source : a string describing the clock source. Valid values
  are:	"ip" for ip bus clock
  "ref" for reference clock
  "sys" for system clock
  If this property is not present, an optimal CAN
  clock source and frequency based on the system
  clock will be selected. If this is not possible,
  the reference clock will be used.

- fsl,mscan-clock-divider: for the reference and system clock, an additional
  clock divider can be specified. By default, a
  value of 1 is used.

Note that the MPC5121 Rev. 1 processor is not supported.

## Examples:

```dts
	can@1300 {
		compatible = "fsl,mpc5121-mscan";
		interrupts = <12 0x8>;
		interrupt-parent = <&ipic>;
		reg = <0x1300 0x80>;
	};
```

```dts
	can@1380 {
		compatible = "fsl,mpc5121-mscan";
		interrupts = <13 0x8>;
		interrupt-parent = <&ipic>;
		reg = <0x1380 0x80>;
		fsl,mscan-clock-source = "ref";
		fsl,mscan-clock-divider = <3>;
	};
```

---

# Texas Instruments High End CAN Controller (HECC)

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/can_

> Device-tree binding reference for Texas Instruments High End CAN Controller (HECC).

This file provides information, what the device node
for the hecc interface contains.

## Required properties:

- compatible: "ti,am3517-hecc"
- reg: addresses and lengths of the register spaces for 'hecc', 'hecc-ram'
  and 'mbx'
- reg-names :"hecc", "hecc-ram", "mbx"
- interrupts: interrupt mapping for the hecc interrupts sources
- clocks: clock phandles (see clock bindings for details)

## Optional properties:

- ti,use-hecc1int: if provided configures HECC to produce all interrupts
  on HECC1INT interrupt line. By default HECC0INT interrupt
  line will be used.
- xceiver-supply: regulator that powers the CAN transceiver

## Example:

## For am3517evm board:

```dts
	hecc: can@5c050000 {
		compatible = "ti,am3517-hecc";
		reg = <0x5c050000 0x80>,
		      <0x5c053000 0x180>,
		      <0x5c052000 0x200>;
		reg-names = "hecc", "hecc-ram", "mbx";
		interrupts = <24>;
		clocks = <&hecc_ck>;
	};
```

---

# Distributed Switch Architecture Device Tree Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/dsa_

> Device-tree binding reference for Distributed Switch Architecture Device Tree Bindings.

See [Documentation/devicetree/bindings/net/dsa/dsa.yaml](</kernel/hardware/devicetree-bindings/dt-net/dsa/dsa.md>) for the documentation.

---

# SMSC/MicroChip LAN9303 three port ethernet switch

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/dsa_

> Device-tree binding reference for SMSC/MicroChip LAN9303 three port ethernet switch.

## Required properties:

```text
- compatible: should be
  - "smsc,lan9303-i2c" for I2C managed mode
    or
  - "smsc,lan9303-mdio" for mdio managed mode
```

## Optional properties:

- reset-gpios: GPIO to be used to reset the whole device
- reset-duration: reset duration in milliseconds, defaults to 200 ms

## Subnodes:

The integrated switch subnode should be specified according to the binding
described in dsa/dsa.txt. The CPU port of this switch is always port 0.

Note: always use 'reg = &lt;0/1/2&gt;;' for the three DSA ports, even if the device is
configured to use 1/2/3 instead. This hardware configuration will be
auto-detected and mapped accordingly.

## Example:

## I2C managed mode:

```dts
	master: masterdevice@X {

		fixed-link { /* RMII fixed link to LAN9303 */
			speed = <100>;
			full-duplex;
		};
	};
```

```dts
	switch: switch@a {
		compatible = "smsc,lan9303-i2c";
		reg = <0xa>;
		reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
		reset-duration = <200>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 { /* RMII fixed link to master */
				reg = <0>;
				ethernet = <&master>;
			};

			port@1 { /* external port 1 */
				reg = <1>;
				label = "lan1";
			};

			port@2 { /* external port 2 */
				reg = <2>;
				label = "lan2";
			};
		};
	};
```

## MDIO managed mode:

```dts
	master: masterdevice@X {
		phy-handle = <&switch>;

		mdio {
			#address-cells = <1>;
			#size-cells = <0>;

			switch: switch-phy@0 {
				compatible = "smsc,lan9303-mdio";
				reg = <0>;
				reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
				reset-duration = <100>;

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						ethernet = <&master>;
					};

					port@1 { /* external port 1 */
						reg = <1>;
						label = "lan1";
					};

					port@2 { /* external port 2 */
						reg = <2>;
						label = "lan2";
					};
				};
			};
		};
	};
```

---

# ADF7242 IEEE 802.15.4 *

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/ieee802154_

> Device-tree binding reference for ADF7242 IEEE 802.15.4 *.

## Required properties:

- compatible:		should be "adi,adf7242", "adi,adf7241"
- spi-max-frequency:	maximal bus speed (12.5 MHz)
- reg:		the chipselect index
- interrupts:		the interrupt generated by the device via pin IRQ1.
  IRQ\_TYPE\_LEVEL\_HIGH (4) or IRQ\_TYPE\_EDGE\_FALLING (1)

## Example:

```dts
	adf7242@0 {
		compatible = "adi,adf7242";
		spi-max-frequency = <10000000>;
		reg = <0>;
		interrupts = <98 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-parent = <&gpio3>;
	};
```

---

# CA8210 IEEE 802.15.4 *

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/ieee802154_

> Device-tree binding reference for CA8210 IEEE 802.15.4 *.

## Required properties:

- compatible:           Should be "cascoda,ca8210"
- reg:                  Controlling chip select
- spi-max-frequency:    Maximum clock speed, should be \*less than\*
  4000000
- spi-cpol:             Requires inverted clock polarity
- reset-gpio:           GPIO attached to reset
- irq-gpio:             GPIO attached to IRQ
  Optional properties:
- extclock-enable:      Include for the ca8210 to route its 16MHz clock
  to an output
- extclock-freq:        Frequency in Hz of the external clock
- extclock-gpio:        GPIO of the ca8210 to output the clock on

## Example:

```dts
	ca8210@0 {
		compatible = "cascoda,ca8210";
		reg = <0>;
		spi-max-frequency = <3000000>;
		spi-cpol;
		reset-gpio = <&gpio1 1 GPIO_ACTIVE_LOW>;
		irq-gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
		extclock-enable;
		extclock-freq = 16000000;
		extclock-gpio = 2;
	};
```

---

# *CC2520 IEEE 802.15.4 Compatible Radio*

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/ieee802154_

> Device-tree binding reference for *CC2520 IEEE 802.15.4 Compatible Radio*.

## Required properties:

- compatible: 		should be "ti,cc2520"
- spi-max-frequency:	maximal bus speed (8000000), should be set to 4000000 depends
  sync or async operation mode
- reg:			the chipselect index
- pinctrl-0: 		pin control group to be used for this controller.
- pinctrl-names: 	must contain a "default" entry.
- fifo-gpio:		GPIO spec for the FIFO pin
- fifop-gpio:		GPIO spec for the FIFOP pin
- sfd-gpio:		GPIO spec for the SFD pin
- cca-gpio:		GPIO spec for the CCA pin
- vreg-gpio:		GPIO spec for the VREG pin
- reset-gpio:		GPIO spec for the RESET pin
  Optional properties:
- amplified:		include if the CC2520 is connected to a CC2591 amplifier

## Example:

```dts
	cc2520@0 {
		compatible = "ti,cc2520";
		reg = <0>;
		spi-max-frequency = <4000000>;
		amplified;
		pinctrl-names = "default";
		pinctrl-0 = <&cc2520_cape_pins>;
		fifo-gpio = <&gpio1 18 0>;
		fifop-gpio = <&gpio1 19 0>;
		sfd-gpio = <&gpio1 13 0>;
		cca-gpio = <&gpio1 16 0>;
		vreg-gpio = <&gpio0 31 0>;
		reset-gpio = <&gpio1 12 0>;
	};
```

---

# MCR20A IEEE 802.15.4 *

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/ieee802154_

> Device-tree binding reference for MCR20A IEEE 802.15.4 *.

## Required properties:

- compatible:		should be "nxp,mcr20a"
- spi-max-frequency:	maximal bus speed, should be set to a frequency
  lower than 9000000 depends sync or async operation mode
- reg:		the chipselect index
- interrupts:		the interrupt generated by the device. Non high-level
  can occur deadlocks while handling isr.

## Optional properties:

- rst\_b-gpio:		GPIO spec for the RST\_B pin

## Example:

```dts
	mcr20a@0 {
		compatible = "nxp,mcr20a";
		spi-max-frequency = <9000000>;
		reg = <0>;
		interrupts = <17 2>;
		interrupt-parent = <&gpio>;
		rst_b-gpio = <&gpio 27 1>
	};
```

---

# MRF24J40 IEEE 802.15.4 *

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/ieee802154_

> Device-tree binding reference for MRF24J40 IEEE 802.15.4 *.

## Required properties:

- compatible:		should be "microchip,mrf24j40", "microchip,mrf24j40ma",
  or "microchip,mrf24j40mc" depends on your transceiver
  board
- spi-max-frequency:	maximal bus speed, should be set something under or equal
  10000000
- reg:		the chipselect index
- interrupts:		the interrupt generated by the device.

## Example:

```dts
	mrf24j40ma@0 {
		compatible = "microchip,mrf24j40ma";
		spi-max-frequency = <8500000>;
		reg = <0>;
		interrupts = <19 8>;
		interrupt-parent = <&gpio3>;
	};
```

---

# Texas Instruments wl1251 wireless lan controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/net/wireless_

> Device-tree binding reference for Texas Instruments wl1251 wireless lan controller.

The wl1251 chip can be connected via SPI or via SDIO. This
document describes the binding for the SPI connected chip.

## Required properties:

- compatible :        Should be "ti,wl1251"
- reg :               Chip select address of device
- spi-max-frequency : Maximum SPI clocking speed of device in Hz
- interrupts :        Should contain interrupt line
- vio-supply :        phandle to regulator providing VIO

## Optional properties:

- ti,wl1251-has-eeprom : boolean, the wl1251 has an eeprom connected, which
  provides configuration data (calibration, MAC, ...)
- ti,power-gpio :	 GPIO connected to chip's PMEN pin if operated in
  SPI mode
- Please consult [Documentation/devicetree/bindings/spi/spi-bus.txt](</kernel/hardware/devicetree/bindings-spi/spi-bus.md>)
  for optional SPI connection related properties,

## Examples:

```dts
&spi1 {
	wl1251@0 {
		compatible = "ti,wl1251";

		reg = <0>;
		spi-max-frequency = <48000000>;
		spi-cpol;
		spi-cpha;

		interrupt-parent = <&gpio2>;
		interrupts = <10 IRQ_TYPE_NONE>; /* gpio line 42 */

		vio-supply = <&vio>;
		ti,power-gpio = <&gpio3 23 GPIO_ACTIVE_HIGH>; /* 87 */
	};
};
```

```dts
&mmc3 {
	vmmc-supply = <&wlan_en>;

	bus-width = <4>;
	non-removable;
	ti,non-removable;
	cap-power-off-card;

	pinctrl-names = "default";
	pinctrl-0 = <&mmc3_pins>;

	#address-cells = <1>;
	#size-cells = <0>;

	wlan: wifi@1 {
		compatible = "ti,wl1251";

		reg = <1>;

		interrupt-parent = <&gpio1>;
		interrupts = <21 IRQ_TYPE_LEVEL_HIGH>;	/* GPIO_21 */

		ti,wl1251-has-eeprom;
	};
};
```

---

# Nios II Processor Binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/nios2_

> Device-tree binding reference for Nios II Processor Binding.

This binding specifies what properties available in the device tree
representation of a Nios II Processor Core.

Users can use sopc2dts tool for generating device tree sources (dts) from a
Qsys system. See more detail in: http://www.alterawiki.com/wiki/Sopc2dts

## Required properties:

- compatible: Compatible property value should be "altr,nios2-1.0".
- reg: Contains CPU index.
- interrupt-controller: Specifies that the node is an interrupt controller
- #interrupt-cells: Specifies the number of cells needed to encode an
  interrupt source, should be 1.
- clock-frequency: Contains the clock frequency for CPU, in Hz.
- dcache-line-size: Contains data cache line size.
- icache-line-size: Contains instruction line size.
- dcache-size: Contains data cache size.
- icache-size: Contains instruction cache size.
- altr,pid-num-bits: Specifies the number of bits to use to represent the process
  identifier (PID).
- altr,tlb-num-ways: Specifies the number of set-associativity ways in the TLB.
- altr,tlb-num-entries: Specifies the number of entries in the TLB.
- altr,tlb-ptr-sz: Specifies size of TLB pointer.
- altr,has-mul: Specifies CPU hardware multiply support, should be 1.
- altr,has-mmu: Specifies CPU support MMU support, should be 1.
- altr,has-initda: Specifies CPU support initda instruction, should be 1.
- altr,reset-addr: Specifies CPU reset address
- altr,fast-tlb-miss-addr: Specifies CPU fast TLB miss exception address
- altr,exception-addr: Specifies CPU exception address

## Optional properties:

- altr,has-div: Specifies CPU hardware divide support
- altr,implementation: Nios II core implementation, this should be "fast";

## Example:

```dts
cpu@0 {
	device_type = "cpu";
	compatible = "altr,nios2-1.0";
	reg = <0>;
	interrupt-controller;
	#interrupt-cells = <1>;
	clock-frequency = <125000000>;
	dcache-line-size = <32>;
	icache-line-size = <32>;
	dcache-size = <32768>;
	icache-size = <32768>;
	altr,implementation = "fast";
	altr,pid-num-bits = <8>;
	altr,tlb-num-ways = <16>;
	altr,tlb-num-entries = <128>;
	altr,tlb-ptr-sz = <7>;
	altr,has-div = <1>;
	altr,has-mul = <1>;
	altr,reset-addr = <0xc2800000>;
	altr,fast-tlb-miss-addr = <0xc7fff400>;
	altr,exception-addr = <0xd0000020>;
	altr,has-initda = <1>;
	altr,has-mmu = <1>;
};
```

---

# NXP LPC18xx OTP memory

_Peios Kernel / Hardware and drivers / Device tree / bindings/nvmem_

> Device-tree binding reference for NXP LPC18xx OTP memory.

Internal OTP (One Time Programmable) memory for NXP LPC18xx/43xx devices.

## Required properties:

- compatible: Should be "nxp,lpc1850-otp"
- reg: Must contain an entry with the physical base address and length
  for each entry in reg-names.
- address-cells: must be set to 1.
- size-cells: must be set to 1.

See [nvmem.txt](</kernel/hardware/devicetree/bindings-nvmem/nvmem.md>) for more information.

## Example:

```dts
  otp: otp@40045000 {
    compatible = "nxp,lpc1850-otp";
    reg = <0x40045000 0x1000>;
    #address-cells = <1>;
    #size-cells = <1>;
  };
```

---

# Nvmem bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/nvmem_

> Device-tree binding reference for Nvmem bindings.

This file has been moved to [nvmem.yaml](</kernel/hardware/devicetree-bindings/dt-nvmem/nvmem.md>) and [nvmem-consumer.yaml](</kernel/hardware/devicetree-bindings/dt-nvmem/nvmem-consumer.md>).

---

# OpenRISC Generic SoC

_Peios Kernel / Hardware and drivers / Device tree / bindings/openrisc/opencores_

> Device-tree binding reference for OpenRISC Generic SoC.

Boards and FPGA SoC's which support the OpenRISC standard platform.  The
platform essentially follows the conventions of the OpenRISC architecture
specification, however some aspects, such as the boot protocol have been defined
by the Linux port.

## Required properties

- compatible: Must include "opencores,or1ksim"

## CPU nodes:

A "cpus" node is required.  Required properties:

```text
 - #address-cells: Must be 1.
 - #size-cells: Must be 0.
A CPU sub-node is also required for at least CPU 0.  Since the topology may
be probed via CPS, it is not necessary to specify secondary CPUs.  Required
properties:
 - compatible: Must be "opencores,or1200-rtlsvn481".
 - reg: CPU number.
 - clock-frequency: The CPU clock frequency in Hz.
Example:
	cpus {
		#address-cells = <1>;
		#size-cells = <0>;
		cpu@0 {
			compatible = "opencores,or1200-rtlsvn481";
			reg = <0>;
			clock-frequency = <20000000>;
		};
	};
```

## Boot protocol

The bootloader may pass the following arguments to the kernel:

- r3:  address of a flattened device-tree blob or 0x0.

---

# HiSilicon STB PCIe host bridge DT description

_Peios Kernel / Hardware and drivers / Device tree / bindings/pci_

> Device-tree binding reference for HiSilicon STB PCIe host bridge DT description.

The HiSilicon STB PCIe host controller is based on the DesignWare PCIe core.
It shares common functions with the DesignWare PCIe core driver and inherits
common properties defined in
[Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml](</kernel/hardware/devicetree-bindings/dt-pci/snps-dw-pcie.md>).

## Additional properties are described here:

Required properties

- compatible: Should be one of the following strings:
  "hisilicon,hi3798cv200-pcie"
- reg: Should contain sysctl, rc\_dbi, config registers location and length.
- reg-names: Must include the following entries:
  "control": control registers of PCIe controller;
  "rc-dbi": configuration space of PCIe controller;
  "config": configuration transaction space of PCIe controller.
- bus-range: PCI bus numbers covered.
- interrupts: MSI interrupt.
- interrupt-names: Must include "msi" entries.
- clocks: List of phandle and clock specifier pairs as listed in clock-names
  property.
- clock-name: Must include the following entries:
  "aux": auxiliary gate clock;
  "pipe": pipe gate clock;
  "sys": sys gate clock;
  "bus": bus gate clock.
- resets: List of phandle and reset specifier pairs as listed in reset-names
  property.
- reset-names: Must include the following entries:
  "soft": soft reset;
  "sys": sys reset;
  "bus": bus reset.

## Optional properties:

- reset-gpios: The gpio to generate PCIe PERST# assert and deassert signal.
- vpcie-supply: The regulator in charge of PCIe port power.
- phys: List of phandle and phy mode specifier, should be 0.
- phy-names: Must be "phy".

## Example:

```dts
	pcie@f9860000 {
		compatible = "hisilicon,hi3798cv200-pcie";
		reg = <0xf9860000 0x1000>,
		      <0xf0000000 0x2000>,
		      <0xf2000000 0x01000000>;
		reg-names = "control", "rc-dbi", "config";
		#address-cells = <3>;
		#size-cells = <2>;
		device_type = "pci";
		bus-range = <0 15>;
		num-lanes = <1>;
		ranges=<0x81000000 0 0 0xf4000000 0 0x00010000
			0x82000000 0 0xf3000000 0xf3000000 0 0x01000000>;
		interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "msi";
		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 0 0>;
		interrupt-map = <0 0 0 0 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
		clocks = <&crg PCIE_AUX_CLK>,
			 <&crg PCIE_PIPE_CLK>,
			 <&crg PCIE_SYS_CLK>,
			 <&crg PCIE_BUS_CLK>;
		clock-names = "aux", "pipe", "sys", "bus";
		resets = <&crg 0x18c 6>, <&crg 0x18c 5>, <&crg 0x18c 4>;
		reset-names = "soft", "sys", "bus";
		phys = <&combphy1 PHY_TYPE_PCIE>;
		phy-names = "phy";
	};
```

---

# NVIDIA Tegra PCIe controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pci_

> Device-tree binding reference for NVIDIA Tegra PCIe controller.

## Required properties:

```text
- compatible: Must be:
  - "nvidia,tegra20-pcie": for Tegra20
  - "nvidia,tegra30-pcie": for Tegra30
  - "nvidia,tegra124-pcie": for Tegra124 and Tegra132
  - "nvidia,tegra210-pcie": for Tegra210
  - "nvidia,tegra186-pcie": for Tegra186
- power-domains: To ungate power partition by BPMP powergate driver. Must
  contain BPMP phandle and PCIe power partition ID. This is required only
  for Tegra186.
- device_type: Must be "pci"
- reg: A list of physical base address and length for each set of controller
  registers. Must contain an entry for each entry in the reg-names property.
- reg-names: Must include the following entries:
  "pads": PADS registers
  "afi": AFI registers
  "cs": configuration space region
- interrupts: A list of interrupt outputs of the controller. Must contain an
  entry for each entry in the interrupt-names property.
- interrupt-names: Must include the following entries:
  "intr": The Tegra interrupt that is asserted for controller interrupts
  "msi": The Tegra interrupt that is asserted when an MSI is received
- bus-range: Range of bus numbers associated with this controller
- #address-cells: Address representation for root ports (must be 3)
  - cell 0 specifies the bus and device numbers of the root port:
    [23:16]: bus number
    [15:11]: device number
  - cell 1 denotes the upper 32 address bits and should be 0
  - cell 2 contains the lower 32 address bits and is used to translate to the
    CPU address space
- #size-cells: Size representation for root ports (must be 2)
- ranges: Describes the translation of addresses for root ports and standard
  PCI regions. The entries must be 6 cells each, where the first three cells
  correspond to the address as described for the #address-cells property
  above, the fourth cell is the physical CPU address to translate to and the
  fifth and six cells are as described for the #size-cells property above.
  - The first two entries are expected to translate the addresses for the root
    port registers, which are referenced by the assigned-addresses property of
    the root port nodes (see below).
  - The remaining entries setup the mapping for the standard I/O, memory and
    prefetchable PCI regions. The first cell determines the type of region
    that is setup:
    - 0x81000000: I/O memory region
    - 0x82000000: non-prefetchable memory region
    - 0xc2000000: prefetchable memory region
  Please refer to the standard PCI bus binding document for a more detailed
  explanation.
- #interrupt-cells: Size representation for interrupts (must be 1)
- interrupt-map-mask and interrupt-map: Standard PCI IRQ mapping properties
  Please refer to the standard PCI bus binding document for a more detailed
  explanation.
- clocks: Must contain an entry for each entry in clock-names.
  See ../clocks/clock-bindings.txt for details.
- clock-names: Must include the following entries:
  - pex
  - afi
  - pll_e
  - cml (not required for Tegra20)
- resets: Must contain an entry for each entry in reset-names.
  See ../reset/reset.txt for details.
- reset-names: Must include the following entries:
  - pex
  - afi
  - pcie_x
```

## Optional properties:

```text
- pinctrl-names: A list of pinctrl state names. Must contain the following
  entries:
  - "default": active state, puts PCIe I/O out of deep power down state
  - "idle": puts PCIe I/O into deep power down state
- pinctrl-0: phandle for the default/active state of pin configurations.
- pinctrl-1: phandle for the idle state of pin configurations.
```

## Required properties on Tegra124 and later (deprecated):

```text
- phys: Must contain an entry for each entry in phy-names.
- phy-names: Must include the following entries:
  - pcie
```

These properties are deprecated in favour of per-lane PHYs define in each of
the root ports (see below).

## Power supplies for Tegra20:

- avdd-pex-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
- vdd-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
- avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must
  supply 1.05 V.
- avdd-plle-supply: Power supply for PLLE, which is shared with SATA. Must
  supply 1.05 V.
- vddio-pex-clk-supply: Power supply for PCIe clock. Must supply 3.3 V.

## Power supplies for Tegra30:

```text
- Required:
  - avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must
    supply 1.05 V.
  - avdd-plle-supply: Power supply for PLLE, which is shared with SATA. Must
    supply 1.05 V.
  - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must
    supply 1.8 V.
  - hvdd-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks.
    Must supply 3.3 V.
- Optional:
  - If lanes 0 to 3 are used:
    - avdd-pexa-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
    - vdd-pexa-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
  - If lanes 4 or 5 are used:
    - avdd-pexb-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
    - vdd-pexb-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
```

## Power supplies for Tegra124:

```text
- Required:
  - avddio-pex-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
  - dvddio-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
  - hvdd-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks.
    Must supply 3.3 V.
  - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must
    supply 2.8-3.3 V.
```

## Power supplies for Tegra210:

```text
- Required:
  - hvddio-pex-supply: High-voltage supply for PCIe I/O and PCIe output
    clocks. Must supply 1.8 V.
  - dvddio-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
  - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must
    supply 1.8 V.
```

## Power supplies for Tegra186:

```text
- Required:
  - dvdd-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
  - hvdd-pex-pll-supply: High-voltage supply for PLLE (shared with USB3). Must
    supply 1.8 V.
  - hvdd-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks.
    Must supply 1.8 V.
  - vddio-pexctl-aud-supply: Power supply for PCIe side band signals. Must
    supply 1.8 V.
```

Root ports are defined as subnodes of the PCIe controller node.

## Required properties:

```text
- device_type: Must be "pci"
- assigned-addresses: Address and size of the port configuration registers
- reg: PCI bus address of the root port
- #address-cells: Must be 3
- #size-cells: Must be 2
- ranges: Sub-ranges distributed from the PCIe controller node. An empty
  property is sufficient.
- nvidia,num-lanes: Number of lanes to use for this port. Valid combinations
  are:
  - Root port 0 uses 4 lanes, root port 1 is unused.
  - Both root ports use 2 lanes.
```

## Required properties for Tegra124 and later:

- phys: Must contain an phandle to a PHY for each entry in phy-names.
- phy-names: Must include an entry for each active lane. Note that the number
  of entries does not have to (though usually will) be equal to the specified
  number of lanes in the nvidia,num-lanes property. Entries are of the form
  "pcie-N": where N ranges from 0 to the value specified in nvidia,num-lanes.

## Examples:

## Tegra20:

## SoC DTSI:

```dts
	pcie-controller@80003000 {
		compatible = "nvidia,tegra20-pcie";
		device_type = "pci";
		reg = <0x80003000 0x00000800   /* PADS registers */
		       0x80003800 0x00000200   /* AFI registers */
		       0x90000000 0x10000000>; /* configuration space */
		reg-names = "pads", "afi", "cs";
		interrupts = <0 98 0x04   /* controller interrupt */
		              0 99 0x04>; /* MSI interrupt */
		interrupt-names = "intr", "msi";

		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 0 0>;
		interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;

		bus-range = <0x00 0xff>;
		#address-cells = <3>;
		#size-cells = <2>;

		ranges = <0x82000000 0 0x80000000 0x80000000 0 0x00001000   /* port 0 registers */
			  0x82000000 0 0x80001000 0x80001000 0 0x00001000   /* port 1 registers */
			  0x81000000 0 0          0x82000000 0 0x00010000   /* downstream I/O */
			  0x82000000 0 0xa0000000 0xa0000000 0 0x10000000   /* non-prefetchable memory */
			  0xc2000000 0 0xb0000000 0xb0000000 0 0x10000000>; /* prefetchable memory */

		clocks = <&tegra_car 70>, <&tegra_car 72>, <&tegra_car 118>;
		clock-names = "pex", "afi", "pll_e";
		resets = <&tegra_car 70>, <&tegra_car 72>, <&tegra_car 74>;
		reset-names = "pex", "afi", "pcie_x";
		status = "disabled";

		pci@1,0 {
			device_type = "pci";
			assigned-addresses = <0x82000800 0 0x80000000 0 0x1000>;
			reg = <0x000800 0 0 0 0>;
			status = "disabled";

			#address-cells = <3>;
			#size-cells = <2>;

			ranges;

			nvidia,num-lanes = <2>;
		};

		pci@2,0 {
			device_type = "pci";
			assigned-addresses = <0x82001000 0 0x80001000 0 0x1000>;
			reg = <0x001000 0 0 0 0>;
			status = "disabled";

			#address-cells = <3>;
			#size-cells = <2>;

			ranges;

			nvidia,num-lanes = <2>;
		};
	};
```

## Board DTS:

```dts
	pcie-controller@80003000 {
		status = "okay";

		vdd-supply = <&pci_vdd_reg>;
		pex-clk-supply = <&pci_clk_reg>;

		/* root port 00:01.0 */
		pci@1,0 {
			status = "okay";

			/* bridge 01:00.0 (optional) */
			pci@0,0 {
				reg = <0x010000 0 0 0 0>;

				#address-cells = <3>;
				#size-cells = <2>;

				device_type = "pci";

				/* endpoint 02:00.0 */
				pci@0,0 {
					reg = <0x020000 0 0 0 0>;
				};
			};
		};
	};
```

Note that devices on the PCI bus are dynamically discovered using PCI's bus
enumeration and therefore don't need corresponding device nodes in DT. However
if a device on the PCI bus provides a non-probeable bus such as I2C or SPI,
device nodes need to be added in order to allow the bus' children to be
instantiated at the proper location in the operating system's device tree (as
illustrated by the optional nodes in the example above).

## Tegra30:

## SoC DTSI:

```dts
	pcie-controller@3000 {
		compatible = "nvidia,tegra30-pcie";
		device_type = "pci";
		reg = <0x00003000 0x00000800   /* PADS registers */
		       0x00003800 0x00000200   /* AFI registers */
		       0x10000000 0x10000000>; /* configuration space */
		reg-names = "pads", "afi", "cs";
		interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH   /* controller interrupt */
			      GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
		interrupt-names = "intr", "msi";

		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 0 0>;
		interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;

		bus-range = <0x00 0xff>;
		#address-cells = <3>;
		#size-cells = <2>;

		ranges = <0x82000000 0 0x00000000 0x00000000 0 0x00001000   /* port 0 configuration space */
			  0x82000000 0 0x00001000 0x00001000 0 0x00001000   /* port 1 configuration space */
			  0x82000000 0 0x00004000 0x00004000 0 0x00001000   /* port 2 configuration space */
			  0x81000000 0 0          0x02000000 0 0x00010000   /* downstream I/O */
			  0x82000000 0 0x20000000 0x20000000 0 0x08000000   /* non-prefetchable memory */
			  0xc2000000 0 0x28000000 0x28000000 0 0x18000000>; /* prefetchable memory */

		clocks = <&tegra_car TEGRA30_CLK_PCIE>,
			 <&tegra_car TEGRA30_CLK_AFI>,
			 <&tegra_car TEGRA30_CLK_PLL_E>,
			 <&tegra_car TEGRA30_CLK_CML0>;
		clock-names = "pex", "afi", "pll_e", "cml";
		resets = <&tegra_car 70>,
			 <&tegra_car 72>,
			 <&tegra_car 74>;
		reset-names = "pex", "afi", "pcie_x";
		status = "disabled";

		pci@1,0 {
			device_type = "pci";
			assigned-addresses = <0x82000800 0 0x00000000 0 0x1000>;
			reg = <0x000800 0 0 0 0>;
			status = "disabled";

			#address-cells = <3>;
			#size-cells = <2>;
			ranges;

			nvidia,num-lanes = <2>;
		};

		pci@2,0 {
			device_type = "pci";
			assigned-addresses = <0x82001000 0 0x00001000 0 0x1000>;
			reg = <0x001000 0 0 0 0>;
			status = "disabled";

			#address-cells = <3>;
			#size-cells = <2>;
			ranges;

			nvidia,num-lanes = <2>;
		};

		pci@3,0 {
			device_type = "pci";
			assigned-addresses = <0x82001800 0 0x00004000 0 0x1000>;
			reg = <0x001800 0 0 0 0>;
			status = "disabled";

			#address-cells = <3>;
			#size-cells = <2>;
			ranges;

			nvidia,num-lanes = <2>;
		};
	};
```

## Board DTS:

```dts
	pcie-controller@3000 {
		status = "okay";

		avdd-pexa-supply = <&ldo1_reg>;
		vdd-pexa-supply = <&ldo1_reg>;
		avdd-pexb-supply = <&ldo1_reg>;
		vdd-pexb-supply = <&ldo1_reg>;
		avdd-pex-pll-supply = <&ldo1_reg>;
		avdd-plle-supply = <&ldo1_reg>;
		vddio-pex-ctl-supply = <&sys_3v3_reg>;
		hvdd-pex-supply = <&sys_3v3_pexs_reg>;

		pci@1,0 {
			status = "okay";
		};

		pci@3,0 {
			status = "okay";
		};
	};
```

## Tegra124:

## SoC DTSI:

```dts
	pcie-controller@1003000 {
		compatible = "nvidia,tegra124-pcie";
		device_type = "pci";
		reg = <0x0 0x01003000 0x0 0x00000800   /* PADS registers */
		       0x0 0x01003800 0x0 0x00000800   /* AFI registers */
		       0x0 0x02000000 0x0 0x10000000>; /* configuration space */
		reg-names = "pads", "afi", "cs";
		interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, /* controller interrupt */
			     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
		interrupt-names = "intr", "msi";

		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 0 0>;
		interrupt-map = <0 0 0 0 &gic GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;

		bus-range = <0x00 0xff>;
		#address-cells = <3>;
		#size-cells = <2>;

		ranges = <0x82000000 0 0x01000000 0x0 0x01000000 0 0x00001000   /* port 0 configuration space */
			  0x82000000 0 0x01001000 0x0 0x01001000 0 0x00001000   /* port 1 configuration space */
			  0x81000000 0 0x0        0x0 0x12000000 0 0x00010000   /* downstream I/O (64 KiB) */
			  0x82000000 0 0x13000000 0x0 0x13000000 0 0x0d000000   /* non-prefetchable memory (208 MiB) */
			  0xc2000000 0 0x20000000 0x0 0x20000000 0 0x20000000>; /* prefetchable memory (512 MiB) */

		clocks = <&tegra_car TEGRA124_CLK_PCIE>,
			 <&tegra_car TEGRA124_CLK_AFI>,
			 <&tegra_car TEGRA124_CLK_PLL_E>,
			 <&tegra_car TEGRA124_CLK_CML0>;
		clock-names = "pex", "afi", "pll_e", "cml";
		resets = <&tegra_car 70>,
			 <&tegra_car 72>,
			 <&tegra_car 74>;
		reset-names = "pex", "afi", "pcie_x";
		status = "disabled";

		pci@1,0 {
			device_type = "pci";
			assigned-addresses = <0x82000800 0 0x01000000 0 0x1000>;
			reg = <0x000800 0 0 0 0>;
			status = "disabled";

			#address-cells = <3>;
			#size-cells = <2>;
			ranges;

			nvidia,num-lanes = <2>;
		};

		pci@2,0 {
			device_type = "pci";
			assigned-addresses = <0x82001000 0 0x01001000 0 0x1000>;
			reg = <0x001000 0 0 0 0>;
			status = "disabled";

			#address-cells = <3>;
			#size-cells = <2>;
			ranges;

			nvidia,num-lanes = <1>;
		};
	};
```

## Board DTS:

```dts
	pcie-controller@1003000 {
		status = "okay";

		avddio-pex-supply = <&vdd_1v05_run>;
		dvddio-pex-supply = <&vdd_1v05_run>;
		avdd-pex-pll-supply = <&vdd_1v05_run>;
		hvdd-pex-supply = <&vdd_3v3_lp0>;
		hvdd-pex-pll-e-supply = <&vdd_3v3_lp0>;
		vddio-pex-ctl-supply = <&vdd_3v3_lp0>;
		avdd-pll-erefe-supply = <&avdd_1v05_run>;

		/* Mini PCIe */
		pci@1,0 {
			phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-4}>;
			phy-names = "pcie-0";
			status = "okay";
		};

		/* Gigabit Ethernet */
		pci@2,0 {
			phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>;
			phy-names = "pcie-0";
			status = "okay";
		};
	};
```

## Tegra210:

## SoC DTSI:

```dts
	pcie-controller@1003000 {
		compatible = "nvidia,tegra210-pcie";
		device_type = "pci";
		reg = <0x0 0x01003000 0x0 0x00000800   /* PADS registers */
		       0x0 0x01003800 0x0 0x00000800   /* AFI registers */
		       0x0 0x02000000 0x0 0x10000000>; /* configuration space */
		reg-names = "pads", "afi", "cs";
		interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, /* controller interrupt */
			     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
		interrupt-names = "intr", "msi";

		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 0 0>;
		interrupt-map = <0 0 0 0 &gic GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;

		bus-range = <0x00 0xff>;
		#address-cells = <3>;
		#size-cells = <2>;

		ranges = <0x82000000 0 0x01000000 0x0 0x01000000 0 0x00001000   /* port 0 configuration space */
			  0x82000000 0 0x01001000 0x0 0x01001000 0 0x00001000   /* port 1 configuration space */
			  0x81000000 0 0x0        0x0 0x12000000 0 0x00010000   /* downstream I/O (64 KiB) */
			  0x82000000 0 0x13000000 0x0 0x13000000 0 0x0d000000   /* non-prefetchable memory (208 MiB) */
			  0xc2000000 0 0x20000000 0x0 0x20000000 0 0x20000000>; /* prefetchable memory (512 MiB) */

		clocks = <&tegra_car TEGRA210_CLK_PCIE>,
			 <&tegra_car TEGRA210_CLK_AFI>,
			 <&tegra_car TEGRA210_CLK_PLL_E>,
			 <&tegra_car TEGRA210_CLK_CML0>;
		clock-names = "pex", "afi", "pll_e", "cml";
		resets = <&tegra_car 70>,
			 <&tegra_car 72>,
			 <&tegra_car 74>;
		reset-names = "pex", "afi", "pcie_x";
		status = "disabled";

		pci@1,0 {
			device_type = "pci";
			assigned-addresses = <0x82000800 0 0x01000000 0 0x1000>;
			reg = <0x000800 0 0 0 0>;
			status = "disabled";

			#address-cells = <3>;
			#size-cells = <2>;
			ranges;

			nvidia,num-lanes = <4>;
		};

		pci@2,0 {
			device_type = "pci";
			assigned-addresses = <0x82001000 0 0x01001000 0 0x1000>;
			reg = <0x001000 0 0 0 0>;
			status = "disabled";

			#address-cells = <3>;
			#size-cells = <2>;
			ranges;

			nvidia,num-lanes = <1>;
		};
	};
```

## Board DTS:

```dts
	pcie-controller@1003000 {
		status = "okay";

		avdd-pll-uerefe-supply = <&avdd_1v05_pll>;
		hvddio-pex-supply = <&vdd_1v8>;
		dvddio-pex-supply = <&vdd_pex_1v05>;
		dvdd-pex-pll-supply = <&vdd_pex_1v05>;
		hvdd-pex-pll-e-supply = <&vdd_1v8>;
		vddio-pex-ctl-supply = <&vdd_1v8>;

		pci@1,0 {
			phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-0}>,
			       <&{/padctl@7009f000/pads/pcie/lanes/pcie-1}>,
			       <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>,
			       <&{/padctl@7009f000/pads/pcie/lanes/pcie-3}>;
			phy-names = "pcie-0", "pcie-1", "pcie-2", "pcie-3";
			status = "okay";
		};

		pci@2,0 {
			phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-4}>;
			phy-names = "pcie-0";
			status = "okay";
		};
	};
```

## Tegra186:

## SoC DTSI:

```dts
	pcie@10003000 {
		compatible = "nvidia,tegra186-pcie";
		power-domains = <&bpmp TEGRA186_POWER_DOMAIN_PCX>;
		device_type = "pci";
		reg = <0x0 0x10003000 0x0 0x00000800   /* PADS registers */
		       0x0 0x10003800 0x0 0x00000800   /* AFI registers */
		       0x0 0x40000000 0x0 0x10000000>; /* configuration space */
		reg-names = "pads", "afi", "cs";

		interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>, /* controller interrupt */
			     <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
		interrupt-names = "intr", "msi";

		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 0 0>;
		interrupt-map = <0 0 0 0 &gic GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;

		bus-range = <0x00 0xff>;
		#address-cells = <3>;
		#size-cells = <2>;

		ranges = <0x82000000 0 0x10000000 0x0 0x10000000 0 0x00001000   /* port 0 configuration space */
			  0x82000000 0 0x10001000 0x0 0x10001000 0 0x00001000   /* port 1 configuration space */
			  0x82000000 0 0x10004000 0x0 0x10004000 0 0x00001000   /* port 2 configuration space */
			  0x81000000 0 0x0        0x0 0x50000000 0 0x00010000   /* downstream I/O (64 KiB) */
			  0x82000000 0 0x50100000 0x0 0x50100000 0 0x07F00000   /* non-prefetchable memory (127 MiB) */
			  0xc2000000 0 0x58000000 0x0 0x58000000 0 0x28000000>; /* prefetchable memory (640 MiB) */

		clocks = <&bpmp TEGRA186_CLK_AFI>,
			 <&bpmp TEGRA186_CLK_PCIE>,
			 <&bpmp TEGRA186_CLK_PLLE>;
		clock-names = "afi", "pex", "pll_e";

		resets = <&bpmp TEGRA186_RESET_AFI>,
			 <&bpmp TEGRA186_RESET_PCIE>,
			 <&bpmp TEGRA186_RESET_PCIEXCLK>;
		reset-names = "afi", "pex", "pcie_x";

		status = "disabled";

		pci@1,0 {
			device_type = "pci";
			assigned-addresses = <0x82000800 0 0x10000000 0 0x1000>;
			reg = <0x000800 0 0 0 0>;
			status = "disabled";

			#address-cells = <3>;
			#size-cells = <2>;
			ranges;

			nvidia,num-lanes = <2>;
		};

		pci@2,0 {
			device_type = "pci";
			assigned-addresses = <0x82001000 0 0x10001000 0 0x1000>;
			reg = <0x001000 0 0 0 0>;
			status = "disabled";

			#address-cells = <3>;
			#size-cells = <2>;
			ranges;

			nvidia,num-lanes = <1>;
		};

		pci@3,0 {
			device_type = "pci";
			assigned-addresses = <0x82001800 0 0x10004000 0 0x1000>;
			reg = <0x001800 0 0 0 0>;
			status = "disabled";

			#address-cells = <3>;
			#size-cells = <2>;
			ranges;

			nvidia,num-lanes = <1>;
		};
	};
```

## Board DTS:

```dts
	pcie@10003000 {
		status = "okay";

		dvdd-pex-supply = <&vdd_pex>;
		hvdd-pex-pll-supply = <&vdd_1v8>;
		hvdd-pex-supply = <&vdd_1v8>;
		vddio-pexctl-aud-supply = <&vdd_1v8>;

		pci@1,0 {
			nvidia,num-lanes = <4>;
			status = "okay";
		};

		pci@2,0 {
			nvidia,num-lanes = <0>;
			status = "disabled";
		};

		pci@3,0 {
			nvidia,num-lanes = <1>;
			status = "disabled";
		};
	};
```

---

# Mediatek/Ralink RT3883 PCI controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pci_

> Device-tree binding reference for Mediatek/Ralink RT3883 PCI controller.

1) Main node

## Required properties:

- compatible: must be "ralink,rt3883-pci"

- reg: specifies the physical base address of the controller and
  the length of the memory mapped region.

- #address-cells: specifies the number of cells needed to encode an
  address. The value must be 1.

- #size-cells: specifies the number of cells used to represent the size
  of an address. The value must be 1.

- ranges: specifies the translation between child address space and parent
  address space

## Optional properties:

- status: indicates the operational status of the device.
  Value must be either "disabled" or "okay".

2) Child nodes

```text
   The main node must have two child nodes which describes the built-in
   interrupt controller and the PCI host bridge.
```

## a) Interrupt controller:

## Required properties:

- interrupt-controller: identifies the node as an interrupt controller

- #address-cells: specifies the number of cells needed to encode an
  address. The value must be 0. As such, 'interrupt-map' nodes do not
  have to specify a parent unit address.

- #interrupt-cells: specifies the number of cells needed to encode an
  interrupt source. The value must be 1.

- interrupts: specifies the interrupt source of the parent interrupt
  controller. The format of the interrupt specifier depends on the
  parent interrupt controller.

## b) PCI host bridge:

## Required properties:

- #address-cells: specifies the number of cells needed to encode an
  address. The value must be 0.

- #size-cells: specifies the number of cells used to represent the size
  of an address. The value must be 2.

- #interrupt-cells: specifies the number of cells needed to encode an
  interrupt source. The value must be 1.

- device\_type: must be "pci"

- bus-range: PCI bus numbers covered

- ranges: specifies the ranges for the PCI memory and I/O regions

- interrupt-map-mask,
- interrupt-map: standard PCI properties to define the mapping of the
  PCI interface to interrupt numbers.

```text
   The PCI host bridge node might have additional sub-nodes representing
   the onboard PCI devices/PCI slots. Each such sub-node must have the
   following mandatory properties:
```

- reg: used only for interrupt mapping, so only the first four bytes
  are used to refer to the correct bus number and device number.

- device\_type: must be "pci"

```text
   If a given sub-node represents a PCI bridge it must have following
   mandatory properties as well:
```

- #address-cells: must be set to &lt;3&gt;

- #size-cells: must set to &lt;2&gt;

- #interrupt-cells: must be set to &lt;1&gt;

- interrupt-map-mask,
- interrupt-map: standard PCI properties to define the mapping of the
  PCI interface to interrupt numbers.

```text
   Besides the required properties the sub-nodes may have these optional
   properties:
```

- status: indicates the operational status of the sub-node.
  Value must be either "disabled" or "okay".

3) Example:

## a) SoC specific dtsi file:

```dts
	pci@10140000 {
		compatible = "ralink,rt3883-pci";
		reg = <0x10140000 0x20000>;
		#address-cells = <1>;
		#size-cells = <1>;
		ranges; /* direct mapping */

		status = "disabled";

		pciintc: interrupt-controller {
			interrupt-controller;
			#address-cells = <0>;
			#interrupt-cells = <1>;

			interrupt-parent = <&cpuintc>;
			interrupts = <4>;
		};

		host-bridge {
			#address-cells = <3>;
			#size-cells = <2>;
			#interrupt-cells = <1>;

			device_type = "pci";

			bus-range = <0 255>;
			ranges = <
				0x02000000 0 0x00000000 0x20000000 0 0x10000000 /* pci memory */
				0x01000000 0 0x00000000 0x10160000 0 0x00010000 /* io space */
			>;

			interrupt-map-mask = <0xf800 0 0 7>;
			interrupt-map = <
				/* IDSEL 17 */
				0x8800 0 0 1 &pciintc 18
				0x8800 0 0 2 &pciintc 18
				0x8800 0 0 3 &pciintc 18
				0x8800 0 0 4 &pciintc 18
				/* IDSEL 18 */
				0x9000 0 0 1 &pciintc 19
				0x9000 0 0 2 &pciintc 19
				0x9000 0 0 3 &pciintc 19
				0x9000 0 0 4 &pciintc 19
			>;

			pci-bridge@1 {
				reg = <0x0800 0 0 0 0>;
				device_type = "pci";
				#interrupt-cells = <1>;
				#address-cells = <3>;
				#size-cells = <2>;

				interrupt-map-mask = <0x0 0 0 0>;
				interrupt-map = <0x0 0 0 0 &pciintc 20>;

				status = "disabled";
			};

			pci-slot@17 {
				reg = <0x8800 0 0 0 0>;
				device_type = "pci";

				status = "disabled";
			};

			pci-slot@18 {
				reg = <0x9000 0 0 0 0>;
				device_type = "pci";

				status = "disabled";
			};
		};
	};
```

## b) Board specific dts file:

```dts
	pci@10140000 {
		status = "okay";

		host-bridge {
			pci-bridge@1 {
				status = "okay";
			};
		};
	};
```

---

# TI PCI Controllers

_Peios Kernel / Hardware and drivers / Device tree / bindings/pci_

> Device-tree binding reference for TI PCI Controllers.

PCIe DesignWare Controller

- compatible: Should be "ti,dra7-pcie" for RC (deprecated)
  Should be "ti,dra7-pcie-ep" for EP (deprecated)
  Should be "ti,dra746-pcie-rc" for dra74x/dra76 in RC mode
  Should be "ti,dra746-pcie-ep" for dra74x/dra76 in EP mode
  Should be "ti,dra726-pcie-rc" for dra72x in RC mode
  Should be "ti,dra726-pcie-ep" for dra72x in EP mode
- phys : list of PHY specifiers (used by generic PHY framework)
- phy-names : must be "pcie-phy0", "pcie-phy1", "pcie-phyN".. based on the
  number of PHYs as specified in \*phys\* property.
- ti,hwmods : Name of the hwmod associated to the pcie, "pcie&lt;X&gt;",
  where &lt;X&gt; is the instance number of the pcie from the HW spec.
- num-lanes as specified in ../snps,dw-pcie.yaml
- ti,syscon-lane-sel : phandle/offset pair. Phandle to the system control
  module and the register offset to specify lane
  selection.

## HOST MODE

- reg : Two register ranges as listed in the reg-names property
- reg-names : The first entry must be "ti-conf" for the TI-specific registers
  The second entry must be "rc-dbics" for the DesignWare PCIe
  registers
  The third entry must be "config" for the PCIe configuration space
- interrupts : Two interrupt entries must be specified. The first one is for
  main interrupt line and the second for MSI interrupt line.
- #address-cells,
  #size-cells,
  #interrupt-cells,
  device\_type,
  ranges,
  interrupt-map-mask,
  interrupt-map : as specified in ../snps,dw-pcie.yaml
- ti,syscon-unaligned-access: phandle to the syscon DT node. The 1st argument
  should contain the register offset within syscon
  and the 2nd argument should contain the bit field
  for setting the bit to enable unaligned
  access.

## DEVICE MODE

- reg : Four register ranges as listed in the reg-names property
- reg-names : "ti-conf" for the TI-specific registers
  "ep\_dbics" for the standard configuration registers as
  they are locally accessed within the DIF CS space
  "ep\_dbics2" for the standard configuration registers as
  they are locally accessed within the DIF CS2 space
  "addr\_space" used to map remote RC address space
- interrupts : one interrupt entries must be specified for main interrupt.
- num-ib-windows : number of inbound address translation windows
- num-ob-windows : number of outbound address translation windows
- ti,syscon-unaligned-access: phandle to the syscon DT node. The 1st argument
  should contain the register offset within syscon
  and the 2nd argument should contain the bit field
  for setting the bit to enable unaligned
  access.

## Optional Property:

- gpios : Should be added if a GPIO line is required to drive PERST# line

NOTE: Two DT nodes may be added for each PCI controller; one for host
mode and another for device mode. So in order for PCI to
work in host mode, EP mode DT node should be disabled and in order to PCI to
work in EP mode, host mode DT node should be disabled. Host mode and EP
mode are mutually exclusive.

## Example:

```dts
axi {
	compatible = "simple-bus";
	#size-cells = <1>;
	#address-cells = <1>;
	ranges = <0x51000000 0x51000000 0x3000
		  0x0	     0x20000000 0x10000000>;
	pcie@51000000 {
		compatible = "ti,dra7-pcie";
		reg = <0x51000000 0x2000>, <0x51002000 0x14c>, <0x1000 0x2000>;
		reg-names = "rc_dbics", "ti_conf", "config";
		interrupts = <0 232 0x4>, <0 233 0x4>;
		#address-cells = <3>;
		#size-cells = <2>;
		device_type = "pci";
		ranges = <0x81000000 0 0          0x03000 0 0x00010000
			  0x82000000 0 0x20013000 0x13000 0 0xffed000>;
		#interrupt-cells = <1>;
		num-lanes = <1>;
		ti,hwmods = "pcie1";
		phys = <&pcie1_phy>;
		phy-names = "pcie-phy0";
		interrupt-map-mask = <0 0 0 7>;
		interrupt-map = <0 0 0 1 &pcie_intc 1>,
				<0 0 0 2 &pcie_intc 2>,
				<0 0 0 3 &pcie_intc 3>,
				<0 0 0 4 &pcie_intc 4>;
		pcie_intc: interrupt-controller {
			interrupt-controller;
			#address-cells = <0>;
			#interrupt-cells = <1>;
		};
	};
};
```

---

# Phy bindings bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/phy_

> Device-tree binding reference for Phy bindings bindings.

This document explains only the device tree data binding. For general
information about PHY subsystem refer to [Documentation/driver-api/phy/phy.rst](</kernel/hardware/driver-api/phy/phy.md>)

## PHY device node

## Required Properties:

#phy-cells:	Number of cells in a PHY specifier;  The meaning of all those

```text
		cells is defined by the binding for the phy node. The PHY
		provider can use the values in cells to find the appropriate
		PHY.
```

## Optional Properties:

phy-supply:	Phandle to a regulator that provides power to the PHY. This

```text
		regulator will be managed during the PHY power on/off sequence.
```

## For example:

```dts
phys: phy {
    compatible = "xxx";
    reg = <...>;
    .
    .
    #phy-cells = <1>;
    .
    .
};
```

That node describes an IP block (PHY provider) that implements 2 different PHYs.
In order to differentiate between these 2 PHYs, an additional specifier should be
given while trying to get a reference to it.

## PHY user node

## Required Properties:

phys : the phandle for the PHY device (used by the PHY subsystem; not to be

```text
       confused with the Ethernet specific 'phy' and 'phy-handle' properties,
       see Documentation/devicetree/bindings/net/ethernet.txt for these)
```

phy-names : the names of the PHY corresponding to the PHYs present in the

```text
	    *phys* phandle
```

## Example 1:

```dts
usb1: usb_otg_ss@xxx {
    compatible = "xxx";
    reg = <xxx>;
    .
    .
    phys = <&usb2_phy>, <&usb3_phy>;
    phy-names = "usb2phy", "usb3phy";
    .
    .
};
```

This node represents a controller that uses two PHYs, one for usb2 and one for
usb3.

## Example 2:

```dts
usb2: usb_otg_ss@xxx {
    compatible = "xxx";
    reg = <xxx>;
    .
    .
    phys = <&phys 1>;
    phy-names = "usbphy";
    .
    .
};
```

This node represents a controller that uses one of the PHYs of the PHY provider
device defined previously. Note that the phy handle has an additional specifier
"1" to differentiate between the two PHYs.

---

# STMicroelectronics STi MIPHY28LP PHY binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/phy_

> Device-tree binding reference for STMicroelectronics STi MIPHY28LP PHY binding.

This binding describes a miphy device that is used to control PHY hardware
for SATA, PCIe or USB3.

## Required properties (controller (parent) node):

- compatible	: Should be "st,miphy28lp-phy".
- st,syscfg	: Should be a phandle of the system configuration register group
  which contain the SATA, PCIe or USB3 mode setting bits.

Required nodes	:  A sub-node is required for each channel the controller

```text
		   provides. Address range information including the usual
		   'reg' and 'reg-names' properties are used inside these
		   nodes to describe the controller's topology. These nodes
		   are translated by the driver's .xlate() function.
```

## Required properties (port (child) node):

```text
- #phy-cells	: Should be 1 (See second example)
		  Cell after port phandle is device type from:
			- PHY_TYPE_SATA
			- PHY_TYPE_PCI
			- PHY_TYPE_USB3
- reg		: Address and length of the register set for the device.
- reg-names	: The names of the register addresses corresponding to the registers
		  filled in "reg". It can also contain the offset of the system configuration
		  registers used as glue-logic to setup the device for SATA/PCIe or USB3
		  devices.
- st,syscfg	: Offset of the parent configuration register.
- resets	: phandle to the parent reset controller.
- reset-names	: Associated name must be "miphy-sw-rst".
```

## Optional properties (port (child) node):

- st,osc-rdy		: to check the MIPHY0\_OSC\_RDY status in the glue-logic. This
  is not available in all the MiPHY. For example, for STiH407, only the
  MiPHY0 has this bit.
- st,osc-force-ext	: to select the external oscillator. This can change from
  different MiPHY inside the same SoC.
- st,sata\_gen		: to select which SATA\_SPDMODE has to be set in the SATA system config
  register.
- st,px\_rx\_pol\_inv	: to invert polarity of RXn/RXp (respectively negative line and positive
  line).
- st,scc-on		: enable ssc to reduce effects of EMI (only for sata or PCIe).
- st,tx-impedance-comp	: to compensate tx impedance avoiding out of range values.

## example:

```dts
		miphy28lp_phy: miphy28lp@9b22000 {
			compatible = "st,miphy28lp-phy";
			st,syscfg = <&syscfg_core>;
			#address-cells	= <1>;
			#size-cells	= <1>;
			ranges;

			phy_port0: port@9b22000 {
				reg = <0x9b22000 0xff>,
				      <0x9b09000 0xff>,
				      <0x9b04000 0xff>;
				reg-names = "sata-up",
					    "pcie-up",
					    "pipew";

				st,syscfg = <0x114 0x818 0xe0 0xec>;
				#phy-cells = <1>;
				st,osc-rdy;
				reset-names = "miphy-sw-rst";
				resets = <&softreset STIH407_MIPHY0_SOFTRESET>;
			};

			phy_port1: port@9b2a000 {
				reg = <0x9b2a000 0xff>,
				      <0x9b19000 0xff>,
				      <0x9b14000 0xff>;
				reg-names = "sata-up",
					    "pcie-up",
					    "pipew";

				st,syscfg = <0x118 0x81c 0xe4 0xf0>;

				#phy-cells = <1>;
				st,osc-force-ext;
				reset-names = "miphy-sw-rst";
				resets = <&softreset STIH407_MIPHY1_SOFTRESET>;
			};

			phy_port2: port@8f95000 {
				reg = <0x8f95000 0xff>,
				      <0x8f90000 0xff>;
				reg-names = "pipew",
					    "usb3-up";

				st,syscfg = <0x11c 0x820>;

				#phy-cells = <1>;
				reset-names = "miphy-sw-rst";
				resets = <&softreset STIH407_MIPHY2_SOFTRESET>;
			};
		};
```

## Specifying phy control of devices

Device nodes should specify the configuration required in their "phys"
property, containing a phandle to the miphy device node and an index
specifying which configuration to use, as described in [phy-bindings.txt](</kernel/hardware/devicetree/bindings-phy/phy-bindings.md>).

## example:

```dts
		sata0: sata@9b20000  {
			...
			phys		= <&phy_port0 PHY_TYPE_SATA>;
			...
		};
```

Macro definitions for the supported miphy configuration can be found in:

include/dt-bindings/phy/phy.h

---

# STMicroelectronics STi MIPHY365x PHY binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/phy_

> Device-tree binding reference for STMicroelectronics STi MIPHY365x PHY binding.

This binding describes a miphy device that is used to control PHY hardware
for SATA and PCIe.

## Required properties (controller (parent) node):

- compatible    : Should be "st,miphy365x-phy"
- st,syscfg     : Phandle / integer array property. Phandle of sysconfig group
  containing the miphy registers and integer array should contain
  an entry for each port sub-node, specifying the control
  register offset inside the sysconfig group.

Required nodes	:  A sub-node is required for each channel the controller

```text
		   provides. Address range information including the usual
		   'reg' and 'reg-names' properties are used inside these
		   nodes to describe the controller's topology. These nodes
		   are translated by the driver's .xlate() function.
```

## Required properties (port (child) node):

```text
- #phy-cells 	: Should be 1 (See second example)
		  Cell after port phandle is device type from:
			- PHY_TYPE_SATA
			- PHY_TYPE_PCI
- reg        	: Address and length of register sets for each device in
		  "reg-names"
- reg-names     : The names of the register addresses corresponding to the
		  registers filled in "reg":
			- sata:   For SATA devices
			- pcie:   For PCIe devices
```

## Optional properties (port (child) node):

- st,sata-gen	     :	Generation of locally attached SATA IP. Expected values
  are {1,2,3). If not supplied generation 1 hardware will
  be expected
- st,pcie-tx-pol-inv :	Bool property to invert the polarity PCIe Tx (Txn/Txp)
- st,sata-tx-pol-inv :	Bool property to invert the polarity SATA Tx (Txn/Txp)

## Example:

```dts
	miphy365x_phy: miphy365x@fe382000 {
		compatible      = "st,miphy365x-phy";
		st,syscfg  	= <&syscfg_rear 0x824 0x828>;
		#address-cells	= <1>;
		#size-cells	= <1>;
		ranges;

		phy_port0: port@fe382000 {
			reg = <0xfe382000 0x100>, <0xfe394000 0x100>;
			reg-names = "sata", "pcie";
			#phy-cells = <1>;
			st,sata-gen = <3>;
		};

		phy_port1: port@fe38a000 {
			reg = <0xfe38a000 0x100>, <0xfe804000 0x100>;;
			reg-names = "sata", "pcie", "syscfg";
			#phy-cells = <1>;
			st,pcie-tx-pol-inv;
		};
	};
```

## Specifying phy control of devices

Device nodes should specify the configuration required in their "phys"
property, containing a phandle to the phy port node and a device type.

## Example:

```dts
#include <dt-bindings/phy/phy.h>
```

```dts
	sata0: sata@fe380000 {
		...
		phys	  = <&phy_port0 PHY_TYPE_SATA>;
		...
	};
```

---

# Abilis Systems TB10x pin controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Abilis Systems TB10x pin controller.

## Required properties

- compatible: should be "abilis,tb10x-iomux";
- reg: should contain the physical address and size of the pin controller's
  register range.

## Function definitions

Functions are defined (and referenced) by sub-nodes of the pin controller.
Every sub-node defines exactly one function (implying a set of pins).
Every function is associated to one named pin group inside the pin controller
driver and these names are used to associate pin group predefinitions to pin
controller sub-nodes.

## Required function definition subnode properties:

- abilis,function: should be set to the name of the function's pin group.

## The following pin groups are available:

- GPIO ports: gpioa, gpiob, gpioc, gpiod, gpioe, gpiof, gpiog,
  gpioh, gpioi, gpioj, gpiok, gpiol, gpiom, gpion
- Serial TS input ports: mis0, mis1, mis2, mis3, mis4, mis5, mis6, mis7
- Parallel TS input ports: mip1, mip3, mip5, mip7
- Serial TS output ports: mos0, mos1, mos2, mos3
- Parallel TS output port: mop
- CI+ port: ciplus
- CableCard (Mcard) port: mcard
- Smart card ports: stc0, stc1
- UART ports: uart0, uart1
- SPI ports: spi1, spi3
- JTAG: jtag

All other ports of the chip are not multiplexed and thus not managed by this
driver.

## GPIO ranges definition

The named pin groups of GPIO ports can be used to define GPIO ranges as
explained in [Documentation/devicetree/bindings/gpio/gpio.txt](</kernel/hardware/devicetree/bindings-gpio/gpio.md>).

## Example

```dts
iomux: iomux@ff10601c {
	compatible = "abilis,tb10x-iomux";
	reg = <0xFF10601c 0x4>;
	pctl_gpio_a: pctl-gpio-a {
		abilis,function = "gpioa";
	};
	pctl_uart0: pctl-uart0 {
		abilis,function = "uart0";
	};
};
uart@ff100000 {
	compatible = "snps,dw-apb-uart";
	reg = <0xFF100000 0x100>;
	clock-frequency = <166666666>;
	interrupts = <25 1>;
	reg-shift = <2>;
	reg-io-width = <4>;
	pinctrl-names = "default";
	pinctrl-0 = <&pctl_uart0>;
};
gpioa: gpio@ff140000 {
	compatible = "abilis,tb10x-gpio";
	reg = <0xFF140000 0x1000>;
	gpio-controller;
	#gpio-cells = <2>;
	ngpio = <3>;
	gpio-ranges = <&iomux 0 0>;
	gpio-ranges-group-names = "gpioa";
};
```

---

# Atmel PIO4 Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Atmel PIO4 Controller.

The Atmel PIO4 controller is used to select the function of a pin and to
configure it.

## Required properties:

- compatible:
  "atmel,sama5d2-pinctrl"
  "microchip,sama7d65-pinctrl", "microchip,sama7g5-pinctrl"
  "microchip,sama7g5-pinctrl"
- reg: base address and length of the PIO controller.
- interrupts: interrupt outputs from the controller, one for each bank.
- interrupt-controller: mark the device node as an interrupt controller.
- #interrupt-cells: should be two.
- gpio-controller: mark the device node as a gpio controller.
- #gpio-cells: should be two.

Please refer to [../gpio/gpio.txt](</kernel/hardware/devicetree/bindings-gpio/gpio.md>) and [../interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>) for
a general description of GPIO and interrupt bindings.

Please refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) in this directory for details of the
common pinctrl bindings used by client devices.

Subnode format
Each node (or subnode) will list the pins it needs and how to configured these
pins.

```dts
	node {
		pinmux = <PIN_NUMBER_PINMUX>;
		GENERIC_PINCONFIG;
	};
```

## Required properties:

- pinmux: integer array. Each integer represents a pin number plus mux and
  ioset settings. Use the macros from boot/dts/&lt;soc&gt;-pinfunc.h file to get the
  right representation of the pin.

## Optional properties:

```text
- GENERIC_PINCONFIG: generic pinconfig options to use:
	- bias-disable, bias-pull-down, bias-pull-up, drive-open-drain,
	 drive-push-pull input-schmitt-enable, input-debounce, output-low,
	 output-high.
	- for microchip,sama7g5-pinctrl only:
		- slew-rate: 0 - disabled, 1 - enabled (default)
- atmel,drive-strength: 0 or 1 for low drive, 2 for medium drive and 3 for
high drive. The default value is low drive.
```

## Example:

```dts
#include <sama5d2-pinfunc.h>
```

...

```dts
{
	pioA: pinctrl@fc038000 {
		compatible = "atmel,sama5d2-pinctrl";
		reg = <0xfc038000 0x600>;
		interrupts = <18 IRQ_TYPE_LEVEL_HIGH 7>,
			     <68 IRQ_TYPE_LEVEL_HIGH 7>,
			     <69 IRQ_TYPE_LEVEL_HIGH 7>,
			     <70 IRQ_TYPE_LEVEL_HIGH 7>;
		interrupt-controller;
		#interrupt-cells = <2>;
		gpio-controller;
		#gpio-cells = <2>;
		clocks = <&pioA_clk>;

		pinctrl_i2c0_default: i2c0_default {
			pinmux = <PIN_PD21__TWD0>,
				 <PIN_PD22__TWCK0>;
			bias-disable;
		};

		pinctrl_led_gpio_default: led_gpio_default {
			pinmux = <PIN_PB0>,
				 <PIN_PB5>;
			bias-pull-up;
			atmel,drive-strength = <ATMEL_PIO_DRVSTR_ME>;
		};

		pinctrl_sdmmc1_default: sdmmc1_default {
			cmd_data {
				pinmux = <PIN_PA28__SDMMC1_CMD>,
					 <PIN_PA18__SDMMC1_DAT0>,
					 <PIN_PA19__SDMMC1_DAT1>,
					 <PIN_PA20__SDMMC1_DAT2>,
					 <PIN_PA21__SDMMC1_DAT3>;
				bias-pull-up;
			};

			ck_cd {
				pinmux = <PIN_PA22__SDMMC1_CK>,
					 <PIN_PA30__SDMMC1_CD>;
				bias-disable;
			};
		};
		...
	};
};
```

...

---

# Axis ARTPEC-6 Pin Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Axis ARTPEC-6 Pin Controller.

## Required properties:

- compatible: "axis,artpec6-pinctrl".
- reg: Should contain the register physical address and length for the pin
  controller.

A pinctrl node should contain at least one subnode representing the pinctrl
groups available on the machine. Each subnode will list the mux function
required and what pin group it will use. Each subnode will also configure the
drive strength and bias pullup of the pin group. If either of these options is
not set, its actual value will be unspecified.

## Required subnode-properties:

- function: Function to mux.
- groups: Name of the pin group to use for the function above.

## Available functions and groups (function: group0, group1...):

```text
		gpio: cpuclkoutgrp0, udlclkoutgrp0, i2c1grp0, i2c2grp0,
		      i2c3grp0, i2s0grp0, i2s1grp0, i2srefclkgrp0, spi0grp0,
		      spi1grp0, pciedebuggrp0, uart0grp0, uart0grp1, uart0grp2,
		      uart1grp0, uart1grp1, uart2grp0, uart2grp1, uart2grp2,
		      uart3grp0, uart4grp0, uart4grp1, uart5grp0, uart5grp1,
		      uart5nocts
		cpuclkout: cpuclkoutgrp0
		udlclkout: udlclkoutgrp0
		i2c1: i2c1grp0
		i2c2: i2c2grp0
		i2c3: i2c3grp0
		i2s0: i2s0grp0
		i2s1: i2s1grp0
		i2srefclk: i2srefclkgrp0
		spi0: spi0grp0
		spi1: spi1grp0
		pciedebug: pciedebuggrp0
		uart0: uart0grp0, uart0grp1, uart0grp2
		uart1: uart1grp0, uart1grp1
		uart2: uart2grp0, uart2grp1, uart2grp2
		uart3: uart3grp0
		uart4: uart4grp0, uart4grp1
		uart5: uart5grp0, uart5grp1, uart5nocts
		nand: nandgrp0
		sdio0: sdio0grp0
		sdio1: sdio1grp0
		ethernet: ethernetgrp0
```

## Optional subnode-properties (see [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)):

- drive-strength: 4, 6, 8, 9 mA.  For SD and NAND pins, this is for 3.3V VCCQ3.
- bias-pull-up
- bias-disable

## Examples:

```dts
pinctrl@f801d000 {
	compatible = "axis,artpec6-pinctrl";
	reg = <0xf801d000 0x400>;

	pinctrl_uart0: uart0grp {
		function = "uart0";
		groups = "uart0grp0";
		drive-strength = <4>;
		bias-pull-up;
	};
	pinctrl_uart3: uart3grp {
		function = "uart3";
		groups = "uart3grp0";
	};
};
uart0: uart@f8036000 {
	compatible = "arm,pl011", "arm,primecell";
	reg = <0xf8036000 0x1000>;
	interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>;
	clocks = <&pll2div24>, <&apb_pclk>;
	clock-names = "uart_clk", "apb_pclk";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart0>;
};
uart3: uart@f8039000 {
	compatible = "arm,pl011", "arm,primecell";
	reg = <0xf8039000 0x1000>;
	interrupts = <0 128 IRQ_TYPE_LEVEL_HIGH>;
	clocks = <&pll2div24>, <&apb_pclk>;
	clock-names = "uart_clk", "apb_pclk";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart3>;
};
```

---

# Broadcom Cygnus IOMUX Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Broadcom Cygnus IOMUX Controller.

The Cygnus IOMUX controller supports group based mux configuration. In
addition, certain pins can be muxed to GPIO function individually.

## Required properties:

- compatible:
  Must be "brcm,cygnus-pinmux"

- reg:
  Define the base and range of the I/O address space that contains the Cygnus
  IOMUX registers

## Properties in subnodes:

- function:
  The mux function to select

- groups:
  The list of groups to select with a given function

For more details, refer to
[Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)

## For example:

```dts
	pinmux: pinmux@0301d0c8 {
		compatible = "brcm,cygnus-pinmux";
		reg = <0x0301d0c8 0x1b0>;

		pinctrl-names = "default";
		pinctrl-0 = <&i2s0_default>;

		i2s0_default: i2s0_default {
			mux {
				function = "i2s0";
				groups = "i2s0_0_grp", "i2s0_1_grp";
			};
		};
	};
```

## List of supported functions and groups in Cygnus:

"i2s0": "i2s0\_0\_grp", "i2s0\_1\_grp"

"i2s1": "i2s1\_0\_grp", "i2s1\_1\_grp"

"i2s2": "i2s2\_0\_grp", "i2s2\_1\_grp", "i2s2\_2\_grp", "i2s2\_3\_grp", "i2s2\_4\_grp"

"spdif": "spdif\_grp"

"pwm0": "pwm0\_grp"

"pwm1": "pwm1\_grp"

"pwm2": "pwm2\_grp"

"pwm3": "pwm3\_grp"

"pwm4": "pwm4\_grp"

"pwm5": "pwm5\_grp"

"key": "key0\_grp", "key1\_grp", "key2\_grp", "key3\_grp", "key4\_grp", "key5\_grp",
"key6\_grp", "key7\_grp", "key8\_grp", "key9\_grp", "key10\_grp", "key11\_grp",
"key12\_grp", "key13\_grp", "key14\_grp", "key15\_grp"

"audio\_dte": "audio\_dte0\_grp", "audio\_dte1\_grp", "audio\_dte2\_grp", "audio\_dte3\_grp"

"smart\_card0": "smart\_card0\_grp", "smart\_card0\_fcb\_grp"

"smart\_card1": "smart\_card1\_grp", "smart\_card1\_fcb\_grp"

"spi0": "spi0\_grp"

"spi1": "spi1\_grp"

"spi2": "spi2\_grp"

"spi3": "spi3\_grp"

"spi4": "spi4\_0\_grp", "spi4\_1\_grp"

"spi5": "spi5\_grp"

"sw\_led0": "sw\_led0\_0\_grp", "sw\_led0\_1\_grp"

"sw\_led1": "sw\_led1\_grp"

"sw\_led2": "sw\_led2\_0\_grp", "sw\_led2\_1\_grp"

"d1w": "d1w\_grp"

"lcd": "lcd\_grp"

"sram": "sram\_0\_grp", "sram\_1\_grp"

"uart0": "uart0\_grp"

"uart1": "uart1\_grp", "uart1\_dte\_grp"

"uart2": "uart2\_grp"

"uart3": "uart3\_grp"

"uart4": "uart4\_grp"

"qspi": "qspi\_0\_grp", "qspi\_1\_grp"

"nand": "nand\_grp"

"sdio0": "sdio0\_grp", "sdio0\_cd\_grp", "sdio0\_mmc\_grp"

"sdio1": "sdio1\_data\_0\_grp", "sdio1\_data\_1\_grp", "sdio1\_cd\_grp",
"sdio1\_led\_grp", "sdio1\_mmc\_grp"

"can0": "can0\_grp"

"can1": "can1\_grp"

"cam": "cam\_led\_grp", "cam\_0\_grp", "cam\_1\_grp"

"bsc1": "bsc1\_grp"

"pcie\_clkreq": "pcie\_clkreq\_grp"

"usb0\_oc": "usb0\_oc\_grp"

"usb1\_oc": "usb1\_oc\_grp"

"usb2\_oc": "usb2\_oc\_grp"

---

# Broadcom Northstar plus (NSP) GPIO/PINCONF Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Broadcom Northstar plus (NSP) GPIO/PINCONF Controller.

## Required properties:

- compatible:
  Must be "brcm,nsp-gpio-a"

- reg:
  Should contain the register physical address and length for each of
  GPIO base, IO control registers

- #gpio-cells:
  Must be two. The first cell is the GPIO pin number (within the
  controller's pin space) and the second cell is used for the following:
  bit\[0\]: polarity (0 for active high and 1 for active low)

- gpio-controller:
  Specifies that the node is a GPIO controller

- ngpios:
  Number of gpios supported (58x25 supports 32 and 58x23 supports 24)

## Optional properties:

- interrupts:
  Interrupt ID

- interrupt-controller:
  Specifies that the node is an interrupt controller

```text
- gpio-ranges:
    Specifies the mapping between gpio controller and pin-controllers pins.
    This requires 4 fields in cells defined as -
    1. Phandle of pin-controller.
    2. GPIO base pin offset.
    3  Pin-control base pin offset.
    4. number of gpio pins which are linearly mapped from pin base.
```

## Supported generic PINCONF properties in child nodes:

- pins:
  The list of pins (within the controller's own pin space) that properties
  in the node apply to. Pin names are "gpio-&lt;pin&gt;"

- bias-disable:
  Disable pin bias

- bias-pull-up:
  Enable internal pull up resistor

- bias-pull-down:
  Enable internal pull down resistor

- drive-strength:
  Valid drive strength values include 2, 4, 6, 8, 10, 12, 14, 16 (mA)

## Example:

```dts
	gpioa: gpio@18000020 {
		compatible = "brcm,nsp-gpio-a";
		reg = <0x18000020 0x100>,
		      <0x1803f1c4 0x1c>;
		#gpio-cells = <2>;
		gpio-controller;
		ngpios = <32>;
		gpio-ranges = <&pinctrl 0 0 31>;
		interrupt-controller;
		interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;

		/* Hog a few default settings */
		pinctrl-names = "default";
		pinctrl-0 = <&led>;
		led: led {
			pins = "gpio-1";
			bias-pull-up;
		};

		pwr: pwr {
			gpio-hog;
			gpios = <3 1>;
			output-high;
		};
	};
```

---

# Broadcom NSP (Northstar plus) IOMUX Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Broadcom NSP (Northstar plus) IOMUX Controller.

The NSP IOMUX controller supports group based mux configuration. In
addition, certain pins can be muxed to GPIO function individually.

## Required properties:

- compatible:
  Must be "brcm,nsp-pinmux"

- reg:
  Should contain the register physical address and length for each of
  GPIO\_CONTROL0, GP\_AUX\_SEL and IPROC\_CONFIG IOMUX registers

## Properties in subnodes:

- function:
  The mux function to select

- groups:
  The list of groups to select with a given function

For more details, refer to
[Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)

## For example:

```dts
	pinmux: pinmux@1803f1c0 {
		compatible = "brcm,nsp-pinmux";
		reg = <0x1803f1c0 0x04>,
		      <0x18030028 0x04>,
		      <0x1803f408 0x04>;

		pinctrl-names = "default";
		pinctrl-0 = <&pwm>, <&gpio_b>, <&nand_sel>;

		pwm: pwm {
			function = "pwm";
			groups = "pwm0_grp", "pwm1_grp";
		};

		gpio_b: gpio_b {
			function = "gpio_b";
			groups = "gpio_b_0_grp", "gpio_b_1_grp";
		};

		nand_sel: nand_sel {
			function = "nand";
			groups = "nand_grp";
		};
	};
```

## List of supported functions and groups in Northstar Plus:

"spi": "spi\_grp"

"i2c": "i2c\_grp"

"mdio": "mdio\_grp"

"pwm": "pwm0\_grp", "pwm1\_grp", "pwm2\_grp", "pwm3\_grp"

"gpio\_b": "gpio\_b\_0\_grp", "gpio\_b\_1\_grp", "gpio\_b\_2\_grp", "gpio\_b\_3\_grp"

"uart1": "uart1\_grp"

"uart2": "uart2\_grp"

"synce": "synce\_grp"

"sata\_led\_grps": "sata0\_led\_grp", "sata1\_led\_grp"

"xtal\_out": "xtal\_out\_grp"

"sdio": "sdio\_pwr\_grp", "sdio\_1p8v\_grp"

"switch\_led": "switch\_p05\_led0\_grp", "switch\_p05\_led1\_grp"

"nand": "nand\_grp"

"emmc": "emmc\_grp"

---

# Conexant Digicolor CX92755 General Purpose Pin Mapping

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Conexant Digicolor CX92755 General Purpose Pin Mapping.

This document describes the device tree binding of the pin mapping hardware
modules in the Conexant Digicolor CX92755 SoCs. The CX92755 in one of the
Digicolor series of SoCs.

=== Pin Controller Node ===

## Required Properties:

- compatible: Must be "cnxt,cx92755-pinctrl"
- reg: Base address of the General Purpose Pin Mapping register block and the
  size of the block.
- gpio-controller: Marks the device node as a GPIO controller.
- #gpio-cells: Must be &lt;2&gt;. The first cell is the pin number and the
  second cell is used to specify flags. See include/dt-bindings/gpio/gpio.h
  for possible values.

## For example, the following is the bare minimum node:

```dts
	pinctrl: pinctrl@f0000e20 {
		compatible = "cnxt,cx92755-pinctrl";
		reg = <0xf0000e20 0x100>;
		gpio-controller;
		#gpio-cells = <2>;
	};
```

As a pin controller device, in addition to the required properties, this node
should also contain the pin configuration nodes that client devices reference,
if any.

For a general description of GPIO bindings, please refer to [../gpio/gpio.txt](</kernel/hardware/devicetree/bindings-gpio/gpio.md>).

=== Pin Configuration Node ===

Each pin configuration node is a sub-node of the pin controller node and is a
container of an arbitrary number of subnodes, called pin group nodes in this
document.

Please refer to the [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) in this directory for details of the
common pinctrl bindings used by client devices, including the definition of a
"pin configuration node".

=== Pin Group Node ===

A pin group node specifies the desired pin mux for an arbitrary number of
pins. The name of the pin group node is optional and not used.

A pin group node only affects the properties specified in the node, and has no
effect on any properties that are omitted.

The pin group node accepts a subset of the generic pin config properties. For
details generic pin config properties, please refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)
and &lt;include/linux/pinctrl/pinconfig-generic.h&gt;.

## Required Pin Group Node Properties:

- pins: Multiple strings. Specifies the name(s) of one or more pins to be
  configured by this node. The format of a pin name string is "GP\_xy", where x
  is an uppercase character from 'A' to 'R', and y is a digit from 0 to 7.
- function: String. Specifies the pin mux selection. Values must be one of:
  "gpio", "client\_a", "client\_b", "client\_c"

## Example:

```dts
	pinctrl: pinctrl@f0000e20 {
		compatible = "cnxt,cx92755-pinctrl";
		reg = <0xf0000e20 0x100>;

		uart0_default: uart0_active {
			data_signals {
				pins = "GP_O0", "GP_O1";
				function = "client_b";
			};
		};
	};
```

```dts
	uart0: uart@f0000740 {
		compatible = "cnxt,cx92755-usart";
		...
		pinctrl-0 = <&uart0_default>;
		pinctrl-names = "default";
	};
```

In the example above, a single pin group configuration node defines the
"client select" for the Rx and Tx signals of uart0. The uart0 node references
that pin configuration node using the &amp;uart0\_default phandle.

---

# Cortina Systems Gemini pin controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Cortina Systems Gemini pin controller.

This pin controller is found in the Cortina Systems Gemini SoC family,
see further arm/gemini.txt. It is a purely group-based multiplexing pin
controller.

The pin controller node must be a subnode of the system controller node.

## Required properties:

- compatible: "cortina,gemini-pinctrl"

Subnodes of the pin controller contain pin control multiplexing set-up
and pin configuration of individual pins.

Please refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) for generic pin multiplexing nodes
and generic pin config nodes.

## Supported configurations:

- skew-delay is supported on the Ethernet pins
- drive-strength with 4, 8, 12 or 16 mA as argument is supported for
  entire groups on the groups "idegrp", "gmii\_gmac0\_grp", "gmii\_gmac1\_grp"
  and "pcigrp".

## Example:

```dts
syscon {
	compatible = "cortina,gemini-syscon";
	...
	pinctrl {
		compatible = "cortina,gemini-pinctrl";
		pinctrl-names = "default";
		pinctrl-0 = <&dram_default_pins>, <&system_default_pins>,
		    <&vcontrol_default_pins>;

		dram_default_pins: pinctrl-dram {
			mux {
				function = "dram";
				groups = "dramgrp";
			};
		};
		rtc_default_pins: pinctrl-rtc {
			mux {
				function = "rtc";
				groups = "rtcgrp";
			};
		};
		power_default_pins: pinctrl-power {
			mux {
				function = "power";
				groups = "powergrp";
			};
		};
		system_default_pins: pinctrl-system {
			mux {
				function = "system";
				groups = "systemgrp";
			};
		};
		(...)
		uart_default_pins: pinctrl-uart {
			mux {
				function = "uart";
				groups = "uartrxtxgrp";
			};
		};
	};
};
```

---

# Freescale IOMUX Controller (IOMUXC) for i.MX

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Freescale IOMUX Controller (IOMUXC) for i.MX.

The IOMUX Controller (IOMUXC), together with the IOMUX, enables the IC
to share one PAD to several functional blocks. The sharing is done by
multiplexing the PAD input/output signals. For each PAD there are up to
8 muxing options (called ALT modes). Since different modules require
different PAD settings (like pull up, keeper, etc) the IOMUXC controls
also the PAD settings parameters.

Please refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) in this directory for details of the
common pinctrl bindings used by client devices, including the meaning of the
phrase "pin configuration node".

Freescale IMX pin configuration node is a node of a group of pins which can be
used for a specific device or function. This node represents both mux and config
of the pins in that group. The 'mux' selects the function mode(also named mux
mode) this pin can work on and the 'config' configures various pad settings
such as pull-up, open drain, drive strength, etc.

## Required properties for iomux controller:

- compatible: "fsl,&lt;soc&gt;-iomuxc"
  Please refer to each fsl,&lt;soc&gt;-pinctrl.txt binding doc for supported SoCs.

## Required properties for pin configuration node:

- fsl,pins: each entry consists of 6 integers and represents the mux and config
  setting for one pin. The first 5 integers &lt;mux\_reg conf\_reg input\_reg mux\_val
  input\_val&gt; are specified using a PIN\_FUNC\_ID macro, which can be found in
  imx\*-pinfunc.h under device tree source folder. The last integer CONFIG is
  the pad setting value like pull-up on this pin. And that's why fsl,pins entry
  looks like &lt;PIN\_FUNC\_ID CONFIG&gt; in the example below.

## Bits used for CONFIG:

NO\_PAD\_CTL(1 &lt;&lt; 31): indicate this pin does not need config.

SION(1 &lt;&lt; 30): Software Input On Field.
Force the selected mux mode input path no matter of MUX\_MODE functionality.
By default the input path is determined by functionality of the selected
mux mode (regular).

Other bits are used for PAD setting.
Please refer to each fsl,&lt;soc&gt;-pinctrl,txt binding doc for SoC specific part
of bits definitions.

## NOTE:

Some requirements for using fsl,imx-pinctrl binding:

1. We have pin function node defined under iomux controller node to represent
   what pinmux functions this SoC supports.
2. The pin configuration node intends to work on a specific function should
   to be defined under that specific function node.
   The function node's name should represent well about what function
   this group of pins in this pin configuration node are working on.
3. The driver can use the function node's name and pin configuration node's
   name describe the pin function and group hierarchy.
   For example, Linux IMX pinctrl driver takes the function node's name
   as the function name and pin configuration node's name as group name to
   create the map table.
4. Each pin configuration node should have a phandle, devices can set pins
   configurations by referring to the phandle of that pin configuration node.

## Examples:

usdhc@219c000 { /\* uSDHC4 \*/

```text
	non-removable;
	vmmc-supply = <&reg_3p3v>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc4_1>;
```

```dts
};
```

```dts
iomuxc@20e0000 {
	compatible = "fsl,imx6q-iomuxc";
	reg = <0x020e0000 0x4000>;

	/* shared pinctrl settings */
	usdhc4 {
		pinctrl_usdhc4_1: usdhc4grp-1 {
			fsl,pins = <
				MX6QDL_PAD_SD4_CMD__SD4_CMD    0x17059
				MX6QDL_PAD_SD4_CLK__SD4_CLK    0x10059
				MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059
				MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059
				MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059
				MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059
				MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17059
				MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17059
				MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17059
				MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059
			>;
	};
	....
};
Refer to the IOMUXC controller chapter in imx6q datasheet,
0x17059 means enable hysteresis, 47KOhm Pull Up, 50Mhz speed,
80Ohm driver strength and Fast Slew Rate.
User should refer to each SoC spec to set the correct value.
```

---

# Freescale IMX25 IOMUX Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Freescale IMX25 IOMUX Controller.

Please refer to [fsl,imx-pinctrl.txt](</kernel/hardware/devicetree/bindings-pinctrl/fsl-imx-pinctrl.md>) in this directory for common binding part
and usage.

## CONFIG bits definition:

```text
PAD_CTL_HYS			(1 << 8)
PAD_CTL_PKE			(1 << 7)
PAD_CTL_PUE			(1 << 6)
PAD_CTL_PUS_100K_DOWN		(0 << 4)
PAD_CTL_PUS_47K_UP		(1 << 4)
PAD_CTL_PUS_100K_UP		(2 << 4)
PAD_CTL_PUS_22K_UP		(3 << 4)
PAD_CTL_ODE_CMOS		(0 << 3)
PAD_CTL_ODE_OPENDRAIN		(1 << 3)
PAD_CTL_DSE_NOMINAL		(0 << 1)
PAD_CTL_DSE_HIGH		(1 << 1)
PAD_CTL_DSE_MAX			(2 << 1)
PAD_CTL_SRE_FAST		(1 << 0)
PAD_CTL_SRE_SLOW		(0 << 0)
```

Refer to imx25-pinfunc.h in device tree source folder for all available
imx25 PIN\_FUNC\_ID.

---

# Freescale IMX27 IOMUX Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Freescale IMX27 IOMUX Controller.

## Required properties:

- compatible: "fsl,imx27-iomuxc"

The iomuxc driver node should define subnodes containing of pinctrl configuration subnodes.

## Required properties for pin configuration node:

- fsl,pins: three integers array, represents a group of pins mux and config
  setting. The format is fsl,pins = &lt;PIN MUX\_ID CONFIG&gt;.

```text
  PIN is an integer between 0 and 0xbf. imx27 has 6 ports with 32 configurable
  configurable pins each. PIN is PORT * 32 + PORT_PIN, PORT_PIN is the pin
  number on the specific port (between 0 and 31).
```

```text
  MUX_ID is
```

```text
    function + (direction << 2) + (gpio_oconf << 4) + (gpio_iconfa << 8) + (gpio_iconfb << 10)
```

```text
      function value is used to select the pin function.
      Possible values:
          0 - Primary function
          1 - Alternate function
          2 - GPIO
      Registers: GIUS (GPIO In Use), GPR (General Purpose Register)
```

```text
      direction defines the data direction of the pin.
      Possible values:
          0 - Input
          1 - Output
      Register: DDIR
```

```text
      gpio_oconf configures the gpio submodule output signal. This does not
      have any effect unless GPIO function is selected. A/B/C_IN are output
      signals of function blocks A,B and C. Specific function blocks are
      described in the reference manual.
      Possible values:
          0 - A_IN
          1 - B_IN
          2 - C_IN
          3 - Data Register
      Registers: OCR1, OCR2
```

```text
      gpio_iconfa/b configures the gpio submodule input to functionblocks A and
      B. GPIO function should be selected if this is configured.
      Possible values:
          0 - GPIO_IN
          1 - Interrupt Status Register
          2 - Pulldown
          3 - Pullup
      Registers ICONFA1, ICONFA2, ICONFB1 and ICONFB2
```

```text
  CONFIG can be 0 or 1, meaning Pullup disable/enable.
```

The iomux controller has gpio child nodes which are embedded in the iomux
control registers. They have to be defined as child nodes of the iomux device
node. If gpio subnodes are defined "#address-cells", "#size-cells" and "ranges"
properties for the iomux device node are required.

## Example:

```dts
iomuxc: iomuxc@10015000 {
	compatible = "fsl,imx27-iomuxc";
	reg = <0x10015000 0x600>;
	#address-cells = <1>;
	#size-cells = <1>;
	ranges;

	gpio1: gpio@10015000 {
		...
	};

	...

	uart {
		pinctrl_uart1: uart-1 {
			fsl,pins = <
				0x8c 0x004 0x0 /* UART1_TXD__UART1_TXD */
				0x8d 0x000 0x0 /* UART1_RXD__UART1_RXD */
				0x8e 0x004 0x0 /* UART1_CTS__UART1_CTS */
				0x8f 0x000 0x0 /* UART1_RTS__UART1_RTS */
			>;
		};

		...
	};
};
```

For convenience there are macros defined in imx27-pinfunc.h which provide PIN
and MUX\_ID. They are structured as MX27\_PAD\_&lt;Pad name&gt;\_\_&lt;Signal name&gt;. The names
are defined in the i.MX27 reference manual.

## The above example using macros:

```dts
iomuxc: iomuxc@10015000 {
	compatible = "fsl,imx27-iomuxc";
	reg = <0x10015000 0x600>;
	#address-cells = <1>;
	#size-cells = <1>;
	ranges;

	gpio1: gpio@10015000 {
		...
	};

	...

	uart {
		pinctrl_uart1: uart-1 {
			fsl,pins = <
				MX27_PAD_UART1_TXD__UART1_TXD 0x0
				MX27_PAD_UART1_RXD__UART1_RXD 0x0
				MX27_PAD_UART1_CTS__UART1_CTS 0x0
				MX27_PAD_UART1_RTS__UART1_RTS 0x0
			>;
		};

		...
	};
};
```

---

# Imagination Technologies Pistachio SoC pin controllers

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Imagination Technologies Pistachio SoC pin controllers.

The pin controllers on Pistachio are a combined GPIO controller, (GPIO)
interrupt controller, and pinmux + pinconf device. The system ("east") pin
controller on Pistachio has 99 pins, 90 of which are MFIOs which can be
configured as GPIOs. The 90 GPIOs are divided into 6 banks of up to 16 GPIOs
each. The GPIO banks are represented as sub-nodes of the pad controller node.

Please refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>), [../gpio/gpio.txt](</kernel/hardware/devicetree/bindings-gpio/gpio.md>), and
[../interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>) for generic information regarding
pin controller, GPIO, and interrupt bindings.

## Required properties for pin controller node:

- compatible: "img,pistachio-system-pinctrl".
- reg: Address range of the pinctrl registers.

## Required properties for GPIO bank sub-nodes:

- interrupts: Interrupt line for the GPIO bank.
- gpio-controller: Indicates the device is a GPIO controller.
- #gpio-cells: Must be two. The first cell is the GPIO pin number and the
  second cell indicates the polarity. See &lt;dt-bindings/gpio/gpio.h&gt; for
  a list of possible values.
- interrupt-controller: Indicates the device is an interrupt controller.
- #interrupt-cells: Must be two. The first cell is the GPIO pin number and
  the second cell encodes the interrupt flags. See
  &lt;dt-bindings/interrupt-controller/irq.h&gt; for a list of valid flags.

Note that the N GPIO bank sub-nodes \*must\* be named gpio0, gpio1, ... gpioN-1.

## Required properties for pin configuration sub-nodes:

- pins: List of pins to which the configuration applies. See below for a
  list of possible pins.

## Optional properties for pin configuration sub-nodes:

- function: Mux function for the specified pins. This is not applicable for
  non-MFIO pins. See below for a list of valid functions for each pin.
- bias-high-impedance: Enable high-impedance mode.
- bias-pull-up: Enable weak pull-up.
- bias-pull-down: Enable weak pull-down.
- bias-bus-hold: Enable bus-keeper mode.
- drive-strength: Drive strength in mA. Supported values: 2, 4, 8, 12.
- input-schmitt-enable: Enable Schmitt trigger.
- input-schmitt-disable: Disable Schmitt trigger.
- slew-rate: Slew rate control. 0 for slow, 1 for fast.

```text
Pin		Functions
---		---------
mfio0		spim1
mfio1		spim1, spim0, uart1
mfio2		spim1, spim0, uart1
mfio3		spim1
mfio4		spim1
mfio5		spim1
mfio6		spim1
mfio7		spim1
mfio8		spim0
mfio9		spim0
mfio10		spim0
mfio11		spis
mfio12		spis
mfio13		spis
mfio14		spis
mfio15		sdhost, mips_trace_clk, mips_trace_data
mfio16		sdhost, mips_trace_dint, mips_trace_data
mfio17		sdhost, mips_trace_trigout, mips_trace_data
mfio18		sdhost, mips_trace_trigin, mips_trace_data
mfio19		sdhost, mips_trace_dm, mips_trace_data
mfio20		sdhost, mips_trace_probe_n, mips_trace_data
mfio21		sdhost, mips_trace_data
mfio22		sdhost, mips_trace_data
mfio23		sdhost
mfio24		sdhost
mfio25		sdhost
mfio26		sdhost
mfio27		sdhost
mfio28		i2c0, spim0
mfio29		i2c0, spim0
mfio30		i2c1, spim0
mfio31		i2c1, spim1
mfio32		i2c2
mfio33		i2c2
mfio34		i2c3
mfio35		i2c3
mfio36		i2s_out, audio_clk_in
mfio37		i2s_out, debug_raw_cca_ind
mfio38		i2s_out, debug_ed_sec20_cca_ind
mfio39		i2s_out, debug_ed_sec40_cca_ind
mfio40		i2s_out, debug_agc_done_0
mfio41		i2s_out, debug_agc_done_1
mfio42		i2s_out, debug_ed_cca_ind
mfio43		i2s_out, debug_s2l_done
mfio44		i2s_out
mfio45		i2s_dac_clk, audio_sync
mfio46		audio_trigger
mfio47		i2s_in
mfio48		i2s_in
mfio49		i2s_in
mfio50		i2s_in
mfio51		i2s_in
mfio52		i2s_in
mfio53		i2s_in
mfio54		i2s_in, spdif_in
mfio55		uart0, spim0, spim1
mfio56		uart0, spim0, spim1
mfio57		uart0, spim0, spim1
mfio58		uart0, spim1
mfio59		uart1
mfio60		uart1
mfio61		spdif_out
mfio62		spdif_in
mfio63		eth, mips_trace_clk, mips_trace_data
mfio64		eth, mips_trace_dint, mips_trace_data
mfio65		eth, mips_trace_trigout, mips_trace_data
mfio66		eth, mips_trace_trigin, mips_trace_data
mfio67		eth, mips_trace_dm, mips_trace_data
mfio68		eth, mips_trace_probe_n, mips_trace_data
mfio69		eth, mips_trace_data
mfio70		eth, mips_trace_data
mfio71		eth
mfio72		ir
mfio73		pwmpdm, mips_trace_clk, sram_debug
mfio74		pwmpdm, mips_trace_dint, sram_debug
mfio75		pwmpdm, mips_trace_trigout, rom_debug
mfio76		pwmpdm, mips_trace_trigin, rom_debug
mfio77		mdc_debug, mips_trace_dm, rpu_debug
mfio78		mdc_debug, mips_trace_probe_n, rpu_debug
mfio79		ddr_debug, mips_trace_data, mips_debug
mfio80		ddr_debug, mips_trace_data, mips_debug
mfio81		dreq0, mips_trace_data, eth_debug
mfio82		dreq1, mips_trace_data, eth_debug
mfio83		mips_pll_lock, mips_trace_data, usb_debug
mfio84		audio_pll_lock, mips_trace_data, usb_debug
mfio85		rpu_v_pll_lock, mips_trace_data, sdhost_debug
mfio86		rpu_l_pll_lock, mips_trace_data, sdhost_debug
mfio87		sys_pll_lock, dreq2, socif_debug
mfio88		wifi_pll_lock, dreq3, socif_debug
mfio89		bt_pll_lock, dreq4, dreq5
tck
trstn
tdi
tms
tdo
jtag_comply
safe_mode
por_disable
resetn
```

## Example:

```dts
pinctrl@18101c00 {
	compatible = "img,pistachio-system-pinctrl";
	reg = <0x18101C00 0x400>;

	gpio0: gpio0 {
		interrupts = <GIC_SHARED 71 IRQ_TYPE_LEVEL_HIGH>;

		gpio-controller;
		#gpio-cells = <2>;

		interrupt-controller;
		#interrupt-cells = <2>;
	};

	...

	gpio5: gpio5 {
		interrupts = <GIC_SHARED 76 IRQ_TYPE_LEVEL_HIGH>;

		gpio-controller;
		#gpio-cells = <2>;

		interrupt-controller;
		#interrupt-cells = <2>;
	};

	...

	uart0_xfer: uart0-xfer {
		uart0-rxd {
			pins = "mfio55";
			function = "uart0";
		};
		uart0-txd {
			pins = "mfio56";
			function = "uart0";
		};
	};

	uart0_rts_cts: uart0-rts-cts {
		uart0-rts {
			  pins = "mfio57";
			  function = "uart0";
		};
		uart0-cts {
			  pins = "mfio58";
			  function = "uart0";
		};
	};
};
```

```dts
uart@... {
	...
	pinctrl-names = "default";
	pinctrl-0 = <&uart0_xfer>, <&uart0_rts_cts>;
	...
};
```

```dts
usb_vbus: fixed-regulator {
	...
	gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
	...
};
```

---

# Lantiq FALCON pinmux controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Lantiq FALCON pinmux controller.

## Required properties:

- compatible: "lantiq,pinctrl-falcon"
- reg: Should contain the physical address and length of the gpio/pinmux
  register range

Please refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) in this directory for details of the
common pinctrl bindings used by client devices, including the meaning of the
phrase "pin configuration node".

Lantiq's pin configuration nodes act as a container for an arbitrary number of
subnodes. Each of these subnodes represents some desired configuration for a
pin, a group, or a list of pins or groups. This configuration can include the
mux function to select on those group(s), and two pin configuration parameters:
pull-up and open-drain

The name of each subnode is not important as long as it is unique; all subnodes
should be enumerated and processed purely based on their content.

Each subnode only affects those parameters that are explicitly listed. In
other words, a subnode that lists a mux function but no pin configuration
parameters implies no information about any pin configuration parameters.
Similarly, a pin subnode that describes a pullup parameter implies no
information about e.g. the mux function.

We support 2 types of nodes.

## Definition of mux function groups:

## Required subnode-properties:

- lantiq,groups : An array of strings. Each string contains the name of a group.
  Valid values for these names are listed below.
- lantiq,function: A string containing the name of the function to mux to the
  group. Valid values for function names are listed below.

## Valid values for group and function names:

## mux groups:

```text
    por, ntr, ntr8k, hrst, mdio, bootled, asc0, spi, spi cs0, spi cs1, i2c,
    jtag, slic, pcm, asc1
```

## functions:

```text
    rst, ntr, mdio, led, asc, spi, i2c, jtag, slic, pcm
```

## Definition of pin configurations:

## Required subnode-properties:

- lantiq,pins : An array of strings. Each string contains the name of a pin.
  Valid values for these names are listed below.

## Optional subnode-properties:

- lantiq,pull: Integer, representing the pull-down/up to apply to the pin.
  0: none, 1: down
- lantiq,drive-current: Boolean, enables drive-current
- lantiq,slew-rate: Boolean, enables slew-rate

## Example:

```dts
	pinmux0 {
		compatible = "lantiq,pinctrl-falcon";
		pinctrl-names = "default";
		pinctrl-0 = <&state_default>;

		state_default: pinmux {
			asc0 {
				lantiq,groups = "asc0";
				lantiq,function = "asc";
			};
			ntr {
				lantiq,groups = "ntr8k";
				lantiq,function = "ntr";
			};
			i2c {
				lantiq,groups = "i2c";
				lantiq,function = "i2c";
			};
			hrst {
				lantiq,groups = "hrst";
				lantiq,function = "rst";
			};
		};
	};
```

---

# Lantiq XWAY pinmux controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Lantiq XWAY pinmux controller.

## Required properties:

- compatible:	"lantiq,&lt;chip&gt;-pinctrl", where &lt;chip&gt; is:
  "ase" (XWAY AMAZON Family)
  "danube" (XWAY DANUBE Family)
  "xrx100" (XWAY xRX100 Family)
  "xrx200" (XWAY xRX200 Family)
  "xrx300" (XWAY xRX300 Family)
- reg: Should contain the physical address and length of the gpio/pinmux
  register range

Please refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) in this directory for details of the
common pinctrl bindings used by client devices, including the meaning of the
phrase "pin configuration node".

Lantiq's pin configuration nodes act as a container for an arbitrary number of
subnodes. Each of these subnodes represents some desired configuration for a
pin, a group, or a list of pins or groups. This configuration can include the
mux function to select on those group(s), and two pin configuration parameters:
pull-up and open-drain

The name of each subnode is not important as long as it is unique; all subnodes
should be enumerated and processed purely based on their content.

Each subnode only affects those parameters that are explicitly listed. In
other words, a subnode that lists a mux function but no pin configuration
parameters implies no information about any pin configuration parameters.
Similarly, a pin subnode that describes a pullup parameter implies no
information about e.g. the mux function.

We support 2 types of nodes.

## Definition of mux function groups:

## Required subnode-properties:

- lantiq,groups : An array of strings. Each string contains the name of a group.
  Valid values for these names are listed below.
- lantiq,function: A string containing the name of the function to mux to the
  group. Valid values for function names are listed below.

## Valid values for group and function names:

## AMAZON:

```text
  mux groups:
```

```text
    exin0, exin1, exin2, jtag, spi_di, spi_do, spi_clk, spi_cs1, spi_cs2,
    spi_cs3, spi_cs4, spi_cs5, spi_cs6, asc, stp, gpt1, gpt2, gpt3, clkout0,
    clkout1, clkout2, mdio, dfe led0, dfe led1, ephy led0, ephy led1, ephy led2
```

## functions:

```text
    spi, asc, cgu, jtag, exin, stp, gpt, mdio, ephy, dfe
```

## DANUBE:

```text
  mux groups:
```

```text
    exin0, exin1, exin2, jtag, ebu a23, ebu a24, ebu a25, ebu clk, ebu cs1,
    ebu wait, nand ale, nand cs1, nand cle, spi_di, spi_do, spi_clk, spi_cs1,
    spi_cs2, spi_cs3, spi_cs4, spi_cs5, spi_cs6, asc0, asc0 cts rts, stp, nmi,
    gpt1, gpt2, gpt3, clkout0, clkout1, clkout2, clkout3, gnt1, gnt2, gnt3,
    req1, req2, req3, dfe led0, dfe led1
```

## functions:

```text
    spi, asc, cgu, jtag, exin, stp, gpt, nmi, pci, ebu, dfe
```

## xRX100:

```text
  mux groups:
```

```text
    exin0, exin1, exin2, exin3, exin4, ebu a23, ebu a24, ebu a25, ebu clk,
    ebu cs1, ebu wait, nand ale, nand cs1, nand cle, nand rdy, nand rd,
    spi_di, spi_do, spi_clk, spi_cs1, spi_cs2, spi_cs3, spi_cs4, spi_cs5,
    spi_cs6, asc0, asc0 cts rts, stp, nmi, gpt1, gpt2, gpt3, clkout0, clkout1,
    clkout2, clkout3, gnt1, gnt2, gnt3, gnt4, req1, req2, req3, req4, mdio,
    dfe led0, dfe led1
```

## functions:

```text
    spi, asc, cgu, exin, stp, gpt, nmi, pci, ebu, mdio, dfe
```

## xRX200:

```text
  mux groups:
```

```text
    exin0, exin1, exin2, exin3, exin4, ebu a23, ebu a24, ebu a25, ebu clk,
    ebu cs1, ebu wait, nand ale, nand cs1, nand cle, nand rdy, nand rd,
    spi_di, spi_do, spi_clk, spi_cs1, spi_cs2, spi_cs3, spi_cs4, spi_cs5,
    spi_cs6, usif uart_rx, usif uart_tx, usif uart_rts, usif uart_cts,
    usif uart_dtr, usif uart_dsr, usif uart_dcd, usif uart_ri, usif spi_di,
    usif spi_do, usif spi_clk, usif spi_cs0, usif spi_cs1, usif spi_cs2,
    stp, nmi, gpt1, gpt2, gpt3, clkout0, clkout1, clkout2, clkout3, gnt1,
    gnt2, gnt3, gnt4, req1, req2, req3, req4, mdio, dfe led0, dfe led1,
    gphy0 led0, gphy0 led1, gphy0 led2, gphy1 led0, gphy1 led1, gphy1 led2
```

## functions:

```text
    spi, usif, cgu, exin, stp, gpt, nmi, pci, ebu, mdio, dfe, gphy
```

## xRX300:

```text
  mux groups:
```

```text
    exin0, exin1, exin2, exin4, nand ale, nand cs0, nand cs1, nand cle,
    nand rdy, nand rd, nand_d0, nand_d1, nand_d2, nand_d3, nand_d4, nand_d5,
    nand_d6, nand_d7, nand_d1, nand wr, nand wp, nand se, spi_di, spi_do,
    spi_clk, spi_cs1, spi_cs4, spi_cs6, usif uart_rx, usif uart_tx,
    usif spi_di, usif spi_do, usif spi_clk, usif spi_cs0, stp, clkout2,
    mdio, dfe led0, dfe led1, ephy0 led0, ephy0 led1, ephy1 led0, ephy1 led1
```

## functions:

```text
    spi, usif, cgu, exin, stp, ebu, mdio, dfe, ephy
```

## Definition of pin configurations:

## Required subnode-properties:

- lantiq,pins : An array of strings. Each string contains the name of a pin.
  Valid values for these names are listed below.

## Optional subnode-properties:

- lantiq,pull: Integer, representing the pull-down/up to apply to the pin.
  0: none, 1: down, 2: up.
- lantiq,open-drain: Boolean, enables open-drain on the defined pin.

## Valid values for AMAZON pin names:

```text
  Pinconf pins can be referenced via the names io0-io31.
```

## Valid values for DANUBE pin names:

```text
  Pinconf pins can be referenced via the names io0-io31.
```

## Valid values for xRX100 pin names:

```text
  Pinconf pins can be referenced via the names io0-io55.
```

## Valid values for xRX200 pin names:

```text
  Pinconf pins can be referenced via the names io0-io49.
```

## Valid values for xRX300 pin names:

```text
  Pinconf pins can be referenced via the names io0-io1,io3-io6,io8-io11,
```

```text
						io13-io19,io23-io27,io34-io36,
						io42-io43,io48-io61.
```

## Example:

```dts
	gpio: pinmux@e100b10 {
		compatible = "lantiq,danube-pinctrl";
		pinctrl-names = "default";
		pinctrl-0 = <&state_default>;

		#gpio-cells = <2>;
		gpio-controller;
		reg = <0xE100B10 0xA0>;

		state_default: pinmux {
			stp {
				lantiq,groups = "stp";
				lantiq,function = "stp";
			};
			pci {
				lantiq,groups = "gnt1";
				lantiq,function = "pci";
			};
			conf_out {
				lantiq,pins = "io4", "io5", "io6"; /* stp */
				lantiq,open-drain;
				lantiq,pull = <0>;
			};
		};
	};
```

---

# Marvell Armada 370 SoC pinctrl driver for mpp

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Marvell Armada 370 SoC pinctrl driver for mpp.

Please refer to [marvell,mvebu-pinctrl.txt](</kernel/hardware/devicetree/bindings-pinctrl/marvell-mvebu-pinctrl.md>) in this directory for common binding
part and usage.

## Required properties:

- compatible: "marvell,88f6710-pinctrl"
- reg: register specifier of MPP registers

## Available mpp pins/groups and functions:

Note: brackets (x) are not part of the mpp name for marvell,function and given
only for more detailed description in this document.

## name          pins     functions

```text
mpp0          0        gpio, uart0(rxd)
mpp1          1        gpo, uart0(txd)
mpp2          2        gpio, i2c0(sck), uart0(txd)
mpp3          3        gpio, i2c0(sda), uart0(rxd)
mpp4          4        gpio, vdd(cpu-pd)
mpp5          5        gpo, ge0(txclkout), uart1(txd), spi1(sck), audio(mclk)
mpp6          6        gpio, ge0(txd0), sata0(prsnt), tdm(rst), audio(sdo)
mpp7          7        gpo, ge0(txd1), tdm(dtx), audio(lrclk)
mpp8          8        gpio, ge0(txd2), uart0(rts), tdm(drx), audio(bclk)
mpp9          9        gpo, ge0(txd3), uart1(txd), sd0(clk), audio(spdifo)
mpp10         10       gpio, ge0(txctl), uart0(cts), tdm(fsync), audio(sdi)
mpp11         11       gpio, ge0(rxd0), uart1(rxd), sd0(cmd), spi0(cs1),
```

```text
                       sata1(prsnt), spi1(cs1)
```

mpp12         12       gpio, ge0(rxd1), i2c1(sda), sd0(d0), spi1(cs0),

```text
                       audio(spdifi)
```

mpp13         13       gpio, ge0(rxd2), i2c1(sck), sd0(d1), tdm(pclk),

```text
                       audio(rmclk)
```

mpp14         14       gpio, ge0(rxd3), pcie(clkreq0), sd0(d2), spi1(mosi),

```text
                       spi0(cs2)
```

mpp15         15       gpio, ge0(rxctl), pcie(clkreq1), sd0(d3), spi1(miso),

```text
                       spi0(cs3)
```

```text
mpp16         16       gpio, ge0(rxclk), uart1(rxd), tdm(int), audio(extclk)
mpp17         17       gpo, ge(mdc)
mpp18         18       gpio, ge(mdio)
mpp19         19       gpio, ge0(txclk), ge1(txclkout), tdm(pclk)
mpp20         20       gpo, ge0(txd4), ge1(txd0)
mpp21         21       gpo, ge0(txd5), ge1(txd1), uart1(txd)
mpp22         22       gpo, ge0(txd6), ge1(txd2), uart0(rts)
mpp23         23       gpo, ge0(txd7), ge1(txd3), spi1(mosi)
mpp24         24       gpio, ge0(col), ge1(txctl), spi1(cs0)
mpp25         25       gpio, ge0(rxerr), ge1(rxd0), uart1(rxd)
mpp26         26       gpio, ge0(crs), ge1(rxd1), spi1(miso)
mpp27         27       gpio, ge0(rxd4), ge1(rxd2), uart0(cts)
mpp28         28       gpio, ge0(rxd5), ge1(rxd3)
mpp29         29       gpio, ge0(rxd6), ge1(rxctl), i2c1(sda)
mpp30         30       gpio, ge0(rxd7), ge1(rxclk), i2c1(sck)
mpp31         31       gpio, tclk, ge0(txerr)
mpp32         32       gpio, spi0(cs0)
mpp33         33       gpio, dev(bootcs), spi0(cs0)
mpp34         34       gpo, dev(we0), spi0(mosi)
mpp35         35       gpo, dev(oe), spi0(sck)
mpp36         36       gpo, dev(a1), spi0(miso)
mpp37         37       gpo, dev(a0), sata0(prsnt)
mpp38         38       gpio, dev(ready), uart1(cts), uart0(cts)
mpp39         39       gpo, dev(ad0), audio(spdifo)
mpp40         40       gpio, dev(ad1), uart1(rts), uart0(rts)
mpp41         41       gpio, dev(ad2), uart1(rxd)
mpp42         42       gpo, dev(ad3), uart1(txd)
mpp43         43       gpo, dev(ad4), audio(bclk)
mpp44         44       gpo, dev(ad5), audio(mclk)
mpp45         45       gpo, dev(ad6), audio(lrclk)
mpp46         46       gpo, dev(ad7), audio(sdo)
mpp47         47       gpo, dev(ad8), sd0(clk), audio(spdifo)
mpp48         48       gpio, dev(ad9), uart0(rts), sd0(cmd), sata1(prsnt),
```

```text
                       spi0(cs1)
```

mpp49         49       gpio, dev(ad10), pcie(clkreq1), sd0(d0), spi1(cs0),

```text
                       audio(spdifi)
```

mpp50         50       gpio, dev(ad11), uart0(cts), sd0(d1), spi1(miso),

```text
                       audio(rmclk)
```

```text
mpp51         51       gpio, dev(ad12), i2c1(sda), sd0(d2), spi1(mosi)
mpp52         52       gpio, dev(ad13), i2c1(sck), sd0(d3), spi1(sck)
mpp53         53       gpio, dev(ad14), sd0(clk), tdm(pclk), spi0(cs2),
```

```text
                       pcie(clkreq1)
```

```text
mpp54         54       gpo, dev(ad15), tdm(dtx)
mpp55         55       gpio, dev(cs1), uart1(txd), tdm(rst), sata1(prsnt),
```

```text
                       sata0(prsnt)
```

mpp56         56       gpio, dev(cs2), uart1(cts), uart0(cts), spi0(cs3),

```text
                       pcie(clkreq0), spi1(cs1)
```

mpp57         57       gpio, dev(cs3), uart1(rxd), tdm(fsync), sata0(prsnt),

```text
                       audio(sdo)
```

mpp58         58       gpio, dev(cs0), uart1(rts), tdm(int), audio(extclk),

```text
                       uart0(rts)
```

```text
mpp59         59       gpo, dev(ale0), uart1(rts), uart0(rts), audio(bclk)
mpp60         60       gpio, dev(ale1), uart1(rxd), sata0(prsnt), pcie(rstout),
```

```text
                       audio(sdi)
```

```text
mpp61         61       gpo, dev(we1), uart1(txd), audio(lrclk)
mpp62         62       gpio, dev(a2), uart1(cts), tdm(drx), pcie(clkreq0),
```

```text
                       audio(mclk), uart0(cts)
```

```text
mpp63         63       gpio, spi0(sck), tclk
mpp64         64       gpio, spi0(miso), spi0(cs1)
mpp65         65       gpio, spi0(mosi), spi0(cs2)
```

Note: According to the datasheet mpp63 is a gpo but there is at least
one example of a gpio usage on the board D-Link DNS-327L

---

# Marvell Armada 375 SoC pinctrl driver for mpp

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Marvell Armada 375 SoC pinctrl driver for mpp.

Please refer to [marvell,mvebu-pinctrl.txt](</kernel/hardware/devicetree/bindings-pinctrl/marvell-mvebu-pinctrl.md>) in this directory for common binding
part and usage.

## Required properties:

- compatible: "marvell,88f6720-pinctrl"
- reg: register specifier of MPP registers

## Available mpp pins/groups and functions:

Note: brackets (x) are not part of the mpp name for marvell,function and given
only for more detailed description in this document.

## name          pins     functions

```text
mpp0          0        gpio, dev(ad2), spi0(cs1), spi1(cs1)
mpp1          1        gpio, dev(ad3), spi0(mosi), spi1(mosi)
mpp2          2        gpio, dev(ad4), ptp(evreq), led(c0), audio(sdi)
mpp3          3        gpio, dev(ad5), ptp(trig), led(p3), audio(mclk)
mpp4          4        gpio, dev(ad6), spi0(miso), spi1(miso)
mpp5          5        gpio, dev(ad7), spi0(cs2), spi1(cs2)
mpp6          6        gpio, dev(ad0), led(p1), audio(lrclk)
mpp7          7        gpio, dev(ad1), ptp(clk), led(p2), audio(extclk)
mpp8          8        gpio, dev (bootcs), spi0(cs0), spi1(cs0)
mpp9          9        gpio, spi0(sck), spi1(sck), nand(we)
mpp10        10        gpio, dram(vttctrl), led(c1), nand(re)
mpp11        11        gpio, dev(a0), led(c2), audio(sdo)
mpp12        12        gpio, dev(a1), audio(bclk)
mpp13        13        gpio, dev(ready), pcie0(rstout), pcie1(rstout)
mpp14        14        gpio, i2c0(sda), uart1(txd)
mpp15        15        gpio, i2c0(sck), uart1(rxd)
mpp16        16        gpio, uart0(txd)
mpp17        17        gpio, uart0(rxd)
mpp18        18        gpio, tdm(int)
mpp19        19        gpio, tdm(rst)
mpp20        20        gpio, tdm(pclk)
mpp21        21        gpio, tdm(fsync)
mpp22        22        gpio, tdm(drx)
mpp23        23        gpio, tdm(dtx)
mpp24        24        gpio, led(p0), ge1(rxd0), sd(cmd), uart0(rts)
mpp25        25        gpio, led(p2), ge1(rxd1), sd(d0), uart0(cts)
mpp26        26        gpio, pcie0(clkreq), ge1(rxd2), sd(d2), uart1(rts)
mpp27        27        gpio, pcie1(clkreq), ge1(rxd3), sd(d1), uart1(cts)
mpp28        28        gpio, led(p3), ge1(txctl), sd(clk)
mpp29        29        gpio, pcie1(clkreq), ge1(rxclk), sd(d3)
mpp30        30        gpio, ge1(txd0), spi1(cs0)
mpp31        31        gpio, ge1(txd1), spi1(mosi)
mpp32        32        gpio, ge1(txd2), spi1(sck), ptp(trig)
mpp33        33        gpio, ge1(txd3), spi1(miso)
mpp34        34        gpio, ge1(txclkout), spi1(sck)
mpp35        35        gpio, ge1(rxctl), spi1(cs1), spi0(cs2)
mpp36        36        gpio, pcie0(clkreq)
mpp37        37        gpio, pcie0(clkreq), tdm(int), ge(mdc)
mpp38        38        gpio, pcie1(clkreq), ge(mdio)
mpp39        39        gpio, ref(clkout)
mpp40        40        gpio, uart1(txd)
mpp41        41        gpio, uart1(rxd)
mpp42        42        gpio, spi1(cs2), led(c0)
mpp43        43        gpio, sata0(prsnt), dram(vttctrl)
mpp44        44        gpio, sata0(prsnt)
mpp45        45        gpio, spi0(cs2), pcie0(rstout)
mpp46        46        gpio, led(p0), ge0(txd0), ge1(txd0), dev(we1)
mpp47        47        gpio, led(p1), ge0(txd1), ge1(txd1)
mpp48        48        gpio, led(p2), ge0(txd2), ge1(txd2)
mpp49        49        gpio, led(p3), ge0(txd3), ge1(txd3)
mpp50        50        gpio, led(c0), ge0(rxd0), ge1(rxd0)
mpp51        51        gpio, led(c1), ge0(rxd1), ge1(rxd1)
mpp52        52        gpio, led(c2), ge0(rxd2), ge1(rxd2)
mpp53        53        gpio, pcie1(rstout), ge0(rxd3), ge1(rxd3)
mpp54        54        gpio, pcie0(rstout), ge0(rxctl), ge1(rxctl)
mpp55        55        gpio, ge0(rxclk), ge1(rxclk)
mpp56        56        gpio, ge0(txclkout), ge1(txclkout)
mpp57        57        gpio, ge0(txctl), ge1(txctl), dev(we0)
mpp58        58        gpio, led(c0)
mpp59        59        gpio, led(c1)
mpp60        60        gpio, uart1(txd), led(c2)
mpp61        61        gpio, i2c1(sda), uart1(rxd), spi1(cs2), led(p0)
mpp62        62        gpio, i2c1(sck), led(p1)
mpp63        63        gpio, ptp(trig), led(p2), dev(burst/last)
mpp64        64        gpio, dram(vttctrl), led(p3)
mpp65        65        gpio, sata1(prsnt)
mpp66        66        gpio, ptp(evreq), spi1(cs3)
```

---

# Marvell Armada 380/385 SoC pinctrl driver for mpp

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Marvell Armada 380/385 SoC pinctrl driver for mpp.

Please refer to [marvell,mvebu-pinctrl.txt](</kernel/hardware/devicetree/bindings-pinctrl/marvell-mvebu-pinctrl.md>) in this directory for common binding
part and usage.

## Required properties:

- compatible: "marvell,88f6810-pinctrl", "marvell,88f6820-pinctrl" or
  "marvell,88f6828-pinctrl" depending on the specific variant of the
  SoC being used.
- reg: register specifier of MPP registers

## Available mpp pins/groups and functions:

Note: brackets (x) are not part of the mpp name for marvell,function and given
only for more detailed description in this document.

## name          pins     functions

```text
mpp0          0        gpio, ua0(rxd)
mpp1          1        gpio, ua0(txd)
mpp2          2        gpio, i2c0(sck)
mpp3          3        gpio, i2c0(sda)
mpp4          4        gpio, ge(mdc), ua1(txd), ua0(rts)
mpp5          5        gpio, ge(mdio), ua1(rxd), ua0(cts)
mpp6          6        gpio, ge0(txclkout), ge0(crs), dev(cs3)
mpp7          7        gpio, ge0(txd0), dev(ad9)
mpp8          8        gpio, ge0(txd1), dev(ad10)
mpp9          9        gpio, ge0(txd2), dev(ad11)
mpp10         10       gpio, ge0(txd3), dev(ad12)
mpp11         11       gpio, ge0(txctl), dev(ad13)
mpp12         12       gpio, ge0(rxd0), pcie0(rstout), spi0(cs1), dev(ad14), pcie3(clkreq)
mpp13         13       gpio, ge0(rxd1), pcie0(clkreq), pcie1(clkreq) [1], spi0(cs2), dev(ad15), pcie2(clkreq)
mpp14         14       gpio, ge0(rxd2), ptp(clk), dram(vttctrl), spi0(cs3), dev(we1), pcie3(clkreq)
mpp15         15       gpio, ge0(rxd3), ge(mdc slave), pcie0(rstout), spi0(mosi)
mpp16         16       gpio, ge0(rxctl), ge(mdio slave), dram(deccerr), spi0(miso), pcie0(clkreq), pcie1(clkreq) [1]
mpp17         17       gpio, ge0(rxclk), ptp(clk), ua1(rxd), spi0(sck), sata1(prsnt), sata0(prsnt)
mpp18         18       gpio, ge0(rxerr), ptp(trig), ua1(txd), spi0(cs0)
mpp19         19       gpio, ge0(col), ptp(evreq), ge0(txerr), sata1(prsnt), ua0(cts)
mpp20         20       gpio, ge0(txclk), ptp(clk), sata0(prsnt), ua0(rts)
mpp21         21       gpio, spi0(cs1), ge1(rxd0), sata0(prsnt), sd0(cmd), dev(bootcs), sata1(prsnt)
mpp22         22       gpio, spi0(mosi), dev(ad0)
mpp23         23       gpio, spi0(sck), dev(ad2)
mpp24         24       gpio, spi0(miso), ua0(cts), ua1(rxd), sd0(d4), dev(ready)
mpp25         25       gpio, spi0(cs0), ua0(rts), ua1(txd), sd0(d5), dev(cs0)
mpp26         26       gpio, spi0(cs2), i2c1(sck), sd0(d6), dev(cs1)
mpp27         27       gpio, spi0(cs3), ge1(txclkout), i2c1(sda), sd0(d7), dev(cs2)
mpp28         28       gpio, ge1(txd0), sd0(clk), dev(ad5)
mpp29         29       gpio, ge1(txd1), dev(ale0)
mpp30         30       gpio, ge1(txd2), dev(oe)
mpp31         31       gpio, ge1(txd3), dev(ale1)
mpp32         32       gpio, ge1(txctl), dev(we0)
mpp33         33       gpio, dram(deccerr), dev(ad3)
mpp34         34       gpio, dev(ad1)
mpp35         35       gpio, ref(clk_out1), dev(a1)
mpp36         36       gpio, ptp(trig), dev(a0)
mpp37         37       gpio, ptp(clk), ge1(rxclk), sd0(d3), dev(ad8)
mpp38         38       gpio, ptp(evreq), ge1(rxd1), ref(clk_out0), sd0(d0), dev(ad4)
mpp39         39       gpio, i2c1(sck), ge1(rxd2), ua0(cts), sd0(d1), dev(a2)
mpp40         40       gpio, i2c1(sda), ge1(rxd3), ua0(rts), sd0(d2), dev(ad6)
mpp41         41       gpio, ua1(rxd), ge1(rxctl), ua0(cts), spi1(cs3), dev(burst/last), nand(rb0)
mpp42         42       gpio, ua1(txd), ua0(rts), dev(ad7)
mpp43         43       gpio, pcie0(clkreq), dram(vttctrl), dram(deccerr), spi1(cs2), dev(clkout), nand(rb1)
mpp44         44       gpio, sata0(prsnt), sata1(prsnt), sata2(prsnt) [2], sata3(prsnt) [3]
mpp45         45       gpio, ref(clk_out0), pcie0(rstout), ua1(rxd)
mpp46         46       gpio, ref(clk_out1), pcie0(rstout), ua1(txd)
mpp47         47       gpio, sata0(prsnt), sata1(prsnt), sata2(prsnt) [2], sata3(prsnt) [2]
mpp48         48       gpio, sata0(prsnt), dram(vttctrl), tdm(pclk), audio(mclk), sd0(d4), pcie0(clkreq)
mpp49         49       gpio, sata2(prsnt) [2], sata3(prsnt) [2], tdm(fsync), audio(lrclk), sd0(d5), pcie1(clkreq)
mpp50         50       gpio, pcie0(rstout), tdm(drx), audio(extclk), sd0(cmd)
mpp51         51       gpio, tdm(dtx), audio(sdo), dram(deccerr), ptp(trig)
mpp52         52       gpio, pcie0(rstout), tdm(int), audio(sdi), sd0(d6), ptp(clk)
mpp53         53       gpio, sata1(prsnt), sata0(prsnt), tdm(rst), audio(bclk), sd0(d7), ptp(evreq)
mpp54         54       gpio, sata0(prsnt), sata1(prsnt), pcie0(rstout), ge0(txerr), sd0(d3)
mpp55         55       gpio, ua1(cts), ge(mdio), pcie1(clkreq) [1], spi1(cs1), sd0(d0), ua1(rxd)
mpp56         56       gpio, ua1(rts), ge(mdc), dram(deccerr), spi1(mosi), ua1(txd)
mpp57         57       gpio, spi1(sck), sd0(clk), ua1(txd)
mpp58         58       gpio, pcie1(clkreq) [1], i2c1(sck), pcie2(clkreq), spi1(miso), sd0(d1), ua1(rxd)
mpp59         59       gpio, pcie0(rstout), i2c1(sda), spi1(cs0), sd0(d2)
```

\[1\]: only available on 88F6820 and 88F6828
\[2\]: only available on 88F6828

---

# Marvell Armada 39x SoC pinctrl driver for mpp

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Marvell Armada 39x SoC pinctrl driver for mpp.

Please refer to [marvell,mvebu-pinctrl.txt](</kernel/hardware/devicetree/bindings-pinctrl/marvell-mvebu-pinctrl.md>) in this directory for common binding
part and usage.

## Required properties:

- compatible: "marvell,88f6920-pinctrl", "marvell,88f6925-pinctrl" or
  "marvell,88f6928-pinctrl" depending on the specific variant of the
  SoC being used.
- reg: register specifier of MPP registers

## Available mpp pins/groups and functions:

Note: brackets (x) are not part of the mpp name for marvell,function and given
only for more detailed description in this document.

## name    pins    functions

```text
mpp0	0	gpio, ua0(rxd)
mpp1	1	gpio, ua0(txd)
mpp2	2	gpio, i2c0(sck)
mpp3	3	gpio, i2c0(sda)
mpp4	4	gpio, ua1(txd), ua0(rts), smi(mdc)
mpp5	5	gpio, ua1(rxd), ua0(cts), smi(mdio)
mpp6	6	gpio, dev(cs3), xsmi(mdio)
mpp7	7	gpio, dev(ad9), xsmi(mdc)
mpp8	8	gpio, dev(ad10), ptp(trig)
mpp9	9	gpio, dev(ad11), ptp(clk)
mpp10	10	gpio, dev(ad12), ptp(evreq)
mpp11	11	gpio, dev(ad13), led(clk)
mpp12	12	gpio, pcie0(rstout), dev(ad14), led(stb)
mpp13	13	gpio, dev(ad15), pcie2(clkreq), led(data)
mpp14	14	gpio, dram(vttctrl), dev(we1), ua1(txd)
mpp15	15	gpio, pcie0(rstout), spi0(mosi), i2c1(sck)
mpp16	16	gpio, dram(deccerr), spi0(miso), pcie0(clkreq), i2c1(sda)
mpp17	17	gpio, ua1(rxd), spi0(sck), sata1(prsnt) [1], sata0(prsnt) [1], smi(mdio)
mpp18	18	gpio, ua1(txd), spi0(cs0), i2c2(sck)
mpp19	19	gpio, sata1(prsnt) [1], ua0(cts), ua1(rxd), i2c2(sda)
mpp20	20	gpio, sata0(prsnt) [1], ua0(rts), ua1(txd), smi(mdc)
mpp21	21	gpio, spi0(cs1), sata0(prsnt) [1], sd0(cmd), dev(bootcs),
```

```text
                sata1(prsnt) [1], ge(rxd0)
```

```text
mpp22	22	gpio, spi0(mosi), dev(ad0)
mpp23	23	gpio, spi0(sck), dev(ad2)
mpp24	24	gpio, spi0(miso), ua0(cts), ua1(rxd), sd0(d4), dev(ready)
mpp25	25	gpio, spi0(cs0), ua0(rts), ua1(txd), sd0(d5), dev(cs0)
mpp26	26	gpio, spi0(cs2), i2c1(sck), sd0(d6), dev(cs1)
mpp27	27	gpio, spi0(cs3), i2c1(sda), sd0(d7), dev(cs2), ge(txclkout)
mpp28	28	gpio, sd0(clk), dev(ad5), ge(txd0)
mpp29	29	gpio, dev(ale0), ge(txd1)
mpp30	30	gpio, dev(oe), ge(txd2)
mpp31	31	gpio, dev(ale1), ge(txd3)
mpp32	32	gpio, dev(we0), ge(txctl)
mpp33	33	gpio, dram(deccerr), dev(ad3)
mpp34	34	gpio, dev(ad1)
mpp35	35	gpio, ref(clk), dev(a1)
mpp36	36	gpio, dev(a0)
mpp37	37	gpio, sd0(d3), dev(ad8), ge(rxclk)
mpp38	38	gpio, ref(clk), sd0(d0), dev(ad4), ge(rxd1)
mpp39	39	gpio, i2c1(sck), ua0(cts), sd0(d1), dev(a2), ge(rxd2)
mpp40	40	gpio, i2c1(sda), ua0(rts), sd0(d2), dev(ad6), ge(rxd3)
mpp41	41	gpio, ua1(rxd), ua0(cts), spi1(cs3), dev(burst/last), nand(rb0), ge(rxctl)
mpp42	42	gpio, ua1(txd), ua0(rts), dev(ad7)
mpp43	43	gpio, pcie0(clkreq), dram(vttctrl), dram(deccerr), spi1(cs2), dev(clkout), nand(rb1)
mpp44	44	gpio, sata0(prsnt) [1], sata1(prsnt) [1], sata2(prsnt) [2],
```

```text
                sata3(prsnt) [2], led(clk)
```

```text
mpp45	45	gpio, ref(clk), pcie0(rstout), ua1(rxd)
mpp46	46	gpio, ref(clk), pcie0(rstout), ua1(txd), led(stb)
mpp47	47	gpio, sata0(prsnt) [1], sata1(prsnt) [1], sata2(prsnt) [2],
```

```text
                sata3(prsnt) [2], led(data)
```

```text
mpp48	48	gpio, sata0(prsnt) [1], dram(vttctrl), tdm(pclk) [2], audio(mclk) [2], sd0(d4), pcie0(clkreq), ua1(txd)
mpp49	49	gpio, sata2(prsnt) [2], sata3(prsnt) [2], tdm(fsync) [2],
```

```text
                audio(lrclk) [2], sd0(d5), ua2(rxd)
```

```text
mpp50	50	gpio, pcie0(rstout), tdm(drx) [2], audio(extclk) [2], sd0(cmd), ua2(rxd)
mpp51	51	gpio, tdm(dtx) [2], audio(sdo) [2], dram(deccerr), ua2(txd)
mpp52	52	gpio, pcie0(rstout), tdm(int) [2], audio(sdi) [2], sd0(d6), i2c3(sck)
mpp53	53	gpio, sata1(prsnt) [1], sata0(prsnt) [1], tdm(rst) [2], audio(bclk) [2], sd0(d7), i2c3(sda)
mpp54	54	gpio, sata0(prsnt) [1], sata1(prsnt) [1], pcie0(rstout), sd0(d3), ua3(txd)
mpp55	55	gpio, ua1(cts), spi1(cs1), sd0(d0), ua1(rxd), ua3(rxd)
mpp56	56	gpio, ua1(rts), dram(deccerr), spi1(mosi), ua1(txd)
mpp57	57	gpio, spi1(sck), sd0(clk), ua1(txd)
mpp58	58	gpio, i2c1(sck), pcie2(clkreq), spi1(miso), sd0(d1), ua1(rxd)
mpp59	59	gpio, pcie0(rstout), i2c1(sda), spi1(cs0), sd0(d2)
```

\[1\]: only available on 88F6925/88F6928
\[2\]: only available on 88F6928

---

# Marvell 98dx3236 pinctrl driver for mpp

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Marvell 98dx3236 pinctrl driver for mpp.

Please refer to [marvell,mvebu-pinctrl.txt](</kernel/hardware/devicetree/bindings-pinctrl/marvell-mvebu-pinctrl.md>) in this directory for common binding
part and usage

## Required properties:

- compatible: "marvell,98dx3236-pinctrl" or "marvell,98dx4251-pinctrl"
- reg: register specifier of MPP registers

This driver supports all 98dx3236, 98dx3336 and 98dx4251 variants

## name          pins     functions

```text
mpp0          0        gpo, spi0(mosi), dev(ad8)
mpp1          1        gpio, spi0(miso), dev(ad9)
mpp2          2        gpo, spi0(sck), dev(ad10)
mpp3          3        gpio, spi0(cs0), dev(ad11)
mpp4          4        gpio, spi0(cs1), smi(mdc), dev(cs0)
mpp5          5        gpio, pex(rsto), sd0(cmd), dev(bootcs)
mpp6          6        gpo, sd0(clk), dev(a2)
mpp7          7        gpio, sd0(d0), dev(ale0)
mpp8          8        gpio, sd0(d1), dev(ale1)
mpp9          9        gpio, sd0(d2), dev(ready0)
mpp10         10       gpio, sd0(d3), dev(ad12)
mpp11         11       gpio, uart1(rxd), uart0(cts), dev(ad13)
mpp12         12       gpo, uart1(txd), uart0(rts), dev(ad14)
mpp13         13       gpio, intr(out), dev(ad15)
mpp14         14       gpio, i2c0(sck)
mpp15         15       gpio, i2c0(sda)
mpp16         16       gpo, dev(oe)
mpp17         17       gpo, dev(clkout)
mpp18         18       gpio, uart1(txd)
mpp19         19       gpio, uart1(rxd), dev(rb)
mpp20         20       gpo, dev(we0)
mpp21         21       gpo, dev(ad0)
mpp22         22       gpo, dev(ad1)
mpp23         23       gpo, dev(ad2)
mpp24         24       gpo, dev(ad3)
mpp25         25       gpo, dev(ad4)
mpp26         26       gpo, dev(ad5)
mpp27         27       gpo, dev(ad6)
mpp28         28       gpo, dev(ad7)
mpp29         29       gpo, dev(a0)
mpp30         30       gpo, dev(a1)
mpp31         31       gpio, slv_smi(mdc), smi(mdc), dev(we1)
mpp32         32       gpio, slv_smi(mdio), smi(mdio), dev(cs1)
```

---

# Marvell Armada XP SoC pinctrl driver for mpp

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Marvell Armada XP SoC pinctrl driver for mpp.

Please refer to [marvell,mvebu-pinctrl.txt](</kernel/hardware/devicetree/bindings-pinctrl/marvell-mvebu-pinctrl.md>) in this directory for common binding
part and usage.

## Required properties:

- compatible: "marvell,mv78230-pinctrl", "marvell,mv78260-pinctrl",
  "marvell,mv78460-pinctrl"
- reg: register specifier of MPP registers

This driver supports all Armada XP variants, i.e. mv78230, mv78260, and mv78460.

## Available mpp pins/groups and functions:

Note: brackets (x) are not part of the mpp name for marvell,function and given
only for more detailed description in this document.

- Marvell Armada XP (all variants)

## name          pins     functions

```text
mpp0          0        gpio, ge0(txclkout), lcd(d0)
mpp1          1        gpio, ge0(txd0), lcd(d1)
mpp2          2        gpio, ge0(txd1), lcd(d2)
mpp3          3        gpio, ge0(txd2), lcd(d3)
mpp4          4        gpio, ge0(txd3), lcd(d4)
mpp5          5        gpio, ge0(txctl), lcd(d5)
mpp6          6        gpio, ge0(rxd0), lcd(d6)
mpp7          7        gpio, ge0(rxd1), lcd(d7)
mpp8          8        gpio, ge0(rxd2), lcd(d8)
mpp9          9        gpio, ge0(rxd3), lcd(d9)
mpp10         10       gpio, ge0(rxctl), lcd(d10)
mpp11         11       gpio, ge0(rxclk), lcd(d11)
mpp12         12       gpio, ge0(txd4), ge1(txclkout), lcd(d12)
mpp13         13       gpio, ge0(txd5), ge1(txd0), spi1(mosi), lcd(d13)
mpp14         14       gpio, ge0(txd6), ge1(txd1), spi1(sck), lcd(d15)
mpp15         15       gpio, ge0(txd7), ge1(txd2), lcd(d16)
mpp16         16       gpio, ge0(txd7), ge1(txd3), spi1(cs0), lcd(d16)
mpp17         17       gpio, ge0(col), ge1(txctl), spi1(miso), lcd(d17)
mpp18         18       gpio, ge0(rxerr), ge1(rxd0), lcd(d18), ptp(trig)
mpp19         19       gpio, ge0(crs), ge1(rxd1), lcd(d19), ptp(evreq)
mpp20         20       gpio, ge0(rxd4), ge1(rxd2), lcd(d20), ptp(clk)
mpp21         21       gpio, ge0(rxd5), ge1(rxd3), lcd(d21), dram(bat)
mpp22         22       gpio, ge0(rxd6), ge1(rxctl), lcd(d22), sata0(prsnt)
mpp23         23       gpio, ge0(rxd7), ge1(rxclk), lcd(d23), sata1(prsnt)
mpp24         24       gpio, lcd(hsync), sata1(prsnt), tdm(rst)
mpp25         25       gpio, lcd(vsync), sata0(prsnt), tdm(pclk)
mpp26         26       gpio, lcd(clk), tdm(fsync)
mpp27         27       gpio, lcd(e), tdm(dtx), ptp(trig)
mpp28         28       gpio, lcd(pwm), tdm(drx), ptp(evreq)
mpp29         29       gpio, lcd(ref-clk), tdm(int0), ptp(clk)
mpp30         30       gpio, tdm(int1), sd0(clk)
mpp31         31       gpio, tdm(int2), sd0(cmd)
mpp32         32       gpio, tdm(int3), sd0(d0)
mpp33         33       gpio, tdm(int4), sd0(d1), dram(bat), dram(vttctrl)
mpp34         34       gpio, tdm(int5), sd0(d2), sata0(prsnt), dram(deccerr)
mpp35         35       gpio, tdm(int6), sd0(d3), sata1(prsnt)
mpp36         36       gpio, spi0(mosi)
mpp37         37       gpio, spi0(miso)
mpp38         38       gpio, spi0(sck)
mpp39         39       gpio, spi0(cs0)
mpp40         40       gpio, spi0(cs1), uart2(cts), lcd(vga-hsync), pcie(clkreq0),
```

```text
                       spi1(cs1)
```

mpp41         41       gpio, spi0(cs2), uart2(rts), lcd(vga-vsync), sata1(prsnt),

```text
                       pcie(clkreq1), spi1(cs2)
```

```text
mpp42         42       gpio, uart2(rxd), uart0(cts), tdm(int7), tdm(timer)
mpp43         43       gpio, uart2(txd), uart0(rts), spi0(cs3), pcie(rstout),
```

```text
                       spi1(cs3)
```

mpp44         44       gpio, uart2(cts), uart3(rxd), spi0(cs4), pcie(clkreq2),

```text
                       dram(bat), spi1(cs4)
```

mpp45         45       gpio, uart2(rts), uart3(txd), spi0(cs5), sata1(prsnt),

```text
                       spi1(cs5), dram(vttctrl)
```

mpp46         46       gpio, uart3(rts), uart1(rts), spi0(cs6), sata0(prsnt),

```text
                       spi1(cs6)
```

mpp47         47       gpio, uart3(cts), uart1(cts), spi0(cs7), pcie(clkreq3),

```text
                       ref(clkout), spi1(cs7)
```

mpp48         48       gpio, dev(clkout), dev(burst/last), nand(rb)

- Marvell Armada XP (mv78260 and mv78460 only)

## name          pins     functions

```text
mpp49         49       gpio, dev(we3)
mpp50         50       gpio, dev(we2)
mpp51         51       gpio, dev(ad16)
mpp52         52       gpio, dev(ad17)
mpp53         53       gpio, dev(ad18)
mpp54         54       gpio, dev(ad19)
mpp55         55       gpio, dev(ad20)
mpp56         56       gpio, dev(ad21)
mpp57         57       gpio, dev(ad22)
mpp58         58       gpio, dev(ad23)
mpp59         59       gpio, dev(ad24)
mpp60         60       gpio, dev(ad25)
mpp61         61       gpio, dev(ad26)
mpp62         62       gpio, dev(ad27)
mpp63         63       gpio, dev(ad28)
mpp64         64       gpio, dev(ad29)
mpp65         65       gpio, dev(ad30)
mpp66         66       gpio, dev(ad31)
```

---

# Marvell Dove SoC pinctrl driver for mpp

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Marvell Dove SoC pinctrl driver for mpp.

Please refer to [marvell,mvebu-pinctrl.txt](</kernel/hardware/devicetree/bindings-pinctrl/marvell-mvebu-pinctrl.md>) in this directory for common binding
part and usage.

## Required properties:

- compatible: "marvell,dove-pinctrl"
- clocks: (optional) phandle of pdma clock
- reg: register specifiers of MPP, MPP4, and PMU MPP registers

## Available mpp pins/groups and functions:

Note: brackets (x) are not part of the mpp name for marvell,function and given
only for more detailed description in this document.
Note: pmu\* also allows for Power Management functions listed below

## name          pins     functions

```text
mpp0          0        gpio, pmu, uart2(rts), sdio0(cd), lcd0(pwm), pmu*
mpp1          1        gpio, pmu, uart2(cts), sdio0(wp), lcd1(pwm), pmu*
mpp2          2        gpio, pmu, uart2(txd), sdio0(buspwr), sata(prsnt),
```

```text
                       uart1(rts), pmu*
```

mpp3          3        gpio, pmu, uart2(rxd), sdio0(ledctrl), sata(act),

```text
                       uart1(cts), lcd-spi(cs1), pmu*
```

```text
mpp4          4        gpio, pmu, uart3(rts), sdio1(cd), spi1(miso), pmu*
mpp5          5        gpio, pmu, uart3(cts), sdio1(wp), spi1(cs), pmu*
mpp6          6        gpio, pmu, uart3(txd), sdio1(buspwr), spi1(mosi), pmu*
mpp7          7        gpio, pmu, uart3(rxd), sdio1(ledctrl), spi1(sck), pmu*
mpp8          8        gpio, pmu, watchdog(rstout), pmu*
mpp9          9        gpio, pmu, pex1(clkreq), pmu*
mpp10         10       gpio, pmu, ssp(sclk), pmu*
mpp11         11       gpio, pmu, sata(prsnt), sata-1(act), sdio0(ledctrl),
```

```text
                       sdio1(ledctrl), pex0(clkreq), pmu*
```

mpp12         12       gpio, pmu, uart2(rts), audio0(extclk), sdio1(cd),

```text
                       sata(act), pmu*
```

mpp13         13       gpio, pmu, uart2(cts), audio1(extclk), sdio1(wp),

```text
                       ssp(extclk), pmu*
```

```text
mpp14         14       gpio, pmu, uart2(txd), sdio1(buspwr), ssp(rxd), pmu*
mpp15         15       gpio, pmu, uart2(rxd), sdio1(ledctrl), ssp(sfrm), pmu*
mpp16         16       gpio, uart3(rts), sdio0(cd), ac97(sdi1), lcd-spi(cs1)
mpp17         17       gpio, uart3(cts), sdio0(wp), ac97(sdi2), twsi(sda),
```

```text
                       ac97-1(sysclko)
```

```text
mpp18         18       gpio, uart3(txd), sdio0(buspwr), ac97(sdi3), lcd0(pwm)
mpp19         19       gpio, uart3(rxd), sdio0(ledctrl), twsi(sck)
mpp20         20       gpio, sdio0(cd), sdio1(cd), spi1(miso), lcd-spi(miso),
```

```text
                       ac97(sysclko)
```

mpp21         21       gpio, sdio0(wp), sdio1(wp), spi1(cs), lcd-spi(cs0),

```text
                       uart1(cts), ssp(sfrm)
```

mpp22         22       gpio, sdio0(buspwr), sdio1(buspwr), spi1(mosi),

```text
                       lcd-spi(mosi), uart1(cts), ssp(txd)
```

mpp23         23       gpio, sdio0(ledctrl), sdio1(ledctrl), spi1(sck),

```text
                       lcd-spi(sck), ssp(sclk)
```

```text
mpp_camera    24-39    gpio, camera
mpp_sdio0     40-45    gpio, sdio0
mpp_sdio1     46-51    gpio, sdio1
mpp_audio1    52-57    gpio, i2s1/spdifo, i2s1, spdifo, twsi, ssp/spdifo, ssp,
```

```text
                       ssp/twsi
```

```text
mpp_spi0      58-61    gpio, spi0
mpp_uart1     62-63    gpio, uart1
mpp_nand      64-71    gpo, nand
audio0        -        i2s, ac97
twsi          -        none, opt1, opt2, opt3
```

## Power Management functions (pmu\*):

```text
pmu-nc               Pin not driven by any PM function
pmu-low              Pin driven low (0)
pmu-high             Pin driven high (1)
pmic(sdi)            Pin is used for PMIC SDI
cpu-pwr-down         Pin is used for CPU_PWRDWN
standby-pwr-down     Pin is used for STBY_PWRDWN
core-pwr-good        Pin is used for CORE_PWR_GOOD (Pins 0-7 only)
cpu-pwr-good         Pin is used for CPU_PWR_GOOD (Pins 8-15 only)
bat-fault            Pin is used for BATTERY_FAULT
ext0-wakeup          Pin is used for EXT0_WU
ext1-wakeup          Pin is used for EXT0_WU
ext2-wakeup          Pin is used for EXT0_WU
pmu-blink            Pin is used for blink function
```

## Notes:

```text
* group "mpp_audio1" allows the following functions and gpio pins:
  - gpio          : gpio on pins 52-57
  - i2s1/spdifo   : audio1 i2s on pins 52-55 and spdifo on 57, no gpios
  - i2s1          : audio1 i2s on pins 52-55, gpio on pins 56,57
  - spdifo        : spdifo on pin 57, gpio on pins 52-55
  - twsi          : twsi on pins 56,57, gpio on pins 52-55
  - ssp/spdifo    : ssp on pins 52-55, spdifo on pin 57, no gpios
  - ssp           : ssp on pins 52-55, gpio on pins 56,57
  - ssp/twsi      : ssp on pins 52-55, twsi on pins 56,57, no gpios
* group "audio0" internally muxes i2s0 or ac97 controller to the dedicated
  audio0 pins.
* group "twsi" internally muxes twsi controller to the dedicated or option pins.
```

---

# Marvell Kirkwood SoC pinctrl driver for mpp

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Marvell Kirkwood SoC pinctrl driver for mpp.

Please refer to [marvell,mvebu-pinctrl.txt](</kernel/hardware/devicetree/bindings-pinctrl/marvell-mvebu-pinctrl.md>) in this directory for common binding
part and usage.

## Required properties:

- compatible: "marvell,88f6180-pinctrl",
  "marvell,88f6190-pinctrl", "marvell,88f6192-pinctrl",
  "marvell,88f6281-pinctrl", "marvell,88f6282-pinctrl",
  "marvell,98dx4122-pinctrl", "marvell,98dx1135-pinctrl"
- reg: register specifier of MPP registers

This driver supports all kirkwood variants, i.e. 88f6180, 88f619x, and 88f628x.
It also support the 88f6281-based variant in the 98dx412x Bobcat SoCs.

## Available mpp pins/groups and functions:

Note: brackets (x) are not part of the mpp name for marvell,function and given
only for more detailed description in this document.

- Marvell Kirkwood 88f6180

## name          pins     functions

```text
mpp0          0        gpio, nand(io2), spi(cs)
mpp1          1        gpo, nand(io3), spi(mosi)
mpp2          2        gpo, nand(io4), spi(sck)
mpp3          3        gpo, nand(io5), spi(miso)
mpp4          4        gpio, nand(io6), uart0(rxd), ptp(clk)
mpp5          5        gpo, nand(io7), uart0(txd), ptp(trig)
mpp6          6        sysrst(out), spi(mosi), ptp(trig)
mpp7          7        gpo, pex(rsto), spi(cs), ptp(trig)
mpp8          8        gpio, twsi0(sda), uart0(rts), uart1(rts), ptp(clk),
```

```text
                       mii(col)
```

mpp9          9        gpio, twsi(sck), uart0(cts), uart1(cts), ptp(evreq),

```text
                       mii(crs)
```

```text
mpp10         10       gpo, spi(sck), uart0(txd), ptp(trig)
mpp11         11       gpio, spi(miso), uart0(rxd), ptp(clk), ptp-1(evreq),
```

```text
                       ptp-2(trig)
```

```text
mpp12         12       gpo, sdio(clk)
mpp13         13       gpio, sdio(cmd), uart1(txd)
mpp14         14       gpio, sdio(d0), uart1(rxd), mii(col)
mpp15         15       gpio, sdio(d1), uart0(rts), uart1(txd)
mpp16         16       gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs)
mpp17         17       gpio, sdio(d3)
mpp18         18       gpo, nand(io0)
mpp19         19       gpo, nand(io1)
mpp35         35       gpio, mii(rxerr)
mpp36         36       gpio, audio(spdifi)
mpp37         37       gpio, audio(spdifo)
mpp38         38       gpio, audio(rmclk)
mpp39         39       gpio, audio(bclk)
mpp40         40       gpio, audio(sdo)
mpp41         41       gpio, audio(lrclk)
mpp42         42       gpio, audio(mclk)
mpp43         43       gpio, audio(sdi)
mpp44         44       gpio, audio(extclk)
```

- Marvell Kirkwood 88f6190

## name          pins     functions

```text
mpp0          0        gpio, nand(io2), spi(cs)
mpp1          1        gpo, nand(io3), spi(mosi)
mpp2          2        gpo, nand(io4), spi(sck)
mpp3          3        gpo, nand(io5), spi(miso)
mpp4          4        gpio, nand(io6), uart0(rxd), ptp(clk)
mpp5          5        gpo, nand(io7), uart0(txd), ptp(trig), sata0(act)
mpp6          6        sysrst(out), spi(mosi), ptp(trig)
mpp7          7        gpo, pex(rsto), spi(cs), ptp(trig)
mpp8          8        gpio, twsi0(sda), uart0(rts), uart1(rts), ptp(clk),
```

```text
                       mii(col), mii-1(rxerr)
```

mpp9          9        gpio, twsi(sck), uart0(cts), uart1(cts), ptp(evreq),

```text
                       mii(crs), sata0(prsnt)
```

```text
mpp10         10       gpo, spi(sck), uart0(txd), ptp(trig)
mpp11         11       gpio, spi(miso), uart0(rxd), ptp(clk), ptp-1(evreq),
```

```text
                       ptp-2(trig), sata0(act)
```

```text
mpp12         12       gpo, sdio(clk)
mpp13         13       gpio, sdio(cmd), uart1(txd)
mpp14         14       gpio, sdio(d0), uart1(rxd), mii(col)
mpp15         15       gpio, sdio(d1), uart0(rts), uart1(txd), sata0(act)
mpp16         16       gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs)
mpp17         17       gpio, sdio(d3), sata0(prsnt)
mpp18         18       gpo, nand(io0)
mpp19         19       gpo, nand(io1)
mpp20         20       gpio, ge1(txd0)
mpp21         21       gpio, ge1(txd1), sata0(act)
mpp22         22       gpio, ge1(txd2)
mpp23         23       gpio, ge1(txd3), sata0(prsnt)
mpp24         24       gpio, ge1(rxd0)
mpp25         25       gpio, ge1(rxd1)
mpp26         26       gpio, ge1(rxd2)
mpp27         27       gpio, ge1(rxd3)
mpp28         28       gpio, ge1(col)
mpp29         29       gpio, ge1(txclk)
mpp30         30       gpio, ge1(rxclk)
mpp31         31       gpio, ge1(rxclk)
mpp32         32       gpio, ge1(txclko)
mpp33         33       gpo, ge1(txclk)
mpp34         34       gpio, ge1(txen)
mpp35         35       gpio, ge1(rxerr), sata0(act), mii(rxerr)
```

- Marvell Kirkwood 88f6192

## name          pins     functions

```text
mpp0          0        gpio, nand(io2), spi(cs)
mpp1          1        gpo, nand(io3), spi(mosi)
mpp2          2        gpo, nand(io4), spi(sck)
mpp3          3        gpo, nand(io5), spi(miso)
mpp4          4        gpio, nand(io6), uart0(rxd), ptp(clk), sata1(act)
mpp5          5        gpo, nand(io7), uart0(txd), ptp(trig), sata0(act)
mpp6          6        sysrst(out), spi(mosi), ptp(trig)
mpp7          7        gpo, pex(rsto), spi(cs), ptp(trig)
mpp8          8        gpio, twsi0(sda), uart0(rts), uart1(rts), ptp(clk),
```

```text
                       mii(col), mii-1(rxerr), sata1(prsnt)
```

mpp9          9        gpio, twsi(sck), uart0(cts), uart1(cts), ptp(evreq),

```text
                       mii(crs), sata0(prsnt)
```

```text
mpp10         10       gpo, spi(sck), uart0(txd), ptp(trig), sata1(act)
mpp11         11       gpio, spi(miso), uart0(rxd), ptp(clk), ptp-1(evreq),
```

```text
                       ptp-2(trig), sata0(act)
```

```text
mpp12         12       gpo, sdio(clk)
mpp13         13       gpio, sdio(cmd), uart1(txd)
mpp14         14       gpio, sdio(d0), uart1(rxd), mii(col), sata1(prsnt)
mpp15         15       gpio, sdio(d1), uart0(rts), uart1(txd), sata0(act)
mpp16         16       gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs),
```

```text
                       sata1(act)
```

```text
mpp17         17       gpio, sdio(d3), sata0(prsnt)
mpp18         18       gpo, nand(io0)
mpp19         19       gpo, nand(io1)
mpp20         20       gpio, ge1(txd0), ts(mp0), tdm(tx0ql), audio(spdifi),
```

```text
                       sata1(act)
```

mpp21         21       gpio, ge1(txd1), sata0(act), ts(mp1), tdm(rx0ql),

```text
                       audio(spdifo)
```

mpp22         22       gpio, ge1(txd2), ts(mp2), tdm(tx2ql), audio(rmclk),

```text
                       sata1(prsnt)
```

mpp23         23       gpio, ge1(txd3), sata0(prsnt), ts(mp3), tdm(rx2ql),

```text
                       audio(bclk)
```

```text
mpp24         24       gpio, ge1(rxd0), ts(mp4), tdm(spi-cs0), audio(sdo)
mpp25         25       gpio, ge1(rxd1), ts(mp5), tdm(spi-sck), audio(lrclk)
mpp26         26       gpio, ge1(rxd2), ts(mp6), tdm(spi-miso), audio(mclk)
mpp27         27       gpio, ge1(rxd3), ts(mp7), tdm(spi-mosi), audio(sdi)
mpp28         28       gpio, ge1(col), ts(mp8), tdm(int), audio(extclk)
mpp29         29       gpio, ge1(txclk), ts(mp9), tdm(rst)
mpp30         30       gpio, ge1(rxclk), ts(mp10), tdm(pclk)
mpp31         31       gpio, ge1(rxclk), ts(mp11), tdm(fs)
mpp32         32       gpio, ge1(txclko), ts(mp12), tdm(drx)
mpp33         33       gpo, ge1(txclk), tdm(drx)
mpp34         34       gpio, ge1(txen), tdm(spi-cs1)
mpp35         35       gpio, ge1(rxerr), sata0(act), mii(rxerr), tdm(tx0ql)
```

- Marvell Kirkwood 88f6281

## name          pins     functions

```text
mpp0          0        gpio, nand(io2), spi(cs)
mpp1          1        gpo, nand(io3), spi(mosi)
mpp2          2        gpo, nand(io4), spi(sck)
mpp3          3        gpo, nand(io5), spi(miso)
mpp4          4        gpio, nand(io6), uart0(rxd), ptp(clk), sata1(act)
mpp5          5        gpo, nand(io7), uart0(txd), ptp(trig), sata0(act)
mpp6          6        sysrst(out), spi(mosi), ptp(trig)
mpp7          7        gpo, pex(rsto), spi(cs), ptp(trig)
mpp8          8        gpio, twsi0(sda), uart0(rts), uart1(rts), ptp(clk),
```

```text
                       mii(col), mii-1(rxerr), sata1(prsnt)
```

mpp9          9        gpio, twsi(sck), uart0(cts), uart1(cts), ptp(evreq),

```text
                       mii(crs), sata0(prsnt)
```

```text
mpp10         10       gpo, spi(sck), uart0(txd), ptp(trig), sata1(act)
mpp11         11       gpio, spi(miso), uart0(rxd), ptp(clk), ptp-1(evreq),
```

```text
                       ptp-2(trig), sata0(act)
```

```text
mpp12         12       gpio, sdio(clk)
mpp13         13       gpio, sdio(cmd), uart1(txd)
mpp14         14       gpio, sdio(d0), uart1(rxd), mii(col), sata1(prsnt)
mpp15         15       gpio, sdio(d1), uart0(rts), uart1(txd), sata0(act)
mpp16         16       gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs),
```

```text
                       sata1(act)
```

```text
mpp17         17       gpio, sdio(d3), sata0(prsnt)
mpp18         18       gpo, nand(io0)
mpp19         19       gpo, nand(io1)
mpp20         20       gpio, ge1(txd0), ts(mp0), tdm(tx0ql), audio(spdifi),
```

```text
                       sata1(act)
```

mpp21         21       gpio, ge1(txd1), sata0(act), ts(mp1), tdm(rx0ql),

```text
                       audio(spdifo)
```

mpp22         22       gpio, ge1(txd2), ts(mp2), tdm(tx2ql), audio(rmclk),

```text
                       sata1(prsnt)
```

mpp23         23       gpio, ge1(txd3), sata0(prsnt), ts(mp3), tdm(rx2ql),

```text
                       audio(bclk)
```

```text
mpp24         24       gpio, ge1(rxd0), ts(mp4), tdm(spi-cs0), audio(sdo)
mpp25         25       gpio, ge1(rxd1), ts(mp5), tdm(spi-sck), audio(lrclk)
mpp26         26       gpio, ge1(rxd2), ts(mp6), tdm(spi-miso), audio(mclk)
mpp27         27       gpio, ge1(rxd3), ts(mp7), tdm(spi-mosi), audio(sdi)
mpp28         28       gpio, ge1(col), ts(mp8), tdm(int), audio(extclk)
mpp29         29       gpio, ge1(txclk), ts(mp9), tdm(rst)
mpp30         30       gpio, ge1(rxclk), ts(mp10), tdm(pclk)
mpp31         31       gpio, ge1(rxclk), ts(mp11), tdm(fs)
mpp32         32       gpio, ge1(txclko), ts(mp12), tdm(drx)
mpp33         33       gpo, ge1(txclk), tdm(drx)
mpp34         34       gpio, ge1(txen), tdm(spi-cs1), sata1(act)
mpp35         35       gpio, ge1(rxerr), sata0(act), mii(rxerr), tdm(tx0ql)
mpp36         36       gpio, ts(mp0), tdm(spi-cs1), audio(spdifi)
mpp37         37       gpio, ts(mp1), tdm(tx2ql), audio(spdifo)
mpp38         38       gpio, ts(mp2), tdm(rx2ql), audio(rmclk)
mpp39         39       gpio, ts(mp3), tdm(spi-cs0), audio(bclk)
mpp40         40       gpio, ts(mp4), tdm(spi-sck), audio(sdo)
mpp41         41       gpio, ts(mp5), tdm(spi-miso), audio(lrclk)
mpp42         42       gpio, ts(mp6), tdm(spi-mosi), audio(mclk)
mpp43         43       gpio, ts(mp7), tdm(int), audio(sdi)
mpp44         44       gpio, ts(mp8), tdm(rst), audio(extclk)
mpp45         45       gpio, ts(mp9), tdm(pclk)
mpp46         46       gpio, ts(mp10), tdm(fs)
mpp47         47       gpio, ts(mp11), tdm(drx)
mpp48         48       gpio, ts(mp12), tdm(dtx)
mpp49         49       gpio, ts(mp9), tdm(rx0ql), ptp(clk)
```

- Marvell Kirkwood 88f6282

## name          pins     functions

```text
mpp0          0        gpio, nand(io2), spi(cs)
mpp1          1        gpo, nand(io3), spi(mosi)
mpp2          2        gpo, nand(io4), spi(sck)
mpp3          3        gpo, nand(io5), spi(miso)
mpp4          4        gpio, nand(io6), uart0(rxd), sata1(act), lcd(hsync)
mpp5          5        gpo, nand(io7), uart0(txd), sata0(act), lcd(vsync)
mpp6          6        sysrst(out), spi(mosi)
mpp7          7        gpo, spi(cs), lcd(pwm)
mpp8          8        gpio, twsi0(sda), uart0(rts), uart1(rts), mii(col),
```

```text
                       mii-1(rxerr), sata1(prsnt)
```

mpp9          9        gpio, twsi(sck), uart0(cts), uart1(cts), mii(crs),

```text
                       sata0(prsnt)
```

```text
mpp10         10       gpo, spi(sck), uart0(txd), sata1(act)
mpp11         11       gpio, spi(miso), uart0(rxd), sata0(act)
mpp12         12       gpo, sdio(clk), audio(spdifo), spi(mosi), twsi(sda)
mpp13         13       gpio, sdio(cmd), uart1(txd), audio(rmclk), lcd(pwm)
mpp14         14       gpio, sdio(d0), uart1(rxd), mii(col), sata1(prsnt),
```

```text
                       audio(spdifi), audio-1(sdi)
```

mpp15         15       gpio, sdio(d1), uart0(rts), uart1(txd), sata0(act),

```text
                       spi(cs)
```

mpp16         16       gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs),

```text
                       sata1(act), lcd(extclk)
```

```text
mpp17         17       gpio, sdio(d3), sata0(prsnt), sata1(act), twsi1(sck)
mpp18         18       gpo, nand(io0), pex(clkreq)
mpp19         19       gpo, nand(io1)
mpp20         20       gpio, ge1(txd0), ts(mp0), tdm(tx0ql), audio(spdifi),
```

```text
                       sata1(act), lcd(d0)
```

mpp21         21       gpio, ge1(txd1), sata0(act), ts(mp1), tdm(rx0ql),

```text
                       audio(spdifo), lcd(d1)
```

mpp22         22       gpio, ge1(txd2), ts(mp2), tdm(tx2ql), audio(rmclk),

```text
                       sata1(prsnt), lcd(d2)
```

mpp23         23       gpio, ge1(txd3), sata0(prsnt), ts(mp3), tdm(rx2ql),

```text
                       audio(bclk), lcd(d3)
```

mpp24         24       gpio, ge1(rxd0), ts(mp4), tdm(spi-cs0), audio(sdo),

```text
                       lcd(d4)
```

mpp25         25       gpio, ge1(rxd1), ts(mp5), tdm(spi-sck), audio(lrclk),

```text
                       lcd(d5)
```

mpp26         26       gpio, ge1(rxd2), ts(mp6), tdm(spi-miso), audio(mclk),

```text
                       lcd(d6)
```

mpp27         27       gpio, ge1(rxd3), ts(mp7), tdm(spi-mosi), audio(sdi),

```text
                       lcd(d7)
```

mpp28         28       gpio, ge1(col), ts(mp8), tdm(int), audio(extclk),

```text
                       lcd(d8)
```

```text
mpp29         29       gpio, ge1(txclk), ts(mp9), tdm(rst), lcd(d9)
mpp30         30       gpio, ge1(rxclk), ts(mp10), tdm(pclk), lcd(d10)
mpp31         31       gpio, ge1(rxclk), ts(mp11), tdm(fs), lcd(d11)
mpp32         32       gpio, ge1(txclko), ts(mp12), tdm(drx), lcd(d12)
mpp33         33       gpo, ge1(txclk), tdm(drx), lcd(d13)
mpp34         34       gpio, ge1(txen), tdm(spi-cs1), sata1(act), lcd(d14)
mpp35         35       gpio, ge1(rxerr), sata0(act), mii(rxerr), tdm(tx0ql),
```

```text
                       lcd(d15)
```

```text
mpp36         36       gpio, ts(mp0), tdm(spi-cs1), audio(spdifi), twsi1(sda)
mpp37         37       gpio, ts(mp1), tdm(tx2ql), audio(spdifo), twsi1(sck)
mpp38         38       gpio, ts(mp2), tdm(rx2ql), audio(rmclk), lcd(d18)
mpp39         39       gpio, ts(mp3), tdm(spi-cs0), audio(bclk), lcd(d19)
mpp40         40       gpio, ts(mp4), tdm(spi-sck), audio(sdo), lcd(d20)
mpp41         41       gpio, ts(mp5), tdm(spi-miso), audio(lrclk), lcd(d21)
mpp42         42       gpio, ts(mp6), tdm(spi-mosi), audio(mclk), lcd(d22)
mpp43         43       gpio, ts(mp7), tdm(int), audio(sdi), lcd(d23)
mpp44         44       gpio, ts(mp8), tdm(rst), audio(extclk), lcd(clk)
mpp45         45       gpio, ts(mp9), tdm(pclk), lcd(e)
mpp46         46       gpio, ts(mp10), tdm(fs), lcd(hsync)
mpp47         47       gpio, ts(mp11), tdm(drx), lcd(vsync)
mpp48         48       gpio, ts(mp12), tdm(dtx), lcd(d16)
mpp49         49       gpo, tdm(rx0ql), pex(clkreq), lcd(d17)
```

- Marvell Bobcat 98dx4122

## name          pins     functions

```text
mpp0          0        gpio, nand(io2), spi(cs)
mpp1          1        gpo, nand(io3), spi(mosi)
mpp2          2        gpo, nand(io4), spi(sck)
mpp3          3        gpo, nand(io5), spi(miso)
mpp4          4        gpio, nand(io6), uart0(rxd)
mpp5          5        gpo, nand(io7), uart0(txd)
mpp6          6        sysrst(out), spi(mosi)
mpp7          7        gpo, pex(rsto), spi(cs)
mpp8          8        gpio, twsi0(sda), uart0(rts), uart1(rts)
mpp9          9        gpio, twsi(sck), uart0(cts), uart1(cts)
mpp10         10       gpo, spi(sck), uart0(txd)
mpp11         11       gpio, spi(miso), uart0(rxd)
mpp13         13       gpio, uart1(txd)
mpp14         14       gpio, uart1(rxd)
mpp15         15       gpio, uart0(rts)
mpp16         16       gpio, uart0(cts)
mpp18         18       gpo, nand(io0)
mpp19         19       gpo, nand(io1)
mpp34         34       gpio
mpp35         35       gpio
mpp36         36       gpio
mpp37         37       gpio
mpp38         38       gpio
mpp39         39       gpio
mpp40         40       gpio
mpp41         41       gpio
mpp42         42       gpio
mpp43         43       gpio
mpp44         44       gpio
mpp45         45       gpio
mpp49         49       gpio
```

- Marvell Poncat2 98dx1135

## name          pins     functions

```text
mpp0          0        gpio, nand(io2), spi(cs)
mpp1          1        gpo, nand(io3), spi(mosi)
mpp2          2        gpo, nand(io4), spi(sck)
mpp3          3        gpo, nand(io5), spi(miso)
mpp4          4        gpio, nand(io6), uart0(rxd)
mpp5          5        gpo, nand(io7), uart0(txd)
mpp6          6        sysrst(out)
mpp7          7        gpo, spi(cs)
mpp8          8        gpio, twsi0(sda), uart1(rts)
mpp9          9        gpio, twsi(sck), uart1(cts)
mpp10         10       gpo, uart0(txd)
mpp11         11       gpio, uart0(rxd)
mpp13         13       gpio, uart1(txd)
mpp14         14       gpio, uart1(rxd)
mpp15         15       gpio, uart0(rts)
mpp16         16       gpio, uart0(cts)
mpp17         17       gpio, nand(cle)
mpp18         18       gpo, nand(io0)
mpp19         19       gpo, nand(io1)
mpp20         20       gpio
mpp21         21       gpio
mpp22         22       gpio
mpp23         23       gpio
mpp24         24       gpio
mpp25         25       gpio
mpp26         26       gpio
mpp27         27       gpio
mpp28         28       gpio, nand(ren)
mpp29         29       gpio, nand(wen)
mpp30         30       gpio
mpp31         31       gpio
mpp32         32       gpio
mpp33         33       gpio
mpp34         34       gpio, nand(ale)
mpp35         35       gpio, nand(cen)
```

---

# Marvell SoC pinctrl core driver for mpp

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Marvell SoC pinctrl core driver for mpp.

The pinctrl driver enables Marvell SoCs to configure the multi-purpose pins
(mpp) to a specific function. For each SoC family there is a SoC specific
driver using this core driver.

Please refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) in this directory for details of the
common pinctrl bindings used by client devices, including the meaning of the
phrase "pin configuration node".

A Marvell SoC pin configuration node is a node of a group of pins which can
be used for a specific device or function. Each node requires one or more
mpp pins or group of pins and a mpp function common to all pins.

## Required properties for pinctrl driver:

- compatible: "marvell,&lt;soc&gt;-pinctrl"
  Please refer to each marvell,&lt;soc&gt;-pinctrl.txt binding doc for supported SoCs.

## Required properties for pin configuration node:

- marvell,pins: string array of mpp pins or group of pins to be muxed.
- marvell,function: string representing a function to mux to for all
  marvell,pins given in this pin configuration node. The function has to be
  common for all marvell,pins. Please refer to marvell,&lt;soc&gt;-pinctrl.txt for
  valid pin/pin group names and available function names for each SoC.

## Examples:

```dts
uart1: serial@12100 {
	compatible = "ns16550a";
	reg = <0x12100 0x100>;
	reg-shift = <2>;
	interrupts = <7>;

	pinctrl-0 = <&pmx_uart1_sw>;
	pinctrl-names = "default";
};
```

```dts
pinctrl: pinctrl@d0200 {
	compatible = "marvell,dove-pinctrl";
	reg = <0xd0200 0x14>, <0xd0440 0x04>, <0xd802c 0x08>;

	pmx_uart1_sw: pmx-uart1-sw {
		marvell,pins = "mpp_uart1";
		marvell,function = "uart1";
	};
};
```

---

# Marvell Orion SoC pinctrl driver for mpp

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Marvell Orion SoC pinctrl driver for mpp.

Please refer to [marvell,mvebu-pinctrl.txt](</kernel/hardware/devicetree/bindings-pinctrl/marvell-mvebu-pinctrl.md>) in this directory for common binding
part and usage.

## Required properties:

- compatible: "marvell,88f5181-pinctrl",
  "marvell,88f5181l-pinctrl",
  "marvell,88f5182-pinctrl",
  "marvell,88f5281-pinctrl"

- reg: two register areas, the first one describing the first two
  contiguous MPP registers, and the second one describing the single
  final MPP register, separated from the previous one.

## Available mpp pins/groups and functions:

Note: brackets (x) are not part of the mpp name for marvell,function and given
only for more detailed description in this document.

- Marvell Orion 88f5181l

## name          pins     functions

```text
mpp0          0        pcie(rstout), pci(req2), gpio
mpp1          1        gpio, pci(gnt2)
mpp2          2        gpio, pci(req3), pci-1(pme)
mpp3          3        gpio, pci(gnt3)
mpp4          4        gpio, pci(req4)
mpp5          5        gpio, pci(gnt4)
mpp6          6        gpio, pci(req5), pci-1(clk)
mpp7          7        gpio, pci(gnt5), pci-1(clk)
mpp8          8        gpio, ge(col)
mpp9          9        gpio, ge(rxerr)
mpp10         10       gpio, ge(crs)
mpp11         11       gpio, ge(txerr)
mpp12         12       gpio, ge(txd4)
mpp13         13       gpio, ge(txd5)
mpp14         14       gpio, ge(txd6)
mpp15         15       gpio, ge(txd7)
mpp16         16       ge(rxd4)
mpp17         17       ge(rxd5)
mpp18         18       ge(rxd6)
mpp19         19       ge(rxd7)
```

- Marvell Orion 88f5182

## name          pins     functions

```text
mpp0          0        pcie(rstout), pci(req2), gpio
mpp1          1        gpio, pci(gnt2)
mpp2          2        gpio, pci(req3), pci-1(pme)
mpp3          3        gpio, pci(gnt3)
mpp4          4        gpio, pci(req4), bootnand(re), sata0(prsnt)
mpp5          5        gpio, pci(gnt4), bootnand(we), sata1(prsnt)
mpp6          6        gpio, pci(req5), nand(re0), sata0(act)
mpp7          7        gpio, pci(gnt5), nand(we0), sata1(act)
mpp8          8        gpio, ge(col)
mpp9          9        gpio, ge(rxerr)
mpp10         10       gpio, ge(crs)
mpp11         11       gpio, ge(txerr)
mpp12         12       gpio, ge(txd4), nand(re1), sata0(ledprsnt)
mpp13         13       gpio, ge(txd5), nand(we1), sata1(ledprsnt)
mpp14         14       gpio, ge(txd6), nand(re2), sata0(ledact)
mpp15         15       gpio, ge(txd7), nand(we2), sata1(ledact)
mpp16         16       uart1(rxd), ge(rxd4), gpio
mpp17         17       uart1(txd), ge(rxd5), gpio
mpp18         18       uart1(cts), ge(rxd6), gpio
mpp19         19       uart1(rts), ge(rxd7), gpio
```

- Marvell Orion 88f5281

## name          pins     functions

```text
mpp0          0        pcie(rstout), pci(req2), gpio
mpp1          1        gpio, pci(gnt2)
mpp2          2        gpio, pci(req3), pci(pme)
mpp3          3        gpio, pci(gnt3)
mpp4          4        gpio, pci(req4), bootnand(re)
mpp5          5        gpio, pci(gnt4), bootnand(we)
mpp6          6        gpio, pci(req5), nand(re0)
mpp7          7        gpio, pci(gnt5), nand(we0)
mpp8          8        gpio, ge(col)
mpp9          9        gpio, ge(rxerr)
mpp10         10       gpio, ge(crs)
mpp11         11       gpio, ge(txerr)
mpp12         12       gpio, ge(txd4), nand(re1)
mpp13         13       gpio, ge(txd5), nand(we1)
mpp14         14       gpio, ge(txd6), nand(re2)
mpp15         15       gpio, ge(txd7), nand(we2)
mpp16         16       uart1(rxd), ge(rxd4)
mpp17         17       uart1(txd), ge(rxd5)
mpp18         18       uart1(cts), ge(rxd6)
mpp19         19       uart1(rts), ge(rxd7)
```

---

# Microchip PIC32 Pin Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Microchip PIC32 Pin Controller.

Please refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>), [../gpio/gpio.txt](</kernel/hardware/devicetree/bindings-gpio/gpio.md>), and
[../interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>) for generic information regarding
pin controller, GPIO, and interrupt bindings.

PIC32 'pin configuration node' is a node of a group of pins which can be
used for a specific device or function. This node represents configurations of
pins, optional function, and optional mux related configuration.

## Required properties for pin controller node:

- compatible: "microchip,pic32mada-pinctrl"
- reg: Address range of the pinctrl registers.
- clocks: Clock specifier (see clock bindings for details)

## Required properties for pin configuration sub-nodes:

- pins: List of pins to which the configuration applies.

## Optional properties for pin configuration sub-nodes:

- function: Mux function for the specified pins.
- bias-pull-up: Enable weak pull-up.
- bias-pull-down: Enable weak pull-down.
- input-enable: Set the pin as an input.
- output-low: Set the pin as an output level low.
- output-high: Set the pin as an output level high.
- microchip,digital: Enable digital I/O.
- microchip,analog: Enable analog I/O.

## Example:

```dts
pic32_pinctrl: pinctrl@1f801400{
	#address-cells = <1>;
	#size-cells = <1>;
	compatible = "microchip,pic32mzda-pinctrl";
	reg = <0x1f801400 0x400>;
	clocks = <&rootclk PB1CLK>;

	pinctrl_uart2: pinctrl_uart2 {
		uart2-tx {
			pins = "G9";
			function = "U2TX";
			microchip,digital;
			output-low;
		};
		uart2-rx {
			pins = "B0";
			function = "U2RX";
			microchip,digital;
			input-enable;
		};
	};
};
```

```dts
uart2: serial@1f822200 {
	compatible = "microchip,pic32mzda-uart";
	reg = <0x1f822200 0x50>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart2>;
};
```

---

# Nuvoton NPCM7XX Pin Controllers

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Nuvoton NPCM7XX Pin Controllers.

The Nuvoton BMC NPCM7XX Pin Controller multi-function routed through
the multiplexing block, Each pin supports GPIO functionality (GPIOx)
and multiple functions that directly connect the pin to different
hardware blocks.

## Required properties:

- #address-cells : should be 1.
- #size-cells	 : should be 1.
- compatible	 : "nuvoton,npcm750-pinctrl" for Poleg NPCM7XX.
- ranges	 : defines mapping ranges between pin controller node (parent)
  to GPIO bank node (children).

=== GPIO Bank Subnode ===

The NPCM7XX has 8 GPIO Banks each GPIO bank supports 32 GPIO.

## Required GPIO Bank subnode-properties:

- reg 			: specifies physical base address and size of the GPIO
  bank registers.
- gpio-controller	: Marks the device node as a GPIO controller.
- #gpio-cells		: Must be &lt;2&gt;. The first cell is the gpio pin number
  and the second cell is used for optional parameters.
- interrupts		: contain the GPIO bank interrupt with flags for falling edge.
- gpio-ranges		: defines the range of pins managed by the GPIO bank controller.

## For example, GPIO bank subnodes like the following:

```dts
	gpio0: gpio@f0010000 {
		gpio-controller;
		#gpio-cells = <2>;
		reg = <0x0 0x80>;
		interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
		gpio-ranges = <&pinctrl 0 0 32>;
	};
```

=== Pin Mux Subnode ===

- pin: A string containing the name of the pin
  An array of strings, each string containing the name of a pin.
  These pin are used for selecting pin configuration.

## The following are the list of pins available:

```text
	"GPIO0/IOX1DI", "GPIO1/IOX1LD",	"GPIO2/IOX1CK", "GPIO3/IOX1D0",
	"GPIO4/IOX2DI/SMB1DSDA", "GPIO5/IOX2LD/SMB1DSCL", "GPIO6/IOX2CK/SMB2DSDA",
	"GPIO7/IOX2D0/SMB2DSCL", "GPIO8/LKGPO1", "GPIO9/LKGPO2", "GPIO10/IOXHLD",
	"GPIO11/IOXHCK", "GPIO12/GSPICK/SMB5BSCL", "GPIO13/GSPIDO/SMB5BSDA",
	"GPIO14/GSPIDI/SMB5CSCL", "GPIO15/GSPICS/SMB5CSDA", "GPIO16/LKGPO0",
	"GPIO17/PSPI2DI/SMB4DEN","GPIO18/PSPI2D0/SMB4BSDA", "GPIO19/PSPI2CK/SMB4BSCL",
	"GPIO20/SMB4CSDA/SMB15SDA", "GPIO21/SMB4CSCL/SMB15SCL", "GPIO22/SMB4DSDA/SMB14SDA",
	"GPIO23/SMB4DSCL/SMB14SCL", "GPIO24/IOXHDO", "GPIO25/IOXHDI", "GPIO26/SMB5SDA",
	"GPIO27/SMB5SCL", "GPIO28/SMB4SDA", "GPIO29/SMB4SCL", "GPIO30/SMB3SDA",
	"GPIO31/SMB3SCL", "GPIO32/nSPI0CS1","SPI0D2", "SPI0D3", "GPIO37/SMB3CSDA",
	"GPIO38/SMB3CSCL", "GPIO39/SMB3BSDA", "GPIO40/SMB3BSCL", "GPIO41/BSPRXD",
	"GPO42/BSPTXD/STRAP11", "GPIO43/RXD1/JTMS2/BU1RXD", "GPIO44/nCTS1/JTDI2/BU1CTS",
	"GPIO45/nDCD1/JTDO2", "GPIO46/nDSR1/JTCK2", "GPIO47/nRI1/JCP_RDY2",
	"GPIO48/TXD2/BSPTXD", "GPIO49/RXD2/BSPRXD", "GPIO50/nCTS2", "GPO51/nRTS2/STRAP2",
	"GPIO52/nDCD2", "GPO53/nDTR2_BOUT2/STRAP1", "GPIO54/nDSR2", "GPIO55/nRI2",
	"GPIO56/R1RXERR", "GPIO57/R1MDC", "GPIO58/R1MDIO", "GPIO59/SMB3DSDA",
	"GPIO60/SMB3DSCL", "GPO61/nDTR1_BOUT1/STRAP6", "GPO62/nRTST1/STRAP5",
	"GPO63/TXD1/STRAP4", "GPIO64/FANIN0", "GPIO65/FANIN1", "GPIO66/FANIN2",
	"GPIO67/FANIN3", "GPIO68/FANIN4", "GPIO69/FANIN5", "GPIO70/FANIN6", "GPIO71/FANIN7",
	"GPIO72/FANIN8", "GPIO73/FANIN9", "GPIO74/FANIN10", "GPIO75/FANIN11",
	"GPIO76/FANIN12", "GPIO77/FANIN13","GPIO78/FANIN14", "GPIO79/FANIN15",
	"GPIO80/PWM0", "GPIO81/PWM1", "GPIO82/PWM2", "GPIO83/PWM3", "GPIO84/R2TXD0",
	"GPIO85/R2TXD1", "GPIO86/R2TXEN", "GPIO87/R2RXD0", "GPIO88/R2RXD1", "GPIO89/R2CRSDV",
	"GPIO90/R2RXERR", "GPIO91/R2MDC", "GPIO92/R2MDIO", "GPIO93/GA20/SMB5DSCL",
	"GPIO94/nKBRST/SMB5DSDA", "GPIO95/nLRESET/nESPIRST", "GPIO96/RG1TXD0",
	"GPIO97/RG1TXD1", "GPIO98/RG1TXD2", "GPIO99/RG1TXD3","GPIO100/RG1TXC",
	"GPIO101/RG1TXCTL", "GPIO102/RG1RXD0", "GPIO103/RG1RXD1", "GPIO104/RG1RXD2",
	"GPIO105/RG1RXD3", "GPIO106/RG1RXC", "GPIO107/RG1RXCTL", "GPIO108/RG1MDC",
	"GPIO109/RG1MDIO", "GPIO110/RG2TXD0/DDRV0", "GPIO111/RG2TXD1/DDRV1",
	"GPIO112/RG2TXD2/DDRV2", "GPIO113/RG2TXD3/DDRV3", "GPIO114/SMB0SCL",
	"GPIO115/SMB0SDA", "GPIO116/SMB1SCL", "GPIO117/SMB1SDA", "GPIO118/SMB2SCL",
	"GPIO119/SMB2SDA", "GPIO120/SMB2CSDA", "GPIO121/SMB2CSCL", "GPIO122/SMB2BSDA",
	"GPIO123/SMB2BSCL", "GPIO124/SMB1CSDA", "GPIO125/SMB1CSCL","GPIO126/SMB1BSDA",
	"GPIO127/SMB1BSCL", "GPIO128/SMB8SCL", "GPIO129/SMB8SDA", "GPIO130/SMB9SCL",
	"GPIO131/SMB9SDA", "GPIO132/SMB10SCL", "GPIO133/SMB10SDA","GPIO134/SMB11SCL",
	"GPIO135/SMB11SDA", "GPIO136/SD1DT0", "GPIO137/SD1DT1", "GPIO138/SD1DT2",
	"GPIO139/SD1DT3", "GPIO140/SD1CLK", "GPIO141/SD1WP", "GPIO142/SD1CMD",
	"GPIO143/SD1CD/SD1PWR", "GPIO144/PWM4",	"GPIO145/PWM5",	"GPIO146/PWM6",
	"GPIO147/PWM7",	"GPIO148/MMCDT4", "GPIO149/MMCDT5", "GPIO150/MMCDT6",
	"GPIO151/MMCDT7", "GPIO152/MMCCLK", "GPIO153/MMCWP", "GPIO154/MMCCMD",
	"GPIO155/nMMCCD/nMMCRST", "GPIO156/MMCDT0", "GPIO157/MMCDT1", "GPIO158/MMCDT2",
	"GPIO159/MMCDT3", "GPIO160/CLKOUT/RNGOSCOUT", "GPIO161/nLFRAME/nESPICS",
	"GPIO162/SERIRQ", "GPIO163/LCLK/ESPICLK", "GPIO164/LAD0/ESPI_IO0",
	"GPIO165/LAD1/ESPI_IO1", "GPIO166/LAD2/ESPI_IO2", "GPIO167/LAD3/ESPI_IO3",
	"GPIO168/nCLKRUN/nESPIALERT", "GPIO169/nSCIPME", "GPIO170/nSMI", "GPIO171/SMB6SCL",
	"GPIO172/SMB6SDA", "GPIO173/SMB7SCL", "GPIO174/SMB7SDA", "GPIO175/PSPI1CK/FANIN19",
	"GPIO176/PSPI1DO/FANIN18", "GPIO177/PSPI1DI/FANIN17", "GPIO178/R1TXD0",
	"GPIO179/R1TXD1", "GPIO180/R1TXEN", "GPIO181/R1RXD0", "GPIO182/R1RXD1",
	"GPIO183/SPI3CK", "GPO184/SPI3D0/STRAP9", "GPO185/SPI3D1/STRAP10",
	"GPIO186/nSPI3CS0", "GPIO187/nSPI3CS1",	"GPIO188/SPI3D2/nSPI3CS2",
	"GPIO189/SPI3D3/nSPI3CS3", "GPIO190/nPRD_SMI", "GPIO191", "GPIO192", "GPIO193/R1CRSDV",
	"GPIO194/SMB0BSCL", "GPIO195/SMB0BSDA", "GPIO196/SMB0CSCL", "GPIO197/SMB0DEN",
	"GPIO198/SMB0DSDA", "GPIO199/SMB0DSCL", "GPIO200/R2CK", "GPIO201/R1CK",
	"GPIO202/SMB0CSDA", "GPIO203/FANIN16", "GPIO204/DDC2SCL", "GPIO205/DDC2SDA",
	"GPIO206/HSYNC2", "GPIO207/VSYNC2", "GPIO208/RG2TXC/DVCK", "GPIO209/RG2TXCTL/DDRV4",
	"GPIO210/RG2RXD0/DDRV5", "GPIO211/RG2RXD1/DDRV6", "GPIO212/RG2RXD2/DDRV7",
	"GPIO213/RG2RXD3/DDRV8", "GPIO214/RG2RXC/DDRV9", "GPIO215/RG2RXCTL/DDRV10",
	"GPIO216/RG2MDC/DDRV11", "GPIO217/RG2MDIO/DVHSYNC", "GPIO218/nWDO1",
	"GPIO219/nWDO2", "GPIO220/SMB12SCL", "GPIO221/SMB12SDA", "GPIO222/SMB13SCL",
	"GPIO223/SMB13SDA", "GPIO224/SPIXCK", "GPO225/SPIXD0/STRAP12", "GPO226/SPIXD1/STRAP13",
	"GPIO227/nSPIXCS0", "GPIO228/nSPIXCS1",	"GPO229/SPIXD2/STRAP3", "GPIO230/SPIXD3",
	"GPIO231/nCLKREQ", "GPI255/DACOSEL"
```

## Optional Properties:

```text
 bias-disable, bias-pull-down, bias-pull-up, input-enable,
 input-disable, output-high, output-low, drive-push-pull,
 drive-open-drain, input-debounce, slew-rate, drive-strength
```

## slew-rate valid arguments are:

```text
				<0> - slow
				<1> - fast
 drive-strength valid arguments are:
				<2> - 2mA
				<4> - 4mA
				<8> - 8mA
				<12> - 12mA
				<16> - 16mA
				<24> - 24mA
```

For example, pinctrl might have pinmux subnodes like the following:

```dts
	gpio0_iox1d1_pin: gpio0-iox1d1-pin {
		pins = "GPIO0/IOX1DI";
		output-high;
	};
	gpio0_iox1ck_pin: gpio0-iox1ck-pin {
		pins = "GPIO2/IOX1CK";
		output_high;
	};
```

=== Pin Group Subnode ===

## Required pin group subnode-properties:

- groups : A string containing the name of the group to mux.
- function: A string containing the name of the function to mux to the
  group.

The following are the list of the available groups and functions :

```text
	smb0, smb0b, smb0c, smb0d, smb0den, smb1, smb1b, smb1c, smb1d,
	smb2, smb2b, smb2c, smb2d, smb3, smb3b, smb3c, smb3d, smb4, smb4b,
	smb4c, smb4d, smb4den, smb5, smb5b, smb5c, smb5d, ga20kbc, smb6,
	smb7, smb8, smb9, smb10, smb11, smb12, smb13, smb14, smb15, fanin0,
	fanin1, fanin2, fanin3, fanin4, fanin5, fanin6, fanin7, fanin8,
	fanin9, fanin10, fanin11 fanin12 fanin13, fanin14, fanin15, faninx,
	pwm0, pwm1, pwm2, pwm3, pwm4, pwm5, pwm6, pwm7, rg1, rg1mdio, rg2,
	rg2mdio, ddr, uart1, uart2, bmcuart0a, bmcuart0b, bmcuart1, iox1,
	iox2, ioxh, gspi, mmc, mmcwp, mmccd, mmcrst, mmc8, r1, r1err, r1md,
	r2, r2err, r2md, sd1, sd1pwr, wdog1, wdog2, scipme, sci, serirq,
	jtag2, spix, spixcs1, pspi1, pspi2, ddc, clkreq, clkout, spi3, spi3cs1,
	spi3quad, spi3cs2, spi3cs3, spi0cs1, lpc, lpcclk, espi, lkgpo0, lkgpo1,
	lkgpo2, nprd_smi
```

For example, pinctrl might have group subnodes like the following:

```dts
	r1err_pins: r1err-pins {
		groups = "r1err";
		function = "r1err";
	};
	r1md_pins: r1md-pins {
		groups = "r1md";
		function = "r1md";
	};
	r1_pins: r1-pins {
		groups = "r1";
		function = "r1";
	};
```

## Examples

```dts
pinctrl: pinctrl@f0800000 {
	#address-cells = <1>;
	#size-cells = <1>;
	compatible = "nuvoton,npcm750-pinctrl";
	ranges = <0 0xf0010000 0x8000>;

	gpio0: gpio@f0010000 {
		gpio-controller;
		#gpio-cells = <2>;
		reg = <0x0 0x80>;
		interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
		gpio-ranges = <&pinctrl 0 0 32>;
	};

	....

	gpio7: gpio@f0017000 {
		gpio-controller;
		#gpio-cells = <2>;
		reg = <0x7000 0x80>;
		interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
		gpio-ranges = <&pinctrl 0 224 32>;
	};

	gpio0_iox1d1_pin: gpio0-iox1d1-pin {
		pins = "GPIO0/IOX1DI";
		output-high;
	};

	iox1_pins: iox1-pins {
		groups = "iox1";
		function = "iox1";
	};
	iox2_pins: iox2-pins {
		groups = "iox2";
		function = "iox2";
	};

	....

	clkreq_pins: clkreq-pins {
		groups = "clkreq";
		function = "clkreq";
	};
};
```

---

# Device tree binding for NVIDIA Tegra XUSB pad controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Device tree binding for NVIDIA Tegra XUSB pad controller.

NOTE: It turns out that this binding isn't an accurate description of the XUSB
pad controller. While the description is good enough for the functional subset
required for PCIe and SATA, it lacks the flexibility to represent the features
needed for USB. For the new binding, see ../phy/nvidia,tegra-xusb-padctl.txt.
The binding described in this file is deprecated and should not be used.

The Tegra XUSB pad controller manages a set of lanes, each of which can be
assigned to one out of a set of different pads. Some of these pads have an
associated PHY that must be powered up before the pad can be used.

This document defines the device-specific binding for the XUSB pad controller.

Refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) in this directory for generic information about
pin controller device tree bindings and [../phy/phy-bindings.txt](</kernel/hardware/devicetree/bindings-phy/phy-bindings.md>) for details on
how to describe and reference PHYs in device trees.

## Required properties:

```text
- compatible: For Tegra124, must contain "nvidia,tegra124-xusb-padctl".
  Otherwise, must contain '"nvidia,<chip>-xusb-padctl",
  "nvidia-tegra124-xusb-padctl"', where <chip> is tegra132 or tegra210.
- reg: Physical base address and length of the controller's registers.
- resets: Must contain an entry for each entry in reset-names.
  See ../reset/reset.txt for details.
- reset-names: Must include the following entries:
  - padctl
- #phy-cells: Should be 1. The specifier is the index of the PHY to reference.
  See <dt-bindings/pinctrl/pinctrl-tegra-xusb.h> for the list of valid values.
```

## Lane muxing:

Child nodes contain the pinmux configurations following the conventions from
the [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) document. Typically a single, static configuration is
given and applied at boot time.

Each subnode describes groups of lanes along with parameters and pads that
they should be assigned to. The name of these subnodes is not important. All
subnodes should be parsed solely based on their content.

Each subnode only applies the parameters that are explicitly listed. In other
words, if a subnode that lists a function but no pin configuration parameters
implies no information about any pin configuration parameters. Similarly, a
subnode that describes only an IDDQ parameter implies no information about
what function the pins are assigned to. For this reason even seemingly boolean
values are actually tristates in this binding: unspecified, off or on.
Unspecified is represented as an absent property, and off/on are represented
as integer values 0 and 1.

## Required properties:

- nvidia,lanes: An array of strings. Each string is the name of a lane.

## Optional properties:

- nvidia,function: A string that is the name of the function (pad) that the
  pin or group should be assigned to. Valid values for function names are
  listed below.
- nvidia,iddq: Enables IDDQ mode of the lane. (0: no, 1: yes)

Note that not all of these properties are valid for all lanes. Lanes can be
divided into three groups:

- otg-0, otg-1, otg-2:

```text
    Valid functions for this group are: "snps", "xusb", "uart", "rsvd".
```

```text
    The nvidia,iddq property does not apply to this group.
```

- ulpi-0, hsic-0, hsic-1:

```text
    Valid functions for this group are: "snps", "xusb".
```

```text
    The nvidia,iddq property does not apply to this group.
```

- pcie-0, pcie-1, pcie-2, pcie-3, pcie-4, sata-0:

```text
    Valid functions for this group are: "pcie", "usb3", "sata", "rsvd".
```

## Example:

## SoC file extract:

```dts
	padctl@7009f000 {
		compatible = "nvidia,tegra124-xusb-padctl";
		reg = <0x0 0x7009f000 0x0 0x1000>;
		resets = <&tegra_car 142>;
		reset-names = "padctl";

		#phy-cells = <1>;
	};
```

## Board file extract:

```dts
	pcie-controller@1003000 {
		...

		phys = <&padctl 0>;
		phy-names = "pcie";

		...
	};
```

```text
	...
```

```dts
	padctl: padctl@7009f000 {
		pinctrl-0 = <&padctl_default>;
		pinctrl-names = "default";

		padctl_default: pinmux {
			usb3 {
				nvidia,lanes = "pcie-0", "pcie-1";
				nvidia,function = "usb3";
				nvidia,iddq = <0>;
			};

			pcie {
				nvidia,lanes = "pcie-2", "pcie-3",
					       "pcie-4";
				nvidia,function = "pcie";
				nvidia,iddq = <0>;
			};

			sata {
				nvidia,lanes = "sata-0";
				nvidia,function = "sata";
				nvidia,iddq = <0>;
			};
		};
	};
```

---

# == Introduction ==

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for == Introduction ==.

Hardware modules that control pin multiplexing or configuration parameters
such as pull-up/down, tri-state, drive-strength etc are designated as pin
controllers. Each pin controller must be represented as a node in device tree,
just like any other hardware module.

Hardware modules whose signals are affected by pin configuration are
designated client devices. Again, each client device must be represented as a
node in device tree, just like any other hardware module.

For a client device to operate correctly, certain pin controllers must
set up certain specific pin configurations. Some client devices need a
single static pin configuration, e.g. set up during initialization. Others
need to reconfigure pins at run-time, for example to tri-state pins when the
device is inactive. Hence, each client device can define a set of named
states. The number and names of those states is defined by the client device's
own binding.

The common pinctrl bindings defined in this file provide an infrastructure
for client device device tree nodes to map those state names to the pin
configuration used by those states.

Note that pin controllers themselves may also be client devices of themselves.
For example, a pin controller may set up its own "active" state when the
driver loads. This would allow representing a board's static pin configuration
in a single place, rather than splitting it across multiple client device
nodes. The decision to do this or not somewhat rests with the author of
individual board device tree files, and any requirements imposed by the
bindings for the individual client devices in use by that board, i.e. whether
they require certain specific named states for dynamic pin configuration.

== Pinctrl client devices ==

For each client device individually, every pin state is assigned an integer
ID. These numbers start at 0, and are contiguous. For each state ID, a unique
property exists to define the pin configuration. Each state may also be
assigned a name. When names are used, another property exists to map from
those names to the integer IDs.

Each client device's own binding determines the set of states that must be
defined in its device tree node, and whether to define the set of state
IDs that must be provided, or whether to define the set of state names that
must be provided.

## Required properties:

pinctrl-0:	List of phandles, each pointing at a pin configuration

```text
		node. These referenced pin configuration nodes must be child
		nodes of the pin controller that they configure. Multiple
		entries may exist in this list so that multiple pin
		controllers may be configured, or so that a state may be built
		from multiple nodes for a single pin controller, each
		contributing part of the overall configuration. See the next
		section of this document for details of the format of these
		pin configuration nodes.
```

```text
		In some cases, it may be useful to define a state, but for it
		to be empty. This may be required when a common IP block is
		used in an SoC either without a pin controller, or where the
		pin controller does not affect the HW module in question. If
		the binding for that IP block requires certain pin states to
		exist, they must still be defined, but may be left empty.
```

## Optional properties:

pinctrl-1:	List of phandles, each pointing at a pin configuration

```text
		node within a pin controller.
```

...
pinctrl-n:	List of phandles, each pointing at a pin configuration

```text
		node within a pin controller.
```

pinctrl-names:	The list of names to assign states. List entry 0 defines the

```text
		name for integer state ID 0, list entry 1 for state ID 1, and
		so on.
```

## For example:

```text
	/* For a client device requiring named states */
	device {
		pinctrl-names = "active", "idle";
		pinctrl-0 = <&state_0_node_a>;
		pinctrl-1 = <&state_1_node_a>, <&state_1_node_b>;
	};
```

```text
	/* For the same device if using state IDs */
	device {
		pinctrl-0 = <&state_0_node_a>;
		pinctrl-1 = <&state_1_node_a>, <&state_1_node_b>;
	};
```

```text
	/*
	 * For an IP block whose binding supports pin configuration,
	 * but in use on an SoC that doesn't have any pin control hardware
	 */
	device {
		pinctrl-names = "active", "idle";
		pinctrl-0 = <>;
		pinctrl-1 = <>;
	};
```

== Pin controller devices ==

See [pinctrl.yaml](</kernel/hardware/devicetree-bindings/dt-pinctrl/pinctrl.md>)

== Generic pin multiplexing node content ==

See [pinmux-node.yaml](</kernel/hardware/devicetree-bindings/dt-pinctrl/pinmux-node.md>)

== Generic pin configuration node content ==

See [pincfg-node.yaml](</kernel/hardware/devicetree-bindings/dt-pinctrl/pincfg-node.md>)

---

# Pincontrol driver for MAX77620 Power management IC from Maxim Semiconductor.

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Pincontrol driver for MAX77620 Power management IC from Maxim Semiconductor..

Device has 8 GPIO pins which can be configured as GPIO as well as the
special IO functions.

Please refer file &lt;[devicetree/bindings/pinctrl/pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)&gt;
for details of the common pinctrl bindings used by client devices,
including the meaning of the phrase "pin configuration node".

## Optional Pinmux properties:

Following properties are required if default setting of pins are required
at boot.

- pinctrl-names: A pinctrl state named per &lt;[pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)&gt;.
- pinctrl\[0...n\]: Properties to contain the phandle for pinctrl states per
  &lt;[pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)&gt;.

The pin configurations are defined as child of the pinctrl states node. Each
sub-node have following properties:

## Required properties:

- pins: List of pins. Valid values of pins properties are:
  gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7.

## Optional properties:

Following are optional properties defined as pinmux DT binding document
&lt;[pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)&gt;. Absence of properties will leave the configuration
on default.

```text
	function,
	drive-push-pull,
	drive-open-drain,
	bias-pull-up,
	bias-pull-down.
```

## Valid values for function properties are:

```text
	gpio, lpm-control-in, fps-out, 32k-out, sd0-dvs-in, sd1-dvs-in,
	reference-out
```

There are also customised properties for the GPIO1, GPIO2 and GPIO3. These
customised properties are required to configure FPS configuration parameters
of these GPIOs. Please refer &lt;[devicetree/bindings/mfd/max77620.txt](</kernel/hardware/devicetree/bindings-mfd/max77620.md>)&gt; for more
detail of Flexible Power Sequence (FPS).

```text
- maxim,active-fps-source:		FPS source for the GPIOs to get
					enabled/disabled when system is in
					active state.  Valid values are:
					- MAX77620_FPS_SRC_0,
						FPS source is FPS0.
					- MAX77620_FPS_SRC_1,
						FPS source is FPS1
					- MAX77620_FPS_SRC_2 and
						FPS source is FPS2
					- MAX77620_FPS_SRC_NONE.
						GPIO is not controlled
						by FPS events and it gets
						enabled/disabled by register
						access.
					Absence of this property will leave
					the FPS configuration register for that
					GPIO to default configuration.
```

- maxim,active-fps-power-up-slot:	Sequencing event slot number on which
  the GPIO get enabled when
  master FPS input event set to HIGH.
  Valid values are 0 to 7.
  This is applicable if FPS source is
  selected as FPS0, FPS1 or FPS2.

- maxim,active-fps-power-down-slot:	Sequencing event slot number on which
  the GPIO get disabled when master
  FPS input event set to LOW.
  Valid values are 0 to 7.
  This is applicable if FPS source is
  selected as FPS0, FPS1 or FPS2.

- maxim,suspend-fps-source:		This is same as property
  "maxim,active-fps-source" but value
  get configured when system enters in
  to suspend state.

- maxim,suspend-fps-power-up-slot:	This is same as property
  "maxim,active-fps-power-up-slot" but
  this value get configured into FPS
  configuration register when system
  enters into suspend.
  This is applicable if suspend state
  FPS source is selected as FPS0, FPS1 or

- maxim,suspend-fps-power-down-slot:	This is same as property
  "maxim,active-fps-power-down-slot" but
  this value get configured into FPS
  configuration register when system
  enters into suspend.
  This is applicable if suspend state
  FPS source is selected as FPS0, FPS1 or
  FPS2.

## Example:

```dts
#include <dt-bindings/mfd/max77620.h>
```

...

```dts
max77620@3c {

	pinctrl-names = "default";
	pinctrl-0 = <&spmic_default>;

	spmic_default: pinmux@0 {
		pin_gpio0 {
			pins = "gpio0";
			function = "gpio";
		};

		pin_gpio1 {
			pins = "gpio1";
			function = "fps-out";
			maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
		};

		pin_gpio2 {
			pins = "gpio2";
			function = "fps-out";
			maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
		};
	};
};
```

---

# Palmas Pincontrol bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Palmas Pincontrol bindings.

The pins of Palmas device can be set on different option and provides
the configuration for Pull UP/DOWN, open drain etc.

## Required properties:

```text
- compatible: It must be one of following:
  - "ti,palmas-pinctrl" for Palma series of the pincontrol.
  - "ti,tps65913-pinctrl" for Palma series device TPS65913.
  - "ti,tps80036-pinctrl" for Palma series device TPS80036.
```

Please refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) in this directory for details of the
common pinctrl bindings used by client devices, including the meaning of the
phrase "pin configuration node".

Palmas's pin configuration nodes act as a container for an arbitrary number of
subnodes. Each of these subnodes represents some desired configuration for a
list of pins. This configuration can include the mux function to select on
those pin(s), and various pin configuration parameters, such as pull-up,
open drain.

The name of each subnode is not important; all subnodes should be enumerated
and processed purely based on their content.

Each subnode only affects those parameters that are explicitly listed. In
other words, a subnode that lists a mux function but no pin configuration
parameters implies no information about any pin configuration parameters.
Similarly, a pin subnode that describes a pullup parameter implies no
information about e.g. the mux function.

## Optional properties:

- ti,palmas-enable-dvfs1: Enable DVFS1. Configure pins for DVFS1 mode.
  Selection primary or secondary function associated to I2C2\_SCL\_SCE,
  I2C2\_SDA\_SDO pin/pad for DVFS1 interface
- ti,palmas-enable-dvfs2: Enable DVFS2. Configure pins for DVFS2 mode.
  Selection primary or secondary function associated to GPADC\_START
  and SYSEN2 pin/pad for DVFS2 interface
- ti,palmas-override-powerhold: This is applicable for PMICs for which
  GPIO7 is configured in POWERHOLD mode which has higher priority
  over DEV\_ON bit and keeps the PMIC supplies on even after the DEV\_ON
  bit is turned off. This property enables driver to over ride the
  POWERHOLD value to GPIO7 so as to turn off the PMIC in power off
  scenarios. So for GPIO7 if ti,palmas-override-powerhold is set
  then the GPIO\_7 field should never be muxed to anything else.
  It should be set to POWERHOLD by default and only in case of
  power off scenarios the driver will over ride the mux value.

This binding uses the following generic properties as defined in
[pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>):

Required: pins
Options: function, bias-disable, bias-pull-up, bias-pull-down,

```text
	 drive-open-drain.
```

Note that many of these properties are only valid for certain specific pins.
See the Palmas device datasheet for complete details regarding which pins
support which functionality.

## Valid values for pin names are:

```text
	gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7, gpio8, gpio9,
	gpio10, gpio11, gpio12, gpio13, gpio14, gpio15, vac, powergood,
	nreswarm, pwrdown, gpadc_start, reset_in, nsleep, enable1, enable2,
	int.
```

## Valid value of function names are:

```text
	gpio, led, pwm, regen, sysen, clk32kgaudio, id, vbus_det, chrg_det,
	vac, vacok, powergood, usb_psel, msecure, pwrhold, int, nreswarm,
	simrsto, simrsti, low_vbat, wireless_chrg1, rcm, pwrdown, gpadc_start,
	reset_in, nsleep, enable.
```

There are 4 special functions: opt0, opt1, opt2 and opt3. If any of these
functions is selected then directly pins register will be written with 0, 1, 2
or 3 respectively if it is valid for that pins or list of pins.

## Example:

```dts
	palmas: tps65913 {
		....
		pinctrl {
			compatible = "ti,tps65913-pinctrl";
			ti,palmas-enable-dvfs1;
			pinctrl-names = "default";
			pinctrl-0 = <&palmas_pins_state>;

			palmas_pins_state: pinmux {
				gpio0 {
					pins = "gpio0";
					function = "id";
					bias-pull-up;
				};

				vac {
					pins = "vac";
					function = "vacok";
					bias-pull-down;
				};

				gpio5 {
					pins = "gpio5";
					function = "opt0";
					drive-open-drain = <1>;
				};
			};
		};
		....
	};
```

---

# Pincontrol driver for RK805 Power management IC.

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Pincontrol driver for RK805 Power management IC..

RK805 has 2 pins which can be configured as GPIO output only.

Please refer file &lt;[devicetree/bindings/pinctrl/pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)&gt;
for details of the common pinctrl bindings used by client devices,
including the meaning of the phrase "pin configuration node".

## Optional Pinmux properties:

Following properties are required if default setting of pins are required
at boot.

- pinctrl-names: A pinctrl state named per &lt;[pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)&gt;.
- pinctrl\[0...n\]: Properties to contain the phandle for pinctrl states per
  &lt;[pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)&gt;.

The pin configurations are defined as child of the pinctrl states node. Each
sub-node have following properties:

## Required properties:

- #gpio-cells: Should be two. The first cell is the pin number and the
  second is the GPIO flags.

- gpio-controller: Marks the device node as a GPIO controller.

- pins: List of pins. Valid values of pins properties are: gpio0, gpio1.

First 2 properties must be added in the RK805 PMIC node, documented in
[Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml](</kernel/hardware/devicetree-bindings/dt-mfd/rockchip-rk808.md>)

## Optional properties:

Following are optional properties defined as pinmux DT binding document
&lt;[pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)&gt;. Absence of properties will leave the configuration
on default.

```text
	function,
	output-low,
	output-high.
```

Valid values for function properties are: gpio.

There are also not customised properties for any GPIO.

## Example:

```dts
rk805: rk805@18 {
	compatible = "rockchip,rk805";
	...
	gpio-controller;
	#gpio-cells = <2>;

	pinctrl-names = "default";
	pinctrl-0 = <&pmic_int_l>, <&rk805_default>;

	rk805_default: pinmux {
		gpio01 {
			pins = "gpio0", "gpio1";
			function = "gpio";
			output-high;
		};
	};
};
```

---

# CSR SiRFprimaII pinmux controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for CSR SiRFprimaII pinmux controller.

## Required properties:

- compatible	: "sirf,prima2-pinctrl"
- reg		: Address range of the pinctrl registers
- interrupts    : Interrupts used by every GPIO group
- gpio-controller : Indicates this device is a GPIO controller
- interrupt-controller  : Marks the device node as an interrupt controller
  Optional properties:
- sirf,pullups : if n-th bit of m-th bank is set, set a pullup on GPIO-n of bank m
- sirf,pulldowns : if n-th bit of m-th bank is set, set a pulldown on GPIO-n of bank m

Please refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) in this directory for details of the common
pinctrl bindings used by client devices.

SiRFprimaII's pinmux nodes act as a container for an arbitrary number of subnodes.
Each of these subnodes represents some desired configuration for a group of pins.

## Required subnode-properties:

- sirf,pins : An array of strings. Each string contains the name of a group.
- sirf,function: A string containing the name of the function to mux to the
  group.

```text
  Valid values for group and function names can be found from looking at the
  group and function arrays in driver files:
  drivers/pinctrl/pinctrl-sirf.c
```

## For example, pinctrl might have subnodes like the following:

```dts
 uart2_pins_a: uart2@0 {
         uart {
                 sirf,pins = "uart2grp";
                 sirf,function = "uart2";
         };
 };
 uart2_noflow_pins_a: uart2@1 {
         uart {
                 sirf,pins = "uart2_nostreamctrlgrp";
                 sirf,function = "uart2_nostreamctrl";
         };
 };
```

For a specific board, if it wants to use uart2 without hardware flow control,
it can add the following to its board-specific .dts file.

```dts
uart2: uart@b0070000 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart2_noflow_pins_a>;
}
```

---

# *ST pin controller.

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for *ST pin controller..

Each multi-function pin is controlled, driven and routed through the
PIO multiplexing block. Each pin supports GPIO functionality (ALT0)
and multiple alternate functions(ALT1 - ALTx) that directly connect
the pin to different hardware blocks.

When a pin is in GPIO mode, Output Enable (OE), Open Drain(OD), and
Pull Up (PU) are driven by the related PIO block.

ST pinctrl driver controls PIO multiplexing block and also interacts with
gpio driver to configure a pin.

GPIO bank can have one of the two possible types of interrupt-wirings.

First type is via irqmux, single interrupt is used by multiple gpio banks. This
reduces number of overall interrupts numbers required. All these banks belong to

## a single pincontroller.

```text
		 |	   |----> [gpio-bank (n)    ]
		 |	   |----> [gpio-bank (n + 1)]
	[irqN]-- | irq-mux |----> [gpio-bank (n + 2)]
		 |	   |----> [gpio-bank (...  )]
		 |_________|----> [gpio-bank (n + 7)]
```

Second type has a dedicated interrupt per gpio bank.

```text
	[irqN]----> [gpio-bank (n)]
```

## Pin controller node:

Required properties:

- compatible	: should be "st,stih407-&lt;pio-block&gt;-pinctrl"
- st,syscfg		: Should be a phandle of the syscfg node.
- st,retime-pin-mask	: Should be mask to specify which pins can be retimed.
  If the property is not present, it is assumed that all the pins in the
  bank are capable of retiming. Retiming is mainly used to improve the
  IO timing margins of external synchronous interfaces.
- ranges : defines mapping between pin controller node (parent) to gpio-bank
  node (children).

## Optional properties:

- interrupts	: Interrupt number of the irqmux. If the interrupt is shared
  with other gpio banks via irqmux.
  a irqline and gpio banks.
- reg		: irqmux memory resource. If irqmux is present.
- reg-names	: irqmux resource should be named as "irqmux".

GPIO controller/bank node.
Required properties:

```text
- gpio-controller : Indicates this device is a GPIO controller
- #gpio-cells	  : Must be two.
     - First cell: specifies the pin number inside the controller
     - Second cell: specifies whether the pin is logically inverted.
       - 0 = active high
       - 1 = active low
- st,bank-name	  : Should be a name string for this bank as specified in
  datasheet.
```

## Optional properties:

- interrupts	: Interrupt number for this gpio bank. If there is a dedicated
  interrupt wired up for this gpio bank.

- interrupt-controller : Indicates this device is a interrupt controller. GPIO
  bank can be an interrupt controller iff one of the interrupt type either via
  irqmux or a dedicated interrupt per bank is specified.

```text
- #interrupt-cells: the value of this property should be 2.
     - First Cell: represents the external gpio interrupt number local to the
       gpio interrupt space of the controller.
     - Second Cell: flags to identify the type of the interrupt
       - 1 = rising edge triggered
       - 2 = falling edge triggered
       - 3 = rising and falling edge triggered
       - 4 = high level triggered
       - 8 = low level triggered
for related macros look in:
include/dt-bindings/interrupt-controller/irq.h
```

## Example:

```dts
	pin-controller-sbc {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "st,stih407-sbc-pinctrl";
		st,syscfg = <&syscfg_sbc>;
		reg = <0x0961f080 0x4>;
		reg-names = "irqmux";
		interrupts = <GIC_SPI 188 IRQ_TYPE_NONE>;
		interrupt-names = "irqmux";
		ranges = <0 0x09610000 0x6000>;

		pio0: gpio@9610000 {
			gpio-controller;
			#gpio-cells = <2>;
			interrupt-controller;
			#interrupt-cells = <2>;
			reg = <0x0 0x100>;
			st,bank-name = "PIO0";
		};
		...
		pin-functions nodes follow...
	};
```

## Contents of function subnode node:

Required properties for pin configuration node:

- st,pins	: Child node with list of pins with configuration.

Below is the format of how each pin conf should look like.

&lt;bank offset mux mode rt\_type rt\_delay rt\_clk&gt;

Every PIO is represented with 4-7 parameters depending on retime configuration.
Each parameter is explained as below.

```text
-bank		: Should be bank phandle to which this PIO belongs.
-offset		: Offset in the PIO bank.
-mux		: Should be alternate function number associated this pin.
```

```text
		Use same numbers from datasheet.
```

-mode		:pin configuration is selected from one of the below values.

```text
		IN
		IN_PU
		OUT
		BIDIR
		BIDIR_PU
```

-rt\_type	Retiming Configuration for the pin.

```text
		Possible retime configuration are:
```

```text
		-------		-------------
		value		args
		-------		-------------
		NICLK		<delay> <clk>
		ICLK_IO		<delay> <clk>
		BYPASS		<delay>
		DE_IO		<delay> <clk>
		SE_ICLK_IO	<delay> <clk>
		SE_NICLK_IO	<delay> <clk>
```

- delay	is retime delay in pico seconds as mentioned in data sheet.

- rt\_clk	:clk to be use for retime.
  Possible values are:
  CLK\_A
  CLK\_B
  CLK\_C
  CLK\_D

Example of mmcclk pin which is a bi-direction pull pu with retime config
as non inverted clock retimed with CLK\_B and delay of 0 pico seconds:

```dts
pin-controller {
	...
	mmc0 {
		pinctrl_mmc: mmc {
			st,pins {
				mmcclk = <&PIO13 4 ALT4 BIDIR_PU NICLK 0 CLK_B>;
				...
			};
		};
	...
	};
};
```

```dts
sdhci0:sdhci@fe810000{
	...
	interrupt-parent = <&pio3>;
	#interrupt-cells = <2>;
	interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; /* Interrupt line via PIO3-3 */
	interrupt-names = "card-detect";
	pinctrl-names = "default";
	pinctrl-0	= <&pinctrl_mmc>;
};
```

---

# VIA VT8500 and Wondermedia WM8xxx-series pinmux/gpio controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for VIA VT8500 and Wondermedia WM8xxx-series pinmux/gpio controller.

These SoCs contain a combined Pinmux/GPIO module. Each pin may operate as
either a GPIO in, GPIO out or as an alternate function (I2C, SPI etc).

## Required properties:

- compatible: "via,vt8500-pinctrl", "wm,wm8505-pinctrl", "wm,wm8650-pinctrl",
  "wm8750-pinctrl" or "wm,wm8850-pinctrl"
- reg: Should contain the physical address of the module's registers.
- interrupt-controller: Marks the device node as an interrupt controller.
- #interrupt-cells: Should be two.
- gpio-controller: Marks the device node as a GPIO controller.
- #gpio-cells : Should be two. The first cell is the pin number and the
  second cell is used to specify optional parameters.
  bit 0 - active low

Please refer to [../gpio/gpio.txt](</kernel/hardware/devicetree/bindings-gpio/gpio.md>) for a general description of GPIO bindings.

Please refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) in this directory for details of the
common pinctrl bindings used by client devices, including the meaning of the
phrase "pin configuration node".

Each pin configuration node lists the pin(s) to which it applies, and one or
more of the mux functions to select on those pin(s), and pull-up/down
configuration. Each subnode only affects those parameters that are explicitly
listed. In other words, a subnode that lists only a mux function implies no
information about any pull configuration. Similarly, a subnode that lists only
a pull parameter implies no information about the mux function.

## Required subnode-properties:

- wm,pins: An array of cells. Each cell contains the ID of a pin.

## Optional subnode-properties:

- wm,function: Integer, containing the function to mux to the pin(s):
  0: GPIO in
  1: GPIO out
  2: alternate

- wm,pull: Integer, representing the pull-down/up to apply to the pin(s):
  0: none
  1: down
  2: up

Each of wm,function and wm,pull may contain either a single value which
will be applied to all pins in wm,pins, or one value for each entry in
wm,pins.

## Example:

```dts
	pinctrl: pinctrl {
		compatible = "wm,wm8505-pinctrl";
		reg = <0xD8110000 0x10000>;
		interrupt-controller;
		#interrupt-cells = <2>;
		gpio-controller;
		#gpio-cells = <2>;
	};
```

---

# ST Microelectronics, SPEAr pinmux controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for ST Microelectronics, SPEAr pinmux controller.

## Required properties:

```text
- compatible	: "st,spear300-pinmux"
		: "st,spear310-pinmux"
		: "st,spear320-pinmux"
		: "st,spear1310-pinmux"
		: "st,spear1340-pinmux"
- reg		: Address range of the pinctrl registers
- st,pinmux-mode: Mandatory for SPEAr300 and SPEAr320 and invalid for others.
	- Its values for SPEAr300:
		- NAND_MODE		: <0>
		- NOR_MODE		: <1>
		- PHOTO_FRAME_MODE	: <2>
		- LEND_IP_PHONE_MODE	: <3>
		- HEND_IP_PHONE_MODE	: <4>
		- LEND_WIFI_PHONE_MODE	: <5>
		- HEND_WIFI_PHONE_MODE	: <6>
		- ATA_PABX_WI2S_MODE	: <7>
		- ATA_PABX_I2S_MODE	: <8>
		- CAML_LCDW_MODE	: <9>
		- CAMU_LCD_MODE		: <10>
		- CAMU_WLCD_MODE	: <11>
		- CAML_LCD_MODE		: <12>
	- Its values for SPEAr320:
		- AUTO_NET_SMII_MODE	: <0>
		- AUTO_NET_MII_MODE	: <1>
		- AUTO_EXP_MODE		: <2>
		- SMALL_PRINTERS_MODE	: <3>
		- EXTENDED_MODE		: <4>
```

Please refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) in this directory for details of the common
pinctrl bindings used by client devices.

SPEAr's pinmux nodes act as a container for an arbitrary number of subnodes. Each
of these subnodes represents muxing for a pin, a group, or a list of pins or
groups.

The name of each subnode is not important; all subnodes should be enumerated
and processed purely based on their content.

## Required subnode-properties:

- st,pins : An array of strings. Each string contains the name of a pin or
  group.
- st,function: A string containing the name of the function to mux to the pin or
  group. See the SPEAr's TRM to determine which are valid for each pin or group.

```text
  Valid values for group and function names can be found from looking at the
  group and function arrays in driver files:
  drivers/pinctrl/spear/pinctrl-spear3*0.c
```

## Valid values for group names are:

For All SPEAr3xx machines:

```text
	"firda_grp", "i2c0_grp", "ssp_cs_grp", "ssp0_grp", "mii0_grp",
	"gpio0_pin0_grp", "gpio0_pin1_grp", "gpio0_pin2_grp", "gpio0_pin3_grp",
	"gpio0_pin4_grp", "gpio0_pin5_grp", "uart0_ext_grp", "uart0_grp",
	"timer_0_1_grp", timer_0_1_pins, "timer_2_3_grp"
```

## For SPEAr300 machines:

```text
	"fsmc_2chips_grp", "fsmc_4chips_grp", "clcd_lcdmode_grp",
	"clcd_pfmode_grp", "tdm_grp", "i2c_clk_grp_grp", "caml_grp", "camu_grp",
	"dac_grp", "i2s_grp", "sdhci_4bit_grp", "sdhci_8bit_grp",
	"gpio1_0_to_3_grp", "gpio1_4_to_7_grp"
```

## For SPEAr310 machines:

```text
	"emi_cs_0_to_5_grp", "uart1_grp", "uart2_grp", "uart3_grp", "uart4_grp",
	"uart5_grp", "fsmc_grp", "rs485_0_grp", "rs485_1_grp", "tdm_grp"
```

## For SPEAr320 machines:

```text
	"clcd_grp", "emi_grp", "fsmc_8bit_grp", "fsmc_16bit_grp", "spp_grp",
	"sdhci_led_grp", "sdhci_cd_12_grp", "sdhci_cd_51_grp", "i2s_grp",
	"uart1_grp", "uart1_modem_2_to_7_grp", "uart1_modem_31_to_36_grp",
	"uart1_modem_34_to_45_grp", "uart1_modem_80_to_85_grp", "uart2_grp",
	"uart3_8_9_grp", "uart3_15_16_grp", "uart3_41_42_grp",
	"uart3_52_53_grp", "uart3_73_74_grp", "uart3_94_95_grp",
	"uart3_98_99_grp", "uart4_6_7_grp", "uart4_13_14_grp",
	"uart4_39_40_grp", "uart4_71_72_grp", "uart4_92_93_grp",
	"uart4_100_101_grp", "uart5_4_5_grp", "uart5_37_38_grp",
	"uart5_69_70_grp", "uart5_90_91_grp", "uart6_2_3_grp",
	"uart6_88_89_grp", "rs485_grp", "touchscreen_grp", "can0_grp",
	"can1_grp", "pwm0_1_pin_8_9_grp", "pwm0_1_pin_14_15_grp",
	"pwm0_1_pin_30_31_grp", "pwm0_1_pin_37_38_grp", "pwm0_1_pin_42_43_grp",
	"pwm0_1_pin_59_60_grp", "pwm0_1_pin_88_89_grp", "pwm2_pin_7_grp",
	"pwm2_pin_13_grp", "pwm2_pin_29_grp", "pwm2_pin_34_grp",
	"pwm2_pin_41_grp", "pwm2_pin_58_grp", "pwm2_pin_87_grp",
	"pwm3_pin_6_grp", "pwm3_pin_12_grp", "pwm3_pin_28_grp",
	"pwm3_pin_40_grp", "pwm3_pin_57_grp", "pwm3_pin_86_grp",
	"ssp1_17_20_grp", "ssp1_36_39_grp", "ssp1_48_51_grp", "ssp1_65_68_grp",
	"ssp1_94_97_grp", "ssp2_13_16_grp", "ssp2_32_35_grp", "ssp2_44_47_grp",
	"ssp2_61_64_grp", "ssp2_90_93_grp", "mii2_grp", "smii0_1_grp",
	"rmii0_1_grp", "i2c1_8_9_grp", "i2c1_98_99_grp", "i2c2_0_1_grp",
	"i2c2_2_3_grp", "i2c2_19_20_grp", "i2c2_75_76_grp", "i2c2_96_97_grp"
```

## For SPEAr1310 machines:

```text
	"i2c0_grp", "ssp0_grp", "ssp0_cs0_grp", "ssp0_cs1_2_grp", "i2s0_grp",
	"i2s1_grp", "clcd_grp", "clcd_high_res_grp", "arm_gpio_grp",
	"smi_2_chips_grp", "smi_4_chips_grp", "gmii_grp", "rgmii_grp",
	"smii_0_1_2_grp", "ras_mii_txclk_grp", "nand_8bit_grp",
	"nand_16bit_grp", "nand_4_chips_grp", "keyboard_6x6_grp",
	"keyboard_rowcol6_8_grp", "uart0_grp", "uart0_modem_grp",
	"gpt0_tmr0_grp", "gpt0_tmr1_grp", "gpt1_tmr0_grp", "gpt1_tmr1_grp",
	"sdhci_grp", "cf_grp", "xd_grp", "touch_xy_grp",
	"uart1_disable_i2c_grp", "uart1_disable_sd_grp", "uart2_3_grp",
	"uart4_grp", "uart5_grp", "rs485_0_1_tdm_0_1_grp", "i2c_1_2_grp",
	"i2c3_dis_smi_clcd_grp", "i2c3_dis_sd_i2s0_grp", "i2c_4_5_dis_smi_grp",
	"i2c4_dis_sd_grp", "i2c5_dis_sd_grp", "i2c_6_7_dis_kbd_grp",
	"i2c6_dis_sd_grp", "i2c7_dis_sd_grp", "can0_dis_nor_grp",
	"can0_dis_sd_grp", "can1_dis_sd_grp", "can1_dis_kbd_grp", "pcie0_grp",
	"pcie1_grp", "pcie2_grp", "sata0_grp", "sata1_grp", "sata2_grp",
	"ssp1_dis_kbd_grp", "ssp1_dis_sd_grp", "gpt64_grp"
```

## For SPEAr1340 machines:

```text
	"pads_as_gpio_grp", "fsmc_8bit_grp", "fsmc_16bit_grp", "fsmc_pnor_grp",
	"keyboard_row_col_grp", "keyboard_col5_grp", "spdif_in_grp",
	"spdif_out_grp", "gpt_0_1_grp", "pwm0_grp", "pwm1_grp", "pwm2_grp",
	"pwm3_grp", "vip_mux_grp", "vip_mux_cam0_grp", "vip_mux_cam1_grp",
	"vip_mux_cam2_grp", "vip_mux_cam3_grp", "cam0_grp", "cam1_grp",
	"cam2_grp", "cam3_grp", "smi_grp", "ssp0_grp", "ssp0_cs1_grp",
	"ssp0_cs2_grp", "ssp0_cs3_grp", "uart0_grp", "uart0_enh_grp",
	"uart1_grp", "i2s_in_grp", "i2s_out_grp", "gmii_grp", "rgmii_grp",
	"rmii_grp", "sgmii_grp", "i2c0_grp", "i2c1_grp", "cec0_grp", "cec1_grp",
	"sdhci_grp", "cf_grp", "xd_grp", "clcd_grp", "arm_trace_grp",
	"miphy_dbg_grp", "pcie_grp", "sata_grp"
```

## Valid values for function names are:

For All SPEAr3xx machines:

```text
	"firda", "i2c0", "ssp_cs", "ssp0", "mii0", "gpio0", "uart0_ext",
	"uart0", "timer_0_1", "timer_2_3"
```

## For SPEAr300 machines:

```text
	"fsmc", "clcd", "tdm", "i2c1", "cam", "dac", "i2s", "sdhci", "gpio1"
```

## For SPEAr310 machines:

```text
	"emi", "uart1", "uart2", "uart3", "uart4", "uart5", "fsmc", "rs485_0",
	"rs485_1", "tdm"
```

## For SPEAr320 machines:

```text
	"clcd", "emi", "fsmc", "spp", "sdhci", "i2s", "uart1", "uart1_modem",
	"uart2", "uart3", "uart4", "uart5", "uart6", "rs485", "touchscreen",
	"can0", "can1", "pwm0_1", "pwm2", "pwm3", "ssp1", "ssp2", "mii2",
	"mii0_1", "i2c1", "i2c2"
```

## For SPEAr1310 machines:

```text
	"i2c0", "ssp0", "i2s0", "i2s1", "clcd", "arm_gpio", "smi", "gmii",
	"rgmii", "smii_0_1_2", "ras_mii_txclk", "nand", "keyboard", "uart0",
	"gpt0", "gpt1", "sdhci", "cf", "xd", "touchscreen", "uart1", "uart2_3",
	"uart4", "uart5", "rs485_0_1_tdm_0_1", "i2c_1_2", "i2c3_i2s1",
	"i2c_4_5", "i2c_6_7", "can0", "can1", "pci", "sata", "ssp1", "gpt64"
```

## For SPEAr1340 machines:

```text
	"pads_as_gpio", "fsmc", "keyboard", "spdif_in", "spdif_out", "gpt_0_1",
	"pwm", "vip", "cam0", "cam1", "cam2", "cam3", "smi", "ssp0", "uart0",
	"uart1", "i2s", "gmac", "i2c0", "i2c1", "cec0", "cec1", "sdhci", "cf",
	"xd", "clcd", "arm_trace", "miphy_dbg", "pcie", "sata"
```

---

# ST Ericsson abx500 pinmux controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for ST Ericsson abx500 pinmux controller.

## Required properties:

- compatible: "stericsson,ab8500-gpio",  "stericsson,ab8540-gpio",
  "stericsson,ab8505-gpio", "stericsson,ab9540-gpio",

Please refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) in this directory for details of the
common pinctrl bindings used by client devices, including the meaning of the
phrase "pin configuration node".

ST Ericsson's pin configuration nodes use the generic pin multiplexing
and pin configuration bindings, see [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)

## Example board file extract:

```dts
&pinctrl_abx500 {
	pinctrl-names = "default";
	pinctrl-0 = <&sysclkreq2_default_mode>, <&sysclkreq3_default_mode>, <&gpio3_default_mode>, <&sysclkreq6_default_mode>, <&pwmout1_default_mode>, <&pwmout2_default_mode>, <&pwmout3_default_mode>, <&adi1_default_mode>, <&dmic12_default_mode>, <&dmic34_default_mode>, <&dmic56_default_mode>, <&sysclkreq5_default_mode>, <&batremn_default_mode>, <&service_default_mode>, <&pwrctrl0_default_mode>, <&pwrctrl1_default_mode>, <&pwmextvibra1_default_mode>, <&pwmextvibra2_default_mode>, <&gpio51_default_mode>, <&gpio52_default_mode>, <&gpio53_default_mode>, <&gpio54_default_mode>, <&pdmclkdat_default_mode>;

	sysclkreq2 {
		sysclkreq2_default_mode: sysclkreq2_default {
			default_mux {
				function = "sysclkreq";
				groups = "sysclkreq2_d_1";
			};
			default_cfg {
				pins = "GPIO1";
				bias-disable;
			};
		};
	};
	sysclkreq3 {
		sysclkreq3_default_mode: sysclkreq3_default {
			default_mux {
				function = "sysclkreq";
				groups = "sysclkreq3_d_1";
			};
			default_cfg {
				pins = "GPIO2";
				output-low;
			};
		};
	};
	gpio3 {
		gpio3_default_mode: gpio3_default {
			default_mux {
				function = "gpio";
				groups = "gpio3_a_1";
			};
			default_cfg {
				pins = "GPIO3";
				output-low;
			};
		};
	};
	sysclkreq6 {
		sysclkreq6_default_mode: sysclkreq6_default {
			default_mux {
				function = "sysclkreq";
				groups = "sysclkreq6_d_1";
			};
			default_cfg {
				pins = "GPIO4";
				bias-disable;
			};
		};
	};
	pwmout1 {
		pwmout1_default_mode: pwmout1_default {
			default_mux {
				function = "pwmout";
				groups = "pwmout1_d_1";
			};
			default_cfg {
				pins = "GPIO14";
				output-low;
			};
		};
	};
	pwmout2 {
		pwmout2_default_mode: pwmout2_default {
			pwmout2_default_mux {
				function = "pwmout";
				groups = "pwmout2_d_1";
			};
			pwmout2_default_cfg {
				pins = "GPIO15";
				output-low;
			};
		};
	};
	pwmout3 {
		pwmout3_default_mode: pwmout3_default {
			pwmout3_default_mux {
				function = "pwmout";
				groups = "pwmout3_d_1";
			};
			pwmout3_default_cfg {
				pins = "GPIO16";
				output-low;
			};
		};
	};
	adi1 {

		adi1_default_mode: adi1_default {
			adi1_default_mux {
				function = "adi1";
				groups = "adi1_d_1";
			};
			adi1_default_cfg1 {
				pins = "GPIO17","GPIO19","GPIO20";
				bias-disable;
			};
			adi1_default_cfg2 {
				pins = "GPIO18";
				output-low;
			};
		};
	};
	dmic12 {
		dmic12_default_mode: dmic12_default {
			dmic12_default_mux {
				function = "dmic";
				groups = "dmic12_d_1";
			};
			dmic12_default_cfg1 {
				pins = "GPIO27";
				output-low;
			};
			dmic12_default_cfg2 {
				pins = "GPIO28";
				bias-disable;
			};
		};
	};
	dmic34 {
		dmic34_default_mode: dmic34_default {
			dmic34_default_mux {
				function = "dmic";
				groups = "dmic34_d_1";
			};
			dmic34_default_cfg1 {
				pins = "GPIO29";
				output-low;
			};
			dmic34_default_cfg2 {
				pins = "GPIO30";
				bias-disable;{

			};
		};
	};
	dmic56 {
		dmic56_default_mode: dmic56_default {
			dmic56_default_mux {
				function = "dmic";
				groups = "dmic56_d_1";
			};
			dmic56_default_cfg1 {
				pins = "GPIO31";
				output-low;
			};
			dmic56_default_cfg2 {
				pins = "GPIO32";
				bias-disable;
			};
		};
	};
	sysclkreq5 {
		sysclkreq5_default_mode: sysclkreq5_default {
			sysclkreq5_default_mux {
				function = "sysclkreq";
				groups = "sysclkreq5_d_1";
			};
			sysclkreq5_default_cfg {
				pins = "GPIO42";
				output-low;
			};
		};
	};
	batremn {
		batremn_default_mode: batremn_default {
			batremn_default_mux {
				function = "batremn";
				groups = "batremn_d_1";
			};
			batremn_default_cfg {
				pins = "GPIO43";
				bias-disable;
			};
		};
	};
	service {
		service_default_mode: service_default {
			service_default_mux {
				function = "service";
				groups = "service_d_1";
			};
			service_default_cfg {
				pins = "GPIO44";
				bias-disable;
			};
		};
	};
	pwrctrl0 {
		pwrctrl0_default_mux: pwrctrl0_mux {
			pwrctrl0_default_mux {
				function = "pwrctrl";
				groups = "pwrctrl0_d_1";
			};
		};
		pwrctrl0_default_mode: pwrctrl0_default {
			pwrctrl0_default_cfg {
				pins = "GPIO45";
				bias-disable;
			};
		};
	};
	pwrctrl1 {
		pwrctrl1_default_mux: pwrctrl1_mux {
			pwrctrl1_default_mux {
				function = "pwrctrl";
				groups = "pwrctrl1_d_1";
			};
		};
		pwrctrl1_default_mode: pwrctrl1_default {
			pwrctrl1_default_cfg {
				pins = "GPIO46";
				bias-disable;
			};
		};
	};
	pwmextvibra1 {
		pwmextvibra1_default_mode: pwmextvibra1_default {
			pwmextvibra1_default_mux {
				function = "pwmextvibra";
				groups = "pwmextvibra1_d_1";
			};
			pwmextvibra1_default_cfg {
				pins = "GPIO47";
				bias-disable;
			};
		};
	};
	pwmextvibra2 {
		pwmextvibra2_default_mode: pwmextvibra2_default {
			pwmextvibra2_default_mux {
				function = "pwmextvibra";
				groups = "pwmextvibra2_d_1";
			};
			pwmextvibra1_default_cfg {
				pins = "GPIO48";
				bias-disable;
			};
		};
	};
	gpio51 {
		gpio51_default_mode: gpio51_default {
				gpio51_default_mux {
				function = "gpio";
				groups = "gpio51_a_1";
			};
			gpio51_default_cfg {
				pins = "GPIO51";
				output-low;
			};
		};
	};
	gpio52 {
		gpio52_default_mode: gpio52_default {
			gpio52_default_mux {
				function = "gpio";
				groups = "gpio52_a_1";
			};
			gpio52_default_cfg {
				pins = "GPIO52";
				bias-pull-down;
			};
		};
	};
	gpio53 {
		gpio53_default_mode: gpio53_default {
			gpio53_default_mux {
				function = "gpio";
				groups = "gpio53_a_1";
			};
			gpio53_default_cfg {
				pins = "GPIO53";
				bias-pull-down;
			};
		};
	};
	gpio54 {
		gpio54_default_mode: gpio54_default {
			gpio54_default_mux {
				function = "gpio";
				groups = "gpio54_a_1";
			};
			gpio54_default_cfg {
				pins = "GPIO54";
				output-low;
			};
		};
	};
	pdmclkdat {
		pdmclkdat_default_mode: pdmclkdat_default {
			pdmclkdat_default_mux {
				function = "pdm";
				groups = "pdmclkdat_d_1";
			};
			pdmclkdat_default_cfg {
				pins = "GPIO55", "GPIO56";
				bias-disable;
			};
		};
	};
};
```

---

# ST Ericsson Nomadik pinmux controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for ST Ericsson Nomadik pinmux controller.

## Required properties:

- compatible: "stericsson,db8500-pinctrl", "stericsson,db8540-pinctrl",
  "stericsson,stn8815-pinctrl"
- nomadik-gpio-chips: array of phandles to the corresponding GPIO chips
  (these have the register ranges used by the pin controller).
- prcm: phandle to the PRCMU managing the back end of this pin controller

Please refer to [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) in this directory for details of the
common pinctrl bindings used by client devices, including the meaning of the
phrase "pin configuration node".

ST Ericsson's pin configuration nodes act as a container for an arbitrary number of
subnodes. Each of these subnodes represents some desired configuration for a
pin, a group, or a list of pins or groups. This configuration can include the
mux function to select on those pin(s)/group(s), and various pin configuration
parameters, such as input, output, pull up, pull down...

The name of each subnode is not important; all subnodes should be enumerated
and processed purely based on their content. The subnodes use the generic
pin multiplexing node layout from the standard pin control bindings
(see [pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)):

## Required pin multiplexing subnode properties:

- function: A string containing the name of the function to mux to the
  pin or group.
- groups : An array of strings. Each string contains the name of a pin
  group that will be combined with the function to form a multiplexing
  set-up.

## Required pin configuration subnode properties:

- pins: A string array describing the pins affected by the configuration
  in the node.
- ste,config: Handle of pin configuration node
  (e.g. ste,config = &lt;&amp;slpm\_in\_wkup\_pdis&gt;)

- ste,input : &lt;0/1/2&gt;
  0: input with no pull
  1: input with pull up,
  2: input with pull down,

- ste,output: &lt;0/1/2&gt;
  0: output low,
  1: output high,
  2: output (value is not specified).

- ste,sleep: &lt;0/1&gt;
  0: sleep mode disable,
  1: sleep mode enable.

- ste,sleep-input: &lt;0/1/2/3&gt;
  0: sleep input with no pull,
  1: sleep input with pull up,
  2: sleep input with pull down.
  3: sleep input and keep last input configuration (no pull, pull up or pull down).

- ste,sleep-output: &lt;0/1/2&gt;
  0: sleep output low,
  1: sleep output high,
  2: sleep output (value is not specified).

- ste,sleep-gpio: &lt;0/1&gt;
  0: disable sleep gpio mode,
  1: enable sleep gpio mode.

- ste,sleep-wakeup: &lt;0/1&gt;
  0: wake-up detection enabled,
  1: wake-up detection disabled.

- ste,sleep-pull-disable: &lt;0/1&gt;
  0: GPIO pull-up or pull-down resistor is enabled, when pin is an input,
  1: GPIO pull-up and pull-down resistor are disabled.

## Example board file extract:

```dts
	pinctrl@80157000 {
		compatible = "stericsson,db8500-pinctrl";
		nomadik-gpio-chips = <&gpio0>, <&gpio1>, <&gpio2>, <&gpio3>;
		prcm = <&prcmu>;

		pinctrl-names = "default";

		slpm_in_wkup_pdis: slpm_in_wkup_pdis {
			ste,sleep = <1>;
			ste,sleep-input = <3>;
			ste,sleep-wakeup = <1>;
			ste,sleep-pull-disable = <0>;
		};

		slpm_out_hi_wkup_pdis: slpm_out_hi_wkup_pdis {
			ste,sleep = <1>;
			ste,sleep-output = <1>;
			ste,sleep-wakeup = <1>;
			ste,sleep-pull-disable = <0>;
		};

		slpm_out_wkup_pdis: slpm_out_wkup_pdis {
			ste,sleep = <1>;
			ste,sleep-output = <2>;
			ste,sleep-wakeup = <1>;
			ste,sleep-pull-disable = <0>;
		};

		uart0 {
			uart0_default_mux: uart0_mux {
				u0_default_mux {
					function = "u0";
					pins = "u0_a_1";
				};
			};
			uart0_default_mode: uart0_default {
				uart0_default_cfg1 {
					pins = "GPIO0", "GPIO2";
					ste,input = <1>;
				};

				uart0_default_cfg2 {
					pins = "GPIO1", "GPIO3";
					ste,output = <1>;
				};
			};
			uart0_sleep_mode: uart0_sleep {
				uart0_sleep_cfg1 {
					pins = "GPIO0", "GPIO2";
					ste,config = <&slpm_in_wkup_pdis>;
				};
				uart0_sleep_cfg2 {
					pins = "GPIO1";
					ste,config = <&slpm_out_hi_wkup_pdis>;
				};
				uart0_sleep_cfg3 {
					pins = "GPIO3";
					ste,config = <&slpm_out_wkup_pdis>;
				};
			};
		};
	};
```

```dts
	uart@80120000 {
		compatible = "arm,pl011", "arm,primecell";
		reg = <0x80120000 0x1000>;
		interrupts = <0 11 0x4>;

		pinctrl-names = "default","sleep";
		pinctrl-0 = <&uart0_default_mux>, <&uart0_default_mode>;
		pinctrl-1 = <&uart0_sleep_mode>;
	};
```

---

# Pin configuration for TI DA850/OMAP-L138/AM18x

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Pin configuration for TI DA850/OMAP-L138/AM18x.

These SoCs have a separate controller for setting bias (internal pullup/down).
Bias can only be selected for groups rather than individual pins.

## Required Properties:

- compatible: Must be "ti,da850-pupd"
- reg: Base address and length of the memory resource used by the pullup/down
  controller hardware module.

The controller node also acts as a container for pin group configuration nodes.
The names of these groups are ignored.

## Pin Group Node Properties:

- groups: An array of strings, each string containing the name of a pin group.
  Valid names are "cp0".."cp31".

The pin configuration parameters use the generic pinconf bindings defined in
[pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>) in this directory. The supported parameters are
bias-disable, bias-pull-up, bias-pull-down.

## Example

## In common dtsi file:

```dts
	pinconf: pin-controller@22c00c {
		compatible = "ti,da850-pupd";
		reg = <0x22c00c 0x8>;
	};
```

## In board-specific file:

```dts
	&pinconf {
		pinctrl-0 = <&pinconf_bias_groups>;
		pinctrl-names = "default";

		pinconf_bias_groups: bias-groups {
			pull-up {
				groups = "cp30", "cp31";
				bias-pull-up;
			};
			pull-down {
				groups = "cp29", "cp28";
				bias-pull-down;
			};
			disable {
				groups = "cp27", "cp26";
				bias-disable;
			};
		};
	};
```

---

# Pin configuration for TI IODELAY controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pinctrl_

> Device-tree binding reference for Pin configuration for TI IODELAY controller.

TI dra7 based SoCs such as am57xx have a controller for setting the IO delay
for each pin. For most part the IO delay values are programmed by the bootloader,
but some pins need to be configured dynamically by the kernel such as the
MMC pins.

## Required Properties:

- compatible: Must be "ti,dra7-iodelay"
- reg: Base address and length of the memory resource used
- #address-cells: Number of address cells
- #size-cells: Size of cells
- #pinctrl-cells: Number of pinctrl cells, must be 2. See also
  [Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)

## Example

## In the SoC specific dtsi file:

```dts
	dra7_iodelay_core: padconf@4844a000 {
		compatible = "ti,dra7-iodelay";
		reg = <0x4844a000 0x0d1c>;
		#address-cells = <1>;
		#size-cells = <0>;
		#pinctrl-cells = <2>;
	};
```

## In board-specific file:

```dts
&dra7_iodelay_core {
	mmc2_iodelay_3v3_conf: mmc2_iodelay_3v3_conf {
		pinctrl-pin-array = <
		0x18c A_DELAY_PS(0) G_DELAY_PS(120)	/* CFG_GPMC_A19_IN */
		0x1a4 A_DELAY_PS(265) G_DELAY_PS(360)	/* CFG_GPMC_A20_IN */
		0x1b0 A_DELAY_PS(0) G_DELAY_PS(120)	/* CFG_GPMC_A21_IN */
		0x1bc A_DELAY_PS(0) G_DELAY_PS(120)	/* CFG_GPMC_A22_IN */
		0x1c8 A_DELAY_PS(287) G_DELAY_PS(420)	/* CFG_GPMC_A23_IN */
		0x1d4 A_DELAY_PS(144) G_DELAY_PS(240)	/* CFG_GPMC_A24_IN */
		0x1e0 A_DELAY_PS(0) G_DELAY_PS(0)	/* CFG_GPMC_A25_IN */
		0x1ec A_DELAY_PS(120) G_DELAY_PS(0)	/* CFG_GPMC_A26_IN */
		0x1f8 A_DELAY_PS(120) G_DELAY_PS(180)	/* CFG_GPMC_A27_IN */
		0x360 A_DELAY_PS(0) G_DELAY_PS(0)	/* CFG_GPMC_CS1_IN */
		>;
	};
};
```

---

# Amlogic Meson Power Controller (deprecated)

_Peios Kernel / Hardware and drivers / Device tree / bindings/power_

> Device-tree binding reference for Amlogic Meson Power Controller (deprecated).

The Amlogic Meson SoCs embeds an internal Power domain controller.

## VPU Power Domain

The Video Processing Unit power domain is controlled by this power controller,
but the domain requires some external resources to meet the correct power
sequences.
The bindings must respect the power domain bindings as described in the file
[power-domain.yaml](</kernel/hardware/devicetree-bindings/dt-power/power-domain.md>)

## Device Tree Bindings:

## Required properties:

```text
- compatible: should be one of the following :
	- "amlogic,meson-gx-pwrc-vpu" for the Meson GX SoCs
	- "amlogic,meson-g12a-pwrc-vpu" for the Meson G12A SoCs
- #power-domain-cells: should be 0
- amlogic,hhi-sysctrl: phandle to the HHI sysctrl node
- resets: phandles to the reset lines needed for this power demain sequence
	as described in ../reset/reset.txt
- clocks: from common clock binding: handle to VPU and VAPB clocks
- clock-names: from common clock binding: must contain "vpu", "vapb"
	corresponding to entry in the clocks property.
```

## Parent node should have the following properties :

- compatible: "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"
- reg: base address and size of the AO system control register space.

## Example:

```dts
ao_sysctrl: sys-ctrl@0 {
	compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
	reg =  <0x0 0x0 0x0 0x100>;

	pwrc_vpu: power-controller-vpu {
		compatible = "amlogic,meson-gx-pwrc-vpu";
		#power-domain-cells = <0>;
		amlogic,hhi-sysctrl = <&sysctrl>;
		resets = <&reset RESET_VIU>,
			 <&reset RESET_VENC>,
			 <&reset RESET_VCBUS>,
			 <&reset RESET_BT656>,
			 <&reset RESET_DVIN_RESET>,
			 <&reset RESET_RDMA>,
			 <&reset RESET_VENCI>,
			 <&reset RESET_VENCP>,
			 <&reset RESET_VDAC>,
			 <&reset RESET_VDI6>,
			 <&reset RESET_VENCL>,
			 <&reset RESET_VID_LOCK>;
		clocks = <&clkc CLKID_VPU>,
			 <&clkc CLKID_VAPB>;
		clock-names = "vpu", "vapb";
	};
};
```

---

# Generic system power control capability

_Peios Kernel / Hardware and drivers / Device tree / bindings/power_

> Device-tree binding reference for Generic system power control capability.

Power-management integrated circuits or miscellaneous hardware components are
sometimes able to control the system power. The device driver associated with these
components might need to define this capability, which tells the kernel that
it can be used to switch off the system. The corresponding device must have the
standard property "system-power-controller" in its device node. This property
marks the device as able to control the system power. In order to test if this
property is found programmatically, use the helper function
"of\_device\_is\_system\_power\_controller" from of.h .

## Example:

```dts
act8846: act8846@5 {
	 compatible = "active-semi,act8846";
	 system-power-controller;
}
```

---

# Generic PM domains

_Peios Kernel / Hardware and drivers / Device tree / bindings/power_

> Device-tree binding reference for Generic PM domains.

System on chip designs are often divided into multiple PM domains that can be
used for power gating of selected IP blocks for power saving by reduced leakage
current.

This device tree binding can be used to bind PM domain consumer devices with
their PM domains provided by PM domain providers. A PM domain provider can be
represented by any node in the device tree and can provide one or more PM
domains. A consumer node can refer to the provider by a phandle and a set of
phandle arguments (so called PM domain specifiers) of length specified by the
#power-domain-cells property in the PM domain provider node.

==PM domain providers==

See [power-domain.yaml](</kernel/hardware/devicetree-bindings/dt-power/power-domain.md>).

==PM domain consumers==

## Required properties:

- power-domains : A list of PM domain specifiers, as defined by bindings of
  the power controller that is the PM domain provider.

## Optional properties:

- power-domain-names : A list of power domain name strings sorted in the same
  order as the power-domains property. Consumers drivers will use
  power-domain-names to match power domains with power-domains
  specifiers.

## Example:

```dts
	leaky-device@12350000 {
		compatible = "foo,i-leak-current";
		reg = <0x12350000 0x1000>;
		power-domains = <&power 0>;
		power-domain-names = "io";
	};
```

```dts
	leaky-device@12351000 {
		compatible = "foo,i-leak-current";
		reg = <0x12351000 0x1000>;
		power-domains = <&power 0>, <&power 1> ;
		power-domain-names = "io", "clk";
	};
```

The first example above defines a typical PM domain consumer device, which is
located inside a PM domain with index 0 of a power controller represented by a
node with the label "power".
In the second example the consumer device are partitioned across two PM domains,
the first with index 0 and the second with index 1, of a power controller that
is represented by a node with the label "power".

## Optional properties:

- required-opps: This contains phandle to an OPP node in another device's OPP
  table. It may contain an array of phandles, where each phandle points to an
  OPP of a different device. It should not contain multiple phandles to the OPP
  nodes in the same OPP table. This specifies the minimum required OPP of the
  device(s), whose OPP's phandle is present in this property, for the
  functioning of the current device at the current OPP (where this property is
  present).

## Example:

- OPP table for domain provider that provides two domains.

```dts
	domain0_opp_table: opp-table0 {
		compatible = "operating-points-v2";

		domain0_opp_0: opp-1000000000 {
			opp-hz = /bits/ 64 <1000000000>;
			opp-microvolt = <975000 970000 985000>;
		};
		domain0_opp_1: opp-1100000000 {
			opp-hz = /bits/ 64 <1100000000>;
			opp-microvolt = <1000000 980000 1010000>;
		};
	};
```

```dts
	domain1_opp_table: opp-table1 {
		compatible = "operating-points-v2";

		domain1_opp_0: opp-1200000000 {
			opp-hz = /bits/ 64 <1200000000>;
			opp-microvolt = <975000 970000 985000>;
		};
		domain1_opp_1: opp-1300000000 {
			opp-hz = /bits/ 64 <1300000000>;
			opp-microvolt = <1000000 980000 1010000>;
		};
	};
```

```dts
	power: power-controller@12340000 {
		compatible = "foo,power-controller";
		reg = <0x12340000 0x1000>;
		#power-domain-cells = <1>;
		operating-points-v2 = <&domain0_opp_table>, <&domain1_opp_table>;
	};
```

```dts
	leaky-device0@12350000 {
		compatible = "foo,i-leak-current";
		reg = <0x12350000 0x1000>;
		power-domains = <&power 0>;
		required-opps = <&domain0_opp_0>;
	};
```

```dts
	leaky-device1@12350000 {
		compatible = "foo,i-leak-current";
		reg = <0x12350000 0x1000>;
		power-domains = <&power 1>;
		required-opps = <&domain1_opp_1>;
	};
```

\[1\]. [Documentation/devicetree/bindings/power/domain-idle-state.yaml](</kernel/hardware/devicetree-bindings/dt-power/domain-idle-state.md>)

---

# Texas Instruments SmartReflex binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/power_

> Device-tree binding reference for Texas Instruments SmartReflex binding.

SmartReflex is used to set and adjust the SoC operating points.

## Required properties:

## compatible: Shall be one of the following:

```text
	    "ti,omap3-smartreflex-core"
	    "ti,omap3-smartreflex-mpu-iva"
	    "ti,omap4-smartreflex-core"
	    "ti,omap4-smartreflex-mpu"
	    "ti,omap4-smartreflex-iva"
```

reg: Shall contain the device instance IO range

interrupts: Shall contain the device instance interrupt

## Optional properties:

ti,hwmods: Shall contain the TI interconnect module name if needed

```text
	   by the SoC
```

## Example:

```dts
	smartreflex_iva: smartreflex@4a0db000 {
		compatible = "ti,omap4-smartreflex-iva";
		reg = <0x4a0db000 0x80>;
		interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
		ti,hwmods = "smartreflex_iva";
	};
```

```dts
	smartreflex_core: smartreflex@4a0dd000 {
		compatible = "ti,omap4-smartreflex-core";
		reg = <0x4a0dd000 0x80>;
		interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
		ti,hwmods = "smartreflex_core";
	};
```

```dts
	smartreflex_mpu: smartreflex@4a0d9000 {
		compatible = "ti,omap4-smartreflex-mpu";
		reg = <0x4a0d9000 0x80>;
		interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
		ti,hwmods = "smartreflex_mpu";
	};
```

---

# Specifying wakeup capability for devices

_Peios Kernel / Hardware and drivers / Device tree / bindings/power_

> Device-tree binding reference for Specifying wakeup capability for devices.

## Any device nodes

Nodes that describe devices which have wakeup capability may contain a
"wakeup-source" boolean property.

If the device is marked as a wakeup-source, interrupt wake capability depends
on the device specific "interrupt-names" property. If no interrupts are labeled
as wake capable, then it is up to the device to determine which interrupts can
wake the system.

However if a device has a dedicated interrupt as the wakeup source, then it
needs to specify/identify it using a device specific interrupt name. In such
cases only that interrupt can be used as a wakeup interrupt.

While various legacy interrupt names exist, new devices should use "wakeup" as
the canonical interrupt name.

## List of legacy properties and respective binding document

1. "gpio-key,wakeup"		Documentation/devicetree/bindings/input/gpio-keys{,-polled}.txt
2. "has-tpo"			[Documentation/devicetree/bindings/rtc/rtc-opal.txt](</kernel/hardware/devicetree/bindings-rtc/rtc-opal.md>)
3. "linux,wakeup"		[Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml](</kernel/hardware/devicetree-bindings/dt-input/gpio-matrix-keypad.md>)
   [Documentation/devicetree/bindings/mfd/tc3589x.txt](</kernel/hardware/devicetree/bindings-mfd/tc3589x.md>)
   [Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml](</kernel/hardware/devicetree-bindings/dt-input/touchscreen/ti-ads7843.md>)
4. "linux,keypad-wakeup"	[Documentation/devicetree/bindings/input/qcom,pm8921-keypad.yaml](</kernel/hardware/devicetree-bindings/dt-input/qcom-pm8921-keypad.md>)
5. "linux,input-wakeup"		[Documentation/devicetree/bindings/input/samsung,s3c6410-keypad.yaml](</kernel/hardware/devicetree-bindings/dt-input/samsung-s3c6410-keypad.md>)
6. "nvidia,wakeup-source"	[Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt](</kernel/hardware/devicetree/bindings-input/nvidia-tegra20-kbc.md>)

## Examples

1. With "wakeup" interrupt name

```dts
	device@10000 {
		compatible	= "vendor,device-id";
		reg		= <0x10000 0x1000>;
		interrupts	= <0 19 4>, <0 21 4>, <0 22 4>;
		interrupt-names	= "ack", "err", "wakeup";
		wakeup-source;
	};
```

2. Without "wakeup" interrupt name

```dts
	embedded-controller {
		compatible = "google,cros-ec-i2c";
		reg = <0x1e>;
		interrupts = <6 0>;
		interrupt-parent = <&gpx1>;
		pinctrl-names = "default";
		pinctrl-0 = <&ec_irq>;
		wakeup-source;
	};
```

3. Without interrupts

```dts
	gpio_keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;

		button@1 {
			debounce-interval = <50>;
			wakeup-source;
			linux,code = <116>;
			label = "POWER";
			gpios = <&iofpga_gpio0 0 0x4>;
		};
		[....]
	};
```

---

# Axxia Restart Driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/power/reset_

> Device-tree binding reference for Axxia Restart Driver.

This driver can do reset of the Axxia SoC. It uses the registers in the syscon
block to initiate a chip reset.

## Required Properties:

```text
  -compatible: "lsi,axm55xx-reset"
  -syscon: phandle to the syscon node.
```

## Example:

```dts
	syscon: syscon@2010030000 {
		compatible = "lsi,axxia-syscon", "syscon";
		reg = <0x20 0x10030000 0 0x2000>;
	};
```

```dts
	reset: reset@2010031000 {
		compatible = "lsi,axm55xx-reset";
		syscon = <&syscon>;
	};
```

---

# Device-Tree bindings for Cortina Systems Gemini Poweroff

_Peios Kernel / Hardware and drivers / Device tree / bindings/power/reset_

> Device-tree binding reference for Device-Tree bindings for Cortina Systems Gemini Poweroff.

This is a special IP block in the Cortina Gemini SoC that only
deals with different ways to power the system down.

## Required properties:

- compatible: should be "cortina,gemini-power-controller"
- reg: should contain the physical memory base and size
- interrupts: should contain the power management interrupt

## Example:

```dts
power-controller@4b000000 {
	compatible = "cortina,gemini-power-controller";
	reg = <0x4b000000 0x100>;
	interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
};
```

---

# Device tree bindings for Texas Instruments keystone reset

_Peios Kernel / Hardware and drivers / Device tree / bindings/power/reset_

> Device-tree binding reference for Device tree bindings for Texas Instruments keystone reset.

This node is intended to allow SoC reset in case of software reset
of selected watchdogs.

The Keystone SoCs can contain up to 4 watchdog timers to reset
SoC. Each watchdog timer event input is connected to the Reset Mux
block. The Reset Mux block can be configured to cause reset or not.

Additionally soft or hard reset can be configured.

## Required properties:

- compatible:		ti,keystone-reset

- ti,syscon-pll:	phandle/offset pair. The phandle to syscon used to
  access pll controller registers and the offset to use
  reset control registers.

- ti,syscon-dev:	phandle/offset pair. The phandle to syscon used to
  access device state control registers and the offset
  in order to use mux block registers for all watchdogs.

## Optional properties:

- ti,soft-reset:	Boolean option indicating soft reset.
  By default hard reset is used.

- ti,wdt-list:		WDT list that can cause SoC reset. It's not related
  to WDT driver, it's just needed to enable a SoC related
  reset that's triggered by one of WDTs. The list is
  in format: &lt;0&gt;, &lt;2&gt;; It can be in random order and
  begins from 0 to 3, as keystone can contain up to 4 SoC
  reset watchdogs and can be in random order.

## Example 1:

Setup keystone reset so that in case software reset or
WDT0 is triggered it issues hard reset for SoC.

```dts
pllctrl: pll-controller@2310000 {
	compatible = "ti,keystone-pllctrl", "syscon";
	reg = <0x02310000 0x200>;
};
```

```dts
devctrl: device-state-control@2620000 {
	compatible = "ti,keystone-devctrl", "syscon";
	reg = <0x02620000 0x1000>;
};
```

```dts
rstctrl: reset-controller {
	compatible = "ti,keystone-reset";
	ti,syscon-pll = <&pllctrl 0xe4>;
	ti,syscon-dev = <&devctrl 0x328>;
	ti,wdt-list = <0>;
};
```

## Example 2:

Setup keystone reset so that in case of software reset or
WDT0 or WDT2 is triggered it issues soft reset for SoC.

```dts
rstctrl: reset-controller {
	compatible = "ti,keystone-reset";
	ti,syscon-pll = <&pllctrl 0xe4>;
	ti,syscon-dev = <&devctrl 0x328>;
	ti,wdt-list = <0>, <2>;
	ti,soft-reset;
};
```

---

# Binding for the LTC2952 PowerPath controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/power/reset_

> Device-tree binding reference for Binding for the LTC2952 PowerPath controller.

This chip is used to externally trigger a system shut down. Once the trigger has
been sent, the chip's watchdog has to be reset to gracefully shut down.
A full powerdown can be triggered via the kill signal.

## Required properties:

- compatible:		Must contain: "lltc,ltc2952"
- watchdog-gpios:	phandle + gpio-specifier for the GPIO connected to the
  chip's watchdog line
- kill-gpios:		phandle + gpio-specifier for the GPIO connected to the
  chip's kill line

## Optional properties:

- trigger-gpios:	phandle + gpio-specifier for the GPIO connected to the
  chip's trigger line. If this property is not set, the
  trigger function is ignored and the chip is kept alive
  until an explicit kill signal is received
- trigger-delay-ms	The number of milliseconds to wait after trigger line
  assertion before executing shut down procedure.
  The default is 2500ms.

## Example:

```dts
ltc2952 {
	compatible = "lltc,ltc2952";

	trigger-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
	trigger-delay-ms = <2000>;
	watchdog-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
	kill-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
};
```

---

# Microsemi Ocelot reset controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/power/reset_

> Device-tree binding reference for Microsemi Ocelot reset controller.

The DEVCPU\_GCB:CHIP\_REGS have a SOFT\_RST register that can be used to reset the
SoC core.

The reset registers are both present in the MSCC vcoreiii MIPS and
microchip Sparx5 armv8 SoC's.

## Required Properties:

- compatible: "mscc,ocelot-chip-reset", "mscc,luton-chip-reset",
  "mscc,jaguar2-chip-reset" or "microchip,sparx5-chip-reset"

## Example:

```dts
	reset@1070008 {
		compatible = "mscc,ocelot-chip-reset";
		reg = <0x1070008 0x4>;
	};
```

---

# QNAP Power Off

_Peios Kernel / Hardware and drivers / Device tree / bindings/power/reset_

> Device-tree binding reference for QNAP Power Off.

QNAP NAS devices have a microcontroller controlling the main power
supply. This microcontroller is connected to UART1 of the Kirkwood and
Orion5x SoCs. Sending the character 'A', at 19200 baud, tells the
microcontroller to turn the power off.

Synology NAS devices use a similar scheme, but a different baud rate,
9600, and a different character, '1'.

## Required Properties:

- compatible: Should be "qnap,power-off" or "synology,power-off"

- reg: Address and length of the register set for UART1
- clocks: tclk clock

---

# Restart Power Off

_Peios Kernel / Hardware and drivers / Device tree / bindings/power/reset_

> Device-tree binding reference for Restart Power Off.

Buffalo Linkstation LS-XHL and LS-CHLv2, and other devices power off
by restarting and letting u-boot keep hold of the machine until the
user presses a button.

## Required Properties:

- compatible: Should be "restart-poweroff"

---

# *Device-Tree bindings for ST SW reset functionality

_Peios Kernel / Hardware and drivers / Device tree / bindings/power/reset_

> Device-tree binding reference for *Device-Tree bindings for ST SW reset functionality.

## Required properties:

- compatible: should be "stih407-restart".
- st,syscfg: should be a phandle of the syscfg node.

## Example node:

```dts
	restart {
		compatible = "st,stih407-restart";
		st,syscfg = <&syscfg_sbc_reg>;
	};
```

---

# IBM Akebono board device tree

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/4xx_

> Device-tree binding reference for IBM Akebono board device tree.

The IBM Akebono board is a development board for the PPC476GTR SoC.

0) The root node

## Required properties:

- model : "ibm,akebono".
- compatible : "ibm,akebono" , "ibm,476gtr".

1.a) The Secure Digital Host Controller Interface (SDHCI) node

```text
  Represent the Secure Digital Host Controller Interfaces.
```

## Required properties:

- compatible : should be "ibm,476gtr-sdhci","generic-sdhci".
- reg : should contain the SDHCI registers location and length.
- interrupts : should contain the SDHCI interrupt.

1.b) The Advanced Host Controller Interface (AHCI) SATA node

```text
  Represents the advanced host controller SATA interface.
```

## Required properties:

- compatible : should be "ibm,476gtr-ahci".
- reg : should contain the AHCI registers location and length.
- interrupts : should contain the AHCI interrupt.

1.c) The FPGA node

```text
  The Akebono board stores some board information such as the revision
  number in an FPGA which is represented by this node.
```

## Required properties:

- compatible : should be "ibm,akebono-fpga".
- reg : should contain the FPGA registers location and length.

1.d) The AVR node

```text
  The Akebono board has an Atmel AVR microprocessor attached to the I2C
  bus as a power controller for the board.
```

## Required properties:

- compatible : should be "ibm,akebono-avr".
- reg : should contain the I2C bus address for the AVR.

---

# PPC4xx Clock Power Management (CPM) node

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/4xx_

> Device-tree binding reference for PPC4xx Clock Power Management (CPM) node.

## Required properties:

- compatible		: compatible list, currently only "ibm,cpm"
- dcr-access-method	: "native"
- dcr-reg		: &lt; DCR register range &gt;

## Optional properties:

```text
	- er-offset		: All 4xx SoCs with a CPM controller have
				  one of two different order for the CPM
				  registers. Some have the CPM registers
				  in the following order (ER,FR,SR). The
				  others have them in the following order
				  (SR,ER,FR). For the second case set
				  er-offset = <1>.
	- unused-units		: specifier consist of one cell. For each
				  bit in the cell, the corresponding bit
				  in CPM will be set to turn off unused
				  devices.
	- idle-doze		: specifier consist of one cell. For each
				  bit in the cell, the corresponding bit
				  in CPM will be set to turn off unused
				  devices. This is usually just CPM[CPU].
	- standby		: specifier consist of one cell. For each
				  bit in the cell, the corresponding bit
				  in CPM will be set on standby and
				  restored on resume.
	- suspend		: specifier consist of one cell. For each
				  bit in the cell, the corresponding bit
				  in CPM will be set on suspend (mem) and
				  restored on resume. Note, for standby
				  and suspend the corresponding bits can
				  be different or the same. Usually for
				  standby only class 2 and 3 units are set.
				  However, the interface does not care.
				  If they are the same, the additional
				  power saving will be seeing if support
				  is available to put the DDR in self
				  refresh mode and any additional power
				  saving techniques for the specific SoC.
```

## Example:

```dts
	CPM0: cpm {
		compatible = "ibm,cpm";
		dcr-access-method = "native";
		dcr-reg = <0x160 0x003>;
		er-offset = <0>;
		unused-units = <0x00000100>;
		idle-doze = <0x02000000>;
		standby = <0xfeff0000>;
		suspend = <0xfeff791d>;
};
```

---

# ppc476gtr High Speed Serial Assist (HSTA) node

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/4xx_

> Device-tree binding reference for ppc476gtr High Speed Serial Assist (HSTA) node.

The 476gtr SoC contains a high speed serial assist module attached
between the plb4 and plb6 system buses to provide high speed data
transfer between memory and system peripherals as well as support for
PCI message signalled interrupts.

Currently only the MSI support is used by Linux using the following
device tree entries:

## Require properties:

- compatible		: "ibm,476gtr-hsta-msi", "ibm,hsta-msi"
- reg			: register mapping for the HSTA MSI space
- interrupts		: ordered interrupt mapping for each MSI in the register
  space. The first interrupt should be associated with a
  register offset of 0x00, the second to 0x10, etc.

---

# PPC440SPe DMA/XOR (DMA Controller and XOR Accelerator)

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/4xx_

> Device-tree binding reference for PPC440SPe DMA/XOR (DMA Controller and XOR Accelerator).

Device nodes needed for operation of the ppc440spe-adma driver
are specified hereby. These are I2O/DMA, DMA and XOR nodes
for DMA engines and Memory Queue Module node. The latter is used
by ADMA driver for configuration of RAID-6 H/W capabilities of
the PPC440SPe. In addition to the nodes and properties described
below, the ranges property of PLB node must specify ranges for
DMA devices.

```text
 i) The I2O node
```

## Required properties:

- compatible		: "ibm,i2o-440spe";
- reg			: &lt;registers mapping&gt;
- dcr-reg		: &lt;DCR registers range&gt;

## Example:

```dts
	I2O: i2o@400100000 {
		compatible = "ibm,i2o-440spe";
		reg = <0x00000004 0x00100000 0x100>;
		dcr-reg = <0x060 0x020>;
	};
```

```text
 ii) The DMA node
```

## Required properties:

- compatible		: "ibm,dma-440spe";
- cell-index		: 1 cell, hardware index of the DMA engine
  (typically 0x0 and 0x1 for DMA0 and DMA1)
- reg			: &lt;registers mapping&gt;
- dcr-reg		: &lt;DCR registers range&gt;
- interrupts		: &lt;interrupt mapping for DMA0/1 interrupts sources:
  2 sources: DMAx CS FIFO Needs Service IRQ (on UIC0)
  and DMA Error IRQ (on UIC1). The latter is common
  for both DMA engines&gt;.

## Example:

```dts
	DMA0: dma0@400100100 {
		compatible = "ibm,dma-440spe";
		cell-index = <0>;
		reg = <0x00000004 0x00100100 0x100>;
		dcr-reg = <0x060 0x020>;
		interrupt-parent = <&DMA0>;
		interrupts = <0 1>;
		#interrupt-cells = <1>;
		#address-cells = <0>;
		#size-cells = <0>;
		interrupt-map = <
			0 &UIC0 0x14 4
			1 &UIC1 0x16 4>;
	};
```

```text
 iii) XOR Accelerator node
```

## Required properties:

- compatible		: "amcc,xor-accelerator";
- reg			: &lt;registers mapping&gt;
- interrupts		: &lt;interrupt mapping for XOR interrupt source&gt;

## Example:

```dts
	xor-accel@400200000 {
		compatible = "amcc,xor-accelerator";
		reg = <0x00000004 0x00200000 0x400>;
		interrupt-parent = <&UIC1>;
		interrupts = <0x1f 4>;
	};
```

```text
 iv) Memory Queue Module node
```

## Required properties:

- compatible		: "ibm,mq-440spe";
- dcr-reg		: &lt;DCR registers range&gt;

## Example:

```dts
	MQ0: mq {
		compatible = "ibm,mq-440spe";
		dcr-reg = <0x040 0x020>;
	};
```

---

# Reboot property to control system reboot on PPC4xx systems:

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/4xx_

> Device-tree binding reference for Reboot property to control system reboot on PPC4xx systems:.

By setting "reset\_type" to one of the following values, the default
software reset mechanism may be overridden. Here the possible values of
"reset\_type":

```text
      1 - PPC4xx core reset
      2 - PPC4xx chip reset
      3 - PPC4xx system reset (default)
```

## Example:

```dts
		cpu@0 {
			device_type = "cpu";
			model = "PowerPC,440SPe";
			...
			reset-type = <2>;	/* Use chip-reset */
		};
```

---

# Freescale CoreNet Coherency Fabric(CCF) Device Tree Binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for Freescale CoreNet Coherency Fabric(CCF) Device Tree Binding.

DESCRIPTION

The CoreNet coherency fabric is a fabric-oriented, connectivity infrastructure
that enables the implementation of coherent, multicore systems.

## Required properties:

- compatible: &lt;string list&gt;
  fsl,corenet1-cf - CoreNet coherency fabric version 1.
  Example chips: T4240, B4860

```text
		fsl,corenet2-cf - CoreNet coherency fabric version 2.
		Example chips: P5040, P5020, P4080, P3041, P2041
```

```text
		fsl,corenet-cf - Used to represent the common registers
		between CCF version 1 and CCF version 2.  This compatible
		is retained for compatibility reasons, as it was already
		used for both CCF version 1 chips and CCF version 2
		chips.  It should be specified after either
		"fsl,corenet1-cf" or "fsl,corenet2-cf".
```

- reg: &lt;prop-encoded-array&gt;
  A standard property. Represents the CCF registers.

- interrupts: &lt;prop-encoded-array&gt;
  Interrupt mapping for CCF error interrupt.

- fsl,ccf-num-csdids: &lt;u32&gt;
  Specifies the number of Coherency Subdomain ID Port Mapping
  Registers that are supported by the CCF.

- fsl,ccf-num-snoopids: &lt;u32&gt;
  Specifies the number of Snoop ID Port Mapping Registers that
  are supported by CCF.

## Example:

```dts
	corenet-cf@18000 {
		compatible = "fsl,corenet2-cf", "fsl,corenet-cf";
		reg = <0x18000 0x1000>;
		interrupts = <16 2 1 31>;
		fsl,ccf-num-csdids = <32>;
		fsl,ccf-num-snoopids = <32>;
	};
```

---

# Cpus bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for Cpus bindings.

---

Power Architecture CPU Binding
Copyright 2013 Freescale Semiconductor Inc.

Power Architecture CPUs in Freescale SOCs are represented in device trees as
per the definition in the Devicetree Specification.

In addition to the Devicetree Specification definitions, the properties
defined below may be present on CPU nodes.

PROPERTIES

- fsl,eref-\*
  Usage: optional
  Value type: &lt;empty&gt;
  Definition: The EREF (EREF: A Programmer.s Reference Manual for
  Freescale Power Architecture) defines the architecture for Freescale
  Power CPUs.  The EREF defines some architecture categories not defined
  by the Power ISA.  For these EREF-specific categories, the existence of
  a property named fsl,eref-\[CAT\], where \[CAT\] is the abbreviated category
  name with all uppercase letters converted to lowercase, indicates that
  the category is supported by the implementation.

- fsl,portid-mapping
  Usage: optional
  Value type: &lt;u32&gt;
  Definition: The Coherency Subdomain ID Port Mapping Registers and
  Snoop ID Port Mapping registers, which are part of the CoreNet
  Coherency fabric (CCF), provide a CoreNet Coherency Subdomain
  ID/CoreNet Snoop ID to cpu mapping functions.  Certain bits from
  these registers should be set if the corresponding CPU should be
  snooped.  This property defines a bitmask which selects the bit
  that should be set if this cpu should be snooped.

---

# Dcsr bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for Dcsr bindings.

---

Debug Control and Status Register (DCSR) Binding
Copyright 2011 Freescale Semiconductor Inc.

NOTE: The bindings described in this document are preliminary and subject
to change.  Some of the compatible strings that contain only generic names
may turn out to be inappropriate, or need additional properties to describe
the integration of the block with the rest of the chip.

---

Debug Control and Status Register Memory Map

Description

This node defines the base address and range for the
defined DCSR Memory Map. Child nodes will describe the individual
debug blocks defined within this memory space.

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,dcsr" and "simple-bus".
  The DCSR space exists in the memory-mapped bus.

- #address-cells
  Usage: required
  Value type: &lt;u32&gt;
  Definition: A standard property.  Defines the number of cells
  or representing physical addresses in child nodes.

- #size-cells
  Usage: required
  Value type: &lt;u32&gt;
  Definition: A standard property.  Defines the number of cells
  or representing the size of physical addresses in
  child nodes.

- ranges
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property. Specifies the physical address
  range of the DCSR space.

EXAMPLE

```dts
	dcsr: dcsr@f00000000 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "fsl,dcsr", "simple-bus";
		ranges = <0x00000000 0xf 0x00000000 0x01008000>;
	};
```

---

Event Processing Unit

This node represents the region of DCSR space allocated to the EPU

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,dcsr-epu"

- interrupts
  Usage: required
  Value type: &lt;prop\_encoded-array&gt;
  Definition:  Specifies the interrupts generated by the EPU.
  The value of the interrupts property consists of three
  interrupt specifiers. The format of the specifier is defined
  by the binding document describing the node's interrupt parent.

```text
	The EPU counters can be configured to assert the performance
	monitor interrupt signal based on either counter overflow or value
	match. Which counter asserted the interrupt is captured in an EPU
	Counter Interrupt Status Register (EPCPUISR).
```

```text
	The EPU unit can also be configured to assert either or both of
	two interrupt signals based on debug event sources within the SoC.
	The interrupt signals are epu_xt_int0 and epu_xt_int1.
	Which event source asserted the interrupt is captured in an EPU
	Interrupt Status Register (EPISR0,EPISR1).
```

```text
	Interrupt numbers are listed in order (perfmon, event0, event1).
```

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  Specifies the physical address
  offset and length of the DCSR space registers of the device
  configuration block.

EXAMPLE

```dts
	dcsr-epu@0 {
		compatible = "fsl,dcsr-epu";
		interrupts = <52 2 0 0
			      84 2 0 0
			      85 2 0 0>;
		interrupt-parent = <&mpic>;
		reg = <0x0 0x1000>;
	};
```

---

Nexus Port Controller

This node represents the region of DCSR space allocated to the NPC

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,dcsr-npc"

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  Specifies the physical address
  offset and length of the DCSR space registers of the device
  configuration block.
  The Nexus Port controller occupies two regions in the DCSR space
  with distinct functionality.

```text
	The first register range describes the Nexus Port Controller
	control and status registers.
```

```text
	The second register range describes the Nexus Port Controller
	internal trace buffer. The NPC trace buffer is a small memory buffer
	which stages the nexus trace data for transmission via the Aurora port
	or to a DDR based trace buffer. In some configurations the NPC trace
	buffer can be the only trace buffer used.
```

EXAMPLE

```dts
		dcsr-npc {
			compatible = "fsl,dcsr-npc";
			reg = <0x1000 0x1000 0x1000000 0x8000>;
		};
```

---

Nexus Concentrator

This node represents the region of DCSR space allocated to the NXC

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,dcsr-nxc"

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  Specifies the physical address
  offset and length of the DCSR space registers of the device
  configuration block.

EXAMPLE

```dts
		dcsr-nxc@2000 {
			compatible = "fsl,dcsr-nxc";
			reg = <0x2000 0x1000>;
		};
```

---

CoreNet Debug Controller

This node represents the region of DCSR space allocated to
the CoreNet Debug controller.

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,dcsr-corenet"

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  Specifies the physical address
  offset and length of the DCSR space registers of the device
  configuration block.
  The CoreNet Debug controller occupies two regions in the DCSR space
  with distinct functionality.

```text
	The first register range describes the CoreNet Debug Controller
	functionality to perform transaction and transaction attribute matches.
```

```text
	The second register range describes the CoreNet Debug Controller
	functionality to trigger event notifications and debug traces.
```

EXAMPLE

```dts
		dcsr-corenet {
			compatible = "fsl,dcsr-corenet";
			reg = <0x8000 0x1000 0xB0000 0x1000>;
		};
```

---

Data Path Debug controller

This node represents the region of DCSR space allocated to
the DPAA Debug Controller. This controller controls debug configuration
for the QMAN and FMAN blocks.

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include both an identifier specific to the SoC
  or Debug IP of the form "fsl,&lt;soc&gt;-dcsr-dpaa" in addition to the
  generic compatible string "fsl,dcsr-dpaa".

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  Specifies the physical address
  offset and length of the DCSR space registers of the device
  configuration block.

EXAMPLE

```dts
		dcsr-dpaa@9000 {
			compatible = "fsl,p4080-dcsr-dpaa", "fsl,dcsr-dpaa";
			reg = <0x9000 0x1000>;
		};
```

---

OCeaN Debug controller

This node represents the region of DCSR space allocated to
the OCN Debug Controller.

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include both an identifier specific to the SoC
  or Debug IP of the form "fsl,&lt;soc&gt;-dcsr-ocn" in addition to the
  generic compatible string "fsl,dcsr-ocn".

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  Specifies the physical address
  offset and length of the DCSR space registers of the device
  configuration block.

EXAMPLE

```dts
		dcsr-ocn@11000 {
			compatible = "fsl,p4080-dcsr-ocn", "fsl,dcsr-ocn";
			reg = <0x11000 0x1000>;
		};
```

---

DDR Controller Debug controller

This node represents the region of DCSR space allocated to
the OCN Debug Controller.

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,dcsr-ddr"

- dev-handle
  Usage: required
  Definition: A phandle to associate this debug node with its
  component controller.

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  Specifies the physical address
  offset and length of the DCSR space registers of the device
  configuration block.

EXAMPLE

```dts
		dcsr-ddr@12000 {
			compatible = "fsl,dcsr-ddr";
			dev-handle = <&ddr1>;
			reg = <0x12000 0x1000>;
		};
```

---

Nexus Aurora Link Controller

This node represents the region of DCSR space allocated to
the NAL Controller.

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include both an identifier specific to the SoC
  or Debug IP of the form "fsl,&lt;soc&gt;-dcsr-nal" in addition to the
  generic compatible string "fsl,dcsr-nal".

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  Specifies the physical address
  offset and length of the DCSR space registers of the device
  configuration block.

EXAMPLE

```dts
		dcsr-nal@18000 {
			compatible = "fsl,p4080-dcsr-nal", "fsl,dcsr-nal";
			reg = <0x18000 0x1000>;
		};
```

---

Run Control and Power Management

This node represents the region of DCSR space allocated to
the RCPM Debug Controller. This functionlity is limited to the
control the debug operations of the SoC and cores.

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include both an identifier specific to the SoC
  or Debug IP of the form "fsl,&lt;soc&gt;-dcsr-rcpm" in addition to the
  generic compatible string "fsl,dcsr-rcpm".

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  Specifies the physical address
  offset and length of the DCSR space registers of the device
  configuration block.

EXAMPLE

```dts
		dcsr-rcpm@22000 {
			compatible = "fsl,p4080-dcsr-rcpm", "fsl,dcsr-rcpm";
			reg = <0x22000 0x1000>;
		};
```

---

Core Service Bridge Proxy

This node represents the region of DCSR space allocated to
the Core Service Bridge Proxies.
There is one Core Service Bridge Proxy device for each CPU in the system.
This functionlity provides access to the debug operations of the CPU.

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include both an identifier specific to the cpu
  of the form "fsl,dcsr-&lt;cpu&gt;-sb-proxy" in addition to the
  generic compatible string "fsl,dcsr-cpu-sb-proxy".

- cpu-handle
  Usage: required
  Definition: A phandle to associate this debug node with its cpu.

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  Specifies the physical address
  offset and length of the DCSR space registers of the device
  configuration block.

EXAMPLE

```dts
		dcsr-cpu-sb-proxy@40000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy",
				     "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <&cpu0>;
			reg = <0x40000 0x1000>;
		};
		dcsr-cpu-sb-proxy@41000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy",
				     "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <&cpu1>;
			reg = <0x41000 0x1000>;
		};
```

---

---

# Freescale Display Interface Unit

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for Freescale Display Interface Unit.

The Freescale DIU is a LCD controller, with proper hardware, it can also
drive DVI monitors.

## Required properties:

- compatible : should be "fsl,diu" or "fsl,mpc5121-diu".
- reg : should contain at least address and length of the DIU register
  set.
- interrupts : one DIU interrupt should be described here.

## Optional properties:

- edid : verbatim EDID data block describing attached display.
  Data from the detailed timing descriptor will be used to
  program the display controller.

## Example (MPC8610HPCD):

```dts
	display@2c000 {
		compatible = "fsl,diu";
		reg = <0x2c000 100>;
		interrupts = <72 2>;
		interrupt-parent = <&mpic>;
	};
```

## Example for MPC5121:

```dts
	display@2100 {
		compatible = "fsl,mpc5121-diu";
		reg = <0x2100 0x100>;
		interrupts = <64 0x8>;
		interrupt-parent = <&ipic>;
		edid = [edid-data];
	};
```

---

# Ecm bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for Ecm bindings.

---

E500 LAW &amp; Coherency Module Device Tree Binding

## Copyright (C) 2009 Freescale Semiconductor Inc.

Local Access Window (LAW) Node

The LAW node represents the region of CCSR space where local access
windows are configured.  For ECM based devices this is the first 4k
of CCSR space that includes CCSRBAR, ALTCBAR, ALTCAR, BPTR, and some
number of local access windows as specified by fsl,num-laws.

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,ecm-law"

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  The value specifies the
  physical address offset and length of the CCSR space
  registers.

- fsl,num-laws
  Usage: required
  Value type: &lt;u32&gt;
  Definition: The value specifies the number of local access
  windows for this device.

---

E500 Coherency Module Node

The E500 LAW node represents the region of CCSR space where ECM config
and error reporting registers exist, this is the second 4k (0x1000)
of CCSR space.

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,CHIP-ecm", "fsl,ecm" where
  CHIP is the processor (mpc8572, mpc8544, etc.)

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  The value specifies the
  physical address offset and length of the CCSR space
  registers.

- interrupts
  Usage: required
  Value type: &lt;prop-encoded-array&gt;

---

---

# Interlaken lac bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for Interlaken lac bindings.

---

Freescale Interlaken Look-Aside Controller Device Bindings
Copyright 2012 Freescale Semiconductor Inc.

CONTENTS

- Interlaken Look-Aside Controller (LAC) Node
- Example LAC Node
- Interlaken Look-Aside Controller (LAC) Software Portal Node
- Interlaken Look-Aside Controller (LAC) Software Portal Child Nodes
- Example LAC SWP Node with Child Nodes

---

Interlaken Look-Aside Controller (LAC) Node

DESCRIPTION

The Interlaken is a narrow, high speed channelized chip-to-chip interface. To
facilitate interoperability between a data path device and a look-aside
co-processor, the Interlaken Look-Aside protocol is defined for short
transaction-related transfers. Although based on the Interlaken protocol,
Interlaken Look-Aside is not directly compatible with Interlaken and can be
considered a different operation mode.

The Interlaken LA controller connects internal platform to Interlaken serial
interface. It accepts LA command through software portals, which are system
memory mapped 4KB spaces. The LA commands are then translated into the
Interlaken control words and data words, which are sent on TX side to TCAM
through SerDes lanes.

There are two 4KiB spaces defined within the LAC global register memory map.
There is a full register set at 0x0000-0x0FFF (also known as the "hypervisor"
version), and a subset at 0x1000-0x1FFF.  The former is a superset of the
latter, and includes certain registers that should not be accessible to
partitioned software.  Separate nodes are used for each region, with a phandle
linking the hypervisor node to the normal operating node.

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,interlaken-lac". This represents only
  those LAC CCSR registers not protected in partitioned
  software. The version of the device is determined by the LAC
  IP Block Revision Register (IPBRR0) at offset 0x0BF8.

```text
		Table of correspondences between IPBRR0 values and example
		chips:
			Value		Device
			-----------	-------
			0x02000100	T4240
```

```text
		The Hypervisor node has a different compatible. It must include
		"fsl,interlaken-lac-hv". This node represents the protected
		LAC register space and is required except inside a partition
		where access to the hypervisor node is to be denied.
```

- fsl,non-hv-node
  Usage: required in "fsl,interlaken-lac-hv"
  Value type: &lt;phandle&gt;
  Definition: Points to the non-protected LAC CCSR mapped register space
  node.

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property. The first resource represents the
  Interlaken LAC configuration registers.

- interrupts:
  Usage: required in non-hv node only
  Value type: &lt;prop-encoded-array&gt;
  Definition: Interrupt mapping for Interlaken LAC error IRQ.

EXAMPLE

```dts
	lac: lac@229000 {
		compatible = "fsl,interlaken-lac"
		reg = <0x229000 0x1000>;
		interrupts = <16 2 1 18>;
	};
```

```dts
	lac-hv@228000 {
		compatible = "fsl,interlaken-lac-hv"
		reg = <0x228000 0x1000>;
		fsl,non-hv-node = <&lac>;
	};
```

---

Interlaken Look-Aside Controller (LAC) Software Portal Container Node

DESCRIPTION
The Interlaken Look-Aside Controller (LAC) utilizes Software Portals to accept
Interlaken Look-Aside (ILA) commands. The Interlaken LAC software portal
memory map occupies 128KB of memory space. The software portal memory space is
intended to be cache-enabled. WIMG for each software space is required to be
0010 if stashing is enabled; otherwise, WIMG can be 0000 or 0010.

PROPERTIES

- #address-cells
  Usage: required
  Value type: &lt;u32&gt;
  Definition: A standard property. Must have a value of 1.

- #size-cells
  Usage: required
  Value type: &lt;u32&gt;
  Definition: A standard property. Must have a value of 1.

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,interlaken-lac-portals"

- ranges
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property. Specifies the address and length
  of the LAC portal memory space.

---

Interlaken Look-Aside Controller (LAC) Software Portals Child Nodes

DESCRIPTION
There are up to 24 available software portals with each software portal
requiring 4KB of consecutive memory within the software portal memory mapped
space.

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,interlaken-lac-portal-vX.Y" where X is
  the Major version (IP\_MJ) found in the LAC IP Block Revision
  Register (IPBRR0), at offset 0x0BF8, and Y is the Minor version
  (IP\_MN).

## Table of correspondences between version values and example chips:

```text
		    Value	Device
		    ------	-------
		      1.0	T4240
```

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  The first resource represents the
  Interlaken LAC software portal registers.

- fsl,liodn
  Value type: &lt;u32&gt;
  Definition: The logical I/O device number (LIODN) for this device.  The
  LIODN is a number expressed by this device and used to perform
  look-ups in the IOMMU (PAMU) address table when performing
  DMAs. This property is automatically added by u-boot.

---

EXAMPLE

```dts
lac-portals {
	#address-cells = <0x1>;
	#size-cells = <0x1>;
	compatible = "fsl,interlaken-lac-portals";
	ranges = <0x0 0xf 0xf4400000 0x20000>;

	lportal0: lac-portal@0 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x204>;
		reg = <0x0 0x1000>;
	};

	lportal1: lac-portal@1000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x205>;
		reg = <0x1000 0x1000>;
	};

	lportal2: lac-portal@2000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x206>;
		reg = <0x2000 0x1000>;
	};

	lportal3: lac-portal@3000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x207>;
		reg = <0x3000 0x1000>;
	};

	lportal4: lac-portal@4000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x208>;
		reg = <0x4000 0x1000>;
	};

	lportal5: lac-portal@5000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x209>;
		reg = <0x5000 0x1000>;
	};

	lportal6: lac-portal@6000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x20A>;
		reg = <0x6000 0x1000>;
	};

	lportal7: lac-portal@7000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x20B>;
		reg = <0x7000 0x1000>;
	};

	lportal8: lac-portal@8000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x20C>;
		reg = <0x8000 0x1000>;
	};

	lportal9: lac-portal@9000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x20D>;
		reg = <0x9000 0x1000>;
	};

	lportal10: lac-portal@a000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x20E>;
		reg = <0xA000 0x1000>;
	};

	lportal11: lac-portal@b000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x20F>;
		reg = <0xB000 0x1000>;
	};

	lportal12: lac-portal@c000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x210>;
		reg = <0xC000 0x1000>;
	};

	lportal13: lac-portal@d000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x211>;
		reg = <0xD000 0x1000>;
	};

	lportal14: lac-portal@e000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x212>;
		reg = <0xE000 0x1000>;
	};

	lportal15: lac-portal@f000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x213>;
		reg = <0xF000 0x1000>;
	};

	lportal16: lac-portal@10000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x214>;
		reg = <0x10000 0x1000>;
	};

	lportal17: lac-portal@11000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x215>;
		reg = <0x11000 0x1000>;
	};

	lportal8: lac-portal@1200 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x216>;
		reg = <0x12000 0x1000>;
	};

	lportal19: lac-portal@13000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x217>;
		reg = <0x13000 0x1000>;
	};

	lportal20: lac-portal@14000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x218>;
		reg = <0x14000 0x1000>;
	};

	lportal21: lac-portal@15000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x219>;
		reg = <0x15000 0x1000>;
	};

	lportal22: lac-portal@16000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x21A>;
		reg = <0x16000 0x1000>;
	};

	lportal23: lac-portal@17000 {
		compatible = "fsl,interlaken-lac-portal-v1.0";
		fsl,liodn = <0x21B>;
		reg = <0x17000 0x1000>;
	};
};
```

---

# Chipselect/Local Bus

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for Chipselect/Local Bus.

## Properties:

- name : Should be localbus
- #address-cells : Should be either two or three.  The first cell is the
  chipselect number, and the remaining cells are the
  offset into the chipselect.
- #size-cells : Either one or two, depending on how large each chipselect
  can be.
- ranges : Each range corresponds to a single chipselect, and cover
  the entire access window as configured.

## Example:

```dts
	localbus@f0010100 {
		compatible = "fsl,mpc8272-localbus",
			   "fsl,pq2-localbus";
		#address-cells = <2>;
		#size-cells = <1>;
		reg = <0xf0010100 0x40>;

		ranges = <0x0 0x0 0xfe000000 0x02000000
			  0x1 0x0 0xf4500000 0x00008000
			  0x2 0x0 0xfd810000 0x00010000>;

		flash@0,0 {
			compatible = "jedec-flash";
			reg = <0x0 0x0 0x2000000>;
			bank-width = <4>;
			device-width = <1>;
		};

		board-control@1,0 {
			reg = <0x1 0x0 0x20>;
			compatible = "fsl,mpc8272ads-bcsr";
		};

		simple-periph@2,0 {
			compatible = "fsl,elbc-gpcm-uio";
			reg = <0x2 0x0 0x10000>;
			elbc-gpcm-br = <0xfd810800>;
			elbc-gpcm-or = <0xffff09f7>;
		};
	};
```

---

# Mcm bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for Mcm bindings.

---

MPX LAW &amp; Coherency Module Device Tree Binding

## Copyright (C) 2009 Freescale Semiconductor Inc.

Local Access Window (LAW) Node

The LAW node represents the region of CCSR space where local access
windows are configured.  For MCM based devices this is the first 4k
of CCSR space that includes CCSRBAR, ALTCBAR, ALTCAR, BPTR, and some
number of local access windows as specified by fsl,num-laws.

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,mcm-law"

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  The value specifies the
  physical address offset and length of the CCSR space
  registers.

- fsl,num-laws
  Usage: required
  Value type: &lt;u32&gt;
  Definition: The value specifies the number of local access
  windows for this device.

---

MPX Coherency Module Node

The MPX LAW node represents the region of CCSR space where MCM config
and error reporting registers exist, this is the second 4k (0x1000)
of CCSR space.

PROPERTIES

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,CHIP-mcm", "fsl,mcm" where
  CHIP is the processor (mpc8641, mpc8610, etc.)

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  The value specifies the
  physical address offset and length of the CCSR space
  registers.

- interrupts
  Usage: required
  Value type: &lt;prop-encoded-array&gt;

---

---

# MPC5121 PSC Device Tree Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for MPC5121 PSC Device Tree Bindings.

## PSC in UART mode

For PSC in UART mode the needed PSC serial devices
are specified by fsl,mpc5121-psc-uart nodes in the
fsl,mpc5121-immr SoC node. Additionally the PSC FIFO
Controller node fsl,mpc5121-psc-fifo is required there:

## fsl,mpc512x-psc-uart nodes

## Required properties :

- compatible : Should contain "fsl,&lt;soc&gt;-psc-uart" and "fsl,&lt;soc&gt;-psc"
  Supported &lt;soc&gt;s: mpc5121, mpc5125
- reg : Offset and length of the register set for the PSC device
- interrupts : &lt;a b&gt; where a is the interrupt number of the
  PSC FIFO Controller and b is a field that represents an
  encoding of the sense and level information for the interrupt.

## Recommended properties :

- fsl,rx-fifo-size : the size of the RX fifo slice (a multiple of 4)
- fsl,tx-fifo-size : the size of the TX fifo slice (a multiple of 4)

## PSC in SPI mode

Similar to the UART mode a PSC can be operated in SPI mode. The compatible used
for that is fsl,mpc5121-psc-spi. It requires a fsl,mpc5121-psc-fifo as well.
The required and recommended properties are identical to the
fsl,mpc5121-psc-uart nodes, just use spi instead of uart in the compatible
string.

## fsl,mpc512x-psc-fifo node

## Required properties :

- compatible : Should be "fsl,&lt;soc&gt;-psc-fifo"
  Supported &lt;soc&gt;s: mpc5121, mpc5125
- reg : Offset and length of the register set for the PSC
  FIFO Controller
- interrupts : &lt;a b&gt; where a is the interrupt number of the
  PSC FIFO Controller and b is a field that represents an
  encoding of the sense and level information for the interrupt.

## Recommended properties :

- clocks : specifies the clock needed to operate the fifo controller
- clock-names : name(s) for the clock(s) listed in clocks

Example for a board using PSC0 and PSC1 devices in serial mode:

```dts
serial@11000 {
	compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
	cell-index = <0>;
	reg = <0x11000 0x100>;
	interrupts = <40 0x8>;
	interrupt-parent = < &ipic >;
	fsl,rx-fifo-size = <16>;
	fsl,tx-fifo-size = <16>;
};
```

```dts
serial@11100 {
	compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
	cell-index = <1>;
	reg = <0x11100 0x100>;
	interrupts = <40 0x8>;
	interrupt-parent = < &ipic >;
	fsl,rx-fifo-size = <16>;
	fsl,tx-fifo-size = <16>;
};
```

```dts
pscfifo@11f00 {
	compatible = "fsl,mpc5121-psc-fifo";
	reg = <0x11f00 0x100>;
	interrupts = <40 0x8>;
	interrupt-parent = < &ipic >;
};
```

---

# Freescale MPC512x LocalPlus Bus FIFO (called SCLPC in the Reference Manual)

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for Freescale MPC512x LocalPlus Bus FIFO (called SCLPC in the Reference Manual).

## Required properties:

- compatible: should be "fsl,mpc512x-lpbfifo";
- reg: should contain the offset and length of SCLPC register set;
- interrupts: should contain the interrupt specifier for SCLPC; syntax of an
  interrupt client node is described in interrupt-controller/interrupts.txt;
- dmas: should contain the DMA specifier for SCLPC as described at
  dma/dma.txt and dma/mpc512x-dma.txt;
- dma-names: should be "rx-tx";

## Example:

```dts
	sclpc@10100 {
		compatible = "fsl,mpc512x-lpbfifo";
		reg = <0x10100 0x50>;
		interrupts = <7 0x8>;
		dmas = <&dma0 26>;
		dma-names = "rx-tx";
	};
```

---

# MPC5200 Device Tree Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for MPC5200 Device Tree Bindings.

(c) 2006-2009 Secret Lab Technologies Ltd
Grant Likely &lt;grant.likely@secretlab.ca&gt;

## Naming conventions

For mpc5200 on-chip devices, the format for each compatible value is
&lt;chip&gt;-&lt;device&gt;\[-&lt;mode&gt;\].  The OS should be able to match a device driver
to the device based solely on the compatible value.  If two drivers
match on the compatible list; the 'most compatible' driver should be
selected.

The split between the MPC5200 and the MPC5200B leaves a bit of a
conundrum.  How should the compatible property be set up to provide
maximum compatibility information; but still accurately describe the
chip?  For the MPC5200; the answer is easy.  Most of the SoC devices
originally appeared on the MPC5200.  Since they didn't exist anywhere
else; the 5200 compatible properties will contain only one item;
"fsl,mpc5200-&lt;device&gt;".

The 5200B is almost the same as the 5200, but not quite.  It fixes
silicon bugs and it adds a small number of enhancements.  Most of the
devices either provide exactly the same interface as on the 5200.  A few
devices have extra functions but still have a backwards compatible mode.
To express this information as completely as possible, 5200B device trees
should have two items in the compatible list:

```dts
	compatible = "fsl,mpc5200b-<device>","fsl,mpc5200-<device>";
```

It is \*strongly\* recommended that 5200B device trees follow this convention
(instead of only listing the base mpc5200 item).

ie. ethernet on mpc5200: compatible = "fsl,mpc5200-fec";

```text
    ethernet on mpc5200b: compatible = "fsl,mpc5200b-fec", "fsl,mpc5200-fec";
```

Modal devices, like PSCs, also append the configured function to the
end of the compatible field.  ie. A PSC in i2s mode would specify
"fsl,mpc5200-psc-i2s", not "fsl,mpc5200-i2s".  This convention is chosen to
avoid naming conflicts with non-psc devices providing the same
function.  For example, "fsl,mpc5200-spi" and "fsl,mpc5200-psc-spi" describe
the mpc5200 simple spi device and a PSC spi mode respectively.

At the time of writing, exact chip may be either 'fsl,mpc5200' or
'fsl,mpc5200b'.

## The soc node

This node describes the on chip SOC peripherals.  Every mpc5200 based
board will have this node, and as such there is a common naming
convention for SOC devices.

## Required properties:

```text
name			description
----			-----------
ranges			Memory range of the internal memory mapped registers.
```

```text
			Should be <0 [baseaddr] 0xc000>
```

```text
reg			Should be <[baseaddr] 0x100>
compatible		mpc5200: "fsl,mpc5200-immr"
```

```text
			mpc5200b: "fsl,mpc5200b-immr"
```

system-frequency	'fsystem' frequency in Hz; XLB, IPB, USB and PCI

```text
			clocks are derived from the fsystem clock.
```

bus-frequency		IPB bus frequency in Hz.  Clock rate

```text
			used by most of the soc devices.
```

## soc child nodes

Any on chip SOC devices available to Linux must appear as soc5200 child nodes.

Note: The tables below show the value for the mpc5200.  A mpc5200b device
tree should use the "fsl,mpc5200b-&lt;device&gt;","fsl,mpc5200-&lt;device&gt;" form.

## Required soc5200 child nodes:

```text
name				compatible		Description
----				----------		-----------
cdm@<addr>			fsl,mpc5200-cdm		Clock Distribution
interrupt-controller@<addr>	fsl,mpc5200-pic		need an interrupt
```

```text
							controller to boot
```

bestcomm@&lt;addr&gt;			fsl,mpc5200-bestcomm	Bestcomm DMA controller

```text
Recommended soc5200 child nodes; populate as needed for your board
name		compatible		Description
----		----------		-----------
timer@<addr>	fsl,mpc5200-gpt		 General purpose timers
gpio@<addr>	fsl,mpc5200-gpio	 MPC5200 simple gpio controller
gpio@<addr>	fsl,mpc5200-gpio-wkup	 MPC5200 wakeup gpio controller
rtc@<addr>	fsl,mpc5200-rtc		 Real time clock
mscan@<addr>	fsl,mpc5200-mscan	 CAN bus controller
pci@<addr>	fsl,mpc5200-pci		 PCI bridge
serial@<addr>	fsl,mpc5200-psc-uart	 PSC in serial mode
i2s@<addr>	fsl,mpc5200-psc-i2s	 PSC in i2s mode
ac97@<addr>	fsl,mpc5200-psc-ac97	 PSC in ac97 mode
spi@<addr>	fsl,mpc5200-psc-spi	 PSC in spi mode
irda@<addr>	fsl,mpc5200-psc-irda	 PSC in IrDA mode
spi@<addr>	fsl,mpc5200-spi		 MPC5200 spi device
ethernet@<addr>	fsl,mpc5200-fec		 MPC5200 ethernet device
ata@<addr>	fsl,mpc5200-ata		 IDE ATA interface
i2c@<addr>	fsl,mpc5200-i2c		 I2C controller
usb@<addr>	fsl,mpc5200-ohci,ohci-be USB controller
xlb@<addr>	fsl,mpc5200-xlb		 XLB arbitrator
```

## fsl,mpc5200-gpt nodes

On the mpc5200 and 5200b, GPT0 has a watchdog timer function.  If the board
design supports the internal wdt, then the device node for GPT0 should
include the empty property 'fsl,has-wdt'.  Note that this does not activate
the watchdog.  The timer will function as a GPT if the timer api is used, and
it will function as watchdog if the watchdog device is used.  The watchdog
mode has priority over the gpt mode, i.e. if the watchdog is activated, any
gpt api call to this timer will fail with -EBUSY.

If you add the property

```dts
	fsl,wdt-on-boot = <n>;
```

GPT0 will be marked as in-use watchdog, i.e. blocking every gpt access to it.
If n&gt;0, the watchdog is started with a timeout of n seconds.  If n=0, the
configuration of the watchdog is not touched.  This is useful in two cases:

- just mark GPT0 as watchdog, blocking gpt accesses, and configure it later;
- do not touch a configuration assigned by the boot loader which supervises
  the boot process itself.

The watchdog will respect the CONFIG\_WATCHDOG\_NOWAYOUT option.

An mpc5200-gpt can be used as a single line GPIO controller.  To do so,
add the following properties to the gpt node:

```text
	gpio-controller;
	#gpio-cells = <2>;
```

When referencing the GPIO line from another node, the first cell must always
be zero and the second cell represents the gpio flags and described in the
gpio device tree binding.

An mpc5200-gpt can be used as a single line edge sensitive interrupt
controller.  To do so, add the following properties to the gpt node:

```text
	interrupt-controller;
	#interrupt-cells = <1>;
```

When referencing the IRQ line from another node, the cell represents the
sense mode; 1 for edge rising, 2 for edge falling.

## fsl,mpc5200-psc nodes

The PSCs should include a cell-index which is the index of the PSC in
hardware.  cell-index is used to determine which shared SoC registers to
use when setting up PSC clocking.  cell-index number starts at '0'.  ie:

```text
	PSC1 has 'cell-index = <0>'
	PSC4 has 'cell-index = <3>'
```

PSC in i2s mode:  The mpc5200 and mpc5200b PSCs are not compatible when in
i2s mode.  An 'mpc5200b-psc-i2s' node cannot include 'mpc5200-psc-i2s' in the
compatible field.

## fsl,mpc5200-gpio and fsl,mpc5200-gpio-wkup nodes

Each GPIO controller node should have the empty property gpio-controller and
#gpio-cells set to 2. First cell is the GPIO number which is interpreted
according to the bit numbers in the GPIO control registers. The second cell
is for flags which is currently unused.

## fsl,mpc5200-fec nodes

The FEC node can specify one of the following properties to configure
the MII link:

- fsl,7-wire-mode - An empty property that specifies the link uses 7-wire
  mode instead of MII
- current-speed   - Specifies that the MII should be configured for a fixed
  speed.  This property should contain two cells.  The
  first cell specifies the speed in Mbps and the second
  should be '0' for half duplex and '1' for full duplex
- phy-handle      - Contains a phandle to an Ethernet PHY.

## Interrupt controller (fsl,mpc5200-pic) node

The mpc5200 pic binding splits hardware IRQ numbers into two levels.  The
split reflects the layout of the PIC hardware itself, which groups
interrupts into one of three groups; CRIT, MAIN or PERP.  Also, the
Bestcomm dma engine has its own set of interrupt sources which are
cascaded off of peripheral interrupt 0, which the driver interprets as a
fourth group, SDMA.

The interrupts property for device nodes using the mpc5200 pic consists
of three cells; &lt;L1 L2 level&gt;

```text
    L1 := [CRIT=0, MAIN=1, PERP=2, SDMA=3]
    L2 := interrupt number; directly mapped from the value in the
          "ICTL PerStat, MainStat, CritStat Encoded Register"
    level := [LEVEL_HIGH=0, EDGE_RISING=1, EDGE_FALLING=2, LEVEL_LOW=3]
```

For external IRQs, use the following interrupt property values (how to
specify external interrupts is a frequently asked question):
External interrupts:

```text
	external irq0:	interrupts = <0 0 n>;
	external irq1:	interrupts = <1 1 n>;
	external irq2:	interrupts = <1 2 n>;
	external irq3:	interrupts = <1 3 n>;
```

'n' is sense (0: level high, 1: edge rising, 2: edge falling 3: level low)

## fsl,mpc5200-mscan nodes

See file [Documentation/devicetree/bindings/powerpc/fsl/mpc5200.txt](</kernel/hardware/devicetree/bindings-powerpc-fsl/mpc5200.md>)

---

# FSL MPIC Message Registers

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for FSL MPIC Message Registers.

This binding specifies what properties must be available in the device tree
representation of the message register blocks found in some FSL MPIC
implementations.

## Required properties:

- compatible: Specifies the compatibility list for the message register
  block.  The type shall be &lt;string-list&gt; and the value shall be of the form
  "fsl,mpic-v&lt;version&gt;-msgr", where &lt;version&gt; is the version number of
  the MPIC containing the message registers.

- reg: Specifies the base physical address(s) and size(s) of the
  message register block's addressable register space.  The type shall be
  &lt;prop-encoded-array&gt;.

- interrupts: Specifies a list of interrupt-specifiers which are available
  for receiving interrupts. Interrupt-specifier consists of two cells: first
  cell is interrupt-number and second cell is level-sense. The type shall be
  &lt;prop-encoded-array&gt;.

## Optional properties:

- mpic-msgr-receive-mask: Specifies what registers in the containing block
  are allowed to receive interrupts. The value is a bit mask where a set
  bit at bit 'n' indicates that message register 'n' can receive interrupts.
  Note that "bit 'n'" is numbered from LSB for PPC hardware. The type shall
  be &lt;u32&gt;. If not present, then all of the message registers in the block
  are available.

## Aliases:

```text
    An alias should be created for every message register block.  They are not
    required, though.  However, a particular implementation of this binding
    may require aliases to be present.  Aliases are of the form
    'mpic-msgr-block<n>', where <n> is an integer specifying the block's number.
    Numbers shall start at 0.
```

## Example:

```dts
	aliases {
		mpic-msgr-block0 = &mpic_msgr_block0;
		mpic-msgr-block1 = &mpic_msgr_block1;
	};
```

```dts
	mpic_msgr_block0: mpic-msgr-block@41400 {
		compatible = "fsl,mpic-v3.1-msgr";
		reg = <0x41400 0x200>;
		// Message registers 0 and 2 in this block can receive interrupts on
		// sources 0xb0 and 0xb2, respectively.
		interrupts = <0xb0 2 0xb2 2>;
		mpic-msgr-receive-mask = <0x5>;
	};
```

```dts
	mpic_msgr_block1: mpic-msgr-block@42400 {
		compatible = "fsl,mpic-v3.1-msgr";
		reg = <0x42400 0x200>;
		// Message registers 0 and 2 in this block can receive interrupts on
		// sources 0xb4 and 0xb6, respectively.
		interrupts = <0xb4 2 0xb6 2>;
		mpic-msgr-receive-mask = <0x5>;
	};
```

---

# Freescale MPIC timers

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for Freescale MPIC timers.

## Required properties:

- compatible: "fsl,mpic-global-timer"

- reg : Contains two regions.  The first is the main timer register bank
  (GTCCRxx, GTBCRxx, GTVPRxx, GTDRxx).  The second is the timer control
  register (TCRx) for the group.

- fsl,available-ranges: use &lt;start count&gt; style section to define which
  timer interrupts can be used.  This property is optional; without this,
  all timers within the group can be used.

- interrupts: one interrupt per timer in the group, in order, starting
  with timer zero.  If timer-available-ranges is present, only the
  interrupts that correspond to available timers shall be present.

## Example:

```text
	/* Note that this requires #interrupt-cells to be 4 */
	timer0: timer@41100 {
		compatible = "fsl,mpic-global-timer";
		reg = <0x41100 0x100 0x41300 4>;
```

```text
		/* Another AMP partition is using timers 0 and 1 */
		fsl,available-ranges = <2 2>;
```

```dts
		interrupts = <2 0 3 0
		              3 0 3 0>;
	};
```

```dts
	timer1: timer@42100 {
		compatible = "fsl,mpic-global-timer";
		reg = <0x42100 0x100 0x42300 4>;
		interrupts = <4 0 3 0
		              5 0 3 0
		              6 0 3 0
		              7 0 3 0>;
	};
```

---

# Freescale Peripheral Management Access Unit (PAMU) Device Tree Binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for Freescale Peripheral Management Access Unit (PAMU) Device Tree Binding.

DESCRIPTION

The PAMU is an I/O MMU that provides device-to-memory access control and
address translation capabilities.

## Required properties:

- compatible	: &lt;string&gt;
  First entry is a version-specific string, such as
  "fsl,pamu-v1.0".  The second is "fsl,pamu".
- ranges	: &lt;prop-encoded-array&gt;
  A standard property. Utilized to describe the memory mapped
  I/O space utilized by the controller.  The size should
  be set to the total size of the register space of all
  physically present PAMU controllers.  For example, for
  PAMU v1.0, on an SOC that has five PAMU devices, the size
  is 0x5000.
- interrupts	: &lt;prop-encoded-array&gt;
  Interrupt mappings.  The first tuple is the normal PAMU
  interrupt, used for reporting access violations.  The second
  is for PAMU hardware errors, such as PAMU operation errors
  and ECC errors.
- #address-cells: &lt;u32&gt;
  A standard property.
- #size-cells	: &lt;u32&gt;
  A standard property.

## Optional properties:

- reg		: &lt;prop-encoded-array&gt;
  A standard property.   It represents the CCSR registers of
  all child PAMUs combined.  Include it to provide support
  for legacy drivers.
- fsl,portid-mapping : &lt;u32&gt;
  The Coherency Subdomain ID Port Mapping Registers and
  Snoop ID Port Mapping registers, which are part of the
  CoreNet Coherency fabric (CCF), provide a CoreNet
  Coherency Subdomain ID/CoreNet Snoop ID to pamu mapping
  functions.  Certain bits from these registers should be
  set if PAMUs should be snooped.  This property defines
  a bitmask which selects the bits that should be set if
  PAMUs should be snooped.

## Child nodes:

Each child node represents one PAMU controller.  Each SOC device that is
connected to a specific PAMU device should have a "fsl,pamu-phandle" property
that links to the corresponding specific child PAMU controller.

- reg		: &lt;prop-encoded-array&gt;
  A standard property.  Specifies the physical address and
  length (relative to the parent 'ranges' property) of this
  PAMU controller's configuration registers.  The size should
  be set to the size of this PAMU controllers's register space.
  For PAMU v1.0, this size is 0x1000.
- fsl,primary-cache-geometry
  : &lt;prop-encoded-array&gt;
  Two cells that specify the geometry of the primary PAMU
  cache.  The first is the number of cache lines, and the
  second is the number of "ways".  For direct-mapped caches,
  specify a value of 1.
- fsl,secondary-cache-geometry
  : &lt;prop-encoded-array&gt;
  Two cells that specify the geometry of the secondary PAMU
  cache.  The first is the number of cache lines, and the
  second is the number of "ways".  For direct-mapped caches,
  specify a value of 1.

## Device nodes:

Devices that have LIODNs need to specify links to the parent PAMU controller
(the actual PAMU controller that this device is connected to) and a pointer to
the LIODN register, if applicable.

- fsl,iommu-parent
  : &lt;phandle&gt;
  Phandle to the single, specific PAMU controller node to which
  this device is connect.  The PAMU topology is represented in
  the device tree to assist code that dynamically determines the
  best LIODN values to minimize PAMU cache thrashing.

- fsl,liodn-reg : &lt;prop-encoded-array&gt;
  Two cells that specify the location of the LIODN register
  for this device.  Required for devices that have a single
  LIODN.  The first cell is a phandle to a node that contains
  the registers where the LIODN is to be set.  The second is
  the offset from the first "reg" resource of the node where
  the specific LIODN register is located.

## Example:

```dts
	iommu@20000 {
		compatible = "fsl,pamu-v1.0", "fsl,pamu";
		reg = <0x20000 0x5000>;
		ranges = <0 0x20000 0x5000>;
		fsl,portid-mapping = <0xf80000>;
		#address-cells = <1>;
		#size-cells = <1>;
		interrupts = <
			24 2 0 0
			16 2 1 30>;

		pamu0: pamu@0 {
			reg = <0 0x1000>;
			fsl,primary-cache-geometry = <32 1>;
			fsl,secondary-cache-geometry = <128 2>;
		};

		pamu1: pamu@1000 {
			reg = <0x1000 0x1000>;
			fsl,primary-cache-geometry = <32 1>;
			fsl,secondary-cache-geometry = <128 2>;
		};

		pamu2: pamu@2000 {
			reg = <0x2000 0x1000>;
			fsl,primary-cache-geometry = <32 1>;
			fsl,secondary-cache-geometry = <128 2>;
		};

		pamu3: pamu@3000 {
			reg = <0x3000 0x1000>;
			fsl,primary-cache-geometry = <32 1>;
			fsl,secondary-cache-geometry = <128 2>;
		};

		pamu4: pamu@4000 {
			reg = <0x4000 0x1000>;
			fsl,primary-cache-geometry = <32 1>;
			fsl,secondary-cache-geometry = <128 2>;
		};
	};
```

```dts
	guts: global-utilities@e0000 {
		compatible = "fsl,qoriq-device-config-1.0";
		reg = <0xe0000 0xe00>;
		fsl,has-rstcr;
		#sleep-cells = <1>;
		fsl,liodn-bits = <12>;
	};
```

/include/ "qoriq-dma-0.dtsi"

```dts
	dma@100300 {
		fsl,iommu-parent = <&pamu0>;
		fsl,liodn-reg = <&guts 0x584>; /* DMA2LIODNR */
	};
```

---

# Freescale 85xx RAID Engine nodes

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for Freescale 85xx RAID Engine nodes.

RAID Engine nodes are defined to describe on-chip RAID accelerators.  Each RAID
Engine should have a separate node.

## Supported chips:

P5020, P5040

## Required properties:

- compatible:	Should contain "fsl,raideng-v1.0" as the value
  This identifies RAID Engine block. 1 in 1.0 represents
  major number whereas 0 represents minor number. The
  version matches the hardware IP version.
- reg:		offset and length of the register set for the device
- ranges:	standard ranges property specifying the translation
  between child address space and parent address space

## Example:

```text
	/* P5020 */
	raideng: raideng@320000 {
		compatible = "fsl,raideng-v1.0";
		#address-cells = <1>;
		#size-cells = <1>;
		reg	= <0x320000 0x10000>;
		ranges	= <0 0x320000 0x10000>;
	};
```

There must be a sub-node for each job queue present in RAID Engine
This node must be a sub-node of the main RAID Engine node

- compatible:	Should contain "fsl,raideng-v1.0-job-queue" as the value
  This identifies the job queue interface
- reg:		offset and length of the register set for job queue
- ranges:	standard ranges property specifying the translation
  between child address space and parent address space

## Example:

```text
	/* P5020 */
	raideng_jq0@1000 {
		compatible = "fsl,raideng-v1.0-job-queue";
		reg	   = <0x1000 0x1000>;
		ranges	   = <0x0 0x1000 0x1000>;
	};
```

There must be a sub-node for each job ring present in RAID Engine
This node must be a sub-node of job queue node

- compatible:	Must contain "fsl,raideng-v1.0-job-ring" as the value
  This identifies job ring. Should contain either
  "fsl,raideng-v1.0-hp-ring" or "fsl,raideng-v1.0-lp-ring"
  depending upon whether ring has high or low priority
- reg:		offset and length of the register set for job ring
- interrupts:	interrupt mapping for job ring IRQ

## Optional property:

- fsl,liodn:	Specifies the LIODN to be used for Job Ring. This
  property is normally set by firmware. Value
  is of 12-bits which is the LIODN number for this JR.
  This property is used by the IOMMU (PAMU) to distinguish
  transactions from this JR and than be able to do address
  translation &amp; protection accordingly.

## Example:

```text
	/* P5020 */
	raideng_jq0@1000 {
		compatible = "fsl,raideng-v1.0-job-queue";
		reg	   = <0x1000 0x1000>;
		ranges	   = <0x0 0x1000 0x1000>;
```

```dts
		raideng_jr0: jr@0 {
			compatible = "fsl,raideng-v1.0-job-ring", "fsl,raideng-v1.0-hp-ring";
			reg	   = <0x0 0x400>;
			interrupts = <139 2 0 0>;
			interrupt-parent = <&mpic>;
			fsl,liodn = <0x41>;
		};
	};
```

---

# Freescale Supplement configuration unit (SCFG)

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for Freescale Supplement configuration unit (SCFG).

SCFG is the supplemental configuration unit, that provides SoC specific
configuration and status registers for the chip. Such as getting PEX port
status.

## Required properties:

- compatible: should be "fsl,&lt;chip&gt;-scfg"
- reg: should contain base address and length of SCFG memory-mapped
  registers

## Example:

```dts
	scfg: global-utilities@fc000 {
		compatible = "fsl,t1040-scfg";
		reg = <0xfc000 0x1000>;
	};
```

---

# Freescale RapidIO message unit

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for Freescale RapidIO message unit.

## Message unit node:

For SRIO controllers that implement the message unit as part of the controller
this node is required.  For devices with RMAN this node should NOT exist.  The
node is composed of three types of sub-nodes ("fsl-srio-msg-unit",
"fsl-srio-dbell-unit" and "fsl-srio-port-write-unit").

See [srio.txt](</kernel/hardware/devicetree/bindings-powerpc-fsl/srio.md>) for more details about generic SRIO controller details.

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,srio-rmu-vX.Y", "fsl,srio-rmu".

```text
	The version X.Y should match the general SRIO controller's IP Block
	revision register's Major(X) and Minor (Y) value.
```

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  Specifies the physical address and
  length of the SRIO configuration registers for message units
  and doorbell units.

- fsl,liodn
  Usage: optional-but-recommended (for devices with PAMU)
  Value type: &lt;prop-encoded-array&gt;
  Definition: The logical I/O device number for the PAMU (IOMMU) to be
  correctly configured for SRIO accesses.  The property should
  not exist on devices that do not support PAMU.

```text
		The LIODN value is associated with all RMU transactions
		(msg-unit, doorbell, port-write).
```

Sub-Nodes for RMU:  The RMU node is composed of multiple sub-nodes that
correspond to the actual sub-controllers in the RMU.  The manual for a given
SoC will detail which and how many of these sub-controllers are implemented.

## Message Unit:

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,srio-msg-unit-vX.Y", "fsl,srio-msg-unit".

```text
	The version X.Y should match the general SRIO controller's IP Block
	revision register's Major(X) and Minor (Y) value.
```

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  Specifies the physical address and
  length of the SRIO configuration registers for message units
  and doorbell units.

- interrupts
  Usage: required
  Value type: &lt;prop\_encoded-array&gt;
  Definition:  Specifies the interrupts generated by this device.  The
  value of the interrupts property consists of one interrupt
  specifier. The format of the specifier is defined by the
  binding document describing the node's interrupt parent.

```text
		A pair of IRQs are specified in this property.  The first
		element is associated with the transmit (TX) interrupt and the
		second element is associated with the receive (RX) interrupt.
```

## Doorbell Unit:

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include:
  "fsl,srio-dbell-unit-vX.Y", "fsl,srio-dbell-unit"

```text
	The version X.Y should match the general SRIO controller's IP Block
	revision register's Major(X) and Minor (Y) value.
```

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  Specifies the physical address and
  length of the SRIO configuration registers for message units
  and doorbell units.

- interrupts
  Usage: required
  Value type: &lt;prop\_encoded-array&gt;
  Definition:  Specifies the interrupts generated by this device.  The
  value of the interrupts property consists of one interrupt
  specifier. The format of the specifier is defined by the
  binding document describing the node's interrupt parent.

```text
		A pair of IRQs are specified in this property.  The first
		element is associated with the transmit (TX) interrupt and the
		second element is associated with the receive (RX) interrupt.
```

## Port-Write Unit:

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include:
  "fsl,srio-port-write-unit-vX.Y", "fsl,srio-port-write-unit"

```text
	The version X.Y should match the general SRIO controller's IP Block
	revision register's Major(X) and Minor (Y) value.
```

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  Specifies the physical address and
  length of the SRIO configuration registers for message units
  and doorbell units.

- interrupts
  Usage: required
  Value type: &lt;prop\_encoded-array&gt;
  Definition:  Specifies the interrupts generated by this device.  The
  value of the interrupts property consists of one interrupt
  specifier. The format of the specifier is defined by the
  binding document describing the node's interrupt parent.

```text
		A single IRQ that handles port-write conditions is
		specified by this property.  (Typically shared with error).
```

```text
   Note: All other standard properties (see the Devicetree Specification)
   are allowed but are optional.
```

## Example:

```dts
	rmu: rmu@d3000 {
		compatible = "fsl,srio-rmu";
		reg = <0xd3000 0x400>;
		ranges = <0x0 0xd3000 0x400>;
		fsl,liodn = <0xc8>;

		message-unit@0 {
			compatible = "fsl,srio-msg-unit";
			reg = <0x0 0x100>;
			interrupts = <
				60 2 0 0  /* msg1_tx_irq */
				61 2 0 0>;/* msg1_rx_irq */
		};
		message-unit@100 {
			compatible = "fsl,srio-msg-unit";
			reg = <0x100 0x100>;
			interrupts = <
				62 2 0 0  /* msg2_tx_irq */
				63 2 0 0>;/* msg2_rx_irq */
		};
		doorbell-unit@400 {
			compatible = "fsl,srio-dbell-unit";
			reg = <0x400 0x80>;
			interrupts = <
				56 2 0 0  /* bell_outb_irq */
				57 2 0 0>;/* bell_inb_irq */
		};
		port-write-unit@4e0 {
			compatible = "fsl,srio-port-write-unit";
			reg = <0x4e0 0x20>;
			interrupts = <16 2 1 11>;
		};
	};
```

---

# Freescale Serial RapidIO (SRIO) Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/fsl_

> Device-tree binding reference for Freescale Serial RapidIO (SRIO) Controller.

## RapidIO port node:

Properties:

- compatible
  Usage: required
  Value type: &lt;string&gt;
  Definition: Must include "fsl,srio" for IP blocks with IP Block
  Revision Register (SRIO IPBRR1) Major ID equal to 0x01c0.

```text
	Optionally, a compatible string of "fsl,srio-vX.Y" where X is Major
	version in IP Block Revision Register and Y is Minor version.  If this
	compatible is provided it should be ordered before "fsl,srio".
```

- reg
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property.  Specifies the physical address and
  length of the SRIO configuration registers.  The size should
  be set to 0x11000.

- interrupts
  Usage: required
  Value type: &lt;prop\_encoded-array&gt;
  Definition:  Specifies the interrupts generated by this device.  The
  value of the interrupts property consists of one interrupt
  specifier. The format of the specifier is defined by the
  binding document describing the node's interrupt parent.

```text
		A single IRQ that handles error conditions is specified by this
		property.  (Typically shared with port-write).
```

- fsl,srio-rmu-handle:
  Usage: required if rmu node is defined
  Value type: &lt;phandle&gt;
  Definition: A single &lt;phandle&gt; value that points to the RMU.
  (See [srio-rmu.txt](</kernel/hardware/devicetree/bindings-powerpc-fsl/srio-rmu.md>) for more details on RMU node binding)

Port Child Nodes:  There should a port child node for each port that exists in
the controller.  The ports are numbered starting at one (1) and should have
the following properties:

- cell-index
  Usage: required
  Value type: &lt;u32&gt;
  Definition: A standard property.  Matches the port id.

- ranges
  Usage: required if local access windows preset
  Value type: &lt;prop-encoded-array&gt;
  Definition: A standard property. Utilized to describe the memory mapped
  IO space utilized by the controller.  This corresponds to the
  setting of the local access windows that are targeted to this
  SRIO port.

- fsl,liodn
  Usage: optional-but-recommended (for devices with PAMU)
  Value type: &lt;prop-encoded-array&gt;
  Definition: The logical I/O device number for the PAMU (IOMMU) to be
  correctly configured for SRIO accesses.  The property should
  not exist on devices that do not support PAMU.

```text
		For HW (ie, the P4080) that only supports a LIODN for both
		memory and maintenance transactions then a single LIODN is
		represented in the property for both transactions.
```

```text
		For HW (ie, the P304x/P5020, etc) that supports an LIODN for
		memory transactions and a unique LIODN for maintenance
		transactions then a pair of LIODNs are represented in the
		property.  Within the pair, the first element represents the
		LIODN associated with memory transactions and the second element
		represents the LIODN associated with maintenance transactions
		for the port.
```

Note: All other standard properties (see the Devicetree Specification)
are allowed but are optional.

## Example:

```dts
	rapidio: rapidio@ffe0c0000 {
		#address-cells = <2>;
		#size-cells = <2>;
		reg = <0xf 0xfe0c0000 0 0x11000>;
		compatible = "fsl,srio";
		interrupts = <16 2 1 11>; /* err_irq */
		fsl,srio-rmu-handle = <&rmu>;
		ranges;

		port1 {
			cell-index = <1>;
			#address-cells = <2>;
			#size-cells = <2>;
			fsl,liodn = <34>;
			ranges = <0 0 0xc 0x20000000 0 0x10000000>;
		};

		port2 {
			cell-index = <2>;
			#address-cells = <2>;
			#size-cells = <2>;
			fsl,liodn = <48>;
			ranges = <0 0 0xc 0x30000000 0 0x10000000>;
		};
	};
```

---

# Ibm,powerpc cpu features bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc_

> Device-tree binding reference for Ibm,powerpc cpu features bindings.

\*\*\* NOTE \*\*\*
This document is copied from OPAL firmware
(skiboot/doc/device-tree/ibm,powerpc-cpu-features/binding.txt)

There is more complete overview and documentation of features in that
source tree.  All patches and modifications should go there.
\*\*\*\*\*\*\*\*\*\*\*\*

## ibm,powerpc-cpu-features binding

This device tree binding describes CPU features available to software, with
enablement, privilege, and compatibility metadata.

More general description of design and implementation of this binding is
found in design.txt, which also points to documentation of specific features.

## /cpus/ibm,powerpc-cpu-features node binding

Node: ibm,powerpc-cpu-features

Description: Container of CPU feature nodes.

The node name must be "ibm,powerpc-cpu-features".

It is implemented as a child of the node "/cpus", but this must not be
assumed by parsers.

The node is optional but should be provided by new OPAL firmware.

## Properties:

- compatible
  Usage: required
  Value type: string
  Definition: "ibm,powerpc-cpu-features"

```text
  This compatibility refers to backwards compatibility of the overall
  design with parsers that behave according to these guidelines. This can
  be extended in a backward compatible manner which would not warrant a
  revision of the compatible property.
```

- isa
  Usage: required
  Value type: &lt;u32&gt;
  Definition:

```text
  isa that the CPU is currently running in. This provides instruction set
  compatibility, less the individual feature nodes. For example, an ISA v3.0
  implementation that lacks the "transactional-memory" cpufeature node
  should not use transactional memory facilities.
```

```text
  Value corresponds to the "Power ISA Version" multiplied by 1000.
  For example, <3000> corresponds to Version 3.0, <2070> to Version 2.07.
  The minor digit is available for revisions.
```

- display-name
  Usage: optional
  Value type: string
  Definition:

```text
  A human readable name for the CPU.
```

## /cpus/ibm,powerpc-cpu-features/example-feature node bindings

Each child node of cpu-features represents a CPU feature / capability.

Node: A string describing an architected CPU feature, e.g., "floating-point".

Description: A feature or capability supported by the CPUs.

The name of the node is a human readable string that forms the interface
used to describe features to software. Features are currently documented
in the code where they are implemented in skiboot/core/cpufeatures.c

Presence of the node indicates the feature is available.

## Properties:

- isa
  Usage: required
  Value type: &lt;u32&gt;
  Definition:

```text
  First level of the Power ISA that the feature appears in.
  Software should filter out features when constraining the
  environment to a particular ISA version.
```

```text
  Value is defined similarly to /cpus/features/isa
```

- usable-privilege
  Usage: required
  Value type: &lt;u32&gt; bit mask
  Definition:
  Bit numbers are LSB0
  bit 0 - PR (problem state / user mode)
  bit 1 - OS (privileged state)
  bit 2 - HV (hypervisor state)
  All other bits reserved and should be zero.

```text
  This property describes the privilege levels and/or software components
  that can use the feature.
```

```text
  If bit 0 is set, then the hwcap-bit-nr property will exist.
```

- hv-support
  Usage: optional
  Value type: &lt;u32&gt; bit mask
  Definition:
  Bit numbers are LSB0
  bit 0 -  HFSCR
  All other bits reserved and should be zero.

```text
  This property describes the HV privilege support required to enable the
  feature to lesser privilege levels. If the property does not exist then no
  support is required.
```

```text
  If no bits are set, the hypervisor must have explicit/custom support for
  this feature.
```

```text
  If the HFSCR bit is set, then the hfscr-bit-nr property will exist and
  the feature may be enabled by setting this bit in the HFSCR register.
```

- os-support
  Usage: optional
  Value type: &lt;u32&gt; bit mask
  Definition:
  Bit numbers are LSB0
  bit 0 -  FSCR
  All other bits reserved and should be zero.

```text
  This property describes the OS privilege support required to enable the
  feature to lesser privilege levels. If the property does not exist then no
  support is required.
```

```text
  If no bits are set, the operating system must have explicit/custom support
  for this feature.
```

```text
  If the FSCR bit is set, then the fscr-bit-nr property will exist and
  the feature may be enabled by setting this bit in the FSCR register.
```

- hfscr-bit-nr
  Usage: optional
  Value type: &lt;u32&gt;
  Definition: HFSCR bit position (LSB0)

```text
  This property exists when the hv-support property HFSCR bit is set. This
  property describes the bit number in the HFSCR register that the
  hypervisor must set in order to enable this feature.
```

```text
  This property also exists if an HFSCR bit corresponds with this feature.
  This makes CPU feature parsing slightly simpler.
```

- fscr-bit-nr
  Usage: optional
  Value type: &lt;u32&gt;
  Definition: FSCR bit position (LSB0)

```text
  This property exists when the os-support property FSCR bit is set. This
  property describes the bit number in the FSCR register that the
  operating system must set in order to enable this feature.
```

```text
  This property also exists if an FSCR bit corresponds with this feature.
  This makes CPU feature parsing slightly simpler.
```

- hwcap-bit-nr
  Usage: optional
  Value type: &lt;u32&gt;
  Definition: Linux ELF AUX vector bit position (LSB0)

```text
  This property may exist when the usable-privilege property value has PR bit set.
  This property describes the bit number that should be set in the ELF AUX
  hardware capability vectors in order to advertise this feature to userspace.
  Bits 0-31 correspond to bits 0-31 in AT_HWCAP vector. Bits 32-63 correspond
  to 0-31 in AT_HWCAP2 vector, and so on.  Missing AT_HWCAPx vectors implies
  that the feature is not enabled or can not be advertised. Operating systems
  may provide a number of unassigned hardware capability bits to allow for new
  features to be advertised.
```

```text
  Some properties representing features created before this binding are
  advertised to userspace without a one-to-one hwcap bit number may not specify
  this bit. Operating system will handle those bits specifically.  All new
  features usable by userspace will have a hwcap-bit-nr property.
```

- dependencies
  Usage: optional
  Value type: &lt;prop-encoded-array&gt;
  Definition:

```text
  If this property exists then it is a list of phandles to cpu feature
  nodes that must be enabled for this feature to be enabled.
```

## Example

```dts
	/cpus/ibm,powerpc-cpu-features {
		compatible = "ibm,powerpc-cpu-features";

		isa = <3020>;

		darn {
			isa = <3000>;
			usable-privilege = <1 | 2 | 4>;
			hwcap-bit-nr = <xx>;
		};

		scv {
			isa = <3000>;
			usable-privilege = <1 | 2>;
			os-support = <0>;
			hwcap-bit-nr = <xx>;
		};

		stop {
			isa = <3000>;
			usable-privilege = <2 | 4>;
			hv-support = <0>;
			os-support = <0>;
		};

		vsx2 (hypothetical) {
			isa = <3010>;
			usable-privilege = <1 | 2 | 4>;
			hv-support = <0>;
			os-support = <0>;
			hwcap-bit-nr = <xx>;
		};

		vsx2-newinsns {
			isa = <3020>;
			usable-privilege = <1 | 2 | 4>;
			os-support = <1>;
			fscr-bit-nr = <xx>;
			hwcap-bit-nr = <xx>;
			dependencies = <&vsx2>;
		};

	};
```

---

# IBM Powerpc Virtual Accelerator Switchboard (VAS)

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc_

> Device-tree binding reference for IBM Powerpc Virtual Accelerator Switchboard (VAS).

VAS is a hardware mechanism that allows kernel subsystems and user processes
to directly submit compression and other requests to Nest accelerators (NX)
or other coprocessors functions.

## Required properties:

- compatible : should be "ibm,vas".
- ibm,vas-id : A unique identifier for each instance of VAS in the system
- reg : Should contain 4 pairs of 64-bit fields specifying the Hypervisor
  window context start and length, OS/User window context start and length,
  "Paste address" start and length, "Paste window id" start bit and number
  of bits)

## Example:

```dts
	vas@6019100000000 {
		compatible = "ibm,vas", "ibm,power9-vas";
		reg = <0x6019100000000 0x2000000 0x6019000000000 0x100000000 0x8000000000000 0x100000000 0x20 0x10>;
		name = "vas";
		ibm,vas-id = <0x1>;
	};
```

---

# Nintendo GameCube device tree

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/nintendo_

> Device-tree binding reference for Nintendo GameCube device tree.

1) The "flipper" node

```text
  This node represents the multi-function "Flipper" chip, which packages
  many of the devices found in the Nintendo GameCube.
```

## Required properties:

- compatible : Should be "nintendo,flipper"

1.a) The Video Interface (VI) node

```text
  Represents the interface between the graphics processor and a external
  video encoder.
```

## Required properties:

- compatible : should be "nintendo,flipper-vi"
- reg : should contain the VI registers location and length
- interrupts : should contain the VI interrupt

1.b) The Processor Interface (PI) node

```text
  Represents the data and control interface between the main processor
  and graphics and audio processor.
```

## Required properties:

- compatible : should be "nintendo,flipper-pi"
- reg : should contain the PI registers location and length

1.b.i) The "Flipper" interrupt controller node

```text
  Represents the interrupt controller within the "Flipper" chip.
  The node for the "Flipper" interrupt controller must be placed under
  the PI node.
```

## Required properties:

- compatible : should be "nintendo,flipper-pic"

1.c) The Digital Signal Processor (DSP) node

```text
  Represents the digital signal processor interface, designed to offload
  audio related tasks.
```

## Required properties:

- compatible : should be "nintendo,flipper-dsp"
- reg : should contain the DSP registers location and length
- interrupts : should contain the DSP interrupt

1.c.i) The Auxiliary RAM (ARAM) node

```text
  Represents the non cpu-addressable ram designed mainly to store audio
  related information.
  The ARAM node must be placed under the DSP node.
```

## Required properties:

- compatible : should be "nintendo,flipper-aram"
- reg : should contain the ARAM start (zero-based) and length

1.d) The Disk Interface (DI) node

```text
  Represents the interface used to communicate with mass storage devices.
```

## Required properties:

- compatible : should be "nintendo,flipper-di"
- reg : should contain the DI registers location and length
- interrupts : should contain the DI interrupt

1.e) The Audio Interface (AI) node

```text
  Represents the interface to the external 16-bit stereo digital-to-analog
  converter.
```

## Required properties:

- compatible : should be "nintendo,flipper-ai"
- reg : should contain the AI registers location and length
- interrupts : should contain the AI interrupt

1.f) The Serial Interface (SI) node

```text
  Represents the interface to the four single bit serial interfaces.
  The SI is a proprietary serial interface used normally to control gamepads.
  It's NOT a RS232-type interface.
```

## Required properties:

- compatible : should be "nintendo,flipper-si"
- reg : should contain the SI registers location and length
- interrupts : should contain the SI interrupt

1.g) The External Interface (EXI) node

```text
  Represents the multi-channel SPI-like interface.
```

## Required properties:

- compatible : should be "nintendo,flipper-exi"
- reg : should contain the EXI registers location and length
- interrupts : should contain the EXI interrupt

---

# Nintendo Wii device tree

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/nintendo_

> Device-tree binding reference for Nintendo Wii device tree.

0) The root node

```text
  This node represents the Nintendo Wii video game console.
```

## Required properties:

- model : Should be "nintendo,wii"
- compatible : Should be "nintendo,wii"

1) The "hollywood" node

```text
  This node represents the multi-function "Hollywood" chip, which packages
  many of the devices found in the Nintendo Wii.
```

## Required properties:

- compatible : Should be "nintendo,hollywood"

1.a) The Video Interface (VI) node

```text
  Represents the interface between the graphics processor and a external
  video encoder.
```

## Required properties:

- compatible : should be "nintendo,hollywood-vi","nintendo,flipper-vi"
- reg : should contain the VI registers location and length
- interrupts : should contain the VI interrupt

1.b) The Processor Interface (PI) node

```text
  Represents the data and control interface between the main processor
  and graphics and audio processor.
```

## Required properties:

- compatible : should be "nintendo,hollywood-pi","nintendo,flipper-pi"
- reg : should contain the PI registers location and length

1.b.i) The "Flipper" interrupt controller node

```text
  Represents the "Flipper" interrupt controller within the "Hollywood" chip.
  The node for the "Flipper" interrupt controller must be placed under
  the PI node.
```

## Required properties:

- #interrupt-cells : &lt;1&gt;
- compatible : should be "nintendo,flipper-pic"
- interrupt-controller

1.c) The Digital Signal Processor (DSP) node

```text
  Represents the digital signal processor interface, designed to offload
  audio related tasks.
```

## Required properties:

- compatible : should be "nintendo,hollywood-dsp","nintendo,flipper-dsp"
- reg : should contain the DSP registers location and length
- interrupts : should contain the DSP interrupt

1.d) The Serial Interface (SI) node

```text
  Represents the interface to the four single bit serial interfaces.
  The SI is a proprietary serial interface used normally to control gamepads.
  It's NOT a RS232-type interface.
```

## Required properties:

- compatible : should be "nintendo,hollywood-si","nintendo,flipper-si"
- reg : should contain the SI registers location and length
- interrupts : should contain the SI interrupt

1.e) The Audio Interface (AI) node

```text
  Represents the interface to the external 16-bit stereo digital-to-analog
  converter.
```

## Required properties:

- compatible : should be "nintendo,hollywood-ai","nintendo,flipper-ai"
- reg : should contain the AI registers location and length
- interrupts : should contain the AI interrupt

1.f) The External Interface (EXI) node

```text
  Represents the multi-channel SPI-like interface.
```

## Required properties:

- compatible : should be "nintendo,hollywood-exi","nintendo,flipper-exi"
- reg : should contain the EXI registers location and length
- interrupts : should contain the EXI interrupt

1.h) The Enhanced Host Controller Interface (EHCI) node

```text
  Represents the USB 2.0 Enhanced Host Controller Interface.
```

## Required properties:

- compatible : should be "nintendo,hollywood-usb-ehci","usb-ehci"
- reg : should contain the EHCI registers location and length
- interrupts : should contain the EHCI interrupt

1.i) The Secure Digital Host Controller Interface (SDHCI) nodes

```text
  Represent the Secure Digital Host Controller Interfaces.
```

## Required properties:

- compatible : should be "nintendo,hollywood-sdhci","sdhci"
- reg : should contain the SDHCI registers location and length
- interrupts : should contain the SDHCI interrupt

1.j) The Inter-Processor Communication (IPC) node

```text
  Represent the Inter-Processor Communication interface. This interface
  enables communications between the Broadway and the Starlet processors.
```

- compatible : should be "nintendo,hollywood-ipc"
- reg : should contain the IPC registers location and length
- interrupts : should contain the IPC interrupt

1.k) The "Hollywood" interrupt controller node

```text
  Represents the "Hollywood" interrupt controller within the
  "Hollywood" chip.
```

## Required properties:

- #interrupt-cells : &lt;1&gt;
- compatible : should be "nintendo,hollywood-pic"
- reg : should contain the controller registers location and length
- interrupt-controller
- interrupts : should contain the cascade interrupt of the "flipper" pic

1.m) The control node

```text
  Represents the control interface used to setup several miscellaneous
  settings of the "Hollywood" chip like boot memory mappings, resets,
  disk interface mode, etc.
```

## Required properties:

- compatible : should be "nintendo,hollywood-control"
- reg : should contain the control registers location and length

1.n) The Disk Interface (DI) node

```text
  Represents the interface used to communicate with mass storage devices.
```

## Required properties:

- compatible : should be "nintendo,hollywood-di"
- reg : should contain the DI registers location and length
- interrupts : should contain the DI interrupt

---

# IBM OPAL Operator Panel Binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/opal_

> Device-tree binding reference for IBM OPAL Operator Panel Binding.

## Required properties:

- compatible : Should be "ibm,opal-oppanel".
- #lines     : Number of lines on the operator panel e.g. &lt;0x2&gt;.
- #length    : Number of characters per line of the operator panel e.g. &lt;0x10&gt;.

## Example:

```dts
	oppanel {
		compatible = "ibm,opal-oppanel";
		#lines = <0x2>;
		#length = <0x10>;
	};
```

---

# IBM Power-Management Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/opal_

> Device-tree binding reference for IBM Power-Management Bindings.

Linux running on baremetal POWER machines has access to the processor
idle states. The description of these idle states is exposed via the
node @power-mgt in the device-tree by the firmware.

## Definitions:

Typically each idle state has the following associated properties:

- name: The name of the idle state as defined by the firmware.

- flags: indicating some aspects of this idle states such as the
  extent of state-loss, whether timebase is stopped on this
  idle states and so on. The flag bits are as follows:

- exit-latency: The latency involved in transitioning the state of the
  CPU from idle to running.

- target-residency: The minimum time that the CPU needs to reside in
  this idle state in order to accrue power-savings
  benefit.

## Properties

The following properties provide details about the idle states. These
properties are exposed as arrays. Each entry in the property array
provides the value of that property for the idle state associated with
the array index of that entry.

If idle-states are defined, then the properties
"ibm,cpu-idle-state-names" and "ibm,cpu-idle-state-flags" are
required. The other properties are required unless mentioned
otherwise. The length of all the property arrays must be the same.

- ibm,cpu-idle-state-names:
  Array of strings containing the names of the idle states.

- ibm,cpu-idle-state-flags:
  Array of unsigned 32-bit values containing the values of the
  flags associated with the aforementioned idle-states. The
  flag bits are as follows:
  0x00000001 /\* Decrementer would stop \*/
  0x00000002 /\* Needs timebase restore \*/
  0x00001000 /\* Restore GPRs like nap \*/
  0x00002000 /\* Restore hypervisor resource from PACA pointer \*/
  0x00004000 /\* Program PORE to restore PACA pointer \*/
  0x00010000 /\* This is a nap state (POWER7,POWER8) \*/
  0x00020000 /\* This is a fast-sleep state (POWER8)\*/
  0x00040000 /\* This is a winkle state (POWER8) \*/
  0x00080000 /\* This is a fast-sleep state which requires a \*/
  /\* software workaround for restoring the \*/
  /\* timebase (POWER8) \*/
  0x00800000 /\* This state uses SPR PMICR instruction \*/
  /\* (POWER8)\*/
  0x00100000 /\* This is a fast stop state (POWER9) \*/
  0x00200000 /\* This is a deep-stop state (POWER9) \*/

- ibm,cpu-idle-state-latencies-ns:
  Array of unsigned 32-bit values containing the values of the
  exit-latencies (in ns) for the idle states in
  ibm,cpu-idle-state-names.

- ibm,cpu-idle-state-residency-ns:
  Array of unsigned 32-bit values containing the values of the
  target-residency (in ns) for the idle states in
  ibm,cpu-idle-state-names. On POWER8 this is an optional
  property. If the property is absent, the target residency for
  the "Nap", "FastSleep" are defined to 10000 and 300000000
  respectively by the kernel. On POWER9 this property is required.

- ibm,cpu-idle-state-psscr:
  Array of unsigned 64-bit values containing the values for the
  PSSCR for each of the idle states in ibm,cpu-idle-state-names.
  This property is required on POWER9 and absent on POWER8.

- ibm,cpu-idle-state-psscr-mask:
  Array of unsigned 64-bit values containing the masks
  indicating which psscr fields are set in the corresponding
  entries of ibm,cpu-idle-state-psscr. This property is
  required on POWER9 and absent on POWER8.

```text
	Whenever the firmware sets an entry in
	ibm,cpu-idle-state-psscr-mask value to 0xf, it implies that
	only the Requested Level (RL) field of the corresponding entry
	in ibm,cpu-idle-state-psscr should be considered by the
	kernel. For such idle states, the kernel would set the
	remaining fields of the psscr to the following sane-default
	values.
```

- ESL and EC bits are to 1. So wakeup from any stop
  state will be at vector 0x100.

- MTL and PSLL are set to the maximum allowed value as
  per the ISA, i.e. 15.

```text
		- The Transition Rate, TR is set to the Maximum value
                  3.
```

```text
	For all the other values of the entry in
	ibm,cpu-idle-state-psscr-mask, the kernel expects all the
	psscr fields of the corresponding entry in
	ibm,cpu-idle-state-psscr to be correctly set by the firmware.
```

- ibm,cpu-idle-state-pmicr:
  Array of unsigned 64-bit values containing the pmicr values
  for the idle states in ibm,cpu-idle-state-names. This 64-bit
  register value is to be set in pmicr for the corresponding
  state if the flag indicates that pmicr SPR should be set. This
  is an optional property on POWER8 and is absent on
  POWER9.

- ibm,cpu-idle-state-pmicr-mask:
  Array of unsigned 64-bit values containing the mask indicating
  which of the fields of the PMICR are set in the corresponding
  entries in ibm,cpu-idle-state-pmicr. This is an optional
  property on POWER8 and is absent on POWER9.

---

# IBM OPAL Sensor Groups Binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/powerpc/opal_

> Device-tree binding reference for IBM OPAL Sensor Groups Binding.

Node: /ibm,opal/sensor-groups

Description: Contains sensor groups available in the Powernv P9
servers. Each child node indicates a sensor group.

- compatible : Should be "ibm,opal-sensor-group"

## Each child node contains below properties:

- type : String to indicate the type of sensor-group

- sensor-group-id: Abstract unique identifier provided by firmware of
  type &lt;u32&gt; which is used for sensor-group
  operations like clearing the min/max history of all
  sensors belonging to the group.

- ibm,chip-id : Chip ID

- sensors : Phandle array of child nodes of /ibm,opal/sensor/
  belonging to this group

- ops : Array of opal-call numbers indicating available operations on
  sensor groups like clearing min/max, enabling/disabling sensor
  group.

---

# Broadcom Digital Timing Engine(DTE) based PTP clock

_Peios Kernel / Hardware and drivers / Device tree / bindings/ptp_

> Device-tree binding reference for Broadcom Digital Timing Engine(DTE) based PTP clock.

## Required properties:

- compatible: should contain the core compatibility string
  and the SoC compatibility string. The SoC
  compatibility string is to handle SoC specific
  hardware differences.
  Core compatibility string:
  "brcm,ptp-dte"
  SoC compatibility strings:
  "brcm,iproc-ptp-dte" - for iproc based SoC's
- reg: address and length of the DTE block's NCO registers

## Example:

```dts
ptp: ptp-dte@180af650 {
	compatible = "brcm,iproc-ptp-dte", "brcm,ptp-dte";
	reg = <0x180af650 0x10>;
};
```

---

# ZHAW InES PTP time stamping IP core

_Peios Kernel / Hardware and drivers / Device tree / bindings/ptp_

> Device-tree binding reference for ZHAW InES PTP time stamping IP core.

The IP core needs two different kinds of nodes.  The control node
lives somewhere in the memory map and specifies the address of the
control registers.  There can be up to three port handles placed as
attributes of PHY nodes.  These associate a particular MII bus with a
port index within the IP core.

## Required properties of the control node:

- compatible:		"ines,ptp-ctrl"
- reg:			physical address and size of the register bank

Required format of the port handle within the PHY node:

- timestamper:		provides control node reference and
  the port channel within the IP core

## Example:

```dts
	tstamper: timestamper@60000000 {
		compatible = "ines,ptp-ctrl";
		reg = <0x60000000 0x80>;
	};
```

```dts
	ethernet@80000000 {
		...
		mdio {
			...
			ethernet-phy@3 {
				...
				timestamper = <&tstamper 0>;
			};
		};
	};
```

---

# Time stamps from MII bus snooping devices

_Peios Kernel / Hardware and drivers / Device tree / bindings/ptp_

> Device-tree binding reference for Time stamps from MII bus snooping devices.

This binding supports non-PHY devices that snoop the MII bus and
provide time stamps.  In contrast to PHY time stamping drivers (which
can simply attach their interface directly to the PHY instance), stand
alone MII time stamping drivers use this binding to specify the
connection between the snooping device and a given network interface.

Non-PHY MII time stamping drivers typically talk to the control
interface over another bus like I2C, SPI, UART, or via a memory mapped
peripheral.  This controller device is associated with one or more
time stamping channels, each of which snoops on a MII bus.

The "timestamper" property lives in a phy node and links a time
stamping channel from the controller device to that phy's MII bus.

## Example:

```dts
	tstamper: timestamper@10000000 {
		compatible = "ines,ptp-ctrl";
		reg = <0x10000000 0x80>;
	};
```

```dts
	ethernet@20000000 {
		mdio {
			ethernet-phy@1 {
				timestamper = <&tstamper 0>;
			};
		};
	};
```

```dts
	ethernet@30000000 {
		mdio {
			ethernet-phy@2 {
				timestamper = <&tstamper 1>;
			};
		};
	};
```

In this example, time stamps from the MII bus attached to phy@1 will
appear on time stamp channel 0 (zero), and those from phy@2 appear on
channel 1.

---

# Cirris Logic CLPS711X PWM controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pwm_

> Device-tree binding reference for Cirris Logic CLPS711X PWM controller.

## Required properties:

- compatible: Shall contain "cirrus,ep7209-pwm".
- reg: Physical base address and length of the controller's registers.
- clocks: phandle + clock specifier pair of the PWM reference clock.
- #pwm-cells: Should be 1. The cell specifies the index of the channel.

## Example:

```dts
	pwm: pwm@80000400 {
		compatible = "cirrus,ep7312-pwm", "cirrus,ep7209-pwm";
		reg = <0x80000400 0x4>;
		clocks = <&clks 8>;
		#pwm-cells = <1>;
	};
```

---

# *Imagination Technologies PWM DAC driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/pwm_

> Device-tree binding reference for *Imagination Technologies PWM DAC driver.

## Required properties:

```text
  - compatible: Should be "img,pistachio-pwm"
  - reg: Should contain physical base address and length of pwm registers.
  - clocks: Must contain an entry for each entry in clock-names.
	See ../clock/clock-bindings.txt for details.
  - clock-names: Must include the following entries.
    - pwm: PWM operating clock.
    - sys: PWM system interface clock.
  - #pwm-cells: Should be 2. See pwm.yaml in this directory for the
	description of the cells format.
  - img,cr-periph: Must contain a phandle to the peripheral control
	syscon node which contains PWM control registers.
```

## Example:

```dts
	pwm: pwm@18101300 {
		compatible = "img,pistachio-pwm";
		reg = <0x18101300 0x100>;
		clocks = <&pwm_clk>, <&system_clk>;
		clock-names = "pwm", "sys";
		#pwm-cells = <2>;
		img,cr-periph = <&cr_periph>;
	};
```

---

# NXP PCA9685 16-channel 12-bit PWM LED controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pwm_

> Device-tree binding reference for NXP PCA9685 16-channel 12-bit PWM LED controller.

## Required properties:

- compatible: "nxp,pca9685-pwm"
- #pwm-cells: Should be 2. See [pwm.yaml](</kernel/hardware/devicetree-bindings/dt-pwm/pwm.md>) in this directory for a description of
  the cells format.
  The index 16 is the ALLCALL channel, that sets all PWM channels at the same
  time.

## Optional properties:

- invert (bool): boolean to enable inverted logic
- open-drain (bool): boolean to configure outputs with open-drain structure;
  if omitted use totem-pole structure

## Example:

For LEDs that are directly connected to the PCA, the following setting is
applicable:

```dts
pca: pca@41 {
	compatible = "nxp,pca9685-pwm";
	#pwm-cells = <2>;
	reg = <0x41>;
	invert;
	open-drain;
};
```

---

# Hisilicon PWM controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pwm_

> Device-tree binding reference for Hisilicon PWM controller.

## Required properties:

-compatible: should contain one SoC specific compatible string
 The SoC specific strings supported including:

```text
	"hisilicon,hi3516cv300-pwm"
	"hisilicon,hi3519v100-pwm"
	"hisilicon,hi3559v100-shub-pwm"
	"hisilicon,hi3559v100-pwm
```

- reg: physical base address and length of the controller's registers.
- clocks: phandle and clock specifier of the PWM reference clock.
- resets: phandle and reset specifier for the PWM controller reset.
- #pwm-cells: Should be 3. See [pwm.yaml](</kernel/hardware/devicetree-bindings/dt-pwm/pwm.md>) in this directory for a description of
  the cells format.

## Example:

```dts
	pwm: pwm@12130000 {
		compatible = "hisilicon,hi3516cv300-pwm";
		reg = <0x12130000 0x10000>;
		clocks = <&crg_ctrl HI3516CV300_PWM_CLK>;
		resets = <&crg_ctrl 0x38 0>;
		#pwm-cells = <3>;
	};
```

---

# TI/National Semiconductor LP3943 PWM controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/pwm_

> Device-tree binding reference for TI/National Semiconductor LP3943 PWM controller.

## Required properties:

```text
  - compatible: "ti,lp3943-pwm"
  - #pwm-cells: Should be 2. See pwm.yaml in this directory for a
                description of the cells format.
                Note that this hardware limits the period length to the
                range 6250~1600000.
  - ti,pwm0 or ti,pwm1: Output pin number(s) for PWM channel 0 or 1.
    0 = output 0
    1 = output 1
    .
    .
    15 = output 15
```

## Example:

PWM 0 is for RGB LED brightness control
PWM 1 is for brightness control of LP8557 backlight device

```dts
&i2c3 {
	lp3943@60 {
		compatible = "ti,lp3943";
		reg = <0x60>;

		/*
		 * PWM 0 : output 8, 9 and 10
		 * PWM 1 : output 15
		 */
		pwm3943: pwm {
			compatible = "ti,lp3943-pwm";
			#pwm-cells = <2>;
			ti,pwm0 = <8 9 10>;
			ti,pwm1 = <15>;
		};
	};

};
```

/\* LEDs control with PWM 0 of LP3943 \*/

```dts
pwmleds {
	compatible = "pwm-leds";
	rgb {
		label = "indi::rgb";
		pwms = <&pwm3943 0 10000>;
		max-brightness = <255>;
	};
};
```

```dts
&i2c4 {
	/* Backlight control with PWM 1 of LP3943 */
	backlight@2c {
		compatible = "ti,lp8557";
		reg = <0x2c>;

		pwms = <&pwm3943 1 10000>;
		pwm-names = "lp8557";
	};
};
```

---

# STMicroelectronics PWM driver bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/pwm_

> Device-tree binding reference for STMicroelectronics PWM driver bindings.

## Required parameters:

- compatible :		"st,pwm"
- #pwm-cells : 		Number of cells used to specify a PWM. First cell
  specifies the per-chip index of the PWM to use and the
  second cell is the period in nanoseconds - fixed to 2
  for STiH41x.
- reg :			Physical base address and length of the controller's
  registers.
- pinctrl-names: 	Set to "default".
- pinctrl-0: 		List of phandles pointing to pin configuration nodes
  for PWM module.
  For Pinctrl properties, please refer to \[1\].
- clock-names: 		Valid entries are "pwm" and/or "capture".
- clocks: 		phandle of the clock used by the PWM module.
  For Clk properties, please refer to \[2\].
- interrupts:		IRQ for the Capture device

## Optional properties:

- st,pwm-num-chan:	Number of available PWM channels.  Default is 0.
- st,capture-num-chan:	Number of available Capture channels.  Default is 0.

\[1\] [Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)
\[2\] [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

## Example:

```dts
pwm1: pwm@fe510000 {
	compatible = "st,pwm";
	reg = <0xfe510000 0x68>;
	#pwm-cells = <2>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm1_chan0_default
		     &pinctrl_pwm1_chan1_default
		     &pinctrl_pwm1_chan2_default
		     &pinctrl_pwm1_chan3_default>;
	clocks = <&clk_sysin>;
	clock-names = "pwm";
	st,pwm-num-chan = <4>;
	st,capture-num-chan = <2>;
};
```

---

# TI SOC based PWM Subsystem

_Peios Kernel / Hardware and drivers / Device tree / bindings/pwm_

> Device-tree binding reference for TI SOC based PWM Subsystem.

## Required properties:

- compatible: Must be "ti,&lt;soc&gt;-pwmss".
  for am33xx  - compatible = "ti,am33xx-pwmss";
  for am4372  - compatible = "ti,am4372-pwmss","ti,am33xx-pwmss";
  for dra746 - compatible = "ti,dra746-pwmss", "ti,am33xx-pwmss"

- reg: physical base address and size of the registers map.
- address-cells: Specify the number of u32 entries needed in child nodes.
  Should set to 1.
- size-cells: specify number of u32 entries needed to specify child nodes size
  in reg property. Should set to 1.
- ranges: describes the address mapping of a memory-mapped bus. Should set to
  physical address map of child's base address, physical address within
  parent's address  space and length of the address map. For am33xx,
  3 set of child register maps present, ECAP register space, EQEP
  register space, EHRPWM register space.

Also child nodes should also populated under PWMSS DT node.

## Example:

epwmss0: epwmss@48300000 { /\* PWMSS for am33xx \*/

```dts
	compatible = "ti,am33xx-pwmss";
	reg = <0x48300000 0x10>;
	ti,hwmods = "epwmss0";
	#address-cells = <1>;
	#size-cells = <1>;
	ranges = <0x48300100 0x48300100 0x80   /* ECAP */
		  0x48300180 0x48300180 0x80   /* EQEP */
		  0x48300200 0x48300200 0x80>; /* EHRPWM */
```

```text
	/* child nodes go here */
```

```dts
};
```

epwmss0: epwmss@48300000 { /\* PWMSS for am4372 \*/

```dts
	compatible = "ti,am4372-pwmss","ti,am33xx-pwmss"
	reg = <0x48300000 0x10>;
	ti,hwmods = "epwmss0";
	#address-cells = <1>;
	#size-cells = <1>;
	ranges = <0x48300100 0x48300100 0x80   /* ECAP */
		  0x48300180 0x48300180 0x80   /* EQEP */
		  0x48300200 0x48300200 0x80>; /* EHRPWM */
```

```text
	/* child nodes go here */
```

```dts
};
```

epwmss0: epwmss@4843e000 { /\* PWMSS for DRA7xx \*/

```dts
	compatible = "ti,dra746-pwmss", "ti,am33xx-pwmss";
	reg = <0x4843e000 0x30>;
	ti,hwmods = "epwmss0";
	#address-cells = <1>;
	#size-cells = <1>;
	ranges;
```

```text
	/* child nodes go here */
```

```dts
};
```

---

# Specifying PWM information for devices

_Peios Kernel / Hardware and drivers / Device tree / bindings/pwm_

> Device-tree binding reference for Specifying PWM information for devices.

## 1\) PWM user nodes

PWM users should specify a list of PWM devices that they want to use
with a property containing a 'pwm-list':

```text
	pwm-list ::= <single-pwm> [pwm-list]
	single-pwm ::= <pwm-phandle> <pwm-specifier>
	pwm-phandle : phandle to PWM controller node
	pwm-specifier : array of #pwm-cells specifying the given PWM
			(controller specific)
```

PWM properties should be named "pwms". The exact meaning of each pwms
property must be documented in the device tree binding for each device.
An optional property "pwm-names" may contain a list of strings to label
each of the PWM devices listed in the "pwms" property. If no "pwm-names"
property is given, the name of the user node will be used as fallback.

Drivers for devices that use more than a single PWM device can use the
"pwm-names" property to map the name of the PWM device requested by the
pwm\_get() call to an index into the list given by the "pwms" property.

The following example could be used to describe a PWM-based backlight
device:

```dts
	pwm: pwm {
		#pwm-cells = <2>;
	};
```

```text
	[...]
```

```dts
	bl: backlight {
		pwms = <&pwm 0 5000000>;
		pwm-names = "backlight";
	};
```

Note that in the example above, specifying the "pwm-names" is redundant
because the name "backlight" would be used as fallback anyway.

pwm-specifier typically encodes the chip-relative PWM number and the PWM
period in nanoseconds.

Optionally, the pwm-specifier can encode a number of flags (defined in
&lt;dt-bindings/pwm/pwm.h&gt;) in a third cell:

- PWM\_POLARITY\_INVERTED: invert the PWM signal polarity

Example with optional PWM specifier for inverse polarity

```dts
	bl: backlight {
		pwms = <&pwm 0 5000000 PWM_POLARITY_INVERTED>;
		pwm-names = "backlight";
	};
```

## 2\) PWM controller nodes

See [pwm.yaml](</kernel/hardware/devicetree-bindings/dt-pwm/pwm.md>).

---

# == ST SPEAr SoC PWM controller ==

_Peios Kernel / Hardware and drivers / Device tree / bindings/pwm_

> Device-tree binding reference for == ST SPEAr SoC PWM controller ==.

## Required properties:

```text
- compatible: should be one of:
  - "st,spear320-pwm"
  - "st,spear1340-pwm"
- reg: physical base address and length of the controller's registers
- #pwm-cells: should be 2. See pwm.yaml in this directory for a description of
  the cells format.
```

## Example:

```dts
        pwm: pwm@a8000000 {
            compatible ="st,spear320-pwm";
            reg = <0xa8000000 0x1000>;
            #pwm-cells = <2>;
        };
```

---

# == ST STMPE PWM controller ==

_Peios Kernel / Hardware and drivers / Device tree / bindings/pwm_

> Device-tree binding reference for == ST STMPE PWM controller ==.

This is a PWM block embedded in the ST Microelectronics STMPE
(ST Multi-Purpose Expander) chips. The PWM is registered as a
subdevices of the STMPE MFD device.

## Required properties:

```text
- compatible: should be:
  - "st,stmpe-pwm"
- #pwm-cells: should be 2. See pwm.yaml in this directory for a description of
  the cells format.
```

## Example:

```dts
pwm0: pwm {
	compatible = "st,stmpe-pwm";
	#pwm-cells = <2>;
};
```

---

# Devicetree binding for regmap

_Peios Kernel / Hardware and drivers / Device tree / bindings/regmap_

> Device-tree binding reference for Devicetree binding for regmap.

## Optional properties:

```text
   little-endian,
   big-endian,
   native-endian:	See common-properties.txt for a definition
```

## Note:

Regmap defaults to little-endian register access on MMIO based
devices, this is by far the most common setting. On CPU
architectures that typically run big-endian operating systems
(e.g. PowerPC), registers can be defined as big-endian and must
be marked that way in the devicetree.

On SoCs that can be operated in both big-endian and little-endian
modes, with a single hardware switch controlling both the endianness
of the CPU and a byteswap for MMIO registers (e.g. many Broadcom MIPS
chips), "native-endian" is used to allow using the same device tree
blob in both cases.

## Examples:

Scenario 1 : a register set in big-endian mode.

```dts
dev: dev@40031000 {
	      compatible = "syscon";
	      reg = <0x40031000 0x1000>;
	      big-endian;
	      ...
};
```

---

# Marvell 88PG867/88PG868 voltage regulators

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Marvell 88PG867/88PG868 voltage regulators.

## Required properties:

- compatible: one of "marvell,88pg867", "marvell,88pg868";
- reg: I2C slave address.

Optional subnodes for regulators: "buck1", "buck2", using common regulator
bindings given in &lt;[Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>)&gt;.

## Example:

```dts
	pg868@19 {
		compatible = "marvell,88pg868";
		reg = <0x19>;

		vcpu: buck1 {
			regulator-boot-on;
			regulator-always-on;
			regulator-min-microvolt = <1000000>;
			regulator-max-microvolt = <1350000>;
		};
	};
```

---

# Marvell 88PM800 regulator

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Marvell 88PM800 regulator.

## Required properties:

- compatible: "marvell,88pm800"
- reg: I2C slave address
- regulators: A node that houses a sub-node for each regulator within the
  device. Each sub-node is identified using the node's name (or the deprecated
  regulator-compatible property if present), with valid values listed below.
  The content of each sub-node is defined by the standard binding for
  regulators; see [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

## The valid names for regulators are:

```text
  buck1, buck2, buck3, buck4, buck5, ldo1, ldo2, ldo3, ldo4, ldo5, ldo6, ldo7,
  ldo8, ldo9, ldo10, ldo11, ldo12, ldo13, ldo14, ldo15, ldo16, ldo17, ldo18, ldo19
```

## Example:

```dts
	pmic: 88pm800@31 {
		compatible = "marvell,88pm800";
		reg = <0x31>;

		regulators {
			buck1 {
			        regulator-min-microvolt = <600000>;
			        regulator-max-microvolt = <3950000>;
			        regulator-boot-on;
			        regulator-always-on;
			};
			ldo1 {
			        regulator-min-microvolt = <600000>;
			        regulator-max-microvolt = <15000000>;
			        regulator-boot-on;
			        regulator-always-on;
			};
...
		};
	};
```

---

# Marvell 88PM860x regulator

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Marvell 88PM860x regulator.

## Required properties:

- compatible: "marvell,88pm860x"
- reg: I2C slave address
- regulators: A node that houses a sub-node for each regulator within the
  device. Each sub-node is identified using the regulator-compatible
  property, with valid values listed below.

## Example:

```dts
	pmic: 88pm860x@34 {
		compatible = "marvell,88pm860x";
		reg = <0x34>;

		regulators {
			BUCK1 {
			        regulator-min-microvolt = <1000000>;
			        regulator-max-microvolt = <1500000>;
			        regulator-boot-on;
			        regulator-always-on;
			};
			BUCK3 {
			        regulator-min-microvolt = <1000000>;
			        regulator-max-microvolt = <3000000>;
			        regulator-boot-on;
			        regulator-always-on;
			};
		};
	};
```

---

# As3722 regulator bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for As3722 regulator bindings.

Regulator of AMS AS3722 PMIC.
Name of the regulator subnode must be "regulators".

## Optional properties:

The input supply of regulators are the optional properties on the
regulator node. The AS3722 is having 7 DCDC step-down regulators as
sd\[0-6\], 10 LDOs as ldo\[0-7\], ldo\[9-11\]. The input supply of these
regulators are provided through following properties:
vsup-sd2-supply: Input supply for SD2.
vsup-sd3-supply: Input supply for SD3.
vsup-sd4-supply: Input supply for SD4.
vsup-sd5-supply: Input supply for SD5.
vin-ldo0-supply: Input supply for LDO0.
vin-ldo1-6-supply: Input supply for LDO1 and LDO6.
vin-ldo2-5-7-supply: Input supply for LDO2, LDO5 and LDO7.
vin-ldo3-4-supply: Input supply for LDO3 and LDO4.
vin-ldo9-10-supply: Input supply for LDO9 and LDO10.
vin-ldo11-supply: Input supply for LDO11.

## Optional nodes:

- regulators : Must contain a sub-node per regulator from the list below.
  Each sub-node should contain the constraints and initialization
  information for that regulator. See [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>) for a
  description of standard properties for these sub-nodes.
  Additional custom properties  are listed below.
  sd\[0-6\], ldo\[0-7\], ldo\[9-11\].

## Optional sub-node properties:

```text
		ams,ext-control: External control of the rail. The option of
			this properties will tell which external input is
			controlling this rail. Valid values are 0, 1, 2 ad 3.
			0: There is no external control of this rail.
			1: Rail is controlled by ENABLE1 input pin.
			2: Rail is controlled by ENABLE2 input pin.
			3: Rail is controlled by ENABLE3 input pin.
		ams,enable-tracking: Enable tracking with SD1, only supported
			by LDO3.
```

## Example:

```dts
	ams3722: ams3722 {
		compatible = "ams,as3722";
		reg = <0x40>;
		...

		regulators {
			vsup-sd2-supply = <...>;
			...

			sd0 {
				regulator-name = "vdd_cpu";
				regulator-min-microvolt = <700000>;
				regulator-max-microvolt = <1400000>;
				regulator-always-on;
				ams,ext-control = <2>;
			};

			sd1 {
				regulator-name = "vdd_core";
				regulator-min-microvolt = <700000>;
				regulator-max-microvolt = <1400000>;
				regulator-always-on;
				ams,ext-control = <1>;
			};

			sd2 {
				regulator-name = "vddio_ddr";
				regulator-min-microvolt = <1350000>;
				regulator-max-microvolt = <1350000>;
				regulator-always-on;
			};

			sd4 {
				regulator-name = "avdd-hdmi-pex";
				regulator-min-microvolt = <1050000>;
				regulator-max-microvolt = <1050000>;
				regulator-always-on;
			};

			sd5 {
				regulator-name = "vdd-1v8";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-always-on;
			};
			....
		};
	};
```

---

# Motorola CPCAP PMIC voltage regulators

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Motorola CPCAP PMIC voltage regulators.

## Requires node properties:

- "compatible" value one of:
  "motorola,cpcap-regulator"
  "motorola,mapphone-cpcap-regulator"
  "motorola,xoom-cpcap-regulator"

## Required regulator properties:

- "regulator-name"
- "regulator-enable-ramp-delay"
- "regulator-min-microvolt"
- "regulator-max-microvolt"

## Optional regulator properties:

- "regulator-boot-on"

See [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>)
for more details about the regulator properties.

## Example:

```dts
cpcap_regulator: regulator {
	compatible = "motorola,cpcap-regulator";

	cpcap_regulators: regulators {
		sw5: SW5 {
			regulator-min-microvolt = <5050000>;
			regulator-max-microvolt = <5050000>;
			regulator-enable-ramp-delay = <50000>;
			regulator-boot-on;
		};
	};
};
```

---

# Hisilicon Hi655x Voltage regulators

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Hisilicon Hi655x Voltage regulators.

## Note:

The Hi655x regulator control is managed by Hi655x PMIC.
So the node of this regulator must be child node of Hi655x
PMIC node.

The driver uses the regulator core framework, so please also
take the bindings of [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>) for reference.

## The valid names for regulators are:

LDO2\_2V8 LDO7\_SDIO LDO10\_2V85 LDO13\_1V8 LDO14\_2V8
LDO15\_1V8 LDO17\_2V5 LDO19\_3V0 LDO21\_1V8 LDO22\_1V2

## Example:

```dts
        pmic: pmic@f8000000 {
                compatible = "hisilicon,hi655x-pmic";
		...
		regulators {
			ldo2: LDO2@a21 {
				regulator-name = "LDO2_2V8";
				regulator-min-microvolt = <2500000>;
				regulator-max-microvolt = <3200000>;
				regulator-enable-ramp-delay = <120>;
			};
			...
		}
	}
```

---

# Intersil ISL9305/ISL9305H voltage regulator

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Intersil ISL9305/ISL9305H voltage regulator.

## Required properties:

- compatible: "isil,isl9305" or "isil,isl9305h"
- reg: I2C slave address, usually 0x68.
- regulators: A node that houses a sub-node for each regulator within the
  device. Each sub-node is identified using the node's name, with valid
  values being "dcd1", "dcd2", "ldo1" and "ldo2". The content of each sub-node
  is defined by the standard binding for regulators; see [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).
- VINDCD1-supply: A phandle to a regulator node supplying VINDCD1.
  VINDCD2-supply: A phandle to a regulator node supplying VINDCD2.
  VINLDO1-supply: A phandle to a regulator node supplying VINLDO1.
  VINLDO2-supply: A phandle to a regulator node supplying VINLDO2.

## Optional properties:

- Per-regulator optional properties are defined in [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>)

Example

```dts
	pmic: isl9305@68 {
		compatible = "isil,isl9305";
		reg = <0x68>;

		VINDCD1-supply = <&system_power>;
		VINDCD2-supply = <&system_power>;
		VINLDO1-supply = <&system_power>;
		VINLDO2-supply = <&system_power>;

		regulators {
			dcd1 {
			        regulator-name = "VDD_DSP";
				regulator-always-on;
                        };
		};
	};
```

---

# TI LMU LM363x regulator device tree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for TI LMU LM363x regulator device tree bindings.

LM363x regulator driver supports LM3631 and LM3632.
LM3631 has five regulators and LM3632 supports three regulators.

## Required property:

- compatible: "ti,lm363x-regulator"

## Optional properties:

```text
  LM3632 has external enable pins for two LDOs.
```

- enable-gpios: Two GPIO specifiers for Vpos and Vneg control pins.
  The first entry is Vpos, the second is Vneg enable pin.

## Child nodes:

```text
  LM3631
```

- vboost
- vcont
- voref
- vpos
- vneg

```text
  LM3632
```

- vboost
- vpos
- vneg

## Optional properties of a child node:

```text
  Each sub-node should contain the constraints and initialization.
  Please refer to [1].
```

Examples: Please refer to ti-lmu dt-bindings \[2\].

```dts
lm3631@29 {
	compatible = "ti,lm3631";
	reg = <0x29>;

	regulators {
		compatible = "ti,lm363x-regulator";

		vboost {
			regulator-name = "lcd_boost";
			regulator-min-microvolt = <4500000>;
			regulator-max-microvolt = <6350000>;
			regulator-always-on;
		};

		vcont {
			regulator-name = "lcd_vcont";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <3300000>;
		};

		voref {
			regulator-name = "lcd_voref";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <6000000>;
		};

		vpos {
			regulator-name = "lcd_vpos";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <6000000>;
			regulator-boot-on;
		};

		vneg {
			regulator-name = "lcd_vneg";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <6000000>;
			regulator-boot-on;
		};
	};
};
```

```dts
lm3632@11 {
	compatible = "ti,lm3632";
	reg = <0x11>;

	regulators {
		compatible = "ti,lm363x-regulator";

		/* GPIO1_16 for Vpos, GPIO1_28 is for Vneg */
		enable-gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>,
				<&gpio1 28 GPIO_ACTIVE_HIGH>;

		vboost {
			regulator-name = "lcd_boost";
			regulator-min-microvolt = <4500000>;
			regulator-max-microvolt = <6400000>;
			regulator-always-on;
		};

		vpos {
			regulator-name = "lcd_vpos";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <6000000>;
		};

		vneg {
			regulator-name = "lcd_vneg";
			regulator-min-microvolt = <4000000>;
			regulator-max-microvolt = <6000000>;
		};
	};
};
```

\[1\] [../regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>)
\[2\] [../mfd/ti-lmu.txt](</kernel/hardware/devicetree/bindings-mfd/ti-lmu.md>)

---

# Binding for TI/National Semiconductor LP872x Driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Binding for TI/National Semiconductor LP872x Driver.

## Required properties:

- compatible: "ti,lp8720" or "ti,lp8725"
- reg: I2C slave address. 0x7d = LP8720, 0x7a = LP8725

## Optional properties:

```text
  - ti,general-config: the value of LP872X_GENERAL_CFG register (u8)
    (LP8720)
    bit[2]: BUCK output voltage control by external DVS pin or register
            1 = external pin, 0 = bit7 of register 08h
    bit[1]: sleep control by external DVS pin or register
            1 = external pin, 0 = bit6 of register 08h
    bit[0]: time step unit(usec). 1 = 25, 0 = 50
```

```text
    (LP8725)
    bit[7:6]: time step unit(usec). 00 = 32, 01 = 64, 10 = 128, 11 = 256
    bit[4]:   BUCK2 enable control. 1 = enable, 0 = disable
    bit[3]:   BUCK2 output voltage register address. 1 = 0Ah, 0 = 0Bh
    bit[2]:   BUCK1 output voltage control by external DVS pin or register
              1 = register 08h, 0 = DVS
    bit[1]:   LDO sleep control. 1 = sleep mode, 0 = normal
    bit[0]:   BUCK1 enable control, 1 = enable, 0 = disable
```

```text
    For more details, please see the datasheet.
```

- ti,update-config: define it when LP872X\_GENERAL\_CFG register should be set
- ti,dvs-gpio: GPIO specifier for external DVS pin control of LP872x devices.
- ti,dvs-vsel: DVS selector. 0 = SEL\_V1, 1 = SEL\_V2.
- ti,dvs-state: initial DVS pin state. 0 = DVS\_LOW, 1 = DVS\_HIGH.
- enable-gpios: GPIO specifier for EN pin control of LP872x devices.

```text
  Sub nodes for regulator_init_data
```

```text
    LP8720 has maximum 6 nodes. (child name: ldo1 ~ 5 and buck)
    LP8725 has maximum 9 nodes. (child name: ldo1 ~ 5, lilo1,2 and buck1,2)
    For more details, please see the following binding document.
    (Documentation/devicetree/bindings/regulator/regulator.txt)
```

Datasheet

- LP8720: https://www.ti.com/lit/ds/symlink/lp8720.pdf
- LP8725: https://www.ti.com/lit/ds/symlink/lp8725.pdf

Example 1) LP8720

```dts
lp8720@7d {
	compatible = "ti,lp8720";
	reg = <0x7d>;

	/* external DVS pin used, timestep is 25usec */
	ti,general-config = /bits/ 8 <0x03>;
	ti,update-config;

	/*
	 * The dvs-gpio depends on the processor environment.
	 * For example, following GPIO specifier means GPIO134 in OMAP4.
	 */
	ti,dvs-gpio = <&gpio5 6 0>;
	ti,dvs-vsel = /bits/ 8 <1>;		/* SEL_V2 */
	ti,dvs-state = /bits/ 8 <1>;		/* DVS_HIGH */

	vaf: ldo1 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
	};

	vmmc: ldo2 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
	};

	vcam_io: ldo3 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
		regulator-boot-on;
	};

	vcam_core: ldo4 {
		regulator-min-microvolt = <800000>;
		regulator-max-microvolt = <2850000>;
		regulator-boot-on;
	};

	vcam: ldo5 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
	};

	vcc: buck {
		regulator-name = "VBUCK";
		regulator-min-microvolt = <800000>;
		regulator-max-microvolt = <2300000>;
	};
};
```

Example 2) LP8725

```dts
lp8725@7a {
	compatible = "ti,lp8725";
	reg = <0x7a>;

	/* Enable BUCK1,2, no DVS, normal LDO mode, timestep is 256usec */
	ti,general-config = /bits/ 8 <0xdd>;
	ti,update-config;

	vcam_io: ldo1 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
	};

	vcam_core: ldo2 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
	};

	vcam: ldo3 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
	};

	vcmmb_io: ldo4 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
		regulator-boot-on;
	};

	vcmmb_core: ldo5 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
		regulator-boot-on;
	};

	vaux1: lilo1 {
		regulator-name = "VAUX1";
		regulator-min-microvolt = <800000>;
		regulator-max-microvolt = <3300000>;
	};

	vaux2: lilo2 {
		regulator-name = "VAUX2";
		regulator-min-microvolt = <800000>;
		regulator-max-microvolt = <3300000>;
	};

	vcc1: buck1 {
		regulator-name = "VBUCK1";
		regulator-min-microvolt = <800000>;
		regulator-max-microvolt = <3000000>;
		regulator-min-microamp  = <460000>;
		regulator-max-microamp  = <1370000>;
		regulator-boot-on;
	};

	vcc2: buck2 {
		regulator-name = "VBUCK2";
		regulator-min-microvolt = <800000>;
		regulator-max-microvolt = <3000000>;
		regulator-min-microamp  = <460000>;
		regulator-max-microamp  = <1370000>;
		regulator-boot-on;
	};
};
```

---

# Linear Technology LTC3589, LTC3589-1, and LTC3589-2 8-output regulators

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Linear Technology LTC3589, LTC3589-1, and LTC3589-2 8-output regulators.

## Required properties:

- compatible: "lltc,ltc3589", "lltc,ltc3589-1" or "lltc,ltc3589-2"
- reg: I2C slave address

## Required child node:

- regulators: Contains eight regulator child nodes sw1, sw2, sw3, bb-out,
  ldo1, ldo2, ldo3, and ldo4, specifying the initialization data as
  documented in [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

Each regulator is defined using the standard binding for regulators. The
nodes for sw1, sw2, sw3, bb-out, ldo1, and ldo2 additionally need to specify
the resistor values of their external feedback voltage dividers:

## Required properties (not on ldo3, ldo4):

- lltc,fb-voltage-divider: An array of two integers containing the resistor
  values R1 and R2 of the feedback voltage divider in ohms.

Regulators sw1, sw2, sw3, and ldo2 can regulate the feedback reference from
0.3625 V to 0.75 V in 12.5 mV steps. The output voltage thus ranges between
0.3625 \* (1 + R1/R2) V and 0.75 \* (1 + R1/R2) V. Regulators bb-out and ldo1
have a fixed 0.8 V reference and thus output 0.8 \* (1 + R1/R2) V. The ldo3
regulator is fixed to 1.8 V on LTC3589 and to 2.8 V on LTC3589-1,2. The ldo4
regulator can output between 1.8 V and 3.3 V on LTC3589 and between 1.2 V
and 3.2 V on LTC3589-1,2 in four steps. The ldo1 standby regulator can not
be disabled and thus should have the regulator-always-on property set.

## Example:

```dts
	ltc3589: pmic@34 {
		compatible = "lltc,ltc3589-1";
		reg = <0x34>;

		regulators {
			sw1_reg: sw1 {
				regulator-min-microvolt = <591930>;
				regulator-max-microvolt = <1224671>;
				lltc,fb-voltage-divider = <100000 158000>;
				regulator-ramp-delay = <7000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw2_reg: sw2 {
				regulator-min-microvolt = <704123>;
				regulator-max-microvolt = <1456803>;
				lltc,fb-voltage-divider = <180000 191000>;
				regulator-ramp-delay = <7000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw3_reg: sw3 {
				regulator-min-microvolt = <1341250>;
				regulator-max-microvolt = <2775000>;
				lltc,fb-voltage-divider = <270000 100000>;
				regulator-ramp-delay = <7000>;
				regulator-boot-on;
				regulator-always-on;
			};

			bb_out_reg: bb-out {
				regulator-min-microvolt = <3387341>;
				regulator-max-microvolt = <3387341>;
				lltc,fb-voltage-divider = <511000 158000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldo1_reg: ldo1 {
				regulator-min-microvolt = <1306329>;
				regulator-max-microvolt = <1306329>;
				lltc,fb-voltage-divider = <100000 158000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldo2_reg: ldo2 {
				regulator-min-microvolt = <704123>;
				regulator-max-microvolt = <1456806>;
				lltc,fb-voltage-divider = <180000 191000>;
				regulator-ramp-delay = <7000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldo3_reg: ldo3 {
				regulator-min-microvolt = <2800000>;
				regulator-max-microvolt = <2800000>;
				regulator-boot-on;
			};

			ldo4_reg: ldo4 {
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3200000>;
			};
		};
	};
```

---

# Maxim MAX1586 voltage regulator

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Maxim MAX1586 voltage regulator.

## Required properties:

- compatible: must be "maxim,max1586"
- reg: I2C slave address, usually 0x14
- v3-gain: integer specifying the V3 gain as per datasheet
  (1 + R24/R25 + R24/185.5kOhm)
- any required generic properties defined in [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>)

## Example:

```dts
	i2c_master {
		max1586@14 {
			compatible = "maxim,max1586";
			reg = <0x14>;
			v3-gain = <1000000>;

			regulators {
				vcc_core: v3 {
					regulator-name = "vcc_core";
					regulator-compatible = "Output_V3";
					regulator-min-microvolt = <1000000>;
					regulator-max-microvolt = <1705000>;
					regulator-always-on;
				};
			};
		};
	};
```

---

# MAX8907 regulator

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for MAX8907 regulator.

## Required properties:

- compatible: "maxim,max8907"
- reg: I2C slave address
- interrupts: The interrupt output of the controller
- mbatt-supply: The input supply for MBATT, BBAT, SDBY, VRTC.
- in-v1-supply: The input supply for SD1.
- in-v2-supply: The input supply for SD2.
- in-v3-supply: The input supply for SD3.
- in1-supply: The input supply for LDO1.
  ...
- in20-supply: The input supply for LDO20.
- regulators: A node that houses a sub-node for each regulator within the
  device. Each sub-node is identified using the node's name (or the deprecated
  regulator-compatible property if present), with valid values listed below.
  The content of each sub-node is defined by the standard binding for
  regulators; see [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

## Optional properties:

- maxim,system-power-controller: Boolean property indicating that the PMIC
  controls the overall system power.

## The valid names for regulators are:

```text
  sd1, sd2, sd3, ldo1, ldo2, ldo3, ldo4, ldo5, ldo6, ldo7, ldo8, ldo9, ldo10,
  ldo11, ldo12, ldo13, ldo14, ldo15, ldo16, ldo17, ldo18, ldo19, ldo20, out5v,
  out33v, bbat, sdby, vrtc.
```

## Example:

```dts
		max8907@3c {
			compatible = "maxim,max8907";
			reg = <0x3c>;
			interrupts = <0 86 0x4>;

			maxim,system-power-controller;

			mbatt-supply = <&some_reg>;
			in-v1-supply = <&mbatt_reg>;
			...
			in1-supply = <&mbatt_reg>;
			...

			regulators {
				mbatt_reg: mbatt {
					regulator-name = "vbat_pmu";
					regulator-min-microvolt = <5000000>;
					regulator-max-microvolt = <5000000>;
					regulator-always-on;
				};

				sd1 {
					regulator-name = "nvvdd_sv1,vdd_cpu_pmu";
					regulator-min-microvolt = <1000000>;
					regulator-max-microvolt = <1000000>;
					regulator-always-on;
				};

				sd2 {
					regulator-name = "nvvdd_sv2,vdd_core";
					regulator-min-microvolt = <1200000>;
					regulator-max-microvolt = <1200000>;
					regulator-always-on;
				};
...
			};
		};
	};
```

---

# Max8925 Voltage regulators

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Max8925 Voltage regulators.

## Required nodes:

-nodes:

- SDV1 for SDV SDV1
- SDV2 for SDV SDV2
- SDV3 for SDV SDV3
- LDO1 for LDO LDO1
- LDO2 for LDO LDO2
- LDO3 for LDO LDO3
- LDO4 for LDO LDO4
- LDO5 for LDO LDO5
- LDO6 for LDO LDO6
- LDO7 for LDO LDO7
- LDO8 for LDO LDO8
- LDO9 for LDO LDO9
- LDO10 for LDO LDO10
- LDO11 for LDO LDO11
- LDO12 for LDO LDO12
- LDO13 for LDO LDO13
- LDO14 for LDO LDO14
- LDO15 for LDO LDO15
- LDO16 for LDO LDO16
- LDO17 for LDO LDO17
- LDO18 for LDO LDO18
- LDO19 for LDO LDO19
- LDO20 for LDO LDO20

## Optional properties:

- Any optional property defined in bindings/regulator/regulator.txt

## Example:

```dts
	SDV1 {
		regulator-min-microvolt = <637500>;
		regulator-max-microvolt = <1425000>;
		regulator-boot-on;
		regulator-always-on;
	};
```

---

# Monolithic Power Systems MP8859 voltage regulator

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Monolithic Power Systems MP8859 voltage regulator.

## Required properties:

- compatible: "mps,mp8859";
- reg: I2C slave address.

Optional subnode for regulator: "mp8859\_dcdc", using common regulator
bindings given in &lt;[Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>)&gt;.

## Example:

```dts
	mp8859: regulator@66 {
		compatible = "mps,mp8859";
		reg = <0x66>;
		dc_12v: mp8859_dcdc {
			regulator-name = "dc_12v";
			regulator-min-microvolt = <12000000>;
			regulator-max-microvolt = <12000000>;
			regulator-boot-on;
			regulator-always-on;
		};
	};
```

---

# Mediatek MT6311 Regulator

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Mediatek MT6311 Regulator.

## Required properties:

- compatible: "mediatek,mt6311-regulator"
- reg: I2C slave address, usually 0x6b.
- regulators: List of regulators provided by this controller. It is named
  to VDVFS and VBIASN.
  The definition for each of these nodes is defined using the standard binding
  for regulators at [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

## The valid names for regulators are:

BUCK:
  VDVFS
LDO:
  VBIASN

## Example:

```dts
	mt6311: pmic@6b {
		compatible = "mediatek,mt6311-regulator";
		reg = <0x6b>;

		regulators {
			mt6311_vcpu_reg: VDVFS {
				regulator-name = "VDVFS";
				regulator-min-microvolt = < 600000>;
				regulator-max-microvolt = <1400000>;
				regulator-ramp-delay = <10000>;
			};
			mt6311_ldo_reg: VBIASN {
				regulator-name = "VBIASN";
				regulator-min-microvolt = <200000>;
				regulator-max-microvolt = <800000>;
			};
		};
	};
```

---

# Mediatek MT6323 Regulator

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Mediatek MT6323 Regulator.

All voltage regulators are defined as subnodes of the regulators node. A list
of regulators provided by this controller are defined as subnodes of the
PMIC's node. Each regulator is named according to its regulator type,
buck\_&lt;name&gt; and ldo\_&lt;name&gt;. The definition for each of these nodes is defined
using the standard binding for regulators at
[Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

## The valid names for regulators are::

BUCK:
  buck\_vproc, buck\_vsys, buck\_vpa
LDO:
  ldo\_vtcxo, ldo\_vcn28, ldo\_vcn33\_bt, ldo\_vcn33\_wifi, ldo\_va, ldo\_vcama,
  ldo\_vio28, ldo\_vusb, ldo\_vmc, ldo\_vmch, ldo\_vemc3v3, ldo\_vgp1, ldo\_vgp2,
  ldo\_vgp3, ldo\_vcn18, ldo\_vsim1, ldo\_vsim2, ldo\_vrtc, ldo\_vcamaf, ldo\_vibr,
  ldo\_vrf18, ldo\_vm, ldo\_vio18, ldo\_vcamd, ldo\_vcamio

## Example:

```dts
	pmic: mt6323 {
		mt6323regulator: regulators {
			mt6323_vproc_reg: buck_vproc{
				regulator-name = "vproc";
				regulator-min-microvolt = < 700000>;
				regulator-max-microvolt = <1350000>;
				regulator-ramp-delay = <12500>;
				regulator-always-on;
				regulator-boot-on;
			};

			mt6323_vsys_reg: buck_vsys{
				regulator-name = "vsys";
				regulator-min-microvolt = <1400000>;
				regulator-max-microvolt = <2987500>;
				regulator-ramp-delay = <25000>;
				regulator-always-on;
				regulator-boot-on;
			};

			mt6323_vpa_reg: buck_vpa{
				regulator-name = "vpa";
				regulator-min-microvolt = < 500000>;
				regulator-max-microvolt = <3650000>;
			};

			mt6323_vtcxo_reg: ldo_vtcxo{
				regulator-name = "vtcxo";
				regulator-min-microvolt = <2800000>;
				regulator-max-microvolt = <2800000>;
				regulator-enable-ramp-delay = <90>;
				regulator-always-on;
				regulator-boot-on;
			};

			mt6323_vcn28_reg: ldo_vcn28{
				regulator-name = "vcn28";
				regulator-min-microvolt = <2800000>;
				regulator-max-microvolt = <2800000>;
				regulator-enable-ramp-delay = <185>;
			};

			mt6323_vcn33_bt_reg: ldo_vcn33_bt{
				regulator-name = "vcn33_bt";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3600000>;
				regulator-enable-ramp-delay = <185>;
			};

			mt6323_vcn33_wifi_reg: ldo_vcn33_wifi{
				regulator-name = "vcn33_wifi";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3600000>;
				regulator-enable-ramp-delay = <185>;
			};

			mt6323_va_reg: ldo_va{
				regulator-name = "va";
				regulator-min-microvolt = <2800000>;
				regulator-max-microvolt = <2800000>;
				regulator-enable-ramp-delay = <216>;
				regulator-always-on;
				regulator-boot-on;
			};

			mt6323_vcama_reg: ldo_vcama{
				regulator-name = "vcama";
				regulator-min-microvolt = <1500000>;
				regulator-max-microvolt = <2800000>;
				regulator-enable-ramp-delay = <216>;
			};

			mt6323_vio28_reg: ldo_vio28{
				regulator-name = "vio28";
				regulator-min-microvolt = <2800000>;
				regulator-max-microvolt = <2800000>;
				regulator-enable-ramp-delay = <216>;
				regulator-always-on;
				regulator-boot-on;
			};

			mt6323_vusb_reg: ldo_vusb{
				regulator-name = "vusb";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-enable-ramp-delay = <216>;
				regulator-boot-on;
			};

			mt6323_vmc_reg: ldo_vmc{
				regulator-name = "vmc";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-enable-ramp-delay = <36>;
				regulator-boot-on;
			};

			mt6323_vmch_reg: ldo_vmch{
				regulator-name = "vmch";
				regulator-min-microvolt = <3000000>;
				regulator-max-microvolt = <3300000>;
				regulator-enable-ramp-delay = <36>;
				regulator-boot-on;
			};

			mt6323_vemc3v3_reg: ldo_vemc3v3{
				regulator-name = "vemc3v3";
				regulator-min-microvolt = <3000000>;
				regulator-max-microvolt = <3300000>;
				regulator-enable-ramp-delay = <36>;
				regulator-boot-on;
			};

			mt6323_vgp1_reg: ldo_vgp1{
				regulator-name = "vgp1";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3300000>;
				regulator-enable-ramp-delay = <216>;
			};

			mt6323_vgp2_reg: ldo_vgp2{
				regulator-name = "vgp2";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3000000>;
				regulator-enable-ramp-delay = <216>;
			};

			mt6323_vgp3_reg: ldo_vgp3{
				regulator-name = "vgp3";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <1800000>;
				regulator-enable-ramp-delay = <216>;
			};

			mt6323_vcn18_reg: ldo_vcn18{
				regulator-name = "vcn18";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-enable-ramp-delay = <216>;
			};

			mt6323_vsim1_reg: ldo_vsim1{
				regulator-name = "vsim1";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3000000>;
				regulator-enable-ramp-delay = <216>;
			};

			mt6323_vsim2_reg: ldo_vsim2{
				regulator-name = "vsim2";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3000000>;
				regulator-enable-ramp-delay = <216>;
			};

			mt6323_vrtc_reg: ldo_vrtc{
				regulator-name = "vrtc";
				regulator-min-microvolt = <2800000>;
				regulator-max-microvolt = <2800000>;
				regulator-always-on;
				regulator-boot-on;
			};

			mt6323_vcamaf_reg: ldo_vcamaf{
				regulator-name = "vcamaf";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3300000>;
				regulator-enable-ramp-delay = <216>;
			};

			mt6323_vibr_reg: ldo_vibr{
				regulator-name = "vibr";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3300000>;
				regulator-enable-ramp-delay = <36>;
			};

			mt6323_vrf18_reg: ldo_vrf18{
				regulator-name = "vrf18";
				regulator-min-microvolt = <1825000>;
				regulator-max-microvolt = <1825000>;
				regulator-enable-ramp-delay = <187>;
			};

			mt6323_vm_reg: ldo_vm{
				regulator-name = "vm";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <1800000>;
				regulator-enable-ramp-delay = <216>;
				regulator-always-on;
				regulator-boot-on;
			};

			mt6323_vio18_reg: ldo_vio18{
				regulator-name = "vio18";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-enable-ramp-delay = <216>;
				regulator-always-on;
				regulator-boot-on;
			};

			mt6323_vcamd_reg: ldo_vcamd{
				regulator-name = "vcamd";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <1800000>;
				regulator-enable-ramp-delay = <216>;
			};

			mt6323_vcamio_reg: ldo_vcamio{
				regulator-name = "vcamio";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-enable-ramp-delay = <216>;
			};
		};
	};
```

---

# MediaTek MT6380 Regulator

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for MediaTek MT6380 Regulator.

All voltage regulators provided by the MT6380 PMIC are described as the
subnodes of the MT6380 regulators node. Each regulator is named according
to its regulator type, buck-&lt;name&gt; and ldo-&lt;name&gt;. The definition for each
of these nodes is defined using the standard binding for regulators at
[Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

## The valid names for regulators are:

BUCK:
  buck-core1, buck-vcore, buck-vrf
LDO:
  ldo-vm ,ldo-va , ldo-vphy, ldo-vddr, ldo-vt

## Example:

```dts
	regulators {
		compatible = "mediatek,mt6380-regulator";

		mt6380_vcpu_reg: buck-vcore1 {
			regulator-name = "vcore1";
			regulator-min-microvolt = < 600000>;
			regulator-max-microvolt = <1393750>;
			regulator-ramp-delay = <6250>;
			regulator-always-on;
			regulator-boot-on;
		};

		mt6380_vcore_reg: buck-vcore {
			regulator-name = "vcore";
			regulator-min-microvolt = <600000>;
			regulator-max-microvolt = <1393750>;
			regulator-ramp-delay = <6250>;
		};

		mt6380_vrf_reg: buck-vrf {
			regulator-name = "vrf";
			regulator-min-microvolt = <1200000>;
			regulator-max-microvolt = <1575000>;
			regulator-ramp-delay = <0>;
			regulator-always-on;
			regulator-boot-on;
		};

		mt6380_vm_reg: ldo-vm {
			regulator-name = "vm";
			regulator-min-microvolt = <1050000>;
			regulator-max-microvolt = <1400000>;
			regulator-ramp-delay = <0>;
			regulator-always-on;
			regulator-boot-on;
		};

		mt6380_va_reg: ldo-va {
			regulator-name = "va";
			regulator-min-microvolt = <2200000>;
			regulator-max-microvolt = <3300000>;
			regulator-ramp-delay = <0>;
			regulator-always-on;
			regulator-boot-on;
		};

		mt6380_vphy_reg: ldo-vphy {
			regulator-name = "vphy";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
			regulator-ramp-delay = <0>;
			regulator-always-on;
			regulator-boot-on;
		};

		mt6380_vddr_reg: ldo-vddr {
			regulator-name = "vddr";
			regulator-min-microvolt = <1240000>;
			regulator-max-microvolt = <1840000>;
			regulator-ramp-delay = <0>;
			regulator-always-on;
			regulator-boot-on;
		};

		mt6380_vt_reg: ldo-vt {
			regulator-name = "vt";
			regulator-min-microvolt = <2200000>;
			regulator-max-microvolt = <3300000>;
			regulator-ramp-delay = <0>;
			regulator-always-on;
			regulator-boot-on;
		};
	};
```

---

# NVIDIA Tegra Regulators Coupling

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for NVIDIA Tegra Regulators Coupling.

NVIDIA Tegra SoC's have a mandatory voltage-coupling between regulators.
Thus on Tegra20 there are 3 coupled regulators and on NVIDIA Tegra30
there are 2.

## Tegra20 voltage coupling

On Tegra20 SoC's there are 3 coupled regulators: CORE, RTC and CPU.
The CORE and RTC voltages shall be in a range of 170mV from each other
and they both shall be higher than the CPU voltage by at least 120mV.

## Tegra30 voltage coupling

On Tegra30 SoC's there are 2 coupled regulators: CORE and CPU. The CORE
and CPU voltages shall be in a range of 300mV from each other and CORE
voltage shall be higher than the CPU by N mV, where N depends on the CPU
voltage.

## Required properties:

- nvidia,tegra-core-regulator: Boolean property that designates regulator
  as the "Core domain" voltage regulator.
- nvidia,tegra-rtc-regulator: Boolean property that designates regulator
  as the "RTC domain" voltage regulator.
- nvidia,tegra-cpu-regulator: Boolean property that designates regulator
  as the "CPU domain" voltage regulator.

## Example:

```dts
	pmic {
		regulators {
			core_vdd_reg: core {
				regulator-name = "vdd_core";
				regulator-min-microvolt = <950000>;
				regulator-max-microvolt = <1300000>;
				regulator-coupled-with = <&rtc_vdd_reg &cpu_vdd_reg>;
				regulator-coupled-max-spread = <170000 550000>;

				nvidia,tegra-core-regulator;
			};

			rtc_vdd_reg: rtc {
				regulator-name = "vdd_rtc";
				regulator-min-microvolt = <950000>;
				regulator-max-microvolt = <1300000>;
				regulator-coupled-with = <&core_vdd_reg &cpu_vdd_reg>;
				regulator-coupled-max-spread = <170000 550000>;

				nvidia,tegra-rtc-regulator;
			};

			cpu_vdd_reg: cpu {
				regulator-name = "vdd_cpu";
				regulator-min-microvolt = <750000>;
				regulator-max-microvolt = <1125000>;
				regulator-coupled-with = <&core_vdd_reg &rtc_vdd_reg>;
				regulator-coupled-max-spread = <550000 550000>;

				nvidia,tegra-cpu-regulator;
			};
		};
	};
```

---

# palmas regulator IP block devicetree bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for palmas regulator IP block devicetree bindings.

The tps659038 for the AM57x class have OTP spins that
have different part numbers but the same functionality. There
is not a need to add the OTP spins to the palmas driver. The
spin devices should use the tps659038 as it's compatible value.
This is the list of those devices:
tps659037

## Required properties:

- compatible : Should be from the list
  ti,twl6035-pmic
  ti,twl6036-pmic
  ti,twl6037-pmic
  ti,tps65913-pmic
  ti,tps65914-pmic
  ti,tps65917-pmic
  ti,tps659038-pmic
  and also the generic series names
  ti,palmas-pmic
- interrupts : The interrupt number and the type which can be looked up here:
  arch/arm/boot/dts/include/dt-bindings/interrupt-controller/irq.h
- interrupts-name: The names of the individual interrupts.

## Optional properties:

- ti,ldo6-vibrator : ldo6 is in vibrator mode

## Optional nodes:

- regulators : Must contain a sub-node per regulator from the list below.
  Each sub-node should contain the constraints and initialization
  information for that regulator. See [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>) for a
  description of standard properties for these sub-nodes.
  Additional custom properties  are listed below.

```text
	       For ti,palmas-pmic - smps12, smps123, smps3 depending on OTP,
	       smps45, smps457, smps7 depending on variant, smps6, smps[8-9],
	       smps10_out2, smps10_out1, ldo[1-9], ldoln, ldousb.
```

## Optional sub-node properties:

```text
	       ti,warm-reset - maintain voltage during warm reset(boolean)
	       ti,roof-floor - This takes as optional argument on platform supporting
	       the rail from desired external control. If there is no argument then
	       it will be assume that it is controlled by NSLEEP pin.
	       The valid value for external pins are:
			ENABLE1 then 1,
			ENABLE2 then 2 or
			NSLEEP then 3.
	       ti,mode-sleep - mode to adopt in pmic sleep 0 - off, 1 - auto,
	       2 - eco, 3 - forced pwm
	       ti,smps-range - OTP has the wrong range set for the hardware so override
	       0 - low range, 1 - high range.
```

- ti,system-power-controller: Telling whether or not this pmic is controlling
  the system power.

## Example:

```dts
#include <dt-bindings/interrupt-controller/irq.h>
```

```dts
pmic {
	compatible = "ti,twl6035-pmic", "ti,palmas-pmic";
	interrupt-parent = <&palmas>;
	interrupts = <14 IRQ_TYPE_NONE>;
	interrupts-name = "short-irq";

	ti,ldo6-vibrator;

	ti,system-power-controller;

	regulators {
		smps12_reg : smps12 {
			regulator-name = "smps12";
			regulator-min-microvolt = < 600000>;
			regulator-max-microvolt = <1500000>;
			regulator-always-on;
			regulator-boot-on;
			ti,warm-reset;
			ti,roof-floor = <1>; /* ENABLE1 control */
			ti,mode-sleep = <0>;
			ti,smps-range = <1>;
		};

		ldo1_reg: ldo1 {
			regulator-name = "ldo1";
			regulator-min-microvolt = <2800000>;
			regulator-max-microvolt = <2800000>;
		};
	};
};
```

---

# PBIAS internal regulator for SD card dual voltage i/o pads on OMAP SoCs.

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for PBIAS internal regulator for SD card dual voltage i/o pads on OMAP SoCs..

## Required properties:

```text
- compatible:
  - should be "ti,pbias-dra7" for DRA7
  - should be "ti,pbias-omap2" for OMAP2
  - should be "ti,pbias-omap3" for OMAP3
  - should be "ti,pbias-omap4" for OMAP4
  - should be "ti,pbias-omap5" for OMAP5
  - "ti,pbias-omap" is deprecated
- reg: pbias register offset from syscon base and size of pbias register.
- syscon : phandle of the system control module
- regulator-name : should be
			pbias_mmc_omap2430 for OMAP2430, OMAP3 SoCs
			pbias_sim_omap3 for OMAP3 SoCs
			pbias_mmc_omap4 for OMAP4 SoCs
			pbias_mmc_omap5 for OMAP5 and DRA7 SoC
```

## Optional properties:

- Any optional property defined in bindings/regulator/regulator.txt

## Example:

```dts
		pbias_regulator: pbias_regulator {
			compatible = "ti,pbias-omap";
			reg = <0 0x4>;
			syscon = <&omap5_padconf_global>;
			pbias_mmc_reg: pbias_mmc_omap5 {
				regulator-name = "pbias_mmc_omap5";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3000000>;
			};
```

---

# Powerventure Semiconductor PV88060 Voltage Regulator

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Powerventure Semiconductor PV88060 Voltage Regulator.

## Required properties:

- compatible: "pvs,pv88060".
- reg: I2C slave address, usually 0x49.
- interrupts: the interrupt outputs of the controller
- regulators: A node that houses a sub-node for each regulator within the
  device. Each sub-node is identified using the node's name, with valid
  values listed below. The content of each sub-node is defined by the
  standard binding for regulators; see [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).
  BUCK1, LDO1, LDO2, LDO3, LDO4, LDO5, LDO6, LDO7, SW1, SW2, SW3, SW4,
  SW5, and SW6.

## Optional properties:

- Any optional property defined in [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>)

Example

```dts
	pmic: pv88060@49 {
		compatible = "pvs,pv88060";
		reg = <0x49>;
		interrupt-parent = <&gpio>;
		interrupts = <24 24>;

		regulators {
			BUCK1 {
				regulator-name = "buck1";
				regulator-min-microvolt = <2800000>;
				regulator-max-microvolt = <4387500>;
				regulator-min-microamp 	= <1496000>;
				regulator-max-microamp 	= <4189000>;
				regulator-boot-on;
			};

			LDO1 {
				regulator-name = "ldo1";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3350000>;
				regulator-boot-on;
			};

			LDO2 {
				regulator-name = "ldo2";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3350000>;
				regulator-boot-on;
			};

			LDO3 {
				regulator-name = "ldo3";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3350000>;
				regulator-boot-on;
			};

			LDO4 {
				regulator-name = "ldo4";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3350000>;
				regulator-boot-on;
			};

			LDO5 {
				regulator-name = "ldo5";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3350000>;
				regulator-boot-on;
			};

			LDO6 {
				regulator-name = "ldo6";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3350000>;
				regulator-boot-on;
			};

			LDO7 {
				regulator-name = "ldo7";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <3350000>;
				regulator-boot-on;
			};

			SW1 {
				regulator-name = "sw1";
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5000000>;
			};

			SW2 {
				regulator-name = "sw2";
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5000000>;
				regulator-boot-on;
			};

			SW3 {
				regulator-name = "sw3";
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5000000>;
				regulator-boot-on;
			};

			SW4 {
				regulator-name = "sw4";
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5000000>;
				regulator-boot-on;
			};

			SW5 {
				regulator-name = "sw5";
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5000000>;
				regulator-boot-on;
			};

			SW6 {
				regulator-name = "sw6";
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5000000>;
			};
		};
	};
```

---

# Powerventure Semiconductor PV88080 Voltage Regulator

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Powerventure Semiconductor PV88080 Voltage Regulator.

## Required properties:

```text
- compatible: Must be one of the following, depending on the
  silicon version:
	- "pvs,pv88080" (DEPRECATED)
```

```text
	- "pvs,pv88080-aa" for PV88080 AA or AB silicon
	- "pvs,pv88080-ba" for PV88080 BA or BB silicon
  NOTE: The use of the compatibles with no silicon version is deprecated.
- reg: I2C slave address, usually 0x49
- interrupts: the interrupt outputs of the controller
- regulators: A node that houses a sub-node for each regulator within the
  device. Each sub-node is identified using the node's name, with valid
  values listed below. The content of each sub-node is defined by the
  standard binding for regulators; see regulator.txt.
  BUCK1, BUCK2, BUCK3 and HVBUCK.
```

## Optional properties:

- Any optional property defined in [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>)

## Example:

```dts
	pmic: pv88080@49 {
		compatible = "pvs,pv88080-ba";
		reg = <0x49>;
		interrupt-parent = <&gpio>;
		interrupts = <24 24>;

		regulators {
			BUCK1 {
				regulator-name = "buck1";
				regulator-min-microvolt = < 600000>;
				regulator-max-microvolt = <1393750>;
				regulator-min-microamp 	= < 220000>;
				regulator-max-microamp 	= <7040000>;
			};

			BUCK2 {
				regulator-name = "buck2";
				regulator-min-microvolt = < 600000>;
				regulator-max-microvolt = <1393750>;
				regulator-min-microamp 	= <1496000>;
				regulator-max-microamp 	= <4189000>;
			};

			BUCK3 {
				regulator-name = "buck3";
				regulator-min-microvolt = <1400000>;
				regulator-max-microvolt = <2193750>;
				regulator-min-microamp 	= <1496000>;
				regulator-max-microamp 	= <4189000>;
			};

			HVBUCK {
				regulator-name = "hvbuck";
				regulator-min-microvolt = <   5000>;
				regulator-max-microvolt = <1275000>;
 			};
		};
	};
```

---

# Powerventure Semiconductor PV88090 Voltage Regulator

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Powerventure Semiconductor PV88090 Voltage Regulator.

## Required properties:

- compatible: "pvs,pv88090".
- reg: I2C slave address, usually 0x48.
- interrupts: the interrupt outputs of the controller
- regulators: A node that houses a sub-node for each regulator within the
  device. Each sub-node is identified using the node's name, with valid
  values listed below. The content of each sub-node is defined by the
  standard binding for regulators; see [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).
  BUCK1, BUCK2, BUCK3, LDO1, and LDO2.

## Optional properties:

- Any optional property defined in [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>)

Example

```dts
	pmic: pv88090@48 {
		compatible = "pvs,pv88090";
		reg = <0x48>;
		interrupt-parent = <&gpio>;
		interrupts = <24 24>;

		regulators {
			BUCK1 {
				regulator-name = "buck1";
				regulator-min-microvolt = < 600000>;
				regulator-max-microvolt = <1393750>;
				regulator-min-microamp 	= < 220000>;
				regulator-max-microamp 	= <7040000>;
				regulator-boot-on;
			};

			BUCK2 {
				regulator-name = "buck2";
				regulator-min-microvolt = < 600000>;
				regulator-max-microvolt = <1393750>;
				regulator-min-microamp 	= <1496000>;
				regulator-max-microamp 	= <4189000>;
			};

			BUCK3 {
				regulator-name = "buck3";
				regulator-min-microvolt = <600000>;
				regulator-max-microvolt = <1393750>;
				regulator-min-microamp 	= <1496000>;
				regulator-max-microamp 	= <4189000>;
				regulator-boot-on;
			};

			LDO1 {
				regulator-name = "ldo1";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <4350000>;
				regulator-boot-on;
			};

			LDO2 {
				regulator-name = "ldo2";
				regulator-min-microvolt = < 650000>;
				regulator-max-microvolt = <2225000>;
				regulator-boot-on;
			};
		};
	};
```

---

# Regulator DT binding for MAX77620 Power management IC from Maxim Semiconductor.

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Regulator DT binding for MAX77620 Power management IC from Maxim Semiconductor..

Device has multiple DCDC(sd\[0-3\] and LDOs(ldo\[0-8\]). The input supply
of these regulators are defined under parent device node.
Details of regulator properties are defined as child node under
sub-node "regulators" which is child node of device node.

Please refer file &lt;[Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>)&gt;
for common regulator bindings used by client.

Following are properties of parent node related to regulators.

## Optional properties:

```text
The input supply of regulators are the optional properties on the
parent device node. The input supply of these regulators are provided
through following properties:
in-sd0-supply:		Input supply for SD0, INA-SD0 or INB-SD0 pins.
in-sd1-supply:		Input supply for SD1.
in-sd2-supply:		Input supply for SD2.
in-sd3-supply:		Input supply for SD3.
in-ldo0-1-supply:	Input supply for LDO0 and LDO1.
in-ldo2-supply:		Input supply for LDO2.
in-ldo3-5-supply:	Input supply for LDO3 and LDO5
in-ldo4-6-supply:	Input supply for LDO4 and LDO6.
in-ldo7-8-supply:	Input supply for LDO7 and LDO8.
```

## Optional sub nodes for regulators under "regulators" subnode:

The subnodes name is the name of regulator and it must be one of:

```text
	sd[0-3], ldo[0-8]
```

Each sub-node should contain the constraints and initialization
information for that regulator. The definition for each of these
nodes is defined using the standard binding for regulators found at
&lt;[Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>)&gt;.

There are also additional properties for SD/LDOs. These additional properties
are required to configure FPS configuration parameters for SDs and LDOs.
Please refer &lt;[devicetree/bindings/mfd/max77620.txt](</kernel/hardware/devicetree/bindings-mfd/max77620.md>)&gt; for more detail of Flexible
Power Sequence (FPS).
Following are additional properties:

```text
- maxim,active-fps-source:		FPS source for the regulators to get
					enabled/disabled when system is in
					active state.  Valid values are:
					- MAX77620_FPS_SRC_0,
						FPS source is FPS0.
					- MAX77620_FPS_SRC_1,
						FPS source is FPS1
					- MAX77620_FPS_SRC_2 and
						FPS source is FPS2
					- MAX77620_FPS_SRC_NONE.
						Regulator is not controlled
						by FPS events and it gets
						enabled/disabled by register
						access.
					Absence of this property will leave
					the FPS configuration register for that
					regulator to default configuration.
```

- maxim,active-fps-power-up-slot:	Sequencing event slot number on which
  the regulator get enabled when
  master FPS input event set to HIGH.
  Valid values are 0 to 7.
  This is applicable if FPS source is
  selected as FPS0, FPS1 or FPS2.

- maxim,active-fps-power-down-slot:	Sequencing event slot number on which
  the regulator get disabled when master
  FPS input event set to LOW.
  Valid values are 0 to 7.
  This is applicable if FPS source is
  selected as FPS0, FPS1 or FPS2.

- maxim,suspend-fps-source:		This is same as property
  "maxim,active-fps-source" but value
  get configured when system enters in
  to suspend state.

- maxim,suspend-fps-power-up-slot:	This is same as property
  "maxim,active-fps-power-up-slot" but
  this value get configured into FPS
  configuration register when system
  enters into suspend.
  This is applicable if suspend state
  FPS source is selected as FPS0, FPS1 or

- maxim,suspend-fps-power-down-slot:	This is same as property
  "maxim,active-fps-power-down-slot" but
  this value get configured into FPS
  configuration register when system
  enters into suspend.
  This is applicable if suspend state
  FPS source is selected as FPS0, FPS1 or
  FPS2.
- maxim,ramp-rate-setting:		integer, ramp rate(uV/us) setting to be
  configured to the device.
  The platform may have different ramp
  rate than advertised ramp rate if it has
  design variation from Maxim's
  recommended. On this case, platform
  specific ramp rate is used for ramp time
  calculation and this property is used
  for device register configurations.
  The measured ramp rate of platform is
  provided by the regulator-ramp-delay
  as described in &lt;devicetree/bindings/
  regulator/regulator.txt&gt;.
  Maxim Max77620 supports following ramp
  delay:
  SD: 13.75mV/us, 27.5mV/us, 55mV/us
  LDOs: 5mV/us, 100mV/us

Note: If the measured ramp delay is same as advertised ramp delay then it is not
required to provide the ramp delay with property "maxim,ramp-rate-setting". The
ramp rate can be provided by the regulator-ramp-delay which will be used for
ramp time calculation for voltage change as well as for device configuration.

## Example:

```dts
#include <dt-bindings/mfd/max77620.h>
```

...

```dts
max77620@3c {
	in-ldo0-1-supply = <&max77620_sd2>;
	in-ldo7-8-supply = <&max77620_sd2>;
	regulators {
		sd0 {
			regulator-name = "vdd-core";
			regulator-min-microvolt = <600000>;
			regulator-max-microvolt = <1400000>;
			regulator-boot-on;
			regulator-always-on;
			maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
		};

		sd1 {
			regulator-name = "vddio-ddr";
			regulator-min-microvolt = <1200000>;
			regulator-max-microvolt = <1200000>;
			regulator-always-on;
			regulator-boot-on;
			maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
		};

		sd2 {
			regulator-name = "vdd-pre-reg";
			regulator-min-microvolt = <1350000>;
			regulator-max-microvolt = <1350000>;
		};

		sd3 {
			regulator-name = "vdd-1v8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
			regulator-always-on;
			regulator-boot-on;
		};

		ldo0 {
			regulator-name = "avdd-sys";
			regulator-min-microvolt = <1200000>;
			regulator-max-microvolt = <1200000>;
			regulator-always-on;
			regulator-boot-on;
		};

		ldo1 {
			regulator-name = "vdd-pex";
			regulator-min-microvolt = <1050000>;
			regulator-max-microvolt = <1050000>;
		};

		ldo2 {
			regulator-name = "vddio-sdmmc3";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <3300000>;
		};

		ldo3 {
			regulator-name = "vdd-cam-hv";
			regulator-min-microvolt = <2800000>;
			regulator-max-microvolt = <2800000>;
		};

		ldo4 {
			regulator-name = "vdd-rtc";
			regulator-min-microvolt = <1250000>;
			regulator-max-microvolt = <1250000>;
			regulator-always-on;
			regulator-boot-on;
		};

		ldo5 {
			regulator-name = "avdd-ts-hv";
			regulator-min-microvolt = <3000000>;
			regulator-max-microvolt = <3000000>;
		};

		ldo6 {
			regulator-name = "vdd-ts";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
			regulator-always-on;
			regulator-boot-on;
		};

		ldo7 {
			regulator-name = "vdd-gen-pll-edp";
			regulator-min-microvolt = <1050000>;
			regulator-max-microvolt = <1050000>;
			regulator-always-on;
			regulator-boot-on;
		};

		ldo8 {
			regulator-name = "vdd-hdmi-dp";
			regulator-min-microvolt = <1050000>;
			regulator-max-microvolt = <1050000>;
		};
	};
};
```

---

# Regulator bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Regulator bindings.

This file has moved to [regulator.yaml](</kernel/hardware/devicetree-bindings/dt-regulator/regulator.md>).

---

# SKY81452 voltage regulator

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for SKY81452 voltage regulator.

## Required properties:

- regulator node named lout.
- any required generic properties defined in [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>)

## Optional properties:

- any available generic properties defined in [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>)

## Example:

```dts
	regulator {
		lout {
			regulator-name = "sky81452-lout";
			regulator-min-microvolt = <4500000>;
			regulator-max-microvolt = <8000000>;
		};
	};
```

---

# Adaptive Body Bias(ABB) SoC internal LDO regulator for Texas Instruments SoCs

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Adaptive Body Bias(ABB) SoC internal LDO regulator for Texas Instruments SoCs.

## Required Properties:

```text
- compatible: Should be one of:
  - "ti,abb-v1" for older SoCs like OMAP3
  - "ti,abb-v2" for newer SoCs like OMAP4, OMAP5
  - "ti,abb-v3" for a generic definition where setup and control registers are
     provided (example: DRA7)
- reg: Address and length of the register set for the device. It contains
  the information of registers in the same order as described by reg-names
- reg-names: Should contain the reg names
  - "base-address"	- contains base address of ABB module (ti,abb-v1,ti,abb-v2)
  - "control-address"	- contains control register address of ABB module (ti,abb-v3)
  - "setup-address"	- contains setup register address of ABB module (ti,abb-v3)
  - "int-address"	- contains address of interrupt register for ABB module
  (also see Optional properties)
- #address-cells: should be 0
- #size-cells: should be 0
- clocks: should point to the clock node used by ABB module
- ti,settling-time: Settling time in uSecs from SoC documentation for ABB module
	to settle down(target time for SR2_WTCNT_VALUE).
- ti,clock-cycles: SoC specific data about count of system ti,clock-cycles used for
	computing settling time from SoC Documentation for ABB module(clock
	cycles for SR2_WTCNT_VALUE).
- ti,tranxdone-status-mask: Mask to the int-register to write-to-clear mask
	indicating LDO tranxdone (operation complete).
- ti,abb_info: An array of 6-tuples u32 items providing information about ABB
	configuration needed per operational voltage of the device.
	Each item consists of the following in the same order:
	volt: voltage in uV - Only used to index ABB information.
	ABB mode: one of the following:
		0-bypass
		1-Forward Body Bias(FBB)
		3-Reverse Body Bias(RBB)
	efuse:	(see Optional properties)
	RBB enable efuse Mask:	(See Optional properties)
	FBB enable efuse Mask:	(See Optional properties)
	Vset value efuse Mask:	(See Optional properties)
```

```text
	NOTE: If more than 1 entry is present, then regulator is setup to change
	      voltage, allowing for various modes to be selected indexed off
	      the regulator. Further, ABB LDOs are considered always-on by
	      default.
```

## Optional Properties:

```text
- reg-names: In addition to the required properties, the following are optional
  - "efuse-address"	- Contains efuse base address used to pick up ABB info.
  - "ldo-address"	- Contains address of ABB LDO override register.
	"efuse-address" is required for this.
- ti,ldovbb-vset-mask	- Required if ldo-address is set, mask for LDO override
	register to provide override vset value.
- ti,ldovbb-override-mask - Required if ldo-address is set, mask for LDO
	override register to enable override vset value.
- ti,abb_opp_sel: Addendum to the description in required properties
	efuse: Mandatory if 'efuse-address' register is defined. Provides offset
	       from efuse-address to pick up ABB characteristics. Set to 0 if
	       'efuse-address' is not defined.
	RBB enable efuse Mask:	Optional if 'efuse-address' register is defined.
		'ABB mode' is force set to RBB mode if value at "efuse-address"
		+ efuse maps to RBB mask. Set to 0 to ignore this.
	FBB enable efuse Mask:	Optional if 'efuse-address' register is defined.
		'ABB mode' is force set to FBB mode if value at "efuse-address"
		+ efuse maps to FBB mask (valid only if RBB mask does not match)
		Set to 0 to ignore this.
	Vset value efuse Mask:	Mandatory if ldo-address is set. Picks up from
		efuse the value to set in 'ti,ldovbb-vset-mask' at ldo-address.
```

Example #1: Simplest configuration (no efuse data, hard coded ABB table):

```dts
abb_x: regulator-abb-x {
	compatible = "ti,abb-v1";
	regulator-name = "abb_x";
	#address-cells = <0>;
	#size-cells = <0>;
	reg = <0x483072f0 0x8>, <0x48306818 0x4>;
	reg-names = "base-address", "int-address";
	ti,tranxdone-status-mask = <0x4000000>;
	clocks = <&sysclk>;
	ti,settling-time = <30>;
	ti,clock-cycles = <8>;
	ti,abb_info = <
	/* uV		ABB	efuse	rbb_m	fbb_m	vset_m */
	1012500		0	0	0	0	0 /* Bypass */
	1200000		3	0	0	0	0 /* RBB mandatory */
	1320000		1	0	0	0	0 /* FBB mandatory */
	>;
};
```

Example #2: Efuse bits contain ABB mode setting (no LDO override capability)

```dts
abb_y: regulator-abb-y {
	compatible = "ti,abb-v2";
	regulator-name = "abb_y";
	#address-cells = <0>;
	#size-cells = <0>;
	reg = <0x4a307bd0 0x8>, <0x4a306014 0x4>, <0x4A002268 0x8>;
	reg-names = "base-address", "int-address", "efuse-address";
	ti,tranxdone-status-mask = <0x4000000>;
	clocks = <&sysclk>;
	ti,settling-time = <50>;
	ti,clock-cycles = <16>;
	ti,abb_info = <
	/* uV		ABB	efuse	rbb_m	fbb_m	vset_m */
	975000		0	0	0	0	0 /* Bypass */
	1012500		0	0	0x40000	0	0 /* RBB optional */
	1200000		0	0x4	0	0x40000	0 /* FBB optional */
	1320000		1	0	0	0	0 /* FBB mandatory */
	>;
};
```

Example #3: Efuse bits contain ABB mode setting and LDO override capability

```dts
abb_z: regulator-abb-z {
	compatible = "ti,abb-v2";
	regulator-name = "abb_z";
	#address-cells = <0>;
	#size-cells = <0>;
	reg = <0x4ae07ce4 0x8>, <0x4ae06010 0x4>,
	      <0x4a002194 0x8>, <0x4ae0C314 0x4>;
	reg-names = "base-address", "int-address",
		    "efuse-address", "ldo-address";
	ti,tranxdone-status-mask = <0x8000000>;
	/* LDOVBBMM_MUX_CTRL */
	ti,ldovbb-override-mask = <0x400>;
	/* LDOVBBMM_VSET_OUT */
	ti,ldovbb-vset-mask = <0x1F>;
	clocks = <&sysclk>;
	ti,settling-time = <50>;
	ti,clock-cycles = <16>;
	ti,abb_info = <
	/* uV	ABB	efuse	rbb_m	fbb_m	vset_m */
	975000	0	0	0	0	0	/* Bypass */
	1200000	0	0x4	0	0x40000	0x1f00	/* FBB optional, vset */
	>;
};
```

---

# TPS51632 Voltage regulators

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for TPS51632 Voltage regulators.

## Required properties:

- compatible: Must be "ti,tps51632"
- reg: I2C slave address

## Optional properties:

- ti,enable-pwm-dvfs: Enable the DVFS voltage control through the PWM interface.
- ti,dvfs-step-20mV: The 20mV step voltage when PWM DVFS enabled. Missing this
  will set 10mV step voltage in PWM DVFS mode. In normal mode, the voltage
  step is 10mV as per datasheet.

Any property defined as part of the core regulator binding, defined in
[regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>), can also be used.

## Example:

```dts
	tps51632 {
		compatible = "ti,tps51632";
		reg =  <0x43>;
		regulator-name = "tps51632-vout";
		regulator-min-microvolt = <500000>;
		regulator-max-microvolt = <1500000>;
		regulator-boot-on;
		ti,enable-pwm-dvfs;
		ti,dvfs-step-20mV;
	};
```

---

# TPS65023 family of regulators

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for TPS65023 family of regulators.

## Required properties:

- compatible: Must be one of the following.
  "ti,tps65020",
  "ti,tps65021",
  "ti,tps65023",
- reg: I2C slave address
- regulators: list of regulators provided by this controller, must be named
  after their hardware counterparts: VDCDC\[1-3\] and LDO\[1-2\]
- regulators: This is the list of child nodes that specify the regulator
  initialization data for defined regulators. The definition for each of
  these nodes is defined using the standard binding for regulators found at
  [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

Each regulator is defined using the standard binding for regulators.

## Example:

```dts
	tps65023@48 {
		compatible = "ti,tps65023";
		reg = <0x48>;

		regulators {
			VDCDC1 {
				regulator-name = "vdd_mpu";
				regulator-always-on;
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <1200000>;
			};

			VDCDC2 {
				regulator-name = "vdd_core";
				regulator-always-on;
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
			};

			VDCDC3 {
				regulator-name = "vdd_io";
				regulator-always-on;
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
			};

			LDO1 {
				regulator-name = "vdd_usb18";
				regulator-always-on;
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
			};

			LDO2 {
				regulator-name = "vdd_usb33";
				regulator-always-on;
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
			};
		};
	};
```

---

# TPS65090 regulators

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for TPS65090 regulators.

## Required properties:

- compatible: "ti,tps65090"
- reg: I2C slave address
- interrupts: the interrupt outputs of the controller
- regulators: A node that houses a sub-node for each regulator within the
  device. Each sub-node is identified using the node's name, with valid
  values listed below. The content of each sub-node is defined by the
  standard binding for regulators; see [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).
  dcdc\[1-3\], fet\[1-7\] and ldo\[1-2\] respectively.
- vsys\[1-3\]-supply: The input supply for DCDC\[1-3\] respectively.
- infet\[1-7\]-supply: The input supply for FET\[1-7\] respectively.
- vsys-l\[1-2\]-supply: The input supply for LDO\[1-2\] respectively.

## Optional properties:

- ti,enable-ext-control: This is applicable for DCDC1, DCDC2 and DCDC3.
  If DCDCs are externally controlled then this property should be there.
- dcdc-ext-control-gpios: This is applicable for DCDC1, DCDC2 and DCDC3.
  If DCDCs are externally controlled and if it is from GPIO then GPIO
  number should be provided. If it is externally controlled and no GPIO
  entry then driver will just configure this rails as external control
  and will not provide any enable/disable APIs.
- ti,overcurrent-wait: This is applicable to FET registers, which have a
  poorly defined "overcurrent wait" field.  If this property is present it
  should be between 0 - 3.  If this property isn't present we won't touch the
  "overcurrent wait" field and we'll leave it to the BIOS/EC to deal with.

Each regulator is defined using the standard binding for regulators.

## Example:

```dts
	tps65090@48 {
		compatible = "ti,tps65090";
		reg = <0x48>;
		interrupts = <0 88 0x4>;

		vsys1-supply = <&some_reg>;
		vsys2-supply = <&some_reg>;
		vsys3-supply = <&some_reg>;
		infet1-supply = <&some_reg>;
		infet2-supply = <&some_reg>;
		infet3-supply = <&some_reg>;
		infet4-supply = <&some_reg>;
		infet5-supply = <&some_reg>;
		infet6-supply = <&some_reg>;
		infet7-supply = <&some_reg>;
		vsys-l1-supply = <&some_reg>;
		vsys-l2-supply = <&some_reg>;

		regulators {
			dcdc1 {
				regulator-name = "dcdc1";
				regulator-boot-on;
				regulator-always-on;
				ti,enable-ext-control;
				dcdc-ext-control-gpios = <&gpio 10 0>;
			};

			dcdc2 {
				regulator-name = "dcdc2";
				regulator-boot-on;
				regulator-always-on;
			};

			dcdc3 {
				regulator-name = "dcdc3";
				regulator-boot-on;
				regulator-always-on;
			};

			fet1 {
				regulator-name = "fet1";
				regulator-boot-on;
				regulator-always-on;
			};

			fet2 {
				regulator-name = "fet2";
				regulator-boot-on;
				regulator-always-on;
			};

			fet3 {
				regulator-name = "fet3";
				regulator-boot-on;
				regulator-always-on;
			};

			fet4 {
				regulator-name = "fet4";
				regulator-boot-on;
				regulator-always-on;
			};

			fet5 {
				regulator-name = "fet5";
				regulator-boot-on;
				regulator-always-on;
			};

			fet6 {
				regulator-name = "fet6";
				regulator-boot-on;
				regulator-always-on;
			};

			fet7 {
				regulator-name = "fet7";
				regulator-boot-on;
				regulator-always-on;
			};

			ldo1 {
				regulator-name = "ldo1";
				regulator-boot-on;
				regulator-always-on;
			};

			ldo2 {
				regulator-name = "ldo2";
				regulator-boot-on;
				regulator-always-on;
			};
		};
	};
```

---

# TPS65217 family of regulators

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for TPS65217 family of regulators.

## Required properties:

- compatible: "ti,tps65217"
- reg: I2C slave address
- regulators: list of regulators provided by this controller, must be named
  after their hardware counterparts: dcdc\[1-3\] and ldo\[1-4\]
- regulators: This is the list of child nodes that specify the regulator
  initialization data for defined regulators. Not all regulators for the given
  device need to be present. The definition for each of these nodes is defined
  using the standard binding for regulators found at
  [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

## Optional properties:

- ti,pmic-shutdown-controller: Telling the PMIC to shutdown on PWR\_EN toggle.

## The valid names for regulators are:

```text
  tps65217: dcdc1, dcdc2, dcdc3, ldo1, ldo2, ldo3 and ldo4
```

Each regulator is defined using the standard binding for regulators.

## Example:

```dts
	tps: tps@24 {
		compatible = "ti,tps65217";
		ti,pmic-shutdown-controller;

		regulators {
			dcdc1_reg: dcdc1 {
				regulator-min-microvolt = <900000>;
				regulator-max-microvolt = <1800000>;
				regulator-boot-on;
				regulator-always-on;
			};

			dcdc2_reg: dcdc2 {
				regulator-min-microvolt = <900000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
				regulator-always-on;
			};

			dcdc3_reg: dcc3 {
				regulator-min-microvolt = <900000>;
				regulator-max-microvolt = <1500000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldo1_reg: ldo1 {
				regulator-min-microvolt = <1000000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldo2_reg: ldo2 {
				regulator-min-microvolt = <900000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldo3_reg: ldo3 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldo4_reg: ldo4 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
				regulator-always-on;
			};
		};
	};
```

---

# TPS65218 family of regulators

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for TPS65218 family of regulators.

## Required properties:

- compatible: "ti,tps65218"
- reg: I2C slave address

- List of regulators provided by this controller, must be named
  after their hardware counterparts: dcdc\[1-6\] and ldo1
- This is the list of child nodes that specify the regulator
  initialization data for defined regulators. Not all regulators for the given
  device need to be present. The definition for each of these nodes is defined
  using the standard binding for regulators found at [./regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

## The valid names for regulators are:

```text
  tps65217: regulator-dcdc1, regulator-dcdc2, regulator-dcdc3, regulator-dcdc4,
  regulator-dcdc5, regulator-dcdc6, regulator-ldo1, regulator-ls3.
  Each regulator is defined using the standard binding for regulators.
```

## Example:

```dts
tps65218: tps65218@24 {
	reg = <0x24>;
	compatible = "ti,tps65218";
	interrupts = <GIC_SPI 7 IRQ_TYPE_NONE>; /* NMIn */
	interrupt-controller;
	#interrupt-cells = <2>;

	dcdc1: regulator-dcdc1 {
		regulator-name = "vdd_core";
		regulator-min-microvolt = <912000>;
		regulator-max-microvolt = <1144000>;
		regulator-boot-on;
		regulator-always-on;
	};

	dcdc2: regulator-dcdc2 {
		regulator-name = "vdd_mpu";
		regulator-min-microvolt = <912000>;
		regulator-max-microvolt = <1378000>;
		regulator-boot-on;
		regulator-always-on;
	};

	dcdc3: regulator-dcdc3 {
		regulator-name = "vdcdc3";
		regulator-min-microvolt = <1500000>;
		regulator-max-microvolt = <1500000>;
		regulator-boot-on;
		regulator-always-on;
	};

	dcdc5: regulator-dcdc5 {
		regulator-name = "v1_0bat";
		regulator-min-microvolt = <1000000>;
		regulator-max-microvolt = <1000000>;
		regulator-boot-on;
		regulator-always-on;
	};

	dcdc6: regulator-dcdc6 {
		regulator-name = "v1_8bat";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
		regulator-boot-on;
		regulator-always-on;
	};

	ldo1: regulator-ldo1 {
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
		regulator-boot-on;
		regulator-always-on;
	};

	ls2: regulator-ls2 {
		regulator-min-microamp = <100000>;
		regulator-max-microamp = <1000000>;
	};

	ls3: regulator-ls3 {
		regulator-min-microamp = <100000>;
		regulator-max-microamp = <1000000>;
	};
};
```

---

# TPS6586x family of regulators

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for TPS6586x family of regulators.

## Required properties:

- compatible: "ti,tps6586x"
- reg: I2C slave address
- interrupts: the interrupt outputs of the controller
- #gpio-cells: number of cells to describe a GPIO
- gpio-controller: mark the device as a GPIO controller
- regulators: A node that houses a sub-node for each regulator within the
  device. Each sub-node is identified using the node's name (or the deprecated
  regulator-compatible property if present), with valid values listed below.
  The content of each sub-node is defined by the standard binding for
  regulators; see [regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).
  sys, sm\[0-2\], ldo\[0-9\] and ldo\_rtc
- sys-supply: The input supply for SYS.
- vin-sm0-supply: The input supply for the SM0.
- vin-sm1-supply: The input supply for the SM1.
- vin-sm2-supply: The input supply for the SM2.
- vinldo01-supply: The input supply for the LDO1 and LDO2
- vinldo23-supply: The input supply for the LDO2 and LDO3
- vinldo4-supply: The input supply for the LDO4
- vinldo678-supply: The input supply for the LDO6, LDO7 and LDO8
- vinldo9-supply: The input supply for the LDO9

## Optional properties:

- ti,system-power-controller: Telling whether or not this pmic is controlling
  the system power.

Each regulator is defined using the standard binding for regulators.

Note: LDO5 and LDO\_RTC is supplied by SYS regulator internally and driver

```text
      take care of making proper parent child relationship.
```

## Example:

```dts
	pmu: tps6586x@34 {
		compatible = "ti,tps6586x";
		reg = <0x34>;
		interrupts = <0 88 0x4>;

		#gpio-cells = <2>;
		gpio-controller;

		ti,system-power-controller;

		sys-supply = <&some_reg>;
		vin-sm0-supply = <&some_reg>;
		vin-sm1-supply = <&some_reg>;
		vin-sm2-supply = <&some_reg>;
		vinldo01-supply = <...>;
		vinldo23-supply = <...>;
		vinldo4-supply = <...>;
		vinldo678-supply = <...>;
		vinldo9-supply = <...>;

		regulators {
			sys_reg: sys {
				regulator-name = "vdd_sys";
				regulator-boot-on;
				regulator-always-on;
			};

			sm0_reg: sm0 {
				regulator-min-microvolt = < 725000>;
				regulator-max-microvolt = <1500000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sm1_reg: sm1 {
				regulator-min-microvolt = < 725000>;
				regulator-max-microvolt = <1500000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sm2_reg: sm2 {
				regulator-min-microvolt = <3000000>;
				regulator-max-microvolt = <4550000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldo0_reg: ldo0 {
				regulator-name = "PCIE CLK";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
			};

			ldo1_reg: ldo1 {
				regulator-min-microvolt = < 725000>;
				regulator-max-microvolt = <1500000>;
			};

			ldo2_reg: ldo2 {
				regulator-min-microvolt = < 725000>;
				regulator-max-microvolt = <1500000>;
			};

			ldo3_reg: ldo3 {
				regulator-min-microvolt = <1250000>;
				regulator-max-microvolt = <3300000>;
			};

			ldo4_reg: ldo4 {
				regulator-min-microvolt = <1700000>;
				regulator-max-microvolt = <2475000>;
			};

			ldo5_reg: ldo5 {
				regulator-min-microvolt = <1250000>;
				regulator-max-microvolt = <3300000>;
			};

			ldo6_reg: ldo6 {
				regulator-min-microvolt = <1250000>;
				regulator-max-microvolt = <3300000>;
			};

			ldo7_reg: ldo7 {
				regulator-min-microvolt = <1250000>;
				regulator-max-microvolt = <3300000>;
			};

			ldo8_reg: ldo8 {
				regulator-min-microvolt = <1250000>;
				regulator-max-microvolt = <3300000>;
			};

			ldo9_reg: ldo9 {
				regulator-min-microvolt = <1250000>;
				regulator-max-microvolt = <3300000>;
			};
		};
	};
```

---

# Versatile Express voltage regulators

_Peios Kernel / Hardware and drivers / Device tree / bindings/regulator_

> Device-tree binding reference for Versatile Express voltage regulators.

## Requires node properties:

- "compatible" value: "arm,vexpress-volt"
- "arm,vexpress-sysreg,func" when controlled via vexpress-sysreg
  (see [Documentation/devicetree/bindings/arm/vexpress-config.yaml](</kernel/hardware/devicetree-bindings/dt-arm/vexpress-config.md>)
  for more details)

## Required regulator properties:

- "regulator-name"
- "regulator-always-on"

## Optional regulator properties:

- "regulator-min-microvolt"
- "regulator-max-microvolt"

See [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>)
for more details about the regulator properties.

When no "regulator-\[min|max\]-microvolt" properties are defined,
the device is treated as fixed (or rather "read-only") regulator.

## Example:

```dts
	volt@0 {
		compatible = "arm,vexpress-volt";
		arm,vexpress-sysreg,func = <2 0>;
		regulator-name = "Cores";
		regulator-min-microvolt = <800000>;
		regulator-max-microvolt = <1050000>;
		regulator-always-on;
	};
```

---

# Qualcomm Hexagon Peripheral Image Loader

_Peios Kernel / Hardware and drivers / Device tree / bindings/remoteproc_

> Device-tree binding reference for Qualcomm Hexagon Peripheral Image Loader.

This document defines the binding for a component that loads and boots firmware
on the Qualcomm Hexagon core.

- compatible:
  Usage: required
  Value type: &lt;string&gt;
  Definition: must be one of:
  "qcom,ipq8074-wcss-pil"
  "qcom,qcs404-wcss-pil"

- reg:
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: must specify the base address and size of the qdsp6 and
  rmb register blocks

- reg-names:
  Usage: required
  Value type: &lt;stringlist&gt;
  Definition: must be "q6dsp" and "rmb"

- interrupts-extended:
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: reference to the interrupts that match interrupt-names

- interrupt-names:
  Usage: required
  Value type: &lt;stringlist&gt;
  Definition: must be "wdog", "fatal", "ready", "handover", "stop-ack"

- clocks:
  Usage: required
  Value type: &lt;phandle&gt;
  Definition: reference to the clocks that match clock-names

- clock-names:
  Usage: required
  Value type: &lt;stringlist&gt;
  Definition: The clocks needed depend on the compatible string:
  qcom,ipq8074-wcss-pil:
  no clock names required
  qcom,qcs404-wcss-pil:
  must be "xo", "gcc\_abhs\_cbcr", "gcc\_abhs\_cbcr",
  "gcc\_axim\_cbcr", "lcc\_ahbfabric\_cbc", "tcsr\_lcc\_cbc",
  "lcc\_abhs\_cbc", "lcc\_tcm\_slave\_cbc", "lcc\_abhm\_cbc",
  "lcc\_axim\_cbc", "lcc\_bcr\_sleep"

- resets:
  Usage: required
  Value type: &lt;phandle&gt;
  Definition: reference to the list of 3 reset-controllers for the
  wcss sub-system

- reset-names:
  Usage: required
  Value type: &lt;stringlist&gt;
  Definition: must be "wcss\_aon\_reset", "wcss\_reset", "wcss\_q6\_reset"
  for the wcss sub-system

- memory-region:
  Usage: required
  Value type: &lt;phandle&gt;
  Definition: reference to wcss reserved-memory region.

For the compatible string below the following supplies are required:
  "qcom,qcs404-wcss-pil"

- cx-supply:
  Usage: required
  Value type: &lt;phandle&gt;
  Definition: reference to the regulators to be held on behalf of the
  booting of the Hexagon core

- qcom,smem-states:
  Usage: required
  Value type: &lt;phandle&gt;
  Definition: reference to the smem state for requesting the Hexagon to
  shut down

- qcom,smem-state-names:
  Usage: required
  Value type: &lt;stringlist&gt;
  Definition: must be "stop"

- qcom,halt-regs:
  Usage: required
  Value type: &lt;prop-encoded-array&gt;
  Definition: a phandle reference to a syscon representing TCSR followed
  by the three offsets within syscon for q6, wcss and nc
  halt registers.

- memory-region:
  Usage: required
  Value type: &lt;phandle&gt;
  Definition: reference to the reserved-memory for the region

The Hexagon node may also have an subnode named either "smd-edge" or
"glink-edge" that describes the communication edge, channels and devices
related to the Hexagon.  See [../soc/qcom/qcom,smd.yaml](</kernel/hardware/devicetree-bindings/dt-soc/qcom/qcom-smd.md>) and
../soc/qcom/qcom,glink.txt for details on how to describe these.

---

# STMicroelectronics Co-Processor Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/remoteproc_

> Device-tree binding reference for STMicroelectronics Co-Processor Bindings.

This binding provides support for adjunct processors found on ST SoCs.

Co-processors can be controlled from the bootloader or the primary OS. If
the bootloader starts a co-processor, the primary OS must detect its state
and act accordingly.

## Required properties:

- compatible		Should be one of:
  "st,st231-rproc"
  "st,st40-rproc"
- memory-region		Reserved memory (See: [../reserved-memory/reserved-memory.txt](</kernel/hardware/devicetree/bindings-reserved-memory/reserved-memory.md>))
- resets		Reset lines (See: [../reset/reset.txt](</kernel/hardware/devicetree/bindings-reset/reset.md>))
- reset-names		Must be "sw\_reset" and "pwr\_reset"
- clocks		Clock for co-processor (See: [../clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>))
- clock-frequency	Clock frequency to set co-processor at if the bootloader
  hasn't already done so
- st,syscfg		System configuration register which holds the boot vector
  for the co-processor
  1st cell: Phandle to syscon block
  2nd cell: Boot vector register offset

## Example:

```dts
	audio_reserved: rproc@42000000 {
		compatible = "shared-dma-pool";
		reg = <0x42000000 0x01000000>;
		no-map;
	};
```

```dts
	st231-audio {
		compatible	= "st,st231-rproc";
		memory-region	= <&audio_reserved>;
		resets		= <&softreset STIH407_ST231_AUD_SOFTRESET>;
		reset-names	= "sw_reset";
		clocks		= <&clk_s_c0_flexgen CLK_ST231_AUD_0>;
		clock-frequency	= <600000000>;
		st,syscfg	= <&syscfg_core 0x228>;
	};
```

---

# TI Davinci DSP devices

_Peios Kernel / Hardware and drivers / Device tree / bindings/remoteproc_

> Device-tree binding reference for TI Davinci DSP devices.

The TI Davinci family of SoCs usually contains a TI DSP Core sub-system that
is used to offload some of the processor-intensive tasks or algorithms, for
achieving various system level goals.

The processor cores in the sub-system usually contain additional sub-modules
like L1 and/or L2 caches/SRAMs, an Interrupt Controller, an external memory
controller, a dedicated local power/sleep controller etc. The DSP processor
core used in Davinci SoCs is usually a C674x DSP CPU.

## DSP Device Node:

Each DSP Core sub-system is represented as a single DT node.

## Required properties:

The following are the mandatory properties:

- compatible:		Should be one of the following,
  "ti,da850-dsp" for DSPs on OMAP-L138 SoCs

- reg:			Should contain an entry for each value in 'reg-names'.
  Each entry should have the memory region's start address
  and the size of the region, the representation matching
  the parent node's '#address-cells' and '#size-cells' values.

- reg-names:		Should contain strings with the following names, each
  representing a specific internal memory region or a
  specific register space,
  "l2sram", "l1pram", "l1dram", "host1cfg", "chipsig\_base"

- interrupts: 		Should contain the interrupt number used to receive the
  interrupts from the DSP. The value should follow the
  interrupt-specifier format as dictated by the
  'interrupt-parent' node.

- memory-region:	phandle to the reserved memory node to be associated
  with the remoteproc device. The reserved memory node
  can be a CMA memory node, and should be defined as
  per the bindings in
  [Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt](</kernel/hardware/devicetree/bindings-reserved-memory/reserved-memory.md>)

## Example:

```text
	/* DSP Reserved Memory node */
	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
```

```dts
		dsp_memory_region: dsp-memory@c3000000 {
			compatible = "shared-dma-pool";
			reg = <0xc3000000 0x1000000>;
			reusable;
		};
	};
```

```text
	/* DSP node */
	{
		dsp: dsp@11800000 {
			compatible = "ti,da850-dsp";
			reg = <0x11800000 0x40000>,
			      <0x11e00000 0x8000>,
			      <0x11f00000 0x8000>,
			      <0x01c14044 0x4>,
			      <0x01c14174 0x8>;
			reg-names = "l2sram", "l1pram", "l1dram", "host1cfg",
				    "chipsig";
			interrupt-parent = <&intc>;
			interrupts = <28>;
			memory-region = <&dsp_memory_region>;
		};
	};
```

---

# TI Keystone DSP devices

_Peios Kernel / Hardware and drivers / Device tree / bindings/remoteproc_

> Device-tree binding reference for TI Keystone DSP devices.

The TI Keystone 2 family of SoCs usually have one or more (upto 8) TI DSP Core
sub-systems that are used to offload some of the processor-intensive tasks or
algorithms, for achieving various system level goals.

These processor sub-systems usually contain additional sub-modules like L1
and/or L2 caches/SRAMs, an Interrupt Controller, an external memory controller,
a dedicated local power/sleep controller etc. The DSP processor core in
Keystone 2 SoCs is usually a TMS320C66x CorePac processor.

## DSP Device Node:

Each DSP Core sub-system is represented as a single DT node, and should also
have an alias with the stem 'rproc' defined. Each node has a number of required
or optional properties that enable the OS running on the host processor (ARM
CorePac) to perform the device management of the remote processor and to
communicate with the remote processor.

## Required properties:

The following are the mandatory properties:

- compatible:		Should be one of the following,
  "ti,k2hk-dsp" for DSPs on Keystone 2 66AK2H/K SoCs
  "ti,k2l-dsp" for DSPs on Keystone 2 66AK2L SoCs
  "ti,k2e-dsp" for DSPs on Keystone 2 66AK2E SoCs
  "ti,k2g-dsp" for DSPs on Keystone 2 66AK2G SoCs

- reg:			Should contain an entry for each value in 'reg-names'.
  Each entry should have the memory region's start address
  and the size of the region, the representation matching
  the parent node's '#address-cells' and '#size-cells' values.

- reg-names:		Should contain strings with the following names, each
  representing a specific internal memory region, and
  should be defined in this order,
  "l2sram", "l1pram", "l1dram"

- ti,syscon-dev:	Should be a pair of the phandle to the Keystone Device
  State Control node, and the register offset of the DSP
  boot address register within that node's address space.

- resets:		Should contain the phandle to the reset controller node
  managing the resets for this device, and a reset
  specifier. Please refer to either of the following reset
  bindings for the reset argument specifier as per SoC,
  [Documentation/devicetree/bindings/reset/ti-syscon-reset.txt](</kernel/hardware/devicetree/bindings-reset/ti-syscon-reset.md>)
  for 66AK2HK/66AK2L/66AK2E SoCs or,
  [Documentation/devicetree/bindings/reset/ti,sci-reset.yaml](</kernel/hardware/devicetree-bindings/dt-reset/ti-sci-reset.md>)
  for 66AK2G SoCs

- interrupts: 		Should contain an entry for each value in 'interrupt-names'.
  Each entry should have the interrupt source number used by
  the remote processor to the host processor. The values should
  follow the interrupt-specifier format as dictated by the
  'interrupt-parent' node. The purpose of each is as per the
  description in the 'interrupt-names' property.

- interrupt-names:	Should contain strings with the following names, each
  representing a specific interrupt,
  "vring" - interrupt for virtio based IPC
  "exception" - interrupt for exception notification

- kick-gpios: 		Should specify the gpio device needed for the virtio IPC
  stack. This will be used to interrupt the remote processor.
  The gpio device to be used is as per the bindings in,
  [Documentation/devicetree/bindings/gpio/ti,keystone-dsp-gpio.yaml](</kernel/hardware/devicetree-bindings/dt-gpio/ti-keystone-dsp-gpio.md>)

## SoC-specific Required properties:

The following are mandatory properties for Keystone 2 66AK2HK, 66AK2L and 66AK2E
SoCs only:

- clocks: 		Should contain the device's input clock, and should be
  defined as per the bindings in,
  [Documentation/devicetree/bindings/clock/keystone-gate.txt](</kernel/hardware/devicetree/bindings-clock/keystone-gate.md>)

The following are mandatory properties for Keystone 2 66AK2G SoCs only:

- power-domains:	Should contain a phandle to a PM domain provider node
  and an args specifier containing the DSP device id
  value. This property is as per the binding,
  [Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml](</kernel/hardware/devicetree-bindings/dt-soc/ti/sci-pm-domain.md>)

## Optional properties:

- memory-region:	phandle to the reserved memory node to be associated
  with the remoteproc device. The reserved memory node
  can be a CMA memory node, and should be defined as
  per the bindings in
  [Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt](</kernel/hardware/devicetree/bindings-reserved-memory/reserved-memory.md>)

## Examples:

```text
1.
	/* 66AK2H/K DSP aliases */
	aliases {
		rproc0 = &dsp0;
		rproc1 = &dsp1;
		rproc2 = &dsp2;
		rproc3 = &dsp3;
		rproc4 = &dsp4;
		rproc5 = &dsp5;
		rproc6 = &dsp6;
		rproc7 = &dsp7;
	};
```

```text
	/* 66AK2H/K DSP memory node */
	reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;
```

```dts
		dsp_common_memory: dsp-common-memory@81f800000 {
			compatible = "shared-dma-pool";
			reg = <0x00000008 0x1f800000 0x00000000 0x800000>;
			reusable;
		};
	};
```

```text
	/* 66AK2H/K DSP node */
	soc {
		dsp0: dsp@10800000 {
			compatible = "ti,k2hk-dsp";
			reg = <0x10800000 0x00100000>,
			      <0x10e00000 0x00008000>,
			      <0x10f00000 0x00008000>;
			reg-names = "l2sram", "l1pram", "l1dram";
			clocks = <&clkgem0>;
			ti,syscon-dev = <&devctrl 0x40>;
			resets = <&pscrst 0>;
			interrupt-parent = <&kirq0>;
			interrupts = <0 8>;
			interrupt-names = "vring", "exception";
			kick-gpios = <&dspgpio0 27 0>;
			memory-region = <&dsp_common_memory>;
		};
```

```dts
	};
```

```text
2.
	/* 66AK2G DSP alias */
	aliases {
		rproc0 = &dsp0;
	};
```

```text
	/* 66AK2G DSP memory node */
	reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;
```

```dts
		dsp_common_memory: dsp-common-memory@81f800000 {
			compatible = "shared-dma-pool";
			reg = <0x00000008 0x1f800000 0x00000000 0x800000>;
			reusable;
		};
	};
```

```text
	/* 66AK2G DSP node */
	soc {
		dsp0: dsp@10800000 {
			compatible = "ti,k2g-dsp";
			reg = <0x10800000 0x00100000>,
			      <0x10e00000 0x00008000>,
			      <0x10f00000 0x00008000>;
			reg-names = "l2sram", "l1pram", "l1dram";
			power-domains = <&k2g_pds 0x0046>;
			ti,syscon-dev = <&devctrl 0x40>;
			resets = <&k2g_reset 0x0046 0x1>;
			interrupt-parent = <&kirq0>;
			interrupts = <0 8>;
			interrupt-names = "vring", "exception";
			kick-gpios = <&dspgpio0 27 0>;
			memory-region = <&dsp_common_memory>;
		};
	};
```

---

# TI Wakeup M3 Remoteproc Driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/remoteproc_

> Device-tree binding reference for TI Wakeup M3 Remoteproc Driver.

The TI AM33xx and AM43xx family of devices use a small Cortex M3 co-processor
(commonly referred to as Wakeup M3 or CM3) to help with various low power tasks
that cannot be controlled from the MPU. This CM3 processor requires a firmware
binary to accomplish this. The wkup\_m3 remoteproc driver handles the loading of
the firmware and booting of the CM3.

## Wkup M3 Device Node:

A wkup\_m3 device node is used to represent the Wakeup M3 processor instance
within the SoC. It is added as a child node of the parent interconnect bus
(l4\_wkup) through which it is accessible to the MPU.

## Required properties:

- compatible:		Should be one of,
  "ti,am3352-wkup-m3" for AM33xx SoCs
  "ti,am4372-wkup-m3" for AM43xx SoCs
- reg:			Should contain the address ranges for the two internal
  memory regions, UMEM and DMEM. The parent node should
  provide an appropriate ranges property for properly
  translating these into bus addresses.
- reg-names:		Contains the corresponding names for the two memory
  regions. These should be named "umem" &amp; "dmem".
- ti,hwmods:		Name of the hwmod associated with the wkupm3 device.
- ti,pm-firmware:	Name of firmware file to be used for loading and
  booting the wkup\_m3 remote processor.

## Example:

/\* AM33xx \*/

```dts
ocp {
	 l4_wkup: l4_wkup@44c00000 {
		compatible = "am335-l4-wkup", "simple-bus";
		ranges = <0 0x44c00000 0x400000>;
		#address-cells = <1>;
		#size-cells = <1>;

		wkup_m3: wkup_m3@100000 {
			compatible = "ti,am3352-wkup-m3";
			reg = <0x100000 0x4000>,
			      <0x180000 0x2000>;
			reg-names = "umem", "dmem";
			ti,hwmods = "wkup_m3";
			ti,pm-firmware = "am335x-pm-firmware.elf";
		};
	};

	...
};
```

---

# Reserved memory bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/reserved-memory_

> Device-tree binding reference for Reserved memory bindings.

This file has been moved to reserved-memory.yaml in the dtschema repository.

---

# Xen hypervisor reserved-memory binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/reserved-memory_

> Device-tree binding reference for Xen hypervisor reserved-memory binding.

Expose one or more memory regions as reserved-memory to the guest
virtual machine. Typically, a region is configured at VM creation time
to be a shared memory area across multiple virtual machines for
communication among them.

For each of these pre-shared memory regions, a range is exposed under
the /reserved-memory node as a child node. Each range sub-node is named
xen-shmem@&lt;address&gt; and has the following properties:

```text
- compatible:
	compatible = "xen,shared-memory-v1"
```

- reg:
  the base guest physical address and size of the shared memory region

- xen,offset: (borrower VMs only)
  64 bit integer offset within the owner virtual machine's shared
  memory region used for the mapping in the borrower VM.

- xen,id:
  a string that identifies the shared memory region as specified in
  the VM config file

---

# Broadcom BCM63138 Processor Monitor Bus binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/reset_

> Device-tree binding reference for Broadcom BCM63138 Processor Monitor Bus binding.

Please also refer to [reset.txt](</kernel/hardware/devicetree/bindings-reset/reset.md>) in this directory for common reset
controller binding usage.

## Require properties:

- compatible: must be "brcm,bcm63138-pmb"
- reg: base register address and size for this bus controller
- #reset-cells: must be 2 first cell is the address within the bus instance designated
  by the phandle, and the second is the number of zones for this peripheral

## Example:

```dts
	pmb0: reset-controller@4800c0 {
		compatible = "brcm,bcm63138-pmb";
		reg = <0x4800c0 0x10>;
		#reset-cells = <2>;
	};
```

---

# Pistachio Reset Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/reset_

> Device-tree binding reference for Pistachio Reset Controller.

This binding describes a reset controller device that is used to enable and
disable individual IP blocks within the Pistachio SoC using "soft reset"
control bits found in the Pistachio SoC top level registers.

The actual action taken when soft reset is asserted is hardware dependent.
However, when asserted it may not be possible to access the hardware's
registers, and following an assert/deassert sequence the hardware's previous
state may no longer be valid.

Please refer to [Documentation/devicetree/bindings/reset/reset.txt](</kernel/hardware/devicetree/bindings-reset/reset.md>)
for common reset controller binding usage.

## Required properties:

- compatible: Contains "img,pistachio-reset"

- #reset-cells: Contains 1

## Example:

```dts
	cr_periph: clk@18148000 {
		compatible = "img,pistachio-cr-periph", "syscon", "simple-mfd";
		reg = <0x18148000 0x1000>;
		clocks = <&clk_periph PERIPH_CLK_SYS>;
		clock-names = "sys";
		#clock-cells = <1>;

		pistachio_reset: reset-controller {
			compatible = "img,pistachio-reset";
			#reset-cells = <1>;
		};
	};
```

## Specifying reset control of devices

Device nodes should specify the reset channel required in their "resets"
property, containing a phandle to the pistachio reset device node and an
index specifying which reset to use, as described in
[Documentation/devicetree/bindings/reset/reset.txt](</kernel/hardware/devicetree/bindings-reset/reset.md>).

## Example:

```dts
	spdif_out: spdif-out@18100d00 {
		...
		resets = <&pistachio_reset PISTACHIO_RESET_SPDIF_OUT>;
		reset-names = "rst";
		...
	};
```

Macro definitions for the supported resets can be found in:
include/dt-bindings/reset/pistachio-resets.h

---

# = Reset Signal Device Tree Bindings =

_Peios Kernel / Hardware and drivers / Device tree / bindings/reset_

> Device-tree binding reference for = Reset Signal Device Tree Bindings =.

This binding is intended to represent the hardware reset signals present
internally in most IC (SoC, FPGA, ...) designs. Reset signals for whole
standalone chips are most likely better represented as GPIOs, although there
are likely to be exceptions to this rule.

Hardware blocks typically receive a reset signal. This signal is generated by
a reset provider (e.g. power management or clock module) and received by a
reset consumer (the module being reset, or a module managing when a sub-
ordinate module is reset). This binding exists to represent the provider and
consumer, and provide a way to couple the two together.

A reset signal is represented by the phandle of the provider, plus a reset
specifier - a list of DT cells that represents the reset signal within the
provider. The length (number of cells) and semantics of the reset specifier
are dictated by the binding of the reset provider, although common schemes
are described below.

A word on where to place reset signal consumers in device tree: It is possible
in hardware for a reset signal to affect multiple logically separate HW blocks
at once. In this case, it would be unwise to represent this reset signal in
the DT node of each affected HW block, since if activated, an unrelated block
may be reset. Instead, reset signals should be represented in the DT node
where it makes most sense to control it; this may be a bus node if all
children of the bus are affected by the reset signal, or an individual HW
block node for dedicated reset signals. The intent of this binding is to give
appropriate software access to the reset signals in order to manage the HW,
rather than to slavishly enumerate the reset signal that affects each HW
block.

= Reset providers =

## Required properties:

#reset-cells:	Number of cells in a reset specifier; Typically 0 for nodes

```text
		with a single reset output and 1 for nodes with multiple
		reset outputs.
```

## For example:

```dts
	rst: reset-controller {
		#reset-cells = <1>;
	};
```

= Reset consumers =

## Required properties:

resets:		List of phandle and reset specifier pairs, one pair

```text
		for each reset signal that affects the device, or that the
		device manages. Note: if the reset provider specifies '0' for
		#reset-cells, then only the phandle portion of the pair will
		appear.
```

## Optional properties:

reset-names:	List of reset signal name strings sorted in the same order as

```text
		the resets property. Consumers drivers will use reset-names to
		match reset signal names with reset specifiers.
```

## For example:

```dts
	device {
		resets = <&rst 20>;
		reset-names = "reset";
	};
```

This represents a device with a single reset signal named "reset".

```dts
	bus {
		resets = <&rst 10> <&rst 11> <&rst 12> <&rst 11>;
		reset-names = "i2s1", "i2s2", "dma", "mixer";
	};
```

This represents a bus that controls the reset signal of each of four sub-
ordinate devices. Consider for example a bus that fails to operate unless no
child device has reset asserted.

---

# Binding for the Synopsys HSDK reset controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/reset_

> Device-tree binding reference for Binding for the Synopsys HSDK reset controller.

This binding uses the common reset binding\[1\].

\[1\] [Documentation/devicetree/bindings/reset/reset.txt](</kernel/hardware/devicetree/bindings-reset/reset.md>)

## Required properties:

- compatible: should be "snps,hsdk-reset".
- reg: should always contain 2 pairs address - length: first for reset
  configuration register and second for corresponding SW reset and status bits
  register.
- #reset-cells: from common reset binding; Should always be set to 1.

## Example:

```dts
	reset: reset@880 {
		compatible = "snps,hsdk-reset";
		#reset-cells = <1>;
		reg = <0x8A0 0x4>, <0xFF0 0x4>;
	};
```

## Specifying reset lines connected to IP modules:

```dts
	ethernet@.... {
		....
		resets = <&reset HSDK_V1_ETH_RESET>;
		....
	};
```

The index could be found in &lt;dt-bindings/reset/snps,hsdk-reset.h&gt;

---

# STMicroelectronics STi family Sysconfig Peripheral SoftReset Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/reset_

> Device-tree binding reference for STMicroelectronics STi family Sysconfig Peripheral SoftReset Controller.

This binding describes a reset controller device that is used to enable and
disable on-chip peripheral controllers such as USB and SATA, using
"softreset" control bits found in the STi family SoC system configuration
registers.

The actual action taken when softreset is asserted is hardware dependent.
However, when asserted it may not be possible to access the hardware's
registers and after an assert/deassert sequence the hardware's previous state
may no longer be valid.

Please refer to [reset.txt](</kernel/hardware/devicetree/bindings-reset/reset.md>) in this directory for common reset
controller binding usage.

## Required properties:

- compatible: Should be "st,stih407-softreset";
- #reset-cells: 1, see below

## example:

```dts
	softreset: softreset-controller {
		#reset-cells = <1>;
		compatible = "st,stih407-softreset";
	};
```

## Specifying softreset control of devices

Device nodes should specify the reset channel required in their "resets"
property, containing a phandle to the softreset device node and an
index specifying which channel to use, as described in [reset.txt](</kernel/hardware/devicetree/bindings-reset/reset.md>)

## example:

```dts
	ethernet0{
		resets			= <&softreset STIH415_ETH0_SOFTRESET>;
	};
```

Macro definitions for the supported reset channels can be found in:

include/dt-bindings/reset/stih407-resets.h

---

# STMicroelectronics STM32 Peripheral Reset Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/reset_

> Device-tree binding reference for STMicroelectronics STM32 Peripheral Reset Controller.

The RCC IP is both a reset and a clock controller.

Please see [Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml](</kernel/hardware/devicetree-bindings/dt-clock/st-stm32-rcc.md>)

---

# STMicroelectronics STM32MP1 Peripheral Reset Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/reset_

> Device-tree binding reference for STMicroelectronics STM32MP1 Peripheral Reset Controller.

The RCC IP is both a reset and a clock controller.

Please see [Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml](</kernel/hardware/devicetree-bindings/dt-clock/st-stm32mp1-rcc.md>)

---

# TI SysCon Reset Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/reset_

> Device-tree binding reference for TI SysCon Reset Controller.

Almost all SoCs have hardware modules that require reset control in addition
to clock and power control for their functionality. The reset control is
typically provided by means of memory-mapped I/O registers. These registers are
sometimes a part of a larger register space region implementing various
functionalities. This register range is best represented as a syscon node to
allow multiple entities to access their relevant registers in the common
register space.

A SysCon Reset Controller node defines a device that uses a syscon node
and provides reset management functionality for various hardware modules
present on the SoC.

## SysCon Reset Controller Node

Each of the reset provider/controller nodes should be a child of a syscon
node and have the following properties.

## Required properties:

- compatible		: Should be,
  "ti,k2e-pscrst"
  "ti,k2l-pscrst"
  "ti,k2hk-pscrst"
  "ti,syscon-reset"
- #reset-cells		: Should be 1. Please see the reset consumer node below
  for usage details
- ti,reset-bits	: Contains the reset control register information
  Should contain 7 cells for each reset exposed to
  consumers, defined as:
  Cell #1 : offset of the reset assert control
  register from the syscon register base
  Cell #2 : bit position of the reset in the reset
  assert control register
  Cell #3 : offset of the reset deassert control
  register from the syscon register base
  Cell #4 : bit position of the reset in the reset
  deassert control register
  Cell #5 : offset of the reset status register
  from the syscon register base
  Cell #6 : bit position of the reset in the
  reset status register
  Cell #7 : Flags used to control reset behavior,
  available flags defined in the DT include
  file &lt;dt-bindings/reset/ti-syscon.h&gt;

## SysCon Reset Consumer Nodes

Each of the reset consumer nodes should have the following properties,
in addition to their own properties.

## Required properties:

- resets	: A phandle to the reset controller node and an index number
  to a reset specifier as defined above.

Please also refer to [Documentation/devicetree/bindings/reset/reset.txt](</kernel/hardware/devicetree/bindings-reset/reset.md>) for
common reset controller usage by consumers.

## Example:

The following example demonstrates a syscon node, the reset controller node
using the syscon node, and a consumer (a DSP device) on the TI Keystone 2
66AK2E SoC.

```dts
/ {
	soc {
		psc: power-sleep-controller@2350000 {
			compatible = "syscon", "simple-mfd";
			reg = <0x02350000 0x1000>;

			pscrst: reset-controller {
				compatible = "ti,k2e-pscrst", "ti,syscon-reset";
				#reset-cells = <1>;

				ti,reset-bits = <
					0xa3c 8 0xa3c 8 0x83c 8 (ASSERT_CLEAR | DEASSERT_SET   | STATUS_CLEAR) /* 0: dsp0 */
					0xa40 5 0xa44 3 0     0 (ASSERT_SET   | DEASSERT_CLEAR | STATUS_NONE)  /* 1: example */
				>;
			};
		};

		dsp0: dsp0 {
			...
			resets = <&pscrst 0>;
			...
		};
	};
};
```

---

# Xilinx Zynq Reset Manager

_Peios Kernel / Hardware and drivers / Device tree / bindings/reset_

> Device-tree binding reference for Xilinx Zynq Reset Manager.

The Zynq AP-SoC has several different resets.

See Chapter 26 of the Zynq TRM (UG585) for more information about Zynq resets.

## Required properties:

- compatible: "xlnx,zynq-reset"
- reg: SLCR offset and size taken via syscon &lt;0x200 0x48&gt;
- syscon: &lt;&amp;slcr&gt;
  This should be a phandle to the Zynq's SLCR registers.
- #reset-cells: Must be 1

The Zynq Reset Manager needs to be a childnode of the SLCR.

## Example:

```dts
	rstc: rstc@200 {
		compatible = "xlnx,zynq-reset";
		reg = <0x200 0x48>;
		#reset-cells = <1>;
		syscon = <&slcr>;
	};
```

## Reset outputs:

```text
 0  : soft reset
 32 : ddr reset
 64 : topsw reset
 96 : dmac reset
 128: usb0 reset
 129: usb1 reset
 160: gem0 reset
 161: gem1 reset
 164: gem0 rx reset
 165: gem1 rx reset
 166: gem0 ref reset
 167: gem1 ref reset
 192: sdio0 reset
 193: sdio1 reset
 196: sdio0 ref reset
 197: sdio1 ref reset
 224: spi0 reset
 225: spi1 reset
 226: spi0 ref reset
 227: spi1 ref reset
 256: can0 reset
 257: can1 reset
 258: can0 ref reset
 259: can1 ref reset
 288: i2c0 reset
 289: i2c1 reset
 320: uart0 reset
 321: uart1 reset
 322: uart0 ref reset
 323: uart1 ref reset
 352: gpio reset
 384: lqspi reset
 385: qspi ref reset
 416: smc reset
 417: smc ref reset
 448: ocm reset
 512: fpga0 out reset
 513: fpga1 out reset
 514: fpga2 out reset
 515: fpga3 out reset
 544: a9 reset 0
 545: a9 reset 1
 552: peri reset
```

---

# Cadence Real Time Clock

_Peios Kernel / Hardware and drivers / Device tree / bindings/rtc_

> Device-tree binding reference for Cadence Real Time Clock.

The Cadence RTC controller with date, time and alarm capabilities.
The alarm may wake the system from low-power state.

## Required properties:

```text
- compatible: Should be "cdns,rtc-r109v3"
- reg: Specifies base physical address and size of the register area.
- interrupts: A single interrupt specifier.
- clocks: Must contain two entries:
	- pclk: APB registers clock
	- ref_clk: reference 1Hz or 100Hz clock, depending on IP configuration
	See ../clocks/clock-bindings.txt for details.
```

## Example:

```dts
        rtc0: rtc@fd080000 {
        	compatible = "cdns,rtc-r109v3";
        	reg = <0xfd080000 0x1000>;

        	clock-names = "pclk", "ref_clk";
        	clocks = <&sysclock>, <&refclock>;

        	interrupt-parent = <&gic>;
        	interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>;
        };
```

---

# Dallas DS1390		SPI Serial Real-Time Clock

_Peios Kernel / Hardware and drivers / Device tree / bindings/rtc_

> Device-tree binding reference for Dallas DS1390		SPI Serial Real-Time Clock.

## Required properties:

- compatible: Should contain "dallas,ds1390".
- reg: SPI address for chip

## Optional properties:

```text
- trickle-resistor-ohms : Selected resistor for trickle charger
	Values usable for ds1390 are 250, 2000, 4000
	Should be given if trickle charger should be enabled
- trickle-diode-disable : Do not use internal trickle charger diode
	Should be given if internal trickle charger diode should be disabled
Example:
	ds1390: rtc@0 {
		compatible = "dallas,ds1390";
		trickle-resistor-ohms = <250>;
		reg = <0>;
	};
```

---

# Epson RX6110 Real Time Clock

_Peios Kernel / Hardware and drivers / Device tree / bindings/rtc_

> Device-tree binding reference for Epson RX6110 Real Time Clock.

The Epson RX6110 can be used with SPI or I2C busses. The kind of
bus depends on the SPISEL pin and can not be configured via software.

## I2C mode

## Required properties:

- compatible: should be: "epson,rx6110"
- reg : the I2C address of the device for I2C

## Example:

```dts
	rtc: rtc@32 {
		compatible = "epson,rx6110"
		reg = <0x32>;
	};
```

## SPI mode

## Required properties:

- compatible: should be: "epson,rx6110"
- reg: chip select number
- spi-cs-high: RX6110 needs chipselect high
- spi-cpha: RX6110 works with SPI shifted clock phase
- spi-cpol: RX6110 works with SPI inverse clock polarity

## Example:

```dts
	rtc: rtc@3 {
		compatible = "epson,rx6110"
		reg = <3>
		spi-cs-high;
		spi-cpha;
		spi-cpol;
	};
```

---

# ISL12026 I2C RTC/EEPROM

_Peios Kernel / Hardware and drivers / Device tree / bindings/rtc_

> Device-tree binding reference for ISL12026 I2C RTC/EEPROM.

ISL12026 is an I2C RTC/EEPROM combination device.  The RTC and control
registers respond at bus address 0x6f, and the EEPROM array responds
at bus address 0x57.  The canonical "reg" value will be for the RTC portion.

## Required properties supported by the device:

- "compatible": must be "isil,isl12026"
- "reg": I2C bus address of the device (always 0x6f)

## Optional properties:

- "isil,pwr-bsw": If present PWR.BSW bit must be set to the specified
  value for proper operation.

- "isil,pwr-sbib": If present PWR.SBIB bit must be set to the specified
  value for proper operation.

## Example:

```dts
	rtc@6f {
		compatible = "isil,isl12026";
		reg = <0x6f>;
		isil,pwr-bsw = <0>;
		isil,pwr-sbib = <1>;
	}
```

---

# Maxim/Dallas Semiconductor DS-1302 RTC

_Peios Kernel / Hardware and drivers / Device tree / bindings/rtc_

> Device-tree binding reference for Maxim/Dallas Semiconductor DS-1302 RTC.

Simple device which could be used to store date/time between reboots.

The device uses the standard MicroWire half-duplex transfer timing.
Master output is set on low clock and sensed by the RTC on the rising
edge. Master input is set by the RTC on the trailing edge and is sensed
by the master on low clock.

## Required properties:

- compatible : Should be "maxim,ds1302"

## Required SPI properties:

- reg : Should be address of the device chip select within
  the controller.

- spi-max-frequency : DS-1302 has 500 kHz if powered at 2.2V,
  and 2MHz if powered at 5V.

- spi-3wire : The device has a shared signal IN/OUT line.

- spi-lsb-first : DS-1302 requires least significant bit first
  transfers.

- spi-cs-high: DS-1302 has active high chip select line. This is
  required unless inverted in hardware.

## Example:

```dts
spi@901c {
	#address-cells = <1>;
	#size-cells = <0>;
	compatible = "icpdas,lp8841-spi-rtc";
	reg = <0x901c 0x1>;

	rtc@0 {
		compatible = "maxim,ds1302";
		reg = <0>;
		spi-max-frequency = <500000>;
		spi-3wire;
		spi-lsb-first;
		spi-cs-high;
	};
};
```

---

# Microchip PIC32 Real Time Clock and Calendar

_Peios Kernel / Hardware and drivers / Device tree / bindings/rtc_

> Device-tree binding reference for Microchip PIC32 Real Time Clock and Calendar.

The RTCC keeps time in hours, minutes, and seconds, and one half second. It
provides a calendar in weekday, date, month, and year. It also provides a
configurable alarm.

## Required properties:

- compatible: should be: "microchip,pic32mzda-rtc"
- reg: physical base address of the controller and length of memory mapped
  region.
- interrupts: RTC alarm/event interrupt
- clocks: clock phandle

## Example:

```dts
	rtc: rtc@1f8c0000 {
		compatible = "microchip,pic32mzda-rtc";
		reg = <0x1f8c0000 0x60>;
		interrupts = <166 IRQ_TYPE_EDGE_RISING>;
		clocks = <&PBCLK6>;
	};
```

---

# MOXA ART real-time clock

_Peios Kernel / Hardware and drivers / Device tree / bindings/rtc_

> Device-tree binding reference for MOXA ART real-time clock.

## Required properties:

- compatible : Should be "moxa,moxart-rtc"
- rtc-sclk-gpios : RTC sclk gpio, with zero flags
- rtc-data-gpios : RTC data gpio, with zero flags
- rtc-reset-gpios : RTC reset gpio, with zero flags

## Example:

```dts
	rtc: rtc {
		compatible = "moxa,moxart-rtc";
		rtc-sclk-gpios = <&gpio 5 0>;
		rtc-data-gpios = <&gpio 6 0>;
		rtc-reset-gpios = <&gpio 7 0>;
	};
```

---

# OLPC XO-1 RTC

_Peios Kernel / Hardware and drivers / Device tree / bindings/rtc_

> Device-tree binding reference for OLPC XO-1 RTC.

## Required properties:

- compatible : "olpc,xo1-rtc"

---

# Realtek RTD129x Real-Time Clock

_Peios Kernel / Hardware and drivers / Device tree / bindings/rtc_

> Device-tree binding reference for Realtek RTD129x Real-Time Clock.

## Required properties:

- compatible :  Should be "realtek,rtd1295-rtc"
- reg        :  Specifies the physical base address and size
- clocks     :  Specifies the clock gate

## Example:

```dts
	rtc@9801b600 {
		compatible = "realtek,rtd1295-clk";
		reg = <0x9801b600 0x100>;
		clocks = <&clkc RTD1295_CLK_EN_MISC_RTC>;
	};
```

---

# Motorola mc146818 compatible RTC

_Peios Kernel / Hardware and drivers / Device tree / bindings/rtc_

> Device-tree binding reference for Motorola mc146818 compatible RTC.

## Required properties:

- compatible : "motorola,mc146818"
- reg : should contain registers location and length.

## Optional properties:

- interrupts : should contain interrupt.
- ctrl-reg : Contains the initial value of the control register also
  called "Register B".
- freq-reg : Contains the initial value of the frequency register also
  called "Register A".

"Register A" and "B" are usually initialized by the firmware (BIOS for
instance). If this is not done, it can be performed by the driver.

## ISA Example:

```dts
	rtc@70 {
	         compatible = "motorola,mc146818";
	         interrupts = <8 3>;
	         interrupt-parent = <&ioapic1>;
	         ctrl-reg = <2>;
	         freq-reg = <0x26>;
	         reg = <1 0x70 2>;
	 };
```

---

# TI Real Time Clock

_Peios Kernel / Hardware and drivers / Device tree / bindings/rtc_

> Device-tree binding reference for TI Real Time Clock.

## Required properties:

```text
- compatible:
	- "ti,da830-rtc"  - for RTC IP used similar to that on DA8xx SoC family.
	- "ti,am3352-rtc" - for RTC IP used similar to that on AM335x SoC family.
			    This RTC IP has special WAKE-EN Register to enable
			    Wakeup generation for event Alarm. It can also be
			    used to control an external PMIC via the
			    pmic_power_en pin.
	- "ti,am4372-rtc" - for RTC IP used similar to that on AM437X SoC family.
- reg: Address range of rtc register set
- interrupts: rtc timer, alarm interrupts in order
```

## Optional properties:

- system-power-controller: whether the rtc is controlling the system power
  through pmic\_power\_en
- clocks: Any internal or external clocks feeding in to rtc
- clock-names: Corresponding names of the clocks
- pinctrl-0: a phandle pointing to the pin settings for the device
- pinctrl-names: should be "default"

## Optional subnodes:

- generic pinctrl node

## Required pinctrl subnodes properties:

- pins - Names of ext\_wakeup pins to configure

## Optional pinctrl subnodes properties:

- input-enable - Enables ext\_wakeup
- ti,active-high - Set input active high (by default active low)

## Example:

```dts
rtc@1c23000 {
	compatible = "ti,da830-rtc";
	reg = <0x23000 0x1000>;
	interrupts = <19
		      19>;
	interrupt-parent = <&intc>;
	system-power-controller;
	clocks = <&clk_32k_rtc>, <&clk_32768_ck>;
	clock-names = "ext-clk", "int-clk";

	pinctrl-0 = <&ext_wakeup>;
	pinctrl-names = "default";

	ext_wakeup: ext-wakeup {
		pins = "ext_wakeup0";
		input-enable;
		ti,active-high;
	};
};
```

---

# IBM OPAL real-time clock

_Peios Kernel / Hardware and drivers / Device tree / bindings/rtc_

> Device-tree binding reference for IBM OPAL real-time clock.

## Required properties:

- compatible: Should be "ibm,opal-rtc"

## Optional properties:

- wakeup-source: Decides if the wakeup is supported or not
  (Legacy property supported: "has-tpo")

## Example:

```dts
	rtc {
		compatible = "ibm,opal-rtc";
		wakeup-source;
		phandle = <0x10000029>;
		linux,phandle = <0x10000029>;
	};
```

---

# Palmas RTC controller bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/rtc_

> Device-tree binding reference for Palmas RTC controller bindings.

## Required properties:

```text
- compatible:
  - "ti,palmas-rtc" for palma series of the RTC controller
- interrupts: Interrupt number of RTC submodule on device.
```

## Optional properties:

- ti,backup-battery-chargeable: The Palmas series device like TPS65913 or
  TPS80036 supports the backup battery for powering the RTC when main
  battery is removed or in very low power state. The backup battery
  can be chargeable or non-chargeable. This flag will tells whether
  battery is chargeable or not. If charging battery then driver can
  enable the charging.
- ti,backup-battery-charge-high-current: Enable high current charging in
  backup battery. Device supports the &lt; 100uA and &gt; 100uA charging.
  The high current will be &gt; 100uA. Absence of this property will
  charge battery to lower current i.e. &lt; 100uA.

## Example:

```dts
	palmas: tps65913@58 {
		...
		palmas_rtc: rtc {
			compatible = "ti,palmas-rtc";
			interrupt-parent = <&palmas>;
			interrupts = <8 0>;
			ti,backup-battery-chargeable;
			ti,backup-battery-charge-high-current;
		};
		...
	};
```

---

# STMicroelectronics Low Power Controller (LPC) - RTC

_Peios Kernel / Hardware and drivers / Device tree / bindings/rtc_

> Device-tree binding reference for STMicroelectronics Low Power Controller (LPC) - RTC.

LPC currently supports Watchdog OR Real Time Clock OR Clocksource
functionality.

\[See: [../watchdog/st\_lpc\_wdt.txt](</kernel/hardware/devicetree/bindings-watchdog/st-lpc-wdt.md>) for Watchdog options\]
\[See: ../timer/st,stih407-lpc for Clocksource options\]

Required properties

- compatible 	: Must be: "st,stih407-lpc"
- reg		: LPC registers base address + size
- interrupts    : LPC interrupt line number and associated flags
- clocks	: Clock used by LPC device (See: [../clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>))
- st,lpc-mode	: The LPC can run either one of three modes:
  ST\_LPC\_MODE\_RTC    \[0\]
  ST\_LPC\_MODE\_WDT    \[1\]
  ST\_LPC\_MODE\_CLKSRC \[2\]
  One (and only one) mode must be selected.

## Example:

```dts
	lpc@fde05000 {
		compatible	= "st,stih407-lpc";
		reg		= <0xfde05000 0x1000>;
		clocks 		= <&clk_s_d3_flexgen CLK_LPC_0>;
		st,lpc-mode	= <ST_LPC_MODE_RTC>;
	};
```

---

# HiSilicon SAS controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/scsi_

> Device-tree binding reference for HiSilicon SAS controller.

The HiSilicon SAS controller supports SAS/SATA.

## Main node required properties:

```text
  - compatible : value should be as follows:
	(a) "hisilicon,hip05-sas-v1" for v1 hw in hip05 chipset
	(b) "hisilicon,hip06-sas-v2" for v2 hw in hip06 chipset
	(c) "hisilicon,hip07-sas-v2" for v2 hw in hip07 chipset
  - sas-addr : array of 8 bytes for host SAS address
  - reg : Contains two regions. The first is the address and length of the SAS
          register. The second is the address and length of CPLD register for
          SGPIO control. The second is optional, and should be set only when
          we use a CPLD for directly attached disk LED control.
  - hisilicon,sas-syscon: phandle of syscon used for sas control
  - ctrl-reset-reg : offset to controller reset register in ctrl reg
  - ctrl-reset-sts-reg : offset to controller reset status register in ctrl reg
  - ctrl-clock-ena-reg : offset to controller clock enable register in ctrl reg
  - queue-count : number of delivery and completion queues in the controller
  - phy-count : number of phys accessible by the controller
  - interrupts : For v1 hw: Interrupts for phys, completion queues, and fatal
		sources; the interrupts are ordered in 3 groups, as follows:
			- Phy interrupts
			- Completion queue interrupts
			- Fatal interrupts
		Phy interrupts : Each phy has 3 interrupt sources:
			- broadcast
			- phyup
			- abnormal
		The phy interrupts are ordered into groups of 3 per phy
		(broadcast, phyup, and abnormal) in increasing order.
		Completion queue interrupts : each completion queue has 1
			interrupt source.
			The interrupts are ordered in increasing order.
		Fatal interrupts : the fatal interrupts are ordered as follows:
			- ECC
			- AXI bus
		For v2 hw: Interrupts for phys, Sata, and completion queues;
		the interrupts are ordered in 3 groups, as follows:
			- Phy interrupts
			- Sata interrupts
			- Completion queue interrupts
		Phy interrupts : Each controller has 2 phy interrupts:
			- phy up/down
			- channel interrupt
		Sata interrupts : Each phy on the controller has 1 Sata
			interrupt. The interrupts are ordered in increasing
			order.
		Completion queue interrupts : each completion queue has 1
			interrupt source. The interrupts are ordered in
			increasing order.
```

## Optional main node properties:

- hip06-sas-v2-quirk-amt : when set, indicates that the v2 controller has the
  "am-max-transmissions" limitation.
- hisilicon,signal-attenuation : array of 3 32-bit values, containing de-emphasis,
  preshoot, and boost attenuation readings for the board. They
  are used to describe the signal attenuation of the board. These
  values' range is 7600 to 12400, and used to represent -24dB to
  24dB.
  The formula is "y = (x-10000)/10000". For example, 10478
  means 4.78dB.

## Example:

```dts
	sas0: sas@c1000000 {
		compatible = "hisilicon,hip05-sas-v1";
		sas-addr = [50 01 88 20 16 00 00 0a];
		reg = <0x0 0xc1000000 0x0 0x10000>;
		hisilicon,sas-syscon = <&pcie_sas>;
		ctrl-reset-reg = <0xa60>;
		ctrl-reset-sts-reg = <0x5a30>;
		ctrl-clock-ena-reg = <0x338>;
		queue-count = <32>;
		phy-count = <8>;
		dma-coherent;
		interrupt-parent = <&mbigen_dsa>;
		interrupts =    <259 4>,<263 4>,<264 4>,/* phy0 */
				<269 4>,<273 4>,<274 4>,/* phy1 */
				<279 4>,<283 4>,<284 4>,/* phy2 */
				<289 4>,<293 4>,<294 4>,/* phy3 */
				<299 4>,<303 4>,<304 4>,/* phy4 */
				<309 4>,<313 4>,<314 4>,/* phy5 */
				<319 4>,<323 4>,<324 4>,/* phy6 */
				<329 4>,<333 4>,<334 4>,/* phy7 */
				<336 1>,<337 1>,<338 1>,/* cq0-2 */
				<339 1>,<340 1>,<341 1>,/* cq3-5 */
				<342 1>,<343 1>,<344 1>,/* cq6-8 */
				<345 1>,<346 1>,<347 1>,/* cq9-11 */
				<348 1>,<349 1>,<350 1>,/* cq12-14 */
				<351 1>,<352 1>,<353 1>,/* cq15-17 */
				<354 1>,<355 1>,<356 1>,/* cq18-20 */
				<357 1>,<358 1>,<359 1>,/* cq21-23 */
				<360 1>,<361 1>,<362 1>,/* cq24-26 */
				<363 1>,<364 1>,<365 1>,/* cq27-29 */
				<366 1>,<367 1>/* cq30-31 */
				<376 4>,/* fatal ecc */
				<381 4>;/* fatal axi */
	};
```

---

# Rs485 bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/serial_

> Device-tree binding reference for Rs485 bindings.

See [rs485.yaml](</kernel/hardware/devicetree-bindings/dt-serial/rs485.md>)

---

# Altera UP PS/2 controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/serio_

> Device-tree binding reference for Altera UP PS/2 controller.

## Required properties:

- compatible : should be "ALTR,ps2-1.0". &lt;DEPRECATED&gt;
- compatible : should be "altr,ps2-1.0".

---

# OLPC AP-SP serio interface

_Peios Kernel / Hardware and drivers / Device tree / bindings/serio_

> Device-tree binding reference for OLPC AP-SP serio interface.

## Required properties:

- compatible : "olpc,ap-sp"
- reg : base address and length of SoC's WTM registers
- interrupts : SP-AP interrupt

## Example:

```dts
	ap-sp@d4290000 {
		compatible = "olpc,ap-sp";
		reg = <0xd4290000 0x1000>;
		interrupts = <40>;
	}
```

---

# ARC PS/2 driver: PS/2 block used in some ARC FPGA's & nSIM OSCI model

_Peios Kernel / Hardware and drivers / Device tree / bindings/serio_

> Device-tree binding reference for ARC PS/2 driver: PS/2 block used in some ARC FPGA's & nSIM OSCI model.

## Required properties:

- compatible		: "snps,arc\_ps2"
- reg			: offset and length (always 0x14) of registers
- interrupts		: interrupt
- interrupt-names	: name of interrupt, must be "arc\_ps2\_irq"

## Example:

```dts
serio@c9000400 {
	compatible = "snps,arc_ps2";
	reg = <0xc9000400 0x14>;
	interrupts = <13>;
	interrupt-names = "arc_ps2_irq";
}
```

---

# DT compatible string versioning for SiFive open-source IP blocks

_Peios Kernel / Hardware and drivers / Device tree / bindings/sifive_

> Device-tree binding reference for DT compatible string versioning for SiFive open-source IP blocks.

This document describes the version specification for DT "compatible"
strings for open-source SiFive IP blocks.  HDL for these IP blocks
can be found in this public repository:

https://github.com/sifive/sifive-blocks

IP block-specific DT compatible strings are contained within the HDL,
in the form "sifive,&lt;ip-block-name&gt;&lt;integer version number&gt;".

## An example is "sifive,uart0" from:

https://github.com/sifive/sifive-blocks/blob/v1.0/src/main/scala/devices/uart/UART.scala#L43

Until these IP blocks (or IP integration) support version
auto-discovery, the maintainers of these IP blocks intend to increment
the suffixed number in the compatible string whenever the software
interface to these IP blocks changes, or when the functionality of the
underlying IP blocks changes in a way that software should be aware of.

Driver developers can use compatible string "match" values such as
"sifive,uart0" to indicate that their driver is compatible with the
register interface and functionality associated with the relevant
upstream sifive-blocks commits.  It is expected that most drivers will
match on these IP block-specific compatible strings.

DT data authors, when writing data for a particular SoC, should
continue to specify an SoC-specific compatible string value, such as
"sifive,fu540-c000-uart".  This way, if SoC-specific
integration-specific bug fixes or workarounds are needed, the kernel
or other system software can match on this string to apply them.  The
IP block-specific compatible string (such as "sifive,uart0") should
then be specified as a subsequent value.

## An example of this style:

```dts
    compatible = "sifive,fu540-c000-uart", "sifive,uart0";
```

---

# Device Tree bindings for Marvell PMU

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/dove_

> Device-tree binding reference for Device Tree bindings for Marvell PMU.

## Required properties:

- compatible: value should be "marvell,dove-pmu".
  May also include "simple-bus" if there are child devices, in which
  case the ranges node is required.
- reg: two base addresses and sizes of the PM controller and PMU.
- interrupts: single interrupt number for the PMU interrupt
- interrupt-controller: must be specified as the PMU itself is an
  interrupt controller.
- #interrupt-cells: must be 1.
- #reset-cells: must be 1.
- domains: sub-node containing domain descriptions

## Optional properties:

- ranges: defines the address mapping for child devices, as per the
  standard property of this name.  Required when compatible includes
  "simple-bus".

Power domain descriptions are listed as child nodes of the "domains"
sub-node.  Each domain has the following properties:

## Required properties:

- #power-domain-cells: must be 0.

## Optional properties:

- marvell,pmu\_pwr\_mask: specifies the mask value for PMU power register
- marvell,pmu\_iso\_mask: specifies the mask value for PMU isolation register
- resets: points to the reset manager (PMU node) and reset index.

## Example:

```dts
	pmu: power-management@d0000 {
		compatible = "marvell,dove-pmu";
		reg = <0xd0000 0x8000>, <0xd8000 0x8000>;
		interrupts = <33>;
		interrupt-controller;
		#interrupt-cells = <1>;
		#reset-cells = <1>;

		domains {
			vpu_domain: vpu-domain {
				#power-domain-cells = <0>;
				marvell,pmu_pwr_mask = <0x00000008>;
				marvell,pmu_iso_mask = <0x00000001>;
				resets = <&pmu 16>;
			};

			gpu_domain: gpu-domain {
				#power-domain-cells = <0>;
				marvell,pmu_pwr_mask = <0x00000004>;
				marvell,pmu_iso_mask = <0x00000002>;
				resets = <&pmu 18>;
			};
		};
	};
```

---

# Freescale Communications Processor Module

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/fsl/cpm_qe_

> Device-tree binding reference for Freescale Communications Processor Module.

NOTE: This is an interim binding, and will likely change slightly,
as more devices are supported.  The QE bindings especially are
incomplete.

- Root CPM node

## Properties:

- compatible : "fsl,cpm1", "fsl,cpm2", or "fsl,qe".
- reg : A 48-byte region beginning with CPCR.

## Example:

```dts
     cpm@119c0 {
	#address-cells = <1>;
	#size-cells = <1>;
	#interrupt-cells = <2>;
	compatible = "fsl,mpc8272-cpm", "fsl,cpm2";
	reg = <119c0 30>;
     }
```

- Properties common to multiple CPM/QE devices

- fsl,cpm-command : This value is ORed with the opcode and command flag
  to specify the device on which a CPM command operates.

- fsl,cpm-brg : Indicates which baud rate generator the device
  is associated with.  If absent, an unused BRG
  should be dynamically allocated.  If zero, the
  device uses an external clock rather than a BRG.

- reg : Unless otherwise specified, the first resource represents the
  scc/fcc/ucc registers, and the second represents the device's
  parameter RAM region (if it has one).

- Multi-User RAM (MURAM)

The multi-user/dual-ported RAM is expressed as a bus under the CPM node.

Ranges must be set up subject to the following restrictions:

- Children's reg nodes must be offsets from the start of all muram, even
  if the user-data area does not begin at zero.
- If multiple range entries are used, the difference between the parent
  address and the child address must be the same in all, so that a single
  mapping can cover them all while maintaining the ability to determine
  CPM-side offsets with pointer subtraction.  It is recommended that
  multiple range entries not be used.
- A child address of zero must be translatable, even if no reg resources
  contain it.

A child "data" node must exist, compatible with "fsl,cpm-muram-data", to
indicate the portion of muram that is usable by the OS for arbitrary
purposes.  The data node may have an arbitrary number of reg resources,
all of which contribute to the allocatable muram pool.

## Example, based on mpc8272:

```dts
	muram@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges = <0 0 10000>;

		data@0 {
			compatible = "fsl,cpm-muram-data";
			reg = <0 2000 9800 800>;
		};
	};
```

---

# Gpio bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/fsl/cpm_qe_

> Device-tree binding reference for Gpio bindings.

Every GPIO controller node must have #gpio-cells property defined,
this information will be used to translate gpio-specifiers.

On CPM1 devices, all ports are using slightly different register layouts.
Ports A, C and D are 16bit ports and Ports B and E are 32bit ports.

On CPM2 devices, all ports are 32bit ports and use a common register layout.

## Required properties:

- compatible : "fsl,cpm1-pario-bank-a", "fsl,cpm1-pario-bank-b",
  "fsl,cpm1-pario-bank-c", "fsl,cpm1-pario-bank-d",
  "fsl,cpm1-pario-bank-e", "fsl,cpm2-pario-bank"
- #gpio-cells : Should be two. The first cell is the pin number and the
  second cell is used to specify optional parameters (currently unused).
- gpio-controller : Marks the port as GPIO controller.
  Optional properties:
- fsl,cpm1-gpio-irq-mask : For banks having interrupt capability (like port C
  on CPM1), this item tells which ports have an associated interrupt (ports are
  listed in the same order as in PCINT register)
- interrupts : This property provides the list of interrupt for each GPIO having
  one as described by the fsl,cpm1-gpio-irq-mask property. There should be as
  many interrupts as number of ones in the mask property. The first interrupt in
  the list corresponds to the most significant bit of the mask.

Example of four SOC GPIO banks defined as gpio-controller nodes:

```dts
	CPM1_PIO_A: gpio-controller@950 {
		#gpio-cells = <2>;
		compatible = "fsl,cpm1-pario-bank-a";
		reg = <0x950 0x10>;
		gpio-controller;
	};
```

```dts
	CPM1_PIO_B: gpio-controller@ab8 {
		#gpio-cells = <2>;
		compatible = "fsl,cpm1-pario-bank-b";
		reg = <0xab8 0x10>;
		gpio-controller;
	};
```

```dts
	CPM1_PIO_C: gpio-controller@960 {
		#gpio-cells = <2>;
		compatible = "fsl,cpm1-pario-bank-c";
		reg = <0x960 0x10>;
		fsl,cpm1-gpio-irq-mask = <0x0fff>;
		interrupts = <1 2 6 9 10 11 14 15 23 24 26 31>;
		interrupt-parent = <&CPM_PIC>;
		gpio-controller;
	};
```

```dts
	CPM1_PIO_E: gpio-controller@ac8 {
		#gpio-cells = <2>;
		compatible = "fsl,cpm1-pario-bank-e";
		reg = <0xac8 0x18>;
		gpio-controller;
	};
```

---

# Serial

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/fsl/cpm_qe_

> Device-tree binding reference for Serial.

## Currently defined compatibles:

- fsl,cpm1-smc-uart
- fsl,cpm2-smc-uart
- fsl,cpm1-scc-uart
- fsl,cpm2-scc-uart
- fsl,qe-uart

Modem control lines connected to GPIO controllers are listed in the gpios
property as described in booting-without-of.txt, section IX.1 in the following
order:

CTS, RTS, DCD, DSR, DTR, and RI.

The gpios property is optional and can be left out when control lines are
not used.

## Example:

```dts
	serial@11a00 {
		device_type = "serial";
		compatible = "fsl,mpc8272-scc-uart",
			     "fsl,cpm2-scc-uart";
		reg = <11a00 20 8000 100>;
		interrupts = <28 8>;
		interrupt-parent = <&PIC>;
		fsl,cpm-brg = <1>;
		fsl,cpm-command = <00800000>;
		gpios = <&gpio_c 15 0
			 &gpio_d 29 0>;
	};
```

---

# Serial

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/fsl/cpm_qe_

> Device-tree binding reference for Serial.

## Required Properties:

compatible : must be "fsl,&lt;chip&gt;-ucc-uart". For t1040, must be
"fsl,t1040-ucc-uart".
port-number : port number of UCC-UART
tx/rx-clock-name : should be "brg1"-"brg16" for internal clock source,

```text
		   should be "clk1"-"clk28" for external clock source.
```

## Example:

```dts
	ucc_serial: ucc@2200 {
		compatible = "fsl,t1040-ucc-uart";
		port-number = <0>;
		rx-clock-name = "brg2";
		tx-clock-name = "brg2";
	};
```

---

# Baud Rate Generators

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/fsl/cpm_qe/cpm_

> Device-tree binding reference for Baud Rate Generators.

## Currently defined compatibles:

fsl,cpm-brg
fsl,cpm1-brg
fsl,cpm2-brg

## Properties:

- reg : There may be an arbitrary number of reg resources; BRG
  numbers are assigned to these in order.
- clock-frequency : Specifies the base frequency driving
  the BRG.

## Example:

```dts
	brg@119f0 {
		compatible = "fsl,mpc8272-brg",
			     "fsl,cpm2-brg",
			     "fsl,cpm-brg";
		reg = <119f0 10 115f0 10>;
		clock-frequency = <d#25000000>;
	};
```

---

# I2C

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/fsl/cpm_qe/cpm_

> Device-tree binding reference for I2C.

The I2C controller is expressed as a bus under the CPM node.

## Properties:

- compatible : "fsl,cpm1-i2c", "fsl,cpm2-i2c"
- reg : On CPM2 devices, the second resource doesn't specify the I2C
  Parameter RAM itself, but the I2C\_BASE field of the CPM2 Parameter RAM
  (typically 0x8afc 0x2).
- #address-cells : Should be one. The cell is the i2c device address with
  the r/w bit set to zero.
- #size-cells : Should be zero.
- clock-frequency : Can be used to set the i2c clock frequency. If
  unspecified, a default frequency of 60kHz is being used.
  The following two properties are deprecated. They are only used by legacy
  i2c drivers to find the bus to probe:
- linux,i2c-index : Can be used to hard code an i2c bus number. By default,
  the bus number is dynamically assigned by the i2c core.
- linux,i2c-class : Can be used to override the i2c class. The class is used
  by legacy i2c device drivers to find a bus in a specific context like
  system management, video or sound. By default, I2C\_CLASS\_HWMON (1) is
  being used. The definition of the classes can be found in
  include/i2c/i2c.h

## Example, based on mpc823:

```dts
	i2c@860 {
		compatible = "fsl,mpc823-i2c",
			     "fsl,cpm1-i2c";
		reg = <0x860 0x20 0x3c80 0x30>;
		interrupts = <16>;
		interrupt-parent = <&CPM_PIC>;
		fsl,cpm-command = <0x10>;
		#address-cells = <1>;
		#size-cells = <0>;

		rtc@68 {
			compatible = "dallas,ds1307";
			reg = <0x68>;
		};
	};
```

---

# Interrupt Controllers

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/fsl/cpm_qe/cpm_

> Device-tree binding reference for Interrupt Controllers.

## Currently defined compatibles:

```text
- fsl,cpm1-pic
  - only one interrupt cell
- fsl,pq1-pic
- fsl,cpm2-pic
  - second interrupt cell is level/sense:
    - 2 is falling edge
    - 8 is active low
```

## Example:

```dts
	interrupt-controller@10c00 {
		#interrupt-cells = <2>;
		interrupt-controller;
		reg = <10c00 80>;
		compatible = "mpc8272-pic", "fsl,cpm2-pic";
	};
```

---

# USB (Universal Serial Bus Controller)

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/fsl/cpm_qe/cpm_

> Device-tree binding reference for USB (Universal Serial Bus Controller).

## Properties:

- compatible : "fsl,cpm1-usb", "fsl,cpm2-usb", "fsl,qe-usb"

## Example:

```dts
	usb@11bc0 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "fsl,cpm2-usb";
		reg = <11b60 18 8b00 100>;
		interrupts = <b 8>;
		interrupt-parent = <&PIC>;
		fsl,cpm-command = <2e600000>;
	};
```

---

# Uploaded QE firmware

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/fsl/cpm_qe/qe_

> Device-tree binding reference for Uploaded QE firmware.

```text
      If a new firmware has been uploaded to the QE (usually by the
      boot loader), then a 'firmware' child node should be added to the QE
      node.  This node provides information on the uploaded firmware that
      device drivers may need.
```

## Required properties:

- id: The string name of the firmware.  This is taken from the 'id'
  member of the qe\_firmware structure of the uploaded firmware.
  Device drivers can search this string to determine if the
  firmware they want is already present.
- extended-modes: The Extended Modes bitfield, taken from the
  firmware binary.  It is a 64-bit number represented
  as an array of two 32-bit numbers.
- virtual-traps: The virtual traps, taken from the firmware binary.
  It is an array of 8 32-bit numbers.

## Example:

```dts
	firmware {
		id = "Soft-UART";
		extended-modes = <0 0>;
		virtual-traps = <0 0 0 0 0 0 0 0>;
	};
```

---

# Parallel I/O Ports

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/fsl/cpm_qe/qe_

> Device-tree binding reference for Parallel I/O Ports.

This node configures Parallel I/O ports for CPUs with QE support.
The node should reside in the "soc" node of the tree.  For each
device that using parallel I/O ports, a child node should be created.
See the definition of the Pin configuration nodes below for more
information.

## Required properties:

- device\_type : should be "par\_io".
- reg : offset to the register set and its length.
- num-ports : number of Parallel I/O ports

## Example:

```dts
par_io@1400 {
	reg = <1400 100>;
	#address-cells = <1>;
	#size-cells = <0>;
	device_type = "par_io";
	num-ports = <7>;
	ucc_pin@1 {
		......
	};

Note that "par_io" nodes are obsolete, and should not be used for
the new device trees. Instead, each Par I/O bank should be represented
via its own gpio-controller node:

Required properties:
- #gpio-cells : should be "2".
- compatible : should be "fsl,<chip>-qe-pario-bank",
  "fsl,mpc8323-qe-pario-bank".
- reg : offset to the register set and its length.
- gpio-controller : node to identify gpio controllers.

Example:
	qe_pio_a: gpio-controller@1400 {
		#gpio-cells = <2>;
		compatible = "fsl,mpc8360-qe-pario-bank",
		"fsl,mpc8323-qe-pario-bank";
		reg = <0x1400 0x18>;
		gpio-controller;
	  };

	qe_pio_e: gpio-controller@1460 {
		#gpio-cells = <2>;
		compatible = "fsl,mpc8360-qe-pario-bank",
			     "fsl,mpc8323-qe-pario-bank";
		reg = <0x1460 0x18>;
		gpio-controller;
	  };
```

---

# Pin configuration nodes

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/fsl/cpm_qe/qe_

> Device-tree binding reference for Pin configuration nodes.

## Required properties:

```text
- pio-map : array of pin configurations.  Each pin is defined by 6
  integers.  The six numbers are respectively: port, pin, dir,
  open_drain, assignment, has_irq.
  - port : port number of the pin; 0-6 represent port A-G in UM.
  - pin : pin number in the port.
  - dir : direction of the pin, should encode as follows:
```

```dts
     0 = The pin is disabled
     1 = The pin is an output
     2 = The pin is an input
     3 = The pin is I/O
```

- open\_drain : indicates the pin is normal or wired-OR:

```dts
     0 = The pin is actively driven as an output
     1 = The pin is an open-drain driver. As an output, the pin is
         driven active-low, otherwise it is three-stated.
```

- assignment : function number of the pin according to the Pin Assignment
  tables in User Manual.  Each pin can have up to 4 possible functions in
  QE and two options for CPM.
- has\_irq : indicates if the pin is used as source of external
  interrupts.

## Example:

```dts
     ucc_pin@1 {
	pio-map = <
	/* port  pin  dir  open_drain  assignment  has_irq */
		0  3  1  0  1  0 	/* TxD0 */
		0  4  1  0  1  0 	/* TxD1 */
		0  5  1  0  1  0 	/* TxD2 */
		0  6  1  0  1  0 	/* TxD3 */
		1  6  1  0  3  0 	/* TxD4 */
		1  7  1  0  1  0 	/* TxD5 */
		1  9  1  0  2  0 	/* TxD6 */
		1  a  1  0  2  0 	/* TxD7 */
		0  9  2  0  1  0 	/* RxD0 */
		0  a  2  0  1  0 	/* RxD1 */
		0  b  2  0  1  0 	/* RxD2 */
		0  c  2  0  1  0 	/* RxD3 */
		0  d  2  0  1  0 	/* RxD4 */
		1  1  2  0  2  0 	/* RxD5 */
		1  0  2  0  2  0 	/* RxD6 */
		1  4  2  0  2  0 	/* RxD7 */
		0  7  1  0  1  0 	/* TX_EN */
		0  8  1  0  1  0 	/* TX_ER */
		0  f  2  0  1  0 	/* RX_DV */
		0  10 2  0  1  0 	/* RX_ER */
		0  0  2  0  1  0 	/* RX_CLK */
		2  9  1  0  3  0 	/* GTX_CLK - CLK10 */
		2  8  2  0  1  0>;	/* GTX125 - CLK9 */
     };
```

---

# UCC (Unified Communications Controllers)

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/fsl/cpm_qe/qe_

> Device-tree binding reference for UCC (Unified Communications Controllers).

## Required properties:

- device\_type : should be "network", "hldc", "uart", "transparent"
  "bisync", "atm", or "serial".
- compatible : could be "ucc\_geth" or "fsl\_atm" and so on.
- cell-index : the ucc number(1-8), corresponding to UCCx in UM.
- reg : Offset and length of the register set for the device
- interrupts : &lt;a b&gt; where a is the interrupt number and b is a
  field that represents an encoding of the sense and level
  information for the interrupt.  This should be encoded based on
  the information in section 2) depending on the type of interrupt
  controller you have.
- pio-handle : The phandle for the Parallel I/O port configuration.
- port-number : for UART drivers, the port number to use, between 0 and 3.
  This usually corresponds to the /dev/ttyQE device, e.g. &lt;0&gt; = /dev/ttyQE0.
  The port number is added to the minor number of the device.  Unlike the
  CPM UART driver, the port-number is required for the QE UART driver.
- soft-uart : for UART drivers, if specified this means the QE UART device
  driver should use "Soft-UART" mode, which is needed on some SOCs that have
  broken UART hardware.  Soft-UART is provided via a microcode upload.
- rx-clock-name: the UCC receive clock source
  "none": clock source is disabled
  "brg1" through "brg16": clock source is BRG1-BRG16, respectively
  "clk1" through "clk24": clock source is CLK1-CLK24, respectively
- tx-clock-name: the UCC transmit clock source
  "none": clock source is disabled
  "brg1" through "brg16": clock source is BRG1-BRG16, respectively
  "clk1" through "clk24": clock source is CLK1-CLK24, respectively
  The following two properties are deprecated.  rx-clock has been replaced
  with rx-clock-name, and tx-clock has been replaced with tx-clock-name.
  Drivers that currently use the deprecated properties should continue to
  do so, in order to support older device trees, but they should be updated
  to check for the new properties first.
- rx-clock : represents the UCC receive clock source.
  0x00 : clock source is disabled;
  0x1~0x10 : clock source is BRG1~BRG16 respectively;
  0x11~0x28: clock source is QE\_CLK1~QE\_CLK24 respectively.
- tx-clock: represents the UCC transmit clock source;
  0x00 : clock source is disabled;
  0x1~0x10 : clock source is BRG1~BRG16 respectively;
  0x11~0x28: clock source is QE\_CLK1~QE\_CLK24 respectively.

## Required properties for network device\_type:

- mac-address : list of bytes representing the ethernet address.
- phy-handle : The phandle for the PHY connected to this controller.

## Recommended properties:

- phy-connection-type : a string naming the controller/PHY interface type,
  i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal
  Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only),
  "tbi", or "rtbi".

## Example:

```dts
	ucc@2000 {
		device_type = "network";
		compatible = "ucc_geth";
		cell-index = <1>;
		reg = <2000 200>;
		interrupts = <a0 0>;
		interrupt-parent = <700>;
		mac-address = [ 00 04 9f 00 23 23 ];
		rx-clock = "none";
		tx-clock = "clk9";
		phy-handle = <212000>;
		phy-connection-type = "gmii";
		pio-handle = <140001>;
	};
```

---

# Freescale QUICC Engine USB Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/fsl/cpm_qe/qe_

> Device-tree binding reference for Freescale QUICC Engine USB Controller.

## Required properties:

- compatible : should be "fsl,&lt;chip&gt;-qe-usb", "fsl,mpc8323-qe-usb".
- reg : the first two cells should contain usb registers location and
  length, the next two two cells should contain PRAM location and
  length.
- interrupts : should contain USB interrupt.
- fsl,fullspeed-clock : specifies the full speed USB clock source:
  "none": clock source is disabled
  "brg1" through "brg16": clock source is BRG1-BRG16, respectively
  "clk1" through "clk24": clock source is CLK1-CLK24, respectively
- fsl,lowspeed-clock : specifies the low speed USB clock source:
  "none": clock source is disabled
  "brg1" through "brg16": clock source is BRG1-BRG16, respectively
  "clk1" through "clk24": clock source is CLK1-CLK24, respectively
- hub-power-budget : USB power budget for the root hub, in mA.
- gpios : should specify GPIOs in this order: USBOE, USBTP, USBTN, USBRP,
  USBRN, SPEED (optional), and POWER (optional).

## Example:

```dts
usb@6c0 {
	compatible = "fsl,mpc8360-qe-usb", "fsl,mpc8323-qe-usb";
	reg = <0x6c0 0x40 0x8b00 0x100>;
	interrupts = <11>;
	interrupt-parent = <&qeic>;
	fsl,fullspeed-clock = "clk21";
	gpios = <&qe_pio_b  2 0 /* USBOE */
		 &qe_pio_b  3 0 /* USBTP */
		 &qe_pio_b  8 0 /* USBTN */
		 &qe_pio_b  9 0 /* USBRP */
		 &qe_pio_b 11 0 /* USBRN */
		 &qe_pio_e 20 0 /* SPEED */
		 &qe_pio_e 21 0 /* POWER */>;
};
```

---

# Global Utilities Block

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/fsl_

> Device-tree binding reference for Global Utilities Block.

The global utilities block controls power management, I/O device
enabling, power-on-reset configuration monitoring, general-purpose
I/O signal configuration, alternate function selection for multiplexed
signals, and clock control.

## Required properties:

- compatible : Should define the compatible device type for
  global-utilities.
  Possible compatibles:
  "fsl,qoriq-device-config-1.0"
  "fsl,qoriq-device-config-2.0"
  "fsl,&lt;chip&gt;-device-config"
  "fsl,&lt;chip&gt;-guts"
- reg : Offset and length of the register set for the device.

## Recommended properties:

- fsl,has-rstcr : Indicates that the global utilities register set
  contains a functioning "reset control register" (i.e. the board
  is wired to reset upon setting the HRESET\_REQ bit in this register).

- fsl,liodn-bits : Indicates the number of defined bits in the LIODN
  registers, for those SOCs that have a PAMU device.

- little-endian : Indicates that the global utilities block is little
  endian. The default is big endian.

## Examples:

```text
	global-utilities@e0000 {	/* global utilities block */
		compatible = "fsl,mpc8548-guts";
		reg = <e0000 1000>;
		fsl,has-rstcr;
	};
```

```dts
	guts: global-utilities@e0000 {
		compatible = "fsl,qoriq-device-config-1.0";
		reg = <0xe0000 0xe00>;
		fsl,has-rstcr;
		#sleep-cells = <1>;
		fsl,liodn-bits = <12>;
	};
```

---

# MediaTek SCPSYS

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/mediatek_

> Device-tree binding reference for MediaTek SCPSYS.

The System Control Processor System (SCPSYS) has several power management
related tasks in the system. The tasks include thermal measurement, dynamic
voltage frequency scaling (DVFS), interrupt filter and lowlevel sleep control.
The System Power Manager (SPM) inside the SCPSYS is for the MTCMOS power
domain control.

The driver implements the Generic PM domain bindings described in
power/power-domain.yaml. It provides the power domains defined in

- include/dt-bindings/power/mt8173-power.h
- include/dt-bindings/power/mt6797-power.h
- include/dt-bindings/power/mt6765-power.h
- include/dt-bindings/power/mt2701-power.h
- include/dt-bindings/power/mt2712-power.h
- include/dt-bindings/power/mt7622-power.h

## Required properties:

```text
- compatible: Should be one of:
	- "mediatek,mt2701-scpsys"
	- "mediatek,mt2712-scpsys"
	- "mediatek,mt6735-scpsys"
	- "mediatek,mt6765-scpsys"
	- "mediatek,mt6797-scpsys"
	- "mediatek,mt7622-scpsys"
	- "mediatek,mt7623-scpsys", "mediatek,mt2701-scpsys": For MT7623 SoC
	- "mediatek,mt7623a-scpsys": For MT7623A SoC
	- "mediatek,mt7629-scpsys", "mediatek,mt7622-scpsys": For MT7629 SoC
	- "mediatek,mt8173-scpsys"
- #power-domain-cells: Must be 1
- reg: Address range of the SCPSYS unit
- infracfg: must contain a phandle to the infracfg controller
- clock, clock-names: clocks according to the common clock binding.
                      These are clocks which hardware needs to be
                      enabled before enabling certain power domains.
	Required clocks for MT2701 or MT7623: "mm", "mfg", "ethif"
	Required clocks for MT2712: "mm", "mfg", "venc", "jpgdec", "audio", "vdec"
	Required clocks for MT6765: MUX: "mm", "mfg"
				    CG: "mm-0", "mm-1", "mm-2", "mm-3", "isp-0",
					"isp-1", "cam-0", "cam-1", "cam-2",
					"cam-3","cam-4"
	Required clocks for MT6797: "mm", "mfg", "vdec"
	Required clocks for MT7622 or MT7629: "hif_sel"
	Required clocks for MT7623A: "ethif"
	Required clocks for MT8173: "mm", "mfg", "venc", "venc_lt"
```

## Optional properties:

- vdec-supply: Power supply for the vdec power domain
- venc-supply: Power supply for the venc power domain
- isp-supply: Power supply for the isp power domain
- mm-supply: Power supply for the mm power domain
- venc\_lt-supply: Power supply for the venc\_lt power domain
- audio-supply: Power supply for the audio power domain
- usb-supply: Power supply for the usb power domain
- mfg\_async-supply: Power supply for the mfg\_async power domain
- mfg\_2d-supply: Power supply for the mfg\_2d power domain
- mfg-supply: Power supply for the mfg power domain

## Example:

```dts
	scpsys: scpsys@10006000 {
		#power-domain-cells = <1>;
		compatible = "mediatek,mt8173-scpsys";
		reg = <0 0x10006000 0 0x1000>;
		infracfg = <&infracfg>;
		clocks = <&clk26m>,
			 <&topckgen CLK_TOP_MM_SEL>;
			 <&topckgen CLK_TOP_VENC_SEL>,
			 <&topckgen CLK_TOP_VENC_LT_SEL>;
		clock-names = "mfg", "mm", "venc", "venc_lt";
	};
```

## Example consumer:

```dts
	afe: mt8173-afe-pcm@11220000 {
		compatible = "mediatek,mt8173-afe-pcm";
		power-domains = <&scpsys MT8173_POWER_DOMAIN_AUDIO>;
	};
```

---

# Keystone Navigator DMA Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/ti_

> Device-tree binding reference for Keystone Navigator DMA Controller.

This document explains the device tree bindings for the packet dma
on keystone devices. The Keystone Navigator DMA driver sets up the dma
channels and flows for the QMSS(Queue Manager SubSystem) who triggers
the actual data movements across clients using destination queues. Every
client modules like  NETCP(Network Coprocessor), SRIO(Serial Rapid IO),
CRYPTO Engines etc has its own instance of dma hardware. QMSS has also
an internal packet DMA module which is used as an infrastructure DMA
with zero copy.

## Navigator DMA cloud layout:

## | Navigator DMAs |

```text
		|
		|-> DMA instance #0
		|
		|-> DMA instance #1
			.
			.
		|
		|-> DMA instance #n
```

## Navigator DMA properties:

Required properties:

- compatible: Should be "ti,keystone-navigator-dma"
- clocks: phandle to dma instances clocks. The clock handles can be as
  many as the dma instances. The order should be maintained as per
  the dma instances.
- ti,navigator-cloud-address: Should contain base address for the multi-core
  navigator cloud and number of addresses depends on SOC integration
  configuration.. Navigator cloud global address needs to be programmed
  into DMA and the DMA uses it as the physical addresses to reach queue
  managers. Note that these addresses though points to queue managers,
  they are relevant only from DMA perspective. The QMSS may not choose to
  use them since it has a different address space view to reach all
  its components.

## DMA instance properties:

Required properties:

```text
 - reg: Should contain register location and length of the following dma
	register regions. Register regions should be specified in the following
	order.
	- Global control register region (global).
	- Tx DMA channel configuration register region (txchan).
	- Rx DMA channel configuration register region (rxchan).
	- Tx DMA channel Scheduler configuration register region (txsched).
	- Rx DMA flow configuration register region (rxflow).
```

## Optional properties:

- reg-names: Names for the register regions.
- ti,enable-all: Enable all DMA channels vs clients opening specific channels
  what they need. This property is useful for the userspace fast path
  case where the linux drivers enables the channels used by userland
  stack.
- ti,loop-back: To loopback Tx streaming I/F to Rx streaming I/F. Used for
  infrastructure transfers.
- ti,rx-retry-timeout: Number of dma cycles to wait before retry on buffer
  starvation.

## Example:

```dts
	knav_dmas: knav_dmas@0 {
		compatible = "ti,keystone-navigator-dma";
		clocks = <&papllclk>, <&clkxge>;
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
		ti,navigator-cloud-address = <0x23a80000 0x23a90000
					   0x23aa0000 0x23ab0000>;

		dma_gbe: dma_gbe@0 {
			reg = <0x2004000 0x100>,
				  <0x2004400 0x120>,
				  <0x2004800 0x300>,
				  <0x2004c00 0x120>,
				  <0x2005000 0x400>;
			reg-names = "global", "txchan", "rxchan",
					"txsched", "rxflow";
		};

		dma_xgbe: dma_xgbe@0 {
			reg = <0x2fa1000 0x100>,
				<0x2fa1400 0x200>,
				<0x2fa1800 0x200>,
				<0x2fa1c00 0x200>,
				<0x2fa2000 0x400>;
			reg-names = "global", "txchan", "rxchan",
					"txsched", "rxflow";
		};
	};
```

## Navigator DMA client:

Required properties:

```text
 - ti,navigator-dmas: List of one or more DMA specifiers, each consisting of
			- A phandle pointing to DMA instance node
			- A DMA channel number as a phandle arg.
 - ti,navigator-dma-names: Contains dma channel name for each DMA specifier in
			the 'ti,navigator-dmas' property.
```

## Example:

```dts
	netcp: netcp@2090000 {
		..
		ti,navigator-dmas = <&dma_gbe 22>,
				<&dma_gbe 23>,
				<&dma_gbe 8>;
		ti,navigator-dma-names = "netrx0", "netrx1", "nettx";
		..
	};
```

---

# Texas Instruments Keystone Navigator Queue Management SubSystem driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/soc/ti_

> Device-tree binding reference for Texas Instruments Keystone Navigator Queue Management SubSystem driver.

The QMSS (Queue Manager Sub System) found on Keystone SOCs is one of
the main hardware sub system which forms the backbone of the Keystone
multi-core Navigator. QMSS consist of queue managers, packed-data structure
processors(PDSP), linking RAM, descriptor pools and infrastructure
Packet DMA.
The Queue Manager is a hardware module that is responsible for accelerating
management of the packet queues. Packets are queued/de-queued by writing or
reading descriptor address to a particular memory mapped location. The PDSPs
perform QMSS related functions like accumulation, QoS, or event management.
Linking RAM registers are used to link the descriptors which are stored in
descriptor RAM. Descriptor RAM is configurable as internal or external memory.
The QMSS driver manages the PDSP setups, linking RAM regions,
queue pool management (allocation, push, pop and notify) and descriptor
pool management.

## Required properties:

```text
- compatible	: Must be "ti,keystone-navigator-qmss".
		: Must be "ti,66ak2g-navss-qm" for QMSS on K2G SoC.
- clocks	: phandle to the reference clock for this device.
- queue-range	: <start number> total range of queue numbers for the device.
- linkram0	: <address size> for internal link ram, where size is the total
		  link ram entries.
- linkram1	: <address size> for external link ram, where size is the total
		  external link ram entries. If the address is specified as "0"
		  driver will allocate memory.
- qmgrs         : child node describing the individual queue managers on the
		  SoC. On keystone 1 devices there should be only one node.
		  On keystone 2 devices there can be more than 1 node.
  -- managed-queues	: the actual queues managed by each queue manager
			  instance, specified as <"base queue #" "# of queues">.
  -- reg		: Address and size of the register set for the device.
			  Register regions should be specified in the following
			  order
			  - Queue Peek region.
			  - Queue status RAM.
			  - Queue configuration region.
			  - Descriptor memory setup region.
			  - Queue Management/Queue Proxy region for queue Push.
			  - Queue Management/Queue Proxy region for queue Pop.
```

For QMSS on K2G SoC, following QM reg indexes are used in that order

- Queue Peek region.
- Queue configuration region.
- Queue Management/Queue Proxy region for queue Push/Pop.

```text
- queue-pools	: child node classifying the queue ranges into pools.
		  Queue ranges are grouped into 3 type of pools:
		  - qpend	    : pool of qpend(interruptible) queues
		  - general-purpose : pool of general queues, primarily used
				      as free descriptor queues or the
				      transmit DMA queues.
		  - accumulator	    : pool of queues on PDSP accumulator channel
		  Each range can have the following properties:
  -- qrange		: number of queues to use per queue range, specified as
			  <"base queue #" "# of queues">.
  -- interrupts		: Optional property to specify the interrupt mapping
			  for interruptible queues. The driver additionally sets
			  the interrupt affinity hint based on the cpu mask.
  -- qalloc-by-id	: Optional property to specify that the queues in this
			  range can only be allocated by queue id.
  -- accumulator	: Accumulator channel specification. Any of the PDSPs in
			  QMSS can be loaded with the accumulator firmware. The
			  accumulator firmware’s job is to poll a select number of
			  queues looking for descriptors that have been pushed
			  into them. Descriptors are popped from the queue and
			  placed in a buffer provided by the host. When the list
			  becomes full or a programmed time period expires, the
			  accumulator triggers an interrupt to the host to read
			  the buffer for descriptor information. This firmware
			  comes in 16, 32, and 48 channel builds. Each of these
			  channels can be configured to monitor 32 contiguous
			  queues.  Accumulator channel property is specified as:
			  <pdsp-id, channel, entries, pacing mode, latency>
			  pdsp-id     : QMSS PDSP running accumulator firmware
					on which the channel has to be
					configured
			  channel     : Accumulator channel number
			  entries     : Size of the accumulator descriptor list
			  pacing mode : Interrupt pacing mode
					0 : None, i.e interrupt on list full only
					1 : Time delay since last interrupt
					2 : Time delay since first new packet
					3 : Time delay since last new packet
			  latency     : time to delay the interrupt, specified
					in microseconds.
  -- multi-queue	: Optional property to specify that the channel has to
			  monitor up to 32 queues starting at the base queue #.
- descriptor-regions	: child node describing the memory regions for keystone
			  navigator packet DMA descriptors. The memory for
			  descriptors will be allocated by the driver.
  -- id				: region number in QMSS.
  -- region-spec		: specifies the number of descriptors in the
				  region, specified as
				  <"# of descriptors" "descriptor size">.
  -- link-index			: start index, i.e. index of the first
				  descriptor in the region.
```

## Optional properties:

```text
- dma-coherent	: Present if DMA operations are coherent.
- pdsps		: child node describing the PDSP configuration.
  -- firmware		: firmware to be loaded on the PDSP.
  -- id			: the qmss pdsp that will run the firmware.
  -- reg		: Address and size of the register set for the PDSP.
			  Register regions should be specified in the following
			  order
			  - PDSP internal RAM region.
			  - PDSP control/status region registers.
			  - QMSS interrupt distributor registers.
			  - PDSP command interface region.
```

## Example:

```dts
qmss: qmss@2a40000 {
	compatible = "ti,keystone-qmss";
	dma-coherent;
	#address-cells = <1>;
	#size-cells = <1>;
	clocks = <&chipclk13>;
	ranges;
	queue-range	= <0 0x4000>;
	linkram0	= <0x100000 0x8000>;
	linkram1	= <0x0 0x10000>;

	qmgrs {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
		qmgr0 {
			managed-queues = <0 0x2000>;
			reg = <0x2a40000 0x20000>,
			      <0x2a06000 0x400>,
			      <0x2a02000 0x1000>,
			      <0x2a03000 0x1000>,
			      <0x23a80000 0x20000>,
			      <0x2a80000 0x20000>;
		};

		qmgr1 {
			managed-queues = <0x2000 0x2000>;
			reg = <0x2a60000 0x20000>,
			      <0x2a06400 0x400>,
			      <0x2a04000 0x1000>,
			      <0x2a05000 0x1000>,
			      <0x23aa0000 0x20000>,
			      <0x2aa0000 0x20000>;
		};
	};
	queue-pools {
		qpend {
			qpend-0 {
				qrange = <658 8>;
				interrupts =<0 40 0xf04 0 41 0xf04 0 42 0xf04
					     0 43 0xf04 0 44 0xf04 0 45 0xf04
					     0 46 0xf04 0 47 0xf04>;
			};
			qpend-1 {
				qrange = <8704 16>;
				interrupts = <0 48 0xf04 0 49 0xf04 0 50 0xf04
					      0 51 0xf04 0 52 0xf04 0 53 0xf04
					      0 54 0xf04 0 55 0xf04 0 56 0xf04
					      0 57 0xf04 0 58 0xf04 0 59 0xf04
					      0 60 0xf04 0 61 0xf04 0 62 0xf04
					      0 63 0xf04>;
				qalloc-by-id;
			};
			qpend-2 {
				qrange = <8720 16>;
				interrupts = <0 64 0xf04 0 65 0xf04 0 66 0xf04
					      0 59 0xf04 0 68 0xf04 0 69 0xf04
					      0 70 0xf04 0 71 0xf04 0 72 0xf04
					      0 73 0xf04 0 74 0xf04 0 75 0xf04
					      0 76 0xf04 0 77 0xf04 0 78 0xf04
					      0 79 0xf04>;
			};
		};
		general-purpose {
			gp-0 {
				qrange = <4000 64>;
			};
			netcp-tx {
				qrange = <640 9>;
				qalloc-by-id;
			};
		};
		accumulator {
			acc-0 {
				qrange = <128 32>;
				accumulator = <0 36 16 2 50>;
				interrupts = <0 215 0xf01>;
				multi-queue;
				qalloc-by-id;
			};
			acc-1 {
				qrange = <160 32>;
				accumulator = <0 37 16 2 50>;
				interrupts = <0 216 0xf01>;
				multi-queue;
			};
			acc-2 {
				qrange = <192 32>;
				accumulator = <0 38 16 2 50>;
				interrupts = <0 217 0xf01>;
				multi-queue;
			};
			acc-3 {
				qrange = <224 32>;
				accumulator = <0 39 16 2 50>;
				interrupts = <0 218 0xf01>;
				multi-queue;
			};
		};
	};
	descriptor-regions {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
		region-12 {
			id = <12>;
			region-spec = <8192 128>; /* num_desc desc_size */
			link-index = <0x4000>;
		};
	};
	pdsps {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
		pdsp0@2a10000 {
			reg = <0x2a10000 0x1000>,
			      <0x2a0f000 0x100>,
			      <0x2a0c000 0x3c8>,
			      <0x2a20000 0x4000>;
			id = <0>;
		};
	};
}; /* qmss */
```

---

# Generic AC97 Device Properties

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Generic AC97 Device Properties.

This documents describes the devicetree bindings for an ac97 controller child
node describing ac97 codecs.

## Required properties:

-compatible : Must be "ac97,vendor\_id1,vendor\_id2

```text
	      The ids shall be the 4 characters hexadecimal encoding, such as
	      given by "%04x" formatting of printf
```

-reg	    : Must be the ac97 codec number, between 0 and 3

## Example:

```dts
ac97: sound@40500000 {
	compatible = "marvell,pxa270-ac97";
	reg = < 0x40500000 0x1000 >;
	interrupts = <14>;
	reset-gpios = <&gpio 95 GPIO_ACTIVE_HIGH>;
	#sound-dai-cells = <1>;
	pinctrl-names = "default";
	pinctrl-0 = < &pinctrl_ac97_default >;
	clocks = <&clks CLK_AC97>, <&clks CLK_AC97CONF>;
	clock-names = "AC97CLK", "AC97CONFCLK";

	#address-cells = <1>;
	#size-cells = <0>;
	audio-codec@0 {
		reg = <0>;
		compatible = "ac97,574d,4c13";
		clocks = <&fixed_wm9713_clock>;
		clock-names = "ac97_clk";
	}
};
```

---

# Analog Devices ADAU1701

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Analog Devices ADAU1701.

## Required properties:

- compatible:		Should contain "adi,adau1701"
- reg:			The i2c address. Value depends on the state of ADDR0
  and ADDR1, as wired in hardware.

## Optional properties:

- reset-gpio: 		A GPIO spec to define which pin is connected to the
  chip's !RESET pin. If specified, the driver will
  assert a hardware reset at probe time.
- adi,pll-mode-gpios:	An array of two GPIO specs to describe the GPIOs
  the ADAU's PLL config pins are connected to.
  The state of the pins are set according to the
  configured clock divider on ASoC side before the
  firmware is loaded.
- adi,pin-config:	An array of 12 numerical values selecting one of the
  pin configurations as described in the datasheet,
  table 53. Note that the value of this property has
  to be prefixed with '/bits/ 8'.
- avdd-supply: 	Power supply for AVDD, providing 3.3V
- dvdd-supply: 	Power supply for DVDD, providing 3.3V

## Examples:

```dts
	i2c_bus {
		adau1701@34 {
			compatible = "adi,adau1701";
			reg = <0x34>;
			reset-gpio = <&gpio 23 0>;
			avdd-supply = <&vdd_3v3_reg>;
			dvdd-supply = <&vdd_3v3_reg>;
			adi,pll-mode-gpios = <&gpio 24 0 &gpio 25 0>;
			adi,pin-config = /bits/ 8 <0x4 0x7 0x5 0x5 0x4 0x4
                                                   0x4 0x4 0x4 0x4 0x4 0x4>;
		};
	};
```

---

# ADI AXI-I2S controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for ADI AXI-I2S controller.

The core can be generated with transmit (playback), only receive
(capture) or both directions enabled.

## Required properties:

- compatible : Must be "adi,axi-i2s-1.00.a"
- reg : Must contain I2S core's registers location and length
- clocks : Pairs of phandle and specifier referencing the controller's clocks.
  The controller expects two clocks, the clock used for the AXI interface and
  the clock used as the sampling rate reference clock sample.
- clock-names : "axi" for the clock to the AXI interface, "ref" for the sample
  rate reference clock.
- dmas: Pairs of phandle and specifier for the DMA channels that are used by
  the core. The core expects two dma channels if both transmit and receive are
  enabled, one channel otherwise.
- dma-names : "tx" for the transmit channel, "rx" for the receive channel.

For more details on the 'dma', 'dma-names', 'clock' and 'clock-names' properties
please check:

- resource-names.txt
- clock/clock-bindings.txt
- dma/dma.txt

## Example:

```dts
	i2s: i2s@77600000 {
		compatible = "adi,axi-i2s-1.00.a";
		reg = <0x77600000 0x1000>;
		clocks = <&clk 15>, <&audio_clock>;
		clock-names = "axi", "ref";
		dmas = <&ps7_dma 0>, <&ps7_dma 1>;
		dma-names = "tx", "rx";
	};
```

---

# ADI AXI-SPDIF controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for ADI AXI-SPDIF controller.

## Required properties:

- compatible : Must be "adi,axi-spdif-tx-1.00.a"
- reg : Must contain SPDIF core's registers location and length
- clocks : Pairs of phandle and specifier referencing the controller's clocks.
  The controller expects two clocks, the clock used for the AXI interface and
  the clock used as the sampling rate reference clock sample.
- clock-names: "axi" for the clock to the AXI interface, "ref" for the sample
  rate reference clock.
- dmas: Pairs of phandle and specifier for the DMA channel that is used by
  the core. The core expects one dma channel for transmit.
- dma-names : Must be "tx"

For more details on the 'dma', 'dma-names', 'clock' and 'clock-names' properties
please check:

- resource-names.txt
- clock/clock-bindings.txt
- dma/dma.txt

## Example:

```dts
	spdif: spdif@77400000 {
		compatible = "adi,axi-spdif-tx-1.00.a";
		reg = <0x77600000 0x1000>;
		clocks = <&clk 15>, <&audio_clock>;
		clock-names = "axi", "ref";
		dmas = <&ps7_dma 0>;
		dma-names = "tx";
	};
```

---

# Analog Devices SSM2305 Speaker Amplifier

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Analog Devices SSM2305 Speaker Amplifier.

## Required properties:

- compatible : "adi,ssm2305"
- shutdown-gpios : The gpio connected to the shutdown pin.
  The gpio signal is ACTIVE\_LOW.

## Example:

```dts
ssm2305: analog-amplifier {
	compatible = "adi,ssm2305";
	shutdown-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
};
```

---

# AK4118 S/PDIF transceiver

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for AK4118 S/PDIF transceiver.

This device supports I2C mode.

## Required properties:

- compatible : "asahi-kasei,ak4118"
- reg : The I2C address of the device for I2C
- reset-gpios: A GPIO specifier for the reset pin
- irq-gpios: A GPIO specifier for the IRQ pin

## Example:

```dts
&i2c {
	ak4118: ak4118@13 {
		#sound-dai-cells = <0>;
		compatible = "asahi-kasei,ak4118";
		reg = <0x13>;
		reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>
		irq-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
	};
};
```

---

# AK5386 Single-ended 24-Bit 192kHz delta-sigma ADC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for AK5386 Single-ended 24-Bit 192kHz delta-sigma ADC.

This device has no control interface.

## Required properties:

- compatible : "asahi-kasei,ak5386"

## Optional properties:

- reset-gpio : a GPIO spec for the reset/power down pin.
  If specified, it will be deasserted at probe time.
- va-supply : a regulator spec, providing 5.0V
- vd-supply : a regulator spec, providing 3.3V

## Example:

```dts
spdif: ak5386@0 {
	compatible = "asahi-kasei,ak5386";
	reset-gpio = <&gpio0 23>;
	va-supply = <&vdd_5v0_reg>;
	vd-supply = <&vdd_3v3_reg>;
};
```

---

# Device Tree bindings for the Armada 370 DB audio

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Device Tree bindings for the Armada 370 DB audio.

These Device Tree bindings are used to describe the audio complex
found on the Armada 370 DB platform.

## Mandatory properties:

- compatible: must be "marvell,a370db-audio"

- marvell,audio-controller: a phandle that points to the audio
  controller of the Armada 370 SoC.

- marvell,audio-codec: a set of three phandles that points to:

```text
    1/ the analog audio codec connected to the Armada 370 SoC
    2/ the S/PDIF transceiver
    3/ the S/PDIF receiver
```

## Example:

```dts
	sound {
	      compatible = "marvell,a370db-audio";
	      marvell,audio-controller = <&audio_controller>;
	      marvell,audio-codec = <&audio_codec &spdif_out &spdif_in>;
	};
```

---

# Atmel AC97 controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Atmel AC97 controller.

## Required properties:

- compatible: "atmel,at91sam9263-ac97c"
- reg: Address and length of the register set for the device
- interrupts: Should contain AC97 interrupt
- ac97-gpios: Please refer to [soc-ac97link.txt](</kernel/hardware/devicetree/bindings-sound/soc-ac97link.md>), only ac97-reset is used
  Optional properties:
- pinctrl-names, pinctrl-0: Please refer to pinctrl-bindings.txt

## Example:

```dts
sound@fffa0000 {
       compatible = "atmel,at91sam9263-ac97c";
       pinctrl-names = "default";
       pinctrl-0 = <&pinctrl_ac97>;
       reg = <0xfffa0000 0x4000>;
       interrupts = <18 IRQ_TYPE_LEVEL_HIGH 5>;

       ac97-gpios = <&pioB 0 0 &pioB 2 0 &pioC 29 GPIO_ACTIVE_LOW>;
};
```

---

# Devicetree bindings for the Axentia TSE-850 audio complex

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Devicetree bindings for the Axentia TSE-850 audio complex.

## Required properties:

- compatible: "axentia,tse850-pcm5142"
- axentia,cpu-dai: The phandle of the cpu dai.
- axentia,audio-codec: The phandle of the PCM5142 codec.
- axentia,add-gpios: gpio specifier that controls the mixer.
- axentia,loop1-gpios: gpio specifier that controls loop relays on channel 1.
- axentia,loop2-gpios: gpio specifier that controls loop relays on channel 2.
- axentia,ana-supply: Regulator that supplies the output amplifier. Must
  support voltages in the 2V - 20V range, in 1V steps.

## The schematics explaining the gpios are as follows:

```text
               loop1 relays
   IN1 +---o  +------------+  o---+ OUT1
            \                /
             +              +
             |   /          |
             +--o  +--.     |
             |  add   |     |
             |        V     |
             |      .---.   |
   DAC +----------->|Sum|---+
             |      '---'   |
             |              |
             +              +
```

```text
   IN2 +---o--+------------+--o---+ OUT2
```

```text
               loop2 relays
```

The 'loop1' gpio pin controls two relays, which are either in loop position,
meaning that input and output are directly connected, or they are in mixer
position, meaning that the signal is passed through the 'Sum' mixer. Similarly
for 'loop2'.

In the above, the 'loop1' relays are inactive, thus feeding IN1 to the mixer
(if 'add' is active) and feeding the mixer output to OUT1. The 'loop2' relays
are active, short-cutting the TSE-850 from channel 2. IN1, IN2, OUT1 and OUT2
are TSE-850 connectors and DAC is the PCB name of the (filtered) output from
the PCM5142 codec.

## Example:

```dts
	&ssc0 {
		#sound-dai-cells = <0>;

	};
```

```dts
	&i2c {
		codec: pcm5142@4c {
			compatible = "ti,pcm5142";

			reg = <0x4c>;

			AVDD-supply = <&reg_3v3>;
			DVDD-supply = <&reg_3v3>;
			CPVDD-supply = <&reg_3v3>;

			clocks = <&sck>;

			pll-in = <3>;
			pll-out = <6>;
		};
	};
```

```dts
	ana: ana-reg {
		compatible = "pwm-regulator";

		regulator-name = "ANA";

		pwms = <&pwm0 2 1000 PWM_POLARITY_INVERTED>;
		pwm-dutycycle-unit = <1000>;
		pwm-dutycycle-range = <100 1000>;

		regulator-min-microvolt = <2000000>;
		regulator-max-microvolt = <20000000>;
		regulator-ramp-delay = <1000>;
	};
```

```dts
	sound {
		compatible = "axentia,tse850-pcm5142";

		axentia,cpu-dai = <&ssc0>;
		axentia,audio-codec = <&codec>;

		axentia,add-gpios = <&pioA 8 GPIO_ACTIVE_LOW>;
		axentia,loop1-gpios = <&pioA 10 GPIO_ACTIVE_LOW>;
		axentia,loop2-gpios = <&pioA 11 GPIO_ACTIVE_LOW>;

		axentia,ana-supply = <&ana>;
	};
```

---

# Broadcom DSL/PON BCM63xx Audio I2S controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Broadcom DSL/PON BCM63xx Audio I2S controller.

## Required properties:

```text
- compatible:     Should be "brcm,bcm63xx-i2s".
- #address-cells: 32bit valued, 1 cell.
- #size-cells:    32bit valued, 0 cell.
- reg:            Should contain audio registers location and length
- interrupts:     Should contain the interrupt for the controller.
- clocks:         Must contain an entry for each entry in clock-names.
                  Please refer to clock-bindings.txt.
- clock-names:    One of each entry matching the clocks phandles list:
                  - "i2sclk" (generated clock) Required.
                  - "i2sosc" (fixed 200MHz clock) Required.
```

(1) : The generated clock is required only when any of TX and RX

```text
      works on Master Mode.
```

(2) : The fixed 200MHz clock is from internal chip and always on

## Example:

```dts
		i2s: bcm63xx-i2s {
			#address-cells = <1>;
			#size-cells = <0>;
			compatible = "brcm,bcm63xx-i2s";
			reg = <0xFF802080 0xFF>;
			interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&i2sclk>, <&osc>;
			clock-names = "i2sclk","i2sosc";
		};
```

---

# BROADCOM Cygnus Audio I2S/TDM/SPDIF controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for BROADCOM Cygnus Audio I2S/TDM/SPDIF controller.

## Required properties:

- compatible : "brcm,cygnus-audio"
- #address-cells: 32bit valued, 1 cell.
- #size-cells:  32bit valued, 0 cell.
- reg : Should contain audio registers location and length
- reg-names: names of the registers listed in "reg" property
  Valid names are "aud" and "i2s\_in". "aud" contains a
  set of DMA, I2S\_OUT and SPDIF registers. "i2s\_in" contains
  a set of I2S\_IN registers.
- clocks: PLL and leaf clocks used by audio ports
- assigned-clocks: PLL and leaf clocks
- assigned-clock-parents: parent clocks of the assigned clocks
  (usually the PLL)
- assigned-clock-rates: List of clock frequencies of the
  assigned clocks
- clock-names: names of 3 leaf clocks used by audio ports
  Valid names are "ch0\_audio", "ch1\_audio", "ch2\_audio"
- interrupts: audio DMA interrupt number

## SSP Subnode properties:

- reg: The index of ssp port interface to use
  Valid value are 0, 1, 2, or 3 (for spdif)

## Example:

```dts
	cygnus_audio: audio@180ae000 {
		compatible = "brcm,cygnus-audio";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x180ae000 0xafd>, <0x180aec00 0x1f8>;
		reg-names = "aud", "i2s_in";
		clocks = <&audiopll BCM_CYGNUS_AUDIOPLL_CH0>,
				<&audiopll BCM_CYGNUS_AUDIOPLL_CH1>,
				<&audiopll BCM_CYGNUS_AUDIOPLL_CH2>;
		assigned-clocks = <&audiopll BCM_CYGNUS_AUDIOPLL>,
							<&audiopll BCM_CYGNUS_AUDIOPLL_CH0>,
							<&audiopll BCM_CYGNUS_AUDIOPLL_CH1>,
							<&audiopll BCM_CYGNUS_AUDIOPLL_CH2>;
		assigned-clock-parents = <&audiopll BCM_CYGNUS_AUDIOPLL>;
		assigned-clock-rates = <1769470191>,
								<0>,
								<0>,
								<0>;
		clock-names = "ch0_audio", "ch1_audio", "ch2_audio";
		interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;

		ssp0: ssp_port@0 {
			reg = <0>;
		};

		ssp1: ssp_port@1 {
			reg = <1>;
		};

		ssp2: ssp_port@2 {
			reg = <2>;
		};

		spdif: spdif_port@3 {
			reg = <3>;
		};
	};
```

---

# Bindings for I2S controller built into xtfpga Xtensa bitstreams.

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Bindings for I2S controller built into xtfpga Xtensa bitstreams..

## Required properties:

- compatible: shall be "cdns,xtfpga-i2s".
- reg: memory region (address and length) with device registers.
- interrupts: interrupt for the device.
- clocks: phandle to the clk used as master clock. I2S bus clock
  is derived from it.

## Examples:

```dts
	i2s0: xtfpga-i2s@d080000 {
		#sound-dai-cells = <0>;
		compatible = "cdns,xtfpga-i2s";
		reg = <0x0d080000 0x40>;
		interrupts = <2 1>;
		clocks = <&cdce706 4>;
	};
```

---

# CS35L32 audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for CS35L32 audio CODEC.

## Required properties:

- compatible : "cirrus,cs35l32"

- reg : the I2C address of the device for I2C. Address is determined by the level
  of the AD0 pin. Level 0 is 0x40 while Level 1 is 0x41.

- VA-supply, VP-supply : power supplies for the device,
  as covered in [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

## Optional properties:

- reset-gpios : a GPIO spec for the reset pin. If specified, it will be
  deasserted before communication to the codec starts.

```text
  - cirrus,boost-manager : Boost voltage control.
  0 = Automatically managed.  Boost-converter output voltage is the higher
  of the two: Class G or adaptive LED voltage.
  1 = Automatically managed irrespective of audio, adapting for low-power
  dissipation when LEDs are ON, and operating in Fixed-Boost Bypass Mode
  if LEDs are OFF (VBST = VP).
  2 = (Default) Boost voltage fixed in Bypass Mode (VBST = VP).
  3 = Boost voltage fixed at 5 V.
```

```text
  - cirrus,sdout-datacfg : Data configuration for dual CS35L32 applications only.
  Determines the data packed in a two-CS35L32 configuration.
  0 = Left/right channels VMON[11:0], IMON[11:0], VPMON[7:0].
  1 = Left/right channels VMON[11:0], IMON[11:0], STATUS.
  2 = (Default) left/right channels VMON[15:0], IMON [15:0].
  3 = Left/right channels VPMON[7:0], STATUS.
```

```text
  - cirrus,sdout-share : SDOUT sharing. Determines whether one or two CS35L32
  devices are on board sharing SDOUT.
  0 = (Default) One IC.
  1 = Two IC's.
```

```text
  - cirrus,battery-recovery : Low battery nominal recovery threshold, rising VP.
  0 = 3.1V
  1 = 3.2V
  2 = 3.3V (Default)
  3 = 3.4V
```

```text
  - cirrus,battery-threshold : Low battery nominal threshold, falling VP.
  0 = 3.1V
  1 = 3.2V
  2 = 3.3V
  3 = 3.4V (Default)
  4 = 3.5V
  5 = 3.6V
```

## Example:

```dts
codec: codec@40 {
	compatible = "cirrus,cs35l32";
	reg = <0x40>;
	reset-gpios = <&gpio 10 0>;
	cirrus,boost-manager = <0x03>;
	cirrus,sdout-datacfg = <0x02>;
	VA-supply = <&reg_audio>;
};
```

---

# CS35L33 Speaker Amplifier

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for CS35L33 Speaker Amplifier.

## Required properties:

- compatible : "cirrus,cs35l33"

- reg : the I2C address of the device for I2C

- VA-supply, VP-supply : power supplies for the device,
  as covered in
  [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

## Optional properties:

- reset-gpios : gpio used to reset the amplifier

- interrupts : IRQ line info CS35L33.
  (See [Documentation/devicetree/bindings/interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>)
  for further information relating to interrupt properties)

- cirrus,boost-ctl : Booster voltage use to supply the amp. If the value is
  0, then VBST = VP. If greater than 0, the boost voltage will be 3300mV with
  a value of 1 and will increase at a step size of 100mV until a maximum of
  8000mV.

- cirrus,ramp-rate : On power up, it affects the time from when the power
  up sequence begins to the time the audio reaches a full-scale output.
  On power down, it affects the time from when the power-down sequence
  begins to when the amplifier disables the PWM outputs. If this property
  is not set then soft ramping will be disabled and ramp time would be
  20ms. If this property is set to 0,1,2,3 then ramp times would be 40ms,
  60ms,100ms,175ms respectively for 48KHz sample rate.

- cirrus,boost-ipk : The maximum current allowed for the boost converter.
  The range starts at 1850000uA and goes to a maximum of 3600000uA
  with a step size of 15625uA. The default is 2500000uA.

- cirrus,imon-adc-scale : Configures the scaling of data bits from the IMON
  ADC data word. This property can be set as a value of 0 for bits 15 down
  to 0, 6 for 21 down to 6, 7, for 22 down to 7, 8 for 23 down to 8.

## Optional H/G Algorithm sub-node:

The cs35l33 node can have a single "cirrus,hg-algo" sub-node that will enable
the internal H/G Algorithm.

- cirrus,hg-algo : Sub-node for internal Class H/G algorithm that
  controls the amplifier supplies.

## Optional properties for the "cirrus,hg-algo" sub-node:

- cirrus,mem-depth : Memory depth for the Class H/G algorithm measured in
  LRCLK cycles. If this property is set to 0, 1, 2, or 3 then the memory
  depths will be 1, 4, 8, 16 LRCLK cycles.  The default is 16 LRCLK cycles.

```text
    cirrus,release-rate : The number of consecutive LRCLK periods before
    allowing release condition tracking updates. The number of LRCLK periods
    start at 3 to a maximum of 255.
```

- cirrus,ldo-thld : Configures the signal threshold at which the PWM output
  stage enters LDO operation. Starts as a default value of 50mV for a value
  of 1 and increases with a step size of 50mV to a maximum of 750mV (value of
  0xF).

- cirrus,ldo-path-disable : This is a boolean property. If present, the H/G
  algorithm uses the max detection path.  If not present, the LDO
  detection path is used.

- cirrus,ldo-entry-delay : The LDO entry delay in milliseconds before the H/G
  algorithm switches to the LDO voltage.  This property can be set to values
  from 0 to 7 for delays of 5ms, 10ms, 50ms, 100ms, 200ms, 500ms, 1000ms.
  The default is 100ms.

- cirrus,vp-hg-auto : This is a boolean property.  When set, class H/G VPhg
  automatic updating is enabled.

- cirrus,vp-hg :  Class H/G algorithm VPhg.  Controls the H/G algorithm's
  reference to the VP voltage for when to start generating a boosted VBST.
  The reference voltage starts at 3000mV with a value of 0x3 and is increased
  by 100mV per step to a maximum of 5500mV.

- cirrus,vp-hg-rate : The rate (number of LRCLK periods) at which the VPhg is
  allowed to increase to a higher voltage when using VPhg automatic
  tracking. This property can be set to values from 0 to 3 with rates of 128
  periods, 2048 periods, 32768 periods, and 524288 periods.
  The default is 32768 periods.

- cirrus,vp-hg-va : VA calculation reference for automatic VPhg tracking
  using VPMON. This property can be set to values from 0 to 6 starting at
  1800mV with a step size of 50mV up to a maximum value of 1750mV.
  Default is 1800mV.

## Example:

```dts
cs35l33: cs35l33@40 {
	compatible = "cirrus,cs35l33";
	reg = <0x40>;

	VA-supply = <&ldo5_reg>;
	VP-supply = <&ldo5_reg>;

	interrupt-parent = <&gpio8>;
	interrupts = <3 IRQ_TYPE_LEVEL_LOW>;

	reset-gpios = <&cs47l91 34 0>;

	cirrus,ramp-rate = <0x0>;
	cirrus,boost-ctl = <0x30>;  /* VBST = 8000mV */
	cirrus,boost-ipk = <0xE0>; /* 3600mA */
	cirrus,imon-adc-scale = <0> /* Bits 15 down to 0 */

	cirrus,hg-algo {
		cirrus,mem-depth = <0x3>;
		cirrus,release-rate = <0x3>;
		cirrus,ldo-thld = <0x1>;
		cirrus,ldo-path-disable = <0x0>;
		cirrus,ldo-entry-delay=<0x4>;
		cirrus,vp-hg-auto;
		cirrus,vp-hg=<0xF>;
		cirrus,vp-hg-rate=<0x2>;
		cirrus,vp-hg-va=<0x0>;
	};
};
```

---

# CS35L34 Speaker Amplifier

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for CS35L34 Speaker Amplifier.

## Required properties:

- compatible : "cirrus,cs35l34"

- reg : the I2C address of the device for I2C.

- VA-supply, VP-supply : power supplies for the device,
  as covered in
  [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

- cirrus,boost-vtge-millivolt : Boost Voltage Value.  Configures the boost
  converter's output voltage in mV. The range is from VP to 8V with
  increments of 100mV.

- cirrus,boost-nanohenry: Inductor value for boost converter. The value is
  in nH and they can be values of 1000nH, 1100nH, 1200nH, 1500nH, and 2200nH.

## Optional properties:

- reset-gpios: GPIO used to reset the amplifier.

- interrupts : IRQ line info CS35L34.
  (See [Documentation/devicetree/bindings/interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>)
  for further information relating to interrupt properties)

- cirrus,boost-peak-milliamp : Boost converter peak current limit in mA. The
  range starts at 1200mA and goes to a maximum of 3840mA with increments of
  80mA. The default value is 2480mA.

```text
  - cirrus,i2s-sdinloc : ADSP SDIN I2S channel location. Indicates whether the
    received mono data is in the left or right portion of the I2S frame
    according to the AD0 pin or directly via this configuration.
    0x0 (Default) = Selected by AD0 input (if AD0 = LOW, use left channel),
    0x2 = Left,
    0x1 = Selected by the inversion of the AD0 input (if AD0 = LOW, use right
    channel),
    0x3 = Right.
```

- cirrus,gain-zc-disable: Boolean property. If set, the gain change will take
  effect without waiting for a zero cross.

- cirrus,tdm-rising-edge: Boolean property. If set, data is on the rising edge of
  SCLK. Otherwise, data is on the falling edge of SCLK.

## Example:

```dts
cs35l34: cs35l34@40 {
	compatible = "cirrus,cs35l34";
	reg = <0x40>;

	interrupt-parent = <&gpio8>;
	interrupts = <3 IRQ_TYPE_LEVEL_LOW>;

	reset-gpios = <&gpio 10 0>;

	cirrus,boost-vtge-milltvolt = <8000>; /* 8V */
	cirrus,boost-ind-nanohenry = <1000>; /* 1uH */
	cirrus,boost-peak-milliamp = <3000>; /* 3A */
};
```

---

# CS35L35 Boosted Speaker Amplifier

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for CS35L35 Boosted Speaker Amplifier.

## Required properties:

- compatible : "cirrus,cs35l35"

- reg : the I2C address of the device for I2C

- VA-supply, VP-supply : power supplies for the device,
  as covered in
  [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

- interrupts : IRQ line info CS35L35.
  (See [Documentation/devicetree/bindings/interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>)
  for further information relating to interrupt properties)

- cirrus,boost-ind-nanohenry: Inductor value for boost converter. The value is
  in nH and they can be values of 1000nH, 1200nH, 1500nH, and 2200nH.

## Optional properties:

- reset-gpios : gpio used to reset the amplifier

- cirrus,stereo-config : Boolean to determine if there are 2 AMPs for a
  Stereo configuration

```text
  - cirrus,audio-channel : Set Location of Audio Signal on Serial Port
  0 = Data Packet received on Left I2S Channel
  1 = Data Packet received on Right I2S Channel
```

```text
  - cirrus,advisory-channel : Set Location of Advisory Signal on Serial Port
  0 = Data Packet received on Left I2S Channel
  1 = Data Packet received on Right I2S Channel
```

- cirrus,shared-boost : Boolean to enable ClassH tracking of Advisory Signal
  if 2 Devices share Boost BST\_CTL

- cirrus,external-boost : Boolean to specify the device is using an external
  boost supply, note that sharing a boost from another cs35l35 would constitute
  using an external supply for the slave device

```text
  - cirrus,sp-drv-strength : Value for setting the Serial Port drive strength
  Table 3-10 of the datasheet lists drive-strength specifications
  0 = 1x (Default)
  1 = .5x
  - cirrus,sp-drv-unused : Determines how unused slots should be driven on the
  Serial Port.
  0 - Hi-Z
  2 - Drive 0's (Default)
  3 - Drive 1's
```

- cirrus,bst-pdn-fet-on : Boolean to determine if the Boost PDN control
  powers down with a rectification FET On or Off. If VSPK is supplied
  externally then FET is off.

- cirrus,boost-ctl-millivolt : Boost Voltage Value.  Configures the boost
  converter's output voltage in mV. The range is from 2600mV to 9000mV with
  increments of 100mV.
  (Default) VP

- cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA.
  Configures the peak current by monitoring the current through the boost FET.
  Range starts at 1680mA and goes to a maximum of 4480mA with increments of
  110mA.
  (Default) 2.46 Amps

- cirrus,amp-gain-zc : Boolean to determine if to use Amplifier gain-change
  zero-cross

## Optional H/G Algorithm sub-node:

```text
  The cs35l35 node can have a single "cirrus,classh-internal-algo" sub-node
  that will disable automatic control of the internal H/G Algorithm.
```

```text
  It is strongly recommended that the Datasheet be referenced when adjusting
  or using these Class H Algorithm controls over the internal Algorithm.
  Serious damage can occur to the Device and surrounding components.
```

- cirrus,classh-internal-algo : Sub-node for the Internal Class H Algorithm
  See Section 4.3 Internal Class H Algorithm in the Datasheet.
  If not used, the device manages the ClassH Algorithm internally.

Optional properties for the "cirrus,classh-internal-algo" Sub-node

```text
  Section 7.29 Class H Control
```

- cirrus,classh-bst-overide : Boolean
- cirrus,classh-bst-max-limit
- cirrus,classh-mem-depth

```text
  Section 7.30 Class H Headroom Control
```

- cirrus,classh-headroom

```text
  Section 7.31 Class H Release Rate
```

- cirrus,classh-release-rate

```text
  Section 7.32 Class H Weak FET Drive Control
```

- cirrus,classh-wk-fet-disable
- cirrus,classh-wk-fet-delay
- cirrus,classh-wk-fet-thld

```text
  Section 7.34 Class H VP Control
```

- cirrus,classh-vpch-auto
- cirrus,classh-vpch-rate
- cirrus,classh-vpch-man

## Optional Monitor Signal Format sub-node:

```text
  The cs35l35 node can have a single "cirrus,monitor-signal-format" sub-node
  for adjusting the Depth, Location and Frame of the Monitoring Signals
  for Algorithms.
```

```text
  See Sections 4.8.2 through 4.8.4 Serial-Port Control in the Datasheet
```

```text
  -cirrus,monitor-signal-format : Sub-node for the Monitor Signaling Formatting
  on the I2S Port. Each of the 3 8 bit values in the array contain the settings
  for depth, location, and frame.
```

```text
  If not used, the defaults for the 6 monitor signals is used.
```

```text
  Sections 7.44 - 7.53 lists values for the depth, location, and frame
  for each monitoring signal.
```

- cirrus,imon : 4 8 bit values to set the depth, location, frame and ADC
  scale of the IMON monitor signal.

- cirrus,vmon : 3 8 bit values to set the depth, location, and frame
  of the VMON monitor signal.

- cirrus,vpmon : 3 8 bit values to set the depth, location, and frame
  of the VPMON monitor signal.

- cirrus,vbstmon : 3 8 bit values to set the depth, location, and frame
  of the VBSTMON monitor signal

- cirrus,vpbrstat : 3 8 bit values to set the depth, location, and frame
  of the VPBRSTAT monitor signal

- cirrus,zerofill : 3 8 bit values to set the depth, location, and frame\\
  of the ZEROFILL packet in the monitor signal

## Example:

```dts
cs35l35: cs35l35@20 {
	compatible = "cirrus,cs35l35";
	reg = <0x20>;
	VA-supply = <&dummy_vreg>;
	VP-supply = <&dummy_vreg>;
	reset-gpios = <&axi_gpio 54 0>;
	interrupt-parent = <&gpio8>;
	interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
	cirrus,boost-ctl-millivolt = <9000>;

	cirrus,stereo-config;
	cirrus,audio-channel = <0x00>;
	cirrus,advisory-channel = <0x01>;
	cirrus,shared-boost;

	cirrus,classh-internal-algo {
		cirrus,classh-bst-overide;
		cirrus,classh-bst-max-limit = <0x01>;
		cirrus,classh-mem-depth = <0x01>;
		cirrus,classh-release-rate = <0x08>;
		cirrus,classh-headroom-millivolt = <0x0B>;
		cirrus,classh-wk-fet-disable = <0x01>;
		cirrus,classh-wk-fet-delay = <0x04>;
		cirrus,classh-wk-fet-thld = <0x01>;
		cirrus,classh-vpch-auto = <0x01>;
		cirrus,classh-vpch-rate = <0x02>;
		cirrus,classh-vpch-man = <0x05>;
	};

	/* Depth, Location, Frame */
	cirrus,monitor-signal-format {
		cirrus,imon = /bits/ 8 <0x03 0x00 0x01>;
		cirrus,vmon = /bits/ 8 <0x03 0x00 0x00>;
		cirrus,vpmon = /bits/ 8 <0x03 0x04 0x00>;
		cirrus,vbstmon = /bits/ 8 <0x03 0x04 0x01>;
		cirrus,vpbrstat = /bits/ 8 <0x00 0x04 0x00>;
		cirrus,zerofill = /bits/ 8 <0x00 0x00 0x00>;
	};

};
```

---

# CS35L36 Speaker Amplifier

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for CS35L36 Speaker Amplifier.

## Required properties:

- compatible : "cirrus,cs35l36"

- reg : the I2C address of the device for I2C

- VA-supply, VP-supply : power supplies for the device,
  as covered in
  [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

- cirrus,boost-ctl-millivolt : Boost Voltage Value.  Configures the boost
  converter's output voltage in mV. The range is from 2550mV to 12000mV with
  increments of 50mV.
  (Default) VP

- cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA.
  Configures the peak current by monitoring the current through the boost FET.
  Range starts at 1600mA and goes to a maximum of 4500mA with increments of
  50mA.
  (Default) 4.50 Amps

- cirrus,boost-ind-nanohenry : Inductor estimation LBST reference value.
  Seeds the digital boost converter's inductor estimation block with the initial
  inductance value to reference.

```dts
  1000 = 1uH (Default)
  1200 = 1.2uH
```

## Optional properties:

- cirrus,multi-amp-mode : Boolean to determine if there are more than
  one amplifier in the system. If more than one it is best to Hi-Z the ASP
  port to prevent bus contention on the output signal

- cirrus,boost-ctl-select : Boost converter control source selection.
  Selects the source of the BST\_CTL target VBST voltage for the boost
  converter to generate.
  0x00 - Control Port Value
  0x01 - Class H Tracking (Default)
  0x10 - MultiDevice Sync Value

- cirrus,amp-pcm-inv : Boolean to determine Amplifier will invert incoming
  PCM data

- cirrus,imon-pol-inv : Boolean to determine Amplifier will invert the
  polarity of outbound IMON feedback data

- cirrus,vmon-pol-inv : Boolean to determine Amplifier will invert the
  polarity of outbound VMON feedback data

- cirrus,dcm-mode-enable : Boost converter automatic DCM Mode enable.
  This enables the digital boost converter to operate in a low power
  (Discontinuous Conduction) mode during low loading conditions.

- cirrus,weak-fet-disable : Boolean : The strength of the output drivers is
  reduced when operating in a Weak-FET Drive Mode and must not be used to drive
  a large load.

- cirrus,classh-wk-fet-delay :  Weak-FET entry delay. Controls the delay
  (in ms) before the Class H algorithm switches to the weak-FET voltage
  (after the audio falls and remains below the value specified in WKFET\_AMP\_THLD).

```dts
  0 = 0ms
  1 = 5ms
  2 = 10ms
  3 = 50ms
  4 = 100ms (Default)
  5 = 200ms
  6 = 500ms
  7 = 1000ms
```

- cirrus,classh-weak-fet-thld-millivolt : Weak-FET amplifier drive threshold.
  Configures the signal threshold at which the PWM output stage enters
  weak-FET operation. The range is 50mV to 700mV in 50mV increments.

- cirrus,temp-warn-threshold :  Amplifier overtemperature warning threshold.
  Configures the threshold at which the overtemperature warning condition occurs.
  When the threshold is met, the overtemperature warning attenuation is applied
  and the TEMP\_WARN\_EINT interrupt status bit is set.
  If TEMP\_WARN\_MASK = 0, INTb is asserted.

```dts
  0 = 105C
  1 = 115C
  2 = 125C (Default)
  3 = 135C
```

- cirrus,irq-drive-select : Selects the driver type of the selected interrupt
  output.

```dts
  0 = Open-drain
  1 = Push-pull (Default)
```

- cirrus,irq-gpio-select : Selects the pin to serve as the programmable
  interrupt output.

```dts
  0 = PDM_DATA / SWIRE_SD / INT (Default)
  1 = GPIO
```

Optional properties for the "cirrus,vpbr-config" Sub-node

- cirrus,vpbr-en : VBST brownout prevention enable. Configures whether the
  VBST brownout prevention algorithm is enabled or disabled.

```dts
  0 = VBST brownout prevention disabled (default)
  1 = VBST brownout prevention enabled
```

```text
  See Section 7.31.1 VPBR Config for configuration options & further details
```

- cirrus,vpbr-thld : Initial VPBR threshold. Configures the VP brownout
  threshold voltage

- cirrus,cirrus,vpbr-atk-rate : Attenuation attack step rate. Configures the
  amount delay between consecutive volume attenuation steps when a brownout
  condition is present and the VP brownout condition is in an attacking state.

- cirrus,vpbr-atk-vol : VP brownout prevention step size. Configures the VP
  brownout prevention attacking attenuation step size when operating in either
  digital volume or analog gain modes.

- cirrus,vpbr-max-attn : Maximum attenuation that the VP brownout prevention
  can apply to the audio signal.

- cirrus,vpbr-wait : Configures the delay time between a brownout condition
  no longer being present and the VP brownout prevention entering an attenuation
  release state.

- cirrus,vpbr-rel-rate : Attenuation release step rate. Configures the delay
  between consecutive volume attenuation release steps when a brownout condition
  is not longer present and the VP brownout is in an attenuation release state.

- cirrus,vpbr-mute-en : During the attack state, if the vpbr-max-attn value
  is reached, the error condition still remains, and this bit is set, the audio
  is muted.

## Example:

```dts
cs35l36: cs35l36@40 {
	compatible = "cirrus,cs35l36";
	reg = <0x40>;
	VA-supply = <&dummy_vreg>;
	VP-supply = <&dummy_vreg>;
	reset-gpios = <&gpio0 54 0>;
	interrupt-parent = <&gpio8>;
	interrupts = <3 IRQ_TYPE_LEVEL_LOW>;

	cirrus,boost-ind-nanohenry = <1000>;
	cirrus,boost-ctl-millivolt = <10000>;
	cirrus,boost-peak-milliamp = <4500>;
	cirrus,boost-ctl-select = <0x00>;
	cirrus,weak-fet-delay = <0x04>;
	cirrus,weak-fet-thld = <0x01>;
	cirrus,temp-warn-threshold = <0x01>;
	cirrus,multi-amp-mode;
	cirrus,irq-drive-select = <0x01>;
	cirrus,irq-gpio-select = <0x01>;

	cirrus,vpbr-config {
		cirrus,vpbr-en = <0x00>;
		cirrus,vpbr-thld = <0x05>;
		cirrus,vpbr-atk-rate = <0x02>;
		cirrus,vpbr-atk-vol = <0x01>;
		cirrus,vpbr-max-attn = <0x09>;
		cirrus,vpbr-wait = <0x01>;
		cirrus,vpbr-rel-rate = <0x05>;
		cirrus,vpbr-mute-en = <0x00>;
	};
};
```

---

# CS42L52 audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for CS42L52 audio CODEC.

## Required properties:

- compatible : "cirrus,cs42l52"

- reg : the I2C address of the device for I2C

## Optional properties:

- cirrus,reset-gpio : GPIO controller's phandle and the number
  of the GPIO used to reset the codec.

```text
  - cirrus,chgfreq-divisor : Values used to set the Charge Pump Frequency.
  Allowable values of 0x00 through 0x0F. These are raw values written to the
  register, not the actual frequency. The frequency is determined by the following.
  Frequency = (64xFs)/(N+2)
  N = chgfreq_val
  Fs = Sample Rate (variable)
```

- cirrus,mica-differential-cfg : boolean, If present, then the MICA input is configured
  as a differential input. If not present then the MICA input is configured as
  Single-ended input. Single-ended mode allows for MIC1 or MIC2 muxing for input.

- cirrus,micb-differential-cfg : boolean, If present, then the MICB input is configured
  as a differential input. If not present then the MICB input is configured as
  Single-ended input. Single-ended mode allows for MIC1 or MIC2 muxing for input.

```text
  - cirrus,micbias-lvl: Set the output voltage level on the MICBIAS Pin
  0 = 0.5 x VA
  1 = 0.6 x VA
  2 = 0.7 x VA
  3 = 0.8 x VA
  4 = 0.83 x VA
  5 = 0.91 x VA
```

## Example:

```dts
codec: codec@4a {
	compatible = "cirrus,cs42l52";
	reg = <0x4a>;
	reset-gpio = <&gpio 10 0>;
	cirrus,chgfreq-divisor = <0x05>;
	cirrus.mica-differential-cfg;
	cirrus,micbias-lvl = <5>;
};
```

---

# CS42L52 audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for CS42L52 audio CODEC.

## Required properties:

- compatible : "cirrus,cs42l56"

- reg : the I2C address of the device for I2C

- VA-supply, VCP-supply, VLDO-supply : power supplies for the device,
  as covered in [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

## Optional properties:

- cirrus,gpio-nreset : GPIO controller's phandle and the number
  of the GPIO used to reset the codec.

```text
  - cirrus,chgfreq-divisor : Values used to set the Charge Pump Frequency.
  Allowable values of 0x00 through 0x0F. These are raw values written to the
  register, not the actual frequency. The frequency is determined by the following.
  Frequency = MCLK / 4 * (N+2)
  N = chgfreq_val
  MCLK = Where MCLK is the frequency of the mclk signal after the MCLKDIV2 circuit.
```

- cirrus,ain1a-ref-cfg, ain1b-ref-cfg : boolean, If present, AIN1A or AIN1B are configured
  as a pseudo-differential input referenced to AIN1REF/AIN3A.

- cirrus,ain2a-ref-cfg, ain2b-ref-cfg : boolean, If present, AIN2A or AIN2B are configured
  as a pseudo-differential input referenced to AIN2REF/AIN3B.

```text
  - cirrus,micbias-lvl: Set the output voltage level on the MICBIAS Pin.
  0 = 0.5 x VA
  1 = 0.6 x VA
  2 = 0.7 x VA
  3 = 0.8 x VA
  4 = 0.83 x VA
  5 = 0.91 x VA
```

```text
  - cirrus,adaptive-pwr-cfg : Configures how the power to the Headphone and Lineout
  Amplifiers adapt to the output signal levels.
  0 = Adapt to Volume Mode. Voltage level determined by the sum of the relevant volume settings.
  1 = Fixed - Headphone and Line Amp supply = + or - VCP/2.
  2 = Fixed - Headphone and Line Amp supply = + or - VCP.
  3 = Adapted to Signal; Voltage level is dynamically determined by the output signal.
```

```text
  - cirrus,hpf-left-freq, hpf-right-freq : Sets the corner frequency (-3dB point) for the internal High-Pass
  Filter.
  0 = 1.8Hz
  1 = 119Hz
  2 = 236Hz
  3 = 464Hz
```

## Example:

```dts
codec: codec@4b {
	compatible = "cirrus,cs42l56";
	reg = <0x4b>;
	cirrus,gpio-nreset = <&gpio 10 0>;
	cirrus,chgfreq-divisor = <0x05>;
	cirrus.ain1_ref_cfg;
	cirrus,micbias-lvl = <5>;
	VA-supply = <&reg_audio>;
};
```

---

# CS42L73 audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for CS42L73 audio CODEC.

## Required properties:

- compatible : "cirrus,cs42l73"

- reg : the I2C address of the device for I2C

## Optional properties:

- reset\_gpio : a GPIO spec for the reset pin.
- chgfreq    : Charge Pump Frequency values 0x00-0x0F

## Example:

```dts
codec: cs42l73@4a {
	compatible = "cirrus,cs42l73";
	reg = <0x4a>;
	reset_gpio = <&gpio 10 0>;
	chgfreq = <0x05>;
};
```

---

# CS43130 DAC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for CS43130 DAC.

## Required properties:

- compatible : "cirrus,cs43130", "cirrus,cs4399", "cirrus,cs43131",
  "cirrus,cs43198"

- reg : the I2C address of the device for I2C

- VA-supply, VP-supply, VL-supply, VCP-supply, VD-supply:
  power supplies for the device, as covered in
  [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

## Optional properties:

- reset-gpios : Active low GPIO used to reset the device

```text
  - cirrus,xtal-ibias:
   When external MCLK is generated by external crystal
   oscillator, CS43130 can be used to provide bias current
   for external crystal.  Amount of bias current sent is
   set as:
   1 = 7.5uA
   2 = 12.5uA
   3 = 15uA
```

- cirrus,dc-measure:
  Boolean, define to enable headphone DC impedance measurement.

- cirrus,ac-measure:
  Boolean, define to enable headphone AC impedance measurement.
  DC impedance must also be enabled for AC impedance measurement.

- cirrus,dc-threshold:
  Define 2 DC impedance thresholds in ohms for HP output control.
  Default values are 50 and 120 Ohms.

- cirrus,ac-freq:
  Define the frequencies at which to measure HP AC impedance.
  Only used if "cirrus,dc-measure" is defined.
  Exactly 10 frequencies must be defined.
  If this properties is undefined, by default,
  following frequencies are used:
  &lt;24 43 93 200 431 928 2000 4309 9283 20000&gt;
  The above frequencies are logarithmically equally spaced.
  Log base is 10.

## Example:

```dts
cs43130: audio-codec@30 {
   compatible = "cirrus,cs43130";
   reg = <0x30>;
   reset-gpios = <&axi_gpio 54 0>;
   VA-supply = <&dummy_vreg>;
   VP-supply = <&dummy_vreg>;
   VL-supply = <&dummy_vreg>;
   VCP-supply = <&dummy_vreg>;
   VD-supply = <&dummy_vreg>;
   cirrus,xtal-ibias = <2>;
   interrupt-parent = <&gpio0>;
   interrupts = <55 8>;
   cirrus,dc-measure;
   cirrus,ac-measure;
   cirrus,dc-threshold = /bits/ 16 <20 100>;
   cirrus,ac-freq = /bits/ 16 <24 43 93 200 431 928 2000 4309 9283 20000>;
};
```

---

# CS53L30 audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for CS53L30 audio CODEC.

## Required properties:

- compatible : "cirrus,cs53l30"

- reg : the I2C address of the device

- VA-supply, VP-supply : power supplies for the device,
  as covered in [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>).

## Optional properties:

- reset-gpios : a GPIO spec for the reset pin.

- mute-gpios : a GPIO spec for the MUTE pin. The active state can be either
  GPIO\_ACTIVE\_HIGH or GPIO\_ACTIVE\_LOW, which would be handled
  by the driver automatically.

```text
  - cirrus,micbias-lvl : Set the output voltage level on the MICBIAS Pin.
			 0 = Hi-Z
			 1 = 1.80 V
			 2 = 2.75 V
```

```text
  - cirrus,use-sdout2 : This is a boolean property. If present, it indicates
			the hardware design connects both SDOUT1 and SDOUT2
			pins to output data. Otherwise, it indicates that
			only SDOUT1 is connected for data output.
			* CS53l30 supports 4-channel data output in the same
			* frame using two different ways:
			* 1) Normal I2S mode on two data pins -- each SDOUT
			*    carries 2-channel data in the same time.
			* 2) TDM mode on one single data pin -- SDOUT1 carries
			*    4-channel data per frame.
```

## Example:

```dts
codec: cs53l30@48 {
	compatible = "cirrus,cs53l30";
	reg = <0x48>;
	reset-gpios = <&gpio 54 0>;
	VA-supply = <&cs53l30_va>;
	VP-supply = <&cs53l30_vp>;
};
```

---

# Dialog Semiconductor DA7218 Audio Codec bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Dialog Semiconductor DA7218 Audio Codec bindings.

DA7218 is an audio codec with HP detect feature.

---

## Required properties:

- compatible : Should be "dlg,da7217" or "dlg,da7218"
- reg: Specifies the I2C slave address

- VDD-supply: VDD power supply for the device
- VDDMIC-supply: VDDMIC power supply for the device
- VDDIO-supply: VDDIO power supply for the device
  (See [Documentation/devicetree/bindings/regulator/regulator.txt](</kernel/hardware/devicetree/bindings-regulator/regulator.md>) for further
  information relating to regulators)

## Optional properties:

- interrupts: IRQ line info for DA7218 chip.
  (See [Documentation/devicetree/bindings/interrupt-controller/interrupts.txt](</kernel/hardware/devicetree/bindings-interrupt-controller/interrupts.md>) for
  further information relating to interrupt properties)
- interrupt-names : Name associated with interrupt line. Should be "wakeup" if
  interrupt is to be used to wake system, otherwise "irq" should be used.
- wakeup-source: Flag to indicate this device can wake system (suspend/resume).

- clocks : phandle and clock specifier for codec MCLK.
- clock-names : Clock name string for 'clocks' attribute, should be "mclk".

- dlg,micbias1-lvl-millivolt : Voltage (mV) for Mic Bias 1
  \[&lt;1200&gt;, &lt;1600&gt;, &lt;1800&gt;, &lt;2000&gt;, &lt;2200&gt;, &lt;2400&gt;, &lt;2600&gt;, &lt;2800&gt;, &lt;3000&gt;\]
- dlg,micbias2-lvl-millivolt : Voltage (mV) for Mic Bias 2
  \[&lt;1200&gt;, &lt;1600&gt;, &lt;1800&gt;, &lt;2000&gt;, &lt;2200&gt;, &lt;2400&gt;, &lt;2600&gt;, &lt;2800&gt;, &lt;3000&gt;\]
- dlg,mic1-amp-in-sel : Mic1 input source type
  \["diff", "se\_p", "se\_n"\]
- dlg,mic2-amp-in-sel : Mic2 input source type
  \["diff", "se\_p", "se\_n"\]
- dlg,dmic1-data-sel : DMIC1 channel select based on clock edge.
  \["lrise\_rfall", "lfall\_rrise"\]
- dlg,dmic1-samplephase : When to sample audio from DMIC1.
  \["on\_clkedge", "between\_clkedge"\]
- dlg,dmic1-clkrate-hz : DMic1 clock frequency (Hz).
  \[&lt;1500000&gt;, &lt;3000000&gt;\]
- dlg,dmic2-data-sel : DMic2 channel select based on clock edge.
  \["lrise\_rfall", "lfall\_rrise"\]
- dlg,dmic2-samplephase : When to sample audio from DMic2.
  \["on\_clkedge", "between\_clkedge"\]
- dlg,dmic2-clkrate-hz : DMic2 clock frequency (Hz).
  \[&lt;1500000&gt;, &lt;3000000&gt;\]
- dlg,hp-diff-single-supply : Boolean flag, use single supply for HP
  (DA7217 only)

---

## Optional Child node - 'da7218\_hpldet' (DA7218 only):

## Optional properties:

- dlg,jack-rate-us : Time between jack detect measurements (us)
  \[&lt;5&gt;, &lt;10&gt;, &lt;20&gt;, &lt;40&gt;, &lt;80&gt;, &lt;160&gt;, &lt;320&gt;, &lt;640&gt;\]
- dlg,jack-debounce : Number of debounce measurements taken for jack detect
  \[&lt;0&gt;, &lt;2&gt;, &lt;3&gt;, &lt;4&gt;\]
- dlg,jack-threshold-pct : Threshold level for jack detection (% of VDD)
  \[&lt;84&gt;, &lt;88&gt;, &lt;92&gt;, &lt;96&gt;\]
- dlg,comp-inv : Boolean flag, invert comparator output
- dlg,hyst : Boolean flag, enable hysteresis
- dlg,discharge : Boolean flag, auto discharge of Mic Bias on jack removal

---

## Example:

```dts
	codec: da7218@1a {
		compatible = "dlg,da7218";
		reg = <0x1a>;
		interrupt-parent = <&gpio6>;
		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
		wakeup-source;

		VDD-supply = <&reg_audio>;
		VDDMIC-supply = <&reg_audio>;
		VDDIO-supply = <&reg_audio>;

		clocks = <&clks 201>;
		clock-names = "mclk";

		dlg,micbias1-lvl-millivolt = <2600>;
		dlg,micbias2-lvl-millivolt = <2600>;
		dlg,mic1-amp-in-sel = "diff";
		dlg,mic2-amp-in-sel = "diff";

		dlg,dmic1-data-sel = "lrise_rfall";
		dlg,dmic1-samplephase = "on_clkedge";
		dlg,dmic1-clkrate-hz = <3000000>;
		dlg,dmic2-data-sel = "lrise_rfall";
		dlg,dmic2-samplephase = "on_clkedge";
		dlg,dmic2-clkrate-hz = <3000000>;

		da7218_hpldet {
			dlg,jack-rate-us = <40>;
			dlg,jack-debounce = <2>;
			dlg,jack-threshold-pct = <84>;
			dlg,hyst;
		};
	};
```

---

# Texas Instruments SoC audio setups with TLV320AIC3X Codec

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Texas Instruments SoC audio setups with TLV320AIC3X Codec.

## Required properties:

- compatible : "ti,da830-evm-audio" : forDM365/DA8xx/OMAPL1x/AM33xx
- ti,model : The user-visible name of this sound complex.
- ti,audio-codec : The phandle of the TLV320AIC3x audio codec
- ti,mcasp-controller : The phandle of the McASP controller
- ti,audio-routing : A list of the connections between audio components.
  Each entry is a pair of strings, the first being the connection's sink,
  the second being the connection's source. Valid names for sources and
  sinks are the codec's pins, and the jacks on the board:

## Optional properties:

- ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec.
- clocks : Reference to the master clock
- clock-names : The clock should be named "mclk"
- Either codec-clock-rate or the codec-clock reference has to be defined. If
  the both are defined the driver attempts to set referenced clock to the
  defined rate and takes the rate from the clock reference.

## Board connectors:

- Headphone Jack
- Line Out
- Mic Jack
- Line In

## Example:

```dts
sound {
	compatible = "ti,da830-evm-audio";
	ti,model = "DA830 EVM";
	ti,audio-codec = <&tlv320aic3x>;
	ti,mcasp-controller = <&mcasp1>;
	ti,codec-clock-rate = <12000000>;
	ti,audio-routing =
		"Headphone Jack",       "HPLOUT",
		"Headphone Jack",       "HPROUT",
		"Line Out",             "LLOUT",
		"Line Out",             "RLOUT",
		"MIC3L",                "Mic Bias 2V",
		"MIC3R",                "Mic Bias 2V",
		"Mic Bias 2V",          "Mic Jack",
		"LINE1L",               "Line In",
		"LINE2L",               "Line In",
		"LINE1R",               "Line In",
		"LINE2R",               "Line In";
};
```

---

# Audio complex for Eukrea boards with tlv320aic23 codec.

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Audio complex for Eukrea boards with tlv320aic23 codec..

## Required properties:

- compatible		: "eukrea,asoc-tlv320"

- eukrea,model	: The user-visible name of this sound complex.

- ssi-controller	: The phandle of the SSI controller.

- fsl,mux-int-port	: The internal port of the i.MX audio muxer (AUDMUX).

- fsl,mux-ext-port	: The external port of the i.MX audio muxer.

Note: The AUDMUX port numbering should start at 1, which is consistent with
hardware manual.

## Example:

```dts
	sound {
		compatible = "eukrea,asoc-tlv320";
		eukrea,model = "imx51-eukrea-tlv320aic23";
		ssi-controller = <&ssi2>;
		fsl,mux-int-port = <2>;
		fsl,mux-ext-port = <3>;
	};
```

---

# Hisilicon 6210 i2s controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Hisilicon 6210 i2s controller.

## Required properties:

```text
- compatible: should be one of the following:
   - "hisilicon,hi6210-i2s"
- reg: physical base address of the i2s controller unit and length of
   memory mapped region.
- interrupts: should contain the i2s interrupt.
- clocks: a list of phandle + clock-specifier pairs, one for each entry
  in clock-names.
- clock-names: should contain following:
   - "dacodec"
   - "i2s-base"
- dmas: DMA specifiers for tx dma. See the DMA client binding,
  Documentation/devicetree/bindings/dma/dma.txt
- dma-names: should be "tx" and "rx"
- hisilicon,sysctrl-syscon: phandle to sysctrl syscon
- #sound-dai-cells: Should be set to 1 (for multi-dai)
   - The dai cell indexes reference the following interfaces:
       0: S2 interface
       (Currently that is the only one available, but more may be
        supported in the future)
```

## Example for the hi6210 i2s controller:

```dts
i2s0: i2s@f7118000{
	compatible = "hisilicon,hi6210-i2s";
	reg = <0x0 0xf7118000 0x0 0x8000>; /* i2s unit */
	interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; /* 155 "DigACodec_intr"-32 */
	clocks = <&sys_ctrl HI6220_DACODEC_PCLK>,
		 <&sys_ctrl HI6220_BBPPLL0_DIV>;
	clock-names = "dacodec", "i2s-base";
	dmas = <&dma0 15 &dma0 14>;
	dma-names = "rx", "tx";
	hisilicon,sysctrl-syscon = <&sys_ctrl>;
	#sound-dai-cells = <1>;
};
```

## Then when referencing the i2s controller:

```dts
	sound-dai = <&i2s0 0>; /* index 0 => S2 interface */
```

---

# Imagination Technologies I2S Input Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Imagination Technologies I2S Input Controller.

## Required Properties:

- compatible : Compatible list, must contain "img,i2s-in"

- #sound-dai-cells : Must be equal to 0

- reg : Offset and length of the register set for the device

- clocks : Contains an entry for each entry in clock-names

- clock-names : Must include the following entry:
  "sys"	The system clock

- dmas: Contains an entry for each entry in dma-names.

- dma-names: Must include the following entry:
  "rx"	Single DMA channel used by all active I2S channels

- img,i2s-channels : Number of I2S channels instantiated in the I2S in block

## Optional Properties:

- interrupts : Contains the I2S in interrupts. Depending on
  the configuration, there may be no interrupts, one interrupt,
  or an interrupt per I2S channel. For the case where there is
  one interrupt per channel, the interrupts should be listed
  in ascending channel order

- resets: Contains a phandle to the I2S in reset signal

- reset-names: Contains the reset signal name "rst"

## Example:

```dts
i2s_in: i2s-in@18100800 {
	compatible = "img,i2s-in";
	reg = <0x18100800 0x200>;
	interrupts = <GIC_SHARED 7 IRQ_TYPE_LEVEL_HIGH>;
	dmas = <&mdc 30 0xffffffff 0>;
	dma-names = "rx";
	clocks = <&cr_periph SYS_CLK_I2S_IN>;
	clock-names = "sys";
	img,i2s-channels = <6>;
	#sound-dai-cells = <0>;
};
```

---

# Imagination Technologies I2S Output Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Imagination Technologies I2S Output Controller.

## Required Properties:

- compatible : Compatible list, must contain "img,i2s-out"

- #sound-dai-cells : Must be equal to 0

- reg : Offset and length of the register set for the device

- clocks : Contains an entry for each entry in clock-names

- clock-names : Must include the following entries:
  "sys"	The system clock
  "ref"	The reference clock

- dmas: Contains an entry for each entry in dma-names.

- dma-names: Must include the following entry:
  "tx"	Single DMA channel used by all active I2S channels

- img,i2s-channels : Number of I2S channels instantiated in the I2S out block

- resets: Contains a phandle to the I2S out reset signal

- reset-names: Contains the reset signal name "rst"

## Optional Properties:

- interrupts : Contains the I2S out interrupts. Depending on
  the configuration, there may be no interrupts, one interrupt,
  or an interrupt per I2S channel. For the case where there is
  one interrupt per channel, the interrupts should be listed
  in ascending channel order

## Example:

```dts
i2s_out: i2s-out@18100a00 {
	compatible = "img,i2s-out";
	reg = <0x18100A00 0x200>;
	interrupts = <GIC_SHARED 13 IRQ_TYPE_LEVEL_HIGH>;
	dmas = <&mdc 23 0xffffffff 0>;
	dma-names = "tx";
	clocks = <&cr_periph SYS_CLK_I2S_OUT>,
		 <&clk_core CLK_I2S>;
	clock-names = "sys", "ref";
	img,i2s-channels = <6>;
	resets = <&pistachio_reset PISTACHIO_RESET_I2S_OUT>;
	reset-names = "rst";
	#sound-dai-cells = <0>;
};
```

---

# Imagination Technologies Parallel Output Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Imagination Technologies Parallel Output Controller.

## Required Properties:

- compatible : Compatible list, must contain "img,parallel-out".

- #sound-dai-cells : Must be equal to 0

- reg : Offset and length of the register set for the device.

- dmas: Contains an entry for each entry in dma-names.

- dma-names: Must include the following entry:
  "tx"

- clocks : Contains an entry for each entry in clock-names.

- clock-names : Includes the following entries:
  "sys"	The system clock
  "ref"	The reference clock

- resets: Contains a phandle to the parallel out reset signal

- reset-names: Contains the reset signal name "rst"

## Optional Properties:

- interrupts : Contains the parallel out interrupt, if present

## Example:

```dts
parallel_out: parallel-out@18100c00 {
	compatible = "img,parallel-out";
	reg = <0x18100C00 0x100>;
	interrupts = <GIC_SHARED 19 IRQ_TYPE_LEVEL_HIGH>;
	dmas = <&mdc 16 0xffffffff 0>;
	dma-names = "tx";
	clocks = <&cr_periph SYS_CLK_PAUD_OUT>,
		 <&clk_core CLK_AUDIO_DAC>;
	clock-names = "sys", "ref";
	resets = <&pistachio_reset PISTACHIO_RESET_PRL_OUT>;
	reset-names = "rst";
	#sound-dai-cells = <0>;
};
```

---

# Pistachio internal DAC DT bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Pistachio internal DAC DT bindings.

## Required properties:

- compatible: "img,pistachio-internal-dac"

- img,cr-top : Must contain a phandle to the top level control syscon
  node which contains the internal dac control registers

- VDD-supply : Digital power supply regulator (+1.8V or +3.3V)

## Examples:

```dts
internal_dac: internal-dac {
	compatible = "img,pistachio-internal-dac";
	img,cr-top = <&cr_top>;
	VDD-supply = <&supply3v3>;
};
```

---

# Imagination Technologies SPDIF Input Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Imagination Technologies SPDIF Input Controller.

## Required Properties:

- compatible : Compatible list, must contain "img,spdif-in"

- #sound-dai-cells : Must be equal to 0

- reg : Offset and length of the register set for the device

- dmas: Contains an entry for each entry in dma-names.

- dma-names: Must include the following entry:
  "rx"

- clocks : Contains an entry for each entry in clock-names

- clock-names : Includes the following entries:
  "sys"	The system clock

## Optional Properties:

- resets: Should contain a phandle to the spdif in reset signal, if any

- reset-names: Should contain the reset signal name "rst", if a
  reset phandle is given

- interrupts : Contains the spdif in interrupt, if present

## Example:

```dts
spdif_in: spdif-in@18100e00 {
	compatible = "img,spdif-in";
	reg = <0x18100E00 0x100>;
	interrupts = <GIC_SHARED 20 IRQ_TYPE_LEVEL_HIGH>;
	dmas = <&mdc 15 0xffffffff 0>;
	dma-names = "rx";
	clocks = <&cr_periph SYS_CLK_SPDIF_IN>;
	clock-names = "sys";
	#sound-dai-cells = <0>;
};
```

---

# Imagination Technologies SPDIF Output Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Imagination Technologies SPDIF Output Controller.

## Required Properties:

- compatible : Compatible list, must contain "img,spdif-out"

- #sound-dai-cells : Must be equal to 0

- reg : Offset and length of the register set for the device

- dmas: Contains an entry for each entry in dma-names.

- dma-names: Must include the following entry:
  "tx"

- clocks : Contains an entry for each entry in clock-names.

- clock-names : Includes the following entries:
  "sys"	The system clock
  "ref"	The reference clock

- resets: Contains a phandle to the spdif out reset signal

- reset-names: Contains the reset signal name "rst"

## Optional Properties:

- interrupts : Contains the parallel out interrupt, if present

## Example:

```dts
spdif_out: spdif-out@18100d00 {
	compatible = "img,spdif-out";
	reg = <0x18100D00 0x100>;
	interrupts = <GIC_SHARED 21 IRQ_TYPE_LEVEL_HIGH>;
	dmas = <&mdc 14 0xffffffff 0>;
	dma-names = "tx";
	clocks = <&cr_periph SYS_CLK_SPDIF_OUT>,
		 <&clk_core CLK_SPDIF>;
	clock-names = "sys", "ref";
	resets = <&pistachio_reset PISTACHIO_RESET_SPDIF_OUT>;
	reset-names = "rst";
	#sound-dai-cells = <0>;
};
```

---

# Marvell PXA2xx audio complex

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Marvell PXA2xx audio complex.

This descriptions matches the AC97 controller found in pxa2xx and pxa3xx series.

## Required properties:

- compatible: should be one of the following:
  "marvell,pxa250-ac97"
  "marvell,pxa270-ac97"
  "marvell,pxa300-ac97"
- reg: device MMIO address space
- interrupts: single interrupt generated by AC97 IP
- clocks: input clock of the AC97 IP, refer to clock-bindings.txt

## Optional properties:

- pinctrl-names, pinctrl-0: refer to pinctrl-bindings.txt
- reset-gpios: gpio used for AC97 reset, refer to gpio.txt

## Example:

```dts
	ac97: sound@40500000 {
		compatible = "marvell,pxa250-ac97";
		reg = < 0x40500000 0x1000 >;
		interrupts = <14>;
		reset-gpios = <&gpio 113 GPIO_ACTIVE_HIGH>;
		#sound-dai-cells = <1>;
		pinctrl-names = "default";
		pinctrl-0 = < &pmux_ac97_default >;
	};
```

---

# Maxim Integrated MAX98373 Speaker Amplifier

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Maxim Integrated MAX98373 Speaker Amplifier.

This device supports I2C.

## Required properties:

- compatible : "maxim,max98373"

- reg : the I2C address of the device.

## Optional properties:

- maxim,vmon-slot-no : slot number used to send voltage information
  or in inteleave mode this will be used as
  interleave slot.
  slot range : 0 ~ 15,  Default : 0

- maxim,imon-slot-no : slot number used to send current information
  slot range : 0 ~ 15,  Default : 0

- maxim,spkfb-slot-no : slot number used to send speaker feedback information
  slot range : 0 ~ 15,  Default : 0

- maxim,interleave-mode : For cases where a single combined channel
  for the I/V sense data is not sufficient, the device can also be configured
  to share a single data output channel on alternating frames.
  In this configuration, the current and voltage data will be frame interleaved
  on a single output channel.
  Boolean, define to enable the interleave mode, Default : false

## Example:

```dts
codec: max98373@31 {
   compatible = "maxim,max98373";
   reg = <0x31>;
   maxim,vmon-slot-no = <0>;
   maxim,imon-slot-no = <1>;
   maxim,spkfb-slot-no = <2>;
   maxim,interleave-mode;
};
```

---

# MAX9860 Mono Audio Voice Codec

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for MAX9860 Mono Audio Voice Codec.

## Required properties:

- compatible : "maxim,max9860"

- reg : the I2C address of the device

- AVDD-supply, DVDD-supply and DVDDIO-supply : power supplies for
  the device, as covered in bindings/regulator/regulator.txt

- clock-names : Required element: "mclk".

- clocks : A clock specifier for the clock connected as MCLK.

## Examples:

```dts
	max9860: max9860@10 {
		compatible = "maxim,max9860";
		reg = <0x10>;

		AVDD-supply = <&reg_1v8>;
		DVDD-supply = <&reg_1v8>;
		DVDDIO-supply = <&reg_3v0>;

		clock-names = "mclk";
		clocks = <&pck2>;
	};
```

---

# Mikroe-PROTO audio board

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Mikroe-PROTO audio board.

## Required properties:

- compatible: "mikroe,mikroe-proto"
- dai-format: Must be "i2s".
- i2s-controller: The phandle of the I2S controller.
- audio-codec: The phandle of the WM8731 audio codec.
  Optional properties:
- model: The user-visible name of this sound complex.
- bitclock-master: Indicates dai-link bit clock master; for details see simple-card.txt (1).
- frame-master: Indicates dai-link frame master; for details see simple-card.txt (1).

(1) : There must be the same master for both bit and frame clocks.

## Example:

```dts
	sound {
		compatible = "mikroe,mikroe-proto";
		model = "wm8731 @ sama5d2_xplained";
		i2s-controller = <&i2s0>;
		audio-codec = <&wm8731>;
		dai-format = "i2s";
        };
};
```

---

# Marvell PXA SSP CPU DAI bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Marvell PXA SSP CPU DAI bindings.

## Required properties:

```text
	compatible	Must be "mrvl,pxa-ssp-dai"
	port		A phandle reference to a PXA ssp upstream device
```

## Optional properties:

```text
	clock-names
	clocks		Through "clock-names" and "clocks", external clocks
			can be configured. If a clock names "extclk" exists,
			it will be set to the mclk rate of the audio stream
			and be used as clock provider of the DAI.
```

## Example:

```text
	/* upstream device */
```

```dts
	ssp1: ssp@41000000 {
		compatible = "mrvl,pxa3xx-ssp";
		reg = <0x41000000 0x40>;
		interrupts = <24>;
		clock-names = "pxa27x-ssp.0";
	};
```

```text
	/* DAI as user */
```

```dts
	ssp_dai0: ssp_dai@0 {
		compatible = "mrvl,pxa-ssp-dai";
		port = <&ssp1>;
		#sound-dai-cells = <0>;
	};
```

---

# MT2701 with CS42448 CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for MT2701 with CS42448 CODEC.

## Required properties:

- compatible: "mediatek,mt2701-cs42448-machine"
- mediatek,platform: the phandle of MT2701 ASoC platform
- audio-routing: a list of the connections between audio
- mediatek,audio-codec: the phandles of cs42448 codec
- mediatek,audio-codec-bt-mrg the phandles of bt-sco dummy codec
- pinctrl-names: Should contain only one value - "default"
- pinctrl-0: Should specify pin control groups used for this controller.
- i2s1-in-sel-gpio1, i2s1-in-sel-gpio2: Should specify two gpio pins to
  control I2S1-in mux.

## Example:

```dts
	sound:sound {
		compatible = "mediatek,mt2701-cs42448-machine";
		mediatek,platform = <&afe>;
		/* CS42448 Machine name */
		audio-routing =
			"Line Out Jack", "AOUT1L",
			"Line Out Jack", "AOUT1R",
			"Line Out Jack", "AOUT2L",
			"Line Out Jack", "AOUT2R",
			"Line Out Jack", "AOUT3L",
			"Line Out Jack", "AOUT3R",
			"Line Out Jack", "AOUT4L",
			"Line Out Jack", "AOUT4R",
			"AIN1L", "AMIC",
			"AIN1R", "AMIC",
			"AIN2L", "Tuner In",
			"AIN2R", "Tuner In",
			"AIN3L", "Satellite Tuner In",
			"AIN3R", "Satellite Tuner In",
			"AIN3L", "AUX In",
			"AIN3R", "AUX In";
		mediatek,audio-codec = <&cs42448>;
		mediatek,audio-codec-bt-mrg = <&bt_sco_codec>;
		pinctrl-names = "default";
		pinctrl-0 = <&aud_pins_default>;
		i2s1-in-sel-gpio1 = <&pio 53 0>;
		i2s1-in-sel-gpio2 = <&pio 54 0>;
	};
```

---

# Mediatek MT6351 Audio Codec

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Mediatek MT6351 Audio Codec.

The communication between MT6351 and SoC is through Mediatek PMIC wrapper.
For more detail, please visit Mediatek PMIC wrapper documentation.

Must be a child node of PMIC wrapper.

## Required properties:

- compatible : "mediatek,mt6351-sound".

## Example:

```dts
mt6351_snd {
	compatible = "mediatek,mt6351-sound";
};
```

---

# Mediatek MT6358 Audio Codec

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Mediatek MT6358 Audio Codec.

The communication between MT6358 and SoC is through Mediatek PMIC wrapper.
For more detail, please visit Mediatek PMIC wrapper documentation.

Must be a child node of PMIC wrapper.

## Required properties:

- compatible - "string" - One of:
  "mediatek,mt6358-sound"
  "mediatek,mt6366-sound"
- Avdd-supply : power source of AVDD

## Optional properties:

- mediatek,dmic-mode : Indicates how many data pins are used to transmit two
  channels of PDM signal. 0 means two wires, 1 means one wire. Default
  value is 0.

## Example:

```dts
mt6358_snd {
	compatible = "mediatek,mt6358-sound";
	Avdd-supply = <&mt6358_vaud28_reg>;
	mediatek,dmic-mode = <0>;
};
```

---

# Mediatek AFE PCM controller for mt6797

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Mediatek AFE PCM controller for mt6797.

## Required properties:

- compatible = "mediatek,mt6797-audio";
- reg: register location and size
- interrupts: should contain AFE interrupt
- power-domains: should define the power domain
- clocks: Must contain an entry for each entry in clock-names
- clock-names: should have these clock names:
  "infra\_sys\_audio\_clk",
  "infra\_sys\_audio\_26m",
  "mtkaif\_26m\_clk",
  "top\_mux\_audio",
  "top\_mux\_aud\_intbus",
  "top\_sys\_pll3\_d4",
  "top\_sys\_pll1\_d4",
  "top\_clk26m\_clk";

## Example:

```dts
	afe: mt6797-afe-pcm@11220000  {
		compatible = "mediatek,mt6797-audio";
		reg = <0 0x11220000 0 0x1000>;
		interrupts = <GIC_SPI 151 IRQ_TYPE_LEVEL_LOW>;
		power-domains = <&scpsys MT6797_POWER_DOMAIN_AUDIO>;
		clocks = <&infrasys CLK_INFRA_AUDIO>,
			 <&infrasys CLK_INFRA_AUDIO_26M>,
			 <&infrasys CLK_INFRA_AUDIO_26M_PAD_TOP>,
			 <&topckgen CLK_TOP_MUX_AUDIO>,
			 <&topckgen CLK_TOP_MUX_AUD_INTBUS>,
			 <&topckgen CLK_TOP_SYSPLL3_D4>,
			 <&topckgen CLK_TOP_SYSPLL1_D4>,
			 <&clk26m>;
		clock-names = "infra_sys_audio_clk",
			      "infra_sys_audio_26m",
			      "mtkaif_26m_clk",
			      "top_mux_audio",
			      "top_mux_aud_intbus",
			      "top_sys_pll3_d4",
			      "top_sys_pll1_d4",
			      "top_clk26m_clk";
	};
```

---

# MT6797 with MT6351 CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for MT6797 with MT6351 CODEC.

## Required properties:

- compatible: "mediatek,mt6797-mt6351-sound"
- mediatek,platform: the phandle of MT6797 ASoC platform
- mediatek,audio-codec: the phandles of MT6351 codec

## Example:

```dts
	sound {
		compatible = "mediatek,mt6797-mt6351-sound";
		mediatek,audio-codec = <&mt6351_snd>;
		mediatek,platform = <&afe>;
	};
```

---

# MT8173 with MAX98090 CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for MT8173 with MAX98090 CODEC.

## Required properties:

- compatible : "mediatek,mt8173-max98090"
- mediatek,audio-codec: the phandle of the MAX98090 audio codec
- mediatek,platform: the phandle of MT8173 ASoC platform

## Example:

```dts
	sound {
		compatible = "mediatek,mt8173-max98090";
		mediatek,audio-codec = <&max98090>;
		mediatek,platform = <&afe>;
	};
```

---

# MT8173 with RT5650 RT5514 CODECS

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for MT8173 with RT5650 RT5514 CODECS.

## Required properties:

- compatible : "mediatek,mt8173-rt5650-rt5514"
- mediatek,audio-codec: the phandles of rt5650 and rt5514 codecs
- mediatek,platform: the phandle of MT8173 ASoC platform

## Example:

```dts
	sound {
		compatible = "mediatek,mt8173-rt5650-rt5514";
		mediatek,audio-codec = <&rt5650 &rt5514>;
		mediatek,platform = <&afe>;
	};
```

---

# MT8173 with RT5650 RT5676 CODECS and HDMI via I2S

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for MT8173 with RT5650 RT5676 CODECS and HDMI via I2S.

## Required properties:

- compatible : "mediatek,mt8173-rt5650-rt5676"
- mediatek,audio-codec: the phandles of rt5650 and rt5676 codecs
  and of the hdmi encoder node
- mediatek,platform: the phandle of MT8173 ASoC platform

## Example:

```dts
	sound {
		compatible = "mediatek,mt8173-rt5650-rt5676";
		mediatek,audio-codec = <&rt5650 &rt5676 &hdmi0>;
		mediatek,platform = <&afe>;
	};
```

---

# MT8173 with RT5650 CODECS and HDMI via I2S

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for MT8173 with RT5650 CODECS and HDMI via I2S.

## Required properties:

- compatible : "mediatek,mt8173-rt5650"
- mediatek,audio-codec: the phandles of rt5650 codecs
  and of the hdmi encoder node
- mediatek,platform: the phandle of MT8173 ASoC platform

## Optional subnodes:

- codec-capture : the subnode of rt5650 codec capture
  Required codec-capture subnode properties:
- sound-dai: audio codec dai name on capture path
  &lt;&amp;rt5650 0&gt; : Default setting. Connect rt5650 I2S1 for capture. (dai\_name = rt5645-aif1)
  &lt;&amp;rt5650 1&gt; : Connect rt5650 I2S2 for capture. (dai\_name = rt5645-aif2)

- mediatek,mclk: the MCLK source
  0 : external oscillator, MCLK = 12.288M
  1 : internal source from mt8173, MCLK = sampling rate\*256

## Example:

```dts
	sound {
		compatible = "mediatek,mt8173-rt5650";
		mediatek,audio-codec = <&rt5650 &hdmi0>;
		mediatek,platform = <&afe>;
		mediatek,mclk = <0>;
		codec-capture {
			sound-dai = <&rt5650 1>;
		};
	};
```

---

# Mediatek ALSA BT SCO CVSD/MSBC Driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Mediatek ALSA BT SCO CVSD/MSBC Driver.

## Required properties:

- compatible = "mediatek,mtk-btcvsd-snd";
- reg: register location and size of PKV and SRAM\_BANK2
- interrupts: should contain BTSCO interrupt
- mediatek,infracfg: the phandles of INFRASYS
- mediatek,offset: Array contains of register offset and mask
  infra\_misc\_offset,
  infra\_conn\_bt\_cvsd\_mask,
  cvsd\_mcu\_read\_offset,
  cvsd\_mcu\_write\_offset,
  cvsd\_packet\_indicator\_offset

## Example:

```dts
	mtk-btcvsd-snd@18000000 {
		compatible = "mediatek,mtk-btcvsd-snd";
		reg=<0 0x18000000 0 0x1000>,
		    <0 0x18080000 0 0x8000>;
		interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_LOW>;
		mediatek,infracfg = <&infrasys>;
		mediatek,offset = <0xf00 0x800 0xfd0 0xfd4 0xfd8>;
	};
```

---

# mvebu (Kirkwood, Dove, Armada 370) audio controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for mvebu (Kirkwood, Dove, Armada 370) audio controller.

## Required properties:

- compatible:
  "marvell,kirkwood-audio" for Kirkwood platforms
  "marvell,dove-audio" for Dove platforms
  "marvell,armada370-audio" for Armada 370 platforms
  "marvell,armada-380-audio" for Armada 38x platforms

- reg: physical base address of the controller and length of memory mapped
  region (named "i2s\_regs").
  With "marvell,armada-380-audio" two other regions are required:
  first of those is dedicated for Audio PLL Configuration registers
  (named "pll\_regs") and the second one ("soc\_ctrl") - for register
  where one of exceptive I/O types (I2S or S/PDIF) is set.

- interrupts:
  with "marvell,kirkwood-audio", the audio interrupt
  with "marvell,dove-audio", a list of two interrupts, the first for
  the data flow, and the second for errors.

- clocks: one or two phandles.
  The first one is mandatory and defines the internal clock.
  The second one is optional and defines an external clock.

- clock-names: names associated to the clocks:
  "internal" for the internal clock
  "extclk" for the external clock

## Optional properties:

- spdif-mode:
  Enable S/PDIF mode on Armada 38x SoC. Using this property
  disables standard I2S I/O. Valid only with "marvell,armada-380-audio"
  compatible string.

## Example:

```dts
i2s1: audio-controller@b4000 {
	compatible = "marvell,dove-audio";
	reg = <0xb4000 0x2210>;
	interrupts = <21>, <22>;
	clocks = <&gate_clk 13>;
	clock-names = "internal";
};
```

---

# Nokia N900 audio setup

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Nokia N900 audio setup.

## Required properties:

- compatible: Should contain "nokia,n900-audio"
- nokia,cpu-dai: phandle for the McBSP node
- nokia,audio-codec: phandles for the main TLV320AIC3X node and the
  auxiliary TLV320AIC3X node (in this order)
- nokia,headphone-amplifier: phandle for the TPA6130A2 node
- tvout-selection-gpios: GPIO for tvout selection
- jack-detection-gpios: GPIO for jack detection
- eci-switch-gpios: GPIO for ECI (Enhancement Control Interface) switch
- speaker-amplifier-gpios: GPIO for speaker amplifier

## Example:

```dts
sound {
	compatible = "nokia,n900-audio";

	nokia,cpu-dai = <&mcbsp2>;
	nokia,audio-codec = <&tlv320aic3x>, <&tlv320aic3x_aux>;
	nokia,headphone-amplifier = <&tpa6130a2>;

	tvout-selection-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>; /* 40 */
	jack-detection-gpios = <&gpio6 17 GPIO_ACTIVE_HIGH>; /* 177 */
	eci-switch-gpios = <&gpio6 22 GPIO_ACTIVE_HIGH>; /* 182 */
	speaker-amplifier-gpios = <&twl_gpio 7 GPIO_ACTIVE_HIGH>;
};
```

---

# NVIDIA Tegra30 AHUB (Audio Hub)

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for NVIDIA Tegra30 AHUB (Audio Hub).

## Required properties:

```text
- compatible : For Tegra30, must contain "nvidia,tegra30-ahub".  For Tegra114,
  must contain "nvidia,tegra114-ahub".  For Tegra124, must contain
  "nvidia,tegra124-ahub".  Otherwise, must contain "nvidia,<chip>-ahub",
  plus at least one of the above, where <chip> is tegra132.
- reg : Should contain the register physical address and length for each of
  the AHUB's register blocks.
  - Tegra30 requires 2 entries, for the APBIF and AHUB/AUDIO register blocks.
  - Tegra114 requires an additional entry, for the APBIF2 register block.
- interrupts : Should contain AHUB interrupt
- clocks : Must contain an entry for each entry in clock-names.
  See ../clocks/clock-bindings.txt for details.
- clock-names : Must include the following entries:
  - d_audio
  - apbif
- resets : Must contain an entry for each entry in reset-names.
  See ../reset/reset.txt for details.
- reset-names : Must include the following entries:
  Tegra30 and later:
  - d_audio
  - apbif
  - i2s0
  - i2s1
  - i2s2
  - i2s3
  - i2s4
  - dam0
  - dam1
  - dam2
  - spdif
  Tegra114 and later additionally require:
  - amx
  - adx
  Tegra124 and later additionally require:
  - amx1
  - adx1
  - afc0
  - afc1
  - afc2
  - afc3
  - afc4
  - afc5
- ranges : The bus address mapping for the configlink register bus.
  Can be empty since the mapping is 1:1.
- dmas : Must contain an entry for each entry in clock-names.
  See ../dma/dma.txt for details.
- dma-names : Must include the following entries:
  - rx0 .. rx<n>
  - tx0 .. tx<n>
  ... where n is:
  Tegra30: 3
  Tegra114, Tegra124: 9
- #address-cells : For the configlink bus. Should be <1>;
- #size-cells : For the configlink bus. Should be <1>.
```

AHUB client modules need to specify the IDs of their CIFs (Client InterFaces).
For RX CIFs, the numbers indicate the register number within AHUB routing
register space (APBIF 0..3 RX, I2S 0..5 RX, DAM 0..2 RX 0..1, SPDIF RX 0..1).
For TX CIFs, the numbers indicate the bit position within the AHUB routing
registers (APBIF 0..3 TX, I2S 0..5 TX, DAM 0..2 TX, SPDIF TX 0..1).

## Example:

```dts
ahub@70080000 {
	compatible = "nvidia,tegra30-ahub";
	reg = <0x70080000 0x200 0x70080200 0x100>;
	interrupts = < 0 103 0x04 >;
	nvidia,dma-request-selector = <&apbdma 1>;
	clocks = <&tegra_car 106>, <&tegra_car 107>;
	clock-names = "d_audio", "apbif";
	resets = <&tegra_car 106>, <&tegra_car 107>, <&tegra_car 30>,
		<&tegra_car 11>, <&tegra_car 18>, <&tegra_car 101>,
		<&tegra_car 102>, <&tegra_car 108>, <&tegra_car 109>,
		<&tegra_car 110>, <&tegra_car 10>;
	reset-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2",
		"i2s3", "i2s4", "dam0", "dam1", "dam2",
		"spdif";
	dmas = <&apbdma 1>, <&apbdma 1>;
	       <&apbdma 2>, <&apbdma 2>;
	       <&apbdma 3>, <&apbdma 3>;
	       <&apbdma 4>, <&apbdma 4>;
	dma-names = "rx0", "tx0", "rx1", "tx1", "rx2", "tx2", "rx3", "tx3";
	ranges;
	#address-cells = <1>;
	#size-cells = <1>;
};
```

---

# Texas Instruments OMAP4+ and twl6040 based audio setups

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Texas Instruments OMAP4+ and twl6040 based audio setups.

## Required properties:

- compatible: "ti,abe-twl6040"
- ti,model: Name of the sound card ( for example "SDP4430")
- ti,mclk-freq: MCLK frequency for HPPLL operation
- ti,mcpdm: phandle for the McPDM node
- ti,twl6040: phandle for the twl6040 core node
- ti,audio-routing: List of connections between audio components.
  Each entry is a pair of strings, the first being the connection's sink,
  the second being the connection's source.

## Optional properties:

- ti,dmic: phandle for the OMAP dmic node if the machine have it connected
- ti,jack-detection: Need to be present if the board capable to detect jack
  insertion, removal.

## Available audio endpoints for the audio-routing table:

## Board connectors:

- Headset Stereophone
- Earphone Spk
- Ext Spk
- Line Out
- Vibrator
- Headset Mic
- Main Handset Mic
- Sub Handset Mic
- Line In
- Digital Mic

## twl6040 pins:

- HSOL
- HSOR
- EP
- HFL
- HFR
- AUXL
- AUXR
- VIBRAL
- VIBRAR
- HSMIC
- MAINMIC
- SUBMIC
- AFML
- AFMR

- Headset Mic Bias
- Main Mic Bias
- Digital Mic1 Bias
- Digital Mic2 Bias

## Digital mic pins:

- DMic

## Example:

```dts
sound {
	compatible = "ti,abe-twl6040";
	ti,model = "SDP4430";

	ti,jack-detection;
	ti,mclk-freq = <38400000>;

	ti,mcpdm = <&mcpdm>;
	ti,dmic = <&dmic>;

	ti,twl6040 = <&twl6040>;

	/* Audio routing */
	ti,audio-routing =
		"Headset Stereophone", "HSOL",
		"Headset Stereophone", "HSOR",
		"Earphone Spk", "EP",
		"Ext Spk", "HFL",
		"Ext Spk", "HFR",
		"Line Out", "AUXL",
		"Line Out", "AUXR",
		"Vibrator", "VIBRAL",
		"Vibrator", "VIBRAR",
		"HSMIC", "Headset Mic",
		"Headset Mic", "Headset Mic Bias",
		"MAINMIC", "Main Handset Mic",
		"Main Handset Mic", "Main Mic Bias",
		"SUBMIC", "Sub Handset Mic",
		"Sub Handset Mic", "Main Mic Bias",
		"AFML", "Line In",
		"AFMR", "Line In",
		"DMic", "Digital Mic",
		"Digital Mic", "Digital Mic1 Bias";
};
```

---

# Texas Instruments OMAP4+ Digital Microphone Module

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Texas Instruments OMAP4+ Digital Microphone Module.

## Required properties:

- compatible: "ti,omap4-dmic"
- reg: Register location and size as an array:
  &lt;MPU access base address, size&gt;,
  &lt;L3 interconnect address, size&gt;;
- interrupts: Interrupt number for DMIC
- ti,hwmods: Name of the hwmod associated with OMAP dmic IP

## Example:

```dts
dmic: dmic@4012e000 {
	compatible = "ti,omap4-dmic";
	reg = <0x4012e000 0x7f>, /* MPU private access */
	      <0x4902e000 0x7f>; /* L3 Interconnect */
	interrupts = <0 114 0x4>;
	interrupt-parent = <&gic>;
	ti,hwmods = "dmic";
};
```

---

# Texas Instruments OMAP2+ McBSP module

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Texas Instruments OMAP2+ McBSP module.

## Required properties:

- compatible: "ti,omap2420-mcbsp" for McBSP on OMAP2420
  "ti,omap2430-mcbsp" for McBSP on OMAP2430
  "ti,omap3-mcbsp" for McBSP on OMAP3
  "ti,omap4-mcbsp" for McBSP on OMAP4 and newer SoC
- reg: Register location and size, for OMAP4+ as an array:
  &lt;MPU access base address, size&gt;,
  &lt;L3 interconnect address, size&gt;;
- reg-names: Array of strings associated with the address space
- interrupts: Interrupt numbers for the McBSP port, as an array in case the
  McBSP IP have more interrupt lines:
  &lt;OCP compliant irq&gt;,
  &lt;TX irq&gt;,
  &lt;RX irq&gt;;
- interrupt-names: Array of strings associated with the interrupt numbers
- ti,buffer-size: Size of the FIFO on the port (OMAP2430 and newer SoC)
- ti,hwmods: Name of the hwmod associated to the McBSP port

## Example:

```dts
mcbsp2: mcbsp@49022000 {
	compatible = "ti,omap3-mcbsp";
	reg = <0x49022000 0xff>,
	      <0x49028000 0xff>;
	reg-names = "mpu", "sidetone";
	interrupts = <0 17 0x4>, /* OCP compliant interrupt */
		     <0 62 0x4>, /* TX interrupt */
		     <0 63 0x4>, /* RX interrupt */
		     <0 4 0x4>;  /* Sidetone */
	interrupt-names = "common", "tx", "rx", "sidetone";
	interrupt-parent = <&intc>;
	ti,buffer-size = <1280>;
	ti,hwmods = "mcbsp2";
};
```

---

# PCM3060 audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for PCM3060 audio CODEC.

This driver supports both I2C and SPI.

## Required properties:

- compatible: "ti,pcm3060"

- reg : the I2C address of the device for I2C, the chip select
  number for SPI.

## Optional properties:

- ti,out-single-ended: "true" if output is single-ended;
  "false" or not specified if output is differential.

## Examples:

```dts
	pcm3060: pcm3060@46 {
		 compatible = "ti,pcm3060";
		 reg = <0x46>;
		 ti,out-single-ended = "true";
	};
```

---

# Renesas R-Car sound

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Renesas R-Car sound.

---

## \* Modules

Renesas R-Car and RZ/G sound is constructed from below modules
(for Gen2 or later)

```text
 SCU		: Sampling Rate Converter Unit
```

```text
  - SRC		: Sampling Rate Converter
  - CMD
   - CTU	: Channel Transfer Unit
   - MIX	: Mixer
   - DVC	: Digital Volume and Mute Function
 SSIU		: Serial Sound Interface Unit
 SSI		: Serial Sound Interface
```

See detail of each module's channels, connection, limitation on datasheet

---

## \* Multi channel

Multi channel is supported by Multi-SSI, or TDM-SSI.

```text
 Multi-SSI	: 6ch case, you can use stereo x 3 SSI
 TDM-SSI	: 6ch case, you can use TDM
```

---

## \* Enable/Disable each modules

See datasheet to check SRC/CTU/MIX/DVC connect-limitation.
DT controls enabling/disabling module.
${LINUX}/arch/arm/boot/dts/r8a7790-lager.dts can be good example.
This is example of

Playback: \[MEM\] -&gt; \[SRC2\] -&gt; \[DVC0\] -&gt; \[SSIU0/SSI0\] -&gt; \[codec\]
Capture:  \[MEM\] &lt;- \[DVC1\] &lt;- \[SRC3\] &lt;- \[SSIU1/SSI1\] &lt;- \[codec\]

see "Example: simple sound card"

You can use below.
${LINUX}/arch/arm/boot/dts/r8a7790.dts can be good example.

```text
	&src0	&ctu00	&mix0	&dvc0	&ssi0
	&src1	&ctu01	&mix1	&dvc1	&ssi1
	&src2	&ctu02			&ssi2
	&src3	&ctu03			&ssi3
	&src4				&ssi4
	&src5	&ctu10			&ssi5
	&src6	&ctu11			&ssi6
	&src7	&ctu12			&ssi7
	&src8	&ctu13			&ssi8
	&src9				&ssi9
```

---

## \* SRC (Sampling Rate Converter)

```text
 [xx]Hz        [yy]Hz
 ------> [SRC] ------>
```

SRC can convert \[xx\]Hz to \[yy\]Hz. Then, it has below 2 modes

```text
 Asynchronous mode:	input data / output data are based on different clocks.
```

```text
			you can use this mode on Playback / Capture
 Synchronous mode:	input data / output data are based on same clocks.
			This mode will be used if system doesn't have its input clock,
			for example digital TV case.
			you can use this mode on Playback
```

---

## \*\*     Asynchronous mode

You need to use "simple-scu-audio-card" or "audio-graph-scu-card" for it.
see "Example: simple sound card for Asynchronous mode"

---

## \*\*     Synchronous mode

```text
	> amixer set "SRC Out Rate" on
	> aplay xxxx.wav
	> amixer set "SRC Out Rate" 48000
	> amixer set "SRC Out Rate" 44100
```

---

## \* CTU (Channel Transfer Unit)

```text
 [xx]ch        [yy]ch
 ------> [CTU] -------->
```

CTU can convert \[xx\]ch to \[yy\]ch, or exchange outputted channel.
CTU conversion needs matrix settings.
For more detail information, see below

```text
	Renesas R-Car datasheet
	 - Sampling Rate Converter Unit (SCU)
	  - SCU Operation
	   - CMD Block
	    - Functional Blocks in CMD
```

```text
	Renesas R-Car datasheet
	 - Sampling Rate Converter Unit (SCU)
	  - Register Description
	   - CTUn Scale Value exx Register (CTUn_SVxxR)
```

```text
	${LINUX}/sound/soc/renesas/rcar/ctu.c
	 - comment of header
```

You need to use "simple-scu-audio-card" or "audio-graph-scu-card" for it.
see "Example: simple sound card for channel convert"

Ex) Exchange output channel
 Input -&gt; Output
  1ch  -&gt;  0ch
  0ch  -&gt;  1ch

```text
  example of using matrix
```

```text
	output 0ch = (input 0ch x 0) + (input 1ch x 1)
	output 1ch = (input 0ch x 1) + (input 1ch x 0)
```

```text
	amixer set "CTU Reset" on
	amixer set "CTU Pass" 9,10
	amixer set "CTU SV0" 0,4194304
	amixer set "CTU SV1" 4194304,0
```

```text
 example of changing connection
```

```text
	amixer set "CTU Reset" on
	amixer set "CTU Pass" 2,1
```

---

## \* MIX (Mixer)

MIX merges 2 sounds path. You can see 2 sound interface on system,
and these sounds will be merged by MIX.

```text
	aplay -D plughw:0,0 xxxx.wav &
	aplay -D plughw:0,1 yyyy.wav
```

You need to use "simple-scu-audio-card" or "audio-graph-scu-card" for it.
Ex)

```text
	[MEM] -> [SRC1] -> [CTU02] -+-> [MIX0] -> [DVC0] -> [SSI0]
	                            |
	[MEM] -> [SRC2] -> [CTU03] -+
```

see "Example: simple sound card for MIXer"

---

## \* DVC (Digital Volume and Mute Function)

DVC controls Playback/Capture volume.

Playback Volume

```text
	amixer set "DVC Out" 100%
```

Capture Volume

```text
	amixer set "DVC In" 100%
```

Playback Mute

```text
	amixer set "DVC Out Mute" on
```

Capture Mute

```text
	amixer set "DVC In Mute" on
```

Volume Ramp

```text
	amixer set "DVC Out Ramp Up Rate"   "0.125 dB/64 steps"
	amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
	amixer set "DVC Out Ramp" on
	aplay xxx.wav &
	amixer set "DVC Out"  80%  // Volume Down
	amixer set "DVC Out" 100%  // Volume Up
```

---

## \* SSIU (Serial Sound Interface Unit)

SSIU can avoid some under/over run error, because it has some buffer.
But you can't use it if SSI was PIO mode.
In DMA mode, you can select not to use SSIU by using "no-busif" via SSI.

SSIU handles BUSIF which will be used for TDM Split mode.
This driver is assuming that audio-graph card will be used.

TDM Split mode merges 4 sounds. You can see 4 sound interface on system,
and these sounds will be merged SSIU/SSI.

```text
	aplay -D plughw:0,0 xxxx.wav &
	aplay -D plughw:0,1 xxxx.wav &
	aplay -D plughw:0,2 xxxx.wav &
	aplay -D plughw:0,3 xxxx.wav
```

```text
	          2ch                     8ch
	[MEM] -> [SSIU 30] -+-> [SSIU 3] --> [Codec]
	          2ch       |
	[MEM] -> [SSIU 31] -+
	          2ch       |
	[MEM] -> [SSIU 32] -+
	          2ch       |
	[MEM] -> [SSIU 33] -+
```

see "Example: simple sound card for TDM Split"

---

## \* SSI (Serial Sound Interface)

\*\*  PIO mode

You can use PIO mode which is for connection check by using.
Note: The system will drop non-SSI modules in PIO mode
even though if DT is selecting other modules.

```dts
	&ssi0 {
		pio-transfer
	};
```

\*\* DMA mode without SSIU

You can use DMA without SSIU.
Note: under/over run, or noise are likely to occur

```dts
	&ssi0 {
		no-busif;
	};
```

\*\* PIN sharing

Each SSI can share WS pin. It is based on platform.
This is example if SSI1 want to share WS pin with SSI0

```dts
	&ssi1 {
		shared-pin;
	};
```

\*\* Multi-SSI

You can use Multi-SSI.
This is example of SSI0/SSI1/SSI2 (= for 6ch)

see "Example: simple sound card for Multi channel"

\*\* TDM-SSI

You can use TDM with SSI.
This is example of TDM 6ch.
Driver can automatically switches TDM &lt;-&gt; stereo mode in this case.

see "Example: simple sound card for TDM"

---

# ROCKCHIP RK3288 with HDMI and analog audio

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for ROCKCHIP RK3288 with HDMI and analog audio.

## Required properties:

- compatible: "rockchip,rk3288-hdmi-analog"
- rockchip,model: The user-visible name of this sound complex
- rockchip,i2s-controller: The phandle of the Rockchip I2S controller that's
  connected to the CODEC
- rockchip,audio-codec: The phandle of the analog audio codec.
- rockchip,routing: A list of the connections between audio components.
  Each entry is a pair of strings, the first being the
  connection's sink, the second being the connection's
  source. For this driver the first string should always be
  "Analog".

## Optional properties:

- rockchip,hp-en-gpios = The phandle of the GPIO that power up/down the
  headphone (when the analog output is an headphone).
- rockchip,hp-det-gpios = The phandle of the GPIO that detects the headphone
  (when the analog output is an headphone).
- pinctrl-names, pinctrl-0: Please refer to pinctrl-bindings.txt

## Example:

```dts
sound {
	compatible = "rockchip,rk3288-hdmi-analog";
	rockchip,model = "Analog audio output";
	rockchip,i2s-controller = <&i2s>;
	rockchip,audio-codec = <&es8388>;
	rockchip,routing = "Analog", "LOUT2",
			   "Analog", "ROUT2";
	rockchip,hp-en-gpios = <&gpio8 0 GPIO_ACTIVE_HIGH>;
	rockchip,hp-det-gpios = <&gpio7 7 GPIO_ACTIVE_HIGH>;
	pinctrl-names = "default";
	pinctrl-0 = <&headphone>;
};
```

---

# ROCKCHIP with MAX98357A/RT5514/DA7219 codecs on GRU boards

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for ROCKCHIP with MAX98357A/RT5514/DA7219 codecs on GRU boards.

## Required properties:

- compatible: "rockchip,rk3399-gru-sound"
- rockchip,cpu: The phandle of the Rockchip I2S controller that's
  connected to the codecs
- rockchip,codec: The phandle of the audio codecs

## Optional properties:

- dmic-wakeup-delay-ms : specify delay time (ms) for DMIC ready.
  If this option is specified, which means it's required dmic need
  delay for DMIC to ready so that rt5514 can avoid recording before
  DMIC send valid data

## Example:

```dts
sound {
	compatible = "rockchip,rk3399-gru-sound";
	rockchip,cpu = <&i2s0>;
	rockchip,codec = <&max98357a &rt5514 &da7219>;
	dmic-wakeup-delay-ms = <20>;
};
```

---

# ROCKCHIP with MAX98090 CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for ROCKCHIP with MAX98090 CODEC.

## Required properties:

- compatible: "rockchip,rockchip-audio-max98090"
- rockchip,model: The user-visible name of this sound complex
- rockchip,i2s-controller: The phandle of the Rockchip I2S controller that's
  connected to the CODEC

## Optional properties:

- rockchip,audio-codec: The phandle of the MAX98090 audio codec.
- rockchip,headset-codec: The phandle of Ext chip for jack detection. This is
  required if there is rockchip,audio-codec.
- rockchip,hdmi-codec: The phandle of HDMI device for HDMI codec.

## Example:

/\* For max98090-only board. \*/

```dts
sound {
	compatible = "rockchip,rockchip-audio-max98090";
	rockchip,model = "ROCKCHIP-I2S";
	rockchip,i2s-controller = <&i2s>;
	rockchip,audio-codec = <&max98090>;
	rockchip,headset-codec = <&headsetcodec>;
};
```

/\* For HDMI-only board. \*/

```dts
sound {
	compatible = "rockchip,rockchip-audio-max98090";
	rockchip,model = "ROCKCHIP-I2S";
	rockchip,i2s-controller = <&i2s>;
	rockchip,hdmi-codec = <&hdmi>;
};
```

/\* For max98090 plus HDMI board. \*/

```dts
sound {
	compatible = "rockchip,rockchip-audio-max98090";
	rockchip,model = "ROCKCHIP-I2S";
	rockchip,i2s-controller = <&i2s>;
	rockchip,audio-codec = <&max98090>;
	rockchip,headset-codec = <&headsetcodec>;
	rockchip,hdmi-codec = <&hdmi>;
};
```

---

# ROCKCHIP with RT5645/RT5650 CODECS

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for ROCKCHIP with RT5645/RT5650 CODECS.

## Required properties:

- compatible: "rockchip,rockchip-audio-rt5645"
- rockchip,model: The user-visible name of this sound complex
- rockchip,i2s-controller: The phandle of the Rockchip I2S controller that's
  connected to the CODEC
- rockchip,audio-codec: The phandle of the RT5645/RT5650 audio codec

## Example:

```dts
sound {
	compatible = "rockchip,rockchip-audio-rt5645";
	rockchip,model = "ROCKCHIP-I2S";
	rockchip,i2s-controller = <&i2s>;
	rockchip,audio-codec = <&rt5645>;
};
```

---

# RT1011 Mono Class D Audio Amplifier

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for RT1011 Mono Class D Audio Amplifier.

This device supports I2C only.

## Required properties:

- compatible : "realtek,rt1011".

- reg : The I2C address of the device. This I2C address decide by

## two input pins (ASEL1 and ASEL2).

## |   ASEL2   |  ASEL1   |  Address   |

## |     0     |    0     |   0x38     |

## |     0     |    1     |   0x39     |

## |     1     |    0     |   0x3a     |

## |     1     |    1     |   0x3b     |

## Optional properties:

- realtek,temperature\_calib
  u32. The temperature was measured while doing the calibration. Units: Celsius degree

- realtek,r0\_calib
  u32. This is r0 calibration data which was measured in factory mode.

Pins on the device (for linking into audio routes) for RT1011:

- SPO

## Example:

```dts
rt1011: codec@38 {
	compatible = "realtek,rt1011";
	reg = <0x38>;
	realtek,temperature_calib = <25>;
	realtek,r0_calib = <0x224050>;
};
```

---

# RT1308 audio Amplifier

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for RT1308 audio Amplifier.

This device supports I2C only.

## Required properties:

- compatible : "realtek,rt1308".

- reg : The I2C address of the device.

## Example:

```dts
rt1308: rt1308@10 {
	compatible = "realtek,rt1308";
	reg = <0x10>;
};
```

---

# RT274 audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for RT274 audio CODEC.

This device supports I2C only.

## Required properties:

- compatible : "realtek,rt274".

- reg : The I2C address of the device.

## Optional properties:

- interrupts : The CODEC's interrupt output.

Pins on the device (for linking into audio routes) for RT274:

- DMIC1 Pin
- DMIC2 Pin
- MIC
- LINE1
- LINE2
- HPO Pin
- SPDIF
- LINE3

## Example:

```dts
rt274: codec@1c {
	compatible = "realtek,rt274";
	reg = <0x1c>;
	interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
};
```

---

# RT5660 audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for RT5660 audio CODEC.

This device supports I2C only.

## Required properties:

- compatible : "realtek,rt5660".

- reg : The I2C address of the device.

## Optional properties:

- clocks: The phandle of the master clock to the CODEC
- clock-names: Should be "mclk"

- realtek,in1-differential
- realtek,in3-differential
  Boolean. Indicate MIC1/3 input are differential, rather than single-ended.

- realtek,poweroff-in-suspend
  Boolean. If the codec will be powered off in suspend, the resume should be
  added delay time for waiting codec power ready.

- realtek,dmic1-data-pin
  0: dmic1 is not used
  1: using GPIO2 pin as dmic1 data pin
  2: using IN1P pin as dmic1 data pin

Pins on the device (for linking into audio routes) for RT5660:

- DMIC L1
- DMIC R1
- IN1P
- IN1N
- IN2P
- IN3P
- IN3N
- SPO
- LOUTL
- LOUTR

## Example:

```dts
rt5660 {
	compatible = "realtek,rt5660";
	reg = <0x1c>;
};
```

---

# RT5663 audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for RT5663 audio CODEC.

This device supports I2C only.

## Required properties:

- compatible : "realtek,rt5663".

- reg : The I2C address of the device.

- interrupts : The CODEC's interrupt output.

- avdd-supply: Power supply for AVDD, providing 1.8V.

- cpvdd-supply: Power supply for CPVDD, providing 3.5V.

## Optional properties:

- "realtek,dc\_offset\_l\_manual"
- "realtek,dc\_offset\_r\_manual"
- "realtek,dc\_offset\_l\_manual\_mic"
- "realtek,dc\_offset\_r\_manual\_mic"
  Based on the different PCB layout, add the manual offset value to
  compensate the DC offset for each L and R channel, and they are different
  between headphone and headset.
- "realtek,impedance\_sensing\_num"
  The matrix row number of the impedance sensing table.
  If the value is 0, it means the impedance sensing is not supported.
- "realtek,impedance\_sensing\_table"
  The matrix rows of the impedance sensing table are consisted by impedance
  minimum, impedance maximum, volume, DC offset w/o and w/ mic of each L and
  R channel accordingly. Example is shown as following.
  &lt;   0    300  7  0xffd160  0xffd1c0  0xff8a10  0xff8ab0
  301  65535  4  0xffe470  0xffe470  0xffb8e0  0xffb8e0&gt;
  The first and second column are defined for the impedance range. If the
  detected impedance value is in the range, then the volume value of the
  third column will be set to codec. In our codec design, each volume value
  should compensate different DC offset to avoid the pop sound, and it is
  also different between headphone and headset. In the example, the
  "realtek,impedance\_sensing\_num" is 2. It means that there are 2 ranges of
  impedance in the impedance sensing function.

Pins on the device (for linking into audio routes) for RT5663:

- IN1P
- IN1N
- IN2P
- IN2N
- HPOL
- HPOR

## Example:

```dts
rt5663: codec@12 {
	compatible = "realtek,rt5663";
	reg = <0x12>;
	interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
	avdd-supply = <&pp1800_a_alc5662>;
	cpvdd-supply = <&pp3500_a_alc5662>;
};
```

---

# RT5665/RT5666 audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for RT5665/RT5666 audio CODEC.

This device supports I2C only.

## Required properties:

- compatible : One of "realtek,rt5665", "realtek,rt5666".

- reg : The I2C address of the device.

- interrupts : The CODEC's interrupt output.

## Optional properties:

- realtek,in1-differential
- realtek,in2-differential
- realtek,in3-differential
- realtek,in4-differential
  Boolean. Indicate MIC1/2/3/4 input are differential, rather than single-ended.

- realtek,dmic1-data-pin
  0: dmic1 is not used
  1: using GPIO4 pin as dmic1 data pin
  2: using IN2N pin as dmic2 data pin

- realtek,dmic2-data-pin
  0: dmic2 is not used
  1: using GPIO5 pin as dmic2 data pin
  2: using IN2P pin as dmic2 data pin

- realtek,jd-src
  0: No JD is used
  1: using JD1 as JD source

- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1\_EN pin.

Pins on the device (for linking into audio routes) for RT5659/RT5658:

- DMIC L1
- DMIC R1
- DMIC L2
- DMIC R2
- IN1P
- IN1N
- IN2P
- IN2N
- IN3P
- IN3N
- IN4P
- IN4N
- HPOL
- HPOR
- LOUTL
- LOUTR
- MONOOUT
- PDML
- PDMR

## Example:

```dts
rt5659 {
	compatible = "realtek,rt5665";
	reg = <0x1b>;
	interrupt-parent = <&gpio>;
	interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_HIGH>;
	realtek,ldo1-en-gpios =
		<&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
};
```

---

# RT5668B audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for RT5668B audio CODEC.

This device supports I2C only.

## Required properties:

- compatible : "realtek,rt5668b"

- reg : The I2C address of the device.

## Optional properties:

- interrupts : The CODEC's interrupt output.

- realtek,dmic1-data-pin
  0: dmic1 is not used
  1: using GPIO2 pin as dmic1 data pin
  2: using GPIO5 pin as dmic1 data pin

- realtek,dmic1-clk-pin
  0: using GPIO1 pin as dmic1 clock pin
  1: using GPIO3 pin as dmic1 clock pin

- realtek,jd-src
  0: No JD is used
  1: using JD1 as JD source

- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1\_EN pin.

Pins on the device (for linking into audio routes) for RT5668B:

- DMIC L1
- DMIC R1
- IN1P
- HPOL
- HPOR

## Example:

```dts
rt5668 {
	compatible = "realtek,rt5668b";
	reg = <0x1a>;
	interrupt-parent = <&gpio>;
	interrupts = <TEGRA_GPIO(U, 6) IRQ_TYPE_LEVEL_HIGH>;
	realtek,ldo1-en-gpios =
		<&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_HIGH>;
	realtek,dmic1-data-pin = <1>;
	realtek,dmic1-clk-pin = <1>;
	realtek,jd-src = <1>;
};
```

---

# SiRF SoC audio port

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for SiRF SoC audio port.

## Required properties:

- compatible: "sirf,audio-port"
- reg: Base address and size entries:
- dmas: List of DMA controller phandle and DMA request line ordered pairs.
- dma-names: Identifier string for each DMA request line in the dmas property.
  These strings correspond 1:1 with the ordered pairs in dmas.

```text
  One of the DMA channels will be responsible for transmission (should be
  named "tx") and one for reception (should be named "rx").
```

## Example:

```dts
audioport: audioport@b0040000 {
	compatible = "sirf,audio-port";
	reg = <0xb0040000 0x10000>;
	dmas = <&dmac1 3>, <&dmac1 8>;
	dma-names = "rx", "tx";
};
```

---

# SiRF atlas6 and prima2 internal audio codec and port based audio setups

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for SiRF atlas6 and prima2 internal audio codec and port based audio setups.

## Required properties:

- compatible: "sirf,sirf-audio-card"
- sirf,audio-platform: phandle for the platform node
- sirf,audio-codec: phandle for the SiRF internal codec node

## Optional properties:

- hp-pa-gpios: Need to be present if the board need control external
  headphone amplifier.
- spk-pa-gpios: Need to be present if the board need control external
  speaker amplifier.
- hp-switch-gpios: Need to be present if the board capable to detect jack
  insertion, removal.

## Available audio endpoints for the audio-routing table:

## Board connectors:

- Headset Stereophone
- Ext Spk
- Line In
- Mic

## SiRF internal audio codec pins:

- HPOUTL
- HPOUTR
- SPKOUT
- Ext Mic
- Mic Bias

## Example:

```dts
sound {
		compatible = "sirf,sirf-audio-card";
		sirf,audio-codec = <&audiocodec>;
		sirf,audio-platform = <&audioport>;
		hp-pa-gpios = <&gpio 44 0>;
		spk-pa-gpios = <&gpio 46 0>;
		hp-switch-gpios = <&gpio 45 0>;
};
```

---

# AC97 link bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for AC97 link bindings.

These bindings can be included within any other device node.

## Required properties:

- pinctrl-names: Has to contain following states to setup the correct
  pinmuxing for the used gpios:
  "ac97-running": AC97-link is active
  "ac97-reset": AC97-link reset state
  "ac97-warm-reset": AC97-link warm reset state
- ac97-gpios: List of gpio phandles with args in the order ac97-sync,
  ac97-sdata, ac97-reset

## Example:

```dts
ssi {
	...

	pinctrl-names = "default", "ac97-running", "ac97-reset", "ac97-warm-reset";
	pinctrl-0 = <&ac97link_running>;
	pinctrl-1 = <&ac97link_running>;
	pinctrl-2 = <&ac97link_reset>;
	pinctrl-3 = <&ac97link_warm_reset>;
	ac97-gpios = <&gpio3 20 0 &gpio3 22 0 &gpio3 28 0>;

	...
};
```

---

# Analog Devices SSM4567 audio amplifier

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Analog Devices SSM4567 audio amplifier.

This device supports I2C only.

## Required properties:

- compatible : Must be "adi,ssm4567"
- reg : the I2C address of the device. This will either be 0x34 (LR\_SEL/ADDR connected to AGND),
  0x35 (LR\_SEL/ADDR connected to IOVDD) or 0x36 (LR\_SEL/ADDR open).

## Example:

```dts
	ssm4567: ssm4567@34 {
		compatible = "adi,ssm4567";
		reg = <0x34>;
	};
```

---

# STA32X audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for STA32X audio CODEC.

The driver for this device only supports I2C.

## Required properties:

- compatible: "st,sta32x"
- reg: the I2C address of the device for I2C
- reset-gpios: a GPIO spec for the reset pin. If specified, it will be
  deasserted before communication to the codec starts.

- power-down-gpios: a GPIO spec for the power down pin. If specified,
  it will be deasserted before communication to the codec
  starts.

- Vdda-supply: regulator spec, providing 3.3V
- Vdd3-supply: regulator spec, providing 3.3V
- Vcc-supply: regulator spec, providing 5V - 26V

## Optional properties:

- clocks, clock-names: Clock specifier for XTI input clock.
  If specified, the clock will be enabled when the codec is probed,
  and disabled when it is removed. The 'clock-names' must be set to 'xti'.

- st,output-conf: number, Selects the output configuration:
  0: 2-channel (full-bridge) power, 2-channel data-out
  1: 2 (half-bridge). 1 (full-bridge) on-board power
  2: 2 Channel (Full-Bridge) Power, 1 Channel FFX
  3: 1 Channel Mono-Parallel
  If parameter is missing, mode 0 will be enabled.
  This property has to be specified as '/bits/ 8' value.

- st,ch1-output-mapping: Channel 1 output mapping
- st,ch2-output-mapping: Channel 2 output mapping
- st,ch3-output-mapping: Channel 3 output mapping
  0: Channel 1
  1: Channel 2
  2: Channel 3
  If parameter is missing, channel 1 is chosen.
  This properties have to be specified as '/bits/ 8' values.

- st,thermal-warning-recover:
  If present, thermal warning recovery is enabled.

- st,fault-detect-recovery:
  If present, fault detect recovery is enabled.

- st,thermal-warning-adjustment:
  If present, thermal warning adjustment is enabled.

- st,fault-detect-recovery:
  If present, then fault recovery will be enabled.

- st,drop-compensation-ns: number
  Only required for "st,ffx-power-output-mode" ==
  "variable-drop-compensation".
  Specifies the drop compensation in nanoseconds.
  The value must be in the range of 0..300, and only
  multiples of 20 are allowed. Default is 140ns.

- st,max-power-use-mpcc:
  If present, then MPCC bits are used for MPC coefficients,
  otherwise standard MPC coefficients are used.

- st,max-power-corr:
  If present, power bridge correction for THD reduction near maximum
  power output is enabled.

- st,am-reduction-mode:
  If present, FFX mode runs in AM reduction mode, otherwise normal
  FFX mode is used.

- st,odd-pwm-speed-mode:
  If present, PWM speed mode run on odd speed mode (341.3 kHz) on all
  channels. If not present, normal PWM spped mode (384 kHz) will be used.

- st,invalid-input-detect-mute:
  If present, automatic invalid input detect mute is enabled.

## Example:

```dts
codec: sta32x@38 {
	compatible = "st,sta32x";
	reg = <0x1c>;
	clocks = <&clock>;
	clock-names = "xti";
	reset-gpios = <&gpio1 19 0>;
	power-down-gpios = <&gpio1 16 0>;
	st,output-conf = /bits/ 8  <0x3>;	// set output to 2-channel
						// (full-bridge) power,
						// 2-channel data-out
	st,ch1-output-mapping = /bits/ 8 <0>;	// set channel 1 output ch 1
	st,ch2-output-mapping = /bits/ 8 <0>;	// set channel 2 output ch 1
	st,ch3-output-mapping = /bits/ 8 <0>;	// set channel 3 output ch 1
	st,max-power-correction;		// enables power bridge
						// correction for THD reduction
						// near maximum power output
	st,invalid-input-detect-mute;		// mute if no valid digital
						// audio signal is provided.
};
```

---

# STA350 audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for STA350 audio CODEC.

The driver for this device only supports I2C.

## Required properties:

- compatible: "st,sta350"
- reg: the I2C address of the device for I2C
- reset-gpios: a GPIO spec for the reset pin. If specified, it will be
  deasserted before communication to the codec starts.

- power-down-gpios: a GPIO spec for the power down pin. If specified,
  it will be deasserted before communication to the codec
  starts.

- vdd-dig-supply: regulator spec, providing 3.3V
- vdd-pll-supply: regulator spec, providing 3.3V
- vcc-supply: regulator spec, providing 5V - 26V

## Optional properties:

- st,output-conf: number, Selects the output configuration:
  0: 2-channel (full-bridge) power, 2-channel data-out
  1: 2 (half-bridge). 1 (full-bridge) on-board power
  2: 2 Channel (Full-Bridge) Power, 1 Channel FFX
  3: 1 Channel Mono-Parallel
  If parameter is missing, mode 0 will be enabled.
  This property has to be specified as '/bits/ 8' value.

- st,ch1-output-mapping: Channel 1 output mapping
- st,ch2-output-mapping: Channel 2 output mapping
- st,ch3-output-mapping: Channel 3 output mapping
  0: Channel 1
  1: Channel 2
  2: Channel 3
  If parameter is missing, channel 1 is chosen.
  This properties have to be specified as '/bits/ 8' values.

- st,thermal-warning-recover:
  If present, thermal warning recovery is enabled.

- st,thermal-warning-adjustment:
  If present, thermal warning adjustment is enabled.

- st,fault-detect-recovery:
  If present, then fault recovery will be enabled.

```text
  -  st,ffx-power-output-mode: string
	The FFX power output mode selects how the FFX output timing is
	configured. Must be one of these values:
	  -  "drop-compensation"
	  -  "tapered-compensation"
	  -  "full-power-mode"
	  -  "variable-drop-compensation" (default)
```

- st,drop-compensation-ns: number
  Only required for "st,ffx-power-output-mode" ==
  "variable-drop-compensation".
  Specifies the drop compensation in nanoseconds.
  The value must be in the range of 0..300, and only
  multiples of 20 are allowed. Default is 140ns.

- st,overcurrent-warning-adjustment:
  If present, overcurrent warning adjustment is enabled.

- st,max-power-use-mpcc:
  If present, then MPCC bits are used for MPC coefficients,
  otherwise standard MPC coefficients are used.

- st,max-power-corr:
  If present, power bridge correction for THD reduction near maximum
  power output is enabled.

- st,am-reduction-mode:
  If present, FFX mode runs in AM reduction mode, otherwise normal
  FFX mode is used.

- st,odd-pwm-speed-mode:
  If present, PWM speed mode run on odd speed mode (341.3 kHz) on all
  channels. If not present, normal PWM speed mode (384 kHz) will be used.

- st,distortion-compensation:
  If present, distortion compensation variable uses DCC coefficient.
  If not present, preset DC coefficient is used.

- st,invalid-input-detect-mute:
  If present, automatic invalid input detect mute is enabled.

- st,activate-mute-output:
  If present, a mute output will be activated in ase the volume will
  reach a value lower than -76 dBFS.

- st,bridge-immediate-off:
  If present, the bridge will be switched off immediately after the
  power-down-gpio goes low. Otherwise, the bridge will wait for 13
  million clock cycles to pass before shutting down.

- st,noise-shape-dc-cut:
  If present, the noise-shaping technique on the DC cutoff filter are
  enabled.

- st,powerdown-master-volume:
  If present, the power-down pin and I2C power-down functions will
  act on the master volume. Otherwise, the functions will act on the
  mute commands.

- st,powerdown-delay-divider:
  If present, the bridge power-down time will be divided by the provided
  value. If not specified, a divider of 1 will be used. Allowed values
  are 1, 2, 4, 8, 16, 32, 64 and 128.
  This property has to be specified as '/bits/ 8' value.

## Example:

```dts
codec: sta350@38 {
	compatible = "st,sta350";
	reg = <0x1c>;
	reset-gpios = <&gpio1 19 0>;
	power-down-gpios = <&gpio1 16 0>;
	st,output-conf = /bits/ 8  <0x3>;	// set output to 2-channel
						// (full-bridge) power,
						// 2-channel data-out
	st,ch1-output-mapping = /bits/ 8 <0>;	// set channel 1 output ch 1
	st,ch2-output-mapping = /bits/ 8 <0>;	// set channel 2 output ch 1
	st,ch3-output-mapping = /bits/ 8 <0>;	// set channel 3 output ch 1
	st,max-power-correction;		// enables power bridge
						// correction for THD reduction
						// near maximum power output
	st,invalid-input-detect-mute;		// mute if no valid digital
						// audio signal is provided.
};
```

---

# STMicroelectronics sti ASoC cards

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for STMicroelectronics sti ASoC cards.

The sti ASoC Sound Card can be used, for all sti SoCs using internal sti-sas
codec or external codecs.

sti sound drivers allows to expose sti SoC audio interface through the
generic ASoC simple card. For details about sound card declaration please refer to
[Documentation/devicetree/bindings/sound/simple-card.yaml](</kernel/hardware/devicetree-bindings/dt-sound/simple-card.md>).

## 1\) sti-uniperiph-dai: audio dai device.

## Required properties:

- compatible: "st,stih407-uni-player-hdmi", "st,stih407-uni-player-pcm-out",
  "st,stih407-uni-player-dac", "st,stih407-uni-player-spdif",
  "st,stih407-uni-reader-pcm\_in", "st,stih407-uni-reader-hdmi",

- st,syscfg: phandle to boot-device system configuration registers

- clock-names: name of the clocks listed in clocks property in the same order

- reg: CPU DAI IP Base address and size entries, listed  in same
  order than the CPU\_DAI properties.

- reg-names: names of the mapped memory regions listed in regs property in
  the same order.

- interrupts: CPU\_DAI interrupt line, listed in the same order than the
  CPU\_DAI properties.

- dma: CPU\_DAI DMA controller phandle and DMA request line, listed in the same
  order than the CPU\_DAI properties.

- dma-names: identifier string for each DMA request line in the dmas property.
  "tx" for "st,sti-uni-player" compatibility
  "rx" for "st,sti-uni-reader" compatibility

## Required properties ("st,sti-uni-player" compatibility only):

- clocks: CPU\_DAI IP clock source, listed in the same order than the
  CPU\_DAI properties.

## Optional properties:

- pinctrl-0: defined for CPU\_DAI@1 and CPU\_DAI@4 to describe I2S PIOs for
  external codecs connection.

- pinctrl-names: should contain only one value - "default".

- st,tdm-mode: to declare to set TDM mode for unireader and uniplayer IPs.
  Only compartible with IPs in charge of the external I2S/TDM bus.
  Should be declared depending on associated codec.

## Example:

```dts
	sti_uni_player1: sti-uni-player@8d81000 {
		compatible = "st,stih407-uni-player-hdmi";
		#sound-dai-cells = <0>;
		st,syscfg = <&syscfg_core>;
		clocks = <&clk_s_d0_flexgen CLK_PCM_1>;
		reg = <0x8D81000 0x158>;
		interrupts = <GIC_SPI 85 IRQ_TYPE_NONE>;
		dmas = <&fdma0 3 0 1>;
		dma-names = "tx";
		st,tdm-mode = <1>;
	};
```

```dts
	sti_uni_player2: sti-uni-player@8d82000 {
		compatible = "st,stih407-uni-player-pcm-out";
		#sound-dai-cells = <0>;
		st,syscfg = <&syscfg_core>;
		clocks = <&clk_s_d0_flexgen CLK_PCM_2>;
		reg = <0x8D82000 0x158>;
		interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
		dmas = <&fdma0 4 0 1>;
		dma-names = "tx";
	};
```

```dts
	sti_uni_player3: sti-uni-player@8d85000 {
		compatible = "st,stih407-uni-player-spdif";
		#sound-dai-cells = <0>;
		st,syscfg = <&syscfg_core>;
		clocks = <&clk_s_d0_flexgen CLK_SPDIFF>;
		reg = <0x8D85000 0x158>;
		interrupts = <GIC_SPI 89 IRQ_TYPE_NONE>;
		dmas = <&fdma0 7 0 1>;
		dma-names = "tx";
	};
```

```dts
	sti_uni_reader1: sti-uni-reader@8d84000 {
		compatible = "st,stih407-uni-reader-hdmi";
		#sound-dai-cells = <0>;
		st,syscfg = <&syscfg_core>;
		reg = <0x8D84000 0x158>;
		interrupts = <GIC_SPI 88 IRQ_TYPE_NONE>;
		dmas = <&fdma0 6 0 1>;
		dma-names = "rx";
	};
```

## 2\) sti-sas-codec: internal audio codec IPs driver

## Required properties:

- compatible: "st,sti&lt;chip&gt;-sas-codec" .
  Should be chip "st,stih416-sas-codec" or "st,stih407-sas-codec"

- st,syscfg: phandle to boot-device system configuration registers.

- pinctrl-0: SPDIF PIO description.

- pinctrl-names: should contain only one value - "default".

## Example:

```dts
	sti_sas_codec: sti-sas-codec {
		compatible = "st,stih407-sas-codec";
		#sound-dai-cells = <1>;
		st,reg_audio = <&syscfg_core>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_spdif_out >;
	};
```

## Example of audio card declaration:

```dts
	sound {
		compatible = "simple-audio-card";
		simple-audio-card,name = "sti audio card";

		simple-audio-card,dai-link@0 {
			/* DAC */
			format = "i2s";
			dai-tdm-slot-width = <32>;
			cpu {
				sound-dai = <&sti_uni_player2>;
			};

			codec {
				sound-dai = <&sti_sasg_codec 1>;
			};
		};
		simple-audio-card,dai-link@1 {
			/* SPDIF */
			format = "left_j";
			cpu {
				sound-dai = <&sti_uni_player3>;
			};

			codec {
				sound-dai = <&sti_sasg_codec 0>;
			};
		};
		simple-audio-card,dai-link@2 {
			/* TDM playback  */
			format = "left_j";
			frame-inversion = <1>;
			cpu {
				sound-dai = <&sti_uni_player1>;
				dai-tdm-slot-num = <16>;
				dai-tdm-slot-width = <16>;
				dai-tdm-slot-tx-mask =
					<1 1 1 1 0 0 0 0 0 0 1 1 0 0 1 1>;
			};

			codec {
				sound-dai = <&sti_sasg_codec 3>;
			};
		};
	};
```

---

# Sound complex for Storm boards

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Sound complex for Storm boards.

Models a soundcard for Storm boards with the Qualcomm Technologies IPQ806x SOC
connected to a MAX98357A DAC via I2S.

## Required properties:

- compatible	: "google,storm-audio"
- cpu		: Phandle of the CPU DAI
- codec		: Phandle of the codec DAI

## Optional properties:

- qcom,model	: The user-visible name of this sound card.

## Example:

```dts
sound {
	compatible = "google,storm-audio";
	qcom,model = "ipq806x-storm";
	cpu = <&lpass_cpu>;
	codec = <&max98357a>;
};
```

---

# Texas Instruments TAS5720 Mono Audio amplifier

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Texas Instruments TAS5720 Mono Audio amplifier.

The TAS5720 serial control bus communicates through the I2C protocol only. The
serial bus is also used for periodic codec fault checking/reporting during
audio playback. For more product information please see the links below:

https://www.ti.com/product/TAS5720L
https://www.ti.com/product/TAS5720M
https://www.ti.com/product/TAS5720A-Q1
https://www.ti.com/product/TAS5722L

## Required properties:

- compatible : "ti,tas5720",
  "ti,tas5720a-q1",
  "ti,tas5722"
- reg : I2C slave address
- dvdd-supply : phandle to a 3.3-V supply for the digital circuitry
- pvdd-supply : phandle to a supply used for the Class-D amp and the analog

## Example:

```dts
tas5720: tas5720@6c {
	compatible = "ti,tas5720";
	reg = <0x6c>;
	dvdd-supply = <&vdd_3v3_reg>;
	pvdd-supply = <&amp_supply_reg>;
};
```

---

# TDA7419 audio processor

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for TDA7419 audio processor.

This device supports I2C only.

## Required properties:

- compatible : "st,tda7419"
- reg : the I2C address of the device.
- vdd-supply : a regulator spec for the common power supply (8-10V)

## Optional properties:

- st,mute-gpios : a GPIO spec for the MUTE pin.

## Pins on the device (for linking into audio routes):

- SE3L
- SE3R
- SE2L
- SE2R
- SE1L
- SE1R
- DIFFL
- DIFFR
- MIX
- OUTLF
- OUTRF
- OUTLR
- OUTRR
- OUTSW

## Example:

```dts
ap: tda7419@44 {
	compatible = "st,tda7419";
	reg = <0x44>;
	vdd-supply = <&vdd_9v0_reg>;
};
```

---

# TDM slot:

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for TDM slot:.

This specifies audio DAI's TDM slot.

## TDM slot properties:

dai-tdm-slot-num : Number of slots in use.
dai-tdm-slot-width : Width in bits for each slot.
dai-tdm-slot-tx-mask : Transmit direction slot mask, optional
dai-tdm-slot-rx-mask : Receive direction slot mask, optional

## For instance:

```dts
	dai-tdm-slot-num = <2>;
	dai-tdm-slot-width = <8>;
	dai-tdm-slot-tx-mask = <0 1>;
	dai-tdm-slot-rx-mask = <1 0>;
```

And for each specified driver, there could be one .of\_xlate\_tdm\_slot\_mask()
to specify an explicit mapping of the channels and the slots. If it's absent
the default snd\_soc\_of\_xlate\_tdm\_slot\_mask() will be used to generating the
tx and rx masks.

For snd\_soc\_of\_xlate\_tdm\_slot\_mask(), the tx and rx masks will use a 1 bit
for an active slot as default, and the default active bits are at the LSB of
the masks.

The explicit masks are given as array of integers, where the first
number presents bit-0 (LSB), second presents bit-1, etc. Any non zero
number is considered 1 and 0 is 0. snd\_soc\_of\_xlate\_tdm\_slot\_mask()
does not do anything, if either mask is set non zero value.

---

# Texas Intstruments ADS117x ADC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Texas Intstruments ADS117x ADC.

## Required properties:

- compatible : "ti,ads1174" or "ti,ads1178"

## Example:

```dts
ads1178 {
	compatible = "ti,ads1178";
};
```

---

# Texas Instruments TAS5086 6-channel PWM Processor

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Texas Instruments TAS5086 6-channel PWM Processor.

## Required properties:

- compatible:		Should contain "ti,tas5086".
- reg:			The i2c address. Should contain &lt;0x1b&gt;.

## Optional properties:

- reset-gpio: 		A GPIO spec to define which pin is connected to the
  chip's !RESET pin. If specified, the driver will
  assert a hardware reset at probe time.

- ti,charge-period:	This property should contain the time in microseconds
  that closely matches the external single-ended
  split-capacitor charge period. The hardware chip
  waits for this period of time before starting the
  PWM signals. This helps reduce pops and clicks.

```text
			When not specified, the hardware default of 1300ms
			is retained.
```

- ti,mid-z-channel-X:	Boolean properties, X being a number from 1 to 6.
  If given, channel X will start with the Mid-Z start
  sequence, otherwise the default Low-Z scheme is used.

```text
			The correct configuration depends on how the power
			stages connected to the PWM output pins work. Not all
			power stages are compatible to Mid-Z - please refer
			to the datasheets for more details.
```

```text
			Most systems should not set any of these properties.
```

- avdd-supply:         Power supply for AVDD, providing 3.3V
- dvdd-supply:         Power supply for DVDD, providing 3.3V

## Examples:

```dts
	i2c_bus {
		tas5086@1b {
			compatible = "ti,tas5086";
			reg = <0x1b>;
			reset-gpio = <&gpio 23 0>;
			ti,charge-period = <156000>;
			avdd-supply = <&vdd_3v3_reg>;
			dvdd-supply = <&vdd_3v3_reg>;
		};
	};
```

---

# Texas Instruments TAS6424 Quad-Channel Audio amplifier

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Texas Instruments TAS6424 Quad-Channel Audio amplifier.

The TAS6424 serial control bus communicates through I2C protocols.

## Required properties:

- compatible: "ti,tas6424" - TAS6424
- reg: I2C slave address
- sound-dai-cells: must be equal to 0
- standby-gpios: GPIO used to shut the TAS6424 down.
- mute-gpios: GPIO used to mute all the outputs

## Example:

```dts
tas6424: tas6424@6a {
	compatible = "ti,tas6424";
	reg = <0x6a>;

	#sound-dai-cells = <0>;
};
```

## For more product information please see the link below:

https://www.ti.com/product/TAS6424-Q1

---

# TSCS42XX Audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for TSCS42XX Audio CODEC.

## Required Properties:

- compatible :	"tempo,tscs42A1" for analog mic
  "tempo,tscs42A2" for digital mic

- reg : 	&lt;0x71&gt; for analog mic
  &lt;0x69&gt; for digital mic

- clock-names:	Must one of  the following "mclk1", "xtal", "mclk2"

- clocks:	phandle of the clock that provides the codec sysclk

## Example:

```dts
wookie: codec@69 {
	compatible = "tempo,tscs42A2";
	reg = <0x69>;
	clock-names = "xtal";
	clocks = <&audio_xtal>;
};
```

---

# TSCS454 Audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for TSCS454 Audio CODEC.

## Required Properties:

- compatible :	"tempo,tscs454"

- reg : 	&lt;0x69&gt;

- clock-names:	Must one of  the following "xtal", "mclk1", "mclk2"

- clocks:	phandle of the clock that provides the codec sysclk

```text
	Note: If clock is not provided then bit clock is assumed
```

## Example:

```dts
redwood: codec@69 {
	#sound-dai-cells = <1>;
	compatible = "tempo,tscs454";
	reg = <0x69>;
	clock-names = "mclk1";
	clocks = <&audio_mclk>;
};
```

---

# UDA1334 audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for UDA1334 audio CODEC.

This device uses simple GPIO pins for controlling codec settings.

## Required properties:

- compatible : "nxp,uda1334"
- nxp,mute-gpios: a GPIO spec for the MUTE pin.
- nxp,deemph-gpios: a GPIO spec for the De-emphasis pin

## Example:

```dts
uda1334: audio-codec {
	compatible = "nxp,uda1334";
	nxp,mute-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
	nxp,deemph-gpios = <&gpio3 3 GPIO_ACTIVE_LOW>;
};
```

---

# MOP500 Audio Machine Driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for MOP500 Audio Machine Driver.

This node is responsible for linking together all ux500 Audio Driver components.

## Required properties:

- compatible              : "stericsson,snd-soc-mop500"

## Non-standard properties:

- stericsson,cpu-dai      : Phandle to the CPU-side DAI
- stericsson,audio-codec  : Phandle to the Audio CODEC
- stericsson,card-name    : Over-ride default card name

## Example:

```dts
	sound {
		compatible = "stericsson,snd-soc-mop500";

		stericsson,cpu-dai = <&msp1 &msp3>;
		stericsson,audio-codec = <&codec>;
	};
```

```dts
	msp1: msp@80124000 {
		compatible = "stericsson,ux500-msp-i2s";
		reg = <0x80124000 0x1000>;
		interrupts = <0 62 0x4>;
		v-ape-supply = <&db8500_vape_reg>;
	};
```

```dts
	msp3: msp@80125000 {
		compatible = "stericsson,ux500-msp-i2s";
		reg = <0x80125000 0x1000>;
		interrupts = <0 62 0x4>;
		v-ape-supply = <&db8500_vape_reg>;
	};
```

```dts
	codec: ab8500-codec {
		compatible = "stericsson,ab8500-codec";
		stericsson,earpeice-cmv = <950>; /* Units in mV. */
	};
```

---

# ux500 MSP (CPU-side Digital Audio Interface)

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for ux500 MSP (CPU-side Digital Audio Interface).

## Required properties:

- compatible       :"stericsson,ux500-msp-i2s"
- reg              : Physical base address and length of the device's registers.

## Optional properties:

- interrupts       : The interrupt output from the device.
- &lt;name&gt;-supply    : Phandle to the regulator &lt;name&gt; supply

## Example:

```dts
	sound {
		compatible = "stericsson,snd-soc-mop500";

		stericsson,platform-pcm-dma = <&pcm>;
		stericsson,cpu-dai = <&msp1 &msp3>;
		stericsson,audio-codec = <&codec>;
	};
```

```dts
	pcm: ux500-pcm {
		compatible = "stericsson,ux500-pcm";
	};
```

```dts
	msp1: msp@80124000 {
		compatible = "stericsson,ux500-msp-i2s";
		reg = <0x80124000 0x1000>;
		interrupts = <0 62 0x4>;
		v-ape-supply = <&db8500_vape_reg>;
	};
```

```dts
	msp3: msp@80125000 {
		compatible = "stericsson,ux500-msp-i2s";
		reg = <0x80125000 0x1000>;
		interrupts = <0 62 0x4>;
		v-ape-supply = <&db8500_vape_reg>;
	};
```

```dts
	codec: ab8500-codec {
		compatible = "stericsson,ab8500-codec";
		stericsson,earpeice-cmv = <950>; /* Units in mV. */
	};
```

---

# Widgets:

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for Widgets:.

This mainly specifies audio off-codec DAPM widgets.

## Each entry is a pair of strings in DT:

```text
	"template-wname", "user-supplied-wname"
```

The "template-wname" being the template widget name and currently includes:
"Microphone", "Line", "Headphone" and "Speaker".

The "user-supplied-wname" being the user specified widget name.

## For instance:

```dts
	simple-audio-widgets =
		"Microphone", "Microphone Jack",
		"Line", "Line In Jack",
		"Line", "Line Out Jack",
		"Headphone", "Headphone Jack",
		"Speaker", "Speaker External";
```

---

# WM8741 audio CODEC

_Peios Kernel / Hardware and drivers / Device tree / bindings/sound_

> Device-tree binding reference for WM8741 audio CODEC.

This device supports both I2C and SPI (configured with pin strapping
on the board).

## Required properties:

- compatible : "wlf,wm8741"

- reg : the I2C address of the device for I2C, the chip select
  number for SPI.

## Optional properties:

```text
  - diff-mode: Differential output mode configuration. Default value for field
    DIFF in register R8 (MODE_CONTROL_2). If absent, the default is 0, shall be:
    0 = stereo
    1 = mono left
    2 = stereo reversed
    3 = mono right
```

## Example:

```dts
wm8741: codec@1a {
	compatible = "wlf,wm8741";
	reg = <0x1a>;

	diff-mode = <3>;
};
```

---

# ICP DAS LP-8841 SPI Controller for RTC

_Peios Kernel / Hardware and drivers / Device tree / bindings/spi_

> Device-tree binding reference for ICP DAS LP-8841 SPI Controller for RTC.

ICP DAS LP-8841 contains a DS-1302 RTC. RTC is connected to an IO
memory register, which acts as an SPI master device.

The device uses the standard MicroWire half-duplex transfer timing.
Master output is set on low clock and sensed by the RTC on the rising
edge. Master input is set by the RTC on the trailing edge and is sensed
by the master on low clock.

## Required properties:

- #address-cells: should be 1

- #size-cells: should be 0

- compatible: should be "icpdas,lp8841-spi-rtc"

- reg: should provide IO memory address

## Requirements to SPI slave nodes:

- There can be only one slave device.

- The spi slave node should claim the following flags which are
  required by the spi controller.

- spi-3wire: The master itself has only 3 wire. It cannor work in
  full duplex mode.

- spi-cs-high: DS-1302 has active high chip select line. The master
  doesn't support active low.

- spi-lsb-first: DS-1302 requires least significant bit first
  transfers. The master only support this type of bit ordering.

## Example:

```dts
spi@901c {
	#address-cells = <1>;
	#size-cells = <0>;
	compatible = "icpdas,lp8841-spi-rtc";
	reg = <0x901c 0x1>;

	rtc@0 {
		compatible = "maxim,ds1302";
		reg = <0>;
		spi-max-frequency = <500000>;
		spi-3wire;
		spi-lsb-first;
		spi-cs-high;
	};
};
```

---

# J-Core SPI master

_Peios Kernel / Hardware and drivers / Device tree / bindings/spi_

> Device-tree binding reference for J-Core SPI master.

## Required properties:

- compatible: Must be "jcore,spi2".

- reg: Memory region for registers.

- #address-cells: Must be 1.

- #size-cells: Must be 0.

## Optional properties:

- clocks: If a phandle named "ref\_clk" is present, SPI clock speed
  programming is relative to the frequency of the indicated clock.
  Necessary only if the input clock rate is something other than a
  fixed 50 MHz.

- clock-names: Clock names, one for each phandle in clocks.

See [spi-bus.txt](</kernel/hardware/devicetree/bindings-spi/spi-bus.md>) for additional properties not specific to this device.

## Example:

```dts
spi@40 {
	compatible = "jcore,spi2";
	#address-cells = <1>;
	#size-cells = <0>;
	reg = <0x40 0x8>;
	spi-max-frequency = <25000000>;
	clocks = <&bus_clk>;
	clock-names = "ref_clk";
}
```

---

# Microchip PIC32 SPI Master controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/spi_

> Device-tree binding reference for Microchip PIC32 SPI Master controller.

## Required properties:

- compatible: Should be "microchip,pic32mzda-spi".
- reg: Address and length of register space for the device.
- interrupts: Should contain all three spi interrupts in sequence
  of &lt;fault-irq&gt;, &lt;receive-irq&gt;, &lt;transmit-irq&gt;.
- interrupt-names: Should be "fault", "rx", "tx" in order.
- clocks: Phandle of the clock generating SPI clock on the bus.
- clock-names: Should be "mck0".
- cs-gpios: Specifies the gpio pins to be used for chipselects.
  See: [Documentation/devicetree/bindings/spi/spi-bus.txt](</kernel/hardware/devicetree/bindings-spi/spi-bus.md>)

## Optional properties:

- dmas: Two or more DMA channel specifiers following the convention outlined
  in [Documentation/devicetree/bindings/dma/dma.txt](</kernel/hardware/devicetree/bindings-dma/dma.md>)
- dma-names: Names for the dma channels. There must be at least one channel
  named "spi-tx" for transmit and named "spi-rx" for receive.

## Example:

```dts
spi1: spi@1f821000 {
        compatible = "microchip,pic32mzda-spi";
        reg = <0x1f821000 0x200>;
        interrupts = <109 IRQ_TYPE_LEVEL_HIGH>,
                     <110 IRQ_TYPE_LEVEL_HIGH>,
                     <111 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "fault", "rx", "tx";
        clocks = <&PBCLK2>;
        clock-names = "mck0";
        cs-gpios = <&gpio3 4 GPIO_ACTIVE_LOW>;
        dmas = <&dma 134>, <&dma 135>;
        dma-names = "spi-rx", "spi-tx";
};
```

---

# Nuvoton FLASH Interface Unit (FIU) SPI Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/spi_

> Device-tree binding reference for Nuvoton FLASH Interface Unit (FIU) SPI Controller.

NPCM FIU supports single, dual and quad communication interface.

The NPCM7XX supports three FIU modules,
FIU0 and FIUx supports two chip selects,
FIU3 support four chip select.

The NPCM8XX supports four FIU modules,
FIU0 and FIUx supports two chip selects,
FIU1 and FIU3 supports four chip selects.

## Required properties:

- compatible : "nuvoton,npcm750-fiu" for Poleg NPCM7XX BMC
  "nuvoton,npcm845-fiu" for Arbel NPCM8XX BMC
- #address-cells : should be 1.
- #size-cells : should be 0.
- reg : the first contains the register location and length,
  the second contains the memory mapping address and length
- reg-names: Should contain the reg names "control" and "memory"
- clocks : phandle of FIU reference clock.

## Required properties in case the pins can be muxed:

- pinctrl-names : a pinctrl state named "default" must be defined.
- pinctrl-0 : phandle referencing pin configuration of the device.

## Optional property:

- nuvoton,spix-mode: enable spix-mode for an expansion bus to an ASIC or CPLD.

## Aliases:

- All the FIU controller nodes should be represented in the aliases node using
  the following format 'fiu{n}' where n is a unique number for the alias.
  In the NPCM7XX BMC:
  fiu0 represent fiu 0 controller
  fiu1 represent fiu 3 controller
  fiu2 represent fiu x controller

## In the NPCM8XX BMC:

```text
  		fiu0 represent fiu 0 controller
  		fiu1 represent fiu 1 controller
  		fiu2 represent fiu 3 controller
  		fiu3 represent fiu x controller
```

## Example:

```dts
fiu3: spi@c00000000 {
	compatible = "nuvoton,npcm750-fiu";
	#address-cells = <1>;
	#size-cells = <0>;
	reg = <0xfb000000 0x1000>, <0x80000000 0x10000000>;
	reg-names = "control", "memory";
	clocks = <&clk NPCM7XX_CLK_AHB>;
	pinctrl-names = "default";
	pinctrl-0 = <&spi3_pins>;
	flash@0 {
			...
	};
};
```

---

# Binding for Qualcomm Atheros AR7xxx/AR9xxx SPI controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/spi_

> Device-tree binding reference for Binding for Qualcomm Atheros AR7xxx/AR9xxx SPI controller.

## Required properties:

- compatible: has to be "qca,&lt;soc-type&gt;-spi", "qca,ar7100-spi" as fallback.
- reg: Base address and size of the controllers memory area
- clocks: phandle of the AHB clock.
- clock-names: has to be "ahb".
- #address-cells: &lt;1&gt;, as required by generic SPI binding.
- #size-cells: &lt;0&gt;, also as required by generic SPI binding.

Child nodes as per the generic SPI binding.

## Example:

```dts
	spi@1f000000 {
		compatible = "qca,ar9132-spi", "qca,ar7100-spi";
		reg = <0x1f000000 0x10>;

		clocks = <&pll 2>;
		clock-names = "ahb";

		#address-cells = <1>;
		#size-cells = <0>;
	};
```

---

# Spi bus bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/spi_

> Device-tree binding reference for Spi bus bindings.

This file has moved to [spi-controller.yaml](</kernel/hardware/devicetree-bindings/dt-spi/spi-controller.md>).

---

# Serial Peripheral Interface on Cirrus Logic CL-PS71xx, EP72xx, EP73xx

_Peios Kernel / Hardware and drivers / Device tree / bindings/spi_

> Device-tree binding reference for Serial Peripheral Interface on Cirrus Logic CL-PS71xx, EP72xx, EP73xx.

Required properties

- #address-cells: must be &lt;1&gt;
- #size-cells: must be &lt;0&gt;
- compatible: should include "cirrus,ep7209-spi"
- reg: Address and length of one register range
- interrupts: one interrupt line
- clocks: One entry, refers to the SPI bus clock
- cs-gpios: Specifies the gpio pins to be used for chipselects.
  See: [Documentation/devicetree/bindings/spi/spi-bus.txt](</kernel/hardware/devicetree/bindings-spi/spi-bus.md>)

An additional register is present in the system controller,
which is assumed to be in the same device tree, with and marked
as compatible with "cirrus,ep7209-syscon3".

## Example:

```dts
spi@80000500 {
	#address-cells = <1>;
	#size-cells = <0>;
	compatible = "cirrus,ep7209-spi";
	reg = <0x80000500 0x4>;
	interrupts = <15>;
	clocks = <&clks CLPS711X_CLK_SPI>;
};
```

```dts
syscon3: syscon@80002200 {
	compatible = "cirrus,ep7209-syscon3", "syscon";
	reg = <0x80002200 0x40>;
};
```

---

# Davinci SPI controller device bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/spi_

> Device-tree binding reference for Davinci SPI controller device bindings.

## Links on DM:

Keystone 2 - https://www.ti.com/lit/ug/sprugp2a/sprugp2a.pdf
dm644x - https://www.ti.com/lit/ug/sprue32a/sprue32a.pdf
OMAP-L138/da830 - http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf

## Required properties:

```text
- #address-cells: number of cells required to define a chip select
	address on the SPI bus. Should be set to 1.
- #size-cells: should be zero.
- compatible:
	- "ti,dm6441-spi" for SPI used similar to that on DM644x SoC family
	- "ti,da830-spi" for SPI used similar to that on DA8xx SoC family
	- "ti,keystone-spi" for SPI used similar to that on Keystone2 SoC
		family
- reg: Offset and length of SPI controller register space
- num-cs: Number of chip selects. This includes internal as well as
	GPIO chip selects.
- ti,davinci-spi-intr-line: interrupt line used to connect the SPI
	IP to the interrupt controller within the SoC. Possible values
	are 0 and 1. Manual says one of the two possible interrupt
	lines can be tied to the interrupt controller. Set this
	based on a specific SoC configuration.
- interrupts: interrupt number mapped to CPU.
- clocks: spi clk phandle
          For 66AK2G this property should be set per binding,
          Documentation/devicetree/bindings/clock/ti,sci-clk.yaml
```

## SoC-specific Required Properties:

The following are mandatory properties for Keystone 2 66AK2G SoCs only:

- power-domains:	Should contain a phandle to a PM domain provider node
  and an args specifier containing the SPI device id
  value. This property is as per the binding,

## Optional:

```text
- cs-gpios: gpio chip selects
	For example to have 3 internal CS and 2 GPIO CS, user could define
	cs-gpios = <0>, <0>, <0>, <&gpio1 30 0>, <&gpio1 31 0>;
	where first three are internal CS and last two are GPIO CS.
```

## Optional properties for slave devices:

SPI slave nodes can contain the following properties.
Not all SPI Peripherals from Texas Instruments support this.
Please check SPI peripheral documentation for a device before using these.

- ti,spi-wdelay : delay between transmission of words
  (SPIFMTn.WDELAY, SPIDAT1.WDEL) must be specified in number of SPI module
  clock periods.

```dts
	delay = WDELAY * SPI_module_clock_period + 2 * SPI_module_clock_period
```

Below is timing diagram which shows functional meaning of
"ti,spi-wdelay" parameter.

```text
             +-+ +-+ +-+ +-+ +-+                           +-+ +-+ +-+
```

```text
SPI_CLK      | | | | | | | | | |                           | | | | | |
  +----------+ +-+ +-+ +-+ +-+ +---------------------------+ +-+ +-+ +-
```

```text
SPI_SOMI/SIMO+-----------------+                           +-----------
  +----------+ word1           +---------------------------+word2
```

```text
             +-----------------+                           +-----------
                                          WDELAY
                                <-------------------------->
```

Example of a NOR flash slave device (n25q032) connected to DaVinci
SPI controller device over the SPI bus.

```dts
spi0:spi@20bf0000 {
	#address-cells			= <1>;
	#size-cells			= <0>;
	compatible			= "ti,dm6446-spi";
	reg				= <0x20BF0000 0x1000>;
	num-cs				= <4>;
	ti,davinci-spi-intr-line	= <0>;
	interrupts			= <338>;
	clocks				= <&clkspi>;

	flash: flash@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "st,m25p32";
		spi-max-frequency = <25000000>;
		reg = <0>;
		ti,spi-wdelay = <8>;

		partition@0 {
			label = "u-boot-spl";
			reg = <0x0 0x80000>;
			read-only;
		};

		partition@1 {
			label = "test";
			reg = <0x80000 0x380000>;
		};
	};
};
```

---

# IMG Synchronous Peripheral Flash Interface (SPFI) controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/spi_

> Device-tree binding reference for IMG Synchronous Peripheral Flash Interface (SPFI) controller.

## Required properties:

```text
- compatible: Must be "img,spfi".
- reg: Must contain the base address and length of the SPFI registers.
- interrupts: Must contain the SPFI interrupt.
- clocks: Must contain an entry for each entry in clock-names.
  See ../clock/clock-bindings.txt for details.
- clock-names: Must include the following entries:
  - spfi: SPI operating clock
  - sys: SPI system interface clock
- dmas: Must contain an entry for each entry in dma-names.
  See ../dma/dma.txt for details.
- dma-names: Must include the following entries:
  - rx
  - tx
- cs-gpios: Must specify the GPIOs used for chipselect lines.
- #address-cells: Must be 1.
- #size-cells: Must be 0.
```

## Optional properties:

- img,supports-quad-mode: Should be set if the interface supports quad mode
  SPI transfers.
- spfi-max-frequency: Maximum speed supported by the spfi block.

## Example:

```dts
spi@18100f00 {
	compatible = "img,spfi";
	reg = <0x18100f00 0x100>;
	interrupts = <GIC_SHARED 22 IRQ_TYPE_LEVEL_HIGH>;
	clocks = <&spi_clk>, <&system_clk>;
	clock-names = "spfi", "sys";
	dmas = <&mdc 9 0xffffffff 0>, <&mdc 10 0xffffffff 0>;
	dma-names = "rx", "tx";

	#address-cells = <1>;
	#size-cells = <0>;
};
```

---

# Lantiq Synchronous Serial Controller (SSC) SPI master driver

_Peios Kernel / Hardware and drivers / Device tree / bindings/spi_

> Device-tree binding reference for Lantiq Synchronous Serial Controller (SSC) SPI master driver.

## Required properties:

- compatible: "lantiq,ase-spi", "lantiq,falcon-spi", "lantiq,xrx100-spi",
  "intel,lgm-spi"
- #address-cells: see [spi-bus.txt](</kernel/hardware/devicetree/bindings-spi/spi-bus.md>)
- #size-cells: see [spi-bus.txt](</kernel/hardware/devicetree/bindings-spi/spi-bus.md>)
- reg: address and length of the spi master registers
- interrupts:
  For compatible "intel,lgm-ssc" - the common interrupt number for
  all of tx rx &amp; err interrupts.
  or
  For rest of the compatibles, should contain the "spi\_rx", "spi\_tx" and
  "spi\_err" interrupt.

## Optional properties:

- clocks: spi clock phandle
- num-cs: see [spi-bus.txt](</kernel/hardware/devicetree/bindings-spi/spi-bus.md>), set to 8 if unset
- base-cs: the number of the first chip select, set to 1 if unset.

## Example:

```dts
spi: spi@e100800 {
	compatible = "lantiq,xrx200-spi", "lantiq,xrx100-spi";
	reg = <0xE100800 0x100>;
	interrupt-parent = <&icu0>;
	interrupts = <22 23 24>;
	interrupt-names = "spi_rx", "spi_tx", "spi_err";
	#address-cells = <1>;
	#size-cells = <1>;
	num-cs = <6>;
	base-cs = <1>;
};
```

```dts
ssc0: spi@e0800000 {
	compatible = "intel,lgm-spi";
	reg = <0xe0800000 0x400>;
	interrupt-parent = <&ioapic1>;
	interrupts = <35 1>;
	#address-cells = <1>;
	#size-cells = <0>;
	clocks = <&cgu0 LGM_CLK_NGI>, <&cgu0 LGM_GCLK_SSC0>;
	clock-names = "freq", "gate";
};
```

---

# Cavium, Inc. OCTEON SOC SPI master controller.

_Peios Kernel / Hardware and drivers / Device tree / bindings/spi_

> Device-tree binding reference for Cavium, Inc. OCTEON SOC SPI master controller..

## Required properties:

- compatible : "cavium,octeon-3010-spi"
- reg : The register base for the controller.
- interrupts : One interrupt, used by the controller.
- #address-cells : &lt;1&gt;, as required by generic SPI binding.
- #size-cells : &lt;0&gt;, also as required by generic SPI binding.

Child nodes as per the generic SPI binding.

## Example:

```dts
	spi@1070000001000 {
		compatible = "cavium,octeon-3010-spi";
		reg = <0x10700 0x00001000 0x0 0x100>;
		interrupts = <0 58>;
		#address-cells = <1>;
		#size-cells = <0>;

		eeprom@0 {
			compatible = "st,m95256", "atmel,at25";
			reg = <0>;
			spi-max-frequency = <5000000>;
			spi-cpha;
			spi-cpol;

			pagesize = <64>;
			size = <32768>;
			address-width = <16>;
		};
	};
```

---

# Cadence Xtensa XTFPGA platform SPI controller.

_Peios Kernel / Hardware and drivers / Device tree / bindings/spi_

> Device-tree binding reference for Cadence Xtensa XTFPGA platform SPI controller..

This simple SPI master controller is built into xtfpga bitstreams and is used
to control daughterboard audio codec.

## Required properties:

- compatible: should be "cdns,xtfpga-spi".
- reg: physical base address of the controller and length of memory mapped
  region.

---

# Altera SPI

_Peios Kernel / Hardware and drivers / Device tree / bindings/spi_

> Device-tree binding reference for Altera SPI.

## Required properties:

- compatible : should be "ALTR,spi-1.0". &lt;DEPRECATED&gt;
- compatible : should be "altr,spi-1.0".

---

# OpenCores tiny SPI

_Peios Kernel / Hardware and drivers / Device tree / bindings/spi_

> Device-tree binding reference for OpenCores tiny SPI.

## Required properties:

- compatible : should be "opencores,tiny-spi-rtlsvn2".
- gpios : should specify GPIOs used for chipselect.
  Optional properties:
- clock-frequency : input clock frequency to the core.
- baud-width: width, in bits, of the programmable divider used to scale
  the input clock to SCLK.

The clock-frequency and baud-width properties are needed only if the divider
is programmable. They are not needed if the divider is fixed.

---

# Microchip PIC32 Quad SPI controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/spi_

> Device-tree binding reference for Microchip PIC32 Quad SPI controller.

Required properties:

- compatible: Should be "microchip,pic32mzda-sqi".
- reg: Address and length of SQI controller register space.
- interrupts: Should contain SQI interrupt.
- clocks: Should contain phandle of two clocks in sequence, one that drives
  clock on SPI bus and other that drives SQI controller.
- clock-names: Should be "spi\_ck" and "reg\_ck" in order.

## Example:

```dts
	sqi1: spi@1f8e2000 {
		compatible = "microchip,pic32mzda-sqi";
		reg = <0x1f8e2000 0x200>;
		clocks = <&rootclk REF2CLK>, <&rootclk PB5CLK>;
		clock-names = "spi_ck", "reg_ck";
		interrupts = <169 IRQ_TYPE_LEVEL_HIGH>;
	};
```

---

# Dove Thermal

_Peios Kernel / Hardware and drivers / Device tree / bindings/thermal_

> Device-tree binding reference for Dove Thermal.

This driver is for Dove SoCs which contain a thermal sensor.

## Required properties:

- compatible : "marvell,dove-thermal"
- reg : Address range of the thermal registers

The reg properties should contain two ranges. The first is for the
three Thermal Manager registers, while the second range contains the
Thermal Diode Control Registers.

## Example:

```dts
	thermal@10078 {
		compatible = "marvell,dove-thermal";
		reg = <0xd001c 0x0c>, <0xd005c 0x08>;
	};
```

---

# Kirkwood Thermal

_Peios Kernel / Hardware and drivers / Device tree / bindings/thermal_

> Device-tree binding reference for Kirkwood Thermal.

This version is for Kirkwood 88F8262 &amp; 88F6283 SoCs. Other kirkwoods
don't contain a thermal sensor.

## Required properties:

- compatible : "marvell,kirkwood-thermal"
- reg : Address range of the thermal registers

## Example:

```dts
	thermal@10078 {
		compatible = "marvell,kirkwood-thermal";
		reg = <0x10078 0x4>;
	};
```

---

# Thermal driver for MAX77620 Power management IC from Maxim Semiconductor.

_Peios Kernel / Hardware and drivers / Device tree / bindings/thermal_

> Device-tree binding reference for Thermal driver for MAX77620 Power management IC from Maxim Semiconductor..

Maxim Semiconductor MAX77620 supports alarm interrupts when its
die temperature crosses 120C and 140C. These threshold temperatures
are not configurable. Device does not provide the real temperature
of die other than just indicating whether temperature is above or
below threshold level.

## Required properties:

#thermal-sensor-cells:	For more details, please refer to

```text
			<devicetree/bindings/thermal/thermal-sensor.yaml>
			The value must be 0.
```

For more details, please refer generic thermal DT binding document
&lt;devicetree/bindings/thermal/thermal\*.yaml&gt;.

Please refer &lt;[devicetree/bindings/mfd/max77620.txt](</kernel/hardware/devicetree/bindings-mfd/max77620.md>)&gt; for mfd DT binding
document for the MAX77620.

## Example:

```dts
#include <dt-bindings/mfd/max77620.h>
#include <dt-bindings/thermal/thermal.h>
```

...

```dts
i2c@7000d000 {
	spmic: max77620@3c {
		compatible = "maxim,max77620";
		:::::
		#thermal-sensor-cells = <0>;
		:::
	};
};
```

```dts
cool_dev: cool-dev {
	compatible = "cooling-dev";
	#cooling-cells = <2>;
};
```

```dts
thermal-zones {
	PMIC-Die {
		polling-delay = <0>;
		polling-delay-passive = <0>;
		thermal-sensors = <&spmic>;

		trips {
			pmic_die_warn_temp_thresh: hot-die {
				temperature = <120000>;
				type = "hot";
				hysteresis = <0>;
			};

			pmic_die_cirt_temp_thresh: cirtical-die {
				temperature = <140000>;
				type = "critical";
				hysteresis = <0>;
			};
		};

		cooling-maps {
			map0 {
				trip = <&pmic_die_warn_temp_thresh>;
				cooling-device = <&cool_dev THERMAL_NO_LIMIT
						  THERMAL_NO_LIMIT>;
				contribution = <100>;
			};
		};
	};
};
```

---

# SPEAr Thermal

_Peios Kernel / Hardware and drivers / Device tree / bindings/thermal_

> Device-tree binding reference for SPEAr Thermal.

## Required properties:

- compatible : "st,thermal-spear1340"
- reg : Address range of the thermal registers
- st,thermal-flags: flags used to enable thermal sensor

## Example:

```dts
	thermal@fc000000 {
		compatible = "st,thermal-spear1340";
		reg = <0xfc000000 0x1000>;
		st,thermal-flags = <0x7000>;
	};
```

---

# Texas Instrument OMAP SCM bandgap bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/thermal_

> Device-tree binding reference for Texas Instrument OMAP SCM bandgap bindings.

In the System Control Module, OMAP supplies a voltage reference
and a temperature sensor feature that are gathered in the band
gap voltage and temperature sensor (VBGAPTS) module. The band
gap provides current and voltage reference for its internal
circuits and other analog IP blocks. The analog-to-digital
converter (ADC) produces an output value that is proportional
to the silicon temperature.

## Required properties:

```text
- compatible : Should be:
  - "ti,omap34xx-bandgap" : for OMAP34xx bandgap
  - "ti,omap36xx-bandgap" : for OMAP36xx bandgap
  - "ti,omap4430-bandgap" : for OMAP4430 bandgap
  - "ti,omap4460-bandgap" : for OMAP4460 bandgap
  - "ti,omap4470-bandgap" : for OMAP4470 bandgap
  - "ti,omap5430-bandgap" : for OMAP5430 bandgap
- interrupts : this entry should indicate which interrupt line
the talert signal is routed to;
Specific:
- gpios : this entry should be used to inform which GPIO
line the tshut signal is routed to. The informed GPIO will
be treated as an IRQ;
- regs : this entry must also be specified and it is specific
to each bandgap version, because the mapping may change from
soc to soc, apart of depending on available features.
```

## Example:

OMAP34xx:

```dts
bandgap {
	reg = <0x48002524 0x4>;
	compatible = "ti,omap34xx-bandgap";
};
```

## OMAP36xx:

```dts
bandgap {
	reg = <0x48002524 0x4>;
	compatible = "ti,omap36xx-bandgap";
};
```

## OMAP4430:

```dts
bandgap {
	reg = <0x4a002260 0x4 0x4a00232C 0x4>;
	compatible = "ti,omap4430-bandgap";
};
```

## OMAP4460:

```dts
bandgap {
	reg = <0x4a002260 0x4
		0x4a00232C 0x4
		0x4a002378 0x18>;
	compatible = "ti,omap4460-bandgap";
	interrupts = <0 126 4>; /* talert */
	gpios = <&gpio3 22 0>; /* tshut */
};
```

## OMAP4470:

```dts
bandgap {
	reg = <0x4a002260 0x4
		0x4a00232C 0x4
		0x4a002378 0x18>;
	compatible = "ti,omap4470-bandgap";
	interrupts = <0 126 4>; /* talert */
	gpios = <&gpio3 22 0>; /* tshut */
};
```

## OMAP5430:

```dts
bandgap {
	reg = <0x4a0021e0 0xc
		0x4a00232c 0xc
		0x4a002380 0x2c
		0x4a0023C0 0x3c>;
	compatible = "ti,omap5430-bandgap";
	interrupts = <0 126 4>; /* talert */
};
```

## DRA752:

```dts
bandgap {
	reg = <0x4a0021e0 0xc
		0x4a00232c 0xc
		0x4a002380 0x2c
		0x4a0023C0 0x3c
		0x4a002564 0x8
		0x4a002574 0x50>;
	compatible = "ti,dra752-bandgap";
	interrupts = <0 126 4>; /* talert */
};
```

---

# AM33xx MUSB

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for AM33xx MUSB.

- compatible: ti,am33xx-usb
- reg: offset and length of the usbss register sets
- ti,hwmods : must be "usb\_otg\_hs"

The glue layer contains multiple child nodes. It is required to have
at least a control module node, USB node and a PHY node. The second USB
node and its PHY node are optional. The DMA node is also optional.

## Reset module

- compatible: ti,am335x-usb-ctrl-module
- reg: offset and length of the "USB control registers" in the "Control
  Module" block. A second offset and length for the USB wake up control
  in the same memory block.
- reg-names: "phy\_ctrl" for the "USB control registers" and "wakeup" for
  the USB wake up control register.

## USB PHY

compatible: ti,am335x-usb-phy
reg: offset and length of the "USB PHY" register space
ti,ctrl\_mod: reference to the "reset module" node
reg-names: phy
The PHY should have a "phy" alias numbered properly in the alias
node.

## USB

- compatible: ti,musb-am33xx
- reg: offset and length of "USB Controller Registers", and offset and
  length of "USB Core" register space.
- reg-names: control for the ""USB Controller Registers" and "mc" for
  "USB Core" register space
- interrupts: USB interrupt number
- interrupt-names: mc
- dr\_mode: Should be one of "host", "peripheral" or "otg".
- mentor,multipoint: Should be "1" indicating the musb controller supports
  multipoint. This is a MUSB configuration-specific setting.
- mentor,num-eps: Specifies the number of endpoints. This is also a
  MUSB configuration-specific setting. Should be set to "16"
- mentor,ram-bits: Specifies the ram address size. Should be set to "12"
- mentor,power: Should be "500". This signifies the controller can supply up to
  500mA when operating in host mode.
- phys: reference to the USB phy
- dmas: specifies the dma channels
- dma-names: specifies the names of the channels. Use "rxN" for receive
  and "txN" for transmit endpoints. N specifies the endpoint number.

The controller should have an "usb" alias numbered properly in the alias
node.

## DMA

- compatible: ti,am3359-cppi41
- reg: offset and length of the following register spaces: USBSS, USB
  CPPI DMA Controller, USB CPPI DMA Scheduler, USB Queue Manager
- reg-names: glue, controller, scheduler, queuemgr
- #dma-cells: should be set to 2. The first number represents the
  endpoint number (0 … 14 for endpoints 1 … 15 on instance 0 and 15 … 29
  for endpoints 1 … 15 on instance 1). The second number is 0 for RX and
  1 for TX transfers.
- dma-channels: should be set to 30 representing the 15 endpoints for
  each USB instance.
- #dma-channels: deprecated

## Example:

The following example contains all the nodes as used on am335x-evm:

```dts
aliases {
	usb0 = &usb0;
	usb1 = &usb1;
	phy0 = &usb0_phy;
	phy1 = &usb1_phy;
};
```

```dts
usb: usb@47400000 {
	compatible = "ti,am33xx-usb";
	reg = <0x47400000 0x1000>;
	ranges;
	#address-cells = <1>;
	#size-cells = <1>;
	ti,hwmods = "usb_otg_hs";

	ctrl_mod: control@44e10000 {
		compatible = "ti,am335x-usb-ctrl-module";
		reg = <0x44e10620 0x10
			0x44e10648 0x4>;
		reg-names = "phy_ctrl", "wakeup";
	};

	usb0_phy: usb-phy@47401300 {
		compatible = "ti,am335x-usb-phy";
		reg = <0x47401300 0x100>;
		reg-names = "phy";
		ti,ctrl_mod = <&ctrl_mod>;
		#phy-cells = <0>;
	};

	usb0: usb@47401000 {
		compatible = "ti,musb-am33xx";
		reg = <0x47401400 0x400
			0x47401000 0x200>;
		reg-names = "mc", "control";

		interrupts = <18>;
		interrupt-names = "mc";
		dr_mode = "otg"
		mentor,multipoint = <1>;
		mentor,num-eps = <16>;
		mentor,ram-bits = <12>;
		mentor,power = <500>;
		phys = <&usb0_phy>;

		dmas = <&cppi41dma  0 0 &cppi41dma  1 0
			&cppi41dma  2 0 &cppi41dma  3 0
			&cppi41dma  4 0 &cppi41dma  5 0
			&cppi41dma  6 0 &cppi41dma  7 0
			&cppi41dma  8 0 &cppi41dma  9 0
			&cppi41dma 10 0 &cppi41dma 11 0
			&cppi41dma 12 0 &cppi41dma 13 0
			&cppi41dma 14 0 &cppi41dma  0 1
			&cppi41dma  1 1 &cppi41dma  2 1
			&cppi41dma  3 1 &cppi41dma  4 1
			&cppi41dma  5 1 &cppi41dma  6 1
			&cppi41dma  7 1 &cppi41dma  8 1
			&cppi41dma  9 1 &cppi41dma 10 1
			&cppi41dma 11 1 &cppi41dma 12 1
			&cppi41dma 13 1 &cppi41dma 14 1>;
		dma-names =
			"rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
			"rx8", "rx9", "rx10", "rx11", "rx12", "rx13",
			"rx14", "rx15",
			"tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
			"tx8", "tx9", "tx10", "tx11", "tx12", "tx13",
			"tx14", "tx15";
	};

	usb1_phy: usb-phy@47401b00 {
		compatible = "ti,am335x-usb-phy";
		reg = <0x47401b00 0x100>;
		reg-names = "phy";
		ti,ctrl_mod = <&ctrl_mod>;
		#phy-cells = <0>;
	};

	usb1: usb@47401800 {
		compatible = "ti,musb-am33xx";
		reg = <0x47401c00 0x400
			0x47401800 0x200>;
		reg-names = "mc", "control";
		interrupts = <19>;
		interrupt-names = "mc";
		dr_mode = "host"
		mentor,multipoint = <1>;
		mentor,num-eps = <16>;
		mentor,ram-bits = <12>;
		mentor,power = <500>;
		phys = <&usb1_phy>;

		dmas = <&cppi41dma 15 0 &cppi41dma 16 0
			&cppi41dma 17 0 &cppi41dma 18 0
			&cppi41dma 19 0 &cppi41dma 20 0
			&cppi41dma 21 0 &cppi41dma 22 0
			&cppi41dma 23 0 &cppi41dma 24 0
			&cppi41dma 25 0 &cppi41dma 26 0
			&cppi41dma 27 0 &cppi41dma 28 0
			&cppi41dma 29 0 &cppi41dma 15 1
			&cppi41dma 16 1 &cppi41dma 17 1
			&cppi41dma 18 1 &cppi41dma 19 1
			&cppi41dma 20 1 &cppi41dma 21 1
			&cppi41dma 22 1 &cppi41dma 23 1
			&cppi41dma 24 1 &cppi41dma 25 1
			&cppi41dma 26 1 &cppi41dma 27 1
			&cppi41dma 28 1 &cppi41dma 29 1>;
		dma-names =
			"rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
			"rx8", "rx9", "rx10", "rx11", "rx12", "rx13",
			"rx14", "rx15",
			"tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
			"tx8", "tx9", "tx10", "tx11", "tx12", "tx13",
			"tx14", "tx15";
	};

	cppi41dma: dma-controller@7402000 {
		compatible = "ti,am3359-cppi41";
		reg =  <0x47400000 0x1000
			0x47402000 0x1000
			0x47403000 0x1000
			0x47404000 0x4000>;
		reg-names = "glue", "controller", "scheduler", "queuemgr";
		interrupts = <17>;
		interrupt-names = "glue";
		#dma-cells = <2>;
		dma-channels = <30>;
		dma-requests = <256>;
	};
};
```

---

# Atmel SOC USB controllers

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for Atmel SOC USB controllers.

OHCI

## Required properties:

- compatible: Should be "atmel,at91rm9200-ohci" for USB controllers
  used in host mode.
- reg: Address and length of the register set for the device
- interrupts: Should contain ohci interrupt
- clocks: Should reference the peripheral, host and system clocks
- clock-names: Should contain three strings
  "ohci\_clk" for the peripheral clock
  "hclk" for the host clock
  "uhpck" for the system clock
- num-ports: Number of ports.
- atmel,vbus-gpio: If present, specifies a gpio that needs to be
  activated for the bus to be powered.
- atmel,oc-gpio: If present, specifies a gpio that needs to be
  activated for the overcurrent detection.

```dts
usb0: ohci@500000 {
	compatible = "atmel,at91rm9200-ohci", "usb-ohci";
	reg = <0x00500000 0x100000>;
	clocks = <&uhphs_clk>, <&uhphs_clk>, <&uhpck>;
	clock-names = "ohci_clk", "hclk", "uhpck";
	interrupts = <20 4>;
	num-ports = <2>;
};
```

EHCI

## Required properties:

- compatible: Should be "atmel,at91sam9g45-ehci" for USB controllers
  used in host mode.
- reg: Address and length of the register set for the device
- interrupts: Should contain ehci interrupt
- clocks: Should reference the peripheral and the UTMI clocks
- clock-names: Should contain two strings
  "ehci\_clk" for the peripheral clock
  "usb\_clk" for the UTMI clock

## Optional properties:

- phy\_type : For multi port host USB controllers, should be one of
  "utmi", or "hsic".

```dts
usb1: ehci@800000 {
	compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
	reg = <0x00800000 0x100000>;
	interrupts = <22 4>;
	clocks = <&utmi>, <&uhphs_clk>;
	clock-names = "usb_clk", "ehci_clk";
};
```

AT91 USB device controller

## Required properties:

- compatible: Should be one of the following
  "atmel,at91rm9200-udc"
  "atmel,at91sam9260-udc"
  "atmel,at91sam9261-udc"
  "atmel,at91sam9263-udc"
- reg: Address and length of the register set for the device
- interrupts: Should contain macb interrupt
- clocks: Should reference the peripheral and the AHB clocks
- clock-names: Should contain two strings
  "pclk" for the peripheral clock
  "hclk" for the AHB clock

## Optional properties:

- atmel,vbus-gpio: If present, specifies a gpio that needs to be
  activated for the bus to be powered.

```dts
usb1: gadget@fffa4000 {
	compatible = "atmel,at91rm9200-udc";
	reg = <0xfffa4000 0x4000>;
	interrupts = <10 4>;
	clocks = <&udc_clk>, <&udpck>;
	clock-names = "pclk", "hclk";
	atmel,vbus-gpio = <&pioC 5 0>;
};
```

Atmel High-Speed USB device controller

## Required properties:

- compatible: Should be one of the following
  "atmel,at91sam9rl-udc"
  "atmel,at91sam9g45-udc"
  "atmel,sama5d3-udc"
  "microchip,sam9x60-udc"
  "microchip,lan9662-udc"
  For "microchip,lan9662-udc" the fallback "atmel,sama5d3-udc"
  is required.
- reg: Address and length of the register set for the device
- interrupts: Should contain usba interrupt
- clocks: Should reference the peripheral and host clocks
- clock-names: Should contain two strings
  "pclk" for the peripheral clock
  "hclk" for the host clock

## Deprecated property:

- ep childnode: To specify the number of endpoints and their properties.

## Optional properties:

- atmel,vbus-gpio: If present, specifies a gpio that allows to detect whether
  vbus is present (USB is connected).

## Deprecated child node properties:

- name: Name of the endpoint.
- reg: Num of the endpoint.
- atmel,fifo-size: Size of the fifo.
- atmel,nb-banks: Number of banks.
- atmel,can-dma: Boolean to specify if the endpoint support DMA.
- atmel,can-isoc: Boolean to specify if the endpoint support ISOC.

```dts
usb2: gadget@fff78000 {
	#address-cells = <1>;
	#size-cells = <0>;
	compatible = "atmel,at91sam9rl-udc";
	reg = <0x00600000 0x80000
	       0xfff78000 0x400>;
	interrupts = <27 4 0>;
	clocks = <&utmi>, <&udphs_clk>;
	clock-names = "hclk", "pclk";
	atmel,vbus-gpio = <&pioB 19 0>;
};
```

---

# TI DA8xx MUSB

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for TI DA8xx MUSB.

For DA8xx/OMAP-L1x/AM17xx/AM18xx platforms.

## Required properties:

- compatible : Should be set to "ti,da830-musb".

- reg: Offset and length of the USB controller register set.

- interrupts: The USB interrupt number.

- interrupt-names: Should be set to "mc".

- dr\_mode: The USB operation mode. Should be one of "host", "peripheral" or "otg".

- phys: Phandle for the PHY device

- phy-names: Should be "usb-phy"

- dmas: specifies the dma channels

- dma-names: specifies the names of the channels. Use "rxN" for receive
  and "txN" for transmit endpoints. N specifies the endpoint number.

## Optional properties:

- vbus-supply: Phandle to a regulator providing the USB bus power.

## DMA

- compatible: ti,da830-cppi41
- reg: offset and length of the following register spaces: CPPI DMA Controller,
  CPPI DMA Scheduler, Queue Manager
- reg-names: "controller", "scheduler", "queuemgr"
- #dma-cells: should be set to 2. The first number represents the
  channel number (0 … 3 for endpoints 1 … 4).
  The second number is 0 for RX and 1 for TX transfers.
- dma-channels: should be set to 4 representing the 4 endpoints.
- #dma-channels: deprecated

## Example:

```dts
	usb_phy: usb-phy {
		compatible = "ti,da830-usb-phy";
		#phy-cells = <0>;
	};
	usb0: usb@200000 {
		compatible = "ti,da830-musb";
		reg = <0x00200000 0x1000>;
		ranges;
		#address-cells = <1>;
		#size-cells = <1>;
		interrupts = <58>;
		interrupt-names = "mc";

		dr_mode = "host";
		vbus-supply = <&usb_vbus>;
		phys = <&usb_phy 0>;
		phy-names = "usb-phy";

		dmas = <&cppi41dma 0 0 &cppi41dma 1 0
			&cppi41dma 2 0 &cppi41dma 3 0
			&cppi41dma 0 1 &cppi41dma 1 1
			&cppi41dma 2 1 &cppi41dma 3 1>;
		dma-names =
			"rx1", "rx2", "rx3", "rx4",
			"tx1", "tx2", "tx3", "tx4";


		cppi41dma: dma-controller@201000 {
			compatible = "ti,da830-cppi41";
			reg =  <0x201000 0x1000
				0x202000 0x1000
				0x204000 0x4000>;
			reg-names = "controller", "scheduler", "queuemgr";
			interrupts = <58>;
			#dma-cells = <2>;
			dma-channels = <4>;
		};

	};
```

---

# Cavium SuperSpeed DWC3 USB SoC controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for Cavium SuperSpeed DWC3 USB SoC controller.

## Required properties:

- compatible:	Should contain "cavium,octeon-7130-usb-uctl"

## Required child node:

A child node must exist to represent the core DWC3 IP block. The name of
the node is not important. The content of the node is defined in dwc3.txt.

## Example device node:

```dts
		    uctl@1180069000000 {
			    compatible = "cavium,octeon-7130-usb-uctl";
			    reg = <0x00011800 0x69000000 0x00000000 0x00000100>;
			    ranges;
			    #address-cells = <0x00000002>;
			    #size-cells = <0x00000002>;
			    refclk-frequency = <0x05f5e100>;
			    refclk-type-ss = "dlmc_ref_clk0";
			    refclk-type-hs = "dlmc_ref_clk0";
			    power = <0x00000002 0x00000002 0x00000001>;
			    xhci@1690000000000 {
				    compatible = "cavium,octeon-7130-xhci", "snps,dwc3";
				    reg = <0x00016900 0x00000000 0x00000010 0x00000000>;
				    interrupt-parent = <0x00000010>;
				    interrupts = <0x00000009 0x00000004>;
			    };
		    };
```

---

# ST DWC3 glue logic

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for ST DWC3 glue logic.

This file documents the parameters for the dwc3-st driver.
This driver controls the glue logic used to configure the dwc3 core on
STiH407 based platforms.

## Required properties:

- compatible	: must be "st,stih407-dwc3"
- reg		: glue logic base address and USB syscfg ctrl register offset
- reg-names	: should be "reg-glue" and "syscfg-reg"
- st,syscon	: should be phandle to system configuration node which
  encompasses the glue registers
- resets	: list of phandle and reset specifier pairs. There should be two entries, one
  for the powerdown and softreset lines of the usb3 IP
- reset-names	: list of reset signal names. Names should be "powerdown" and "softreset"
  See: [Documentation/devicetree/bindings/reset/st,stih407-powerdown.yaml](</kernel/hardware/devicetree-bindings/dt-reset/st-stih407-powerdown.md>)
  See: [Documentation/devicetree/bindings/reset/reset.txt](</kernel/hardware/devicetree/bindings-reset/reset.md>)

- #address-cells, #size-cells : should be '1' if the device has sub-nodes
  with 'reg' property

- pinctl-names	: A pinctrl state named "default" must be defined
  See: [Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)

- pinctrl-0	: Pin control group
  See: [Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)

- ranges	: allows valid 1:1 translation between child's address space and
  parent's address space

## Sub-nodes:

The dwc3 core should be added as subnode to ST DWC3 glue as shown in the
example below. The DT binding details of dwc3 can be found in:
[Documentation/devicetree/bindings/usb/snps,dwc3.yaml](</kernel/hardware/devicetree-bindings/dt-usb/snps-dwc3.md>)

NB: The dr\_mode property described in \[1\] is NOT optional for this driver, as the default value
is "otg", which isn't supported by this SoC. Valid dr\_mode values for dwc3-st are either "host"
or "device".

\[1\] [Documentation/devicetree/bindings/usb/usb-drd.yaml](</kernel/hardware/devicetree-bindings/dt-usb/usb-drd.md>)

## Example:

```dts
st_dwc3: dwc3@8f94000 {
	compatible	= "st,stih407-dwc3";
	reg		= <0x08f94000 0x1000>, <0x110 0x4>;
	reg-names	= "reg-glue", "syscfg-reg";
	st,syscfg	= <&syscfg_core>;
	resets		= <&powerdown STIH407_USB3_POWERDOWN>,
			  <&softreset STIH407_MIPHY2_SOFTRESET>;
	reset-names	= "powerdown", "softreset";
	#address-cells	= <1>;
	#size-cells	= <1>;
	pinctrl-names	= "default";
	pinctrl-0	= <&pinctrl_usb3>;
	ranges;

	dwc3: dwc3@9900000 {
		compatible	= "snps,dwc3";
		reg		= <0x09900000 0x100000>;
		interrupts	= <GIC_SPI 155 IRQ_TYPE_NONE>;
		dr_mode		= "host";
		phy-names	= "usb2-phy", "usb3-phy";
		phys		= <&usb2_picophy2>, <&phy_port2 PHY_TYPE_USB3>;
	};
};
```

---

# ST USB EHCI controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for ST USB EHCI controller.

## Required properties:

- compatible		: must be "st,st-ehci-300x"
- reg			: physical base addresses of the controller and length of memory mapped
  region
- interrupts		: one EHCI interrupt should be described here
- pinctrl-names	: a pinctrl state named "default" must be defined
- pinctrl-0		: phandle referencing pin configuration of the USB controller
  See: [Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt](</kernel/hardware/devicetree/bindings-pinctrl/pinctrl-bindings.md>)
- clocks		: phandle list of usb clocks
- clock-names		: should be "ic" for interconnect clock and "clk48"
  See: [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

- phys			: phandle for the PHY device
- phy-names		: should be "usb"
- resets		: phandle + reset specifier pairs to the powerdown and softreset lines
  of the USB IP
- reset-names		: should be "power" and "softreset"
  See: [Documentation/devicetree/bindings/reset/st,stih407-powerdown.yaml](</kernel/hardware/devicetree-bindings/dt-reset/st-stih407-powerdown.md>)
  See: [Documentation/devicetree/bindings/reset/reset.txt](</kernel/hardware/devicetree/bindings-reset/reset.md>)

## Example:

```dts
	ehci1: usb@fe203e00 {
		compatible = "st,st-ehci-300x";
		reg = <0xfe203e00 0x100>;
		interrupts = <GIC_SPI 148 IRQ_TYPE_NONE>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_usb1>;
		clocks = <&clk_s_a1_ls 0>;
		phys = <&usb2_phy>;
		phy-names = "usb";

		resets = <&powerdown STIH416_USB1_POWERDOWN>,
			 <&softreset STIH416_USB1_SOFTRESET>;
		reset-names = "power", "softreset";
	};
```

---

# USB Peripheral Controller driver for Aeroflex Gaisler GRUSBDC.

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for USB Peripheral Controller driver for Aeroflex Gaisler GRUSBDC..

The GRUSBDC USB Device Controller core is available in the GRLIB VHDL
IP core library.

Note: In the ordinary environment for the core, a Leon SPARC system,
these properties are built from information in the AMBA plug&amp;play.

## Required properties:

- name : Should be "GAISLER\_USBDC" or "01\_021"

- reg : Address and length of the register set for the device

- interrupts : Interrupt numbers for this device. Either one interrupt number
  for all interrupts, or one for status related interrupts, one for IN
  endpoint related interrupts and one for OUT endpoint related interrupts.

## Optional properties:

- epobufsizes : Array of buffer sizes for OUT endpoints when they differ
  from the default size of 1024. The array is indexed by the OUT endpoint
  number. If the property is present it typically contains one entry for
  each OUT endpoint of the core. Fewer entries overrides the default sizes
  only for as many endpoints as the array contains.

- epibufsizes : Array of buffer sizes for IN endpoints when they differ
  from the default size of 1024. The array is indexed by the IN endpoint
  number. If the property is present it typically contains one entry for
  each IN endpoint of the core. Fewer entries overrides the default sizes
  only for as many endpoints as the array contains.

For further information look in the documentation for the GLIB IP core library:
http://www.gaisler.com/products/grlib/grip.pdf

---

# HiSilicon STB xHCI

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for HiSilicon STB xHCI.

The device node for HiSilicon STB xHCI host controller

## Required properties:

- compatible: should be "hisilicon,hi3798cv200-xhci"
- reg: specifies physical base address and size of the registers
- interrupts : interrupt used by the controller
- clocks: a list of phandle + clock-specifier pairs, one for each
  entry in clock-names
- clock-names: must contain
  "bus": for bus clock
  "utmi": for utmi clock
  "pipe": for pipe clock
  "suspend": for suspend clock
- resets: a list of phandle and reset specifier pairs as listed in
  reset-names property.
- reset-names: must contain
  "soft": for soft reset
- phys: a list of phandle + phy specifier pairs
- phy-names: must contain at least one of following:
  "inno": for inno phy
  "combo": for combo phy

## Optional properties:

- usb2-lpm-disable: indicate if we don't want to enable USB2 HW LPM
- usb3-lpm-capable: determines if platform is USB3 LPM capable
- imod-interval-ns: default interrupt moderation interval is 40000ns

## Example:

```dts
xhci0: xchi@f98a0000 {
	compatible = "hisilicon,hi3798cv200-xhci";
	reg = <0xf98a0000 0x10000>;
	interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
	clocks = <&crg HISTB_USB3_BUS_CLK>,
		 <&crg HISTB_USB3_UTMI_CLK>,
		 <&crg HISTB_USB3_PIPE_CLK>,
		 <&crg HISTB_USB3_SUSPEND_CLK>;
	clock-names = "bus", "utmi", "pipe", "suspend";
	resets = <&crg 0xb0 12>;
	reset-names = "soft";
	phys = <&usb2_phy1_port1 0>, <&combphy0 PHY_TYPE_USB3>;
	phy-names = "inno", "combo";
};
```

---

# Broadcom IPROC USB Device controller.

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for Broadcom IPROC USB Device controller..

The device node is used for UDCs integrated into Broadcom's
iProc family (Northstar2, Cygnus) of SoCs'. The UDC is based
on Synopsys Designware Cores AHB Subsystem Device Controller
IP.

## Required properties:

- compatible: Add the compatibility strings for supported platforms.
  For Broadcom NS2 platform, add "brcm,ns2-udc","brcm,iproc-udc".
  For Broadcom Cygnus platform, add "brcm,cygnus-udc", "brcm,iproc-udc".
- reg: Offset and length of UDC register set
- interrupts: description of interrupt line
- phys: phandle to phy node.

## Example:

```dts
	udc_dwc: usb@664e0000 {
		compatible = "brcm,ns2-udc", "brcm,iproc-udc";
		reg = <0x664e0000 0x2000>;
		interrupts = <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>;
		phys = <&usbdrd_phy>;
```

---

# Maxim Integrated SPI-based USB 2.0 host controller MAX3421E

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for Maxim Integrated SPI-based USB 2.0 host controller MAX3421E.

## Required properties:

- compatible: Should be "maxim,max3421"
- spi-max-frequency: maximum frequency for this device must not exceed 26 MHz.
- reg: chip select number to which this device is connected.
- maxim,vbus-en-pin: &lt;GPOUTx ACTIVE\_LEVEL&gt;
  GPOUTx is the number (1-8) of the GPOUT pin of MAX3421E to drive Vbus.
  ACTIVE\_LEVEL is 0 or 1.
- interrupts: the interrupt line description for the interrupt controller.
  The driver configures MAX3421E for active low level triggered interrupts,
  configure your interrupt line accordingly.

## Example:

```dts
	usb@0 {
		compatible = "maxim,max3421";
		reg = <0>;
		maxim,vbus-en-pin = <3 1>;
		spi-max-frequency = <26000000>;
		interrupt-parent = <&PIC>;
		interrupts = <42>;
	};
```

---

# OCTEON/OCTEON+ USB BLOCK

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for OCTEON/OCTEON+ USB BLOCK.

1) Main node

## Required properties:

- compatible: must be "cavium,octeon-5750-usbn"

- reg: specifies the physical base address of the USBN block and
  the length of the memory mapped region.

- #address-cells: specifies the number of cells needed to encode an
  address. The value must be 2.

- #size-cells: specifies the number of cells used to represent the size
  of an address. The value must be 2.

- ranges: specifies the translation between child address space and parent
  address space.

- clock-frequency: speed of the USB reference clock. Allowed values are
  12000000, 24000000 or 48000000.

- cavium,refclk-type: type of the USB reference clock. Allowed values are
  "crystal" or "external".

- refclk-frequency: deprecated, use "clock-frequency".

- refclk-type: deprecated, use "cavium,refclk-type".

2) Child node

```text
   The main node must have one child node which describes the built-in
   USB controller.
```

## Required properties:

- compatible: must be "cavium,octeon-5750-usbc"

- reg: specifies the physical base address of the USBC block and
  the length of the memory mapped region.

- interrupts: specifies the interrupt number for the USB controller.

3) Example:

```dts
	usbn: usbn@1180068000000 {
		compatible = "cavium,octeon-5750-usbn";
		reg = <0x11800 0x68000000 0x0 0x1000>;
		ranges; /* Direct mapping */
		#address-cells = <2>;
		#size-cells = <2>;
		clock-frequency = <12000000>;
		cavium,refclk-type = "crystal";

		usbc@16f0010000000 {
			compatible = "cavium,octeon-5750-usbc";
			reg = <0x16f00 0x10000000 0x0 0x80000>;
			interrupts = <0 56>;
		};
	};
```

---

# DA8XX USB OHCI controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for DA8XX USB OHCI controller.

## Required properties:

- compatible: Should be "ti,da830-ohci"
- reg:        Should contain one register range i.e. start and length
- interrupts: Description of the interrupt line
- phys:       Phandle for the PHY device
- phy-names:  Should be "usb-phy"

## Optional properties:

- vbus-supply: phandle of regulator that controls vbus power / over-current

## Example:

```dts
ohci: usb@225000 {
        compatible = "ti,da830-ohci";
        reg = <0x225000 0x1000>;
        interrupts = <59>;
        phys = <&usb_phy 1>;
        phy-names = "usb-phy";
        vbus-supply = <&reg_usb_ohci>;
};
```

---

# ST USB OHCI controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for ST USB OHCI controller.

## Required properties:

- compatible		: must be "st,st-ohci-300x"
- reg			: physical base addresses of the controller and length of memory mapped
  region
- interrupts		: one OHCI controller interrupt should be described here
- clocks		: phandle list of usb clocks
- clock-names		: should be "ic" for interconnect clock and "clk48"
  See: [Documentation/devicetree/bindings/clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>)

- phys			: phandle for the PHY device
- phy-names		: should be "usb"

- resets		: phandle to the powerdown and reset controller for the USB IP
- reset-names		: should be "power" and "softreset".
  See: [Documentation/devicetree/bindings/reset/st,stih407-powerdown.yaml](</kernel/hardware/devicetree-bindings/dt-reset/st-stih407-powerdown.md>)
  See: [Documentation/devicetree/bindings/reset/reset.txt](</kernel/hardware/devicetree/bindings-reset/reset.md>)

## Example:

```dts
	ohci0: usb@fe1ffc00 {
		compatible = "st,st-ohci-300x";
		reg = <0xfe1ffc00 0x100>;
		interrupts = <GIC_SPI 149 IRQ_TYPE_NONE>;
		clocks = <&clk_s_a1_ls 0>,
			 <&clockgen_b0 0>;
		clock-names = "ic", "clk48";
		phys = <&usb2_phy>;
		phy-names = "usb";

		resets = <&powerdown STIH416_USB0_POWERDOWN>,
			 <&softreset STIH416_USB0_SOFTRESET>;
		reset-names = "power", "softreset";
	};
```

---

# OMAP GLUE AND OTHER OMAP SPECIFIC COMPONENTS

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for OMAP GLUE AND OTHER OMAP SPECIFIC COMPONENTS.

OMAP MUSB GLUE

- compatible : Should be "ti,omap4-musb" or "ti,omap3-musb"
- ti,hwmods : must be "usb\_otg\_hs"
- multipoint : Should be "1" indicating the musb controller supports
  multipoint. This is a MUSB configuration-specific setting.
- num-eps : Specifies the number of endpoints. This is also a
  MUSB configuration-specific setting. Should be set to "16"
- ram-bits : Specifies the ram address size. Should be set to "12"
- interface-type : This is a board specific setting to describe the type of
  interface between the controller and the phy. It should be "0" or "1"
  specifying ULPI and UTMI respectively.
- mode : Should be "3" to represent OTG. "1" signifies HOST and "2"
  represents PERIPHERAL.
- power : Should be "50". This signifies the controller can supply up to
  100mA when operating in host mode.
- usb-phy : the phandle for the PHY device
- phys : the phandle for the PHY device (used by generic PHY framework)
- phy-names : the names of the PHY corresponding to the PHYs present in the
  \*phy\* phandle.

## Optional properties:

- ctrl-module : phandle of the control module this glue uses to write to
  mailbox

SOC specific device node entry

```dts
usb_otg_hs: usb_otg_hs@4a0ab000 {
	compatible = "ti,omap4-musb";
	ti,hwmods = "usb_otg_hs";
	multipoint = <1>;
	num-eps = <16>;
	ram-bits = <12>;
	ctrl-module = <&omap_control_usb>;
	phys = <&usb2_phy>;
	phy-names = "usb2-phy";
};
```

Board specific device node entry

```dts
&usb_otg_hs {
	interface-type = <1>;
	mode = <3>;
	power = <50>;
};
```

OMAP DWC3 GLUE

```text
 - compatible : Should be
	* "ti,dwc3" for OMAP5 and DRA7
	* "ti,am437x-dwc3" for AM437x
 - ti,hwmods : Should be "usb_otg_ss"
 - reg : Address and length of the register set for the device.
 - interrupts : The irq number of this device that is used to interrupt the
   MPU
 - #address-cells, #size-cells : Must be present if the device has sub-nodes
 - utmi-mode : controls the source of UTMI/PIPE status for VBUS and OTG ID.
   It should be set to "1" for HW mode and "2" for SW mode.
 - ranges: the child address space are mapped 1:1 onto the parent address space
```

## Optional Properties:

- extcon : phandle for the extcon device omap dwc3 uses to detect
  connect/disconnect events.
- vbus-supply : phandle to the regulator device tree node if needed.

## Sub-nodes:

The dwc3 core should be added as subnode to omap dwc3 glue.

- dwc3 :
  The binding details of dwc3 can be found in:
  [Documentation/devicetree/bindings/usb/snps,dwc3.yaml](</kernel/hardware/devicetree-bindings/dt-usb/snps-dwc3.md>)

```dts
omap_dwc3 {
	compatible = "ti,dwc3";
	ti,hwmods = "usb_otg_ss";
	reg = <0x4a020000 0x1ff>;
	interrupts = <0 93 4>;
	#address-cells = <1>;
	#size-cells = <1>;
	utmi-mode = <2>;
	ranges;
};
```

---

# PXA USB controllers

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for PXA USB controllers.

OHCI

## Required properties:

- compatible: Should be "marvell,pxa-ohci" for USB controllers
  used in host mode.

## Optional properties:

```text
 - "marvell,enable-port1", "marvell,enable-port2", "marvell,enable-port3"
   If present, enables the appropriate USB port of the controller.
 - "marvell,port-mode" selects the mode of the ports:
	1 = PMM_NPS_MODE
	2 = PMM_GLOBAL_MODE
	3 = PMM_PERPORT_MODE
 - "marvell,power-sense-low" - power sense pin is low-active.
 - "marvell,power-control-low" - power control pin is low-active.
 - "marvell,no-oc-protection" - disable over-current protection.
 - "marvell,oc-mode-perport" - enable per-port over-current protection.
 - "marvell,power_on_delay" Power On to Power Good time - in ms.
```

## Example:

```dts
	usb0: ohci@4c000000 {
		compatible = "marvell,pxa-ohci";
		reg = <0x4c000000 0x100000>;
		interrupts = <18>;
		marvell,enable-port1;
		marvell,port-mode = <2>; /* PMM_GLOBAL_MODE */
	};
```

UDC

## Required properties:

- compatible: Should be "marvell,pxa270-udc" for USB controllers
  used in device mode.
- reg: usb device MMIO address space
- interrupts: single interrupt generated by the UDC IP
- clocks: input clock of the UDC IP (see clock-bindings.txt)

## Optional properties:

```text
 - gpios:
   - gpio activated to control the USB D+ pullup (see gpio.txt)
```

## Example:

```dts
		pxa27x_udc: udc@40600000 {
			compatible = "marvell,pxa270-udc";
			reg = <0x40600000 0x10000>;
			interrupts = <11>;
			clocks = <&pxa2xx_clks 11>;
			gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
		};
```

---

# Richtek RT1711H TypeC PD Controller.

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for Richtek RT1711H TypeC PD Controller..

## Required properties:

- compatible : Must be "richtek,rt1711h".
- reg : Must be 0x4e, it's slave address of RT1711H.
- interrupts : &lt;a b&gt; where a is the interrupt number and b represents an
  encoding of the sense and level information for the interrupt.

## Required sub-node:

- connector: The "usb-c-connector" attached to the tcpci chip, the bindings
  of connector node are specified in
  [Documentation/devicetree/bindings/connector/usb-connector.yaml](</kernel/hardware/devicetree-bindings/dt-connector/usb-connector.md>)

## Example :

```dts
rt1711h@4e {
	compatible = "richtek,rt1711h";
	reg = <0x4e>;
	interrupt-parent = <&gpio26>;
	interrupts = <0 IRQ_TYPE_LEVEL_LOW>;

	usb_con: connector {
		compatible = "usb-c-connector";
		label = "USB-C";
		data-role = "dual";
		power-role = "dual";
		try-power-role = "sink";
		source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
		sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)
			     PDO_VAR(5000, 12000, 2000)>;
		op-sink-microwatt = <10000000>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@1 {
				reg = <1>;
				usb_con_ss: endpoint {
					remote-endpoint = <&usb3_data_ss>;
				};
			};
		};
	};
};
```

---

# ULPI bus binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for ULPI bus binding.

Phys that are behind a ULPI connection can be described with the following
binding. The host controller shall have a "ulpi" named node as a child, and
that node shall have one enabled node underneath it representing the ulpi
device on the bus.

## EXAMPLE

```dts
usb {
	compatible = "vendor,usb-controller";

	ulpi {
		phy {
			compatible = "vendor,phy";
		};
	};
};
```

---

# SMSC USB4604 High-Speed Hub Controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for SMSC USB4604 High-Speed Hub Controller.

## Required properties:

- compatible: Should be "smsc,usb4604"

## Optional properties:

- reg: Specifies the i2c slave address, it is required and should be 0x2d
  if I2C is used.
- reset-gpios: Should specify GPIO for reset.
- initial-mode: Should specify initial mode.
  (1 for HUB mode, 2 for STANDBY mode)

## Examples:

```dts
	usb-hub@2d {
		compatible = "smsc,usb4604";
		reg = <0x2d>;
		reset-gpios = <&gpx3 5 1>;
		initial-mode = <1>;
	};
```

---

# Ux500 MUSB

_Peios Kernel / Hardware and drivers / Device tree / bindings/usb_

> Device-tree binding reference for Ux500 MUSB.

## Required properties:

- compatible : Should be "stericsson,db8500-musb"
- reg        : Offset and length of registers
- interrupts : Interrupt; mode, number and trigger
- dr\_mode    : Dual-role; either host mode "host", peripheral mode "peripheral"
  or both "otg"

## Optional properties:

- dmas       : A list of dma channels;
  dma-controller, event-line, fixed-channel, flags
- dma-names  : An ordered list of channel names affiliated to the above

## Example:

```dts
usb_per5@a03e0000 {
	compatible = "stericsson,db8500-musb";
	reg = <0xa03e0000 0x10000>;
	interrupts = <0 23 0x4>;
	interrupt-names = "mc";

	dr_mode = "otg";

	dmas = <&dma 38 0 0x2>, /* Logical - DevToMem */
	       <&dma 38 0 0x0>, /* Logical - MemToDev */
	       <&dma 37 0 0x2>, /* Logical - DevToMem */
	       <&dma 37 0 0x0>, /* Logical - MemToDev */
	       <&dma 36 0 0x2>, /* Logical - DevToMem */
	       <&dma 36 0 0x0>, /* Logical - MemToDev */
	       <&dma 19 0 0x2>, /* Logical - DevToMem */
	       <&dma 19 0 0x0>, /* Logical - MemToDev */
	       <&dma 18 0 0x2>, /* Logical - DevToMem */
	       <&dma 18 0 0x0>, /* Logical - MemToDev */
	       <&dma 17 0 0x2>, /* Logical - DevToMem */
	       <&dma 17 0 0x0>, /* Logical - MemToDev */
	       <&dma 16 0 0x2>, /* Logical - DevToMem */
	       <&dma 16 0 0x0>, /* Logical - MemToDev */
	       <&dma 39 0 0x2>, /* Logical - DevToMem */
	       <&dma 39 0 0x0>; /* Logical - MemToDev */

	dma-names = "iep_1_9",  "oep_1_9",
		    "iep_2_10", "oep_2_10",
		    "iep_3_11", "oep_3_11",
		    "iep_4_12", "oep_4_12",
		    "iep_5_13", "oep_5_13",
		    "iep_6_14", "oep_6_14",
		    "iep_7_15", "oep_7_15",
		    "iep_8",    "oep_8";
};
```

---

# OMAP HDQ One wire bus master controller

_Peios Kernel / Hardware and drivers / Device tree / bindings/w1_

> Device-tree binding reference for OMAP HDQ One wire bus master controller.

## Required properties:

- compatible : should be "ti,omap3-1w" or "ti,am4372-hdq"
- reg : Address and length of the register set for the device
- interrupts : interrupt line.
- ti,hwmods : "hdq1w"

## Optional properties:

- ti,mode: should be "hdq": HDQ mode  "1w": one-wire mode.
  If not specified HDQ mode is implied.

## Example:

```text
- From omap3.dtsi
  hdqw1w: 1w@480b2000 {
	compatible = "ti,omap3-1w";
	reg = <0x480b2000 0x1000>;
	interrupts = <58>;
	ti,hwmods = "hdq1w";
	ti,mode = "hdq";
  };
```

---

# Generic devicetree bindings for onewire (w1) busses

_Peios Kernel / Hardware and drivers / Device tree / bindings/w1_

> Device-tree binding reference for Generic devicetree bindings for onewire (w1) busses.

Onewire busses are described through nodes of their master bus controller.
Slave devices are listed as sub-nodes of such master devices. For now, only
one slave is allowed per bus master.

## Example:

```dts
	charger: charger {
		compatible = "gpio-charger";
		charger-type = "mains";
		gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
	};
```

```dts
	onewire {
		compatible = "w1-gpio";
		gpios = <&gpio 100 0>, <&gpio 101 0>;

		battery {
			compatible = "maxim,ds2760";
			power-supplies = <&charger>;
		};
	};
```

---

# Bindings for MEN A21 Watchdog device connected to GPIO lines

_Peios Kernel / Hardware and drivers / Device tree / bindings/watchdog_

> Device-tree binding reference for Bindings for MEN A21 Watchdog device connected to GPIO lines.

## Required properties:

- compatible: "men,a021-wdt"
- gpios: Specifies the pins that control the Watchdog, order:
  1: Watchdog enable
  2: Watchdog fast-mode
  3: Watchdog trigger
  4: Watchdog reset cause bit 0
  5: Watchdog reset cause bit 1
  6: Watchdog reset cause bit 2

## Optional properties:

- None

## Example:

```dts
	watchdog {
		compatible ="men,a021-wdt";
		gpios = <&gpio3 9  1	/* WD_EN */
			 &gpio3 10 1	/* WD_FAST */
			 &gpio3 11 1	/* WD_TRIG */
			 &gpio3 6  1	/* RST_CAUSE[0] */
			 &gpio3 7  1	/* RST_CAUSE[1] */
			 &gpio3 8  1>;	/* RST_CAUSE[2] */
	};
```

---

# Microchip PIC32 Deadman Timer

_Peios Kernel / Hardware and drivers / Device tree / bindings/watchdog_

> Device-tree binding reference for Microchip PIC32 Deadman Timer.

The deadman timer is used to reset the processor in the event of a software
malfunction. It is a free-running instruction fetch timer, which is clocked
whenever an instruction fetch occurs until a count match occurs.

## Required properties:

- compatible: must be "microchip,pic32mzda-dmt".
- reg: physical base address of the controller and length of memory mapped
  region.
- clocks: phandle of source clk. Should be &lt;&amp;rootclk PB7CLK&gt;.

## Example:

```dts
	watchdog@1f800a00 {
		compatible = "microchip,pic32mzda-dmt";
		reg = <0x1f800a00 0x80>;
		clocks = <&rootclk PB7CLK>;
	};
```

---

# Microchip PIC32 Watchdog Timer

_Peios Kernel / Hardware and drivers / Device tree / bindings/watchdog_

> Device-tree binding reference for Microchip PIC32 Watchdog Timer.

When enabled, the watchdog peripheral can be used to reset the device if the
WDT is not cleared periodically in software.

## Required properties:

- compatible: must be "microchip,pic32mzda-wdt".
- reg: physical base address of the controller and length of memory mapped
  region.
- clocks: phandle of source clk. Should be &lt;&amp;rootclk LPRCCLK&gt;.

## Example:

```dts
	watchdog@1f800800 {
		compatible = "microchip,pic32mzda-wdt";
		reg = <0x1f800800 0x200>;
		clocks = <&rootclk LPRCCLK>;
	};
```

---

# STMicroelectronics Low Power Controller (LPC) - Watchdog

_Peios Kernel / Hardware and drivers / Device tree / bindings/watchdog_

> Device-tree binding reference for STMicroelectronics Low Power Controller (LPC) - Watchdog.

LPC currently supports Watchdog OR Real Time Clock OR Clocksource
functionality.

\[See: [../rtc/rtc-st-lpc.txt](</kernel/hardware/devicetree/bindings-rtc/rtc-st-lpc.md>) for RTC options\]
\[See: ../timer/st,stih407-lpc for Clocksource options\]

Required properties

- compatible 	: Should be: "st,stih407-lpc"
- reg		: LPC registers base address + size
- interrupts    : LPC interrupt line number and associated flags
- clocks	: Clock used by LPC device (See: [../clock/clock-bindings.txt](</kernel/hardware/devicetree/bindings-clock/clock-bindings.md>))
- st,lpc-mode	: The LPC can run either one of three modes:
  ST\_LPC\_MODE\_RTC    \[0\]
  ST\_LPC\_MODE\_WDT    \[1\]
  ST\_LPC\_MODE\_CLKSRC \[2\]
  One (and only one) mode must be selected.

Required properties \[watchdog mode\]

- st,syscfg	: Phandle to syscfg node used to enable watchdog and configure
  CPU reset type.
- timeout-sec	: Watchdog timeout in seconds

Optional properties \[watchdog mode\]

- st,warm-reset	: If present reset type will be 'warm' - if not it will be cold

## Example:

```dts
	lpc@fde05000 {
		compatible	= "st,stih407-lpc";
		reg		= <0xfde05000 0x1000>;
		clocks 		= <&clk_s_d3_flexgen CLK_LPC_0>;
		st,syscfg	= <&syscfg_core>;
		timeout-sec	= <120>;
		st,lpc-mode	= <ST_LPC_MODE_WDT>;
		st,warm-reset;
	};
```

---

# Technologic Systems Watchdog

_Peios Kernel / Hardware and drivers / Device tree / bindings/watchdog_

> Device-tree binding reference for Technologic Systems Watchdog.

## Required properties:

```text
- compatible: must be "technologic,ts4800-wdt"
- syscon: phandle / integer array that points to the syscon node which
          describes the FPGA's syscon registers.
          - phandle to FPGA's syscon
          - offset to the watchdog register
```

## Optional property:

- timeout-sec: contains the watchdog timeout in seconds.

## Example:

```dts
syscon: syscon@b0010000 {
	compatible = "syscon", "simple-mfd";
	reg = <0xb0010000 0x3d>;
	reg-io-width = <2>;

	wdt@e {
		compatible = "technologic,ts4800-wdt";
		syscon = <&syscon 0xe>;
		timeout-sec = <10>;
	};
}
```

---

# CE4100 Device Tree Bindings

_Peios Kernel / Hardware and drivers / Device tree / bindings/x86_

> Device-tree binding reference for CE4100 Device Tree Bindings.

The CE4100 SoC uses for in core peripherals the following compatible
format: &lt;vendor&gt;,&lt;chip&gt;-&lt;device&gt;.
Many of the "generic" devices like HPET or IO APIC have the ce4100
name in their compatible property because they first appeared in this
SoC.

## The CPU nodes

```dts
	cpus {
		#address-cells = <1>;
		#size-cells = <0>;

		cpu@0 {
			device_type = "cpu";
			compatible = "intel,ce4100";
			reg = <0x00>;
		};

		cpu@2 {
			device_type = "cpu";
			compatible = "intel,ce4100";
			reg = <0x02>;
		};
	};
```

A "cpu" node describes one logical processor (hardware thread).

## Required properties:

- device\_type
  Device type, must be "cpu".

- reg
  Local APIC ID, the unique number assigned to each processor by
  system hardware.

## The SoC node

## This node describes the in-core peripherals. Required property:

```dts
  compatible = "intel,ce4100-cp";
```

## The PCI node

This node describes the PCI bus on the SoC. Its property should be

```dts
  compatible = "intel,ce4100-pci", "pci";
```

If the OS is using the IO-APIC for interrupt routing then the reported
interrupt numbers for devices is no longer true. In order to obtain the
correct interrupt number, the child node which represents the device has
to contain the interrupt property. Besides the interrupt property it has
to contain at least the reg property containing the PCI bus address and
compatible property according to "PCI Bus Binding Revision 2.1".

---

# Timers

_Peios Kernel / Hardware and drivers / Device tree / bindings/x86_

> Device-tree binding reference for Timers.

```text
* High Precision Event Timer (HPET)
  Required property:
     compatible = "intel,ce4100-hpet";
```

---

# Xillybus driver for generic FPGA interface

_Peios Kernel / Hardware and drivers / Device tree / bindings/xillybus_

> Device-tree binding reference for Xillybus driver for generic FPGA interface.

## Required properties:

- compatible: Should be "xillybus,xillybus-1.00.a"
- reg: Address and length of the register set for the device
- interrupts: Contains one interrupt node, typically consisting of three cells.

## Optional properties:

- dma-coherent: Present if DMA operations are coherent

## Example:

```dts
	xillybus@ff200400 {
		compatible = "xillybus,xillybus-1.00.a";
		reg = < 0xff200400 0x00000080 >;
		interrupts = < 0 40 1 >;
		interrupt-parent = <&intc>;
	} ;
```

---

# Secondary CPU enable-method "al,alpine-smp" binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/cpu-enable-method_

> Kernel reference: Secondary CPU enable-method "al,alpine-smp" binding.

---

This document describes the "al,alpine-smp" method for
enabling secondary CPUs. To apply to all CPUs, a single
"al,alpine-smp" enable method should be defined in the
"cpus" node.

```text
Enable method name:	"al,alpine-smp"
Compatible machines:	"al,alpine"
Compatible CPUs:	"arm,cortex-a15"
Related properties:	(none)
```

## Note:

This enable method requires valid nodes compatible with
"al,alpine-cpu-resume" and "al,alpine-nb-service".

- Alpine CPU resume registers

The CPU resume register are used to define required resume address after
reset.

## Properties:

- compatible : Should contain "al,alpine-cpu-resume".
- reg : Offset and length of the register set for the device

## Example:

```dts
cpus {
	#address-cells = <1>;
	#size-cells = <0>;
	enable-method = "al,alpine-smp";

	cpu@0 {
		compatible = "arm,cortex-a15";
		device_type = "cpu";
		reg = <0>;
	};

	cpu@1 {
		compatible = "arm,cortex-a15";
		device_type = "cpu";
		reg = <1>;
	};

	cpu@2 {
		compatible = "arm,cortex-a15";
		device_type = "cpu";
		reg = <2>;
	};

	cpu@3 {
		compatible = "arm,cortex-a15";
		device_type = "cpu";
		reg = <3>;
	};
};
```

```dts
cpu_resume {
	compatible = "al,alpine-cpu-resume";
	reg = <0xfbff5ed0 0x30>;
};
```

```dts
nb_service {
        compatible = "al,alpine-sysfabric-service", "syscon";
        reg = <0xfb070000 0x10000>;
};
```

---

# Secondary CPU enable-method "marvell,berlin-smp" binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/cpu-enable-method_

> Kernel reference: Secondary CPU enable-method "marvell,berlin-smp" binding.

---

This document describes the "marvell,berlin-smp" method for enabling secondary
CPUs. To apply to all CPUs, a single "marvell,berlin-smp" enable method should
be defined in the "cpus" node.

```text
Enable method name:	"marvell,berlin-smp"
Compatible machines:	"marvell,berlin2" and "marvell,berlin2q"
Compatible CPUs:	"marvell,pj4b" and "arm,cortex-a9"
Related properties:	(none)
```

## Note:

This enable method needs valid nodes compatible with "arm,cortex-a9-scu" and
"marvell,berlin-cpu-ctrl"\[1\].

## Example:

```dts
	cpus {
		#address-cells = <1>;
		#size-cells = <0>;
		enable-method = "marvell,berlin-smp";

		cpu@0 {
			compatible = "marvell,pj4b";
			device_type = "cpu";
			next-level-cache = <&l2>;
			reg = <0>;
		};

		cpu@1 {
			compatible = "marvell,pj4b";
			device_type = "cpu";
			next-level-cache = <&l2>;
			reg = <1>;
		};
	};
```

--
\[1\] arm/marvell,berlin.txt

---

# Secondary CPU enable-method "nuvoton,npcm750-smp" binding

_Peios Kernel / Hardware and drivers / Device tree / bindings/arm/cpu-enable-method_

> Kernel reference: Secondary CPU enable-method "nuvoton,npcm750-smp" binding.

---

To apply to all CPUs, a single "nuvoton,npcm750-smp" enable method should be
defined in the "cpus" node.

```text
Enable method name:	"nuvoton,npcm750-smp"
Compatible machines:	"nuvoton,npcm750"
Compatible CPUs:	"arm,cortex-a9"
Related properties:	(none)
```

## Note:

This enable method needs valid nodes compatible with "arm,cortex-a9-scu" and
"nuvoton,npcm750-gcr".

## Example:

```dts
	cpus {
		#address-cells = <1>;
		#size-cells = <0>;
		enable-method = "nuvoton,npcm750-smp";

		cpu@0 {
			device_type = "cpu";
			compatible = "arm,cortex-a9";
			clocks = <&clk NPCM7XX_CLK_CPU>;
			clock-names = "clk_cpu";
			reg = <0>;
			next-level-cache = <&L2>;
		};

		cpu@1 {
			device_type = "cpu";
			compatible = "arm,cortex-a9";
			clocks = <&clk NPCM7XX_CLK_CPU>;
			clock-names = "clk_cpu";
			reg = <1>;
			next-level-cache = <&L2>;
		};
	};
```
