]> git.sur5r.net Git - u-boot/commitdiff
board: pm9263: Update to support DT and DM
authorWenyou.Yang@microchip.com <Wenyou.Yang@microchip.com>
Fri, 21 Jul 2017 06:04:47 +0000 (14:04 +0800)
committerTom Rini <trini@konsulko.com>
Sat, 5 Aug 2017 00:38:36 +0000 (20:38 -0400)
Update the configuration files to support the device tree and driver
model. The peripheral clock and pins configuration are handled by
the clock and the pinctrl drivers respectively.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/arm/dts/Makefile
board/ronetix/pm9263/Makefile
board/ronetix/pm9263/pm9263.c
configs/pm9263_defconfig
include/configs/pm9263.h

index 6f7db82fce9e9bb0ff092e0d620f9d9913b8f5b8..c2dc240edf687a51523ef4e1f21f5824e923486d 100644 (file)
@@ -386,6 +386,8 @@ dtb-$(CONFIG_SOC_KEYSTONE) += keystone-k2hk-evm.dtb \
 
 dtb-$(CONFIG_TARGET_AT91SAM9261EK) += at91sam9261ek.dtb
 
+dtb-$(CONFIG_TARGET_PM9263) += at91sam9263ek.dtb
+
 dtb-$(CONFIG_TARGET_AT91SAM9263EK) += at91sam9263ek.dtb
 
 dtb-$(CONFIG_TARGET_AT91SAM9RLEK) += at91sam9rlek.dtb
index 43ea599c4f5593de1280c4b6c0366e1fefaac982..53e621dc8032afa46c58e1a16edd2ea6458d2090 100644 (file)
@@ -11,5 +11,5 @@
 #
 
 obj-y += pm9263.o
-obj-y += led.o
+obj-$(CONFIG_AT91_LED) += led.o
 obj-$(CONFIG_HAS_DATAFLASH) += partition.o
index 0c23bb6c65ba2551c229bfd05ef150ac22840705..8d20084240e6e8319a83e7599e2643c152792410 100644 (file)
@@ -20,7 +20,6 @@
 #include <asm/arch/gpio.h>
 #include <lcd.h>
 #include <atmel_lcdc.h>
-#include <dataflash.h>
 #if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
 #include <net.h>
 #endif
@@ -277,7 +276,7 @@ extern flash_info_t flash_info[];
 
 void lcd_show_board_info(void)
 {
-       ulong dram_size, nand_size, flash_size, dataflash_size;
+       ulong dram_size, nand_size, flash_size;
        int i;
        char temp[32];
 
@@ -300,17 +299,11 @@ void lcd_show_board_info(void)
        for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++)
                flash_size += flash_info[i].size;
 
-       dataflash_size = 0;
-       for (i = 0; i < CONFIG_SYS_MAX_DATAFLASH_BANKS; i++)
-               dataflash_size += (unsigned int) dataflash_info[i].Device.pages_number *
-                               dataflash_info[i].Device.pages_size;
-
        lcd_printf ("%ld MB SDRAM, %ld MB NAND\n%ld MB NOR Flash\n"
-                       "4 MB PSRAM, %ld MB DataFlash\n",
+                       "4 MB PSRAM\n",
                dram_size >> 20,
                nand_size >> 20,
-               flash_size >> 20,
-               dataflash_size >> 20);
+               flash_size >> 20);
 }
 #endif /* CONFIG_LCD_INFO */
 
@@ -318,12 +311,6 @@ void lcd_show_board_info(void)
 
 int board_early_init_f(void)
 {
-       at91_periph_clk_enable(ATMEL_ID_PIOA);
-       at91_periph_clk_enable(ATMEL_ID_PIOB);
-       at91_periph_clk_enable(ATMEL_ID_PIOCDE);
-
-       at91_seriald_hw_init();
-
        return 0;
 }
 
