Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu frequency #7

Open
he1pu opened this issue Nov 8, 2024 · 5 comments
Open

cpu frequency #7

he1pu opened this issue Nov 8, 2024 · 5 comments

Comments

@he1pu
Copy link

he1pu commented Nov 8, 2024

May I ask if it is possible to add more CPU frequencies?

@Gentle-JT
Copy link

You can modify the dtb to achieve overclocking, and now the fastest is 2.1G.

@he1pu
Copy link
Author

he1pu commented Nov 8, 2024

You can modify the dtb to achieve overclocking, and now the fastest is 2.1G.

An error occurred after setting:

[    6.623912] cpufreq: __target_index: Failed to change cpu frequency: -34
[    6.654790] cpu cpu0: dev_pm_opp_set_rate: failed to find OPP for freq 2188800000 (-34)

@Gentle-JT
Copy link

[ 6.654790] cpu cpu0: dev_pm_opp_set_rate: failed to find OPP for freq 2188800000 (-34)

It seems like you haven't modified OPP-HZ. You can search for OPP-HZ and find it in DTB.

@he1pu
Copy link
Author

he1pu commented Nov 9, 2024

I have modified: drivers/clk/qcom/a53-pl.c

static const struct pll_freq_tbl a53pll_freq[] = {
	{  384000000, 20, 0x0, 0x1, 0 },
	{  787200000, 41, 0x0, 0x1, 0 },
	{  998400000, 52, 0x0, 0x1, 0 },
	{ 1094400000, 57, 0x0, 0x1, 0 },
	{ 1152000000, 62, 0x0, 0x1, 0 },
	{ 1209600000, 63, 0x0, 0x1, 0 },
	{ 1248000000, 65, 0x0, 0x1, 0 },
	{ 1363200000, 71, 0x0, 0x1, 0 },
	{ 1401600000, 73, 0x0, 0x1, 0 },
	{ 1612800000, 84, 0x0, 0x1, 0 },
    	{ 1843200000, 96, 0x0, 0x1, 0 },
    	{ 1977600000, 103, 0x0, 0x1, 0 },
    	{ 2112000000, 110, 0x0, 0x1, 0 },
	{ }
};

and:

opp-table-cpu {
	compatible = "operating-points-v2";
	opp-shared;
	phandle = <0x06>;
        
        opp-384000000 {
            opp-hz = <0x00 0x16e36000>;
        };
        opp-787200000 {
            opp-hz = <0x00 0x2ef42000>;
        };
        opp-998400000 {
            opp-hz = <0x00 0x3b826000>;
        };
        opp-1094400000 {
            opp-hz = <0x00 0x41376000>;
        };
        opp-1152000000 {
            opp-hz = <0x00 0x44aa2000>;
        };
        opp-1209600000 {
            opp-hz = <0x00 0x481ce000>;
        };
        opp-1248000000 {
            opp-hz = <0x00 0x4a5e1000>;
        };
        opp-1363200000 {
            opp-hz = <0x00 0x51615000>;
        };
        opp-1401600000 {
            opp-hz = <0x00 0x53c21000>;
        };
        opp-1612800000 {
            opp-hz = <0x00 0x60144000>;
        };
        opp-1843200000 {
            opp-hz = <0x00 0x6ddd0000>;
        };
        opp-1977600000 {
            opp-hz = <0x00 0x75bca000>;
        };
        opp-2112000000 {
            opp-hz = <0x00 0x7dfa4000>;
        };
};

The above error still occurs

@Gentle-JT
Copy link

-34 error is out of range. You can try the highest frequency already available in a53-pl.c, and if possible, add a slightly higher frequency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants