Path: blob/main/sys/contrib/device-tree/Bindings/cpufreq/cpufreq-mediatek.txt
48375 views
Binding for MediaTek's CPUFreq driver1=====================================23Required properties:4- clocks: A list of phandle + clock-specifier pairs for the clocks listed in clock names.5- clock-names: Should contain the following:6"cpu" - The multiplexer for clock input of CPU cluster.7"intermediate" - A parent of "cpu" clock which is used as "intermediate" clock8source (usually MAINPLL) when the original CPU PLL is under9transition and not stable yet.10Please refer to Documentation/devicetree/bindings/clock/clock-bindings.txt for11generic clock consumer properties.12- operating-points-v2: Please refer to Documentation/devicetree/bindings/opp/opp-v2.yaml13for detail.14- proc-supply: Regulator for Vproc of CPU cluster.1516Optional properties:17- sram-supply: Regulator for Vsram of CPU cluster. When present, the cpufreq driver18needs to do "voltage tracking" to step by step scale up/down Vproc and19Vsram to fit SoC specific needs. When absent, the voltage scaling20flow is handled by hardware, hence no software "voltage tracking" is21needed.22- mediatek,cci:23Used to confirm the link status between cpufreq and mediatek cci. Because24cpufreq and mediatek cci could share the same regulator in some MediaTek SoCs.25To prevent the issue of high frequency and low voltage, we need to use this26property to make sure mediatek cci is ready.27For details of mediatek cci, please refer to28Documentation/devicetree/bindings/interconnect/mediatek,cci.yaml29- #cooling-cells:30For details, please refer to31Documentation/devicetree/bindings/thermal/thermal-cooling-devices.yaml3233Example 1 (MT7623 SoC):3435cpu_opp_table: opp_table {36compatible = "operating-points-v2";37opp-shared;3839opp-598000000 {40opp-hz = /bits/ 64 <598000000>;41opp-microvolt = <1050000>;42};4344opp-747500000 {45opp-hz = /bits/ 64 <747500000>;46opp-microvolt = <1050000>;47};4849opp-1040000000 {50opp-hz = /bits/ 64 <1040000000>;51opp-microvolt = <1150000>;52};5354opp-1196000000 {55opp-hz = /bits/ 64 <1196000000>;56opp-microvolt = <1200000>;57};5859opp-1300000000 {60opp-hz = /bits/ 64 <1300000000>;61opp-microvolt = <1300000>;62};63};6465cpu0: cpu@0 {66device_type = "cpu";67compatible = "arm,cortex-a7";68reg = <0x0>;69clocks = <&infracfg CLK_INFRA_CPUSEL>,70<&apmixedsys CLK_APMIXED_MAINPLL>;71clock-names = "cpu", "intermediate";72operating-points-v2 = <&cpu_opp_table>;73#cooling-cells = <2>;74};75cpu@1 {76device_type = "cpu";77compatible = "arm,cortex-a7";78reg = <0x1>;79operating-points-v2 = <&cpu_opp_table>;80};81cpu@2 {82device_type = "cpu";83compatible = "arm,cortex-a7";84reg = <0x2>;85operating-points-v2 = <&cpu_opp_table>;86};87cpu@3 {88device_type = "cpu";89compatible = "arm,cortex-a7";90reg = <0x3>;91operating-points-v2 = <&cpu_opp_table>;92};9394Example 2 (MT8173 SoC):95cpu_opp_table_a: opp_table_a {96compatible = "operating-points-v2";97opp-shared;9899opp-507000000 {100opp-hz = /bits/ 64 <507000000>;101opp-microvolt = <859000>;102};103104opp-702000000 {105opp-hz = /bits/ 64 <702000000>;106opp-microvolt = <908000>;107};108109opp-1001000000 {110opp-hz = /bits/ 64 <1001000000>;111opp-microvolt = <983000>;112};113114opp-1105000000 {115opp-hz = /bits/ 64 <1105000000>;116opp-microvolt = <1009000>;117};118119opp-1183000000 {120opp-hz = /bits/ 64 <1183000000>;121opp-microvolt = <1028000>;122};123124opp-1404000000 {125opp-hz = /bits/ 64 <1404000000>;126opp-microvolt = <1083000>;127};128129opp-1508000000 {130opp-hz = /bits/ 64 <1508000000>;131opp-microvolt = <1109000>;132};133134opp-1573000000 {135opp-hz = /bits/ 64 <1573000000>;136opp-microvolt = <1125000>;137};138};139140cpu_opp_table_b: opp_table_b {141compatible = "operating-points-v2";142opp-shared;143144opp-507000000 {145opp-hz = /bits/ 64 <507000000>;146opp-microvolt = <828000>;147};148149opp-702000000 {150opp-hz = /bits/ 64 <702000000>;151opp-microvolt = <867000>;152};153154opp-1001000000 {155opp-hz = /bits/ 64 <1001000000>;156opp-microvolt = <927000>;157};158159opp-1209000000 {160opp-hz = /bits/ 64 <1209000000>;161opp-microvolt = <968000>;162};163164opp-1404000000 {165opp-hz = /bits/ 64 <1007000000>;166opp-microvolt = <1028000>;167};168169opp-1612000000 {170opp-hz = /bits/ 64 <1612000000>;171opp-microvolt = <1049000>;172};173174opp-1807000000 {175opp-hz = /bits/ 64 <1807000000>;176opp-microvolt = <1089000>;177};178179opp-1989000000 {180opp-hz = /bits/ 64 <1989000000>;181opp-microvolt = <1125000>;182};183};184185cpu0: cpu@0 {186device_type = "cpu";187compatible = "arm,cortex-a53";188reg = <0x000>;189enable-method = "psci";190cpu-idle-states = <&CPU_SLEEP_0>;191clocks = <&infracfg CLK_INFRA_CA53SEL>,192<&apmixedsys CLK_APMIXED_MAINPLL>;193clock-names = "cpu", "intermediate";194operating-points-v2 = <&cpu_opp_table_a>;195};196197cpu1: cpu@1 {198device_type = "cpu";199compatible = "arm,cortex-a53";200reg = <0x001>;201enable-method = "psci";202cpu-idle-states = <&CPU_SLEEP_0>;203clocks = <&infracfg CLK_INFRA_CA53SEL>,204<&apmixedsys CLK_APMIXED_MAINPLL>;205clock-names = "cpu", "intermediate";206operating-points-v2 = <&cpu_opp_table_a>;207};208209cpu2: cpu@100 {210device_type = "cpu";211compatible = "arm,cortex-a72";212reg = <0x100>;213enable-method = "psci";214cpu-idle-states = <&CPU_SLEEP_0>;215clocks = <&infracfg CLK_INFRA_CA72SEL>,216<&apmixedsys CLK_APMIXED_MAINPLL>;217clock-names = "cpu", "intermediate";218operating-points-v2 = <&cpu_opp_table_b>;219};220221cpu3: cpu@101 {222device_type = "cpu";223compatible = "arm,cortex-a72";224reg = <0x101>;225enable-method = "psci";226cpu-idle-states = <&CPU_SLEEP_0>;227clocks = <&infracfg CLK_INFRA_CA72SEL>,228<&apmixedsys CLK_APMIXED_MAINPLL>;229clock-names = "cpu", "intermediate";230operating-points-v2 = <&cpu_opp_table_b>;231};232233&cpu0 {234proc-supply = <&mt6397_vpca15_reg>;235};236237&cpu1 {238proc-supply = <&mt6397_vpca15_reg>;239};240241&cpu2 {242proc-supply = <&da9211_vcpu_reg>;243sram-supply = <&mt6397_vsramca7_reg>;244};245246&cpu3 {247proc-supply = <&da9211_vcpu_reg>;248sram-supply = <&mt6397_vsramca7_reg>;249};250251252