|
| 1 | +dnl |
| 2 | +dnl PIB([addr], [index], [path-index]) |
| 3 | +dnl |
| 4 | +define(`PIB', |
| 5 | +` |
| 6 | + pib@$1 { |
| 7 | + #address-cells = <0x2>; |
| 8 | + #size-cells = <0x1>; |
| 9 | + reg = <0x0 0x$1 0x7>; |
| 10 | + compatible = "ibm,kernel-pib"; |
| 11 | + index = <0x$2>; |
| 12 | + device-path = "/dev/scom$3"; |
| 13 | + system-path = "/proc$2/pib"; |
| 14 | + }; |
| 15 | +')dnl |
| 16 | + |
| 17 | + |
| 18 | +dnl |
| 19 | +dnl PIB_ODY([index], [proc], [path-index], port) |
| 20 | +dnl |
| 21 | +define(`PIB_ODY', |
| 22 | +` |
| 23 | + pib_ody@$3$4 { |
| 24 | + #address-cells = <0x2>; |
| 25 | + #size-cells = <0x1>; |
| 26 | + reg = <0x0 0x$1 0x8000>; /*dummy to fix dts warning*/ |
| 27 | + compatible = "ibm,kernel-pib-ody"; |
| 28 | + index = <0x$1>; |
| 29 | + proc = <0x$2>; |
| 30 | + port = <$4>; |
| 31 | + device-path = "/dev/scom$3$4"; |
| 32 | + system-path = "/proc$2/ocmb$1"; |
| 33 | + }; |
| 34 | +')dnl |
| 35 | + |
| 36 | + |
| 37 | +dnl |
| 38 | +dnl SBEFIFO([index], [path-index]) |
| 39 | +dnl |
| 40 | +define(`SBEFIFO', |
| 41 | +` |
| 42 | + sbefifo@2400 { /* Bogus address */ |
| 43 | + reg = <0x0 0x2400 0x7>; |
| 44 | + compatible = "ibm,kernel-sbefifo"; |
| 45 | + index = <0x$1>; |
| 46 | + device-path = "/dev/sbefifo$2"; |
| 47 | + |
| 48 | + sbefifo-mem { |
| 49 | + compatible = "ibm,sbefifo-mem"; |
| 50 | + index = <0x$1>; |
| 51 | + system-path = "/mem$1"; |
| 52 | + }; |
| 53 | + |
| 54 | + sbefifo-pba { |
| 55 | + compatible = "ibm,sbefifo-mem-pba"; |
| 56 | + index = <0x$1>; |
| 57 | + system-path = "/mempba$1"; |
| 58 | + }; |
| 59 | + |
| 60 | + sbefifo-chipop { |
| 61 | + compatible = "ibm,sbefifo-chipop"; |
| 62 | + index = <0x$1>; |
| 63 | + }; |
| 64 | + }; |
| 65 | +')dnl |
| 66 | + |
| 67 | +dnl |
| 68 | +dnl FSI_PRE([addr], [index], [path-index]) |
| 69 | +dnl |
| 70 | +define(`FSI_PRE', |
| 71 | +` |
| 72 | + fsi@$1 { |
| 73 | + #address-cells = <0x2>; |
| 74 | + #size-cells = <0x1>; |
| 75 | + reg = <0x0 0x$1 0x8000>; |
| 76 | + compatible = "ibm,kernel-fsi"; |
| 77 | + device-path = "/fsi0/slave@00:00/raw"; |
| 78 | + index = <0x$2>; |
| 79 | + system-path = "/proc$2/fsi"; |
| 80 | + status = "mustexist"; |
| 81 | + |
| 82 | + PIB(1000, $2, $3) |
| 83 | + SBEFIFO($2, $3) |
| 84 | +')dnl |
| 85 | + |
| 86 | +dnl |
| 87 | +dnl FSI_POST() |
| 88 | +dnl |
| 89 | +define(`FSI_POST', |
| 90 | +` |
| 91 | + }; |
| 92 | +')dnl |
| 93 | + |
| 94 | +dnl |
| 95 | +dnl BMC_I2CBUS([index]) |
| 96 | +dnl |
| 97 | +define(`BMC_I2CBUS', |
| 98 | +` |
| 99 | + bmc-i2c-bus$1 { |
| 100 | + #address-cells = <0x1>; |
| 101 | + #size-cells = <0x0>; |
| 102 | + index = <$1>; |
| 103 | + compatible = "ibm,kernel-i2c-bus"; |
| 104 | + device-path = "/dev/i2c-$1"; |
| 105 | + system-path = "/bmc0/i2c-$1"; |
| 106 | + }; |
| 107 | +')dnl |
| 108 | + |
| 109 | + |
| 110 | +dnl |
| 111 | +dnl HMFSI([addr], [port], [index], [path-index]) |
| 112 | +dnl |
| 113 | +define(`HMFSI', |
| 114 | +` |
| 115 | + hmfsi@$1 { |
| 116 | + #address-cells = <0x2>; |
| 117 | + #size-cells = <0x1>; |
| 118 | + reg = <0x0 0x$1 0x8000>; |
| 119 | + compatible = "ibm,fsi-hmfsi"; |
| 120 | + port = <0x$2>; |
| 121 | + index = <0x$3>; |
| 122 | + system-path = "/proc$3/fsi"; |
| 123 | + |
| 124 | + PIB(1000, $3, $4) |
| 125 | + SBEFIFO($3, $4) |
| 126 | + }; |
| 127 | +')dnl |
| 128 | + |
| 129 | +//ody ocmb chips are defined in system device tree. The pdbg targets |
| 130 | +//that captures the device path to communicate with system ody ocmb |
| 131 | +//chips will be defined in backend device tree. |
| 132 | + |
| 133 | +//ody ocmb system device tree targets need to be mapped to backend |
| 134 | +//ody pib device tree targets for communication with the ody ocmb targets. |
| 135 | +//Mapping is done based on proc, ocmb chip index of the ody ocmb system target |
| 136 | +//with the proc, ocmb index and port number defined in the backend kernel device |
| 137 | +//tree |
| 138 | + |
| 139 | +//for get or put scom in kernel mode device path defined in PIBODY will be used |
| 140 | +//for cfam device-path specified in HMFSIODY will be used |
| 141 | +dnl |
| 142 | +dnl HMFSI_ODY([index], [proc], [path-index], [port]) |
| 143 | +dnl |
| 144 | +define(`HMFSI_ODY', |
| 145 | +` |
| 146 | + hmfsi-ody@$3$4 { |
| 147 | + #address-cells = <0x2>; |
| 148 | + #size-cells = <0x1>; |
| 149 | + compatible = "ibm,kernel-fsi-ody"; |
| 150 | + device-path = "/i2cr$3$4/slave@00:00/raw"; |
| 151 | + reg = <0x0 0x$1 0x8000>; /*dummy to fix dts warning*/ |
| 152 | + index = <0x$1>; |
| 153 | + proc = <0x$2>; |
| 154 | + port = <$4>; |
| 155 | + system-path = "/proc$2/ocmb$1/fsi"; |
| 156 | + |
| 157 | + PIB_ODY($1, $2, $3, $4) |
| 158 | + /*SBE_FIFO not required in kernel mode */ |
| 159 | + }; |
| 160 | +')dnl |
| 161 | + |
| 162 | +/dts-v1/; |
| 163 | + |
| 164 | +/ { |
| 165 | + #address-cells = <0x1>; |
| 166 | + #size-cells = <0x0>; |
| 167 | + |
| 168 | + BMC_I2CBUS(0) |
| 169 | + BMC_I2CBUS(1) |
| 170 | + BMC_I2CBUS(2) |
| 171 | + BMC_I2CBUS(3) |
| 172 | + BMC_I2CBUS(4) |
| 173 | + BMC_I2CBUS(5) |
| 174 | + BMC_I2CBUS(6) |
| 175 | + BMC_I2CBUS(7) |
| 176 | + BMC_I2CBUS(8) |
| 177 | + BMC_I2CBUS(9) |
| 178 | + BMC_I2CBUS(10) |
| 179 | + BMC_I2CBUS(11) |
| 180 | + BMC_I2CBUS(12) |
| 181 | + BMC_I2CBUS(13) |
| 182 | + BMC_I2CBUS(14) |
| 183 | + BMC_I2CBUS(15) |
| 184 | + |
| 185 | + FSI_PRE(0, 0, 1) |
| 186 | + |
| 187 | + HMFSI(100000, 1, 1, 2) |
| 188 | + HMFSI(180000, 2, 2, 3) |
| 189 | + HMFSI(200000, 3, 3, 4) |
| 190 | + HMFSI(280000, 4, 4, 5) |
| 191 | + HMFSI(300000, 5, 5, 6) |
| 192 | + HMFSI(380000, 6, 6, 7) |
| 193 | + HMFSI(400000, 7, 7, 8) |
| 194 | + |
| 195 | + FSI_POST() |
| 196 | + |
| 197 | + HMFSI_ODY(0, 0, 1, 00) |
| 198 | + HMFSI_ODY(1, 0, 1, 01) |
| 199 | + HMFSI_ODY(2, 0, 1, 10) |
| 200 | + HMFSI_ODY(3, 0, 1, 11) |
| 201 | + HMFSI_ODY(4, 0, 1, 12) |
| 202 | + HMFSI_ODY(5, 0, 1, 13) |
| 203 | + HMFSI_ODY(6, 0, 1, 14) |
| 204 | + HMFSI_ODY(7, 0, 1, 15) |
| 205 | + |
| 206 | + HMFSI_ODY(0, 1, 2, 02) |
| 207 | + HMFSI_ODY(1, 1, 2, 03) |
| 208 | + HMFSI_ODY(2, 1, 2, 10) |
| 209 | + HMFSI_ODY(3, 1, 2, 11) |
| 210 | + HMFSI_ODY(4, 1, 2, 14) |
| 211 | + HMFSI_ODY(5, 1, 2, 15) |
| 212 | + HMFSI_ODY(6, 1, 2, 16) |
| 213 | + HMFSI_ODY(7, 1, 2, 17) |
| 214 | + |
| 215 | + |
| 216 | + HMFSI_ODY(0, 2, 3, 00) |
| 217 | + HMFSI_ODY(1, 2, 3, 01) |
| 218 | + HMFSI_ODY(2, 2, 3, 10) |
| 219 | + HMFSI_ODY(3, 2, 3, 11) |
| 220 | + HMFSI_ODY(4, 2, 3, 12) |
| 221 | + HMFSI_ODY(5, 2, 3, 13) |
| 222 | + HMFSI_ODY(6, 2, 3, 14) |
| 223 | + HMFSI_ODY(7, 2, 3, 15) |
| 224 | + |
| 225 | + HMFSI_ODY(0, 3, 4, 02) |
| 226 | + HMFSI_ODY(1, 3, 4, 03) |
| 227 | + HMFSI_ODY(2, 3, 4, 10) |
| 228 | + HMFSI_ODY(3, 3, 4, 11) |
| 229 | + HMFSI_ODY(4, 3, 4, 14) |
| 230 | + HMFSI_ODY(5, 3, 4, 15) |
| 231 | + HMFSI_ODY(6, 3, 4, 16) |
| 232 | + HMFSI_ODY(7, 3, 4, 17) |
| 233 | + |
| 234 | + HMFSI_ODY(0, 4, 5, 00) |
| 235 | + HMFSI_ODY(1, 4, 5, 01) |
| 236 | + HMFSI_ODY(2, 4, 5, 10) |
| 237 | + HMFSI_ODY(3, 4, 5, 11) |
| 238 | + HMFSI_ODY(4, 4, 5, 12) |
| 239 | + HMFSI_ODY(5, 4, 5, 13) |
| 240 | + HMFSI_ODY(6, 4, 5, 14) |
| 241 | + HMFSI_ODY(7, 4, 5, 15) |
| 242 | + |
| 243 | + HMFSI_ODY(0, 5, 6, 02) |
| 244 | + HMFSI_ODY(1, 5, 6, 03) |
| 245 | + HMFSI_ODY(2, 5, 6, 10) |
| 246 | + HMFSI_ODY(3, 5, 6, 11) |
| 247 | + HMFSI_ODY(4, 5, 6, 14) |
| 248 | + HMFSI_ODY(5, 5, 6, 15) |
| 249 | + HMFSI_ODY(6, 5, 6, 16) |
| 250 | + HMFSI_ODY(7, 5, 6, 17) |
| 251 | + |
| 252 | + HMFSI_ODY(0, 6, 7, 00) |
| 253 | + HMFSI_ODY(1, 6, 7, 01) |
| 254 | + HMFSI_ODY(2, 6, 7, 10) |
| 255 | + HMFSI_ODY(3, 6, 7, 11) |
| 256 | + HMFSI_ODY(4, 6, 7, 12) |
| 257 | + HMFSI_ODY(5, 6, 7, 13) |
| 258 | + HMFSI_ODY(6, 6, 7, 14) |
| 259 | + HMFSI_ODY(7, 6, 7, 15) |
| 260 | + |
| 261 | + HMFSI_ODY(0, 7, 8, 02) |
| 262 | + HMFSI_ODY(1, 7, 8, 03) |
| 263 | + HMFSI_ODY(2, 7, 8, 10) |
| 264 | + HMFSI_ODY(3, 7, 8, 11) |
| 265 | + HMFSI_ODY(4, 7, 8, 14) |
| 266 | + HMFSI_ODY(5, 7, 8, 15) |
| 267 | + HMFSI_ODY(6, 7, 8, 16) |
| 268 | + HMFSI_ODY(7, 7, 8, 17) |
| 269 | +}; |
0 commit comments