argen96 Posted December 1, 2020 Posted December 1, 2020 Hello everyone, I have an rk3318 h96 max , 2gb, 16gb configuration. I've followed installation but couldn't get frequency scaling working. (/sys/devices/system/cpu/cpu0/cpufreq/ is empty) I am wondering if anyone can confirm that it works with the latest images. If it does work maybe there is something wrong with my dtb file. Thank you! Regards, Jose
argen96 Posted December 6, 2020 Author Posted December 6, 2020 I reply myself , for the record in case someone has the same board / issue. My PCB has a black solder mask and is marked in silkscreen as "RK3318_V1.2" . Upon inspecting the PCB I see that it does not have a proper power management IC. Instead it has 3 discrete switching regulators which output 3.3V, 1.18v and 1.15v respectively. These regulators have a fixed output voltage set by resistors so the 'dynamic' voltage frequency scaling through 'operating-points' is out of question. However throttling the CPU frequencies may be possible if not pushed beyond the limit set by the supply voltage. I will keep researching if anyone can point me towards some relevant info I would appreciate it. 1
jock Posted December 6, 2020 Posted December 6, 2020 10 hours ago, argen96 said: I reply myself , for the record in case someone has the same board / issue. My PCB has a black solder mask and is marked in silkscreen as "RK3318_V1.2" . Upon inspecting the PCB I see that it does not have a proper power management IC. Instead it has 3 discrete switching regulators which output 3.3V, 1.18v and 1.15v respectively. These regulators have a fixed output voltage set by resistors so the 'dynamic' voltage frequency scaling through 'operating-points' is out of question. However throttling the CPU frequencies may be possible if not pushed beyond the limit set by the supply voltage. I will keep researching if anyone can point me towards some relevant info I would appreciate it. Hello, are you really sure about the resistor giving fixed voltage or is a guessing due to schematic inspection? I ask because usually cheap tv boxes have no power management IC as you already stated, but on rockchip platforms the VDD_CPU and VDD_LOGIC power planes are controlled by SoC own PWM drivers. I have encountered this kind of configuration practically on all rk322x and rk33x8 boards I know about. Device trees of those boards also describe that kind of configuration since the voltage regulator is linked to the pwm drivers. This is an excerpt of the original device tree (kernel 4.4): vdd-center { compatible = "pwm-regulator"; rockchip,pwm_id = <0x00>; rockchip,pwm_voltage = <0x1312d0>; pwms = <0x96 0x00 0x1388 0x01>; regulator-name = "vcc_arm"; regulator-min-microvolt = <0xe7ef0>; regulator-max-microvolt = <0x155cc0>; regulator-always-on; regulator-boot-on; phandle = <0x04>; }; vdd-log { compatible = "pwm-regulator"; rockchip,pwm_id = <0x01>; rockchip,pwm_voltage = <0x10c8e0>; pwms = <0x97 0x00 0x1388 0x01>; regulator-name = "vcc_log"; regulator-min-microvolt = <0xdbba0>; regulator-max-microvolt = <0x13d620>; regulator-always-on; regulator-boot-on; phandle = <0x46>; }; And the regulation is also real since me and @hexdumpmade some undervolting tests that made the SoC produce much less heat lowering the voltages. It may be that your board has a fixed voltage though, but I guess @hexdump made tests on h96 max too and, if the board and manufacturer are the same, probably the PCB layout is the same too.
hexdump Posted December 6, 2020 Posted December 6, 2020 i agree with @jock - rk3318/rk3328 usually use pwm for voltage control, so it should and i guess will work - at least for us it did for all the boxes we ran across
argen96 Posted December 6, 2020 Author Posted December 6, 2020 Hi @jock & @hexdump Thanks for the reply, very interesting. The way I came to the fixed voltage conclusion was by looking at the reference design of the buck regulator IC on the board. There are 3 SOT-23 ICs marked "AS20B5". Here is what I found online: https://uccpd.com/article/97.mhtml Then I probed on the inductor with a DMM to measure the output voltage. In the reference design, the regulator output voltage is set by a voltage divider relation between R1 and R2. However, you may be right, if the circuit on the board feeds the output of RK3318 PWM into that resistor network, then I guess the SOC could in effect modify the output voltage by using its PWM controllers. Chinese designers come up with some clever cost cutting ideas, would be great. I don't have schematics, actually could not even find the datasheet for RK3318, I assume it is an RK3328 with 100Mbps ethernet which is the only difference I found. If you have a dts/dtb file for current kernels on similar boards I would love to give it a try. Thanks, Jose
jock Posted December 6, 2020 Posted December 6, 2020 3 hours ago, argen96 said: I don't have schematics, actually could not even find the datasheet for RK3318, I assume it is an RK3328 with 100Mbps ethernet which is the only difference I found. My guess is that rk3318 is a rk3328 badly manufactured, hence there is no datasheet because it should not exist as a real product. Rockchip SOCs have a register that stores an "leakage" value of the cpu, gpu and logic circuitry. We noticed that rk3318 always have much higher values in those registers than rk3328, and this guessing is confirmed by lower frequencies and higher heat produced by rk3318 then rk3328. But all of this is guessing, not official informations. Other than that, rk3318 and rk3328 seems to be quite similar. 3 hours ago, argen96 said: If you have a dts/dtb file for current kernels on similar boards I would love to give it a try. I can give you the decompiled dts, but I guess it is simpler to get the source dts on my work-in-progress fork for rk3318: https://github.com/paolosabatino/armbian-build/blob/rk3318/patch/kernel/rockchip64-current/zzz-0006-add-rk3318-box.patch You can clone the fork, switch to rk3318 branch and compile armbian as usual if you want to build your own image; the board is "rk3318-box" in CSC/EOL/TVB section.
Recommended Posts