radxa-repo / rbuild

Radxa Image Builder (Maintenance mode)
https://radxa-repo.github.io/rbuild/
GNU General Public License v3.0
54 stars 45 forks source link

Rock Pi S CPU settings #41

Open BigMuscle85 opened 10 months ago

BigMuscle85 commented 10 months ago

When building the image for Rock Pi S, it does not provide full CPU functionality:

https://github.com/radxa-repo/bsp/blob/main/linux/.stable-6.1/0023-armbian-rockpi-s/board-rockpis-0007-arm64-dts-rockchip-add-cpu-s-thermal-config-for-rk33.patch#L56

I've created an additional overlay to make this work:

/dts-v1/;
/plugin/;

/ {
    compatible = "rockchip,rk3308";

    fragment@0 {
                target = <&thermal_zones>;
                __overlay__ {
                        logic-thermal {
                                thermal-sensors = <&tsadc 0>;

                                trips {
                                        temp_crit: temp_crit {
                                               temperature = <90000>;
                                               hysteresis = <2000>;
                                               type = "critical";
                                        };
                                };
                        };
                };
    };
};
RadxaYuntian commented 10 months ago

CPU runs on 1 GHz maximally although it should be 1.3GHz

Only RK3308B-S variant could support this speed. If your ROCK Pi S is indeed using that SoC, you can use this overlay.

Prebuilt dtbo are available in GitHub Workflow's artifact section.

CPU temperature not available and thermal zones in /sys/class/thermal/ are missing. This is related to the following errors reported in the kernel log. The problem here is that kernel 6.x requires 'trips' to be defined for all thermal zones else it won't load them at all.

Thanks for spotting this. I'll add this to our source tomorrow.

BigMuscle85 commented 10 months ago

Thank you for the information. I didn't know that B-S variant is needed for 1.3 GHz as doc here https://wiki.radxa.com/RockpiS does not mention it. There's RK3308B written on my chip (board is V1.3) and running Armbian with 1.3 GHz overlay runs correctly even under heavy load. But on Radxa image, rsetup does not offer the overlay to be enabled at all, so I guess I need to enable it manually?

RadxaYuntian commented 10 months ago

We have ceased RK3308B-S production due to many incompatibilities with existing RK3308 design, so I very much doubt yours is indeed 3308B-S. Having RK3308B written on it does not mean it is the B-S variant.

RK3308B-S either says RK3308B-S directly on the chip, or says RK3308B, but the second line will ends with S before the production week begins.

Given below chip as an example, the 2nd line is SBAKW05003. Since it is ending with 3 it is not RK3308B-S.

image

BigMuscle85 commented 10 months ago

You are right. Our chips also ends with 3 and not S. So it's definitely not B-S version. It is just a bit confusing because the official documentation on Radxa website talks about 1.3 GHz regardless the chip version and also the vendor sells all Rock Pi S as 1.3 GHz CPU. So the specified frequency is not correct and all boards now support only 1 GHz?

RadxaYuntian commented 10 months ago

I'd think so. If you can please send me the links of 1.3 GHz so I could get them updated.

BigMuscle85 commented 10 months ago

It is here: https://wiki.radxa.com/RockpiS/getting_started https://radxa.com/products/rocks/pis https://radxa.com/products/rocks/pis#techspec

This doc says that revisions 1.3 since 2022 (ours are V1.3, week 2311) are B-S - https://wiki.radxa.com/RockpiS/hardware/revisions

RadxaYuntian commented 10 months ago

Thanks. @melooooooooooo please take a look at this.

melooooooooooo commented 10 months ago

Thank you for your support of Radxa. The information you mentioned has been updated.