board: at91sam9rlek: convert to support DM and DT
Subsystems (2)
cover board: at91sam9rlek: convert to support DM and DT
The purpose of the patch set is to convert the board to support the Driver Model and the Device Tree.
Wenyou Yang (3):
ARM: dts: at91: add dts files for at91sam9rlek
configs: at91sam9rlek: update for DT and DM support
board: at91sam9rlek: clean up code
arch/arm/dts/Makefile | 2 + arch/arm/dts/at91sam9rl.dtsi | 1124 ++++++++++++++++++++++++++++++ arch/arm/dts/at91sam9rlek.dts | 237 +++++++ board/atmel/at91sam9rlek/at91sam9rlek.c | 18 - configs/at91sam9rlek_dataflash_defconfig | 14 +- configs/at91sam9rlek_mmc_defconfig | 14 +- configs/at91sam9rlek_nandflash_defconfig | 14 +- include/configs/at91sam9rlek.h | 8 - 8 files changed, 1402 insertions(+), 29 deletions(-) create mode 100644 arch/arm/dts/at91sam9rl.dtsi create mode 100644 arch/arm/dts/at91sam9rlek.dts
Signature · 1 line
2.11.0
PATCH 1/3 ARM: dts: at91: add dts files for at91sam9rlek
The device tree source files of at91sam9rlek boards are copied from the Linux v4.10, do the changes as below.
- Add the reg property for the pinctrl node.
- Move the gpio (pioA, pioB, pioC, pioD) nodes as the pinctrl's slibling nodes, instead of the child nodes.
- Fix the compilation warnings.
---
arch/arm/dts/Makefile | 2 + arch/arm/dts/at91sam9rl.dtsi | 1124 +++++++++++++++++++++++++++++++++++++++++ arch/arm/dts/at91sam9rlek.dts | 237 +++++++++ 3 files changed, 1363 insertions(+) create mode 100644 arch/arm/dts/at91sam9rl.dtsi create mode 100644 arch/arm/dts/at91sam9rlek.dts
arch/arm/dts/Makefile +2 -0
@@ -330,6 +330,8 @@ dtb-$(CONFIG_TARGET_AT91SAM9260EK) += \ at91sam9g20ek.dtb \ at91sam9g20ek_2mmc.dtb +dtb-$(CONFIG_TARGET_AT91SAM9RLEK) += at91sam9rlek.dtb + dtb-$(CONFIG_TARGET_AT91SAM9M10G45EK) += at91sam9m10g45ek.dtb dtb-$(CONFIG_TARGET_AT91SAM9X5EK) += \
arch/arm/dts/at91sam9rl.dtsi new file +1124 -0
1,124 lines not on this page · raw message
arch/arm/dts/at91sam9rlek.dts new file +237 -0
237 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 2/3 configs: at91sam9rlek: update for DT and DM support
In reply to Wenyou YangSupport the device tree and enable CONFIG_CLK and CONFIG_PINCTRL to support at91 clock driver and at91 pinctrl driver.
Enable DM_GPIO, DM_MMC support, move CONFIG_AT91_GPIO and CONFIG_GENERIC_ATMEL_MCI config option to the default config files.
---
configs/at91sam9rlek_dataflash_defconfig | 14 +++++++++++++- configs/at91sam9rlek_mmc_defconfig | 14 +++++++++++++- configs/at91sam9rlek_nandflash_defconfig | 14 +++++++++++++- include/configs/at91sam9rlek.h | 8 -------- 4 files changed, 39 insertions(+), 11 deletions(-)
configs/at91sam9rlek_dataflash_defconfig +13 -1
@@ -1,6 +1,8 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_TARGET_AT91SAM9RLEK=y +CONFIG_DEFAULT_DEVICE_TREE="at91sam9rlek" +# CONFIG_SYS_MALLOC_F is not set CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9RL,SYS_USE_DATAFLASH" CONFIG_BOOTDELAY=3 # CONFIG_CONSOLE_MUX is not set
@@ -20,5 +22,15 @@ CONFIG_CMD_MMC=y # CONFIG_CMD_NET is not set # CONFIG_CMD_NFS is not set CONFIG_CMD_FAT=y +CONFIG_OF_CONTROL=y +CONFIG_DM=y +CONFIG_CLK=y +CONFIG_CLK_AT91=y +CONFIG_AT91_UTMI=y +CONFIG_DM_GPIO=y +CONFIG_AT91_GPIO=y +CONFIG_DM_MMC=y +CONFIG_GENERIC_ATMEL_MCI=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_AT91=y CONFIG_LCD=y -CONFIG_OF_LIBFDT=y
configs/at91sam9rlek_mmc_defconfig +13 -1
@@ -1,6 +1,8 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_TARGET_AT91SAM9RLEK=y +CONFIG_DEFAULT_DEVICE_TREE="at91sam9rlek" +# CONFIG_SYS_MALLOC_F is not set CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9RL,SYS_USE_MMC" CONFIG_BOOTDELAY=3 # CONFIG_CONSOLE_MUX is not set
@@ -20,5 +22,15 @@ CONFIG_CMD_MMC=y # CONFIG_CMD_NET is not set # CONFIG_CMD_NFS is not set CONFIG_CMD_FAT=y +CONFIG_OF_CONTROL=y +CONFIG_DM=y +CONFIG_CLK=y +CONFIG_CLK_AT91=y +CONFIG_AT91_UTMI=y +CONFIG_DM_GPIO=y +CONFIG_AT91_GPIO=y +CONFIG_DM_MMC=y +CONFIG_GENERIC_ATMEL_MCI=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_AT91=y CONFIG_LCD=y -CONFIG_OF_LIBFDT=y
configs/at91sam9rlek_nandflash_defconfig +13 -1
@@ -1,6 +1,8 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_TARGET_AT91SAM9RLEK=y +CONFIG_DEFAULT_DEVICE_TREE="at91sam9rlek" +# CONFIG_SYS_MALLOC_F is not set CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9RL,SYS_USE_NANDFLASH" CONFIG_BOOTDELAY=3 # CONFIG_CONSOLE_MUX is not set
@@ -20,5 +22,15 @@ CONFIG_CMD_MMC=y # CONFIG_CMD_NET is not set # CONFIG_CMD_NFS is not set CONFIG_CMD_FAT=y +CONFIG_OF_CONTROL=y +CONFIG_DM=y +CONFIG_CLK=y +CONFIG_CLK_AT91=y +CONFIG_AT91_UTMI=y +CONFIG_DM_GPIO=y +CONFIG_AT91_GPIO=y +CONFIG_DM_MMC=y +CONFIG_GENERIC_ATMEL_MCI=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_AT91=y CONFIG_LCD=y -CONFIG_OF_LIBFDT=y
include/configs/at91sam9rlek.h +0 -8
@@ -29,8 +29,6 @@#define CONFIG_INITRD_TAG 1#define CONFIG_ATMEL_LEGACY -#define CONFIG_AT91_GPIO 1 -#define CONFIG_AT91_GPIO_PULLUP 1/* * Hardware drivers
@@ -102,12 +100,6 @@#endif -/* MMC */ - -#ifdef CONFIG_CMD_MMC -#define CONFIG_GENERIC_ATMEL_MCI -#endif -/* Ethernet - not present */ /* USB - not supported */
Signature · 1 line
2.11.0
PATCH 3/3 board: at91sam9rlek: clean up code
In reply to Wenyou YangSince the introduction of the pinctrl and clk drivers and the device tree files, remove unneeded hard coded related code from the board file.
---
board/atmel/at91sam9rlek/at91sam9rlek.c | 18 ------------------ 1 file changed, 18 deletions(-)
board/atmel/at91sam9rlek/at91sam9rlek.c +0 -18
@@ -18,10 +18,6 @@#include <lcd.h> #include <atmel_lcdc.h> -#include <atmel_mci.h> -#if defined(CONFIG_RESET_PHY_R ) && defined(CONFIG_MACB ) -#include <net.h> -#endif DECLARE_GLOBAL_DATA_PTR ;
@@ -159,22 +155,8 @@ void lcd_show_board_info(void)#endif /* CONFIG_LCD_INFO */ #endif -#ifdef CONFIG_GENERIC_ATMEL_MCI -int board_mmc_init (bd_t *bis) -{ -at91_mci_hw_init (); - -return atmel_mci_init ((void *)ATMEL_BASE_MCI ); -} -#endif -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_PIOC ); -at91_periph_clk_enable (ATMEL_ID_PIOD ); -return 0 ; }
Signature · 1 line
2.11.0