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