| 1 |
|
| 2 |
|
| 3 |
#ifndef __STONEYRIDGE_CHIP_H__ |
| 4 |
#define __STONEYRIDGE_CHIP_H__ |
| 5 |
|
| 6 |
#include <stddef.h> |
| 7 |
#include <stdint.h> |
| 8 |
#include <commonlib/helpers.h> |
| 9 |
#include <drivers/i2c/designware/dw_i2c.h> |
| 10 |
#include <gpio.h> |
| 11 |
#include <soc/i2c.h> |
| 12 |
#include <acpi/acpi_device.h> |
| 13 |
|
| 14 |
#define MAX_NODES 1 |
| 15 |
#if CONFIG(AMD_APU_MERLINFALCON) |
| 16 |
#define MAX_DRAM_CH 2 |
| 17 |
#define MAX_DIMMS_PER_CH 2 |
| 18 |
#else |
| 19 |
#define MAX_DRAM_CH 1 |
| 20 |
#define MAX_DIMMS_PER_CH 2 |
| 21 |
#endif |
| 22 |
|
| 23 |
#define STONEY_I2C_DEV_MAX 4 |
| 24 |
|
| 25 |
struct soc_amd_stoneyridge_config { |
| 26 |
u8 spd_addr_lookup[MAX_NODES][MAX_DRAM_CH][MAX_DIMMS_PER_CH]; |
| 27 |
enum { |
| 28 |
DRAM_CONTENTS_KEEP, |
| 29 |
DRAM_CONTENTS_CLEAR |
| 30 |
} dram_clear_on_reset; |
| 31 |
|
| 32 |
enum { |
| 33 |
|
| 34 |
UMAMODE_NONE, |
| 35 |
|
| 36 |
UMAMODE_SPECIFIED_SIZE, |
| 37 |
|
| 38 |
|
| 39 |
UMAMODE_AUTO_LEGACY, |
| 40 |
UMAMODE_AUTO_NON_LEGACY, |
| 41 |
} uma_mode; |
| 42 |
|
| 43 |
|
| 44 |
size_t uma_size; |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
u8 i2c_scl_reset; |
| 55 |
struct dw_i2c_bus_config i2c[STONEY_I2C_DEV_MAX]; |
| 56 |
u8 stapm_percent; |
| 57 |
u32 stapm_time_ms; |
| 58 |
u32 stapm_power_mw; |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
u8 lvds_poseq_varybl_to_blon; |
| 67 |
u8 lvds_poseq_blon_to_varybl; |
| 68 |
}; |
| 69 |
|
| 70 |
#endif |