OSDN Git Service

arm64: dts: imx8m: add cache info
authorPeng Fan <peng.fan@nxp.com>
Fri, 12 Nov 2021 06:26:02 +0000 (14:26 +0800)
committerShawn Guo <shawnguo@kernel.org>
Tue, 23 Nov 2021 09:25:52 +0000 (17:25 +0800)
i.MX8M Family use A53 Cores and has 32KB ICache with 32KB DCache.
 - Icache is 2-way set associative
 - Dcache is 4-way set associative
 - L2cache is 16-way set associative
 - Line size are 64bytes

Except i.MX8MQ has 1MB L2 Cache, others has 512KB L2 Cache.

So add the cache info in device tree and let use could see that
from /sys/devices/system/cpu/cpu[x]/cache/

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8mm.dtsi
arch/arm64/boot/dts/freescale/imx8mn.dtsi
arch/arm64/boot/dts/freescale/imx8mp.dtsi
arch/arm64/boot/dts/freescale/imx8mq.dtsi

index c2f3f11..5b9c2cc 100644 (file)
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MM_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        nvmem-cells = <&cpu_speed_grade>;
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MM_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        cpu-idle-states = <&cpu_pd_wait>;
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MM_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        cpu-idle-states = <&cpu_pd_wait>;
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MM_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        cpu-idle-states = <&cpu_pd_wait>;
 
                A53_L2: l2-cache0 {
                        compatible = "cache";
+                       cache-level = <2>;
+                       cache-size = <0x80000>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
                };
        };
 
index da6c942..ba23b41 100644 (file)
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MN_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        nvmem-cells = <&cpu_speed_grade>;
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MN_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        cpu-idle-states = <&cpu_pd_wait>;
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MN_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        cpu-idle-states = <&cpu_pd_wait>;
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MN_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        cpu-idle-states = <&cpu_pd_wait>;
 
                A53_L2: l2-cache0 {
                        compatible = "cache";
+                       cache-level = <2>;
+                       cache-size = <0x80000>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
                };
        };
 
index 04d259d..9777837 100644 (file)
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MP_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        #cooling-cells = <2>;
                };
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MP_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        #cooling-cells = <2>;
                };
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MP_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        #cooling-cells = <2>;
                };
                        clock-latency = <61036>;
                        clocks = <&clk IMX8MP_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        #cooling-cells = <2>;
                };
 
                A53_L2: l2-cache0 {
                        compatible = "cache";
+                       cache-level = <2>;
+                       cache-size = <0x80000>;
+                       cache-line-size = <64>;
+                       cache-sets = <512>;
                };
        };
 
index 972766b..95d8b95 100644 (file)
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MQ_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        #cooling-cells = <2>;
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MQ_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        #cooling-cells = <2>;
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MQ_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        #cooling-cells = <2>;
                        clock-latency = <61036>; /* two CLK32 periods */
                        clocks = <&clk IMX8MQ_CLK_ARM>;
                        enable-method = "psci";
+                       i-cache-size = <0x8000>;
+                       i-cache-line-size = <64>;
+                       i-cache-sets = <256>;
+                       d-cache-size = <0x8000>;
+                       d-cache-line-size = <64>;
+                       d-cache-sets = <128>;
                        next-level-cache = <&A53_L2>;
                        operating-points-v2 = <&a53_opp_table>;
                        #cooling-cells = <2>;
 
                A53_L2: l2-cache0 {
                        compatible = "cache";
+                       cache-level = <2>;
+                       cache-size = <0x100000>;
+                       cache-line-size = <64>;
+                       cache-sets = <1024>;
                };
        };