diff options
| -rw-r--r-- | Documentation/devicetree/bindings/arm/l2c2x0.txt | 114 | ||||
| -rw-r--r-- | Documentation/devicetree/bindings/arm/l2c2x0.yaml | 248 |
2 files changed, 248 insertions, 114 deletions
diff --git a/Documentation/devicetree/bindings/arm/l2c2x0.txt b/Documentation/devicetree/bindings/arm/l2c2x0.txt deleted file mode 100644 index fbe6cb21f4cf..000000000000 --- a/Documentation/devicetree/bindings/arm/l2c2x0.txt +++ /dev/null | |||
| @@ -1,114 +0,0 @@ | |||
| 1 | * ARM L2 Cache Controller | ||
| 2 | |||
| 3 | ARM cores often have a separate L2C210/L2C220/L2C310 (also known as PL210/PL220/ | ||
| 4 | PL310 and variants) based level 2 cache controller. All these various implementations | ||
| 5 | of the L2 cache controller have compatible programming models (Note 1). | ||
| 6 | Some of the properties that are just prefixed "cache-*" are taken from section | ||
| 7 | 3.7.3 of the Devicetree Specification which can be found at: | ||
| 8 | https://www.devicetree.org/specifications/ | ||
| 9 | |||
| 10 | The ARM L2 cache representation in the device tree should be done as follows: | ||
| 11 | |||
| 12 | Required properties: | ||
| 13 | |||
| 14 | - compatible : should be one of: | ||
| 15 | "arm,pl310-cache" | ||
| 16 | "arm,l220-cache" | ||
| 17 | "arm,l210-cache" | ||
| 18 | "bcm,bcm11351-a2-pl310-cache": DEPRECATED by "brcm,bcm11351-a2-pl310-cache" | ||
| 19 | "brcm,bcm11351-a2-pl310-cache": For Broadcom bcm11351 chipset where an | ||
| 20 | offset needs to be added to the address before passing down to the L2 | ||
| 21 | cache controller | ||
| 22 | "marvell,aurora-system-cache": Marvell Controller designed to be | ||
| 23 | compatible with the ARM one, with system cache mode (meaning | ||
| 24 | maintenance operations on L1 are broadcasted to the L2 and L2 | ||
| 25 | performs the same operation). | ||
| 26 | "marvell,aurora-outer-cache": Marvell Controller designed to be | ||
| 27 | compatible with the ARM one with outer cache mode. | ||
| 28 | "marvell,tauros3-cache": Marvell Tauros3 cache controller, compatible | ||
| 29 | with arm,pl310-cache controller. | ||
| 30 | - cache-unified : Specifies the cache is a unified cache. | ||
| 31 | - cache-level : Should be set to 2 for a level 2 cache. | ||
| 32 | - reg : Physical base address and size of cache controller's memory mapped | ||
| 33 | registers. | ||
| 34 | |||
| 35 | Optional properties: | ||
| 36 | |||
| 37 | - arm,data-latency : Cycles of latency for Data RAM accesses. Specifies 3 cells of | ||
| 38 | read, write and setup latencies. Minimum valid values are 1. Controllers | ||
| 39 | without setup latency control should use a value of 0. | ||
| 40 | - arm,tag-latency : Cycles of latency for Tag RAM accesses. Specifies 3 cells of | ||
| 41 | read, write and setup latencies. Controllers without setup latency control | ||
| 42 | should use 0. Controllers without separate read and write Tag RAM latency | ||
| 43 | values should only use the first cell. | ||
| 44 | - arm,dirty-latency : Cycles of latency for Dirty RAMs. This is a single cell. | ||
| 45 | - arm,filter-ranges : <start length> Starting address and length of window to | ||
| 46 | filter. Addresses in the filter window are directed to the M1 port. Other | ||
| 47 | addresses will go to the M0 port. | ||
| 48 | - arm,io-coherent : indicates that the system is operating in an hardware | ||
| 49 | I/O coherent mode. Valid only when the arm,pl310-cache compatible | ||
| 50 | string is used. | ||
| 51 | - interrupts : 1 combined interrupt. | ||
| 52 | - cache-size : specifies the size in bytes of the cache | ||
| 53 | - cache-sets : specifies the number of associativity sets of the cache | ||
| 54 | - cache-block-size : specifies the size in bytes of a cache block | ||
| 55 | - cache-line-size : specifies the size in bytes of a line in the cache, | ||
| 56 | if this is not specified, the line size is assumed to be equal to the | ||
| 57 | cache block size | ||
| 58 | - cache-id-part: cache id part number to be used if it is not present | ||
| 59 | on hardware | ||
| 60 | - wt-override: If present then L2 is forced to Write through mode | ||
| 61 | - arm,double-linefill : Override double linefill enable setting. Enable if | ||
| 62 | non-zero, disable if zero. | ||
| 63 | - arm,double-linefill-incr : Override double linefill on INCR read. Enable | ||
| 64 | if non-zero, disable if zero. | ||
| 65 | - arm,double-linefill-wrap : Override double linefill on WRAP read. Enable | ||
| 66 | if non-zero, disable if zero. | ||
| 67 | - arm,prefetch-drop : Override prefetch drop enable setting. Enable if non-zero, | ||
| 68 | disable if zero. | ||
| 69 | - arm,prefetch-offset : Override prefetch offset value. Valid values are | ||
| 70 | 0-7, 15, 23, and 31. | ||
| 71 | - arm,shared-override : The default behavior of the L220 or PL310 cache | ||
| 72 | controllers with respect to the shareable attribute is to transform "normal | ||
| 73 | memory non-cacheable transactions" into "cacheable no allocate" (for reads) | ||
| 74 | or "write through no write allocate" (for writes). | ||
| 75 | On systems where this may cause DMA buffer corruption, this property must be | ||
| 76 | specified to indicate that such transforms are precluded. | ||
| 77 | - arm,parity-enable : enable parity checking on the L2 cache (L220 or PL310). | ||
| 78 | - arm,parity-disable : disable parity checking on the L2 cache (L220 or PL310). | ||
| 79 | - arm,outer-sync-disable : disable the outer sync operation on the L2 cache. | ||
| 80 | Some core tiles, especially ARM PB11MPCore have a faulty L220 cache that | ||
| 81 | will randomly hang unless outer sync operations are disabled. | ||
| 82 | - prefetch-data : Data prefetch. Value: <0> (forcibly disable), <1> | ||
| 83 | (forcibly enable), property absent (retain settings set by firmware) | ||
| 84 | - prefetch-instr : Instruction prefetch. Value: <0> (forcibly disable), | ||
| 85 | <1> (forcibly enable), property absent (retain settings set by | ||
| 86 | firmware) | ||
| 87 | - arm,dynamic-clock-gating : L2 dynamic clock gating. Value: <0> (forcibly | ||
| 88 | disable), <1> (forcibly enable), property absent (OS specific behavior, | ||
| 89 | preferably retain firmware settings) | ||
| 90 | - arm,standby-mode: L2 standby mode enable. Value <0> (forcibly disable), | ||
| 91 | <1> (forcibly enable), property absent (OS specific behavior, | ||
| 92 | preferably retain firmware settings) | ||
| 93 | - arm,early-bresp-disable : Disable the CA9 optimization Early BRESP (PL310) | ||
| 94 | - arm,full-line-zero-disable : Disable the CA9 optimization Full line of zero | ||
| 95 | write (PL310) | ||
| 96 | |||
| 97 | Example: | ||
| 98 | |||
| 99 | L2: cache-controller { | ||
| 100 | compatible = "arm,pl310-cache"; | ||
| 101 | reg = <0xfff12000 0x1000>; | ||
| 102 | arm,data-latency = <1 1 1>; | ||
| 103 | arm,tag-latency = <2 2 2>; | ||
| 104 | arm,filter-ranges = <0x80000000 0x8000000>; | ||
| 105 | cache-unified; | ||
| 106 | cache-level = <2>; | ||
| 107 | interrupts = <45>; | ||
| 108 | }; | ||
| 109 | |||
| 110 | Note 1: The description in this document doesn't apply to integrated L2 | ||
| 111 | cache controllers as found in e.g. Cortex-A15/A7/A57/A53. These | ||
| 112 | integrated L2 controllers are assumed to be all preconfigured by | ||
| 113 | early secure boot code. Thus no need to deal with their configuration | ||
| 114 | in the kernel at all. | ||
diff --git a/Documentation/devicetree/bindings/arm/l2c2x0.yaml b/Documentation/devicetree/bindings/arm/l2c2x0.yaml new file mode 100644 index 000000000000..bfc5c185561c --- /dev/null +++ b/Documentation/devicetree/bindings/arm/l2c2x0.yaml | |||
| @@ -0,0 +1,248 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0 | ||
| 2 | %YAML 1.2 | ||
| 3 | --- | ||
| 4 | $id: http://devicetree.org/schemas/arm/l2c2x0.yaml# | ||
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# | ||
| 6 | |||
| 7 | title: ARM L2 Cache Controller | ||
| 8 | |||
| 9 | maintainers: | ||
| 10 | - Rob Herring <robh@kernel.org> | ||
| 11 | |||
| 12 | description: |+ | ||
| 13 | ARM cores often have a separate L2C210/L2C220/L2C310 (also known as PL210/ | ||
| 14 | PL220/PL310 and variants) based level 2 cache controller. All these various | ||
| 15 | implementations of the L2 cache controller have compatible programming | ||
| 16 | models (Note 1). Some of the properties that are just prefixed "cache-*" are | ||
| 17 | taken from section 3.7.3 of the Devicetree Specification which can be found | ||
| 18 | at: | ||
| 19 | https://www.devicetree.org/specifications/ | ||
| 20 | |||
| 21 | Note 1: The description in this document doesn't apply to integrated L2 | ||
| 22 | cache controllers as found in e.g. Cortex-A15/A7/A57/A53. These | ||
| 23 | integrated L2 controllers are assumed to be all preconfigured by | ||
| 24 | early secure boot code. Thus no need to deal with their configuration | ||
| 25 | in the kernel at all. | ||
| 26 | |||
| 27 | allOf: | ||
| 28 | - $ref: /schemas/cache-controller.yaml# | ||
| 29 | |||
| 30 | properties: | ||
| 31 | compatible: | ||
| 32 | enum: | ||
| 33 | - arm,pl310-cache | ||
| 34 | - arm,l220-cache | ||
| 35 | - arm,l210-cache | ||
| 36 | # DEPRECATED by "brcm,bcm11351-a2-pl310-cache" | ||
| 37 | - bcm,bcm11351-a2-pl310-cache | ||
| 38 | # For Broadcom bcm11351 chipset where an | ||
| 39 | # offset needs to be added to the address before passing down to the L2 | ||
| 40 | # cache controller | ||
| 41 | - brcm,bcm11351-a2-pl310-cache | ||
| 42 | # Marvell Controller designed to be | ||
| 43 | # compatible with the ARM one, with system cache mode (meaning | ||
| 44 | # maintenance operations on L1 are broadcasted to the L2 and L2 | ||
| 45 | # performs the same operation). | ||
| 46 | - marvell,aurora-system-cache | ||
| 47 | # Marvell Controller designed to be | ||
| 48 | # compatible with the ARM one with outer cache mode. | ||
| 49 | - marvell,aurora-outer-cache | ||
| 50 | # Marvell Tauros3 cache controller, compatible | ||
| 51 | # with arm,pl310-cache controller. | ||
| 52 | - marvell,tauros3-cache | ||
| 53 | |||
| 54 | cache-level: | ||
| 55 | const: 2 | ||
| 56 | |||
| 57 | cache-unified: true | ||
| 58 | cache-size: true | ||
| 59 | cache-sets: true | ||
| 60 | cache-block-size: true | ||
| 61 | cache-line-size: true | ||
| 62 | |||
| 63 | reg: | ||
| 64 | maxItems: 1 | ||
| 65 | |||
| 66 | arm,data-latency: | ||
| 67 | description: Cycles of latency for Data RAM accesses. Specifies 3 cells of | ||
| 68 | read, write and setup latencies. Minimum valid values are 1. Controllers | ||
| 69 | without setup latency control should use a value of 0. | ||
| 70 | allOf: | ||
| 71 | - $ref: /schemas/types.yaml#/definitions/uint32-array | ||
| 72 | - minItems: 2 | ||
| 73 | maxItems: 3 | ||
| 74 | items: | ||
| 75 | minimum: 0 | ||
| 76 | maximum: 8 | ||
| 77 | |||
| 78 | arm,tag-latency: | ||
| 79 | description: Cycles of latency for Tag RAM accesses. Specifies 3 cells of | ||
| 80 | read, write and setup latencies. Controllers without setup latency control | ||
| 81 | should use 0. Controllers without separate read and write Tag RAM latency | ||
| 82 | values should only use the first cell. | ||
| 83 | allOf: | ||
| 84 | - $ref: /schemas/types.yaml#/definitions/uint32-array | ||
| 85 | - minItems: 1 | ||
| 86 | maxItems: 3 | ||
| 87 | items: | ||
| 88 | minimum: 0 | ||
| 89 | maximum: 8 | ||
| 90 | |||
| 91 | arm,dirty-latency: | ||
| 92 | description: Cycles of latency for Dirty RAMs. This is a single cell. | ||
| 93 | allOf: | ||
| 94 | - $ref: /schemas/types.yaml#/definitions/uint32 | ||
| 95 | - minimum: 1 | ||
| 96 | maximum: 8 | ||
| 97 | |||
| 98 | arm,filter-ranges: | ||
| 99 | description: <start length> Starting address and length of window to | ||
| 100 | filter. Addresses in the filter window are directed to the M1 port. Other | ||
| 101 | addresses will go to the M0 port. | ||
| 102 | allOf: | ||
| 103 | - $ref: /schemas/types.yaml#/definitions/uint32-array | ||
| 104 | - items: | ||
| 105 | minItems: 2 | ||
| 106 | maxItems: 2 | ||
| 107 | |||
| 108 | arm,io-coherent: | ||
| 109 | description: indicates that the system is operating in an hardware | ||
| 110 | I/O coherent mode. Valid only when the arm,pl310-cache compatible | ||
| 111 | string is used. | ||
| 112 | type: boolean | ||
| 113 | |||
| 114 | interrupts: | ||
| 115 | # Either a single combined interrupt or up to 9 individual interrupts | ||
| 116 | minItems: 1 | ||
| 117 | maxItems: 9 | ||
| 118 | |||
| 119 | cache-id-part: | ||
| 120 | description: cache id part number to be used if it is not present | ||
| 121 | on hardware | ||
| 122 | $ref: /schemas/types.yaml#/definitions/uint32 | ||
| 123 | |||
| 124 | wt-override: | ||
| 125 | description: If present then L2 is forced to Write through mode | ||
| 126 | type: boolean | ||
| 127 | |||
| 128 | arm,double-linefill: | ||
| 129 | description: Override double linefill enable setting. Enable if | ||
| 130 | non-zero, disable if zero. | ||
| 131 | allOf: | ||
| 132 | - $ref: /schemas/types.yaml#/definitions/uint32 | ||
| 133 | - enum: [ 0, 1 ] | ||
| 134 | |||
| 135 | arm,double-linefill-incr: | ||
| 136 | description: Override double linefill on INCR read. Enable | ||
| 137 | if non-zero, disable if zero. | ||
| 138 | allOf: | ||
| 139 | - $ref: /schemas/types.yaml#/definitions/uint32 | ||
| 140 | - enum: [ 0, 1 ] | ||
| 141 | |||
| 142 | arm,double-linefill-wrap: | ||
| 143 | description: Override double linefill on WRAP read. Enable | ||
| 144 | if non-zero, disable if zero. | ||
| 145 | allOf: | ||
| 146 | - $ref: /schemas/types.yaml#/definitions/uint32 | ||
| 147 | - enum: [ 0, 1 ] | ||
| 148 | |||
| 149 | arm,prefetch-drop: | ||
| 150 | description: Override prefetch drop enable setting. Enable if non-zero, | ||
| 151 | disable if zero. | ||
| 152 | allOf: | ||
| 153 | - $ref: /schemas/types.yaml#/definitions/uint32 | ||
| 154 | - enum: [ 0, 1 ] | ||
| 155 | |||
| 156 | arm,prefetch-offset: | ||
| 157 | description: Override prefetch offset value. | ||
| 158 | allOf: | ||
| 159 | - $ref: /schemas/types.yaml#/definitions/uint32 | ||
| 160 | - enum: [ 0, 1, 2, 3, 4, 5, 6, 7, 15, 23, 31 ] | ||
| 161 | |||
| 162 | arm,shared-override: | ||
| 163 | description: The default behavior of the L220 or PL310 cache | ||
| 164 | controllers with respect to the shareable attribute is to transform "normal | ||
| 165 | memory non-cacheable transactions" into "cacheable no allocate" (for reads) | ||
| 166 | or "write through no write allocate" (for writes). | ||
| 167 | On systems where this may cause DMA buffer corruption, this property must | ||
| 168 | be specified to indicate that such transforms are precluded. | ||
| 169 | type: boolean | ||
| 170 | |||
| 171 | arm,parity-enable: | ||
| 172 | description: enable parity checking on the L2 cache (L220 or PL310). | ||
| 173 | type: boolean | ||
| 174 | |||
| 175 | arm,parity-disable: | ||
| 176 | description: disable parity checking on the L2 cache (L220 or PL310). | ||
| 177 | type: boolean | ||
| 178 | |||
| 179 | arm,outer-sync-disable: | ||
| 180 | description: disable the outer sync operation on the L2 cache. | ||
| 181 | Some core tiles, especially ARM PB11MPCore have a faulty L220 cache that | ||
| 182 | will randomly hang unless outer sync operations are disabled. | ||
| 183 | type: boolean | ||
| 184 | |||
| 185 | prefetch-data: | ||
| 186 | description: | | ||
| 187 | Data prefetch. Value: <0> (forcibly disable), <1> | ||
| 188 | (forcibly enable), property absent (retain settings set by firmware) | ||
| 189 | allOf: | ||
| 190 | - $ref: /schemas/types.yaml#/definitions/uint32 | ||
| 191 | - enum: [ 0, 1 ] | ||
| 192 | |||
| 193 | prefetch-instr: | ||
| 194 | description: | | ||
| 195 | Instruction prefetch. Value: <0> (forcibly disable), | ||
| 196 | <1> (forcibly enable), property absent (retain settings set by | ||
| 197 | firmware) | ||
| 198 | allOf: | ||
| 199 | - $ref: /schemas/types.yaml#/definitions/uint32 | ||
| 200 | - enum: [ 0, 1 ] | ||
| 201 | |||
| 202 | arm,dynamic-clock-gating: | ||
| 203 | description: | | ||
| 204 | L2 dynamic clock gating. Value: <0> (forcibly | ||
| 205 | disable), <1> (forcibly enable), property absent (OS specific behavior, | ||
| 206 | preferably retain firmware settings) | ||
| 207 | allOf: | ||
| 208 | - $ref: /schemas/types.yaml#/definitions/uint32 | ||
| 209 | - enum: [ 0, 1 ] | ||
| 210 | |||
| 211 | arm,standby-mode: | ||
| 212 | description: L2 standby mode enable. Value <0> (forcibly disable), | ||
| 213 | <1> (forcibly enable), property absent (OS specific behavior, | ||
| 214 | preferably retain firmware settings) | ||
| 215 | allOf: | ||
| 216 | - $ref: /schemas/types.yaml#/definitions/uint32 | ||
| 217 | - enum: [ 0, 1 ] | ||
| 218 | |||
| 219 | arm,early-bresp-disable: | ||
| 220 | description: Disable the CA9 optimization Early BRESP (PL310) | ||
| 221 | type: boolean | ||
| 222 | |||
| 223 | arm,full-line-zero-disable: | ||
| 224 | description: Disable the CA9 optimization Full line of zero | ||
| 225 | write (PL310) | ||
| 226 | type: boolean | ||
| 227 | |||
| 228 | required: | ||
| 229 | - compatible | ||
| 230 | - cache-unified | ||
| 231 | - reg | ||
| 232 | |||
| 233 | additionalProperties: false | ||
| 234 | |||
| 235 | examples: | ||
| 236 | - | | ||
| 237 | cache-controller@fff12000 { | ||
| 238 | compatible = "arm,pl310-cache"; | ||
| 239 | reg = <0xfff12000 0x1000>; | ||
| 240 | arm,data-latency = <1 1 1>; | ||
| 241 | arm,tag-latency = <2 2 2>; | ||
| 242 | arm,filter-ranges = <0x80000000 0x8000000>; | ||
| 243 | cache-unified; | ||
| 244 | cache-level = <2>; | ||
| 245 | interrupts = <45>; | ||
| 246 | }; | ||
| 247 | |||
| 248 | ... | ||
