mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-01 08:59:33 +00:00
corvus DTS / DM support
Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Andreas Bießmann <andreas@biessmann.org> [rebase on current ToT, don't delete gurnard DTB creation] Signed-off-by: Andreas Bießmann <andreas@biessmann.org>
This commit is contained in:
parent
ce9844ce17
commit
289f979cc9
6 changed files with 162 additions and 5 deletions
|
@ -2,7 +2,9 @@
|
|||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
dtb-$(CONFIG_AT91FAMILY) += at91sam9g45-gurnard.dtb
|
||||
dtb-$(CONFIG_AT91FAMILY) += at91sam9g45-corvus.dtb \
|
||||
at91sam9g45-gurnard.dtb
|
||||
|
||||
dtb-$(CONFIG_S5PC100) += s5pc1xx-smdkc100.dtb
|
||||
dtb-$(CONFIG_S5PC110) += s5pc1xx-goni.dtb
|
||||
dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \
|
||||
|
|
108
arch/arm/dts/at91sam9g45-corvus.dts
Normal file
108
arch/arm/dts/at91sam9g45-corvus.dts
Normal file
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* at91sam9g45-corvus.dts Device Tree file fir Siemens corvus board
|
||||
* (C) Copyright 2016 Heiko Schocher <hs@denx.de>
|
||||
*
|
||||
* based on:
|
||||
* at91sam9m10g45ek.dts - Device Tree file for AT91SAM9M10G45-EK board
|
||||
*
|
||||
* Copyright (C) 2011 Atmel,
|
||||
* 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
/dts-v1/;
|
||||
#include "at91sam9g45.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Siemens corvus";
|
||||
compatible = "atmel,at91sam9m10g45ek", "atmel,at91sam9g45", "atmel,at91sam9";
|
||||
|
||||
chosen {
|
||||
stdout-path = &dbgu;
|
||||
};
|
||||
|
||||
memory {
|
||||
reg = <0x70000000 0x8000000>;
|
||||
};
|
||||
|
||||
clocks {
|
||||
slow_xtal {
|
||||
clock-frequency = <32768>;
|
||||
};
|
||||
|
||||
main_xtal {
|
||||
clock-frequency = <12000000>;
|
||||
};
|
||||
};
|
||||
|
||||
ahb {
|
||||
apb {
|
||||
dbgu: serial@ffffee00 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usart1: serial@fff90000 {
|
||||
pinctrl-0 =
|
||||
<&pinctrl_usart1
|
||||
&pinctrl_usart1_rts
|
||||
&pinctrl_usart1_cts>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
macb0: ethernet@fffbc000 {
|
||||
phy-mode = "rmii";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
watchdog@fffffd40 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
spi0: spi@fffa4000{
|
||||
status = "okay";
|
||||
cs-gpios = <&pioB 3 0>, <0>, <0>, <0>;
|
||||
mtd_dataflash@0 {
|
||||
compatible = "atmel,at45", "atmel,dataflash";
|
||||
spi-max-frequency = <13000000>;
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
usb2: gadget@fff78000 {
|
||||
atmel,vbus-gpio = <&pioB 19 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
rtc@fffffd20 {
|
||||
atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
gpbr: syscon@fffffd60 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
rtc@fffffdb0 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
nand0: nand@40000000 {
|
||||
nand-bus-width = <8>;
|
||||
nand-ecc-mode = "soft";
|
||||
nand-on-flash-bbt;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb0: ohci@00700000 {
|
||||
status = "okay";
|
||||
num-ports = <2>;
|
||||
atmel,vbus-gpio = <&pioD 1 GPIO_ACTIVE_LOW
|
||||
&pioD 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
usb1: ehci@00800000 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
|
@ -122,6 +122,10 @@ config TARGET_CORVUS
|
|||
bool "Support corvus"
|
||||
select CPU_ARM926EJS
|
||||
select SUPPORT_SPL
|
||||
select DM
|
||||
select DM_SERIAL
|
||||
select DM_GPIO
|
||||
select DM_ETH
|
||||
|
||||
config TARGET_TAURUS
|
||||
bool "Support taurus"
|
||||
|
|
|
@ -11,21 +11,23 @@
|
|||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
|
||||
#include <common.h>
|
||||
#include <dm.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/at91sam9g45_matrix.h>
|
||||
#include <asm/arch/at91sam9_smc.h>
|
||||
#include <asm/arch/at91_common.h>
|
||||
#include <asm/arch/at91_rstc.h>
|
||||
#include <asm/arch/atmel_serial.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/gpio.h>
|
||||
#include <asm/arch/clk.h>
|
||||
#include <lcd.h>
|
||||
#include <atmel_lcdc.h>
|
||||
#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
|
||||
#include <net.h>
|
||||
#endif
|
||||
#ifndef CONFIG_DM_ETH
|
||||
#include <netdev.h>
|
||||
#endif
|
||||
#include <spi.h>
|
||||
|
||||
#ifdef CONFIG_USB_GADGET_ATMEL_USBA
|
||||
|
@ -34,6 +36,24 @@
|
|||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
static void corvus_request_gpio(void)
|
||||
{
|
||||
gpio_request(CONFIG_SYS_NAND_ENABLE_PIN, "nand ena");
|
||||
gpio_request(CONFIG_SYS_NAND_READY_PIN, "nand rdy");
|
||||
gpio_request(AT91_PIN_PD7, "d0");
|
||||
gpio_request(AT91_PIN_PD8, "d1");
|
||||
gpio_request(AT91_PIN_PA12, "d2");
|
||||
gpio_request(AT91_PIN_PA13, "d3");
|
||||
gpio_request(AT91_PIN_PA15, "d4");
|
||||
gpio_request(AT91_PIN_PB7, "recovery button");
|
||||
gpio_request(AT91_PIN_PD1, "USB0");
|
||||
gpio_request(AT91_PIN_PD3, "USB1");
|
||||
gpio_request(AT91_PIN_PB18, "SPICS1");
|
||||
gpio_request(AT91_PIN_PB3, "SPICS0");
|
||||
gpio_request(CONFIG_RED_LED, "red led");
|
||||
gpio_request(CONFIG_GREEN_LED, "green led");
|
||||
}
|
||||
|
||||
static void corvus_nand_hw_init(void)
|
||||
{
|
||||
struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC;
|
||||
|
@ -78,6 +98,7 @@ static void corvus_nand_hw_init(void)
|
|||
|
||||
void spl_board_init(void)
|
||||
{
|
||||
corvus_request_gpio();
|
||||
/*
|
||||
* For on the sam9m10g45ek board, the chip wm9711 stay in the test
|
||||
* mode, so it need do some action to exit mode.
|
||||
|
@ -200,6 +221,7 @@ static void corvus_macb_hw_init(void)
|
|||
int board_early_init_f(void)
|
||||
{
|
||||
at91_seriald_hw_init();
|
||||
corvus_request_gpio();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -220,6 +242,8 @@ int board_init(void)
|
|||
/* address of boot parameters */
|
||||
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
||||
|
||||
/* we have to request the gpios again after relocation */
|
||||
corvus_request_gpio();
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
corvus_nand_hw_init();
|
||||
#endif
|
||||
|
@ -249,6 +273,7 @@ int dram_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_DM_ETH
|
||||
int board_eth_init(bd_t *bis)
|
||||
{
|
||||
int rc = 0;
|
||||
|
@ -257,6 +282,7 @@ int board_eth_init(bd_t *bis)
|
|||
#endif
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* SPI chip select control */
|
||||
int spi_cs_is_valid(unsigned int bus, unsigned int cs)
|
||||
|
@ -289,3 +315,12 @@ void spi_cs_deactivate(struct spi_slave *slave)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static struct atmel_serial_platdata at91sam9260_serial_plat = {
|
||||
.base_addr = ATMEL_BASE_DBGU,
|
||||
};
|
||||
|
||||
U_BOOT_DEVICE(at91sam9260_serial) = {
|
||||
.name = "serial_atmel",
|
||||
.platdata = &at91sam9260_serial_plat,
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_AT91=y
|
||||
CONFIG_TARGET_CORVUS=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="at91sam9g45-corvus"
|
||||
CONFIG_SPL=y
|
||||
CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9M10G45,MACH_TYPE=2066,SYS_USE_NANDFLASH"
|
||||
CONFIG_BOOTDELAY=3
|
||||
|
@ -14,6 +15,8 @@ CONFIG_CMD_BOOTZ=y
|
|||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_DFU=y
|
||||
# CONFIG_CMD_FPGA is not set
|
||||
CONFIG_CMD_GPIO=y
|
||||
# CONFIG_CMD_SOURCE is not set
|
||||
# CONFIG_CMD_SETEXPR is not set
|
||||
CONFIG_CMD_DHCP=y
|
||||
CONFIG_CMD_PING=y
|
||||
|
@ -25,3 +28,8 @@ CONFIG_G_DNL_MANUFACTURER="Siemens AG"
|
|||
CONFIG_G_DNL_VENDOR_NUM=0x0908
|
||||
CONFIG_G_DNL_PRODUCT_NUM=0x02d2
|
||||
CONFIG_OF_LIBFDT=y
|
||||
CONFIG_OF_CONTROL=y
|
||||
CONFIG_OF_EMBED=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_GADGET=y
|
||||
# CONFIG_EFI_LOADER is not set
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
|
||||
#define CONFIG_SETUP_MEMORY_TAGS
|
||||
#define CONFIG_INITRD_TAG
|
||||
#define CONFIG_SKIP_LOWLEVEL_INIT
|
||||
#define CONFIG_SKIP_LOWLEVEL_INIT_ONLY
|
||||
#define CONFIG_BOARD_EARLY_INIT_F
|
||||
#define CONFIG_DISPLAY_CPUINFO
|
||||
|
||||
|
|
Loading…
Reference in a new issue