Skip to content

Commit

Permalink
mipi: data: Add support of MIPI RX PHY
Browse files Browse the repository at this point in the history
Add support of mipi rx phy with MIPICSI SS
and fix other minor bugs.

Signed-off-by: Kunal Rane <[email protected]>

Acked-for-series: Gaddipati, Naveen <[email protected]>
  • Loading branch information
Kunal Rane authored and Siva Addepalli committed Mar 25, 2024
1 parent fd09164 commit b980dc5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
11 changes: 9 additions & 2 deletions mipi_csi2_rx_ss/data/mipi_csi2_rx_ss.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ proc mipi_csi2_rx_ss_generate {drv_handle} {
add_prop "${node}" "xlnx,dphy-mode" 0 int $dts_file 1
}

set cphymode [hsi get_property CONFIG.C_PHY_MODE [hsi::get_cells -hier $drv_handle]]
if {[string match -nocase "dphy" $dphymode]} {
add_prop "${node}" "xlnx,mipi-rx-phy-mode" 1 int $dts_file 1
} else {
add_prop "${node}" "xlnx,mipi-rx-phy-mode" 0 int $dts_file 1
}

if { [string match -nocase "true" $en_csi_v2_0] && [string match -nocase "true" $en_vcx] && [string match -nocase $cmn_vc "ALL"]} {
add_prop "${node}" "xlnx,cmn-vc" 16 int $dts_file 1
} elseif {[string match -nocase "true" $en_csi_v2_0] && [string match -nocase "false" $en_vcx] && [string match -nocase $cmn_vc "ALL"]} {
Expand Down Expand Up @@ -107,10 +114,10 @@ proc csirx2_add_hier_instances {drv_handle} {
set ip_subcores [dict create]
dict set ip_subcores "mipi_csi2_rx_ctrl" "csirx"
dict set ip_subcores "mipi_dphy" "dphy"
# dict set ip_subcores "hdcp22_rx" "hdcp22"
dict set ip_subcores "mipi_rx_phy" "rxphy"
foreach ip [dict keys $ip_subcores] {

if { $ip eq "mipi_dphy"} {
if { $ip eq "mipi_dphy" || $ip eq "mipi_rx_phy" } {
if {[string match -nocase "false" $dphy_en_reg_if]} {
continue
}
Expand Down
5 changes: 2 additions & 3 deletions mipi_dsi_rx_ss/data/mipi_dsi_rx_ss.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,13 @@ proc dsirx_add_hier_instances {drv_handle} {
hsi::current_hw_instance $drv_handle

#Example :
#hsi::get_cells -hier -filter {IP_NAME==mipi_csi2_rx_ctrl}
#csirx_0_rx
#hsi::get_cells -hier -filter {IP_NAME==mipi_dsi2_rx_ctrl}
#dsirx_0_rx
#

set ip_subcores [dict create]
dict set ip_subcores "mipi_dsi_rx_ctrl" "dsi-rx"
dict set ip_subcores "mipi_dphy" "dphy"
# dict set ip_subcores "hdcp22_rx" "hdcp22"

foreach ip [dict keys $ip_subcores] {
set ip_handle [hsi::get_cells -hier -filter "IP_NAME==$ip"]
Expand Down
5 changes: 2 additions & 3 deletions mipi_dsi_tx_ss/data/mipi_dsi_tx_ss.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,13 @@ proc dsitx_add_hier_instances {drv_handle} {
hsi::current_hw_instance $drv_handle

#Example :
#hsi::get_cells -hier -filter {IP_NAME==mipi_csi2_rx_ctrl}
#csirx_0_rx
#hsi::get_cells -hier -filter {IP_NAME==mipi_dsi2_tx_ctrl}
#dsitx_0_tx
#

set ip_subcores [dict create]
dict set ip_subcores "mipi_dsi_tx_ctrl" "dsi-tx"
dict set ip_subcores "mipi_dphy" "dphy"
# dict set ip_subcores "hdcp22_rx" "hdcp22"

foreach ip [dict keys $ip_subcores] {
set ip_handle [hsi::get_cells -hier -filter "IP_NAME==$ip"]
Expand Down

0 comments on commit b980dc5

Please sign in to comment.