mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
mdf:rk616:vif:set mclk to 12M when vif on
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
#include <linux/mfd/core.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/mfd/rk616.h>
|
||||
#include <linux/clk.h>
|
||||
#include <mach/iomux.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/uaccess.h>
|
||||
@@ -378,6 +377,8 @@ static int rk616_i2c_probe(struct i2c_client *client,const struct i2c_device_id
|
||||
}
|
||||
else
|
||||
{
|
||||
rk616->mclk = iis_clk;
|
||||
|
||||
#if defined(CONFIG_ARCH_RK29)
|
||||
rk29_mux_api_set(GPIO2D0_I2S0CLK_MIIRXCLKIN_NAME, GPIO2H_I2S0_CLK);
|
||||
#else
|
||||
@@ -385,7 +386,7 @@ static int rk616_i2c_probe(struct i2c_client *client,const struct i2c_device_id
|
||||
#endif
|
||||
clk_enable(iis_clk);
|
||||
clk_set_rate(iis_clk, 11289600);
|
||||
clk_put(iis_clk);
|
||||
//clk_put(iis_clk);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ static int rk616_vif_cfg(struct mfd_rk616 *rk616,rk_screen *fscreen,int id)
|
||||
{
|
||||
val = (VIF0_EN << 16); //disable vif0
|
||||
ret = rk616->write_dev(rk616,VIF0_REG0,&val);
|
||||
clk_set_rate(rk616->mclk, 11289600);
|
||||
return 0;
|
||||
}
|
||||
offset = 0;
|
||||
@@ -38,6 +39,7 @@ static int rk616_vif_cfg(struct mfd_rk616 *rk616,rk_screen *fscreen,int id)
|
||||
{
|
||||
val = (VIF0_EN << 16); //disabl VIF1
|
||||
ret = rk616->write_dev(rk616,VIF1_REG0,&val);
|
||||
clk_set_rate(rk616->mclk, 11289600);
|
||||
return 0;
|
||||
}
|
||||
offset = 0x18;
|
||||
@@ -48,6 +50,10 @@ static int rk616_vif_cfg(struct mfd_rk616 *rk616,rk_screen *fscreen,int id)
|
||||
pll_use_mclk12m = false;
|
||||
}
|
||||
|
||||
if(pll_use_mclk12m)
|
||||
{
|
||||
clk_set_rate(rk616->mclk, 12000000);
|
||||
}
|
||||
screen = fscreen->ext_screen;
|
||||
if(!screen)
|
||||
{
|
||||
@@ -712,7 +718,7 @@ int rk616_set_vif(rk_screen *screen,bool connect)
|
||||
pdata = rk616->pdata;
|
||||
lcd_screen->ext_screen = screen;
|
||||
}
|
||||
|
||||
|
||||
if((pdata->lcd0_func == INPUT) && (pdata->lcd1_func == INPUT))
|
||||
{
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/rk_fb.h>
|
||||
#include <linux/clk.h>
|
||||
|
||||
#define VIF0_REG0 0x0000
|
||||
#define VIF0_DDR_CLK_EN (1<<3)
|
||||
@@ -258,6 +259,7 @@ struct mfd_rk616 {
|
||||
struct rk616_platform_data *pdata;
|
||||
struct rk616_route route; //display path router
|
||||
struct i2c_client *client;
|
||||
struct clk *mclk;
|
||||
struct dentry *debugfs_dir;
|
||||
int (*read_dev)(struct mfd_rk616 *rk616,u16 reg,u32 *pval);
|
||||
int (*write_dev)(struct mfd_rk616 *rk616,u16 reg,u32 *pval);
|
||||
|
||||
Reference in New Issue
Block a user