static int k2g_alt_board_detect(void) { #ifndef CONFIG_DM_I2C int rc; rc = i2c_set_bus_num(1); if (rc) return rc; rc = i2c_probe(K2G_GP_AUDIO_CODEC_ADDRESS); if (rc) return rc; #else struct udevice *bus, *dev; int rc; rc = uclass_get_device_by_seq(UCLASS_I2C, 1, &bus); if (rc) return rc; rc = dm_i2c_probe(bus, K2G_GP_AUDIO_CODEC_ADDRESS, 0, &dev); if (rc) return rc; #endif ti_i2c_eeprom_am_set("66AK2GGP", "1.0X"); return 0; }
/* * In the rtc_only+DRR in self-refresh boot path we have the board type info * in the rtc scratch pad register hence we bypass the costly i2c reads to * eeprom and directly programthe board name string */ void rtc_only_update_board_type(u32 btype) { const char *name = ""; const char *rev = "1.0"; switch (btype) { case RTC_BOARD_EPOS: name = "AM43EPOS"; break; case RTC_BOARD_EVM14: name = "AM43__GP"; rev = "1.4"; break; case RTC_BOARD_EVM12: name = "AM43__GP"; rev = "1.2"; break; case RTC_BOARD_GPEVM: name = "AM43__GP"; break; case RTC_BOARD_SK: name = "AM43__SK"; break; } ti_i2c_eeprom_am_set(name, rev); }