diff options
author | Artem Senichev <artemsen@gmail.com> | 2019-12-12 13:35:24 +0300 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2020-01-29 13:51:35 +1100 |
commit | f92920372d98ad1ff378750871ca2f76344435c5 (patch) | |
tree | 9524a293511705fa24e226534e39970e8bfac0d1 /platforms | |
parent | 518ab49f3d7b8d3abcd99739a57e6d5066bdfbdf (diff) | |
download | skiboot-f92920372d98ad1ff378750871ca2f76344435c5.zip skiboot-f92920372d98ad1ff378750871ca2f76344435c5.tar.gz skiboot-f92920372d98ad1ff378750871ca2f76344435c5.tar.bz2 |
platforms/nicole: Fixup the system VPD EEPROM size
Hostboot doesn't export the correct description for EEPROMs,
as a result, all EEPROMs in the system work in "atmel,24c128"
compatibility mode (16KiB).
Nicole platform has 32KiB EEPROM for the system VPD.
Signed-off-by: Artem Senichev <a.senichev@yadro.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'platforms')
-rw-r--r-- | platforms/astbmc/nicole.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/platforms/astbmc/nicole.c b/platforms/astbmc/nicole.c index 6893cdd..cc71924 100644 --- a/platforms/astbmc/nicole.c +++ b/platforms/astbmc/nicole.c @@ -34,6 +34,26 @@ static const struct slot_table_entry nicole_phb_table[] = { { .etype = st_end }, }; +/* Fixup the system VPD EEPROM size. + * + * Hostboot doesn't export the correct description for EEPROMs, as a result, + * all EEPROMs in the system work in "atmel,24c128" compatibility mode (16KiB). + * Nicole platform has 32KiB EEPROM for the system VPD. + */ +static void vpd_dt_fixup(void) +{ + struct dt_node* vpd_eeprom = dt_find_by_path(dt_root, + "/xscom@603fc00000000/i2cm@a2000/i2c-bus@0/eeprom@50"); + + if (vpd_eeprom) { + dt_check_del_prop(vpd_eeprom, "compatible"); + dt_add_property_string(vpd_eeprom, "compatible", "atmel,24c256"); + + dt_check_del_prop(vpd_eeprom, "label"); + dt_add_property_string(vpd_eeprom, "label", "system-vpd"); + } +} + static bool nicole_probe(void) { if (!dt_node_is_compatible(dt_root, "YADRO,nicole")) @@ -45,6 +65,9 @@ static bool nicole_probe(void) /* Setup UART for use by OPAL (Linux hvc) */ uart_set_console_policy(UART_CONSOLE_OPAL); + /* Fixup system VPD EEPROM size */ + vpd_dt_fixup(); + slot_table_init(nicole_phb_table); return true; |