Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2016 Socionext Inc. |
| 4 | * Author: Masahiro Yamada <yamada.masahiro@socionext.com> |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <common.h> |
Simon Glass | 11c89f3 | 2017-05-17 17:18:03 -0600 | [diff] [blame] | 8 | #include <dm.h> |
Simon Glass | 9bc1564 | 2020-02-03 07:36:16 -0700 | [diff] [blame] | 9 | #include <malloc.h> |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 10 | #include <reset-uclass.h> |
Simon Glass | 9bc1564 | 2020-02-03 07:36:16 -0700 | [diff] [blame] | 11 | #include <dm/device_compat.h> |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 12 | #include <linux/bitops.h> |
| 13 | #include <linux/io.h> |
| 14 | #include <linux/sizes.h> |
| 15 | |
| 16 | struct uniphier_reset_data { |
| 17 | unsigned int id; |
| 18 | unsigned int reg; |
| 19 | unsigned int bit; |
| 20 | unsigned int flags; |
| 21 | #define UNIPHIER_RESET_ACTIVE_LOW BIT(0) |
| 22 | }; |
| 23 | |
| 24 | #define UNIPHIER_RESET_ID_END (unsigned int)(-1) |
| 25 | |
| 26 | #define UNIPHIER_RESET_END \ |
| 27 | { .id = UNIPHIER_RESET_ID_END } |
| 28 | |
| 29 | #define UNIPHIER_RESET(_id, _reg, _bit) \ |
| 30 | { \ |
| 31 | .id = (_id), \ |
| 32 | .reg = (_reg), \ |
| 33 | .bit = (_bit), \ |
| 34 | } |
| 35 | |
| 36 | #define UNIPHIER_RESETX(_id, _reg, _bit) \ |
| 37 | { \ |
| 38 | .id = (_id), \ |
| 39 | .reg = (_reg), \ |
| 40 | .bit = (_bit), \ |
| 41 | .flags = UNIPHIER_RESET_ACTIVE_LOW, \ |
| 42 | } |
| 43 | |
| 44 | /* System reset data */ |
Masahiro Yamada | 5e05c4d | 2017-06-22 16:42:04 +0900 | [diff] [blame] | 45 | static const struct uniphier_reset_data uniphier_pro4_sys_reset_data[] = { |
Masahiro Yamada | 0eb2cec | 2017-08-13 09:01:16 +0900 | [diff] [blame] | 46 | UNIPHIER_RESETX(2, 0x2000, 2), /* NAND */ |
Kunihiko Hayashi | 6cce837 | 2018-04-18 10:06:07 +0900 | [diff] [blame] | 47 | UNIPHIER_RESETX(6, 0x2000, 12), /* ETHER */ |
Masahiro Yamada | 0eb2cec | 2017-08-13 09:01:16 +0900 | [diff] [blame] | 48 | UNIPHIER_RESETX(8, 0x2000, 10), /* STDMAC */ |
| 49 | UNIPHIER_RESETX(12, 0x2000, 6), /* GIO */ |
| 50 | UNIPHIER_RESETX(14, 0x2000, 17), /* USB30 */ |
| 51 | UNIPHIER_RESETX(15, 0x2004, 17), /* USB31 */ |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 52 | UNIPHIER_RESET_END, |
| 53 | }; |
| 54 | |
Masahiro Yamada | 5e05c4d | 2017-06-22 16:42:04 +0900 | [diff] [blame] | 55 | static const struct uniphier_reset_data uniphier_pxs2_sys_reset_data[] = { |
Masahiro Yamada | 0eb2cec | 2017-08-13 09:01:16 +0900 | [diff] [blame] | 56 | UNIPHIER_RESETX(2, 0x2000, 2), /* NAND */ |
Kunihiko Hayashi | 6cce837 | 2018-04-18 10:06:07 +0900 | [diff] [blame] | 57 | UNIPHIER_RESETX(6, 0x2000, 12), /* ETHER */ |
Masahiro Yamada | 0eb2cec | 2017-08-13 09:01:16 +0900 | [diff] [blame] | 58 | UNIPHIER_RESETX(8, 0x2000, 10), /* STDMAC */ |
| 59 | UNIPHIER_RESETX(14, 0x2000, 17), /* USB30 */ |
| 60 | UNIPHIER_RESETX(15, 0x2004, 17), /* USB31 */ |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 61 | UNIPHIER_RESETX(16, 0x2014, 4), /* USB30-PHY0 */ |
| 62 | UNIPHIER_RESETX(17, 0x2014, 0), /* USB30-PHY1 */ |
| 63 | UNIPHIER_RESETX(18, 0x2014, 2), /* USB30-PHY2 */ |
| 64 | UNIPHIER_RESETX(20, 0x2014, 5), /* USB31-PHY0 */ |
| 65 | UNIPHIER_RESETX(21, 0x2014, 1), /* USB31-PHY1 */ |
| 66 | UNIPHIER_RESETX(28, 0x2014, 12), /* SATA */ |
| 67 | UNIPHIER_RESET(29, 0x2014, 8), /* SATA-PHY (active high) */ |
| 68 | UNIPHIER_RESET_END, |
| 69 | }; |
| 70 | |
Masahiro Yamada | 5e05c4d | 2017-06-22 16:42:04 +0900 | [diff] [blame] | 71 | static const struct uniphier_reset_data uniphier_ld20_sys_reset_data[] = { |
Masahiro Yamada | 0eb2cec | 2017-08-13 09:01:16 +0900 | [diff] [blame] | 72 | UNIPHIER_RESETX(2, 0x200c, 0), /* NAND */ |
| 73 | UNIPHIER_RESETX(4, 0x200c, 2), /* eMMC */ |
Kunihiko Hayashi | 6cce837 | 2018-04-18 10:06:07 +0900 | [diff] [blame] | 74 | UNIPHIER_RESETX(6, 0x200c, 6), /* ETHER */ |
Masahiro Yamada | 0eb2cec | 2017-08-13 09:01:16 +0900 | [diff] [blame] | 75 | UNIPHIER_RESETX(8, 0x200c, 8), /* STDMAC */ |
Masahiro Yamada | 096c466 | 2018-06-19 16:11:43 +0900 | [diff] [blame] | 76 | UNIPHIER_RESETX(14, 0x200c, 5), /* USB30 */ |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 77 | UNIPHIER_RESETX(16, 0x200c, 12), /* USB30-PHY0 */ |
| 78 | UNIPHIER_RESETX(17, 0x200c, 13), /* USB30-PHY1 */ |
| 79 | UNIPHIER_RESETX(18, 0x200c, 14), /* USB30-PHY2 */ |
| 80 | UNIPHIER_RESETX(19, 0x200c, 15), /* USB30-PHY3 */ |
| 81 | UNIPHIER_RESET_END, |
| 82 | }; |
| 83 | |
Masahiro Yamada | 8eb6a1c | 2017-08-29 12:20:51 +0900 | [diff] [blame] | 84 | static const struct uniphier_reset_data uniphier_pxs3_sys_reset_data[] = { |
| 85 | UNIPHIER_RESETX(2, 0x200c, 0), /* NAND */ |
| 86 | UNIPHIER_RESETX(4, 0x200c, 2), /* eMMC */ |
Kunihiko Hayashi | 6cce837 | 2018-04-18 10:06:07 +0900 | [diff] [blame] | 87 | UNIPHIER_RESETX(6, 0x200c, 9), /* ETHER0 */ |
| 88 | UNIPHIER_RESETX(7, 0x200c, 10), /* ETHER1 */ |
Masahiro Yamada | 8eb6a1c | 2017-08-29 12:20:51 +0900 | [diff] [blame] | 89 | UNIPHIER_RESETX(8, 0x200c, 12), /* STDMAC */ |
Masahiro Yamada | 096c466 | 2018-06-19 16:11:43 +0900 | [diff] [blame] | 90 | UNIPHIER_RESETX(12, 0x200c, 4), /* USB30 link */ |
| 91 | UNIPHIER_RESETX(13, 0x200c, 5), /* USB31 link */ |
| 92 | UNIPHIER_RESETX(16, 0x200c, 16), /* USB30-PHY0 */ |
| 93 | UNIPHIER_RESETX(17, 0x200c, 18), /* USB30-PHY1 */ |
| 94 | UNIPHIER_RESETX(18, 0x200c, 20), /* USB30-PHY2 */ |
| 95 | UNIPHIER_RESETX(20, 0x200c, 17), /* USB31-PHY0 */ |
| 96 | UNIPHIER_RESETX(21, 0x200c, 19), /* USB31-PHY1 */ |
Masahiro Yamada | 8eb6a1c | 2017-08-29 12:20:51 +0900 | [diff] [blame] | 97 | UNIPHIER_RESET_END, |
| 98 | }; |
| 99 | |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 100 | /* Media I/O reset data */ |
| 101 | #define UNIPHIER_MIO_RESET_SD(id, ch) \ |
| 102 | UNIPHIER_RESETX((id), 0x110 + 0x200 * (ch), 0) |
| 103 | |
| 104 | #define UNIPHIER_MIO_RESET_SD_BRIDGE(id, ch) \ |
| 105 | UNIPHIER_RESETX((id), 0x110 + 0x200 * (ch), 26) |
| 106 | |
| 107 | #define UNIPHIER_MIO_RESET_EMMC_HW_RESET(id, ch) \ |
| 108 | UNIPHIER_RESETX((id), 0x80 + 0x200 * (ch), 0) |
| 109 | |
| 110 | #define UNIPHIER_MIO_RESET_USB2(id, ch) \ |
| 111 | UNIPHIER_RESETX((id), 0x114 + 0x200 * (ch), 0) |
| 112 | |
| 113 | #define UNIPHIER_MIO_RESET_USB2_BRIDGE(id, ch) \ |
| 114 | UNIPHIER_RESETX((id), 0x110 + 0x200 * (ch), 24) |
| 115 | |
| 116 | #define UNIPHIER_MIO_RESET_DMAC(id) \ |
| 117 | UNIPHIER_RESETX((id), 0x110, 17) |
| 118 | |
Masahiro Yamada | 5e05c4d | 2017-06-22 16:42:04 +0900 | [diff] [blame] | 119 | static const struct uniphier_reset_data uniphier_mio_reset_data[] = { |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 120 | UNIPHIER_MIO_RESET_SD(0, 0), |
| 121 | UNIPHIER_MIO_RESET_SD(1, 1), |
| 122 | UNIPHIER_MIO_RESET_SD(2, 2), |
| 123 | UNIPHIER_MIO_RESET_SD_BRIDGE(3, 0), |
| 124 | UNIPHIER_MIO_RESET_SD_BRIDGE(4, 1), |
| 125 | UNIPHIER_MIO_RESET_SD_BRIDGE(5, 2), |
| 126 | UNIPHIER_MIO_RESET_EMMC_HW_RESET(6, 1), |
| 127 | UNIPHIER_MIO_RESET_DMAC(7), |
| 128 | UNIPHIER_MIO_RESET_USB2(8, 0), |
| 129 | UNIPHIER_MIO_RESET_USB2(9, 1), |
| 130 | UNIPHIER_MIO_RESET_USB2(10, 2), |
| 131 | UNIPHIER_MIO_RESET_USB2(11, 3), |
| 132 | UNIPHIER_MIO_RESET_USB2_BRIDGE(12, 0), |
| 133 | UNIPHIER_MIO_RESET_USB2_BRIDGE(13, 1), |
| 134 | UNIPHIER_MIO_RESET_USB2_BRIDGE(14, 2), |
| 135 | UNIPHIER_MIO_RESET_USB2_BRIDGE(15, 3), |
| 136 | UNIPHIER_RESET_END, |
| 137 | }; |
| 138 | |
| 139 | /* Peripheral reset data */ |
| 140 | #define UNIPHIER_PERI_RESET_UART(id, ch) \ |
| 141 | UNIPHIER_RESETX((id), 0x114, 19 + (ch)) |
| 142 | |
| 143 | #define UNIPHIER_PERI_RESET_I2C(id, ch) \ |
| 144 | UNIPHIER_RESETX((id), 0x114, 5 + (ch)) |
| 145 | |
| 146 | #define UNIPHIER_PERI_RESET_FI2C(id, ch) \ |
| 147 | UNIPHIER_RESETX((id), 0x114, 24 + (ch)) |
| 148 | |
Masahiro Yamada | 5e05c4d | 2017-06-22 16:42:04 +0900 | [diff] [blame] | 149 | static const struct uniphier_reset_data uniphier_ld4_peri_reset_data[] = { |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 150 | UNIPHIER_PERI_RESET_UART(0, 0), |
| 151 | UNIPHIER_PERI_RESET_UART(1, 1), |
| 152 | UNIPHIER_PERI_RESET_UART(2, 2), |
| 153 | UNIPHIER_PERI_RESET_UART(3, 3), |
| 154 | UNIPHIER_PERI_RESET_I2C(4, 0), |
| 155 | UNIPHIER_PERI_RESET_I2C(5, 1), |
| 156 | UNIPHIER_PERI_RESET_I2C(6, 2), |
| 157 | UNIPHIER_PERI_RESET_I2C(7, 3), |
| 158 | UNIPHIER_PERI_RESET_I2C(8, 4), |
| 159 | UNIPHIER_RESET_END, |
| 160 | }; |
| 161 | |
Masahiro Yamada | 5e05c4d | 2017-06-22 16:42:04 +0900 | [diff] [blame] | 162 | static const struct uniphier_reset_data uniphier_pro4_peri_reset_data[] = { |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 163 | UNIPHIER_PERI_RESET_UART(0, 0), |
| 164 | UNIPHIER_PERI_RESET_UART(1, 1), |
| 165 | UNIPHIER_PERI_RESET_UART(2, 2), |
| 166 | UNIPHIER_PERI_RESET_UART(3, 3), |
| 167 | UNIPHIER_PERI_RESET_FI2C(4, 0), |
| 168 | UNIPHIER_PERI_RESET_FI2C(5, 1), |
| 169 | UNIPHIER_PERI_RESET_FI2C(6, 2), |
| 170 | UNIPHIER_PERI_RESET_FI2C(7, 3), |
| 171 | UNIPHIER_PERI_RESET_FI2C(8, 4), |
| 172 | UNIPHIER_PERI_RESET_FI2C(9, 5), |
| 173 | UNIPHIER_PERI_RESET_FI2C(10, 6), |
| 174 | UNIPHIER_RESET_END, |
| 175 | }; |
| 176 | |
| 177 | /* core implementaton */ |
| 178 | struct uniphier_reset_priv { |
| 179 | void __iomem *base; |
| 180 | const struct uniphier_reset_data *data; |
| 181 | }; |
| 182 | |
| 183 | static int uniphier_reset_request(struct reset_ctl *reset_ctl) |
| 184 | { |
| 185 | return 0; |
| 186 | } |
| 187 | |
| 188 | static int uniphier_reset_free(struct reset_ctl *reset_ctl) |
| 189 | { |
| 190 | return 0; |
| 191 | } |
| 192 | |
| 193 | static int uniphier_reset_update(struct reset_ctl *reset_ctl, int assert) |
| 194 | { |
| 195 | struct uniphier_reset_priv *priv = dev_get_priv(reset_ctl->dev); |
| 196 | unsigned long id = reset_ctl->id; |
| 197 | const struct uniphier_reset_data *p; |
| 198 | |
| 199 | for (p = priv->data; p->id != UNIPHIER_RESET_ID_END; p++) { |
| 200 | u32 mask, val; |
| 201 | |
| 202 | if (p->id != id) |
| 203 | continue; |
| 204 | |
| 205 | val = readl(priv->base + p->reg); |
| 206 | |
| 207 | if (p->flags & UNIPHIER_RESET_ACTIVE_LOW) |
| 208 | assert = !assert; |
| 209 | |
| 210 | mask = BIT(p->bit); |
| 211 | |
| 212 | if (assert) |
| 213 | val |= mask; |
| 214 | else |
| 215 | val &= ~mask; |
| 216 | |
| 217 | writel(val, priv->base + p->reg); |
| 218 | |
| 219 | return 0; |
| 220 | } |
| 221 | |
Masahiro Yamada | 63f42e3 | 2017-10-13 19:22:02 +0900 | [diff] [blame] | 222 | dev_err(reset_ctl->dev, "reset_id=%lu was not handled\n", id); |
| 223 | |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 224 | return -EINVAL; |
| 225 | } |
| 226 | |
| 227 | static int uniphier_reset_assert(struct reset_ctl *reset_ctl) |
| 228 | { |
| 229 | return uniphier_reset_update(reset_ctl, 1); |
| 230 | } |
| 231 | |
| 232 | static int uniphier_reset_deassert(struct reset_ctl *reset_ctl) |
| 233 | { |
| 234 | return uniphier_reset_update(reset_ctl, 0); |
| 235 | } |
| 236 | |
| 237 | static const struct reset_ops uniphier_reset_ops = { |
| 238 | .request = uniphier_reset_request, |
Simon Glass | 1928cd4 | 2020-02-03 07:35:52 -0700 | [diff] [blame] | 239 | .rfree = uniphier_reset_free, |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 240 | .rst_assert = uniphier_reset_assert, |
| 241 | .rst_deassert = uniphier_reset_deassert, |
| 242 | }; |
| 243 | |
| 244 | static int uniphier_reset_probe(struct udevice *dev) |
| 245 | { |
| 246 | struct uniphier_reset_priv *priv = dev_get_priv(dev); |
| 247 | fdt_addr_t addr; |
| 248 | |
Simon Glass | ba1dea4 | 2017-05-17 17:18:05 -0600 | [diff] [blame] | 249 | addr = devfdt_get_addr(dev->parent); |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 250 | if (addr == FDT_ADDR_T_NONE) |
| 251 | return -EINVAL; |
| 252 | |
| 253 | priv->base = devm_ioremap(dev, addr, SZ_4K); |
| 254 | if (!priv->base) |
| 255 | return -ENOMEM; |
| 256 | |
| 257 | priv->data = (void *)dev_get_driver_data(dev); |
| 258 | |
| 259 | return 0; |
| 260 | } |
| 261 | |
| 262 | static const struct udevice_id uniphier_reset_match[] = { |
| 263 | /* System reset */ |
| 264 | { |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 265 | .compatible = "socionext,uniphier-ld4-reset", |
Masahiro Yamada | 0eb2cec | 2017-08-13 09:01:16 +0900 | [diff] [blame] | 266 | .data = (ulong)uniphier_pro4_sys_reset_data, |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 267 | }, |
| 268 | { |
| 269 | .compatible = "socionext,uniphier-pro4-reset", |
| 270 | .data = (ulong)uniphier_pro4_sys_reset_data, |
| 271 | }, |
| 272 | { |
| 273 | .compatible = "socionext,uniphier-sld8-reset", |
Masahiro Yamada | 0eb2cec | 2017-08-13 09:01:16 +0900 | [diff] [blame] | 274 | .data = (ulong)uniphier_pro4_sys_reset_data, |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 275 | }, |
| 276 | { |
| 277 | .compatible = "socionext,uniphier-pro5-reset", |
Masahiro Yamada | 0eb2cec | 2017-08-13 09:01:16 +0900 | [diff] [blame] | 278 | .data = (ulong)uniphier_pro4_sys_reset_data, |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 279 | }, |
| 280 | { |
| 281 | .compatible = "socionext,uniphier-pxs2-reset", |
| 282 | .data = (ulong)uniphier_pxs2_sys_reset_data, |
| 283 | }, |
| 284 | { |
| 285 | .compatible = "socionext,uniphier-ld11-reset", |
Masahiro Yamada | 0eb2cec | 2017-08-13 09:01:16 +0900 | [diff] [blame] | 286 | .data = (ulong)uniphier_ld20_sys_reset_data, |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 287 | }, |
| 288 | { |
| 289 | .compatible = "socionext,uniphier-ld20-reset", |
| 290 | .data = (ulong)uniphier_ld20_sys_reset_data, |
| 291 | }, |
Masahiro Yamada | 8eb6a1c | 2017-08-29 12:20:51 +0900 | [diff] [blame] | 292 | { |
| 293 | .compatible = "socionext,uniphier-pxs3-reset", |
| 294 | .data = (ulong)uniphier_pxs3_sys_reset_data, |
| 295 | }, |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 296 | /* Media I/O reset */ |
| 297 | { |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 298 | .compatible = "socionext,uniphier-ld4-mio-reset", |
| 299 | .data = (ulong)uniphier_mio_reset_data, |
| 300 | }, |
| 301 | { |
| 302 | .compatible = "socionext,uniphier-pro4-mio-reset", |
| 303 | .data = (ulong)uniphier_mio_reset_data, |
| 304 | }, |
| 305 | { |
| 306 | .compatible = "socionext,uniphier-sld8-mio-reset", |
| 307 | .data = (ulong)uniphier_mio_reset_data, |
| 308 | }, |
| 309 | { |
| 310 | .compatible = "socionext,uniphier-pro5-mio-reset", |
| 311 | .data = (ulong)uniphier_mio_reset_data, |
| 312 | }, |
| 313 | { |
| 314 | .compatible = "socionext,uniphier-pxs2-mio-reset", |
| 315 | .data = (ulong)uniphier_mio_reset_data, |
| 316 | }, |
| 317 | { |
| 318 | .compatible = "socionext,uniphier-ld11-mio-reset", |
| 319 | .data = (ulong)uniphier_mio_reset_data, |
| 320 | }, |
| 321 | { |
Masahiro Yamada | 68199a2 | 2017-08-29 12:20:50 +0900 | [diff] [blame] | 322 | .compatible = "socionext,uniphier-ld11-sd-reset", |
| 323 | .data = (ulong)uniphier_mio_reset_data, |
| 324 | }, |
| 325 | { |
| 326 | .compatible = "socionext,uniphier-ld20-sd-reset", |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 327 | .data = (ulong)uniphier_mio_reset_data, |
| 328 | }, |
Masahiro Yamada | 8eb6a1c | 2017-08-29 12:20:51 +0900 | [diff] [blame] | 329 | { |
| 330 | .compatible = "socionext,uniphier-pxs3-sd-reset", |
| 331 | .data = (ulong)uniphier_mio_reset_data, |
| 332 | }, |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 333 | /* Peripheral reset */ |
| 334 | { |
| 335 | .compatible = "socionext,uniphier-ld4-peri-reset", |
| 336 | .data = (ulong)uniphier_ld4_peri_reset_data, |
| 337 | }, |
| 338 | { |
| 339 | .compatible = "socionext,uniphier-pro4-peri-reset", |
| 340 | .data = (ulong)uniphier_pro4_peri_reset_data, |
| 341 | }, |
| 342 | { |
| 343 | .compatible = "socionext,uniphier-sld8-peri-reset", |
| 344 | .data = (ulong)uniphier_ld4_peri_reset_data, |
| 345 | }, |
| 346 | { |
| 347 | .compatible = "socionext,uniphier-pro5-peri-reset", |
| 348 | .data = (ulong)uniphier_pro4_peri_reset_data, |
| 349 | }, |
| 350 | { |
| 351 | .compatible = "socionext,uniphier-pxs2-peri-reset", |
| 352 | .data = (ulong)uniphier_pro4_peri_reset_data, |
| 353 | }, |
| 354 | { |
| 355 | .compatible = "socionext,uniphier-ld11-peri-reset", |
| 356 | .data = (ulong)uniphier_pro4_peri_reset_data, |
| 357 | }, |
| 358 | { |
| 359 | .compatible = "socionext,uniphier-ld20-peri-reset", |
| 360 | .data = (ulong)uniphier_pro4_peri_reset_data, |
| 361 | }, |
Masahiro Yamada | 8eb6a1c | 2017-08-29 12:20:51 +0900 | [diff] [blame] | 362 | { |
| 363 | .compatible = "socionext,uniphier-pxs3-peri-reset", |
| 364 | .data = (ulong)uniphier_pro4_peri_reset_data, |
| 365 | }, |
Masahiro Yamada | 2aa4b5b | 2016-10-08 13:25:31 +0900 | [diff] [blame] | 366 | { /* sentinel */ } |
| 367 | }; |
| 368 | |
| 369 | U_BOOT_DRIVER(uniphier_reset) = { |
| 370 | .name = "uniphier-reset", |
| 371 | .id = UCLASS_RESET, |
| 372 | .of_match = uniphier_reset_match, |
| 373 | .probe = uniphier_reset_probe, |
| 374 | .priv_auto_alloc_size = sizeof(struct uniphier_reset_priv), |
| 375 | .ops = &uniphier_reset_ops, |
| 376 | }; |