Lines Matching +full:vref +full:- +full:p +full:- +full:supply

1 // SPDX-License-Identifier: GPL-2.0+
5 * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
14 #include <power-domain.h>
18 #include "k3-am654-ddrss.h"
26 * struct am654_ddrss_desc - Description of ddrss integration.
32 * @vtt_supply: VTT Supply regulator
56 debug("%s: addr = 0x%p, value = 0x%x\n", __func__, addr + offset, data); in ddrss_writel()
60 #define ddrss_ctl_writel(off, val) ddrss_writel(ddrss->ddrss_ctl_cfg, off, val)
61 #define ddrss_ctl_readl(off) ddrss_readl(ddrss->ddrss_ctl_cfg, off)
69 * am654_ddrss_dram_wait_for_init_complete() - Wait for init to complete
93 return -EINVAL; in am654_ddrss_dram_wait_for_init_complt()
97 ddrss->ddrss_ctl_cfg + DDRSS_DDRCTL_STAT, LDELAY)) in am654_ddrss_dram_wait_for_init_complt()
98 return -ETIMEDOUT; in am654_ddrss_dram_wait_for_init_complt()
104 * am654_ddrss_ctrl_configuration() - Configure Controller specific registers
109 struct ddrss_ddrctl_timing_params *tmg = &ddrss->params.ctl_timing; in am654_ddrss_ctrl_configuration()
110 struct ddrss_ddrctl_reg_params *reg = &ddrss->params.ctl_reg; in am654_ddrss_ctrl_configuration()
111 struct ddrss_ddrctl_ecc_params *ecc = &ddrss->params.ctl_ecc; in am654_ddrss_ctrl_configuration()
112 struct ddrss_ddrctl_crc_params *crc = &ddrss->params.ctl_crc; in am654_ddrss_ctrl_configuration()
113 struct ddrss_ddrctl_map_params *map = &ddrss->params.ctl_map; in am654_ddrss_ctrl_configuration()
118 ddrss_ctl_writel(DDRSS_DDRCTL_MSTR, reg->ddrctl_mstr); in am654_ddrss_ctrl_configuration()
119 ddrss_ctl_writel(DDRSS_DDRCTL_RFSHCTL0, reg->ddrctl_rfshctl0); in am654_ddrss_ctrl_configuration()
120 ddrss_ctl_writel(DDRSS_DDRCTL_RFSHTMG, reg->ddrctl_rfshtmg); in am654_ddrss_ctrl_configuration()
122 ddrss_ctl_writel(DDRSS_DDRCTL_ECCCFG0, ecc->ddrctl_ecccfg0); in am654_ddrss_ctrl_configuration()
123 ddrss_ctl_writel(DDRSS_DDRCTL_CRCPARCTL0, crc->ddrctl_crcparctl0); in am654_ddrss_ctrl_configuration()
124 ddrss_ctl_writel(DDRSS_DDRCTL_CRCPARCTL1, crc->ddrctl_crcparctl1); in am654_ddrss_ctrl_configuration()
125 ddrss_ctl_writel(DDRSS_DDRCTL_CRCPARCTL2, crc->ddrctl_crcparctl2); in am654_ddrss_ctrl_configuration()
127 ddrss_ctl_writel(DDRSS_DDRCTL_INIT0, reg->ddrctl_init0); in am654_ddrss_ctrl_configuration()
128 ddrss_ctl_writel(DDRSS_DDRCTL_INIT1, reg->ddrctl_init1); in am654_ddrss_ctrl_configuration()
129 ddrss_ctl_writel(DDRSS_DDRCTL_INIT3, reg->ddrctl_init3); in am654_ddrss_ctrl_configuration()
130 ddrss_ctl_writel(DDRSS_DDRCTL_INIT4, reg->ddrctl_init4); in am654_ddrss_ctrl_configuration()
131 ddrss_ctl_writel(DDRSS_DDRCTL_INIT5, reg->ddrctl_init5); in am654_ddrss_ctrl_configuration()
132 ddrss_ctl_writel(DDRSS_DDRCTL_INIT6, reg->ddrctl_init6); in am654_ddrss_ctrl_configuration()
133 ddrss_ctl_writel(DDRSS_DDRCTL_INIT7, reg->ddrctl_init7); in am654_ddrss_ctrl_configuration()
135 ddrss_ctl_writel(DDRSS_DDRCTL_DRAMTMG0, tmg->ddrctl_dramtmg0); in am654_ddrss_ctrl_configuration()
136 ddrss_ctl_writel(DDRSS_DDRCTL_DRAMTMG1, tmg->ddrctl_dramtmg1); in am654_ddrss_ctrl_configuration()
137 ddrss_ctl_writel(DDRSS_DDRCTL_DRAMTMG2, tmg->ddrctl_dramtmg2); in am654_ddrss_ctrl_configuration()
138 ddrss_ctl_writel(DDRSS_DDRCTL_DRAMTMG3, tmg->ddrctl_dramtmg3); in am654_ddrss_ctrl_configuration()
139 ddrss_ctl_writel(DDRSS_DDRCTL_DRAMTMG4, tmg->ddrctl_dramtmg4); in am654_ddrss_ctrl_configuration()
140 ddrss_ctl_writel(DDRSS_DDRCTL_DRAMTMG5, tmg->ddrctl_dramtmg5); in am654_ddrss_ctrl_configuration()
141 ddrss_ctl_writel(DDRSS_DDRCTL_DRAMTMG8, tmg->ddrctl_dramtmg8); in am654_ddrss_ctrl_configuration()
142 ddrss_ctl_writel(DDRSS_DDRCTL_DRAMTMG9, tmg->ddrctl_dramtmg9); in am654_ddrss_ctrl_configuration()
143 ddrss_ctl_writel(DDRSS_DDRCTL_DRAMTMG11, tmg->ddrctl_dramtmg11); in am654_ddrss_ctrl_configuration()
144 ddrss_ctl_writel(DDRSS_DDRCTL_DRAMTMG12, tmg->ddrctl_dramtmg12); in am654_ddrss_ctrl_configuration()
145 ddrss_ctl_writel(DDRSS_DDRCTL_DRAMTMG13, tmg->ddrctl_dramtmg13); in am654_ddrss_ctrl_configuration()
146 ddrss_ctl_writel(DDRSS_DDRCTL_DRAMTMG15, tmg->ddrctl_dramtmg15); in am654_ddrss_ctrl_configuration()
147 ddrss_ctl_writel(DDRSS_DDRCTL_DRAMTMG17, tmg->ddrctl_dramtmg17); in am654_ddrss_ctrl_configuration()
149 ddrss_ctl_writel(DDRSS_DDRCTL_ZQCTL0, reg->ddrctl_zqctl0); in am654_ddrss_ctrl_configuration()
150 ddrss_ctl_writel(DDRSS_DDRCTL_ZQCTL1, reg->ddrctl_zqctl1); in am654_ddrss_ctrl_configuration()
152 ddrss_ctl_writel(DDRSS_DDRCTL_DFITMG0, reg->ddrctl_dfitmg0); in am654_ddrss_ctrl_configuration()
153 ddrss_ctl_writel(DDRSS_DDRCTL_DFITMG1, reg->ddrctl_dfitmg1); in am654_ddrss_ctrl_configuration()
154 ddrss_ctl_writel(DDRSS_DDRCTL_DFITMG2, reg->ddrctl_dfitmg2); in am654_ddrss_ctrl_configuration()
156 ddrss_ctl_writel(DDRSS_DDRCTL_ADDRMAP0, map->ddrctl_addrmap0); in am654_ddrss_ctrl_configuration()
157 ddrss_ctl_writel(DDRSS_DDRCTL_ADDRMAP1, map->ddrctl_addrmap1); in am654_ddrss_ctrl_configuration()
158 ddrss_ctl_writel(DDRSS_DDRCTL_ADDRMAP2, map->ddrctl_addrmap2); in am654_ddrss_ctrl_configuration()
159 ddrss_ctl_writel(DDRSS_DDRCTL_ADDRMAP3, map->ddrctl_addrmap3); in am654_ddrss_ctrl_configuration()
160 ddrss_ctl_writel(DDRSS_DDRCTL_ADDRMAP4, map->ddrctl_addrmap4); in am654_ddrss_ctrl_configuration()
161 ddrss_ctl_writel(DDRSS_DDRCTL_ADDRMAP5, map->ddrctl_addrmap5); in am654_ddrss_ctrl_configuration()
162 ddrss_ctl_writel(DDRSS_DDRCTL_ADDRMAP6, map->ddrctl_addrmap6); in am654_ddrss_ctrl_configuration()
163 ddrss_ctl_writel(DDRSS_DDRCTL_ADDRMAP7, map->ddrctl_addrmap7); in am654_ddrss_ctrl_configuration()
164 ddrss_ctl_writel(DDRSS_DDRCTL_ADDRMAP8, map->ddrctl_addrmap8); in am654_ddrss_ctrl_configuration()
165 ddrss_ctl_writel(DDRSS_DDRCTL_ADDRMAP9, map->ddrctl_addrmap9); in am654_ddrss_ctrl_configuration()
166 ddrss_ctl_writel(DDRSS_DDRCTL_ADDRMAP10, map->ddrctl_addrmap10); in am654_ddrss_ctrl_configuration()
167 ddrss_ctl_writel(DDRSS_DDRCTL_ADDRMAP11, map->ddrctl_addrmap11); in am654_ddrss_ctrl_configuration()
169 ddrss_ctl_writel(DDRSS_DDRCTL_ODTCFG, reg->ddrctl_odtcfg); in am654_ddrss_ctrl_configuration()
170 ddrss_ctl_writel(DDRSS_DDRCTL_ODTMAP, reg->ddrctl_odtmap); in am654_ddrss_ctrl_configuration()
182 ddrss_writel(ddrss->ddrss_phy_cfg, off, val); \
188 u32 val = ddrss_readl(ddrss->ddrss_phy_cfg, off); \
194 * am654_ddrss_phy_configuration() - Configure PHY specific registers
199 struct ddrss_ddrphy_ioctl_params *ioctl = &ddrss->params.phy_ioctl; in am654_ddrss_phy_configuration()
200 struct ddrss_ddrphy_timing_params *tmg = &ddrss->params.phy_timing; in am654_ddrss_phy_configuration()
201 struct ddrss_ddrphy_ctrl_params *ctrl = &ddrss->params.phy_ctrl; in am654_ddrss_phy_configuration()
202 struct ddrss_ddrphy_cfg_params *cfg = &ddrss->params.phy_cfg; in am654_ddrss_phy_configuration()
203 struct ddrss_ddrphy_zq_params *zq = &ddrss->params.phy_zq; in am654_ddrss_phy_configuration()
207 ddrss_phy_writel(DDRSS_DDRPHY_PGCR1, cfg->ddrphy_pgcr1); in am654_ddrss_phy_configuration()
208 ddrss_phy_writel(DDRSS_DDRPHY_PGCR2, cfg->ddrphy_pgcr2); in am654_ddrss_phy_configuration()
209 ddrss_phy_writel(DDRSS_DDRPHY_PGCR3, cfg->ddrphy_pgcr3); in am654_ddrss_phy_configuration()
210 ddrss_phy_writel(DDRSS_DDRPHY_PGCR6, cfg->ddrphy_pgcr6); in am654_ddrss_phy_configuration()
212 ddrss_phy_writel(DDRSS_DDRPHY_PTR3, tmg->ddrphy_ptr3); in am654_ddrss_phy_configuration()
213 ddrss_phy_writel(DDRSS_DDRPHY_PTR4, tmg->ddrphy_ptr4); in am654_ddrss_phy_configuration()
214 ddrss_phy_writel(DDRSS_DDRPHY_PTR5, tmg->ddrphy_ptr5); in am654_ddrss_phy_configuration()
215 ddrss_phy_writel(DDRSS_DDRPHY_PTR6, tmg->ddrphy_ptr6); in am654_ddrss_phy_configuration()
217 ddrss_phy_writel(DDRSS_DDRPHY_PLLCR0, ctrl->ddrphy_pllcr0); in am654_ddrss_phy_configuration()
219 ddrss_phy_writel(DDRSS_DDRPHY_DXCCR, cfg->ddrphy_dxccr); in am654_ddrss_phy_configuration()
220 ddrss_phy_writel(DDRSS_DDRPHY_DSGCR, cfg->ddrphy_dsgcr); in am654_ddrss_phy_configuration()
222 ddrss_phy_writel(DDRSS_DDRPHY_DCR, cfg->ddrphy_dcr); in am654_ddrss_phy_configuration()
224 ddrss_phy_writel(DDRSS_DDRPHY_DTPR0, tmg->ddrphy_dtpr0); in am654_ddrss_phy_configuration()
225 ddrss_phy_writel(DDRSS_DDRPHY_DTPR1, tmg->ddrphy_dtpr1); in am654_ddrss_phy_configuration()
226 ddrss_phy_writel(DDRSS_DDRPHY_DTPR2, tmg->ddrphy_dtpr2); in am654_ddrss_phy_configuration()
227 ddrss_phy_writel(DDRSS_DDRPHY_DTPR3, tmg->ddrphy_dtpr3); in am654_ddrss_phy_configuration()
228 ddrss_phy_writel(DDRSS_DDRPHY_DTPR4, tmg->ddrphy_dtpr4); in am654_ddrss_phy_configuration()
229 ddrss_phy_writel(DDRSS_DDRPHY_DTPR5, tmg->ddrphy_dtpr5); in am654_ddrss_phy_configuration()
230 ddrss_phy_writel(DDRSS_DDRPHY_DTPR6, tmg->ddrphy_dtpr6); in am654_ddrss_phy_configuration()
232 ddrss_phy_writel(DDRSS_DDRPHY_ZQCR, zq->ddrphy_zqcr); in am654_ddrss_phy_configuration()
233 ddrss_phy_writel(DDRSS_DDRPHY_ZQ0PR0, zq->ddrphy_zq0pr0); in am654_ddrss_phy_configuration()
234 ddrss_phy_writel(DDRSS_DDRPHY_ZQ1PR0, zq->ddrphy_zq1pr0); in am654_ddrss_phy_configuration()
236 ddrss_phy_writel(DDRSS_DDRPHY_MR0, ctrl->ddrphy_mr0); in am654_ddrss_phy_configuration()
237 ddrss_phy_writel(DDRSS_DDRPHY_MR1, ctrl->ddrphy_mr1); in am654_ddrss_phy_configuration()
238 ddrss_phy_writel(DDRSS_DDRPHY_MR2, ctrl->ddrphy_mr2); in am654_ddrss_phy_configuration()
239 ddrss_phy_writel(DDRSS_DDRPHY_MR3, ctrl->ddrphy_mr3); in am654_ddrss_phy_configuration()
240 ddrss_phy_writel(DDRSS_DDRPHY_MR4, ctrl->ddrphy_mr4); in am654_ddrss_phy_configuration()
241 ddrss_phy_writel(DDRSS_DDRPHY_MR5, ctrl->ddrphy_mr5); in am654_ddrss_phy_configuration()
242 ddrss_phy_writel(DDRSS_DDRPHY_MR6, ctrl->ddrphy_mr6); in am654_ddrss_phy_configuration()
244 ddrss_phy_writel(DDRSS_DDRPHY_VTCR0, ctrl->ddrphy_vtcr0); in am654_ddrss_phy_configuration()
246 ddrss_phy_writel(DDRSS_DDRPHY_DX8SL0PLLCR0, cfg->ddrphy_dx8sl0pllcr0); in am654_ddrss_phy_configuration()
247 ddrss_phy_writel(DDRSS_DDRPHY_DX8SL1PLLCR0, cfg->ddrphy_dx8sl1pllcr0); in am654_ddrss_phy_configuration()
248 ddrss_phy_writel(DDRSS_DDRPHY_DX8SL2PLLCR0, cfg->ddrphy_dx8sl2pllcr0); in am654_ddrss_phy_configuration()
250 ddrss_phy_writel(DDRSS_DDRPHY_DTCR0, ctrl->ddrphy_dtcr0); in am654_ddrss_phy_configuration()
251 ddrss_phy_writel(DDRSS_DDRPHY_DTCR1, ctrl->ddrphy_dtcr1); in am654_ddrss_phy_configuration()
253 ddrss_phy_writel(DDRSS_DDRPHY_ACIOCR5, ioctl->ddrphy_aciocr5); in am654_ddrss_phy_configuration()
254 ddrss_phy_writel(DDRSS_DDRPHY_IOVCR0, ioctl->ddrphy_iovcr0); in am654_ddrss_phy_configuration()
256 ddrss_phy_writel(DDRSS_DDRPHY_DX4GCR0, cfg->ddrphy_dx4gcr0); in am654_ddrss_phy_configuration()
257 ddrss_phy_writel(DDRSS_DDRPHY_DX4GCR1, cfg->ddrphy_dx4gcr1); in am654_ddrss_phy_configuration()
258 ddrss_phy_writel(DDRSS_DDRPHY_DX4GCR2, cfg->ddrphy_dx4gcr2); in am654_ddrss_phy_configuration()
259 ddrss_phy_writel(DDRSS_DDRPHY_DX4GCR3, cfg->ddrphy_dx4gcr3); in am654_ddrss_phy_configuration()
261 ddrss_phy_writel(DDRSS_DDRPHY_DX0GCR4, cfg->ddrphy_dx0gcr4); in am654_ddrss_phy_configuration()
262 ddrss_phy_writel(DDRSS_DDRPHY_DX1GCR4, cfg->ddrphy_dx1gcr4); in am654_ddrss_phy_configuration()
263 ddrss_phy_writel(DDRSS_DDRPHY_DX2GCR4, cfg->ddrphy_dx2gcr4); in am654_ddrss_phy_configuration()
264 ddrss_phy_writel(DDRSS_DDRPHY_DX3GCR4, cfg->ddrphy_dx3gcr4); in am654_ddrss_phy_configuration()
266 ddrss_phy_writel(DDRSS_DDRPHY_PGCR5, cfg->ddrphy_pgcr5); in am654_ddrss_phy_configuration()
267 ddrss_phy_writel(DDRSS_DDRPHY_DX0GCR5, cfg->ddrphy_dx0gcr5); in am654_ddrss_phy_configuration()
268 ddrss_phy_writel(DDRSS_DDRPHY_DX1GCR5, cfg->ddrphy_dx1gcr5); in am654_ddrss_phy_configuration()
269 ddrss_phy_writel(DDRSS_DDRPHY_DX2GCR5, cfg->ddrphy_dx2gcr5); in am654_ddrss_phy_configuration()
270 ddrss_phy_writel(DDRSS_DDRPHY_DX3GCR5, cfg->ddrphy_dx3gcr5); in am654_ddrss_phy_configuration()
274 ddrss_phy_writel(DDRSS_DDRPHY_DX0GTR0, cfg->ddrphy_dx0gtr0); in am654_ddrss_phy_configuration()
275 ddrss_phy_writel(DDRSS_DDRPHY_DX1GTR0, cfg->ddrphy_dx1gtr0); in am654_ddrss_phy_configuration()
276 ddrss_phy_writel(DDRSS_DDRPHY_DX2GTR0, cfg->ddrphy_dx2gtr0); in am654_ddrss_phy_configuration()
277 ddrss_phy_writel(DDRSS_DDRPHY_DX3GTR0, cfg->ddrphy_dx3gtr0); in am654_ddrss_phy_configuration()
278 ddrss_phy_writel(DDRSS_DDRPHY_ODTCR, cfg->ddrphy_odtcr); in am654_ddrss_phy_configuration()
280 ddrss_phy_writel(DDRSS_DDRPHY_DX8SL0IOCR, cfg->ddrphy_dx8sl0iocr); in am654_ddrss_phy_configuration()
281 ddrss_phy_writel(DDRSS_DDRPHY_DX8SL1IOCR, cfg->ddrphy_dx8sl1iocr); in am654_ddrss_phy_configuration()
282 ddrss_phy_writel(DDRSS_DDRPHY_DX8SL2IOCR, cfg->ddrphy_dx8sl2iocr); in am654_ddrss_phy_configuration()
284 ddrss_phy_writel(DDRSS_DDRPHY_DX8SL0DXCTL2, cfg->ddrphy_dx8sl0dxctl2); in am654_ddrss_phy_configuration()
285 ddrss_phy_writel(DDRSS_DDRPHY_DX8SL1DXCTL2, cfg->ddrphy_dx8sl1dxctl2); in am654_ddrss_phy_configuration()
286 ddrss_phy_writel(DDRSS_DDRPHY_DX8SL2DXCTL2, cfg->ddrphy_dx8sl2dxctl2); in am654_ddrss_phy_configuration()
302 ddrss->ddrss_phy_cfg + DDRSS_DDRPHY_PGSR0, LDELAY)) in __phy_builtin_init_routine()
303 return -ETIMEDOUT; in __phy_builtin_init_routine()
310 return -EINVAL; in __phy_builtin_init_routine()
324 if (ret == -ETIMEDOUT) in write_leveling()
345 if (ret == -ETIMEDOUT) in read_dqs_training()
369 if (ret == -ETIMEDOUT) in rest_training()
382 if (ret == -ETIMEDOUT) in rest_training()
393 if (ret == -ETIMEDOUT) in rest_training()
404 if (ret == -ETIMEDOUT) in rest_training()
417 if (ret == -ETIMEDOUT) in rest_training()
426 debug("%s: VREF training\n", __func__); in rest_training()
430 if (ret == -ETIMEDOUT) in rest_training()
431 printf("%s: ERROR: VREF training timedout\n", __func__); in rest_training()
433 printf("%s: ERROR: VREF training failed\n", __func__); in rest_training()
472 * rd2wr = RL + BL/2 + 1 + WR_PREAMBLE - WL + max(DXnGTR0.DGSL) / 2 in rest_training()
520 * am654_ddrss_init() - Initialization sequence for enabling the SDRAM
532 debug("%s(ddrss=%p)\n", __func__, ddrss); in am654_ddrss_init()
534 ddrss_writel(ddrss->ddrss_ss_cfg, DDRSS_V2H_CTL_REG, 0x000073FF); in am654_ddrss_init()
539 clrbits_le32(ddrss->ddrss_ss_cfg + DDRSS_SS_CTL_REG, in am654_ddrss_init()
546 dev_err(ddrss->dev, "PHY initialization failed %d\n", ret); in am654_ddrss_init()
553 dev_err(ddrss->dev, "DRAM initialization failed %d\n", ret); in am654_ddrss_init()
588 * am654_ddrss_power_on() - Enable power and clocks for ddrss
599 debug("%s(ddrss=%p)\n", __func__, ddrss); in am654_ddrss_power_on()
601 ret = clk_enable(&ddrss->ddrss_clk); in am654_ddrss_power_on()
603 dev_err(ddrss->dev, "clk_enable() failed: %d\n", ret); in am654_ddrss_power_on()
607 ret = power_domain_on(&ddrss->ddrcfg_pwrdmn); in am654_ddrss_power_on()
609 dev_err(ddrss->dev, "power_domain_on() failed: %d\n", ret); in am654_ddrss_power_on()
613 ret = power_domain_on(&ddrss->ddrdata_pwrdmn); in am654_ddrss_power_on()
615 dev_err(ddrss->dev, "power_domain_on() failed: %d\n", ret); in am654_ddrss_power_on()
621 device_get_supply_regulator(ddrss->dev, "vtt-supply", in am654_ddrss_power_on()
622 &ddrss->vtt_supply); in am654_ddrss_power_on()
623 ret = regulator_set_value(ddrss->vtt_supply, 3300000); in am654_ddrss_power_on()
633 * am654_ddrss_ofdata_to_priv() - generate private data from device tree
644 debug("%s(dev=%p)\n", __func__, dev); in am654_ddrss_ofdata_to_priv()
646 ret = clk_get_by_index(dev, 0, &ddrss->ddrss_clk); in am654_ddrss_ofdata_to_priv()
652 ret = power_domain_get_by_index(dev, &ddrss->ddrcfg_pwrdmn, 0); in am654_ddrss_ofdata_to_priv()
658 ret = power_domain_get_by_index(dev, &ddrss->ddrdata_pwrdmn, 1); in am654_ddrss_ofdata_to_priv()
667 return -EINVAL; in am654_ddrss_ofdata_to_priv()
669 ddrss->ddrss_ss_cfg = (void *)reg; in am654_ddrss_ofdata_to_priv()
674 return -EINVAL; in am654_ddrss_ofdata_to_priv()
676 ddrss->ddrss_ctl_cfg = (void *)reg; in am654_ddrss_ofdata_to_priv()
681 return -EINVAL; in am654_ddrss_ofdata_to_priv()
683 ddrss->ddrss_phy_cfg = (void *)reg; in am654_ddrss_ofdata_to_priv()
685 ret = dev_read_u32_array(dev, "ti,ctl-reg", in am654_ddrss_ofdata_to_priv()
686 (u32 *)&ddrss->params.ctl_reg, in am654_ddrss_ofdata_to_priv()
687 sizeof(ddrss->params.ctl_reg) / sizeof(u32)); in am654_ddrss_ofdata_to_priv()
689 dev_err(dev, "Cannot read ti,ctl-reg params\n"); in am654_ddrss_ofdata_to_priv()
693 ret = dev_read_u32_array(dev, "ti,ctl-crc", in am654_ddrss_ofdata_to_priv()
694 (u32 *)&ddrss->params.ctl_crc, in am654_ddrss_ofdata_to_priv()
695 sizeof(ddrss->params.ctl_crc) / sizeof(u32)); in am654_ddrss_ofdata_to_priv()
697 dev_err(dev, "Cannot read ti,ctl-crc params\n"); in am654_ddrss_ofdata_to_priv()
701 ret = dev_read_u32_array(dev, "ti,ctl-ecc", in am654_ddrss_ofdata_to_priv()
702 (u32 *)&ddrss->params.ctl_ecc, in am654_ddrss_ofdata_to_priv()
703 sizeof(ddrss->params.ctl_ecc) / sizeof(u32)); in am654_ddrss_ofdata_to_priv()
705 dev_err(dev, "Cannot read ti,ctl-ecc params\n"); in am654_ddrss_ofdata_to_priv()
709 ret = dev_read_u32_array(dev, "ti,ctl-map", in am654_ddrss_ofdata_to_priv()
710 (u32 *)&ddrss->params.ctl_map, in am654_ddrss_ofdata_to_priv()
711 sizeof(ddrss->params.ctl_map) / sizeof(u32)); in am654_ddrss_ofdata_to_priv()
713 dev_err(dev, "Cannot read ti,ctl-map params\n"); in am654_ddrss_ofdata_to_priv()
717 ret = dev_read_u32_array(dev, "ti,ctl-pwr", in am654_ddrss_ofdata_to_priv()
718 (u32 *)&ddrss->params.ctl_pwr, in am654_ddrss_ofdata_to_priv()
719 sizeof(ddrss->params.ctl_pwr) / sizeof(u32)); in am654_ddrss_ofdata_to_priv()
721 dev_err(dev, "Cannot read ti,ctl-pwr params\n"); in am654_ddrss_ofdata_to_priv()
725 ret = dev_read_u32_array(dev, "ti,ctl-timing", in am654_ddrss_ofdata_to_priv()
726 (u32 *)&ddrss->params.ctl_timing, in am654_ddrss_ofdata_to_priv()
727 sizeof(ddrss->params.ctl_timing) / in am654_ddrss_ofdata_to_priv()
730 dev_err(dev, "Cannot read ti,ctl-timing params\n"); in am654_ddrss_ofdata_to_priv()
734 ret = dev_read_u32_array(dev, "ti,phy-cfg", in am654_ddrss_ofdata_to_priv()
735 (u32 *)&ddrss->params.phy_cfg, in am654_ddrss_ofdata_to_priv()
736 sizeof(ddrss->params.phy_cfg) / sizeof(u32)); in am654_ddrss_ofdata_to_priv()
738 dev_err(dev, "Cannot read ti,phy-cfg params\n"); in am654_ddrss_ofdata_to_priv()
742 ret = dev_read_u32_array(dev, "ti,phy-ctl", in am654_ddrss_ofdata_to_priv()
743 (u32 *)&ddrss->params.phy_ctrl, in am654_ddrss_ofdata_to_priv()
744 sizeof(ddrss->params.phy_ctrl) / sizeof(u32)); in am654_ddrss_ofdata_to_priv()
746 dev_err(dev, "Cannot read ti,phy-ctl params\n"); in am654_ddrss_ofdata_to_priv()
750 ret = dev_read_u32_array(dev, "ti,phy-ioctl", in am654_ddrss_ofdata_to_priv()
751 (u32 *)&ddrss->params.phy_ioctl, in am654_ddrss_ofdata_to_priv()
752 sizeof(ddrss->params.phy_ioctl) / sizeof(u32)); in am654_ddrss_ofdata_to_priv()
754 dev_err(dev, "Cannot read ti,phy-ioctl params\n"); in am654_ddrss_ofdata_to_priv()
758 ret = dev_read_u32_array(dev, "ti,phy-timing", in am654_ddrss_ofdata_to_priv()
759 (u32 *)&ddrss->params.phy_timing, in am654_ddrss_ofdata_to_priv()
760 sizeof(ddrss->params.phy_timing) / in am654_ddrss_ofdata_to_priv()
763 dev_err(dev, "Cannot read ti,phy-timing params\n"); in am654_ddrss_ofdata_to_priv()
767 ret = dev_read_u32_array(dev, "ti,phy-zq", (u32 *)&ddrss->params.phy_zq, in am654_ddrss_ofdata_to_priv()
768 sizeof(ddrss->params.phy_zq) / sizeof(u32)); in am654_ddrss_ofdata_to_priv()
770 dev_err(dev, "Cannot read ti,phy-zq params\n"); in am654_ddrss_ofdata_to_priv()
778 * am654_ddrss_probe() - Basic probe
788 debug("%s(dev=%p)\n", __func__, dev); in am654_ddrss_probe()
794 ddrss->dev = dev; in am654_ddrss_probe()
814 { .compatible = "ti,am654-ddrss" },