aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/firmware
diff options
context:
space:
mode:
authorNava kishore Manne <nava.manne@xilinx.com>2019-01-25 02:46:52 -0500
committerMichal Simek <michal.simek@xilinx.com>2019-01-29 08:06:58 -0500
commitbc3843d4d357061d92e7800c7da342e2d068772c (patch)
treee1285819c7ac9ee84c18ef8a1fa3dcba1d193dc3 /include/linux/firmware
parentbfeffd155283772bbe78c6a05dec7c0128ee500c (diff)
firmware: xilinx: Add reset API's
This Patch Adds reset API's to support release, assert and status functionalities by using firmware interface. Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'include/linux/firmware')
-rw-r--r--include/linux/firmware/xlnx-zynqmp.h136
1 files changed, 136 insertions, 0 deletions
diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
index 3c3c28eff56a..07c587a0b06e 100644
--- a/include/linux/firmware/xlnx-zynqmp.h
+++ b/include/linux/firmware/xlnx-zynqmp.h
@@ -34,6 +34,8 @@
34 34
35enum pm_api_id { 35enum pm_api_id {
36 PM_GET_API_VERSION = 1, 36 PM_GET_API_VERSION = 1,
37 PM_RESET_ASSERT = 17,
38 PM_RESET_GET_STATUS,
37 PM_IOCTL = 34, 39 PM_IOCTL = 34,
38 PM_QUERY_DATA, 40 PM_QUERY_DATA,
39 PM_CLOCK_ENABLE, 41 PM_CLOCK_ENABLE,
@@ -75,6 +77,137 @@ enum pm_query_id {
75 PM_QID_CLOCK_GET_NUM_CLOCKS = 12, 77 PM_QID_CLOCK_GET_NUM_CLOCKS = 12,
76}; 78};
77 79
80enum zynqmp_pm_reset_action {
81 PM_RESET_ACTION_RELEASE,
82 PM_RESET_ACTION_ASSERT,
83 PM_RESET_ACTION_PULSE,
84};
85
86enum zynqmp_pm_reset {
87 ZYNQMP_PM_RESET_START = 1000,
88 ZYNQMP_PM_RESET_PCIE_CFG = ZYNQMP_PM_RESET_START,
89 ZYNQMP_PM_RESET_PCIE_BRIDGE,
90 ZYNQMP_PM_RESET_PCIE_CTRL,
91 ZYNQMP_PM_RESET_DP,
92 ZYNQMP_PM_RESET_SWDT_CRF,
93 ZYNQMP_PM_RESET_AFI_FM5,
94 ZYNQMP_PM_RESET_AFI_FM4,
95 ZYNQMP_PM_RESET_AFI_FM3,
96 ZYNQMP_PM_RESET_AFI_FM2,
97 ZYNQMP_PM_RESET_AFI_FM1,
98 ZYNQMP_PM_RESET_AFI_FM0,
99 ZYNQMP_PM_RESET_GDMA,
100 ZYNQMP_PM_RESET_GPU_PP1,
101 ZYNQMP_PM_RESET_GPU_PP0,
102 ZYNQMP_PM_RESET_GPU,
103 ZYNQMP_PM_RESET_GT,
104 ZYNQMP_PM_RESET_SATA,
105 ZYNQMP_PM_RESET_ACPU3_PWRON,
106 ZYNQMP_PM_RESET_ACPU2_PWRON,
107 ZYNQMP_PM_RESET_ACPU1_PWRON,
108 ZYNQMP_PM_RESET_ACPU0_PWRON,
109 ZYNQMP_PM_RESET_APU_L2,
110 ZYNQMP_PM_RESET_ACPU3,
111 ZYNQMP_PM_RESET_ACPU2,
112 ZYNQMP_PM_RESET_ACPU1,
113 ZYNQMP_PM_RESET_ACPU0,
114 ZYNQMP_PM_RESET_DDR,
115 ZYNQMP_PM_RESET_APM_FPD,
116 ZYNQMP_PM_RESET_SOFT,
117 ZYNQMP_PM_RESET_GEM0,
118 ZYNQMP_PM_RESET_GEM1,
119 ZYNQMP_PM_RESET_GEM2,
120 ZYNQMP_PM_RESET_GEM3,
121 ZYNQMP_PM_RESET_QSPI,
122 ZYNQMP_PM_RESET_UART0,
123 ZYNQMP_PM_RESET_UART1,
124 ZYNQMP_PM_RESET_SPI0,
125 ZYNQMP_PM_RESET_SPI1,
126 ZYNQMP_PM_RESET_SDIO0,
127 ZYNQMP_PM_RESET_SDIO1,
128 ZYNQMP_PM_RESET_CAN0,
129 ZYNQMP_PM_RESET_CAN1,
130 ZYNQMP_PM_RESET_I2C0,
131 ZYNQMP_PM_RESET_I2C1,
132 ZYNQMP_PM_RESET_TTC0,
133 ZYNQMP_PM_RESET_TTC1,
134 ZYNQMP_PM_RESET_TTC2,
135 ZYNQMP_PM_RESET_TTC3,
136 ZYNQMP_PM_RESET_SWDT_CRL,
137 ZYNQMP_PM_RESET_NAND,
138 ZYNQMP_PM_RESET_ADMA,
139 ZYNQMP_PM_RESET_GPIO,
140 ZYNQMP_PM_RESET_IOU_CC,
141 ZYNQMP_PM_RESET_TIMESTAMP,
142 ZYNQMP_PM_RESET_RPU_R50,
143 ZYNQMP_PM_RESET_RPU_R51,
144 ZYNQMP_PM_RESET_RPU_AMBA,
145 ZYNQMP_PM_RESET_OCM,
146 ZYNQMP_PM_RESET_RPU_PGE,
147 ZYNQMP_PM_RESET_USB0_CORERESET,
148 ZYNQMP_PM_RESET_USB1_CORERESET,
149 ZYNQMP_PM_RESET_USB0_HIBERRESET,
150 ZYNQMP_PM_RESET_USB1_HIBERRESET,
151 ZYNQMP_PM_RESET_USB0_APB,
152 ZYNQMP_PM_RESET_USB1_APB,
153 ZYNQMP_PM_RESET_IPI,
154 ZYNQMP_PM_RESET_APM_LPD,
155 ZYNQMP_PM_RESET_RTC,
156 ZYNQMP_PM_RESET_SYSMON,
157 ZYNQMP_PM_RESET_AFI_FM6,
158 ZYNQMP_PM_RESET_LPD_SWDT,
159 ZYNQMP_PM_RESET_FPD,
160 ZYNQMP_PM_RESET_RPU_DBG1,
161 ZYNQMP_PM_RESET_RPU_DBG0,
162 ZYNQMP_PM_RESET_DBG_LPD,
163 ZYNQMP_PM_RESET_DBG_FPD,
164 ZYNQMP_PM_RESET_APLL,
165 ZYNQMP_PM_RESET_DPLL,
166 ZYNQMP_PM_RESET_VPLL,
167 ZYNQMP_PM_RESET_IOPLL,
168 ZYNQMP_PM_RESET_RPLL,
169 ZYNQMP_PM_RESET_GPO3_PL_0,
170 ZYNQMP_PM_RESET_GPO3_PL_1,
171 ZYNQMP_PM_RESET_GPO3_PL_2,
172 ZYNQMP_PM_RESET_GPO3_PL_3,
173 ZYNQMP_PM_RESET_GPO3_PL_4,
174 ZYNQMP_PM_RESET_GPO3_PL_5,
175 ZYNQMP_PM_RESET_GPO3_PL_6,
176 ZYNQMP_PM_RESET_GPO3_PL_7,
177 ZYNQMP_PM_RESET_GPO3_PL_8,
178 ZYNQMP_PM_RESET_GPO3_PL_9,
179 ZYNQMP_PM_RESET_GPO3_PL_10,
180 ZYNQMP_PM_RESET_GPO3_PL_11,
181 ZYNQMP_PM_RESET_GPO3_PL_12,
182 ZYNQMP_PM_RESET_GPO3_PL_13,
183 ZYNQMP_PM_RESET_GPO3_PL_14,
184 ZYNQMP_PM_RESET_GPO3_PL_15,
185 ZYNQMP_PM_RESET_GPO3_PL_16,
186 ZYNQMP_PM_RESET_GPO3_PL_17,
187 ZYNQMP_PM_RESET_GPO3_PL_18,
188 ZYNQMP_PM_RESET_GPO3_PL_19,
189 ZYNQMP_PM_RESET_GPO3_PL_20,
190 ZYNQMP_PM_RESET_GPO3_PL_21,
191 ZYNQMP_PM_RESET_GPO3_PL_22,
192 ZYNQMP_PM_RESET_GPO3_PL_23,
193 ZYNQMP_PM_RESET_GPO3_PL_24,
194 ZYNQMP_PM_RESET_GPO3_PL_25,
195 ZYNQMP_PM_RESET_GPO3_PL_26,
196 ZYNQMP_PM_RESET_GPO3_PL_27,
197 ZYNQMP_PM_RESET_GPO3_PL_28,
198 ZYNQMP_PM_RESET_GPO3_PL_29,
199 ZYNQMP_PM_RESET_GPO3_PL_30,
200 ZYNQMP_PM_RESET_GPO3_PL_31,
201 ZYNQMP_PM_RESET_RPU_LS,
202 ZYNQMP_PM_RESET_PS_ONLY,
203 ZYNQMP_PM_RESET_PL,
204 ZYNQMP_PM_RESET_PS_PL0,
205 ZYNQMP_PM_RESET_PS_PL1,
206 ZYNQMP_PM_RESET_PS_PL2,
207 ZYNQMP_PM_RESET_PS_PL3,
208 ZYNQMP_PM_RESET_END = ZYNQMP_PM_RESET_PS_PL3
209};
210
78/** 211/**
79 * struct zynqmp_pm_query_data - PM query data 212 * struct zynqmp_pm_query_data - PM query data
80 * @qid: query ID 213 * @qid: query ID
@@ -102,6 +235,9 @@ struct zynqmp_eemi_ops {
102 int (*clock_setparent)(u32 clock_id, u32 parent_id); 235 int (*clock_setparent)(u32 clock_id, u32 parent_id);
103 int (*clock_getparent)(u32 clock_id, u32 *parent_id); 236 int (*clock_getparent)(u32 clock_id, u32 *parent_id);
104 int (*ioctl)(u32 node_id, u32 ioctl_id, u32 arg1, u32 arg2, u32 *out); 237 int (*ioctl)(u32 node_id, u32 ioctl_id, u32 arg1, u32 arg2, u32 *out);
238 int (*reset_assert)(const enum zynqmp_pm_reset reset,
239 const enum zynqmp_pm_reset_action assert_flag);
240 int (*reset_get_status)(const enum zynqmp_pm_reset reset, u32 *status);
105}; 241};
106 242
107#if IS_REACHABLE(CONFIG_ARCH_ZYNQMP) 243#if IS_REACHABLE(CONFIG_ARCH_ZYNQMP)