Home | History | Annotate | Line # | Download | only in nxp
      1  1.2  msaitoh /*	$NetBSD: imx6_srcreg.h,v 1.2 2024/02/07 04:20:27 msaitoh Exp $	*/
      2  1.1    skrll 
      3  1.1    skrll /*
      4  1.2  msaitoh  * Copyright (c) 2014 Ryo Shimizu
      5  1.1    skrll  * All rights reserved.
      6  1.1    skrll  *
      7  1.1    skrll  * Redistribution and use in source and binary forms, with or without
      8  1.1    skrll  * modification, are permitted provided that the following conditions
      9  1.1    skrll  * are met:
     10  1.1    skrll  * 1. Redistributions of source code must retain the above copyright
     11  1.1    skrll  *    notice, this list of conditions and the following disclaimer.
     12  1.1    skrll  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1    skrll  *    notice, this list of conditions and the following disclaimer in the
     14  1.1    skrll  *    documentation and/or other materials provided with the distribution.
     15  1.1    skrll  *
     16  1.1    skrll  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     17  1.1    skrll  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     18  1.1    skrll  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
     19  1.1    skrll  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
     20  1.1    skrll  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
     21  1.1    skrll  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     22  1.1    skrll  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     23  1.1    skrll  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     24  1.1    skrll  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
     25  1.1    skrll  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     26  1.1    skrll  * POSSIBILITY OF SUCH DAMAGE.
     27  1.1    skrll  */
     28  1.1    skrll 
     29  1.1    skrll #ifndef _IMX6_SRCREG_H_
     30  1.1    skrll #define _IMX6_SRCREG_H_
     31  1.1    skrll 
     32  1.1    skrll #include <sys/cdefs.h>
     33  1.1    skrll 
     34  1.1    skrll /* SRC - System Reset Controller */
     35  1.1    skrll #define SRC_SCR					0x00000000
     36  1.1    skrll #define  SRC_SCR_DBG_RST_MASK_PG		__BIT(25)
     37  1.1    skrll 
     38  1.1    skrll #define  SRC_SCR_COREN_ENABLE(n)		__BIT(22 + ((n) - 1))	/* no core0 bit */
     39  1.1    skrll #define  SRC_SCR_CORE3_ENABLE			__BIT(24)
     40  1.1    skrll #define  SRC_SCR_CORE2_ENABLE			__BIT(23)
     41  1.1    skrll #define  SRC_SCR_CORE1_ENABLE			__BIT(22)
     42  1.1    skrll #define  SRC_SCR_CORES_DBG_RST			__BIT(21)
     43  1.1    skrll #define  SRC_SCR_COREN_DBG_RST(n)		__BIT(17 + (n))
     44  1.1    skrll #define  SRC_SCR_CORE3_DBG_RST			__BIT(20)
     45  1.1    skrll #define  SRC_SCR_CORE2_DBG_RST			__BIT(19)
     46  1.1    skrll #define  SRC_SCR_CORE1_DBG_RST			__BIT(18)
     47  1.1    skrll #define  SRC_SCR_CORE0_DBG_RST			__BIT(17)
     48  1.1    skrll #define  SRC_SCR_COREN_RST(n)			__BIT(13 + (n))
     49  1.1    skrll #define  SRC_SCR_CORE3_RST			__BIT(16)
     50  1.1    skrll #define  SRC_SCR_CORE2_RST			__BIT(15)
     51  1.1    skrll #define  SRC_SCR_CORE1_RST			__BIT(14)
     52  1.1    skrll #define  SRC_SCR_CORE0_RST			__BIT(13)
     53  1.1    skrll #define  SRC_SCR_SW_IPU2_RST			__BIT(12)
     54  1.1    skrll #define  SRC_SCR_EIM_RST			__BIT(11)
     55  1.1    skrll #define  SRC_SCR_MASK_WDOG_RST			__BITS(10, 7)
     56  1.1    skrll #define  SRC_SCR_WARM_RST_BYPASS_COUNT		__BITS(6, 5)
     57  1.1    skrll #define  SRC_SCR_SW_OPEN_VG_RS			__BIT(4)
     58  1.1    skrll #define  SRC_SCR_SW_IPU1_RST			__BIT(3)
     59  1.1    skrll #define  SRC_SCR_SW_VPU_RST			__BIT(2)
     60  1.1    skrll #define  SRC_SCR_SW_GPU_RST			__BIT(1)
     61  1.1    skrll #define  SRC_SCR_WARM_RESET_ENABLE		__BIT(0)
     62  1.1    skrll #define SRC_SBMR1				0x00000004
     63  1.1    skrll #define SRC_SRSR				0x00000008
     64  1.1    skrll #define  SRC_SRSR_WARM_BOOT			__BIT(16)
     65  1.1    skrll #define  SRC_SRSR_RESERVED7			__BITS(15, 7)
     66  1.1    skrll #define  SRC_SRSR_JTAG_SW_RST			__BIT(6)
     67  1.1    skrll #define  SRC_SRSR_JTAG_RST_B			__BIT(5)
     68  1.1    skrll #define  SRC_SRSR_WDOG_RST_B			__BIT(4)
     69  1.1    skrll #define  SRC_SRSR_IPP_USER_RESET_		__BIT(3)
     70  1.1    skrll #define  SRC_SRSR_CSU_RESET_B			__BIT(2)
     71  1.1    skrll #define  SRC_SRSR_RESERVED1			__BIT(1)
     72  1.1    skrll #define  SRC_SRSR_IPP_RESET_B			__BIT(0)
     73  1.1    skrll #define SRC_SISR				0x00000014
     74  1.1    skrll #define  SRC_SISR_CORE3_WDOG_RST_REQ		__BIT(8)
     75  1.1    skrll #define  SRC_SISR_CORE2_WDOG_RST_REQ		__BIT(7)
     76  1.1    skrll #define  SRC_SISR_CORE1_WDOG_RST_REQ		__BIT(6)
     77  1.1    skrll #define  SRC_SISR_CORE0_WDOG_RST_REQ		__BIT(5)
     78  1.1    skrll #define  SRC_SISR_IPU2_PASSED_RESET		__BIT(4)
     79  1.1    skrll #define  SRC_SISR_OPEN_VG_PASSED_RESET		__BIT(3)
     80  1.1    skrll #define  SRC_SISR_IPU1_PASSED_RESET		__BIT(2)
     81  1.1    skrll #define  SRC_SISR_VPU_PASSED_RESET		__BIT(1)
     82  1.1    skrll #define  SRC_SISR_GPU_PASSED_RESET		__BIT(0)
     83  1.1    skrll #define SRC_SIMR				0x00000018
     84  1.1    skrll #define  SRC_SIMR_MASK_IPU2_PASSED_RESET	_BIT(4)
     85  1.1    skrll #define  SRC_SIMR_MASK_OPEN_VG_PASSED_RESET	_BIT(3)
     86  1.1    skrll #define  SRC_SIMR_MASK_IPU_PASSED_RESET		_BIT(2)
     87  1.1    skrll #define  SRC_SIMR_MASK_VPU_PASSED_RESET		_BIT(1)
     88  1.1    skrll #define  SRC_SIMR_MASK_GPU_PASSED_RESET		_BIT(0)
     89  1.1    skrll #define SRC_SBMR2				0x0000001c
     90  1.1    skrll #define SRC_GPRN_ENTRY(n)			(0x20 + (8 * (n)))
     91  1.1    skrll #define SRC_GPR1				0x00000020 /* core0 entry */
     92  1.1    skrll #define SRC_GPR2				0x00000024
     93  1.1    skrll #define SRC_GPR3				0x00000028 /* core1 entry */
     94  1.1    skrll #define SRC_GPR4				0x0000002c
     95  1.1    skrll #define SRC_GPR5				0x00000030 /* core2 entry */
     96  1.1    skrll #define SRC_GPR6				0x00000034
     97  1.1    skrll #define SRC_GPR7				0x00000038 /* core3 entry */
     98  1.1    skrll #define SRC_GPR8				0x0000003c
     99  1.1    skrll #define SRC_GPR9				0x00000040
    100  1.1    skrll #define SRC_GPR10				0x00000044
    101  1.1    skrll #define  SRC_GPR10_CORE3_ERROR_STATUS		__BIT(27)
    102  1.1    skrll #define  SRC_GPR10_CORE2_ERROR_STATUS		__BIT(26)
    103  1.1    skrll #define  SRC_GPR10_CORE1_ERROR_STATUS		__BIT(25)
    104  1.1    skrll 
    105  1.1    skrll #endif /* _IMX6_SRCREG_H_ */
    106