Skip to contentSkip to conversation

clk: qcom: camcc-nord: Correct camera clock source tables

PATCH Applied Taniya Das 4 participants 4 messages Sep 26 – Nov 8

Subsystems (3)
lore
Share & tools
lore

Taniya Das

author
#0 lore raw

PATCH 1/1 clk: qcom: camcc-nord: Correct camera clock source tables

Select the PLL0 odd output for the 200 MHz and 400 MHz CAMNOC RT AXI rates. Use PLL0 main output dividers for the 300 MHz and 400 MHz CPHY RX rates.

CSID and IFE Lite use the CPHY RX rates, so share that table rather than duplicating it. Remove the unsupported 300 MHz CSI PHY timer rate.

Fixes 7647815dfc8f ("clk: qcom: camcc: Add support for camera clock controller for Nord")
---
 drivers/clk/qcom/camcc-nord.c | 22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)
drivers/clk/qcom/camcc-nord.c +7 -15
index 9e3c40cb3ad5f06196bab87593afb7d1c7da411d..1c1314340b92f03af442b82a6402e442f1550a2c 100644
@@ -515,8 +515,8 @@ static const struct clk_parent_data cam_cc_parent_data_9[] = {
 };
 
 static const struct freq_tbl ftbl_cam_cc_camnoc_rt_axi_clk_src[] = {
-	F(300000000, P_CAM_CC_PLL0_OUT_EVEN, 2, 0, 0),
-	F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0),
+	F(200000000, P_CAM_CC_PLL0_OUT_ODD, 2, 0, 0),
+	F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0),
 	{ }
 };
 
@@ -622,8 +622,8 @@ static struct clk_rcg2 cam_cc_cci_4_clk_src = {
 };
 
 static const struct freq_tbl ftbl_cam_cc_cphy_rx_clk_src[] = {
-	F(300000000, P_CAM_CC_PLL0_OUT_EVEN, 2, 0, 0),
-	F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0),
+	F(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0),
+	F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0),
 	F(480000000, P_CAM_CC_PLL0_OUT_MAIN, 2.5, 0, 0),
 	{ }
 };
@@ -645,7 +645,6 @@ static struct clk_rcg2 cam_cc_cphy_rx_clk_src = {
 };
 
 static const struct freq_tbl ftbl_cam_cc_csi0phytimer_clk_src[] = {
-	F(300000000, P_CAM_CC_PLL0_OUT_EVEN, 2, 0, 0),
 	F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0),
 	{ }
 };
@@ -730,19 +729,12 @@ static struct clk_rcg2 cam_cc_csi4phytimer_clk_src = {
 	},
 };
 
-static const struct freq_tbl ftbl_cam_cc_csid_clk_src[] = {
-	F(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0),
-	F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0),
-	F(480000000, P_CAM_CC_PLL0_OUT_MAIN, 2.5, 0, 0),
-	{ }
-};
-
 static struct clk_rcg2 cam_cc_csid_clk_src = {
 	.cmd_rcgr = 0x13214,
 	.mnd_width = 0,
 	.hid_width = 5,
 	.parent_map = cam_cc_parent_map_1,
-	.freq_tbl = ftbl_cam_cc_csid_clk_src,
+	.freq_tbl = ftbl_cam_cc_cphy_rx_clk_src,
 	.hw_clk_ctrl = true,
 	.clkr.hw.init = &(const struct clk_init_data) {
 		.name = "cam_cc_csid_clk_src",
@@ -889,7 +881,7 @@ static struct clk_rcg2 cam_cc_ife_lite_clk_src = {
 	.mnd_width = 0,
 	.hid_width = 5,
 	.parent_map = cam_cc_parent_map_1,
-	.freq_tbl = ftbl_cam_cc_csid_clk_src,
+	.freq_tbl = ftbl_cam_cc_cphy_rx_clk_src,
 	.hw_clk_ctrl = true,
 	.clkr.hw.init = &(const struct clk_init_data) {
 		.name = "cam_cc_ife_lite_clk_src",
@@ -905,7 +897,7 @@ static struct clk_rcg2 cam_cc_ife_lite_csid_clk_src = {
 	.mnd_width = 0,
 	.hid_width = 5,
 	.parent_map = cam_cc_parent_map_1,
-	.freq_tbl = ftbl_cam_cc_csid_clk_src,
+	.freq_tbl = ftbl_cam_cc_cphy_rx_clk_src,
 	.hw_clk_ctrl = true,
 	.clkr.hw.init = &(const struct clk_init_data) {
 		.name = "cam_cc_ife_lite_csid_clk_src",

---
base-commit: f5f84daefcd92d7a630066635ecea1433ed5eac7
change-id: 20260926-fix_camcc-7f03083c0bc5

Best regards,

Signature · 1 line
Taniya Das <[email protected]>
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Taniya Das

Select the PLL0 odd output for the 200 MHz and 400 MHz CAMNOC RT AXI rates. Use PLL0 main output dividers for the 300 MHz and 400 MHz CPHY RX rates.

CSID and IFE Lite use the CPHY RX rates, so share that table rather than duplicating it. Remove the unsupported 300 MHz CSI PHY timer rate.

Fixes 7647815dfc8f ("clk: qcom: camcc: Add support for camera clock controller for Nord")
Reviewed-by on v1 1/1
#2 lore raw
In reply to Taniya Das
Quoted 8 lines · Taniya Das

Select the PLL0 odd output for the 200 MHz and 400 MHz CAMNOC RT AXI rates. Use PLL0 main output dividers for the 300 MHz and 400 MHz CPHY RX rates.

CSID and IFE Lite use the CPHY RX rates, so share that table rather than duplicating it. Remove the unsupported 300 MHz CSI PHY timer rate.

Quoted 6 lines
Fixes 7647815dfc8f ("clk: qcom: camcc: Add support for camera clock controller for Nord")
---
 drivers/clk/qcom/camcc-nord.c | 22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)
maintainer Applied
#3 lore raw
In reply to Taniya Das
Quoted 9 lines · Taniya Das

Select the PLL0 odd output for the 200 MHz and 400 MHz CAMNOC RT AXI rates. Use PLL0 main output dividers for the 300 MHz and 400 MHz CPHY RX rates.

CSID and IFE Lite use the CPHY RX rates, so share that table rather than duplicating it. Remove the unsupported 300 MHz CSI PHY timer rate.

[...]

Applied, thanks!

[1/1] clk: qcom: camcc-nord: Correct camera clock source tables

      commit: 3b3328b5c58d92d8025b71cd2e11eda420dd0ad2

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>