]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - include/configs/tx6.h
karo: tx6: autodetect HW rev 1 and 3
[karo-tx-uboot.git] / include / configs / tx6.h
index 22f4c1007acddd1bce8f7321ab238c397d883d1d..5369b5cba30fae705b45b5ee2f629ab36280007d 100644 (file)
@@ -14,9 +14,6 @@
 /*
  * Ka-Ro TX6 board - SoC configuration
  */
-#ifndef CONFIG_TX6_REV
-#define CONFIG_TX6_REV                 0x1             /* '1' would be converted to 'y' by define2mk.sed */
-#endif
 #define CONFIG_MX6
 #define CONFIG_SYS_MX6_HCLK            24000000
 #define CONFIG_SYS_MX6_CLK32           32768
 #define CONFIG_SYS_I2C_BASE            I2C1_BASE_ADDR
 #define CONFIG_SYS_I2C_MX6_PORT1
 #define CONFIG_SYS_I2C_SPEED           400000
+#if defined(CONFIG_TX6_REV)
 #if CONFIG_TX6_REV == 0x1
 #define CONFIG_SYS_I2C_SLAVE           0x3c
 #define CONFIG_LTC3676
 #else
 #error Unsupported TX6 module revision
 #endif
-#endif
+#endif /* CONFIG_TX6_REV */
+/* autodetect which PMIC is present to derive TX6_REV */
+#define CONFIG_LTC3676                 /* TX6_REV == 1 */
+#define CONFIG_RN5T567                 /* TX6_REV == 3 */
+#endif /* CONFIG_CMD_I2C */
 
 #ifndef CONFIG_ENV_IS_NOWHERE
 /* define one of the following options: