dsi_pll_20nm.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
  4. */
  5. #define pr_fmt(fmt) "%s: " fmt, __func__
  6. #include <linux/kernel.h>
  7. #include <linux/err.h>
  8. #include <linux/delay.h>
  9. #include <linux/clk/msm-clk-provider.h>
  10. #include <linux/clk/msm-clk.h>
  11. #include <linux/workqueue.h>
  12. #include <linux/clk/msm-clock-generic.h>
  13. #include <dt-bindings/clock/msm-clocks-8994.h>
  14. #include "pll_drv.h"
  15. #include "dsi_pll.h"
  16. #define VCO_DELAY_USEC 1
  17. static const struct clk_ops bypass_lp_div_mux_clk_ops;
  18. static const struct clk_ops pixel_clk_src_ops;
  19. static const struct clk_ops byte_clk_src_ops;
  20. static const struct clk_ops ndiv_clk_ops;
  21. static const struct clk_ops shadow_pixel_clk_src_ops;
  22. static const struct clk_ops shadow_byte_clk_src_ops;
  23. static const struct clk_ops clk_ops_gen_mux_dsi;
  24. static int vco_set_rate_20nm(struct clk *c, unsigned long rate)
  25. {
  26. int rc;
  27. struct dsi_pll_vco_clk *vco = to_vco_clk(c);
  28. struct mdss_pll_resources *dsi_pll_res = vco->priv;
  29. rc = mdss_pll_resource_enable(dsi_pll_res, true);
  30. if (rc) {
  31. pr_err("Failed to enable mdss dsi pll resources\n");
  32. return rc;
  33. }
  34. pr_debug("Cancel pending pll off work\n");
  35. cancel_work_sync(&dsi_pll_res->pll_off);
  36. rc = pll_20nm_vco_set_rate(vco, rate);
  37. mdss_pll_resource_enable(dsi_pll_res, false);
  38. return rc;
  39. }
  40. static int pll1_vco_set_rate_20nm(struct clk *c, unsigned long rate)
  41. {
  42. struct dsi_pll_vco_clk *vco = to_vco_clk(c);
  43. struct mdss_pll_resources *pll_res = vco->priv;
  44. mdss_pll_resource_enable(pll_res, true);
  45. __dsi_pll_disable(pll_res->pll_base);
  46. mdss_pll_resource_enable(pll_res, false);
  47. pr_debug("Configuring PLL1 registers.\n");
  48. return 0;
  49. }
  50. static int shadow_vco_set_rate_20nm(struct clk *c, unsigned long rate)
  51. {
  52. int rc;
  53. struct dsi_pll_vco_clk *vco = to_vco_clk(c);
  54. struct mdss_pll_resources *dsi_pll_res = vco->priv;
  55. if (!dsi_pll_res->resource_enable) {
  56. pr_err("PLL resources disabled. Dynamic fps invalid\n");
  57. return -EINVAL;
  58. }
  59. rc = shadow_pll_20nm_vco_set_rate(vco, rate);
  60. return rc;
  61. }
  62. /* Op structures */
  63. static const struct clk_ops pll1_clk_ops_dsi_vco = {
  64. .set_rate = pll1_vco_set_rate_20nm,
  65. };
  66. static const struct clk_ops clk_ops_dsi_vco = {
  67. .set_rate = vco_set_rate_20nm,
  68. .round_rate = pll_20nm_vco_round_rate,
  69. .handoff = pll_20nm_vco_handoff,
  70. .prepare = pll_20nm_vco_prepare,
  71. .unprepare = pll_20nm_vco_unprepare,
  72. };
  73. static struct clk_div_ops fixed_hr_oclk2_div_ops = {
  74. .set_div = fixed_hr_oclk2_set_div,
  75. .get_div = fixed_hr_oclk2_get_div,
  76. };
  77. static struct clk_div_ops ndiv_ops = {
  78. .set_div = ndiv_set_div,
  79. .get_div = ndiv_get_div,
  80. };
  81. static struct clk_div_ops hr_oclk3_div_ops = {
  82. .set_div = hr_oclk3_set_div,
  83. .get_div = hr_oclk3_get_div,
  84. };
  85. static struct clk_mux_ops bypass_lp_div_mux_ops = {
  86. .set_mux_sel = set_bypass_lp_div_mux_sel,
  87. .get_mux_sel = get_bypass_lp_div_mux_sel,
  88. };
  89. static const struct clk_ops shadow_clk_ops_dsi_vco = {
  90. .set_rate = shadow_vco_set_rate_20nm,
  91. .round_rate = pll_20nm_vco_round_rate,
  92. .handoff = pll_20nm_vco_handoff,
  93. };
  94. static struct clk_div_ops shadow_fixed_hr_oclk2_div_ops = {
  95. .set_div = shadow_fixed_hr_oclk2_set_div,
  96. .get_div = fixed_hr_oclk2_get_div,
  97. };
  98. static struct clk_div_ops shadow_ndiv_ops = {
  99. .set_div = shadow_ndiv_set_div,
  100. .get_div = ndiv_get_div,
  101. };
  102. static struct clk_div_ops shadow_hr_oclk3_div_ops = {
  103. .set_div = shadow_hr_oclk3_set_div,
  104. .get_div = hr_oclk3_get_div,
  105. };
  106. static struct clk_mux_ops shadow_bypass_lp_div_mux_ops = {
  107. .set_mux_sel = set_shadow_bypass_lp_div_mux_sel,
  108. .get_mux_sel = get_bypass_lp_div_mux_sel,
  109. };
  110. static struct clk_mux_ops mdss_byte_mux_ops = {
  111. .set_mux_sel = set_mdss_byte_mux_sel,
  112. .get_mux_sel = get_mdss_byte_mux_sel,
  113. };
  114. static struct clk_mux_ops mdss_pixel_mux_ops = {
  115. .set_mux_sel = set_mdss_pixel_mux_sel,
  116. .get_mux_sel = get_mdss_pixel_mux_sel,
  117. };
  118. static struct dsi_pll_vco_clk mdss_dsi1_vco_clk_src = {
  119. .c = {
  120. .dbg_name = "mdss_dsi1_vco_clk_src",
  121. .ops = &pll1_clk_ops_dsi_vco,
  122. .flags = CLKFLAG_NO_RATE_CACHE,
  123. CLK_INIT(mdss_dsi1_vco_clk_src.c),
  124. },
  125. };
  126. static struct dsi_pll_vco_clk dsi_vco_clk_8994 = {
  127. .ref_clk_rate = 19200000,
  128. .min_rate = 300000000,
  129. .max_rate = 1500000000,
  130. .pll_en_seq_cnt = 1,
  131. .pll_enable_seqs[0] = pll_20nm_vco_enable_seq,
  132. .c = {
  133. .dbg_name = "dsi_vco_clk_8994",
  134. .ops = &clk_ops_dsi_vco,
  135. CLK_INIT(dsi_vco_clk_8994.c),
  136. },
  137. };
  138. static struct dsi_pll_vco_clk shadow_dsi_vco_clk_8994 = {
  139. .ref_clk_rate = 19200000,
  140. .min_rate = 300000000,
  141. .max_rate = 1500000000,
  142. .c = {
  143. .dbg_name = "shadow_dsi_vco_clk_8994",
  144. .ops = &shadow_clk_ops_dsi_vco,
  145. CLK_INIT(shadow_dsi_vco_clk_8994.c),
  146. },
  147. };
  148. static struct div_clk ndiv_clk_8994 = {
  149. .data = {
  150. .max_div = 15,
  151. .min_div = 1,
  152. },
  153. .ops = &ndiv_ops,
  154. .c = {
  155. .parent = &dsi_vco_clk_8994.c,
  156. .dbg_name = "ndiv_clk_8994",
  157. .ops = &ndiv_clk_ops,
  158. .flags = CLKFLAG_NO_RATE_CACHE,
  159. CLK_INIT(ndiv_clk_8994.c),
  160. },
  161. };
  162. static struct div_clk shadow_ndiv_clk_8994 = {
  163. .data = {
  164. .max_div = 15,
  165. .min_div = 1,
  166. },
  167. .ops = &shadow_ndiv_ops,
  168. .c = {
  169. .parent = &shadow_dsi_vco_clk_8994.c,
  170. .dbg_name = "shadow_ndiv_clk_8994",
  171. .ops = &clk_ops_div,
  172. .flags = CLKFLAG_NO_RATE_CACHE,
  173. CLK_INIT(shadow_ndiv_clk_8994.c),
  174. },
  175. };
  176. static struct div_clk indirect_path_div2_clk_8994 = {
  177. .data = {
  178. .div = 2,
  179. .min_div = 2,
  180. .max_div = 2,
  181. },
  182. .c = {
  183. .parent = &ndiv_clk_8994.c,
  184. .dbg_name = "indirect_path_div2_clk_8994",
  185. .ops = &clk_ops_div,
  186. .flags = CLKFLAG_NO_RATE_CACHE,
  187. CLK_INIT(indirect_path_div2_clk_8994.c),
  188. },
  189. };
  190. static struct div_clk shadow_indirect_path_div2_clk_8994 = {
  191. .data = {
  192. .div = 2,
  193. .min_div = 2,
  194. .max_div = 2,
  195. },
  196. .c = {
  197. .parent = &shadow_ndiv_clk_8994.c,
  198. .dbg_name = "shadow_indirect_path_div2_clk_8994",
  199. .ops = &clk_ops_div,
  200. .flags = CLKFLAG_NO_RATE_CACHE,
  201. CLK_INIT(shadow_indirect_path_div2_clk_8994.c),
  202. },
  203. };
  204. static struct div_clk hr_oclk3_div_clk_8994 = {
  205. .data = {
  206. .max_div = 255,
  207. .min_div = 1,
  208. },
  209. .ops = &hr_oclk3_div_ops,
  210. .c = {
  211. .parent = &dsi_vco_clk_8994.c,
  212. .dbg_name = "hr_oclk3_div_clk_8994",
  213. .ops = &pixel_clk_src_ops,
  214. .flags = CLKFLAG_NO_RATE_CACHE,
  215. CLK_INIT(hr_oclk3_div_clk_8994.c),
  216. },
  217. };
  218. static struct div_clk shadow_hr_oclk3_div_clk_8994 = {
  219. .data = {
  220. .max_div = 255,
  221. .min_div = 1,
  222. },
  223. .ops = &shadow_hr_oclk3_div_ops,
  224. .c = {
  225. .parent = &shadow_dsi_vco_clk_8994.c,
  226. .dbg_name = "shadow_hr_oclk3_div_clk_8994",
  227. .ops = &shadow_pixel_clk_src_ops,
  228. .flags = CLKFLAG_NO_RATE_CACHE,
  229. CLK_INIT(shadow_hr_oclk3_div_clk_8994.c),
  230. },
  231. };
  232. static struct div_clk pixel_clk_src = {
  233. .data = {
  234. .div = 2,
  235. .min_div = 2,
  236. .max_div = 2,
  237. },
  238. .c = {
  239. .parent = &hr_oclk3_div_clk_8994.c,
  240. .dbg_name = "pixel_clk_src",
  241. .ops = &clk_ops_div,
  242. .flags = CLKFLAG_NO_RATE_CACHE,
  243. CLK_INIT(pixel_clk_src.c),
  244. },
  245. };
  246. static struct div_clk shadow_pixel_clk_src = {
  247. .data = {
  248. .div = 2,
  249. .min_div = 2,
  250. .max_div = 2,
  251. },
  252. .c = {
  253. .parent = &shadow_hr_oclk3_div_clk_8994.c,
  254. .dbg_name = "shadow_pixel_clk_src",
  255. .ops = &clk_ops_div,
  256. .flags = CLKFLAG_NO_RATE_CACHE,
  257. CLK_INIT(shadow_pixel_clk_src.c),
  258. },
  259. };
  260. static struct mux_clk bypass_lp_div_mux_8994 = {
  261. .num_parents = 2,
  262. .parents = (struct clk_src[]){
  263. {&dsi_vco_clk_8994.c, 0},
  264. {&indirect_path_div2_clk_8994.c, 1},
  265. },
  266. .ops = &bypass_lp_div_mux_ops,
  267. .c = {
  268. .parent = &dsi_vco_clk_8994.c,
  269. .dbg_name = "bypass_lp_div_mux_8994",
  270. .ops = &bypass_lp_div_mux_clk_ops,
  271. CLK_INIT(bypass_lp_div_mux_8994.c),
  272. },
  273. };
  274. static struct mux_clk shadow_bypass_lp_div_mux_8994 = {
  275. .num_parents = 2,
  276. .parents = (struct clk_src[]){
  277. {&shadow_dsi_vco_clk_8994.c, 0},
  278. {&shadow_indirect_path_div2_clk_8994.c, 1},
  279. },
  280. .ops = &shadow_bypass_lp_div_mux_ops,
  281. .c = {
  282. .parent = &shadow_dsi_vco_clk_8994.c,
  283. .dbg_name = "shadow_bypass_lp_div_mux_8994",
  284. .ops = &clk_ops_gen_mux,
  285. CLK_INIT(shadow_bypass_lp_div_mux_8994.c),
  286. },
  287. };
  288. static struct div_clk fixed_hr_oclk2_div_clk_8994 = {
  289. .ops = &fixed_hr_oclk2_div_ops,
  290. .data = {
  291. .min_div = 4,
  292. .max_div = 4,
  293. },
  294. .c = {
  295. .parent = &bypass_lp_div_mux_8994.c,
  296. .dbg_name = "fixed_hr_oclk2_div_clk_8994",
  297. .ops = &byte_clk_src_ops,
  298. CLK_INIT(fixed_hr_oclk2_div_clk_8994.c),
  299. },
  300. };
  301. static struct div_clk shadow_fixed_hr_oclk2_div_clk_8994 = {
  302. .ops = &shadow_fixed_hr_oclk2_div_ops,
  303. .data = {
  304. .min_div = 4,
  305. .max_div = 4,
  306. },
  307. .c = {
  308. .parent = &shadow_bypass_lp_div_mux_8994.c,
  309. .dbg_name = "shadow_fixed_hr_oclk2_div_clk_8994",
  310. .ops = &shadow_byte_clk_src_ops,
  311. CLK_INIT(shadow_fixed_hr_oclk2_div_clk_8994.c),
  312. },
  313. };
  314. static struct div_clk byte_clk_src = {
  315. .data = {
  316. .div = 2,
  317. .min_div = 2,
  318. .max_div = 2,
  319. },
  320. .c = {
  321. .parent = &fixed_hr_oclk2_div_clk_8994.c,
  322. .dbg_name = "byte_clk_src",
  323. .ops = &clk_ops_div,
  324. CLK_INIT(byte_clk_src.c),
  325. },
  326. };
  327. static struct div_clk shadow_byte_clk_src = {
  328. .data = {
  329. .div = 2,
  330. .min_div = 2,
  331. .max_div = 2,
  332. },
  333. .c = {
  334. .parent = &shadow_fixed_hr_oclk2_div_clk_8994.c,
  335. .dbg_name = "shadow_byte_clk_src",
  336. .ops = &clk_ops_div,
  337. CLK_INIT(shadow_byte_clk_src.c),
  338. },
  339. };
  340. static struct mux_clk mdss_pixel_clk_mux = {
  341. .num_parents = 2,
  342. .parents = (struct clk_src[]) {
  343. {&pixel_clk_src.c, 0},
  344. {&shadow_pixel_clk_src.c, 1},
  345. },
  346. .ops = &mdss_pixel_mux_ops,
  347. .c = {
  348. .parent = &pixel_clk_src.c,
  349. .dbg_name = "mdss_pixel_clk_mux",
  350. .ops = &clk_ops_gen_mux,
  351. CLK_INIT(mdss_pixel_clk_mux.c),
  352. }
  353. };
  354. static struct mux_clk mdss_byte_clk_mux = {
  355. .num_parents = 2,
  356. .parents = (struct clk_src[]) {
  357. {&byte_clk_src.c, 0},
  358. {&shadow_byte_clk_src.c, 1},
  359. },
  360. .ops = &mdss_byte_mux_ops,
  361. .c = {
  362. .parent = &byte_clk_src.c,
  363. .dbg_name = "mdss_byte_clk_mux",
  364. .ops = &clk_ops_gen_mux_dsi,
  365. CLK_INIT(mdss_byte_clk_mux.c),
  366. }
  367. };
  368. static struct clk_lookup mdss_dsi_pll_1_cc_8994[] = {
  369. CLK_LIST(mdss_dsi1_vco_clk_src),
  370. };
  371. static struct clk_lookup mdss_dsi_pllcc_8994[] = {
  372. CLK_LIST(mdss_pixel_clk_mux),
  373. CLK_LIST(mdss_byte_clk_mux),
  374. CLK_LIST(pixel_clk_src),
  375. CLK_LIST(byte_clk_src),
  376. CLK_LIST(fixed_hr_oclk2_div_clk_8994),
  377. CLK_LIST(bypass_lp_div_mux_8994),
  378. CLK_LIST(hr_oclk3_div_clk_8994),
  379. CLK_LIST(indirect_path_div2_clk_8994),
  380. CLK_LIST(ndiv_clk_8994),
  381. CLK_LIST(dsi_vco_clk_8994),
  382. CLK_LIST(shadow_pixel_clk_src),
  383. CLK_LIST(shadow_byte_clk_src),
  384. CLK_LIST(shadow_fixed_hr_oclk2_div_clk_8994),
  385. CLK_LIST(shadow_bypass_lp_div_mux_8994),
  386. CLK_LIST(shadow_hr_oclk3_div_clk_8994),
  387. CLK_LIST(shadow_indirect_path_div2_clk_8994),
  388. CLK_LIST(shadow_ndiv_clk_8994),
  389. CLK_LIST(shadow_dsi_vco_clk_8994),
  390. };
  391. static void dsi_pll_off_work(struct work_struct *work)
  392. {
  393. struct mdss_pll_resources *pll_res;
  394. if (!work) {
  395. pr_err("pll_resource is invalid\n");
  396. return;
  397. }
  398. pr_debug("Starting PLL off Worker%s\n", __func__);
  399. pll_res = container_of(work, struct
  400. mdss_pll_resources, pll_off);
  401. mdss_pll_resource_enable(pll_res, true);
  402. __dsi_pll_disable(pll_res->pll_base);
  403. if (pll_res->pll_1_base)
  404. __dsi_pll_disable(pll_res->pll_1_base);
  405. mdss_pll_resource_enable(pll_res, false);
  406. }
  407. static int dsi_pll_regulator_notifier_call(struct notifier_block *self,
  408. unsigned long event, void *data)
  409. {
  410. struct mdss_pll_resources *pll_res;
  411. if (!self) {
  412. pr_err("pll_resource is invalid\n");
  413. goto error;
  414. }
  415. pll_res = container_of(self, struct
  416. mdss_pll_resources, gdsc_cb);
  417. if (event & REGULATOR_EVENT_ENABLE) {
  418. pr_debug("Regulator ON event. Scheduling pll off worker\n");
  419. schedule_work(&pll_res->pll_off);
  420. }
  421. if (event & REGULATOR_EVENT_DISABLE)
  422. pr_debug("Regulator OFF event.\n");
  423. error:
  424. return NOTIFY_OK;
  425. }
  426. int dsi_pll_clock_register_20nm(struct platform_device *pdev,
  427. struct mdss_pll_resources *pll_res)
  428. {
  429. int rc;
  430. struct dss_vreg *pll_reg;
  431. /*
  432. * Set client data to mux, div and vco clocks.
  433. * This needs to be done only for PLL0 since, that is the one in
  434. * use.
  435. **/
  436. if (!pll_res->index) {
  437. byte_clk_src.priv = pll_res;
  438. pixel_clk_src.priv = pll_res;
  439. bypass_lp_div_mux_8994.priv = pll_res;
  440. indirect_path_div2_clk_8994.priv = pll_res;
  441. ndiv_clk_8994.priv = pll_res;
  442. fixed_hr_oclk2_div_clk_8994.priv = pll_res;
  443. hr_oclk3_div_clk_8994.priv = pll_res;
  444. dsi_vco_clk_8994.priv = pll_res;
  445. shadow_byte_clk_src.priv = pll_res;
  446. shadow_pixel_clk_src.priv = pll_res;
  447. shadow_bypass_lp_div_mux_8994.priv = pll_res;
  448. shadow_indirect_path_div2_clk_8994.priv = pll_res;
  449. shadow_ndiv_clk_8994.priv = pll_res;
  450. shadow_fixed_hr_oclk2_div_clk_8994.priv = pll_res;
  451. shadow_hr_oclk3_div_clk_8994.priv = pll_res;
  452. shadow_dsi_vco_clk_8994.priv = pll_res;
  453. pll_res->vco_delay = VCO_DELAY_USEC;
  454. /* Set clock source operations */
  455. pixel_clk_src_ops = clk_ops_slave_div;
  456. pixel_clk_src_ops.prepare = dsi_pll_div_prepare;
  457. ndiv_clk_ops = clk_ops_div;
  458. ndiv_clk_ops.prepare = dsi_pll_div_prepare;
  459. byte_clk_src_ops = clk_ops_div;
  460. byte_clk_src_ops.prepare = dsi_pll_div_prepare;
  461. bypass_lp_div_mux_clk_ops = clk_ops_gen_mux;
  462. bypass_lp_div_mux_clk_ops.prepare = dsi_pll_mux_prepare;
  463. clk_ops_gen_mux_dsi = clk_ops_gen_mux;
  464. clk_ops_gen_mux_dsi.round_rate = parent_round_rate;
  465. clk_ops_gen_mux_dsi.set_rate = parent_set_rate;
  466. shadow_pixel_clk_src_ops = clk_ops_slave_div;
  467. shadow_pixel_clk_src_ops.prepare = dsi_pll_div_prepare;
  468. shadow_byte_clk_src_ops = clk_ops_div;
  469. shadow_byte_clk_src_ops.prepare = dsi_pll_div_prepare;
  470. } else {
  471. mdss_dsi1_vco_clk_src.priv = pll_res;
  472. }
  473. if ((pll_res->target_id == MDSS_PLL_TARGET_8994) ||
  474. (pll_res->target_id == MDSS_PLL_TARGET_8992)) {
  475. if (pll_res->index) {
  476. rc = of_msm_clock_register(pdev->dev.of_node,
  477. mdss_dsi_pll_1_cc_8994,
  478. ARRAY_SIZE(mdss_dsi_pll_1_cc_8994));
  479. if (rc) {
  480. pr_err("Clock register failed\n");
  481. rc = -EPROBE_DEFER;
  482. }
  483. } else {
  484. rc = of_msm_clock_register(pdev->dev.of_node,
  485. mdss_dsi_pllcc_8994,
  486. ARRAY_SIZE(mdss_dsi_pllcc_8994));
  487. if (rc) {
  488. pr_err("Clock register failed\n");
  489. rc = -EPROBE_DEFER;
  490. }
  491. pll_res->gdsc_cb.notifier_call =
  492. dsi_pll_regulator_notifier_call;
  493. INIT_WORK(&pll_res->pll_off, dsi_pll_off_work);
  494. pll_reg = mdss_pll_get_mp_by_reg_name(pll_res, "gdsc");
  495. if (pll_reg) {
  496. pr_debug("Registering for gdsc regulator events\n");
  497. if (regulator_register_notifier(pll_reg->vreg,
  498. &(pll_res->gdsc_cb)))
  499. pr_err("Regulator notification registration failed!\n");
  500. }
  501. }
  502. } else {
  503. pr_err("Invalid target ID\n");
  504. rc = -EINVAL;
  505. }
  506. if (!rc)
  507. pr_info("Registered DSI PLL clocks successfully\n");
  508. return rc;
  509. }