1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > 高通设置LDO电压

高通设置LDO电压

时间:2021-04-01 19:08:38

相关推荐

高通设置LDO电压

高通平台如何设置LDO电压,以LDO17为例,默认给屏供电,设置为2.85V现在设置为3.3V。

修改的rpm和sbl部分代码,修改LDO17电压为3.3V 。

修改如下: (1)、

---a/RPM.BF.2.2/rpm_proc/core/systemdrivers/pmic/config/msm8937/pm_config_target.c

+++b/RPM.BF.2.2/rpm_proc/core/systemdrivers/pmic/config/msm8937/pm_config_target.c

@@-66,7+66,7@@staticpm_rpm_ldo_rail_info_typeldo_rail_a[]=

{5,50,0,PM_ACCESS_ALLOWED,PM_NONE,PM_NPA_SW_MODE_LDO__IPEAK,PM_NPA_BYPASS_DISALLOWED,PM_DROOP_DETECT_DIS,1775,3325,0,PM_SETTLING_ERR_DIS,PM_SETTLING_EN,0},//LDO14ULTP50

{5,50,0,PM_ACCESS_ALLOWED,PM_NONE,PM_NPA_SW_MODE_LDO__IPEAK,PM_NPA_BYPASS_DISALLOWED,PM_DROOP_DETECT_DIS,1775,3325,0,PM_SETTLING_ERR_DIS,PM_SETTLING_EN,0},//LDO15ULTP50

{5,50,0,PM_ACCESS_ALLOWED,PM_NONE,PM_NPA_SW_MODE_LDO__NPM,PM_NPA_BYPASS_DISALLOWED,PM_DROOP_DETECT_DIS,1800,1800,0,PM_SETTLING_ERR_EN,PM_SETTLING_EN,0},//LDO16P50-removedin8909

-{5,50,0,PM_ACCESS_ALLOWED,PM_NONE,PM_NPA_SW_MODE_LDO__NPM,PM_NPA_BYPASS_DISALLOWED,PM_DROOP_DETECT_DIS,2800,2900,0,PM_SETTLING_ERR_DIS,PM_SETTLING_EN,0},//LDO17ULTP600

+{5,50,0,PM_ACCESS_ALLOWED,PM_NONE,PM_NPA_SW_MODE_LDO__NPM,PM_NPA_BYPASS_DISALLOWED,PM_DROOP_DETECT_DIS,2800,3300,0,PM_SETTLING_ERR_DIS,PM_SETTLING_EN,0},//LDO17ULTP600

{5,50,0,PM_ACCESS_ALLOWED,PM_NONE,PM_NPA_SW_MODE_LDO__NPM,PM_NPA_BYPASS_DISALLOWED,PM_DROOP_DETECT_DIS,2675,2725,0,PM_SETTLING_ERR_DIS,PM_SETTLING_EN,0},//LDO18ULTP150

{5,62.5,0,PM_ACCESS_ALLOWED,PM_NONE,PM_NPA_SW_MODE_LDO__IPEAK,PM_NPA_BYPASS_DISALLOWED,PM_DROOP_DETECT_DIS,1225,1375,0,PM_SETTLING_ERR_DIS,PM_SETTLING_EN,0},//LDO19LDOWLAN

{5,250,0,PM_ACCESS_ALLOWED,PM_NONE,PM_NPA_SW_MODE_LDO__NPM,PM_NPA_BYPASS_DISALLOWED,PM_DROOP_DETECT_DIS,1740,1740,0,PM_SETTLING_ERR_EN,PM_SETTLING_EN,0},//LDO20LDOXOLDO-LN_LDO

(2)、

---a/BOOT.BF.3.3/boot_images/core/systemdrivers/pmic/target/msm8937_pm8937_pmi8937/system/src/pm_sbl_boot_oem.c

+++b/BOOT.BF.3.3/boot_images/core/systemdrivers/pmic/target/msm8937_pm8937_pmi8937/system/src/pm_sbl_boot_oem.c

@@-75,7+75,9@@pm_err_flag_type

pm_driver_post_init(void)

{

pm_err_flag_typeerr_flag=PM_ERR_FLAG__SUCCESS;

-

+pm_ldo_sw_enable(0,PM_LDO_17,PM_OFF);//disableLDO

+pm_ldo_volt_level(0,PM_LDO_17,3300000);//changeLDOrange

+pm_ldo_sw_enable(0,PM_LDO_17,PM_ON);//enableLDOagain

returnerr_flag;

}

(3)、

--- a/kernel/msm-3.18/arch/arm/boot/dts/qcom/msm8937-mdss-panels.dtsi+++ b/kernel/msm-3.18/arch/arm/boot/dts/qcom/msm8937-mdss-panels.dtsi@@ -35,8 +35,8 @@qcom,panel-supply-entry@0 {reg = <0>;qcom,supply-name = "vdd";- qcom,supply-min-voltage = <2850000>;- qcom,supply-max-voltage = <2850000>;+ qcom,supply-min-voltage = <3300000>;+ qcom,supply-max-voltage = <3300000>;qcom,supply-enable-load = <100000>;qcom,supply-disable-load = <100>;};

高通官方给出的修改建议:

