board: ethernut5: Update to support DT and DM
Subsystems (2)
PATCH 1/1 board: ethernut5: Update to support DT and DM
Add the dts files to support deivce tree, 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.
---
arch/arm/dts/at91sam9xe.dtsi | 60 ++++++++++++++++++++++++ arch/arm/dts/ethernut5.dts | 94 ++++++++++++++++++++++++++++++++++++++ board/egnite/ethernut5/ethernut5.c | 54 ---------------------- configs/ethernut5_defconfig | 16 +++++++ include/configs/ethernut5.h | 36 ++++----------- 5 files changed, 178 insertions(+), 82 deletions(-) create mode 100644 arch/arm/dts/at91sam9xe.dtsi create mode 100644 arch/arm/dts/ethernut5.dts
arch/arm/dts/at91sam9xe.dtsi new file +60 -0
@@ -0,0 +1,60 @@ +/* + * at91sam9xe.dtsi - Device Tree Include file for AT91SAM9XE family SoC + * + * Copyright (C) 2015 Atmel, + * 2015 Alexandre Belloni <[email protected]> + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "at91sam9260.dtsi" + +/ { + model = "Atmel AT91SAM9XE family SoC"; + compatible = "atmel,at91sam9xe", "atmel,at91sam9260"; + + sram0: sram at 002ff000 { + status = "disabled"; + }; + + sram1: sram at 00300000 { + compatible = "mmio-sram"; + reg = <0x00300000 0x4000>; + }; +};
arch/arm/dts/ethernut5.dts new file +94 -0
94 lines not on this page · raw message
board/egnite/ethernut5/ethernut5.c +0 -54
85 lines not on this page · raw message
configs/ethernut5_defconfig +16 -0
@@ -1,6 +1,8 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_TARGET_ETHERNUT5=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_DEFAULT_DEVICE_TREE="ethernut5" CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9XE" CONFIG_BOOTDELAY=3 # CONFIG_DISPLAY_BOARDINFO is not set
@@ -30,8 +32,22 @@ CONFIG_CMD_EXT2=y CONFIG_CMD_FAT=y CONFIG_CMD_JFFS2=y CONFIG_CMD_UBI=y +CONFIG_OF_CONTROL=y +CONFIG_DM=y +CONFIG_CLK=y +CONFIG_CLK_AT91=y +CONFIG_DM_GPIO=y +CONFIG_AT91_GPIO=y 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_PINCTRL=y +CONFIG_PINCTRL_AT91=y +CONFIG_DM_SERIAL=y +CONFIG_ATMEL_USART=y +CONFIG_DM_SPI=y +CONFIG_ATMEL_SPI=y CONFIG_USB=y CONFIG_USB_STORAGE=y
include/configs/ethernut5.h +8 -28
@@ -53,35 +53,13 @@# define CONFIG_SYS_FLASH_PROTECTION /* First stage loader in sector 0 */ # define CONFIG_EFLASH_PROTSECTORS 1 -/* 512kB DataFlash@NPCS0 */ -#define CONFIG_SYS_MAX_DATAFLASH_BANKS 1 -#define CONFIG_HAS_DATAFLASH -#define CONFIG_ATMEL_DATAFLASH_SPI -#define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 0xC0000000 -#define DATAFLASH_TCSS (0x1a << 16) -#define DATAFLASH_TCHS (0x1 << 24) +/* bootstrap + u-boot + env + linux in dataflash on CS0 */ #define CONFIG_ENV_IS_IN_SPI_FLASH -#define CONFIG_ENV_OFFSET 0x3DE000 -#define CONFIG_ENV_SECT_SIZE (132 << 10) -#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE -#define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 \ - + CONFIG_ENV_OFFSET) -#define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 \ - + 0x042000) - -/* SPI */ -#define CONFIG_ATMEL_SPI -#define AT91_SPI_CLK 15000000 - -/* Serial port */ -#define CONFIG_ATMEL_USART -#define CONFIG_USART3 /* USART 3 is DBGU */ -#define CONFIG_USART_BASE ATMEL_BASE_DBGU -#define CONFIG_USART_ID ATMEL_ID_SYS - -/* Misc. hardware drivers */ -#define CONFIG_AT91_GPIO +#define CONFIG_ENV_OFFSET 0x3DE000 +#define CONFIG_ENV_SIZE (132 << 10) +#define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE +#define CONFIG_ENV_SPI_MAX_HZ 15000000/* Command line configuration */ #define CONFIG_CMD_MTDPARTS
@@ -193,7 +171,9 @@#define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG -#define CONFIG_BOOTCOMMAND "cp.b 0xC00C6000 ${loadaddr} 0x294000; bootm" +#define CONFIG_BOOTCOMMAND "sf probe 0:0; " \ + "sf read 0x22000000 0xc6000 0x294000; " \ + "bootm 0x22000000"#if defined(CONFIG_CMD_NAND )#define CONFIG_BOOTARGS "console=ttyS0,115200 " \ "root=/dev/mtdblock0 " \
Signature · 1 line
2.13.0
PATCH 1/1 board: ethernut5: Update to support DT and DM
Quoted 8 lines · Wenyou Yang
Add the dts files to support deivce tree, 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 <[email protected]>---
Quoted 8 lines
arch/arm/dts/at91sam9xe.dtsi | 60 ++++++++++++++++++++++++ arch/arm/dts/ethernut5.dts | 94 ++++++++++++++++++++++++++++++++++++++ board/egnite/ethernut5/ethernut5.c | 54 ---------------------- configs/ethernut5_defconfig | 16 +++++++ include/configs/ethernut5.h | 36 ++++----------- 5 files changed, 178 insertions(+), 82 deletions(-) create mode 100644 arch/arm/dts/at91sam9xe.dtsi create mode 100644 arch/arm/dts/ethernut5.dts
Quoted 7 lines · Wenyou.Yang at microchip.com
Add the dts files to support deivce tree, 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 <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master. However:
Warning (reg_format): "reg" property in /i2c-gpio-0/pcf8563 at 50 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) Warning (avoid_default_addr_size): Relying on default #address-cells value for /i2c-gpio-0/pcf8563 at 50
Warning (avoid_default_addr_size): Relying on default #size-cells value for /i2c-gpio-0/pcf8563 at 50
Please fix and push to the kernel as well as U-Boot, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170807/ce537b82/attachment.sig>
Yang
Quoted 17 lines · Tom Rini
Quoted 7 lines · Wenyou.Yang at microchip.com
Add the dts files to support deivce tree, 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 <[email protected]>Reviewed-by Simon Glass <[email protected]>Applied to u-boot/master. However:
Warning (reg_format): "reg" property in /i2c-gpio-0/pcf8563 at 50 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) Warning (avoid_default_addr_size): Relying on default #address-cells value for /i2c-gpio-0/pcf8563 at 50
Warning (avoid_default_addr_size): Relying on default #size-cells value for /i2c-gpio-0/pcf8563 at 50
Quoted 1 line
Please fix and push to the kernel as well as U-Boot, thanks!
Yes, I will send the patch.
Best Regards,
Wenyou Yang