device/dram: Add LPDDR4 utilities
Add lpddr4.c utility file with lpddr4_speed_mhz_to_reported_mts. Fill in lpddr4_speeds using JDEC 209-4C table 210. LPDDR4 SPD decoding utilities are not included since there isn't a present need. BUG=b:184124605 TEST=Build and run on guybrush Change-Id: Id8ddfc98fff4255670c50e1ddd4d0a1326265772 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52745 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
parent
eca3e6278a
commit
f892b85e18
3 changed files with 92 additions and 2 deletions
20
src/include/device/dram/lpddr4.h
Normal file
20
src/include/device/dram/lpddr4.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#ifndef DEVICE_DRAM_LPDDR4_H
|
||||
#define DEVICE_DRAM_LPDDR4_H
|
||||
|
||||
/**
|
||||
* @file lpddr4.h
|
||||
*
|
||||
* \brief Utilities for decoding LPDDR4 info
|
||||
*/
|
||||
|
||||
#include <device/dram/common.h>
|
||||
#include <types.h>
|
||||
|
||||
/**
|
||||
* Converts LPDDR4 clock speed in MHz to the standard reported speed in MT/s
|
||||
*/
|
||||
uint16_t lpddr4_speed_mhz_to_reported_mts(uint16_t speed_mhz);
|
||||
|
||||
#endif /* DEVICE_DRAM_LPDDR4_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue