xref: /rk3399_rockchip-uboot/drivers/video/rockchip/rk_mipi.c (revision 36602eba803d13520a4980dd0ccb0e243214052e)
11c398404SEric Gao /*
21c398404SEric Gao  * Copyright (c) 2017, Fuzhou Rockchip Electronics Co., Ltd
31c398404SEric Gao  * Author: Eric Gao <eric.gao@rock-chips.com>
41c398404SEric Gao  *
51c398404SEric Gao  * SPDX-License-Identifier: GPL-2.0+
61c398404SEric Gao  */
71c398404SEric Gao 
81c398404SEric Gao #include <common.h>
91c398404SEric Gao #include <clk.h>
101c398404SEric Gao #include <display.h>
111c398404SEric Gao #include <dm.h>
121c398404SEric Gao #include <fdtdec.h>
131c398404SEric Gao #include <panel.h>
141c398404SEric Gao #include <regmap.h>
15*36602ebaSeric.gao@rock-chips.com #include "rk_mipi.h"
161c398404SEric Gao #include <syscon.h>
171c398404SEric Gao #include <asm/gpio.h>
181c398404SEric Gao #include <asm/hardware.h>
191c398404SEric Gao #include <asm/io.h>
201c398404SEric Gao #include <dm/uclass-internal.h>
211c398404SEric Gao #include <linux/kernel.h>
221c398404SEric Gao #include <asm/arch/clock.h>
231c398404SEric Gao #include <asm/arch/cru_rk3399.h>
241c398404SEric Gao #include <asm/arch/grf_rk3399.h>
251c398404SEric Gao #include <asm/arch/rockchip_mipi_dsi.h>
261c398404SEric Gao 
271c398404SEric Gao DECLARE_GLOBAL_DATA_PTR;
281c398404SEric Gao 
rk_mipi_read_timing(struct udevice * dev,struct display_timing * timing)29*36602ebaSeric.gao@rock-chips.com int rk_mipi_read_timing(struct udevice *dev,
301c398404SEric Gao 			struct display_timing *timing)
311c398404SEric Gao {
321c398404SEric Gao 	int ret;
331c398404SEric Gao 
341c398404SEric Gao 	ret = fdtdec_decode_display_timing(gd->fdt_blob, dev_of_offset(dev),
351c398404SEric Gao 					 0, timing);
361c398404SEric Gao 	if (ret) {
371c398404SEric Gao 		debug("%s: Failed to decode display timing (ret=%d)\n",
381c398404SEric Gao 		      __func__, ret);
391c398404SEric Gao 		return -EINVAL;
401c398404SEric Gao 	}
411c398404SEric Gao 
421c398404SEric Gao 	return 0;
431c398404SEric Gao }
441c398404SEric Gao 
451c398404SEric Gao /*
461c398404SEric Gao  * Register write function used only for mipi dsi controller.
471c398404SEric Gao  * Parameter:
481c398404SEric Gao  *  @regs: mipi controller address
491c398404SEric Gao  *  @reg: combination of regaddr(16bit)|bitswidth(8bit)|offset(8bit) you can
501c398404SEric Gao  *        use define in rk_mipi.h directly for this parameter
511c398404SEric Gao  *  @val: value that will be write to specified bits of register
521c398404SEric Gao  */
rk_mipi_dsi_write(uintptr_t regs,u32 reg,u32 val)530c9eceb7Seric.gao@rock-chips.com static void rk_mipi_dsi_write(uintptr_t regs, u32 reg, u32 val)
541c398404SEric Gao {
551c398404SEric Gao 	u32 dat;
561c398404SEric Gao 	u32 mask;
571c398404SEric Gao 	u32 offset = (reg >> OFFSET_SHIFT) & 0xff;
581c398404SEric Gao 	u32 bits = (reg >> BITS_SHIFT) & 0xff;
590c9eceb7Seric.gao@rock-chips.com 	uintptr_t addr = (reg >> ADDR_SHIFT) + regs;
601c398404SEric Gao 
611c398404SEric Gao 	/* Mask for specifiled bits,the corresponding bits will be clear */
621c398404SEric Gao 	mask = ~((0xffffffff << offset) & (0xffffffff >> (32 - offset - bits)));
631c398404SEric Gao 
641c398404SEric Gao 	/* Make sure val in the available range */
651c398404SEric Gao 	val &= ~(0xffffffff << bits);
661c398404SEric Gao 
671c398404SEric Gao 	/* Get register's original val */
681c398404SEric Gao 	dat = readl(addr);
691c398404SEric Gao 
701c398404SEric Gao 	/* Clear specified bits */
711c398404SEric Gao 	dat &= mask;
721c398404SEric Gao 
731c398404SEric Gao 	/* Fill specified bits */
741c398404SEric Gao 	dat |= val << offset;
751c398404SEric Gao 
761c398404SEric Gao 	writel(dat, addr);
771c398404SEric Gao }
781c398404SEric Gao 
rk_mipi_dsi_enable(struct udevice * dev,const struct display_timing * timing)79*36602ebaSeric.gao@rock-chips.com int rk_mipi_dsi_enable(struct udevice *dev,
801c398404SEric Gao 		       const struct display_timing *timing)
811c398404SEric Gao {
821c398404SEric Gao 	int node, timing_node;
831c398404SEric Gao 	int val;
841c398404SEric Gao 	struct rk_mipi_priv *priv = dev_get_priv(dev);
850c9eceb7Seric.gao@rock-chips.com 	uintptr_t regs = priv->regs;
861c398404SEric Gao 	u32 txbyte_clk = priv->txbyte_clk;
871c398404SEric Gao 	u32 txesc_clk = priv->txesc_clk;
881c398404SEric Gao 
891c398404SEric Gao 	txesc_clk = txbyte_clk/(txbyte_clk/txesc_clk + 1);
901c398404SEric Gao 
911c398404SEric Gao 	/* Set Display timing parameter */
921c398404SEric Gao 	rk_mipi_dsi_write(regs, VID_HSA_TIME, timing->hsync_len.typ);
931c398404SEric Gao 	rk_mipi_dsi_write(regs, VID_HBP_TIME, timing->hback_porch.typ);
941c398404SEric Gao 	rk_mipi_dsi_write(regs, VID_HLINE_TIME, (timing->hsync_len.typ
951c398404SEric Gao 			  + timing->hback_porch.typ + timing->hactive.typ
961c398404SEric Gao 			  + timing->hfront_porch.typ));
971c398404SEric Gao 	rk_mipi_dsi_write(regs, VID_VSA_LINES, timing->vsync_len.typ);
981c398404SEric Gao 	rk_mipi_dsi_write(regs, VID_VBP_LINES, timing->vback_porch.typ);
991c398404SEric Gao 	rk_mipi_dsi_write(regs, VID_VFP_LINES, timing->vfront_porch.typ);
1001c398404SEric Gao 	rk_mipi_dsi_write(regs, VID_ACTIVE_LINES, timing->vactive.typ);
1011c398404SEric Gao 
1021c398404SEric Gao 	/* Set Signal Polarity */
1031c398404SEric Gao 	val = (timing->flags & DISPLAY_FLAGS_HSYNC_LOW) ? 1 : 0;
1041c398404SEric Gao 	rk_mipi_dsi_write(regs, HSYNC_ACTIVE_LOW, val);
1051c398404SEric Gao 
1061c398404SEric Gao 	val = (timing->flags & DISPLAY_FLAGS_VSYNC_LOW) ? 1 : 0;
1071c398404SEric Gao 	rk_mipi_dsi_write(regs, VSYNC_ACTIVE_LOW, val);
1081c398404SEric Gao 
1091c398404SEric Gao 	val = (timing->flags & DISPLAY_FLAGS_DE_LOW) ? 1 : 0;
1101c398404SEric Gao 	rk_mipi_dsi_write(regs, DISPLAY_FLAGS_DE_LOW, val);
1111c398404SEric Gao 
1121c398404SEric Gao 	val = (timing->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) ? 1 : 0;
1131c398404SEric Gao 	rk_mipi_dsi_write(regs, COLORM_ACTIVE_LOW, val);
1141c398404SEric Gao 
1151c398404SEric Gao 	/* Set video mode */
1161c398404SEric Gao 	rk_mipi_dsi_write(regs, CMD_VIDEO_MODE, VIDEO_MODE);
1171c398404SEric Gao 
1181c398404SEric Gao 	/* Set video mode transmission type as burst mode */
1191c398404SEric Gao 	rk_mipi_dsi_write(regs, VID_MODE_TYPE, BURST_MODE);
1201c398404SEric Gao 
1211c398404SEric Gao 	/* Set pix num in a video package */
1221c398404SEric Gao 	rk_mipi_dsi_write(regs, VID_PKT_SIZE, 0x4b0);
1231c398404SEric Gao 
1241c398404SEric Gao 	/* Set dpi color coding depth 24 bit */
1251c398404SEric Gao 	timing_node = fdt_subnode_offset(gd->fdt_blob, dev_of_offset(dev),
1261c398404SEric Gao 									 "display-timings");
1271c398404SEric Gao 	node = fdt_first_subnode(gd->fdt_blob, timing_node);
1281c398404SEric Gao 	val = fdtdec_get_int(gd->fdt_blob, node, "bits-per-pixel", -1);
1291c398404SEric Gao 	switch (val) {
1301c398404SEric Gao 	case 16:
1311c398404SEric Gao 		rk_mipi_dsi_write(regs, DPI_COLOR_CODING, DPI_16BIT_CFG_1);
1321c398404SEric Gao 		break;
1331c398404SEric Gao 	case 24:
1341c398404SEric Gao 		rk_mipi_dsi_write(regs, DPI_COLOR_CODING, DPI_24BIT);
1351c398404SEric Gao 		break;
1361c398404SEric Gao 	case 30:
1371c398404SEric Gao 		rk_mipi_dsi_write(regs, DPI_COLOR_CODING, DPI_30BIT);
1381c398404SEric Gao 		break;
1391c398404SEric Gao 	default:
1401c398404SEric Gao 		rk_mipi_dsi_write(regs, DPI_COLOR_CODING, DPI_24BIT);
1411c398404SEric Gao 	}
1421c398404SEric Gao 	/* Enable low power mode */
1431c398404SEric Gao 	rk_mipi_dsi_write(regs, LP_CMD_EN, 1);
1441c398404SEric Gao 	rk_mipi_dsi_write(regs, LP_HFP_EN, 1);
1451c398404SEric Gao 	rk_mipi_dsi_write(regs, LP_VACT_EN, 1);
1461c398404SEric Gao 	rk_mipi_dsi_write(regs, LP_VFP_EN, 1);
1471c398404SEric Gao 	rk_mipi_dsi_write(regs, LP_VBP_EN, 1);
1481c398404SEric Gao 	rk_mipi_dsi_write(regs, LP_VSA_EN, 1);
1491c398404SEric Gao 
1501c398404SEric Gao 	/* Division for timeout counter clk */
1511c398404SEric Gao 	rk_mipi_dsi_write(regs, TO_CLK_DIVISION, 0x0a);
1521c398404SEric Gao 
1531c398404SEric Gao 	/* Tx esc clk division from txbyte clk */
1541c398404SEric Gao 	rk_mipi_dsi_write(regs, TX_ESC_CLK_DIVISION, txbyte_clk/txesc_clk);
1551c398404SEric Gao 
1561c398404SEric Gao 	/* Timeout count for hs<->lp transation between Line period */
1571c398404SEric Gao 	rk_mipi_dsi_write(regs, HSTX_TO_CNT, 0x3e8);
1581c398404SEric Gao 
1591c398404SEric Gao 	/* Phy State transfer timing */
1601c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_STOP_WAIT_TIME, 32);
1611c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_TXREQUESTCLKHS, 1);
1621c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_HS2LP_TIME, 0x14);
1631c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_LP2HS_TIME, 0x10);
1641c398404SEric Gao 	rk_mipi_dsi_write(regs, MAX_RD_TIME, 0x2710);
1651c398404SEric Gao 
1661c398404SEric Gao 	/* Power on */
1671c398404SEric Gao 	rk_mipi_dsi_write(regs, SHUTDOWNZ, 1);
1681c398404SEric Gao 
1691c398404SEric Gao 	return 0;
1701c398404SEric Gao }
1711c398404SEric Gao 
1721c398404SEric Gao /* rk mipi dphy write function. It is used to write test data to dphy */
rk_mipi_phy_write(uintptr_t regs,unsigned char test_code,unsigned char * test_data,unsigned char size)1730c9eceb7Seric.gao@rock-chips.com static void rk_mipi_phy_write(uintptr_t regs, unsigned char test_code,
1741c398404SEric Gao 			      unsigned char *test_data, unsigned char size)
1751c398404SEric Gao {
1761c398404SEric Gao 	int i = 0;
1771c398404SEric Gao 
1781c398404SEric Gao 	/* Write Test code */
1791c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_TESTCLK, 1);
1801c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_TESTDIN, test_code);
1811c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_TESTEN, 1);
1821c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_TESTCLK, 0);
1831c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_TESTEN, 0);
1841c398404SEric Gao 
1851c398404SEric Gao 	/* Write Test data */
1861c398404SEric Gao 	for (i = 0; i < size; i++) {
1871c398404SEric Gao 		rk_mipi_dsi_write(regs, PHY_TESTCLK, 0);
1881c398404SEric Gao 		rk_mipi_dsi_write(regs, PHY_TESTDIN, test_data[i]);
1891c398404SEric Gao 		rk_mipi_dsi_write(regs, PHY_TESTCLK, 1);
1901c398404SEric Gao 	}
1911c398404SEric Gao }
1921c398404SEric Gao 
1931c398404SEric Gao /*
1941c398404SEric Gao  * Mipi dphy config function. Calculate the suitable prediv, feedback div,
1951c398404SEric Gao  * fsfreqrang value ,cap ,lpf and so on according to the given pix clk rate,
1961c398404SEric Gao  * and then enable phy.
1971c398404SEric Gao  */
rk_mipi_phy_enable(struct udevice * dev)198*36602ebaSeric.gao@rock-chips.com int rk_mipi_phy_enable(struct udevice *dev)
1991c398404SEric Gao {
2001c398404SEric Gao 	int i;
2011c398404SEric Gao 	struct rk_mipi_priv *priv = dev_get_priv(dev);
2020c9eceb7Seric.gao@rock-chips.com 	uintptr_t regs = priv->regs;
2031c398404SEric Gao 	u64 fbdiv;
2041c398404SEric Gao 	u64 prediv = 1;
2051c398404SEric Gao 	u32 max_fbdiv = 512;
2061c398404SEric Gao 	u32 max_prediv, min_prediv;
2071c398404SEric Gao 	u64 ddr_clk = priv->phy_clk;
2081c398404SEric Gao 	u32 refclk = priv->ref_clk;
2091c398404SEric Gao 	u32 remain = refclk;
2101c398404SEric Gao 	unsigned char test_data[2] = {0};
2111c398404SEric Gao 
2121c398404SEric Gao 	int freq_rang[][2] = {
2131c398404SEric Gao 		{90, 0x01},   {100, 0x10},  {110, 0x20},  {130, 0x01},
2141c398404SEric Gao 		{140, 0x11},  {150, 0x21},  {170, 0x02},  {180, 0x12},
2151c398404SEric Gao 		{200, 0x22},  {220, 0x03},  {240, 0x13},  {250, 0x23},
2161c398404SEric Gao 		{270, 0x04},  {300, 0x14},  {330, 0x05},  {360, 0x15},
2171c398404SEric Gao 		{400, 0x25},  {450, 0x06},  {500, 0x16},  {550, 0x07},
2181c398404SEric Gao 		{600, 0x17},  {650, 0x08},  {700, 0x18},  {750, 0x09},
2191c398404SEric Gao 		{800, 0x19},  {850, 0x29},  {900, 0x39},  {950, 0x0a},
2201c398404SEric Gao 		{1000, 0x1a}, {1050, 0x2a}, {1100, 0x3a}, {1150, 0x0b},
2211c398404SEric Gao 		{1200, 0x1b}, {1250, 0x2b}, {1300, 0x3b}, {1350, 0x0c},
2221c398404SEric Gao 		{1400, 0x1c}, {1450, 0x2c}, {1500, 0x3c}
2231c398404SEric Gao 	};
2241c398404SEric Gao 
2251c398404SEric Gao 	/* Shutdown mode */
2261c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_SHUTDOWNZ, 0);
2271c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_RSTZ, 0);
2281c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_TESTCLR, 1);
2291c398404SEric Gao 
2301c398404SEric Gao 	/* Pll locking */
2311c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_TESTCLR, 0);
2321c398404SEric Gao 
2331c398404SEric Gao 	/* config cp and lfp */
2341c398404SEric Gao 	test_data[0] = 0x80 | (ddr_clk / (200 * MHz)) << 3 | 0x3;
2351c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_PLL_VCORANGE_VCOCAP, test_data, 1);
2361c398404SEric Gao 
2371c398404SEric Gao 	test_data[0] = 0x8;
2381c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_PLL_CPCTRL, test_data, 1);
2391c398404SEric Gao 
2401c398404SEric Gao 	test_data[0] = 0x80 | 0x40;
2411c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_PLL_LPF_CP, test_data, 1);
2421c398404SEric Gao 
2431c398404SEric Gao 	/* select the suitable value for fsfreqrang reg */
2441c398404SEric Gao 	for (i = 0; i < ARRAY_SIZE(freq_rang); i++) {
2451c398404SEric Gao 		if (ddr_clk / (MHz) >= freq_rang[i][0])
2461c398404SEric Gao 			break;
2471c398404SEric Gao 	}
2481c398404SEric Gao 	if (i == ARRAY_SIZE(freq_rang)) {
2491c398404SEric Gao 		debug("%s: Dphy freq out of range!\n", __func__);
2501c398404SEric Gao 		return -EINVAL;
2511c398404SEric Gao 	}
2521c398404SEric Gao 	test_data[0] = freq_rang[i][1] << 1;
2531c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_HS_RX_LANE0, test_data, 1);
2541c398404SEric Gao 
2551c398404SEric Gao 	/*
2561c398404SEric Gao 	 * Calculate the best ddrclk and it's corresponding div value. If the
2571c398404SEric Gao 	 * given pixelclock is great than 250M, ddrclk will be fix 1500M.
2581c398404SEric Gao 	 * Otherwise,
2591c398404SEric Gao 	 * it's equal to ddr_clk= pixclk * 6. 40MHz >= refclk / prediv >= 5MHz
2601c398404SEric Gao 	 * according to spec.
2611c398404SEric Gao 	 */
2621c398404SEric Gao 	max_prediv = (refclk / (5 * MHz));
2631c398404SEric Gao 	min_prediv = ((refclk / (40 * MHz)) ? (refclk / (40 * MHz) + 1) : 1);
2641c398404SEric Gao 
2651c398404SEric Gao 	debug("%s: DEBUG: max_prediv=%u, min_prediv=%u\n", __func__, max_prediv,
2661c398404SEric Gao 	      min_prediv);
2671c398404SEric Gao 
2681c398404SEric Gao 	if (max_prediv < min_prediv) {
2691c398404SEric Gao 		debug("%s: Invalid refclk value\n", __func__);
2701c398404SEric Gao 		return -EINVAL;
2711c398404SEric Gao 	}
2721c398404SEric Gao 
2731c398404SEric Gao 	/* Calculate the best refclk and feedback division value for dphy pll */
2741c398404SEric Gao 	for (i = min_prediv; i < max_prediv; i++) {
2751c398404SEric Gao 		if ((ddr_clk * i % refclk < remain) &&
2761c398404SEric Gao 		    (ddr_clk * i / refclk) < max_fbdiv) {
2771c398404SEric Gao 			prediv = i;
2781c398404SEric Gao 			remain = ddr_clk * i % refclk;
2791c398404SEric Gao 		}
2801c398404SEric Gao 	}
2811c398404SEric Gao 	fbdiv = ddr_clk * prediv / refclk;
2821c398404SEric Gao 	ddr_clk = refclk * fbdiv / prediv;
2831c398404SEric Gao 	priv->phy_clk = ddr_clk;
2841c398404SEric Gao 
2851c398404SEric Gao 	debug("%s: DEBUG: refclk=%u, refclk=%llu, fbdiv=%llu, phyclk=%llu\n",
2861c398404SEric Gao 	      __func__, refclk, prediv, fbdiv, ddr_clk);
2871c398404SEric Gao 
2881c398404SEric Gao 	/* config prediv and feedback reg */
2891c398404SEric Gao 	test_data[0] = prediv - 1;
2901c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_PLL_INPUT_DIV_RAT, test_data, 1);
2911c398404SEric Gao 	test_data[0] = (fbdiv - 1) & 0x1f;
2921c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_PLL_LOOP_DIV_RAT, test_data, 1);
2931c398404SEric Gao 	test_data[0] = (fbdiv - 1) >> 5 | 0x80;
2941c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_PLL_LOOP_DIV_RAT, test_data, 1);
2951c398404SEric Gao 	test_data[0] = 0x30;
2961c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_PLL_INPUT_LOOP_DIV_RAT, test_data, 1);
2971c398404SEric Gao 
2981c398404SEric Gao 	/* rest config */
2991c398404SEric Gao 	test_data[0] = 0x4d;
3001c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_BANDGAP_BIAS_CTRL, test_data, 1);
3011c398404SEric Gao 
3021c398404SEric Gao 	test_data[0] = 0x3d;
3031c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_TERMINATION_CTRL, test_data, 1);
3041c398404SEric Gao 
3051c398404SEric Gao 	test_data[0] = 0xdf;
3061c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_TERMINATION_CTRL, test_data, 1);
3071c398404SEric Gao 
3081c398404SEric Gao 	test_data[0] =  0x7;
3091c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_AFE_BIAS_BANDGAP_ANOLOG, test_data, 1);
3101c398404SEric Gao 
3111c398404SEric Gao 	test_data[0] = 0x80 | 0x7;
3121c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_AFE_BIAS_BANDGAP_ANOLOG, test_data, 1);
3131c398404SEric Gao 
3141c398404SEric Gao 	test_data[0] = 0x80 | 15;
3151c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_HSTXDATALANEREQUSETSTATETIME,
3161c398404SEric Gao 			  test_data, 1);
3171c398404SEric Gao 	test_data[0] = 0x80 | 85;
3181c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_HSTXDATALANEPREPARESTATETIME,
3191c398404SEric Gao 			  test_data, 1);
3201c398404SEric Gao 	test_data[0] = 0x40 | 10;
3211c398404SEric Gao 	rk_mipi_phy_write(regs, CODE_HSTXDATALANEHSZEROSTATETIME,
3221c398404SEric Gao 			  test_data, 1);
3231c398404SEric Gao 
3241c398404SEric Gao 	/* enter into stop mode */
3251c398404SEric Gao 	rk_mipi_dsi_write(regs, N_LANES, 0x03);
3261c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_ENABLECLK, 1);
3271c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_FORCEPLL, 1);
3281c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_SHUTDOWNZ, 1);
3291c398404SEric Gao 	rk_mipi_dsi_write(regs, PHY_RSTZ, 1);
3301c398404SEric Gao 
3311c398404SEric Gao 	return 0;
3321c398404SEric Gao }
3331c398404SEric Gao 
334