1*12517bc9SJean-Christophe Dubois /* 2*12517bc9SJean-Christophe Dubois * IMX7 System Reset Controller 3*12517bc9SJean-Christophe Dubois * 4*12517bc9SJean-Christophe Dubois * Copyright (C) 2023 Jean-Christophe Dubois <jcd@tribudubois.net> 5*12517bc9SJean-Christophe Dubois * 6*12517bc9SJean-Christophe Dubois * This work is licensed under the terms of the GNU GPL, version 2 or later. 7*12517bc9SJean-Christophe Dubois * See the COPYING file in the top-level directory. 8*12517bc9SJean-Christophe Dubois */ 9*12517bc9SJean-Christophe Dubois 10*12517bc9SJean-Christophe Dubois #ifndef IMX7_SRC_H 11*12517bc9SJean-Christophe Dubois #define IMX7_SRC_H 12*12517bc9SJean-Christophe Dubois 13*12517bc9SJean-Christophe Dubois #include "hw/sysbus.h" 14*12517bc9SJean-Christophe Dubois #include "qemu/bitops.h" 15*12517bc9SJean-Christophe Dubois #include "qom/object.h" 16*12517bc9SJean-Christophe Dubois 17*12517bc9SJean-Christophe Dubois #define SRC_SCR 0 18*12517bc9SJean-Christophe Dubois #define SRC_A7RCR0 1 19*12517bc9SJean-Christophe Dubois #define SRC_A7RCR1 2 20*12517bc9SJean-Christophe Dubois #define SRC_M4RCR 3 21*12517bc9SJean-Christophe Dubois #define SRC_ERCR 5 22*12517bc9SJean-Christophe Dubois #define SRC_HSICPHY_RCR 7 23*12517bc9SJean-Christophe Dubois #define SRC_USBOPHY1_RCR 8 24*12517bc9SJean-Christophe Dubois #define SRC_USBOPHY2_RCR 9 25*12517bc9SJean-Christophe Dubois #define SRC_MPIPHY_RCR 10 26*12517bc9SJean-Christophe Dubois #define SRC_PCIEPHY_RCR 11 27*12517bc9SJean-Christophe Dubois #define SRC_SBMR1 22 28*12517bc9SJean-Christophe Dubois #define SRC_SRSR 23 29*12517bc9SJean-Christophe Dubois #define SRC_SISR 26 30*12517bc9SJean-Christophe Dubois #define SRC_SIMR 27 31*12517bc9SJean-Christophe Dubois #define SRC_SBMR2 28 32*12517bc9SJean-Christophe Dubois #define SRC_GPR1 29 33*12517bc9SJean-Christophe Dubois #define SRC_GPR2 30 34*12517bc9SJean-Christophe Dubois #define SRC_GPR3 31 35*12517bc9SJean-Christophe Dubois #define SRC_GPR4 32 36*12517bc9SJean-Christophe Dubois #define SRC_GPR5 33 37*12517bc9SJean-Christophe Dubois #define SRC_GPR6 34 38*12517bc9SJean-Christophe Dubois #define SRC_GPR7 35 39*12517bc9SJean-Christophe Dubois #define SRC_GPR8 36 40*12517bc9SJean-Christophe Dubois #define SRC_GPR9 37 41*12517bc9SJean-Christophe Dubois #define SRC_GPR10 38 42*12517bc9SJean-Christophe Dubois #define SRC_MAX 39 43*12517bc9SJean-Christophe Dubois 44*12517bc9SJean-Christophe Dubois /* SRC_A7SCR1 */ 45*12517bc9SJean-Christophe Dubois #define R_CORE1_ENABLE_SHIFT 1 46*12517bc9SJean-Christophe Dubois #define R_CORE1_ENABLE_LENGTH 1 47*12517bc9SJean-Christophe Dubois /* SRC_A7SCR0 */ 48*12517bc9SJean-Christophe Dubois #define R_CORE1_RST_SHIFT 5 49*12517bc9SJean-Christophe Dubois #define R_CORE1_RST_LENGTH 1 50*12517bc9SJean-Christophe Dubois #define R_CORE0_RST_SHIFT 4 51*12517bc9SJean-Christophe Dubois #define R_CORE0_RST_LENGTH 1 52*12517bc9SJean-Christophe Dubois 53*12517bc9SJean-Christophe Dubois #define TYPE_IMX7_SRC "imx7.src" 54*12517bc9SJean-Christophe Dubois OBJECT_DECLARE_SIMPLE_TYPE(IMX7SRCState, IMX7_SRC) 55*12517bc9SJean-Christophe Dubois 56*12517bc9SJean-Christophe Dubois struct IMX7SRCState { 57*12517bc9SJean-Christophe Dubois /* <private> */ 58*12517bc9SJean-Christophe Dubois SysBusDevice parent_obj; 59*12517bc9SJean-Christophe Dubois 60*12517bc9SJean-Christophe Dubois /* <public> */ 61*12517bc9SJean-Christophe Dubois MemoryRegion iomem; 62*12517bc9SJean-Christophe Dubois 63*12517bc9SJean-Christophe Dubois uint32_t regs[SRC_MAX]; 64*12517bc9SJean-Christophe Dubois }; 65*12517bc9SJean-Christophe Dubois 66*12517bc9SJean-Christophe Dubois #endif /* IMX7_SRC_H */ 67