| 1 |
# SPDX-License-Identifier: BSD-2-Clause |
| 2 |
# Copyright 2020 Arm Ltd. |
| 3 |
%YAML 1.2 |
| 4 |
--- |
| 5 |
$id: http://devicetree.org/schemas/reg.yaml# |
| 6 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 7 |
|
| 8 |
title: Address related Common Properties |
| 9 |
|
| 10 |
maintainers: |
| 11 |
- Rob Herring <[email protected]> |
| 12 |
|
| 13 |
select: true |
| 14 |
|
| 15 |
properties: |
| 16 |
'#address-cells': |
| 17 |
maximum: 3 |
| 18 |
|
| 19 |
'#size-cells': |
| 20 |
maximum: 2 |
| 21 |
|
| 22 |
dma-ranges: |
| 23 |
oneOf: |
| 24 |
- $ref: types.yaml#/definitions/flag |
| 25 |
- $ref: types.yaml#/definitions/uint32-matrix |
| 26 |
|
| 27 |
ranges: |
| 28 |
oneOf: |
| 29 |
- $ref: types.yaml#/definitions/flag |
| 30 |
- $ref: types.yaml#/definitions/uint32-matrix |
| 31 |
|
| 32 |
reg: |
| 33 |
$ref: types.yaml#/definitions/address |
| 34 |
|
| 35 |
reg-io-width: |
| 36 |
$ref: types.yaml#/definitions/uint32 |
| 37 |
minimum: 1 |
| 38 |
maximum: 0xf |
| 39 |
description: |
| 40 |
Typically, a single set bit indicating the access size, but some uses treat |
| 41 |
this as a bit mask of allowed sizes. |
| 42 |
|
| 43 |
reg-shift: |
| 44 |
$ref: types.yaml#/definitions/uint32 |
| 45 |
enum: [ 0, 1, 2 ] |
| 46 |
|
| 47 |
nonposted-mmio: |
| 48 |
$ref: types.yaml#/definitions/flag |
| 49 |
description: |
| 50 |
If present, specifies that the device represented by this node (and |
| 51 |
its children, if any) should use non-posted memory accesses for |
| 52 |
accessing the memory described by /reg and any other inferred MMIO |
| 53 |
regions. |
| 54 |
|
| 55 |
big-endian: |
| 56 |
$ref: types.yaml#/definitions/flag |
| 57 |
description: > |
| 58 |
Force big endian register accesses unconditionally. Use this if you know |
| 59 |
the peripheral always needs to be accessed in big endian (BE) mode. |
| 60 |
|
| 61 |
If a binding supports these properties, then the binding should also |
| 62 |
specify the default behavior if none of these properties are present. |
| 63 |
In such cases, little-endian is the preferred default, but it is not |
| 64 |
a requirement. Some implementations assume that little-endian is |
| 65 |
the default, because most existing (PCI-based) drivers implicitly |
| 66 |
default to LE for their MMIO accesses. |
| 67 |
|
| 68 |
little-endian: |
| 69 |
$ref: types.yaml#/definitions/flag |
| 70 |
description: |
| 71 |
Force little endian register accesses unconditionally. Use this if you |
| 72 |
know the peripheral always needs to be accessed in little endian (LE) |
| 73 |
mode. |
| 74 |
|
| 75 |
native-endian: |
| 76 |
$ref: types.yaml#/definitions/flag |
| 77 |
description: |
| 78 |
Always use register accesses matched to the endianness of the CPU. In this |
| 79 |
case no byte swaps will ever be performed. Use this if the hardware |
| 80 |
"self-adjusts" register endianness based on the CPU's configured |
| 81 |
endianness. |
| 82 |
|
| 83 |
additionalProperties: true |
| 84 |
|
| 85 |
dependencies: |
| 86 |
"#size-cells": [ "#address-cells" ] |
| 87 |
big-endian: [ reg ] |
| 88 |
little-endian: [ reg ] |
| 89 |
native-endian: [ reg ] |
| 90 |
|
| 91 |
allOf: |
| 92 |
- if: |
| 93 |
properties: |
| 94 |
'#address-cells': |
| 95 |
const: 2 |
| 96 |
'#size-cells': |
| 97 |
const: 2 |
| 98 |
required: |
| 99 |
- '#address-cells' |
| 100 |
- '#size-cells' |
| 101 |
then: |
| 102 |
patternProperties: |
| 103 |
'@': |
| 104 |
properties: |
| 105 |
reg: |
| 106 |
items: |
| 107 |
minItems: 4 |
| 108 |
maxItems: 4 |
| 109 |
|
| 110 |
- if: |
| 111 |
properties: |
| 112 |
'#address-cells': |
| 113 |
const: 1 |
| 114 |
'#size-cells': |
| 115 |
const: 1 |
| 116 |
required: |
| 117 |
- '#address-cells' |
| 118 |
- '#size-cells' |
| 119 |
then: |
| 120 |
patternProperties: |
| 121 |
'@': |
| 122 |
properties: |
| 123 |
reg: |
| 124 |
items: |
| 125 |
minItems: 2 |
| 126 |
maxItems: 2 |
| 127 |
|
| 128 |
- if: |
| 129 |
properties: |
| 130 |
'#address-cells': |
| 131 |
const: 2 |
| 132 |
'#size-cells': |
| 133 |
const: 1 |
| 134 |
required: |
| 135 |
- '#address-cells' |
| 136 |
- '#size-cells' |
| 137 |
then: |
| 138 |
patternProperties: |
| 139 |
'@': |
| 140 |
properties: |
| 141 |
reg: |
| 142 |
items: |
| 143 |
minItems: 3 |
| 144 |
maxItems: 3 |
| 145 |
|
| 146 |
... |