]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Merge git://git.denx.de/u-boot-fsl-qoriq
authorTom Rini <trini@konsulko.com>
Tue, 28 Jun 2016 19:59:05 +0000 (15:59 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 28 Jun 2016 19:59:05 +0000 (15:59 -0400)
145 files changed:
Makefile
arch/arm/Kconfig
arch/arm/cpu/arm1136/mx35/generic.c
arch/arm/cpu/armv7/Makefile
arch/arm/cpu/armv7/bcm235xx/clk-bcm235xx.c
arch/arm/cpu/armv7/bcm235xx/clk-core.c
arch/arm/cpu/armv7/ls102xa/spl.c
arch/arm/cpu/armv7/omap-common/boot-common.c
arch/arm/cpu/armv7/omap-common/timer.c
arch/arm/cpu/armv8/fsl-layerscape/spl.c
arch/arm/cpu/armv8/start.S
arch/arm/cpu/armv8/zynqmp/spl.c
arch/arm/dts/Makefile
arch/arm/dts/at91sam9260-smartweb.dts [new file with mode: 0644]
arch/arm/dts/at91sam9260.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9261.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9263.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9g20-taurus.dts [new file with mode: 0644]
arch/arm/dts/at91sam9g20.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9g45-corvus.dts [new file with mode: 0644]
arch/arm/imx-common/spl.c
arch/arm/include/asm/arch-bcm235xx/boot0.h [new file with mode: 0644]
arch/arm/lib/bootm-fdt.c
arch/arm/mach-at91/Kconfig
arch/arm/mach-at91/include/mach/at91_matrix.h
arch/arm/mach-at91/spl.c
arch/arm/mach-davinci/spl.c
arch/arm/mach-meson/Kconfig
arch/arm/mach-mvebu/spl.c
arch/arm/mach-rockchip/rk3288-board-spl.c
arch/arm/mach-socfpga/spl.c
arch/arm/mach-sunxi/board.c
arch/arm/mach-uniphier/boot-mode/boot-mode.c
arch/arm/mach-zynq/spl.c
board/BuR/brppt1/Kconfig [moved from board/BuR/kwb/Kconfig with 68% similarity]
board/BuR/brppt1/MAINTAINERS [new file with mode: 0644]
board/BuR/brppt1/Makefile [moved from board/BuR/tseries/Makefile with 100% similarity]
board/BuR/brppt1/board.c [moved from board/BuR/tseries/board.c with 99% similarity]
board/BuR/brppt1/mux.c [moved from board/BuR/tseries/mux.c with 99% similarity]
board/BuR/brxre1/Kconfig [moved from board/BuR/tseries/Kconfig with 67% similarity]
board/BuR/brxre1/MAINTAINERS [new file with mode: 0644]
board/BuR/brxre1/Makefile [moved from board/BuR/kwb/Makefile with 100% similarity]
board/BuR/brxre1/board.c [moved from board/BuR/kwb/board.c with 98% similarity]
board/BuR/brxre1/mux.c [moved from board/BuR/kwb/mux.c with 100% similarity]
board/BuR/kwb/MAINTAINERS [deleted file]
board/BuR/tseries/MAINTAINERS [deleted file]
board/amlogic/odroid-c2/Kconfig [moved from board/hardkernel/odroid-c2/Kconfig with 85% similarity]
board/amlogic/odroid-c2/MAINTAINERS [moved from board/hardkernel/odroid-c2/MAINTAINERS with 80% similarity]
board/amlogic/odroid-c2/Makefile [moved from board/hardkernel/odroid-c2/Makefile with 100% similarity]
board/amlogic/odroid-c2/README [moved from board/hardkernel/odroid-c2/README with 100% similarity]
board/amlogic/odroid-c2/odroid-c2.c [moved from board/hardkernel/odroid-c2/odroid-c2.c with 100% similarity]
board/broadcom/bcm11130/MAINTAINERS
board/broadcom/bcm11130_nand/MAINTAINERS
board/broadcom/bcm23550_w1d/MAINTAINERS
board/broadcom/bcm28155_ap/MAINTAINERS
board/broadcom/bcm28155_w1d/MAINTAINERS
board/broadcom/bcm911360_entphn-ns/MAINTAINERS
board/broadcom/bcm911360_entphn/MAINTAINERS
board/broadcom/bcm911360k/MAINTAINERS
board/broadcom/bcm958300k-ns/MAINTAINERS
board/broadcom/bcm958300k/MAINTAINERS
board/broadcom/bcm958305k/MAINTAINERS
board/broadcom/bcm958622hr/MAINTAINERS
board/siemens/corvus/board.c
board/siemens/smartweb/smartweb.c
board/siemens/taurus/taurus.c
board/ti/am335x/Kconfig
board/work-microwave/work_92105/work_92105_display.c
cmd/Kconfig
cmd/Makefile
cmd/bootefi.c
cmd/bootm.c
common/Kconfig
common/Makefile
common/cli.c
common/env_ext4.c
common/fb_mmc.c
common/fb_nand.c
common/image-android.c
common/image-sparse.c
common/spl/spl_mmc.c
configs/am335x_evm_spiboot_defconfig
configs/am43xx_evm_qspiboot_defconfig
configs/axm_defconfig
configs/bcm23550_w1d_defconfig
configs/brppt1_mmc_defconfig [moved from configs/tseries_mmc_defconfig with 97% similarity]
configs/brppt1_nand_defconfig [moved from configs/tseries_nand_defconfig with 97% similarity]
configs/brppt1_spi_defconfig [moved from configs/tseries_spi_defconfig with 95% similarity]
configs/brxre1_defconfig [moved from configs/kwb_defconfig with 97% similarity]
configs/corvus_defconfig
configs/gurnard_defconfig
configs/ls1012afrdm_qspi_defconfig
configs/ls1012aqds_qspi_defconfig
configs/ls1012ardb_qspi_defconfig
configs/ls1021aqds_nand_defconfig
configs/ls1021aqds_qspi_defconfig
configs/ls1021aqds_sdcard_ifc_defconfig
configs/ls1021aqds_sdcard_qspi_defconfig
configs/ls1021atwr_qspi_defconfig
configs/ls1021atwr_sdcard_ifc_defconfig
configs/ls1021atwr_sdcard_qspi_defconfig
configs/ls1043aqds_nand_defconfig
configs/ls1043aqds_qspi_defconfig
configs/ls1043aqds_sdcard_ifc_defconfig
configs/ls1043aqds_sdcard_qspi_defconfig
configs/ls1043ardb_nand_defconfig
configs/ls1043ardb_sdcard_defconfig
configs/ls2080aqds_qspi_defconfig
configs/odroid-c2_defconfig
configs/s32v234evb_defconfig
configs/smartweb_defconfig
configs/taurus_defconfig
configs/tplink_wdr4300_defconfig
doc/mkimage.1
doc/uImage.FIT/source_file_format.txt
drivers/clk/clk_sandbox.c
drivers/mmc/dw_mmc.c
drivers/mtd/nand/nand_base.c
drivers/usb/gadget/f_fastboot.c
include/config_distro_bootcmd.h
include/configs/bcm23550_w1d.h
include/configs/brppt1.h [moved from include/configs/tseries.h with 98% similarity]
include/configs/brxre1.h [moved from include/configs/kwb.h with 97% similarity]
include/configs/corvus.h
include/configs/meson-gxbb-common.h [new file with mode: 0644]
include/configs/odroid-c2.h
include/configs/s32v234evb.h
include/configs/smartweb.h
include/configs/snapper9g45.h
include/configs/taurus.h
include/configs/tplink_wdr4300.h
include/env_default.h
include/fastboot.h
include/fb_mmc.h
include/fb_nand.h
include/image-sparse.h
include/image.h
include/spl.h
lib/lzo/lzo1x_decompress.c
test/command_ut.c
tools/default_image.c
tools/fit_image.c
tools/imagetool.c
tools/imagetool.h
tools/mkimage.c

index d0e7a8a4ecc72bf59061b38693c8e967ca9efdba..0c47bb66c19996e2fe6af72336af5c1ad5e5985e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -810,7 +810,9 @@ ifeq ($(CONFIG_DM_I2C_COMPAT),y)
 endif
 
 PHONY += dtbs
-dtbs dts/dt.dtb: checkdtc u-boot
+dtbs: dts/dt.dtb
+       @:
+dts/dt.dtb: checkdtc u-boot
        $(Q)$(MAKE) $(build)=dts dtbs
 
 quiet_cmd_copy = COPY    $@
@@ -1269,8 +1271,8 @@ prepare: prepare0
 define filechk_version.h
        (echo \#define PLAIN_VERSION \"$(UBOOTRELEASE)\"; \
        echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION; \
-       echo \#define CC_VERSION_STRING \"$$($(CC) --version | head -n 1)\"; \
-       echo \#define LD_VERSION_STRING \"$$($(LD) --version | head -n 1)\"; )
+       echo \#define CC_VERSION_STRING \"$$(LC_ALL=C $(CC) --version | head -n 1)\"; \
+       echo \#define LD_VERSION_STRING \"$$(LC_ALL=C $(LD) --version | head -n 1)\"; )
 endef
 
 # The SOURCE_DATE_EPOCH mechanism requires a date that behaves like GNU date.
index e9d2fc9845c5300f0dbd56765c84390283ff943a..3237a74f722358bdb76207fa0244eeb1fb3a403f 100644 (file)
@@ -304,13 +304,13 @@ config TARGET_VEXPRESS_CA9X4
        bool "Support vexpress_ca9x4"
        select CPU_V7
 
-config TARGET_KWB
-       bool "Support kwb"
+config TARGET_BRXRE1
+       bool "Support BRXRE1"
        select CPU_V7
        select SUPPORT_SPL
 
-config TARGET_TSERIES
-       bool "Support tseries"
+config TARGET_BRPPT1
+       bool "Support BRPPT1"
        select CPU_V7
        select SUPPORT_SPL
 
@@ -908,8 +908,8 @@ source "arch/arm/cpu/armv8/Kconfig"
 source "arch/arm/imx-common/Kconfig"
 
 source "board/bosch/shc/Kconfig"
-source "board/BuR/kwb/Kconfig"
-source "board/BuR/tseries/Kconfig"
+source "board/BuR/brxre1/Kconfig"
+source "board/BuR/brppt1/Kconfig"
 source "board/CarMediaLab/flea3/Kconfig"
 source "board/Marvell/aspenite/Kconfig"
 source "board/Marvell/gplugd/Kconfig"
index bc98edda7a2f49f13bd3a3fa9059bf267e7aceb9..068d93eeec1dbb8b5acdfc6d376d5daf5fcbc6c1 100644 (file)
@@ -526,7 +526,7 @@ u32 spl_boot_device(void)
 }
 
 #ifdef CONFIG_SPL_BUILD
-u32 spl_boot_mode(void)
+u32 spl_boot_mode(const u32 boot_device)
 {
        switch (spl_boot_device()) {
        case BOOT_DEVICE_MMC1:
index 0a5ac97df0d0a7f60ddda86952c75ab7a4e0520e..ddd8d12d51700f4f2fac80a8e1cc72ffb361203b 100644 (file)
@@ -18,15 +18,8 @@ obj-y        += lowlevel_init.o
 endif
 endif
 
-ifneq ($(CONFIG_ARMV7_NONSEC),)
-obj-y  += nonsec_virt.o
-obj-y  += virt-v7.o
-obj-y  += virt-dt.o
-endif
-
-ifneq ($(CONFIG_ARMV7_PSCI),)
-obj-y  += psci.o
-endif
+obj-$(CONFIG_ARMV7_NONSEC)     += nonsec_virt.o virt-v7.o virt-dt.o
+obj-$(CONFIG_ARMV7_PSCI)       += psci.o
 
 obj-$(CONFIG_IPROC) += iproc-common/
 obj-$(CONFIG_KONA) += kona-common/
index ce3d0191253d5453c693a87ec9c26f583cd1bf2b..80187e3ecaf7163a6d9c2d5c5f2fbc74fb295d3f 100644 (file)
@@ -292,7 +292,7 @@ static struct ccu_clock kps_ccu_clk = {
                .ops = &ccu_clk_ops,
                .ccu_clk_mgr_base = KONA_SLV_CLK_BASE_ADDR,
        },
-       .num_policy_masks = 2,
+       .num_policy_masks = 1,
        .policy_freq_offset = 0x00000008,
        .freq_bit_shift = 8,
        .policy_ctl_offset = 0x0000000c,
@@ -300,10 +300,6 @@ static struct ccu_clock kps_ccu_clk = {
        .policy1_mask_offset = 0x00000014,
        .policy2_mask_offset = 0x00000018,
        .policy3_mask_offset = 0x0000001c,
-       .policy0_mask2_offset = 0x00000048,
-       .policy1_mask2_offset = 0x0000004c,
-       .policy2_mask2_offset = 0x00000050,
-       .policy3_mask2_offset = 0x00000054,
        .lvm_en_offset = 0x00000034,
        .freq_id = 2,
        .freq_tbl = slave_axi_freq_tbl,
index 2b5da6bb6b21b048c3fef0ae61dc322ae5ff940a..a326dfea6c28acabab86807707ede1e8954ff8a5 100644 (file)
@@ -449,10 +449,9 @@ int clk_enable(struct clk *c)
        if (ret)
                return ret;
 
-       if (!c->use_cnt) {
-               c->use_cnt++;
+       if (!c->use_cnt)
                ret = c->ops->enable(c, 1);
-       }
+       c->use_cnt++;
 
        return ret;
 }
@@ -464,9 +463,10 @@ void clk_disable(struct clk *c)
        if (!c->ops || !c->ops->enable)
                return;
 
-       if (c->use_cnt) {
+       if (c->use_cnt > 0) {
                c->use_cnt--;
-               c->ops->enable(c, 0);
+               if (c->use_cnt == 0)
+                       c->ops->enable(c, 0);
        }
 
        /* disable parent */
index 02890584a5a1e71e5be75811c5fd932ca3270535..1246eed2ca006606d6bddce500f7458d86831dfa 100644 (file)
@@ -15,7 +15,7 @@ u32 spl_boot_device(void)
        return BOOT_DEVICE_NAND;
 }
 
-u32 spl_boot_mode(void)
+u32 spl_boot_mode(const u32 boot_device)
 {
        switch (spl_boot_device()) {
        case BOOT_DEVICE_MMC1:
index 8333b200015fb77e522852b4d08b00701560adbf..60c367a2020110b0a44d584f5482887d3a9bd307 100644 (file)
@@ -166,7 +166,7 @@ u32 spl_boot_device(void)
        return gd->arch.omap_boot_device;
 }
 
-u32 spl_boot_mode(void)
+u32 spl_boot_mode(const u32 boot_device)
 {
        return gd->arch.omap_boot_mode;
 }
index 032bd2c24fdddb95705096ddc94c692f6b2fa735..49e3a971d96674954c9fc6ea74014abd28044824 100644 (file)
@@ -77,7 +77,7 @@ ulong get_timer_masked(void)
                /* move stamp fordward with absoulte diff ticks */
                gd->arch.tbl += (now - gd->arch.lastinc);
        } else {        /* we have rollover of incrementer */
-               gd->arch.tbl += ((TIMER_LOAD_VAL / (TIMER_CLOCK /
+               gd->arch.tbl += ((TIMER_OVERFLOW_VAL / (TIMER_CLOCK /
                                CONFIG_SYS_HZ)) - gd->arch.lastinc) + now;
        }
        gd->arch.lastinc = now;
index 5883c002be13470aadf1289b59b9b1057d6ace35..19e34fade28f15eef3c6cba81a4e1b52a0e530dc 100644 (file)
@@ -24,7 +24,7 @@ u32 spl_boot_device(void)
        return 0;
 }
 
-u32 spl_boot_mode(void)
+u32 spl_boot_mode(const u32 boot_device)
 {
        switch (spl_boot_device()) {
        case BOOT_DEVICE_MMC1:
index c1a2f456d532597b3083e3ece2bdf38bfb66eaec..670e323b61b37bc56bce5972fb80f13541263f94 100644 (file)
@@ -258,12 +258,10 @@ ENDPROC(lowlevel_init)
 
 WEAK(smp_kick_all_cpus)
        /* Kick secondary cpus up by SGI 0 interrupt */
-       mov     x29, lr                 /* Save LR */
 #if defined(CONFIG_GICV2) || defined(CONFIG_GICV3)
        ldr     x0, =GICD_BASE
-       bl      gic_kick_secondary_cpus
+       b       gic_kick_secondary_cpus
 #endif
-       mov     lr, x29                 /* Restore LR */
        ret
 ENDPROC(smp_kick_all_cpus)
 
index e3e2a4fb5ad3dcd3ec6f60f4a5d54938e8855c8b..867d2b25a88d67d86873f346a899f77f4fe2a0bb 100644 (file)
@@ -68,7 +68,7 @@ u32 spl_boot_device(void)
        return 0;
 }
 
-u32 spl_boot_mode(void)
+u32 spl_boot_mode(const u32 boot_device)
 {
        switch (spl_boot_device()) {
        case BOOT_DEVICE_RAM:
index de75e24d1bf7168fad6e0397ecdd9f503b9e9d12..5d463cea4a07e18fcb995f8816b193f377549b72 100644 (file)
@@ -2,7 +2,11 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-dtb-$(CONFIG_AT91FAMILY) += at91sam9g45-gurnard.dtb
+dtb-$(CONFIG_AT91FAMILY) += at91sam9260-smartweb.dtb \
+       at91sam9g20-taurus.dtb \
+       at91sam9g45-corvus.dtb \
+       at91sam9g45-gurnard.dtb
+
 dtb-$(CONFIG_S5PC100) += s5pc1xx-smdkc100.dtb
 dtb-$(CONFIG_S5PC110) += s5pc1xx-goni.dtb
 dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \
diff --git a/arch/arm/dts/at91sam9260-smartweb.dts b/arch/arm/dts/at91sam9260-smartweb.dts
new file mode 100644 (file)
index 0000000..faed763
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * at91sam9260-smartweb.dts
+ * (C) Copyright 2016
+ * Heiko Schocher, DENX Software Engineering, hs@denx.de.
+ *
+ * Based on:
+ * at91sam9g20ek.dts - Device Tree file for Atmel at91sam9g20ek board
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+/dts-v1/;
+#include "at91sam9260.dtsi"
+
+/ {
+       model = "Siemens smartweb";
+       compatible = "atmel,at91sam9260", "atmel,at91sam9";
+
+       chosen {
+               stdout-path = &dbgu;
+       };
+
+       memory {
+               reg = <0x20000000 0x4000000>;
+       };
+
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <18432000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               board {
+                                       pinctrl_pck0_as_mck: pck0_as_mck {
+                                               atmel,pins =
+                                                       <AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PC1 periph B */
+                                       };
+
+                               };
+                       };
+
+                       dbgu: serial@fffff200 {
+                               status = "okay";
+                       };
+
+                       usart0: serial@fffb0000 {
+                               pinctrl-0 =
+                                       <&pinctrl_usart0
+                                        &pinctrl_usart0_rts
+                                        &pinctrl_usart0_cts
+                                        &pinctrl_usart0_dtr_dsr
+                                        &pinctrl_usart0_dcd
+                                        &pinctrl_usart0_ri>;
+                               status = "okay";
+                       };
+
+                       usart1: serial@fffb4000 {
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@fffc4000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+
+                       usb1: gadget@fffa4000 {
+                               atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
+                               status = "okay";
+                       };
+
+                       ssc0: ssc@fffbc000 {
+                               status = "okay";
+                               pinctrl-0 = <&pinctrl_ssc0_tx>;
+                       };
+
+                       rtc@fffffd20 {
+                               atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
+                               status = "okay";
+                       };
+
+                       watchdog@fffffd40 {
+                               status = "okay";
+                       };
+
+                       gpbr: syscon@fffffd50 {
+                               status = "okay";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       nand-on-flash-bbt;
+                       status = "okay";
+               };
+
+               usb0: ohci@00500000 {
+                       num-ports = <2>;
+                       status = "okay";
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9260.dtsi b/arch/arm/dts/at91sam9260.dtsi
new file mode 100644 (file)
index 0000000..d4884dd
--- /dev/null
@@ -0,0 +1,1034 @@
+/*
+ * at91sam9260.dtsi - Device Tree Include file for AT91SAM9260 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"
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/clock/at91.h>
+
+/ {
+       model = "Atmel AT91SAM9260 family SoC";
+       compatible = "atmel,at91sam9260";
+       interrupt-parent = <&aic>;
+
+       aliases {
+               serial0 = &dbgu;
+               serial1 = &usart0;
+               serial2 = &usart1;
+               serial3 = &usart2;
+               serial4 = &usart3;
+               serial5 = &uart0;
+               serial6 = &uart1;
+               gpio0 = &pioA;
+               gpio1 = &pioB;
+               gpio2 = &pioC;
+               tcb0 = &tcb0;
+               tcb1 = &tcb1;
+               i2c0 = &i2c0;
+               ssc0 = &ssc0;
+       };
+       cpus {
+               #address-cells = <0>;
+               #size-cells = <0>;
+
+               cpu {
+                       compatible = "arm,arm926ej-s";
+                       device_type = "cpu";
+               };
+       };
+
+       memory {
+               reg = <0x20000000 0x04000000>;
+       };
+
+       clocks {
+               slow_xtal: slow_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+
+               main_xtal: main_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+
+               adc_op_clk: adc_op_clk{
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <5000000>;
+               };
+       };
+
+       sram0: sram@002ff000 {
+               compatible = "mmio-sram";
+               reg = <0x002ff000 0x2000>;
+       };
+
+       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 = <3>;
+                               compatible = "atmel,at91rm9200-aic";
+                               interrupt-controller;
+                               reg = <0xfffff000 0x200>;
+                               atmel,external-irqs = <29 30 31>;
+                       };
+
+                       ramc0: ramc@ffffea00 {
+                               compatible = "atmel,at91sam9260-sdramc";
+                               reg = <0xffffea00 0x200>;
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               compatible = "atmel,at91sam9260-pmc", "syscon";
+                               reg = <0xfffffc00 0x100>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               interrupt-controller;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               #interrupt-cells = <1>;
+
+                               main_osc: main_osc {
+                                       compatible = "atmel,at91rm9200-clk-main-osc";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MOSCS>;
+                                       clocks = <&main_xtal>;
+                               };
+
+                               main: mainck {
+                                       compatible = "atmel,at91rm9200-clk-main";
+                                       #clock-cells = <0>;
+                                       clocks = <&main_osc>;
+                               };
+
+                               slow_rc_osc: slow_rc_osc {
+                                       compatible = "fixed-clock";
+                                       #clock-cells = <0>;
+                                       clock-frequency = <32768>;
+                                       clock-accuracy = <50000000>;
+                               };
+
+                               clk32k: slck {
+                                       compatible = "atmel,at91sam9260-clk-slow";
+                                       #clock-cells = <0>;
+                                       clocks = <&slow_rc_osc>, <&slow_xtal>;
+                               };
+
+                               plla: pllack {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKA>;
+                                       clocks = <&main>;
+                                       reg = <0>;
+                                       atmel,clk-input-range = <1000000 32000000>;
+                                       #atmel,pll-clk-output-range-cells = <4>;
+                                       atmel,pll-clk-output-ranges = <80000000 160000000 0 1>,
+                                                               <150000000 240000000 2 1>;
+                               };
+
+                               pllb: pllbck {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKB>;
+                                       clocks = <&main>;
+                                       reg = <1>;
+                                       atmel,clk-input-range = <1000000 5000000>;
+                                       #atmel,pll-clk-output-range-cells = <4>;
+                                       atmel,pll-clk-output-ranges = <70000000 130000000 1 1>;
+                               };
+
+                               mck: masterck {
+                                       compatible = "atmel,at91rm9200-clk-master";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
+                                       clocks = <&clk32k>, <&main>, <&plla>, <&pllb>;
+                                       atmel,clk-output-range = <0 105000000>;
+                                       atmel,clk-divisors = <1 2 4 0>;
+                               };
+
+                               usb: usbck {
+                                       compatible = "atmel,at91rm9200-clk-usb";
+                                       #clock-cells = <0>;
+                                       atmel,clk-divisors = <1 2 4 0>;
+                                       clocks = <&pllb>;
+                               };
+
+                               prog: progck {
+                                       compatible = "atmel,at91rm9200-clk-programmable";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       clocks = <&clk32k>, <&main>, <&plla>, <&pllb>;
+
+                                       prog0: prog0 {
+                                               #clock-cells = <0>;
+                                               reg = <0>;
+                                               interrupts = <AT91_PMC_PCKRDY(0)>;
+                                       };
+
+                                       prog1: prog1 {
+                                               #clock-cells = <0>;
+                                               reg = <1>;
+                                               interrupts = <AT91_PMC_PCKRDY(1)>;
+                                       };
+                               };
+
+                               systemck {
+                                       compatible = "atmel,at91rm9200-clk-system";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       uhpck: uhpck {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       udpck: udpck {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       pck0: pck0 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                               clocks = <&prog0>;
+                                       };
+
+                                       pck1: pck1 {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                               clocks = <&prog1>;
+                                       };
+                               };
+
+                               periphck {
+                                       compatible = "atmel,at91rm9200-clk-peripheral";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       clocks = <&mck>;
+
+                                       pioA_clk: pioA_clk {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                       };
+
+                                       pioB_clk: pioB_clk {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                       };
+
+                                       pioC_clk: pioC_clk {
+                                               #clock-cells = <0>;
+                                               reg = <4>;
+                                       };
+
+                                       adc_clk: adc_clk {
+                                               #clock-cells = <0>;
+                                               reg = <5>;
+                                       };
+
+                                       usart0_clk: usart0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                       };
+
+                                       usart1_clk: usart1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                       };
+
+                                       usart2_clk: usart2_clk {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                       };
+
+                                       mci0_clk: mci0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                       };
+
+                                       udc_clk: udc_clk {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                       };
+
+                                       twi0_clk: twi0_clk {
+                                               reg = <11>;
+                                               #clock-cells = <0>;
+                                       };
+
+                                       spi0_clk: spi0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <12>;
+                                       };
+
+                                       spi1_clk: spi1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <13>;
+                                       };
+
+                                       ssc0_clk: ssc0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <14>;
+                                       };
+
+                                       tc0_clk: tc0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <17>;
+                                       };
+
+                                       tc1_clk: tc1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <18>;
+                                       };
+
+                                       tc2_clk: tc2_clk {
+                                               #clock-cells = <0>;
+                                               reg = <19>;
+                                       };
+
+                                       ohci_clk: ohci_clk {
+                                               #clock-cells = <0>;
+                                               reg = <20>;
+                                       };
+
+                                       macb0_clk: macb0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <21>;
+                                       };
+
+                                       isi_clk: isi_clk {
+                                               #clock-cells = <0>;
+                                               reg = <22>;
+                                       };
+
+                                       usart3_clk: usart3_clk {
+                                               #clock-cells = <0>;
+                                               reg = <23>;
+                                       };
+
+                                       uart0_clk: uart0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <24>;
+                                       };
+
+                                       uart1_clk: uart1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <25>;
+                                       };
+
+                                       tc3_clk: tc3_clk {
+                                               #clock-cells = <0>;
+                                               reg = <26>;
+                                       };
+
+                                       tc4_clk: tc4_clk {
+                                               #clock-cells = <0>;
+                                               reg = <27>;
+                                       };
+
+                                       tc5_clk: tc5_clk {
+                                               #clock-cells = <0>;
+                                               reg = <28>;
+                                       };
+                               };
+                       };
+
+                       rstc@fffffd00 {
+                               compatible = "atmel,at91sam9260-rstc";
+                               reg = <0xfffffd00 0x10>;
+                               clocks = <&clk32k>;
+                       };
+
+                       shdwc@fffffd10 {
+                               compatible = "atmel,at91sam9260-shdwc";
+                               reg = <0xfffffd10 0x10>;
+                               clocks = <&clk32k>;
+                       };
+
+                       pit: timer@fffffd30 {
+                               compatible = "atmel,at91sam9260-pit";
+                               reg = <0xfffffd30 0xf>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&mck>;
+                       };
+
+                       tcb0: timer@fffa0000 {
+                               compatible = "atmel,at91rm9200-tcb";
+                               reg = <0xfffa0000 0x100>;
+                               interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0
+                                             18 IRQ_TYPE_LEVEL_HIGH 0
+                                             19 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tc0_clk>, <&tc1_clk>, <&tc2_clk>, <&clk32k>;
+                               clock-names = "t0_clk", "t1_clk", "t2_clk", "slow_clk";
+                       };
+
+                       tcb1: timer@fffdc000 {
+                               compatible = "atmel,at91rm9200-tcb";
+                               reg = <0xfffdc000 0x100>;
+                               interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0
+                                             27 IRQ_TYPE_LEVEL_HIGH 0
+                                             28 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tc3_clk>, <&tc4_clk>, <&tc5_clk>, <&clk32k>;
+                               clock-names = "t0_clk", "t1_clk", "t2_clk", "slow_clk";
+                       };
+
+                       pinctrl@fffff400 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
+                               ranges = <0xfffff400 0xfffff400 0x600>;
+
+                               atmel,mux-mask = <
+                                     /*    A         B     */
+                                      0xffffffff 0xffc00c3b  /* pioA */
+                                      0xffffffff 0x7fff3ccf  /* pioB */
+                                      0xffffffff 0x007fffff  /* pioC */
+                                     >;
+
+                               /* shared pinctrl settings */
+                               dbgu {
+                                       pinctrl_dbgu: dbgu-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB14 periph A */
+                                                        AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PB15 periph with pullup */
+                                       };
+                               };
+
+                               usart0 {
+                                       pinctrl_usart0: usart0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB4 periph A */
+                                                        AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PB5 periph A */
+                                       };
+
+                                       pinctrl_usart0_rts: usart0_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 26 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB26 periph A */
+                                       };
+
+                                       pinctrl_usart0_cts: usart0_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 27 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB27 periph A */
+                                       };
+
+                                       pinctrl_usart0_dtr_dsr: usart0_dtr_dsr-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB24 periph A */
+                                                        AT91_PIOB 22 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB22 periph A */
+                                       };
+
+                                       pinctrl_usart0_dcd: usart0_dcd-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB23 periph A */
+                                       };
+
+                                       pinctrl_usart0_ri: usart0_ri-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB25 periph A */
+                                       };
+                               };
+
+                               usart1 {
+                                       pinctrl_usart1: usart1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB6 periph A with pullup */
+                                                        AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PB7 periph A */
+                                       };
+
+                                       pinctrl_usart1_rts: usart1_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 28 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB28 periph A */
+                                       };
+
+                                       pinctrl_usart1_cts: usart1_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 29 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB29 periph A */
+                                       };
+                               };
+
+                               usart2 {
+                                       pinctrl_usart2: usart2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB8 periph A with pullup */
+                                                        AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PB9 periph A */
+                                       };
+
+                                       pinctrl_usart2_rts: usart2_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA4 periph A */
+                                       };
+
+                                       pinctrl_usart2_cts: usart2_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA5 periph A */
+                                       };
+                               };
+
+                               usart3 {
+                                       pinctrl_usart3: usart3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PB10 periph A with pullup */
+                                                        AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB11 periph A */
+                                       };
+
+                                       pinctrl_usart3_rts: usart3_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 8 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart3_cts: usart3_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 10 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               uart0 {
+                                       pinctrl_uart0: uart0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 31 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* PA31 periph B with pullup */
+                                                        AT91_PIOA 30 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA30 periph B */
+                                       };
+                               };
+
+                               uart1 {
+                                       pinctrl_uart1: uart1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PB12 periph A with pullup */
+                                                        AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB13 periph A */
+                                       };
+                               };
+
+                               nand {
+                                       pinctrl_nand: nand-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 13 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP     /* PC13 gpio RDY pin pull_up */
+                                                        AT91_PIOC 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;   /* PC14 gpio enable pin pull_up */
+                                       };
+                               };
+
+                               macb {
+                                       pinctrl_macb_rmii: macb_rmii-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA12 periph A */
+                                                        AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA13 periph A */
+                                                        AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA14 periph A */
+                                                        AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA15 periph A */
+                                                        AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA16 periph A */
+                                                        AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA17 periph A */
+                                                        AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA18 periph A */
+                                                        AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA19 periph A */
+                                                        AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA20 periph A */
+                                                        AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA21 periph A */
+                                       };
+
+                                       pinctrl_macb_rmii_mii: macb_rmii_mii-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA22 periph B */
+                                                        AT91_PIOA 23 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA23 periph B */
+                                                        AT91_PIOA 24 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA24 periph B */
+                                                        AT91_PIOA 25 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA25 periph B */
+                                                        AT91_PIOA 26 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA26 periph B */
+                                                        AT91_PIOA 27 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA27 periph B */
+                                                        AT91_PIOA 28 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA28 periph B */
+                                                        AT91_PIOA 29 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA29 periph B */
+                                       };
+
+                                       pinctrl_macb_rmii_mii_alt: macb_rmii_mii-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 10 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA10 periph B */
+                                                        AT91_PIOA 11 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA11 periph B */
+                                                        AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA22 periph B */
+                                                        AT91_PIOA 25 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA25 periph B */
+                                                        AT91_PIOA 26 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA26 periph B */
+                                                        AT91_PIOA 27 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA27 periph B */
+                                                        AT91_PIOA 28 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA28 periph B */
+                                                        AT91_PIOA 29 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA29 periph B */
+                                       };
+                               };
+
+                               mmc0 {
+                                       pinctrl_mmc0_clk: mmc0_clk-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA8 periph A */
+                                       };
+
+                                       pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA7 periph A with pullup */
+                                                        AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;       /* PA6 periph A with pullup */
+                                       };
+
+                                       pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA9 periph A with pullup */
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PA10 periph A with pullup */
+                                                        AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PA11 periph A with pullup */
+                                       };
+
+                                       pinctrl_mmc0_slot1_cmd_dat0: mmc0_slot1_cmd_dat0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 1 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA1 periph B with pullup */
+                                                        AT91_PIOA 0 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;       /* PA0 periph B with pullup */
+                                       };
+
+                                       pinctrl_mmc0_slot1_dat1_3: mmc0_slot1_dat1_3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 5 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA5 periph B with pullup */
+                                                        AT91_PIOA 4 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA4 periph B with pullup */
+                                                        AT91_PIOA 3 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;       /* PA3 periph B with pullup */
+                                       };
+                               };
+
+                               ssc0 {
+                                       pinctrl_ssc0_tx: ssc0_tx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB16 periph A */
+                                                        AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB17 periph A */
+                                                        AT91_PIOB 18 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB18 periph A */
+                                       };
+
+                                       pinctrl_ssc0_rx: ssc0_rx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 19 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB19 periph A */
+                                                        AT91_PIOB 20 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB20 periph A */
+                                                        AT91_PIOB 21 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB21 periph A */
+                                       };
+                               };
+
+                               spi0 {
+                                       pinctrl_spi0: spi0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA0 periph A SPI0_MISO pin */
+                                                        AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA1 periph A SPI0_MOSI pin */
+                                                        AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA2 periph A SPI0_SPCK pin */
+                                       };
+                               };
+
+                               spi1 {
+                                       pinctrl_spi1: spi1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB0 periph A SPI1_MISO pin */
+                                                        AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB1 periph A SPI1_MOSI pin */
+                                                        AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PB2 periph A SPI1_SPCK pin */
+                                       };
+                               };
+
+                               i2c_gpio0 {
+                                       pinctrl_i2c_gpio0: i2c_gpio0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 23 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE
+                                                        AT91_PIOA 24 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
+                                       };
+                               };
+
+                               tcb0 {
+                                       pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
+                                               atmel,pins = <AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
+                                               atmel,pins = <AT91_PIOB 6 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
+                                               atmel,pins = <AT91_PIOB 7 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
+                                               atmel,pins = <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
+                                               atmel,pins = <AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
+                                               atmel,pins = <AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
+                                               atmel,pins = <AT91_PIOC 9 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
+                                               atmel,pins = <AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
+                                               atmel,pins = <AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               tcb1 {
+                                       pinctrl_tcb1_tclk0: tcb1_tclk0-0 {
+                                               atmel,pins = <AT91_PIOB 16 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tclk1: tcb1_tclk1-0 {
+                                               atmel,pins = <AT91_PIOB 17 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tclk2: tcb1_tclk2-0 {
+                                               atmel,pins = <AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tioa0: tcb1_tioa0-0 {
+                                               atmel,pins = <AT91_PIOB 0 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tioa1: tcb1_tioa1-0 {
+                                               atmel,pins = <AT91_PIOB 2 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tioa2: tcb1_tioa2-0 {
+                                               atmel,pins = <AT91_PIOB 3 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tiob0: tcb1_tiob0-0 {
+                                               atmel,pins = <AT91_PIOB 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tiob1: tcb1_tiob1-0 {
+                                               atmel,pins = <AT91_PIOB 18 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tiob2: tcb1_tiob2-0 {
+                                               atmel,pins = <AT91_PIOB 19 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               pioA: gpio@fffff400 {
+                                       compatible = "atmel,at91rm9200-gpio";
+                                       reg = <0xfffff400 0x200>;
+                                       interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
+                                       #gpio-cells = <2>;
+                                       gpio-controller;
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       clocks = <&pioA_clk>;
+                               };
+
+                               pioB: gpio@fffff600 {
+                                       compatible = "atmel,at91rm9200-gpio";
+                                       reg = <0xfffff600 0x200>;
+                                       interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
+                                       #gpio-cells = <2>;
+                                       gpio-controller;
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       clocks = <&pioB_clk>;
+                               };
+
+                               pioC: gpio@fffff800 {
+                                       compatible = "atmel,at91rm9200-gpio";
+                                       reg = <0xfffff800 0x200>;
+                                       interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
+                                       #gpio-cells = <2>;
+                                       gpio-controller;
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       clocks = <&pioC_clk>;
+                               };
+                       };
+
+                       dbgu: serial@fffff200 {
+                               compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
+                               reg = <0xfffff200 0x200>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_dbgu>;
+                               clocks = <&mck>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart0: serial@fffb0000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffb0000 0x200>;
+                               interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart0>;
+                               clocks = <&usart0_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart1: serial@fffb4000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffb4000 0x200>;
+                               interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart1>;
+                               clocks = <&usart1_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart2: serial@fffb8000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffb8000 0x200>;
+                               interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart2>;
+                               clocks = <&usart2_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart3: serial@fffd0000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffd0000 0x200>;
+                               interrupts = <23 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart3>;
+                               clocks = <&usart3_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       uart0: serial@fffd4000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffd4000 0x200>;
+                               interrupts = <24 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_uart0>;
+                               clocks = <&uart0_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       uart1: serial@fffd8000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffd8000 0x200>;
+                               interrupts = <25 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_uart1>;
+                               clocks = <&uart1_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       macb0: ethernet@fffc4000 {
+                               compatible = "cdns,at91sam9260-macb", "cdns,macb";
+                               reg = <0xfffc4000 0x100>;
+                               interrupts = <21 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_macb_rmii>;
+                               clocks = <&macb0_clk>, <&macb0_clk>;
+                               clock-names = "hclk", "pclk";
+                               status = "disabled";
+                       };
+
+                       usb1: gadget@fffa4000 {
+                               compatible = "atmel,at91sam9260-udc";
+                               reg = <0xfffa4000 0x4000>;
+                               interrupts = <10 IRQ_TYPE_LEVEL_HIGH 2>;
+                               clocks = <&udc_clk>, <&udpck>;
+                               clock-names = "pclk", "hclk";
+                               status = "disabled";
+                       };
+
+                       i2c0: i2c@fffac000 {
+                               compatible = "atmel,at91sam9260-i2c";
+                               reg = <0xfffac000 0x100>;
+                               interrupts = <11 IRQ_TYPE_LEVEL_HIGH 6>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&twi0_clk>;
+                               status = "disabled";
+                       };
+
+                       mmc0: mmc@fffa8000 {
+                               compatible = "atmel,hsmci";
+                               reg = <0xfffa8000 0x600>;
+                               interrupts = <9 IRQ_TYPE_LEVEL_HIGH 0>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               pinctrl-names = "default";
+                               clocks = <&mci0_clk>;
+                               clock-names = "mci_clk";
+                               status = "disabled";
+                       };
+
+                       ssc0: ssc@fffbc000 {
+                               compatible = "atmel,at91rm9200-ssc";
+                               reg = <0xfffbc000 0x4000>;
+                               interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
+                               clocks = <&ssc0_clk>;
+                               clock-names = "pclk";
+                               status = "disabled";
+                       };
+
+                       spi0: spi@fffc8000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xfffc8000 0x200>;
+                               interrupts = <12 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi0>;
+                               clocks = <&spi0_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       spi1: spi@fffcc000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xfffcc000 0x200>;
+                               interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi1>;
+                               clocks = <&spi1_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       adc0: adc@fffe0000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91sam9260-adc";
+                               reg = <0xfffe0000 0x100>;
+                               interrupts = <5 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&adc_clk>, <&adc_op_clk>;
+                               clock-names = "adc_clk", "adc_op_clk";
+                               atmel,adc-use-external-triggers;
+                               atmel,adc-channels-used = <0xf>;
+                               atmel,adc-vref = <3300>;
+                               atmel,adc-startup-time = <15>;
+                               atmel,adc-res = <8 10>;
+                               atmel,adc-res-names = "lowres", "highres";
+                               atmel,adc-use-res = "highres";
+
+                               trigger@0 {
+                                       reg = <0>;
+                                       trigger-name = "timer-counter-0";
+                                       trigger-value = <0x1>;
+                               };
+                               trigger@1 {
+                                       reg = <1>;
+                                       trigger-name = "timer-counter-1";
+                                       trigger-value = <0x3>;
+                               };
+
+                               trigger@2 {
+                                       reg = <2>;
+                                       trigger-name = "timer-counter-2";
+                                       trigger-value = <0x5>;
+                               };
+
+                               trigger@3 {
+                                       reg = <3>;
+                                       trigger-name = "external";
+                                       trigger-value = <0xd>;
+                                       trigger-external;
+                               };
+                       };
+
+                       rtc@fffffd20 {
+                               compatible = "atmel,at91sam9260-rtt";
+                               reg = <0xfffffd20 0x10>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&clk32k>;
+                               status = "disabled";
+                       };
+
+                       watchdog@fffffd40 {
+                               compatible = "atmel,at91sam9260-wdt";
+                               reg = <0xfffffd40 0x10>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&clk32k>;
+                               atmel,watchdog-type = "hardware";
+                               atmel,reset-type = "all";
+                               atmel,dbg-halt;
+                               status = "disabled";
+                       };
+
+                       gpbr: syscon@fffffd50 {
+                               compatible = "atmel,at91sam9260-gpbr", "syscon";
+                               reg = <0xfffffd50 0x10>;
+                               status = "disabled";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       compatible = "atmel,at91rm9200-nand";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x40000000 0x10000000
+                              0xffffe800 0x200
+                             >;
+                       atmel,nand-addr-offset = <21>;
+                       atmel,nand-cmd-offset = <22>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_nand>;
+                       gpios = <&pioC 13 GPIO_ACTIVE_HIGH
+                                &pioC 14 GPIO_ACTIVE_HIGH
+                                0
+                               >;
+                       status = "disabled";
+               };
+
+               usb0: ohci@00500000 {
+                       compatible = "atmel,at91rm9200-ohci", "usb-ohci";
+                       reg = <0x00500000 0x100000>;
+                       interrupts = <20 IRQ_TYPE_LEVEL_HIGH 2>;
+                       clocks = <&ohci_clk>, <&ohci_clk>, <&uhpck>;
+                       clock-names = "ohci_clk", "hclk", "uhpck";
+                       status = "disabled";
+               };
+       };
+
+       i2c@0 {
+               compatible = "i2c-gpio";
+               gpios = <&pioA 23 GPIO_ACTIVE_HIGH /* sda */
+                        &pioA 24 GPIO_ACTIVE_HIGH /* scl */
+                       >;
+               i2c-gpio,sda-open-drain;
+               i2c-gpio,scl-open-drain;
+               i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+               #address-cells = <1>;
+               #size-cells = <0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c_gpio0>;
+               status = "disabled";
+       };
+};
diff --git a/arch/arm/dts/at91sam9261.dtsi b/arch/arm/dts/at91sam9261.dtsi
new file mode 100644 (file)
index 0000000..5e09de4
--- /dev/null
@@ -0,0 +1,876 @@
+/*
+ * at91sam9261.dtsi - Device Tree Include file for AT91SAM9261 SoC
+ *
+ *  Copyright (C) 2013 Jean-Jacques Hiblot <jjhiblot@traphandler.com>
+ *
+ * Licensed under GPLv2 only.
+ */
+
+#include "skeleton.dtsi"
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/clock/at91.h>
+
+/ {
+       model = "Atmel AT91SAM9261 family SoC";
+       compatible = "atmel,at91sam9261";
+       interrupt-parent = <&aic>;
+
+       aliases {
+               serial0 = &dbgu;
+               serial1 = &usart0;
+               serial2 = &usart1;
+               serial3 = &usart2;
+               gpio0 = &pioA;
+               gpio1 = &pioB;
+               gpio2 = &pioC;
+               tcb0 = &tcb0;
+               i2c0 = &i2c0;
+               ssc0 = &ssc0;
+               ssc1 = &ssc1;
+               ssc2 = &ssc2;
+       };
+
+       cpus {
+               #address-cells = <0>;
+               #size-cells = <0>;
+
+               cpu {
+                       compatible = "arm,arm926ej-s";
+                       device_type = "cpu";
+               };
+       };
+
+       memory {
+               reg = <0x20000000 0x08000000>;
+       };
+
+       clocks {
+               main_xtal: main_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+
+               slow_xtal: slow_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+       };
+
+       sram: sram@00300000 {
+               compatible = "mmio-sram";
+               reg = <0x00300000 0x28000>;
+       };
+
+       ahb {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               usb0: ohci@00500000 {
+                       compatible = "atmel,at91rm9200-ohci", "usb-ohci";
+                       reg = <0x00500000 0x100000>;
+                       interrupts = <20 IRQ_TYPE_LEVEL_HIGH 2>;
+                       clocks = <&ohci_clk>, <&hclk0>, <&uhpck>;
+                       clock-names = "ohci_clk", "hclk", "uhpck";
+                       status = "disabled";
+               };
+
+               fb0: fb@0x00600000 {
+                       compatible = "atmel,at91sam9261-lcdc";
+                       reg = <0x00600000 0x1000>;
+                       interrupts = <21 IRQ_TYPE_LEVEL_HIGH 3>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_fb>;
+                       clocks = <&lcd_clk>, <&hclk1>;
+                       clock-names = "lcdc_clk", "hclk";
+                       status = "disabled";
+               };
+
+               nand0: nand@40000000 {
+                       compatible = "atmel,at91rm9200-nand";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x40000000 0x10000000>;
+                       atmel,nand-addr-offset = <22>;
+                       atmel,nand-cmd-offset = <21>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_nand>;
+
+                       gpios = <&pioC 15 GPIO_ACTIVE_HIGH>,
+                               <&pioC 14 GPIO_ACTIVE_HIGH>,
+                               <0>;
+                       status = "disabled";
+               };
+
+               apb {
+                       compatible = "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       tcb0: timer@fffa0000 {
+                               compatible = "atmel,at91rm9200-tcb";
+                               reg = <0xfffa0000 0x100>;
+                               interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>,
+                                            <18 IRQ_TYPE_LEVEL_HIGH 0>,
+                                            <19 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tc0_clk>, <&tc1_clk>, <&tc2_clk>, <&slow_xtal>;
+                               clock-names = "t0_clk", "t1_clk", "t2_clk", "slow_clk";
+                       };
+
+                       usb1: gadget@fffa4000 {
+                               compatible = "atmel,at91sam9261-udc";
+                               reg = <0xfffa4000 0x4000>;
+                               interrupts = <10 IRQ_TYPE_LEVEL_HIGH 2>;
+                               clocks = <&udc_clk>, <&udpck>;
+                               clock-names = "pclk", "hclk";
+                               atmel,matrix = <&matrix>;
+                               status = "disabled";
+                       };
+
+                       mmc0: mmc@fffa8000 {
+                               compatible = "atmel,hsmci";
+                               reg = <0xfffa8000 0x600>;
+                               interrupts = <9 IRQ_TYPE_LEVEL_HIGH 0>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc0_clk>, <&pinctrl_mmc0_slot0_cmd_dat0>, <&pinctrl_mmc0_slot0_dat1_3>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&mci0_clk>;
+                               clock-names = "mci_clk";
+                               status = "disabled";
+                       };
+
+                       i2c0: i2c@fffac000 {
+                               compatible = "atmel,at91sam9261-i2c";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_i2c_twi>;
+                               reg = <0xfffac000 0x100>;
+                               interrupts = <11 IRQ_TYPE_LEVEL_HIGH 6>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&twi0_clk>;
+                               status = "disabled";
+                       };
+
+                       usart0: serial@fffb0000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffb0000 0x200>;
+                               interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart0>;
+                               clocks = <&usart0_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart1: serial@fffb4000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffb4000 0x200>;
+                               interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart1>;
+                               clocks = <&usart1_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart2: serial@fffb8000{
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffb8000 0x200>;
+                               interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart2>;
+                               clocks = <&usart2_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       ssc0: ssc@fffbc000 {
+                               compatible = "atmel,at91rm9200-ssc";
+                               reg = <0xfffbc000 0x4000>;
+                               interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
+                               clocks = <&ssc0_clk>;
+                               clock-names = "pclk";
+                               status = "disabled";
+                       };
+
+                       ssc1: ssc@fffc0000 {
+                               compatible = "atmel,at91rm9200-ssc";
+                               reg = <0xfffc0000 0x4000>;
+                               interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
+                               clocks = <&ssc1_clk>;
+                               clock-names = "pclk";
+                               status = "disabled";
+                       };
+
+                       ssc2: ssc@fffc4000 {
+                               compatible = "atmel,at91rm9200-ssc";
+                               reg = <0xfffc4000 0x4000>;
+                               interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_ssc2_tx &pinctrl_ssc2_rx>;
+                               clocks = <&ssc2_clk>;
+                               clock-names = "pclk";
+                               status = "disabled";
+                       };
+
+                       spi0: spi@fffc8000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xfffc8000 0x200>;
+                               cs-gpios = <0>, <0>, <0>, <0>;
+                               interrupts = <12 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi0>;
+                               clocks = <&spi0_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       spi1: spi@fffcc000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xfffcc000 0x200>;
+                               interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi1>;
+                               clocks = <&spi1_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       ramc: ramc@ffffea00 {
+                               compatible = "atmel,at91sam9260-sdramc";
+                               reg = <0xffffea00 0x200>;
+                       };
+
+                       matrix: matrix@ffffee00 {
+                               compatible = "atmel,at91sam9260-bus-matrix", "syscon";
+                               reg = <0xffffee00 0x200>;
+                       };
+
+                       aic: interrupt-controller@fffff000 {
+                               #interrupt-cells = <3>;
+                               compatible = "atmel,at91rm9200-aic";
+                               interrupt-controller;
+                               reg = <0xfffff000 0x200>;
+                               atmel,external-irqs = <29 30 31>;
+                       };
+
+                       dbgu: serial@fffff200 {
+                               compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
+                               reg = <0xfffff200 0x200>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_dbgu>;
+                               clocks = <&mck>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       pinctrl@fffff400 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
+                               ranges = <0xfffff400 0xfffff400 0x600>;
+
+                               atmel,mux-mask =
+                                     /*    A         B     */
+                                     <0xffffffff 0xfffffff7>,  /* pioA */
+                                     <0xffffffff 0xfffffff4>,  /* pioB */
+                                     <0xffffffff 0xffffff07>;  /* pioC */
+
+                               /* shared pinctrl settings */
+                               dbgu {
+                                       pinctrl_dbgu: dbgu-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 9  AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
+                                       };
+                               };
+
+                               usart0 {
+                                       pinctrl_usart0: usart0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart0_rts: usart0_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart0_cts: usart0_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               usart1 {
+                                       pinctrl_usart1: usart1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart1_rts: usart1_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 12 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart1_cts: usart1_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 13 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               usart2 {
+                                       pinctrl_usart2: usart2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart2_rts: usart2_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 15 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart2_cts: usart2_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 16 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               nand {
+                                       pinctrl_nand: nand-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 15 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOC 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
+                                       };
+                               };
+
+                               mmc0 {
+                                       pinctrl_mmc0_clk: mmc0_clk-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 2 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 1 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOA 0 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;
+                                       };
+
+                                       pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 4 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOA 5 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOA 6 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;
+                                       };
+                                       };
+
+                               ssc0 {
+                                       pinctrl_ssc0_tx: ssc0_tx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 21 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 22 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 23 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_ssc0_rx: ssc0_rx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 26 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               ssc1 {
+                                       pinctrl_ssc1_tx: ssc1_tx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 17 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 18 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_ssc1_rx: ssc1_rx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 20 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 21 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               ssc2 {
+                                       pinctrl_ssc2_tx: ssc2_tx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 26 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 27 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_ssc2_rx: ssc2_rx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 28 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 29 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 30 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               spi0 {
+                                       pinctrl_spi0: spi0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                                       };
+
+                               spi1 {
+                                       pinctrl_spi1: spi1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 30 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 31 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 29 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               tcb0 {
+                                       pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
+                                               atmel,pins = <AT91_PIOC 16 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
+                                               atmel,pins = <AT91_PIOC 17 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
+                                               atmel,pins = <AT91_PIOC 18 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
+                                               atmel,pins = <AT91_PIOC 19 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
+                                               atmel,pins = <AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
+                                               atmel,pins = <AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
+                                               atmel,pins = <AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
+                                               atmel,pins = <AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
+                                               atmel,pins = <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               i2c0 {
+                                       pinctrl_i2c_bitbang: i2c-0-bitbang {
+                                               atmel,pins =
+                                                       <AT91_PIOA 7 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 8 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+                                       };
+                                       pinctrl_i2c_twi: i2c-0-twi {
+                                               atmel,pins =
+                                                       <AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               fb {
+                                       pinctrl_fb: fb-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 18 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 19 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 20 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 23 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 24 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 25 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 26 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 27 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 28 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               pioA: gpio@fffff400 {
+                                       compatible = "atmel,at91rm9200-gpio";
+                                       reg = <0xfffff400 0x200>;
+                                       interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
+                                       #gpio-cells = <2>;
+                                       gpio-controller;
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       clocks = <&pioA_clk>;
+                               };
+
+                               pioB: gpio@fffff600 {
+                                       compatible = "atmel,at91rm9200-gpio";
+                                       reg = <0xfffff600 0x200>;
+                                       interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
+                                       #gpio-cells = <2>;
+                                       gpio-controller;
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       clocks = <&pioB_clk>;
+                               };
+
+                               pioC: gpio@fffff800 {
+                                       compatible = "atmel,at91rm9200-gpio";
+                                       reg = <0xfffff800 0x200>;
+                                       interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
+                                       #gpio-cells = <2>;
+                                       gpio-controller;
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       clocks = <&pioC_clk>;
+                               };
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               compatible = "atmel,at91rm9200-pmc", "syscon";
+                               reg = <0xfffffc00 0x100>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               interrupt-controller;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               #interrupt-cells = <1>;
+
+                               main_osc: main_osc {
+                                       compatible = "atmel,at91rm9200-clk-main-osc";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MOSCS>;
+                                       clocks = <&main_xtal>;
+                               };
+
+                               main: mainck {
+                                       compatible = "atmel,at91rm9200-clk-main";
+                                       #clock-cells = <0>;
+                                       clocks = <&main_osc>;
+                               };
+
+                               plla: pllack {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKA>;
+                                       clocks = <&main>;
+                                       reg = <0>;
+                                       atmel,clk-input-range = <1000000 32000000>;
+                                       #atmel,pll-clk-output-range-cells = <4>;
+                                       atmel,pll-clk-output-ranges = <80000000 200000000 0 1>,
+                                                               <190000000 240000000 2 1>;
+                               };
+
+                               pllb: pllbck {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKB>;
+                                       clocks = <&main>;
+                                       reg = <1>;
+                                       atmel,clk-input-range = <1000000 5000000>;
+                                       #atmel,pll-clk-output-range-cells = <4>;
+                                       atmel,pll-clk-output-ranges = <70000000 130000000 1 1>;
+                               };
+
+                               mck: masterck {
+                                       compatible = "atmel,at91rm9200-clk-master";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
+                                       clocks = <&slow_xtal>, <&main>, <&plla>, <&pllb>;
+                                       atmel,clk-output-range = <0 94000000>;
+                                       atmel,clk-divisors = <1 2 4 0>;
+                               };
+
+                               usb: usbck {
+                                       compatible = "atmel,at91rm9200-clk-usb";
+                                       #clock-cells = <0>;
+                                       atmel,clk-divisors = <1 2 4 0>;
+                                       clocks = <&pllb>;
+                               };
+
+                               prog: progck {
+                                       compatible = "atmel,at91rm9200-clk-programmable";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       clocks = <&slow_xtal>, <&main>, <&plla>, <&pllb>;
+
+                                       prog0: prog0 {
+                                               #clock-cells = <0>;
+                                               reg = <0>;
+                                               interrupts = <AT91_PMC_PCKRDY(0)>;
+                                       };
+
+                                       prog1: prog1 {
+                                               #clock-cells = <0>;
+                                               reg = <1>;
+                                               interrupts = <AT91_PMC_PCKRDY(1)>;
+                                       };
+
+                                       prog2: prog2 {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                               interrupts = <AT91_PMC_PCKRDY(2)>;
+                                       };
+
+                                       prog3: prog3 {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                               interrupts = <AT91_PMC_PCKRDY(3)>;
+                                       };
+                               };
+
+                               systemck {
+                                       compatible = "atmel,at91rm9200-clk-system";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       uhpck: uhpck {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       udpck: udpck {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       pck0: pck0 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                               clocks = <&prog0>;
+                                       };
+
+                                       pck1: pck1 {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                               clocks = <&prog1>;
+                                       };
+
+                                       pck2: pck2 {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                               clocks = <&prog2>;
+                                       };
+
+                                       pck3: pck3 {
+                                               #clock-cells = <0>;
+                                               reg = <11>;
+                                               clocks = <&prog3>;
+                                       };
+
+                                       hclk0: hclk0 {
+                                               #clock-cells = <0>;
+                                               reg = <16>;
+                                               clocks = <&mck>;
+                                       };
+
+                                       hclk1: hclk1 {
+                                               #clock-cells = <0>;
+                                               reg = <17>;
+                                               clocks = <&mck>;
+                                       };
+                               };
+
+                               periphck {
+                                       compatible = "atmel,at91rm9200-clk-peripheral";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       clocks = <&mck>;
+
+                                       pioA_clk: pioA_clk {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                       };
+
+                                       pioB_clk: pioB_clk {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                       };
+
+                                       pioC_clk: pioC_clk {
+                                               #clock-cells = <0>;
+                                               reg = <4>;
+                                       };
+
+                                       usart0_clk: usart0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                       };
+
+                                       usart1_clk: usart1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                       };
+
+                                       usart2_clk: usart2_clk {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                       };
+
+                                       mci0_clk: mci0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                       };
+
+                                       udc_clk: udc_clk {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                       };
+
+                                       twi0_clk: twi0_clk {
+                                               reg = <11>;
+                                               #clock-cells = <0>;
+                                       };
+
+                                       spi0_clk: spi0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <12>;
+                                       };
+
+                                       spi1_clk: spi1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <13>;
+                                       };
+
+                                       ssc0_clk: ssc0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <14>;
+                                       };
+
+                                       ssc1_clk: ssc1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <15>;
+                                       };
+
+                                       ssc2_clk: ssc2_clk {
+                                               #clock-cells = <0>;
+                                               reg = <16>;
+                                       };
+
+                                       tc0_clk: tc0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <17>;
+                                       };
+
+                                       tc1_clk: tc1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <18>;
+                                       };
+
+                                       tc2_clk: tc2_clk {
+                                               #clock-cells = <0>;
+                                               reg = <19>;
+                                       };
+
+                                       ohci_clk: ohci_clk {
+                                               #clock-cells = <0>;
+                                               reg = <20>;
+                                       };
+
+                                       lcd_clk: lcd_clk {
+                                               #clock-cells = <0>;
+                                               reg = <21>;
+                                       };
+                               };
+                       };
+
+                       rstc@fffffd00 {
+                               compatible = "atmel,at91sam9260-rstc";
+                               reg = <0xfffffd00 0x10>;
+                               clocks = <&slow_xtal>;
+                       };
+
+                       shdwc@fffffd10 {
+                               compatible = "atmel,at91sam9260-shdwc";
+                               reg = <0xfffffd10 0x10>;
+                               clocks = <&slow_xtal>;
+                       };
+
+                       pit: timer@fffffd30 {
+                               compatible = "atmel,at91sam9260-pit";
+                               reg = <0xfffffd30 0xf>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&mck>;
+                       };
+
+                       rtc@fffffd20 {
+                               compatible = "atmel,at91sam9260-rtt";
+                               reg = <0xfffffd20 0x10>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&slow_xtal>;
+                               status = "disabled";
+                       };
+
+                       watchdog@fffffd40 {
+                               compatible = "atmel,at91sam9260-wdt";
+                               reg = <0xfffffd40 0x10>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&slow_xtal>;
+                               status = "disabled";
+                       };
+
+                       gpbr: syscon@fffffd50 {
+                               compatible = "atmel,at91sam9260-gpbr", "syscon";
+                               reg = <0xfffffd50 0x10>;
+                               status = "disabled";
+                       };
+               };
+       };
+
+       i2c@0 {
+               compatible = "i2c-gpio";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c_bitbang>;
+               gpios = <&pioA 7 GPIO_ACTIVE_HIGH>, /* sda */
+                       <&pioA 8 GPIO_ACTIVE_HIGH>; /* scl */
+               i2c-gpio,sda-open-drain;
+               i2c-gpio,scl-open-drain;
+               i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+};
diff --git a/arch/arm/dts/at91sam9263.dtsi b/arch/arm/dts/at91sam9263.dtsi
new file mode 100644 (file)
index 0000000..9344642
--- /dev/null
@@ -0,0 +1,1034 @@
+/*
+ * at91sam9263.dtsi - Device Tree Include file for AT91SAM9263 family SoC
+ *
+ *  Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2 only.
+ */
+
+#include "skeleton.dtsi"
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/clock/at91.h>
+
+/ {
+       model = "Atmel AT91SAM9263 family SoC";
+       compatible = "atmel,at91sam9263";
+       interrupt-parent = <&aic>;
+
+       aliases {
+               serial0 = &dbgu;
+               serial1 = &usart0;
+               serial2 = &usart1;
+               serial3 = &usart2;
+               gpio0 = &pioA;
+               gpio1 = &pioB;
+               gpio2 = &pioC;
+               gpio3 = &pioD;
+               gpio4 = &pioE;
+               tcb0 = &tcb0;
+               i2c0 = &i2c0;
+               ssc0 = &ssc0;
+               ssc1 = &ssc1;
+               pwm0 = &pwm0;
+       };
+
+       cpus {
+               #address-cells = <0>;
+               #size-cells = <0>;
+
+               cpu {
+                       compatible = "arm,arm926ej-s";
+                       device_type = "cpu";
+               };
+       };
+
+       memory {
+               reg = <0x20000000 0x08000000>;
+       };
+
+       clocks {
+               main_xtal: main_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+
+               slow_xtal: slow_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+       };
+
+       sram0: sram@00300000 {
+               compatible = "mmio-sram";
+               reg = <0x00300000 0x14000>;
+       };
+
+       sram1: sram@00500000 {
+               compatible = "mmio-sram";
+               reg = <0x00500000 0x4000>;
+       };
+
+       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 = <3>;
+                               compatible = "atmel,at91rm9200-aic";
+                               interrupt-controller;
+                               reg = <0xfffff000 0x200>;
+                               atmel,external-irqs = <30 31>;
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               compatible = "atmel,at91rm9200-pmc", "syscon";
+                               reg = <0xfffffc00 0x100>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               interrupt-controller;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               #interrupt-cells = <1>;
+
+                               main_osc: main_osc {
+                                       compatible = "atmel,at91rm9200-clk-main-osc";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MOSCS>;
+                                       clocks = <&main_xtal>;
+                               };
+
+                               main: mainck {
+                                       compatible = "atmel,at91rm9200-clk-main";
+                                       #clock-cells = <0>;
+                                       clocks = <&main_osc>;
+                               };
+
+                               plla: pllack {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKA>;
+                                       clocks = <&main>;
+                                       reg = <0>;
+                                       atmel,clk-input-range = <1000000 32000000>;
+                                       #atmel,pll-clk-output-range-cells = <4>;
+                                       atmel,pll-clk-output-ranges = <80000000 200000000 0 1>,
+                                                               <190000000 240000000 2 1>;
+                               };
+
+                               pllb: pllbck {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKB>;
+                                       clocks = <&main>;
+                                       reg = <1>;
+                                       atmel,clk-input-range = <1000000 32000000>;
+                                       #atmel,pll-clk-output-range-cells = <4>;
+                                       atmel,pll-clk-output-ranges = <80000000 200000000 0 1>,
+                                                               <190000000 240000000 2 1>;
+                               };
+
+                               mck: masterck {
+                                       compatible = "atmel,at91rm9200-clk-master";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
+                                       clocks = <&slow_xtal>, <&main>, <&plla>, <&pllb>;
+                                       atmel,clk-output-range = <0 120000000>;
+                                       atmel,clk-divisors = <1 2 4 0>;
+                               };
+
+                               usb: usbck {
+                                       compatible = "atmel,at91rm9200-clk-usb";
+                                       #clock-cells = <0>;
+                                       atmel,clk-divisors = <1 2 4 0>;
+                                       clocks = <&pllb>;
+                               };
+
+                               prog: progck {
+                                       compatible = "atmel,at91rm9200-clk-programmable";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       clocks = <&slow_xtal>, <&main>, <&plla>, <&pllb>;
+
+                                       prog0: prog0 {
+                                               #clock-cells = <0>;
+                                               reg = <0>;
+                                               interrupts = <AT91_PMC_PCKRDY(0)>;
+                                       };
+
+                                       prog1: prog1 {
+                                               #clock-cells = <0>;
+                                               reg = <1>;
+                                               interrupts = <AT91_PMC_PCKRDY(1)>;
+                                       };
+
+                                       prog2: prog2 {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                               interrupts = <AT91_PMC_PCKRDY(2)>;
+                                       };
+
+                                       prog3: prog3 {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                               interrupts = <AT91_PMC_PCKRDY(3)>;
+                                       };
+                               };
+
+                               systemck {
+                                       compatible = "atmel,at91rm9200-clk-system";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       uhpck: uhpck {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       udpck: udpck {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       pck0: pck0 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                               clocks = <&prog0>;
+                                       };
+
+                                       pck1: pck1 {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                               clocks = <&prog1>;
+                                       };
+
+                                       pck2: pck2 {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                               clocks = <&prog2>;
+                                       };
+
+                                       pck3: pck3 {
+                                               #clock-cells = <0>;
+                                               reg = <11>;
+                                               clocks = <&prog3>;
+                                       };
+                               };
+
+                               periphck {
+                                       compatible = "atmel,at91rm9200-clk-peripheral";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       clocks = <&mck>;
+
+                                       pioA_clk: pioA_clk {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                       };
+
+                                       pioB_clk: pioB_clk {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                       };
+
+                                       pioCDE_clk: pioCDE_clk {
+                                               #clock-cells = <0>;
+                                               reg = <4>;
+                                       };
+
+                                       usart0_clk: usart0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                       };
+
+                                       usart1_clk: usart1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                       };
+
+                                       usart2_clk: usart2_clk {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                       };
+
+                                       mci0_clk: mci0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                       };
+
+                                       mci1_clk: mci1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <11>;
+                                       };
+
+                                       can_clk: can_clk {
+                                               #clock-cells = <0>;
+                                               reg = <12>;
+                                       };
+
+                                       twi0_clk: twi0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <13>;
+                                       };
+
+                                       spi0_clk: spi0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <14>;
+                                       };
+
+                                       spi1_clk: spi1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <15>;
+                                       };
+
+                                       ssc0_clk: ssc0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <16>;
+                                       };
+
+                                       ssc1_clk: ssc1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <17>;
+                                       };
+
+                                       ac97_clk: ac97_clk {
+                                               #clock-cells = <0>;
+                                               reg = <18>;
+                                       };
+
+                                       tcb_clk: tcb_clk {
+                                               #clock-cells = <0>;
+                                               reg = <19>;
+                                       };
+
+                                       pwm_clk: pwm_clk {
+                                               #clock-cells = <0>;
+                                               reg = <20>;
+                                       };
+
+                                       macb0_clk: macb0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <21>;
+                                       };
+
+                                       g2de_clk: g2de_clk {
+                                               #clock-cells = <0>;
+                                               reg = <23>;
+                                       };
+
+                                       udc_clk: udc_clk {
+                                               #clock-cells = <0>;
+                                               reg = <24>;
+                                       };
+
+                                       isi_clk: isi_clk {
+                                               #clock-cells = <0>;
+                                               reg = <25>;
+                                       };
+
+                                       lcd_clk: lcd_clk {
+                                               #clock-cells = <0>;
+                                               reg = <26>;
+                                       };
+
+                                       dma_clk: dma_clk {
+                                               #clock-cells = <0>;
+                                               reg = <27>;
+                                       };
+
+                                       ohci_clk: ohci_clk {
+                                               #clock-cells = <0>;
+                                               reg = <29>;
+                                       };
+                               };
+                       };
+
+                       ramc0: ramc@ffffe200 {
+                               compatible = "atmel,at91sam9260-sdramc";
+                               reg = <0xffffe200 0x200>;
+                       };
+
+                       ramc1: ramc@ffffe800 {
+                               compatible = "atmel,at91sam9260-sdramc";
+                               reg = <0xffffe800 0x200>;
+                       };
+
+                       pit: timer@fffffd30 {
+                               compatible = "atmel,at91sam9260-pit";
+                               reg = <0xfffffd30 0xf>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&mck>;
+                       };
+
+                       tcb0: timer@fff7c000 {
+                               compatible = "atmel,at91rm9200-tcb";
+                               reg = <0xfff7c000 0x100>;
+                               interrupts = <19 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tcb_clk>, <&slow_xtal>;
+                               clock-names = "t0_clk", "slow_clk";
+                       };
+
+                       rstc@fffffd00 {
+                               compatible = "atmel,at91sam9260-rstc";
+                               reg = <0xfffffd00 0x10>;
+                               clocks = <&slow_xtal>;
+                       };
+
+                       shdwc@fffffd10 {
+                               compatible = "atmel,at91sam9260-shdwc";
+                               reg = <0xfffffd10 0x10>;
+                               clocks = <&slow_xtal>;
+                       };
+
+                       pinctrl@fffff200 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
+                               ranges = <0xfffff200 0xfffff200 0xa00>;
+
+                               atmel,mux-mask = <
+                                     /*    A         B     */
+                                      0xfffffffb 0xffffe07f  /* pioA */
+                                      0x0007ffff 0x39072fff  /* pioB */
+                                      0xffffffff 0x3ffffff8  /* pioC */
+                                      0xfffffbff 0xffffffff  /* pioD */
+                                      0xffe00fff 0xfbfcff00  /* pioE */
+                                     >;
+
+                               /* shared pinctrl settings */
+                               dbgu {
+                                       pinctrl_dbgu: dbgu-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC30 periph A */
+                                                        AT91_PIOC 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PC31 periph with pullup */
+                                       };
+                               };
+
+                               usart0 {
+                                       pinctrl_usart0: usart0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PA26 periph A with pullup */
+                                                        AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA27 periph A */
+                                       };
+
+                                       pinctrl_usart0_rts: usart0_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA28 periph A */
+                                       };
+
+                                       pinctrl_usart0_cts: usart0_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA29 periph A */
+                                       };
+                               };
+
+                               usart1 {
+                                       pinctrl_usart1: usart1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD0 periph A with pullup */
+                                                        AT91_PIOD 1 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PD1 periph A */
+                                       };
+
+                                       pinctrl_usart1_rts: usart1_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 7 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PD7 periph B */
+                                       };
+
+                                       pinctrl_usart1_cts: usart1_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 8 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PD8 periph B */
+                                       };
+                               };
+
+                               usart2 {
+                                       pinctrl_usart2: usart2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 2 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD2 periph A with pullup */
+                                                        AT91_PIOD 3 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PD3 periph A */
+                                       };
+
+                                       pinctrl_usart2_rts: usart2_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 5 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PD5 periph B */
+                                       };
+
+                                       pinctrl_usart2_cts: usart2_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 6 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PD6 periph B */
+                                       };
+                               };
+
+                               nand {
+                                       pinctrl_nand: nand-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 22 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP     /* PA22 gpio RDY pin pull_up*/
+                                                        AT91_PIOD 15 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;   /* PD15 gpio enable pin pull_up */
+                                       };
+                               };
+
+                               macb {
+                                       pinctrl_macb_rmii: macb_rmii-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC25 periph B */
+                                                        AT91_PIOE 21 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PE21 periph A */
+                                                        AT91_PIOE 23 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PE23 periph A */
+                                                        AT91_PIOE 24 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PE24 periph A */
+                                                        AT91_PIOE 25 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PE25 periph A */
+                                                        AT91_PIOE 26 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PE26 periph A */
+                                                        AT91_PIOE 27 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PE27 periph A */
+                                                        AT91_PIOE 28 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PE28 periph A */
+                                                        AT91_PIOE 29 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PE29 periph A */
+                                                        AT91_PIOE 30 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PE30 periph A */
+                                       };
+
+                                       pinctrl_macb_rmii_mii: macb_rmii_mii-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC20 periph B */
+                                                        AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC21 periph B */
+                                                        AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC22 periph B */
+                                                        AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC23 periph B */
+                                                        AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC24 periph B */
+                                                        AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC25 periph B */
+                                                        AT91_PIOC 27 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC27 periph B */
+                                                        AT91_PIOE 22 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PE22 periph B */
+                                       };
+                               };
+
+                               mmc0 {
+                                       pinctrl_mmc0_clk: mmc0_clk-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA12 periph A */
+                                       };
+
+                                       pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA1 periph A with pullup */
+                                                        AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;       /* PA0 periph A with pullup */
+                                       };
+
+                                       pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA3 periph A with pullup */
+                                                        AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA4 periph A with pullup */
+                                                        AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;       /* PA5 periph A with pullup */
+                                       };
+
+                                       pinctrl_mmc0_slot1_cmd_dat0: mmc0_slot1_cmd_dat0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PA16 periph A with pullup */
+                                                        AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PA17 periph A with pullup */
+                                       };
+
+                                       pinctrl_mmc0_slot1_dat1_3: mmc0_slot1_dat1_3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PA18 periph A with pullup */
+                                                        AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PA19 periph A with pullup */
+                                                        AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PA20 periph A with pullup */
+                                       };
+                               };
+
+                               mmc1 {
+                                       pinctrl_mmc1_clk: mmc1_clk-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA6 periph A */
+                                       };
+
+                                       pinctrl_mmc1_slot0_cmd_dat0: mmc1_slot0_cmd_dat0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA7 periph A with pullup */
+                                                        AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;       /* PA8 periph A with pullup */
+                                       };
+
+                                       pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA9 periph A with pullup */
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PA10 periph A with pullup */
+                                                        AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PA11 periph A with pullup */
+                                       };
+
+                                       pinctrl_mmc1_slot1_cmd_dat0: mmc1_slot1_cmd_dat0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PA21 periph A with pullup */
+                                                        AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PA22 periph A with pullup */
+                                       };
+
+                                       pinctrl_mmc1_slot1_dat1_3: mmc1_slot1_dat1_3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PA23 periph A with pullup */
+                                                        AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PA24 periph A with pullup */
+                                                        AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PA25 periph A with pullup */
+                                       };
+                               };
+
+                               ssc0 {
+                                       pinctrl_ssc0_tx: ssc0_tx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 0 AT91_PERIPH_B AT91_PINCTRL_NONE    /* PB0 periph B */
+                                                        AT91_PIOB 1 AT91_PERIPH_B AT91_PINCTRL_NONE    /* PB1 periph B */
+                                                        AT91_PIOB 2 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PB2 periph B */
+                                       };
+
+                                       pinctrl_ssc0_rx: ssc0_rx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 3 AT91_PERIPH_B AT91_PINCTRL_NONE    /* PB3 periph B */
+                                                        AT91_PIOB 4 AT91_PERIPH_B AT91_PINCTRL_NONE    /* PB4 periph B */
+                                                        AT91_PIOB 5 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PB5 periph B */
+                                       };
+                               };
+
+                               ssc1 {
+                                       pinctrl_ssc1_tx: ssc1_tx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB6 periph A */
+                                                        AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB7 periph A */
+                                                        AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PB8 periph A */
+                                       };
+
+                                       pinctrl_ssc1_rx: ssc1_rx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB9 periph A */
+                                                        AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB10 periph A */
+                                                        AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB11 periph A */
+                                       };
+                               };
+
+                               spi0 {
+                                       pinctrl_spi0: spi0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 0 AT91_PERIPH_B AT91_PINCTRL_NONE    /* PA0 periph B SPI0_MISO pin */
+                                                        AT91_PIOA 1 AT91_PERIPH_B AT91_PINCTRL_NONE    /* PA1 periph B SPI0_MOSI pin */
+                                                        AT91_PIOA 2 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PA2 periph B SPI0_SPCK pin */
+                                       };
+                               };
+
+                               spi1 {
+                                       pinctrl_spi1: spi1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB12 periph A SPI1_MISO pin */
+                                                        AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB13 periph A SPI1_MOSI pin */
+                                                        AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB14 periph A SPI1_SPCK pin */
+                                       };
+                               };
+
+                               tcb0 {
+                                       pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
+                                               atmel,pins = <AT91_PIOB 28 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
+                                               atmel,pins = <AT91_PIOC 28 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
+                                               atmel,pins = <AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
+                                               atmel,pins = <AT91_PIOE 18 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
+                                               atmel,pins = <AT91_PIOE 8 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
+                                               atmel,pins = <AT91_PIOB 17 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
+                                               atmel,pins = <AT91_PIOE 19 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
+                                               atmel,pins = <AT91_PIOE 9 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
+                                               atmel,pins = <AT91_PIOB 18 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               fb {
+                                       pinctrl_fb: fb-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC1 periph A */
+                                                        AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC2 periph A */
+                                                        AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC3 periph A */
+                                                        AT91_PIOB 9 AT91_PERIPH_B AT91_PINCTRL_NONE    /* PB9 periph B */
+                                                        AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC6 periph A */
+                                                        AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC7 periph A */
+                                                        AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC8 periph A */
+                                                        AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC9 periph A */
+                                                        AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC10 periph A */
+                                                        AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC11 periph A */
+                                                        AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC14 periph A */
+                                                        AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC15 periph A */
+                                                        AT91_PIOC 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC16 periph A */
+                                                        AT91_PIOC 12 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC12 periph B */
+                                                        AT91_PIOC 18 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC18 periph A */
+                                                        AT91_PIOC 19 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC19 periph A */
+                                                        AT91_PIOC 22 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC22 periph A */
+                                                        AT91_PIOC 23 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC23 periph A */
+                                                        AT91_PIOC 24 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC24 periph A */
+                                                        AT91_PIOC 17 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC17 periph B */
+                                                        AT91_PIOC 26 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC26 periph A */
+                                                        AT91_PIOC 27 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC27 periph A */
+                                       };
+                               };
+
+                               can {
+                                       pinctrl_can_rx_tx: can_rx_tx {
+                                               atmel,pins =
+                                                       <AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* CANRX, conflicts with IRQ0 */
+                                                        AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* CANTX, conflicts with PCK0 */
+                                       };
+                               };
+
+                               ac97 {
+                                       pinctrl_ac97: ac97-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB12 periph A AC97FS pin */
+                                                        AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB13 periph A AC97CK pin */
+                                                        AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB14 periph A AC97TX pin */
+                                                        AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PB14 periph A AC97RX pin */
+                                       };
+                               };
+
+                               pioA: gpio@fffff200 {
+                                       compatible = "atmel,at91rm9200-gpio";
+                                       reg = <0xfffff200 0x200>;
+                                       interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
+                                       #gpio-cells = <2>;
+                                       gpio-controller;
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       clocks = <&pioA_clk>;
+                               };
+
+                               pioB: gpio@fffff400 {
+                                       compatible = "atmel,at91rm9200-gpio";
+                                       reg = <0xfffff400 0x200>;
+                                       interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
+                                       #gpio-cells = <2>;
+                                       gpio-controller;
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       clocks = <&pioB_clk>;
+                               };
+
+                               pioC: gpio@fffff600 {
+                                       compatible = "atmel,at91rm9200-gpio";
+                                       reg = <0xfffff600 0x200>;
+                                       interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
+                                       #gpio-cells = <2>;
+                                       gpio-controller;
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       clocks = <&pioCDE_clk>;
+                               };
+
+                               pioD: gpio@fffff800 {
+                                       compatible = "atmel,at91rm9200-gpio";
+                                       reg = <0xfffff800 0x200>;
+                                       interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
+                                       #gpio-cells = <2>;
+                                       gpio-controller;
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       clocks = <&pioCDE_clk>;
+                               };
+
+                               pioE: gpio@fffffa00 {
+                                       compatible = "atmel,at91rm9200-gpio";
+                                       reg = <0xfffffa00 0x200>;
+                                       interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
+                                       #gpio-cells = <2>;
+                                       gpio-controller;
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       clocks = <&pioCDE_clk>;
+                               };
+                       };
+
+                       dbgu: serial@ffffee00 {
+                               compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
+                               reg = <0xffffee00 0x200>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_dbgu>;
+                               clocks = <&mck>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart0: serial@fff8c000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfff8c000 0x200>;
+                               interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart0>;
+                               clocks = <&usart0_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart1: serial@fff90000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfff90000 0x200>;
+                               interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart1>;
+                               clocks = <&usart1_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart2: serial@fff94000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfff94000 0x200>;
+                               interrupts = <9 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart2>;
+                               clocks = <&usart2_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       ssc0: ssc@fff98000 {
+                               compatible = "atmel,at91rm9200-ssc";
+                               reg = <0xfff98000 0x4000>;
+                               interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
+                               clocks = <&ssc0_clk>;
+                               clock-names = "pclk";
+                               status = "disabled";
+                       };
+
+                       ssc1: ssc@fff9c000 {
+                               compatible = "atmel,at91rm9200-ssc";
+                               reg = <0xfff9c000 0x4000>;
+                               interrupts = <17 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
+                               clocks = <&ssc1_clk>;
+                               clock-names = "pclk";
+                               status = "disabled";
+                       };
+
+                       ac97: sound@fffa0000 {
+                               compatible = "atmel,at91sam9263-ac97c";
+                               reg = <0xfffa0000 0x4000>;
+                               interrupts = <18 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_ac97>;
+                               clocks = <&ac97_clk>;
+                               clock-names = "ac97_clk";
+                               status = "disabled";
+                       };
+
+                       macb0: ethernet@fffbc000 {
+                               compatible = "cdns,at91sam9260-macb", "cdns,macb";
+                               reg = <0xfffbc000 0x100>;
+                               interrupts = <21 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_macb_rmii>;
+                               clocks = <&macb0_clk>, <&macb0_clk>;
+                               clock-names = "hclk", "pclk";
+                               status = "disabled";
+                       };
+
+                       usb1: gadget@fff78000 {
+                               compatible = "atmel,at91sam9263-udc";
+                               reg = <0xfff78000 0x4000>;
+                               interrupts = <24 IRQ_TYPE_LEVEL_HIGH 2>;
+                               clocks = <&udc_clk>, <&udpck>;
+                               clock-names = "pclk", "hclk";
+                               status = "disabled";
+                       };
+
+                       i2c0: i2c@fff88000 {
+                               compatible = "atmel,at91sam9260-i2c";
+                               reg = <0xfff88000 0x100>;
+                               interrupts = <13 IRQ_TYPE_LEVEL_HIGH 6>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&twi0_clk>;
+                               status = "disabled";
+                       };
+
+                       mmc0: mmc@fff80000 {
+                               compatible = "atmel,hsmci";
+                               reg = <0xfff80000 0x600>;
+                               interrupts = <10 IRQ_TYPE_LEVEL_HIGH 0>;
+                               pinctrl-names = "default";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&mci0_clk>;
+                               clock-names = "mci_clk";
+                               status = "disabled";
+                       };
+
+                       mmc1: mmc@fff84000 {
+                               compatible = "atmel,hsmci";
+                               reg = <0xfff84000 0x600>;
+                               interrupts = <11 IRQ_TYPE_LEVEL_HIGH 0>;
+                               pinctrl-names = "default";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&mci1_clk>;
+                               clock-names = "mci_clk";
+                               status = "disabled";
+                       };
+
+                       watchdog@fffffd40 {
+                               compatible = "atmel,at91sam9260-wdt";
+                               reg = <0xfffffd40 0x10>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&slow_xtal>;
+                               atmel,watchdog-type = "hardware";
+                               atmel,reset-type = "all";
+                               atmel,dbg-halt;
+                               status = "disabled";
+                       };
+
+                       spi0: spi@fffa4000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xfffa4000 0x200>;
+                               interrupts = <14 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi0>;
+                               clocks = <&spi0_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       spi1: spi@fffa8000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xfffa8000 0x200>;
+                               interrupts = <15 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi1>;
+                               clocks = <&spi1_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       pwm0: pwm@fffb8000 {
+                               compatible = "atmel,at91sam9rl-pwm";
+                               reg = <0xfffb8000 0x300>;
+                               interrupts = <20 IRQ_TYPE_LEVEL_HIGH 4>;
+                               #pwm-cells = <3>;
+                               clocks = <&pwm_clk>;
+                               clock-names = "pwm_clk";
+                               status = "disabled";
+                       };
+
+                       can: can@fffac000 {
+                               compatible = "atmel,at91sam9263-can";
+                               reg = <0xfffac000 0x300>;
+                               interrupts = <12 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_can_rx_tx>;
+                               clocks = <&can_clk>;
+                               clock-names = "can_clk";
+                       };
+
+                       rtc@fffffd20 {
+                               compatible = "atmel,at91sam9260-rtt";
+                               reg = <0xfffffd20 0x10>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&slow_xtal>;
+                               status = "disabled";
+                       };
+
+                       rtc@fffffd50 {
+                               compatible = "atmel,at91sam9260-rtt";
+                               reg = <0xfffffd50 0x10>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&slow_xtal>;
+                               status = "disabled";
+                       };
+
+                       gpbr: syscon@fffffd60 {
+                               compatible = "atmel,at91sam9260-gpbr", "syscon";
+                               reg = <0xfffffd60 0x50>;
+                               status = "disabled";
+                       };
+               };
+
+               fb0: fb@0x00700000 {
+                       compatible = "atmel,at91sam9263-lcdc";
+                       reg = <0x00700000 0x1000>;
+                       interrupts = <26 IRQ_TYPE_LEVEL_HIGH 3>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_fb>;
+                       clocks = <&lcd_clk>, <&lcd_clk>;
+                       clock-names = "lcdc_clk", "hclk";
+                       status = "disabled";
+               };
+
+               nand0: nand@40000000 {
+                       compatible = "atmel,at91rm9200-nand";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x40000000 0x10000000
+                              0xffffe000 0x200
+                             >;
+                       atmel,nand-addr-offset = <21>;
+                       atmel,nand-cmd-offset = <22>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_nand>;
+                       gpios = <&pioA 22 GPIO_ACTIVE_HIGH
+                                &pioD 15 GPIO_ACTIVE_HIGH
+                                0
+                               >;
+                       status = "disabled";
+               };
+
+               usb0: ohci@00a00000 {
+                       compatible = "atmel,at91rm9200-ohci", "usb-ohci";
+                       reg = <0x00a00000 0x100000>;
+                       interrupts = <29 IRQ_TYPE_LEVEL_HIGH 2>;
+                       clocks = <&ohci_clk>, <&ohci_clk>, <&uhpck>;
+                       clock-names = "ohci_clk", "hclk", "uhpck";
+                       status = "disabled";
+               };
+       };
+
+       i2c@0 {
+               compatible = "i2c-gpio";
+               gpios = <&pioB 4 GPIO_ACTIVE_HIGH /* sda */
+                        &pioB 5 GPIO_ACTIVE_HIGH /* scl */
+                       >;
+               i2c-gpio,sda-open-drain;
+               i2c-gpio,scl-open-drain;
+               i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+};
diff --git a/arch/arm/dts/at91sam9g20-taurus.dts b/arch/arm/dts/at91sam9g20-taurus.dts
new file mode 100644 (file)
index 0000000..f27d772
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * at91sam9g20-taurus.dts
+ * (C) Copyright 2016
+ * Heiko Schocher, DENX Software Engineering, hs@denx.de.
+ *
+ * Based on:
+ * at91sam9g20ek.dts - Device Tree file for Atmel at91sam9g20ek board
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+/dts-v1/;
+#include "at91sam9g20.dtsi"
+
+/ {
+       model = "Siemens taurus";
+       compatible = "atmel,at91sam9g20ek", "atmel,at91sam9g20", "atmel,at91sam9";
+
+       chosen {
+               stdout-path = &dbgu;
+       };
+
+       memory {
+               reg = <0x20000000 0x4000000>;
+       };
+
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <18432000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               board {
+                                       pinctrl_pck0_as_mck: pck0_as_mck {
+                                               atmel,pins =
+                                                       <AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PC1 periph B */
+                                       };
+
+                               };
+                       };
+
+                       dbgu: serial@fffff200 {
+                               status = "okay";
+                       };
+
+                       usart0: serial@fffb0000 {
+                               pinctrl-0 =
+                                       <&pinctrl_usart0
+                                        &pinctrl_usart0_rts
+                                        &pinctrl_usart0_cts
+                                        &pinctrl_usart0_dtr_dsr
+                                        &pinctrl_usart0_dcd
+                                        &pinctrl_usart0_ri>;
+                               status = "okay";
+                       };
+
+                       usart1: serial@fffb4000 {
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@fffc4000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+
+                       usb1: gadget@fffa4000 {
+                               atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
+                               status = "okay";
+                       };
+
+                       ssc0: ssc@fffbc000 {
+                               status = "okay";
+                               pinctrl-0 = <&pinctrl_ssc0_tx>;
+                       };
+
+                       spi0: spi@fffc8000 {
+                               cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
+                               mtd_dataflash@0 {
+                                       compatible = "atmel,at45", "atmel,dataflash";
+                                       spi-max-frequency = <50000000>;
+                                       reg = <1>;
+                               };
+                       };
+
+                       rtc@fffffd20 {
+                               atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
+                               status = "okay";
+                       };
+
+                       watchdog@fffffd40 {
+                               status = "okay";
+                       };
+
+                       gpbr: syscon@fffffd50 {
+                               status = "okay";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       nand-on-flash-bbt;
+                       status = "okay";
+               };
+
+               usb0: ohci@00500000 {
+                       num-ports = <2>;
+                       status = "okay";
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9g20.dtsi b/arch/arm/dts/at91sam9g20.dtsi
new file mode 100644 (file)
index 0000000..f593016
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * at91sam9g20.dtsi - Device Tree Include file for AT91SAM9G20 family SoC
+ *
+ *  Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include "at91sam9260.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9G20 family SoC";
+       compatible = "atmel,at91sam9g20";
+
+       memory {
+               reg = <0x20000000 0x08000000>;
+       };
+
+       sram0: sram@002ff000 {
+               status = "disabled";
+       };
+
+       sram1: sram@002fc000 {
+               compatible = "mmio-sram";
+               reg = <0x002fc000 0x8000>;
+       };
+
+       ahb {
+               apb {
+                       i2c0: i2c@fffac000 {
+                               compatible = "atmel,at91sam9g20-i2c";
+                       };
+
+                       ssc0: ssc@fffbc000 {
+                               compatible = "atmel,at91sam9rl-ssc";
+                       };
+
+                       adc0: adc@fffe0000 {
+                               atmel,adc-startup-time = <40>;
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               plla: pllack {
+                                       atmel,clk-input-range = <2000000 32000000>;
+                                       atmel,pll-clk-output-ranges = <745000000 800000000 0 0>,
+                                                               <695000000 750000000 1 0>,
+                                                               <645000000 700000000 2 0>,
+                                                               <595000000 650000000 3 0>,
+                                                               <545000000 600000000 0 1>,
+                                                               <495000000 550000000 1 1>,
+                                                               <445000000 500000000 2 1>,
+                                                               <400000000 450000000 3 1>;
+                               };
+
+                               pllb: pllbck {
+                                       compatible = "atmel,at91sam9g20-clk-pllb";
+                                       atmel,clk-input-range = <2000000 32000000>;
+                                       atmel,pll-clk-output-ranges = <30000000 100000000 0 0>;
+                               };
+
+                               mck: masterck {
+                                       atmel,clk-output-range = <0 133000000>;
+                                       atmel,clk-divisors = <1 2 4 6>;
+                               };
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9g45-corvus.dts b/arch/arm/dts/at91sam9g45-corvus.dts
new file mode 100644 (file)
index 0000000..c207c02
--- /dev/null
@@ -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";
+               };
+       };
+};
index caa45cfabf5b9231b535fb78be5b1637bbbe7044..bdcda7de937f0673392f5007f4377b597747fc0a 100644 (file)
@@ -70,7 +70,7 @@ u32 spl_boot_device(void)
 
 #if defined(CONFIG_SPL_MMC_SUPPORT)
 /* called from spl_mmc to see type of boot mode for storage (RAW or FAT) */
-u32 spl_boot_mode(void)
+u32 spl_boot_mode(const u32 boot_device)
 {
        switch (spl_boot_device()) {
        /* for MMC return either RAW or FAT mode */
diff --git a/arch/arm/include/asm/arch-bcm235xx/boot0.h b/arch/arm/include/asm/arch-bcm235xx/boot0.h
new file mode 100644 (file)
index 0000000..7e72882
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2016 Broadcom Corporation.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __BOOT0_H
+#define __BOOT0_H
+
+/* BOOT0 header information */
+#define ARM_SOC_BOOT0_HOOK     \
+       .word   0xbabeface;     \
+       .word   _end - _start
+
+#endif /* __BOOT0_H */
index 7677358742e1bd3ee257495bbff71f67f2965cc4..76b75d8e4643ee9a018c216c15301de2ae15f3d4 100644 (file)
@@ -42,11 +42,14 @@ int arch_fixup_fdt(void *blob)
        }
 
        ret = fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS);
-#ifdef CONFIG_ARMV7_NONSEC
        if (ret)
                return ret;
 
+#ifdef CONFIG_ARMV7_NONSEC
        ret = psci_update_dt(blob);
+       if (ret)
+               return ret;
 #endif
-       return ret;
+
+       return 0;
 }
index 6180699fed9593e279ee03546c1d46cce26e86bd..13e19ba2fe6ab1497dbab46762c603b042e5c70b 100644 (file)
@@ -122,16 +122,28 @@ 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"
        select CPU_ARM926EJS
        select SUPPORT_SPL
+       select DM
+       select DM_SERIAL
+       select DM_GPIO
+       select DM_ETH
 
 config TARGET_SMARTWEB
        bool "Support smartweb"
        select CPU_ARM926EJS
        select SUPPORT_SPL
+       select DM
+       select DM_SERIAL
+       select DM_GPIO
+       select DM_ETH
 
 config TARGET_VINCO
        bool "Support VINCO"
index 2379dd40f8fe9b6e1713b30052cf854e40ba91f8..61e36c46fb82357384c2dd6673822de00b0b0a5b 100644 (file)
@@ -15,7 +15,7 @@
 #define AT91_ASM_MATRIX_CSA0   (ATMEL_BASE_MATRIX + 0x30)
 #elif defined(CONFIG_AT91SAM9263)
 #define AT91_ASM_MATRIX_CSA0   (ATMEL_BASE_MATRIX + 0x120)
-#elif defined(CONFIG_AT91SAM9G45)
+#elif defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
 #define AT91_ASM_MATRIX_CSA0   (ATMEL_BASE_MATRIX + 0x128)
 #else
 #error AT91_ASM_MATRIX_CSA0 is not definied for current CPU
@@ -33,7 +33,7 @@
 #elif defined(CONFIG_AT91SAM9263)
 #define AT91_MATRIX_MASTERS    9
 #define AT91_MATRIX_SLAVES     7
-#elif defined(CONFIG_AT91SAM9G45)
+#elif defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
 #define AT91_MATRIX_MASTERS    11
 #define AT91_MATRIX_SLAVES     8
 #else
@@ -63,7 +63,7 @@ typedef struct at91_matrix {
        u32             reserve3[32 - (2 * AT91_MATRIX_SLAVES)];
        u32             mrcr;           /* 0x100 Master Remap Control */
        u32             reserve4[3];
-#if    defined(CONFIG_AT91SAM9G45)
+#if defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
        u32             ccr[52];        /* 0x110 - 0x1E0 Chip Configuration */
        u32             womr;           /* 0x1E4 Write Protect Mode  */
        u32             wpsr;           /* 0x1E8 Write Protect Status */
@@ -106,14 +106,14 @@ typedef struct at91_matrix {
 
 /* Undefined Length Burst Type */
 #if defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9263) || \
-       defined(CONFIG_AT91SAM9G45)
+       defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
 #define AT91_MATRIX_MCFG_ULBT_INFINITE 0x00000000
 #define AT91_MATRIX_MCFG_ULBT_SINGLE   0x00000001
 #define AT91_MATRIX_MCFG_ULBT_FOUR     0x00000002
 #define AT91_MATRIX_MCFG_ULBT_EIGHT    0x00000003
 #define AT91_MATRIX_MCFG_ULBT_SIXTEEN  0x00000004
 #endif
-#if defined(CONFIG_AT91SAM9G45)
+#if defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
 #define AT91_MATRIX_MCFG_ULBT_THIRTYTWO        0x00000005
 #define AT91_MATRIX_MCFG_ULBT_SIXTYFOUR        0x00000006
 #define AT91_MATRIX_MCFG_ULBT_128      0x00000007
@@ -125,14 +125,15 @@ typedef struct at91_matrix {
 #define AT91_MATRIX_SCFG_DEFMSTR_TYPE_FIXED    0x00020000
 
 /* Fixed Index of Default Master */
-#if defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9263)
+#if defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9263) || \
+       defined(CONFIG_AT91SAM9M10G45)
 #define        AT91_MATRIX_SCFG_FIXED_DEFMSTR(x)       ((x & 0xf) << 18)
 #elif defined(CONFIG_AT91SAM9261) || defined(CONFIG_AT91SAM9260)
 #define        AT91_MATRIX_SCFG_FIXED_DEFMSTR(x)       ((x & 7) << 18)
 #endif
 
 /* Maximum Number of Allowed Cycles for a Burst */
-#if defined(CONFIG_AT91SAM9G45)
+#if defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
 #define        AT91_MATRIX_SCFG_SLOT_CYCLE(x)  ((x & 0x1ff) << 0)
 #elif defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9261) || \
        defined(CONFIG_AT91SAM9263)
@@ -147,13 +148,14 @@ typedef struct at91_matrix {
 
 /* Master Remap Control Register */
 #if defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9263) || \
-       defined(CONFIG_AT91SAM9G45)
+       defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
 /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
 #define        AT91_MATRIX_MRCR_RCB0   (1 << 0)
 /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
 #define        AT91_MATRIX_MRCR_RCB1   (1 << 1)
 #endif
-#if defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G45)
+#if defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G45) || \
+       defined(CONFIG_AT91SAM9M10G45)
 #define        AT91_MATRIX_MRCR_RCB2   0x00000004
 #define        AT91_MATRIX_MRCR_RCB3   0x00000008
 #define        AT91_MATRIX_MRCR_RCB4   0x00000010
@@ -162,14 +164,14 @@ typedef struct at91_matrix {
 #define        AT91_MATRIX_MRCR_RCB7   0x00000080
 #define        AT91_MATRIX_MRCR_RCB8   0x00000100
 #endif
-#if defined(CONFIG_AT91SAM9G45)
+#if defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
 #define        AT91_MATRIX_MRCR_RCB9   0x00000200
 #define        AT91_MATRIX_MRCR_RCB10  0x00000400
 #define        AT91_MATRIX_MRCR_RCB11  0x00000800
 #endif
 
 /* TCM Configuration Register */
-#if defined(CONFIG_AT91SAM9G45)
+#if defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
 /* Size of ITCM enabled memory block */
 #define        AT91_MATRIX_TCMR_ITCM_0         0x00000000
 #define        AT91_MATRIX_TCMR_ITCM_32        0x00000040
@@ -204,7 +206,7 @@ typedef struct at91_matrix {
 #define        AT91_MATRIX_TCMR_DTCM_64        0x00000070
 #endif
 
-#if defined(CONFIG_AT91SAM9G45)
+#if defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
 /* Video Mode Configuration Register */
 #define        AT91C_MATRIX_VDEC_SEL_OFF       0x00000000
 #define        AT91C_MATRIX_VDEC_SEL_ON        0x00000001
index f255b59195e6da69e704192d65308143fd637b2b..98f280cbf7732c460d291a1da0e64be08ecd57f0 100644 (file)
@@ -75,9 +75,9 @@ u32 spl_boot_device(void)
 }
 #endif
 
-u32 spl_boot_mode(void)
+u32 spl_boot_mode(const u32 boot_device)
 {
-       switch (spl_boot_device()) {
+       switch (boot_device) {
 #ifdef CONFIG_SYS_USE_MMC
        case BOOT_DEVICE_MMC1:
        case BOOT_DEVICE_MMC2:
index 49349da1792972e7783fe309858768bd8500879b..0aeaa7d8b7a0a67d849cc6e89a957cc97d7e1d61 100644 (file)
@@ -45,7 +45,7 @@ void spl_board_init(void)
        preloader_console_init();
 }
 
-u32 spl_boot_mode(void)
+u32 spl_boot_mode(const u32 boot_device)
 {
        return MMCSD_MODE_RAW;
 }
index 77d3cfec5967ea24790cdce5eb0d7e81c908dc70..af3be590974d2572601aa2b16738b25a94f9ec21 100644 (file)
@@ -26,6 +26,6 @@ config SYS_SOC
 config SYS_MALLOC_F_LEN
        default 0x1000
 
-source "board/hardkernel/odroid-c2/Kconfig"
+source "board/amlogic/odroid-c2/Kconfig"
 
 endif
index ac5bb2c20926fce762fd40b91fd9f466f9b1707e..e1c9cdba5041b5c1a2b90a947d608aa5090979c4 100644 (file)
@@ -57,7 +57,7 @@ u32 spl_boot_device(void)
 }
 
 #ifdef CONFIG_SPL_MMC_SUPPORT
-u32 spl_boot_mode(void)
+u32 spl_boot_mode(const u32 boot_device)
 {
        return MMCSD_MODE_RAW;
 }
index e133cca57ac918523fa6f40c8980a8353a682ad5..15f1266a7bf4380cdb195fa3810b0ded970c735e 100644 (file)
@@ -66,7 +66,7 @@ fallback:
        return BOOT_DEVICE_MMC1;
 }
 
-u32 spl_boot_mode(void)
+u32 spl_boot_mode(const u32 boot_device)
 {
        return MMCSD_MODE_RAW;
 }
index 98c16a000d83375b4b963511a802ab945a4f5c66..fec4c7a991019725b4523c1d1b0099abc973d453 100644 (file)
@@ -58,7 +58,7 @@ u32 spl_boot_device(void)
 }
 
 #ifdef CONFIG_SPL_MMC_SUPPORT
-u32 spl_boot_mode(void)
+u32 spl_boot_mode(const u32 boot_device)
 {
 #if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT)
        return MMCSD_MODE_FS;
index bd15b9bfb056c217c68b956a5aa173e037b3a8e7..66e028ec1467d657a1c408f6bd80b9b8dd50cc45 100644 (file)
@@ -257,7 +257,7 @@ void spl_board_announce_boot_device(void)
 }
 
 /* No confirmation data available in SPL yet. Hardcode bootmode */
-u32 spl_boot_mode(void)
+u32 spl_boot_mode(const u32 boot_device)
 {
        return MMCSD_MODE_RAW;
 }
index d34b9af9a18700b4d4dcfc643d442bb9c5867bc8..1d531402d5e429cf4d0b9106c57aefbc0683cb63 100644 (file)
@@ -77,7 +77,7 @@ u32 spl_boot_device(void)
        return mode;
 }
 
-u32 spl_boot_mode(void)
+u32 spl_boot_mode(const u32 boot_device)
 {
        struct mmc *mmc;
 
index 6c5415ac8f5360a936f2219e512f2258b8778061..e8added155672f0905b3740b7ea6e55e605f7e09 100644 (file)
@@ -69,7 +69,7 @@ u32 spl_boot_device(void)
 }
 
 #ifdef CONFIG_SPL_MMC_SUPPORT
-u32 spl_boot_mode(void)
+u32 spl_boot_mode(const u32 boot_device)
 {
        return MMCSD_MODE_FS;
 }
similarity index 68%
rename from board/BuR/kwb/Kconfig
rename to board/BuR/brppt1/Kconfig
index 4beefbf77146bb4b84ae443b10f351020d4e044e..e006c80e6ed4713bcf1fcc5a8285153d73141350 100644 (file)
@@ -1,7 +1,7 @@
-if TARGET_KWB
+if TARGET_BRPPT1
 
 config SYS_BOARD
-       default "kwb"
+       default "brppt1"
 
 config SYS_VENDOR
        default "BuR"
@@ -10,6 +10,6 @@ config SYS_SOC
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       default "kwb"
+       default "brppt1"
 
 endif
diff --git a/board/BuR/brppt1/MAINTAINERS b/board/BuR/brppt1/MAINTAINERS
new file mode 100644 (file)
index 0000000..9eddab4
--- /dev/null
@@ -0,0 +1,8 @@
+BRPPT1 BOARD
+M:     Hannes Schmelzer <hannes.schmelzer@br-automation.com>
+S:     Maintained
+F:     board/BuR/brppt1/
+F:     include/configs/brppt1.h
+F:     configs/brppt1_mmc_defconfig
+F:     configs/brppt1_nand_defconfig
+F:     configs/brppt1_spi_defconfig
similarity index 99%
rename from board/BuR/tseries/board.c
rename to board/BuR/brppt1/board.c
index bc119e69736edcfd90620cf97caeb726140e7c62..a22722122bd680f8657391e6f46e56fad9c0fb3e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * board.c
  *
- * Board functions for B&R LEIT Board
+ * Board functions for B&R BRPPT1
  *
  * Copyright (C) 2013 Hannes Schmelzer <oe5hpm@oevsv.at>
  * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
similarity index 99%
rename from board/BuR/tseries/mux.c
rename to board/BuR/brppt1/mux.c
index 349788a83570c7617718652e8e85da13f51dddd5..ab3788fc6b4a581d9e57c6c2f55612db5e32e84a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * mux.c
  *
- * Pinmux Setting for B&R LEIT Board(s)
+ * Pinmux Setting for B&R BRPPT1 Board(s)
  *
  * Copyright (C) 2013 Hannes Schmelzer <oe5hpm@oevsv.at>
  * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
similarity index 67%
rename from board/BuR/tseries/Kconfig
rename to board/BuR/brxre1/Kconfig
index ed48300c0a85b0350f8f142e415369269e12c725..389e523f60113edd36ef596e6e41a00b0f7fbb45 100644 (file)
@@ -1,7 +1,7 @@
-if TARGET_TSERIES
+if TARGET_BRXRE1
 
 config SYS_BOARD
-       default "tseries"
+       default "brxre1"
 
 config SYS_VENDOR
        default "BuR"
@@ -10,6 +10,6 @@ config SYS_SOC
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       default "tseries"
+       default "brxre1"
 
 endif
diff --git a/board/BuR/brxre1/MAINTAINERS b/board/BuR/brxre1/MAINTAINERS
new file mode 100644 (file)
index 0000000..a10d9c1
--- /dev/null
@@ -0,0 +1,6 @@
+BRXRE1 BOARD
+M:     Hannes Schmelzer <hannes.schmelzer@br-automation.com>
+S:     Maintained
+F:     board/BuR/brxre1/
+F:     include/configs/brxre1.h
+F:     configs/brxre1_defconfig
similarity index 98%
rename from board/BuR/kwb/board.c
rename to board/BuR/brxre1/board.c
index ad74ff299cb724d5f146b5472a406c77c847b957..f4bfa410cc60ec7b21b8ae763db86ed909f54fa8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * board.c
  *
- * Board functions for B&R KWB Board
+ * Board functions for B&R BRXRE1 Board
  *
  * Copyright (C) 2013 Hannes Schmelzer <oe5hpm@oevsv.at>
  * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
@@ -101,7 +101,7 @@ void am33xx_spl_board_init(void)
         */
        u32 *const clk_domains[] = { 0 };
 
-       u32 *const clk_modules_kwbspecific[] = {
+       u32 *const clk_modules_xre1specific[] = {
                &cmwkup->wkup_adctscctrl,
                &cmper->spi1clkctrl,
                &cmper->dcan0clkctrl,
@@ -113,7 +113,7 @@ void am33xx_spl_board_init(void)
                &cmper->lcdcclkstctrl,
                0
        };
-       do_enable_clocks(clk_domains, clk_modules_kwbspecific, 1);
+       do_enable_clocks(clk_domains, clk_modules_xre1specific, 1);
        /* setup LCD-Pixel Clock */
        writel(0x2, CM_DPLL + 0x34);
        /* power-OFF LCD-Display */
similarity index 100%
rename from board/BuR/kwb/mux.c
rename to board/BuR/brxre1/mux.c
diff --git a/board/BuR/kwb/MAINTAINERS b/board/BuR/kwb/MAINTAINERS
deleted file mode 100644 (file)
index ca7d329..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-KWB BOARD
-M:     Hannes Schmelzer <hannes.schmelzer@br-automation.com>
-S:     Maintained
-F:     board/BuR/kwb/
-F:     include/configs/kwb.h
-F:     configs/kwb_defconfig
diff --git a/board/BuR/tseries/MAINTAINERS b/board/BuR/tseries/MAINTAINERS
deleted file mode 100644 (file)
index e2e67e6..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-TSERIES BOARD
-M:     Hannes Schmelzer <hannes.schmelzer@br-automation.com>
-S:     Maintained
-F:     board/BuR/tseries/
-F:     include/configs/tseries.h
-F:     configs/tseries_mmc_defconfig
-F:     configs/tseries_nand_defconfig
-F:     configs/tseries_spi_defconfig
similarity index 85%
rename from board/hardkernel/odroid-c2/Kconfig
rename to board/amlogic/odroid-c2/Kconfig
index 687d9c6d280ea978ff13ad2a1a809312a6711e00..2b16889b0751e38b53239b670208dfff8e6e3f21 100644 (file)
@@ -4,7 +4,7 @@ config SYS_BOARD
        default "odroid-c2"
 
 config SYS_VENDOR
-       default "hardkernel"
+       default "amlogic"
 
 config SYS_CONFIG_NAME
        default "odroid-c2"
similarity index 80%
rename from board/hardkernel/odroid-c2/MAINTAINERS
rename to board/amlogic/odroid-c2/MAINTAINERS
index 23ae1e7cbc77498131f14cc1d3363edac58f8577..699850fd0ca5be4ca175a97bca29f849074aaa9b 100644 (file)
@@ -1,6 +1,6 @@
 ODROID-C2
 M:     Beniamino Galvani <b.galvani@gmail.com>
 S:     Maintained
-F:     board/hardkernel/odroid-c2/
+F:     board/amlogic/odroid-c2/
 F:     include/configs/odroid-c2.h
 F:     configs/odroid-c2_defconfig
index b22e86f6b1d29795aa642077c0daf8d0e714560f..54783501e6d565e8547d27d0ee833f1aa219f946 100644 (file)
@@ -1,5 +1,5 @@
 BCM11130 BOARD
-M:     Steve Rae <srae@broadcom.com>
+M:     Steve Rae <steve.rae@raedomain.com>
 S:     Maintained
 F:     board/broadcom/bcm28155_ap/
 F:     include/configs/bcm_ep_board.h
index 881db5bf7893832207b32733fab6f30d6d5e5584..4cf66b7e4a6af5a3af51f86c9e6b1eb10ee6023d 100644 (file)
@@ -1,5 +1,5 @@
 BCM11130_NAND BOARD
-M:     Steve Rae <srae@broadcom.com>
+M:     Steve Rae <steve.rae@raedomain.com>
 S:     Maintained
 F:     board/broadcom/bcm28155_ap/
 F:     include/configs/bcm_ep_board.h
index fdaa5393e47acf7a429f0cc0957ff5c60bdbe671..bde6337ce34fd62d14f13143aa311bdf7e682ef4 100644 (file)
@@ -1,5 +1,5 @@
 BCM23550_W1D BOARD
-M:     Steve Rae <srae@broadcom.com>
+M:     Steve Rae <steve.rae@raedomain.com>
 S:     Maintained
 F:     board/broadcom/bcm23550_w1d/
 F:     include/configs/bcm23550_w1d.h
index a74c3941b251d49409e63ecae634bf0f0c9f2aae..e1e99d0784f3f83130eeb8179a7e43184e10ab3a 100644 (file)
@@ -1,5 +1,5 @@
 BCM28155_AP BOARD
-M:     Tim Kryger <tim.kryger@linaro.org>
+M:     Steve Rae <steve.rae@raedomain.com>
 S:     Maintained
 F:     board/broadcom/bcm28155_ap/
 F:     include/configs/bcm28155_ap.h
index a4364905550d9781fffcec33a467f913b20e3a2d..c0558e7f2554911ef5056c92f0d887824cfb6d95 100644 (file)
@@ -1,5 +1,5 @@
 BCM28155_W1D BOARD
-M:     Steve Rae <srae@broadcom.com>
+M:     Steve Rae <steve.rae@raedomain.com>
 S:     Maintained
 F:     board/broadcom/bcm28155_ap/
 F:     include/configs/bcm28155_ap.h
index b5f0207140dabd4f5a79fb8a66f735c7293e2021..8b831d8cb7a5edc98b1aa4206c1628e11bc8ffa5 100644 (file)
@@ -1,5 +1,5 @@
 BCM911360_ENTPHN-NS BOARD
-M:     Steve Rae <srae@broadcom.com>
+M:     Steve Rae <steve.rae@raedomain.com>
 S:     Maintained
 F:     board/broadcom/bcmcygnus/
 F:     include/configs/bcm_ep_board.h
index fb7ee2bbc6ec80b2f80f9b54d5ff5725f5248f37..d4f6aefe48856b26148b93d344c21288c9bc99ed 100644 (file)
@@ -1,5 +1,5 @@
 BCM911360_ENTPHN BOARD
-M:     Steve Rae <srae@broadcom.com>
+M:     Steve Rae <steve.rae@raedomain.com>
 S:     Maintained
 F:     board/broadcom/bcmcygnus/
 F:     include/configs/bcm_ep_board.h
index 754a15f0c75ac9d76cf85469799bfab559d610e0..32e60327cfc3969479b8e9e617981051c021d35a 100644 (file)
@@ -1,5 +1,5 @@
 BCM911360K BOARD
-M:     Steve Rae <srae@broadcom.com>
+M:     Steve Rae <steve.rae@raedomain.com>
 S:     Maintained
 F:     board/broadcom/bcmcygnus/
 F:     include/configs/bcm_ep_board.h
index 763401a3f1d661f448c2531a7c6a8eb89a0925d1..237d3446292bc4c39e3e5b410fb59ca716ef1c74 100644 (file)
@@ -1,5 +1,5 @@
 BCM958300K-NS BOARD
-M:     Steve Rae <srae@broadcom.com>
+M:     Steve Rae <steve.rae@raedomain.com>
 S:     Maintained
 F:     board/broadcom/bcmcygnus/
 F:     include/configs/bcm_ep_board.h
index 8afc728a25a8dc72304f7c91bde742dfae73f8d1..bbb6d64e1f064c0ee033fbedb633284f8adf1693 100644 (file)
@@ -1,5 +1,5 @@
 BCM958300K BOARD
-M:     Steve Rae <srae@broadcom.com>
+M:     Steve Rae <steve.rae@raedomain.com>
 S:     Maintained
 F:     board/broadcom/bcmcygnus/
 F:     include/configs/bcm_ep_board.h
index 179fd4ee9e82ba72f0c9422b140edaca23c3671b..5ca0effc00d39e2af39766070ea57b57177b3b50 100644 (file)
@@ -1,5 +1,5 @@
 BCM958305K BOARD
-M:     Steve Rae <srae@broadcom.com>
+M:     Steve Rae <steve.rae@raedomain.com>
 S:     Maintained
 F:     board/broadcom/bcmcygnus/
 F:     include/configs/bcm_ep_board.h
index d08aded83f2df279b7ab951b2135b22aabd80aab..de44dd1159850d894d75488f5e0fc7e960dcd04c 100644 (file)
@@ -1,5 +1,5 @@
 BCM958622HR BOARD
-M:     Steve Rae <srae@broadcom.com>
+M:     Steve Rae <steve.rae@raedomain.com>
 S:     Maintained
 F:     board/broadcom/bcmnsp/
 F:     include/configs/bcm_ep_board.h
index 9d5266151b03f4ece34594f3c04376cb135df47b..d4416e64683c939dc1eebbd98c8a051eb1b5e208 100644 (file)
  * 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
 
 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,
+};
index 47a60a72acaf77cbc36e60655a3d80918247f8c1..78a7946836ef5b2a1aabd00bc8636b5237a331f7 100644 (file)
  */
 
 #include <common.h>
+#include <dm.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9_sdramc.h>
 #include <asm/arch/at91sam9260_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
 #include <asm/arch/at91_common.h>
+#include <asm/arch/atmel_serial.h>
 #include <asm/arch/at91_spi.h>
 #include <spi.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
+#include <asm/gpio.h>
 #include <watchdog.h>
-#ifdef CONFIG_MACB
 # include <net.h>
+#ifndef CONFIG_DM_ETH
 # include <netdev.h>
 #endif
 
 DECLARE_GLOBAL_DATA_PTR;
 
+static void smartweb_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_PA26, "ena PHY");
+}
+
 static void smartweb_nand_hw_init(void)
 {
        struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC;
@@ -65,7 +75,6 @@ static void smartweb_nand_hw_init(void)
        at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
 }
 
-#ifdef CONFIG_MACB
 static void smartweb_macb_hw_init(void)
 {
        struct at91_port *pioa = (struct at91_port *)ATMEL_BASE_PIOA;
@@ -108,7 +117,6 @@ static void smartweb_macb_hw_init(void)
        /* Initialize EMAC=MACB hardware */
        at91_macb_hw_init();
 }
-#endif /* CONFIG_MACB */
 
 #ifdef CONFIG_USB_GADGET_AT91
 #include <linux/usb/at91_udc.h>
@@ -133,11 +141,13 @@ int board_early_init_f(void)
 {
        /* enable this here, as we have SPL without serial support */
        at91_seriald_hw_init();
+       smartweb_request_gpio();
        return 0;
 }
 
 int board_init(void)
 {
+       smartweb_request_gpio();
        /* power LED red */
        at91_set_gpio_output(AT91_PIN_PC6, 0);
        at91_set_gpio_output(AT91_PIN_PC7, 1);
@@ -157,9 +167,7 @@ int board_init(void)
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
        smartweb_nand_hw_init();
-#ifdef CONFIG_MACB
        smartweb_macb_hw_init();
-#endif
        return 0;
 }
 
@@ -171,12 +179,14 @@ int dram_init(void)
        return 0;
 }
 
+#ifndef CONFIG_DM_ETH
 #ifdef CONFIG_MACB
 int board_eth_init(bd_t *bis)
 {
        return macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC0, 0x00);
 }
 #endif /* CONFIG_MACB */
