xref: /openbmc/u-boot/drivers/reset/reset-uniphier.c (revision 77b5ba5d2b94c5b028991c82782493f64bd4f392)
183d290c5STom Rini // SPDX-License-Identifier: GPL-2.0+
24fb96c48SMasahiro Yamada /*
34fb96c48SMasahiro Yamada  * Copyright (C) 2016 Socionext Inc.
44fb96c48SMasahiro Yamada  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
54fb96c48SMasahiro Yamada  */
64fb96c48SMasahiro Yamada 
74fb96c48SMasahiro Yamada #include <common.h>
89d922450SSimon Glass #include <dm.h>
94fb96c48SMasahiro Yamada #include <reset-uclass.h>
104fb96c48SMasahiro Yamada #include <linux/bitops.h>
114fb96c48SMasahiro Yamada #include <linux/io.h>
124fb96c48SMasahiro Yamada #include <linux/sizes.h>
134fb96c48SMasahiro Yamada 
144fb96c48SMasahiro Yamada struct uniphier_reset_data {
154fb96c48SMasahiro Yamada 	unsigned int id;
164fb96c48SMasahiro Yamada 	unsigned int reg;
174fb96c48SMasahiro Yamada 	unsigned int bit;
184fb96c48SMasahiro Yamada 	unsigned int flags;
194fb96c48SMasahiro Yamada #define UNIPHIER_RESET_ACTIVE_LOW		BIT(0)
204fb96c48SMasahiro Yamada };
214fb96c48SMasahiro Yamada 
224fb96c48SMasahiro Yamada #define UNIPHIER_RESET_ID_END		(unsigned int)(-1)
234fb96c48SMasahiro Yamada 
244fb96c48SMasahiro Yamada #define UNIPHIER_RESET_END				\
254fb96c48SMasahiro Yamada 	{ .id = UNIPHIER_RESET_ID_END }
264fb96c48SMasahiro Yamada 
274fb96c48SMasahiro Yamada #define UNIPHIER_RESET(_id, _reg, _bit)			\
284fb96c48SMasahiro Yamada 	{						\
294fb96c48SMasahiro Yamada 		.id = (_id),				\
304fb96c48SMasahiro Yamada 		.reg = (_reg),				\
314fb96c48SMasahiro Yamada 		.bit = (_bit),				\
324fb96c48SMasahiro Yamada 	}
334fb96c48SMasahiro Yamada 
344fb96c48SMasahiro Yamada #define UNIPHIER_RESETX(_id, _reg, _bit)		\
354fb96c48SMasahiro Yamada 	{						\
364fb96c48SMasahiro Yamada 		.id = (_id),				\
374fb96c48SMasahiro Yamada 		.reg = (_reg),				\
384fb96c48SMasahiro Yamada 		.bit = (_bit),				\
394fb96c48SMasahiro Yamada 		.flags = UNIPHIER_RESET_ACTIVE_LOW,	\
404fb96c48SMasahiro Yamada 	}
414fb96c48SMasahiro Yamada 
424fb96c48SMasahiro Yamada /* System reset data */
431d21e1b9SMasahiro Yamada static const struct uniphier_reset_data uniphier_pro4_sys_reset_data[] = {
446584b1eaSMasahiro Yamada 	UNIPHIER_RESETX(2, 0x2000, 2),		/* NAND */
45f8c08ab4SKunihiko Hayashi 	UNIPHIER_RESETX(6, 0x2000, 12),		/* ETHER */
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 */
55f8c08ab4SKunihiko Hayashi 	UNIPHIER_RESETX(6, 0x2000, 12),		/* ETHER */
566584b1eaSMasahiro Yamada 	UNIPHIER_RESETX(8, 0x2000, 10),		/* STDMAC */
576584b1eaSMasahiro Yamada 	UNIPHIER_RESETX(14, 0x2000, 17),	/* USB30 */
586584b1eaSMasahiro Yamada 	UNIPHIER_RESETX(15, 0x2004, 17),	/* USB31 */
594fb96c48SMasahiro Yamada 	UNIPHIER_RESETX(16, 0x2014, 4),		/* USB30-PHY0 */
604fb96c48SMasahiro Yamada 	UNIPHIER_RESETX(17, 0x2014, 0),		/* USB30-PHY1 */
614fb96c48SMasahiro Yamada 	UNIPHIER_RESETX(18, 0x2014, 2),		/* USB30-PHY2 */
624fb96c48SMasahiro Yamada 	UNIPHIER_RESETX(20, 0x2014, 5),		/* USB31-PHY0 */
634fb96c48SMasahiro Yamada 	UNIPHIER_RESETX(21, 0x2014, 1),		/* USB31-PHY1 */
644fb96c48SMasahiro Yamada 	UNIPHIER_RESETX(28, 0x2014, 12),	/* SATA */
654fb96c48SMasahiro Yamada 	UNIPHIER_RESET(29, 0x2014, 8),		/* SATA-PHY (active high) */
664fb96c48SMasahiro Yamada 	UNIPHIER_RESET_END,
674fb96c48SMasahiro Yamada };
684fb96c48SMasahiro Yamada 
691d21e1b9SMasahiro Yamada static const struct uniphier_reset_data uniphier_ld20_sys_reset_data[] = {
706584b1eaSMasahiro Yamada 	UNIPHIER_RESETX(2, 0x200c, 0),		/* NAND */
716584b1eaSMasahiro Yamada 	UNIPHIER_RESETX(4, 0x200c, 2),		/* eMMC */
72f8c08ab4SKunihiko Hayashi 	UNIPHIER_RESETX(6, 0x200c, 6),		/* ETHER */
736584b1eaSMasahiro Yamada 	UNIPHIER_RESETX(8, 0x200c, 8),		/* STDMAC */
74*25ed0fefSMasahiro Yamada 	UNIPHIER_RESETX(14, 0x200c, 5),		/* USB30 */
754fb96c48SMasahiro Yamada 	UNIPHIER_RESETX(16, 0x200c, 12),	/* USB30-PHY0 */
764fb96c48SMasahiro Yamada 	UNIPHIER_RESETX(17, 0x200c, 13),	/* USB30-PHY1 */
774fb96c48SMasahiro Yamada 	UNIPHIER_RESETX(18, 0x200c, 14),	/* USB30-PHY2 */
784fb96c48SMasahiro Yamada 	UNIPHIER_RESETX(19, 0x200c, 15),	/* USB30-PHY3 */
794fb96c48SMasahiro Yamada 	UNIPHIER_RESET_END,
804fb96c48SMasahiro Yamada };
814fb96c48SMasahiro Yamada 
82111689e7SMasahiro Yamada static const struct uniphier_reset_data uniphier_pxs3_sys_reset_data[] = {
83111689e7SMasahiro Yamada 	UNIPHIER_RESETX(2, 0x200c, 0),		/* NAND */
84111689e7SMasahiro Yamada 	UNIPHIER_RESETX(4, 0x200c, 2),		/* eMMC */
85f8c08ab4SKunihiko Hayashi 	UNIPHIER_RESETX(6, 0x200c, 9),		/* ETHER0 */
86f8c08ab4SKunihiko Hayashi 	UNIPHIER_RESETX(7, 0x200c, 10),		/* ETHER1 */
87111689e7SMasahiro Yamada 	UNIPHIER_RESETX(8, 0x200c, 12),		/* STDMAC */
88*25ed0fefSMasahiro Yamada 	UNIPHIER_RESETX(12, 0x200c, 4),		/* USB30 link */
89*25ed0fefSMasahiro Yamada 	UNIPHIER_RESETX(13, 0x200c, 5),		/* USB31 link */
90*25ed0fefSMasahiro Yamada 	UNIPHIER_RESETX(16, 0x200c, 16),	/* USB30-PHY0 */
91*25ed0fefSMasahiro Yamada 	UNIPHIER_RESETX(17, 0x200c, 18),	/* USB30-PHY1 */
92*25ed0fefSMasahiro Yamada 	UNIPHIER_RESETX(18, 0x200c, 20),	/* USB30-PHY2 */
93*25ed0fefSMasahiro Yamada 	UNIPHIER_RESETX(20, 0x200c, 17),	/* USB31-PHY0 */
94*25ed0fefSMasahiro Yamada 	UNIPHIER_RESETX(21, 0x200c, 19),	/* USB31-PHY1 */
95111689e7SMasahiro Yamada 	UNIPHIER_RESET_END,
96111689e7SMasahiro Yamada };
97111689e7SMasahiro Yamada 
984fb96c48SMasahiro Yamada /* Media I/O reset data */
994fb96c48SMasahiro Yamada #define UNIPHIER_MIO_RESET_SD(id, ch)			\
1004fb96c48SMasahiro Yamada 	UNIPHIER_RESETX((id), 0x110 + 0x200 * (ch), 0)
1014fb96c48SMasahiro Yamada 
1024fb96c48SMasahiro Yamada #define UNIPHIER_MIO_RESET_SD_BRIDGE(id, ch)		\
1034fb96c48SMasahiro Yamada 	UNIPHIER_RESETX((id), 0x110 + 0x200 * (ch), 26)
1044fb96c48SMasahiro Yamada 
1054fb96c48SMasahiro Yamada #define UNIPHIER_MIO_RESET_EMMC_HW_RESET(id, ch)	\
1064fb96c48SMasahiro Yamada 	UNIPHIER_RESETX((id), 0x80 + 0x200 * (ch), 0)
1074fb96c48SMasahiro Yamada 
1084fb96c48SMasahiro Yamada #define UNIPHIER_MIO_RESET_USB2(id, ch)			\
1094fb96c48SMasahiro Yamada 	UNIPHIER_RESETX((id), 0x114 + 0x200 * (ch), 0)
1104fb96c48SMasahiro Yamada 
1114fb96c48SMasahiro Yamada #define UNIPHIER_MIO_RESET_USB2_BRIDGE(id, ch)		\
1124fb96c48SMasahiro Yamada 	UNIPHIER_RESETX((id), 0x110 + 0x200 * (ch), 24)
1134fb96c48SMasahiro Yamada 
1144fb96c48SMasahiro Yamada #define UNIPHIER_MIO_RESET_DMAC(id)			\
1154fb96c48SMasahiro Yamada 	UNIPHIER_RESETX((id), 0x110, 17)
1164fb96c48SMasahiro Yamada 
1171d21e1b9SMasahiro Yamada static const struct uniphier_reset_data uniphier_mio_reset_data[] = {
1184fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_SD(0, 0),
1194fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_SD(1, 1),
1204fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_SD(2, 2),
1214fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_SD_BRIDGE(3, 0),
1224fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_SD_BRIDGE(4, 1),
1234fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_SD_BRIDGE(5, 2),
1244fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_EMMC_HW_RESET(6, 1),
1254fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_DMAC(7),
1264fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_USB2(8, 0),
1274fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_USB2(9, 1),
1284fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_USB2(10, 2),
1294fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_USB2(11, 3),
1304fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_USB2_BRIDGE(12, 0),
1314fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_USB2_BRIDGE(13, 1),
1324fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_USB2_BRIDGE(14, 2),
1334fb96c48SMasahiro Yamada 	UNIPHIER_MIO_RESET_USB2_BRIDGE(15, 3),
1344fb96c48SMasahiro Yamada 	UNIPHIER_RESET_END,
1354fb96c48SMasahiro Yamada };
1364fb96c48SMasahiro Yamada 
1374fb96c48SMasahiro Yamada /* Peripheral reset data */
1384fb96c48SMasahiro Yamada #define UNIPHIER_PERI_RESET_UART(id, ch)		\
1394fb96c48SMasahiro Yamada 	UNIPHIER_RESETX((id), 0x114, 19 + (ch))
1404fb96c48SMasahiro Yamada 
1414fb96c48SMasahiro Yamada #define UNIPHIER_PERI_RESET_I2C(id, ch)			\
1424fb96c48SMasahiro Yamada 	UNIPHIER_RESETX((id), 0x114, 5 + (ch))
1434fb96c48SMasahiro Yamada 
1444fb96c48SMasahiro Yamada #define UNIPHIER_PERI_RESET_FI2C(id, ch)		\
1454fb96c48SMasahiro Yamada 	UNIPHIER_RESETX((id), 0x114, 24 + (ch))
1464fb96c48SMasahiro Yamada 
1471d21e1b9SMasahiro Yamada static const struct uniphier_reset_data uniphier_ld4_peri_reset_data[] = {
1484fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_UART(0, 0),
1494fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_UART(1, 1),
1504fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_UART(2, 2),
1514fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_UART(3, 3),
1524fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_I2C(4, 0),
1534fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_I2C(5, 1),
1544fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_I2C(6, 2),
1554fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_I2C(7, 3),
1564fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_I2C(8, 4),
1574fb96c48SMasahiro Yamada 	UNIPHIER_RESET_END,
1584fb96c48SMasahiro Yamada };
1594fb96c48SMasahiro Yamada 
1601d21e1b9SMasahiro Yamada static const struct uniphier_reset_data uniphier_pro4_peri_reset_data[] = {
1614fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_UART(0, 0),
1624fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_UART(1, 1),
1634fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_UART(2, 2),
1644fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_UART(3, 3),
1654fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_FI2C(4, 0),
1664fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_FI2C(5, 1),
1674fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_FI2C(6, 2),
1684fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_FI2C(7, 3),
1694fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_FI2C(8, 4),
1704fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_FI2C(9, 5),
1714fb96c48SMasahiro Yamada 	UNIPHIER_PERI_RESET_FI2C(10, 6),
1724fb96c48SMasahiro Yamada 	UNIPHIER_RESET_END,
1734fb96c48SMasahiro Yamada };
1744fb96c48SMasahiro Yamada 
1754fb96c48SMasahiro Yamada /* core implementaton */
1764fb96c48SMasahiro Yamada struct uniphier_reset_priv {
1774fb96c48SMasahiro Yamada 	void __iomem *base;
1784fb96c48SMasahiro Yamada 	const struct uniphier_reset_data *data;
1794fb96c48SMasahiro Yamada };
1804fb96c48SMasahiro Yamada 
uniphier_reset_request(struct reset_ctl * reset_ctl)1814fb96c48SMasahiro Yamada static int uniphier_reset_request(struct reset_ctl *reset_ctl)
1824fb96c48SMasahiro Yamada {
1834fb96c48SMasahiro Yamada 	return 0;
1844fb96c48SMasahiro Yamada }
1854fb96c48SMasahiro Yamada 
uniphier_reset_free(struct reset_ctl * reset_ctl)1864fb96c48SMasahiro Yamada static int uniphier_reset_free(struct reset_ctl *reset_ctl)
1874fb96c48SMasahiro Yamada {
1884fb96c48SMasahiro Yamada 	return 0;
1894fb96c48SMasahiro Yamada }
1904fb96c48SMasahiro Yamada 
uniphier_reset_update(struct reset_ctl * reset_ctl,int assert)1914fb96c48SMasahiro Yamada static int uniphier_reset_update(struct reset_ctl *reset_ctl, int assert)
1924fb96c48SMasahiro Yamada {
1934fb96c48SMasahiro Yamada 	struct uniphier_reset_priv *priv = dev_get_priv(reset_ctl->dev);
1944fb96c48SMasahiro Yamada 	unsigned long id = reset_ctl->id;
1954fb96c48SMasahiro Yamada 	const struct uniphier_reset_data *p;
1964fb96c48SMasahiro Yamada 
1974fb96c48SMasahiro Yamada 	for (p = priv->data; p->id != UNIPHIER_RESET_ID_END; p++) {
1984fb96c48SMasahiro Yamada 		u32 mask, val;
1994fb96c48SMasahiro Yamada 
2004fb96c48SMasahiro Yamada 		if (p->id != id)
2014fb96c48SMasahiro Yamada 			continue;
2024fb96c48SMasahiro Yamada 
2034fb96c48SMasahiro Yamada 		val = readl(priv->base + p->reg);
2044fb96c48SMasahiro Yamada 
2054fb96c48SMasahiro Yamada 		if (p->flags & UNIPHIER_RESET_ACTIVE_LOW)
2064fb96c48SMasahiro Yamada 			assert = !assert;
2074fb96c48SMasahiro Yamada 
2084fb96c48SMasahiro Yamada 		mask = BIT(p->bit);
2094fb96c48SMasahiro Yamada 
2104fb96c48SMasahiro Yamada 		if (assert)
2114fb96c48SMasahiro Yamada 			val |= mask;
2124fb96c48SMasahiro Yamada 		else
2134fb96c48SMasahiro Yamada 			val &= ~mask;
2144fb96c48SMasahiro Yamada 
2154fb96c48SMasahiro Yamada 		writel(val, priv->base + p->reg);
2164fb96c48SMasahiro Yamada 
2174fb96c48SMasahiro Yamada 		return 0;
2184fb96c48SMasahiro Yamada 	}
2194fb96c48SMasahiro Yamada 
220def4eadbSMasahiro Yamada 	dev_err(reset_ctl->dev, "reset_id=%lu was not handled\n", id);
221def4eadbSMasahiro Yamada 
2224fb96c48SMasahiro Yamada 	return -EINVAL;
2234fb96c48SMasahiro Yamada }
2244fb96c48SMasahiro Yamada 
uniphier_reset_assert(struct reset_ctl * reset_ctl)2254fb96c48SMasahiro Yamada static int uniphier_reset_assert(struct reset_ctl *reset_ctl)
2264fb96c48SMasahiro Yamada {
2274fb96c48SMasahiro Yamada 	return uniphier_reset_update(reset_ctl, 1);
2284fb96c48SMasahiro Yamada }
2294fb96c48SMasahiro Yamada 
uniphier_reset_deassert(struct reset_ctl * reset_ctl)2304fb96c48SMasahiro Yamada static int uniphier_reset_deassert(struct reset_ctl *reset_ctl)
2314fb96c48SMasahiro Yamada {
2324fb96c48SMasahiro Yamada 	return uniphier_reset_update(reset_ctl, 0);
2334fb96c48SMasahiro Yamada }
2344fb96c48SMasahiro Yamada 
2354fb96c48SMasahiro Yamada static const struct reset_ops uniphier_reset_ops = {
2364fb96c48SMasahiro Yamada 	.request = uniphier_reset_request,
2374fb96c48SMasahiro Yamada 	.free = uniphier_reset_free,
2384fb96c48SMasahiro Yamada 	.rst_assert = uniphier_reset_assert,
2394fb96c48SMasahiro Yamada 	.rst_deassert = uniphier_reset_deassert,
2404fb96c48SMasahiro Yamada };
2414fb96c48SMasahiro Yamada 
uniphier_reset_probe(struct udevice * dev)2424fb96c48SMasahiro Yamada static int uniphier_reset_probe(struct udevice *dev)
2434fb96c48SMasahiro Yamada {
2444fb96c48SMasahiro Yamada 	struct uniphier_reset_priv *priv = dev_get_priv(dev);
2454fb96c48SMasahiro Yamada 	fdt_addr_t addr;
2464fb96c48SMasahiro Yamada 
247a821c4afSSimon Glass 	addr = devfdt_get_addr(dev->parent);
2484fb96c48SMasahiro Yamada 	if (addr == FDT_ADDR_T_NONE)
2494fb96c48SMasahiro Yamada 		return -EINVAL;
2504fb96c48SMasahiro Yamada 
2514fb96c48SMasahiro Yamada 	priv->base = devm_ioremap(dev, addr, SZ_4K);
2524fb96c48SMasahiro Yamada 	if (!priv->base)
2534fb96c48SMasahiro Yamada 		return -ENOMEM;
2544fb96c48SMasahiro Yamada 
2554fb96c48SMasahiro Yamada 	priv->data = (void *)dev_get_driver_data(dev);
2564fb96c48SMasahiro Yamada 
2574fb96c48SMasahiro Yamada 	return 0;
2584fb96c48SMasahiro Yamada }
2594fb96c48SMasahiro Yamada 
2604fb96c48SMasahiro Yamada static const struct udevice_id uniphier_reset_match[] = {
2614fb96c48SMasahiro Yamada 	/* System reset */
2624fb96c48SMasahiro Yamada 	{
2634fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-ld4-reset",
2646584b1eaSMasahiro Yamada 		.data = (ulong)uniphier_pro4_sys_reset_data,
2654fb96c48SMasahiro Yamada 	},
2664fb96c48SMasahiro Yamada 	{
2674fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-pro4-reset",
2684fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_pro4_sys_reset_data,
2694fb96c48SMasahiro Yamada 	},
2704fb96c48SMasahiro Yamada 	{
2714fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-sld8-reset",
2726584b1eaSMasahiro Yamada 		.data = (ulong)uniphier_pro4_sys_reset_data,
2734fb96c48SMasahiro Yamada 	},
2744fb96c48SMasahiro Yamada 	{
2754fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-pro5-reset",
2766584b1eaSMasahiro Yamada 		.data = (ulong)uniphier_pro4_sys_reset_data,
2774fb96c48SMasahiro Yamada 	},
2784fb96c48SMasahiro Yamada 	{
2794fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-pxs2-reset",
2804fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_pxs2_sys_reset_data,
2814fb96c48SMasahiro Yamada 	},
2824fb96c48SMasahiro Yamada 	{
2834fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-ld11-reset",
2846584b1eaSMasahiro Yamada 		.data = (ulong)uniphier_ld20_sys_reset_data,
2854fb96c48SMasahiro Yamada 	},
2864fb96c48SMasahiro Yamada 	{
2874fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-ld20-reset",
2884fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_ld20_sys_reset_data,
2894fb96c48SMasahiro Yamada 	},
290111689e7SMasahiro Yamada 	{
291111689e7SMasahiro Yamada 		.compatible = "socionext,uniphier-pxs3-reset",
292111689e7SMasahiro Yamada 		.data = (ulong)uniphier_pxs3_sys_reset_data,
293111689e7SMasahiro Yamada 	},
2944fb96c48SMasahiro Yamada 	/* Media I/O reset */
2954fb96c48SMasahiro Yamada 	{
2964fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-ld4-mio-reset",
2974fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_mio_reset_data,
2984fb96c48SMasahiro Yamada 	},
2994fb96c48SMasahiro Yamada 	{
3004fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-pro4-mio-reset",
3014fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_mio_reset_data,
3024fb96c48SMasahiro Yamada 	},
3034fb96c48SMasahiro Yamada 	{
3044fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-sld8-mio-reset",
3054fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_mio_reset_data,
3064fb96c48SMasahiro Yamada 	},
3074fb96c48SMasahiro Yamada 	{
3084fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-pro5-mio-reset",
3094fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_mio_reset_data,
3104fb96c48SMasahiro Yamada 	},
3114fb96c48SMasahiro Yamada 	{
3124fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-pxs2-mio-reset",
3134fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_mio_reset_data,
3144fb96c48SMasahiro Yamada 	},
3154fb96c48SMasahiro Yamada 	{
3164fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-ld11-mio-reset",
3174fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_mio_reset_data,
3184fb96c48SMasahiro Yamada 	},
3194fb96c48SMasahiro Yamada 	{
3201fc84d6bSMasahiro Yamada 		.compatible = "socionext,uniphier-ld11-sd-reset",
3211fc84d6bSMasahiro Yamada 		.data = (ulong)uniphier_mio_reset_data,
3221fc84d6bSMasahiro Yamada 	},
3231fc84d6bSMasahiro Yamada 	{
3241fc84d6bSMasahiro Yamada 		.compatible = "socionext,uniphier-ld20-sd-reset",
3254fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_mio_reset_data,
3264fb96c48SMasahiro Yamada 	},
327111689e7SMasahiro Yamada 	{
328111689e7SMasahiro Yamada 		.compatible = "socionext,uniphier-pxs3-sd-reset",
329111689e7SMasahiro Yamada 		.data = (ulong)uniphier_mio_reset_data,
330111689e7SMasahiro Yamada 	},
3314fb96c48SMasahiro Yamada 	/* Peripheral reset */
3324fb96c48SMasahiro Yamada 	{
3334fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-ld4-peri-reset",
3344fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_ld4_peri_reset_data,
3354fb96c48SMasahiro Yamada 	},
3364fb96c48SMasahiro Yamada 	{
3374fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-pro4-peri-reset",
3384fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_pro4_peri_reset_data,
3394fb96c48SMasahiro Yamada 	},
3404fb96c48SMasahiro Yamada 	{
3414fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-sld8-peri-reset",
3424fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_ld4_peri_reset_data,
3434fb96c48SMasahiro Yamada 	},
3444fb96c48SMasahiro Yamada 	{
3454fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-pro5-peri-reset",
3464fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_pro4_peri_reset_data,
3474fb96c48SMasahiro Yamada 	},
3484fb96c48SMasahiro Yamada 	{
3494fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-pxs2-peri-reset",
3504fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_pro4_peri_reset_data,
3514fb96c48SMasahiro Yamada 	},
3524fb96c48SMasahiro Yamada 	{
3534fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-ld11-peri-reset",
3544fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_pro4_peri_reset_data,
3554fb96c48SMasahiro Yamada 	},
3564fb96c48SMasahiro Yamada 	{
3574fb96c48SMasahiro Yamada 		.compatible = "socionext,uniphier-ld20-peri-reset",
3584fb96c48SMasahiro Yamada 		.data = (ulong)uniphier_pro4_peri_reset_data,
3594fb96c48SMasahiro Yamada 	},
360111689e7SMasahiro Yamada 	{
361111689e7SMasahiro Yamada 		.compatible = "socionext,uniphier-pxs3-peri-reset",
362111689e7SMasahiro Yamada 		.data = (ulong)uniphier_pro4_peri_reset_data,
363111689e7SMasahiro Yamada 	},
3644fb96c48SMasahiro Yamada 	{ /* sentinel */ }
3654fb96c48SMasahiro Yamada };
3664fb96c48SMasahiro Yamada 
3674fb96c48SMasahiro Yamada U_BOOT_DRIVER(uniphier_reset) = {
3684fb96c48SMasahiro Yamada 	.name = "uniphier-reset",
3694fb96c48SMasahiro Yamada 	.id = UCLASS_RESET,
3704fb96c48SMasahiro Yamada 	.of_match = uniphier_reset_match,
3714fb96c48SMasahiro Yamada 	.probe = uniphier_reset_probe,
3724fb96c48SMasahiro Yamada 	.priv_auto_alloc_size = sizeof(struct uniphier_reset_priv),
3734fb96c48SMasahiro Yamada 	.ops = &uniphier_reset_ops,
3744fb96c48SMasahiro Yamada };
375