|
@@ -50,59 +50,35 @@ struct uniphier_reset_data {
|
|
}
|
|
}
|
|
|
|
|
|
/* System reset data */
|
|
/* System reset data */
|
|
-#define UNIPHIER_SLD3_SYS_RESET_NAND(id) \
|
|
|
|
- UNIPHIER_RESETX((id), 0x2004, 2)
|
|
|
|
-
|
|
|
|
-#define UNIPHIER_LD11_SYS_RESET_NAND(id) \
|
|
|
|
- UNIPHIER_RESETX((id), 0x200c, 0)
|
|
|
|
-
|
|
|
|
-#define UNIPHIER_LD11_SYS_RESET_EMMC(id) \
|
|
|
|
- UNIPHIER_RESETX((id), 0x200c, 2)
|
|
|
|
-
|
|
|
|
-#define UNIPHIER_SLD3_SYS_RESET_STDMAC(id) \
|
|
|
|
- UNIPHIER_RESETX((id), 0x2000, 10)
|
|
|
|
-
|
|
|
|
-#define UNIPHIER_LD11_SYS_RESET_STDMAC(id) \
|
|
|
|
- UNIPHIER_RESETX((id), 0x200c, 8)
|
|
|
|
-
|
|
|
|
-#define UNIPHIER_PRO4_SYS_RESET_GIO(id) \
|
|
|
|
- UNIPHIER_RESETX((id), 0x2000, 6)
|
|
|
|
-
|
|
|
|
-#define UNIPHIER_LD20_SYS_RESET_GIO(id) \
|
|
|
|
- UNIPHIER_RESETX((id), 0x200c, 5)
|
|
|
|
-
|
|
|
|
-#define UNIPHIER_PRO4_SYS_RESET_USB3(id, ch) \
|
|
|
|
- UNIPHIER_RESETX((id), 0x2000 + 0x4 * (ch), 17)
|
|
|
|
-
|
|
|
|
-static const struct uniphier_reset_data uniphier_sld3_sys_reset_data[] = {
|
|
|
|
- UNIPHIER_SLD3_SYS_RESET_NAND(2),
|
|
|
|
- UNIPHIER_SLD3_SYS_RESET_STDMAC(8), /* Ether, HSC, MIO */
|
|
|
|
|
|
+static const struct uniphier_reset_data uniphier_ld4_sys_reset_data[] = {
|
|
|
|
+ UNIPHIER_RESETX(2, 0x2000, 2), /* NAND */
|
|
|
|
+ UNIPHIER_RESETX(8, 0x2000, 10), /* STDMAC (Ether, HSC, MIO) */
|
|
UNIPHIER_RESET_END,
|
|
UNIPHIER_RESET_END,
|
|
};
|
|
};
|
|
|
|
|
|
static const struct uniphier_reset_data uniphier_pro4_sys_reset_data[] = {
|
|
static const struct uniphier_reset_data uniphier_pro4_sys_reset_data[] = {
|
|
- UNIPHIER_SLD3_SYS_RESET_NAND(2),
|
|
|
|
- UNIPHIER_SLD3_SYS_RESET_STDMAC(8), /* HSC, MIO, RLE */
|
|
|
|
- UNIPHIER_PRO4_SYS_RESET_GIO(12), /* Ether, SATA, USB3 */
|
|
|
|
- UNIPHIER_PRO4_SYS_RESET_USB3(14, 0),
|
|
|
|
- UNIPHIER_PRO4_SYS_RESET_USB3(15, 1),
|
|
|
|
|
|
+ UNIPHIER_RESETX(2, 0x2000, 2), /* NAND */
|
|
|
|
+ UNIPHIER_RESETX(8, 0x2000, 10), /* STDMAC (HSC, MIO, RLE) */
|
|
|
|
+ UNIPHIER_RESETX(12, 0x2000, 6), /* GIO (Ether, SATA, USB3) */
|
|
|
|
+ UNIPHIER_RESETX(14, 0x2000, 17), /* USB30 */
|
|
|
|
+ UNIPHIER_RESETX(15, 0x2004, 17), /* USB31 */
|
|
UNIPHIER_RESET_END,
|
|
UNIPHIER_RESET_END,
|
|
};
|
|
};
|
|
|
|
|
|
static const struct uniphier_reset_data uniphier_pro5_sys_reset_data[] = {
|
|
static const struct uniphier_reset_data uniphier_pro5_sys_reset_data[] = {
|
|
- UNIPHIER_SLD3_SYS_RESET_NAND(2),
|
|
|
|
- UNIPHIER_SLD3_SYS_RESET_STDMAC(8), /* HSC */
|
|
|
|
- UNIPHIER_PRO4_SYS_RESET_GIO(12), /* PCIe, USB3 */
|
|
|
|
- UNIPHIER_PRO4_SYS_RESET_USB3(14, 0),
|
|
|
|
- UNIPHIER_PRO4_SYS_RESET_USB3(15, 1),
|
|
|
|
|
|
+ UNIPHIER_RESETX(2, 0x2000, 2), /* NAND */
|
|
|
|
+ UNIPHIER_RESETX(8, 0x2000, 10), /* STDMAC (HSC) */
|
|
|
|
+ UNIPHIER_RESETX(12, 0x2000, 6), /* GIO (PCIe, USB3) */
|
|
|
|
+ UNIPHIER_RESETX(14, 0x2000, 17), /* USB30 */
|
|
|
|
+ UNIPHIER_RESETX(15, 0x2004, 17), /* USB31 */
|
|
UNIPHIER_RESET_END,
|
|
UNIPHIER_RESET_END,
|
|
};
|
|
};
|
|
|
|
|
|
static const struct uniphier_reset_data uniphier_pxs2_sys_reset_data[] = {
|
|
static const struct uniphier_reset_data uniphier_pxs2_sys_reset_data[] = {
|
|
- UNIPHIER_SLD3_SYS_RESET_NAND(2),
|
|
|
|
- UNIPHIER_SLD3_SYS_RESET_STDMAC(8), /* HSC, RLE */
|
|
|
|
- UNIPHIER_PRO4_SYS_RESET_USB3(14, 0),
|
|
|
|
- UNIPHIER_PRO4_SYS_RESET_USB3(15, 1),
|
|
|
|
|
|
+ UNIPHIER_RESETX(2, 0x2000, 2), /* NAND */
|
|
|
|
+ UNIPHIER_RESETX(8, 0x2000, 10), /* STDMAC (HSC, RLE) */
|
|
|
|
+ UNIPHIER_RESETX(14, 0x2000, 17), /* USB30 */
|
|
|
|
+ UNIPHIER_RESETX(15, 0x2004, 17), /* USB31 */
|
|
UNIPHIER_RESETX(16, 0x2014, 4), /* USB30-PHY0 */
|
|
UNIPHIER_RESETX(16, 0x2014, 4), /* USB30-PHY0 */
|
|
UNIPHIER_RESETX(17, 0x2014, 0), /* USB30-PHY1 */
|
|
UNIPHIER_RESETX(17, 0x2014, 0), /* USB30-PHY1 */
|
|
UNIPHIER_RESETX(18, 0x2014, 2), /* USB30-PHY2 */
|
|
UNIPHIER_RESETX(18, 0x2014, 2), /* USB30-PHY2 */
|
|
@@ -114,21 +90,27 @@ static const struct uniphier_reset_data uniphier_pxs2_sys_reset_data[] = {
|
|
};
|
|
};
|
|
|
|
|
|
static const struct uniphier_reset_data uniphier_ld11_sys_reset_data[] = {
|
|
static const struct uniphier_reset_data uniphier_ld11_sys_reset_data[] = {
|
|
- UNIPHIER_LD11_SYS_RESET_NAND(2),
|
|
|
|
- UNIPHIER_LD11_SYS_RESET_EMMC(4),
|
|
|
|
- UNIPHIER_LD11_SYS_RESET_STDMAC(8), /* HSC, MIO */
|
|
|
|
|
|
+ UNIPHIER_RESETX(2, 0x200c, 0), /* NAND */
|
|
|
|
+ UNIPHIER_RESETX(4, 0x200c, 2), /* eMMC */
|
|
|
|
+ UNIPHIER_RESETX(8, 0x200c, 8), /* STDMAC (HSC, MIO) */
|
|
|
|
+ UNIPHIER_RESETX(40, 0x2008, 0), /* AIO */
|
|
|
|
+ UNIPHIER_RESETX(41, 0x2008, 1), /* EVEA */
|
|
|
|
+ UNIPHIER_RESETX(42, 0x2010, 2), /* EXIV */
|
|
UNIPHIER_RESET_END,
|
|
UNIPHIER_RESET_END,
|
|
};
|
|
};
|
|
|
|
|
|
static const struct uniphier_reset_data uniphier_ld20_sys_reset_data[] = {
|
|
static const struct uniphier_reset_data uniphier_ld20_sys_reset_data[] = {
|
|
- UNIPHIER_LD11_SYS_RESET_NAND(2),
|
|
|
|
- UNIPHIER_LD11_SYS_RESET_EMMC(4),
|
|
|
|
- UNIPHIER_LD11_SYS_RESET_STDMAC(8), /* HSC */
|
|
|
|
- UNIPHIER_LD20_SYS_RESET_GIO(12), /* PCIe, USB3 */
|
|
|
|
|
|
+ UNIPHIER_RESETX(2, 0x200c, 0), /* NAND */
|
|
|
|
+ UNIPHIER_RESETX(4, 0x200c, 2), /* eMMC */
|
|
|
|
+ UNIPHIER_RESETX(8, 0x200c, 8), /* STDMAC (HSC) */
|
|
|
|
+ UNIPHIER_RESETX(12, 0x200c, 5), /* GIO (PCIe, USB3) */
|
|
UNIPHIER_RESETX(16, 0x200c, 12), /* USB30-PHY0 */
|
|
UNIPHIER_RESETX(16, 0x200c, 12), /* USB30-PHY0 */
|
|
UNIPHIER_RESETX(17, 0x200c, 13), /* USB30-PHY1 */
|
|
UNIPHIER_RESETX(17, 0x200c, 13), /* USB30-PHY1 */
|
|
UNIPHIER_RESETX(18, 0x200c, 14), /* USB30-PHY2 */
|
|
UNIPHIER_RESETX(18, 0x200c, 14), /* USB30-PHY2 */
|
|
UNIPHIER_RESETX(19, 0x200c, 15), /* USB30-PHY3 */
|
|
UNIPHIER_RESETX(19, 0x200c, 15), /* USB30-PHY3 */
|
|
|
|
+ UNIPHIER_RESETX(40, 0x2008, 0), /* AIO */
|
|
|
|
+ UNIPHIER_RESETX(41, 0x2008, 1), /* EVEA */
|
|
|
|
+ UNIPHIER_RESETX(42, 0x2010, 2), /* EXIV */
|
|
UNIPHIER_RESET_END,
|
|
UNIPHIER_RESET_END,
|
|
};
|
|
};
|
|
|
|
|
|
@@ -151,7 +133,7 @@ static const struct uniphier_reset_data uniphier_ld20_sys_reset_data[] = {
|
|
#define UNIPHIER_MIO_RESET_DMAC(id) \
|
|
#define UNIPHIER_MIO_RESET_DMAC(id) \
|
|
UNIPHIER_RESETX((id), 0x110, 17)
|
|
UNIPHIER_RESETX((id), 0x110, 17)
|
|
|
|
|
|
-static const struct uniphier_reset_data uniphier_sld3_mio_reset_data[] = {
|
|
|
|
|
|
+static const struct uniphier_reset_data uniphier_ld4_mio_reset_data[] = {
|
|
UNIPHIER_MIO_RESET_SD(0, 0),
|
|
UNIPHIER_MIO_RESET_SD(0, 0),
|
|
UNIPHIER_MIO_RESET_SD(1, 1),
|
|
UNIPHIER_MIO_RESET_SD(1, 1),
|
|
UNIPHIER_MIO_RESET_SD(2, 2),
|
|
UNIPHIER_MIO_RESET_SD(2, 2),
|
|
@@ -163,11 +145,9 @@ static const struct uniphier_reset_data uniphier_sld3_mio_reset_data[] = {
|
|
UNIPHIER_MIO_RESET_USB2(8, 0),
|
|
UNIPHIER_MIO_RESET_USB2(8, 0),
|
|
UNIPHIER_MIO_RESET_USB2(9, 1),
|
|
UNIPHIER_MIO_RESET_USB2(9, 1),
|
|
UNIPHIER_MIO_RESET_USB2(10, 2),
|
|
UNIPHIER_MIO_RESET_USB2(10, 2),
|
|
- UNIPHIER_MIO_RESET_USB2(11, 3),
|
|
|
|
UNIPHIER_MIO_RESET_USB2_BRIDGE(12, 0),
|
|
UNIPHIER_MIO_RESET_USB2_BRIDGE(12, 0),
|
|
UNIPHIER_MIO_RESET_USB2_BRIDGE(13, 1),
|
|
UNIPHIER_MIO_RESET_USB2_BRIDGE(13, 1),
|
|
UNIPHIER_MIO_RESET_USB2_BRIDGE(14, 2),
|
|
UNIPHIER_MIO_RESET_USB2_BRIDGE(14, 2),
|
|
- UNIPHIER_MIO_RESET_USB2_BRIDGE(15, 3),
|
|
|
|
UNIPHIER_RESET_END,
|
|
UNIPHIER_RESET_END,
|
|
};
|
|
};
|
|
|
|
|
|
@@ -216,6 +196,12 @@ static const struct uniphier_reset_data uniphier_pro4_peri_reset_data[] = {
|
|
UNIPHIER_RESET_END,
|
|
UNIPHIER_RESET_END,
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+/* Analog signal amplifiers reset data */
|
|
|
|
+static const struct uniphier_reset_data uniphier_ld11_adamv_reset_data[] = {
|
|
|
|
+ UNIPHIER_RESETX(0, 0x10, 6), /* EVEA */
|
|
|
|
+ UNIPHIER_RESET_END,
|
|
|
|
+};
|
|
|
|
+
|
|
/* core implementaton */
|
|
/* core implementaton */
|
|
struct uniphier_reset_priv {
|
|
struct uniphier_reset_priv {
|
|
struct reset_controller_dev rcdev;
|
|
struct reset_controller_dev rcdev;
|
|
@@ -345,13 +331,9 @@ static int uniphier_reset_probe(struct platform_device *pdev)
|
|
|
|
|
|
static const struct of_device_id uniphier_reset_match[] = {
|
|
static const struct of_device_id uniphier_reset_match[] = {
|
|
/* System reset */
|
|
/* System reset */
|
|
- {
|
|
|
|
- .compatible = "socionext,uniphier-sld3-reset",
|
|
|
|
- .data = uniphier_sld3_sys_reset_data,
|
|
|
|
- },
|
|
|
|
{
|
|
{
|
|
.compatible = "socionext,uniphier-ld4-reset",
|
|
.compatible = "socionext,uniphier-ld4-reset",
|
|
- .data = uniphier_sld3_sys_reset_data,
|
|
|
|
|
|
+ .data = uniphier_ld4_sys_reset_data,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
.compatible = "socionext,uniphier-pro4-reset",
|
|
.compatible = "socionext,uniphier-pro4-reset",
|
|
@@ -359,7 +341,7 @@ static const struct of_device_id uniphier_reset_match[] = {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
.compatible = "socionext,uniphier-sld8-reset",
|
|
.compatible = "socionext,uniphier-sld8-reset",
|
|
- .data = uniphier_sld3_sys_reset_data,
|
|
|
|
|
|
+ .data = uniphier_ld4_sys_reset_data,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
.compatible = "socionext,uniphier-pro5-reset",
|
|
.compatible = "socionext,uniphier-pro5-reset",
|
|
@@ -378,21 +360,17 @@ static const struct of_device_id uniphier_reset_match[] = {
|
|
.data = uniphier_ld20_sys_reset_data,
|
|
.data = uniphier_ld20_sys_reset_data,
|
|
},
|
|
},
|
|
/* Media I/O reset, SD reset */
|
|
/* Media I/O reset, SD reset */
|
|
- {
|
|
|
|
- .compatible = "socionext,uniphier-sld3-mio-reset",
|
|
|
|
- .data = uniphier_sld3_mio_reset_data,
|
|
|
|
- },
|
|
|
|
{
|
|
{
|
|
.compatible = "socionext,uniphier-ld4-mio-reset",
|
|
.compatible = "socionext,uniphier-ld4-mio-reset",
|
|
- .data = uniphier_sld3_mio_reset_data,
|
|
|
|
|
|
+ .data = uniphier_ld4_mio_reset_data,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
.compatible = "socionext,uniphier-pro4-mio-reset",
|
|
.compatible = "socionext,uniphier-pro4-mio-reset",
|
|
- .data = uniphier_sld3_mio_reset_data,
|
|
|
|
|
|
+ .data = uniphier_ld4_mio_reset_data,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
.compatible = "socionext,uniphier-sld8-mio-reset",
|
|
.compatible = "socionext,uniphier-sld8-mio-reset",
|
|
- .data = uniphier_sld3_mio_reset_data,
|
|
|
|
|
|
+ .data = uniphier_ld4_mio_reset_data,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
.compatible = "socionext,uniphier-pro5-sd-reset",
|
|
.compatible = "socionext,uniphier-pro5-sd-reset",
|
|
@@ -404,7 +382,7 @@ static const struct of_device_id uniphier_reset_match[] = {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
.compatible = "socionext,uniphier-ld11-mio-reset",
|
|
.compatible = "socionext,uniphier-ld11-mio-reset",
|
|
- .data = uniphier_sld3_mio_reset_data,
|
|
|
|
|
|
+ .data = uniphier_ld4_mio_reset_data,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
.compatible = "socionext,uniphier-ld11-sd-reset",
|
|
.compatible = "socionext,uniphier-ld11-sd-reset",
|
|
@@ -443,6 +421,15 @@ static const struct of_device_id uniphier_reset_match[] = {
|
|
.compatible = "socionext,uniphier-ld20-peri-reset",
|
|
.compatible = "socionext,uniphier-ld20-peri-reset",
|
|
.data = uniphier_pro4_peri_reset_data,
|
|
.data = uniphier_pro4_peri_reset_data,
|
|
},
|
|
},
|
|
|
|
+ /* Analog signal amplifiers reset */
|
|
|
|
+ {
|
|
|
|
+ .compatible = "socionext,uniphier-ld11-adamv-reset",
|
|
|
|
+ .data = uniphier_ld11_adamv_reset_data,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .compatible = "socionext,uniphier-ld20-adamv-reset",
|
|
|
|
+ .data = uniphier_ld11_adamv_reset_data,
|
|
|
|
+ },
|
|
{ /* sentinel */ }
|
|
{ /* sentinel */ }
|
|
};
|
|
};
|
|
MODULE_DEVICE_TABLE(of, uniphier_reset_match);
|
|
MODULE_DEVICE_TABLE(of, uniphier_reset_match);
|