• Dragan Simic's avatar
    arm64: dts: rockchip: Add cache information to the SoC dtsi for RK3328 · 67a6a985
    Dragan Simic authored
    Add missing cache information to the Rockchip RK3328 SoC dtsi, to allow
    the userspace, which includes lscpu(1) that uses the virtual files provided
    by the kernel under the /sys/devices/system/cpu directory, to display the
    proper RK3328 cache information.
    
    While there, use a more self-descriptive label for the L2 cache node, which
    also makes it more consistent with other SoC dtsi files.
    
    The cache parameters for the RK3328 dtsi were obtained and partially derived
    by hand from the cache size and layout specifications found in the following
    datasheets, official vendor websites, and technical reference manuals:
    
      - Rockchip RK3328 datasheet, version 1.4
      - https://opensource.rock-chips.com/wiki_RK3328, accessed on 2024-02-28
      - ARM Cortex-A53 revision r0p3 TRM, version E
    
    For future reference, here's a brief summary of the documentation:
    
      - All caches employ the 64-byte cache line length
      - Each Cortex-A53 core has 32 KB of L1 2-way, set-associative instruction
        cache and 32 KB of L1 4-way, set-associative data cache
      - The entire SoC has 256 KB of unified L2 16-way, set-associative cache
    
    The RK3328 SoC dtsi is also used for the single RK3318-based supported board.
    Unfortunately, no datasheet is available for the RK3318, but some unofficial
    sources state that its L2 cache size is the same as RK3328's, so it's perhaps
    safe to assume the same for the L1 instruction and data cache sizes.
    Reviewed-by: default avatarAnand Moon <linux.amoon@gmail.com>
    Signed-off-by: default avatarDragan Simic <dsimic@manjaro.org>
    Link: https://lore.kernel.org/r/a681b3c6dbf7b25b1527b11cea5ae0d6d1733714.1709958234.git.dsimic@manjaro.orgSigned-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
    67a6a985
rk3328.dtsi 48.4 KB