Qualcomm's RPM SMD GPU Regulator


#1

I’m developing a custom kernel for my Smartphone, what has an Qualcomm Snapdragon 435 SOC (MSM8940). I need help about some tips about overclocking. Dor snapdragon 4xx and 6xx family we shoud unlock PLL to overclock be effective, in GPU for example, for now i’m overclocking my Adreno 505 GPU to 600MHz with a good stability, but i know i can go more than this, but for go more i nedd to do some overvoltage at GPU regulators, like on CPU regulators… But thats the problem… GPU regulators, different of CPU regulators is using an different implementation that i dont know how to deal with. In CPU we have voltages in millivolts what we can edit inside regulators limits. But in GPU we haven’t this, just levels, for example:

/* VDD_CX supply */
rpm-regulator-smpa2 {
    status = "okay";
    qcom,gx-retention; //Enable regulator retention level for IDLE modes
    qcom,soft-start-enable = <0x1>; //enable soft start to start without current peaks that can damage device
    qcom,hpm-enable = <0x1>; //enable high power mode
    qcom,boost-current-limit = <14>; //3200mA maximum
    qcom,ocp-enable = <1>; //enables over current protection
    qcom,init-quiet-mode = <2>; //Regulator EMI noise reduction
    pm8937_s2_level: regulator-s2-level {
        compatible = "qcom,rpm-smd-regulator";
        regulator-name = "pm8937_s2_level";
        qcom,set = <3>;
        regulator-min-microvolt =
            <RPM_SMD_REGULATOR_LEVEL_RETENTION>;
        regulator-max-microvolt =
            <RPM_SMD_REGULATOR_LEVEL_BINNING>;
        qcom,use-voltage-level;
    };

    pm8937_s2_floor_level: regulator-s2-floor-level {
        compatible = "qcom,rpm-smd-regulator";
        regulator-name = "pm8937_s2_floor_level";
        qcom,set = <3>;
        regulator-min-microvolt =
            <RPM_SMD_REGULATOR_LEVEL_RETENTION>;
        regulator-max-microvolt =
            <RPM_SMD_REGULATOR_LEVEL_BINNING>;
        qcom,use-voltage-floor-level;
        qcom,always-send-voltage;
    };

    pm8937_s2_level_ao: regulator-s2-level-ao {
        compatible = "qcom,rpm-smd-regulator";
        regulator-name = "pm8937_s2_level_ao";
        qcom,set = <1>;
        regulator-min-microvolt =
            <RPM_SMD_REGULATOR_LEVEL_RETENTION>;
        regulator-max-microvolt =
            <RPM_SMD_REGULATOR_LEVEL_BINNING>;
        qcom,use-voltage-level;
    };
};

I know VDD_CX is the regulator for GPU, but i dont know how to deal with these levels, i already try to convert it on voltages but system doesn’t boot. I already see too that is sending commands to RPM Bus (Resource Power Manager, something like that)… After all i researched i’m in conclusion is impossible to do overvoltage on adreno 4xx and 5xx series because of this, but on some boards, aka msm895x has the regulator that uses a voltage level. I’ve been see the RPM-smd-Regulator driver and found this:

/**

  • enum rpm_regulator_voltage_level - possible voltage level values
  • These should be used in regulator_set_voltage() and
  • rpm_regulator_set_voltage() calls for level type regulators as if they had
  • units of uV.
  • Note: the meaning of level values is set by the RPM.
    */
    enum rpm_regulator_voltage_level {
    RPM_REGULATOR_LEVEL_NONE = 0,
    RPM_REGULATOR_LEVEL_RETENTION = 16,
    RPM_REGULATOR_LEVEL_RETENTION_PLUS = 32,
    RPM_REGULATOR_LEVEL_MIN_SVS = 48,
    RPM_REGULATOR_LEVEL_LOW_SVS = 64,
    RPM_REGULATOR_LEVEL_SVS = 128,
    RPM_REGULATOR_LEVEL_SVS_PLUS = 192,
    RPM_REGULATOR_LEVEL_NOM = 256,
    RPM_REGULATOR_LEVEL_NOM_PLUS = 320,
    RPM_REGULATOR_LEVEL_TURBO = 384,
    RPM_REGULATOR_LEVEL_TURBO_NO_CPR = 416,
    RPM_REGULATOR_LEVEL_BINNING = 512,
    RPM_REGULATOR_LEVEL_MAX = 65535,
    };

Someone can explain how can i add more voltage to this regulator? Because as i see the regulator internally have some voltages that i can’t change without changing these levels, but when i change, example

RPM_REGULATOR_LEVEL_BINNING = 524

Device don’t boot. I’m compared this to “analog value” present in microcontrollers for ADC conversion, but i think is not this…

Thanks,

Luiz Paulo (aka electronicslover)