@@ -338,9 +325,6 @@ int board_init(void)
 #ifdef CONFIG_CMD_NAND
        pm9263_nand_hw_init();
 #endif
-#ifdef CONFIG_HAS_DATAFLASH
-       at91_spi0_hw_init(1 << 0);
-#endif
 #ifdef CONFIG_MACB
        pm9263_macb_hw_init();
 #endif
index 9e647f85ecfbce7131e76cd35348f58cdc3d969e..7516c9552ac374564f7a6f54d7f5a1c983f1a9e9 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_PM9263=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9263ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9263"
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_BOOTDELAY=3
@@ -13,6 +15,7 @@ CONFIG_SYS_PROMPT="u-boot-pm9263> "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_LOADS is not set
 CONFIG_CMD_NAND=y
+CONFIG_CMD_SF=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
@@ -20,8 +23,22 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_JFFS2=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_SPI_FLASH_DATAFLASH=y
+CONFIG_DM_SERIAL=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
index d24280cf8dcbe1023172bc36735037282a94e996..f7a55510727a511becb5ce1784cc4ba44b0c1867 100644 (file)
 /*
  * Hardware drivers
  */
-#define CONFIG_AT91_GPIO       1
-#define CONFIG_ATMEL_USART     1
-#define CONFIG_USART_BASE              ATMEL_BASE_DBGU
-#define        CONFIG_USART_ID                 ATMEL_ID_SYS
-
 /* LCD */
 #define LCD_BPP                                LCD_COLOR8
 #define CONFIG_LCD_LOGO                        1
 
 #define CONFIG_LCD_IN_PSRAM            1
 
-/* LED */
-#define CONFIG_AT91_LED
-#define CONFIG_RED_LED         GPIO_PIN_PB(7) /* this is the power led */
-#define CONFIG_GREEN_LED       GPIO_PIN_PB(8) /* this is the user1 led */
-
-
 /*
  * BOOTP options
  */
 #define PHYS_SDRAM             0x20000000
 #define PHYS_SDRAM_SIZE                0x04000000      /* 64 megs */
 
-/* DataFlash */
-#define CONFIG_ATMEL_DATAFLASH_SPI
-#define CONFIG_HAS_DATAFLASH                   1
-#define CONFIG_SYS_MAX_DATAFLASH_BANKS         1
-#define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0    0xC0000000      /* CS0 */
-#define AT91_SPI_CLK                           15000000
-#define DATAFLASH_TCSS                         (0x1a << 16)
-#define DATAFLASH_TCHS                         (0x1 << 24)
-
 /* NOR flash, if populated */
 #define CONFIG_SYS_FLASH_CFI           1
 #define CONFIG_FLASH_CFI_DRIVER                1
 #ifdef CONFIG_SYS_USE_DATAFLASH
 
 /* bootstrap + u-boot + env + linux in dataflash on CS0 */
-#define CFG_MONITOR_BASE       (CFG_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
 #define CONFIG_ENV_OFFSET      0x4200
-#define CONFIG_ENV_ADDR                (CFG_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
 #define CONFIG_ENV_SIZE                0x4200
-#define CONFIG_BOOTCOMMAND     "cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SECT_SIZE   0x210
+#define CONFIG_ENV_SPI_MAX_HZ  15000000
+#define CONFIG_BOOTCOMMAND     "sf probe 0; " \
+                               "sf read 0x22000000 0x84000 0x294000; " \
+                               "bootm 0x22000000"
 #define CONFIG_BOOTARGS                "console=ttyS0,115200 " \
                                "root=/dev/mtdblock0 " \
                                "mtdparts=atmel_nand:-(root) "\
 #define CONFIG_SYS_MALLOC_LEN  ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024, 0x1000)
 
 #define CONFIG_SYS_SDRAM_BASE  PHYS_SDRAM
-#define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_SDRAM_BASE + 0x1000 - \
+#define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - \
                                GENERATED_GBL_DATA_SIZE)
 
 #endif