+#endif
 
 #if defined(CONFIG_SPL_BUILD)
 #include <spl.h>
@@ -192,8 +202,9 @@ void matrix_init(void)
                        &mat->scfg[3]);
 }
 
-void spl_board_init(void)
+void at91_spl_board_init(void)
 {
+       smartweb_request_gpio();
        /* power LED orange */
        at91_set_gpio_output(AT91_PIN_PC6, 1);
        at91_set_gpio_output(AT91_PIN_PC7, 1);
@@ -245,3 +256,12 @@ void mem_init(void)
        sdramc_initialize(ATMEL_BASE_CS1, &setting);
 }
 #endif
+
+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,
+};
index b0385d8a6e33ffdedbd4f350c29785c52a82dfec..8da24be56838a23e064055fe3bfbea3eb78fb321 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <command.h>
 #include <common.h>
+#include <dm.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9260_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/at91sam9_sdramc.h>
+#include <asm/arch/atmel_serial.h>
 #include <asm/arch/clk.h>
+#include <asm/gpio.h>
 #include <linux/mtd/nand.h>
 #include <atmel_mci.h>
 #include <asm/arch/at91_spi.h>
 #include <spi.h>
 
 #include <net.h>
+#ifndef CONFIG_DM_ETH
 #include <netdev.h>
