17fce1e39SEmil Renner Berthing /* SPDX-License-Identifier: GPL-2.0 OR MIT */
27fce1e39SEmil Renner Berthing /*
37fce1e39SEmil Renner Berthing  * Copyright (C) 2022 Emil Renner Berthing <kernel@esmil.dk>
414b14a57SXingyu Wu  * Copyright (C) 2022 StarFive Technology Co., Ltd.
57fce1e39SEmil Renner Berthing  */
67fce1e39SEmil Renner Berthing 
77fce1e39SEmil Renner Berthing #ifndef __DT_BINDINGS_RESET_STARFIVE_JH7110_CRG_H__
87fce1e39SEmil Renner Berthing #define __DT_BINDINGS_RESET_STARFIVE_JH7110_CRG_H__
97fce1e39SEmil Renner Berthing 
107fce1e39SEmil Renner Berthing /* SYSCRG resets */
117fce1e39SEmil Renner Berthing #define JH7110_SYSRST_JTAG_APB			0
127fce1e39SEmil Renner Berthing #define JH7110_SYSRST_SYSCON_APB		1
137fce1e39SEmil Renner Berthing #define JH7110_SYSRST_IOMUX_APB			2
147fce1e39SEmil Renner Berthing #define JH7110_SYSRST_BUS			3
157fce1e39SEmil Renner Berthing #define JH7110_SYSRST_DEBUG			4
167fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CORE0			5
177fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CORE1			6
187fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CORE2			7
197fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CORE3			8
207fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CORE4			9
217fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CORE0_ST			10
227fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CORE1_ST			11
237fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CORE2_ST			12
247fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CORE3_ST			13
257fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CORE4_ST			14
267fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TRACE0			15
277fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TRACE1			16
287fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TRACE2			17
297fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TRACE3			18
307fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TRACE4			19
317fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TRACE_COM			20
327fce1e39SEmil Renner Berthing #define JH7110_SYSRST_GPU_APB			21
337fce1e39SEmil Renner Berthing #define JH7110_SYSRST_GPU_DOMA			22
347fce1e39SEmil Renner Berthing #define JH7110_SYSRST_NOC_BUS_APB		23
357fce1e39SEmil Renner Berthing #define JH7110_SYSRST_NOC_BUS_AXICFG0_AXI	24
367fce1e39SEmil Renner Berthing #define JH7110_SYSRST_NOC_BUS_CPU_AXI		25
377fce1e39SEmil Renner Berthing #define JH7110_SYSRST_NOC_BUS_DISP_AXI		26
387fce1e39SEmil Renner Berthing #define JH7110_SYSRST_NOC_BUS_GPU_AXI		27
397fce1e39SEmil Renner Berthing #define JH7110_SYSRST_NOC_BUS_ISP_AXI		28
407fce1e39SEmil Renner Berthing #define JH7110_SYSRST_NOC_BUS_DDRC		29
417fce1e39SEmil Renner Berthing #define JH7110_SYSRST_NOC_BUS_STG_AXI		30
427fce1e39SEmil Renner Berthing #define JH7110_SYSRST_NOC_BUS_VDEC_AXI		31
437fce1e39SEmil Renner Berthing 
447fce1e39SEmil Renner Berthing #define JH7110_SYSRST_NOC_BUS_VENC_AXI		32
457fce1e39SEmil Renner Berthing #define JH7110_SYSRST_AXI_CFG1_AHB		33
467fce1e39SEmil Renner Berthing #define JH7110_SYSRST_AXI_CFG1_MAIN		34
477fce1e39SEmil Renner Berthing #define JH7110_SYSRST_AXI_CFG0_MAIN		35
487fce1e39SEmil Renner Berthing #define JH7110_SYSRST_AXI_CFG0_MAIN_DIV		36
497fce1e39SEmil Renner Berthing #define JH7110_SYSRST_AXI_CFG0_HIFI4		37
507fce1e39SEmil Renner Berthing #define JH7110_SYSRST_DDR_AXI			38
517fce1e39SEmil Renner Berthing #define JH7110_SYSRST_DDR_OSC			39
527fce1e39SEmil Renner Berthing #define JH7110_SYSRST_DDR_APB			40
537fce1e39SEmil Renner Berthing #define JH7110_SYSRST_ISP_TOP			41
547fce1e39SEmil Renner Berthing #define JH7110_SYSRST_ISP_TOP_AXI		42
557fce1e39SEmil Renner Berthing #define JH7110_SYSRST_VOUT_TOP_SRC		43
567fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CODAJ12_AXI		44
577fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CODAJ12_CORE		45
587fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CODAJ12_APB		46
597fce1e39SEmil Renner Berthing #define JH7110_SYSRST_WAVE511_AXI		47
607fce1e39SEmil Renner Berthing #define JH7110_SYSRST_WAVE511_BPU		48
617fce1e39SEmil Renner Berthing #define JH7110_SYSRST_WAVE511_VCE		49
627fce1e39SEmil Renner Berthing #define JH7110_SYSRST_WAVE511_APB		50
637fce1e39SEmil Renner Berthing #define JH7110_SYSRST_VDEC_JPG			51
647fce1e39SEmil Renner Berthing #define JH7110_SYSRST_VDEC_MAIN			52
657fce1e39SEmil Renner Berthing #define JH7110_SYSRST_AXIMEM0_AXI		53
667fce1e39SEmil Renner Berthing #define JH7110_SYSRST_WAVE420L_AXI		54
677fce1e39SEmil Renner Berthing #define JH7110_SYSRST_WAVE420L_BPU		55
687fce1e39SEmil Renner Berthing #define JH7110_SYSRST_WAVE420L_VCE		56
697fce1e39SEmil Renner Berthing #define JH7110_SYSRST_WAVE420L_APB		57
707fce1e39SEmil Renner Berthing #define JH7110_SYSRST_AXIMEM1_AXI		58
717fce1e39SEmil Renner Berthing #define JH7110_SYSRST_AXIMEM2_AXI		59
727fce1e39SEmil Renner Berthing #define JH7110_SYSRST_INTMEM			60
737fce1e39SEmil Renner Berthing #define JH7110_SYSRST_QSPI_AHB			61
747fce1e39SEmil Renner Berthing #define JH7110_SYSRST_QSPI_APB			62
757fce1e39SEmil Renner Berthing #define JH7110_SYSRST_QSPI_REF			63
767fce1e39SEmil Renner Berthing 
777fce1e39SEmil Renner Berthing #define JH7110_SYSRST_SDIO0_AHB			64
787fce1e39SEmil Renner Berthing #define JH7110_SYSRST_SDIO1_AHB			65
797fce1e39SEmil Renner Berthing #define JH7110_SYSRST_GMAC1_AXI			66
807fce1e39SEmil Renner Berthing #define JH7110_SYSRST_GMAC1_AHB			67
817fce1e39SEmil Renner Berthing #define JH7110_SYSRST_MAILBOX_APB		68
827fce1e39SEmil Renner Berthing #define JH7110_SYSRST_SPI0_APB			69
837fce1e39SEmil Renner Berthing #define JH7110_SYSRST_SPI1_APB			70
847fce1e39SEmil Renner Berthing #define JH7110_SYSRST_SPI2_APB			71
857fce1e39SEmil Renner Berthing #define JH7110_SYSRST_SPI3_APB			72
867fce1e39SEmil Renner Berthing #define JH7110_SYSRST_SPI4_APB			73
877fce1e39SEmil Renner Berthing #define JH7110_SYSRST_SPI5_APB			74
887fce1e39SEmil Renner Berthing #define JH7110_SYSRST_SPI6_APB			75
897fce1e39SEmil Renner Berthing #define JH7110_SYSRST_I2C0_APB			76
907fce1e39SEmil Renner Berthing #define JH7110_SYSRST_I2C1_APB			77
917fce1e39SEmil Renner Berthing #define JH7110_SYSRST_I2C2_APB			78
927fce1e39SEmil Renner Berthing #define JH7110_SYSRST_I2C3_APB			79
937fce1e39SEmil Renner Berthing #define JH7110_SYSRST_I2C4_APB			80
947fce1e39SEmil Renner Berthing #define JH7110_SYSRST_I2C5_APB			81
957fce1e39SEmil Renner Berthing #define JH7110_SYSRST_I2C6_APB			82
967fce1e39SEmil Renner Berthing #define JH7110_SYSRST_UART0_APB			83
977fce1e39SEmil Renner Berthing #define JH7110_SYSRST_UART0_CORE		84
987fce1e39SEmil Renner Berthing #define JH7110_SYSRST_UART1_APB			85
997fce1e39SEmil Renner Berthing #define JH7110_SYSRST_UART1_CORE		86
1007fce1e39SEmil Renner Berthing #define JH7110_SYSRST_UART2_APB			87
1017fce1e39SEmil Renner Berthing #define JH7110_SYSRST_UART2_CORE		88
1027fce1e39SEmil Renner Berthing #define JH7110_SYSRST_UART3_APB			89
1037fce1e39SEmil Renner Berthing #define JH7110_SYSRST_UART3_CORE		90
1047fce1e39SEmil Renner Berthing #define JH7110_SYSRST_UART4_APB			91
1057fce1e39SEmil Renner Berthing #define JH7110_SYSRST_UART4_CORE		92
1067fce1e39SEmil Renner Berthing #define JH7110_SYSRST_UART5_APB			93
1077fce1e39SEmil Renner Berthing #define JH7110_SYSRST_UART5_CORE		94
1087fce1e39SEmil Renner Berthing #define JH7110_SYSRST_SPDIF_APB			95
1097fce1e39SEmil Renner Berthing 
1107fce1e39SEmil Renner Berthing #define JH7110_SYSRST_PWMDAC_APB		96
1117fce1e39SEmil Renner Berthing #define JH7110_SYSRST_PDM_DMIC			97
1127fce1e39SEmil Renner Berthing #define JH7110_SYSRST_PDM_APB			98
1137fce1e39SEmil Renner Berthing #define JH7110_SYSRST_I2SRX_APB			99
1147fce1e39SEmil Renner Berthing #define JH7110_SYSRST_I2SRX_BCLK		100
1157fce1e39SEmil Renner Berthing #define JH7110_SYSRST_I2STX0_APB		101
1167fce1e39SEmil Renner Berthing #define JH7110_SYSRST_I2STX0_BCLK		102
1177fce1e39SEmil Renner Berthing #define JH7110_SYSRST_I2STX1_APB		103
1187fce1e39SEmil Renner Berthing #define JH7110_SYSRST_I2STX1_BCLK		104
1197fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TDM_AHB			105
1207fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TDM_CORE			106
1217fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TDM_APB			107
1227fce1e39SEmil Renner Berthing #define JH7110_SYSRST_PWM_APB			108
1237fce1e39SEmil Renner Berthing #define JH7110_SYSRST_WDT_APB			109
1247fce1e39SEmil Renner Berthing #define JH7110_SYSRST_WDT_CORE			110
1257fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CAN0_APB			111
1267fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CAN0_CORE			112
1277fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CAN0_TIMER		113
1287fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CAN1_APB			114
1297fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CAN1_CORE			115
1307fce1e39SEmil Renner Berthing #define JH7110_SYSRST_CAN1_TIMER		116
1317fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TIMER_APB			117
1327fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TIMER0			118
1337fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TIMER1			119
1347fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TIMER2			120
1357fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TIMER3			121
1367fce1e39SEmil Renner Berthing #define JH7110_SYSRST_INT_CTRL_APB		122
1377fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TEMP_APB			123
1387fce1e39SEmil Renner Berthing #define JH7110_SYSRST_TEMP_CORE			124
1397fce1e39SEmil Renner Berthing #define JH7110_SYSRST_JTAG_CERTIFICATION	125
1407fce1e39SEmil Renner Berthing 
1417fce1e39SEmil Renner Berthing #define JH7110_SYSRST_END			126
1427fce1e39SEmil Renner Berthing 
1433de0c910SEmil Renner Berthing /* AONCRG resets */
1443de0c910SEmil Renner Berthing #define JH7110_AONRST_GMAC0_AXI			0
1453de0c910SEmil Renner Berthing #define JH7110_AONRST_GMAC0_AHB			1
1463de0c910SEmil Renner Berthing #define JH7110_AONRST_IOMUX			2
1473de0c910SEmil Renner Berthing #define JH7110_AONRST_PMU_APB			3
1483de0c910SEmil Renner Berthing #define JH7110_AONRST_PMU_WKUP			4
1493de0c910SEmil Renner Berthing #define JH7110_AONRST_RTC_APB			5
1503de0c910SEmil Renner Berthing #define JH7110_AONRST_RTC_CAL			6
1513de0c910SEmil Renner Berthing #define JH7110_AONRST_RTC_32K			7
1523de0c910SEmil Renner Berthing 
1533de0c910SEmil Renner Berthing #define JH7110_AONRST_END			8
1543de0c910SEmil Renner Berthing 
15514b14a57SXingyu Wu /* STGCRG resets */
15614b14a57SXingyu Wu #define JH7110_STGRST_SYSCON			0
15714b14a57SXingyu Wu #define JH7110_STGRST_HIFI4_CORE		1
15814b14a57SXingyu Wu #define JH7110_STGRST_HIFI4_AXI			2
15914b14a57SXingyu Wu #define JH7110_STGRST_SEC_AHB			3
16014b14a57SXingyu Wu #define JH7110_STGRST_E24_CORE			4
16114b14a57SXingyu Wu #define JH7110_STGRST_DMA1P_AXI			5
16214b14a57SXingyu Wu #define JH7110_STGRST_DMA1P_AHB			6
16314b14a57SXingyu Wu #define JH7110_STGRST_USB0_AXI			7
16414b14a57SXingyu Wu #define JH7110_STGRST_USB0_APB			8
16514b14a57SXingyu Wu #define JH7110_STGRST_USB0_UTMI_APB		9
16614b14a57SXingyu Wu #define JH7110_STGRST_USB0_PWRUP		10
16714b14a57SXingyu Wu #define JH7110_STGRST_PCIE0_AXI_MST0		11
16814b14a57SXingyu Wu #define JH7110_STGRST_PCIE0_AXI_SLV0		12
16914b14a57SXingyu Wu #define JH7110_STGRST_PCIE0_AXI_SLV		13
17014b14a57SXingyu Wu #define JH7110_STGRST_PCIE0_BRG			14
17114b14a57SXingyu Wu #define JH7110_STGRST_PCIE0_CORE		15
17214b14a57SXingyu Wu #define JH7110_STGRST_PCIE0_APB			16
17314b14a57SXingyu Wu #define JH7110_STGRST_PCIE1_AXI_MST0		17
17414b14a57SXingyu Wu #define JH7110_STGRST_PCIE1_AXI_SLV0		18
17514b14a57SXingyu Wu #define JH7110_STGRST_PCIE1_AXI_SLV		19
17614b14a57SXingyu Wu #define JH7110_STGRST_PCIE1_BRG			20
17714b14a57SXingyu Wu #define JH7110_STGRST_PCIE1_CORE		21
17814b14a57SXingyu Wu #define JH7110_STGRST_PCIE1_APB			22
17914b14a57SXingyu Wu 
18014b14a57SXingyu Wu #define JH7110_STGRST_END			23
18114b14a57SXingyu Wu 
1829b3938c0SXingyu Wu /* ISPCRG resets */
1839b3938c0SXingyu Wu #define JH7110_ISPRST_ISPV2_TOP_WRAPPER_P	0
1849b3938c0SXingyu Wu #define JH7110_ISPRST_ISPV2_TOP_WRAPPER_C	1
1859b3938c0SXingyu Wu #define JH7110_ISPRST_M31DPHY_HW		2
1869b3938c0SXingyu Wu #define JH7110_ISPRST_M31DPHY_B09_AON		3
1879b3938c0SXingyu Wu #define JH7110_ISPRST_VIN_APB			4
1889b3938c0SXingyu Wu #define JH7110_ISPRST_VIN_PIXEL_IF0		5
1899b3938c0SXingyu Wu #define JH7110_ISPRST_VIN_PIXEL_IF1		6
1909b3938c0SXingyu Wu #define JH7110_ISPRST_VIN_PIXEL_IF2		7
1919b3938c0SXingyu Wu #define JH7110_ISPRST_VIN_PIXEL_IF3		8
1929b3938c0SXingyu Wu #define JH7110_ISPRST_VIN_SYS			9
1939b3938c0SXingyu Wu #define JH7110_ISPRST_VIN_P_AXI_RD		10
1949b3938c0SXingyu Wu #define JH7110_ISPRST_VIN_P_AXI_WR		11
1959b3938c0SXingyu Wu 
1969b3938c0SXingyu Wu #define JH7110_ISPRST_END			12
1979b3938c0SXingyu Wu 
198*a097a5ecSXingyu Wu /* VOUTCRG resets */
199*a097a5ecSXingyu Wu #define JH7110_VOUTRST_DC8200_AXI		0
200*a097a5ecSXingyu Wu #define JH7110_VOUTRST_DC8200_AHB		1
201*a097a5ecSXingyu Wu #define JH7110_VOUTRST_DC8200_CORE		2
202*a097a5ecSXingyu Wu #define JH7110_VOUTRST_DSITX_DPI		3
203*a097a5ecSXingyu Wu #define JH7110_VOUTRST_DSITX_APB		4
204*a097a5ecSXingyu Wu #define JH7110_VOUTRST_DSITX_RXESC		5
205*a097a5ecSXingyu Wu #define JH7110_VOUTRST_DSITX_SYS		6
206*a097a5ecSXingyu Wu #define JH7110_VOUTRST_DSITX_TXBYTEHS		7
207*a097a5ecSXingyu Wu #define JH7110_VOUTRST_DSITX_TXESC		8
208*a097a5ecSXingyu Wu #define JH7110_VOUTRST_HDMI_TX_HDMI		9
209*a097a5ecSXingyu Wu #define JH7110_VOUTRST_MIPITX_DPHY_SYS		10
210*a097a5ecSXingyu Wu #define JH7110_VOUTRST_MIPITX_DPHY_TXBYTEHS	11
211*a097a5ecSXingyu Wu 
212*a097a5ecSXingyu Wu #define JH7110_VOUTRST_END			12
213*a097a5ecSXingyu Wu 
2147fce1e39SEmil Renner Berthing #endif /* __DT_BINDINGS_RESET_STARFIVE_JH7110_CRG_H__ */
215