Skip to content

Commit

Permalink
ARM: at91: add at91sam9g20 and Calao USB A9G20 DT support
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Reviewed-by: Rob Herring <rob.herring@calxeda.com>
  • Loading branch information
Jean-Christophe PLAGNIOL-VILLARD authored and Nicolas Ferre committed Oct 25, 2011
1 parent 49fe2ba commit fea3158
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 1 deletion.
119 changes: 119 additions & 0 deletions arch/arm/boot/dts/at91sam9g20.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/*
* at91sam9g20.dtsi - Device Tree Include file for AT91SAM9G20 family SoC
*
* Copyright (C) 2011 Atmel,
* 2011 Nicolas Ferre <nicolas.ferre@atmel.com>,
* 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
*
* Licensed under GPLv2 or later.
*/

/include/ "skeleton.dtsi"

/ {
model = "Atmel AT91SAM9G20 family SoC";
compatible = "atmel,at91sam9g20";
interrupt-parent = <&aic>;

aliases {
serial0 = &dbgu;
serial1 = &usart0;
serial2 = &usart1;
serial3 = &usart2;
serial4 = &usart3;
serial5 = &usart4;
serial6 = &usart5;
};
cpus {
cpu@0 {
compatible = "arm,arm926ejs";
};
};

memory@20000000 {
reg = <0x20000000 0x08000000>;
};

ahb {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges;

apb {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges;

aic: interrupt-controller@fffff000 {
#interrupt-cells = <1>;
compatible = "atmel,at91rm9200-aic";
interrupt-controller;
interrupt-parent;
reg = <0xfffff000 0x200>;
};

dbgu: serial@fffff200 {
compatible = "atmel,at91sam9260-usart";
reg = <0xfffff200 0x200>;
interrupts = <1>;
status = "disabled";
};

usart0: serial@fffb0000 {
compatible = "atmel,at91sam9260-usart";
reg = <0xfffb0000 0x200>;
interrupts = <6>;
atmel,use-dma-rx;
atmel,use-dma-tx;
status = "disabled";
};

usart1: serial@fffb4000 {
compatible = "atmel,at91sam9260-usart";
reg = <0xfffb4000 0x200>;
interrupts = <7>;
atmel,use-dma-rx;
atmel,use-dma-tx;
status = "disabled";
};

usart2: serial@fffb8000 {
compatible = "atmel,at91sam9260-usart";
reg = <0xfffb8000 0x200>;
interrupts = <8>;
atmel,use-dma-rx;
atmel,use-dma-tx;
status = "disabled";
};

usart3: serial@fffd0000 {
compatible = "atmel,at91sam9260-usart";
reg = <0xfffd0000 0x200>;
interrupts = <23>;
atmel,use-dma-rx;
atmel,use-dma-tx;
status = "disabled";
};

usart4: serial@fffd4000 {
compatible = "atmel,at91sam9260-usart";
reg = <0xfffd4000 0x200>;
interrupts = <24>;
atmel,use-dma-rx;
atmel,use-dma-tx;
status = "disabled";
};

usart5: serial@fffd8000 {
compatible = "atmel,at91sam9260-usart";
reg = <0xfffd8000 0x200>;
interrupts = <25>;
atmel,use-dma-rx;
atmel,use-dma-tx;
status = "disabled";
};
};
};
};
30 changes: 30 additions & 0 deletions arch/arm/boot/dts/usb_a9g20.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* usb_a9g20.dts - Device Tree file for Caloa USB A9G20 board
*
* Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
*
* Licensed under GPLv2 or later.
*/
/dts-v1/;
/include/ "at91sam9g20.dtsi"

/ {
model = "Calao USB A9G20";
compatible = "calao,usb-a9g20", "atmel,at91sam9g20", "atmel,at91sam9";

chosen {
bootargs = "mem=64M console=ttyS0,115200 mtdparts=atmel_nand:128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),4M(kernel),120M(rootfs),-(data) root=/dev/mtdblock5 rw rootfstype=ubifs";
};

memory@20000000 {
reg = <0x20000000 0x4000000>;
};

ahb {
apb {
dbgu: serial@fffff200 {
status = "okay";
};
};
};
};
2 changes: 1 addition & 1 deletion arch/arm/mach-at91/Makefile.boot
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ params_phys-y := 0x20000100
initrd_phys-y := 0x20410000
endif

dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9m10g45ek.dtb
dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9m10g45ek.dtb usb_a9g20.dtb
8 changes: 8 additions & 0 deletions arch/arm/mach-at91/at91sam9260.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("t4_clk", "atmel_tcb.1", &tc4_clk),
CLKDEV_CON_DEV_ID("t5_clk", "atmel_tcb.1", &tc5_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk),
/* more usart lookup table for DT entries */
CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck),
CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk),
CLKDEV_CON_DEV_ID("usart", "fffb4000.serial", &usart1_clk),
CLKDEV_CON_DEV_ID("usart", "fffb8000.serial", &usart2_clk),
CLKDEV_CON_DEV_ID("usart", "fffd0000.serial", &usart3_clk),
CLKDEV_CON_DEV_ID("usart", "fffd4000.serial", &usart4_clk),
CLKDEV_CON_DEV_ID("usart", "fffd8000.serial", &usart5_clk),
};

static struct clk_lookup usart_clocks_lookups[] = {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-at91/board-dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ static void __init at91_dt_device_init(void)

static const char *at91_dt_board_compat[] __initdata = {
"atmel,at91sam9m10g45ek",
"calao,usb-a9g20",
NULL
};

Expand Down

0 comments on commit fea3158

Please sign in to comment.