summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandy.hu <andy.hu@starfivetech.com>2023-08-22 16:28:47 +0300
committerandy.hu <andy.hu@starfivetech.com>2023-08-22 16:28:47 +0300
commit05533e9c31d6f0da20efc2d436a3b0f6d516ed4b (patch)
treee22f53ee0a1f5d548b816f19d734eb5133750e2b
parent0a64960eaca8693fba232ab01c10a730c3a008f4 (diff)
parent70be5e94658ddfcd11b5dc2fcc9705d8f4dc3dca (diff)
downloadlinux-05533e9c31d6f0da20efc2d436a3b0f6d516ed4b.tar.xz
Merge branch 'CR_7073_vf2_515_newrd10_shengyang.chen' into 'vf2-515-devel'VF2_v3.6.1
CR 7073 vf2 515: riscv: drm: panel: mass production radxa 10inch panel support See merge request sbc/linux!164
-rwxr-xr-xarch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsi32
-rwxr-xr-xdrivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c4
-rw-r--r--drivers/gpu/drm/panel/panel-starfive-10inch.c4
-rw-r--r--drivers/gpu/drm/verisilicon/starfive_drm_dsi.c8
4 files changed, 25 insertions, 23 deletions
diff --git a/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsi
index c03d63acb281..8ad3183d1358 100755
--- a/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsi
@@ -448,19 +448,6 @@
reg = <0x38>;
};
- panel_radxa@19 {
- compatible ="starfive_jadard";
- reg = <0x19>;
- reset-gpio = <&gpio 23 0>;
- enable-gpio = <&gpio 22 0>;
-
- port {
- panel_out1: endpoint {
- remote-endpoint = <&dsi1_output>;
- };
- };
- };
-
touchscreen@14 {
compatible = "goodix,gt911";
reg = <0x14>;
@@ -476,11 +463,26 @@
enable-gpio = <&gpio 22 0>;
port {
- panel_out2: endpoint {
- remote-endpoint = <&dsi2_output>;
+ panel_out1: endpoint {
+ remote-endpoint = <&dsi1_output>;
};
};
};
+
+ panel_radxa@19 {
+ compatible ="starfive_jadard";
+ reg = <0x19>;
+ reset-gpio = <&gpio 23 0>;
+ enable-gpio = <&gpio 22 0>;
+
+ port {
+ panel_out2: endpoint {
+ remote-endpoint = <&dsi2_output>;
+ };
+ };
+ };
+
+
};
&i2c5 {
diff --git a/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c b/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c
index 0b7341cecc45..7006bfa99a79 100755
--- a/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c
+++ b/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c
@@ -514,7 +514,7 @@ static int panel_probe(struct i2c_client *client, const struct i2c_device_id *id
int ret = 0;
struct mipi_dsi_device_info info = {
.type = DSI_DRIVER_NAME,
- .channel = 1, //0,
+ .channel = 2, //0,
.node = NULL,
};
@@ -642,7 +642,7 @@ static int jadard_dsi_probe(struct mipi_dsi_device *dsi)
dsi->mode_flags = MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE ;
dsi->format = MIPI_DSI_FMT_RGB888;
dsi->lanes = 4;
- dsi->channel = 1;
+ dsi->channel = 2;
dsi->hs_rate = 490000000;
ret = mipi_dsi_attach(dsi);
diff --git a/drivers/gpu/drm/panel/panel-starfive-10inch.c b/drivers/gpu/drm/panel/panel-starfive-10inch.c
index f6590c9c1676..c84f6a043538 100644
--- a/drivers/gpu/drm/panel/panel-starfive-10inch.c
+++ b/drivers/gpu/drm/panel/panel-starfive-10inch.c
@@ -246,7 +246,7 @@ static int panel_probe(struct i2c_client *client, const struct i2c_device_id *id
struct device *dev = &client->dev;
struct mipi_dsi_device_info info = {
.type = DSI_DRIVER_NAME,
- .channel = 2, //0,
+ .channel = 1, //0,
.node = NULL,
};
@@ -390,7 +390,7 @@ static int starfive_dsi_probe(struct mipi_dsi_device *dsi)
dsi->mode_flags = MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE ;
dsi->format = MIPI_DSI_FMT_RGB888;
dsi->lanes = 4;
- dsi->channel = 2;
+ dsi->channel = 1;
dsi->hs_rate = 980000000;
ret = mipi_dsi_attach(dsi);
diff --git a/drivers/gpu/drm/verisilicon/starfive_drm_dsi.c b/drivers/gpu/drm/verisilicon/starfive_drm_dsi.c
index fc0486a44acf..0efabb667129 100644
--- a/drivers/gpu/drm/verisilicon/starfive_drm_dsi.c
+++ b/drivers/gpu/drm/verisilicon/starfive_drm_dsi.c
@@ -752,13 +752,13 @@ static int cdns_dsi_mode2cfg(struct cdns_dsi *dsi,
dsi_cfg->hsa = 117-DSI_HSA_FRAME_OVERHEAD;
dsi_cfg->hbp = 115-DSI_HBP_FRAME_OVERHEAD;
dsi_cfg->hfp = 209-DSI_HFP_FRAME_OVERHEAD;
- } else if (output->dev->channel == 1){//raxda 8 inch config
+ } else if (output->dev->channel == 2){//raxda 8 inch config
dsi_cfg->hsa = 45-DSI_HSA_FRAME_OVERHEAD;
dsi_cfg->hbp = 134-DSI_HBP_FRAME_OVERHEAD;
dsi_cfg->hfp = 356-DSI_HFP_FRAME_OVERHEAD;
}
- else if (output->dev->channel == 2){//raxda 10 inch config
+ else if (output->dev->channel == 1){//raxda 10 inch config
dsi_cfg->hsa = 405-DSI_HSA_FRAME_OVERHEAD;
dsi_cfg->hbp = 403-DSI_HBP_FRAME_OVERHEAD;
dsi_cfg->hfp = 396-DSI_HFP_FRAME_OVERHEAD;
@@ -845,9 +845,9 @@ static int cdns_dsi_check_conf(struct cdns_dsi *dsi,
if (output->dev->channel == 0) {
phy_cfg->hs_clk_rate = 750000000;//seeed
- } else if (output->dev->channel == 1){
- phy_cfg->hs_clk_rate = 490000000;//8 inch
} else if (output->dev->channel == 2){
+ phy_cfg->hs_clk_rate = 490000000;//8 inch
+ } else if (output->dev->channel == 1){
phy_cfg->hs_clk_rate = 980000000;//10 inch
}