Loading Documentation/devicetree/bindings/fb/mdss-pll.txt +0 −3 Original line number Diff line number Diff line Loading @@ -27,9 +27,6 @@ Optional properties: - label: A string used to describe the driver used. - vcca-supply: Phandle for vcca regulator device node. - qcom,dsi-pll-slave: indicates it is pll slave at split display case. Otherwise it is pll master. - qcom,platform-supply-entries: A node that lists the elements of the supply. There can be more than one instance of this binding, in which case the entry would be appended with Loading arch/arm/boot/dts/qcom/msm8996-cdp.dtsi +6 −0 Original line number Diff line number Diff line Loading @@ -356,6 +356,12 @@ &mdss_dsi1 { qcom,dsi-pref-prim-pan = <&dsi_dual_sharp_video>; pinctrl-names = "mdss_default", "mdss_sleep"; pinctrl-0 = <&mdss_dsi_active &mdss_te_active>; pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>; qcom,platform-te-gpio = <&tlmm 10 0>; qcom,platform-reset-gpio = <&tlmm 8 0>; qcom,platform-bklight-en-gpio = <&pm8994_gpios 14 0>; }; &mdss_hdmi_tx { Loading arch/arm/boot/dts/qcom/msm8996-mtp.dtsi +58 −0 Original line number Diff line number Diff line Loading @@ -351,12 +351,19 @@ pinctrl-names = "mdss_default", "mdss_sleep"; pinctrl-0 = <&mdss_dsi_active &mdss_te_active>; pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>; qcom,platform-te-gpio = <&tlmm 10 0>; qcom,platform-reset-gpio = <&tlmm 8 0>; qcom,platform-bklight-en-gpio = <&pm8994_gpios 14 0>; }; &mdss_dsi1 { qcom,dsi-pref-prim-pan = <&dsi_dual_sharp_video>; pinctrl-names = "mdss_default", "mdss_sleep"; pinctrl-0 = <&mdss_dsi_active &mdss_te_active>; pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>; qcom,platform-te-gpio = <&tlmm 10 0>; qcom,platform-reset-gpio = <&tlmm 8 0>; qcom,platform-bklight-en-gpio = <&pm8994_gpios 14 0>; }; &labibb { Loading @@ -373,6 +380,41 @@ qcom,panel-supply-entries = <&dsi_panel_pwr_supply>; }; &dsi_dual_nt35597_video { qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; qcom,mdss-dsi-bl-min-level = <1>; qcom,mdss-dsi-bl-max-level = <4095>; qcom,cont-splash-enabled; qcom,panel-supply-entries = <&dsi_panel_pwr_supply>; }; &dsi_nt35597_dsc_video { qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; qcom,mdss-dsi-bl-min-level = <1>; qcom,mdss-dsi-bl-max-level = <4095>; qcom,panel-supply-entries = <&dsi_panel_pwr_supply>; }; &dsi_nt35597_dsc_cmd { qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; qcom,mdss-dsi-bl-min-level = <1>; qcom,mdss-dsi-bl-max-level = <4095>; qcom,panel-supply-entries = <&dsi_panel_pwr_supply>; }; &dsi_dual_jdi_cmd { pwms = <&pmi8994_pwm_4 0 0>; pwm-names = "backlight"; qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm"; qcom,mdss-dsi-bl-pwm-pmi; qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>; qcom,mdss-dsi-bl-min-level = <1>; qcom,mdss-dsi-bl-max-level = <4095>; qcom,5v-boost-gpio = <&pmi8994_gpios 8 0>; qcom,cont-splash-enabled; qcom,panel-supply-entries = <&dsi_panel_pwr_supply>; }; /{ mtp_batterydata: qcom,battery-data { qcom,batt-id-range-pct = <15>; Loading Loading @@ -429,6 +471,15 @@ }; &pmi8994_gpios { gpio@c700 { /* GPIO 8, lcd_reg_en, 5V boost */ qcom,mode = <1>; qcom,vin-sel = <2>; qcom,src-sel = <0>; qcom,invert = <1>; /* need invert = 0 */ qcom,master-en = <1>; status = "okay"; }; gpio@c100 { /* GPIO 2 SPKR_SD_N */ qcom,mode = <1>; /* DIGITAL OUT */ qcom,pull = <5>; /* No Pull */ Loading Loading @@ -457,6 +508,13 @@ }; }; &pmi8994_pwm_4 { qcom,channel-owner = "lcd_bl"; qcom,lpg-dtest-line = <4>; qcom,dtest-output = <1>; status = "okay"; }; &pmi8994_mpps { mpp@a000 { /* MPP 1 */ qcom,mode = <1>; /* Digital output */ Loading drivers/clk/msm/mdss/mdss-dsi-pll-8996-util.c +74 −2 Original line number Diff line number Diff line Loading @@ -593,6 +593,76 @@ static void pll_db_commit_8996(void __iomem *pll_base, wmb(); /* make sure register committed */ } /* * pll_source_finding: * Both GLBL_TEST_CTRL and CLKBUFLR_EN are configured * at mdss_dsi_8996_phy_config() */ static int pll_source_finding(struct mdss_pll_resources *pll) { u32 clk_buf_en; u32 glbl_test_ctrl; glbl_test_ctrl = MDSS_PLL_REG_R(pll->pll_base, DSIPHY_CMN_GLBL_TEST_CTRL); clk_buf_en = MDSS_PLL_REG_R(pll->pll_base, DSIPHY_PLL_CLKBUFLR_EN); glbl_test_ctrl &= BIT(2); glbl_test_ctrl >>= 2; pr_debug("%s: pll=%d clk_buf_en=%x glbl_test_ctrl=%x\n", __func__, pll->index, clk_buf_en, glbl_test_ctrl); clk_buf_en &= (PLL_OUTPUT_RIGHT | PLL_OUTPUT_LEFT); if ((glbl_test_ctrl == PLL_SOURCE_FROM_LEFT) && (clk_buf_en == PLL_OUTPUT_BOTH)) return PLL_MASTER; if ((glbl_test_ctrl == PLL_SOURCE_FROM_RIGHT) && (clk_buf_en == PLL_OUTPUT_NONE)) return PLL_SLAVE; if ((glbl_test_ctrl == PLL_SOURCE_FROM_LEFT) && (clk_buf_en == PLL_OUTPUT_RIGHT)) return PLL_STANDALONE; pr_debug("%s: Error pll setup, clk_buf_en=%x glbl_test_ctrl=%x\n", __func__, clk_buf_en, glbl_test_ctrl); return PLL_UNKNOWN; } static void pll_source_setup(struct mdss_pll_resources *pll) { int status; struct dsi_pll_db *pdb = (struct dsi_pll_db *)pll->priv; struct mdss_pll_resources *other; if (pdb->source_setup_done) return; pdb->source_setup_done++; status = pll_source_finding(pll); if (status == PLL_STANDALONE || status == PLL_UNKNOWN) return; other = pdb->next->pll; if (!other) return; pr_debug("%s: status=%d pll=%d other=%d\n", __func__, status, pll->index, other->index); if (status == PLL_MASTER) pll->slave = other; else other->slave = pll; } int pll_vco_set_rate_8996(struct clk *c, unsigned long rate) { int rc; Loading @@ -613,8 +683,10 @@ int pll_vco_set_rate_8996(struct clk *c, unsigned long rate) return rc; } pr_debug("%s: ndx=%d base=%p rate=%lu\n", __func__, pll->index, pll->pll_base, rate); pll_source_setup(pll); pr_debug("%s: ndx=%d base=%p rate=%lu slave=%p\n", __func__, pll->index, pll->pll_base, rate, pll->slave); pll->vco_current_rate = rate; pll->vco_ref_clk_rate = vco->ref_clk_rate; Loading drivers/clk/msm/mdss/mdss-dsi-pll-8996.c +9 −18 Original line number Diff line number Diff line Loading @@ -287,8 +287,8 @@ static struct clk_lookup mdss_dsi_pllcc_8996_1[] = { int dsi_pll_clock_register_8996(struct platform_device *pdev, struct mdss_pll_resources *pll_res) { int rc; static struct mdss_pll_resources *master_pll; int rc, ndx; struct dsi_pll_db *pdb; if (!pdev || !pdev->dev.of_node) { pr_err("Invalid input parameters\n"); Loading @@ -300,27 +300,18 @@ int dsi_pll_clock_register_8996(struct platform_device *pdev, return -EPROBE_DEFER; } pr_err("ndx=%d is_slave=%d\n", pll_res->index, pll_res->is_slave); if (pll_res->index >= DSI_PLL_NUM) { pr_err("pll ndx=%d is NOT supported\n", pll_res->index); return -EINVAL; } if (!pll_res->is_slave) { /* master at split display or stand alone */ pll_res->priv = &pll_db[pll_res->index]; master_pll = pll_res; /* keep master pll */ } else { /* slave pll */ if (!master_pll) { pr_err("No match PLL master found for ndx=%d\n", pll_res->index); return -EINVAL; } master_pll->slave = pll_res; return 0; /* done for slave */ } ndx = pll_res->index; pdb = &pll_db[ndx]; pll_res->priv = pdb; pdb->pll = pll_res; ndx++; ndx %= DSI_PLL_NUM; pdb->next = &pll_db[ndx]; /* Set clock source operations */ Loading Loading
Documentation/devicetree/bindings/fb/mdss-pll.txt +0 −3 Original line number Diff line number Diff line Loading @@ -27,9 +27,6 @@ Optional properties: - label: A string used to describe the driver used. - vcca-supply: Phandle for vcca regulator device node. - qcom,dsi-pll-slave: indicates it is pll slave at split display case. Otherwise it is pll master. - qcom,platform-supply-entries: A node that lists the elements of the supply. There can be more than one instance of this binding, in which case the entry would be appended with Loading
arch/arm/boot/dts/qcom/msm8996-cdp.dtsi +6 −0 Original line number Diff line number Diff line Loading @@ -356,6 +356,12 @@ &mdss_dsi1 { qcom,dsi-pref-prim-pan = <&dsi_dual_sharp_video>; pinctrl-names = "mdss_default", "mdss_sleep"; pinctrl-0 = <&mdss_dsi_active &mdss_te_active>; pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>; qcom,platform-te-gpio = <&tlmm 10 0>; qcom,platform-reset-gpio = <&tlmm 8 0>; qcom,platform-bklight-en-gpio = <&pm8994_gpios 14 0>; }; &mdss_hdmi_tx { Loading
arch/arm/boot/dts/qcom/msm8996-mtp.dtsi +58 −0 Original line number Diff line number Diff line Loading @@ -351,12 +351,19 @@ pinctrl-names = "mdss_default", "mdss_sleep"; pinctrl-0 = <&mdss_dsi_active &mdss_te_active>; pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>; qcom,platform-te-gpio = <&tlmm 10 0>; qcom,platform-reset-gpio = <&tlmm 8 0>; qcom,platform-bklight-en-gpio = <&pm8994_gpios 14 0>; }; &mdss_dsi1 { qcom,dsi-pref-prim-pan = <&dsi_dual_sharp_video>; pinctrl-names = "mdss_default", "mdss_sleep"; pinctrl-0 = <&mdss_dsi_active &mdss_te_active>; pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>; qcom,platform-te-gpio = <&tlmm 10 0>; qcom,platform-reset-gpio = <&tlmm 8 0>; qcom,platform-bklight-en-gpio = <&pm8994_gpios 14 0>; }; &labibb { Loading @@ -373,6 +380,41 @@ qcom,panel-supply-entries = <&dsi_panel_pwr_supply>; }; &dsi_dual_nt35597_video { qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; qcom,mdss-dsi-bl-min-level = <1>; qcom,mdss-dsi-bl-max-level = <4095>; qcom,cont-splash-enabled; qcom,panel-supply-entries = <&dsi_panel_pwr_supply>; }; &dsi_nt35597_dsc_video { qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; qcom,mdss-dsi-bl-min-level = <1>; qcom,mdss-dsi-bl-max-level = <4095>; qcom,panel-supply-entries = <&dsi_panel_pwr_supply>; }; &dsi_nt35597_dsc_cmd { qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; qcom,mdss-dsi-bl-min-level = <1>; qcom,mdss-dsi-bl-max-level = <4095>; qcom,panel-supply-entries = <&dsi_panel_pwr_supply>; }; &dsi_dual_jdi_cmd { pwms = <&pmi8994_pwm_4 0 0>; pwm-names = "backlight"; qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm"; qcom,mdss-dsi-bl-pwm-pmi; qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>; qcom,mdss-dsi-bl-min-level = <1>; qcom,mdss-dsi-bl-max-level = <4095>; qcom,5v-boost-gpio = <&pmi8994_gpios 8 0>; qcom,cont-splash-enabled; qcom,panel-supply-entries = <&dsi_panel_pwr_supply>; }; /{ mtp_batterydata: qcom,battery-data { qcom,batt-id-range-pct = <15>; Loading Loading @@ -429,6 +471,15 @@ }; &pmi8994_gpios { gpio@c700 { /* GPIO 8, lcd_reg_en, 5V boost */ qcom,mode = <1>; qcom,vin-sel = <2>; qcom,src-sel = <0>; qcom,invert = <1>; /* need invert = 0 */ qcom,master-en = <1>; status = "okay"; }; gpio@c100 { /* GPIO 2 SPKR_SD_N */ qcom,mode = <1>; /* DIGITAL OUT */ qcom,pull = <5>; /* No Pull */ Loading Loading @@ -457,6 +508,13 @@ }; }; &pmi8994_pwm_4 { qcom,channel-owner = "lcd_bl"; qcom,lpg-dtest-line = <4>; qcom,dtest-output = <1>; status = "okay"; }; &pmi8994_mpps { mpp@a000 { /* MPP 1 */ qcom,mode = <1>; /* Digital output */ Loading
drivers/clk/msm/mdss/mdss-dsi-pll-8996-util.c +74 −2 Original line number Diff line number Diff line Loading @@ -593,6 +593,76 @@ static void pll_db_commit_8996(void __iomem *pll_base, wmb(); /* make sure register committed */ } /* * pll_source_finding: * Both GLBL_TEST_CTRL and CLKBUFLR_EN are configured * at mdss_dsi_8996_phy_config() */ static int pll_source_finding(struct mdss_pll_resources *pll) { u32 clk_buf_en; u32 glbl_test_ctrl; glbl_test_ctrl = MDSS_PLL_REG_R(pll->pll_base, DSIPHY_CMN_GLBL_TEST_CTRL); clk_buf_en = MDSS_PLL_REG_R(pll->pll_base, DSIPHY_PLL_CLKBUFLR_EN); glbl_test_ctrl &= BIT(2); glbl_test_ctrl >>= 2; pr_debug("%s: pll=%d clk_buf_en=%x glbl_test_ctrl=%x\n", __func__, pll->index, clk_buf_en, glbl_test_ctrl); clk_buf_en &= (PLL_OUTPUT_RIGHT | PLL_OUTPUT_LEFT); if ((glbl_test_ctrl == PLL_SOURCE_FROM_LEFT) && (clk_buf_en == PLL_OUTPUT_BOTH)) return PLL_MASTER; if ((glbl_test_ctrl == PLL_SOURCE_FROM_RIGHT) && (clk_buf_en == PLL_OUTPUT_NONE)) return PLL_SLAVE; if ((glbl_test_ctrl == PLL_SOURCE_FROM_LEFT) && (clk_buf_en == PLL_OUTPUT_RIGHT)) return PLL_STANDALONE; pr_debug("%s: Error pll setup, clk_buf_en=%x glbl_test_ctrl=%x\n", __func__, clk_buf_en, glbl_test_ctrl); return PLL_UNKNOWN; } static void pll_source_setup(struct mdss_pll_resources *pll) { int status; struct dsi_pll_db *pdb = (struct dsi_pll_db *)pll->priv; struct mdss_pll_resources *other; if (pdb->source_setup_done) return; pdb->source_setup_done++; status = pll_source_finding(pll); if (status == PLL_STANDALONE || status == PLL_UNKNOWN) return; other = pdb->next->pll; if (!other) return; pr_debug("%s: status=%d pll=%d other=%d\n", __func__, status, pll->index, other->index); if (status == PLL_MASTER) pll->slave = other; else other->slave = pll; } int pll_vco_set_rate_8996(struct clk *c, unsigned long rate) { int rc; Loading @@ -613,8 +683,10 @@ int pll_vco_set_rate_8996(struct clk *c, unsigned long rate) return rc; } pr_debug("%s: ndx=%d base=%p rate=%lu\n", __func__, pll->index, pll->pll_base, rate); pll_source_setup(pll); pr_debug("%s: ndx=%d base=%p rate=%lu slave=%p\n", __func__, pll->index, pll->pll_base, rate, pll->slave); pll->vco_current_rate = rate; pll->vco_ref_clk_rate = vco->ref_clk_rate; Loading
drivers/clk/msm/mdss/mdss-dsi-pll-8996.c +9 −18 Original line number Diff line number Diff line Loading @@ -287,8 +287,8 @@ static struct clk_lookup mdss_dsi_pllcc_8996_1[] = { int dsi_pll_clock_register_8996(struct platform_device *pdev, struct mdss_pll_resources *pll_res) { int rc; static struct mdss_pll_resources *master_pll; int rc, ndx; struct dsi_pll_db *pdb; if (!pdev || !pdev->dev.of_node) { pr_err("Invalid input parameters\n"); Loading @@ -300,27 +300,18 @@ int dsi_pll_clock_register_8996(struct platform_device *pdev, return -EPROBE_DEFER; } pr_err("ndx=%d is_slave=%d\n", pll_res->index, pll_res->is_slave); if (pll_res->index >= DSI_PLL_NUM) { pr_err("pll ndx=%d is NOT supported\n", pll_res->index); return -EINVAL; } if (!pll_res->is_slave) { /* master at split display or stand alone */ pll_res->priv = &pll_db[pll_res->index]; master_pll = pll_res; /* keep master pll */ } else { /* slave pll */ if (!master_pll) { pr_err("No match PLL master found for ndx=%d\n", pll_res->index); return -EINVAL; } master_pll->slave = pll_res; return 0; /* done for slave */ } ndx = pll_res->index; pdb = &pll_db[ndx]; pll_res->priv = pdb; pdb->pll = pll_res; ndx++; ndx %= DSI_PLL_NUM; pdb->next = &pll_db[ndx]; /* Set clock source operations */ Loading