+#endif
 
 DECLARE_GLOBAL_DATA_PTR;
 
+static void taurus_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_PA25, "ena PHY");
+}
+
 static void taurus_nand_hw_init(void)
 {
        struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC;
@@ -265,6 +277,7 @@ int board_early_init_f(void)
        at91_periph_clk_enable(ATMEL_ID_PIOC);
 
        at91_seriald_hw_init();
+       taurus_request_gpio();
 
        return 0;
 }
@@ -308,6 +321,7 @@ int board_init(void)
        /* adress of boot parameters */
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
+       taurus_request_gpio();
 #ifdef CONFIG_CMD_NAND
        taurus_nand_hw_init();
 #endif
@@ -330,6 +344,7 @@ int dram_init(void)
        return 0;
 }
 
+#ifndef CONFIG_DM_ETH
 int board_eth_init(bd_t *bis)
 {
        int rc = 0;
@@ -338,6 +353,7 @@ int board_eth_init(bd_t *bis)
 #endif
        return rc;
 }
+#endif
 
 #if !defined(CONFIG_SPL_BUILD)
 #if defined(CONFIG_BOARD_AXM)
@@ -432,3 +448,12 @@ U_BOOT_CMD(
 );
 #endif
 #endif
+
+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,
+};
index 11ef3caf39081e7ec219ea205ae394a76c93b262..97374bdc12ae1b07d0038d7f4a35293b8c1751dc 100644 (file)
@@ -29,15 +29,6 @@ config NOR
          In practice this is seen as a NOR flash module connected to the
          "memory cape" for the BeagleBone family.
 
