Lines Matching +full:lpddr2 +full:- +full:s4
1 // SPDX-License-Identifier: GPL-2.0-or-later
19 * of_get_min_tck() - extract min timing values for ddr
38 ret |= of_property_read_u32(np, "tRPab-min-tck", &min->tRPab); in of_get_min_tck()
39 ret |= of_property_read_u32(np, "tRCD-min-tck", &min->tRCD); in of_get_min_tck()
40 ret |= of_property_read_u32(np, "tWR-min-tck", &min->tWR); in of_get_min_tck()
41 ret |= of_property_read_u32(np, "tRASmin-min-tck", &min->tRASmin); in of_get_min_tck()
42 ret |= of_property_read_u32(np, "tRRD-min-tck", &min->tRRD); in of_get_min_tck()
43 ret |= of_property_read_u32(np, "tWTR-min-tck", &min->tWTR); in of_get_min_tck()
44 ret |= of_property_read_u32(np, "tXP-min-tck", &min->tXP); in of_get_min_tck()
45 ret |= of_property_read_u32(np, "tRTP-min-tck", &min->tRTP); in of_get_min_tck()
46 ret |= of_property_read_u32(np, "tCKE-min-tck", &min->tCKE); in of_get_min_tck()
47 ret |= of_property_read_u32(np, "tCKESR-min-tck", &min->tCKESR); in of_get_min_tck()
48 ret |= of_property_read_u32(np, "tFAW-min-tck", &min->tFAW); in of_get_min_tck()
58 dev_warn(dev, "Using default min-tck values\n"); in of_get_min_tck()
68 ret = of_property_read_u32(np, "max-freq", &tim->max_freq); in of_do_get_timings()
69 ret |= of_property_read_u32(np, "min-freq", &tim->min_freq); in of_do_get_timings()
70 ret |= of_property_read_u32(np, "tRPab", &tim->tRPab); in of_do_get_timings()
71 ret |= of_property_read_u32(np, "tRCD", &tim->tRCD); in of_do_get_timings()
72 ret |= of_property_read_u32(np, "tWR", &tim->tWR); in of_do_get_timings()
73 ret |= of_property_read_u32(np, "tRAS-min", &tim->tRAS_min); in of_do_get_timings()
74 ret |= of_property_read_u32(np, "tRRD", &tim->tRRD); in of_do_get_timings()
75 ret |= of_property_read_u32(np, "tWTR", &tim->tWTR); in of_do_get_timings()
76 ret |= of_property_read_u32(np, "tXP", &tim->tXP); in of_do_get_timings()
77 ret |= of_property_read_u32(np, "tRTP", &tim->tRTP); in of_do_get_timings()
78 ret |= of_property_read_u32(np, "tCKESR", &tim->tCKESR); in of_do_get_timings()
79 ret |= of_property_read_u32(np, "tDQSCK-max", &tim->tDQSCK_max); in of_do_get_timings()
80 ret |= of_property_read_u32(np, "tFAW", &tim->tFAW); in of_do_get_timings()
81 ret |= of_property_read_u32(np, "tZQCS", &tim->tZQCS); in of_do_get_timings()
82 ret |= of_property_read_u32(np, "tZQCL", &tim->tZQCL); in of_do_get_timings()
83 ret |= of_property_read_u32(np, "tZQinit", &tim->tZQinit); in of_do_get_timings()
84 ret |= of_property_read_u32(np, "tRAS-max-ns", &tim->tRAS_max_ns); in of_do_get_timings()
85 ret |= of_property_read_u32(np, "tDQSCK-max-derated", in of_do_get_timings()
86 &tim->tDQSCK_max_derated); in of_do_get_timings()
92 * of_get_ddr_timings() - extracts the ddr timings and updates no of
96 * @device_type: Type of ddr(LPDDR2 S2/S4)
117 tim_compat = "jedec,lpddr2-timings"; in of_get_ddr_timings()
157 * of_lpddr3_get_min_tck() - extract min timing values for lpddr3
175 ret |= of_property_read_u32(np, "tRFC-min-tck", &min->tRFC); in of_lpddr3_get_min_tck()
176 ret |= of_property_read_u32(np, "tRRD-min-tck", &min->tRRD); in of_lpddr3_get_min_tck()
177 ret |= of_property_read_u32(np, "tRPab-min-tck", &min->tRPab); in of_lpddr3_get_min_tck()
178 ret |= of_property_read_u32(np, "tRPpb-min-tck", &min->tRPpb); in of_lpddr3_get_min_tck()
179 ret |= of_property_read_u32(np, "tRCD-min-tck", &min->tRCD); in of_lpddr3_get_min_tck()
180 ret |= of_property_read_u32(np, "tRC-min-tck", &min->tRC); in of_lpddr3_get_min_tck()
181 ret |= of_property_read_u32(np, "tRAS-min-tck", &min->tRAS); in of_lpddr3_get_min_tck()
182 ret |= of_property_read_u32(np, "tWTR-min-tck", &min->tWTR); in of_lpddr3_get_min_tck()
183 ret |= of_property_read_u32(np, "tWR-min-tck", &min->tWR); in of_lpddr3_get_min_tck()
184 ret |= of_property_read_u32(np, "tRTP-min-tck", &min->tRTP); in of_lpddr3_get_min_tck()
185 ret |= of_property_read_u32(np, "tW2W-C2C-min-tck", &min->tW2W_C2C); in of_lpddr3_get_min_tck()
186 ret |= of_property_read_u32(np, "tR2R-C2C-min-tck", &min->tR2R_C2C); in of_lpddr3_get_min_tck()
187 ret |= of_property_read_u32(np, "tWL-min-tck", &min->tWL); in of_lpddr3_get_min_tck()
188 ret |= of_property_read_u32(np, "tDQSCK-min-tck", &min->tDQSCK); in of_lpddr3_get_min_tck()
189 ret |= of_property_read_u32(np, "tRL-min-tck", &min->tRL); in of_lpddr3_get_min_tck()
190 ret |= of_property_read_u32(np, "tFAW-min-tck", &min->tFAW); in of_lpddr3_get_min_tck()
191 ret |= of_property_read_u32(np, "tXSR-min-tck", &min->tXSR); in of_lpddr3_get_min_tck()
192 ret |= of_property_read_u32(np, "tXP-min-tck", &min->tXP); in of_lpddr3_get_min_tck()
193 ret |= of_property_read_u32(np, "tCKE-min-tck", &min->tCKE); in of_lpddr3_get_min_tck()
194 ret |= of_property_read_u32(np, "tCKESR-min-tck", &min->tCKESR); in of_lpddr3_get_min_tck()
195 ret |= of_property_read_u32(np, "tMRD-min-tck", &min->tMRD); in of_lpddr3_get_min_tck()
198 dev_warn(dev, "Errors while parsing min-tck values\n"); in of_lpddr3_get_min_tck()
206 dev_warn(dev, "Using default min-tck values\n"); in of_lpddr3_get_min_tck()
216 ret = of_property_read_u32(np, "max-freq", &tim->max_freq); in of_lpddr3_do_get_timings()
218 /* Deprecated way of passing max-freq as 'reg' */ in of_lpddr3_do_get_timings()
219 ret = of_property_read_u32(np, "reg", &tim->max_freq); in of_lpddr3_do_get_timings()
220 ret |= of_property_read_u32(np, "min-freq", &tim->min_freq); in of_lpddr3_do_get_timings()
221 ret |= of_property_read_u32(np, "tRFC", &tim->tRFC); in of_lpddr3_do_get_timings()
222 ret |= of_property_read_u32(np, "tRRD", &tim->tRRD); in of_lpddr3_do_get_timings()
223 ret |= of_property_read_u32(np, "tRPab", &tim->tRPab); in of_lpddr3_do_get_timings()
224 ret |= of_property_read_u32(np, "tRPpb", &tim->tRPpb); in of_lpddr3_do_get_timings()
225 ret |= of_property_read_u32(np, "tRCD", &tim->tRCD); in of_lpddr3_do_get_timings()
226 ret |= of_property_read_u32(np, "tRC", &tim->tRC); in of_lpddr3_do_get_timings()
227 ret |= of_property_read_u32(np, "tRAS", &tim->tRAS); in of_lpddr3_do_get_timings()
228 ret |= of_property_read_u32(np, "tWTR", &tim->tWTR); in of_lpddr3_do_get_timings()
229 ret |= of_property_read_u32(np, "tWR", &tim->tWR); in of_lpddr3_do_get_timings()
230 ret |= of_property_read_u32(np, "tRTP", &tim->tRTP); in of_lpddr3_do_get_timings()
231 ret |= of_property_read_u32(np, "tW2W-C2C", &tim->tW2W_C2C); in of_lpddr3_do_get_timings()
232 ret |= of_property_read_u32(np, "tR2R-C2C", &tim->tR2R_C2C); in of_lpddr3_do_get_timings()
233 ret |= of_property_read_u32(np, "tFAW", &tim->tFAW); in of_lpddr3_do_get_timings()
234 ret |= of_property_read_u32(np, "tXSR", &tim->tXSR); in of_lpddr3_do_get_timings()
235 ret |= of_property_read_u32(np, "tXP", &tim->tXP); in of_lpddr3_do_get_timings()
236 ret |= of_property_read_u32(np, "tCKE", &tim->tCKE); in of_lpddr3_do_get_timings()
237 ret |= of_property_read_u32(np, "tCKESR", &tim->tCKESR); in of_lpddr3_do_get_timings()
238 ret |= of_property_read_u32(np, "tMRD", &tim->tMRD); in of_lpddr3_do_get_timings()
244 * of_lpddr3_get_ddr_timings() - extracts the lpddr3 timings and updates no of
267 tim_compat = "jedec,lpddr3-timings"; in of_lpddr3_get_ddr_timings()
307 * of_lpddr2_get_info() - extracts information about the lpddr2 chip.
308 * @np: Pointer to device tree node containing lpddr2 info
314 * in a device-tree, then the corresponding value is set to -ENOENT.
325 err = of_property_read_u32_array(np, "revision-id", revision_id, 2); in of_lpddr2_get_info()
330 err = of_property_read_u32(np, "revision-id1", &info.revision_id1); in of_lpddr2_get_info()
332 info.revision_id1 = -ENOENT; in of_lpddr2_get_info()
334 err = of_property_read_u32(np, "revision-id2", &info.revision_id2); in of_lpddr2_get_info()
336 info.revision_id2 = -ENOENT; in of_lpddr2_get_info()
339 err = of_property_read_u32(np, "io-width", &info.io_width); in of_lpddr2_get_info()
343 info.io_width = 32 / info.io_width - 1; in of_lpddr2_get_info()
349 info.density = ffs(info.density) - 7; in of_lpddr2_get_info()
351 if (of_device_is_compatible(np, "jedec,lpddr2-s4")) in of_lpddr2_get_info()
353 else if (of_device_is_compatible(np, "jedec,lpddr2-s2")) in of_lpddr2_get_info()
355 else if (of_device_is_compatible(np, "jedec,lpddr2-nvm")) in of_lpddr2_get_info()
390 info.manufacturer_id = -ENOENT; in of_lpddr2_get_info()