summaryrefslogtreecommitdiff
path: root/board/atmel
diff options
context:
space:
mode:
Diffstat (limited to 'board/atmel')
-rw-r--r--board/atmel/at91sam9m10g45ek/MAINTAINERS2
-rw-r--r--board/atmel/at91sam9n12ek/MAINTAINERS2
-rw-r--r--board/atmel/at91sam9x5ek/MAINTAINERS2
-rw-r--r--board/atmel/common/board.c57
-rw-r--r--board/atmel/sama5d27_som1_ek/MAINTAINERS3
-rw-r--r--board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c3
-rw-r--r--board/atmel/sama5d2_ptc_ek/MAINTAINERS2
-rw-r--r--board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c10
-rw-r--r--board/atmel/sama5d2_xplained/MAINTAINERS3
-rw-r--r--board/atmel/sama5d2_xplained/sama5d2_xplained.c3
-rw-r--r--board/atmel/sama5d3_xplained/MAINTAINERS2
-rw-r--r--board/atmel/sama5d3_xplained/sama5d3_xplained.c10
-rw-r--r--board/atmel/sama5d3xek/MAINTAINERS2
-rw-r--r--board/atmel/sama5d4_xplained/MAINTAINERS2
-rw-r--r--board/atmel/sama5d4_xplained/sama5d4_xplained.c3
-rw-r--r--board/atmel/sama5d4ek/MAINTAINERS2
16 files changed, 98 insertions, 10 deletions
diff --git a/board/atmel/at91sam9m10g45ek/MAINTAINERS b/board/atmel/at91sam9m10g45ek/MAINTAINERS
index 6389e6ac61..54632c36d6 100644
--- a/board/atmel/at91sam9m10g45ek/MAINTAINERS
+++ b/board/atmel/at91sam9m10g45ek/MAINTAINERS
@@ -1,5 +1,5 @@
AT91SAM9M10G45EK BOARD
-M: Bo Shen <voice.shen@atmel.com>
+M: Eugen Hristev <eugen.hristev@microchip.com>
S: Maintained
F: board/atmel/at91sam9m10g45ek/
F: include/configs/at91sam9m10g45ek.h
diff --git a/board/atmel/at91sam9n12ek/MAINTAINERS b/board/atmel/at91sam9n12ek/MAINTAINERS
index 82a91928c5..0d33340d87 100644
--- a/board/atmel/at91sam9n12ek/MAINTAINERS
+++ b/board/atmel/at91sam9n12ek/MAINTAINERS
@@ -1,5 +1,5 @@
AT91SAM9N12EK BOARD
-M: Josh Wu <josh.wu@atmel.com>
+M: Eugen Hristev <eugen.hristev@microchip.com>
S: Maintained
F: board/atmel/at91sam9n12ek/
F: include/configs/at91sam9n12ek.h
diff --git a/board/atmel/at91sam9x5ek/MAINTAINERS b/board/atmel/at91sam9x5ek/MAINTAINERS
index 5fea4890db..51d2237ee6 100644
--- a/board/atmel/at91sam9x5ek/MAINTAINERS
+++ b/board/atmel/at91sam9x5ek/MAINTAINERS
@@ -1,5 +1,5 @@
AT91SAM9X5EK BOARD
-M: Bo Shen <voice.shen@atmel.com>
+M: Eugen Hristev <eugen.hristev@microchip.com>
S: Maintained
F: board/atmel/at91sam9x5ek/
F: include/configs/at91sam9x5ek.h
diff --git a/board/atmel/common/board.c b/board/atmel/common/board.c
index 650eb2238c..8f9b5e137c 100644
--- a/board/atmel/common/board.c
+++ b/board/atmel/common/board.c
@@ -5,7 +5,64 @@
*/
#include <common.h>
+#include <w1.h>
+#include <w1-eeprom.h>
+#include <dm/device-internal.h>
+
+#define AT91_PDA_EEPROM_ID_OFFSET 15
+#define AT91_PDA_EEPROM_ID_LENGTH 5
+#define AT91_PDA_EEPROM_DEFAULT_BUS 0
void dummy(void)
{
}
+
+#if defined CONFIG_W1
+void at91_pda_detect(void)
+{
+ struct udevice *bus, *dev;
+ u8 buf[AT91_PDA_EEPROM_ID_LENGTH + 1] = {0};
+ int ret;
+ int pda = 0;
+
+ ret = w1_get_bus(AT91_PDA_EEPROM_DEFAULT_BUS, &bus);
+ if (ret)
+ return;
+
+ for (device_find_first_child(bus, &dev);
+ dev;
+ device_find_next_child(&dev)) {
+ ret = device_probe(dev);
+ if (ret) {
+ continue;
+ } else {
+ ret = w1_eeprom_read_buf(dev, AT91_PDA_EEPROM_ID_OFFSET,
+ (u8 *)buf, AT91_PDA_EEPROM_ID_LENGTH);
+ if (ret)
+ return;
+ break;
+ }
+ }
+ pda = simple_strtoul((const char *)buf, NULL, 10);
+
+ switch (pda) {
+ case 7000:
+ if (buf[4] == 'B')
+ printf("PDA TM7000B detected\n");
+ else
+ printf("PDA TM7000 detected\n");
+ break;
+ case 4300:
+ printf("PDA TM4300 detected\n");
+ break;
+ case 5000:
+ printf("PDA TM5000 detected\n");
+ break;
+ }
+ env_set("pda", (const char *)buf);
+}
+#else
+void at91_pda_detect(void)
+{
+}
+#endif
diff --git a/board/atmel/sama5d27_som1_ek/MAINTAINERS b/board/atmel/sama5d27_som1_ek/MAINTAINERS
index 609583c341..74434e93e9 100644
--- a/board/atmel/sama5d27_som1_ek/MAINTAINERS
+++ b/board/atmel/sama5d27_som1_ek/MAINTAINERS
@@ -1,6 +1,7 @@
SAMA5D27 SOM1 EK BOARD
-M: Wenyou Yang <wenyou.yang@microchip.com>
+M: Eugen Hristev <eugen.hristev@microchip.com>
S: Maintained
F: board/atmel/sama5d27_som1_ek/
F: include/configs/sama5d27_som1_ek.h
F: configs/sama5d27_som1_ek_mmc_defconfig
+F: configs/sama5d27_som1_ek_mmc1_defconfig
diff --git a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
index d5ddf8d2eb..83634345f3 100644
--- a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
+++ b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
@@ -15,6 +15,8 @@
#include <asm/arch/gpio.h>
#include <asm/arch/sama5d2.h>
+extern void at91_pda_detect(void);
+
DECLARE_GLOBAL_DATA_PTR;
static void board_usb_hw_init(void)
@@ -28,6 +30,7 @@ int board_late_init(void)
#ifdef CONFIG_DM_VIDEO
at91_video_show_board_info();
#endif
+ at91_pda_detect();
return 0;
}
#endif
diff --git a/board/atmel/sama5d2_ptc_ek/MAINTAINERS b/board/atmel/sama5d2_ptc_ek/MAINTAINERS
index 3c7b7f51c6..9f82d9a3d8 100644
--- a/board/atmel/sama5d2_ptc_ek/MAINTAINERS
+++ b/board/atmel/sama5d2_ptc_ek/MAINTAINERS
@@ -1,5 +1,5 @@
SAMA5D2 PTC EK BOARD
-M: Wenyou Yang <wenyou.yang@microchip.com>
+M: Eugen Hristev <eugen.hristev@microchip.com>
M: Ludovic Desroches <ludovic.desroches@microchip.com>
S: Maintained
F: board/atmel/sama5d2_ptc_ek/
diff --git a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c
index 789841e45a..17e08fa9b2 100644
--- a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c
+++ b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c
@@ -20,6 +20,8 @@
#include <asm/arch/sama5d2.h>
#include <asm/arch/sama5d2_smc.h>
+extern void at91_pda_detect(void);
+
DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_NAND_ATMEL
@@ -65,6 +67,14 @@ static void board_nand_hw_init(void)
}
#endif
+#ifdef CONFIG_BOARD_LATE_INIT
+int board_late_init(void)
+{
+ at91_pda_detect();
+ return 0;
+}
+#endif
+
static void board_usb_hw_init(void)
{
atmel_pio4_set_pio_output(AT91_PIO_PORTB, 12, ATMEL_PIO_PUEN_MASK);
diff --git a/board/atmel/sama5d2_xplained/MAINTAINERS b/board/atmel/sama5d2_xplained/MAINTAINERS
index ff9c86f538..08de5bb6a0 100644
--- a/board/atmel/sama5d2_xplained/MAINTAINERS
+++ b/board/atmel/sama5d2_xplained/MAINTAINERS
@@ -1,7 +1,8 @@
SAMA5D2 XPLAINED BOARD
-M: Wenyou Yang <wenyou.yang@atmel.com>
+M: Eugen Hristev <eugen.hristev@microchip.com>
S: Maintained
F: board/atmel/sama5d2_xplained/
F: include/configs/sama5d2_xplained.h
F: configs/sama5d2_xplained_mmc_defconfig
F: configs/sama5d2_xplained_spiflash_defconfig
+F: configs/sama5d2_xplained_emmc_defconfig
diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
index 592b4d82dd..fccd80ec70 100644
--- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c
+++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
@@ -15,6 +15,8 @@
#include <asm/arch/gpio.h>
#include <asm/arch/sama5d2.h>
+extern void at91_pda_detect(void);
+
DECLARE_GLOBAL_DATA_PTR;
static void board_usb_hw_init(void)
@@ -28,6 +30,7 @@ int board_late_init(void)
#ifdef CONFIG_DM_VIDEO
at91_video_show_board_info();
#endif
+ at91_pda_detect();
return 0;
}
#endif
diff --git a/board/atmel/sama5d3_xplained/MAINTAINERS b/board/atmel/sama5d3_xplained/MAINTAINERS
index 8a09c19c85..69b4ee8a33 100644
--- a/board/atmel/sama5d3_xplained/MAINTAINERS
+++ b/board/atmel/sama5d3_xplained/MAINTAINERS
@@ -1,5 +1,5 @@
SAMA5D3_XPLAINED BOARD
-M: Bo Shen <voice.shen@atmel.com>
+M: Eugen Hristev <eugen.hristev@microchip.com>
S: Maintained
F: board/atmel/sama5d3_xplained/
F: include/configs/sama5d3_xplained.h
diff --git a/board/atmel/sama5d3_xplained/sama5d3_xplained.c b/board/atmel/sama5d3_xplained/sama5d3_xplained.c
index c47f63864b..289f8d8499 100644
--- a/board/atmel/sama5d3_xplained/sama5d3_xplained.c
+++ b/board/atmel/sama5d3_xplained/sama5d3_xplained.c
@@ -18,6 +18,8 @@
DECLARE_GLOBAL_DATA_PTR;
+extern void at91_pda_detect(void);
+
#ifdef CONFIG_NAND_ATMEL
void sama5d3_xplained_nand_hw_init(void)
{
@@ -72,6 +74,14 @@ void board_debug_uart_init(void)
}
#endif
+#ifdef CONFIG_BOARD_LATE_INIT
+int board_late_init(void)
+{
+ at91_pda_detect();
+ return 0;
+}
+#endif
+
#ifdef CONFIG_BOARD_EARLY_INIT_F
int board_early_init_f(void)
{
diff --git a/board/atmel/sama5d3xek/MAINTAINERS b/board/atmel/sama5d3xek/MAINTAINERS
index ad5150897b..e8ec275d71 100644
--- a/board/atmel/sama5d3xek/MAINTAINERS
+++ b/board/atmel/sama5d3xek/MAINTAINERS
@@ -1,5 +1,5 @@
SAMA5D3XEK BOARD
-M: Bo Shen <voice.shen@atmel.com>
+M: Eugen Hristev <eugen.hristev@microchip.com>
S: Maintained
F: board/atmel/sama5d3xek/
F: include/configs/sama5d3xek.h
diff --git a/board/atmel/sama5d4_xplained/MAINTAINERS b/board/atmel/sama5d4_xplained/MAINTAINERS
index 035f64c6ea..9fd0ad7bc2 100644
--- a/board/atmel/sama5d4_xplained/MAINTAINERS
+++ b/board/atmel/sama5d4_xplained/MAINTAINERS
@@ -1,5 +1,5 @@
SAMA5D4 XPLAINED ULTRA BOARD
-M: Bo Shen <voice.shen@atmel.com>
+M: Eugen Hristev <eugen.hristev@microchip.com>
S: Maintained
F: board/atmel/sama5d4_xplained/
F: include/configs/sama5d4_xplained.h
diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c
index 526c6c7f70..4da64890b3 100644
--- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c
+++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c
@@ -17,6 +17,8 @@
DECLARE_GLOBAL_DATA_PTR;
+extern void at91_pda_detect(void);
+
#ifdef CONFIG_NAND_ATMEL
static void sama5d4_xplained_nand_hw_init(void)
{
@@ -71,6 +73,7 @@ static void sama5d4_xplained_usb_hw_init(void)
#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void)
{
+ at91_pda_detect();
#ifdef CONFIG_DM_VIDEO
at91_video_show_board_info();
#endif
diff --git a/board/atmel/sama5d4ek/MAINTAINERS b/board/atmel/sama5d4ek/MAINTAINERS
index afe88ddead..f715af6401 100644
--- a/board/atmel/sama5d4ek/MAINTAINERS
+++ b/board/atmel/sama5d4ek/MAINTAINERS
@@ -1,5 +1,5 @@
SAMA5D4EK BOARD
-M: Bo Shen <voice.shen@atmel.com>
+M: Eugen Hristev <eugen.hristev@microchip.com>
S: Maintained
F: board/atmel/sama5d4ek/
F: include/configs/sama5d4ek.h