xref: /netbsd-src/sys/arch/arm/nxp/imx6_srcreg.h (revision 90313c06e62e910bf0d1bb24faa9d17dcefd0ab6)
1*90313c06Smsaitoh /*	$NetBSD: imx6_srcreg.h,v 1.2 2024/02/07 04:20:27 msaitoh Exp $	*/
28644267aSskrll 
38644267aSskrll /*
4*90313c06Smsaitoh  * Copyright (c) 2014 Ryo Shimizu
58644267aSskrll  * All rights reserved.
68644267aSskrll  *
78644267aSskrll  * Redistribution and use in source and binary forms, with or without
88644267aSskrll  * modification, are permitted provided that the following conditions
98644267aSskrll  * are met:
108644267aSskrll  * 1. Redistributions of source code must retain the above copyright
118644267aSskrll  *    notice, this list of conditions and the following disclaimer.
128644267aSskrll  * 2. Redistributions in binary form must reproduce the above copyright
138644267aSskrll  *    notice, this list of conditions and the following disclaimer in the
148644267aSskrll  *    documentation and/or other materials provided with the distribution.
158644267aSskrll  *
168644267aSskrll  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
178644267aSskrll  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
188644267aSskrll  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
198644267aSskrll  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
208644267aSskrll  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
218644267aSskrll  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
228644267aSskrll  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
238644267aSskrll  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
248644267aSskrll  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
258644267aSskrll  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
268644267aSskrll  * POSSIBILITY OF SUCH DAMAGE.
278644267aSskrll  */
288644267aSskrll 
298644267aSskrll #ifndef _IMX6_SRCREG_H_
308644267aSskrll #define _IMX6_SRCREG_H_
318644267aSskrll 
328644267aSskrll #include <sys/cdefs.h>
338644267aSskrll 
348644267aSskrll /* SRC - System Reset Controller */
358644267aSskrll #define SRC_SCR					0x00000000
368644267aSskrll #define  SRC_SCR_DBG_RST_MASK_PG		__BIT(25)
378644267aSskrll 
388644267aSskrll #define  SRC_SCR_COREN_ENABLE(n)		__BIT(22 + ((n) - 1))	/* no core0 bit */
398644267aSskrll #define  SRC_SCR_CORE3_ENABLE			__BIT(24)
408644267aSskrll #define  SRC_SCR_CORE2_ENABLE			__BIT(23)
418644267aSskrll #define  SRC_SCR_CORE1_ENABLE			__BIT(22)
428644267aSskrll #define  SRC_SCR_CORES_DBG_RST			__BIT(21)
438644267aSskrll #define  SRC_SCR_COREN_DBG_RST(n)		__BIT(17 + (n))
448644267aSskrll #define  SRC_SCR_CORE3_DBG_RST			__BIT(20)
458644267aSskrll #define  SRC_SCR_CORE2_DBG_RST			__BIT(19)
468644267aSskrll #define  SRC_SCR_CORE1_DBG_RST			__BIT(18)
478644267aSskrll #define  SRC_SCR_CORE0_DBG_RST			__BIT(17)
488644267aSskrll #define  SRC_SCR_COREN_RST(n)			__BIT(13 + (n))
498644267aSskrll #define  SRC_SCR_CORE3_RST			__BIT(16)
508644267aSskrll #define  SRC_SCR_CORE2_RST			__BIT(15)
518644267aSskrll #define  SRC_SCR_CORE1_RST			__BIT(14)
528644267aSskrll #define  SRC_SCR_CORE0_RST			__BIT(13)
538644267aSskrll #define  SRC_SCR_SW_IPU2_RST			__BIT(12)
548644267aSskrll #define  SRC_SCR_EIM_RST			__BIT(11)
558644267aSskrll #define  SRC_SCR_MASK_WDOG_RST			__BITS(10, 7)
568644267aSskrll #define  SRC_SCR_WARM_RST_BYPASS_COUNT		__BITS(6, 5)
578644267aSskrll #define  SRC_SCR_SW_OPEN_VG_RS			__BIT(4)
588644267aSskrll #define  SRC_SCR_SW_IPU1_RST			__BIT(3)
598644267aSskrll #define  SRC_SCR_SW_VPU_RST			__BIT(2)
608644267aSskrll #define  SRC_SCR_SW_GPU_RST			__BIT(1)
618644267aSskrll #define  SRC_SCR_WARM_RESET_ENABLE		__BIT(0)
628644267aSskrll #define SRC_SBMR1				0x00000004
638644267aSskrll #define SRC_SRSR				0x00000008
648644267aSskrll #define  SRC_SRSR_WARM_BOOT			__BIT(16)
658644267aSskrll #define  SRC_SRSR_RESERVED7			__BITS(15, 7)
668644267aSskrll #define  SRC_SRSR_JTAG_SW_RST			__BIT(6)
678644267aSskrll #define  SRC_SRSR_JTAG_RST_B			__BIT(5)
688644267aSskrll #define  SRC_SRSR_WDOG_RST_B			__BIT(4)
698644267aSskrll #define  SRC_SRSR_IPP_USER_RESET_		__BIT(3)
708644267aSskrll #define  SRC_SRSR_CSU_RESET_B			__BIT(2)
718644267aSskrll #define  SRC_SRSR_RESERVED1			__BIT(1)
728644267aSskrll #define  SRC_SRSR_IPP_RESET_B			__BIT(0)
738644267aSskrll #define SRC_SISR				0x00000014
748644267aSskrll #define  SRC_SISR_CORE3_WDOG_RST_REQ		__BIT(8)
758644267aSskrll #define  SRC_SISR_CORE2_WDOG_RST_REQ		__BIT(7)
768644267aSskrll #define  SRC_SISR_CORE1_WDOG_RST_REQ		__BIT(6)
778644267aSskrll #define  SRC_SISR_CORE0_WDOG_RST_REQ		__BIT(5)
788644267aSskrll #define  SRC_SISR_IPU2_PASSED_RESET		__BIT(4)
798644267aSskrll #define  SRC_SISR_OPEN_VG_PASSED_RESET		__BIT(3)
808644267aSskrll #define  SRC_SISR_IPU1_PASSED_RESET		__BIT(2)
818644267aSskrll #define  SRC_SISR_VPU_PASSED_RESET		__BIT(1)
828644267aSskrll #define  SRC_SISR_GPU_PASSED_RESET		__BIT(0)
838644267aSskrll #define SRC_SIMR				0x00000018
848644267aSskrll #define  SRC_SIMR_MASK_IPU2_PASSED_RESET	_BIT(4)
858644267aSskrll #define  SRC_SIMR_MASK_OPEN_VG_PASSED_RESET	_BIT(3)
868644267aSskrll #define  SRC_SIMR_MASK_IPU_PASSED_RESET		_BIT(2)
878644267aSskrll #define  SRC_SIMR_MASK_VPU_PASSED_RESET		_BIT(1)
888644267aSskrll #define  SRC_SIMR_MASK_GPU_PASSED_RESET		_BIT(0)
898644267aSskrll #define SRC_SBMR2				0x0000001c
908644267aSskrll #define SRC_GPRN_ENTRY(n)			(0x20 + (8 * (n)))
918644267aSskrll #define SRC_GPR1				0x00000020 /* core0 entry */
928644267aSskrll #define SRC_GPR2				0x00000024
938644267aSskrll #define SRC_GPR3				0x00000028 /* core1 entry */
948644267aSskrll #define SRC_GPR4				0x0000002c
958644267aSskrll #define SRC_GPR5				0x00000030 /* core2 entry */
968644267aSskrll #define SRC_GPR6				0x00000034
978644267aSskrll #define SRC_GPR7				0x00000038 /* core3 entry */
988644267aSskrll #define SRC_GPR8				0x0000003c
998644267aSskrll #define SRC_GPR9				0x00000040
1008644267aSskrll #define SRC_GPR10				0x00000044
1018644267aSskrll #define  SRC_GPR10_CORE3_ERROR_STATUS		__BIT(27)
1028644267aSskrll #define  SRC_GPR10_CORE2_ERROR_STATUS		__BIT(26)
1038644267aSskrll #define  SRC_GPR10_CORE1_ERROR_STATUS		__BIT(25)
1048644267aSskrll 
1058644267aSskrll #endif /* _IMX6_SRCREG_H_ */
106