-config NOR_BOOT
-       bool "Support for booting from NOR flash"
-       depends on NOR
-       help
-         Enabling this will make a U-Boot binary that is capable of being
-         booted via NOR.  In this case we will enable certain pinmux early
-         as the ROM only partially sets up pinmux.  We also default to using
-         NOR for environment.
-
 source "board/ti/common/Kconfig"
 
 endif
index c8b10131f945df775e10d1a72accdbd0e3fc259a..3d7438e5277e5ff99b6ce8aa0d8a6fc0522b628c 100644 (file)
@@ -311,8 +311,8 @@ U_BOOT_CMD(
  * only HUSH can understand them.
  */
 
-#if !defined(CONFIG_SYS_HUSH_PARSER)
-#error CONFIG_CMD_HD44760 requires CONFIG_SYS_HUSH_PARSER
+#if !defined(CONFIG_HUSH_PARSER)
+#error CONFIG_CMD_HD44760 requires CONFIG_HUSH_PARSER
 #endif
 
 static int do_hd44780(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
index 42e0e39e75c2b436b2c104152a74cb5fe7ecf5bd..d69b817c827b3dd374efe871c8f4f0a5ffc459d6 100644 (file)
@@ -13,7 +13,6 @@ config CMDLINE
 
 config HUSH_PARSER
        bool "Use hush shell"
-       select SYS_HUSH_PARSER
        depends on CMDLINE
        help
          This option enables the "hush" shell (from Busybox) as command line
@@ -24,11 +23,6 @@ config HUSH_PARSER
          If disabled, you get the old, much simpler behaviour with a somewhat
          smaller memory footprint.
 
-config SYS_HUSH_PARSER
-       bool
-       help
-         Backward compatibility.
-
 config SYS_PROMPT
        string "Shell prompt"
        default "=> "
index 9ce7861f8226b49db9ec484e5e70a81557b746e4..a1731be70127b96c997a819e65733448f96e6ed7 100644 (file)
@@ -49,7 +49,7 @@ obj-$(CONFIG_ENV_IS_IN_EEPROM) += eeprom.o
 obj-$(CONFIG_CMD_EEPROM) += eeprom.o
 obj-$(CONFIG_EFI_STUB) += efi.o
 obj-$(CONFIG_CMD_ELF) += elf.o
-obj-$(CONFIG_SYS_HUSH_PARSER) += exit.o
+obj-$(CONFIG_HUSH_PARSER) += exit.o
 obj-$(CONFIG_CMD_EXT4) += ext4.o
 obj-$(CONFIG_CMD_EXT2) += ext2.o
 obj-$(CONFIG_CMD_FAT) += fat.o
@@ -123,7 +123,7 @@ obj-$(CONFIG_CMD_STRINGS) += strings.o
 obj-$(CONFIG_CMD_TERMINAL) += terminal.o
 obj-$(CONFIG_CMD_TIME) += time.o
 obj-$(CONFIG_CMD_TRACE) += trace.o
-obj-$(CONFIG_SYS_HUSH_PARSER) += test.o
+obj-$(CONFIG_HUSH_PARSER) += test.o
 obj-$(CONFIG_CMD_TPM) += tpm.o
 obj-$(CONFIG_CMD_TPM_TEST) += tpm_test.o
 obj-$(CONFIG_CMD_TSI148) += tsi148.o
index 216906527fe8f5c78bf87a9af6f00426aa7d327e..011f62c5b1ca76a409a96cb61581273c9c3c2b07 100644 (file)
@@ -255,7 +255,7 @@ static char bootefi_help_text[] =
 
 U_BOOT_CMD(
        bootefi, 3, 0, do_bootefi,
-       "Boots an EFI payload from memory\n",
+       "Boots an EFI payload from memory",
        bootefi_help_text
 );
 
index f5e91f40a9bf0a2a167d52ab7a215fbbd6b7ab23..16fdea5507be7786299cedf9ac27a2751323add2 100644 (file)
@@ -275,6 +275,12 @@ static int image_info(ulong addr)
                puts("OK\n");
                return 0;
 #endif
+#if defined(CONFIG_ANDROID_BOOT_IMAGE)
+       case IMAGE_FORMAT_ANDROID:
+               puts("   Android image found\n");
+               android_print_contents(hdr);
+               return 0;
+#endif
 #if defined(CONFIG_FIT)
        case IMAGE_FORMAT_FIT:
                puts("   FIT image found\n");
index ada4ddbe2c01a0b57e1e46d2335a01e18ee4d761..af7ead88cca1b7db7cab5157eb5986614722d12a 100644 (file)
@@ -97,6 +97,67 @@ config BOOTSTAGE_STASH_SIZE
 
 endmenu
 
+menu "Boot media"
+
+config NOR_BOOT
+       bool "Support for booting from NOR flash"
+       depends on NOR
+       help
+         Enabling this will make a U-Boot binary that is capable of being
+         booted via NOR.  In this case we will enable certain pinmux early
+         as the ROM only partially sets up pinmux.  We also default to using
+         NOR for environment.
+
+config NAND_BOOT
+       bool "Support for booting from NAND flash"
+       default n
+       help
+         Enabling this will make a U-Boot binary that is capable of being
+         booted via NAND flash. This is not a must, some SoCs need this,
+         somes not.
+
+config ONENAND_BOOT
+       bool "Support for booting from ONENAND"
+       default n
+       help
+         Enabling this will make a U-Boot binary that is capable of being
+         booted via ONENAND. This is not a must, some SoCs need this,
+         somes not.
+
+config QSPI_BOOT
+       bool "Support for booting from QSPI flash"
+       default n
+       help
+         Enabling this will make a U-Boot binary that is capable of being
+         booted via QSPI flash. This is not a must, some SoCs need this,
+         somes not.
+
+config SATA_BOOT
+       bool "Support for booting from SATA"
+       default n
+       help
+         Enabling this will make a U-Boot binary that is capable of being
+         booted via SATA. This is not a must, some SoCs need this,
+         somes not.
+
+config SD_BOOT
+       bool "Support for booting from SD/EMMC"
+       default n
+       help
+         Enabling this will make a U-Boot binary that is capable of being
+         booted via SD/EMMC. This is not a must, some SoCs need this,
+         somes not.
+
+config SPI_BOOT
+       bool "Support for booting from SPI flash"
+       default n
+       help
+         Enabling this will make a U-Boot binary that is capable of being
+         booted via SPI flash. This is not a must, some SoCs need this,
+         somes not.
+
+endmenu
+
 config BOOTDELAY
        int "delay in seconds before automatically booting"
        default 2
index 34cb8987eb6e745b0b267d841d442f380718ef41..e08cd3e74d7dc32e29ce79e286d16b07dc1943d8 100644 (file)
@@ -11,10 +11,7 @@ obj-y += init/
 obj-y += main.o
 obj-y += exports.o
 obj-y += hash.o
-ifdef CONFIG_SYS_HUSH_PARSER
-obj-y += cli_hush.o
-endif
-
+obj-$(CONFIG_HUSH_PARSER) += cli_hush.o
 obj-$(CONFIG_AUTOBOOT) += autoboot.o
 
 # This option is not just y/n - it can have a numeric value
index 18d7e198a88235bd06fc82b6466d6bb865286071..a433ef21663cfb112cb6acd40e38057f22acab1e 100644 (file)
@@ -28,7 +28,7 @@ DECLARE_GLOBAL_DATA_PTR;
  */
 int run_command(const char *cmd, int flag)
 {
-#ifndef CONFIG_SYS_HUSH_PARSER
+#ifndef CONFIG_HUSH_PARSER
        /*
         * cli_run_command can return 0 or 1 for success, so clean up
         * its result.
@@ -55,7 +55,7 @@ int run_command(const char *cmd, int flag)
  */
 int run_command_repeatable(const char *cmd, int flag)
 {
-#ifndef CONFIG_SYS_HUSH_PARSER
+#ifndef CONFIG_HUSH_PARSER
        return cli_simple_run_command(cmd, flag);
 #else
        /*
@@ -79,7 +79,7 @@ int run_command_list(const char *cmd, int len, int flag)
 
        if (len == -1) {
                len = strlen(cmd);
-#ifdef CONFIG_SYS_HUSH_PARSER
+#ifdef CONFIG_HUSH_PARSER
                /* hush will never change our string */
                need_buff = 0;
 #else
@@ -94,7 +94,7 @@ int run_command_list(const char *cmd, int len, int flag)
                memcpy(buff, cmd, len);
                buff[len] = '\0';
        }
-#ifdef CONFIG_SYS_HUSH_PARSER
+#ifdef CONFIG_HUSH_PARSER
        rcode = parse_string_outer(buff, FLAG_PARSE_SEMICOLON);
 #else
        /*
@@ -214,7 +214,7 @@ err:
 
 void cli_loop(void)
 {
-#ifdef CONFIG_SYS_HUSH_PARSER
+#ifdef CONFIG_HUSH_PARSER
        parse_file_outer();
        /* This point is never reached */
        for (;;);
@@ -222,12 +222,12 @@ void cli_loop(void)
        cli_simple_loop();
 #else
        printf("## U-Boot command line is disabled. Please enable CONFIG_CMDLINE\n");
-#endif /*CONFIG_SYS_HUSH_PARSER*/
+#endif /*CONFIG_HUSH_PARSER*/
 }
 
 void cli_init(void)
 {
-#ifdef CONFIG_SYS_HUSH_PARSER
+#ifdef CONFIG_HUSH_PARSER
        u_boot_hush_start();
 #endif
 
index ce748ed8c7957c7e3009067c6b162e670189bcd9..adefa7dc991ee5f7cd4f415cd79223803bf38a16 100644 (file)
@@ -25,6 +25,7 @@
 #include <environment.h>
 #include <linux/stddef.h>
 #include <malloc.h>
+#include <memalign.h>
 #include <search.h>
 #include <errno.h>
 #include <ext4fs.h>
@@ -49,7 +50,7 @@ int env_init(void)
 int saveenv(void)
 {
        env_t   env_new;
-       block_dev_desc_t *dev_desc = NULL;
+       struct blk_desc *dev_desc = NULL;
        disk_partition_t info;
        int dev, part;
        int err;
@@ -58,13 +59,13 @@ int saveenv(void)
        if (err)
                return err;
 
-       part = get_device_and_partition(EXT4_ENV_INTERFACE,
+       part = blk_get_device_part_str(EXT4_ENV_INTERFACE,
                                        EXT4_ENV_DEVICE_AND_PART,
                                        &dev_desc, &info, 1);
        if (part < 0)
                return 1;
 
-       dev = dev_desc->dev;
+       dev = dev_desc->devnum;
        ext4fs_set_blk_dev(dev_desc, &info);
 
        if (!ext4fs_mount(info.size)) {
@@ -90,18 +91,19 @@ int saveenv(void)
 void env_relocate_spec(void)
 {
        ALLOC_CACHE_ALIGN_BUFFER(char, buf, CONFIG_ENV_SIZE);
-       block_dev_desc_t *dev_desc = NULL;
+       struct blk_desc *dev_desc = NULL;
        disk_partition_t info;
        int dev, part;
        int err;
+       loff_t off;
 
-       part = get_device_and_partition(EXT4_ENV_INTERFACE,
+       part = blk_get_device_part_str(EXT4_ENV_INTERFACE,
                                        EXT4_ENV_DEVICE_AND_PART,
                                        &dev_desc, &info, 1);
        if (part < 0)
                goto err_env_relocate;
 
-       dev = dev_desc->dev;
+       dev = dev_desc->devnum;
        ext4fs_set_blk_dev(dev_desc, &info);
 
        if (!ext4fs_mount(info.size)) {
@@ -110,7 +112,7 @@ void env_relocate_spec(void)
                goto err_env_relocate;
        }
 
-       err = ext4_read_file(EXT4_ENV_FILE, buf, 0, CONFIG_ENV_SIZE);
+       err = ext4_read_file(EXT4_ENV_FILE, buf, 0, CONFIG_ENV_SIZE, &off);
        ext4fs_close();
 
        if (err == -1) {
index e3abcc85beea94dd26d5ee0a2cb51fd8616e7542..c739651009b0f806b68bcc998f96d7fa3bd6a757 100644 (file)
@@ -7,12 +7,10 @@
 #include <config.h>
 #include <common.h>
 #include <blk.h>
-#include <errno.h>
 #include <fastboot.h>
 #include <fb_mmc.h>
 #include <image-sparse.h>
 #include <part.h>
-#include <sparse_format.h>
 #include <mmc.h>
 #include <div64.h>
 
@@ -20,8 +18,6 @@
 #define CONFIG_FASTBOOT_GPT_NAME GPT_ENTRY_NAME
 #endif
 
-static char *response_str;
-
 struct fb_mmc_sparse {
        struct blk_desc *dev_desc;
 };
@@ -48,22 +44,19 @@ static int part_get_info_efi_by_name_or_alias(struct blk_desc *dev_desc,
        return ret;
 }
 
-
-static int fb_mmc_sparse_write(struct sparse_storage *storage,
-                              void *priv,
-                              unsigned int offset,
-                              unsigned int size,
-                              char *data)
+static lbaint_t fb_mmc_sparse_write(struct sparse_storage *info,
+               lbaint_t blk, lbaint_t blkcnt, const void *buffer)
 {
-       struct fb_mmc_sparse *sparse = priv;
+       struct fb_mmc_sparse *sparse = info->priv;
        struct blk_desc *dev_desc = sparse->dev_desc;
-       int ret;
 
-       ret = blk_dwrite(dev_desc, offset, size, data);
-       if (!ret)
-               return -EIO;
+       return blk_dwrite(dev_desc, blk, blkcnt, buffer);
+}
 
-       return ret;
+static lbaint_t fb_mmc_sparse_reserve(struct sparse_storage *info,
+               lbaint_t blk, lbaint_t blkcnt)
+{
+       return blkcnt;
 }
 
 static void write_raw_image(struct blk_desc *dev_desc, disk_partition_t *info,
@@ -79,7 +72,7 @@ static void write_raw_image(struct blk_desc *dev_desc, disk_partition_t *info,
 
        if (blkcnt > info->size) {
                error("too large for partition: '%s'\n", part_name);
-               fastboot_fail(response_str, "too large for partition");
+               fastboot_fail("too large for partition");
                return;
        }
 
@@ -88,29 +81,25 @@ static void write_raw_image(struct blk_desc *dev_desc, disk_partition_t *info,
        blks = blk_dwrite(dev_desc, info->start, blkcnt, buffer);
        if (blks != blkcnt) {
                error("failed writing to device %d\n", dev_desc->devnum);
-               fastboot_fail(response_str, "failed writing to device");
+               fastboot_fail("failed writing to device");
                return;
        }
 
        printf("........ wrote " LBAFU " bytes to '%s'\n", blkcnt * info->blksz,
               part_name);
-       fastboot_okay(response_str, "");
+       fastboot_okay("");
 }
 
-void fb_mmc_flash_write(const char *cmd, unsigned int session_id,
-                       void *download_buffer, unsigned int download_bytes,
-                       char *response)
+void fb_mmc_flash_write(const char *cmd, void *download_buffer,
+                       unsigned int download_bytes)
 {
        struct blk_desc *dev_desc;
        disk_partition_t info;
 
-       /* initialize the response buffer */
-       response_str = response;
-
        dev_desc = blk_get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV);
        if (!dev_desc || dev_desc->type == DEV_TYPE_UNKNOWN) {
                error("invalid mmc device\n");
-               fastboot_fail(response_str, "invalid mmc device");
+               fastboot_fail("invalid mmc device");
                return;
        }
 
@@ -120,50 +109,49 @@ void fb_mmc_flash_write(const char *cmd, unsigned int session_id,
                if (is_valid_gpt_buf(dev_desc, download_buffer)) {
                        printf("%s: invalid GPT - refusing to write to flash\n",
                               __func__);
-                       fastboot_fail(response_str, "invalid GPT partition");
+                       fastboot_fail("invalid GPT partition");
                        return;
                }
                if (write_mbr_and_gpt_partitions(dev_desc, download_buffer)) {
                        printf("%s: writing GPT partitions failed\n", __func__);
-                       fastboot_fail(response_str,
+                       fastboot_fail(
                                      "writing GPT partitions failed");
                        return;
                }
                printf("........ success\n");
-               fastboot_okay(response_str, "");
+               fastboot_okay("");
                return;
        } else if (part_get_info_efi_by_name_or_alias(dev_desc, cmd, &info)) {
                error("cannot find partition: '%s'\n", cmd);
-               fastboot_fail(response_str, "cannot find partition");
+               fastboot_fail("cannot find partition");
                return;
        }
 
        if (is_sparse_image(download_buffer)) {
                struct fb_mmc_sparse sparse_priv;
-               sparse_storage_t sparse;
+               struct sparse_storage sparse;
 
                sparse_priv.dev_desc = dev_desc;
 
-               sparse.block_sz = info.blksz;
+               sparse.blksz = info.blksz;
                sparse.start = info.start;
                sparse.size = info.size;
-               sparse.name = cmd;
                sparse.write = fb_mmc_sparse_write;
+               sparse.reserve = fb_mmc_sparse_reserve;
 
                printf("Flashing sparse image at offset " LBAFU "\n",
-                      info.start);
+                      sparse.start);
 
-               store_sparse_image(&sparse, &sparse_priv, session_id,
-                                  download_buffer);
+               sparse.priv = &sparse_priv;
+               write_sparse_image(&sparse, cmd, download_buffer,
+                                  download_bytes);
        } else {
                write_raw_image(dev_desc, &info, cmd, download_buffer,
                                download_bytes);
        }
-
-       fastboot_okay(response_str, "");
 }
 
-void fb_mmc_erase(const char *cmd, char *response)
+void fb_mmc_erase(const char *cmd)
 {
        int ret;
        struct blk_desc *dev_desc;
@@ -173,24 +161,21 @@ void fb_mmc_erase(const char *cmd, char *response)
 
        if (mmc == NULL) {
                error("invalid mmc device");
-               fastboot_fail(response_str, "invalid mmc device");
+               fastboot_fail("invalid mmc device");
                return;
        }
 
-       /* initialize the response buffer */
-       response_str = response;
-
        dev_desc = blk_get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV);
        if (!dev_desc || dev_desc->type == DEV_TYPE_UNKNOWN) {
                error("invalid mmc device");
-               fastboot_fail(response_str, "invalid mmc device");
+               fastboot_fail("invalid mmc device");
                return;
        }
 
        ret = part_get_info_efi_by_name_or_alias(dev_desc, cmd, &info);
        if (ret) {
                error("cannot find partition: '%s'", cmd);
-               fastboot_fail(response_str, "cannot find partition");
+               fastboot_fail("cannot find partition");
                return;
        }
 
@@ -209,11 +194,11 @@ void fb_mmc_erase(const char *cmd, char *response)
        blks = dev_desc->block_erase(dev_desc, blks_start, blks_size);
        if (blks != blks_size) {
                error("failed erasing from device %d", dev_desc->devnum);
-               fastboot_fail(response_str, "failed erasing from device");
+               fastboot_fail("failed erasing from device");
                return;
        }
 
        printf("........ erased " LBAFU " bytes from '%s'\n",
               blks_size * info.blksz, cmd);
-       fastboot_okay(response_str, "");
+       fastboot_okay("");
 }
index ae34f4891b6e9fc55d78e42d8687af7586be780b..c8c79e92383762138294f1124c58ade2cb329902 100644 (file)
 
 #include <fastboot.h>
 #include <image-sparse.h>
-#include <sparse_format.h>
 
 #include <linux/mtd/mtd.h>
 #include <jffs2/jffs2.h>
 #include <nand.h>
 
-static char *response_str;
-
 struct fb_nand_sparse {
-       struct mtd_info         *nand;
+       struct mtd_info         *mtd;
        struct part_info        *part;
 };
 
@@ -33,7 +30,7 @@ __weak int board_fastboot_write_partition_setup(char *name)
        return 0;
 }
 
-static int fb_nand_lookup(const char *partname, char *response,
+static int fb_nand_lookup(const char *partname,
                          struct mtd_info **mtd,
                          struct part_info **part)
 {
@@ -44,21 +41,21 @@ static int fb_nand_lookup(const char *partname, char *response,
        ret = mtdparts_init();
        if (ret) {
                error("Cannot initialize MTD partitions\n");
-               fastboot_fail(response_str, "cannot init mtdparts");
+               fastboot_fail("cannot init mtdparts");
                return ret;
        }
 
        ret = find_dev_and_part(partname, &dev, &pnum, part);
        if (ret) {
                error("cannot find partition: '%s'", partname);
-               fastboot_fail(response_str, "cannot find partition");
+               fastboot_fail("cannot find partition");
                return ret;
        }
 
        if (dev->id->type != MTD_DEV_TYPE_NAND) {
                error("partition '%s' is not stored on a NAND device",
                      partname);
-               fastboot_fail(response_str, "not a NAND device");
+               fastboot_fail("not a NAND device");
                return -EINVAL;
        }
 
@@ -105,42 +102,60 @@ static int _fb_nand_write(struct mtd_info *mtd, struct part_info *part,
                                   buffer, flags);
 }
 
-static int fb_nand_sparse_write(struct sparse_storage *storage,
-                               void *priv,
-                               unsigned int offset,
-                               unsigned int size,
-                               char *data)
+static lbaint_t fb_nand_sparse_write(struct sparse_storage *info,
+               lbaint_t blk, lbaint_t blkcnt, const void *buffer)
 {
-       struct fb_nand_sparse *sparse = priv;
+       struct fb_nand_sparse *sparse = info->priv;
        size_t written;
        int ret;
 
-       ret = _fb_nand_write(sparse->nand, sparse->part, data,
-                            offset * storage->block_sz,
-                            size * storage->block_sz, &written);
+       ret = _fb_nand_write(sparse->mtd, sparse->part, (void *)buffer,
+                            blk * info->blksz,
+                            blkcnt * info->blksz, &written);
        if (ret < 0) {
                printf("Failed to write sparse chunk\n");
                return ret;
        }
 
-       return written / storage->block_sz;
+/* TODO - verify that the value "written" includes the "bad-blocks" ... */
+
+       /*
+        * the return value must be 'blkcnt' ("good-blocks") plus the
+        * number of "bad-blocks" encountered within this space...
+        */
+       return written / info->blksz;
+}
+
+static lbaint_t fb_nand_sparse_reserve(struct sparse_storage *info,
+               lbaint_t blk, lbaint_t blkcnt)
+{
+       int bad_blocks = 0;
+
+/*
+ * TODO - implement a function to determine the total number
+ * of blocks which must be used in order to reserve the specified
+ * number ("blkcnt") of "good-blocks", starting at "blk"...
+ * ( possibly something like the "check_skip_len()" function )
+ */
+
+       /*
+        * the return value must be 'blkcnt' ("good-blocks") plus the
+        * number of "bad-blocks" encountered within this space...
+        */
+       return blkcnt + bad_blocks;
 }
 
-void fb_nand_flash_write(const char *partname, unsigned int session_id,
-                        void *download_buffer, unsigned int download_bytes,
-                        char *response)
+void fb_nand_flash_write(const char *cmd, void *download_buffer,
+                        unsigned int download_bytes)
 {
        struct part_info *part;
        struct mtd_info *mtd = NULL;
        int ret;
 
-       /* initialize the response buffer */
-       response_str = response;
-
-       ret = fb_nand_lookup(partname, response, &mtd, &part);
+       ret = fb_nand_lookup(cmd, &mtd, &part);
        if (ret) {
                error("invalid NAND device");
-               fastboot_fail(response_str, "invalid NAND device");
+               fastboot_fail("invalid NAND device");
                return;
        }
 
@@ -150,19 +165,23 @@ void fb_nand_flash_write(const char *partname, unsigned int session_id,
 
        if (is_sparse_image(download_buffer)) {
                struct fb_nand_sparse sparse_priv;
-               sparse_storage_t sparse;
+               struct sparse_storage sparse;
 
-               sparse_priv.nand = mtd;
+               sparse_priv.mtd = mtd;
                sparse_priv.part = part;
 
-               sparse.block_sz = mtd->writesize;
-               sparse.start = part->offset / sparse.block_sz;
-               sparse.size = part->size  / sparse.block_sz;
-               sparse.name = part->name;
+               sparse.blksz = mtd->writesize;
+               sparse.start = part->offset / sparse.blksz;
+               sparse.size = part->size / sparse.blksz;
                sparse.write = fb_nand_sparse_write;
+               sparse.reserve = fb_nand_sparse_reserve;
+
+               printf("Flashing sparse image at offset " LBAFU "\n",
+                      sparse.start);
 
-               ret = store_sparse_image(&sparse, &sparse_priv, session_id,
-                                        download_buffer);
+               sparse.priv = &sparse_priv;
+               write_sparse_image(&sparse, cmd, download_buffer,
+                                  download_bytes);
        } else {
                printf("Flashing raw image at offset 0x%llx\n",
                       part->offset);
@@ -175,26 +194,23 @@ void fb_nand_flash_write(const char *partname, unsigned int session_id,
        }
 
        if (ret) {
-               fastboot_fail(response_str, "error writing the image");
+               fastboot_fail("error writing the image");
                return;
        }
 
-       fastboot_okay(response_str, "");
+       fastboot_okay("");
 }
 
-void fb_nand_erase(const char *partname, char *response)
+void fb_nand_erase(const char *cmd)
 {
        struct part_info *part;
        struct mtd_info *mtd = NULL;
        int ret;
 
-       /* initialize the response buffer */
-       response_str = response;
-
-       ret = fb_nand_lookup(partname, response, &mtd, &part);
+       ret = fb_nand_lookup(cmd, &mtd, &part);
        if (ret) {
                error("invalid NAND device");
-               fastboot_fail(response_str, "invalid NAND device");
+               fastboot_fail("invalid NAND device");
                return;
        }
 
@@ -205,9 +221,9 @@ void fb_nand_erase(const char *partname, char *response)
        ret = _fb_nand_erase(mtd, part);
        if (ret) {
                error("failed erasing from device %s", mtd->name);
-               fastboot_fail(response_str, "failed erasing from device");
+               fastboot_fail("failed erasing from device");
                return;
        }
 
-       fastboot_okay(response_str, "");
+       fastboot_okay("");
 }
index b6a94b3a30b89ce00e582da1ba81e869d5b4b0d5..ee03b96aaa83d55df3292ce5407850a62e82d1c5 100644 (file)
@@ -145,3 +145,32 @@ int android_image_get_ramdisk(const struct andr_img_hdr *hdr,
        *rd_len = hdr->ramdisk_size;
        return 0;
 }
+
+#if !defined(CONFIG_SPL_BUILD)
+/**
+ * android_print_contents - prints out the contents of the Android format image
+ * @hdr: pointer to the Android format image header
+ *
+ * android_print_contents() formats a multi line Android image contents
+ * description.
+ * The routine prints out Android image properties
+ *
+ * returns:
+ *     no returned results
+ */
+void android_print_contents(const struct andr_img_hdr *hdr)
+{
+       const char * const p = IMAGE_INDENT_STRING;
+
+       printf("%skernel size:      %x\n", p, hdr->kernel_size);
+       printf("%skernel address:   %x\n", p, hdr->kernel_addr);
+       printf("%sramdisk size:     %x\n", p, hdr->ramdisk_size);
+       printf("%sramdisk addrress: %x\n", p, hdr->ramdisk_addr);
+       printf("%ssecond size:      %x\n", p, hdr->second_size);
+       printf("%ssecond address:   %x\n", p, hdr->second_addr);
+       printf("%stags address:     %x\n", p, hdr->tags_addr);
+       printf("%spage size:        %x\n", p, hdr->page_size);
+       printf("%sname:             %s\n", p, hdr->name);
+       printf("%scmdline:          %s\n", p, hdr->cmdline);
+}
+#endif
index 2bf737b46c27b4d3c53bfb83468eecf6e0cd1d30..ddf5772cf825ca6ae2f74542491b5e0ae9e76235 100644 (file)
 
 #include <config.h>
 #include <common.h>
-#include <div64.h>
-#include <errno.h>
 #include <image-sparse.h>
+#include <div64.h>
 #include <malloc.h>
 #include <part.h>
 #include <sparse_format.h>
+#include <fastboot.h>
 
 #include <linux/math64.h>
 
-typedef struct sparse_buffer {
-       void    *data;
-       u32     length;
-       u32     repeat;
-       u16     type;
-} sparse_buffer_t;
-
-static uint32_t last_offset;
-
-static unsigned int sparse_get_chunk_data_size(sparse_header_t *sparse,
-                                              chunk_header_t *chunk)
-{
-       return chunk->total_sz - sparse->chunk_hdr_sz;
-}
+#ifndef CONFIG_FASTBOOT_FLASH_FILLBUF_SIZE
+#define CONFIG_FASTBOOT_FLASH_FILLBUF_SIZE (1024 * 512)
+#endif
 
-static unsigned int sparse_block_size_to_storage(unsigned int size,
-                                                sparse_storage_t *storage,
-                                                sparse_header_t *sparse)
+void write_sparse_image(
+               struct sparse_storage *info, const char *part_name,
+               void *data, unsigned sz)
 {
-       return (unsigned int)lldiv((uint64_t)size * sparse->blk_sz,
-                                  storage->block_sz);
-}
+       lbaint_t blk;
+       lbaint_t blkcnt;
+       lbaint_t blks;
+       uint32_t bytes_written = 0;
+       unsigned int chunk;
+       unsigned int offset;
+       unsigned int chunk_data_sz;
+       uint32_t *fill_buf = NULL;
+       uint32_t fill_val;
+       sparse_header_t *sparse_header;
+       chunk_header_t *chunk_header;
+       uint32_t total_blocks = 0;
+       int fill_buf_num_blks;
+       int i;
+       int j;
 
-static bool sparse_chunk_has_buffer(chunk_header_t *chunk)
-{
-       switch (chunk->chunk_type) {
-       case CHUNK_TYPE_RAW:
-       case CHUNK_TYPE_FILL:
-               return true;
+       fill_buf_num_blks = CONFIG_FASTBOOT_FLASH_FILLBUF_SIZE / info->blksz;
 
-       default:
-               return false;
-       }
-}
-
-static sparse_header_t *sparse_parse_header(void **data)
-{
        /* Read and skip over sparse image header */
-       sparse_header_t *sparse_header = (sparse_header_t *) *data;
+       sparse_header = (sparse_header_t *)data;
 
-       *data += sparse_header->file_hdr_sz;
+       data += sparse_header->file_hdr_sz;
+       if (sparse_header->file_hdr_sz > sizeof(sparse_header_t)) {
+               /*
+                * Skip the remaining bytes in a header that is longer than
+                * we expected.
+                */
+               data += (sparse_header->file_hdr_sz - sizeof(sparse_header_t));
+       }
 
        debug("=== Sparse Image Header ===\n");
        debug("magic: 0x%x\n", sparse_header->magic);
@@ -97,300 +93,172 @@ static sparse_header_t *sparse_parse_header(void **data)
        debug("total_blks: %d\n", sparse_header->total_blks);
        debug("total_chunks: %d\n", sparse_header->total_chunks);
 
-       return sparse_header;
-}
-
-static int sparse_parse_fill_chunk(sparse_header_t *sparse,
-                                  chunk_header_t *chunk)
-{
-       unsigned int chunk_data_sz = sparse_get_chunk_data_size(sparse, chunk);
-
-       if (chunk_data_sz != sizeof(uint32_t))
-               return -EINVAL;
-
-       return 0;
-}
-
-static int sparse_parse_raw_chunk(sparse_header_t *sparse,
-                                 chunk_header_t *chunk)
-{
-       unsigned int chunk_data_sz = sparse_get_chunk_data_size(sparse, chunk);
-
-       /* Check if the data size is a multiple of the main block size */
-       if (chunk_data_sz % sparse->blk_sz)
-               return -EINVAL;
-
-       /* Check that the chunk size is consistent */
-       if ((chunk_data_sz / sparse->blk_sz) != chunk->chunk_sz)
-               return -EINVAL;
-
-       return 0;
-}
-
-static chunk_header_t *sparse_parse_chunk(sparse_header_t *sparse,
-                                         void **image)
-{
-       chunk_header_t *chunk = (chunk_header_t *) *image;
-       int ret;
-
-       debug("=== Chunk Header ===\n");
-       debug("chunk_type: 0x%x\n", chunk->chunk_type);
-       debug("chunk_data_sz: 0x%x\n", chunk->chunk_sz);
-       debug("total_size: 0x%x\n", chunk->total_sz);
-
-       switch (chunk->chunk_type) {
-       case CHUNK_TYPE_RAW:
-               ret = sparse_parse_raw_chunk(sparse, chunk);
-               if (ret)
-                       return NULL;
-               break;
-
-       case CHUNK_TYPE_FILL:
-               ret = sparse_parse_fill_chunk(sparse, chunk);
-               if (ret)
-                       return NULL;
-               break;
-
-       case CHUNK_TYPE_DONT_CARE:
-       case CHUNK_TYPE_CRC32:
-               debug("Ignoring chunk\n");
-               break;
-
-       default:
-               printf("%s: Unknown chunk type: %x\n", __func__,
-                      chunk->chunk_type);
-               return NULL;
-       }
-
-       *image += sparse->chunk_hdr_sz;
-
-       return chunk;
-}
-
-static int sparse_get_fill_buffer(sparse_header_t *sparse,
-                                 chunk_header_t *chunk,
-                                 sparse_buffer_t *buffer,
-                                 unsigned int blk_sz,
-                                 void *data)
-{
-       int i;
-
-       buffer->type = CHUNK_TYPE_FILL;
-
-       /*
-        * We create a buffer of one block, and ask it to be
-        * repeated as many times as needed.
-        */
-       buffer->length = blk_sz;
-       buffer->repeat = (chunk->chunk_sz * sparse->blk_sz) / blk_sz;
-
-       buffer->data = memalign(ARCH_DMA_MINALIGN,
-                               ROUNDUP(blk_sz,
-                                       ARCH_DMA_MINALIGN));
-       if (!buffer->data)
-               return -ENOMEM;
-
-       for (i = 0; i < (buffer->length / sizeof(uint32_t)); i++)
-               ((uint32_t *)buffer->data)[i] = *(uint32_t *)(data);
-
-       return 0;
-}
-
-static int sparse_get_raw_buffer(sparse_header_t *sparse,
-                                chunk_header_t *chunk,
-                                sparse_buffer_t *buffer,
-                                unsigned int blk_sz,
-                                void *data)
-{
-       unsigned int chunk_data_sz = sparse_get_chunk_data_size(sparse, chunk);
-
-       buffer->type = CHUNK_TYPE_RAW;
-       buffer->length = chunk_data_sz;
-       buffer->data = data;
-       buffer->repeat = 1;
-
-       return 0;
-}
-
-static sparse_buffer_t *sparse_get_data_buffer(sparse_header_t *sparse,
-                                              chunk_header_t *chunk,
-                                              unsigned int blk_sz,
-                                              void **image)
-{
-       unsigned int chunk_data_sz = sparse_get_chunk_data_size(sparse, chunk);
-       sparse_buffer_t *buffer;
-       void *data = *image;
-       int ret;
-
-       *image += chunk_data_sz;
-
-       if (!sparse_chunk_has_buffer(chunk))
-               return NULL;
-
-       buffer = calloc(sizeof(sparse_buffer_t), 1);
-       if (!buffer)
-               return NULL;
-
-       switch (chunk->chunk_type) {
-       case CHUNK_TYPE_RAW:
-               ret = sparse_get_raw_buffer(sparse, chunk, buffer, blk_sz,
-                                           data);
-               if (ret)
-                       return NULL;
-               break;
-
-       case CHUNK_TYPE_FILL:
-               ret = sparse_get_fill_buffer(sparse, chunk, buffer, blk_sz,
-                                            data);
-               if (ret)
-                       return NULL;
-               break;
-
-       default:
-               return NULL;
-       }
-
-       debug("=== Buffer ===\n");
-       debug("length: 0x%x\n", buffer->length);
-       debug("repeat: 0x%x\n", buffer->repeat);
-       debug("type: 0x%x\n", buffer->type);
-       debug("data: 0x%p\n", buffer->data);
-
-       return buffer;
-}
-
-static void sparse_put_data_buffer(sparse_buffer_t *buffer)
-{
-       if (buffer->type == CHUNK_TYPE_FILL)
-               free(buffer->data);
-
-       free(buffer);
-}
-
-int store_sparse_image(sparse_storage_t *storage, void *storage_priv,
-                      unsigned int session_id, void *data)
-{
-       unsigned int chunk, offset;
-       sparse_header_t *sparse_header;
-       chunk_header_t *chunk_header;
-       sparse_buffer_t *buffer;
-       uint32_t start;
-       uint32_t total_blocks = 0;
-       int i;
-
-       debug("=== Storage ===\n");
-       debug("name: %s\n", storage->name);
-       debug("block_size: 0x%x\n", storage->block_sz);
-       debug("start: 0x%x\n", storage->start);
-       debug("size: 0x%x\n", storage->size);
-       debug("write: 0x%p\n", storage->write);
-       debug("priv: 0x%p\n", storage_priv);
-
-       sparse_header = sparse_parse_header(&data);
-       if (!sparse_header) {
-               printf("sparse header issue\n");
-               return -EINVAL;
-       }
-
        /*
         * Verify that the sparse block size is a multiple of our
         * storage backend block size
         */
-       div_u64_rem(sparse_header->blk_sz, storage->block_sz, &offset);
+       div_u64_rem(sparse_header->blk_sz, info->blksz, &offset);
        if (offset) {
                printf("%s: Sparse image block size issue [%u]\n",
                       __func__, sparse_header->blk_sz);
-               return -EINVAL;
+               fastboot_fail("sparse image block size issue");
+               return;
        }
 
-       /*
-        * If it's a new flashing session, start at the beginning of
-        * the partition. If not, then simply resume where we were.
-        */
-       if (session_id > 0)
-               start = last_offset;
-       else
-               start = storage->start;
-
-       printf("Flashing sparse image on partition %s at offset 0x%x (ID: %d)\n",
-              storage->name, start * storage->block_sz, session_id);
+       puts("Flashing Sparse Image\n");
 
        /* Start processing chunks */
+       blk = info->start;
        for (chunk = 0; chunk < sparse_header->total_chunks; chunk++) {
-               uint32_t blkcnt;
-
-               chunk_header = sparse_parse_chunk(sparse_header, &data);
-               if (!chunk_header) {
-                       printf("Unknown chunk type");
-                       return -EINVAL;
+               /* Read and skip over chunk header */
+               chunk_header = (chunk_header_t *)data;
+               data += sizeof(chunk_header_t);
+
+               if (chunk_header->chunk_type != CHUNK_TYPE_RAW) {
+                       debug("=== Chunk Header ===\n");
+                       debug("chunk_type: 0x%x\n", chunk_header->chunk_type);
+                       debug("chunk_data_sz: 0x%x\n", chunk_header->chunk_sz);
+                       debug("total_size: 0x%x\n", chunk_header->total_sz);
                }
 
-               /*
-                * If we have a DONT_CARE type, just skip the blocks
-                * and go on parsing the rest of the chunks
-                */
-               if (chunk_header->chunk_type == CHUNK_TYPE_DONT_CARE) {
-                       blkcnt = sparse_block_size_to_storage(chunk_header->chunk_sz,
-                                                             storage,
-                                                             sparse_header);
-#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
-                       total_blocks += blkcnt;
-#endif
-                       continue;
+               if (sparse_header->chunk_hdr_sz > sizeof(chunk_header_t)) {
+                       /*
+                        * Skip the remaining bytes in a header that is longer
+                        * than we expected.
+                        */
+                       data += (sparse_header->chunk_hdr_sz -
+                                sizeof(chunk_header_t));
                }
 
-               /* Retrieve the buffer we're going to write */
-               buffer = sparse_get_data_buffer(sparse_header, chunk_header,
-                                               storage->block_sz, &data);
-               if (!buffer)
-                       continue;
-
-               blkcnt = (buffer->length / storage->block_sz) * buffer->repeat;
+               chunk_data_sz = sparse_header->blk_sz * chunk_header->chunk_sz;
+               blkcnt = chunk_data_sz / info->blksz;
+               switch (chunk_header->chunk_type) {
+               case CHUNK_TYPE_RAW:
+                       if (chunk_header->total_sz !=
+                           (sparse_header->chunk_hdr_sz + chunk_data_sz)) {
+                               fastboot_fail(
+                                       "Bogus chunk size for chunk type Raw");
+                               return;
+                       }
 
-               if ((start + total_blocks + blkcnt) >
-                   (storage->start + storage->size)) {
-                       printf("%s: Request would exceed partition size!\n",
-                              __func__);
-                       return -EINVAL;
-               }
+                       if (blk + blkcnt > info->start + info->size) {
+                               printf(
+                                   "%s: Request would exceed partition size!\n",
+                                   __func__);
+                               fastboot_fail(
+                                   "Request would exceed partition size!");
+                               return;
+                       }
 
-               for (i = 0; i < buffer->repeat; i++) {
-                       unsigned long buffer_blk_cnt;
-                       int ret;
+                       blks = info->write(info, blk, blkcnt, data);
+                       /* blks might be > blkcnt (eg. NAND bad-blocks) */
+                       if (blks < blkcnt) {
+                               printf("%s: %s" LBAFU " [" LBAFU "]\n",
+                                      __func__, "Write failed, block #",
+                                      blk, blks);
+                               fastboot_fail(
+                                             "flash write failure");
+                               return;
+                       }
+                       blk += blks;
+                       bytes_written += blkcnt * info->blksz;
+                       total_blocks += chunk_header->chunk_sz;
+                       data += chunk_data_sz;
+                       break;
+
+               case CHUNK_TYPE_FILL:
+                       if (chunk_header->total_sz !=
+                           (sparse_header->chunk_hdr_sz + sizeof(uint32_t))) {
+                               fastboot_fail(
+                                       "Bogus chunk size for chunk type FILL");
+                               return;
+                       }
 
-                       buffer_blk_cnt = buffer->length / storage->block_sz;
+                       fill_buf = (uint32_t *)
+                                  memalign(ARCH_DMA_MINALIGN,
+                                           ROUNDUP(
+                                               info->blksz * fill_buf_num_blks,
+                                               ARCH_DMA_MINALIGN));
+                       if (!fill_buf) {
+                               fastboot_fail(
+                                       "Malloc failed for: CHUNK_TYPE_FILL");
+                               return;
+                       }
 
-                       ret = storage->write(storage, storage_priv,
-                                            start + total_blocks,
-                                            buffer_blk_cnt,
-                                            buffer->data);
-                       if (ret < 0) {
-                               printf("%s: Write %d failed %d\n",
-                                      __func__, i, ret);
-                               return ret;
+                       fill_val = *(uint32_t *)data;
+                       data = (char *)data + sizeof(uint32_t);
+
+                       for (i = 0;
+                            i < (info->blksz * fill_buf_num_blks /
+                                 sizeof(fill_val));
+                            i++)
+                               fill_buf[i] = fill_val;
+
+                       if (blk + blkcnt > info->start + info->size) {
+                               printf(
+                                   "%s: Request would exceed partition size!\n",
+                                   __func__);
+                               fastboot_fail(
+                                   "Request would exceed partition size!");
+                               return;
                        }
 
-                       total_blocks += ret;
+                       for (i = 0; i < blkcnt;) {
+                               j = blkcnt - i;
+                               if (j > fill_buf_num_blks)
+                                       j = fill_buf_num_blks;
+                               blks = info->write(info, blk, j, fill_buf);
+                               /* blks might be > j (eg. NAND bad-blocks) */
+                               if (blks < j) {
+                                       printf("%s: %s " LBAFU " [%d]\n",
+                                              __func__,
+                                              "Write failed, block #",
+                                              blk, j);
+                                       fastboot_fail(
+                                                     "flash write failure");
+                                       free(fill_buf);
+                                       return;
+                               }
+                               blk += blks;
+                               i += j;
+                       }
+                       bytes_written += blkcnt * info->blksz;
+                       total_blocks += chunk_data_sz / sparse_header->blk_sz;
+                       free(fill_buf);
+                       break;
+
+               case CHUNK_TYPE_DONT_CARE:
+                       blk += info->reserve(info, blk, blkcnt);
+                       total_blocks += chunk_header->chunk_sz;
+                       break;
+
+               case CHUNK_TYPE_CRC32:
+                       if (chunk_header->total_sz !=
+                           sparse_header->chunk_hdr_sz) {
+                               fastboot_fail(
+                                       "Bogus chunk size for chunk type Dont Care");
+                               return;
+                       }
+                       total_blocks += chunk_header->chunk_sz;
+                       data += chunk_data_sz;
+                       break;
+
+               default:
+                       printf("%s: Unknown chunk type: %x\n", __func__,
+                              chunk_header->chunk_type);
+                       fastboot_fail("Unknown chunk type");
+                       return;
                }
-
-               sparse_put_data_buffer(buffer);
        }
 
        debug("Wrote %d blocks, expected to write %d blocks\n",
-             total_blocks,
-             sparse_block_size_to_storage(sparse_header->total_blks,
-                                          storage, sparse_header));
-       printf("........ wrote %d blocks to '%s'\n", total_blocks,
-              storage->name);
+             total_blocks, sparse_header->total_blks);
+       printf("........ wrote %u bytes to '%s'\n", bytes_written, part_name);
 
-       if (total_blocks !=
-           sparse_block_size_to_storage(sparse_header->total_blks,
-                                        storage, sparse_header)) {
-               printf("sparse image write failure\n");
-               return -EIO;
-       }
-
-       last_offset = start + total_blocks;
+       if (total_blocks != sparse_header->total_blks)
+               fastboot_fail("sparse image write failure");
+       else
+               fastboot_okay("");
 
-       return 0;
+       return;
 }
index ef8583a1a64981ccdf44423b9bf257c4b117d5c5..c44f1b5dc84299639802e3a306f4a7ca3603ba68 100644 (file)
@@ -286,7 +286,7 @@ int spl_mmc_load_image(u32 boot_device)
                return err;
        }
 
-       boot_mode = spl_boot_mode();
+       boot_mode = spl_boot_mode(boot_device);
        err = -EINVAL;
        switch (boot_mode) {
        case MMCSD_MODE_EMMCBOOT:
index d5aa3a29ceac3187813c425e93a08771c4b70e43..2fe1a25c031f5389372b5088fd185d60ecf9651c 100644 (file)
@@ -5,6 +5,7 @@ CONFIG_SPL=y
 CONFIG_SPL_STACK_R=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SPI_BOOT"
+CONFIG_SPI_BOOT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
@@ -38,4 +39,3 @@ CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
 CONFIG_OF_LIBFDT=y
-CONFIG_SPL_NET_VCI_STRING="AM335x U-Boot SPL"
index 52643325513a47a37a4b508c67d0b93db76488cc..c6bc8e4fa6ada54dcf542d94458f119dca21afcb 100644 (file)
@@ -3,6 +3,7 @@ CONFIG_AM43XX=y
 CONFIG_TARGET_AM43XX_EVM=y
 CONFIG_ISW_ENTRY_ADDR=0x30000000
 CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,QSPI,QSPI_BOOT"
+CONFIG_QSPI_BOOT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
@@ -41,4 +42,3 @@ CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0403
 CONFIG_G_DNL_PRODUCT_NUM=0xbd00
 CONFIG_OF_LIBFDT=y
-CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL"
index 0e0eadf6849740c34f2b3a2776bcf089d863ff51..d1f0c7587516a02dcd17cd8c6211756f3eacb069 100644 (file)
@@ -1,8 +1,10 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_TAURUS=y
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9g20-taurus"
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G20,MACH_TYPE=2068,BOARD_AXM"
+CONFIG_HUSH_PARSER=y
 CONFIG_BOOTDELAY=3
 # CONFIG_CMD_BDI is not set
 CONFIG_CMD_BOOTZ=y
@@ -16,7 +18,8 @@ CONFIG_CMD_SPI=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
+CONFIG_OF_CONTROL=y
+CONFIG_OF_EMBED=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_USE_TINY_PRINTF=y
-CONFIG_OF_LIBFDT=y
index 3328e516a17a8fbd03179910c6734ba8308d8d9e..0ef4a37e5cb956e526f8ca4b1253fb3e529f30fc 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
 CONFIG_TARGET_BCM23550_W1D=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
@@ -17,6 +18,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DWC2_OTG=y
+CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Broadcom Corporation"
 CONFIG_G_DNL_VENDOR_NUM=0x18d1
similarity index 97%
rename from configs/tseries_mmc_defconfig
rename to configs/brppt1_mmc_defconfig
index 337404bece09ee142c2cf952b3fcee4de36550ec..f8d9de5f7a0ff2db1be276c21525593a2afddd8b 100644 (file)
@@ -1,5 +1,5 @@
 CONFIG_ARM=y
-CONFIG_TARGET_TSERIES=y
+CONFIG_TARGET_BRPPT1=y
 CONFIG_SPL=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,EMMC_BOOT"
similarity index 97%
rename from configs/tseries_nand_defconfig
rename to configs/brppt1_nand_defconfig
index 4dc029679146f52ed16e47e93a1d6303b537993c..85ddbe7204ad4e5e19d5c83b52a4c20abaa720fd 100644 (file)
@@ -1,5 +1,5 @@
 CONFIG_ARM=y
-CONFIG_TARGET_TSERIES=y
+CONFIG_TARGET_BRPPT1=y
 CONFIG_SPL=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND"
similarity index 95%
rename from configs/tseries_spi_defconfig
rename to configs/brppt1_spi_defconfig
index 5b52bf658f27228e6c8b2572126998c7ffd35754..f023ebfa2717f33314dcc45ebe1aea80c6264de5 100644 (file)
@@ -1,8 +1,9 @@
 CONFIG_ARM=y
-CONFIG_TARGET_TSERIES=y
+CONFIG_TARGET_BRPPT1=y
 CONFIG_SPL=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,SPI_BOOT,EMMC_BOOT"
+CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=0
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
similarity index 97%
rename from configs/kwb_defconfig
rename to configs/brxre1_defconfig
index 790292e7381b6f8fec09d0cf140199113a447cc9..13617d31bea063b5214aad1ca9065ba5f62d37be 100644 (file)
@@ -1,5 +1,5 @@
 CONFIG_ARM=y
-CONFIG_TARGET_KWB=y
+CONFIG_TARGET_BRXRE1=y
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1"
 CONFIG_BOOTDELAY=0
index 2efffb59851056fe57ac00d3b57e9c31ee3836f8..51d1516457e0f7ce07709fbe4b0fc7190fc2fe34 100644 (file)
@@ -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
index 80f0013bf40783c7d8a25e0162e9a19d552f0717..d74757c85d6a2b32db8f782257d50b025b2eff5f 100644 (file)
@@ -5,6 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="at91sam9g45-gurnard"
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G45"
 CONFIG_BOOTDELAY=3
+CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_BDI is not set
 # CONFIG_CMD_IMI is not set
 # CONFIG_CMD_IMLS is not set
index 1aed0c45a83efdb78041c7f37f043fab2316ad87..1d8e28b1aaaf68c48afa52ba338f5a3f2523fd8c 100644 (file)
@@ -9,6 +9,7 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
+CONFIG_QSPI_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_GREPENV=y
index 86ddf719d45c3b2b4678e65a6df082bc35b68068..bbfb118758924158802d11043b20cdfa8cc92ac8 100644 (file)
@@ -9,6 +9,7 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
+CONFIG_QSPI_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_GREPENV=y
index 38064129192902a556e910f8853a261c5dd7250a..b418d5cf9e0f7785c6dba79fbb1d0ed9cdc8a84e 100644 (file)
@@ -9,6 +9,7 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
+CONFIG_QSPI_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_GREPENV=y
index eca1cca1138fdf228cf6024545472bb25104177c..b79fc58a9033718c56ba00458f3a90ac7c01c721 100644 (file)
@@ -6,6 +6,7 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,NAND_BOOT"
+CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
index a1504c3a15b927cc0e4839a4c10fd051afdeaf75..284cc0734dc6afc8bb5d3d221a2d16229a275b1f 100644 (file)
@@ -7,6 +7,7 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
+CONFIG_QSPI_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
index f8bdfe8ec41a686e4f510a0f008bdbe2825f7a8a..b6f8d747518d448b1a77a2afe05923b0b136447a 100644 (file)
@@ -5,6 +5,7 @@ CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
index a1ee5b95c4164f37766efd700fc11bcf7a3d8045..e3abe364c49166221877c1c1dd30849db3e08c3e 100644 (file)
@@ -6,6 +6,7 @@ CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT,SD_BOOT_QSPI"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
index 0a6cbcd498a5fdaba677caed2a1e3b07e1c8e34d..7e440b2bc6241abe60969cf8fabb1475f239ec76 100644 (file)
@@ -7,6 +7,7 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
+CONFIG_QSPI_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
index 2128c464cc567028c376985ab86aa044b6b5ec6b..e735fa045d0b0af5d7b93d501ec5cdbbb009e0d9 100644 (file)
@@ -6,6 +6,7 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
index 8d1f8edef0761823ff6054f94fc1da3a8f93f8f4..6cf4dbc23731b56ceb3c065f81d03c36252c9cb3 100644 (file)
@@ -8,6 +8,7 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT,SD_BOOT_QSPI"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
index 61368878e70afa289ee111391236e6bdcf9589b9..3a95124ddc0ea1ca88dff52967411fdfc5e78c0c 100644 (file)
@@ -7,6 +7,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,RAMBOOT_PBL,SPL_FSL_PBL,NAND_BOOT"
+CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
index 2b2a71426db2497ce4f8060b9f9187dc22086d87..cfc73106c5f432eafaea74fb96c76204adc87cb2 100644 (file)
@@ -6,6 +6,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,QSPI_BOOT"
+CONFIG_QSPI_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
index f90a6be38bfdf44d30a1e72e6dbf152ed6fae019..f4f464e366f9dd9e77ecb7ef8eed226e34176936 100644 (file)
@@ -7,6 +7,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
index d85f771628747ce073cd67d9e5abb66726ef0603..0a077a3f437ac0c037f75381a0d4181d75cb8480 100644 (file)
@@ -7,6 +7,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT,SD_BOOT_QSPI"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
index c420548141dae9316d32109543069fbdbf5d786e..dcf5de20d35b1435b798fca21710bba8167e97ea 100644 (file)
@@ -7,6 +7,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,NAND_BOOT,SYS_FSL_DDR4"
+CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_MMC=y
index a5a870b18290a54d46579f1edfd24afda9155430..9fd06790dd1dd3ca12798aa827daff37040f36b0 100644 (file)
@@ -7,6 +7,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT,SYS_FSL_DDR4"
+CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_MMC=y
index 0850a68bfd3b836ac6fd47a2f5bf820549fc8d63..7826bbcb79078ee611705ae2ce777bfda46ef2be 100644 (file)
@@ -1,21 +1,19 @@
 CONFIG_ARM=y
 CONFIG_TARGET_LS2080AQDS=y
+CONFIG_DM_SPI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-qds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,QSPI_BOOT,LS2080A"
+CONFIG_QSPI_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
-CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-qds"
-CONFIG_OF_CONTROL=y
-CONFIG_OF_EMBED=y
-CONFIG_DM=y
-CONFIG_DM_SPI_FLASH=y
-CONFIG_DM_SPI=y
-CONFIG_FSL_QSPI=y
 CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
@@ -25,13 +23,15 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
-CONFIG_CMD_SF=y
+CONFIG_OF_CONTROL=y
+CONFIG_OF_EMBED=y
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_DM=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_SYS_NS16550=y
+CONFIG_FSL_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
-CONFIG_OF_LIBFDT=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
index 483d4900b78ae512929a171be02a34c9d252e62f..808bbc2b894c4b9fe107e27b7c63b299c064db8a 100644 (file)
@@ -3,6 +3,7 @@ CONFIG_ARCH_MESON=y
 CONFIG_MESON_GXBB=y
 CONFIG_TARGET_ODROID_C2=y
 CONFIG_DEFAULT_DEVICE_TREE="meson-gxbb-odroidc2"
+CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_BDI is not set
 # CONFIG_CMD_IMI is not set
 # CONFIG_CMD_IMLS is not set
index 847de635b5636deab0a516e8ff921dc9b58ce44c..dfedf82f575d9e5cf1d8a9a6065aa9a2d928281a 100644 (file)
@@ -2,5 +2,6 @@ CONFIG_ARM=y
 CONFIG_TARGET_S32V234EVB=y
 CONFIG_SYS_MALLOC_F=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/s32v234evb/s32v234evb.cfg"
+CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 CONFIG_OF_LIBFDT=y
index 1c29a290c06d967b3d855725f647d028c8e38802..cf8bff6da0896a2f588a8d5a2545ab3657d47958 100644 (file)
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_SMARTWEB=y
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9260-smartweb"
 CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9260"
@@ -16,13 +17,17 @@ CONFIG_AUTOBOOT_STOP_STR="\x1b\x1b"
 CONFIG_CMD_USB=y
 CONFIG_CMD_DFU=y
 # CONFIG_CMD_FPGA is not set
+# CONFIG_CMD_SOURCE is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_OF_EMBED=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Siemens AG"
 CONFIG_G_DNL_VENDOR_NUM=0x0908
 CONFIG_G_DNL_PRODUCT_NUM=0x02d2
-CONFIG_OF_LIBFDT=y
+# CONFIG_EFI_LOADER is not set
index e566f7f023a10625984a956f0e221c68f1f2cf17..f4515158bc8a946d130662d1602e6f181962e5bd 100644 (file)
@@ -1,8 +1,10 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_TAURUS=y
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9g20-taurus"
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G20,MACH_TYPE=2067,BOARD_TAURUS"
+CONFIG_HUSH_PARSER=y
 CONFIG_BOOTDELAY=3
 CONFIG_SYS_PROMPT="U-Boot> "
 # CONFIG_CMD_BDI is not set
@@ -19,6 +21,8 @@ CONFIG_CMD_DFU=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
+CONFIG_OF_CONTROL=y
+CONFIG_OF_EMBED=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_USB=y
@@ -28,4 +32,3 @@ CONFIG_G_DNL_MANUFACTURER="Siemens AG"
 CONFIG_G_DNL_VENDOR_NUM=0x0908
 CONFIG_G_DNL_PRODUCT_NUM=0x02d2
 CONFIG_USE_TINY_PRINTF=y
-CONFIG_OF_LIBFDT=y
index a69c0b63b1248bca3ca1a74ce54302dfec767f41..ed6239b59d650e6bb28b904e414f2e81ebb65815 100644 (file)
@@ -7,6 +7,7 @@ CONFIG_ARCH_ATH79=y
 CONFIG_BOARD_TPLINK_WDR4300=y
 CONFIG_DEFAULT_DEVICE_TREE="tplink_wdr4300"
 CONFIG_BOOTDELAY=3
+CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_ELF is not set
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_XIMG is not set
index 4b3a2552550c1ccd17423c64e34daed017bcedbc..ffa7d60156f6ee60795b6bee6e859c2830447b44 100644 (file)
@@ -151,6 +151,12 @@ the corresponding public key is written into this file for for run-time
 verification. Typically the file here is the device tree binary used by
 CONFIG_OF_CONTROL in U-Boot.
 
+.TP
+.BI "\-p [" "external position" "]"
+Place external data at a static external position. See \-E. Instead of writing
+a 'data-offset' property defining the offset from the end of the FIT, \-p will
+use 'data-position' as the absolute position from the base of the FIT.
+
 .TP
 .BI "\-r
 Specifies that keys used to sign the FIT are required. This means that they
index 3f5418045e5b6e203a8172a42d1399b6de2c61cd..91aa89a77ecb9f4e284021023404b5cfcbc59a9e 100644 (file)
@@ -282,6 +282,9 @@ In this case the 'data' property is omitted. Instead you can use:
     aligned to a 4-byte boundary.
   - data-size : size of the data in bytes
 
+The 'data-offset' property can be substituted with 'data-position', which
+defines an absolute position or address as the offset. This is helpful when
+booting U-Boot proper before performing relocation.
 
 9) Examples
 -----------
index c6bd7c64e2916c84f14404f50dd20ab56372d622..ef585037fcd493bc7d31a765d0105f911f5359e2 100644 (file)
@@ -19,7 +19,7 @@ static ulong sandbox_clk_get_rate(struct clk *clk)
 {
        struct sandbox_clk_priv *priv = dev_get_priv(clk->dev);
 
-       if (clk->id < 0 || clk->id >= SANDBOX_CLK_ID_COUNT)
+       if (clk->id >= SANDBOX_CLK_ID_COUNT)
                return -EINVAL;
 
        return priv->rate[clk->id];
@@ -30,7 +30,7 @@ static ulong sandbox_clk_set_rate(struct clk *clk, ulong rate)
        struct sandbox_clk_priv *priv = dev_get_priv(clk->dev);
        ulong old_rate;
 
-       if (clk->id < 0 || clk->id >= SANDBOX_CLK_ID_COUNT)
+       if (clk->id >= SANDBOX_CLK_ID_COUNT)
                return -EINVAL;
 
        if (!rate)
@@ -46,7 +46,7 @@ static int sandbox_clk_enable(struct clk *clk)
 {
        struct sandbox_clk_priv *priv = dev_get_priv(clk->dev);
 
-       if (clk->id < 0 || clk->id >= SANDBOX_CLK_ID_COUNT)
+       if (clk->id >= SANDBOX_CLK_ID_COUNT)
                return -EINVAL;
 
        priv->enabled[clk->id] = true;
@@ -58,7 +58,7 @@ static int sandbox_clk_disable(struct clk *clk)
 {
        struct sandbox_clk_priv *priv = dev_get_priv(clk->dev);
 
-       if (clk->id < 0 || clk->id >= SANDBOX_CLK_ID_COUNT)
+       if (clk->id >= SANDBOX_CLK_ID_COUNT)
                return -EINVAL;
 
        priv->enabled[clk->id] = false;
index 74a2663c8bf976f27b6cce2a5fe2f863cf54b8da..af6e04aa28b6926006a408ee5a3efabdad31b825 100644 (file)
@@ -121,7 +121,7 @@ static int dwmci_data_transfer(struct dwmci_host *host, struct mmc_data *data)
 
                if (host->fifo_mode && size) {
                        if (data->flags == MMC_DATA_READ) {
-                               if ((dwmci_readl(host, DWMCI_RINTSTS) &&
+                               if ((dwmci_readl(host, DWMCI_RINTSTS) &
                                     DWMCI_INTMSK_RXDR)) {
                                        len = dwmci_readl(host, DWMCI_STATUS);
                                        len = (len >> DWMCI_FIFO_SHIFT) &
@@ -133,7 +133,7 @@ static int dwmci_data_transfer(struct dwmci_host *host, struct mmc_data *data)
                                                     DWMCI_INTMSK_RXDR);
                                }
                        } else {
-                               if ((dwmci_readl(host, DWMCI_RINTSTS) &&
+                               if ((dwmci_readl(host, DWMCI_RINTSTS) &
                                     DWMCI_INTMSK_TXDR)) {
                                        len = dwmci_readl(host, DWMCI_STATUS);
                                        len = fifo_depth - ((len >>
index 74c563c49556f4483b0bcdabf88cabe87006edc9..689716753ae646f35ba697367314a7f6b0bf4001 100644 (file)
@@ -862,7 +862,6 @@ static void panic_nand_wait(struct mtd_info *mtd, struct nand_chip *chip,
  */
 static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip)
 {
-
        int status;
        unsigned long timeo = 400;
 
index 28b244a8d002c1c6d15c8372477dd755e0e35abe..2160b1ccdc3d93a658e0f28161322b4292a49aaf 100644 (file)
@@ -59,7 +59,6 @@ static inline struct f_fastboot *func_to_fastboot(struct usb_function *f)
 }
 
 static struct f_fastboot *fastboot_func;
-static unsigned int fastboot_flash_session_id;
 static unsigned int download_size;
 static unsigned int download_bytes;
 
@@ -152,16 +151,18 @@ static void rx_handler_command(struct usb_ep *ep, struct usb_request *req);
 static int strcmp_l1(const char *s1, const char *s2);
 
 
-void fastboot_fail(char *response, const char *reason)
+static char *fb_response_str;
+
+void fastboot_fail(const char *reason)
 {
-       strncpy(response, "FAIL\0", 5);
-       strncat(response, reason, FASTBOOT_RESPONSE_LEN - 4 - 1);
+       strncpy(fb_response_str, "FAIL\0", 5);
+       strncat(fb_response_str, reason, FASTBOOT_RESPONSE_LEN - 4 - 1);
 }
 
-void fastboot_okay(char *response, const char *reason)
+void fastboot_okay(const char *reason)
 {
-       strncpy(response, "OKAY\0", 5);
-       strncat(response, reason, FASTBOOT_RESPONSE_LEN - 4 - 1);
+       strncpy(fb_response_str, "OKAY\0", 5);
+       strncat(fb_response_str, reason, FASTBOOT_RESPONSE_LEN - 4 - 1);
 }
 
 static void fastboot_complete(struct usb_ep *ep, struct usb_request *req)
@@ -424,15 +425,6 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req)
 
                sprintf(str_num, "0x%08x", CONFIG_FASTBOOT_BUF_SIZE);
                strncat(response, str_num, chars_left);
-
-               /*
-                * This also indicates the start of a new flashing
-                * "session", in which we could have 1-N buffers to
-                * write to a partition.
-                *
-                * Reset our session counter.
-                */
-               fastboot_flash_session_id = 0;
        } else if (!strcmp_l1("serialno", cmd)) {
                s = getenv("serial#");
                if (s)
@@ -598,18 +590,19 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req)
                return;
        }
 
-       strcpy(response, "FAILno flash device defined");
+       /* initialize the response buffer */
+       fb_response_str = response;
+
+       fastboot_fail("no flash device defined");
 #ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
-       fb_mmc_flash_write(cmd, fastboot_flash_session_id,
-                          (void *)CONFIG_FASTBOOT_BUF_ADDR,
-                          download_bytes, response);
+       fb_mmc_flash_write(cmd, (void *)CONFIG_FASTBOOT_BUF_ADDR,
+                          download_bytes);
 #endif
 #ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV
-       fb_nand_flash_write(cmd, fastboot_flash_session_id,
+       fb_nand_flash_write(cmd,
                            (void *)CONFIG_FASTBOOT_BUF_ADDR,
-                           download_bytes, response);
+                           download_bytes);
 #endif
-       fastboot_flash_session_id++;
        fastboot_tx_write_str(response);
 }
 #endif
@@ -649,13 +642,15 @@ static void cb_erase(struct usb_ep *ep, struct usb_request *req)
                return;
        }
 
-       strcpy(response, "FAILno flash device defined");
+       /* initialize the response buffer */
+       fb_response_str = response;
 
+       fastboot_fail("no flash device defined");
 #ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
-       fb_mmc_erase(cmd, response);
+       fb_mmc_erase(cmd);
 #endif
 #ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV
-       fb_nand_erase(cmd, response);
+       fb_nand_erase(cmd);
 #endif
        fastboot_tx_write_str(response);
 }
index 4db6faa7bb8038535f6ceda1409a545966df5f14..9ecaf38a3300c3efd68e3f00f353b91c4dbe14f2 100644 (file)
                        "${kernel_addr_r} efi/boot/"BOOTEFI_NAME"; "      \
                "if fdt addr ${fdt_addr_r}; then "                        \
                        "bootefi ${kernel_addr_r} ${fdt_addr_r};"         \
-               "else"                                                    \
+               "else "                                                    \
                        "bootefi ${kernel_addr_r} ${fdtcontroladdr};"     \
                "fi\0"                                                    \
        \
index bd3c7116d5348562510ec1b540ca95c748c09f2f..8d041edbb6c8469da5f40ef07af1f2f2e8d44c8d 100644 (file)
 #define CONFIG_FASTBOOT_BUF_ADDR       CONFIG_SYS_SDRAM_BASE
 #undef CONFIG_USB_GADGET_VBUS_DRAW
 #define CONFIG_USB_GADGET_VBUS_DRAW    0
-#define CONFIG_USB_GADGET_DWC2_PHY_8_BIT
 #define CONFIG_USB_GADGET_BCM_UDC_OTG_PHY
 #define CONFIG_USBID_ADDR              0x34052c46
 
similarity index 98%
rename from include/configs/tseries.h
rename to include/configs/brppt1.h
index 8ed9eb080d6624772d01f2975c9138a1d92e384c..6a239b59a6edf5257797506b62310ccf6525d32b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * tseries.h
+ * brtpp1.h
  *
  * specific parts for B&R T-Series Motherboard
  *
@@ -9,8 +9,8 @@
  * SPDX-License-Identifier:        GPL-2.0+
  */
 
-#ifndef __CONFIG_TSERIES_H__
-#define __CONFIG_TSERIES_H__
+#ifndef __CONFIG_BRPPT1_H__
+#define __CONFIG_BRPPT1_H__
 
 #include <configs/bur_cfg_common.h>
 #include <configs/bur_am335x_common.h>
@@ -301,4 +301,4 @@ MMCARGS
 #define CONFIG_EXT4_WRITE
 #endif /* CONFIG_MMC, ... */
 
-#endif /* ! __CONFIG_TSERIES_H__ */
+#endif /* ! __CONFIG_BRPPT1_H__ */
similarity index 97%
rename from include/configs/kwb.h
rename to include/configs/brxre1.h
index 2bddc6b7df812a7354ce5b8effb767990c91704b..11f56bfb4d9da4f8c2971e1c63a28b73d1794908 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * kwb.h
+ * brxre1.h
  *
  * specific parts for B&R KWB Motherboard
  *
@@ -9,8 +9,8 @@
  * SPDX-License-Identifier:        GPL-2.0+
  */
 
-#ifndef __CONFIG_KWB_H__
-#define __CONFIG_KWB_H__
+#ifndef __CONFIG_BRXRE1_H__
+#define __CONFIG_BRXRE1_H__
 
 #include <configs/bur_cfg_common.h>
 #include <configs/bur_am335x_common.h>
@@ -140,4 +140,4 @@ BUR_COMMON_ENV \
 #define CONFIG_FAT_WRITE
 #endif /* CONFIG_MMC, ... */
 
-#endif /* __CONFIG_KWB_H__ */
+#endif /* __CONFIG_BRXRE1_H__ */
index 686760d0a532d7af3db8c2da2d9624c64bd29561..e6a811af03f835641039e4763d365f4f0081113c 100644 (file)
@@ -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
 
diff --git a/include/configs/meson-gxbb-common.h b/include/configs/meson-gxbb-common.h
new file mode 100644 (file)
index 0000000..eaf6a9c
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Configuration for Amlogic Meson GXBB SoCs
+ * (C) Copyright 2016 Beniamino Galvani <b.galvani@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __MESON_GXBB_COMMON_CONFIG_H
+#define __MESON_GXBB_COMMON_CONFIG_H
+
+#define CONFIG_CPU_ARMV8
+#define CONFIG_REMAKE_ELF
+#define CONFIG_SYS_CACHELINE_SIZE      64
+#define CONFIG_SYS_NO_FLASH
+#define CONFIG_NR_DRAM_BANKS           1
+#define CONFIG_ENV_IS_NOWHERE          1
+#define CONFIG_ENV_SIZE                        0x2000
+#define CONFIG_SYS_MAXARGS             32
+#define CONFIG_SYS_MALLOC_LEN          (32 << 20)
+#define CONFIG_SYS_CBSIZE              1024
+#define CONFIG_MISC_INIT_R
+
+#define CONFIG_SYS_SDRAM_BASE          0
+#define CONFIG_SYS_TEXT_BASE           0x01000000
+#define CONFIG_SYS_INIT_SP_ADDR                0x20000000
+#define CONFIG_SYS_LOAD_ADDR           CONFIG_SYS_TEXT_BASE
+
+/* Generic Interrupt Controller Definitions */
+#define GICD_BASE                      0xc4301000
+#define GICC_BASE                      0xc4302000
+
+#define CONFIG_CMD_ENV
+
+/* Monitor Command Prompt */
+/* Console I/O Buffer Size */
+#define CONFIG_SYS_PBSIZE              (CONFIG_SYS_CBSIZE + \
+                                       sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE
+#define CONFIG_SYS_LONGHELP
+#define CONFIG_CMDLINE_EDITING
+
+#include <config_distro_defaults.h>
+
+#endif /* __MESON_GXBB_COMMON_CONFIG_H */
index 37a5671ccb5cf69a7a9a93fe002717ffc55dd2f4..bf5df9c77b95b3b13ef20f75993d98d94af730bb 100644 (file)
@@ -8,44 +8,12 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#define CONFIG_CPU_ARMV8
-#define CONFIG_REMAKE_ELF
-#define CONFIG_SYS_CACHELINE_SIZE      64
-#define CONFIG_SYS_NO_FLASH
-#define CONFIG_NR_DRAM_BANKS           1
-#define CONFIG_ENV_IS_NOWHERE          1
-#define CONFIG_ENV_SIZE                        0x2000
-#define CONFIG_SYS_MAXARGS             32
-#define CONFIG_SYS_MALLOC_LEN          (32 << 20)
-#define CONFIG_SYS_CBSIZE              1024
-#define CONFIG_MISC_INIT_R
-
-#define CONFIG_SYS_SDRAM_BASE          0
-#define CONFIG_SYS_TEXT_BASE           0x01000000
-#define CONFIG_SYS_INIT_SP_ADDR                0x20000000
-#define CONFIG_SYS_LOAD_ADDR           CONFIG_SYS_TEXT_BASE
-
-/* Generic Interrupt Controller Definitions */
-#define GICD_BASE                      0xc4301000
-#define GICC_BASE                      0xc4302000
-
 #define CONFIG_IDENT_STRING            " odroid-c2"
 
 /* Serial setup */
 #define CONFIG_CONS_INDEX              0
 #define CONFIG_BAUDRATE                        115200
 
-#define CONFIG_CMD_ENV
-
-/* Monitor Command Prompt */
-/* Console I/O Buffer Size */
-#define CONFIG_SYS_PBSIZE              (CONFIG_SYS_CBSIZE + \
-                                       sizeof(CONFIG_SYS_PROMPT) + 16)
-#define CONFIG_SYS_HUSH_PARSER
-#define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE
-#define CONFIG_SYS_LONGHELP
-#define CONFIG_CMDLINE_EDITING
-
-#include <config_distro_defaults.h>
+#include <configs/meson-gxbb-common.h>
 
 #endif /* __CONFIG_H */
index 9723bab77e1a3aae90f4ccf33fa973e0035b6b98..13eac75f8d32482ec9704b3650c9a15f9af08d30 100644 (file)
 
 /* Miscellaneous configurable options */
 #define CONFIG_SYS_LONGHELP    /* undef to save memory */
-#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
 #define CONFIG_SYS_PROMPT              "=> "
 #undef CONFIG_AUTO_COMPLETE
index fc4153aba84195b88280c78de9874eacc9fbc91f..6add3916fa873a7d2c51f226d0f64742c202b7c9 100644 (file)
@@ -45,7 +45,7 @@
 #define CONFIG_CMDLINE_TAG             /* pass commandline to Kernel */
 #define CONFIG_SETUP_MEMORY_TAGS       /* pass memory defs to kernel */
 #define CONFIG_INITRD_TAG              /* pass initrd param to kernel */
-#define CONFIG_SKIP_LOWLEVEL_INIT      /* U-Boot is loaded by a bootloader */
+#define CONFIG_SKIP_LOWLEVEL_INIT_ONLY /* U-Boot is loaded by a bootloader */
 #define CONFIG_BOARD_EARLY_INIT_F      /* call board_early_init_f() */
 #define CONFIG_DISPLAY_CPUINFO         /* display CPU Info at startup */
 
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME  "at91sam9260"
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS     2
 
-#define CONFIG_USB_HOST_ETHER
-#define CONFIG_USB_ETHER_ASIX
-#define CONFIG_USB_ETHER_MCS7830
-
 /* USB DFU support */
 #define CONFIG_CMD_MTDPARTS
 #define CONFIG_MTD_DEVICE
index ddfbcec980a4a4ae4761b4d2f453c679cd91c68b..8344f15920b8223432c43756cb6f3316ec30992b 100644 (file)
 #define CONFIG_SYS_LONGHELP
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_AUTO_COMPLETE
-#define CONFIG_SYS_HUSH_PARSER
 
 /* U-Boot memory settings */
 #define CONFIG_SYS_MALLOC_LEN          (1 << 20)
index 0b05289d07e6ffbbc218a402c8813475f87f38a4..882a4e5dbffff4aa59ca87a61548f1e0df224da1 100644 (file)
@@ -45,7 +45,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
 
index 74a9a098a0b128cf45178c049f801aeffe4e7788..b2ccb700234f53eff0ef62fd8fa28c20cb0df82d 100644 (file)
@@ -60,7 +60,6 @@
 #define CONFIG_VERSION_VARIABLE                        /* U-BOOT version */
 #define CONFIG_AUTO_COMPLETE                   /* Command auto complete */
 #define CONFIG_CMDLINE_EDITING                 /* Command history etc */
-#define CONFIG_SYS_HUSH_PARSER
 #define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
 
 /* USB, USB storage, USB ethernet */
index 3096576836addf602971e6ea492c9588d55d9a31..ea6704a97299295a2e6113c00ec64fcd735c150f 100644 (file)
@@ -90,9 +90,13 @@ const uchar default_environment[] = {
 #endif
 #ifdef CONFIG_ENV_VARS_UBOOT_CONFIG
        "arch="         CONFIG_SYS_ARCH                 "\0"
+#ifdef CONFIG_SYS_CPU
        "cpu="          CONFIG_SYS_CPU                  "\0"
+#endif
+#ifdef CONFIG_SYS_BOARD
        "board="        CONFIG_SYS_BOARD                "\0"
        "board_name="   CONFIG_SYS_BOARD                "\0"
+#endif
 #ifdef CONFIG_SYS_VENDOR
        "vendor="       CONFIG_SYS_VENDOR               "\0"
 #endif
index db826d20bfefad571b55d087a9f6b976c02efa9c..616631e9aa3bfdc863b0aa16a837d2c19cc734ae 100644 (file)
@@ -16,7 +16,7 @@
 /* The 64 defined bytes plus \0 */
 #define FASTBOOT_RESPONSE_LEN  (64 + 1)
 
-void fastboot_fail(char *response, const char *reason);
-void fastboot_okay(char *response, const char *reason);
+void fastboot_fail(const char *reason);
+void fastboot_okay(const char *reason);
 
 #endif /* _FASTBOOT_H_ */
index 978a1395a185a31b5be5646f6d3042b8ac3d22fa..12b99cb5eeeb2053db3194d1f8882807bbfe9a70 100644 (file)
@@ -4,7 +4,6 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
-void fb_mmc_flash_write(const char *cmd, unsigned int session_id,
-                       void *download_buffer, unsigned int download_bytes,
-                       char *response);
-void fb_mmc_erase(const char *cmd, char *response);
+void fb_mmc_flash_write(const char *cmd, void *download_buffer,
+                       unsigned int download_bytes);
+void fb_mmc_erase(const char *cmd);
index 80ddef5656a86a10ab1819c3c1527065a7ff6f99..aaf7cf7ae861e3d8da05a6130ed04eebe99c477c 100644 (file)
@@ -5,7 +5,6 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
-void fb_nand_flash_write(const char *cmd, unsigned int session_id,
-                        void *download_buffer, unsigned int download_bytes,
-                        char *response);
-void fb_nand_erase(const char *cmd, char *response);
+void fb_nand_flash_write(const char *cmd, void *download_buffer,
+                        unsigned int download_bytes);
+void fb_nand_erase(const char *cmd);
index 0382f5bd2639fecd498b7a2635ed5035381ee58d..b0cc5007f78a3fae5f7fd7721368f5ce07fbeed6 100644 (file)
@@ -9,16 +9,21 @@
 
 #define ROUNDUP(x, y)  (((x) + ((y) - 1)) & ~((y) - 1))
 
-typedef struct sparse_storage {
-       unsigned int    block_sz;
-       unsigned int    start;
-       unsigned int    size;
-       const char      *name;
-
-       int     (*write)(struct sparse_storage *storage, void *priv,
-                        unsigned int offset, unsigned int size,
-                        char *data);
-} sparse_storage_t;
+struct sparse_storage {
+       lbaint_t        blksz;
+       lbaint_t        start;
+       lbaint_t        size;
+       void            *priv;
+
+       lbaint_t        (*write)(struct sparse_storage *info,
+                                lbaint_t blk,
+                                lbaint_t blkcnt,
+                                const void *buffer);
+
+       lbaint_t        (*reserve)(struct sparse_storage *info,
+                                lbaint_t blk,
+                                lbaint_t blkcnt);
+};
 
 static inline int is_sparse_image(void *buf)
 {
@@ -31,5 +36,5 @@ static inline int is_sparse_image(void *buf)
        return 0;
 }
 
-int store_sparse_image(sparse_storage_t *storage, void *storage_priv,
-                      unsigned int session_id, void *data);
+void write_sparse_image(struct sparse_storage *info, const char *part_name,
+                       void *data, unsigned sz);
index a8f6bd16f69c62548ebc293cf426e15d01773435..d788c260e30aeebd345bd65fb7144d1cf5c8cdb8 100644 (file)
@@ -1156,6 +1156,7 @@ int android_image_get_ramdisk(const struct andr_img_hdr *hdr,
                              ulong *rd_data, ulong *rd_len);
 ulong android_image_get_end(const struct andr_img_hdr *hdr);
 ulong android_image_get_kload(const struct andr_img_hdr *hdr);
+void android_print_contents(const struct andr_img_hdr *hdr);
 
 #endif /* CONFIG_ANDROID_BOOT_IMAGE */
 
index 0ae160547d14eb6b38ec8defb605a34f7d988150..23604667fa72d37d2b51fb50725a1f95ce3a515b 100644 (file)
@@ -66,7 +66,7 @@ extern struct spl_image_info spl_image;
 /* SPL common functions */
 void preloader_console_init(void);
 u32 spl_boot_device(void);
-u32 spl_boot_mode(void);
+u32 spl_boot_mode(const u32 boot_device);
 void spl_set_header_raw_uboot(void);
 int spl_parse_image_header(const struct image_header *header);
 void spl_board_prepare_for_linux(void);
index ebdf10b988de5964bb7769f2433ab91d8d99bffa..ccc90b8ee53fe8097d26f20d31b34dface2413b1 100644 (file)
@@ -98,18 +98,25 @@ int lzop_decompress(const unsigned char *src, size_t src_len,
                if (dlen > remaining)
                        return LZO_E_OUTPUT_OVERRUN;
 
-               /* decompress */
-               tmp = dlen;
-               r = lzo1x_decompress_safe((u8 *) src, slen, dst, &tmp);
+               /* When the input data is not compressed at all,
+                * lzo1x_decompress_safe will fail, so call memcpy()
+                * instead */
+               if (dlen == slen) {
+                       memcpy(dst, src, slen);
+               } else {
+                       /* decompress */
+                       tmp = dlen;
+                       r = lzo1x_decompress_safe((u8 *)src, slen, dst, &tmp);
+
+                       if (r != LZO_E_OK) {
+                               *dst_len = dst - start;
+                               return r;
+                       }
 
-               if (r != LZO_E_OK) {
-                       *dst_len = dst - start;
-                       return r;
+                       if (dlen != tmp)
+                               return LZO_E_ERROR;
                }
 
-               if (dlen != tmp)
-                       return LZO_E_ERROR;
-
                src += slen;
                dst += dlen;
                remaining -= dlen;
index 54bf62b9bc301a5e1c2bdfa0be8224d33852acda..21283eb35732568abd464f10a1d8fa32aac3f931 100644 (file)
@@ -43,7 +43,7 @@ static int do_ut_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        assert(run_command_list("false", -1, 0) == 1);
        assert(run_command_list("echo", -1, 0) == 0);
 
-#ifdef CONFIG_SYS_HUSH_PARSER
+#ifdef CONFIG_HUSH_PARSER
        run_command("setenv foo 'setenv black 1\nsetenv adder 2'", 0);
        run_command("run foo", 0);
        assert(getenv("black") != NULL);
index 3ed7014147ca9ba0077113104e3de33744889fb8..6e4ae14ec783d4e12693887aa166cdf514fc4d0d 100644 (file)
@@ -88,7 +88,6 @@ static void image_set_header(void *ptr, struct stat *sbuf, int ifd,
                                struct image_tool_params *params)
 {
        uint32_t checksum;
-       char *source_date_epoch;
        time_t time;
 
        image_header_t * hdr = (image_header_t *)ptr;
@@ -98,18 +97,7 @@ static void image_set_header(void *ptr, struct stat *sbuf, int ifd,
                                sizeof(image_header_t)),
                        sbuf->st_size - sizeof(image_header_t));
 
-       source_date_epoch = getenv("SOURCE_DATE_EPOCH");
-       if (source_date_epoch != NULL) {
-               time = (time_t) strtol(source_date_epoch, NULL, 10);
-
-               if (gmtime(&time) == NULL) {
-                       fprintf(stderr, "%s: SOURCE_DATE_EPOCH is not valid\n",
-                               __func__);
-                       time = 0;
-               }
-       } else {
-               time = sbuf->st_mtime;
-       }
+       time = imagetool_get_source_date(params, sbuf->st_mtime);
 
        /* Build new header */
        image_set_magic(hdr, IH_MAGIC);
index 0551572b04576971d4fd4af4e9085b89d5715964..58aa8e27db3ee19db661bde16ef4675c6ee775ba 100644 (file)
@@ -51,8 +51,10 @@ static int fit_add_file_data(struct image_tool_params *params, size_t size_inc,
        }
 
        /* for first image creation, add a timestamp at offset 0 i.e., root  */
-       if (params->datafile)
-               ret = fit_set_timestamp(ptr, 0, sbuf.st_mtime);
+       if (params->datafile) {
+               time_t time = imagetool_get_source_date(params, sbuf.st_mtime);
+               ret = fit_set_timestamp(ptr, 0, time);
+       }
 
        if (!ret) {
                ret = fit_add_verification_data(params->keydir, dest_blob, ptr,
@@ -416,7 +418,13 @@ static int fit_extract_data(struct image_tool_params *params, const char *fname)
                        ret = -EPERM;
                        goto err_munmap;
                }
-               fdt_setprop_u32(fdt, node, "data-offset", buf_ptr);
+               if (params->external_offset > 0) {
+                       /* An external offset positions the data absolutely. */
+                       fdt_setprop_u32(fdt, node, "data-position",
+                                       params->external_offset + buf_ptr);
+               } else {
+                       fdt_setprop_u32(fdt, node, "data-offset", buf_ptr);
+               }
                fdt_setprop_u32(fdt, node, "data-size", len);
 
                buf_ptr += (len + 3) & ~3;
@@ -437,6 +445,17 @@ static int fit_extract_data(struct image_tool_params *params, const char *fname)
                ret = -EIO;
                goto err;
        }
+
+       /* Check if an offset for the external data was set. */
+       if (params->external_offset > 0) {
+               if (params->external_offset < new_size) {
+                       debug("External offset %x overlaps FIT length %x",
+                             params->external_offset, new_size);
+                       ret = -EINVAL;
+                       goto err;
+               }
+               new_size = params->external_offset;
+       }
        if (lseek(fd, new_size, SEEK_SET) < 0) {
                debug("%s: Failed to seek to end of file: %s\n", __func__,
                      strerror(errno));
index 08d191d9f894a6b86afd867de33ec4026c2286f2..855a096d0ab0f2579a07bcc60d662a9d8eaf2a22 100644 (file)
@@ -115,3 +115,23 @@ int imagetool_get_filesize(struct image_tool_params *params, const char *fname)
 
        return sbuf.st_size;
 }
+
+time_t imagetool_get_source_date(
+        struct image_tool_params *params,
+        time_t fallback)
+{
+       char *source_date_epoch = getenv("SOURCE_DATE_EPOCH");
+
+       if (source_date_epoch == NULL)
+               return fallback;
+
+       time_t time = (time_t) strtol(source_date_epoch, NULL, 10);
+
+       if (gmtime(&time) == NULL) {
+               fprintf(stderr, "%s: SOURCE_DATE_EPOCH is not valid\n",
+                       params->cmdname);
+               time = 0;
+       }
+
+       return time;
+}
index a3ed0f43d6afa21caa6d8755536b17d8a3f27ba2..6c1a9d3760584bfe297acb737b1e173360b4b3e6 100644 (file)
@@ -74,6 +74,7 @@ struct image_tool_params {
        struct content_info *content_tail;
        bool external_data;     /* Store data outside the FIT */
        bool quiet;             /* Don't output text in normal operation */
+       unsigned int external_offset;   /* Add padding to external data */
 };
 
 /*
@@ -205,6 +206,22 @@ int imagetool_save_subimage(
  */
 int imagetool_get_filesize(struct image_tool_params *params, const char *fname);
 
+/**
+ * imagetool_get_source_date() - Get timestamp for build output.
+ *
+ * Gets a timestamp for embedding it in a build output. If set
+ * SOURCE_DATE_EPOCH is used. Else the given fallback value is returned. Prints
+ * an error message if SOURCE_DATE_EPOCH contains an invalid value and returns
+ * 0.
+ *
+ * @params:    mkimage parameters
+ * @fallback:  timestamp to use if SOURCE_DATE_EPOCH isn't set
+ * @return timestamp based on SOURCE_DATE_EPOCH
+ */
+time_t imagetool_get_source_date(
+       struct image_tool_params *params,
+       time_t fallback);
+
 /*
  * There is a c file associated with supported image type low level code
  * for ex. default_image.c, fit_image.c
index aefe22f19b219a7d339dbfdc6f92ca1afe8b1831..ff3024a8f172c8557bfaa02612d995bdcdd04f2d 100644 (file)
@@ -93,11 +93,13 @@ static void usage(const char *msg)
                "          -f => input filename for FIT source\n");
 #ifdef CONFIG_FIT_SIGNATURE
        fprintf(stderr,
-               "Signing / verified boot options: [-k keydir] [-K dtb] [ -c <comment>] [-r]\n"
+               "Signing / verified boot options: [-E] [-k keydir] [-K dtb] [ -c <comment>] [-p addr] [-r]\n"
+               "          -E => place data outside of the FIT structure\n"
                "          -k => set directory containing private keys\n"
                "          -K => write public keys to this .dtb file\n"
                "          -c => add comment in signature node\n"
                "          -F => re-sign existing FIT image\n"
+               "          -p => place external data at a static position\n"
                "          -r => mark keys used as 'required' in dtb\n");
 #else
        fprintf(stderr,
@@ -136,7 +138,7 @@ static void process_args(int argc, char **argv)
        int opt;
 
        while ((opt = getopt(argc, argv,
-                            "a:A:b:cC:d:D:e:Ef:Fk:K:ln:O:rR:qsT:vVx")) != -1) {
+                            "a:A:b:cC:d:D:e:Ef:Fk:K:ln:p:O:rR:qsT:vVx")) != -1) {
                switch (opt) {
                case 'a':
                        params.addr = strtoull(optarg, &ptr, 16);
@@ -216,6 +218,13 @@ static void process_args(int argc, char **argv)
                        if (params.os < 0)
                                usage("Invalid operating system");
                        break;
+               case 'p':
+                       params.external_offset = strtoull(optarg, &ptr, 16);
+                       if (*ptr) {
+                               fprintf(stderr, "%s: invalid offset size %s\n",
+                                       params.cmdname, optarg);
+                               exit(EXIT_FAILURE);
+                       }
                case 'q':
                        params.quiet = 1;
                        break;