aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-07-19 20:13:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-19 20:13:56 -0400
commit8362fd64f07eaef7155c94fca8dee91c4f99a666 (patch)
tree2d16af7d7b8cbb5765727493f796d453580fc107 /include
parent24e44913aa746098349370a0f279733c0cadcba7 (diff)
parent8c0993621c3e5fa52e5425ef2a0f67a0cde07092 (diff)
Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull ARM SoC-related driver updates from Olof Johansson: "Various driver updates for platforms and a couple of the small driver subsystems we merge through our tree: - A driver for SCU (system control) on NXP i.MX8QXP - Qualcomm Always-on Subsystem messaging driver (AOSS QMP) - Qualcomm PM support for MSM8998 - Support for a newer version of DRAM PHY driver for Broadcom (DPFE) - Reset controller support for Bitmain BM1880 - TI SCI (System Control Interface) support for CPU control on AM654 processors - More TI sysc refactoring and rework" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (84 commits) reset: remove redundant null check on pointer dev soc: rockchip: work around clang warning dt-bindings: reset: imx7: Fix the spelling of 'indices' soc: imx: Add i.MX8MN SoC driver support soc: aspeed: lpc-ctrl: Fix probe error handling soc: qcom: geni: Add support for ACPI firmware: ti_sci: Fix gcc unused-but-set-variable warning firmware: ti_sci: Use the correct style for SPDX License Identifier soc: imx8: Use existing of_root directly soc: imx8: Fix potential kernel dump in error path firmware/psci: psci_checker: Park kthreads before stopping them memory: move jedec_ddr.h from include/memory to drivers/memory/ memory: move jedec_ddr_data.c from lib/ to drivers/memory/ MAINTAINERS: Remove myself as qcom maintainer soc: aspeed: lpc-ctrl: make parameter optional soc: qcom: apr: Don't use reg for domain id soc: qcom: fix QCOM_AOSS_QMP dependency and build errors memory: tegra: Fix -Wunused-const-variable firmware: tegra: Early resume BPMP soc/tegra: Select pinctrl for Tegra194 ...
Diffstat (limited to 'include')
-rw-r--r--include/dt-bindings/power/qcom-aoss-qmp.h14
-rw-r--r--include/dt-bindings/power/qcom-rpmpd.h34
-rw-r--r--include/dt-bindings/reset/bitmain,bm1880-reset.h51
-rw-r--r--include/linux/platform_data/ti-sysc.h12
-rw-r--r--include/linux/scmi_protocol.h1
-rw-r--r--include/linux/soc/ti/ti_sci_protocol.h246
-rw-r--r--include/memory/jedec_ddr.h172
-rw-r--r--include/soc/fsl/bman.h8
-rw-r--r--include/soc/fsl/qman.h9
9 files changed, 375 insertions, 172 deletions
diff --git a/include/dt-bindings/power/qcom-aoss-qmp.h b/include/dt-bindings/power/qcom-aoss-qmp.h
new file mode 100644
index 000000000000..ec336d31dee4
--- /dev/null
+++ b/include/dt-bindings/power/qcom-aoss-qmp.h
@@ -0,0 +1,14 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/* Copyright (c) 2018, Linaro Ltd. */
3
4#ifndef __DT_BINDINGS_POWER_QCOM_AOSS_QMP_H
5#define __DT_BINDINGS_POWER_QCOM_AOSS_QMP_H
6
7#define AOSS_QMP_LS_CDSP 0
8#define AOSS_QMP_LS_LPASS 1
9#define AOSS_QMP_LS_MODEM 2
10#define AOSS_QMP_LS_SLPI 3
11#define AOSS_QMP_LS_SPSS 4
12#define AOSS_QMP_LS_VENUS 5
13
14#endif
diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h
index 87d9c6611682..93e36d011527 100644
--- a/include/dt-bindings/power/qcom-rpmpd.h
+++ b/include/dt-bindings/power/qcom-rpmpd.h
@@ -36,4 +36,38 @@
36#define MSM8996_VDDSSCX 5 36#define MSM8996_VDDSSCX 5
37#define MSM8996_VDDSSCX_VFC 6 37#define MSM8996_VDDSSCX_VFC 6
38 38
39/* MSM8998 Power Domain Indexes */
40#define MSM8998_VDDCX 0
41#define MSM8998_VDDCX_AO 1
42#define MSM8998_VDDCX_VFL 2
43#define MSM8998_VDDMX 3
44#define MSM8998_VDDMX_AO 4
45#define MSM8998_VDDMX_VFL 5
46#define MSM8998_SSCCX 6
47#define MSM8998_SSCCX_VFL 7
48#define MSM8998_SSCMX 8
49#define MSM8998_SSCMX_VFL 9
50
51/* QCS404 Power Domains */
52#define QCS404_VDDMX 0
53#define QCS404_VDDMX_AO 1
54#define QCS404_VDDMX_VFL 2
55#define QCS404_LPICX 3
56#define QCS404_LPICX_VFL 4
57#define QCS404_LPIMX 5
58#define QCS404_LPIMX_VFL 6
59
60/* RPM SMD Power Domain performance levels */
61#define RPM_SMD_LEVEL_RETENTION 16
62#define RPM_SMD_LEVEL_RETENTION_PLUS 32
63#define RPM_SMD_LEVEL_MIN_SVS 48
64#define RPM_SMD_LEVEL_LOW_SVS 64
65#define RPM_SMD_LEVEL_SVS 128
66#define RPM_SMD_LEVEL_SVS_PLUS 192
67#define RPM_SMD_LEVEL_NOM 256
68#define RPM_SMD_LEVEL_NOM_PLUS 320
69#define RPM_SMD_LEVEL_TURBO 384
70#define RPM_SMD_LEVEL_TURBO_NO_CPR 416
71#define RPM_SMD_LEVEL_BINNING 512
72
39#endif 73#endif
diff --git a/include/dt-bindings/reset/bitmain,bm1880-reset.h b/include/dt-bindings/reset/bitmain,bm1880-reset.h
new file mode 100644
index 000000000000..4c0de5223773
--- /dev/null
+++ b/include/dt-bindings/reset/bitmain,bm1880-reset.h
@@ -0,0 +1,51 @@
1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (c) 2018 Bitmain Ltd.
4 * Copyright (c) 2019 Linaro Ltd.
5 */
6
7#ifndef _DT_BINDINGS_BM1880_RESET_H
8#define _DT_BINDINGS_BM1880_RESET_H
9
10#define BM1880_RST_MAIN_AP 0
11#define BM1880_RST_SECOND_AP 1
12#define BM1880_RST_DDR 2
13#define BM1880_RST_VIDEO 3
14#define BM1880_RST_JPEG 4
15#define BM1880_RST_VPP 5
16#define BM1880_RST_GDMA 6
17#define BM1880_RST_AXI_SRAM 7
18#define BM1880_RST_TPU 8
19#define BM1880_RST_USB 9
20#define BM1880_RST_ETH0 10
21#define BM1880_RST_ETH1 11
22#define BM1880_RST_NAND 12
23#define BM1880_RST_EMMC 13
24#define BM1880_RST_SD 14
25#define BM1880_RST_SDMA 15
26#define BM1880_RST_I2S0 16
27#define BM1880_RST_I2S1 17
28#define BM1880_RST_UART0_1_CLK 18
29#define BM1880_RST_UART0_1_ACLK 19
30#define BM1880_RST_UART2_3_CLK 20
31#define BM1880_RST_UART2_3_ACLK 21
32#define BM1880_RST_MINER 22
33#define BM1880_RST_I2C0 23
34#define BM1880_RST_I2C1 24
35#define BM1880_RST_I2C2 25
36#define BM1880_RST_I2C3 26
37#define BM1880_RST_I2C4 27
38#define BM1880_RST_PWM0 28
39#define BM1880_RST_PWM1 29
40#define BM1880_RST_PWM2 30
41#define BM1880_RST_PWM3 31
42#define BM1880_RST_SPI 32
43#define BM1880_RST_GPIO0 33
44#define BM1880_RST_GPIO1 34
45#define BM1880_RST_GPIO2 35
46#define BM1880_RST_EFUSE 36
47#define BM1880_RST_WDT 37
48#define BM1880_RST_AHB_ROM 38
49#define BM1880_RST_SPIC 39
50
51#endif /* _DT_BINDINGS_BM1880_RESET_H */
diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h
index 9256c0305968..0c587d4fc718 100644
--- a/include/linux/platform_data/ti-sysc.h
+++ b/include/linux/platform_data/ti-sysc.h
@@ -19,6 +19,7 @@ enum ti_sysc_module_type {
19 19
20struct ti_sysc_cookie { 20struct ti_sysc_cookie {
21 void *data; 21 void *data;
22 void *clkdm;
22}; 23};
23 24
24/** 25/**
@@ -46,6 +47,10 @@ struct sysc_regbits {
46 s8 emufree_shift; 47 s8 emufree_shift;
47}; 48};
48 49
50#define SYSC_MODULE_QUIRK_HDQ1W BIT(17)
51#define SYSC_MODULE_QUIRK_I2C BIT(16)
52#define SYSC_MODULE_QUIRK_WDT BIT(15)
53#define SYSS_QUIRK_RESETDONE_INVERTED BIT(14)
49#define SYSC_QUIRK_SWSUP_MSTANDBY BIT(13) 54#define SYSC_QUIRK_SWSUP_MSTANDBY BIT(13)
50#define SYSC_QUIRK_SWSUP_SIDLE_ACT BIT(12) 55#define SYSC_QUIRK_SWSUP_SIDLE_ACT BIT(12)
51#define SYSC_QUIRK_SWSUP_SIDLE BIT(11) 56#define SYSC_QUIRK_SWSUP_SIDLE BIT(11)
@@ -125,9 +130,16 @@ struct ti_sysc_module_data {
125}; 130};
126 131
127struct device; 132struct device;
133struct clk;
128 134
129struct ti_sysc_platform_data { 135struct ti_sysc_platform_data {
130 struct of_dev_auxdata *auxdata; 136 struct of_dev_auxdata *auxdata;
137 int (*init_clockdomain)(struct device *dev, struct clk *fck,
138 struct clk *ick, struct ti_sysc_cookie *cookie);
139 void (*clkdm_deny_idle)(struct device *dev,
140 const struct ti_sysc_cookie *cookie);
141 void (*clkdm_allow_idle)(struct device *dev,
142 const struct ti_sysc_cookie *cookie);
131 int (*init_module)(struct device *dev, 143 int (*init_module)(struct device *dev,
132 const struct ti_sysc_module_data *data, 144 const struct ti_sysc_module_data *data,
133 struct ti_sysc_cookie *cookie); 145 struct ti_sysc_cookie *cookie);
diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h
index 3105055c00a7..9ff2e9357e9a 100644
--- a/include/linux/scmi_protocol.h
+++ b/include/linux/scmi_protocol.h
@@ -144,6 +144,7 @@ struct scmi_power_ops {
144struct scmi_sensor_info { 144struct scmi_sensor_info {
145 u32 id; 145 u32 id;
146 u8 type; 146 u8 type;
147 s8 scale;
147 char name[SCMI_MAX_STR_SIZE]; 148 char name[SCMI_MAX_STR_SIZE];
148}; 149};
149 150
diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h
index 406e6717d252..6c610e188a44 100644
--- a/include/linux/soc/ti/ti_sci_protocol.h
+++ b/include/linux/soc/ti/ti_sci_protocol.h
@@ -241,12 +241,254 @@ struct ti_sci_rm_irq_ops {
241 u16 global_event, u8 vint_status_bit); 241 u16 global_event, u8 vint_status_bit);
242}; 242};
243 243
244/* RA config.addr_lo parameter is valid for RM ring configure TI_SCI message */
245#define TI_SCI_MSG_VALUE_RM_RING_ADDR_LO_VALID BIT(0)
246/* RA config.addr_hi parameter is valid for RM ring configure TI_SCI message */
247#define TI_SCI_MSG_VALUE_RM_RING_ADDR_HI_VALID BIT(1)
248 /* RA config.count parameter is valid for RM ring configure TI_SCI message */
249#define TI_SCI_MSG_VALUE_RM_RING_COUNT_VALID BIT(2)
250/* RA config.mode parameter is valid for RM ring configure TI_SCI message */
251#define TI_SCI_MSG_VALUE_RM_RING_MODE_VALID BIT(3)
252/* RA config.size parameter is valid for RM ring configure TI_SCI message */
253#define TI_SCI_MSG_VALUE_RM_RING_SIZE_VALID BIT(4)
254/* RA config.order_id parameter is valid for RM ring configure TISCI message */
255#define TI_SCI_MSG_VALUE_RM_RING_ORDER_ID_VALID BIT(5)
256
257#define TI_SCI_MSG_VALUE_RM_ALL_NO_ORDER \
258 (TI_SCI_MSG_VALUE_RM_RING_ADDR_LO_VALID | \
259 TI_SCI_MSG_VALUE_RM_RING_ADDR_HI_VALID | \
260 TI_SCI_MSG_VALUE_RM_RING_COUNT_VALID | \
261 TI_SCI_MSG_VALUE_RM_RING_MODE_VALID | \
262 TI_SCI_MSG_VALUE_RM_RING_SIZE_VALID)
263
264/**
265 * struct ti_sci_rm_ringacc_ops - Ring Accelerator Management operations
266 * @config: configure the SoC Navigator Subsystem Ring Accelerator ring
267 * @get_config: get the SoC Navigator Subsystem Ring Accelerator ring
268 * configuration
269 */
270struct ti_sci_rm_ringacc_ops {
271 int (*config)(const struct ti_sci_handle *handle,
272 u32 valid_params, u16 nav_id, u16 index,
273 u32 addr_lo, u32 addr_hi, u32 count, u8 mode,
274 u8 size, u8 order_id
275 );
276 int (*get_config)(const struct ti_sci_handle *handle,
277 u32 nav_id, u32 index, u8 *mode,
278 u32 *addr_lo, u32 *addr_hi, u32 *count,
279 u8 *size, u8 *order_id);
280};
281
282/**
283 * struct ti_sci_rm_psil_ops - PSI-L thread operations
284 * @pair: pair PSI-L source thread to a destination thread.
285 * If the src_thread is mapped to UDMA tchan, the corresponding channel's
286 * TCHAN_THRD_ID register is updated.
287 * If the dst_thread is mapped to UDMA rchan, the corresponding channel's
288 * RCHAN_THRD_ID register is updated.
289 * @unpair: unpair PSI-L source thread from a destination thread.
290 * If the src_thread is mapped to UDMA tchan, the corresponding channel's
291 * TCHAN_THRD_ID register is cleared.
292 * If the dst_thread is mapped to UDMA rchan, the corresponding channel's
293 * RCHAN_THRD_ID register is cleared.
294 */
295struct ti_sci_rm_psil_ops {
296 int (*pair)(const struct ti_sci_handle *handle, u32 nav_id,
297 u32 src_thread, u32 dst_thread);
298 int (*unpair)(const struct ti_sci_handle *handle, u32 nav_id,
299 u32 src_thread, u32 dst_thread);
300};
301
302/* UDMAP channel types */
303#define TI_SCI_RM_UDMAP_CHAN_TYPE_PKT_PBRR 2
304#define TI_SCI_RM_UDMAP_CHAN_TYPE_PKT_PBRR_SB 3 /* RX only */
305#define TI_SCI_RM_UDMAP_CHAN_TYPE_3RDP_PBRR 10
306#define TI_SCI_RM_UDMAP_CHAN_TYPE_3RDP_PBVR 11
307#define TI_SCI_RM_UDMAP_CHAN_TYPE_3RDP_BCOPY_PBRR 12
308#define TI_SCI_RM_UDMAP_CHAN_TYPE_3RDP_BCOPY_PBVR 13
309
310#define TI_SCI_RM_UDMAP_RX_FLOW_DESC_HOST 0
311#define TI_SCI_RM_UDMAP_RX_FLOW_DESC_MONO 2
312
313#define TI_SCI_RM_UDMAP_CHAN_BURST_SIZE_64_BYTES 1
314#define TI_SCI_RM_UDMAP_CHAN_BURST_SIZE_128_BYTES 2
315#define TI_SCI_RM_UDMAP_CHAN_BURST_SIZE_256_BYTES 3
316
317/* UDMAP TX/RX channel valid_params common declarations */
318#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_PAUSE_ON_ERR_VALID BIT(0)
319#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_ATYPE_VALID BIT(1)
320#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_CHAN_TYPE_VALID BIT(2)
321#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_FETCH_SIZE_VALID BIT(3)
322#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_CQ_QNUM_VALID BIT(4)
323#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_PRIORITY_VALID BIT(5)
324#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_QOS_VALID BIT(6)
325#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_ORDER_ID_VALID BIT(7)
326#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_SCHED_PRIORITY_VALID BIT(8)
327#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_BURST_SIZE_VALID BIT(14)
328
329/**
330 * Configures a Navigator Subsystem UDMAP transmit channel
331 *
332 * Configures a Navigator Subsystem UDMAP transmit channel registers.
333 * See @ti_sci_msg_rm_udmap_tx_ch_cfg_req
334 */
335struct ti_sci_msg_rm_udmap_tx_ch_cfg {
336 u32 valid_params;
337#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_FILT_EINFO_VALID BIT(9)
338#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_FILT_PSWORDS_VALID BIT(10)
339#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_SUPR_TDPKT_VALID BIT(11)
340#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_CREDIT_COUNT_VALID BIT(12)
341#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_FDEPTH_VALID BIT(13)
342 u16 nav_id;
343 u16 index;
344 u8 tx_pause_on_err;
345 u8 tx_filt_einfo;
346 u8 tx_filt_pswords;
347 u8 tx_atype;
348 u8 tx_chan_type;
349 u8 tx_supr_tdpkt;
350 u16 tx_fetch_size;
351 u8 tx_credit_count;
352 u16 txcq_qnum;
353 u8 tx_priority;
354 u8 tx_qos;
355 u8 tx_orderid;
356 u16 fdepth;
357 u8 tx_sched_priority;
358 u8 tx_burst_size;
359};
360
361/**
362 * Configures a Navigator Subsystem UDMAP receive channel
363 *
364 * Configures a Navigator Subsystem UDMAP receive channel registers.
365 * See @ti_sci_msg_rm_udmap_rx_ch_cfg_req
366 */
367struct ti_sci_msg_rm_udmap_rx_ch_cfg {
368 u32 valid_params;
369#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_RX_FLOWID_START_VALID BIT(9)
370#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_RX_FLOWID_CNT_VALID BIT(10)
371#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_RX_IGNORE_SHORT_VALID BIT(11)
372#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_RX_IGNORE_LONG_VALID BIT(12)
373 u16 nav_id;
374 u16 index;
375 u16 rx_fetch_size;
376 u16 rxcq_qnum;
377 u8 rx_priority;
378 u8 rx_qos;
379 u8 rx_orderid;
380 u8 rx_sched_priority;
381 u16 flowid_start;
382 u16 flowid_cnt;
383 u8 rx_pause_on_err;
384 u8 rx_atype;
385 u8 rx_chan_type;
386 u8 rx_ignore_short;
387 u8 rx_ignore_long;
388 u8 rx_burst_size;
389};
390
391/**
392 * Configures a Navigator Subsystem UDMAP receive flow
393 *
394 * Configures a Navigator Subsystem UDMAP receive flow's registers.
395 * See @tis_ci_msg_rm_udmap_flow_cfg_req
396 */
397struct ti_sci_msg_rm_udmap_flow_cfg {
398 u32 valid_params;
399#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_EINFO_PRESENT_VALID BIT(0)
400#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_PSINFO_PRESENT_VALID BIT(1)
401#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_ERROR_HANDLING_VALID BIT(2)
402#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_DESC_TYPE_VALID BIT(3)
403#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_SOP_OFFSET_VALID BIT(4)
404#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_DEST_QNUM_VALID BIT(5)
405#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_SRC_TAG_HI_VALID BIT(6)
406#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_SRC_TAG_LO_VALID BIT(7)
407#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_DEST_TAG_HI_VALID BIT(8)
408#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_DEST_TAG_LO_VALID BIT(9)
409#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_SRC_TAG_HI_SEL_VALID BIT(10)
410#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_SRC_TAG_LO_SEL_VALID BIT(11)
411#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_DEST_TAG_HI_SEL_VALID BIT(12)
412#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_DEST_TAG_LO_SEL_VALID BIT(13)
413#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_FDQ0_SZ0_QNUM_VALID BIT(14)
414#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_FDQ1_QNUM_VALID BIT(15)
415#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_FDQ2_QNUM_VALID BIT(16)
416#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_FDQ3_QNUM_VALID BIT(17)
417#define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_PS_LOCATION_VALID BIT(18)
418 u16 nav_id;
419 u16 flow_index;
420 u8 rx_einfo_present;
421 u8 rx_psinfo_present;
422 u8 rx_error_handling;
423 u8 rx_desc_type;
424 u16 rx_sop_offset;
425 u16 rx_dest_qnum;
426 u8 rx_src_tag_hi;
427 u8 rx_src_tag_lo;
428 u8 rx_dest_tag_hi;
429 u8 rx_dest_tag_lo;
430 u8 rx_src_tag_hi_sel;
431 u8 rx_src_tag_lo_sel;
432 u8 rx_dest_tag_hi_sel;
433 u8 rx_dest_tag_lo_sel;
434 u16 rx_fdq0_sz0_qnum;
435 u16 rx_fdq1_qnum;
436 u16 rx_fdq2_qnum;
437 u16 rx_fdq3_qnum;
438 u8 rx_ps_location;
439};
440
441/**
442 * struct ti_sci_rm_udmap_ops - UDMA Management operations
443 * @tx_ch_cfg: configure SoC Navigator Subsystem UDMA transmit channel.
444 * @rx_ch_cfg: configure SoC Navigator Subsystem UDMA receive channel.
445 * @rx_flow_cfg1: configure SoC Navigator Subsystem UDMA receive flow.
446 */
447struct ti_sci_rm_udmap_ops {
448 int (*tx_ch_cfg)(const struct ti_sci_handle *handle,
449 const struct ti_sci_msg_rm_udmap_tx_ch_cfg *params);
450 int (*rx_ch_cfg)(const struct ti_sci_handle *handle,
451 const struct ti_sci_msg_rm_udmap_rx_ch_cfg *params);
452 int (*rx_flow_cfg)(const struct ti_sci_handle *handle,
453 const struct ti_sci_msg_rm_udmap_flow_cfg *params);
454};
455
456/**
457 * struct ti_sci_proc_ops - Processor Control operations
458 * @request: Request to control a physical processor. The requesting host
459 * should be in the processor access list
460 * @release: Relinquish a physical processor control
461 * @handover: Handover a physical processor control to another host
462 * in the permitted list
463 * @set_config: Set base configuration of a processor
464 * @set_control: Setup limited control flags in specific cases
465 * @get_status: Get the state of physical processor
466 *
467 * NOTE: The following paramteres are generic in nature for all these ops,
468 * -handle: Pointer to TI SCI handle as retrieved by *ti_sci_get_handle
469 * -pid: Processor ID
470 * -hid: Host ID
471 */
472struct ti_sci_proc_ops {
473 int (*request)(const struct ti_sci_handle *handle, u8 pid);
474 int (*release)(const struct ti_sci_handle *handle, u8 pid);
475 int (*handover)(const struct ti_sci_handle *handle, u8 pid, u8 hid);
476 int (*set_config)(const struct ti_sci_handle *handle, u8 pid,
477 u64 boot_vector, u32 cfg_set, u32 cfg_clr);
478 int (*set_control)(const struct ti_sci_handle *handle, u8 pid,
479 u32 ctrl_set, u32 ctrl_clr);
480 int (*get_status)(const struct ti_sci_handle *handle, u8 pid,
481 u64 *boot_vector, u32 *cfg_flags, u32 *ctrl_flags,
482 u32 *status_flags);
483};
484
244/** 485/**
245 * struct ti_sci_ops - Function support for TI SCI 486 * struct ti_sci_ops - Function support for TI SCI
246 * @dev_ops: Device specific operations 487 * @dev_ops: Device specific operations
247 * @clk_ops: Clock specific operations 488 * @clk_ops: Clock specific operations
248 * @rm_core_ops: Resource management core operations. 489 * @rm_core_ops: Resource management core operations.
249 * @rm_irq_ops: IRQ management specific operations 490 * @rm_irq_ops: IRQ management specific operations
491 * @proc_ops: Processor Control specific operations
250 */ 492 */
251struct ti_sci_ops { 493struct ti_sci_ops {
252 struct ti_sci_core_ops core_ops; 494 struct ti_sci_core_ops core_ops;
@@ -254,6 +496,10 @@ struct ti_sci_ops {
254 struct ti_sci_clk_ops clk_ops; 496 struct ti_sci_clk_ops clk_ops;
255 struct ti_sci_rm_core_ops rm_core_ops; 497 struct ti_sci_rm_core_ops rm_core_ops;
256 struct ti_sci_rm_irq_ops rm_irq_ops; 498 struct ti_sci_rm_irq_ops rm_irq_ops;
499 struct ti_sci_rm_ringacc_ops rm_ring_ops;
500 struct ti_sci_rm_psil_ops rm_psil_ops;
501 struct ti_sci_rm_udmap_ops rm_udmap_ops;
502 struct ti_sci_proc_ops proc_ops;
257}; 503};
258 504
259/** 505/**
diff --git a/include/memory/jedec_ddr.h b/include/memory/jedec_ddr.h
deleted file mode 100644
index 90a9dabbe606..000000000000
--- a/include/memory/jedec_ddr.h
+++ /dev/null
@@ -1,172 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Definitions for DDR memories based on JEDEC specs
4 *
5 * Copyright (C) 2012 Texas Instruments, Inc.
6 *
7 * Aneesh V <aneesh@ti.com>
8 */
9#ifndef __LINUX_JEDEC_DDR_H
10#define __LINUX_JEDEC_DDR_H
11
12#include <linux/types.h>
13
14/* DDR Densities */
15#define DDR_DENSITY_64Mb 1
16#define DDR_DENSITY_128Mb 2
17#define DDR_DENSITY_256Mb 3
18#define DDR_DENSITY_512Mb 4
19#define DDR_DENSITY_1Gb 5
20#define DDR_DENSITY_2Gb 6
21#define DDR_DENSITY_4Gb 7
22#define DDR_DENSITY_8Gb 8
23#define DDR_DENSITY_16Gb 9
24#define DDR_DENSITY_32Gb 10
25
26/* DDR type */
27#define DDR_TYPE_DDR2 1
28#define DDR_TYPE_DDR3 2
29#define DDR_TYPE_LPDDR2_S4 3
30#define DDR_TYPE_LPDDR2_S2 4
31#define DDR_TYPE_LPDDR2_NVM 5
32
33/* DDR IO width */
34#define DDR_IO_WIDTH_4 1
35#define DDR_IO_WIDTH_8 2
36#define DDR_IO_WIDTH_16 3
37#define DDR_IO_WIDTH_32 4
38
39/* Number of Row bits */
40#define R9 9
41#define R10 10
42#define R11 11
43#define R12 12
44#define R13 13
45#define R14 14
46#define R15 15
47#define R16 16
48
49/* Number of Column bits */
50#define C7 7
51#define C8 8
52#define C9 9
53#define C10 10
54#define C11 11
55#define C12 12
56
57/* Number of Banks */
58#define B1 0
59#define B2 1
60#define B4 2
61#define B8 3
62
63/* Refresh rate in nano-seconds */
64#define T_REFI_15_6 15600
65#define T_REFI_7_8 7800
66#define T_REFI_3_9 3900
67
68/* tRFC values */
69#define T_RFC_90 90000
70#define T_RFC_110 110000
71#define T_RFC_130 130000
72#define T_RFC_160 160000
73#define T_RFC_210 210000
74#define T_RFC_300 300000
75#define T_RFC_350 350000
76
77/* Mode register numbers */
78#define DDR_MR0 0
79#define DDR_MR1 1
80#define DDR_MR2 2
81#define DDR_MR3 3
82#define DDR_MR4 4
83#define DDR_MR5 5
84#define DDR_MR6 6
85#define DDR_MR7 7
86#define DDR_MR8 8
87#define DDR_MR9 9
88#define DDR_MR10 10
89#define DDR_MR11 11
90#define DDR_MR16 16
91#define DDR_MR17 17
92#define DDR_MR18 18
93
94/*
95 * LPDDR2 related defines
96 */
97
98/* MR4 register fields */
99#define MR4_SDRAM_REF_RATE_SHIFT 0
100#define MR4_SDRAM_REF_RATE_MASK 7
101#define MR4_TUF_SHIFT 7
102#define MR4_TUF_MASK (1 << 7)
103
104/* MR4 SDRAM Refresh Rate field values */
105#define SDRAM_TEMP_NOMINAL 0x3
106#define SDRAM_TEMP_RESERVED_4 0x4
107#define SDRAM_TEMP_HIGH_DERATE_REFRESH 0x5
108#define SDRAM_TEMP_HIGH_DERATE_REFRESH_AND_TIMINGS 0x6
109#define SDRAM_TEMP_VERY_HIGH_SHUTDOWN 0x7
110
111#define NUM_DDR_ADDR_TABLE_ENTRIES 11
112#define NUM_DDR_TIMING_TABLE_ENTRIES 4
113
114/* Structure for DDR addressing info from the JEDEC spec */
115struct lpddr2_addressing {
116 u32 num_banks;
117 u32 tREFI_ns;
118 u32 tRFCab_ps;
119};
120
121/*
122 * Structure for timings from the LPDDR2 datasheet
123 * All parameters are in pico seconds(ps) unless explicitly indicated
124 * with a suffix like tRAS_max_ns below
125 */
126struct lpddr2_timings {
127 u32 max_freq;
128 u32 min_freq;
129 u32 tRPab;
130 u32 tRCD;
131 u32 tWR;
132 u32 tRAS_min;
133 u32 tRRD;
134 u32 tWTR;
135 u32 tXP;
136 u32 tRTP;
137 u32 tCKESR;
138 u32 tDQSCK_max;
139 u32 tDQSCK_max_derated;
140 u32 tFAW;
141 u32 tZQCS;
142 u32 tZQCL;
143 u32 tZQinit;
144 u32 tRAS_max_ns;
145};
146
147/*
148 * Min value for some parameters in terms of number of tCK cycles(nCK)
149 * Please set to zero parameters that are not valid for a given memory
150 * type
151 */
152struct lpddr2_min_tck {
153 u32 tRPab;
154 u32 tRCD;
155 u32 tWR;
156 u32 tRASmin;
157 u32 tRRD;
158 u32 tWTR;
159 u32 tXP;
160 u32 tRTP;
161 u32 tCKE;
162 u32 tCKESR;
163 u32 tFAW;
164};
165
166extern const struct lpddr2_addressing
167 lpddr2_jedec_addressing_table[NUM_DDR_ADDR_TABLE_ENTRIES];
168extern const struct lpddr2_timings
169 lpddr2_jedec_timings[NUM_DDR_TIMING_TABLE_ENTRIES];
170extern const struct lpddr2_min_tck lpddr2_jedec_min_tck;
171
172#endif /* __LINUX_JEDEC_DDR_H */
diff --git a/include/soc/fsl/bman.h b/include/soc/fsl/bman.h
index 5b99cb2ea5ef..173e4049d963 100644
--- a/include/soc/fsl/bman.h
+++ b/include/soc/fsl/bman.h
@@ -133,5 +133,13 @@ int bman_acquire(struct bman_pool *pool, struct bm_buffer *bufs, u8 num);
133 * failed to probe or 0 if the bman driver did not probed yet. 133 * failed to probe or 0 if the bman driver did not probed yet.
134 */ 134 */
135int bman_is_probed(void); 135int bman_is_probed(void);
136/**
137 * bman_portals_probed - Check if all cpu bound bman portals are probed
138 *
139 * Returns 1 if all the required cpu bound bman portals successfully probed,
140 * -1 if probe errors appeared or 0 if the bman portals did not yet finished
141 * probing.
142 */
143int bman_portals_probed(void);
136 144
137#endif /* __FSL_BMAN_H */ 145#endif /* __FSL_BMAN_H */
diff --git a/include/soc/fsl/qman.h b/include/soc/fsl/qman.h
index 5cc7af06c1ba..aa31c05a103a 100644
--- a/include/soc/fsl/qman.h
+++ b/include/soc/fsl/qman.h
@@ -1195,6 +1195,15 @@ int qman_release_cgrid(u32 id);
1195int qman_is_probed(void); 1195int qman_is_probed(void);
1196 1196
1197/** 1197/**
1198 * qman_portals_probed - Check if all cpu bound qman portals are probed
1199 *
1200 * Returns 1 if all the required cpu bound qman portals successfully probed,
1201 * -1 if probe errors appeared or 0 if the qman portals did not yet finished
1202 * probing.
1203 */
1204int qman_portals_probed(void);
1205
1206/**
1198 * qman_dqrr_get_ithresh - Get coalesce interrupt threshold 1207 * qman_dqrr_get_ithresh - Get coalesce interrupt threshold
1199 * @portal: portal to get the value for 1208 * @portal: portal to get the value for
1200 * @ithresh: threshold pointer 1209 * @ithresh: threshold pointer