14fb96c48SMasahiro Yamada /* 24fb96c48SMasahiro Yamada * Copyright (C) 2016 Socionext Inc. 34fb96c48SMasahiro Yamada * Author: Masahiro Yamada <yamada.masahiro@socionext.com> 44fb96c48SMasahiro Yamada * 54fb96c48SMasahiro Yamada * SPDX-License-Identifier: GPL-2.0+ 64fb96c48SMasahiro Yamada */ 74fb96c48SMasahiro Yamada 84fb96c48SMasahiro Yamada #include <common.h> 99d922450SSimon Glass #include <dm.h> 104fb96c48SMasahiro Yamada #include <reset-uclass.h> 114fb96c48SMasahiro Yamada #include <linux/bitops.h> 124fb96c48SMasahiro Yamada #include <linux/io.h> 134fb96c48SMasahiro Yamada #include <linux/sizes.h> 144fb96c48SMasahiro Yamada 154fb96c48SMasahiro Yamada struct uniphier_reset_data { 164fb96c48SMasahiro Yamada unsigned int id; 174fb96c48SMasahiro Yamada unsigned int reg; 184fb96c48SMasahiro Yamada unsigned int bit; 194fb96c48SMasahiro Yamada unsigned int flags; 204fb96c48SMasahiro Yamada #define UNIPHIER_RESET_ACTIVE_LOW BIT(0) 214fb96c48SMasahiro Yamada }; 224fb96c48SMasahiro Yamada 234fb96c48SMasahiro Yamada #define UNIPHIER_RESET_ID_END (unsigned int)(-1) 244fb96c48SMasahiro Yamada 254fb96c48SMasahiro Yamada #define UNIPHIER_RESET_END \ 264fb96c48SMasahiro Yamada { .id = UNIPHIER_RESET_ID_END } 274fb96c48SMasahiro Yamada 284fb96c48SMasahiro Yamada #define UNIPHIER_RESET(_id, _reg, _bit) \ 294fb96c48SMasahiro Yamada { \ 304fb96c48SMasahiro Yamada .id = (_id), \ 314fb96c48SMasahiro Yamada .reg = (_reg), \ 324fb96c48SMasahiro Yamada .bit = (_bit), \ 334fb96c48SMasahiro Yamada } 344fb96c48SMasahiro Yamada 354fb96c48SMasahiro Yamada #define UNIPHIER_RESETX(_id, _reg, _bit) \ 364fb96c48SMasahiro Yamada { \ 374fb96c48SMasahiro Yamada .id = (_id), \ 384fb96c48SMasahiro Yamada .reg = (_reg), \ 394fb96c48SMasahiro Yamada .bit = (_bit), \ 404fb96c48SMasahiro Yamada .flags = UNIPHIER_RESET_ACTIVE_LOW, \ 414fb96c48SMasahiro Yamada } 424fb96c48SMasahiro Yamada 434fb96c48SMasahiro Yamada /* System reset data */ 441d21e1b9SMasahiro Yamada static const struct uniphier_reset_data uniphier_pro4_sys_reset_data[] = { 456584b1eaSMasahiro Yamada UNIPHIER_RESETX(2, 0x2000, 2), /* NAND */ 466584b1eaSMasahiro Yamada UNIPHIER_RESETX(8, 0x2000, 10), /* STDMAC */ 476584b1eaSMasahiro Yamada UNIPHIER_RESETX(12, 0x2000, 6), /* GIO */ 486584b1eaSMasahiro Yamada UNIPHIER_RESETX(14, 0x2000, 17), /* USB30 */ 496584b1eaSMasahiro Yamada UNIPHIER_RESETX(15, 0x2004, 17), /* USB31 */ 504fb96c48SMasahiro Yamada UNIPHIER_RESET_END, 514fb96c48SMasahiro Yamada }; 524fb96c48SMasahiro Yamada 531d21e1b9SMasahiro Yamada static const struct uniphier_reset_data uniphier_pxs2_sys_reset_data[] = { 546584b1eaSMasahiro Yamada UNIPHIER_RESETX(2, 0x2000, 2), /* NAND */ 556584b1eaSMasahiro Yamada UNIPHIER_RESETX(8, 0x2000, 10), /* STDMAC */ 566584b1eaSMasahiro Yamada UNIPHIER_RESETX(14, 0x2000, 17), /* USB30 */ 576584b1eaSMasahiro Yamada UNIPHIER_RESETX(15, 0x2004, 17), /* USB31 */ 584fb96c48SMasahiro Yamada UNIPHIER_RESETX(16, 0x2014, 4), /* USB30-PHY0 */ 594fb96c48SMasahiro Yamada UNIPHIER_RESETX(17, 0x2014, 0), /* USB30-PHY1 */ 604fb96c48SMasahiro Yamada UNIPHIER_RESETX(18, 0x2014, 2), /* USB30-PHY2 */ 614fb96c48SMasahiro Yamada UNIPHIER_RESETX(20, 0x2014, 5), /* USB31-PHY0 */ 624fb96c48SMasahiro Yamada UNIPHIER_RESETX(21, 0x2014, 1), /* USB31-PHY1 */ 634fb96c48SMasahiro Yamada UNIPHIER_RESETX(28, 0x2014, 12), /* SATA */ 644fb96c48SMasahiro Yamada UNIPHIER_RESET(29, 0x2014, 8), /* SATA-PHY (active high) */ 654fb96c48SMasahiro Yamada UNIPHIER_RESET_END, 664fb96c48SMasahiro Yamada }; 674fb96c48SMasahiro Yamada 681d21e1b9SMasahiro Yamada static const struct uniphier_reset_data uniphier_ld20_sys_reset_data[] = { 696584b1eaSMasahiro Yamada UNIPHIER_RESETX(2, 0x200c, 0), /* NAND */ 706584b1eaSMasahiro Yamada UNIPHIER_RESETX(4, 0x200c, 2), /* eMMC */ 716584b1eaSMasahiro Yamada UNIPHIER_RESETX(8, 0x200c, 8), /* STDMAC */ 726584b1eaSMasahiro Yamada UNIPHIER_RESETX(12, 0x200c, 5), /* GIO */ 734fb96c48SMasahiro Yamada UNIPHIER_RESETX(16, 0x200c, 12), /* USB30-PHY0 */ 744fb96c48SMasahiro Yamada UNIPHIER_RESETX(17, 0x200c, 13), /* USB30-PHY1 */ 754fb96c48SMasahiro Yamada UNIPHIER_RESETX(18, 0x200c, 14), /* USB30-PHY2 */ 764fb96c48SMasahiro Yamada UNIPHIER_RESETX(19, 0x200c, 15), /* USB30-PHY3 */ 774fb96c48SMasahiro Yamada UNIPHIER_RESET_END, 784fb96c48SMasahiro Yamada }; 794fb96c48SMasahiro Yamada 80111689e7SMasahiro Yamada static const struct uniphier_reset_data uniphier_pxs3_sys_reset_data[] = { 81111689e7SMasahiro Yamada UNIPHIER_RESETX(2, 0x200c, 0), /* NAND */ 82111689e7SMasahiro Yamada UNIPHIER_RESETX(4, 0x200c, 2), /* eMMC */ 83111689e7SMasahiro Yamada UNIPHIER_RESETX(8, 0x200c, 12), /* STDMAC */ 84111689e7SMasahiro Yamada UNIPHIER_RESETX(12, 0x200c, 5), /* USB30 (GIO0) */ 85111689e7SMasahiro Yamada UNIPHIER_RESETX(13, 0x200c, 6), /* USB31 (GIO1) */ 86111689e7SMasahiro Yamada UNIPHIER_RESETX(16, 0x200c, 16), /* USB30-PHY */ 87111689e7SMasahiro Yamada UNIPHIER_RESETX(20, 0x200c, 17), /* USB31-PHY */ 88111689e7SMasahiro Yamada UNIPHIER_RESET_END, 89111689e7SMasahiro Yamada }; 90111689e7SMasahiro Yamada 914fb96c48SMasahiro Yamada /* Media I/O reset data */ 924fb96c48SMasahiro Yamada #define UNIPHIER_MIO_RESET_SD(id, ch) \ 934fb96c48SMasahiro Yamada UNIPHIER_RESETX((id), 0x110 + 0x200 * (ch), 0) 944fb96c48SMasahiro Yamada 954fb96c48SMasahiro Yamada #define UNIPHIER_MIO_RESET_SD_BRIDGE(id, ch) \ 964fb96c48SMasahiro Yamada UNIPHIER_RESETX((id), 0x110 + 0x200 * (ch), 26) 974fb96c48SMasahiro Yamada 984fb96c48SMasahiro Yamada #define UNIPHIER_MIO_RESET_EMMC_HW_RESET(id, ch) \ 994fb96c48SMasahiro Yamada UNIPHIER_RESETX((id), 0x80 + 0x200 * (ch), 0) 1004fb96c48SMasahiro Yamada 1014fb96c48SMasahiro Yamada #define UNIPHIER_MIO_RESET_USB2(id, ch) \ 1024fb96c48SMasahiro Yamada UNIPHIER_RESETX((id), 0x114 + 0x200 * (ch), 0) 1034fb96c48SMasahiro Yamada 1044fb96c48SMasahiro Yamada #define UNIPHIER_MIO_RESET_USB2_BRIDGE(id, ch) \ 1054fb96c48SMasahiro Yamada UNIPHIER_RESETX((id), 0x110 + 0x200 * (ch), 24) 1064fb96c48SMasahiro Yamada 1074fb96c48SMasahiro Yamada #define UNIPHIER_MIO_RESET_DMAC(id) \ 1084fb96c48SMasahiro Yamada UNIPHIER_RESETX((id), 0x110, 17) 1094fb96c48SMasahiro Yamada 1101d21e1b9SMasahiro Yamada static const struct uniphier_reset_data uniphier_mio_reset_data[] = { 1114fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_SD(0, 0), 1124fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_SD(1, 1), 1134fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_SD(2, 2), 1144fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_SD_BRIDGE(3, 0), 1154fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_SD_BRIDGE(4, 1), 1164fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_SD_BRIDGE(5, 2), 1174fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_EMMC_HW_RESET(6, 1), 1184fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_DMAC(7), 1194fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_USB2(8, 0), 1204fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_USB2(9, 1), 1214fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_USB2(10, 2), 1224fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_USB2(11, 3), 1234fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_USB2_BRIDGE(12, 0), 1244fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_USB2_BRIDGE(13, 1), 1254fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_USB2_BRIDGE(14, 2), 1264fb96c48SMasahiro Yamada UNIPHIER_MIO_RESET_USB2_BRIDGE(15, 3), 1274fb96c48SMasahiro Yamada UNIPHIER_RESET_END, 1284fb96c48SMasahiro Yamada }; 1294fb96c48SMasahiro Yamada 1304fb96c48SMasahiro Yamada /* Peripheral reset data */ 1314fb96c48SMasahiro Yamada #define UNIPHIER_PERI_RESET_UART(id, ch) \ 1324fb96c48SMasahiro Yamada UNIPHIER_RESETX((id), 0x114, 19 + (ch)) 1334fb96c48SMasahiro Yamada 1344fb96c48SMasahiro Yamada #define UNIPHIER_PERI_RESET_I2C(id, ch) \ 1354fb96c48SMasahiro Yamada UNIPHIER_RESETX((id), 0x114, 5 + (ch)) 1364fb96c48SMasahiro Yamada 1374fb96c48SMasahiro Yamada #define UNIPHIER_PERI_RESET_FI2C(id, ch) \ 1384fb96c48SMasahiro Yamada UNIPHIER_RESETX((id), 0x114, 24 + (ch)) 1394fb96c48SMasahiro Yamada 1401d21e1b9SMasahiro Yamada static const struct uniphier_reset_data uniphier_ld4_peri_reset_data[] = { 1414fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_UART(0, 0), 1424fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_UART(1, 1), 1434fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_UART(2, 2), 1444fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_UART(3, 3), 1454fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_I2C(4, 0), 1464fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_I2C(5, 1), 1474fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_I2C(6, 2), 1484fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_I2C(7, 3), 1494fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_I2C(8, 4), 1504fb96c48SMasahiro Yamada UNIPHIER_RESET_END, 1514fb96c48SMasahiro Yamada }; 1524fb96c48SMasahiro Yamada 1531d21e1b9SMasahiro Yamada static const struct uniphier_reset_data uniphier_pro4_peri_reset_data[] = { 1544fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_UART(0, 0), 1554fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_UART(1, 1), 1564fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_UART(2, 2), 1574fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_UART(3, 3), 1584fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_FI2C(4, 0), 1594fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_FI2C(5, 1), 1604fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_FI2C(6, 2), 1614fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_FI2C(7, 3), 1624fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_FI2C(8, 4), 1634fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_FI2C(9, 5), 1644fb96c48SMasahiro Yamada UNIPHIER_PERI_RESET_FI2C(10, 6), 1654fb96c48SMasahiro Yamada UNIPHIER_RESET_END, 1664fb96c48SMasahiro Yamada }; 1674fb96c48SMasahiro Yamada 1684fb96c48SMasahiro Yamada /* core implementaton */ 1694fb96c48SMasahiro Yamada struct uniphier_reset_priv { 1704fb96c48SMasahiro Yamada void __iomem *base; 1714fb96c48SMasahiro Yamada const struct uniphier_reset_data *data; 1724fb96c48SMasahiro Yamada }; 1734fb96c48SMasahiro Yamada 1744fb96c48SMasahiro Yamada static int uniphier_reset_request(struct reset_ctl *reset_ctl) 1754fb96c48SMasahiro Yamada { 1764fb96c48SMasahiro Yamada return 0; 1774fb96c48SMasahiro Yamada } 1784fb96c48SMasahiro Yamada 1794fb96c48SMasahiro Yamada static int uniphier_reset_free(struct reset_ctl *reset_ctl) 1804fb96c48SMasahiro Yamada { 1814fb96c48SMasahiro Yamada return 0; 1824fb96c48SMasahiro Yamada } 1834fb96c48SMasahiro Yamada 1844fb96c48SMasahiro Yamada static int uniphier_reset_update(struct reset_ctl *reset_ctl, int assert) 1854fb96c48SMasahiro Yamada { 1864fb96c48SMasahiro Yamada struct uniphier_reset_priv *priv = dev_get_priv(reset_ctl->dev); 1874fb96c48SMasahiro Yamada unsigned long id = reset_ctl->id; 1884fb96c48SMasahiro Yamada const struct uniphier_reset_data *p; 1894fb96c48SMasahiro Yamada 1904fb96c48SMasahiro Yamada for (p = priv->data; p->id != UNIPHIER_RESET_ID_END; p++) { 1914fb96c48SMasahiro Yamada u32 mask, val; 1924fb96c48SMasahiro Yamada 1934fb96c48SMasahiro Yamada if (p->id != id) 1944fb96c48SMasahiro Yamada continue; 1954fb96c48SMasahiro Yamada 1964fb96c48SMasahiro Yamada val = readl(priv->base + p->reg); 1974fb96c48SMasahiro Yamada 1984fb96c48SMasahiro Yamada if (p->flags & UNIPHIER_RESET_ACTIVE_LOW) 1994fb96c48SMasahiro Yamada assert = !assert; 2004fb96c48SMasahiro Yamada 2014fb96c48SMasahiro Yamada mask = BIT(p->bit); 2024fb96c48SMasahiro Yamada 2034fb96c48SMasahiro Yamada if (assert) 2044fb96c48SMasahiro Yamada val |= mask; 2054fb96c48SMasahiro Yamada else 2064fb96c48SMasahiro Yamada val &= ~mask; 2074fb96c48SMasahiro Yamada 2084fb96c48SMasahiro Yamada writel(val, priv->base + p->reg); 2094fb96c48SMasahiro Yamada 2104fb96c48SMasahiro Yamada return 0; 2114fb96c48SMasahiro Yamada } 2124fb96c48SMasahiro Yamada 213*def4eadbSMasahiro Yamada dev_err(reset_ctl->dev, "reset_id=%lu was not handled\n", id); 214*def4eadbSMasahiro Yamada 2154fb96c48SMasahiro Yamada return -EINVAL; 2164fb96c48SMasahiro Yamada } 2174fb96c48SMasahiro Yamada 2184fb96c48SMasahiro Yamada static int uniphier_reset_assert(struct reset_ctl *reset_ctl) 2194fb96c48SMasahiro Yamada { 2204fb96c48SMasahiro Yamada return uniphier_reset_update(reset_ctl, 1); 2214fb96c48SMasahiro Yamada } 2224fb96c48SMasahiro Yamada 2234fb96c48SMasahiro Yamada static int uniphier_reset_deassert(struct reset_ctl *reset_ctl) 2244fb96c48SMasahiro Yamada { 2254fb96c48SMasahiro Yamada return uniphier_reset_update(reset_ctl, 0); 2264fb96c48SMasahiro Yamada } 2274fb96c48SMasahiro Yamada 2284fb96c48SMasahiro Yamada static const struct reset_ops uniphier_reset_ops = { 2294fb96c48SMasahiro Yamada .request = uniphier_reset_request, 2304fb96c48SMasahiro Yamada .free = uniphier_reset_free, 2314fb96c48SMasahiro Yamada .rst_assert = uniphier_reset_assert, 2324fb96c48SMasahiro Yamada .rst_deassert = uniphier_reset_deassert, 2334fb96c48SMasahiro Yamada }; 2344fb96c48SMasahiro Yamada 2354fb96c48SMasahiro Yamada static int uniphier_reset_probe(struct udevice *dev) 2364fb96c48SMasahiro Yamada { 2374fb96c48SMasahiro Yamada struct uniphier_reset_priv *priv = dev_get_priv(dev); 2384fb96c48SMasahiro Yamada fdt_addr_t addr; 2394fb96c48SMasahiro Yamada 240a821c4afSSimon Glass addr = devfdt_get_addr(dev->parent); 2414fb96c48SMasahiro Yamada if (addr == FDT_ADDR_T_NONE) 2424fb96c48SMasahiro Yamada return -EINVAL; 2434fb96c48SMasahiro Yamada 2444fb96c48SMasahiro Yamada priv->base = devm_ioremap(dev, addr, SZ_4K); 2454fb96c48SMasahiro Yamada if (!priv->base) 2464fb96c48SMasahiro Yamada return -ENOMEM; 2474fb96c48SMasahiro Yamada 2484fb96c48SMasahiro Yamada priv->data = (void *)dev_get_driver_data(dev); 2494fb96c48SMasahiro Yamada 2504fb96c48SMasahiro Yamada return 0; 2514fb96c48SMasahiro Yamada } 2524fb96c48SMasahiro Yamada 2534fb96c48SMasahiro Yamada static const struct udevice_id uniphier_reset_match[] = { 2544fb96c48SMasahiro Yamada /* System reset */ 2554fb96c48SMasahiro Yamada { 2564fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-ld4-reset", 2576584b1eaSMasahiro Yamada .data = (ulong)uniphier_pro4_sys_reset_data, 2584fb96c48SMasahiro Yamada }, 2594fb96c48SMasahiro Yamada { 2604fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-pro4-reset", 2614fb96c48SMasahiro Yamada .data = (ulong)uniphier_pro4_sys_reset_data, 2624fb96c48SMasahiro Yamada }, 2634fb96c48SMasahiro Yamada { 2644fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-sld8-reset", 2656584b1eaSMasahiro Yamada .data = (ulong)uniphier_pro4_sys_reset_data, 2664fb96c48SMasahiro Yamada }, 2674fb96c48SMasahiro Yamada { 2684fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-pro5-reset", 2696584b1eaSMasahiro Yamada .data = (ulong)uniphier_pro4_sys_reset_data, 2704fb96c48SMasahiro Yamada }, 2714fb96c48SMasahiro Yamada { 2724fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-pxs2-reset", 2734fb96c48SMasahiro Yamada .data = (ulong)uniphier_pxs2_sys_reset_data, 2744fb96c48SMasahiro Yamada }, 2754fb96c48SMasahiro Yamada { 2764fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-ld11-reset", 2776584b1eaSMasahiro Yamada .data = (ulong)uniphier_ld20_sys_reset_data, 2784fb96c48SMasahiro Yamada }, 2794fb96c48SMasahiro Yamada { 2804fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-ld20-reset", 2814fb96c48SMasahiro Yamada .data = (ulong)uniphier_ld20_sys_reset_data, 2824fb96c48SMasahiro Yamada }, 283111689e7SMasahiro Yamada { 284111689e7SMasahiro Yamada .compatible = "socionext,uniphier-pxs3-reset", 285111689e7SMasahiro Yamada .data = (ulong)uniphier_pxs3_sys_reset_data, 286111689e7SMasahiro Yamada }, 2874fb96c48SMasahiro Yamada /* Media I/O reset */ 2884fb96c48SMasahiro Yamada { 2894fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-ld4-mio-reset", 2904fb96c48SMasahiro Yamada .data = (ulong)uniphier_mio_reset_data, 2914fb96c48SMasahiro Yamada }, 2924fb96c48SMasahiro Yamada { 2934fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-pro4-mio-reset", 2944fb96c48SMasahiro Yamada .data = (ulong)uniphier_mio_reset_data, 2954fb96c48SMasahiro Yamada }, 2964fb96c48SMasahiro Yamada { 2974fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-sld8-mio-reset", 2984fb96c48SMasahiro Yamada .data = (ulong)uniphier_mio_reset_data, 2994fb96c48SMasahiro Yamada }, 3004fb96c48SMasahiro Yamada { 3014fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-pro5-mio-reset", 3024fb96c48SMasahiro Yamada .data = (ulong)uniphier_mio_reset_data, 3034fb96c48SMasahiro Yamada }, 3044fb96c48SMasahiro Yamada { 3054fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-pxs2-mio-reset", 3064fb96c48SMasahiro Yamada .data = (ulong)uniphier_mio_reset_data, 3074fb96c48SMasahiro Yamada }, 3084fb96c48SMasahiro Yamada { 3094fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-ld11-mio-reset", 3104fb96c48SMasahiro Yamada .data = (ulong)uniphier_mio_reset_data, 3114fb96c48SMasahiro Yamada }, 3124fb96c48SMasahiro Yamada { 3131fc84d6bSMasahiro Yamada .compatible = "socionext,uniphier-ld11-sd-reset", 3141fc84d6bSMasahiro Yamada .data = (ulong)uniphier_mio_reset_data, 3151fc84d6bSMasahiro Yamada }, 3161fc84d6bSMasahiro Yamada { 3171fc84d6bSMasahiro Yamada .compatible = "socionext,uniphier-ld20-sd-reset", 3184fb96c48SMasahiro Yamada .data = (ulong)uniphier_mio_reset_data, 3194fb96c48SMasahiro Yamada }, 320111689e7SMasahiro Yamada { 321111689e7SMasahiro Yamada .compatible = "socionext,uniphier-pxs3-sd-reset", 322111689e7SMasahiro Yamada .data = (ulong)uniphier_mio_reset_data, 323111689e7SMasahiro Yamada }, 3244fb96c48SMasahiro Yamada /* Peripheral reset */ 3254fb96c48SMasahiro Yamada { 3264fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-ld4-peri-reset", 3274fb96c48SMasahiro Yamada .data = (ulong)uniphier_ld4_peri_reset_data, 3284fb96c48SMasahiro Yamada }, 3294fb96c48SMasahiro Yamada { 3304fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-pro4-peri-reset", 3314fb96c48SMasahiro Yamada .data = (ulong)uniphier_pro4_peri_reset_data, 3324fb96c48SMasahiro Yamada }, 3334fb96c48SMasahiro Yamada { 3344fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-sld8-peri-reset", 3354fb96c48SMasahiro Yamada .data = (ulong)uniphier_ld4_peri_reset_data, 3364fb96c48SMasahiro Yamada }, 3374fb96c48SMasahiro Yamada { 3384fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-pro5-peri-reset", 3394fb96c48SMasahiro Yamada .data = (ulong)uniphier_pro4_peri_reset_data, 3404fb96c48SMasahiro Yamada }, 3414fb96c48SMasahiro Yamada { 3424fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-pxs2-peri-reset", 3434fb96c48SMasahiro Yamada .data = (ulong)uniphier_pro4_peri_reset_data, 3444fb96c48SMasahiro Yamada }, 3454fb96c48SMasahiro Yamada { 3464fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-ld11-peri-reset", 3474fb96c48SMasahiro Yamada .data = (ulong)uniphier_pro4_peri_reset_data, 3484fb96c48SMasahiro Yamada }, 3494fb96c48SMasahiro Yamada { 3504fb96c48SMasahiro Yamada .compatible = "socionext,uniphier-ld20-peri-reset", 3514fb96c48SMasahiro Yamada .data = (ulong)uniphier_pro4_peri_reset_data, 3524fb96c48SMasahiro Yamada }, 353111689e7SMasahiro Yamada { 354111689e7SMasahiro Yamada .compatible = "socionext,uniphier-pxs3-peri-reset", 355111689e7SMasahiro Yamada .data = (ulong)uniphier_pro4_peri_reset_data, 356111689e7SMasahiro Yamada }, 3574fb96c48SMasahiro Yamada { /* sentinel */ } 3584fb96c48SMasahiro Yamada }; 3594fb96c48SMasahiro Yamada 3604fb96c48SMasahiro Yamada U_BOOT_DRIVER(uniphier_reset) = { 3614fb96c48SMasahiro Yamada .name = "uniphier-reset", 3624fb96c48SMasahiro Yamada .id = UCLASS_RESET, 3634fb96c48SMasahiro Yamada .of_match = uniphier_reset_match, 3644fb96c48SMasahiro Yamada .probe = uniphier_reset_probe, 3654fb96c48SMasahiro Yamada .priv_auto_alloc_size = sizeof(struct uniphier_reset_priv), 3664fb96c48SMasahiro Yamada .ops = &uniphier_reset_ops, 3674fb96c48SMasahiro Yamada }; 368