1. LDO default voltage, range and default using devices can be found at PMIC device specificationdocSuch as 80-NJ117-1 table 3-7 for PM8994, 80-NT390-1 table 3-6 for PM89522. If you want to change the LDO voltage, please check firsta. can't set the LDO voltage bigger than the max programmable rangeb. check HW, confirm the voltage don't impact other devicesc. Don't suggest change the LDO which used by RF or GPS default to other devices3. LDO comman range and indexFile: \rpm_proc\core\systemdrivers\pmic\config\common\1200, such as PM8994 L1pm_pwr_volt_info_type n1200_volt[3] ={{ 375000, 1537500, 12500}, //LDO 0 (auto low range){ 375000, 1537500, 12500}, //LDO 1 (ultra low range){ 750000, 1537500, 12500}, //LDO 2 (low range)};N600, such as L26pm_pwr_volt_info_type n600_volt[3] ={{ 0, 0, 0}, //LDO //invalid range -- place holder{ 375000, 1287500, 12500}, //LDO 1 (ultra low range){ 750000, 1537500, 12500}, //LDO 2 (low range)};Other, N300, such as L2pm_pwr_volt_info_type nmos_volt[3] ={{ 0, 0, 0}, //invalid range -- place holder{ 0, 0, 0}, //invalid range -- place holder{ 750000, 1537500, 12500}, //LDO 2 (low range)};PMOS LDO,pm_pwr_volt_info_type pmos_volt[5] ={{ 0, 0, 0}, //invalid range -- place holder{ 0, 0, 0}, //invalid range -- place holder{ 750000, 1537500, 12500}, //LDO 2 (low range){1500000, 3075000, 25000}, //LDO 3 (mid range){1750000, 4900000, 50000}, //LDO 4(high range)};4. LDO control by RPM, need to check or change the range at RPM firstYou must set the voltage in one range according above table, RPM will check it, if it is not right, willcrash.Such as PMOS,index 2: 750mv to 1537MVindex 3: 1500mv to 3075mvindex 4: 1750mv to 4900mvExample for L23 of PM8994,rpm_proc\core\systemdrivers\pmic\config\msm8996\pm_config_target.cpm_rpm_ldo_rail_info_type ldo_rail_a[] ={{10, 200, 0, PM_ACCESS_ALLOWED, PM_NONE, PM_NPA_SW_MODE_LDO__IPEAK,PM_NPA_BYPASS_ALLOWED, PM_DROOP_DETECT_DIS, 2700, 2900, 0,PM_SETTLING_ERR_EN, PM_SETTLING_EN, 0}, // LDO23 P600}L23 min voltage is 2700mv, max voltage is 2900mv,From index range, L23 current index is 3,If change L23 to 3V, can change 2900 to 3075 directly,If change L23 to 3.3V, for PMOS index 3 max voltage is 3075V, need change to index 4,So, can change min 1750 max 3300 or just change max to 3300, min still keep 2700But can't change min to 1700, for index 4, min voltage is 17505. Change the codes at SBLIf LDO range is changed, must change it at SBL before RPM loaded, else will crash at RPM forindex diff.a. If index don't change, don't need to enable LDO also, don't need to change any codes at SBL,just need to change at kernelb. If index don't change, need to enable LDO at SBLpm_ldo_volt_level(0, PM_LDO_23, 3000000); //set LDO voltagepm_ldo_sw_enable(0, PM_LDO_23, PM_ON); //enable LDO at SBLc. If index change, LDO default is offpm_ldo_volt_level(0, PM_LDO_23, 3300000); //change LDO rangepm_ldo_sw_enable(0, PM_LDO_23, PM_ON); //enable LDOd. If index change, LDO default is on, need to disable it first, then change the indexpm_ldo_sw_enable(0, PM_LDO_23, PM_OFF); //disable LDOpm_ldo_volt_level(0, PM_LDO_23, 3300000); //change LDO rangepm_ldo_sw_enable(0, PM_LDO_23, PM_ON); //enable LDO againe. Where add the codes?1) Old platform, such as msm8916, msm8939/8909boot_images\core\systemdrivers\pmic\framework\src\pm_init.cAt the end of function pm_oem_init( )2) msm8952/53/37/76 platformThis file is pm_sbl_boot_oem.c, but need to change at the right platform path,At the end of function pm_driver_post_init ( )Path for diff platform,boot_images\core\systemdrivers\pmic\target\msm8953_pm8953_pmi8950\system\src\boot_images\core\systemdrivers\pmic\target\msm8952_pm8950_pmi8950\system\src\boot_images\core\systemdrivers\pmic\target\msm8976_pm8950_pmi8950_pm8004\system\src3) msm8994/96 change at XBL\boot_images\QcomPkg\Library\PmicLib\target\msm8996_pm8994_pmi8994\system\src\pm_sbl_boot_oem.cAt the end of function pm_driver_post_init ( )4) At new platform must add in pm_driver_post_init ( ), if add in pm_device_post_init( ), for LDOdon't init, also will crash at RPM6. Change the voltage at kernelChange voltage min, max and init value at dtsi\arch\arm\boot\dts\qcom\msm8996-regulator.dtsirpm-regulator-ldoa23 {status = "okay";pm8994_l23: regulator-l23 {regulator-min-microvolt = <2800000>;regulator-max-microvolt = <2800000>;qcom,init-voltage = <2800000>;status = "okay";};};7. How to use the LDO at kernel sideCan check the doc 80-NV610-47 for PM8952 and 80-NM328-63 for PM8994.One attention, must call egulator_set_optimum_mode( ) before enable LDO, it will set LDO tonormal mode.Can check the sample codes in msm_hsusb_ldo_enable( )static int msm_hsusb_ldo_enable( ){case USB_PHY_REG_3P3_ON:ret = regulator_set_optimum_mode(hsusb_3p3,USB_PHY_3P3_HPM_LOAD);ret = regulator_enable(hsusb_3p3);break;case USB_PHY_REG_3P3_OFF:ret = regulator_disable(hsusb_3p3);ret = regulator_set_optimum_mode(hsusb_3p3, 0);break;}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。