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

powerpc: Add T4 LAC device tree binding & defs

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.

Signed-off-by: Joe Liccese <joe.liccese@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>

authored by

Joe Liccese and committed by
Scott Wood
8c43d2b0 1a527286

+510
+309
Documentation/devicetree/bindings/powerpc/fsl/interlaken-lac.txt
··· 1 + =============================================================================== 2 + Freescale Interlaken Look-Aside Controller Device Bindings 3 + Copyright 2012 Freescale Semiconductor Inc. 4 + 5 + CONTENTS 6 + - Interlaken Look-Aside Controller (LAC) Node 7 + - Example LAC Node 8 + - Interlaken Look-Aside Controller (LAC) Software Portal Node 9 + - Interlaken Look-Aside Controller (LAC) Software Portal Child Nodes 10 + - Example LAC SWP Node with Child Nodes 11 + 12 + ============================================================================== 13 + Interlaken Look-Aside Controller (LAC) Node 14 + 15 + DESCRIPTION 16 + 17 + The Interlaken is a narrow, high speed channelized chip-to-chip interface. To 18 + facilitate interoperability between a data path device and a look-aside 19 + co-processor, the Interlaken Look-Aside protocol is defined for short 20 + transaction-related transfers. Although based on the Interlaken protocol, 21 + Interlaken Look-Aside is not directly compatible with Interlaken and can be 22 + considered a different operation mode. 23 + 24 + The Interlaken LA controller connects internal platform to Interlaken serial 25 + interface. It accepts LA command through software portals, which are system 26 + memory mapped 4KB spaces. The LA commands are then translated into the 27 + Interlaken control words and data words, which are sent on TX side to TCAM 28 + through SerDes lanes. 29 + 30 + There are two 4KiB spaces defined within the LAC global register memory map. 31 + There is a full register set at 0x0000-0x0FFF (also known as the "hypervisor" 32 + version), and a subset at 0x1000-0x1FFF. The former is a superset of the 33 + latter, and includes certain registers that should not be accessible to 34 + partitioned software. Separate nodes are used for each region, with a phandle 35 + linking the hypervisor node to the normal operating node. 36 + 37 + PROPERTIES 38 + 39 + - compatible 40 + Usage: required 41 + Value type: <string> 42 + Definition: Must include "fsl,interlaken-lac". This represents only 43 + those LAC CCSR registers not protected in partitioned 44 + software. The version of the device is determined by the LAC 45 + IP Block Revision Register (IPBRR0) at offset 0x0BF8. 46 + 47 + Table of correspondences between IPBRR0 values and example 48 + chips: 49 + Value Device 50 + ----------- ------- 51 + 0x02000100 T4240 52 + 53 + The Hypervisor node has a different compatible. It must include 54 + "fsl,interlaken-lac-hv". This node represents the protected 55 + LAC register space and is required except inside a partition 56 + where access to the hypervisor node is to be denied. 57 + 58 + - fsl,non-hv-node 59 + Usage: required in "fsl,interlaken-lac-hv" 60 + Value type: <phandle> 61 + Definition: Points to the non-protected LAC CCSR mapped register space 62 + node. 63 + 64 + - reg 65 + Usage: required 66 + Value type: <prop-encoded-array> 67 + Definition: A standard property. The first resource represents the 68 + Interlaken LAC configuration registers. 69 + 70 + - interrupts: 71 + Usage: required in non-hv node only 72 + Value type: <prop-encoded-array> 73 + Definition: Interrupt mapping for Interlaken LAC error IRQ. 74 + 75 + EXAMPLE 76 + lac: lac@229000 { 77 + compatible = "fsl,interlaken-lac" 78 + reg = <0x229000 0x1000>; 79 + interrupts = <16 2 1 18>; 80 + }; 81 + 82 + lac-hv@228000 { 83 + compatible = "fsl,interlaken-lac-hv" 84 + reg = <0x228000 0x1000>; 85 + fsl,non-hv-node = <&lac>; 86 + }; 87 + 88 + =============================================================================== 89 + Interlaken Look-Aside Controller (LAC) Software Portal Container Node 90 + 91 + DESCRIPTION 92 + The Interlaken Look-Aside Controller (LAC) utilizes Software Portals to accept 93 + Interlaken Look-Aside (ILA) commands. The Interlaken LAC software portal 94 + memory map occupies 128KB of memory space. The software portal memory space is 95 + intended to be cache-enabled. WIMG for each software space is required to be 96 + 0010 if stashing is enabled; otherwise, WIMG can be 0000 or 0010. 97 + 98 + PROPERTIES 99 + 100 + - #address-cells 101 + Usage: required 102 + Value type: <u32> 103 + Definition: A standard property. Must have a value of 1. 104 + 105 + - #size-cells 106 + Usage: required 107 + Value type: <u32> 108 + Definition: A standard property. Must have a value of 1. 109 + 110 + - compatible 111 + Usage: required 112 + Value type: <string> 113 + Definition: Must include "fsl,interlaken-lac-portals" 114 + 115 + - ranges 116 + Usage: required 117 + Value type: <prop-encoded-array> 118 + Definition: A standard property. Specifies the address and length 119 + of the LAC portal memory space. 120 + 121 + =============================================================================== 122 + Interlaken Look-Aside Controller (LAC) Software Portals Child Nodes 123 + 124 + DESCRIPTION 125 + There are up to 24 available software portals with each software portal 126 + requiring 4KB of consecutive memory within the software portal memory mapped 127 + space. 128 + 129 + PROPERTIES 130 + 131 + - compatible 132 + Usage: required 133 + Value type: <string> 134 + Definition: Must include "fsl,interlaken-lac-portal-vX.Y" where X is 135 + the Major version (IP_MJ) found in the LAC IP Block Revision 136 + Register (IPBRR0), at offset 0x0BF8, and Y is the Minor version 137 + (IP_MN). 138 + 139 + Table of correspondences between version values and example chips: 140 + Value Device 141 + ------ ------- 142 + 1.0 T4240 143 + 144 + - reg 145 + Usage: required 146 + Value type: <prop-encoded-array> 147 + Definition: A standard property. The first resource represents the 148 + Interlaken LAC software portal registers. 149 + 150 + - fsl,liodn 151 + Value type: <u32> 152 + Definition: The logical I/O device number (LIODN) for this device. The 153 + LIODN is a number expressed by this device and used to perform 154 + look-ups in the IOMMU (PAMU) address table when performing 155 + DMAs. This property is automatically added by u-boot. 156 + 157 + =============================================================================== 158 + EXAMPLE 159 + 160 + lac-portals { 161 + #address-cells = <0x1>; 162 + #size-cells = <0x1>; 163 + compatible = "fsl,interlaken-lac-portals"; 164 + ranges = <0x0 0xf 0xf4400000 0x20000>; 165 + 166 + lportal0: lac-portal@0 { 167 + compatible = "fsl,interlaken-lac-portal-v1.0"; 168 + fsl,liodn = <0x204>; 169 + reg = <0x0 0x1000>; 170 + }; 171 + 172 + lportal1: lac-portal@1000 { 173 + compatible = "fsl,interlaken-lac-portal-v1.0"; 174 + fsl,liodn = <0x205>; 175 + reg = <0x1000 0x1000>; 176 + }; 177 + 178 + lportal2: lac-portal@2000 { 179 + compatible = "fsl,interlaken-lac-portal-v1.0"; 180 + fsl,liodn = <0x206>; 181 + reg = <0x2000 0x1000>; 182 + }; 183 + 184 + lportal3: lac-portal@3000 { 185 + compatible = "fsl,interlaken-lac-portal-v1.0"; 186 + fsl,liodn = <0x207>; 187 + reg = <0x3000 0x1000>; 188 + }; 189 + 190 + lportal4: lac-portal@4000 { 191 + compatible = "fsl,interlaken-lac-portal-v1.0"; 192 + fsl,liodn = <0x208>; 193 + reg = <0x4000 0x1000>; 194 + }; 195 + 196 + lportal5: lac-portal@5000 { 197 + compatible = "fsl,interlaken-lac-portal-v1.0"; 198 + fsl,liodn = <0x209>; 199 + reg = <0x5000 0x1000>; 200 + }; 201 + 202 + lportal6: lac-portal@6000 { 203 + compatible = "fsl,interlaken-lac-portal-v1.0"; 204 + fsl,liodn = <0x20A>; 205 + reg = <0x6000 0x1000>; 206 + }; 207 + 208 + lportal7: lac-portal@7000 { 209 + compatible = "fsl,interlaken-lac-portal-v1.0"; 210 + fsl,liodn = <0x20B>; 211 + reg = <0x7000 0x1000>; 212 + }; 213 + 214 + lportal8: lac-portal@8000 { 215 + compatible = "fsl,interlaken-lac-portal-v1.0"; 216 + fsl,liodn = <0x20C>; 217 + reg = <0x8000 0x1000>; 218 + }; 219 + 220 + lportal9: lac-portal@9000 { 221 + compatible = "fsl,interlaken-lac-portal-v1.0"; 222 + fsl,liodn = <0x20D>; 223 + reg = <0x9000 0x1000>; 224 + }; 225 + 226 + lportal10: lac-portal@A000 { 227 + compatible = "fsl,interlaken-lac-portal-v1.0"; 228 + fsl,liodn = <0x20E>; 229 + reg = <0xA000 0x1000>; 230 + }; 231 + 232 + lportal11: lac-portal@B000 { 233 + compatible = "fsl,interlaken-lac-portal-v1.0"; 234 + fsl,liodn = <0x20F>; 235 + reg = <0xB000 0x1000>; 236 + }; 237 + 238 + lportal12: lac-portal@C000 { 239 + compatible = "fsl,interlaken-lac-portal-v1.0"; 240 + fsl,liodn = <0x210>; 241 + reg = <0xC000 0x1000>; 242 + }; 243 + 244 + lportal13: lac-portal@D000 { 245 + compatible = "fsl,interlaken-lac-portal-v1.0"; 246 + fsl,liodn = <0x211>; 247 + reg = <0xD000 0x1000>; 248 + }; 249 + 250 + lportal14: lac-portal@E000 { 251 + compatible = "fsl,interlaken-lac-portal-v1.0"; 252 + fsl,liodn = <0x212>; 253 + reg = <0xE000 0x1000>; 254 + }; 255 + 256 + lportal15: lac-portal@F000 { 257 + compatible = "fsl,interlaken-lac-portal-v1.0"; 258 + fsl,liodn = <0x213>; 259 + reg = <0xF000 0x1000>; 260 + }; 261 + 262 + lportal16: lac-portal@10000 { 263 + compatible = "fsl,interlaken-lac-portal-v1.0"; 264 + fsl,liodn = <0x214>; 265 + reg = <0x10000 0x1000>; 266 + }; 267 + 268 + lportal17: lac-portal@11000 { 269 + compatible = "fsl,interlaken-lac-portal-v1.0"; 270 + fsl,liodn = <0x215>; 271 + reg = <0x11000 0x1000>; 272 + }; 273 + 274 + lportal8: lac-portal@1200 { 275 + compatible = "fsl,interlaken-lac-portal-v1.0"; 276 + fsl,liodn = <0x216>; 277 + reg = <0x12000 0x1000>; 278 + }; 279 + 280 + lportal19: lac-portal@13000 { 281 + compatible = "fsl,interlaken-lac-portal-v1.0"; 282 + fsl,liodn = <0x217>; 283 + reg = <0x13000 0x1000>; 284 + }; 285 + 286 + lportal20: lac-portal@14000 { 287 + compatible = "fsl,interlaken-lac-portal-v1.0"; 288 + fsl,liodn = <0x218>; 289 + reg = <0x14000 0x1000>; 290 + }; 291 + 292 + lportal21: lac-portal@15000 { 293 + compatible = "fsl,interlaken-lac-portal-v1.0"; 294 + fsl,liodn = <0x219>; 295 + reg = <0x15000 0x1000>; 296 + }; 297 + 298 + lportal22: lac-portal@16000 { 299 + compatible = "fsl,interlaken-lac-portal-v1.0"; 300 + fsl,liodn = <0x21A>; 301 + reg = <0x16000 0x1000>; 302 + }; 303 + 304 + lportal23: lac-portal@17000 { 305 + compatible = "fsl,interlaken-lac-portal-v1.0"; 306 + fsl,liodn = <0x21B>; 307 + reg = <0x17000 0x1000>; 308 + }; 309 + };
+156
arch/powerpc/boot/dts/fsl/interlaken-lac-portals.dtsi
··· 1 + /* T4240 Interlaken LAC Portal device tree stub with 24 portals. 2 + * 3 + * Copyright 2012 Freescale Semiconductor Inc. 4 + * 5 + * Redistribution and use in source and binary forms, with or without 6 + * modification, are permitted provided that the following conditions are met: 7 + * * Redistributions of source code must retain the above copyright 8 + * notice, this list of conditions and the following disclaimer. 9 + * * Redistributions in binary form must reproduce the above copyright 10 + * notice, this list of conditions and the following disclaimer in the 11 + * documentation and/or other materials provided with the distribution. 12 + * * Neither the name of Freescale Semiconductor nor the 13 + * names of its contributors may be used to endorse or promote products 14 + * derived from this software without specific prior written permission. 15 + * 16 + * 17 + * ALTERNATIVELY, this software may be distributed under the terms of the 18 + * GNU General Public License ("GPL") as published by the Free Software 19 + * Foundation, either version 2 of that License or (at your option) any 20 + * later version. 21 + * 22 + * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "AS IS" AND ANY 23 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 24 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 + * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY 26 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 27 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 29 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 31 + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 + */ 33 + 34 + #address-cells = <0x1>; 35 + #size-cells = <0x1>; 36 + compatible = "fsl,interlaken-lac-portals"; 37 + 38 + lportal0: lac-portal@0 { 39 + compatible = "fsl,interlaken-lac-portal-v1.0"; 40 + reg = <0x0 0x1000>; 41 + }; 42 + 43 + lportal1: lac-portal@1000 { 44 + compatible = "fsl,interlaken-lac-portal-v1.0"; 45 + reg = <0x1000 0x1000>; 46 + }; 47 + 48 + lportal2: lac-portal@2000 { 49 + compatible = "fsl,interlaken-lac-portal-v1.0"; 50 + reg = <0x2000 0x1000>; 51 + }; 52 + 53 + lportal3: lac-portal@3000 { 54 + compatible = "fsl,interlaken-lac-portal-v1.0"; 55 + reg = <0x3000 0x1000>; 56 + }; 57 + 58 + lportal4: lac-portal@4000 { 59 + compatible = "fsl,interlaken-lac-portal-v1.0"; 60 + reg = <0x4000 0x1000>; 61 + }; 62 + 63 + lportal5: lac-portal@5000 { 64 + compatible = "fsl,interlaken-lac-portal-v1.0"; 65 + reg = <0x5000 0x1000>; 66 + }; 67 + 68 + lportal6: lac-portal@6000 { 69 + compatible = "fsl,interlaken-lac-portal-v1.0"; 70 + reg = <0x6000 0x1000>; 71 + }; 72 + 73 + lportal7: lac-portal@7000 { 74 + compatible = "fsl,interlaken-lac-portal-v1.0"; 75 + reg = <0x7000 0x1000>; 76 + }; 77 + 78 + lportal8: lac-portal@8000 { 79 + compatible = "fsl,interlaken-lac-portal-v1.0"; 80 + reg = <0x8000 0x1000>; 81 + }; 82 + 83 + lportal9: lac-portal@9000 { 84 + compatible = "fsl,interlaken-lac-portal-v1.0"; 85 + reg = <0x9000 0x1000>; 86 + }; 87 + 88 + lportal10: lac-portal@A000 { 89 + compatible = "fsl,interlaken-lac-portal-v1.0"; 90 + reg = <0xA000 0x1000>; 91 + }; 92 + 93 + lportal11: lac-portal@B000 { 94 + compatible = "fsl,interlaken-lac-portal-v1.0"; 95 + reg = <0xB000 0x1000>; 96 + }; 97 + 98 + lportal12: lac-portal@C000 { 99 + compatible = "fsl,interlaken-lac-portal-v1.0"; 100 + reg = <0xC000 0x1000>; 101 + }; 102 + 103 + lportal13: lac-portal@D000 { 104 + compatible = "fsl,interlaken-lac-portal-v1.0"; 105 + reg = <0xD000 0x1000>; 106 + }; 107 + 108 + lportal14: lac-portal@E000 { 109 + compatible = "fsl,interlaken-lac-portal-v1.0"; 110 + reg = <0xE000 0x1000>; 111 + }; 112 + 113 + lportal15: lac-portal@F000 { 114 + compatible = "fsl,interlaken-lac-portal-v1.0"; 115 + reg = <0xF000 0x1000>; 116 + }; 117 + 118 + lportal16: lac-portal@10000 { 119 + compatible = "fsl,interlaken-lac-portal-v1.0"; 120 + reg = <0x10000 0x1000>; 121 + }; 122 + 123 + lportal17: lac-portal@11000 { 124 + compatible = "fsl,interlaken-lac-portal-v1.0"; 125 + reg = <0x11000 0x1000>; 126 + }; 127 + 128 + lportal18: lac-portal@1200 { 129 + compatible = "fsl,interlaken-lac-portal-v1.0"; 130 + reg = <0x12000 0x1000>; 131 + }; 132 + 133 + lportal19: lac-portal@13000 { 134 + compatible = "fsl,interlaken-lac-portal-v1.0"; 135 + reg = <0x13000 0x1000>; 136 + }; 137 + 138 + lportal20: lac-portal@14000 { 139 + compatible = "fsl,interlaken-lac-portal-v1.0"; 140 + reg = <0x14000 0x1000>; 141 + }; 142 + 143 + lportal21: lac-portal@15000 { 144 + compatible = "fsl,interlaken-lac-portal-v1.0"; 145 + reg = <0x15000 0x1000>; 146 + }; 147 + 148 + lportal22: lac-portal@16000 { 149 + compatible = "fsl,interlaken-lac-portal-v1.0"; 150 + reg = <0x16000 0x1000>; 151 + }; 152 + 153 + lportal23: lac-portal@17000 { 154 + compatible = "fsl,interlaken-lac-portal-v1.0"; 155 + reg = <0x17000 0x1000>; 156 + };
+45
arch/powerpc/boot/dts/fsl/interlaken-lac.dtsi
··· 1 + /* 2 + * T4 Interlaken Look-aside Controller (LAC) device tree stub 3 + * 4 + * Copyright 2012 Freescale Semiconductor Inc. 5 + * 6 + * Redistribution and use in source and binary forms, with or without 7 + * modification, are permitted provided that the following conditions are met: 8 + * * Redistributions of source code must retain the above copyright 9 + * notice, this list of conditions and the following disclaimer. 10 + * * Redistributions in binary form must reproduce the above copyright 11 + * notice, this list of conditions and the following disclaimer in the 12 + * documentation and/or other materials provided with the distribution. 13 + * * Neither the name of Freescale Semiconductor nor the 14 + * names of its contributors may be used to endorse or promote products 15 + * derived from this software without specific prior written permission. 16 + * 17 + * 18 + * ALTERNATIVELY, this software may be distributed under the terms of the 19 + * GNU General Public License ("GPL") as published by the Free Software 20 + * Foundation, either version 2 of that License or (at your option) any 21 + * later version. 22 + * 23 + * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "AS IS" AND ANY 24 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 25 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 + * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY 27 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 28 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 30 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 32 + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 + */ 34 + 35 + lac: lac@229000 { 36 + compatible = "fsl,interlaken-lac"; 37 + reg = <0x229000 0x1000>; 38 + interrupts = <16 2 1 18>; 39 + }; 40 + 41 + lac-hv@228000 { 42 + compatible = "fsl,interlaken-lac-hv"; 43 + reg = <0x228000 0x1000>; 44 + fsl,non-hv-node = <&lac>; 45 + };