Merge branch 'master' of git://git.denx.de/u-boot-usb
authorTom Rini <trini@konsulko.com>
Fri, 14 Apr 2017 14:58:49 +0000 (10:58 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 14 Apr 2017 14:58:49 +0000 (10:58 -0400)
371 files changed:
MAINTAINERS
Makefile
arch/arc/lib/cpu.c
arch/arm/Kconfig
arch/arm/cpu/armv7/mx6/Kconfig
arch/arm/cpu/armv7/mx7ulp/scg.c
arch/arm/cpu/armv8/fsl-layerscape/cpu.c
arch/arm/dts/Makefile
arch/arm/dts/at91-sama5d3_xplained.dts [new file with mode: 0644]
arch/arm/dts/at91-sama5d4_xplained.dts [new file with mode: 0644]
arch/arm/dts/at91-sama5d4ek.dts [new file with mode: 0644]
arch/arm/dts/imx6q-logicpd.dts [new file with mode: 0644]
arch/arm/dts/imx6qdl-logicpd.dtsi [new file with mode: 0644]
arch/arm/dts/imx6sl-evk.dts [new file with mode: 0644]
arch/arm/dts/imx6sl-pinfunc.h [new file with mode: 0644]
arch/arm/dts/imx6sl.dtsi [new file with mode: 0644]
arch/arm/dts/meson-gx.dtsi [new file with mode: 0644]
arch/arm/dts/meson-gxbb-odroidc2.dts
arch/arm/dts/meson-gxbb.dtsi
arch/arm/dts/sama5d3.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d31.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d31ek.dts [new file with mode: 0644]
arch/arm/dts/sama5d33.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d33ek.dts [new file with mode: 0644]
arch/arm/dts/sama5d34.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d34ek.dts [new file with mode: 0644]
arch/arm/dts/sama5d35.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d35ek.dts [new file with mode: 0644]
arch/arm/dts/sama5d36.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d36ek.dts [new file with mode: 0644]
arch/arm/dts/sama5d36ek_cmp.dts [new file with mode: 0644]
arch/arm/dts/sama5d3_can.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d3_emac.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d3_gmac.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d3_lcd.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d3_mci2.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d3_tcb1.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d3_uart.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d3xcm.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d3xcm_cmp.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d3xdm.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d3xmb.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d3xmb_cmp.dtsi [new file with mode: 0644]
arch/arm/dts/sama5d4.dtsi [new file with mode: 0644]
arch/arm/dts/socfpga_cyclone5_mcvevk.dts
arch/arm/dts/socfpga_cyclone5_socdk.dts
arch/arm/include/asm/arch-meson/sd_emmc.h [new file with mode: 0644]
arch/arm/mach-at91/arm926ejs/at91sam9n12_devices.c
arch/arm/mach-at91/arm926ejs/at91sam9x5_devices.c
arch/arm/mach-at91/armv7/sama5d3_devices.c
arch/arm/mach-at91/armv7/u-boot-spl.lds
arch/arm/mach-at91/include/mach/at91_pio.h
arch/arm/mach-at91/include/mach/at91sam9x5.h
arch/arm/mach-at91/include/mach/gpio.h
arch/arm/mach-at91/include/mach/sama5d3.h
arch/arm/mach-at91/include/mach/sama5d4.h
arch/arm/mach-at91/spl.c
arch/arm/mach-at91/spl_atmel.c
arch/arm/mach-socfpga/Kconfig
arch/arm/mach-socfpga/include/mach/boot0.h
arch/arm/mach-tegra/tegra20/crypto.c
arch/mips/mach-ath79/dram.c
arch/mips/mach-pic32/cpu.c
arch/mips/mach-pic32/include/mach/ddr.h
arch/nios2/cpu/cpu.c
arch/powerpc/cpu/mpc5xxx/spl_boot.c
arch/powerpc/cpu/mpc85xx/cpu.c
arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c
arch/powerpc/cpu/ppc4xx/denali_spd_ddr2.c
arch/powerpc/cpu/ppc4xx/sdram.c
arch/powerpc/cpu/ppc4xx/spl_boot.c
arch/sandbox/include/asm/types.h
arch/xtensa/cpu/cpu.c
board/Arcturus/ucp1020/spl.c
board/BuS/eb_cpu5282/eb_cpu5282.c
board/a3m071/a3m071.c
board/a4m072/a4m072.c
board/advantech/dms-ba16/dms-ba16.c
board/amcc/acadia/memory.c
board/amcc/bamboo/bamboo.c
board/amcc/bubinga/bubinga.c
board/amcc/sequoia/sdram.c
board/amcc/walnut/walnut.c
board/amcc/yosemite/yosemite.c
board/aries/m28evk/Kconfig [new file with mode: 0644]
board/aries/m28evk/MAINTAINERS [new file with mode: 0644]
board/aries/m28evk/Makefile [new file with mode: 0644]
board/aries/m28evk/README [new file with mode: 0644]
board/aries/m28evk/m28evk.c [new file with mode: 0644]
board/aries/m28evk/spl_boot.c [new file with mode: 0644]
board/aries/m53evk/Kconfig [new file with mode: 0644]
board/aries/m53evk/MAINTAINERS [new file with mode: 0644]
board/aries/m53evk/Makefile [new file with mode: 0644]
board/aries/m53evk/imximage.cfg [new file with mode: 0644]
board/aries/m53evk/m53evk.c [new file with mode: 0644]
board/aries/mcvevk/MAINTAINERS [new file with mode: 0644]
board/aries/mcvevk/Makefile [new file with mode: 0644]
board/aries/mcvevk/qts/iocsr_config.h [new file with mode: 0644]
board/aries/mcvevk/qts/pinmux_config.h [new file with mode: 0644]
board/aries/mcvevk/qts/pll_config.h [new file with mode: 0644]
board/aries/mcvevk/qts/sdram_config.h [new file with mode: 0644]
board/aries/mcvevk/socfpga.c [new file with mode: 0644]
board/astro/mcf5373l/mcf5373l.c
board/atmel/at91sam9n12ek/at91sam9n12ek.c
board/atmel/at91sam9x5ek/at91sam9x5ek.c
board/atmel/sama5d3xek/sama5d3xek.c
board/atmel/sama5d4_xplained/sama5d4_xplained.c
board/atmel/sama5d4ek/sama5d4ek.c
board/canmb/canmb.c
board/cm5200/cm5200.c
board/cobra5272/cobra5272.c
board/davedenx/aria/aria.c
board/dbau1x00/dbau1x00.c
board/denx/m28evk/Kconfig [deleted file]
board/denx/m28evk/MAINTAINERS [deleted file]
board/denx/m28evk/Makefile [deleted file]
board/denx/m28evk/README [deleted file]
board/denx/m28evk/m28evk.c [deleted file]
board/denx/m28evk/spl_boot.c [deleted file]
board/denx/m53evk/Kconfig [deleted file]
board/denx/m53evk/MAINTAINERS [deleted file]
board/denx/m53evk/Makefile [deleted file]
board/denx/m53evk/imximage.cfg [deleted file]
board/denx/m53evk/m53evk.c [deleted file]
board/denx/ma5d4evk/ma5d4evk.c
board/denx/mcvevk/MAINTAINERS [deleted file]
board/denx/mcvevk/Makefile [deleted file]
board/denx/mcvevk/qts/iocsr_config.h [deleted file]
board/denx/mcvevk/qts/pinmux_config.h [deleted file]
board/denx/mcvevk/qts/pll_config.h [deleted file]
board/denx/mcvevk/qts/sdram_config.h [deleted file]
board/denx/mcvevk/socfpga.c [deleted file]
board/esd/mecp5123/mecp5123.c
board/esd/pmc440/sdram.c
board/esd/vme8349/vme8349.c
board/freescale/b4860qds/ddr.c
board/freescale/b4860qds/spl.c
board/freescale/c29xpcie/spl.c
board/freescale/corenet_ds/ddr.c
board/freescale/ls1021aqds/ddr.c
board/freescale/ls1021aqds/ls1021aqds.c
board/freescale/ls1043aqds/ddr.c
board/freescale/ls1043aqds/ls1043aqds.c
board/freescale/ls1043ardb/ddr.c
board/freescale/ls1046aqds/ddr.c
board/freescale/ls1046aqds/ls1046aqds.c
board/freescale/ls1046ardb/ddr.c
board/freescale/ls2080a/ddr.c
board/freescale/ls2080aqds/ddr.c
board/freescale/ls2080ardb/ddr.c
board/freescale/m5208evbe/m5208evbe.c
board/freescale/m52277evb/m52277evb.c
board/freescale/m5235evb/m5235evb.c
board/freescale/m5249evb/m5249evb.c
board/freescale/m5253demo/m5253demo.c
board/freescale/m5253evbe/m5253evbe.c
board/freescale/m5272c3/m5272c3.c
board/freescale/m5275evb/m5275evb.c
board/freescale/m5282evb/m5282evb.c
board/freescale/m53017evb/m53017evb.c
board/freescale/m5329evb/m5329evb.c
board/freescale/m5373evb/m5373evb.c
board/freescale/m54418twr/m54418twr.c
board/freescale/m54451evb/m54451evb.c
board/freescale/m54455evb/m54455evb.c
board/freescale/m547xevb/m547xevb.c
board/freescale/m548xevb/m548xevb.c
board/freescale/mpc5121ads/mpc5121ads.c
board/freescale/mpc8308rdb/sdram.c
board/freescale/mpc8313erdb/mpc8313erdb.c
board/freescale/mpc8313erdb/sdram.c
board/freescale/mpc8315erdb/mpc8315erdb.c
board/freescale/mpc8315erdb/sdram.c
board/freescale/mpc8323erdb/mpc8323erdb.c
board/freescale/mpc832xemds/mpc832xemds.c
board/freescale/mpc8349emds/mpc8349emds.c
board/freescale/mpc8349itx/mpc8349itx.c
board/freescale/mpc837xemds/mpc837xemds.c
board/freescale/mpc837xerdb/mpc837xerdb.c
board/freescale/mpc8610hpcd/mpc8610hpcd.c
board/freescale/mpc8641hpcn/mpc8641hpcn.c
board/freescale/mx6sabresd/README
board/freescale/mx6slevk/mx6slevk.c
board/freescale/p1010rdb/spl.c
board/freescale/p1022ds/spl.c
board/freescale/p1_p2_rdb_pc/spl.c
board/freescale/p2041rdb/ddr.c
board/freescale/t102xqds/ddr.c
board/freescale/t102xqds/spl.c
board/freescale/t102xrdb/ddr.c
board/freescale/t102xrdb/spl.c
board/freescale/t1040qds/ddr.c
board/freescale/t104xrdb/ddr.c
board/freescale/t104xrdb/spl.c
board/freescale/t208xqds/ddr.c
board/freescale/t208xqds/spl.c
board/freescale/t208xrdb/ddr.c
board/freescale/t208xrdb/spl.c
board/freescale/t4qds/ddr.c
board/freescale/t4qds/spl.c
board/freescale/t4rdb/ddr.c
board/freescale/t4rdb/spl.c
board/gaisler/gr_cpci_ax2000/gr_cpci_ax2000.c
board/gaisler/gr_ep2s60/gr_ep2s60.c
board/gaisler/gr_xc3s_1500/gr_xc3s_1500.c
board/gaisler/grsim/grsim.c
board/gaisler/grsim_leon2/grsim_leon2.c
board/gateworks/gw_ventana/MAINTAINERS
board/gateworks/gw_ventana/common.c
board/gateworks/gw_ventana/common.h
board/gateworks/gw_ventana/eeprom.c
board/gateworks/gw_ventana/gsc.c
board/gateworks/gw_ventana/gw_ventana.c
board/gateworks/gw_ventana/gw_ventana_spl.c
board/gateworks/gw_ventana/ventana_eeprom.h
board/gdsys/mpc8308/sdram.c
board/ids/ids8313/ids8313.c
board/ifm/ac14xx/ac14xx.c
board/ifm/o2dnt2/o2dnt2.c
board/imgtec/boston/ddr.c
board/imgtec/malta/malta.c
board/imgtec/xilfpga/xilfpga.c
board/inka4x0/inka4x0.c
board/intercontrol/digsy_mtc/digsy_mtc.c
board/ipek01/ipek01.c
board/jupiter/jupiter.c
board/keymile/km82xx/km82xx.c
board/keymile/km83xx/km83xx.c
board/keymile/kmp204x/ddr.c
board/l+g/vinco/vinco.c
board/liebherr/lwmon5/sdram.c
board/logicpd/imx6/Kconfig [new file with mode: 0644]
board/logicpd/imx6/MAINTAINERS [new file with mode: 0644]
board/logicpd/imx6/Makefile [new file with mode: 0644]
board/logicpd/imx6/README [new file with mode: 0644]
board/logicpd/imx6/imx6logic.c [new file with mode: 0644]
board/logicpd/imx6/mx6q_2x_MT41K512M16HA.cfg [new file with mode: 0644]
board/micronas/vct/vct.c
board/motionpro/motionpro.c
board/mpc8308_p1m/sdram.c
board/mpl/mip405/mip405.c
board/mpl/pati/pati.c
board/mpl/pip405/pip405.c
board/munices/munices.c
board/pb1x00/pb1x00.c
board/pdm360ng/pdm360ng.c
board/phytec/pcm030/pcm030.c
board/qemu-mips/qemu-mips.c
board/sbc8349/sbc8349.c
board/sbc8641d/sbc8641d.c
board/sysam/amcore/amcore.c
board/tqc/tqm5200/tqm5200.c
board/tqc/tqm834x/tqm834x.c
board/tqc/tqm8xx/tqm8xx.c
board/v38b/v38b.c
board/varisys/cyrus/ddr.c
board/ve8313/ve8313.c
board/xes/xpedite1000/xpedite1000.c
board/xes/xpedite517x/xpedite517x.c
board/xilinx/ppc405-generic/xilinx_ppc405_generic.c
board/xilinx/ppc440-generic/xilinx_ppc440_generic.c
cmd/aes.c
cmd/mmc.c
cmd/pci.c
common/board_f.c
common/env_common.c
common/env_flags.c
configs/gwventana_emmc_defconfig
configs/gwventana_gw5904_defconfig [new file with mode: 0644]
configs/gwventana_nand_defconfig
configs/imx6dl_icore_rqs_mmc_defconfig
configs/imx6q_icore_rqs_mmc_defconfig
configs/imx6q_logic_defconfig [new file with mode: 0644]
configs/imx6ul_isiot_emmc_defconfig
configs/imx6ul_isiot_mmc_defconfig
configs/imx6ul_isiot_nand_defconfig
configs/m53evk_defconfig
configs/mx6slevk_defconfig
configs/mx6slevk_spinor_defconfig
configs/mx6slevk_spl_defconfig
configs/odroid-c2_defconfig
configs/rock_defconfig
configs/sama5d4_xplained_mmc_defconfig
configs/sama5d4_xplained_nandflash_defconfig
configs/sama5d4_xplained_spiflash_defconfig
configs/sama5d4ek_mmc_defconfig
configs/sama5d4ek_nandflash_defconfig
configs/sama5d4ek_spiflash_defconfig
configs/socfpga_arria5_defconfig
configs/socfpga_cyclone5_defconfig
configs/socfpga_de0_nano_soc_defconfig
configs/socfpga_de1_soc_defconfig
configs/socfpga_mcvevk_defconfig
configs/socfpga_sockit_defconfig
configs/socfpga_socrates_defconfig
configs/socfpga_sr1500_defconfig
doc/README.mpc85xx
doc/README.mxs
doc/README.socfpga
drivers/Kconfig
drivers/core/device.c
drivers/core/uclass.c
drivers/ddr/Kconfig [new file with mode: 0644]
drivers/ddr/altera/Kconfig [new file with mode: 0644]
drivers/ddr/altera/Makefile
drivers/ddr/fsl/main.c
drivers/gpio/Kconfig
drivers/gpio/at91_gpio.c
drivers/mmc/Kconfig
drivers/mmc/Makefile
drivers/mmc/bcm2835_sdhci.c
drivers/mmc/gen_atmel_mci.c
drivers/mmc/meson_gx_mmc.c [new file with mode: 0644]
drivers/mmc/sdhci.c
drivers/mtd/nand/atmel_nand.c
drivers/net/at91_emac.c
drivers/net/phy/Kconfig
drivers/pinctrl/Kconfig
drivers/pinctrl/Makefile
drivers/pinctrl/pinctrl-at91.c [new file with mode: 0644]
drivers/serial/ns16550.c
drivers/serial/serial_pl01x.c
drivers/video/mxsfb.c
include/aes.h [deleted file]
include/common.h
include/configs/advantech_dms-ba16.h
include/configs/at91-sama5_common.h
include/configs/gw_ventana.h
include/configs/imx6_logic.h [new file with mode: 0644]
include/configs/m53evk.h
include/configs/mccmon6.h
include/configs/mx6cuboxi.h
include/configs/mx6slevk.h
include/configs/sama5d4_xplained.h
include/configs/sama5d4ek.h
include/configs/sandbox.h
include/configs/socfpga_arria5_socdk.h
include/configs/socfpga_common.h
include/configs/socfpga_cyclone5_socdk.h
include/configs/socfpga_de0_nano_soc.h
include/configs/socfpga_de1_soc.h
include/configs/socfpga_mcvevk.h
include/configs/socfpga_sockit.h
include/configs/socfpga_socrates.h
include/configs/socfpga_sr1500.h
include/debug_uart.h
include/div64.h
include/dt-bindings/clock/gxbb-aoclkc.h [new file with mode: 0644]
include/dt-bindings/clock/gxbb-clkc.h [new file with mode: 0644]
include/dt-bindings/clock/imx6sl-clock.h [new file with mode: 0644]
include/dt-bindings/pinctrl/at91.h
include/dt-bindings/reset/gxbb-aoclkc.h [new file with mode: 0644]
include/fdtdec.h
include/fsl_ddr_sdram.h
include/linux/math64.h
include/uboot_aes.h [new file with mode: 0644]
lib/aes.c
lib/div64.c
lib/fdtdec.c
lib/libfdt/fdt_region.c
lib/tiny-printf.c
scripts/config_whitelist.txt
tools/Makefile
tools/buildman/builder.py
tools/dtoc/fdt_util.py
tools/env/fw_env.c
tools/env/fw_env.h
tools/env/fw_env_main.c
tools/env/fw_env_private.h [new file with mode: 0644]
tools/fdtgrep.c
tools/patman/cros_subprocess.py

index 6c702f2ff2ff39637170bc7b11287dba525dd9a6..eadb21fb394adbba7c687cda04b7fc1e021b226c 100644 (file)
@@ -93,10 +93,9 @@ S:   Maintained
 T:     git git://git.denx.de/u-boot-imx.git
 F:     arch/arm/cpu/arm1136/mx*/
 F:     arch/arm/cpu/arm926ejs/mx*/
-F:     arch/arm/cpu/arm926ejs/imx/
 F:     arch/arm/cpu/armv7/mx*/
 F:     arch/arm/cpu/armv7/vf610/
-F:     arch/arm/cpu/imx-common/
+F:     arch/arm/imx-common/
 F:     arch/arm/include/asm/arch-imx/
 F:     arch/arm/include/asm/arch-mx*/
 F:     arch/arm/include/asm/arch-vf610/
index 09b597d45051f9899abbb517a98d67297a19237c..8d4e6050b37d07a145d7a23bcf475d0c0cf6b6b9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -348,7 +348,7 @@ OBJCOPY             = $(CROSS_COMPILE)objcopy
 OBJDUMP                = $(CROSS_COMPILE)objdump
 AWK            = awk
 PERL           = perl
-PYTHON         = python
+PYTHON         ?= python
 DTC            = dtc
 CHECK          = sparse
 
index d1f10abb6850b803cdf84eb7c6b1f1a1b4e1fd99..cb808933377c496e52caa670672c4993a922658c 100644 (file)
@@ -28,3 +28,9 @@ int arch_early_init_r(void)
        gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
        return 0;
 }
+
+/* This is a dummy function on arc */
+int dram_init(void)
+{
+       return 0;
+}
index 7b2075066237120a65d68064001d9fa03bb75f3d..42f93b4670d2f29f99635d82c14f26da92bc0095 100644 (file)
@@ -1242,6 +1242,8 @@ source "arch/arm/cpu/armv8/Kconfig"
 
 source "arch/arm/imx-common/Kconfig"
 
+source "board/aries/m28evk/Kconfig"
+source "board/aries/m53evk/Kconfig"
 source "board/bosch/shc/Kconfig"
 source "board/BuR/brxre1/Kconfig"
 source "board/BuR/brppt1/Kconfig"
@@ -1262,8 +1264,6 @@ source "board/cirrus/edb93xx/Kconfig"
 source "board/compulab/cm_t335/Kconfig"
 source "board/compulab/cm_t43/Kconfig"
 source "board/creative/xfi3/Kconfig"
-source "board/denx/m28evk/Kconfig"
-source "board/denx/m53evk/Kconfig"
 source "board/freescale/ls2080a/Kconfig"
 source "board/freescale/ls2080aqds/Kconfig"
 source "board/freescale/ls2080ardb/Kconfig"
index 190e5c6ec781b66e04e7f8f0e3898791de49ff3d..af6dad3aa938a119ba16ab91df3ef44a82055a7b 100644 (file)
@@ -155,6 +155,19 @@ config TARGET_MX6CUBOXI
        select BOARD_LATE_INIT
        select SUPPORT_SPL
 
+config TARGET_MX6LOGICPD
+       bool "Logic PD i.MX6 SOM"
+       select BOARD_EARLY_INIT_F
+       select BOARD_LATE_INIT
+       select DM
+       select DM_ETH
+       select DM_GPIO
+       select DM_I2C
+       select DM_MMC
+       select DM_PMIC
+       select DM_REGULATOR
+       select OF_CONTROL
+
 config TARGET_MX6QARM2
        bool "mx6qarm2"
 
@@ -172,6 +185,7 @@ config TARGET_MX6Q_ICORE
 
 config TARGET_MX6Q_ICORE_RQS
        bool "Support Engicam i.Core RQS"
+       select BOARD_LATE_INIT
        select MX6QDL
        select OF_CONTROL
        select DM
@@ -253,6 +267,7 @@ config TARGET_MX6UL_GEAM
        select SUPPORT_SPL
 config TARGET_MX6UL_ISIOT
        bool "Support Engicam Is.IoT MX6UL"
+       select BOARD_LATE_INIT
        select MX6UL
        select OF_CONTROL
        select DM
@@ -404,6 +419,7 @@ source "board/gateworks/gw_ventana/Kconfig"
 source "board/kosagi/novena/Kconfig"
 source "board/samtec/vining_2000/Kconfig"
 source "board/liebherr/mccmon6/Kconfig"
+source "board/logicpd/imx6/Kconfig"
 source "board/seco/Kconfig"
 source "board/solidrun/mx6cuboxi/Kconfig"
 source "board/technexion/pico-imx6ul/Kconfig"
index ca8252d0d27f16b903c60131dd20f47ef2c223e7..c117af0a0ecd50ea00aab3a977e8a6538fccfeee 100644 (file)
@@ -504,7 +504,9 @@ u32 decode_pll(enum pll_clocks pll)
                num = readl(&scg1_regs->spllnum);
                denom = readl(&scg1_regs->splldenom);
 
-               return (infreq / pre_div) * (mult + num / denom);
+               infreq = infreq / pre_div;
+
+               return infreq * mult + infreq * num / denom;
 
        case PLL_A7_APLL:
                reg = readl(&scg1_regs->apllcsr);
@@ -531,7 +533,9 @@ u32 decode_pll(enum pll_clocks pll)
                num = readl(&scg1_regs->apllnum);
                denom = readl(&scg1_regs->aplldenom);
 
-               return (infreq / pre_div) * (mult + num / denom);
+               infreq = infreq / pre_div;
+
+               return infreq * mult + infreq * num / denom;
 
        case PLL_USB:
                reg = readl(&scg1_regs->upllcsr);
index ea6c090e0bd9fb4f9d511456d3f2ab9694263414..d446527616c4bb929d6bc247be1f206917762dcf 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/system.h>
@@ -876,7 +877,7 @@ void update_early_mmu_table(void)
 
 __weak int dram_init(void)
 {
-       initdram();
+       fsl_initdram();
 #if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)
        /* This will break-before-make MMU for DDR */
        update_early_mmu_table();
index a2c0717f076711bd2b60e02d847b448d32b2f9e9..68d2791c155f8b7f73cdd9b68e97fbecc0af7441 100644 (file)
@@ -323,11 +323,13 @@ dtb-$(CONFIG_VF610) += vf500-colibri.dtb \
 dtb-$(CONFIG_MX53) += imx53-cx9020.dtb
 
 dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb \
+       imx6sl-evk.dtb \
        imx6sll-evk.dtb \
        imx6dl-icore.dtb \
        imx6dl-icore-rqs.dtb \
        imx6q-icore.dtb \
        imx6q-icore-rqs.dtb \
+       imx6q-logicpd.dtb \
        imx6sx-sabreauto.dtb \
        imx6ul-geam-kit.dtb \
        imx6ul-isiot-emmc.dtb \
@@ -347,6 +349,23 @@ dtb-$(CONFIG_SOC_KEYSTONE) += keystone-k2hk-evm.dtb \
 dtb-$(CONFIG_TARGET_SAMA5D2_XPLAINED) += \
        at91-sama5d2_xplained.dtb
 
+dtb-$(CONFIG_TARGET_SAMA5D3XEK) += \
+       sama5d31ek.dtb \
+       sama5d33ek.dtb \
+       sama5d34ek.dtb \
+       sama5d35ek.dtb \
+       sama5d36ek.dtb \
+       sama5d36ek_cmp.dtb
+
+dtb-$(CONFIG_TARGET_SAMA5D3_XPLAINED) += \
+       at91-sama5d3_xplained.dtb
+
+dtb-$(CONFIG_TARGET_SAMA5D4EK) += \
+       at91-sama5d4ek.dtb
+
+dtb-$(CONFIG_TARGET_SAMA5D4_XPLAINED) += \
+       at91-sama5d4_xplained.dtb
+
 dtb-$(CONFIG_ARCH_BCM283X) += \
        bcm2835-rpi-a-plus.dtb \
        bcm2835-rpi-a.dtb \
diff --git a/arch/arm/dts/at91-sama5d3_xplained.dts b/arch/arm/dts/at91-sama5d3_xplained.dts
new file mode 100644 (file)
index 0000000..6959710
--- /dev/null
@@ -0,0 +1,348 @@
+/*
+ * at91-sama5d3_xplained.dts - Device Tree file for the SAMA5D3 Xplained board
+ *
+ *  Copyright (C) 2014 Atmel,
+ *               2014 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+#include "sama5d36.dtsi"
+
+/ {
+       model = "SAMA5D3 Xplained";
+       compatible = "atmel,sama5d3-xplained", "atmel,sama5d3", "atmel,sama5";
+
+       chosen {
+               u-boot,dm-pre-reloc;
+               stdout-path = &dbgu;
+       };
+
+       aliases {
+               spi0 = &spi0;
+       };
+
+       memory {
+               reg = <0x20000000 0x10000000>;
+       };
+
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       mmc0: mmc@f0000000 {
+                               u-boot,dm-pre-reloc;
+                               pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_dat4_7 &pinctrl_mmc0_cd>;
+                               vmmc-supply = <&vcc_mmc0_reg>;
+                               vqmmc-supply = <&vcc_3v3_reg>;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <8>;
+                                       cd-gpios = <&pioE 0 GPIO_ACTIVE_LOW>;
+                               };
+                       };
+
+                       mmc1: mmc@f8000000 {
+                               u-boot,dm-pre-reloc;
+                               vmmc-supply = <&vcc_3v3_reg>;
+                               vqmmc-supply = <&vcc_3v3_reg>;
+                               status = "disabled";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioE 1 GPIO_ACTIVE_LOW>;
+                               };
+                       };
+
+                       spi0: spi@f0004000 {
+                               cs-gpios = <&pioD 13 0>, <0>, <0>, <&pioD 16 0>;
+                               status = "okay";
+                       };
+
+                       can0: can@f000c000 {
+                               status = "okay";
+                       };
+
+                       i2c0: i2c@f0014000 {
+                               pinctrl-0 = <&pinctrl_i2c0_pu>;
+                               status = "okay";
+                       };
+
+                       i2c1: i2c@f0018000 {
+                               status = "okay";
+
+                               pmic: act8865@5b {
+                                       compatible = "active-semi,act8865";
+                                       reg = <0x5b>;
+                                       status = "disabled";
+
+                                       regulators {
+                                               vcc_1v8_reg: DCDC_REG1 {
+                                                       regulator-name = "VCC_1V8";
+                                                       regulator-min-microvolt = <1800000>;
+                                                       regulator-max-microvolt = <1800000>;
+                                                       regulator-always-on;
+                                               };
+
+                                               vcc_1v2_reg: DCDC_REG2 {
+                                                       regulator-name = "VCC_1V2";
+                                                       regulator-min-microvolt = <1200000>;
+                                                       regulator-max-microvolt = <1200000>;
+                                                       regulator-always-on;
+                                               };
+
+                                               vcc_3v3_reg: DCDC_REG3 {
+                                                       regulator-name = "VCC_3V3";
+                                                       regulator-min-microvolt = <3300000>;
+                                                       regulator-max-microvolt = <3300000>;
+                                                       regulator-always-on;
+                                               };
+
+                                               vddfuse_reg: LDO_REG1 {
+                                                       regulator-name = "FUSE_2V5";
+                                                       regulator-min-microvolt = <2500000>;
+                                                       regulator-max-microvolt = <2500000>;
+                                               };
+
+                                               vddana_reg: LDO_REG2 {
+                                                       regulator-name = "VDDANA";
+                                                       regulator-min-microvolt = <3300000>;
+                                                       regulator-max-microvolt = <3300000>;
+                                                       regulator-always-on;
+                                               };
+                                       };
+                               };
+                       };
+
+                       macb0: ethernet@f0028000 {
+                               phy-mode = "rgmii";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "okay";
+
+                               ethernet-phy@7 {
+                                       reg = <0x7>;
+                               };
+                       };
+
+                       pwm0: pwm@f002c000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_pwm0_pwmh0_0 &pinctrl_pwm0_pwmh1_0>;
+                               status = "okay";
+                       };
+
+                       usart0: serial@f001c000 {
+                               status = "okay";
+                       };
+
+                       usart1: serial@f0020000 {
+                               pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts_cts>;
+                               status = "okay";
+                       };
+
+                       uart0: serial@f0024000 {
+                               status = "okay";
+                       };
+
+                       mmc1: mmc@f8000000 {
+                               pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioE 1 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       spi1: spi@f8008000 {
+                               cs-gpios = <&pioC 25 0>;
+                               status = "okay";
+                       };
+
+                       adc0: adc@f8018000 {
+                               pinctrl-0 = <
+                                       &pinctrl_adc0_adtrg
+                                       &pinctrl_adc0_ad0
+                                       &pinctrl_adc0_ad1
+                                       &pinctrl_adc0_ad2
+                                       &pinctrl_adc0_ad3
+                                       &pinctrl_adc0_ad4
+                                       &pinctrl_adc0_ad5
+                                       &pinctrl_adc0_ad6
+                                       &pinctrl_adc0_ad7
+                                       &pinctrl_adc0_ad8
+                                       &pinctrl_adc0_ad9
+                                       >;
+                               status = "okay";
+                       };
+
+                       i2c2: i2c@f801c000 {
+                               dmas = <0>, <0>;        /* Do not use DMA for i2c2 */
+                               pinctrl-0 = <&pinctrl_i2c2_pu>;
+                               status = "okay";
+                       };
+
+                       macb1: ethernet@f802c000 {
+                               phy-mode = "rmii";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "okay";
+
+                               ethernet-phy@1 {
+                                       reg = <0x1>;
+                               };
+                       };
+
+                       dbgu: serial@ffffee00 {
+                               u-boot,dm-pre-reloc;
+                               status = "okay";
+                       };
+
+                       pinctrl@fffff200 {
+                               board {
+                                       u-boot,dm-pre-reloc;
+                                       pinctrl_i2c0_pu: i2c0_pu {
+                                               atmel,pins =
+                                                       <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
+                                       };
+
+                                       pinctrl_i2c2_pu: i2c2_pu {
+                                               atmel,pins =
+                                                       <AT91_PIOA 18 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;
+                                       };
+
+                                       pinctrl_key_gpio: key_gpio_0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 29 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+                                       };
+
+                                       pinctrl_mmc0_cd: mmc0_cd {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOE 0 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+                                       };
+
+                                       pinctrl_mmc1_cd: mmc1_cd {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+                                       };
+
+                                       pinctrl_usba_vbus: usba_vbus {
+                                               atmel,pins =
+                                                       <AT91_PIOE 9 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;   /* PE9, conflicts with A9 */
+                                       };
+                               };
+                       };
+               };
+
+               nand0: nand@60000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "hw";
+                       atmel,has-pmecc;
+                       atmel,pmecc-cap = <4>;
+                       atmel,pmecc-sector-size = <512>;
+                       nand-on-flash-bbt;
+                       status = "okay";
+
+                       at91bootstrap@0 {
+                               label = "at91bootstrap";
+                               reg = <0x0 0x40000>;
+                       };
+
+                       bootloader@40000 {
+                               label = "bootloader";
+                               reg = <0x40000 0x80000>;
+                       };
+
+                       bootloaderenv@c0000 {
+                               label = "bootloader env";
+                               reg = <0xc0000 0xc0000>;
+                       };
+
+                       dtb@180000 {
+                               label = "device tree";
+                               reg = <0x180000 0x80000>;
+                       };
+
+                       kernel@200000 {
+                               label = "kernel";
+                               reg = <0x200000 0x600000>;
+                       };
+
+                       rootfs@800000 {
+                               label = "rootfs";
+                               reg = <0x800000 0x0f800000>;
+                       };
+               };
+
+               usb0: gadget@00500000 {
+                       atmel,vbus-gpio = <&pioE 9 GPIO_ACTIVE_HIGH>;   /* PE9, conflicts with A9 */
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usba_vbus>;
+                       status = "okay";
+               };
+
+               usb1: ohci@00600000 {
+                       num-ports = <3>;
+                       atmel,vbus-gpio = <0
+                                          &pioE 3 GPIO_ACTIVE_LOW
+                                          &pioE 4 GPIO_ACTIVE_LOW
+                                         >;
+                       status = "okay";
+               };
+
+               usb2: ehci@00700000 {
+                       status = "okay";
+               };
+       };
+
+       vcc_mmc0_reg: fixedregulator@0 {
+               compatible = "regulator-fixed";
+               gpio = <&pioE 2 GPIO_ACTIVE_LOW>;
+               regulator-name = "mmc0-card-supply";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_key_gpio>;
+
+               bp3 {
+                       label = "PB_USER";
+                       gpios = <&pioE 29 GPIO_ACTIVE_LOW>;
+                       linux,code = <0x104>;
+                       wakeup-source;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               d2 {
+                       label = "d2";
+                       gpios = <&pioE 23 GPIO_ACTIVE_LOW>;     /* PE23, conflicts with A23, CTS2 */
+                       linux,default-trigger = "heartbeat";
+               };
+
+               d3 {
+                       label = "d3";
+                       gpios = <&pioE 24 GPIO_ACTIVE_HIGH>;
+               };
+       };
+};
diff --git a/arch/arm/dts/at91-sama5d4_xplained.dts b/arch/arm/dts/at91-sama5d4_xplained.dts
new file mode 100644 (file)
index 0000000..ca6aff2
--- /dev/null
@@ -0,0 +1,286 @@
+/*
+ * at91-sama5d4_xplained.dts - Device Tree file for SAMA5D4 Xplained board
+ *
+ *  Copyright (C) 2015 Atmel,
+ *                2015 Josh Wu <josh.wu@atmel.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+/dts-v1/;
+#include "sama5d4.dtsi"
+
+/ {
+       model = "Atmel SAMA5D4 Xplained";
+       compatible = "atmel,sama5d4-xplained", "atmel,sama5d4", "atmel,sama5";
+
+       aliases {
+               spi0 = &spi0;
+       };
+
+       chosen {
+               u-boot,dm-pre-reloc;
+               stdout-path = &usart3;
+       };
+
+       memory {
+               reg = <0x20000000 0x20000000>;
+       };
+
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       spi0: spi@f8010000 {
+                               u-boot,dm-pre-reloc;
+                               cs-gpios = <&pioC 3 0>, <0>, <0>, <0>;
+                               status = "okay";
+                               spi_flash@0 {
+                                       u-boot,dm-pre-reloc;
+                                       compatible = "spi-flash";
+                                       spi-max-frequency = <50000000>;
+                                       reg = <0>;
+                               };
+                       };
+
+                       i2c0: i2c@f8014000 {
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@f8020000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_macb0_rmii &pinctrl_macb0_phy_irq>;
+
+                               phy0: ethernet-phy@1 {
+                                       interrupt-parent = <&pioE>;
+                                       interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
+                                       reg = <1>;
+                               };
+                       };
+
+                       mmc1: mmc@fc000000 {
+                               u-boot,dm-pre-reloc;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
+                               vmmc-supply = <&vcc_mmc1_reg>;
+                               vqmmc-supply = <&vcc_3v3_reg>;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioE 3 0>;
+                               };
+                       };
+
+                       usart3: serial@fc00c000 {
+                               u-boot,dm-pre-reloc;
+                               status = "okay";
+                       };
+
+                       usart4: serial@fc010000 {
+                               status = "okay";
+                       };
+
+                       spi1: spi@fc018000 {
+                               cs-gpios = <&pioB 21 0>;
+                               status = "okay";
+                       };
+
+                       adc0: adc@fc034000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <
+                                       /* external trigger conflicts with USBA_VBUS */
+                                       &pinctrl_adc0_ad0
+                                       &pinctrl_adc0_ad1
+                                       &pinctrl_adc0_ad2
+                                       &pinctrl_adc0_ad3
+                                       &pinctrl_adc0_ad4
+                                       >;
+                               atmel,adc-vref = <3300>;
+                               status = "okay";
+                       };
+
+                       watchdog@fc068640 {
+                               status = "okay";
+                       };
+
+                       pinctrl@fc06a000 {
+                               board {
+                                       u-boot,dm-pre-reloc;
+                                       pinctrl_mmc1_cd: mmc1_cd {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOE 3 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+                                       };
+                                       pinctrl_usba_vbus: usba_vbus {
+                                               atmel,pins =
+                                                       <AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
+                                       };
+                                       pinctrl_key_gpio: key_gpio_0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 8 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+                                       };
+                                       pinctrl_macb0_phy_irq: macb0_phy_irq_0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+                                       };
+                               };
+                       };
+               };
+
+               usb0: gadget@00400000 {
+                       atmel,vbus-gpio = <&pioE 31 GPIO_ACTIVE_HIGH>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usba_vbus>;
+                       status = "okay";
+               };
+
+               usb1: ohci@00500000 {
+                       num-ports = <3>;
+                       atmel,vbus-gpio = <0
+                                          &pioE 11 GPIO_ACTIVE_HIGH
+                                          &pioE 14 GPIO_ACTIVE_HIGH
+                                         >;
+                       status = "okay";
+               };
+
+               usb2: ehci@00600000 {
+                       status = "okay";
+               };
+
+               nand0: nand@80000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "hw";
+                       nand-on-flash-bbt;
+                       atmel,has-pmecc;
+                       status = "okay";
+
+                       at91bootstrap@0 {
+                               label = "at91bootstrap";
+                               reg = <0x0 0x40000>;
+                       };
+
+                       bootloader@40000 {
+                               label = "bootloader";
+                               reg = <0x40000 0x80000>;
+                       };
+
+                       bootloaderenv@c0000 {
+                               label = "bootloader env";
+                               reg = <0xc0000 0xc0000>;
+                       };
+
+                       dtb@180000 {
+                               label = "device tree";
+                               reg = <0x180000 0x80000>;
+                       };
+
+                       kernel@200000 {
+                               label = "kernel";
+                               reg = <0x200000 0x600000>;
+                       };
+
+                       rootfs@800000 {
+                               label = "rootfs";
+                               reg = <0x800000 0x0f800000>;
+                       };
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_key_gpio>;
+
+               pb_user1 {
+                       label = "pb_user1";
+                       gpios = <&pioE 8 GPIO_ACTIVE_HIGH>;
+                       linux,code = <0x100>;
+                       wakeup-source;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               status = "okay";
+
+               d8 {
+                       label = "d8";
+                       gpios = <&pioD 30 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+
+               d10 {
+                       label = "d10";
+                       gpios = <&pioE 15 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       vcc_3v3_reg: fixedregulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC 3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               regulator-always-on;
+               reg = <0 1>;
+       };
+
+       vcc_mmc1_reg: fixedregulator@1 {
+               compatible = "regulator-fixed";
+               gpio = <&pioE 4 GPIO_ACTIVE_LOW>;
+               regulator-name = "VDD MCI1";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&vcc_3v3_reg>;
+               regulator-always-on;
+               reg = <1 1>;
+       };
+};
diff --git a/arch/arm/dts/at91-sama5d4ek.dts b/arch/arm/dts/at91-sama5d4ek.dts
new file mode 100644 (file)
index 0000000..b965f5b
--- /dev/null
@@ -0,0 +1,341 @@
+/*
+ * at91-sama5d4ek.dts - Device Tree file for SAMA5D4 Evaluation Kit
+ *
+ *  Copyright (C) 2014 Atmel,
+ *                2014 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+/dts-v1/;
+#include "sama5d4.dtsi"
+
+/ {
+       model = "Atmel SAMA5D4-EK";
+       compatible = "atmel,sama5d4ek", "atmel,sama5d4", "atmel,sama5";
+
+       aliases {
+               spi0 = &spi0;
+       };
+
+       chosen {
+               u-boot,dm-pre-reloc;
+               stdout-path = &usart3;
+       };
+
+
+       memory {
+               reg = <0x20000000 0x20000000>;
+       };
+
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       adc0: adc@fc034000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <
+                                       /* external trigger conflicts with USBA_VBUS */
+                                       &pinctrl_adc0_ad0
+                                       &pinctrl_adc0_ad1
+                                       &pinctrl_adc0_ad2
+                                       &pinctrl_adc0_ad3
+                                       &pinctrl_adc0_ad4
+                                       >;
+                               /* The vref depends on JP22 of EK. If connect 1-2 then use 3.3V. connect 2-3 use 3.0V */
+                               atmel,adc-vref = <3300>;
+                               /*atmel,adc-ts-wires = <4>;*/   /* Set up ADC touch screen */
+                               status = "okay";                /* Enable ADC IIO support */
+                       };
+
+                       mmc0: mmc@f8000000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_cd>;
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioE 5 0>;
+                               };
+                       };
+
+                       ssc0: ssc@f8008000 {
+                               status = "okay";
+                       };
+
+                       spi0: spi@f8010000 {
+                               u-boot,dm-pre-reloc;
+                               cs-gpios = <&pioC 3 0>, <0>, <0>, <0>;
+                               status = "okay";
+                               spi_flash@0 {
+                                       u-boot,dm-pre-reloc;
+                                       compatible = "spi-flash";
+                                       spi-max-frequency = <50000000>;
+                                       reg = <0>;
+                               };
+                       };
+
+                       i2c0: i2c@f8014000 {
+                               status = "okay";
+
+                               wm8904: codec@1a {
+                                       compatible = "wlf,wm8904";
+                                       reg = <0x1a>;
+                                       clocks = <&pck2>;
+                                       clock-names = "mclk";
+                               };
+
+                               qt1070:keyboard@1b {
+                                       compatible = "qt1070";
+                                       reg = <0x1b>;
+                                       interrupt-parent = <&pioE>;
+                                       interrupts = <25 0x0>;
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_qt1070_irq>;
+                                       wakeup-source;
+                               };
+
+                               atmel_mxt_ts@4c {
+                                       compatible = "atmel,atmel_mxt_ts";
+                                       reg = <0x4c>;
+                                       interrupt-parent = <&pioE>;
+                                       interrupts = <24 0x0>;
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_mxt_ts>;
+                               };
+                       };
+
+                       macb0: ethernet@f8020000 {
+                               pinctrl-0 = <&pinctrl_macb0_rmii &pinctrl_macb0_phy_irq>;
+                               phy-mode = "rmii";
+                               status = "okay";
+
+                               ethernet-phy@1 {
+                                       reg = <0x1>;
+                                       interrupt-parent = <&pioE>;
+                                       interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
+                               };
+                       };
+
+                       mmc1: mmc@fc000000 {
+                               u-boot,dm-pre-reloc;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioE 6 0>;
+                               };
+                       };
+
+                       usart2: serial@fc008000 {
+                               status = "okay";
+                       };
+
+                       usart3: serial@fc00c000 {
+                               u-boot,dm-pre-reloc;
+                               status = "okay";
+                       };
+
+                       usart4: serial@fc010000 {
+                               status = "okay";
+                       };
+
+                       watchdog@fc068640 {
+                               status = "okay";
+                       };
+
+                       pinctrl@fc06a000 {
+                               board {
+                                       u-boot,dm-pre-reloc;
+                                       pinctrl_macb0_phy_irq: macb0_phy_irq {
+                                               atmel,pins =
+                                                       <AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+                                       };
+                                       pinctrl_mmc0_cd: mmc0_cd {
+                                               atmel,pins =
+                                                       <AT91_PIOE 5 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+                                       };
+                                       pinctrl_mmc1_cd: mmc1_cd {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOE 6 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+                                       };
+                                       pinctrl_pck2_as_audio_mck: pck2_as_audio_mck {
+                                               atmel,pins =
+                                                       <AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                                       pinctrl_usba_vbus: usba_vbus {
+                                               atmel,pins =
+                                                       <AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
+                                       };
+                                       pinctrl_key_gpio: key_gpio_0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 13 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PE13 gpio */
+                                       };
+                                       pinctrl_qt1070_irq: qt1070_irq {
+                                               atmel,pins =
+                                                       <AT91_PIOE 25 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+                                       };
+                                       pinctrl_mxt_ts: mxt_irq {
+                                               atmel,pins =
+                                                       <AT91_PIOE 24 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+                                       };
+                               };
+                       };
+               };
+
+               usb0: gadget@00400000 {
+                       atmel,vbus-gpio = <&pioE 31 GPIO_ACTIVE_HIGH>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usba_vbus>;
+                       status = "okay";
+               };
+
+               usb1: ohci@00500000 {
+                       num-ports = <3>;
+                       atmel,vbus-gpio = <0 /* &pioE 10 GPIO_ACTIVE_LOW */
+                                          &pioE 11 GPIO_ACTIVE_LOW
+                                          &pioE 12 GPIO_ACTIVE_LOW
+                                         >;
+                       status = "okay";
+               };
+
+               usb2: ehci@00600000 {
+                       status = "okay";
+               };
+
+               nand0: nand@80000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "hw";
+                       nand-on-flash-bbt;
+                       atmel,has-pmecc;
+                       status = "okay";
+
+                       at91bootstrap@0 {
+                               label = "at91bootstrap";
+                               reg = <0x0 0x40000>;
+                       };
+
+                       bootloader@40000 {
+                               label = "bootloader";
+                               reg = <0x40000 0x80000>;
+                       };
+
+                       bootloaderenv@c0000 {
+                               label = "bootloader env";
+                               reg = <0xc0000 0xc0000>;
+                       };
+
+                       dtb@180000 {
+                               label = "device tree";
+                               reg = <0x180000 0x80000>;
+                       };
+
+                       kernel@200000 {
+                               label = "kernel";
+                               reg = <0x200000 0x600000>;
+                       };
+
+                       rootfs@800000 {
+                               label = "rootfs";
+                               reg = <0x800000 0x0f800000>;
+                       };
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_key_gpio>;
+
+               pb_user1 {
+                       label = "pb_user1";
+                       gpios = <&pioE 13 GPIO_ACTIVE_HIGH>;
+                       linux,code = <0x100>;
+                       wakeup-source;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               status = "okay";
+
+               d8 {
+                       label = "d8";
+                       /* PE28, conflicts with usart4 rts pin */
+                       gpios = <&pioE 28 GPIO_ACTIVE_LOW>;
+               };
+
+               d9 {
+                       label = "d9";
+                       gpios = <&pioE 9 GPIO_ACTIVE_HIGH>;
+               };
+
+               d10 {
+                       label = "d10";
+                       gpios = <&pioE 8 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       sound {
+               compatible = "atmel,asoc-wm8904";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_pck2_as_audio_mck>;
+
+               atmel,model = "wm8904 @ SAMA5D4EK";
+               atmel,audio-routing =
+                       "Headphone Jack", "HPOUTL",
+                       "Headphone Jack", "HPOUTR",
+                       "IN1L", "Line In Jack",
+                       "IN1R", "Line In Jack";
+
+               atmel,ssc-controller = <&ssc0>;
+               atmel,audio-codec = <&wm8904>;
+       };
+};
diff --git a/arch/arm/dts/imx6q-logicpd.dts b/arch/arm/dts/imx6q-logicpd.dts
new file mode 100644 (file)
index 0000000..d1e7a38
--- /dev/null
@@ -0,0 +1,190 @@
+/*
+ * Copyright 2017 Logic PD, Inc.
+ * Based on SabreSD, Copyright 2016 Freescale Semiconductor, Inc.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "imx6qdl-logicpd.dtsi"
+
+/ {
+       model = "Logic PD i.MX6QDL SOM";
+       compatible = "fsl,imx6q";
+
+       reg_usb_otg_vbus: regulator-otg-vbus@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "usb_otg_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio4 15 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       reg_usb_h1_vbus: regulator-usbh1vbus@1 {
+               compatible = "regulator-fixed";
+               regulator-name = "usb_h1_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               enable-active-high;
+               regulator-always-on;
+               gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
+       };
+
+       reg_3v3: regulator-3v3@2 {
+               compatible = "regulator-fixed";
+               regulator-name = "reg_3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart3>;
+       status = "okay";
+};
+
+&usbh1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbh1>;
+       vbus-supply = <&reg_usb_h1_vbus>;
+       status = "okay";
+};
+
+&usbh2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbh2>;
+       phy_type = "hsic";
+       disable-over-current;
+       status = "okay";
+};
+
+&usbotg {
+       vbus-supply = <&reg_usb_otg_vbus>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg>;
+       disable-over-current;
+       status = "okay";
+};
+
+&fec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet>;
+       phy-mode = "rmii";
+       phy-speed = <10>;
+       status = "okay";
+};
+
+&usdhc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc2>;
+       cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+       no-1-8-v;
+       keep-power-in-suspend;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_enet: enetgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN      0x1b0b0
+                       MX6QDL_PAD_ENET_MDIO__ENET_MDIO         0x1b0b0
+                       MX6QDL_PAD_ENET_MDC__ENET_MDC           0x1b0b0
+                       MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0     0x1b0b0
+                       MX6QDL_PAD_ENET_RXD1__ENET_RX_DATA1     0x1b0b0
+                       MX6QDL_PAD_ENET_RX_ER__ENET_RX_ER       0x1b0b0
+                       MX6QDL_PAD_ENET_TXD0__ENET_TX_DATA0     0x1b0b0
+                       MX6QDL_PAD_ENET_TXD1__ENET_TX_DATA1     0x1b0b0
+                       MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN       0x1b0b0
+                       MX6QDL_PAD_GPIO_16__ENET_REF_CLK        0x4001b0a8
+                       MX6QDL_PAD_KEY_ROW0__GPIO4_IO07         0x1b0b0 /* nINT */
+                       MX6QDL_PAD_KEY_ROW1__GPIO4_IO09         0x1b0b0 /* Ethernet Reset */
+               >;
+       };
+
+       pinctrl_gpio_leds: gpioledsgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D19__GPIO3_IO19  0x130b0
+                       MX6QDL_PAD_EIM_D20__GPIO3_IO20  0x130b0
+                       MX6QDL_PAD_EIM_D21__GPIO3_IO21  0x130b0
+                       MX6QDL_PAD_EIM_D22__GPIO3_IO22  0x130b0
+               >;
+       };
+       pinctrl_uart3: uart3grp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D23__UART3_CTS_B 0x1b0b1
+                       MX6QDL_PAD_EIM_D24__UART3_TX_DATA       0x1b0b1
+                       MX6QDL_PAD_EIM_D25__UART3_RX_DATA       0x1b0b1
+                       MX6QDL_PAD_EIM_EB3__UART3_RTS_B 0x1b0b1
+               >;
+       };
+
+       pinctrl_usbh1: usbh1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x1b0b0   /* USB_H1_PWR_EN */
+               >;
+       };
+
+       pinctrl_usbh2: usbh2grp {
+               fsl,pins = <
+                       MX6QDL_PAD_RGMII_TX_CTL__USB_H2_STROBE 0x17030
+                       MX6QDL_PAD_RGMII_TXC__USB_H2_DATA      0x13030
+               >;
+       };
+
+       pinctrl_usbotg: usbotggrp {
+       fsl,pins = <
+               MX6QDL_PAD_GPIO_1__USB_OTG_ID   0x17059
+               MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x130b0 /* USB_OTG_PWR_EN */
+               >;
+       };
+
+       pinctrl_usdhc2: usdhc2grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD2_CLK__SD2_CLK    0x10059
+                       MX6QDL_PAD_SD2_CMD__SD2_CMD    0x17059
+                       MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
+                       MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
+                       MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
+                       MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17059
+               >;
+       };
+};
diff --git a/arch/arm/dts/imx6qdl-logicpd.dtsi b/arch/arm/dts/imx6qdl-logicpd.dtsi
new file mode 100644 (file)
index 0000000..db1a63d
--- /dev/null
@@ -0,0 +1,361 @@
+/*
+ * Copyright 2016 Logic PD
+ * This file is adapted from imx6qdl-sabresd.dtsi.
+ * Copyright 2012 Freescale Semiconductor, Inc.
+ * Copyright 2011 Linaro Ltd.
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include "imx6q.dtsi"
+
+/ {
+       chosen {
+               stdout-path = &uart1;
+       };
+
+       memory {
+               reg = <0x10000000 0x80000000>;
+       };
+};
+
+/* Reroute power feeding the CPU to come from the external PMIC */
+&reg_arm
+{
+       vin-supply = <&sw1a_reg>;
+};
+
+&reg_soc
+{
+       vin-supply = <&sw1c_reg>;
+};
+
+&clks {
+       assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
+                         <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
+       assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
+                                <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
+};
+
+&i2c3 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c3>;
+       status = "okay";
+
+       pmic: pfuze100@08 {
+               compatible = "fsl,pfuze100";
+               reg = <0x08>;
+
+               regulators {
+                       sw1a_reg: sw1ab {
+                               regulator-min-microvolt = <725000>;
+                               regulator-max-microvolt = <1450000>;
+                               regulator-name = "vddcore";
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <6250>;
+                       };
+
+                       sw1c_reg: sw1c {
+                               regulator-min-microvolt = <725000>;
+                               regulator-max-microvolt = <1450000>;
+                               regulator-name = "vddsoc";
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <6250>;
+                       };
+
+                       sw2_reg: sw2 {
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "gen_3v3";
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       sw3a_reg: sw3a {
+                               regulator-min-microvolt = <400000>;
+                               regulator-max-microvolt = <1975000>;
+                               regulator-name = "sw3a_vddr";
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       sw3b_reg: sw3b {
+                               regulator-min-microvolt = <400000>;
+                               regulator-max-microvolt = <1975000>;
+                               regulator-name = "sw3b_vddr";
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       sw4_reg: sw4 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "gen_rgmii";
+                       };
+
+
+                       swbst_reg: swbst {
+                               regulator-min-microvolt = <5000000>;
+                               regulator-max-microvolt = <5150000>;
+                               regulator-name = "gen_5v0";
+                       };
+
+                       snvs_reg: vsnvs {
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-name = "gen_vsns";
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       vref_reg: vrefddr {
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       vgen1_reg: vgen1 {
+                               regulator-min-microvolt = <1500000>;
+                               regulator-max-microvolt = <1500000>;
+                               regulator-name = "gen_1v5";
+                       };
+
+                       vgen2_reg: vgen2 {
+                               regulator-name = "vgen2";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <1550000>;
+                       };
+
+                       vgen3_reg: vgen3 {
+                               regulator-name = "gen_vadj_0";
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3000000>;
+                       };
+
+                       vgen4_reg: vgen4 {
+                               regulator-name = "gen_1v8";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                       };
+
+                       vgen5_reg: vgen5 {
+                               regulator-name = "gen_adj_1";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen6_reg: vgen6 {
+                               regulator-name = "gen_2v5";
+                               regulator-min-microvolt = <2500000>;
+                               regulator-max-microvolt = <2500000>;
+                               regulator-always-on;
+                       };
+               };
+       };
+
+       mfg_eeprom: at24@51 {
+               compatible = "atmel,24c64";
+               pagesize = <32>;
+               read-only;
+               reg = <0x51>;
+       };
+
+       user_eeprom: at24@52 {
+               compatible = "atmel,24c64";
+               pagesize = <32>;
+               reg = <0x52>;
+       };
+};
+
+&iomuxc {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_hog>;
+
+       pinctrl_hog: hoggrp {
+               fsl,pins = <
+                       MX6QDL_PAD_CSI0_MCLK__ARM_TRACE_CTL             0x1b0b0
+                       MX6QDL_PAD_CSI0_DATA_EN__ARM_TRACE_CLK  0x1b0b0
+                       MX6QDL_PAD_CSI0_VSYNC__ARM_TRACE00              0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT4__ARM_TRACE01               0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT5__ARM_TRACE02               0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT6__ARM_TRACE03               0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT7__ARM_TRACE04               0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT8__ARM_TRACE05               0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT9__ARM_TRACE06               0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT10__ARM_TRACE07              0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT11__ARM_TRACE08              0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT12__ARM_TRACE09              0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT13__ARM_TRACE10              0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT14__ARM_TRACE11              0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT15__ARM_TRACE12              0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT16__ARM_TRACE13              0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT17__ARM_TRACE14              0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT18__ARM_TRACE15              0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT19__GPIO6_IO05       0x1b0b0
+                       MX6QDL_PAD_EIM_LBA__GPIO2_IO27  0x80000000
+                       MX6QDL_PAD_EIM_OE__GPIO2_IO25   0x80000000
+                       MX6QDL_PAD_EIM_RW__GPIO2_IO26   0x80000000
+                       MX6QDL_PAD_EIM_CS0__GPIO2_IO23  0x80000000
+                       MX6QDL_PAD_EIM_CS1__GPIO2_IO24  0x80000000
+                       MX6QDL_PAD_EIM_A16__GPIO2_IO22  0x80000000
+                       MX6QDL_PAD_EIM_A17__GPIO2_IO21  0x80000000
+                       MX6QDL_PAD_EIM_A18__GPIO2_IO20  0x80000000
+                       MX6QDL_PAD_EIM_A19__GPIO2_IO19  0x80000000
+                       MX6QDL_PAD_EIM_A20__GPIO2_IO18  0x80000000
+                       MX6QDL_PAD_EIM_A21__GPIO2_IO17  0x80000000
+                       MX6QDL_PAD_EIM_A22__GPIO2_IO16  0x80000000
+                       MX6QDL_PAD_EIM_A23__GPIO6_IO06  0x80000000
+                       MX6QDL_PAD_EIM_A24__GPIO5_IO04  0x80000000
+                       MX6QDL_PAD_EIM_A25__GPIO5_IO02  0x80000000
+                       MX6QDL_PAD_EIM_DA0__GPIO3_IO00  0x80000000
+                       MX6QDL_PAD_EIM_DA1__GPIO3_IO01  0x80000000
+                       MX6QDL_PAD_EIM_DA2__GPIO3_IO02  0x80000000
+                       MX6QDL_PAD_EIM_DA3__GPIO3_IO03  0x80000000
+                       MX6QDL_PAD_EIM_DA4__GPIO3_IO04  0x80000000
+                       MX6QDL_PAD_EIM_DA5__GPIO3_IO05  0x80000000
+                       MX6QDL_PAD_EIM_DA6__GPIO3_IO06  0x80000000
+                       MX6QDL_PAD_EIM_DA7__GPIO3_IO07  0x80000000
+                       MX6QDL_PAD_EIM_DA8__GPIO3_IO08  0x80000000
+                       MX6QDL_PAD_EIM_DA9__GPIO3_IO09  0x80000000
+                       MX6QDL_PAD_EIM_DA10__GPIO3_IO10 0x80000000
+                       MX6QDL_PAD_EIM_DA11__GPIO3_IO11 0x80000000
+                       MX6QDL_PAD_EIM_DA12__GPIO3_IO12 0x80000000
+                       MX6QDL_PAD_EIM_DA13__GPIO3_IO13 0x80000000
+                       MX6QDL_PAD_EIM_DA14__GPIO3_IO14 0x80000000
+                       MX6QDL_PAD_EIM_DA15__GPIO3_IO15 0x80000000
+                       MX6QDL_PAD_EIM_D16__GPIO3_IO16  0x80000000
+                       MX6QDL_PAD_EIM_D19__GPIO3_IO19  0x80000000
+                       MX6QDL_PAD_EIM_D20__GPIO3_IO20  0x80000000
+                       MX6QDL_PAD_EIM_D21__GPIO3_IO21  0x80000000
+                       MX6QDL_PAD_EIM_D22__GPIO3_IO22  0x80000000
+                       MX6QDL_PAD_EIM_D26__GPIO3_IO26  0x80000000
+                       MX6QDL_PAD_EIM_D27__GPIO3_IO27  0x80000000
+                       MX6QDL_PAD_EIM_EB0__GPIO2_IO28  0x80000000
+                       MX6QDL_PAD_EIM_EB1__GPIO2_IO29  0x80000000
+                       MX6QDL_PAD_EIM_EB2__GPIO2_IO30  0x80000000
+                       MX6QDL_PAD_EIM_BCLK__GPIO6_IO31 0x80000000
+                       MX6QDL_PAD_EIM_WAIT__GPIO5_IO00 0x80000000
+                       MX6QDL_PAD_GPIO_2__GPIO1_IO02   0x80000000
+                       MX6QDL_PAD_GPIO_4__GPIO1_IO04   0x80000000
+                       MX6QDL_PAD_GPIO_7__GPIO1_IO07   0x80000000
+                       MX6QDL_PAD_GPIO_8__GPIO1_IO08   0x80000000
+                       MX6QDL_PAD_GPIO_9__GPIO1_IO09   0x80000000
+                       MX6QDL_PAD_GPIO_17__GPIO7_IO12  0x80000000
+                       MX6QDL_PAD_GPIO_18__GPIO7_IO13  0x80000000
+                       MX6QDL_PAD_GPIO_19__GPIO4_IO05  0x80000000
+                       MX6QDL_PAD_KEY_COL0__GPIO4_IO06 0x80000000
+                       MX6QDL_PAD_KEY_ROW0__GPIO4_IO07 0x80000000
+                       MX6QDL_PAD_KEY_COL1__GPIO4_IO08 0x80000000
+                       MX6QDL_PAD_NANDF_CS1__GPIO6_IO14        0x80000000
+                       MX6QDL_PAD_NANDF_CS3__GPIO6_IO16        0x80000000
+                       MX6QDL_PAD_RGMII_TD0__GPIO6_IO20        0x80000000
+                       MX6QDL_PAD_RGMII_TD1__GPIO6_IO21        0x80000000
+                       MX6QDL_PAD_RGMII_TD2__GPIO6_IO22        0x80000000
+                       MX6QDL_PAD_RGMII_TD3__GPIO6_IO23        0x80000000
+                       MX6QDL_PAD_RGMII_RD0__GPIO6_IO25        0x80000000
+                       MX6QDL_PAD_RGMII_RD1__GPIO6_IO27        0x80000000
+                       MX6QDL_PAD_RGMII_RD2__GPIO6_IO28        0x80000000
+                       MX6QDL_PAD_RGMII_RD3__GPIO6_IO29        0x80000000
+                       MX6QDL_PAD_SD4_DAT0__GPIO2_IO08 0x80000000
+                       MX6QDL_PAD_SD4_DAT3__GPIO2_IO11 0x80000000
+               >;
+       };
+
+       pinctrl_i2c3: i2c3grp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D17__I2C3_SCL            0x4001b8b1
+                       MX6QDL_PAD_EIM_D18__I2C3_SDA            0x4001b8b1
+               >;
+       };
+
+       pinctrl_uart1: uart1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA      0x1b0b1
+                       MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA      0x1b0b1
+               >;
+       };
+
+       pinctrl_uart2: uart2grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD4_DAT4__UART2_RX_DATA      0x1b0b1
+                       MX6QDL_PAD_SD4_DAT5__UART2_RTS_B        0x1b0b1
+                       MX6QDL_PAD_SD4_DAT6__UART2_CTS_B        0x1b0b1
+                       MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA      0x1b0b1
+               >;
+       };
+
+       pinctrl_usdhc1: usdhc1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD1_CMD__SD1_CMD    0x17071
+                       MX6QDL_PAD_SD1_CLK__SD1_CLK    0x10071
+                       MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071
+                       MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071
+                       MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071
+                       MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071
+               >;
+       };
+
+       pinctrl_usdhc3: usdhc3grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD3_CMD__SD3_CMD    0x17059
+                       MX6QDL_PAD_SD3_CLK__SD3_CLK    0x10059
+                       MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
+                       MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
+                       MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
+                       MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
+                       MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x1f0b0 /* WL_IRQ */
+                       MX6QDL_PAD_SD3_DAT5__GPIO7_IO00 0x1f0b0 /* WLAN_EN */
+                       MX6QDL_PAD_SD3_RST__GPIO7_IO08  0x1f0b0 /* BT_EN */
+               >;
+       };
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1>;
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2>;
+       status = "okay";
+};
+
+&usdhc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc1>;
+       cd-gpios = <&gpio6 16 GPIO_ACTIVE_HIGH>;
+       keep-power-in-suspend;
+       enable-sdio-wakeup;
+       status = "okay";
+};
+
+&usdhc3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc3>;
+       non-removable;
+       keep-power-in-suspend;
+       enable-sdio-wakeup;
+       vmmc-supply = <&sw2_reg>;
+       status = "okay";
+       #address-cells = <1>;
+       #size-cells = <0>;
+       wlcore: wlcore@0 {
+                 compatible = "ti,wl1837";
+                 reg = <2>;
+                 interrupt-parent = <&gpio7>;
+                 interrupts = <1 GPIO_ACTIVE_HIGH>;
+       };
+};
diff --git a/arch/arm/dts/imx6sl-evk.dts b/arch/arm/dts/imx6sl-evk.dts
new file mode 100644 (file)
index 0000000..0a90eea
--- /dev/null
@@ -0,0 +1,641 @@
+/*
+ * Copyright (C) 2013 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include "imx6sl.dtsi"
+
+/ {
+       model = "Freescale i.MX6 SoloLite EVK Board";
+       compatible = "fsl,imx6sl-evk", "fsl,imx6sl";
+
+       memory {
+               reg = <0x80000000 0x40000000>;
+       };
+
+       backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm1 0 5000000>;
+               brightness-levels = <0 4 8 16 32 64 128 255>;
+               default-brightness-level = <6>;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_led>;
+
+               user {
+                       label = "debug";
+                       gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               reg_usb_otg1_vbus: regulator@0 {
+                       compatible = "regulator-fixed";
+                       reg = <0>;
+                       regulator-name = "usb_otg1_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       gpio = <&gpio4 0 0>;
+                       enable-active-high;
+                       vin-supply = <&swbst_reg>;
+               };
+
+               reg_usb_otg2_vbus: regulator@1 {
+                       compatible = "regulator-fixed";
+                       reg = <1>;
+                       regulator-name = "usb_otg2_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       gpio = <&gpio4 2 0>;
+                       enable-active-high;
+                       vin-supply = <&swbst_reg>;
+               };
+
+               reg_aud3v: regulator@2 {
+                       compatible = "regulator-fixed";
+                       reg = <2>;
+                       regulator-name = "wm8962-supply-3v15";
+                       regulator-min-microvolt = <3150000>;
+                       regulator-max-microvolt = <3150000>;
+                       regulator-boot-on;
+               };
+
+               reg_aud4v: regulator@3 {
+                       compatible = "regulator-fixed";
+                       reg = <3>;
+                       regulator-name = "wm8962-supply-4v2";
+                       regulator-min-microvolt = <4325000>;
+                       regulator-max-microvolt = <4325000>;
+                       regulator-boot-on;
+               };
+
+               reg_lcd_3v3: regulator@4 {
+                       compatible = "regulator-fixed";
+                       reg = <4>;
+                       regulator-name = "lcd-3v3";
+                       gpio = <&gpio4 3 0>;
+                       enable-active-high;
+               };
+       };
+
+       sound {
+               compatible = "fsl,imx6sl-evk-wm8962", "fsl,imx-audio-wm8962";
+               model = "wm8962-audio";
+               ssi-controller = <&ssi2>;
+               audio-codec = <&codec>;
+               audio-routing =
+                       "Headphone Jack", "HPOUTL",
+                       "Headphone Jack", "HPOUTR",
+                       "Ext Spk", "SPKOUTL",
+                       "Ext Spk", "SPKOUTR",
+                       "AMIC", "MICBIAS",
+                       "IN3R", "AMIC";
+               mux-int-port = <2>;
+               mux-ext-port = <3>;
+       };
+};
+
+&audmux {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_audmux3>;
+       status = "okay";
+};
+
+&ecspi1 {
+       cs-gpios = <&gpio4 11 0>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi1>;
+       status = "okay";
+
+       flash: m25p80@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "st,m25p32", "jedec,spi-nor";
+               spi-max-frequency = <20000000>;
+               reg = <0>;
+       };
+};
+
+&fec {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&pinctrl_fec>;
+       pinctrl-1 = <&pinctrl_fec_sleep>;
+       phy-mode = "rmii";
+       status = "okay";
+};
+
+&i2c1 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       status = "okay";
+
+       pmic: pfuze100@08 {
+               compatible = "fsl,pfuze100";
+               reg = <0x08>;
+
+               regulators {
+                       sw1a_reg: sw1ab {
+                               regulator-min-microvolt = <300000>;
+                               regulator-max-microvolt = <1875000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <6250>;
+                       };
+
+                       sw1c_reg: sw1c {
+                               regulator-min-microvolt = <300000>;
+                               regulator-max-microvolt = <1875000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <6250>;
+                       };
+
+                       sw2_reg: sw2 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       sw3a_reg: sw3a {
+                               regulator-min-microvolt = <400000>;
+                               regulator-max-microvolt = <1975000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       sw3b_reg: sw3b {
+                               regulator-min-microvolt = <400000>;
+                               regulator-max-microvolt = <1975000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       sw4_reg: sw4 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3300000>;
+                       };
+
+                       swbst_reg: swbst {
+                               regulator-min-microvolt = <5000000>;
+                               regulator-max-microvolt = <5150000>;
+                       };
+
+                       snvs_reg: vsnvs {
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       vref_reg: vrefddr {
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       vgen1_reg: vgen1 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <1550000>;
+                               regulator-always-on;
+                       };
+
+                       vgen2_reg: vgen2 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <1550000>;
+                       };
+
+                       vgen3_reg: vgen3 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                       };
+
+                       vgen4_reg: vgen4 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen5_reg: vgen5 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen6_reg: vgen6 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+               };
+       };
+};
+
+&i2c2 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       status = "okay";
+
+       codec: wm8962@1a {
+               compatible = "wlf,wm8962";
+               reg = <0x1a>;
+               clocks = <&clks IMX6SL_CLK_EXTERN_AUDIO>;
+               DCVDD-supply = <&vgen3_reg>;
+               DBVDD-supply = <&reg_aud3v>;
+               AVDD-supply = <&vgen3_reg>;
+               CPVDD-supply = <&vgen3_reg>;
+               MICVDD-supply = <&reg_aud3v>;
+               PLLVDD-supply = <&vgen3_reg>;
+               SPKVDD1-supply = <&reg_aud4v>;
+               SPKVDD2-supply = <&reg_aud4v>;
+       };
+};
+
+&iomuxc {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_hog>;
+
+       imx6sl-evk {
+               pinctrl_hog: hoggrp {
+                       fsl,pins = <
+                               MX6SL_PAD_KEY_ROW7__GPIO4_IO07    0x17059
+                               MX6SL_PAD_KEY_COL7__GPIO4_IO06    0x17059
+                               MX6SL_PAD_SD2_DAT7__GPIO5_IO00    0x17059
+                               MX6SL_PAD_SD2_DAT6__GPIO4_IO29    0x17059
+                               MX6SL_PAD_REF_CLK_32K__GPIO3_IO22 0x17059
+                               MX6SL_PAD_KEY_COL4__GPIO4_IO00  0x80000000
+                               MX6SL_PAD_KEY_COL5__GPIO4_IO02  0x80000000
+                               MX6SL_PAD_AUD_MCLK__AUDIO_CLK_OUT 0x4130b0
+                       >;
+               };
+
+               pinctrl_audmux3: audmux3grp {
+                       fsl,pins = <
+                               MX6SL_PAD_AUD_RXD__AUD3_RXD       0x4130b0
+                               MX6SL_PAD_AUD_TXC__AUD3_TXC       0x4130b0
+                               MX6SL_PAD_AUD_TXD__AUD3_TXD       0x4110b0
+                               MX6SL_PAD_AUD_TXFS__AUD3_TXFS     0x4130b0
+                       >;
+               };
+
+               pinctrl_ecspi1: ecspi1grp {
+                       fsl,pins = <
+                               MX6SL_PAD_ECSPI1_MISO__ECSPI1_MISO      0x100b1
+                               MX6SL_PAD_ECSPI1_MOSI__ECSPI1_MOSI      0x100b1
+                               MX6SL_PAD_ECSPI1_SCLK__ECSPI1_SCLK      0x100b1
+                               MX6SL_PAD_ECSPI1_SS0__GPIO4_IO11        0x80000000
+                       >;
+               };
+
+               pinctrl_fec: fecgrp {
+                       fsl,pins = <
+                               MX6SL_PAD_FEC_MDC__FEC_MDC              0x1b0b0
+                               MX6SL_PAD_FEC_MDIO__FEC_MDIO            0x1b0b0
+                               MX6SL_PAD_FEC_CRS_DV__FEC_RX_DV         0x1b0b0
+                               MX6SL_PAD_FEC_RXD0__FEC_RX_DATA0        0x1b0b0
+                               MX6SL_PAD_FEC_RXD1__FEC_RX_DATA1        0x1b0b0
+                               MX6SL_PAD_FEC_TX_EN__FEC_TX_EN          0x1b0b0
+                               MX6SL_PAD_FEC_TXD0__FEC_TX_DATA0        0x1b0b0
+                               MX6SL_PAD_FEC_TXD1__FEC_TX_DATA1        0x1b0b0
+                               MX6SL_PAD_FEC_REF_CLK__FEC_REF_OUT      0x4001b0a8
+                       >;
+               };
+
+               pinctrl_fec_sleep: fecgrp-sleep {
+                       fsl,pins = <
+                               MX6SL_PAD_FEC_MDC__GPIO4_IO23      0x3080
+                               MX6SL_PAD_FEC_CRS_DV__GPIO4_IO25   0x3080
+                               MX6SL_PAD_FEC_RXD0__GPIO4_IO17     0x3080
+                               MX6SL_PAD_FEC_RXD1__GPIO4_IO18     0x3080
+                               MX6SL_PAD_FEC_TX_EN__GPIO4_IO22    0x3080
+                               MX6SL_PAD_FEC_TXD0__GPIO4_IO24     0x3080
+                               MX6SL_PAD_FEC_TXD1__GPIO4_IO16     0x3080
+                               MX6SL_PAD_FEC_REF_CLK__GPIO4_IO26  0x3080
+                       >;
+               };
+
+               pinctrl_i2c1: i2c1grp {
+                       fsl,pins = <
+                               MX6SL_PAD_I2C1_SCL__I2C1_SCL    0x4001b8b1
+                               MX6SL_PAD_I2C1_SDA__I2C1_SDA    0x4001b8b1
+                       >;
+               };
+
+
+               pinctrl_i2c2: i2c2grp {
+                       fsl,pins = <
+                               MX6SL_PAD_I2C2_SCL__I2C2_SCL    0x4001b8b1
+                               MX6SL_PAD_I2C2_SDA__I2C2_SDA    0x4001b8b1
+                       >;
+               };
+
+               pinctrl_kpp: kppgrp {
+                       fsl,pins = <
+                               MX6SL_PAD_KEY_ROW0__KEY_ROW0    0x1b010
+                               MX6SL_PAD_KEY_ROW1__KEY_ROW1    0x1b010
+                               MX6SL_PAD_KEY_ROW2__KEY_ROW2    0x1b0b0
+                               MX6SL_PAD_KEY_COL0__KEY_COL0    0x110b0
+                               MX6SL_PAD_KEY_COL1__KEY_COL1    0x110b0
+                               MX6SL_PAD_KEY_COL2__KEY_COL2    0x110b0
+                       >;
+               };
+
+               pinctrl_lcd: lcdgrp {
+                       fsl,pins = <
+                               MX6SL_PAD_LCD_DAT0__LCD_DATA00 0x1b0b0
+                               MX6SL_PAD_LCD_DAT1__LCD_DATA01 0x1b0b0
+                               MX6SL_PAD_LCD_DAT2__LCD_DATA02 0x1b0b0
+                               MX6SL_PAD_LCD_DAT3__LCD_DATA03 0x1b0b0
+                               MX6SL_PAD_LCD_DAT4__LCD_DATA04 0x1b0b0
+                               MX6SL_PAD_LCD_DAT5__LCD_DATA05 0x1b0b0
+                               MX6SL_PAD_LCD_DAT6__LCD_DATA06 0x1b0b0
+                               MX6SL_PAD_LCD_DAT7__LCD_DATA07 0x1b0b0
+                               MX6SL_PAD_LCD_DAT8__LCD_DATA08 0x1b0b0
+                               MX6SL_PAD_LCD_DAT9__LCD_DATA09 0x1b0b0
+                               MX6SL_PAD_LCD_DAT10__LCD_DATA10 0x1b0b0
+                               MX6SL_PAD_LCD_DAT11__LCD_DATA11 0x1b0b0
+                               MX6SL_PAD_LCD_DAT12__LCD_DATA12 0x1b0b0
+                               MX6SL_PAD_LCD_DAT13__LCD_DATA13 0x1b0b0
+                               MX6SL_PAD_LCD_DAT14__LCD_DATA14 0x1b0b0
+                               MX6SL_PAD_LCD_DAT15__LCD_DATA15 0x1b0b0
+                               MX6SL_PAD_LCD_DAT16__LCD_DATA16 0x1b0b0
+                               MX6SL_PAD_LCD_DAT17__LCD_DATA17 0x1b0b0
+                               MX6SL_PAD_LCD_DAT18__LCD_DATA18 0x1b0b0
+                               MX6SL_PAD_LCD_DAT19__LCD_DATA19 0x1b0b0
+                               MX6SL_PAD_LCD_DAT20__LCD_DATA20 0x1b0b0
+                               MX6SL_PAD_LCD_DAT21__LCD_DATA21 0x1b0b0
+                               MX6SL_PAD_LCD_DAT22__LCD_DATA22 0x1b0b0
+                               MX6SL_PAD_LCD_DAT23__LCD_DATA23 0x1b0b0
+                               MX6SL_PAD_LCD_CLK__LCD_CLK 0x1b0b0
+                               MX6SL_PAD_LCD_ENABLE__LCD_ENABLE 0x1b0b0
+                               MX6SL_PAD_LCD_HSYNC__LCD_HSYNC 0x1b0b0
+                               MX6SL_PAD_LCD_VSYNC__LCD_VSYNC 0x1b0b0
+                       >;
+               };
+
+               pinctrl_led: ledgrp {
+                       fsl,pins = <
+                               MX6SL_PAD_HSIC_STROBE__GPIO3_IO20 0x17059
+                       >;
+               };
+
+               pinctrl_pwm1: pwmgrp {
+                       fsl,pins = <
+                               MX6SL_PAD_PWM1__PWM1_OUT 0x110b0
+                       >;
+               };
+
+               pinctrl_uart1: uart1grp {
+                       fsl,pins = <
+                               MX6SL_PAD_UART1_RXD__UART1_RX_DATA      0x1b0b1
+                               MX6SL_PAD_UART1_TXD__UART1_TX_DATA      0x1b0b1
+                       >;
+               };
+
+               pinctrl_usbotg1: usbotg1grp {
+                       fsl,pins = <
+                               MX6SL_PAD_EPDC_PWRCOM__USB_OTG1_ID      0x17059
+                       >;
+               };
+
+               pinctrl_usdhc1: usdhc1grp {
+                       fsl,pins = <
+                               MX6SL_PAD_SD1_CMD__SD1_CMD              0x17059
+                               MX6SL_PAD_SD1_CLK__SD1_CLK              0x10059
+                               MX6SL_PAD_SD1_DAT0__SD1_DATA0           0x17059
+                               MX6SL_PAD_SD1_DAT1__SD1_DATA1           0x17059
+                               MX6SL_PAD_SD1_DAT2__SD1_DATA2           0x17059
+                               MX6SL_PAD_SD1_DAT3__SD1_DATA3           0x17059
+                               MX6SL_PAD_SD1_DAT4__SD1_DATA4           0x17059
+                               MX6SL_PAD_SD1_DAT5__SD1_DATA5           0x17059
+                               MX6SL_PAD_SD1_DAT6__SD1_DATA6           0x17059
+                               MX6SL_PAD_SD1_DAT7__SD1_DATA7           0x17059
+                       >;
+               };
+
+               pinctrl_usdhc1_100mhz: usdhc1grp100mhz {
+                       fsl,pins = <
+                               MX6SL_PAD_SD1_CMD__SD1_CMD              0x170b9
+                               MX6SL_PAD_SD1_CLK__SD1_CLK              0x100b9
+                               MX6SL_PAD_SD1_DAT0__SD1_DATA0           0x170b9
+                               MX6SL_PAD_SD1_DAT1__SD1_DATA1           0x170b9
+                               MX6SL_PAD_SD1_DAT2__SD1_DATA2           0x170b9
+                               MX6SL_PAD_SD1_DAT3__SD1_DATA3           0x170b9
+                               MX6SL_PAD_SD1_DAT4__SD1_DATA4           0x170b9
+                               MX6SL_PAD_SD1_DAT5__SD1_DATA5           0x170b9
+                               MX6SL_PAD_SD1_DAT6__SD1_DATA6           0x170b9
+                               MX6SL_PAD_SD1_DAT7__SD1_DATA7           0x170b9
+                       >;
+               };
+
+               pinctrl_usdhc1_200mhz: usdhc1grp200mhz {
+                       fsl,pins = <
+                               MX6SL_PAD_SD1_CMD__SD1_CMD              0x170f9
+                               MX6SL_PAD_SD1_CLK__SD1_CLK              0x100f9
+                               MX6SL_PAD_SD1_DAT0__SD1_DATA0           0x170f9
+                               MX6SL_PAD_SD1_DAT1__SD1_DATA1           0x170f9
+                               MX6SL_PAD_SD1_DAT2__SD1_DATA2           0x170f9
+                               MX6SL_PAD_SD1_DAT3__SD1_DATA3           0x170f9
+                               MX6SL_PAD_SD1_DAT4__SD1_DATA4           0x170f9
+                               MX6SL_PAD_SD1_DAT5__SD1_DATA5           0x170f9
+                               MX6SL_PAD_SD1_DAT6__SD1_DATA6           0x170f9
+                               MX6SL_PAD_SD1_DAT7__SD1_DATA7           0x170f9
+                       >;
+               };
+
+               pinctrl_usdhc2: usdhc2grp {
+                       fsl,pins = <
+                               MX6SL_PAD_SD2_CMD__SD2_CMD              0x17059
+                               MX6SL_PAD_SD2_CLK__SD2_CLK              0x10059
+                               MX6SL_PAD_SD2_DAT0__SD2_DATA0           0x17059
+                               MX6SL_PAD_SD2_DAT1__SD2_DATA1           0x17059
+                               MX6SL_PAD_SD2_DAT2__SD2_DATA2           0x17059
+                               MX6SL_PAD_SD2_DAT3__SD2_DATA3           0x17059
+                       >;
+               };
+
+               pinctrl_usdhc2_100mhz: usdhc2grp100mhz {
+                       fsl,pins = <
+                               MX6SL_PAD_SD2_CMD__SD2_CMD              0x170b9
+                               MX6SL_PAD_SD2_CLK__SD2_CLK              0x100b9
+                               MX6SL_PAD_SD2_DAT0__SD2_DATA0           0x170b9
+                               MX6SL_PAD_SD2_DAT1__SD2_DATA1           0x170b9
+                               MX6SL_PAD_SD2_DAT2__SD2_DATA2           0x170b9
+                               MX6SL_PAD_SD2_DAT3__SD2_DATA3           0x170b9
+                       >;
+               };
+
+               pinctrl_usdhc2_200mhz: usdhc2grp200mhz {
+                       fsl,pins = <
+                               MX6SL_PAD_SD2_CMD__SD2_CMD              0x170f9
+                               MX6SL_PAD_SD2_CLK__SD2_CLK              0x100f9
+                               MX6SL_PAD_SD2_DAT0__SD2_DATA0           0x170f9
+                               MX6SL_PAD_SD2_DAT1__SD2_DATA1           0x170f9
+                               MX6SL_PAD_SD2_DAT2__SD2_DATA2           0x170f9
+                               MX6SL_PAD_SD2_DAT3__SD2_DATA3           0x170f9
+                       >;
+               };
+
+               pinctrl_usdhc3: usdhc3grp {
+                       fsl,pins = <
+                               MX6SL_PAD_SD3_CMD__SD3_CMD              0x17059
+                               MX6SL_PAD_SD3_CLK__SD3_CLK              0x10059
+                               MX6SL_PAD_SD3_DAT0__SD3_DATA0           0x17059
+                               MX6SL_PAD_SD3_DAT1__SD3_DATA1           0x17059
+                               MX6SL_PAD_SD3_DAT2__SD3_DATA2           0x17059
+                               MX6SL_PAD_SD3_DAT3__SD3_DATA3           0x17059
+                       >;
+               };
+
+               pinctrl_usdhc3_100mhz: usdhc3grp100mhz {
+                       fsl,pins = <
+                               MX6SL_PAD_SD3_CMD__SD3_CMD              0x170b9
+                               MX6SL_PAD_SD3_CLK__SD3_CLK              0x100b9
+                               MX6SL_PAD_SD3_DAT0__SD3_DATA0           0x170b9
+                               MX6SL_PAD_SD3_DAT1__SD3_DATA1           0x170b9
+                               MX6SL_PAD_SD3_DAT2__SD3_DATA2           0x170b9
+                               MX6SL_PAD_SD3_DAT3__SD3_DATA3           0x170b9
+                       >;
+               };
+
+               pinctrl_usdhc3_200mhz: usdhc3grp200mhz {
+                       fsl,pins = <
+                               MX6SL_PAD_SD3_CMD__SD3_CMD              0x170f9
+                               MX6SL_PAD_SD3_CLK__SD3_CLK              0x100f9
+                               MX6SL_PAD_SD3_DAT0__SD3_DATA0           0x170f9
+                               MX6SL_PAD_SD3_DAT1__SD3_DATA1           0x170f9
+                               MX6SL_PAD_SD3_DAT2__SD3_DATA2           0x170f9
+                               MX6SL_PAD_SD3_DAT3__SD3_DATA3           0x170f9
+                       >;
+               };
+       };
+};
+
+&kpp {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_kpp>;
+       linux,keymap = <
+                       MATRIX_KEY(0x0, 0x0, KEY_UP)         /* ROW0, COL0 */
+                       MATRIX_KEY(0x0, 0x1, KEY_DOWN)       /* ROW0, COL1 */
+                       MATRIX_KEY(0x0, 0x2, KEY_ENTER)      /* ROW0, COL2 */
+                       MATRIX_KEY(0x1, 0x0, KEY_HOME)       /* ROW1, COL0 */
+                       MATRIX_KEY(0x1, 0x1, KEY_RIGHT)      /* ROW1, COL1 */
+                       MATRIX_KEY(0x1, 0x2, KEY_LEFT)       /* ROW1, COL2 */
+                       MATRIX_KEY(0x2, 0x0, KEY_VOLUMEDOWN) /* ROW2, COL0 */
+                       MATRIX_KEY(0x2, 0x1, KEY_VOLUMEUP)   /* ROW2, COL1 */
+       >;
+       status = "okay";
+};
+
+&lcdif {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_lcd>;
+       lcd-supply = <&reg_lcd_3v3>;
+       display = <&display0>;
+       status = "okay";
+
+       display0: display0 {
+               bits-per-pixel = <32>;
+               bus-width = <24>;
+
+               display-timings {
+                       native-mode = <&timing0>;
+                       timing0: timing0 {
+                               clock-frequency = <33500000>;
+                               hactive = <800>;
+                               vactive = <480>;
+                               hback-porch = <89>;
+                               hfront-porch = <164>;
+                               vback-porch = <23>;
+                               vfront-porch = <10>;
+                               hsync-len = <10>;
+                               vsync-len = <10>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+               };
+       };
+};
+
+&pwm1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm1>;
+       status = "okay";
+};
+
+&snvs_poweroff {
+       status = "okay";
+};
+
+&ssi2 {
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1>;
+       status = "okay";
+};
+
+&usbotg1 {
+       vbus-supply = <&reg_usb_otg1_vbus>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg1>;
+       disable-over-current;
+       status = "okay";
+};
+
+&usbotg2 {
+       vbus-supply = <&reg_usb_otg2_vbus>;
+       dr_mode = "host";
+       disable-over-current;
+       status = "okay";
+};
+
+&usdhc1 {
+       pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-0 = <&pinctrl_usdhc1>;
+       pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
+       pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
+       bus-width = <8>;
+       cd-gpios = <&gpio4 7 GPIO_ACTIVE_LOW>;
+       wp-gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&usdhc2 {
+       pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-0 = <&pinctrl_usdhc2>;
+       pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
+       pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
+       cd-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
+       wp-gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&usdhc3 {
+       pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-0 = <&pinctrl_usdhc3>;
+       pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
+       pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
+       cd-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
+       status = "okay";
+};
diff --git a/arch/arm/dts/imx6sl-pinfunc.h b/arch/arm/dts/imx6sl-pinfunc.h
new file mode 100644 (file)
index 0000000..77b17bc
--- /dev/null
@@ -0,0 +1,1077 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#ifndef __DTS_IMX6SL_PINFUNC_H
+#define __DTS_IMX6SL_PINFUNC_H
+
+/*
+ * The pin function ID is a tuple of
+ * <mux_reg conf_reg input_reg mux_mode input_val>
+ */
+#define MX6SL_PAD_AUD_MCLK__AUDIO_CLK_OUT          0x04c 0x2a4 0x000 0x0 0x0
+#define MX6SL_PAD_AUD_MCLK__PWM4_OUT               0x04c 0x2a4 0x000 0x1 0x0
+#define MX6SL_PAD_AUD_MCLK__ECSPI3_RDY             0x04c 0x2a4 0x6b4 0x2 0x0
+#define MX6SL_PAD_AUD_MCLK__FEC_MDC                0x04c 0x2a4 0x000 0x3 0x0
+#define MX6SL_PAD_AUD_MCLK__WDOG2_RESET_B_DEB      0x04c 0x2a4 0x000 0x4 0x0
+#define MX6SL_PAD_AUD_MCLK__GPIO1_IO06             0x04c 0x2a4 0x000 0x5 0x0
+#define MX6SL_PAD_AUD_MCLK__SPDIF_EXT_CLK          0x04c 0x2a4 0x7f4 0x6 0x0
+#define MX6SL_PAD_AUD_RXC__AUD3_RXC                0x050 0x2a8 0x000 0x0 0x0
+#define MX6SL_PAD_AUD_RXC__I2C1_SDA                0x050 0x2a8 0x720 0x1 0x0
+#define MX6SL_PAD_AUD_RXC__UART3_TX_DATA           0x050 0x2a8 0x000 0x2 0x0
+#define MX6SL_PAD_AUD_RXC__UART3_RX_DATA           0x050 0x2a8 0x80c 0x2 0x0
+#define MX6SL_PAD_AUD_RXC__FEC_TX_CLK              0x050 0x2a8 0x70c 0x3 0x0
+#define MX6SL_PAD_AUD_RXC__I2C3_SDA                0x050 0x2a8 0x730 0x4 0x0
+#define MX6SL_PAD_AUD_RXC__GPIO1_IO01              0x050 0x2a8 0x000 0x5 0x0
+#define MX6SL_PAD_AUD_RXC__ECSPI3_SS1              0x050 0x2a8 0x6c4 0x6 0x0
+#define MX6SL_PAD_AUD_RXD__AUD3_RXD                0x054 0x2ac 0x000 0x0 0x0
+#define MX6SL_PAD_AUD_RXD__ECSPI3_MOSI             0x054 0x2ac 0x6bc 0x1 0x0
+#define MX6SL_PAD_AUD_RXD__UART4_RX_DATA           0x054 0x2ac 0x814 0x2 0x0
+#define MX6SL_PAD_AUD_RXD__UART4_TX_DATA           0x054 0x2ac 0x000 0x2 0x0
+#define MX6SL_PAD_AUD_RXD__FEC_RX_ER               0x054 0x2ac 0x708 0x3 0x0
+#define MX6SL_PAD_AUD_RXD__SD1_LCTL                0x054 0x2ac 0x000 0x4 0x0
+#define MX6SL_PAD_AUD_RXD__GPIO1_IO02              0x054 0x2ac 0x000 0x5 0x0
+#define MX6SL_PAD_AUD_RXFS__AUD3_RXFS              0x058 0x2b0 0x000 0x0 0x0
+#define MX6SL_PAD_AUD_RXFS__I2C1_SCL               0x058 0x2b0 0x71c 0x1 0x0
+#define MX6SL_PAD_AUD_RXFS__UART3_RX_DATA          0x058 0x2b0 0x80c 0x2 0x1
+#define MX6SL_PAD_AUD_RXFS__UART3_TX_DATA          0x058 0x2b0 0x000 0x2 0x0
+#define MX6SL_PAD_AUD_RXFS__FEC_MDIO               0x058 0x2b0 0x6f4 0x3 0x0
+#define MX6SL_PAD_AUD_RXFS__I2C3_SCL               0x058 0x2b0 0x72c 0x4 0x0
+#define MX6SL_PAD_AUD_RXFS__GPIO1_IO00             0x058 0x2b0 0x000 0x5 0x0
+#define MX6SL_PAD_AUD_RXFS__ECSPI3_SS0             0x058 0x2b0 0x6c0 0x6 0x0
+#define MX6SL_PAD_AUD_TXC__AUD3_TXC                0x05c 0x2b4 0x000 0x0 0x0
+#define MX6SL_PAD_AUD_TXC__ECSPI3_MISO             0x05c 0x2b4 0x6b8 0x1 0x0
+#define MX6SL_PAD_AUD_TXC__UART4_TX_DATA           0x05c 0x2b4 0x000 0x2 0x0
+#define MX6SL_PAD_AUD_TXC__UART4_RX_DATA           0x05c 0x2b4 0x814 0x2 0x1
+#define MX6SL_PAD_AUD_TXC__FEC_RX_DV               0x05c 0x2b4 0x704 0x3 0x0
+#define MX6SL_PAD_AUD_TXC__SD2_LCTL                0x05c 0x2b4 0x000 0x4 0x0
+#define MX6SL_PAD_AUD_TXC__GPIO1_IO03              0x05c 0x2b4 0x000 0x5 0x0
+#define MX6SL_PAD_AUD_TXD__AUD3_TXD                0x060 0x2b8 0x000 0x0 0x0
+#define MX6SL_PAD_AUD_TXD__ECSPI3_SCLK             0x060 0x2b8 0x6b0 0x1 0x0
+#define MX6SL_PAD_AUD_TXD__UART4_CTS_B             0x060 0x2b8 0x000 0x2 0x0
+#define MX6SL_PAD_AUD_TXD__UART4_RTS_B             0x060 0x2b8 0x810 0x2 0x0
+#define MX6SL_PAD_AUD_TXD__FEC_TX_DATA0            0x060 0x2b8 0x000 0x3 0x0
+#define MX6SL_PAD_AUD_TXD__SD4_LCTL                0x060 0x2b8 0x000 0x4 0x0
+#define MX6SL_PAD_AUD_TXD__GPIO1_IO05              0x060 0x2b8 0x000 0x5 0x0
+#define MX6SL_PAD_AUD_TXFS__AUD3_TXFS              0x064 0x2bc 0x000 0x0 0x0
+#define MX6SL_PAD_AUD_TXFS__PWM3_OUT               0x064 0x2bc 0x000 0x1 0x0
+#define MX6SL_PAD_AUD_TXFS__UART4_RTS_B            0x064 0x2bc 0x810 0x2 0x1
+#define MX6SL_PAD_AUD_TXFS__UART4_CTS_B            0x064 0x2bc 0x000 0x2 0x0
+#define MX6SL_PAD_AUD_TXFS__FEC_RX_DATA1           0x064 0x2bc 0x6fc 0x3 0x0
+#define MX6SL_PAD_AUD_TXFS__SD3_LCTL               0x064 0x2bc 0x000 0x4 0x0
+#define MX6SL_PAD_AUD_TXFS__GPIO1_IO04             0x064 0x2bc 0x000 0x5 0x0
+#define MX6SL_PAD_ECSPI1_MISO__ECSPI1_MISO         0x068 0x358 0x684 0x0 0x0
+#define MX6SL_PAD_ECSPI1_MISO__AUD4_TXFS           0x068 0x358 0x5f8 0x1 0x0
+#define MX6SL_PAD_ECSPI1_MISO__UART5_RTS_B         0x068 0x358 0x818 0x2 0x0
+#define MX6SL_PAD_ECSPI1_MISO__UART5_CTS_B         0x068 0x358 0x000 0x2 0x0
+#define MX6SL_PAD_ECSPI1_MISO__EPDC_BDR0           0x068 0x358 0x000 0x3 0x0
+#define MX6SL_PAD_ECSPI1_MISO__SD2_WP              0x068 0x358 0x834 0x4 0x0
+#define MX6SL_PAD_ECSPI1_MISO__GPIO4_IO10          0x068 0x358 0x000 0x5 0x0
+#define MX6SL_PAD_ECSPI1_MOSI__ECSPI1_MOSI         0x06c 0x35c 0x688 0x0 0x0
+#define MX6SL_PAD_ECSPI1_MOSI__AUD4_TXC            0x06c 0x35c 0x5f4 0x1 0x0
+#define MX6SL_PAD_ECSPI1_MOSI__UART5_TX_DATA       0x06c 0x35c 0x000 0x2 0x0
+#define MX6SL_PAD_ECSPI1_MOSI__UART5_RX_DATA       0x06c 0x35c 0x81c 0x2 0x0
+#define MX6SL_PAD_ECSPI1_MOSI__EPDC_VCOM1          0x06c 0x35c 0x000 0x3 0x0
+#define MX6SL_PAD_ECSPI1_MOSI__SD2_VSELECT         0x06c 0x35c 0x000 0x4 0x0
+#define MX6SL_PAD_ECSPI1_MOSI__GPIO4_IO09          0x06c 0x35c 0x000 0x5 0x0
+#define MX6SL_PAD_ECSPI1_SCLK__ECSPI1_SCLK         0x070 0x360 0x67c 0x0 0x0
+#define MX6SL_PAD_ECSPI1_SCLK__AUD4_TXD            0x070 0x360 0x5e8 0x1 0x0
+#define MX6SL_PAD_ECSPI1_SCLK__UART5_RX_DATA       0x070 0x360 0x81c 0x2 0x1
+#define MX6SL_PAD_ECSPI1_SCLK__UART5_TX_DATA       0x070 0x360 0x000 0x2 0x0
+#define MX6SL_PAD_ECSPI1_SCLK__EPDC_VCOM0          0x070 0x360 0x000 0x3 0x0
+#define MX6SL_PAD_ECSPI1_SCLK__SD2_RESET           0x070 0x360 0x000 0x4 0x0
+#define MX6SL_PAD_ECSPI1_SCLK__GPIO4_IO08          0x070 0x360 0x000 0x5 0x0
+#define MX6SL_PAD_ECSPI1_SCLK__USB_OTG2_OC         0x070 0x360 0x820 0x6 0x0
+#define MX6SL_PAD_ECSPI1_SS0__ECSPI1_SS0           0x074 0x364 0x68c 0x0 0x0
+#define MX6SL_PAD_ECSPI1_SS0__AUD4_RXD             0x074 0x364 0x5e4 0x1 0x0
+#define MX6SL_PAD_ECSPI1_SS0__UART5_CTS_B          0x074 0x364 0x000 0x2 0x0
+#define MX6SL_PAD_ECSPI1_SS0__UART5_RTS_B          0x074 0x364 0x818 0x2 0x1
+#define MX6SL_PAD_ECSPI1_SS0__EPDC_BDR1            0x074 0x364 0x000 0x3 0x0
+#define MX6SL_PAD_ECSPI1_SS0__SD2_CD_B             0x074 0x364 0x830 0x4 0x0
+#define MX6SL_PAD_ECSPI1_SS0__GPIO4_IO11           0x074 0x364 0x000 0x5 0x0
+#define MX6SL_PAD_ECSPI1_SS0__USB_OTG2_PWR         0x074 0x364 0x000 0x6 0x0
+#define MX6SL_PAD_ECSPI2_MISO__ECSPI2_MISO         0x078 0x368 0x6a0 0x0 0x0
+#define MX6SL_PAD_ECSPI2_MISO__SDMA_EXT_EVENT0     0x078 0x368 0x000 0x1 0x0
+#define MX6SL_PAD_ECSPI2_MISO__UART3_RTS_B         0x078 0x368 0x808 0x2 0x0
+#define MX6SL_PAD_ECSPI2_MISO__UART3_CTS_B         0x078 0x368 0x000 0x2 0x0
+#define MX6SL_PAD_ECSPI2_MISO__CSI_MCLK            0x078 0x368 0x000 0x3 0x0
+#define MX6SL_PAD_ECSPI2_MISO__SD1_WP              0x078 0x368 0x82c 0x4 0x0
+#define MX6SL_PAD_ECSPI2_MISO__GPIO4_IO14          0x078 0x368 0x000 0x5 0x0
+#define MX6SL_PAD_ECSPI2_MISO__USB_OTG1_OC         0x078 0x368 0x824 0x6 0x0
+#define MX6SL_PAD_ECSPI2_MOSI__ECSPI2_MOSI         0x07c 0x36c 0x6a4 0x0 0x0
+#define MX6SL_PAD_ECSPI2_MOSI__SDMA_EXT_EVENT1     0x07c 0x36c 0x000 0x1 0x0
+#define MX6SL_PAD_ECSPI2_MOSI__UART3_TX_DATA       0x07c 0x36c 0x000 0x2 0x0
+#define MX6SL_PAD_ECSPI2_MOSI__UART3_RX_DATA       0x07c 0x36c 0x80c 0x2 0x2
+#define MX6SL_PAD_ECSPI2_MOSI__CSI_HSYNC           0x07c 0x36c 0x670 0x3 0x0
+#define MX6SL_PAD_ECSPI2_MOSI__SD1_VSELECT         0x07c 0x36c 0x000 0x4 0x0
+#define MX6SL_PAD_ECSPI2_MOSI__GPIO4_IO13          0x07c 0x36c 0x000 0x5 0x0
+#define MX6SL_PAD_ECSPI2_SCLK__ECSPI2_SCLK         0x080 0x370 0x69c 0x0 0x0
+#define MX6SL_PAD_ECSPI2_SCLK__SPDIF_EXT_CLK       0x080 0x370 0x7f4 0x1 0x1
+#define MX6SL_PAD_ECSPI2_SCLK__UART3_RX_DATA       0x080 0x370 0x80c 0x2 0x3
+#define MX6SL_PAD_ECSPI2_SCLK__UART3_TX_DATA       0x080 0x370 0x000 0x2 0x0
+#define MX6SL_PAD_ECSPI2_SCLK__CSI_PIXCLK          0x080 0x370 0x674 0x3 0x0
+#define MX6SL_PAD_ECSPI2_SCLK__SD1_RESET           0x080 0x370 0x000 0x4 0x0
+#define MX6SL_PAD_ECSPI2_SCLK__GPIO4_IO12          0x080 0x370 0x000 0x5 0x0
+#define MX6SL_PAD_ECSPI2_SCLK__USB_OTG2_OC         0x080 0x370 0x820 0x6 0x1
+#define MX6SL_PAD_ECSPI2_SS0__ECSPI2_SS0           0x084 0x374 0x6a8 0x0 0x0
+#define MX6SL_PAD_ECSPI2_SS0__ECSPI1_SS3           0x084 0x374 0x698 0x1 0x0
+#define MX6SL_PAD_ECSPI2_SS0__UART3_CTS_B          0x084 0x374 0x000 0x2 0x0
+#define MX6SL_PAD_ECSPI2_SS0__UART3_RTS_B          0x084 0x374 0x808 0x2 0x1
+#define MX6SL_PAD_ECSPI2_SS0__CSI_VSYNC            0x084 0x374 0x678 0x3 0x0
+#define MX6SL_PAD_ECSPI2_SS0__SD1_CD_B             0x084 0x374 0x828 0x4 0x0
+#define MX6SL_PAD_ECSPI2_SS0__GPIO4_IO15           0x084 0x374 0x000 0x5 0x0
+#define MX6SL_PAD_ECSPI2_SS0__USB_OTG1_PWR         0x084 0x374 0x000 0x6 0x0
+#define MX6SL_PAD_EPDC_BDR0__EPDC_BDR0             0x088 0x378 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_BDR0__SD4_CLK               0x088 0x378 0x850 0x1 0x0
+#define MX6SL_PAD_EPDC_BDR0__UART3_RTS_B           0x088 0x378 0x808 0x2 0x2
+#define MX6SL_PAD_EPDC_BDR0__UART3_CTS_B           0x088 0x378 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_BDR0__EIM_ADDR26            0x088 0x378 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_BDR0__SPDC_RL               0x088 0x378 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_BDR0__GPIO2_IO05            0x088 0x378 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_BDR0__EPDC_SDCE7            0x088 0x378 0x000 0x6 0x0
+#define MX6SL_PAD_EPDC_BDR1__EPDC_BDR1             0x08c 0x37c 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_BDR1__SD4_CMD               0x08c 0x37c 0x858 0x1 0x0
+#define MX6SL_PAD_EPDC_BDR1__UART3_CTS_B           0x08c 0x37c 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_BDR1__UART3_RTS_B           0x08c 0x37c 0x808 0x2 0x3
+#define MX6SL_PAD_EPDC_BDR1__EIM_CRE               0x08c 0x37c 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_BDR1__SPDC_UD               0x08c 0x37c 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_BDR1__GPIO2_IO06            0x08c 0x37c 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_BDR1__EPDC_SDCE8            0x08c 0x37c 0x000 0x6 0x0
+#define MX6SL_PAD_EPDC_D0__EPDC_DATA00             0x090 0x380 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D0__ECSPI4_MOSI             0x090 0x380 0x6d8 0x1 0x0
+#define MX6SL_PAD_EPDC_D0__LCD_DATA24              0x090 0x380 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_D0__CSI_DATA00              0x090 0x380 0x630 0x3 0x0
+#define MX6SL_PAD_EPDC_D0__SPDC_DATA00             0x090 0x380 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D0__GPIO1_IO07              0x090 0x380 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D1__EPDC_DATA01             0x094 0x384 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D1__ECSPI4_MISO             0x094 0x384 0x6d4 0x1 0x0
+#define MX6SL_PAD_EPDC_D1__LCD_DATA25              0x094 0x384 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_D1__CSI_DATA01              0x094 0x384 0x634 0x3 0x0
+#define MX6SL_PAD_EPDC_D1__SPDC_DATA01             0x094 0x384 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D1__GPIO1_IO08              0x094 0x384 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D10__EPDC_DATA10            0x098 0x388 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D10__ECSPI3_SS0             0x098 0x388 0x6c0 0x1 0x1
+#define MX6SL_PAD_EPDC_D10__EPDC_PWR_CTRL2         0x098 0x388 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_D10__EIM_ADDR18             0x098 0x388 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_D10__SPDC_DATA10            0x098 0x388 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D10__GPIO1_IO17             0x098 0x388 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D10__SD4_WP                 0x098 0x388 0x87c 0x6 0x0
+#define MX6SL_PAD_EPDC_D11__EPDC_DATA11            0x09c 0x38c 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D11__ECSPI3_SCLK            0x09c 0x38c 0x6b0 0x1 0x1
+#define MX6SL_PAD_EPDC_D11__EPDC_PWR_CTRL3         0x09c 0x38c 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_D11__EIM_ADDR19             0x09c 0x38c 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_D11__SPDC_DATA11            0x09c 0x38c 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D11__GPIO1_IO18             0x09c 0x38c 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D11__SD4_CD_B               0x09c 0x38c 0x854 0x6 0x0
+#define MX6SL_PAD_EPDC_D12__EPDC_DATA12            0x0a0 0x390 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D12__UART2_RX_DATA          0x0a0 0x390 0x804 0x1 0x0
+#define MX6SL_PAD_EPDC_D12__UART2_TX_DATA          0x0a0 0x390 0x000 0x1 0x0
+#define MX6SL_PAD_EPDC_D12__EPDC_PWR_COM           0x0a0 0x390 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_D12__EIM_ADDR20             0x0a0 0x390 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_D12__SPDC_DATA12            0x0a0 0x390 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D12__GPIO1_IO19             0x0a0 0x390 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D12__ECSPI3_SS1             0x0a0 0x390 0x6c4 0x6 0x1
+#define MX6SL_PAD_EPDC_D13__EPDC_DATA13            0x0a4 0x394 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D13__UART2_TX_DATA          0x0a4 0x394 0x000 0x1 0x0
+#define MX6SL_PAD_EPDC_D13__UART2_RX_DATA          0x0a4 0x394 0x804 0x1 0x1
+#define MX6SL_PAD_EPDC_D13__EPDC_PWR_IRQ           0x0a4 0x394 0x6e8 0x2 0x0
+#define MX6SL_PAD_EPDC_D13__EIM_ADDR21             0x0a4 0x394 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_D13__SPDC_DATA13            0x0a4 0x394 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D13__GPIO1_IO20             0x0a4 0x394 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D13__ECSPI3_SS2             0x0a4 0x394 0x6c8 0x6 0x0
+#define MX6SL_PAD_EPDC_D14__EPDC_DATA14            0x0a8 0x398 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D14__UART2_RTS_B            0x0a8 0x398 0x800 0x1 0x0
+#define MX6SL_PAD_EPDC_D14__UART2_CTS_B            0x0a8 0x398 0x000 0x1 0x0
+#define MX6SL_PAD_EPDC_D14__EPDC_PWR_STAT          0x0a8 0x398 0x6ec 0x2 0x0
+#define MX6SL_PAD_EPDC_D14__EIM_ADDR22             0x0a8 0x398 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_D14__SPDC_DATA14            0x0a8 0x398 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D14__GPIO1_IO21             0x0a8 0x398 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D14__ECSPI3_SS3             0x0a8 0x398 0x6cc 0x6 0x0
+#define MX6SL_PAD_EPDC_D15__EPDC_DATA15            0x0ac 0x39c 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D15__UART2_CTS_B            0x0ac 0x39c 0x000 0x1 0x0
+#define MX6SL_PAD_EPDC_D15__UART2_RTS_B            0x0ac 0x39c 0x800 0x1 0x1
+#define MX6SL_PAD_EPDC_D15__EPDC_PWR_WAKE          0x0ac 0x39c 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_D15__EIM_ADDR23             0x0ac 0x39c 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_D15__SPDC_DATA15            0x0ac 0x39c 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D15__GPIO1_IO22             0x0ac 0x39c 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D15__ECSPI3_RDY             0x0ac 0x39c 0x6b4 0x6 0x1
+#define MX6SL_PAD_EPDC_D2__EPDC_DATA02             0x0b0 0x3a0 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D2__ECSPI4_SS0              0x0b0 0x3a0 0x6dc 0x1 0x0
+#define MX6SL_PAD_EPDC_D2__LCD_DATA26              0x0b0 0x3a0 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_D2__CSI_DATA02              0x0b0 0x3a0 0x638 0x3 0x0
+#define MX6SL_PAD_EPDC_D2__SPDC_DATA02             0x0b0 0x3a0 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D2__GPIO1_IO09              0x0b0 0x3a0 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D3__EPDC_DATA03             0x0b4 0x3a4 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D3__ECSPI4_SCLK             0x0b4 0x3a4 0x6d0 0x1 0x0
+#define MX6SL_PAD_EPDC_D3__LCD_DATA27              0x0b4 0x3a4 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_D3__CSI_DATA03              0x0b4 0x3a4 0x63c 0x3 0x0
+#define MX6SL_PAD_EPDC_D3__SPDC_DATA03             0x0b4 0x3a4 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D3__GPIO1_IO10              0x0b4 0x3a4 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D4__EPDC_DATA04             0x0b8 0x3a8 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D4__ECSPI4_SS1              0x0b8 0x3a8 0x6e0 0x1 0x0
+#define MX6SL_PAD_EPDC_D4__LCD_DATA28              0x0b8 0x3a8 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_D4__CSI_DATA04              0x0b8 0x3a8 0x640 0x3 0x0
+#define MX6SL_PAD_EPDC_D4__SPDC_DATA04             0x0b8 0x3a8 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D4__GPIO1_IO11              0x0b8 0x3a8 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D5__EPDC_DATA05             0x0bc 0x3ac 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D5__ECSPI4_SS2              0x0bc 0x3ac 0x6e4 0x1 0x0
+#define MX6SL_PAD_EPDC_D5__LCD_DATA29              0x0bc 0x3ac 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_D5__CSI_DATA05              0x0bc 0x3ac 0x644 0x3 0x0
+#define MX6SL_PAD_EPDC_D5__SPDC_DATA05             0x0bc 0x3ac 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D5__GPIO1_IO12              0x0bc 0x3ac 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D6__EPDC_DATA06             0x0c0 0x3b0 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D6__ECSPI4_SS3              0x0c0 0x3b0 0x000 0x1 0x0
+#define MX6SL_PAD_EPDC_D6__LCD_DATA30              0x0c0 0x3b0 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_D6__CSI_DATA06              0x0c0 0x3b0 0x648 0x3 0x0
+#define MX6SL_PAD_EPDC_D6__SPDC_DATA06             0x0c0 0x3b0 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D6__GPIO1_IO13              0x0c0 0x3b0 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D7__EPDC_DATA07             0x0c4 0x3b4 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D7__ECSPI4_RDY              0x0c4 0x3b4 0x000 0x1 0x0
+#define MX6SL_PAD_EPDC_D7__LCD_DATA31              0x0c4 0x3b4 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_D7__CSI_DATA07              0x0c4 0x3b4 0x64c 0x3 0x0
+#define MX6SL_PAD_EPDC_D7__SPDC_DATA07             0x0c4 0x3b4 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D7__GPIO1_IO14              0x0c4 0x3b4 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D8__EPDC_DATA08             0x0c8 0x3b8 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D8__ECSPI3_MOSI             0x0c8 0x3b8 0x6bc 0x1 0x1
+#define MX6SL_PAD_EPDC_D8__EPDC_PWR_CTRL0          0x0c8 0x3b8 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_D8__EIM_ADDR16              0x0c8 0x3b8 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_D8__SPDC_DATA08             0x0c8 0x3b8 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D8__GPIO1_IO15              0x0c8 0x3b8 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D8__SD4_RESET               0x0c8 0x3b8 0x000 0x6 0x0
+#define MX6SL_PAD_EPDC_D9__EPDC_DATA09             0x0cc 0x3bc 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_D9__ECSPI3_MISO             0x0cc 0x3bc 0x6b8 0x1 0x1
+#define MX6SL_PAD_EPDC_D9__EPDC_PWR_CTRL1          0x0cc 0x3bc 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_D9__EIM_ADDR17              0x0cc 0x3bc 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_D9__SPDC_DATA09             0x0cc 0x3bc 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_D9__GPIO1_IO16              0x0cc 0x3bc 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_D9__SD4_VSELECT             0x0cc 0x3bc 0x000 0x6 0x0
+#define MX6SL_PAD_EPDC_GDCLK__EPDC_GDCLK           0x0d0 0x3c0 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_GDCLK__ECSPI2_SS2           0x0d0 0x3c0 0x000 0x1 0x0
+#define MX6SL_PAD_EPDC_GDCLK__SPDC_YCKR            0x0d0 0x3c0 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_GDCLK__CSI_PIXCLK           0x0d0 0x3c0 0x674 0x3 0x1
+#define MX6SL_PAD_EPDC_GDCLK__SPDC_YCKL            0x0d0 0x3c0 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_GDCLK__GPIO1_IO31           0x0d0 0x3c0 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_GDCLK__SD2_RESET            0x0d0 0x3c0 0x000 0x6 0x0
+#define MX6SL_PAD_EPDC_GDOE__EPDC_GDOE             0x0d4 0x3c4 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_GDOE__ECSPI2_SS3            0x0d4 0x3c4 0x000 0x1 0x0
+#define MX6SL_PAD_EPDC_GDOE__SPDC_YOER             0x0d4 0x3c4 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_GDOE__CSI_HSYNC             0x0d4 0x3c4 0x670 0x3 0x1
+#define MX6SL_PAD_EPDC_GDOE__SPDC_YOEL             0x0d4 0x3c4 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_GDOE__GPIO2_IO00            0x0d4 0x3c4 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_GDOE__SD2_VSELECT           0x0d4 0x3c4 0x000 0x6 0x0
+#define MX6SL_PAD_EPDC_GDRL__EPDC_GDRL             0x0d8 0x3c8 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_GDRL__ECSPI2_RDY            0x0d8 0x3c8 0x000 0x1 0x0
+#define MX6SL_PAD_EPDC_GDRL__SPDC_YDIOUR           0x0d8 0x3c8 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_GDRL__CSI_MCLK              0x0d8 0x3c8 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_GDRL__SPDC_YDIOUL           0x0d8 0x3c8 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_GDRL__GPIO2_IO01            0x0d8 0x3c8 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_GDRL__SD2_WP                0x0d8 0x3c8 0x834 0x6 0x1
+#define MX6SL_PAD_EPDC_GDSP__EPDC_GDSP             0x0dc 0x3cc 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_GDSP__PWM4_OUT              0x0dc 0x3cc 0x000 0x1 0x0
+#define MX6SL_PAD_EPDC_GDSP__SPDC_YDIODR           0x0dc 0x3cc 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_GDSP__CSI_VSYNC             0x0dc 0x3cc 0x678 0x3 0x1
+#define MX6SL_PAD_EPDC_GDSP__SPDC_YDIODL           0x0dc 0x3cc 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_GDSP__GPIO2_IO02            0x0dc 0x3cc 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_GDSP__SD2_CD_B              0x0dc 0x3cc 0x830 0x6 0x1
+#define MX6SL_PAD_EPDC_PWRCOM__EPDC_PWR_COM        0x0e0 0x3d0 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_PWRCOM__SD4_DATA0           0x0e0 0x3d0 0x85c 0x1 0x0
+#define MX6SL_PAD_EPDC_PWRCOM__LCD_DATA20          0x0e0 0x3d0 0x7c8 0x2 0x0
+#define MX6SL_PAD_EPDC_PWRCOM__EIM_BCLK            0x0e0 0x3d0 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_PWRCOM__USB_OTG1_ID         0x0e0 0x3d0 0x5dc 0x4 0x0
+#define MX6SL_PAD_EPDC_PWRCOM__GPIO2_IO11          0x0e0 0x3d0 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_PWRCOM__SD3_RESET           0x0e0 0x3d0 0x000 0x6 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL0__EPDC_PWR_CTRL0    0x0e4 0x3d4 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL0__AUD5_RXC          0x0e4 0x3d4 0x604 0x1 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL0__LCD_DATA16        0x0e4 0x3d4 0x7b8 0x2 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL0__EIM_RW            0x0e4 0x3d4 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL0__SPDC_YCKL         0x0e4 0x3d4 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL0__GPIO2_IO07        0x0e4 0x3d4 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL0__SD4_RESET         0x0e4 0x3d4 0x000 0x6 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL1__EPDC_PWR_CTRL1    0x0e8 0x3d8 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL1__AUD5_TXFS         0x0e8 0x3d8 0x610 0x1 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL1__LCD_DATA17        0x0e8 0x3d8 0x7bc 0x2 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL1__EIM_OE_B          0x0e8 0x3d8 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL1__SPDC_YOEL         0x0e8 0x3d8 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL1__GPIO2_IO08        0x0e8 0x3d8 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL1__SD4_VSELECT       0x0e8 0x3d8 0x000 0x6 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL2__EPDC_PWR_CTRL2    0x0ec 0x3dc 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL2__AUD5_TXD          0x0ec 0x3dc 0x600 0x1 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL2__LCD_DATA18        0x0ec 0x3dc 0x7c0 0x2 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL2__EIM_CS0_B         0x0ec 0x3dc 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL2__SPDC_YDIOUL       0x0ec 0x3dc 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL2__GPIO2_IO09        0x0ec 0x3dc 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL2__SD4_WP            0x0ec 0x3dc 0x87c 0x6 0x1
+#define MX6SL_PAD_EPDC_PWRCTRL3__EPDC_PWR_CTRL3    0x0f0 0x3e0 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL3__AUD5_TXC          0x0f0 0x3e0 0x60c 0x1 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL3__LCD_DATA19        0x0f0 0x3e0 0x7c4 0x2 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL3__EIM_CS1_B         0x0f0 0x3e0 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL3__SPDC_YDIODL       0x0f0 0x3e0 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL3__GPIO2_IO10        0x0f0 0x3e0 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_PWRCTRL3__SD4_CD_B          0x0f0 0x3e0 0x854 0x6 0x1
+#define MX6SL_PAD_EPDC_PWRINT__EPDC_PWR_IRQ        0x0f4 0x3e4 0x6e8 0x0 0x1
+#define MX6SL_PAD_EPDC_PWRINT__SD4_DATA1           0x0f4 0x3e4 0x860 0x1 0x0
+#define MX6SL_PAD_EPDC_PWRINT__LCD_DATA21          0x0f4 0x3e4 0x7cc 0x2 0x0
+#define MX6SL_PAD_EPDC_PWRINT__EIM_ACLK_FREERUN    0x0f4 0x3e4 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_PWRINT__USB_OTG2_ID         0x0f4 0x3e4 0x5e0 0x4 0x0
+#define MX6SL_PAD_EPDC_PWRINT__GPIO2_IO12          0x0f4 0x3e4 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_PWRINT__SD3_VSELECT         0x0f4 0x3e4 0x000 0x6 0x0
+#define MX6SL_PAD_EPDC_PWRSTAT__EPDC_PWR_STAT      0x0f8 0x3e8 0x6ec 0x0 0x1
+#define MX6SL_PAD_EPDC_PWRSTAT__SD4_DATA2          0x0f8 0x3e8 0x864 0x1 0x0
+#define MX6SL_PAD_EPDC_PWRSTAT__LCD_DATA22         0x0f8 0x3e8 0x7d0 0x2 0x0
+#define MX6SL_PAD_EPDC_PWRSTAT__EIM_WAIT_B         0x0f8 0x3e8 0x884 0x3 0x0
+#define MX6SL_PAD_EPDC_PWRSTAT__ARM_EVENTI         0x0f8 0x3e8 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_PWRSTAT__GPIO2_IO13         0x0f8 0x3e8 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_PWRSTAT__SD3_WP             0x0f8 0x3e8 0x84c 0x6 0x0
+#define MX6SL_PAD_EPDC_PWRWAKEUP__EPDC_PWR_WAKE    0x0fc 0x3ec 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_PWRWAKEUP__SD4_DATA3        0x0fc 0x3ec 0x868 0x1 0x0
+#define MX6SL_PAD_EPDC_PWRWAKEUP__LCD_DATA23       0x0fc 0x3ec 0x7d4 0x2 0x0
+#define MX6SL_PAD_EPDC_PWRWAKEUP__EIM_DTACK_B      0x0fc 0x3ec 0x880 0x3 0x0
+#define MX6SL_PAD_EPDC_PWRWAKEUP__ARM_EVENTO       0x0fc 0x3ec 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_PWRWAKEUP__GPIO2_IO14       0x0fc 0x3ec 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_PWRWAKEUP__SD3_CD_B         0x0fc 0x3ec 0x838 0x6 0x0
+#define MX6SL_PAD_EPDC_SDCE0__EPDC_SDCE0           0x100 0x3f0 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_SDCE0__ECSPI2_SS1           0x100 0x3f0 0x6ac 0x1 0x0
+#define MX6SL_PAD_EPDC_SDCE0__PWM3_OUT             0x100 0x3f0 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_SDCE0__EIM_CS2_B            0x100 0x3f0 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_SDCE0__SPDC_YCKR            0x100 0x3f0 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_SDCE0__GPIO1_IO27           0x100 0x3f0 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_SDCE1__EPDC_SDCE1           0x104 0x3f4 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_SDCE1__WDOG2_B              0x104 0x3f4 0x000 0x1 0x0
+#define MX6SL_PAD_EPDC_SDCE1__PWM4_OUT             0x104 0x3f4 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_SDCE1__EIM_LBA_B            0x104 0x3f4 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_SDCE1__SPDC_YOER            0x104 0x3f4 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_SDCE1__GPIO1_IO28           0x104 0x3f4 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_SDCE2__EPDC_SDCE2           0x108 0x3f8 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_SDCE2__I2C3_SCL             0x108 0x3f8 0x72c 0x1 0x1
+#define MX6SL_PAD_EPDC_SDCE2__PWM1_OUT             0x108 0x3f8 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_SDCE2__EIM_EB0_B            0x108 0x3f8 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_SDCE2__SPDC_YDIOUR          0x108 0x3f8 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_SDCE2__GPIO1_IO29           0x108 0x3f8 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_SDCE3__EPDC_SDCE3           0x10c 0x3fc 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_SDCE3__I2C3_SDA             0x10c 0x3fc 0x730 0x1 0x1
+#define MX6SL_PAD_EPDC_SDCE3__PWM2_OUT             0x10c 0x3fc 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_SDCE3__EIM_EB1_B            0x10c 0x3fc 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_SDCE3__SPDC_YDIODR          0x10c 0x3fc 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_SDCE3__GPIO1_IO30           0x10c 0x3fc 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_SDCLK__EPDC_SDCLK_P         0x110 0x400 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_SDCLK__ECSPI2_MOSI          0x110 0x400 0x6a4 0x1 0x1
+#define MX6SL_PAD_EPDC_SDCLK__I2C2_SCL             0x110 0x400 0x724 0x2 0x0
+#define MX6SL_PAD_EPDC_SDCLK__CSI_DATA08           0x110 0x400 0x650 0x3 0x0
+#define MX6SL_PAD_EPDC_SDCLK__SPDC_CL              0x110 0x400 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_SDCLK__GPIO1_IO23           0x110 0x400 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_SDLE__EPDC_SDLE             0x114 0x404 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_SDLE__ECSPI2_MISO           0x114 0x404 0x6a0 0x1 0x1
+#define MX6SL_PAD_EPDC_SDLE__I2C2_SDA              0x114 0x404 0x728 0x2 0x0
+#define MX6SL_PAD_EPDC_SDLE__CSI_DATA09            0x114 0x404 0x654 0x3 0x0
+#define MX6SL_PAD_EPDC_SDLE__SPDC_LD               0x114 0x404 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_SDLE__GPIO1_IO24            0x114 0x404 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_SDOE__EPDC_SDOE             0x118 0x408 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_SDOE__ECSPI2_SS0            0x118 0x408 0x6a8 0x1 0x1
+#define MX6SL_PAD_EPDC_SDOE__SPDC_XDIOR            0x118 0x408 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_SDOE__CSI_DATA10            0x118 0x408 0x658 0x3 0x0
+#define MX6SL_PAD_EPDC_SDOE__SPDC_XDIOL            0x118 0x408 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_SDOE__GPIO1_IO25            0x118 0x408 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_SDSHR__EPDC_SDSHR           0x11c 0x40c 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_SDSHR__ECSPI2_SCLK          0x11c 0x40c 0x69c 0x1 0x1
+#define MX6SL_PAD_EPDC_SDSHR__EPDC_SDCE4           0x11c 0x40c 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_SDSHR__CSI_DATA11           0x11c 0x40c 0x65c 0x3 0x0
+#define MX6SL_PAD_EPDC_SDSHR__SPDC_XDIOR           0x11c 0x40c 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_SDSHR__GPIO1_IO26           0x11c 0x40c 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_VCOM0__EPDC_VCOM0           0x120 0x410 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_VCOM0__AUD5_RXFS            0x120 0x410 0x608 0x1 0x0
+#define MX6SL_PAD_EPDC_VCOM0__UART3_RX_DATA        0x120 0x410 0x80c 0x2 0x4
+#define MX6SL_PAD_EPDC_VCOM0__UART3_TX_DATA        0x120 0x410 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_VCOM0__EIM_ADDR24           0x120 0x410 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_VCOM0__SPDC_VCOM0           0x120 0x410 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_VCOM0__GPIO2_IO03           0x120 0x410 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_VCOM0__EPDC_SDCE5           0x120 0x410 0x000 0x6 0x0
+#define MX6SL_PAD_EPDC_VCOM1__EPDC_VCOM1           0x124 0x414 0x000 0x0 0x0
+#define MX6SL_PAD_EPDC_VCOM1__AUD5_RXD             0x124 0x414 0x5fc 0x1 0x0
+#define MX6SL_PAD_EPDC_VCOM1__UART3_TX_DATA        0x124 0x414 0x000 0x2 0x0
+#define MX6SL_PAD_EPDC_VCOM1__UART3_RX_DATA        0x124 0x414 0x80c 0x2 0x5
+#define MX6SL_PAD_EPDC_VCOM1__EIM_ADDR25           0x124 0x414 0x000 0x3 0x0
+#define MX6SL_PAD_EPDC_VCOM1__SPDC_VCOM1           0x124 0x414 0x000 0x4 0x0
+#define MX6SL_PAD_EPDC_VCOM1__GPIO2_IO04           0x124 0x414 0x000 0x5 0x0
+#define MX6SL_PAD_EPDC_VCOM1__EPDC_SDCE6           0x124 0x414 0x000 0x6 0x0
+#define MX6SL_PAD_FEC_CRS_DV__FEC_RX_DV            0x128 0x418 0x704 0x0 0x1
+#define MX6SL_PAD_FEC_CRS_DV__SD4_DATA1            0x128 0x418 0x860 0x1 0x1
+#define MX6SL_PAD_FEC_CRS_DV__AUD6_TXC             0x128 0x418 0x624 0x2 0x0
+#define MX6SL_PAD_FEC_CRS_DV__ECSPI4_MISO          0x128 0x418 0x6d4 0x3 0x1
+#define MX6SL_PAD_FEC_CRS_DV__GPT_COMPARE2         0x128 0x418 0x000 0x4 0x0
+#define MX6SL_PAD_FEC_CRS_DV__GPIO4_IO25           0x128 0x418 0x000 0x5 0x0
+#define MX6SL_PAD_FEC_CRS_DV__ARM_TRACE31          0x128 0x418 0x000 0x6 0x0
+#define MX6SL_PAD_FEC_MDC__FEC_MDC                 0x12c 0x41c 0x000 0x0 0x0
+#define MX6SL_PAD_FEC_MDC__SD4_DATA4               0x12c 0x41c 0x86c 0x1 0x0
+#define MX6SL_PAD_FEC_MDC__AUDIO_CLK_OUT           0x12c 0x41c 0x000 0x2 0x0
+#define MX6SL_PAD_FEC_MDC__SD1_RESET               0x12c 0x41c 0x000 0x3 0x0
+#define MX6SL_PAD_FEC_MDC__SD3_RESET               0x12c 0x41c 0x000 0x4 0x0
+#define MX6SL_PAD_FEC_MDC__GPIO4_IO23              0x12c 0x41c 0x000 0x5 0x0
+#define MX6SL_PAD_FEC_MDC__ARM_TRACE29             0x12c 0x41c 0x000 0x6 0x0
+#define MX6SL_PAD_FEC_MDIO__FEC_MDIO               0x130 0x420 0x6f4 0x0 0x1
+#define MX6SL_PAD_FEC_MDIO__SD4_CLK                0x130 0x420 0x850 0x1 0x1
+#define MX6SL_PAD_FEC_MDIO__AUD6_RXFS              0x130 0x420 0x620 0x2 0x0
+#define MX6SL_PAD_FEC_MDIO__ECSPI4_SS0             0x130 0x420 0x6dc 0x3 0x1
+#define MX6SL_PAD_FEC_MDIO__GPT_CAPTURE1           0x130 0x420 0x710 0x4 0x0
+#define MX6SL_PAD_FEC_MDIO__GPIO4_IO20             0x130 0x420 0x000 0x5 0x0
+#define MX6SL_PAD_FEC_MDIO__ARM_TRACE26            0x130 0x420 0x000 0x6 0x0
+#define MX6SL_PAD_FEC_REF_CLK__FEC_REF_OUT         0x134 0x424 0x000 0x0 0x0
+#define MX6SL_PAD_FEC_REF_CLK__SD4_RESET           0x134 0x424 0x000 0x1 0x0
+#define MX6SL_PAD_FEC_REF_CLK__WDOG1_B             0x134 0x424 0x000 0x2 0x0
+#define MX6SL_PAD_FEC_REF_CLK__PWM4_OUT            0x134 0x424 0x000 0x3 0x0
+#define MX6SL_PAD_FEC_REF_CLK__CCM_PMIC_READY      0x134 0x424 0x62c 0x4 0x0
+#define MX6SL_PAD_FEC_REF_CLK__GPIO4_IO26          0x134 0x424 0x000 0x5 0x0
+#define MX6SL_PAD_FEC_REF_CLK__SPDIF_EXT_CLK       0x134 0x424 0x7f4 0x6 0x2
+#define MX6SL_PAD_FEC_RX_ER__FEC_RX_ER             0x138 0x428 0x708 0x0 0x1
+#define MX6SL_PAD_FEC_RX_ER__SD4_DATA0             0x138 0x428 0x85c 0x1 0x1
+#define MX6SL_PAD_FEC_RX_ER__AUD6_RXD              0x138 0x428 0x614 0x2 0x0
+#define MX6SL_PAD_FEC_RX_ER__ECSPI4_MOSI           0x138 0x428 0x6d8 0x3 0x1
+#define MX6SL_PAD_FEC_RX_ER__GPT_COMPARE1          0x138 0x428 0x000 0x4 0x0
+#define MX6SL_PAD_FEC_RX_ER__GPIO4_IO19            0x138 0x428 0x000 0x5 0x0
+#define MX6SL_PAD_FEC_RX_ER__ARM_TRACE25           0x138 0x428 0x000 0x6 0x0
+#define MX6SL_PAD_FEC_RXD0__FEC_RX_DATA0           0x13c 0x42c 0x6f8 0x0 0x0
+#define MX6SL_PAD_FEC_RXD0__SD4_DATA5              0x13c 0x42c 0x870 0x1 0x0
+#define MX6SL_PAD_FEC_RXD0__USB_OTG1_ID            0x13c 0x42c 0x5dc 0x2 0x1
+#define MX6SL_PAD_FEC_RXD0__SD1_VSELECT            0x13c 0x42c 0x000 0x3 0x0
+#define MX6SL_PAD_FEC_RXD0__SD3_VSELECT            0x13c 0x42c 0x000 0x4 0x0
+#define MX6SL_PAD_FEC_RXD0__GPIO4_IO17             0x13c 0x42c 0x000 0x5 0x0
+#define MX6SL_PAD_FEC_RXD0__ARM_TRACE24            0x13c 0x42c 0x000 0x6 0x0
+#define MX6SL_PAD_FEC_RXD1__FEC_RX_DATA1           0x140 0x430 0x6fc 0x0 0x1
+#define MX6SL_PAD_FEC_RXD1__SD4_DATA2              0x140 0x430 0x864 0x1 0x1
+#define MX6SL_PAD_FEC_RXD1__AUD6_TXFS              0x140 0x430 0x628 0x2 0x0
+#define MX6SL_PAD_FEC_RXD1__ECSPI4_SS1             0x140 0x430 0x6e0 0x3 0x1
+#define MX6SL_PAD_FEC_RXD1__GPT_COMPARE3           0x140 0x430 0x000 0x4 0x0
+#define MX6SL_PAD_FEC_RXD1__GPIO4_IO18             0x140 0x430 0x000 0x5 0x0
+#define MX6SL_PAD_FEC_RXD1__FEC_COL                0x140 0x430 0x6f0 0x6 0x0
+#define MX6SL_PAD_FEC_TX_CLK__FEC_TX_CLK           0x144 0x434 0x70c 0x0 0x1
+#define MX6SL_PAD_FEC_TX_CLK__SD4_CMD              0x144 0x434 0x858 0x1 0x1
+#define MX6SL_PAD_FEC_TX_CLK__AUD6_RXC             0x144 0x434 0x61c 0x2 0x0
+#define MX6SL_PAD_FEC_TX_CLK__ECSPI4_SCLK          0x144 0x434 0x6d0 0x3 0x1
+#define MX6SL_PAD_FEC_TX_CLK__GPT_CAPTURE2         0x144 0x434 0x714 0x4 0x0
+#define MX6SL_PAD_FEC_TX_CLK__GPIO4_IO21           0x144 0x434 0x000 0x5 0x0
+#define MX6SL_PAD_FEC_TX_CLK__ARM_TRACE27          0x144 0x434 0x000 0x6 0x0
+#define MX6SL_PAD_FEC_TX_EN__FEC_TX_EN             0x148 0x438 0x000 0x0 0x0
+#define MX6SL_PAD_FEC_TX_EN__SD4_DATA6             0x148 0x438 0x874 0x1 0x0
+#define MX6SL_PAD_FEC_TX_EN__SPDIF_IN              0x148 0x438 0x7f0 0x2 0x0
+#define MX6SL_PAD_FEC_TX_EN__SD1_WP                0x148 0x438 0x82c 0x3 0x1
+#define MX6SL_PAD_FEC_TX_EN__SD3_WP                0x148 0x438 0x84c 0x4 0x1
+#define MX6SL_PAD_FEC_TX_EN__GPIO4_IO22            0x148 0x438 0x000 0x5 0x0
+#define MX6SL_PAD_FEC_TX_EN__ARM_TRACE28           0x148 0x438 0x000 0x6 0x0
+#define MX6SL_PAD_FEC_TXD0__FEC_TX_DATA0           0x14c 0x43c 0x000 0x0 0x0
+#define MX6SL_PAD_FEC_TXD0__SD4_DATA3              0x14c 0x43c 0x868 0x1 0x1
+#define MX6SL_PAD_FEC_TXD0__AUD6_TXD               0x14c 0x43c 0x618 0x2 0x0
+#define MX6SL_PAD_FEC_TXD0__ECSPI4_SS2             0x14c 0x43c 0x6e4 0x3 0x1
+#define MX6SL_PAD_FEC_TXD0__GPT_CLKIN              0x14c 0x43c 0x718 0x4 0x0
+#define MX6SL_PAD_FEC_TXD0__GPIO4_IO24             0x14c 0x43c 0x000 0x5 0x0
+#define MX6SL_PAD_FEC_TXD0__ARM_TRACE30            0x14c 0x43c 0x000 0x6 0x0
+#define MX6SL_PAD_FEC_TXD1__FEC_TX_DATA1           0x150 0x440 0x000 0x0 0x0
+#define MX6SL_PAD_FEC_TXD1__SD4_DATA7              0x150 0x440 0x878 0x1 0x0
+#define MX6SL_PAD_FEC_TXD1__SPDIF_OUT              0x150 0x440 0x000 0x2 0x0
+#define MX6SL_PAD_FEC_TXD1__SD1_CD_B               0x150 0x440 0x828 0x3 0x1
+#define MX6SL_PAD_FEC_TXD1__SD3_CD_B               0x150 0x440 0x838 0x4 0x1
+#define MX6SL_PAD_FEC_TXD1__GPIO4_IO16             0x150 0x440 0x000 0x5 0x0
+#define MX6SL_PAD_FEC_TXD1__FEC_RX_CLK             0x150 0x440 0x700 0x6 0x0
+#define MX6SL_PAD_HSIC_DAT__USB_H_DATA             0x154 0x444 0x000 0x0 0x0
+#define MX6SL_PAD_HSIC_DAT__I2C1_SCL               0x154 0x444 0x71c 0x1 0x1
+#define MX6SL_PAD_HSIC_DAT__PWM1_OUT               0x154 0x444 0x000 0x2 0x0
+#define MX6SL_PAD_HSIC_DAT__XTALOSC_REF_CLK_24M    0x154 0x444 0x000 0x3 0x0
+#define MX6SL_PAD_HSIC_DAT__GPIO3_IO19             0x154 0x444 0x000 0x5 0x0
+#define MX6SL_PAD_HSIC_STROBE__USB_H_STROBE        0x158 0x448 0x000 0x0 0x0
+#define MX6SL_PAD_HSIC_STROBE__I2C1_SDA            0x158 0x448 0x720 0x1 0x1
+#define MX6SL_PAD_HSIC_STROBE__PWM2_OUT            0x158 0x448 0x000 0x2 0x0
+#define MX6SL_PAD_HSIC_STROBE__XTALOSC_REF_CLK_32K 0x158 0x448 0x000 0x3 0x0
+#define MX6SL_PAD_HSIC_STROBE__GPIO3_IO20          0x158 0x448 0x000 0x5 0x0
+#define MX6SL_PAD_I2C1_SCL__I2C1_SCL               0x15c 0x44c 0x71c 0x0 0x2
+#define MX6SL_PAD_I2C1_SCL__UART1_RTS_B            0x15c 0x44c 0x7f8 0x1 0x0
+#define MX6SL_PAD_I2C1_SCL__UART1_CTS_B            0x15c 0x44c 0x000 0x1 0x0
+#define MX6SL_PAD_I2C1_SCL__ECSPI3_SS2             0x15c 0x44c 0x6c8 0x2 0x1
+#define MX6SL_PAD_I2C1_SCL__FEC_RX_DATA0           0x15c 0x44c 0x6f8 0x3 0x1
+#define MX6SL_PAD_I2C1_SCL__SD3_RESET              0x15c 0x44c 0x000 0x4 0x0
+#define MX6SL_PAD_I2C1_SCL__GPIO3_IO12             0x15c 0x44c 0x000 0x5 0x0
+#define MX6SL_PAD_I2C1_SCL__ECSPI1_SS1             0x15c 0x44c 0x690 0x6 0x0
+#define MX6SL_PAD_I2C1_SDA__I2C1_SDA               0x160 0x450 0x720 0x0 0x2
+#define MX6SL_PAD_I2C1_SDA__UART1_CTS_B            0x160 0x450 0x000 0x1 0x0
+#define MX6SL_PAD_I2C1_SDA__UART1_RTS_B            0x160 0x450 0x7f8 0x1 0x1
+#define MX6SL_PAD_I2C1_SDA__ECSPI3_SS3             0x160 0x450 0x6cc 0x2 0x1
+#define MX6SL_PAD_I2C1_SDA__FEC_TX_EN              0x160 0x450 0x000 0x3 0x0
+#define MX6SL_PAD_I2C1_SDA__SD3_VSELECT            0x160 0x450 0x000 0x4 0x0
+#define MX6SL_PAD_I2C1_SDA__GPIO3_IO13             0x160 0x450 0x000 0x5 0x0
+#define MX6SL_PAD_I2C1_SDA__ECSPI1_SS2             0x160 0x450 0x694 0x6 0x0
+#define MX6SL_PAD_I2C2_SCL__I2C2_SCL               0x164 0x454 0x724 0x0 0x1
+#define MX6SL_PAD_I2C2_SCL__AUD4_RXFS              0x164 0x454 0x5f0 0x1 0x0
+#define MX6SL_PAD_I2C2_SCL__SPDIF_IN               0x164 0x454 0x7f0 0x2 0x1
+#define MX6SL_PAD_I2C2_SCL__FEC_TX_DATA1           0x164 0x454 0x000 0x3 0x0
+#define MX6SL_PAD_I2C2_SCL__SD3_WP                 0x164 0x454 0x84c 0x4 0x2
+#define MX6SL_PAD_I2C2_SCL__GPIO3_IO14             0x164 0x454 0x000 0x5 0x0
+#define MX6SL_PAD_I2C2_SCL__ECSPI1_RDY             0x164 0x454 0x680 0x6 0x0
+#define MX6SL_PAD_I2C2_SDA__I2C2_SDA               0x168 0x458 0x728 0x0 0x1
+#define MX6SL_PAD_I2C2_SDA__AUD4_RXC               0x168 0x458 0x5ec 0x1 0x0
+#define MX6SL_PAD_I2C2_SDA__SPDIF_OUT              0x168 0x458 0x000 0x2 0x0
+#define MX6SL_PAD_I2C2_SDA__FEC_REF_OUT            0x168 0x458 0x000 0x3 0x0
+#define MX6SL_PAD_I2C2_SDA__SD3_CD_B               0x168 0x458 0x838 0x4 0x2
+#define MX6SL_PAD_I2C2_SDA__GPIO3_IO15             0x168 0x458 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_COL0__KEY_COL0               0x16c 0x474 0x734 0x0 0x0
+#define MX6SL_PAD_KEY_COL0__I2C2_SCL               0x16c 0x474 0x724 0x1 0x2
+#define MX6SL_PAD_KEY_COL0__LCD_DATA00             0x16c 0x474 0x778 0x2 0x0
+#define MX6SL_PAD_KEY_COL0__EIM_AD00               0x16c 0x474 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_COL0__SD1_CD_B               0x16c 0x474 0x828 0x4 0x2
+#define MX6SL_PAD_KEY_COL0__GPIO3_IO24             0x16c 0x474 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_COL1__KEY_COL1               0x170 0x478 0x738 0x0 0x0
+#define MX6SL_PAD_KEY_COL1__ECSPI4_MOSI            0x170 0x478 0x6d8 0x1 0x2
+#define MX6SL_PAD_KEY_COL1__LCD_DATA02             0x170 0x478 0x780 0x2 0x0
+#define MX6SL_PAD_KEY_COL1__EIM_AD02               0x170 0x478 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_COL1__SD3_DATA4              0x170 0x478 0x83c 0x4 0x0
+#define MX6SL_PAD_KEY_COL1__GPIO3_IO26             0x170 0x478 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_COL2__KEY_COL2               0x174 0x47c 0x73c 0x0 0x0
+#define MX6SL_PAD_KEY_COL2__ECSPI4_SS0             0x174 0x47c 0x6dc 0x1 0x2
+#define MX6SL_PAD_KEY_COL2__LCD_DATA04             0x174 0x47c 0x788 0x2 0x0
+#define MX6SL_PAD_KEY_COL2__EIM_AD04               0x174 0x47c 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_COL2__SD3_DATA6              0x174 0x47c 0x844 0x4 0x0
+#define MX6SL_PAD_KEY_COL2__GPIO3_IO28             0x174 0x47c 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_COL3__KEY_COL3               0x178 0x480 0x740 0x0 0x0
+#define MX6SL_PAD_KEY_COL3__AUD6_RXFS              0x178 0x480 0x620 0x1 0x1
+#define MX6SL_PAD_KEY_COL3__LCD_DATA06             0x178 0x480 0x790 0x2 0x0
+#define MX6SL_PAD_KEY_COL3__EIM_AD06               0x178 0x480 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_COL3__SD4_DATA6              0x178 0x480 0x874 0x4 0x1
+#define MX6SL_PAD_KEY_COL3__GPIO3_IO30             0x178 0x480 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_COL3__SD1_RESET              0x178 0x480 0x000 0x6 0x0
+#define MX6SL_PAD_KEY_COL4__KEY_COL4               0x17c 0x484 0x744 0x0 0x0
+#define MX6SL_PAD_KEY_COL4__AUD6_RXD               0x17c 0x484 0x614 0x1 0x1
+#define MX6SL_PAD_KEY_COL4__LCD_DATA08             0x17c 0x484 0x798 0x2 0x0
+#define MX6SL_PAD_KEY_COL4__EIM_AD08               0x17c 0x484 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_COL4__SD4_CLK                0x17c 0x484 0x850 0x4 0x2
+#define MX6SL_PAD_KEY_COL4__GPIO4_IO00             0x17c 0x484 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_COL4__USB_OTG1_PWR           0x17c 0x484 0x000 0x6 0x0
+#define MX6SL_PAD_KEY_COL5__KEY_COL5               0x180 0x488 0x748 0x0 0x0
+#define MX6SL_PAD_KEY_COL5__AUD6_TXFS              0x180 0x488 0x628 0x1 0x1
+#define MX6SL_PAD_KEY_COL5__LCD_DATA10             0x180 0x488 0x7a0 0x2 0x0
+#define MX6SL_PAD_KEY_COL5__EIM_AD10               0x180 0x488 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_COL5__SD4_DATA0              0x180 0x488 0x85c 0x4 0x2
+#define MX6SL_PAD_KEY_COL5__GPIO4_IO02             0x180 0x488 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_COL5__USB_OTG2_PWR           0x180 0x488 0x000 0x6 0x0
+#define MX6SL_PAD_KEY_COL6__KEY_COL6               0x184 0x48c 0x74c 0x0 0x0
+#define MX6SL_PAD_KEY_COL6__UART4_RX_DATA          0x184 0x48c 0x814 0x1 0x2
+#define MX6SL_PAD_KEY_COL6__UART4_TX_DATA          0x184 0x48c 0x000 0x1 0x0
+#define MX6SL_PAD_KEY_COL6__LCD_DATA12             0x184 0x48c 0x7a8 0x2 0x0
+#define MX6SL_PAD_KEY_COL6__EIM_AD12               0x184 0x48c 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_COL6__SD4_DATA2              0x184 0x48c 0x864 0x4 0x2
+#define MX6SL_PAD_KEY_COL6__GPIO4_IO04             0x184 0x48c 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_COL6__SD3_RESET              0x184 0x48c 0x000 0x6 0x0
+#define MX6SL_PAD_KEY_COL7__KEY_COL7               0x188 0x490 0x750 0x0 0x0
+#define MX6SL_PAD_KEY_COL7__UART4_RTS_B            0x188 0x490 0x810 0x1 0x2
+#define MX6SL_PAD_KEY_COL7__UART4_CTS_B            0x188 0x490 0x000 0x1 0x0
+#define MX6SL_PAD_KEY_COL7__LCD_DATA14             0x188 0x490 0x7b0 0x2 0x0
+#define MX6SL_PAD_KEY_COL7__EIM_AD14               0x188 0x490 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_COL7__SD4_DATA4              0x188 0x490 0x86c 0x4 0x1
+#define MX6SL_PAD_KEY_COL7__GPIO4_IO06             0x188 0x490 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_COL7__SD1_WP                 0x188 0x490 0x82c 0x6 0x2
+#define MX6SL_PAD_KEY_ROW0__KEY_ROW0               0x18c 0x494 0x754 0x0 0x0
+#define MX6SL_PAD_KEY_ROW0__I2C2_SDA               0x18c 0x494 0x728 0x1 0x2
+#define MX6SL_PAD_KEY_ROW0__LCD_DATA01             0x18c 0x494 0x77c 0x2 0x0
+#define MX6SL_PAD_KEY_ROW0__EIM_AD01               0x18c 0x494 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_ROW0__SD1_WP                 0x18c 0x494 0x82c 0x4 0x3
+#define MX6SL_PAD_KEY_ROW0__GPIO3_IO25             0x18c 0x494 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_ROW1__KEY_ROW1               0x190 0x498 0x758 0x0 0x0
+#define MX6SL_PAD_KEY_ROW1__ECSPI4_MISO            0x190 0x498 0x6d4 0x1 0x2
+#define MX6SL_PAD_KEY_ROW1__LCD_DATA03             0x190 0x498 0x784 0x2 0x0
+#define MX6SL_PAD_KEY_ROW1__EIM_AD03               0x190 0x498 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_ROW1__SD3_DATA5              0x190 0x498 0x840 0x4 0x0
+#define MX6SL_PAD_KEY_ROW1__GPIO3_IO27             0x190 0x498 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_ROW2__KEY_ROW2               0x194 0x49c 0x75c 0x0 0x0
+#define MX6SL_PAD_KEY_ROW2__ECSPI4_SCLK            0x194 0x49c 0x6d0 0x1 0x2
+#define MX6SL_PAD_KEY_ROW2__LCD_DATA05             0x194 0x49c 0x78c 0x2 0x0
+#define MX6SL_PAD_KEY_ROW2__EIM_AD05               0x194 0x49c 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_ROW2__SD3_DATA7              0x194 0x49c 0x848 0x4 0x0
+#define MX6SL_PAD_KEY_ROW2__GPIO3_IO29             0x194 0x49c 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_ROW3__KEY_ROW3               0x198 0x4a0 0x760 0x0 0x0
+#define MX6SL_PAD_KEY_ROW3__AUD6_RXC               0x198 0x4a0 0x61c 0x1 0x1
+#define MX6SL_PAD_KEY_ROW3__LCD_DATA07             0x198 0x4a0 0x794 0x2 0x0
+#define MX6SL_PAD_KEY_ROW3__EIM_AD07               0x198 0x4a0 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_ROW3__SD4_DATA7              0x198 0x4a0 0x878 0x4 0x1
+#define MX6SL_PAD_KEY_ROW3__GPIO3_IO31             0x198 0x4a0 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_ROW3__SD1_VSELECT            0x198 0x4a0 0x000 0x6 0x0
+#define MX6SL_PAD_KEY_ROW4__KEY_ROW4               0x19c 0x4a4 0x764 0x0 0x0
+#define MX6SL_PAD_KEY_ROW4__AUD6_TXC               0x19c 0x4a4 0x624 0x1 0x1
+#define MX6SL_PAD_KEY_ROW4__LCD_DATA09             0x19c 0x4a4 0x79c 0x2 0x0
+#define MX6SL_PAD_KEY_ROW4__EIM_AD09               0x19c 0x4a4 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_ROW4__SD4_CMD                0x19c 0x4a4 0x858 0x4 0x2
+#define MX6SL_PAD_KEY_ROW4__GPIO4_IO01             0x19c 0x4a4 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_ROW4__USB_OTG1_OC            0x19c 0x4a4 0x824 0x6 0x1
+#define MX6SL_PAD_KEY_ROW5__KEY_ROW5               0x1a0 0x4a8 0x768 0x0 0x0
+#define MX6SL_PAD_KEY_ROW5__AUD6_TXD               0x1a0 0x4a8 0x618 0x1 0x1
+#define MX6SL_PAD_KEY_ROW5__LCD_DATA11             0x1a0 0x4a8 0x7a4 0x2 0x0
+#define MX6SL_PAD_KEY_ROW5__EIM_AD11               0x1a0 0x4a8 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_ROW5__SD4_DATA1              0x1a0 0x4a8 0x860 0x4 0x2
+#define MX6SL_PAD_KEY_ROW5__GPIO4_IO03             0x1a0 0x4a8 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_ROW5__USB_OTG2_OC            0x1a0 0x4a8 0x820 0x6 0x2
+#define MX6SL_PAD_KEY_ROW6__KEY_ROW6               0x1a4 0x4ac 0x76c 0x0 0x0
+#define MX6SL_PAD_KEY_ROW6__UART4_TX_DATA          0x1a4 0x4ac 0x000 0x1 0x0
+#define MX6SL_PAD_KEY_ROW6__UART4_RX_DATA          0x1a4 0x4ac 0x814 0x1 0x3
+#define MX6SL_PAD_KEY_ROW6__LCD_DATA13             0x1a4 0x4ac 0x7ac 0x2 0x0
+#define MX6SL_PAD_KEY_ROW6__EIM_AD13               0x1a4 0x4ac 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_ROW6__SD4_DATA3              0x1a4 0x4ac 0x868 0x4 0x2
+#define MX6SL_PAD_KEY_ROW6__GPIO4_IO05             0x1a4 0x4ac 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_ROW6__SD3_VSELECT            0x1a4 0x4ac 0x000 0x6 0x0
+#define MX6SL_PAD_KEY_ROW7__KEY_ROW7               0x1a8 0x4b0 0x770 0x0 0x0
+#define MX6SL_PAD_KEY_ROW7__UART4_CTS_B            0x1a8 0x4b0 0x000 0x1 0x0
+#define MX6SL_PAD_KEY_ROW7__UART4_RTS_B            0x1a8 0x4b0 0x810 0x1 0x3
+#define MX6SL_PAD_KEY_ROW7__LCD_DATA15             0x1a8 0x4b0 0x7b4 0x2 0x0
+#define MX6SL_PAD_KEY_ROW7__EIM_AD15               0x1a8 0x4b0 0x000 0x3 0x0
+#define MX6SL_PAD_KEY_ROW7__SD4_DATA5              0x1a8 0x4b0 0x870 0x4 0x1
+#define MX6SL_PAD_KEY_ROW7__GPIO4_IO07             0x1a8 0x4b0 0x000 0x5 0x0
+#define MX6SL_PAD_KEY_ROW7__SD1_CD_B               0x1a8 0x4b0 0x828 0x6 0x3
+#define MX6SL_PAD_LCD_CLK__LCD_CLK                 0x1ac 0x4b4 0x000 0x0 0x0
+#define MX6SL_PAD_LCD_CLK__SD4_DATA4               0x1ac 0x4b4 0x86c 0x1 0x2
+#define MX6SL_PAD_LCD_CLK__LCD_WR_RWN              0x1ac 0x4b4 0x000 0x2 0x0
+#define MX6SL_PAD_LCD_CLK__EIM_RW                  0x1ac 0x4b4 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_CLK__PWM4_OUT                0x1ac 0x4b4 0x000 0x4 0x0
+#define MX6SL_PAD_LCD_CLK__GPIO2_IO15              0x1ac 0x4b4 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT0__LCD_DATA00             0x1b0 0x4b8 0x778 0x0 0x1
+#define MX6SL_PAD_LCD_DAT0__ECSPI1_MOSI            0x1b0 0x4b8 0x688 0x1 0x1
+#define MX6SL_PAD_LCD_DAT0__USB_OTG2_ID            0x1b0 0x4b8 0x5e0 0x2 0x1
+#define MX6SL_PAD_LCD_DAT0__PWM1_OUT               0x1b0 0x4b8 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT0__UART5_DTR_B            0x1b0 0x4b8 0x000 0x4 0x0
+#define MX6SL_PAD_LCD_DAT0__GPIO2_IO20             0x1b0 0x4b8 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT0__ARM_TRACE00            0x1b0 0x4b8 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT0__SRC_BOOT_CFG00         0x1b0 0x4b8 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT1__LCD_DATA01             0x1b4 0x4bc 0x77c 0x0 0x1
+#define MX6SL_PAD_LCD_DAT1__ECSPI1_MISO            0x1b4 0x4bc 0x684 0x1 0x1
+#define MX6SL_PAD_LCD_DAT1__USB_OTG1_ID            0x1b4 0x4bc 0x5dc 0x2 0x2
+#define MX6SL_PAD_LCD_DAT1__PWM2_OUT               0x1b4 0x4bc 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT1__AUD4_RXFS              0x1b4 0x4bc 0x5f0 0x4 0x1
+#define MX6SL_PAD_LCD_DAT1__GPIO2_IO21             0x1b4 0x4bc 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT1__ARM_TRACE01            0x1b4 0x4bc 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT1__SRC_BOOT_CFG01         0x1b4 0x4bc 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT10__LCD_DATA10            0x1b8 0x4c0 0x7a0 0x0 0x1
+#define MX6SL_PAD_LCD_DAT10__KEY_COL1              0x1b8 0x4c0 0x738 0x1 0x1
+#define MX6SL_PAD_LCD_DAT10__CSI_DATA07            0x1b8 0x4c0 0x64c 0x2 0x1
+#define MX6SL_PAD_LCD_DAT10__EIM_DATA04            0x1b8 0x4c0 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT10__ECSPI2_MISO           0x1b8 0x4c0 0x6a0 0x4 0x2
+#define MX6SL_PAD_LCD_DAT10__GPIO2_IO30            0x1b8 0x4c0 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT10__ARM_TRACE10           0x1b8 0x4c0 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT10__SRC_BOOT_CFG10        0x1b8 0x4c0 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT11__LCD_DATA11            0x1bc 0x4c4 0x7a4 0x0 0x1
+#define MX6SL_PAD_LCD_DAT11__KEY_ROW1              0x1bc 0x4c4 0x758 0x1 0x1
+#define MX6SL_PAD_LCD_DAT11__CSI_DATA06            0x1bc 0x4c4 0x648 0x2 0x1
+#define MX6SL_PAD_LCD_DAT11__EIM_DATA05            0x1bc 0x4c4 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT11__ECSPI2_SS1            0x1bc 0x4c4 0x6ac 0x4 0x1
+#define MX6SL_PAD_LCD_DAT11__GPIO2_IO31            0x1bc 0x4c4 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT11__ARM_TRACE11           0x1bc 0x4c4 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT11__SRC_BOOT_CFG11        0x1bc 0x4c4 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT12__LCD_DATA12            0x1c0 0x4c8 0x7a8 0x0 0x1
+#define MX6SL_PAD_LCD_DAT12__KEY_COL2              0x1c0 0x4c8 0x73c 0x1 0x1
+#define MX6SL_PAD_LCD_DAT12__CSI_DATA05            0x1c0 0x4c8 0x644 0x2 0x1
+#define MX6SL_PAD_LCD_DAT12__EIM_DATA06            0x1c0 0x4c8 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT12__UART5_RTS_B           0x1c0 0x4c8 0x818 0x4 0x2
+#define MX6SL_PAD_LCD_DAT12__UART5_CTS_B           0x1c0 0x4c8 0x000 0x4 0x0
+#define MX6SL_PAD_LCD_DAT12__GPIO3_IO00            0x1c0 0x4c8 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT12__ARM_TRACE12           0x1c0 0x4c8 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT12__SRC_BOOT_CFG12        0x1c0 0x4c8 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT13__LCD_DATA13            0x1c4 0x4cc 0x7ac 0x0 0x1
+#define MX6SL_PAD_LCD_DAT13__KEY_ROW2              0x1c4 0x4cc 0x75c 0x1 0x1
+#define MX6SL_PAD_LCD_DAT13__CSI_DATA04            0x1c4 0x4cc 0x640 0x2 0x1
+#define MX6SL_PAD_LCD_DAT13__EIM_DATA07            0x1c4 0x4cc 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT13__UART5_CTS_B           0x1c4 0x4cc 0x000 0x4 0x0
+#define MX6SL_PAD_LCD_DAT13__UART5_RTS_B           0x1c4 0x4cc 0x818 0x4 0x3
+#define MX6SL_PAD_LCD_DAT13__GPIO3_IO01            0x1c4 0x4cc 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT13__ARM_TRACE13           0x1c4 0x4cc 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT13__SRC_BOOT_CFG13        0x1c4 0x4cc 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT14__LCD_DATA14            0x1c8 0x4d0 0x7b0 0x0 0x1
+#define MX6SL_PAD_LCD_DAT14__KEY_COL3              0x1c8 0x4d0 0x740 0x1 0x1
+#define MX6SL_PAD_LCD_DAT14__CSI_DATA03            0x1c8 0x4d0 0x63c 0x2 0x1
+#define MX6SL_PAD_LCD_DAT14__EIM_DATA08            0x1c8 0x4d0 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT14__UART5_RX_DATA         0x1c8 0x4d0 0x81c 0x4 0x2
+#define MX6SL_PAD_LCD_DAT14__UART5_TX_DATA         0x1c8 0x4d0 0x000 0x4 0x0
+#define MX6SL_PAD_LCD_DAT14__GPIO3_IO02            0x1c8 0x4d0 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT14__ARM_TRACE14           0x1c8 0x4d0 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT14__SRC_BOOT_CFG14        0x1c8 0x4d0 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT15__LCD_DATA15            0x1cc 0x4d4 0x7b4 0x0 0x1
+#define MX6SL_PAD_LCD_DAT15__KEY_ROW3              0x1cc 0x4d4 0x760 0x1 0x1
+#define MX6SL_PAD_LCD_DAT15__CSI_DATA02            0x1cc 0x4d4 0x638 0x2 0x1
+#define MX6SL_PAD_LCD_DAT15__EIM_DATA09            0x1cc 0x4d4 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT15__UART5_TX_DATA         0x1cc 0x4d4 0x000 0x4 0x0
+#define MX6SL_PAD_LCD_DAT15__UART5_RX_DATA         0x1cc 0x4d4 0x81c 0x4 0x3
+#define MX6SL_PAD_LCD_DAT15__GPIO3_IO03            0x1cc 0x4d4 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT15__ARM_TRACE15           0x1cc 0x4d4 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT15__SRC_BOOT_CFG15        0x1cc 0x4d4 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT16__LCD_DATA16            0x1d0 0x4d8 0x7b8 0x0 0x1
+#define MX6SL_PAD_LCD_DAT16__KEY_COL4              0x1d0 0x4d8 0x744 0x1 0x1
+#define MX6SL_PAD_LCD_DAT16__CSI_DATA01            0x1d0 0x4d8 0x634 0x2 0x1
+#define MX6SL_PAD_LCD_DAT16__EIM_DATA10            0x1d0 0x4d8 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT16__I2C2_SCL              0x1d0 0x4d8 0x724 0x4 0x3
+#define MX6SL_PAD_LCD_DAT16__GPIO3_IO04            0x1d0 0x4d8 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT16__ARM_TRACE16           0x1d0 0x4d8 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT16__SRC_BOOT_CFG24        0x1d0 0x4d8 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT17__LCD_DATA17            0x1d4 0x4dc 0x7bc 0x0 0x1
+#define MX6SL_PAD_LCD_DAT17__KEY_ROW4              0x1d4 0x4dc 0x764 0x1 0x1
+#define MX6SL_PAD_LCD_DAT17__CSI_DATA00            0x1d4 0x4dc 0x630 0x2 0x1
+#define MX6SL_PAD_LCD_DAT17__EIM_DATA11            0x1d4 0x4dc 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT17__I2C2_SDA              0x1d4 0x4dc 0x728 0x4 0x3
+#define MX6SL_PAD_LCD_DAT17__GPIO3_IO05            0x1d4 0x4dc 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT17__ARM_TRACE17           0x1d4 0x4dc 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT17__SRC_BOOT_CFG25        0x1d4 0x4dc 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT18__LCD_DATA18            0x1d8 0x4e0 0x7c0 0x0 0x1
+#define MX6SL_PAD_LCD_DAT18__KEY_COL5              0x1d8 0x4e0 0x748 0x1 0x1
+#define MX6SL_PAD_LCD_DAT18__CSI_DATA15            0x1d8 0x4e0 0x66c 0x2 0x0
+#define MX6SL_PAD_LCD_DAT18__EIM_DATA12            0x1d8 0x4e0 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT18__GPT_CAPTURE1          0x1d8 0x4e0 0x710 0x4 0x1
+#define MX6SL_PAD_LCD_DAT18__GPIO3_IO06            0x1d8 0x4e0 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT18__ARM_TRACE18           0x1d8 0x4e0 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT18__SRC_BOOT_CFG26        0x1d8 0x4e0 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT19__LCD_DATA19            0x1dc 0x4e4 0x7c4 0x0 0x1
+#define MX6SL_PAD_LCD_DAT19__KEY_ROW5              0x1dc 0x4e4 0x768 0x1 0x1
+#define MX6SL_PAD_LCD_DAT19__CSI_DATA14            0x1dc 0x4e4 0x668 0x2 0x0
+#define MX6SL_PAD_LCD_DAT19__EIM_DATA13            0x1dc 0x4e4 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT19__GPT_CAPTURE2          0x1dc 0x4e4 0x714 0x4 0x1
+#define MX6SL_PAD_LCD_DAT19__GPIO3_IO07            0x1dc 0x4e4 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT19__ARM_TRACE19           0x1dc 0x4e4 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT19__SRC_BOOT_CFG27        0x1dc 0x4e4 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT2__LCD_DATA02             0x1e0 0x4e8 0x780 0x0 0x1
+#define MX6SL_PAD_LCD_DAT2__ECSPI1_SS0             0x1e0 0x4e8 0x68c 0x1 0x1
+#define MX6SL_PAD_LCD_DAT2__EPIT2_OUT              0x1e0 0x4e8 0x000 0x2 0x0
+#define MX6SL_PAD_LCD_DAT2__PWM3_OUT               0x1e0 0x4e8 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT2__AUD4_RXC               0x1e0 0x4e8 0x5ec 0x4 0x1
+#define MX6SL_PAD_LCD_DAT2__GPIO2_IO22             0x1e0 0x4e8 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT2__ARM_TRACE02            0x1e0 0x4e8 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT2__SRC_BOOT_CFG02         0x1e0 0x4e8 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT20__LCD_DATA20            0x1e4 0x4ec 0x7c8 0x0 0x1
+#define MX6SL_PAD_LCD_DAT20__KEY_COL6              0x1e4 0x4ec 0x74c 0x1 0x1
+#define MX6SL_PAD_LCD_DAT20__CSI_DATA13            0x1e4 0x4ec 0x664 0x2 0x0
+#define MX6SL_PAD_LCD_DAT20__EIM_DATA14            0x1e4 0x4ec 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT20__GPT_COMPARE1          0x1e4 0x4ec 0x000 0x4 0x0
+#define MX6SL_PAD_LCD_DAT20__GPIO3_IO08            0x1e4 0x4ec 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT20__ARM_TRACE20           0x1e4 0x4ec 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT20__SRC_BOOT_CFG28        0x1e4 0x4ec 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT21__LCD_DATA21            0x1e8 0x4f0 0x7cc 0x0 0x1
+#define MX6SL_PAD_LCD_DAT21__KEY_ROW6              0x1e8 0x4f0 0x76c 0x1 0x1
+#define MX6SL_PAD_LCD_DAT21__CSI_DATA12            0x1e8 0x4f0 0x660 0x2 0x0
+#define MX6SL_PAD_LCD_DAT21__EIM_DATA15            0x1e8 0x4f0 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT21__GPT_COMPARE2          0x1e8 0x4f0 0x000 0x4 0x0
+#define MX6SL_PAD_LCD_DAT21__GPIO3_IO09            0x1e8 0x4f0 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT21__ARM_TRACE21           0x1e8 0x4f0 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT21__SRC_BOOT_CFG29        0x1e8 0x4f0 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT22__LCD_DATA22            0x1ec 0x4f4 0x7d0 0x0 0x1
+#define MX6SL_PAD_LCD_DAT22__KEY_COL7              0x1ec 0x4f4 0x750 0x1 0x1
+#define MX6SL_PAD_LCD_DAT22__CSI_DATA11            0x1ec 0x4f4 0x65c 0x2 0x1
+#define MX6SL_PAD_LCD_DAT22__EIM_EB3_B             0x1ec 0x4f4 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT22__GPT_COMPARE3          0x1ec 0x4f4 0x000 0x4 0x0
+#define MX6SL_PAD_LCD_DAT22__GPIO3_IO10            0x1ec 0x4f4 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT22__ARM_TRACE22           0x1ec 0x4f4 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT22__SRC_BOOT_CFG30        0x1ec 0x4f4 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT23__LCD_DATA23            0x1f0 0x4f8 0x7d4 0x0 0x1
+#define MX6SL_PAD_LCD_DAT23__KEY_ROW7              0x1f0 0x4f8 0x770 0x1 0x1
+#define MX6SL_PAD_LCD_DAT23__CSI_DATA10            0x1f0 0x4f8 0x658 0x2 0x1
+#define MX6SL_PAD_LCD_DAT23__EIM_EB2_B             0x1f0 0x4f8 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT23__GPT_CLKIN             0x1f0 0x4f8 0x718 0x4 0x1
+#define MX6SL_PAD_LCD_DAT23__GPIO3_IO11            0x1f0 0x4f8 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT23__ARM_TRACE23           0x1f0 0x4f8 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT23__SRC_BOOT_CFG31        0x1f0 0x4f8 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT3__LCD_DATA03             0x1f4 0x4fc 0x784 0x0 0x1
+#define MX6SL_PAD_LCD_DAT3__ECSPI1_SCLK            0x1f4 0x4fc 0x67c 0x1 0x1
+#define MX6SL_PAD_LCD_DAT3__UART5_DSR_B            0x1f4 0x4fc 0x000 0x2 0x0
+#define MX6SL_PAD_LCD_DAT3__PWM4_OUT               0x1f4 0x4fc 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT3__AUD4_RXD               0x1f4 0x4fc 0x5e4 0x4 0x1
+#define MX6SL_PAD_LCD_DAT3__GPIO2_IO23             0x1f4 0x4fc 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT3__ARM_TRACE03            0x1f4 0x4fc 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT3__SRC_BOOT_CFG03         0x1f4 0x4fc 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT4__LCD_DATA04             0x1f8 0x500 0x788 0x0 0x1
+#define MX6SL_PAD_LCD_DAT4__ECSPI1_SS1             0x1f8 0x500 0x690 0x1 0x1
+#define MX6SL_PAD_LCD_DAT4__CSI_VSYNC              0x1f8 0x500 0x678 0x2 0x2
+#define MX6SL_PAD_LCD_DAT4__WDOG2_RESET_B_DEB      0x1f8 0x500 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT4__AUD4_TXC               0x1f8 0x500 0x5f4 0x4 0x1
+#define MX6SL_PAD_LCD_DAT4__GPIO2_IO24             0x1f8 0x500 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT4__ARM_TRACE04            0x1f8 0x500 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT4__SRC_BOOT_CFG04         0x1f8 0x500 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT5__LCD_DATA05             0x1fc 0x504 0x78c 0x0 0x1
+#define MX6SL_PAD_LCD_DAT5__ECSPI1_SS2             0x1fc 0x504 0x694 0x1 0x1
+#define MX6SL_PAD_LCD_DAT5__CSI_HSYNC              0x1fc 0x504 0x670 0x2 0x2
+#define MX6SL_PAD_LCD_DAT5__EIM_CS3_B              0x1fc 0x504 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT5__AUD4_TXFS              0x1fc 0x504 0x5f8 0x4 0x1
+#define MX6SL_PAD_LCD_DAT5__GPIO2_IO25             0x1fc 0x504 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT5__ARM_TRACE05            0x1fc 0x504 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT5__SRC_BOOT_CFG05         0x1fc 0x504 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT6__LCD_DATA06             0x200 0x508 0x790 0x0 0x1
+#define MX6SL_PAD_LCD_DAT6__ECSPI1_SS3             0x200 0x508 0x698 0x1 0x1
+#define MX6SL_PAD_LCD_DAT6__CSI_PIXCLK             0x200 0x508 0x674 0x2 0x2
+#define MX6SL_PAD_LCD_DAT6__EIM_DATA00             0x200 0x508 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT6__AUD4_TXD               0x200 0x508 0x5e8 0x4 0x1
+#define MX6SL_PAD_LCD_DAT6__GPIO2_IO26             0x200 0x508 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT6__ARM_TRACE06            0x200 0x508 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT6__SRC_BOOT_CFG06         0x200 0x508 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT7__LCD_DATA07             0x204 0x50c 0x794 0x0 0x1
+#define MX6SL_PAD_LCD_DAT7__ECSPI1_RDY             0x204 0x50c 0x680 0x1 0x1
+#define MX6SL_PAD_LCD_DAT7__CSI_MCLK               0x204 0x50c 0x000 0x2 0x0
+#define MX6SL_PAD_LCD_DAT7__EIM_DATA01             0x204 0x50c 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT7__AUDIO_CLK_OUT          0x204 0x50c 0x000 0x4 0x0
+#define MX6SL_PAD_LCD_DAT7__GPIO2_IO27             0x204 0x50c 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT7__ARM_TRACE07            0x204 0x50c 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT7__SRC_BOOT_CFG07         0x204 0x50c 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT8__LCD_DATA08             0x208 0x510 0x798 0x0 0x1
+#define MX6SL_PAD_LCD_DAT8__KEY_COL0               0x208 0x510 0x734 0x1 0x1
+#define MX6SL_PAD_LCD_DAT8__CSI_DATA09             0x208 0x510 0x654 0x2 0x1
+#define MX6SL_PAD_LCD_DAT8__EIM_DATA02             0x208 0x510 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT8__ECSPI2_SCLK            0x208 0x510 0x69c 0x4 0x2
+#define MX6SL_PAD_LCD_DAT8__GPIO2_IO28             0x208 0x510 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT8__ARM_TRACE08            0x208 0x510 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT8__SRC_BOOT_CFG08         0x208 0x510 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_DAT9__LCD_DATA09             0x20c 0x514 0x79c 0x0 0x1
+#define MX6SL_PAD_LCD_DAT9__KEY_ROW0               0x20c 0x514 0x754 0x1 0x1
+#define MX6SL_PAD_LCD_DAT9__CSI_DATA08             0x20c 0x514 0x650 0x2 0x1
+#define MX6SL_PAD_LCD_DAT9__EIM_DATA03             0x20c 0x514 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_DAT9__ECSPI2_MOSI            0x20c 0x514 0x6a4 0x4 0x2
+#define MX6SL_PAD_LCD_DAT9__GPIO2_IO29             0x20c 0x514 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_DAT9__ARM_TRACE09            0x20c 0x514 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_DAT9__SRC_BOOT_CFG09         0x20c 0x514 0x000 0x7 0x0
+#define MX6SL_PAD_LCD_ENABLE__LCD_ENABLE           0x210 0x518 0x000 0x0 0x0
+#define MX6SL_PAD_LCD_ENABLE__SD4_DATA5            0x210 0x518 0x870 0x1 0x2
+#define MX6SL_PAD_LCD_ENABLE__LCD_RD_E             0x210 0x518 0x000 0x2 0x0
+#define MX6SL_PAD_LCD_ENABLE__EIM_OE_B             0x210 0x518 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_ENABLE__UART2_RX_DATA        0x210 0x518 0x804 0x4 0x2
+#define MX6SL_PAD_LCD_ENABLE__UART2_TX_DATA        0x210 0x518 0x000 0x4 0x0
+#define MX6SL_PAD_LCD_ENABLE__GPIO2_IO16           0x210 0x518 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_HSYNC__LCD_HSYNC             0x214 0x51c 0x774 0x0 0x0
+#define MX6SL_PAD_LCD_HSYNC__SD4_DATA6             0x214 0x51c 0x874 0x1 0x2
+#define MX6SL_PAD_LCD_HSYNC__LCD_CS                0x214 0x51c 0x000 0x2 0x0
+#define MX6SL_PAD_LCD_HSYNC__EIM_CS0_B             0x214 0x51c 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_HSYNC__UART2_TX_DATA         0x214 0x51c 0x000 0x4 0x0
+#define MX6SL_PAD_LCD_HSYNC__UART2_RX_DATA         0x214 0x51c 0x804 0x4 0x3
+#define MX6SL_PAD_LCD_HSYNC__GPIO2_IO17            0x214 0x51c 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_HSYNC__ARM_TRACE_CLK         0x214 0x51c 0x000 0x6 0x0
+#define MX6SL_PAD_LCD_RESET__LCD_RESET             0x218 0x520 0x000 0x0 0x0
+#define MX6SL_PAD_LCD_RESET__EIM_DTACK_B           0x218 0x520 0x880 0x1 0x1
+#define MX6SL_PAD_LCD_RESET__LCD_BUSY              0x218 0x520 0x774 0x2 0x1
+#define MX6SL_PAD_LCD_RESET__EIM_WAIT_B            0x218 0x520 0x884 0x3 0x1
+#define MX6SL_PAD_LCD_RESET__UART2_CTS_B           0x218 0x520 0x000 0x4 0x0
+#define MX6SL_PAD_LCD_RESET__UART2_RTS_B           0x218 0x520 0x800 0x4 0x2
+#define MX6SL_PAD_LCD_RESET__GPIO2_IO19            0x218 0x520 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_RESET__CCM_PMIC_READY        0x218 0x520 0x62c 0x6 0x1
+#define MX6SL_PAD_LCD_VSYNC__LCD_VSYNC             0x21c 0x524 0x000 0x0 0x0
+#define MX6SL_PAD_LCD_VSYNC__SD4_DATA7             0x21c 0x524 0x878 0x1 0x2
+#define MX6SL_PAD_LCD_VSYNC__LCD_RS                0x21c 0x524 0x000 0x2 0x0
+#define MX6SL_PAD_LCD_VSYNC__EIM_CS1_B             0x21c 0x524 0x000 0x3 0x0
+#define MX6SL_PAD_LCD_VSYNC__UART2_RTS_B           0x21c 0x524 0x800 0x4 0x3
+#define MX6SL_PAD_LCD_VSYNC__UART2_CTS_B           0x21c 0x524 0x000 0x4 0x0
+#define MX6SL_PAD_LCD_VSYNC__GPIO2_IO18            0x21c 0x524 0x000 0x5 0x0
+#define MX6SL_PAD_LCD_VSYNC__ARM_TRACE_CTL         0x21c 0x524 0x000 0x6 0x0
+#define MX6SL_PAD_PWM1__PWM1_OUT                   0x220 0x528 0x000 0x0 0x0
+#define MX6SL_PAD_PWM1__CCM_CLKO                   0x220 0x528 0x000 0x1 0x0
+#define MX6SL_PAD_PWM1__AUDIO_CLK_OUT              0x220 0x528 0x000 0x2 0x0
+#define MX6SL_PAD_PWM1__FEC_REF_OUT                0x220 0x528 0x000 0x3 0x0
+#define MX6SL_PAD_PWM1__CSI_MCLK                   0x220 0x528 0x000 0x4 0x0
+#define MX6SL_PAD_PWM1__GPIO3_IO23                 0x220 0x528 0x000 0x5 0x0
+#define MX6SL_PAD_PWM1__EPIT1_OUT                  0x220 0x528 0x000 0x6 0x0
+#define MX6SL_PAD_REF_CLK_24M__XTALOSC_REF_CLK_24M 0x224 0x52c 0x000 0x0 0x0
+#define MX6SL_PAD_REF_CLK_24M__I2C3_SCL            0x224 0x52c 0x72c 0x1 0x2
+#define MX6SL_PAD_REF_CLK_24M__PWM3_OUT            0x224 0x52c 0x000 0x2 0x0
+#define MX6SL_PAD_REF_CLK_24M__USB_OTG2_ID         0x224 0x52c 0x5e0 0x3 0x2
+#define MX6SL_PAD_REF_CLK_24M__CCM_PMIC_READY      0x224 0x52c 0x62c 0x4 0x2
+#define MX6SL_PAD_REF_CLK_24M__GPIO3_IO21          0x224 0x52c 0x000 0x5 0x0
+#define MX6SL_PAD_REF_CLK_24M__SD3_WP              0x224 0x52c 0x84c 0x6 0x3
+#define MX6SL_PAD_REF_CLK_32K__XTALOSC_REF_CLK_32K 0x228 0x530 0x000 0x0 0x0
+#define MX6SL_PAD_REF_CLK_32K__I2C3_SDA            0x228 0x530 0x730 0x1 0x2
+#define MX6SL_PAD_REF_CLK_32K__PWM4_OUT            0x228 0x530 0x000 0x2 0x0
+#define MX6SL_PAD_REF_CLK_32K__USB_OTG1_ID         0x228 0x530 0x5dc 0x3 0x3
+#define MX6SL_PAD_REF_CLK_32K__SD1_LCTL            0x228 0x530 0x000 0x4 0x0
+#define MX6SL_PAD_REF_CLK_32K__GPIO3_IO22          0x228 0x530 0x000 0x5 0x0
+#define MX6SL_PAD_REF_CLK_32K__SD3_CD_B            0x228 0x530 0x838 0x6 0x3
+#define MX6SL_PAD_SD1_CLK__SD1_CLK                 0x22c 0x534 0x000 0x0 0x0
+#define MX6SL_PAD_SD1_CLK__FEC_MDIO                0x22c 0x534 0x6f4 0x1 0x2
+#define MX6SL_PAD_SD1_CLK__KEY_COL0                0x22c 0x534 0x734 0x2 0x2
+#define MX6SL_PAD_SD1_CLK__EPDC_SDCE4              0x22c 0x534 0x000 0x3 0x0
+#define MX6SL_PAD_SD1_CLK__GPIO5_IO15              0x22c 0x534 0x000 0x5 0x0
+#define MX6SL_PAD_SD1_CMD__SD1_CMD                 0x230 0x538 0x000 0x0 0x0
+#define MX6SL_PAD_SD1_CMD__FEC_TX_CLK              0x230 0x538 0x70c 0x1 0x2
+#define MX6SL_PAD_SD1_CMD__KEY_ROW0                0x230 0x538 0x754 0x2 0x2
+#define MX6SL_PAD_SD1_CMD__EPDC_SDCE5              0x230 0x538 0x000 0x3 0x0
+#define MX6SL_PAD_SD1_CMD__GPIO5_IO14              0x230 0x538 0x000 0x5 0x0
+#define MX6SL_PAD_SD1_DAT0__SD1_DATA0              0x234 0x53c 0x000 0x0 0x0
+#define MX6SL_PAD_SD1_DAT0__FEC_RX_ER              0x234 0x53c 0x708 0x1 0x2
+#define MX6SL_PAD_SD1_DAT0__KEY_COL1               0x234 0x53c 0x738 0x2 0x2
+#define MX6SL_PAD_SD1_DAT0__EPDC_SDCE6             0x234 0x53c 0x000 0x3 0x0
+#define MX6SL_PAD_SD1_DAT0__GPIO5_IO11             0x234 0x53c 0x000 0x5 0x0
+#define MX6SL_PAD_SD1_DAT1__SD1_DATA1              0x238 0x540 0x000 0x0 0x0
+#define MX6SL_PAD_SD1_DAT1__FEC_RX_DV              0x238 0x540 0x704 0x1 0x2
+#define MX6SL_PAD_SD1_DAT1__KEY_ROW1               0x238 0x540 0x758 0x2 0x2
+#define MX6SL_PAD_SD1_DAT1__EPDC_SDCE7             0x238 0x540 0x000 0x3 0x0
+#define MX6SL_PAD_SD1_DAT1__GPIO5_IO08             0x238 0x540 0x000 0x5 0x0
+#define MX6SL_PAD_SD1_DAT2__SD1_DATA2              0x23c 0x544 0x000 0x0 0x0
+#define MX6SL_PAD_SD1_DAT2__FEC_RX_DATA1           0x23c 0x544 0x6fc 0x1 0x2
+#define MX6SL_PAD_SD1_DAT2__KEY_COL2               0x23c 0x544 0x73c 0x2 0x2
+#define MX6SL_PAD_SD1_DAT2__EPDC_SDCE8             0x23c 0x544 0x000 0x3 0x0
+#define MX6SL_PAD_SD1_DAT2__GPIO5_IO13             0x23c 0x544 0x000 0x5 0x0
+#define MX6SL_PAD_SD1_DAT3__SD1_DATA3              0x240 0x548 0x000 0x0 0x0
+#define MX6SL_PAD_SD1_DAT3__FEC_TX_DATA0           0x240 0x548 0x000 0x1 0x0
+#define MX6SL_PAD_SD1_DAT3__KEY_ROW2               0x240 0x548 0x75c 0x2 0x2
+#define MX6SL_PAD_SD1_DAT3__EPDC_SDCE9             0x240 0x548 0x000 0x3 0x0
+#define MX6SL_PAD_SD1_DAT3__GPIO5_IO06             0x240 0x548 0x000 0x5 0x0
+#define MX6SL_PAD_SD1_DAT4__SD1_DATA4              0x244 0x54c 0x000 0x0 0x0
+#define MX6SL_PAD_SD1_DAT4__FEC_MDC                0x244 0x54c 0x000 0x1 0x0
+#define MX6SL_PAD_SD1_DAT4__KEY_COL3               0x244 0x54c 0x740 0x2 0x2
+#define MX6SL_PAD_SD1_DAT4__EPDC_SDCLK_N           0x244 0x54c 0x000 0x3 0x0
+#define MX6SL_PAD_SD1_DAT4__UART4_RX_DATA          0x244 0x54c 0x814 0x4 0x4
+#define MX6SL_PAD_SD1_DAT4__UART4_TX_DATA          0x244 0x54c 0x000 0x4 0x0
+#define MX6SL_PAD_SD1_DAT4__GPIO5_IO12             0x244 0x54c 0x000 0x5 0x0
+#define MX6SL_PAD_SD1_DAT5__SD1_DATA5              0x248 0x550 0x000 0x0 0x0
+#define MX6SL_PAD_SD1_DAT5__FEC_RX_DATA0           0x248 0x550 0x6f8 0x1 0x2
+#define MX6SL_PAD_SD1_DAT5__KEY_ROW3               0x248 0x550 0x760 0x2 0x2
+#define MX6SL_PAD_SD1_DAT5__EPDC_SDOED             0x248 0x550 0x000 0x3 0x0
+#define MX6SL_PAD_SD1_DAT5__UART4_TX_DATA          0x248 0x550 0x000 0x4 0x0
+#define MX6SL_PAD_SD1_DAT5__UART4_RX_DATA          0x248 0x550 0x814 0x4 0x5
+#define MX6SL_PAD_SD1_DAT5__GPIO5_IO09             0x248 0x550 0x000 0x5 0x0
+#define MX6SL_PAD_SD1_DAT6__SD1_DATA6              0x24c 0x554 0x000 0x0 0x0
+#define MX6SL_PAD_SD1_DAT6__FEC_TX_EN              0x24c 0x554 0x000 0x1 0x0
+#define MX6SL_PAD_SD1_DAT6__KEY_COL4               0x24c 0x554 0x744 0x2 0x2
+#define MX6SL_PAD_SD1_DAT6__EPDC_SDOEZ             0x24c 0x554 0x000 0x3 0x0
+#define MX6SL_PAD_SD1_DAT6__UART4_RTS_B            0x24c 0x554 0x810 0x4 0x4
+#define MX6SL_PAD_SD1_DAT6__UART4_CTS_B            0x24c 0x554 0x000 0x4 0x0
+#define MX6SL_PAD_SD1_DAT6__GPIO5_IO07             0x24c 0x554 0x000 0x5 0x0
+#define MX6SL_PAD_SD1_DAT7__SD1_DATA7              0x250 0x558 0x000 0x0 0x0
+#define MX6SL_PAD_SD1_DAT7__FEC_TX_DATA1           0x250 0x558 0x000 0x1 0x0
+#define MX6SL_PAD_SD1_DAT7__KEY_ROW4               0x250 0x558 0x764 0x2 0x2
+#define MX6SL_PAD_SD1_DAT7__CCM_PMIC_READY         0x250 0x558 0x62c 0x3 0x3
+#define MX6SL_PAD_SD1_DAT7__UART4_CTS_B            0x250 0x558 0x000 0x4 0x0
+#define MX6SL_PAD_SD1_DAT7__UART4_RTS_B            0x250 0x558 0x810 0x4 0x5
+#define MX6SL_PAD_SD1_DAT7__GPIO5_IO10             0x250 0x558 0x000 0x5 0x0
+#define MX6SL_PAD_SD2_CLK__SD2_CLK                 0x254 0x55c 0x000 0x0 0x0
+#define MX6SL_PAD_SD2_CLK__AUD4_RXFS               0x254 0x55c 0x5f0 0x1 0x2
+#define MX6SL_PAD_SD2_CLK__ECSPI3_SCLK             0x254 0x55c 0x6b0 0x2 0x2
+#define MX6SL_PAD_SD2_CLK__CSI_DATA00              0x254 0x55c 0x630 0x3 0x2
+#define MX6SL_PAD_SD2_CLK__GPIO5_IO05              0x254 0x55c 0x000 0x5 0x0
+#define MX6SL_PAD_SD2_CMD__SD2_CMD                 0x258 0x560 0x000 0x0 0x0
+#define MX6SL_PAD_SD2_CMD__AUD4_RXC                0x258 0x560 0x5ec 0x1 0x2
+#define MX6SL_PAD_SD2_CMD__ECSPI3_SS0              0x258 0x560 0x6c0 0x2 0x2
+#define MX6SL_PAD_SD2_CMD__CSI_DATA01              0x258 0x560 0x634 0x3 0x2
+#define MX6SL_PAD_SD2_CMD__EPIT1_OUT               0x258 0x560 0x000 0x4 0x0
+#define MX6SL_PAD_SD2_CMD__GPIO5_IO04              0x258 0x560 0x000 0x5 0x0
+#define MX6SL_PAD_SD2_DAT0__SD2_DATA0              0x25c 0x564 0x000 0x0 0x0
+#define MX6SL_PAD_SD2_DAT0__AUD4_RXD               0x25c 0x564 0x5e4 0x1 0x2
+#define MX6SL_PAD_SD2_DAT0__ECSPI3_MOSI            0x25c 0x564 0x6bc 0x2 0x2
+#define MX6SL_PAD_SD2_DAT0__CSI_DATA02             0x25c 0x564 0x638 0x3 0x2
+#define MX6SL_PAD_SD2_DAT0__UART5_RTS_B            0x25c 0x564 0x818 0x4 0x4
+#define MX6SL_PAD_SD2_DAT0__UART5_CTS_B            0x25c 0x564 0x000 0x4 0x0
+#define MX6SL_PAD_SD2_DAT0__GPIO5_IO01             0x25c 0x564 0x000 0x5 0x0
+#define MX6SL_PAD_SD2_DAT1__SD2_DATA1              0x260 0x568 0x000 0x0 0x0
+#define MX6SL_PAD_SD2_DAT1__AUD4_TXC               0x260 0x568 0x5f4 0x1 0x2
+#define MX6SL_PAD_SD2_DAT1__ECSPI3_MISO            0x260 0x568 0x6b8 0x2 0x2
+#define MX6SL_PAD_SD2_DAT1__CSI_DATA03             0x260 0x568 0x63c 0x3 0x2
+#define MX6SL_PAD_SD2_DAT1__UART5_CTS_B            0x260 0x568 0x000 0x4 0x0
+#define MX6SL_PAD_SD2_DAT1__UART5_RTS_B            0x260 0x568 0x818 0x4 0x5
+#define MX6SL_PAD_SD2_DAT1__GPIO4_IO30             0x260 0x568 0x000 0x5 0x0
+#define MX6SL_PAD_SD2_DAT2__SD2_DATA2              0x264 0x56c 0x000 0x0 0x0
+#define MX6SL_PAD_SD2_DAT2__AUD4_TXFS              0x264 0x56c 0x5f8 0x1 0x2
+#define MX6SL_PAD_SD2_DAT2__FEC_COL                0x264 0x56c 0x6f0 0x2 0x1
+#define MX6SL_PAD_SD2_DAT2__CSI_DATA04             0x264 0x56c 0x640 0x3 0x2
+#define MX6SL_PAD_SD2_DAT2__UART5_RX_DATA          0x264 0x56c 0x81c 0x4 0x4
+#define MX6SL_PAD_SD2_DAT2__UART5_TX_DATA          0x264 0x56c 0x000 0x4 0x0
+#define MX6SL_PAD_SD2_DAT2__GPIO5_IO03             0x264 0x56c 0x000 0x5 0x0
+#define MX6SL_PAD_SD2_DAT3__SD2_DATA3              0x268 0x570 0x000 0x0 0x0
+#define MX6SL_PAD_SD2_DAT3__AUD4_TXD               0x268 0x570 0x5e8 0x1 0x2
+#define MX6SL_PAD_SD2_DAT3__FEC_RX_CLK             0x268 0x570 0x700 0x2 0x1
+#define MX6SL_PAD_SD2_DAT3__CSI_DATA05             0x268 0x570 0x644 0x3 0x2
+#define MX6SL_PAD_SD2_DAT3__UART5_TX_DATA          0x268 0x570 0x000 0x4 0x0
+#define MX6SL_PAD_SD2_DAT3__UART5_RX_DATA          0x268 0x570 0x81c 0x4 0x5
+#define MX6SL_PAD_SD2_DAT3__GPIO4_IO28             0x268 0x570 0x000 0x5 0x0
+#define MX6SL_PAD_SD2_DAT4__SD2_DATA4              0x26c 0x574 0x000 0x0 0x0
+#define MX6SL_PAD_SD2_DAT4__SD3_DATA4              0x26c 0x574 0x83c 0x1 0x1
+#define MX6SL_PAD_SD2_DAT4__UART2_RX_DATA          0x26c 0x574 0x804 0x2 0x4
+#define MX6SL_PAD_SD2_DAT4__UART2_TX_DATA          0x26c 0x574 0x000 0x2 0x0
+#define MX6SL_PAD_SD2_DAT4__CSI_DATA06             0x26c 0x574 0x648 0x3 0x2
+#define MX6SL_PAD_SD2_DAT4__SPDIF_OUT              0x26c 0x574 0x000 0x4 0x0
+#define MX6SL_PAD_SD2_DAT4__GPIO5_IO02             0x26c 0x574 0x000 0x5 0x0
+#define MX6SL_PAD_SD2_DAT5__SD2_DATA5              0x270 0x578 0x000 0x0 0x0
+#define MX6SL_PAD_SD2_DAT5__SD3_DATA5              0x270 0x578 0x840 0x1 0x1
+#define MX6SL_PAD_SD2_DAT5__UART2_TX_DATA          0x270 0x578 0x000 0x2 0x0
+#define MX6SL_PAD_SD2_DAT5__UART2_RX_DATA          0x270 0x578 0x804 0x2 0x5
+#define MX6SL_PAD_SD2_DAT5__CSI_DATA07             0x270 0x578 0x64c 0x3 0x2
+#define MX6SL_PAD_SD2_DAT5__SPDIF_IN               0x270 0x578 0x7f0 0x4 0x2
+#define MX6SL_PAD_SD2_DAT5__GPIO4_IO31             0x270 0x578 0x000 0x5 0x0
+#define MX6SL_PAD_SD2_DAT6__SD2_DATA6              0x274 0x57c 0x000 0x0 0x0
+#define MX6SL_PAD_SD2_DAT6__SD3_DATA6              0x274 0x57c 0x844 0x1 0x1
+#define MX6SL_PAD_SD2_DAT6__UART2_RTS_B            0x274 0x57c 0x800 0x2 0x4
+#define MX6SL_PAD_SD2_DAT6__UART2_CTS_B            0x274 0x57c 0x000 0x2 0x0
+#define MX6SL_PAD_SD2_DAT6__CSI_DATA08             0x274 0x57c 0x650 0x3 0x2
+#define MX6SL_PAD_SD2_DAT6__SD2_WP                 0x274 0x57c 0x834 0x4 0x2
+#define MX6SL_PAD_SD2_DAT6__GPIO4_IO29             0x274 0x57c 0x000 0x5 0x0
+#define MX6SL_PAD_SD2_DAT7__SD2_DATA7              0x278 0x580 0x000 0x0 0x0
+#define MX6SL_PAD_SD2_DAT7__SD3_DATA7              0x278 0x580 0x848 0x1 0x1
+#define MX6SL_PAD_SD2_DAT7__UART2_CTS_B            0x278 0x580 0x000 0x2 0x0
+#define MX6SL_PAD_SD2_DAT7__UART2_RTS_B            0x278 0x580 0x800 0x2 0x5
+#define MX6SL_PAD_SD2_DAT7__CSI_DATA09             0x278 0x580 0x654 0x3 0x2
+#define MX6SL_PAD_SD2_DAT7__SD2_CD_B               0x278 0x580 0x830 0x4 0x2
+#define MX6SL_PAD_SD2_DAT7__GPIO5_IO00             0x278 0x580 0x000 0x5 0x0
+#define MX6SL_PAD_SD2_RST__SD2_RESET               0x27c 0x584 0x000 0x0 0x0
+#define MX6SL_PAD_SD2_RST__FEC_REF_OUT             0x27c 0x584 0x000 0x1 0x0
+#define MX6SL_PAD_SD2_RST__WDOG2_B                 0x27c 0x584 0x000 0x2 0x0
+#define MX6SL_PAD_SD2_RST__SPDIF_OUT               0x27c 0x584 0x000 0x3 0x0
+#define MX6SL_PAD_SD2_RST__CSI_MCLK                0x27c 0x584 0x000 0x4 0x0
+#define MX6SL_PAD_SD2_RST__GPIO4_IO27              0x27c 0x584 0x000 0x5 0x0
+#define MX6SL_PAD_SD3_CLK__SD3_CLK                 0x280 0x588 0x000 0x0 0x0
+#define MX6SL_PAD_SD3_CLK__AUD5_RXFS               0x280 0x588 0x608 0x1 0x1
+#define MX6SL_PAD_SD3_CLK__KEY_COL5                0x280 0x588 0x748 0x2 0x2
+#define MX6SL_PAD_SD3_CLK__CSI_DATA10              0x280 0x588 0x658 0x3 0x2
+#define MX6SL_PAD_SD3_CLK__WDOG1_RESET_B_DEB       0x280 0x588 0x000 0x4 0x0
+#define MX6SL_PAD_SD3_CLK__GPIO5_IO18              0x280 0x588 0x000 0x5 0x0
+#define MX6SL_PAD_SD3_CLK__USB_OTG1_PWR            0x280 0x588 0x000 0x6 0x0
+#define MX6SL_PAD_SD3_CMD__SD3_CMD                 0x284 0x58c 0x000 0x0 0x0
+#define MX6SL_PAD_SD3_CMD__AUD5_RXC                0x284 0x58c 0x604 0x1 0x1
+#define MX6SL_PAD_SD3_CMD__KEY_ROW5                0x284 0x58c 0x768 0x2 0x2
+#define MX6SL_PAD_SD3_CMD__CSI_DATA11              0x284 0x58c 0x65c 0x3 0x2
+#define MX6SL_PAD_SD3_CMD__USB_OTG2_ID             0x284 0x58c 0x5e0 0x4 0x3
+#define MX6SL_PAD_SD3_CMD__GPIO5_IO21              0x284 0x58c 0x000 0x5 0x0
+#define MX6SL_PAD_SD3_CMD__USB_OTG2_PWR            0x284 0x58c 0x000 0x6 0x0
+#define MX6SL_PAD_SD3_DAT0__SD3_DATA0              0x288 0x590 0x000 0x0 0x0
+#define MX6SL_PAD_SD3_DAT0__AUD5_RXD               0x288 0x590 0x5fc 0x1 0x1
+#define MX6SL_PAD_SD3_DAT0__KEY_COL6               0x288 0x590 0x74c 0x2 0x2
+#define MX6SL_PAD_SD3_DAT0__CSI_DATA12             0x288 0x590 0x660 0x3 0x1
+#define MX6SL_PAD_SD3_DAT0__USB_OTG1_ID            0x288 0x590 0x5dc 0x4 0x4
+#define MX6SL_PAD_SD3_DAT0__GPIO5_IO19             0x288 0x590 0x000 0x5 0x0
+#define MX6SL_PAD_SD3_DAT1__SD3_DATA1              0x28c 0x594 0x000 0x0 0x0
+#define MX6SL_PAD_SD3_DAT1__AUD5_TXC               0x28c 0x594 0x60c 0x1 0x1
+#define MX6SL_PAD_SD3_DAT1__KEY_ROW6               0x28c 0x594 0x76c 0x2 0x2
+#define MX6SL_PAD_SD3_DAT1__CSI_DATA13             0x28c 0x594 0x664 0x3 0x1
+#define MX6SL_PAD_SD3_DAT1__SD1_VSELECT            0x28c 0x594 0x000 0x4 0x0
+#define MX6SL_PAD_SD3_DAT1__GPIO5_IO20             0x28c 0x594 0x000 0x5 0x0
+#define MX6SL_PAD_SD3_DAT1__JTAG_DE_B              0x28c 0x594 0x000 0x6 0x0
+#define MX6SL_PAD_SD3_DAT2__SD3_DATA2              0x290 0x598 0x000 0x0 0x0
+#define MX6SL_PAD_SD3_DAT2__AUD5_TXFS              0x290 0x598 0x610 0x1 0x1
+#define MX6SL_PAD_SD3_DAT2__KEY_COL7               0x290 0x598 0x750 0x2 0x2
+#define MX6SL_PAD_SD3_DAT2__CSI_DATA14             0x290 0x598 0x668 0x3 0x1
+#define MX6SL_PAD_SD3_DAT2__EPIT1_OUT              0x290 0x598 0x000 0x4 0x0
+#define MX6SL_PAD_SD3_DAT2__GPIO5_IO16             0x290 0x598 0x000 0x5 0x0
+#define MX6SL_PAD_SD3_DAT2__USB_OTG2_OC            0x290 0x598 0x820 0x6 0x3
+#define MX6SL_PAD_SD3_DAT3__SD3_DATA3              0x294 0x59c 0x000 0x0 0x0
+#define MX6SL_PAD_SD3_DAT3__AUD5_TXD               0x294 0x59c 0x600 0x1 0x1
+#define MX6SL_PAD_SD3_DAT3__KEY_ROW7               0x294 0x59c 0x770 0x2 0x2
+#define MX6SL_PAD_SD3_DAT3__CSI_DATA15             0x294 0x59c 0x66c 0x3 0x1
+#define MX6SL_PAD_SD3_DAT3__EPIT2_OUT              0x294 0x59c 0x000 0x4 0x0
+#define MX6SL_PAD_SD3_DAT3__GPIO5_IO17             0x294 0x59c 0x000 0x5 0x0
+#define MX6SL_PAD_SD3_DAT3__USB_OTG1_OC            0x294 0x59c 0x824 0x6 0x2
+#define MX6SL_PAD_UART1_RXD__UART1_RX_DATA         0x298 0x5a0 0x7fc 0x0 0x0
+#define MX6SL_PAD_UART1_RXD__UART1_TX_DATA         0x298 0x5a0 0x000 0x0 0x0
+#define MX6SL_PAD_UART1_RXD__PWM1_OUT              0x298 0x5a0 0x000 0x1 0x0
+#define MX6SL_PAD_UART1_RXD__UART4_RX_DATA         0x298 0x5a0 0x814 0x2 0x6
+#define MX6SL_PAD_UART1_RXD__UART4_TX_DATA         0x298 0x5a0 0x000 0x2 0x0
+#define MX6SL_PAD_UART1_RXD__FEC_COL               0x298 0x5a0 0x6f0 0x3 0x2
+#define MX6SL_PAD_UART1_RXD__UART5_RX_DATA         0x298 0x5a0 0x81c 0x4 0x6
+#define MX6SL_PAD_UART1_RXD__UART5_TX_DATA         0x298 0x5a0 0x000 0x4 0x0
+#define MX6SL_PAD_UART1_RXD__GPIO3_IO16            0x298 0x5a0 0x000 0x5 0x0
+#define MX6SL_PAD_UART1_TXD__UART1_TX_DATA         0x29c 0x5a4 0x000 0x0 0x0
+#define MX6SL_PAD_UART1_TXD__UART1_RX_DATA         0x29c 0x5a4 0x7fc 0x0 0x1
+#define MX6SL_PAD_UART1_TXD__PWM2_OUT              0x29c 0x5a4 0x000 0x1 0x0
+#define MX6SL_PAD_UART1_TXD__UART4_TX_DATA         0x29c 0x5a4 0x000 0x2 0x0
+#define MX6SL_PAD_UART1_TXD__UART4_RX_DATA         0x29c 0x5a4 0x814 0x2 0x7
+#define MX6SL_PAD_UART1_TXD__FEC_RX_CLK            0x29c 0x5a4 0x700 0x3 0x2
+#define MX6SL_PAD_UART1_TXD__UART5_TX_DATA         0x29c 0x5a4 0x000 0x4 0x0
+#define MX6SL_PAD_UART1_TXD__UART5_RX_DATA         0x29c 0x5a4 0x81c 0x4 0x7
+#define MX6SL_PAD_UART1_TXD__GPIO3_IO17            0x29c 0x5a4 0x000 0x5 0x0
+#define MX6SL_PAD_UART1_TXD__UART5_DCD_B           0x29c 0x5a4 0x000 0x7 0x0
+#define MX6SL_PAD_WDOG_B__WDOG1_B                  0x2a0 0x5a8 0x000 0x0 0x0
+#define MX6SL_PAD_WDOG_B__WDOG1_RESET_B_DEB        0x2a0 0x5a8 0x000 0x1 0x0
+#define MX6SL_PAD_WDOG_B__UART5_RI_B               0x2a0 0x5a8 0x000 0x2 0x0
+#define MX6SL_PAD_WDOG_B__GPIO3_IO18               0x2a0 0x5a8 0x000 0x5 0x0
+
+#endif /* __DTS_IMX6SL_PINFUNC_H */
diff --git a/arch/arm/dts/imx6sl.dtsi b/arch/arm/dts/imx6sl.dtsi
new file mode 100644 (file)
index 0000000..cc9572e
--- /dev/null
@@ -0,0 +1,927 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include "imx6sl-pinfunc.h"
+#include <dt-bindings/clock/imx6sl-clock.h>
+
+/ {
+       #address-cells = <1>;
+       #size-cells = <1>;
+       /*
+        * The decompressor and also some bootloaders rely on a
+        * pre-existing /chosen node to be available to insert the
+        * command line and merge other ATAGS info.
+        * Also for U-Boot there must be a pre-existing /memory node.
+        */
+       chosen {};
+       memory { device_type = "memory"; reg = <0 0>; };
+
+       aliases {
+               ethernet0 = &fec;
+               gpio0 = &gpio1;
+               gpio1 = &gpio2;
+               gpio2 = &gpio3;
+               gpio3 = &gpio4;
+               gpio4 = &gpio5;
+               serial0 = &uart1;
+               serial1 = &uart2;
+               serial2 = &uart3;
+               serial3 = &uart4;
+               serial4 = &uart5;
+               spi0 = &ecspi1;
+               spi1 = &ecspi2;
+               spi2 = &ecspi3;
+               spi3 = &ecspi4;
+               usbphy0 = &usbphy1;
+               usbphy1 = &usbphy2;
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       compatible = "arm,cortex-a9";
+                       device_type = "cpu";
+                       reg = <0x0>;
+                       next-level-cache = <&L2>;
+                       operating-points = <
+                               /* kHz    uV */
+                               996000  1275000
+                               792000  1175000
+                               396000  975000
+                       >;
+                       fsl,soc-operating-points = <
+                               /* ARM kHz      SOC-PU uV */
+                               996000          1225000
+                               792000          1175000
+                               396000          1175000
+                       >;
+                       clock-latency = <61036>; /* two CLK32 periods */
+                       clocks = <&clks IMX6SL_CLK_ARM>, <&clks IMX6SL_CLK_PLL2_PFD2>,
+                                       <&clks IMX6SL_CLK_STEP>, <&clks IMX6SL_CLK_PLL1_SW>,
+                                       <&clks IMX6SL_CLK_PLL1_SYS>;
+                       clock-names = "arm", "pll2_pfd2_396m", "step",
+                                     "pll1_sw", "pll1_sys";
+                       arm-supply = <&reg_arm>;
+                       pu-supply = <&reg_pu>;
+                       soc-supply = <&reg_soc>;
+               };
+       };
+
+       intc: interrupt-controller@00a01000 {
+               compatible = "arm,cortex-a9-gic";
+               #interrupt-cells = <3>;
+               interrupt-controller;
+               reg = <0x00a01000 0x1000>,
+                     <0x00a00100 0x100>;
+               interrupt-parent = <&intc>;
+       };
+
+       clocks {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ckil {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <32768>;
+               };
+
+               osc {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <24000000>;
+               };
+       };
+
+       soc {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "simple-bus";
+               interrupt-parent = <&gpc>;
+               ranges;
+
+               ocram: sram@00900000 {
+                       compatible = "mmio-sram";
+                       reg = <0x00900000 0x20000>;
+                       clocks = <&clks IMX6SL_CLK_OCRAM>;
+               };
+
+               L2: l2-cache@00a02000 {
+                       compatible = "arm,pl310-cache";
+                       reg = <0x00a02000 0x1000>;
+                       interrupts = <0 92 IRQ_TYPE_LEVEL_HIGH>;
+                       cache-unified;
+                       cache-level = <2>;
+                       arm,tag-latency = <4 2 3>;
+                       arm,data-latency = <4 2 3>;
+               };
+
+               pmu {
+                       compatible = "arm,cortex-a9-pmu";
+                       interrupts = <0 94 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
+               aips1: aips-bus@02000000 {
+                       compatible = "fsl,aips-bus", "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x02000000 0x100000>;
+                       ranges;
+
+                       spba: spba-bus@02000000 {
+                               compatible = "fsl,spba-bus", "simple-bus";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               reg = <0x02000000 0x40000>;
+                               ranges;
+
+                               spdif: spdif@02004000 {
+                                       compatible = "fsl,imx6sl-spdif",
+                                               "fsl,imx35-spdif";
+                                       reg = <0x02004000 0x4000>;
+                                       interrupts = <0 52 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&sdma 14 18 0>,
+                                               <&sdma 15 18 0>;
+                                       dma-names = "rx", "tx";
+                                       clocks = <&clks IMX6SL_CLK_SPDIF_GCLK>, <&clks IMX6SL_CLK_OSC>,
+                                                <&clks IMX6SL_CLK_SPDIF>, <&clks IMX6SL_CLK_DUMMY>,
+                                                <&clks IMX6SL_CLK_DUMMY>, <&clks IMX6SL_CLK_DUMMY>,
+                                                <&clks IMX6SL_CLK_IPG>, <&clks IMX6SL_CLK_DUMMY>,
+                                                <&clks IMX6SL_CLK_DUMMY>, <&clks IMX6SL_CLK_SPBA>;
+                                       clock-names = "core", "rxtx0",
+                                               "rxtx1", "rxtx2",
+                                               "rxtx3", "rxtx4",
+                                               "rxtx5", "rxtx6",
+                                               "rxtx7", "spba";
+                                       status = "disabled";
+                               };
+
+                               ecspi1: ecspi@02008000 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       compatible = "fsl,imx6sl-ecspi", "fsl,imx51-ecspi";
+                                       reg = <0x02008000 0x4000>;
+                                       interrupts = <0 31 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SL_CLK_ECSPI1>,
+                                                <&clks IMX6SL_CLK_ECSPI1>;
+                                       clock-names = "ipg", "per";
+                                       status = "disabled";
+                               };
+
+                               ecspi2: ecspi@0200c000 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       compatible = "fsl,imx6sl-ecspi", "fsl,imx51-ecspi";
+                                       reg = <0x0200c000 0x4000>;
+                                       interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SL_CLK_ECSPI2>,
+                                                <&clks IMX6SL_CLK_ECSPI2>;
+                                       clock-names = "ipg", "per";
+                                       status = "disabled";
+                               };
+
+                               ecspi3: ecspi@02010000 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       compatible = "fsl,imx6sl-ecspi", "fsl,imx51-ecspi";
+                                       reg = <0x02010000 0x4000>;
+                                       interrupts = <0 33 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SL_CLK_ECSPI3>,
+                                                <&clks IMX6SL_CLK_ECSPI3>;
+                                       clock-names = "ipg", "per";
+                                       status = "disabled";
+                               };
+
+                               ecspi4: ecspi@02014000 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       compatible = "fsl,imx6sl-ecspi", "fsl,imx51-ecspi";
+                                       reg = <0x02014000 0x4000>;
+                                       interrupts = <0 34 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SL_CLK_ECSPI4>,
+                                                <&clks IMX6SL_CLK_ECSPI4>;
+                                       clock-names = "ipg", "per";
+                                       status = "disabled";
+                               };
+
+                               uart5: serial@02018000 {
+                                       compatible = "fsl,imx6sl-uart",
+                                                  "fsl,imx6q-uart", "fsl,imx21-uart";
+                                       reg = <0x02018000 0x4000>;
+                                       interrupts = <0 30 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SL_CLK_UART>,
+                                                <&clks IMX6SL_CLK_UART_SERIAL>;
+                                       clock-names = "ipg", "per";
+                                       dmas = <&sdma 33 4 0>, <&sdma 34 4 0>;
+                                       dma-names = "rx", "tx";
+                                       status = "disabled";
+                               };
+
+                               uart1: serial@02020000 {
+                                       compatible = "fsl,imx6sl-uart",
+                                                  "fsl,imx6q-uart", "fsl,imx21-uart";
+                                       reg = <0x02020000 0x4000>;
+                                       interrupts = <0 26 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SL_CLK_UART>,
+                                                <&clks IMX6SL_CLK_UART_SERIAL>;
+                                       clock-names = "ipg", "per";
+                                       dmas = <&sdma 25 4 0>, <&sdma 26 4 0>;
+                                       dma-names = "rx", "tx";
+                                       status = "disabled";
+                               };
+
+                               uart2: serial@02024000 {
+                                       compatible = "fsl,imx6sl-uart",
+                                                  "fsl,imx6q-uart", "fsl,imx21-uart";
+                                       reg = <0x02024000 0x4000>;
+                                       interrupts = <0 27 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SL_CLK_UART>,
+                                                <&clks IMX6SL_CLK_UART_SERIAL>;
+                                       clock-names = "ipg", "per";
+                                       dmas = <&sdma 27 4 0>, <&sdma 28 4 0>;
+                                       dma-names = "rx", "tx";
+                                       status = "disabled";
+                               };
+
+                               ssi1: ssi@02028000 {
+                                       #sound-dai-cells = <0>;
+                                       compatible = "fsl,imx6sl-ssi",
+                                                       "fsl,imx51-ssi";
+                                       reg = <0x02028000 0x4000>;
+                                       interrupts = <0 46 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SL_CLK_SSI1_IPG>,
+                                                <&clks IMX6SL_CLK_SSI1>;
+                                       clock-names = "ipg", "baud";
+                                       dmas = <&sdma 37 1 0>,
+                                              <&sdma 38 1 0>;
+                                       dma-names = "rx", "tx";
+                                       fsl,fifo-depth = <15>;
+                                       status = "disabled";
+                               };
+
+                               ssi2: ssi@0202c000 {
+                                       #sound-dai-cells = <0>;
+                                       compatible = "fsl,imx6sl-ssi",
+                                                       "fsl,imx51-ssi";
+                                       reg = <0x0202c000 0x4000>;
+                                       interrupts = <0 47 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SL_CLK_SSI2_IPG>,
+                                                <&clks IMX6SL_CLK_SSI2>;
+                                       clock-names = "ipg", "baud";
+                                       dmas = <&sdma 41 1 0>,
+                                              <&sdma 42 1 0>;
+                                       dma-names = "rx", "tx";
+                                       fsl,fifo-depth = <15>;
+                                       status = "disabled";
+                               };
+
+                               ssi3: ssi@02030000 {
+                                       #sound-dai-cells = <0>;
+                                       compatible = "fsl,imx6sl-ssi",
+                                                       "fsl,imx51-ssi";
+                                       reg = <0x02030000 0x4000>;
+                                       interrupts = <0 48 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SL_CLK_SSI3_IPG>,
+                                                <&clks IMX6SL_CLK_SSI3>;
+                                       clock-names = "ipg", "baud";
+                                       dmas = <&sdma 45 1 0>,
+                                              <&sdma 46 1 0>;
+                                       dma-names = "rx", "tx";
+                                       fsl,fifo-depth = <15>;
+                                       status = "disabled";
+                               };
+
+                               uart3: serial@02034000 {
+                                       compatible = "fsl,imx6sl-uart",
+                                                  "fsl,imx6q-uart", "fsl,imx21-uart";
+                                       reg = <0x02034000 0x4000>;
+                                       interrupts = <0 28 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SL_CLK_UART>,
+                                                <&clks IMX6SL_CLK_UART_SERIAL>;
+                                       clock-names = "ipg", "per";
+                                       dmas = <&sdma 29 4 0>, <&sdma 30 4 0>;
+                                       dma-names = "rx", "tx";
+                                       status = "disabled";
+                               };
+
+                               uart4: serial@02038000 {
+                                       compatible = "fsl,imx6sl-uart",
+                                                  "fsl,imx6q-uart", "fsl,imx21-uart";
+                                       reg = <0x02038000 0x4000>;
+                                       interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SL_CLK_UART>,
+                                                <&clks IMX6SL_CLK_UART_SERIAL>;
+                                       clock-names = "ipg", "per";
+                                       dmas = <&sdma 31 4 0>, <&sdma 32 4 0>;
+                                       dma-names = "rx", "tx";
+                                       status = "disabled";
+                               };
+                       };
+
+                       pwm1: pwm@02080000 {
+                               #pwm-cells = <2>;
+                               compatible = "fsl,imx6sl-pwm", "fsl,imx27-pwm";
+                               reg = <0x02080000 0x4000>;
+                               interrupts = <0 83 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_PWM1>,
+                                        <&clks IMX6SL_CLK_PWM1>;
+                               clock-names = "ipg", "per";
+                       };
+
+                       pwm2: pwm@02084000 {
+                               #pwm-cells = <2>;
+                               compatible = "fsl,imx6sl-pwm", "fsl,imx27-pwm";
+                               reg = <0x02084000 0x4000>;
+                               interrupts = <0 84 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_PWM2>,
+                                        <&clks IMX6SL_CLK_PWM2>;
+                               clock-names = "ipg", "per";
+                       };
+
+                       pwm3: pwm@02088000 {
+                               #pwm-cells = <2>;
+                               compatible = "fsl,imx6sl-pwm", "fsl,imx27-pwm";
+                               reg = <0x02088000 0x4000>;
+                               interrupts = <0 85 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_PWM3>,
+                                        <&clks IMX6SL_CLK_PWM3>;
+                               clock-names = "ipg", "per";
+                       };
+
+                       pwm4: pwm@0208c000 {
+                               #pwm-cells = <2>;
+                               compatible = "fsl,imx6sl-pwm", "fsl,imx27-pwm";
+                               reg = <0x0208c000 0x4000>;
+                               interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_PWM4>,
+                                        <&clks IMX6SL_CLK_PWM4>;
+                               clock-names = "ipg", "per";
+                       };
+
+                       gpt: gpt@02098000 {
+                               compatible = "fsl,imx6sl-gpt";
+                               reg = <0x02098000 0x4000>;
+                               interrupts = <0 55 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_GPT>,
+                                        <&clks IMX6SL_CLK_GPT_SERIAL>;
+                               clock-names = "ipg", "per";
+                       };
+
+                       gpio1: gpio@0209c000 {
+                               compatible = "fsl,imx6sl-gpio", "fsl,imx35-gpio";
+                               reg = <0x0209c000 0x4000>;
+                               interrupts = <0 66 IRQ_TYPE_LEVEL_HIGH>,
+                                            <0 67 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               gpio-ranges = <&iomuxc  0 22 1>, <&iomuxc  1 20 2>,
+                                             <&iomuxc  3 23 1>, <&iomuxc  4 25 1>,
+                                             <&iomuxc  5 24 1>, <&iomuxc  6 19 1>,
+                                             <&iomuxc  7 36 2>, <&iomuxc  9 44 8>,
+                                             <&iomuxc 17 38 6>, <&iomuxc 23 68 4>,
+                                             <&iomuxc 27 64 4>, <&iomuxc 31 52 1>;
+                       };
+
+                       gpio2: gpio@020a0000 {
+                               compatible = "fsl,imx6sl-gpio", "fsl,imx35-gpio";
+                               reg = <0x020a0000 0x4000>;
+                               interrupts = <0 68 IRQ_TYPE_LEVEL_HIGH>,
+                                            <0 69 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               gpio-ranges = <&iomuxc  0  53 3>, <&iomuxc  3  72 2>,
+                                             <&iomuxc  5  34 2>, <&iomuxc  7  57 4>,
+                                             <&iomuxc 11  56 1>, <&iomuxc 12  61 3>,
+                                             <&iomuxc 15 107 1>, <&iomuxc 16 132 2>,
+                                             <&iomuxc 18 135 1>, <&iomuxc 19 134 1>,
+                                             <&iomuxc 20 108 2>, <&iomuxc 22 120 1>,
+                                             <&iomuxc 23 125 7>, <&iomuxc 30 110 2>;
+                       };
+
+                       gpio3: gpio@020a4000 {
+                               compatible = "fsl,imx6sl-gpio", "fsl,imx35-gpio";
+                               reg = <0x020a4000 0x4000>;
+                               interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH>,
+                                            <0 71 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               gpio-ranges = <&iomuxc  0 112 8>, <&iomuxc  8 121 4>,
+                                             <&iomuxc 12  97 4>, <&iomuxc 16 166 3>,
+                                             <&iomuxc 19  85 2>, <&iomuxc 21 137 2>,
+                                             <&iomuxc 23 136 1>, <&iomuxc 24  91 1>,
+                                             <&iomuxc 25  99 1>, <&iomuxc 26  92 1>,
+                                             <&iomuxc 27 100 1>, <&iomuxc 28  93 1>,
+                                             <&iomuxc 29 101 1>, <&iomuxc 30  94 1>,
+                                             <&iomuxc 31 102 1>;
+                       };
+
+                       gpio4: gpio@020a8000 {
+                               compatible = "fsl,imx6sl-gpio", "fsl,imx35-gpio";
+                               reg = <0x020a8000 0x4000>;
+                               interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>,
+                                            <0 73 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               gpio-ranges = <&iomuxc  0  95 1>, <&iomuxc  1 103 1>,
+                                             <&iomuxc  2  96 1>, <&iomuxc  3 104 1>,
+                                             <&iomuxc  4  97 1>, <&iomuxc  5 105 1>,
+                                             <&iomuxc  6  98 1>, <&iomuxc  7 106 1>,
+                                             <&iomuxc  8  28 1>, <&iomuxc  9  27 1>,
+                                             <&iomuxc 10  26 1>, <&iomuxc 11  29 1>,
+                                             <&iomuxc 12  32 1>, <&iomuxc 13  31 1>,
+                                             <&iomuxc 14  30 1>, <&iomuxc 15  33 1>,
+                                             <&iomuxc 16  84 1>, <&iomuxc 17  79 2>,
+                                             <&iomuxc 19  78 1>, <&iomuxc 20  76 1>,
+                                             <&iomuxc 21  81 2>, <&iomuxc 23  75 1>,
+                                             <&iomuxc 24  83 1>, <&iomuxc 25  74 1>,
+                                             <&iomuxc 26  77 1>, <&iomuxc 27 159 1>,
+                                             <&iomuxc 28 154 1>, <&iomuxc 29 157 1>,
+                                             <&iomuxc 30 152 1>, <&iomuxc 31 156 1>;
+                       };
+
+                       gpio5: gpio@020ac000 {
+                               compatible = "fsl,imx6sl-gpio", "fsl,imx35-gpio";
+                               reg = <0x020ac000 0x4000>;
+                               interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>,
+                                            <0 75 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               gpio-ranges = <&iomuxc  0 158 1>, <&iomuxc  1 151 1>,
+                                             <&iomuxc  2 155 1>, <&iomuxc  3 153 1>,
+                                             <&iomuxc  4 150 1>, <&iomuxc  5 149 1>,
+                                             <&iomuxc  6 144 1>, <&iomuxc  7 147 1>,
+                                             <&iomuxc  8 142 1>, <&iomuxc  9 146 1>,
+                                             <&iomuxc 10 148 1>, <&iomuxc 11 141 1>,
+                                             <&iomuxc 12 145 1>, <&iomuxc 13 143 1>,
+                                             <&iomuxc 14 140 1>, <&iomuxc 15 139 1>,
+                                             <&iomuxc 16 164 2>, <&iomuxc 18 160 1>,
+                                             <&iomuxc 19 162 1>, <&iomuxc 20 163 1>,
+                                             <&iomuxc 21 161 1>;
+                       };
+
+                       kpp: kpp@020b8000 {
+                               compatible = "fsl,imx6sl-kpp", "fsl,imx21-kpp";
+                               reg = <0x020b8000 0x4000>;
+                               interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_DUMMY>;
+                               status = "disabled";
+                       };
+
+                       wdog1: wdog@020bc000 {
+                               compatible = "fsl,imx6sl-wdt", "fsl,imx21-wdt";
+                               reg = <0x020bc000 0x4000>;
+                               interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_DUMMY>;
+                       };
+
+                       wdog2: wdog@020c0000 {
+                               compatible = "fsl,imx6sl-wdt", "fsl,imx21-wdt";
+                               reg = <0x020c0000 0x4000>;
+                               interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_DUMMY>;
+                               status = "disabled";
+                       };
+
+                       clks: ccm@020c4000 {
+                               compatible = "fsl,imx6sl-ccm";
+                               reg = <0x020c4000 0x4000>;
+                               interrupts = <0 87 IRQ_TYPE_LEVEL_HIGH>,
+                                            <0 88 IRQ_TYPE_LEVEL_HIGH>;
+                               #clock-cells = <1>;
+                       };
+
+                       anatop: anatop@020c8000 {
+                               compatible = "fsl,imx6sl-anatop",
+                                            "fsl,imx6q-anatop",
+                                            "syscon", "simple-bus";
+                               reg = <0x020c8000 0x1000>;
+                               interrupts = <0 49 IRQ_TYPE_LEVEL_HIGH>,
+                                            <0 54 IRQ_TYPE_LEVEL_HIGH>,
+                                            <0 127 IRQ_TYPE_LEVEL_HIGH>;
+
+                               regulator-1p1 {
+                                       compatible = "fsl,anatop-regulator";
+                                       regulator-name = "vdd1p1";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1375000>;
+                                       regulator-always-on;
+                                       anatop-reg-offset = <0x110>;
+                                       anatop-vol-bit-shift = <8>;
+                                       anatop-vol-bit-width = <5>;
+                                       anatop-min-bit-val = <4>;
+                                       anatop-min-voltage = <800000>;
+                                       anatop-max-voltage = <1375000>;
+                               };
+
+                               regulator-3p0 {
+                                       compatible = "fsl,anatop-regulator";
+                                       regulator-name = "vdd3p0";
+                                       regulator-min-microvolt = <2800000>;
+                                       regulator-max-microvolt = <3150000>;
+                                       regulator-always-on;
+                                       anatop-reg-offset = <0x120>;
+                                       anatop-vol-bit-shift = <8>;
+                                       anatop-vol-bit-width = <5>;
+                                       anatop-min-bit-val = <0>;
+                                       anatop-min-voltage = <2625000>;
+                                       anatop-max-voltage = <3400000>;
+                               };
+
+                               regulator-2p5 {
+                                       compatible = "fsl,anatop-regulator";
+                                       regulator-name = "vdd2p5";
+                                       regulator-min-microvolt = <2100000>;
+                                       regulator-max-microvolt = <2850000>;
+                                       regulator-always-on;
+                                       anatop-reg-offset = <0x130>;
+                                       anatop-vol-bit-shift = <8>;
+                                       anatop-vol-bit-width = <5>;
+                                       anatop-min-bit-val = <0>;
+                                       anatop-min-voltage = <2100000>;
+                                       anatop-max-voltage = <2850000>;
+                               };
+
+                               reg_arm: regulator-vddcore {
+                                       compatible = "fsl,anatop-regulator";
+                                       regulator-name = "vddarm";
+                                       regulator-min-microvolt = <725000>;
+                                       regulator-max-microvolt = <1450000>;
+                                       regulator-always-on;
+                                       anatop-reg-offset = <0x140>;
+                                       anatop-vol-bit-shift = <0>;
+                                       anatop-vol-bit-width = <5>;
+                                       anatop-delay-reg-offset = <0x170>;
+                                       anatop-delay-bit-shift = <24>;
+                                       anatop-delay-bit-width = <2>;
+                                       anatop-min-bit-val = <1>;
+                                       anatop-min-voltage = <725000>;
+                                       anatop-max-voltage = <1450000>;
+                               };
+
+                               reg_pu: regulator-vddpu {
+                                       compatible = "fsl,anatop-regulator";
+                                       regulator-name = "vddpu";
+                                       regulator-min-microvolt = <725000>;
+                                       regulator-max-microvolt = <1450000>;
+                                       regulator-always-on;
+                                       anatop-reg-offset = <0x140>;
+                                       anatop-vol-bit-shift = <9>;
+                                       anatop-vol-bit-width = <5>;
+                                       anatop-delay-reg-offset = <0x170>;
+                                       anatop-delay-bit-shift = <26>;
+                                       anatop-delay-bit-width = <2>;
+                                       anatop-min-bit-val = <1>;
+                                       anatop-min-voltage = <725000>;
+                                       anatop-max-voltage = <1450000>;
+                               };
+
+                               reg_soc: regulator-vddsoc {
+                                       compatible = "fsl,anatop-regulator";
+                                       regulator-name = "vddsoc";
+                                       regulator-min-microvolt = <725000>;
+                                       regulator-max-microvolt = <1450000>;
+                                       regulator-always-on;
+                                       anatop-reg-offset = <0x140>;
+                                       anatop-vol-bit-shift = <18>;
+                                       anatop-vol-bit-width = <5>;
+                                       anatop-delay-reg-offset = <0x170>;
+                                       anatop-delay-bit-shift = <28>;
+                                       anatop-delay-bit-width = <2>;
+                                       anatop-min-bit-val = <1>;
+                                       anatop-min-voltage = <725000>;
+                                       anatop-max-voltage = <1450000>;
+                               };
+                       };
+
+                       tempmon: tempmon {
+                               compatible = "fsl,imx6q-tempmon";
+                               interrupts = <0 49 IRQ_TYPE_LEVEL_HIGH>;
+                               fsl,tempmon = <&anatop>;
+                               fsl,tempmon-data = <&ocotp>;
+                               clocks = <&clks IMX6SL_CLK_PLL3_USB_OTG>;
+                       };
+
+                       usbphy1: usbphy@020c9000 {
+                               compatible = "fsl,imx6sl-usbphy", "fsl,imx23-usbphy";
+                               reg = <0x020c9000 0x1000>;
+                               interrupts = <0 44 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_USBPHY1>;
+                               fsl,anatop = <&anatop>;
+                       };
+
+                       usbphy2: usbphy@020ca000 {
+                               compatible = "fsl,imx6sl-usbphy", "fsl,imx23-usbphy";
+                               reg = <0x020ca000 0x1000>;
+                               interrupts = <0 45 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_USBPHY2>;
+                               fsl,anatop = <&anatop>;
+                       };
+
+                       snvs: snvs@020cc000 {
+                               compatible = "fsl,sec-v4.0-mon", "syscon", "simple-mfd";
+                               reg = <0x020cc000 0x4000>;
+
+                               snvs_rtc: snvs-rtc-lp {
+                                       compatible = "fsl,sec-v4.0-mon-rtc-lp";
+                                       regmap = <&snvs>;
+                                       offset = <0x34>;
+                                       interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>,
+                                                    <0 20 IRQ_TYPE_LEVEL_HIGH>;
+                               };
+
+                               snvs_poweroff: snvs-poweroff {
+                                       compatible = "syscon-poweroff";
+                                       regmap = <&snvs>;
+                                       offset = <0x38>;
+                                       mask = <0x60>;
+                                       status = "disabled";
+                               };
+                       };
+
+                       epit1: epit@020d0000 {
+                               reg = <0x020d0000 0x4000>;
+                               interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH>;
+                       };
+
+                       epit2: epit@020d4000 {
+                               reg = <0x020d4000 0x4000>;
+                               interrupts = <0 57 IRQ_TYPE_LEVEL_HIGH>;
+                       };
+
+                       src: src@020d8000 {
+                               compatible = "fsl,imx6sl-src", "fsl,imx51-src";
+                               reg = <0x020d8000 0x4000>;
+                               interrupts = <0 91 IRQ_TYPE_LEVEL_HIGH>,
+                                            <0 96 IRQ_TYPE_LEVEL_HIGH>;
+                               #reset-cells = <1>;
+                       };
+
+                       gpc: gpc@020dc000 {
+                               compatible = "fsl,imx6sl-gpc", "fsl,imx6q-gpc";
+                               reg = <0x020dc000 0x4000>;
+                               interrupt-controller;
+                               #interrupt-cells = <3>;
+                               interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupt-parent = <&intc>;
+                               pu-supply = <&reg_pu>;
+                               clocks = <&clks IMX6SL_CLK_GPU2D_OVG>,
+                                        <&clks IMX6SL_CLK_GPU2D_PODF>;
+                               #power-domain-cells = <1>;
+                       };
+
+                       gpr: iomuxc-gpr@020e0000 {
+                               compatible = "fsl,imx6sl-iomuxc-gpr",
+                                            "fsl,imx6q-iomuxc-gpr", "syscon";
+                               reg = <0x020e0000 0x38>;
+                       };
+
+                       iomuxc: iomuxc@020e0000 {
+                               compatible = "fsl,imx6sl-iomuxc";
+                               reg = <0x020e0000 0x4000>;
+                       };
+
+                       csi: csi@020e4000 {
+                               reg = <0x020e4000 0x4000>;
+                               interrupts = <0 7 IRQ_TYPE_LEVEL_HIGH>;
+                       };
+
+                       spdc: spdc@020e8000 {
+                               reg = <0x020e8000 0x4000>;
+                               interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>;
+                       };
+
+                       sdma: sdma@020ec000 {
+                               compatible = "fsl,imx6sl-sdma", "fsl,imx6q-sdma";
+                               reg = <0x020ec000 0x4000>;
+                               interrupts = <0 2 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_SDMA>,
+                                        <&clks IMX6SL_CLK_SDMA>;
+                               clock-names = "ipg", "ahb";
+                               #dma-cells = <3>;
+                               /* imx6sl reuses imx6q sdma firmware */
+                               fsl,sdma-ram-script-name = "imx/sdma/sdma-imx6q.bin";
+                       };
+
+                       pxp: pxp@020f0000 {
+                               reg = <0x020f0000 0x4000>;
+                               interrupts = <0 98 IRQ_TYPE_LEVEL_HIGH>;
+                       };
+
+                       epdc: epdc@020f4000 {
+                               reg = <0x020f4000 0x4000>;
+                               interrupts = <0 97 IRQ_TYPE_LEVEL_HIGH>;
+                       };
+
+                       lcdif: lcdif@020f8000 {
+                               compatible = "fsl,imx6sl-lcdif", "fsl,imx28-lcdif";
+                               reg = <0x020f8000 0x4000>;
+                               interrupts = <0 39 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_LCDIF_PIX>,
+                                        <&clks IMX6SL_CLK_LCDIF_AXI>,
+                                        <&clks IMX6SL_CLK_DUMMY>;
+                               clock-names = "pix", "axi", "disp_axi";
+                               status = "disabled";
+                       };
+
+                       dcp: dcp@020fc000 {
+                               compatible = "fsl,imx6sl-dcp", "fsl,imx28-dcp";
+                               reg = <0x020fc000 0x4000>;
+                               interrupts = <0 99 IRQ_TYPE_LEVEL_HIGH>,
+                                            <0 100 IRQ_TYPE_LEVEL_HIGH>,
+                                            <0 101 IRQ_TYPE_LEVEL_HIGH>;
+                       };
+               };
+
+               aips2: aips-bus@02100000 {
+                       compatible = "fsl,aips-bus", "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x02100000 0x100000>;
+                       ranges;
+
+                       usbotg1: usb@02184000 {
+                               compatible = "fsl,imx6sl-usb", "fsl,imx27-usb";
+                               reg = <0x02184000 0x200>;
+                               interrupts = <0 43 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_USBOH3>;
+                               fsl,usbphy = <&usbphy1>;
+                               fsl,usbmisc = <&usbmisc 0>;
+                               ahb-burst-config = <0x0>;
+                               tx-burst-size-dword = <0x10>;
+                               rx-burst-size-dword = <0x10>;
+                               status = "disabled";
+                       };
+
+                       usbotg2: usb@02184200 {
+                               compatible = "fsl,imx6sl-usb", "fsl,imx27-usb";
+                               reg = <0x02184200 0x200>;
+                               interrupts = <0 42 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_USBOH3>;
+                               fsl,usbphy = <&usbphy2>;
+                               fsl,usbmisc = <&usbmisc 1>;
+                               ahb-burst-config = <0x0>;
+                               tx-burst-size-dword = <0x10>;
+                               rx-burst-size-dword = <0x10>;
+                               status = "disabled";
+                       };
+
+                       usbh: usb@02184400 {
+                               compatible = "fsl,imx6sl-usb", "fsl,imx27-usb";
+                               reg = <0x02184400 0x200>;
+                               interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_USBOH3>;
+                               fsl,usbmisc = <&usbmisc 2>;
+                               dr_mode = "host";
+                               ahb-burst-config = <0x0>;
+                               tx-burst-size-dword = <0x10>;
+                               rx-burst-size-dword = <0x10>;
+                               status = "disabled";
+                       };
+
+                       usbmisc: usbmisc@02184800 {
+                               #index-cells = <1>;
+                               compatible = "fsl,imx6sl-usbmisc", "fsl,imx6q-usbmisc";
+                               reg = <0x02184800 0x200>;
+                               clocks = <&clks IMX6SL_CLK_USBOH3>;
+                       };
+
+                       fec: ethernet@02188000 {
+                               compatible = "fsl,imx6sl-fec", "fsl,imx25-fec";
+                               reg = <0x02188000 0x4000>;
+                               interrupts = <0 114 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_ENET>,
+                                        <&clks IMX6SL_CLK_ENET_REF>;
+                               clock-names = "ipg", "ahb";
+                               status = "disabled";
+                       };
+
+                       usdhc1: usdhc@02190000 {
+                               compatible = "fsl,imx6sl-usdhc", "fsl,imx6q-usdhc";
+                               reg = <0x02190000 0x4000>;
+                               interrupts = <0 22 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_USDHC1>,
+                                        <&clks IMX6SL_CLK_USDHC1>,
+                                        <&clks IMX6SL_CLK_USDHC1>;
+                               clock-names = "ipg", "ahb", "per";
+                               bus-width = <4>;
+                               status = "disabled";
+                       };
+
+                       usdhc2: usdhc@02194000 {
+                               compatible = "fsl,imx6sl-usdhc", "fsl,imx6q-usdhc";
+                               reg = <0x02194000 0x4000>;
+                               interrupts = <0 23 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_USDHC2>,
+                                        <&clks IMX6SL_CLK_USDHC2>,
+                                        <&clks IMX6SL_CLK_USDHC2>;
+                               clock-names = "ipg", "ahb", "per";
+                               bus-width = <4>;
+                               status = "disabled";
+                       };
+
+                       usdhc3: usdhc@02198000 {
+                               compatible = "fsl,imx6sl-usdhc", "fsl,imx6q-usdhc";
+                               reg = <0x02198000 0x4000>;
+                               interrupts = <0 24 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_USDHC3>,
+                                        <&clks IMX6SL_CLK_USDHC3>,
+                                        <&clks IMX6SL_CLK_USDHC3>;
+                               clock-names = "ipg", "ahb", "per";
+                               bus-width = <4>;
+                               status = "disabled";
+                       };
+
+                       usdhc4: usdhc@0219c000 {
+                               compatible = "fsl,imx6sl-usdhc", "fsl,imx6q-usdhc";
+                               reg = <0x0219c000 0x4000>;
+                               interrupts = <0 25 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_USDHC4>,
+                                        <&clks IMX6SL_CLK_USDHC4>,
+                                        <&clks IMX6SL_CLK_USDHC4>;
+                               clock-names = "ipg", "ahb", "per";
+                               bus-width = <4>;
+                               status = "disabled";
+                       };
+
+                       i2c1: i2c@021a0000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx6sl-i2c", "fsl,imx21-i2c";
+                               reg = <0x021a0000 0x4000>;
+                               interrupts = <0 36 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_I2C1>;
+                               status = "disabled";
+                       };
+
+                       i2c2: i2c@021a4000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx6sl-i2c", "fsl,imx21-i2c";
+                               reg = <0x021a4000 0x4000>;
+                               interrupts = <0 37 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_I2C2>;
+                               status = "disabled";
+                       };
+
+                       i2c3: i2c@021a8000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx6sl-i2c", "fsl,imx21-i2c";
+                               reg = <0x021a8000 0x4000>;
+                               interrupts = <0 38 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SL_CLK_I2C3>;
+                               status = "disabled";
+                       };
+
+                       mmdc: mmdc@021b0000 {
+                               compatible = "fsl,imx6sl-mmdc", "fsl,imx6q-mmdc";
+                               reg = <0x021b0000 0x4000>;
+                       };
+
+                       rngb: rngb@021b4000 {
+                               reg = <0x021b4000 0x4000>;
+                               interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
+                       };
+
+                       weim: weim@021b8000 {
+                               #address-cells = <2>;
+                               #size-cells = <1>;
+                               reg = <0x021b8000 0x4000>;
+                               interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>;
+                               fsl,weim-cs-gpr = <&gpr>;
+                               status = "disabled";
+                       };
+
+                       ocotp: ocotp@021bc000 {
+                               compatible = "fsl,imx6sl-ocotp", "syscon";
+                               reg = <0x021bc000 0x4000>;
+                               clocks = <&clks IMX6SL_CLK_OCOTP>;
+                       };
+
+                       audmux: audmux@021d8000 {
+                               compatible = "fsl,imx6sl-audmux", "fsl,imx31-audmux";
+                               reg = <0x021d8000 0x4000>;
+                               status = "disabled";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/meson-gx.dtsi b/arch/arm/dts/meson-gx.dtsi
new file mode 100644 (file)
index 0000000..c129100
--- /dev/null
@@ -0,0 +1,447 @@
+/*
+ * Copyright (c) 2016 Andreas Färber
+ *
+ * Copyright (c) 2016 BayLibre, SAS.
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * Copyright (c) 2016 Endless Computers, Inc.
+ * Author: Carlo Caione <carlo@endlessm.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+       interrupt-parent = <&gic>;
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       reserved-memory {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               /* 16 MiB reserved for Hardware ROM Firmware */
+               hwrom_reserved: hwrom@0 {
+                       reg = <0x0 0x0 0x0 0x1000000>;
+                       no-map;
+               };
+
+               /* 2 MiB reserved for ARM Trusted Firmware (BL31) */
+               secmon_reserved: secmon@10000000 {
+                       reg = <0x0 0x10000000 0x0 0x200000>;
+                       no-map;
+               };
+       };
+
+       cpus {
+               #address-cells = <0x2>;
+               #size-cells = <0x0>;
+
+               cpu0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0x0 0x0>;
+                       enable-method = "psci";
+                       next-level-cache = <&l2>;
+                       clocks = <&scpi_dvfs 0>;
+               };
+
+               cpu1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0x0 0x1>;
+                       enable-method = "psci";
+                       next-level-cache = <&l2>;
+                       clocks = <&scpi_dvfs 0>;
+               };
+
+               cpu2: cpu@2 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0x0 0x2>;
+                       enable-method = "psci";
+                       next-level-cache = <&l2>;
+                       clocks = <&scpi_dvfs 0>;
+               };
+
+               cpu3: cpu@3 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0x0 0x3>;
+                       enable-method = "psci";
+                       next-level-cache = <&l2>;
+                       clocks = <&scpi_dvfs 0>;
+               };
+
+               l2: l2-cache0 {
+                       compatible = "cache";
+               };
+       };
+
+       arm-pmu {
+               compatible = "arm,cortex-a53-pmu";
+               interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
+       };
+
+       psci {
+               compatible = "arm,psci-0.2";
+               method = "smc";
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupts = <GIC_PPI 13
+                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 14
+                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 11
+                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 10
+                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>;
+       };
+
+       xtal: xtal-clk {
+               compatible = "fixed-clock";
+               clock-frequency = <24000000>;
+               clock-output-names = "xtal";
+               #clock-cells = <0>;
+       };
+
+       firmware {
+               sm: secure-monitor {
+                       compatible = "amlogic,meson-gx-sm", "amlogic,meson-gxbb-sm";
+               };
+       };
+
+       efuse: efuse {
+               compatible = "amlogic,meson-gx-efuse", "amlogic,meson-gxbb-efuse";
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               sn: sn@14 {
+                       reg = <0x14 0x10>;
+               };
+
+               eth_mac: eth_mac@34 {
+                       reg = <0x34 0x10>;
+               };
+
+               bid: bid@46 {
+                       reg = <0x46 0x30>;
+               };
+       };
+
+       scpi {
+               compatible = "amlogic,meson-gxbb-scpi", "arm,scpi-pre-1.0";
+               mboxes = <&mailbox 1 &mailbox 2>;
+               shmem = <&cpu_scp_lpri &cpu_scp_hpri>;
+
+               scpi_clocks: clocks {
+                       compatible = "arm,scpi-clocks";
+
+                       scpi_dvfs: scpi_clocks@0 {
+                               compatible = "arm,scpi-dvfs-clocks";
+                               #clock-cells = <1>;
+                               clock-indices = <0>;
+                               clock-output-names = "vcpu";
+                       };
+               };
+
+               scpi_sensors: sensors {
+                       compatible = "arm,scpi-sensors";
+                       #thermal-sensor-cells = <1>;
+               };
+       };
+
+       soc {
+               compatible = "simple-bus";
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               cbus: cbus@c1100000 {
+                       compatible = "simple-bus";
+                       reg = <0x0 0xc1100000 0x0 0x100000>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x0 0x0 0x0 0xc1100000 0x0 0x100000>;
+
+                       reset: reset-controller@4404 {
+                               compatible = "amlogic,meson-gx-reset", "amlogic,meson-gxbb-reset";
+                               reg = <0x0 0x04404 0x0 0x20>;
+                               #reset-cells = <1>;
+                       };
+
+                       uart_A: serial@84c0 {
+                               compatible = "amlogic,meson-uart";
+                               reg = <0x0 0x84c0 0x0 0x14>;
+                               interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&xtal>;
+                               status = "disabled";
+                       };
+
+                       uart_B: serial@84dc {
+                               compatible = "amlogic,meson-uart";
+                               reg = <0x0 0x84dc 0x0 0x14>;
+                               interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&xtal>;
+                               status = "disabled";
+                       };
+
+                       i2c_A: i2c@8500 {
+                               compatible = "amlogic,meson-gxbb-i2c";
+                               reg = <0x0 0x08500 0x0 0x20>;
+                               interrupts = <GIC_SPI 21 IRQ_TYPE_EDGE_RISING>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       pwm_ab: pwm@8550 {
+                               compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
+                               reg = <0x0 0x08550 0x0 0x10>;
+                               #pwm-cells = <3>;
+                               status = "disabled";
+                       };
+
+                       pwm_cd: pwm@8650 {
+                               compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
+                               reg = <0x0 0x08650 0x0 0x10>;
+                               #pwm-cells = <3>;
+                               status = "disabled";
+                       };
+
+                       pwm_ef: pwm@86c0 {
+                               compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
+                               reg = <0x0 0x086c0 0x0 0x10>;
+                               #pwm-cells = <3>;
+                               status = "disabled";
+                       };
+
+                       uart_C: serial@8700 {
+                               compatible = "amlogic,meson-uart";
+                               reg = <0x0 0x8700 0x0 0x14>;
+                               interrupts = <GIC_SPI 93 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&xtal>;
+                               status = "disabled";
+                       };
+
+                       i2c_B: i2c@87c0 {
+                               compatible = "amlogic,meson-gxbb-i2c";
+                               reg = <0x0 0x087c0 0x0 0x20>;
+                               interrupts = <GIC_SPI 214 IRQ_TYPE_EDGE_RISING>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       i2c_C: i2c@87e0 {
+                               compatible = "amlogic,meson-gxbb-i2c";
+                               reg = <0x0 0x087e0 0x0 0x20>;
+                               interrupts = <GIC_SPI 215 IRQ_TYPE_EDGE_RISING>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       watchdog@98d0 {
+                               compatible = "amlogic,meson-gx-wdt", "amlogic,meson-gxbb-wdt";
+                               reg = <0x0 0x098d0 0x0 0x10>;
+                               clocks = <&xtal>;
+                       };
+               };
+
+               gic: interrupt-controller@c4301000 {
+                       compatible = "arm,gic-400";
+                       reg = <0x0 0xc4301000 0 0x1000>,
+                             <0x0 0xc4302000 0 0x2000>,
+                             <0x0 0xc4304000 0 0x2000>,
+                             <0x0 0xc4306000 0 0x2000>;
+                       interrupt-controller;
+                       interrupts = <GIC_PPI 9
+                               (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
+                       #interrupt-cells = <3>;
+                       #address-cells = <0>;
+               };
+
+               sram: sram@c8000000 {
+                       compatible = "amlogic,meson-gxbb-sram", "mmio-sram";
+                       reg = <0x0 0xc8000000 0x0 0x14000>;
+
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0x0 0xc8000000 0x14000>;
+
+                       cpu_scp_lpri: scp-shmem@0 {
+                               compatible = "amlogic,meson-gxbb-scp-shmem";
+                               reg = <0x13000 0x400>;
+                       };
+
+                       cpu_scp_hpri: scp-shmem@200 {
+                               compatible = "amlogic,meson-gxbb-scp-shmem";
+                               reg = <0x13400 0x400>;
+                       };
+               };
+
+               aobus: aobus@c8100000 {
+                       compatible = "simple-bus";
+                       reg = <0x0 0xc8100000 0x0 0x100000>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x0 0x0 0x0 0xc8100000 0x0 0x100000>;
+
+                       uart_AO: serial@4c0 {
+                               compatible = "amlogic,meson-uart";
+                               reg = <0x0 0x004c0 0x0 0x14>;
+                               interrupts = <GIC_SPI 193 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&xtal>;
+                               status = "disabled";
+                       };
+
+                       uart_AO_B: serial@4e0 {
+                               compatible = "amlogic,meson-uart";
+                               reg = <0x0 0x004e0 0x0 0x14>;
+                               interrupts = <GIC_SPI 197 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&xtal>;
+                               status = "disabled";
+                       };
+
+                       ir: ir@580 {
+                               compatible = "amlogic,meson-gxbb-ir";
+                               reg = <0x0 0x00580 0x0 0x40>;
+                               interrupts = <GIC_SPI 196 IRQ_TYPE_EDGE_RISING>;
+                               status = "disabled";
+                       };
+               };
+
+               periphs: periphs@c8834000 {
+                       compatible = "simple-bus";
+                       reg = <0x0 0xc8834000 0x0 0x2000>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x0 0x0 0x0 0xc8834000 0x0 0x2000>;
+
+                       rng {
+                               compatible = "amlogic,meson-rng";
+                               reg = <0x0 0x0 0x0 0x4>;
+                       };
+               };
+
+
+               hiubus: hiubus@c883c000 {
+                       compatible = "simple-bus";
+                       reg = <0x0 0xc883c000 0x0 0x2000>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x0 0x0 0x0 0xc883c000 0x0 0x2000>;
+
+                       mailbox: mailbox@404 {
+                               compatible = "amlogic,meson-gx-mhu", "amlogic,meson-gxbb-mhu";
+                               reg = <0 0x404 0 0x4c>;
+                               interrupts = <0 208 IRQ_TYPE_EDGE_RISING>,
+                                            <0 209 IRQ_TYPE_EDGE_RISING>,
+                                            <0 210 IRQ_TYPE_EDGE_RISING>;
+                               #mbox-cells = <1>;
+                       };
+               };
+
+               ethmac: ethernet@c9410000 {
+                       compatible = "amlogic,meson-gx-dwmac", "amlogic,meson-gxbb-dwmac", "snps,dwmac";
+                       reg = <0x0 0xc9410000 0x0 0x10000
+                              0x0 0xc8834540 0x0 0x4>;
+                       interrupts = <0 8 1>;
+                       interrupt-names = "macirq";
+                       phy-mode = "rgmii";
+                       status = "disabled";
+               };
+
+               apb: apb@d0000000 {
+                       compatible = "simple-bus";
+                       reg = <0x0 0xd0000000 0x0 0x200000>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x0 0x0 0x0 0xd0000000 0x0 0x200000>;
+
+                       sd_emmc_a: mmc@70000 {
+                               compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc";
+                               reg = <0x0 0x70000 0x0 0x2000>;
+                               interrupts = <GIC_SPI 216 IRQ_TYPE_EDGE_RISING>;
+                               status = "disabled";
+                       };
+
+                       sd_emmc_b: mmc@72000 {
+                               compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc";
+                               reg = <0x0 0x72000 0x0 0x2000>;
+                               interrupts = <GIC_SPI 217 IRQ_TYPE_EDGE_RISING>;
+                               status = "disabled";
+                       };
+
+                       sd_emmc_c: mmc@74000 {
+                               compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc";
+                               reg = <0x0 0x74000 0x0 0x2000>;
+                               interrupts = <GIC_SPI 218 IRQ_TYPE_EDGE_RISING>;
+                               status = "disabled";
+                       };
+               };
+
+               vpu: vpu@d0100000 {
+                       compatible = "amlogic,meson-gx-vpu";
+                       reg = <0x0 0xd0100000 0x0 0x100000>,
+                             <0x0 0xc883c000 0x0 0x1000>,
+                             <0x0 0xc8838000 0x0 0x1000>;
+                       reg-names = "vpu", "hhi", "dmc";
+                       interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       /* CVBS VDAC output port */
+                       cvbs_vdac_port: port@0 {
+                               reg = <0>;
+                       };
+               };
+       };
+};
index 79bee64c983b18817efa4b96e08a6960c58360b0..c737183a294721b49ed9064704a444efcf312a65 100644 (file)
                reg = <0x0 0x0 0x0 0x80000000>;
        };
 
+       usb_otg_pwr: regulator-usb-pwrs {
+               compatible = "regulator-fixed";
+
+               regulator-name = "USB_OTG_PWR";
+
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+
+               gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
        leds {
                compatible = "gpio-leds";
                blue {
                        default-state = "off";
                };
        };
+
+       tflash_vdd: regulator-tflash_vdd {
+               /*
+                * signal name from schematics: TFLASH_VDD_EN
+                */
+               compatible = "regulator-fixed";
+
+               regulator-name = "TFLASH_VDD";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+
+               gpio = <&gpio_ao GPIOAO_12 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       tf_io: gpio-regulator-tf_io {
+               compatible = "regulator-gpio";
+
+               regulator-name = "TF_IO";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <3300000>;
+
+               /*
+                * signal name from schematics: TF_3V3N_1V8_EN
+                */
+               gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
+               gpios-states = <0>;
+
+               states = <3300000 0
+                         1800000 1>;
+       };
+
+       vcc1v8: regulator-vcc1v8 {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC1V8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+       };
+
+       vcc3v3: regulator-vcc3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       emmc_pwrseq: emmc-pwrseq {
+               compatible = "mmc-pwrseq-emmc";
+               reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
+       };
+};
+
+&scpi_clocks {
+       status = "disabled";
 };
 
 &uart_AO {
 
 &ethmac {
        status = "okay";
-       pinctrl-0 = <&eth_pins>;
+       pinctrl-0 = <&eth_rgmii_pins>;
+       pinctrl-names = "default";
+       phy-handle = <&eth_phy0>;
+
+       mdio {
+               compatible = "snps,dwmac-mdio";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               eth_phy0: ethernet-phy@0 {
+                       reg = <0>;
+                       eee-broken-1000t;
+               };
+       };
+};
+
+&ir {
+       status = "okay";
+       pinctrl-0 = <&remote_input_ao_pins>;
        pinctrl-names = "default";
 };
+
+&i2c_A {
+       status = "okay";
+       pinctrl-0 = <&i2c_a_pins>;
+       pinctrl-names = "default";
+};
+
+&usb0_phy {
+       status = "okay";
+       phy-supply = <&usb_otg_pwr>;
+};
+
+&usb1_phy {
+       status = "okay";
+};
+
+&usb0 {
+       status = "okay";
+};
+
+&usb1 {
+       status = "okay";
+};
+
+/* SD */
+&sd_emmc_b {
+       status = "okay";
+       pinctrl-0 = <&sdcard_pins>;
+       pinctrl-names = "default";
+
+       bus-width = <4>;
+       cap-sd-highspeed;
+       max-frequency = <100000000>;
+       disable-wp;
+
+       cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+       cd-inverted;
+
+       vmmc-supply = <&tflash_vdd>;
+       vqmmc-supply = <&tf_io>;
+};
+
+/* eMMC */
+&sd_emmc_c {
+       status = "okay";
+       pinctrl-0 = <&emmc_pins>;
+       pinctrl-names = "default";
+
+       bus-width = <8>;
+       cap-sd-highspeed;
+       max-frequency = <200000000>;
+       non-removable;
+       disable-wp;
+       cap-mmc-highspeed;
+       mmc-ddr-1_8v;
+       mmc-hs200-1_8v;
+
+       mmc-pwrseq = <&emmc_pwrseq>;
+       vmmc-supply = <&vcc3v3>;
+       vqmmc-supply = <&vcc1v8>;
+};
index e502c24b0ac79cca089c7f22e19c83e3ea9bf2d4..39a774ad83ce13c246bbf8ea417e8c904fd10bdb 100644 (file)
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/interrupt-controller/irq.h>
-#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "meson-gx.dtsi"
 #include <dt-bindings/gpio/meson-gxbb-gpio.h>
 #include <dt-bindings/reset/amlogic,meson-gxbb-reset.h>
+#include <dt-bindings/clock/gxbb-clkc.h>
+#include <dt-bindings/clock/gxbb-aoclkc.h>
+#include <dt-bindings/reset/gxbb-aoclkc.h>
 
 / {
        compatible = "amlogic,meson-gxbb";
-       interrupt-parent = <&gic>;
-       #address-cells = <2>;
-       #size-cells = <2>;
 
-       cpus {
-               #address-cells = <0x2>;
-               #size-cells = <0x0>;
-
-               cpu0: cpu@0 {
-                       device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
-                       reg = <0x0 0x0>;
-                       enable-method = "psci";
+       soc {
+               usb0_phy: phy@c0000000 {
+                       compatible = "amlogic,meson-gxbb-usb2-phy";
+                       #phy-cells = <0>;
+                       reg = <0x0 0xc0000000 0x0 0x20>;
+                       resets = <&reset RESET_USB_OTG>;
+                       clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>;
+                       clock-names = "usb_general", "usb";
+                       status = "disabled";
                };
 
-               cpu1: cpu@1 {
-                       device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
-                       reg = <0x0 0x1>;
-                       enable-method = "psci";
+               usb1_phy: phy@c0000020 {
+                       compatible = "amlogic,meson-gxbb-usb2-phy";
+                       #phy-cells = <0>;
+                       reg = <0x0 0xc0000020 0x0 0x20>;
+                       resets = <&reset RESET_USB_OTG>;
+                       clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB1>;
+                       clock-names = "usb_general", "usb";
+                       status = "disabled";
                };
 
-               cpu2: cpu@2 {
-                       device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
-                       reg = <0x0 0x2>;
-                       enable-method = "psci";
+               usb0: usb@c9000000 {
+                       compatible = "amlogic,meson-gxbb-usb", "snps,dwc2";
+                       reg = <0x0 0xc9000000 0x0 0x40000>;
+                       interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&clkc CLKID_USB0_DDR_BRIDGE>;
+                       clock-names = "otg";
+                       phys = <&usb0_phy>;
+                       phy-names = "usb2-phy";
+                       dr_mode = "host";
+                       status = "disabled";
                };
 
-               cpu3: cpu@3 {
-                       device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
-                       reg = <0x0 0x3>;
-                       enable-method = "psci";
+               usb1: usb@c9100000 {
+                       compatible = "amlogic,meson-gxbb-usb", "snps,dwc2";
+                       reg = <0x0 0xc9100000 0x0 0x40000>;
+                       interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&clkc CLKID_USB1_DDR_BRIDGE>;
+                       clock-names = "otg";
+                       phys = <&usb1_phy>;
+                       phy-names = "usb2-phy";
+                       dr_mode = "host";
+                       status = "disabled";
                };
        };
+};
 
-       arm-pmu {
-               compatible = "arm,cortex-a53-pmu";
-               interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
-                            <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
-                            <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
-                            <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
-               interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
+&cbus {
+       spifc: spi@8c80 {
+               compatible = "amlogic,meson-gxbb-spifc";
+               reg = <0x0 0x08c80 0x0 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clocks = <&clkc CLKID_SPI>;
+               status = "disabled";
        };
+};
+
+&ethmac {
+       clocks = <&clkc CLKID_ETH>,
+                <&clkc CLKID_FCLK_DIV2>,
+                <&clkc CLKID_MPLL2>;
+       clock-names = "stmmaceth", "clkin0", "clkin1";
+};
+
+&aobus {
+       pinctrl_aobus: pinctrl@14 {
+               compatible = "amlogic,meson-gxbb-aobus-pinctrl";
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               gpio_ao: bank@14 {
+                       reg = <0x0 0x00014 0x0 0x8>,
+                             <0x0 0x0002c 0x0 0x4>,
+                             <0x0 0x00024 0x0 0x8>;
+                       reg-names = "mux", "pull", "gpio";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+               };
+
+               uart_ao_a_pins: uart_ao_a {
+                       mux {
+                               groups = "uart_tx_ao_a", "uart_rx_ao_a";
+                               function = "uart_ao";
+                       };
+               };
+
+               uart_ao_a_cts_rts_pins: uart_ao_a_cts_rts {
+                       mux {
+                               groups = "uart_cts_ao_a",
+                                      "uart_rts_ao_a";
+                               function = "uart_ao";
+                       };
+               };
+
+               uart_ao_b_pins: uart_ao_b {
+                       mux {
+                               groups = "uart_tx_ao_b", "uart_rx_ao_b";
+                               function = "uart_ao_b";
+                       };
+               };
+
+               uart_ao_b_cts_rts_pins: uart_ao_b_cts_rts {
+                       mux {
+                               groups = "uart_cts_ao_b",
+                                      "uart_rts_ao_b";
+                               function = "uart_ao_b";
+                       };
+               };
 
-       psci {
-               compatible = "arm,psci-0.2";
-               method = "smc";
+               remote_input_ao_pins: remote_input_ao {
+                       mux {
+                               groups = "remote_input_ao";
+                               function = "remote_input_ao";
+                       };
+               };
+
+               i2c_ao_pins: i2c_ao {
+                       mux {
+                               groups = "i2c_sck_ao",
+                                      "i2c_sda_ao";
+                               function = "i2c_ao";
+                       };
+               };
+
+               pwm_ao_a_3_pins: pwm_ao_a_3 {
+                       mux {
+                               groups = "pwm_ao_a_3";
+                               function = "pwm_ao_a_3";
+                       };
+               };
+
+               pwm_ao_a_6_pins: pwm_ao_a_6 {
+                       mux {
+                               groups = "pwm_ao_a_6";
+                               function = "pwm_ao_a_6";
+                       };
+               };
+
+               pwm_ao_a_12_pins: pwm_ao_a_12 {
+                       mux {
+                               groups = "pwm_ao_a_12";
+                               function = "pwm_ao_a_12";
+                       };
+               };
+
+               pwm_ao_b_pins: pwm_ao_b {
+                       mux {
+                               groups = "pwm_ao_b";
+                               function = "pwm_ao_b";
+                       };
+               };
        };
 
-       timer {
-               compatible = "arm,armv8-timer";
-               interrupts = <GIC_PPI 13
-                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_EDGE_RISING)>,
-                            <GIC_PPI 14
-                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_EDGE_RISING)>,
-                            <GIC_PPI 11
-                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_EDGE_RISING)>,
-                            <GIC_PPI 10
-                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_EDGE_RISING)>;
+       clkc_AO: clock-controller@040 {
+               compatible = "amlogic,gxbb-aoclkc";
+               reg = <0x0 0x00040 0x0 0x4>;
+               #clock-cells = <1>;
+               #reset-cells = <1>;
        };
 
-       xtal: xtal-clk {
-               compatible = "fixed-clock";
-               clock-frequency = <24000000>;
-               clock-output-names = "xtal";
-               #clock-cells = <0>;
+       pwm_ab_AO: pwm@550 {
+               compatible = "amlogic,meson-gxbb-pwm";
+               reg = <0x0 0x0550 0x0 0x10>;
+               #pwm-cells = <3>;
+               status = "disabled";
        };
 
-       soc {
-               compatible = "simple-bus";
+       i2c_AO: i2c@500 {
+               compatible = "amlogic,meson-gxbb-i2c";
+               reg = <0x0 0x500 0x0 0x20>;
+               interrupts = <GIC_SPI 195 IRQ_TYPE_EDGE_RISING>;
+               clocks = <&clkc CLKID_AO_I2C>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+};
+
+&periphs {
+       pinctrl_periphs: pinctrl@4b0 {
+               compatible = "amlogic,meson-gxbb-periphs-pinctrl";
                #address-cells = <2>;
                #size-cells = <2>;
                ranges;
 
-               cbus: cbus@c1100000 {
-                       compatible = "simple-bus";
-                       reg = <0x0 0xc1100000 0x0 0x100000>;
-                       #address-cells = <2>;
-                       #size-cells = <2>;
-                       ranges = <0x0 0x0 0x0 0xc1100000 0x0 0x100000>;
-
-                       reset: reset-controller@4404 {
-                               compatible = "amlogic,meson-gxbb-reset";
-                               reg = <0x0 0x04404 0x0 0x20>;
-                               #reset-cells = <1>;
-                       };
-
-                       uart_A: serial@84c0 {
-                               compatible = "amlogic,meson-uart";
-                               reg = <0x0 0x84c0 0x0 0x14>;
-                               interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
-                               clocks = <&xtal>;
-                               status = "disabled";
-                       };
-
-                       uart_B: serial@84dc {
-                               compatible = "amlogic,meson-uart";
-                               reg = <0x0 0x84dc 0x0 0x14>;
-                               interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>;
-                               clocks = <&xtal>;
-                               status = "disabled";
-                       };
-
-                       uart_C: serial@8700 {
-                               compatible = "amlogic,meson-uart";
-                               reg = <0x0 0x8700 0x0 0x14>;
-                               interrupts = <GIC_SPI 93 IRQ_TYPE_EDGE_RISING>;
-                               clocks = <&xtal>;
-                               status = "disabled";
-                       };
-               };
-
-               gic: interrupt-controller@c4301000 {
-                       compatible = "arm,gic-400";
-                       reg = <0x0 0xc4301000 0 0x1000>,
-                             <0x0 0xc4302000 0 0x2000>,
-                             <0x0 0xc4304000 0 0x2000>,
-                             <0x0 0xc4306000 0 0x2000>;
-                       interrupt-controller;
-                       interrupts = <GIC_PPI 9
-                               (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
-                       #interrupt-cells = <3>;
-                       #address-cells = <0>;
-               };
-
-               aobus: aobus@c8100000 {
-                       compatible = "simple-bus";
-                       reg = <0x0 0xc8100000 0x0 0x100000>;
-                       #address-cells = <2>;
-                       #size-cells = <2>;
-                       ranges = <0x0 0x0 0x0 0xc8100000 0x0 0x100000>;
-
-                       pinctrl_aobus: pinctrl@14 {
-                               compatible = "amlogic,meson-gxbb-aobus-pinctrl";
-                               #address-cells = <2>;
-                               #size-cells = <2>;
-                               ranges;
-
-                               gpio_ao: bank@14 {
-                                       reg = <0x0 0x00014 0x0 0x8>,
-                                             <0x0 0x0002c 0x0 0x4>,
-                                             <0x0 0x00024 0x0 0x8>;
-                                       reg-names = "mux", "pull", "gpio";
-                                       gpio-controller;
-                                       #gpio-cells = <2>;
-                               };
-
-                               uart_ao_a_pins: uart_ao_a {
-                                       mux {
-                                               groups = "uart_tx_ao_a", "uart_rx_ao_a";
-                                               function = "uart_ao";
-                                       };
-                               };
-                       };
-
-                       uart_AO: serial@4c0 {
-                               compatible = "amlogic,meson-uart";
-                               reg = <0x0 0x004c0 0x0 0x14>;
-                               interrupts = <GIC_SPI 193 IRQ_TYPE_EDGE_RISING>;
-                               clocks = <&xtal>;
-                               status = "disabled";
-                       };
-               };
-
-               periphs: periphs@c8834000 {
-                       compatible = "simple-bus";
-                       reg = <0x0 0xc8834000 0x0 0x2000>;
-                       #address-cells = <2>;
-                       #size-cells = <2>;
-                       ranges = <0x0 0x0 0x0 0xc8834000 0x0 0x2000>;
-
-                       rng {
-                               compatible = "amlogic,meson-rng";
-                               reg = <0x0 0x0 0x0 0x4>;
-                       };
-
-                       pinctrl_periphs: pinctrl@4b0 {
-                               compatible = "amlogic,meson-gxbb-periphs-pinctrl";
-                               #address-cells = <2>;
-                               #size-cells = <2>;
-                               ranges;
-
-                               gpio: bank@4b0 {
-                                       reg = <0x0 0x004b0 0x0 0x28>,
-                                             <0x0 0x004e8 0x0 0x14>,
-                                             <0x0 0x00120 0x0 0x14>,
-                                             <0x0 0x00430 0x0 0x40>;
-                                       reg-names = "mux", "pull", "pull-enable", "gpio";
-                                       gpio-controller;
-                                       #gpio-cells = <2>;
-                               };
-
-                               emmc_pins: emmc {
-                                       mux {
-                                               groups = "emmc_nand_d07",
-                                                      "emmc_cmd",
-                                                      "emmc_clk";
-                                               function = "emmc";
-                                       };
-                               };
-
-                               sdcard_pins: sdcard {
-                                       mux {
-                                               groups = "sdcard_d0",
-                                                      "sdcard_d1",
-                                                      "sdcard_d2",
-                                                      "sdcard_d3",
-                                                      "sdcard_cmd",
-                                                      "sdcard_clk";
-                                               function = "sdcard";
-                                       };
-                               };
-
-                               uart_a_pins: uart_a {
-                                       mux {
-                                               groups = "uart_tx_a",
-                                                      "uart_rx_a";
-                                               function = "uart_a";
-                                       };
-                               };
-
-                               uart_b_pins: uart_b {
-                                       mux {
-                                               groups = "uart_tx_b",
-                                                      "uart_rx_b";
-                                               function = "uart_b";
-                                       };
-                               };
-
-                               uart_c_pins: uart_c {
-                                       mux {
-                                               groups = "uart_tx_c",
-                                                      "uart_rx_c";
-                                               function = "uart_c";
-                                       };
-                               };
-
-                               eth_pins: eth_c {
-                                       mux {
-                                               groups = "eth_mdio",
-                                                      "eth_mdc",
-                                                      "eth_clk_rx_clk",
-                                                      "eth_rx_dv",
-                                                      "eth_rxd0",
-                                                      "eth_rxd1",
-                                                      "eth_rxd2",
-                                                      "eth_rxd3",
-                                                      "eth_rgmii_tx_clk",
-                                                      "eth_tx_en",
-                                                      "eth_txd0",
-                                                      "eth_txd1",
-                                                      "eth_txd2",
-                                                      "eth_txd3";
-                                               function = "eth";
-                                       };
-                               };
-                       };
-               };
-
-               hiubus: hiubus@c883c000 {
-                       compatible = "simple-bus";
-                       reg = <0x0 0xc883c000 0x0 0x2000>;
-                       #address-cells = <2>;
-                       #size-cells = <2>;
-                       ranges = <0x0 0x0 0x0 0xc883c000 0x0 0x2000>;
-
-                       clkc: clock-controller@0 {
-                               compatible = "amlogic,gxbb-clkc";
-                               #clock-cells = <1>;
-                               reg = <0x0 0x0 0x0 0x3db>;
-                       };
-               };
-
-               apb: apb@d0000000 {
-                       compatible = "simple-bus";
-                       reg = <0x0 0xd0000000 0x0 0x200000>;
-                       #address-cells = <2>;
-                       #size-cells = <2>;
-                       ranges = <0x0 0x0 0x0 0xd0000000 0x0 0x200000>;
-               };
-
-               ethmac: ethernet@c9410000 {
-                       compatible = "amlogic,meson6-dwmac", "snps,dwmac";
-                       reg = <0x0 0xc9410000 0x0 0x10000
-                              0x0 0xc8834540 0x0 0x4>;
-                       interrupts = <0 8 1>;
-                       interrupt-names = "macirq";
-                       clocks = <&xtal>;
-                       clock-names = "stmmaceth";
-                       phy-mode = "rgmii";
-                       status = "disabled";
+               gpio: bank@4b0 {
+                       reg = <0x0 0x004b0 0x0 0x28>,
+                             <0x0 0x004e8 0x0 0x14>,
+                             <0x0 0x00120 0x0 0x14>,
+                             <0x0 0x00430 0x0 0x40>;
+                       reg-names = "mux", "pull", "pull-enable", "gpio";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+               };
+
+               emmc_pins: emmc {
+                       mux {
+                               groups = "emmc_nand_d07",
+                                      "emmc_cmd",
+                                      "emmc_clk",
+                                      "emmc_ds";
+                               function = "emmc";
+                       };
+               };
+
+               nor_pins: nor {
+                       mux {
+                               groups = "nor_d",
+                                      "nor_q",
+                                      "nor_c",
+                                      "nor_cs";
+                               function = "nor";
+                       };
+               };
+
+               sdcard_pins: sdcard {
+                       mux {
+                               groups = "sdcard_d0",
+                                      "sdcard_d1",
+                                      "sdcard_d2",
+                                      "sdcard_d3",
+                                      "sdcard_cmd",
+                                      "sdcard_clk";
+                               function = "sdcard";
+                       };
+               };
+
+               sdio_pins: sdio {
+                       mux {
+                               groups = "sdio_d0",
+                                      "sdio_d1",
+                                      "sdio_d2",
+                                      "sdio_d3",
+                                      "sdio_cmd",
+                                      "sdio_clk";
+                               function = "sdio";
+                       };
+               };
+
+               sdio_irq_pins: sdio_irq {
+                       mux {
+                               groups = "sdio_irq";
+                               function = "sdio";
+                       };
+               };
+
+               uart_a_pins: uart_a {
+                       mux {
+                               groups = "uart_tx_a",
+                                      "uart_rx_a";
+                               function = "uart_a";
+                       };
+               };
+
+               uart_a_cts_rts_pins: uart_a_cts_rts {
+                       mux {
+                               groups = "uart_cts_a",
+                                      "uart_rts_a";
+                               function = "uart_a";
+                       };
+               };
+
+               uart_b_pins: uart_b {
+                       mux {
+                               groups = "uart_tx_b",
+                                      "uart_rx_b";
+                               function = "uart_b";
+                       };
+               };
+
+               uart_b_cts_rts_pins: uart_b_cts_rts {
+                       mux {
+                               groups = "uart_cts_b",
+                                      "uart_rts_b";
+                               function = "uart_b";
+                       };
+               };
+
+               uart_c_pins: uart_c {
+                       mux {
+                               groups = "uart_tx_c",
+                                      "uart_rx_c";
+                               function = "uart_c";
+                       };
+               };
+
+               uart_c_cts_rts_pins: uart_c_cts_rts {
+                       mux {
+                               groups = "uart_cts_c",
+                                      "uart_rts_c";
+                               function = "uart_c";
+                       };
+               };
+
+               i2c_a_pins: i2c_a {
+                       mux {
+                               groups = "i2c_sck_a",
+                                      "i2c_sda_a";
+                               function = "i2c_a";
+                       };
+               };
+
+               i2c_b_pins: i2c_b {
+                       mux {
+                               groups = "i2c_sck_b",
+                                      "i2c_sda_b";
+                               function = "i2c_b";
+                       };
+               };
+
+               i2c_c_pins: i2c_c {
+                       mux {
+                               groups = "i2c_sck_c",
+                                      "i2c_sda_c";
+                               function = "i2c_c";
+                       };
+               };
+
+               eth_rgmii_pins: eth-rgmii {
+                       mux {
+                               groups = "eth_mdio",
+                                      "eth_mdc",
+                                      "eth_clk_rx_clk",
+                                      "eth_rx_dv",
+                                      "eth_rxd0",
+                                      "eth_rxd1",
+                                      "eth_rxd2",
+                                      "eth_rxd3",
+                                      "eth_rgmii_tx_clk",
+                                      "eth_tx_en",
+                                      "eth_txd0",
+                                      "eth_txd1",
+                                      "eth_txd2",
+                                      "eth_txd3";
+                               function = "eth";
+                       };
+               };
+
+               eth_rmii_pins: eth-rmii {
+                       mux {
+                               groups = "eth_mdio",
+                                      "eth_mdc",
+                                      "eth_clk_rx_clk",
+                                      "eth_rx_dv",
+                                      "eth_rxd0",
+                                      "eth_rxd1",
+                                      "eth_tx_en",
+                                      "eth_txd0",
+                                      "eth_txd1";
+                               function = "eth";
+                       };
+               };
+
+               pwm_a_x_pins: pwm_a_x {
+                       mux {
+                               groups = "pwm_a_x";
+                               function = "pwm_a_x";
+                       };
+               };
+
+               pwm_a_y_pins: pwm_a_y {
+                       mux {
+                               groups = "pwm_a_y";
+                               function = "pwm_a_y";
+                       };
+               };
+
+               pwm_b_pins: pwm_b {
+                       mux {
+                               groups = "pwm_b";
+                               function = "pwm_b";
+                       };
+               };
+
+               pwm_d_pins: pwm_d {
+                       mux {
+                               groups = "pwm_d";
+                               function = "pwm_d";
+                       };
+               };
+
+               pwm_e_pins: pwm_e {
+                       mux {
+                               groups = "pwm_e";
+                               function = "pwm_e";
+                       };
+               };
+
+               pwm_f_x_pins: pwm_f_x {
+                       mux {
+                               groups = "pwm_f_x";
+                               function = "pwm_f_x";
+                       };
+               };
+
+               pwm_f_y_pins: pwm_f_y {
+                       mux {
+                               groups = "pwm_f_y";
+                               function = "pwm_f_y";
+                       };
+               };
+
+               hdmi_hpd_pins: hdmi_hpd {
+                       mux {
+                               groups = "hdmi_hpd";
+                               function = "hdmi_hpd";
+                       };
+               };
+
+               hdmi_i2c_pins: hdmi_i2c {
+                       mux {
+                               groups = "hdmi_sda", "hdmi_scl";
+                               function = "hdmi_i2c";
+                       };
                };
        };
 };
+
+&hiubus {
+       clkc: clock-controller@0 {
+               compatible = "amlogic,gxbb-clkc";
+               #clock-cells = <1>;
+               reg = <0x0 0x0 0x0 0x3db>;
+       };
+};
+
+&i2c_A {
+       clocks = <&clkc CLKID_I2C>;
+};
+
+&i2c_B {
+       clocks = <&clkc CLKID_I2C>;
+};
+
+&i2c_C {
+       clocks = <&clkc CLKID_I2C>;
+};
+
+&sd_emmc_a {
+       clocks = <&clkc CLKID_SD_EMMC_A>,
+                <&xtal>,
+                <&clkc CLKID_FCLK_DIV2>;
+       clock-names = "core", "clkin0", "clkin1";
+};
+
+&sd_emmc_b {
+       clocks = <&clkc CLKID_SD_EMMC_B>,
+                <&xtal>,
+                <&clkc CLKID_FCLK_DIV2>;
+       clock-names = "core", "clkin0", "clkin1";
+};
+
+&sd_emmc_c {
+       clocks = <&clkc CLKID_SD_EMMC_C>,
+                <&xtal>,
+                <&clkc CLKID_FCLK_DIV2>;
+       clock-names = "core", "clkin0", "clkin1";
+};
+
+&vpu {
+       compatible = "amlogic,meson-gxbb-vpu", "amlogic,meson-gx-vpu";
+};
diff --git a/arch/arm/dts/sama5d3.dtsi b/arch/arm/dts/sama5d3.dtsi
new file mode 100644 (file)
index 0000000..84ee089
--- /dev/null
@@ -0,0 +1,1539 @@
+/*
+ * sama5d3.dtsi - Device Tree Include file for SAMA5D3 family SoC
+ *                applies to SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36 SoC
+ *
+ *  Copyright (C) 2013 Atmel,
+ *                2013 Ludovic Desroches <ludovic.desroches@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+#include "skeleton.dtsi"
+#include <dt-bindings/dma/at91.h>
+#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 SAMA5D3 family SoC";
+       compatible = "atmel,sama5d3", "atmel,sama5";
+       interrupt-parent = <&aic>;
+
+       aliases {
+               serial0 = &dbgu;
+               serial1 = &usart0;
+               serial2 = &usart1;
+               serial3 = &usart2;
+               serial4 = &usart3;
+               serial5 = &uart0;
+               gpio0 = &pioA;
+               gpio1 = &pioB;
+               gpio2 = &pioC;
+               gpio3 = &pioD;
+               gpio4 = &pioE;
+               tcb0 = &tcb0;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               ssc0 = &ssc0;
+               ssc1 = &ssc1;
+               pwm0 = &pwm0;
+       };
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a5";
+                       reg = <0x0>;
+               };
+       };
+
+       pmu {
+               compatible = "arm,cortex-a5-pmu";
+               interrupts = <46 IRQ_TYPE_LEVEL_HIGH 0>;
+       };
+
+       memory {
+               reg = <0x20000000 0x8000000>;
+       };
+
+       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 = <1000000>;
+               };
+       };
+
+       sram: sram@00300000 {
+               compatible = "mmio-sram";
+               reg = <0x00300000 0x20000>;
+       };
+
+       ahb {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               u-boot,dm-pre-reloc;
+
+               apb {
+                       compatible = "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+                       u-boot,dm-pre-reloc;
+
+                       mmc0: mmc@f0000000 {
+                               compatible = "atmel,hsmci";
+                               reg = <0xf0000000 0x600>;
+                               interrupts = <21 IRQ_TYPE_LEVEL_HIGH 0>;
+                               dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(0)>;
+                               dma-names = "rxtx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_dat4_7>;
+                               status = "disabled";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&mci0_clk>;
+                               clock-names = "mci_clk";
+                       };
+
+                       spi0: spi@f0004000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xf0004000 0x100>;
+                               interrupts = <24 IRQ_TYPE_LEVEL_HIGH 3>;
+                               dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(1)>,
+                                      <&dma0 2 AT91_DMA_CFG_PER_ID(2)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi0>;
+                               clocks = <&spi0_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       ssc0: ssc@f0008000 {
+                               compatible = "atmel,at91sam9g45-ssc";
+                               reg = <0xf0008000 0x4000>;
+                               interrupts = <38 IRQ_TYPE_LEVEL_HIGH 4>;
+                               dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(13)>,
+                                      <&dma0 2 AT91_DMA_CFG_PER_ID(14)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
+                               clocks = <&ssc0_clk>;
+                               clock-names = "pclk";
+                               status = "disabled";
+                       };
+
+                       tcb0: timer@f0010000 {
+                               compatible = "atmel,at91sam9x5-tcb";
+                               reg = <0xf0010000 0x100>;
+                               interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tcb0_clk>, <&clk32k>;
+                               clock-names = "t0_clk", "slow_clk";
+                       };
+
+                       i2c0: i2c@f0014000 {
+                               compatible = "atmel,at91sam9x5-i2c";
+                               reg = <0xf0014000 0x4000>;
+                               interrupts = <18 IRQ_TYPE_LEVEL_HIGH 6>;
+                               dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(7)>,
+                                      <&dma0 2 AT91_DMA_CFG_PER_ID(8)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_i2c0>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&twi0_clk>;
+                               status = "disabled";
+                       };
+
+                       i2c1: i2c@f0018000 {
+                               compatible = "atmel,at91sam9x5-i2c";
+                               reg = <0xf0018000 0x4000>;
+                               interrupts = <19 IRQ_TYPE_LEVEL_HIGH 6>;
+                               dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(9)>,
+                                      <&dma0 2 AT91_DMA_CFG_PER_ID(10)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_i2c1>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&twi1_clk>;
+                               status = "disabled";
+                       };
+
+                       usart0: serial@f001c000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf001c000 0x100>;
+                               interrupts = <12 IRQ_TYPE_LEVEL_HIGH 5>;
+                               dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(3)>,
+                                      <&dma0 2 (AT91_DMA_CFG_PER_ID(4) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart0>;
+                               clocks = <&usart0_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart1: serial@f0020000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf0020000 0x100>;
+                               interrupts = <13 IRQ_TYPE_LEVEL_HIGH 5>;
+                               dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(5)>,
+                                      <&dma0 2 (AT91_DMA_CFG_PER_ID(6) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart1>;
+                               clocks = <&usart1_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       uart0: serial@f0024000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf0024000 0x100>;
+                               interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_uart0>;
+                               clocks = <&uart0_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       pwm0: pwm@f002c000 {
+                               compatible = "atmel,sama5d3-pwm";
+                               reg = <0xf002c000 0x300>;
+                               interrupts = <28 IRQ_TYPE_LEVEL_HIGH 4>;
+                               #pwm-cells = <3>;
+                               clocks = <&pwm_clk>;
+                               status = "disabled";
+                       };
+
+                       isi: isi@f0034000 {
+                               compatible = "atmel,at91sam9g45-isi";
+                               reg = <0xf0034000 0x4000>;
+                               interrupts = <37 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_isi_data_0_7>;
+                               clocks = <&isi_clk>;
+                               clock-names = "isi_clk";
+                               status = "disabled";
+                               port {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                               };
+                       };
+
+                       sfr: sfr@f0038000 {
+                               compatible = "atmel,sama5d3-sfr", "syscon";
+                               reg = <0xf0038000 0x60>;
+                       };
+
+                       mmc1: mmc@f8000000 {
+                               compatible = "atmel,hsmci";
+                               reg = <0xf8000000 0x600>;
+                               interrupts = <22 IRQ_TYPE_LEVEL_HIGH 0>;
+                               dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(0)>;
+                               dma-names = "rxtx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3>;
+                               status = "disabled";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&mci1_clk>;
+                               clock-names = "mci_clk";
+                       };
+
+                       spi1: spi@f8008000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xf8008000 0x100>;
+                               interrupts = <25 IRQ_TYPE_LEVEL_HIGH 3>;
+                               dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(15)>,
+                                      <&dma1 2 AT91_DMA_CFG_PER_ID(16)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi1>;
+                               clocks = <&spi1_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       ssc1: ssc@f800c000 {
+                               compatible = "atmel,at91sam9g45-ssc";
+                               reg = <0xf800c000 0x4000>;
+                               interrupts = <39 IRQ_TYPE_LEVEL_HIGH 4>;
+                               dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(3)>,
+                                      <&dma1 2 AT91_DMA_CFG_PER_ID(4)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
+                               clocks = <&ssc1_clk>;
+                               clock-names = "pclk";
+                               status = "disabled";
+                       };
+
+                       adc0: adc@f8018000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91sam9x5-adc";
+                               reg = <0xf8018000 0x100>;
+                               interrupts = <29 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <
+                                       &pinctrl_adc0_adtrg
+                                       &pinctrl_adc0_ad0
+                                       &pinctrl_adc0_ad1
+                                       &pinctrl_adc0_ad2
+                                       &pinctrl_adc0_ad3
+                                       &pinctrl_adc0_ad4
+                                       &pinctrl_adc0_ad5
+                                       &pinctrl_adc0_ad6
+                                       &pinctrl_adc0_ad7
+                                       &pinctrl_adc0_ad8
+                                       &pinctrl_adc0_ad9
+                                       &pinctrl_adc0_ad10
+                                       &pinctrl_adc0_ad11
+                                       >;
+                               clocks = <&adc_clk>,
+                                        <&adc_op_clk>;
+                               clock-names = "adc_clk", "adc_op_clk";
+                               atmel,adc-channels-used = <0xfff>;
+                               atmel,adc-startup-time = <40>;
+                               atmel,adc-use-external-triggers;
+                               atmel,adc-vref = <3000>;
+                               atmel,adc-res = <10 12>;
+                               atmel,adc-sample-hold-time = <11>;
+                               atmel,adc-res-names = "lowres", "highres";
+                               status = "disabled";
+
+                               trigger@0 {
+                                       reg = <0>;
+                                       trigger-name = "external-rising";
+                                       trigger-value = <0x1>;
+                                       trigger-external;
+                               };
+                               trigger@1 {
+                                       reg = <1>;
+                                       trigger-name = "external-falling";
+                                       trigger-value = <0x2>;
+                                       trigger-external;
+                               };
+                               trigger@2 {
+                                       reg = <2>;
+                                       trigger-name = "external-any";
+                                       trigger-value = <0x3>;
+                                       trigger-external;
+                               };
+                               trigger@3 {
+                                       reg = <3>;
+                                       trigger-name = "continuous";
+                                       trigger-value = <0x6>;
+                               };
+                       };
+
+                       i2c2: i2c@f801c000 {
+                               compatible = "atmel,at91sam9x5-i2c";
+                               reg = <0xf801c000 0x4000>;
+                               interrupts = <20 IRQ_TYPE_LEVEL_HIGH 6>;
+                               dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(11)>,
+                                      <&dma1 2 AT91_DMA_CFG_PER_ID(12)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_i2c2>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&twi2_clk>;
+                               status = "disabled";
+                       };
+
+                       usart2: serial@f8020000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8020000 0x100>;
+                               interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
+                               dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(7)>,
+                                      <&dma1 2 (AT91_DMA_CFG_PER_ID(8) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart2>;
+                               clocks = <&usart2_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart3: serial@f8024000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8024000 0x100>;
+                               interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>;
+                               dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(9)>,
+                                      <&dma1 2 (AT91_DMA_CFG_PER_ID(10) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart3>;
+                               clocks = <&usart3_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       sha@f8034000 {
+                               compatible = "atmel,at91sam9g46-sha";
+                               reg = <0xf8034000 0x100>;
+                               interrupts = <42 IRQ_TYPE_LEVEL_HIGH 0>;
+                               dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(17)>;
+                               dma-names = "tx";
+                               clocks = <&sha_clk>;
+                               clock-names = "sha_clk";
+                       };
+
+                       aes@f8038000 {
+                               compatible = "atmel,at91sam9g46-aes";
+                               reg = <0xf8038000 0x100>;
+                               interrupts = <43 IRQ_TYPE_LEVEL_HIGH 0>;
+                               dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(18)>,
+                                      <&dma1 2 AT91_DMA_CFG_PER_ID(19)>;
+                               dma-names = "tx", "rx";
+                               clocks = <&aes_clk>;
+                               clock-names = "aes_clk";
+                       };
+
+                       tdes@f803c000 {
+                               compatible = "atmel,at91sam9g46-tdes";
+                               reg = <0xf803c000 0x100>;
+                               interrupts = <44 IRQ_TYPE_LEVEL_HIGH 0>;
+                               dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(20)>,
+                                      <&dma1 2 AT91_DMA_CFG_PER_ID(21)>;
+                               dma-names = "tx", "rx";
+                               clocks = <&tdes_clk>;
+                               clock-names = "tdes_clk";
+                       };
+
+                       trng@f8040000 {
+                               compatible = "atmel,at91sam9g45-trng";
+                               reg = <0xf8040000 0x100>;
+                               interrupts = <45 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&trng_clk>;
+                       };
+
+                       dma0: dma-controller@ffffe600 {
+                               compatible = "atmel,at91sam9g45-dma";
+                               reg = <0xffffe600 0x200>;
+                               interrupts = <30 IRQ_TYPE_LEVEL_HIGH 0>;
+                               #dma-cells = <2>;
+                               clocks = <&dma0_clk>;
+                               clock-names = "dma_clk";
+                       };
+
+                       dma1: dma-controller@ffffe800 {
+                               compatible = "atmel,at91sam9g45-dma";
+                               reg = <0xffffe800 0x200>;
+                               interrupts = <31 IRQ_TYPE_LEVEL_HIGH 0>;
+                               #dma-cells = <2>;
+                               clocks = <&dma1_clk>;
+                               clock-names = "dma_clk";
+                       };
+
+                       ramc0: ramc@ffffea00 {
+                               compatible = "atmel,sama5d3-ddramc";
+                               reg = <0xffffea00 0x200>;
+                               clocks = <&ddrck>, <&mpddr_clk>;
+                               clock-names = "ddrck", "mpddr";
+                       };
+
+                       dbgu: serial@ffffee00 {
+                               compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
+                               reg = <0xffffee00 0x200>;
+                               interrupts = <2 IRQ_TYPE_LEVEL_HIGH 7>;
+                               dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(13)>,
+                                      <&dma1 2 (AT91_DMA_CFG_PER_ID(14) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_dbgu>;
+                               clocks = <&dbgu_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       aic: interrupt-controller@fffff000 {
+                               #interrupt-cells = <3>;
+                               compatible = "atmel,sama5d3-aic";
+                               interrupt-controller;
+                               reg = <0xfffff000 0x200>;
+                               atmel,external-irqs = <47>;
+                       };
+
+                       pinctrl@fffff200 {
+                               u-boot,dm-pre-reloc;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "atmel,sama5d3-pinctrl", "atmel,at91sam9x5-pinctrl", "simple-bus";
+                               ranges = <0xfffff200 0xfffff200 0xa00>;
+                               atmel,mux-mask = <
+                                       /*   A          B          C  */
+                                       0xffffffff 0xc0fc0000 0xc0ff0000        /* pioA */
+                                       0xffffffff 0x0ff8ffff 0x00000000        /* pioB */
+                                       0xffffffff 0xbc00f1ff 0x7c00fc00        /* pioC */
+                                       0xffffffff 0xc001c0e0 0x0001c1e0        /* pioD */
+                                       0xffffffff 0xbf9f8000 0x18000000        /* pioE */
+                                       >;
+                               reg = <0xfffff200 0x100         /* pioA */
+                                      0xfffff400 0x100         /* pioB */
+                                      0xfffff600 0x100         /* pioC */
+                                      0xfffff800 0x100         /* pioD */
+                                      0xfffffa00 0x100         /* pioE */
+                                      >;
+
+                               /* shared pinctrl settings */
+                               adc0 {
+                                       pinctrl_adc0_adtrg: adc0_adtrg {
+                                               atmel,pins =
+                                                       <AT91_PIOD 19 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD19 periph A ADTRG */
+                                       };
+                                       pinctrl_adc0_ad0: adc0_ad0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 20 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD20 periph A AD0 */
+                                       };
+                                       pinctrl_adc0_ad1: adc0_ad1 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 21 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD21 periph A AD1 */
+                                       };
+                                       pinctrl_adc0_ad2: adc0_ad2 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 22 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD22 periph A AD2 */
+                                       };
+                                       pinctrl_adc0_ad3: adc0_ad3 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD23 periph A AD3 */
+                                       };
+                                       pinctrl_adc0_ad4: adc0_ad4 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 24 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD24 periph A AD4 */
+                                       };
+                                       pinctrl_adc0_ad5: adc0_ad5 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 25 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD25 periph A AD5 */
+                                       };
+                                       pinctrl_adc0_ad6: adc0_ad6 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 26 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD26 periph A AD6 */
+                                       };
+                                       pinctrl_adc0_ad7: adc0_ad7 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 27 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD27 periph A AD7 */
+                                       };
+                                       pinctrl_adc0_ad8: adc0_ad8 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 28 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD28 periph A AD8 */
+                                       };
+                                       pinctrl_adc0_ad9: adc0_ad9 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 29 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD29 periph A AD9 */
+                                       };
+                                       pinctrl_adc0_ad10: adc0_ad10 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 30 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD30 periph A AD10, conflicts with PCK0 */
+                                       };
+                                       pinctrl_adc0_ad11: adc0_ad11 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 31 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD31 periph A AD11, conflicts with PCK1 */
+                                       };
+                               };
+
+                               dbgu {
+                                       u-boot,dm-pre-reloc;
+                                       pinctrl_dbgu: dbgu-0 {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOB 30 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB30 periph A */
+                                                        AT91_PIOB 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PB31 periph A with pullup */
+                                       };
+                               };
+
+                               i2c0 {
+                                       pinctrl_i2c0: i2c0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA30 periph A TWD0 pin, conflicts with URXD1, ISI_VSYNC */
+                                                        AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA31 periph A TWCK0 pin, conflicts with UTXD1, ISI_HSYNC */
+                                       };
+                               };
+
+                               i2c1 {
+                                       pinctrl_i2c1: i2c1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 26 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC26 periph B TWD1 pin, conflicts with SPI1_NPCS1, ISI_D11 */
+                                                        AT91_PIOC 27 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC27 periph B TWCK1 pin, conflicts with SPI1_NPCS2, ISI_D10 */
+                                       };
+                               };
+
+                               i2c2 {
+                                       pinctrl_i2c2: i2c2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 18 AT91_PERIPH_B AT91_PINCTRL_NONE   /* TWD2 pin, conflicts with LCDDAT18, ISI_D2 */
+                                                        AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* TWCK2 pin, conflicts with LCDDAT19, ISI_D3 */
+                                       };
+                               };
+
+                               isi {
+                                       pinctrl_isi_data_0_7: isi-0-data-0-7 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 16 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PA16 periph C ISI_D0, conflicts with LCDDAT16 */
+                                                        AT91_PIOA 17 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PA17 periph C ISI_D1, conflicts with LCDDAT17 */
+                                                        AT91_PIOA 18 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PA18 periph C ISI_D2, conflicts with LCDDAT18, TWD2 */
+                                                        AT91_PIOA 19 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PA19 periph C ISI_D3, conflicts with LCDDAT19, TWCK2 */
+                                                        AT91_PIOA 20 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PA20 periph C ISI_D4, conflicts with LCDDAT20, PWMH0 */
+                                                        AT91_PIOA 21 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PA21 periph C ISI_D5, conflicts with LCDDAT21, PWML0 */
+                                                        AT91_PIOA 22 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PA22 periph C ISI_D6, conflicts with LCDDAT22, PWMH1 */
+                                                        AT91_PIOA 23 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PA23 periph C ISI_D7, conflicts with LCDDAT23, PWML1 */
+                                                        AT91_PIOC 30 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC30 periph C ISI_PCK, conflicts with UTXD0 */
+                                                        AT91_PIOA 31 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PA31 periph C ISI_HSYNC, conflicts with TWCK0, UTXD1 */
+                                                        AT91_PIOA 30 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PA30 periph C ISI_VSYNC, conflicts with TWD0, URXD1 */
+                                       };
+
+                                       pinctrl_isi_data_8_9: isi-0-data-8-9 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 29 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC29 periph C ISI_PD8, conflicts with URXD0, PWMFI2 */
+                                                        AT91_PIOC 28 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PC28 periph C ISI_PD9, conflicts with SPI1_NPCS3, PWMFI0 */
+                                       };
+
+                                       pinctrl_isi_data_10_11: isi-0-data-10-11 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 27 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC27 periph C ISI_PD10, conflicts with SPI1_NPCS2, TWCK1 */
+                                                        AT91_PIOC 26 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PC26 periph C ISI_PD11, conflicts with SPI1_NPCS1, TWD1 */
+                                       };
+                               };
+
+                               mmc0 {
+                                       u-boot,dm-pre-reloc;
+                                       pinctrl_mmc0_clk_cmd_dat0: mmc0_clk_cmd_dat0 {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOD 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PD9 periph A MCI0_CK */
+                                                        AT91_PIOD 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD0 periph A MCI0_CDA with pullup */
+                                                        AT91_PIOD 1 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;       /* PD1 periph A MCI0_DA0 with pullup */
+                                       };
+                                       pinctrl_mmc0_dat1_3: mmc0_dat1_3 {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOD 2 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD2 periph A MCI0_DA1 with pullup */
+                                                        AT91_PIOD 3 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD3 periph A MCI0_DA2 with pullup */
+                                                        AT91_PIOD 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;       /* PD4 periph A MCI0_DA3 with pullup */
+                                       };
+                                       pinctrl_mmc0_dat4_7: mmc0_dat4_7 {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOD 5 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD5 periph A MCI0_DA4 with pullup, conflicts with TIOA0, PWMH2 */
+                                                        AT91_PIOD 6 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD6 periph A MCI0_DA5 with pullup, conflicts with TIOB0, PWML2 */
+                                                        AT91_PIOD 7 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD7 periph A MCI0_DA6 with pullup, conlicts with TCLK0, PWMH3 */
+                                                        AT91_PIOD 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;       /* PD8 periph A MCI0_DA7 with pullup, conflicts with PWML3 */
+                                       };
+                               };
+
+                               mmc1 {
+                                       u-boot,dm-pre-reloc;
+                                       pinctrl_mmc1_clk_cmd_dat0: mmc1_clk_cmd_dat0 {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB24 periph A MCI1_CK, conflicts with GRX5 */
+                                                        AT91_PIOB 19 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PB19 periph A MCI1_CDA with pullup, conflicts with GTX4 */
+                                                        AT91_PIOB 20 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PB20 periph A MCI1_DA0 with pullup, conflicts with GTX5 */
+                                       };
+                                       pinctrl_mmc1_dat1_3: mmc1_dat1_3 {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOB 21 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PB21 periph A MCI1_DA1 with pullup, conflicts with GTX6 */
+                                                        AT91_PIOB 22 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PB22 periph A MCI1_DA2 with pullup, conflicts with GTX7 */
+                                                        AT91_PIOB 23 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PB23 periph A MCI1_DA3 with pullup, conflicts with GRX4 */
+                                       };
+                               };
+
+                               nand0 {
+                                       pinctrl_nand0_ale_cle: nand0_ale_cle-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 21 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PE21 periph A with pullup */
+                                                        AT91_PIOE 22 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PE22 periph A with pullup */
+                                       };
+                               };
+
+                               pwm0 {
+                                       pinctrl_pwm0_pwmh0_0: pwm0_pwmh0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 20 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with ISI_D4 and LCDDAT20 */
+                                       };
+                                       pinctrl_pwm0_pwmh0_1: pwm0_pwmh0-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 0 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* conflicts with GTX0 */
+                                       };
+                                       pinctrl_pwm0_pwml0_0: pwm0_pwml0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 21 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with ISI_D5 and LCDDAT21 */
+                                       };
+                                       pinctrl_pwm0_pwml0_1: pwm0_pwml0-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* conflicts with GTX1 */
+                                       };
+
+                                       pinctrl_pwm0_pwmh1_0: pwm0_pwmh1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with ISI_D6 and LCDDAT22 */
+                                       };
+                                       pinctrl_pwm0_pwmh1_1: pwm0_pwmh1-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 4 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* conflicts with GRX0 */
+                                       };
+                                       pinctrl_pwm0_pwmh1_2: pwm0_pwmh1-2 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 27 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* conflicts with G125CKO and RTS1 */
+                                       };
+                                       pinctrl_pwm0_pwml1_0: pwm0_pwml1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 23 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with ISI_D7 and LCDDAT23 */
+                                       };
+                                       pinctrl_pwm0_pwml1_1: pwm0_pwml1-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 5 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* conflicts with GRX1 */
+                                       };
+                                       pinctrl_pwm0_pwml1_2: pwm0_pwml1-2 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 31 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with IRQ */
+                                       };
+
+                                       pinctrl_pwm0_pwmh2_0: pwm0_pwmh2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 8 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* conflicts with GTXCK */
+                                       };
+                                       pinctrl_pwm0_pwmh2_1: pwm0_pwmh2-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 5 AT91_PERIPH_C AT91_PINCTRL_NONE>;  /* conflicts with MCI0_DA4 and TIOA0 */
+                                       };
+                                       pinctrl_pwm0_pwml2_0: pwm0_pwml2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 9 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* conflicts with GTXEN */
+                                       };
+                                       pinctrl_pwm0_pwml2_1: pwm0_pwml2-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 6 AT91_PERIPH_C AT91_PINCTRL_NONE>;  /* conflicts with MCI0_DA5 and TIOB0 */
+                                       };
+
+                                       pinctrl_pwm0_pwmh3_0: pwm0_pwmh3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 12 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with GRXDV */
+                                       };
+                                       pinctrl_pwm0_pwmh3_1: pwm0_pwmh3-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 7 AT91_PERIPH_C AT91_PINCTRL_NONE>;  /* conflicts with MCI0_DA6 and TCLK0 */
+                                       };
+                                       pinctrl_pwm0_pwml3_0: pwm0_pwml3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 13 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with GRXER */
+                                       };
+                                       pinctrl_pwm0_pwml3_1: pwm0_pwml3-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 8 AT91_PERIPH_C AT91_PINCTRL_NONE>;  /* conflicts with MCI0_DA7 */
+                                       };
+                               };
+
+                               spi0 {
+                                       u-boot,dm-pre-reloc;
+                                       pinctrl_spi0: spi0-0 {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOD 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PD10 periph A SPI0_MISO pin */
+                                                        AT91_PIOD 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PD11 periph A SPI0_MOSI pin */
+                                                        AT91_PIOD 12 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD12 periph A SPI0_SPCK pin */
+                                       };
+                               };
+
+                               spi1 {
+                                       u-boot,dm-pre-reloc;
+                                       pinctrl_spi1: spi1-0 {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOC 22 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC22 periph A SPI1_MISO pin */
+                                                        AT91_PIOC 23 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC23 periph A SPI1_MOSI pin */
+                                                        AT91_PIOC 24 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC24 periph A SPI1_SPCK pin */
+                                       };
+                               };
+
+                               ssc0 {
+                                       pinctrl_ssc0_tx: ssc0_tx {
+                                               atmel,pins =
+                                                       <AT91_PIOC 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC16 periph A TK0 */
+                                                        AT91_PIOC 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC17 periph A TF0 */
+                                                        AT91_PIOC 18 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC18 periph A TD0 */
+                                       };
+
+                                       pinctrl_ssc0_rx: ssc0_rx {
+                                               atmel,pins =
+                                                       <AT91_PIOC 19 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC19 periph A RK0 */
+                                                        AT91_PIOC 20 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC20 periph A RF0 */
+                                                        AT91_PIOC 21 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC21 periph A RD0 */
+                                       };
+                               };
+
+                               ssc1 {
+                                       pinctrl_ssc1_tx: ssc1_tx {
+                                               atmel,pins =
+                                                       <AT91_PIOB 2 AT91_PERIPH_B AT91_PINCTRL_NONE    /* PB2 periph B TK1, conflicts with GTX2 */
+                                                        AT91_PIOB 3 AT91_PERIPH_B AT91_PINCTRL_NONE    /* PB3 periph B TF1, conflicts with GTX3 */
+                                                        AT91_PIOB 6 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PB6 periph B TD1, conflicts with TD1 */
+                                       };
+
+                                       pinctrl_ssc1_rx: ssc1_rx {
+                                               atmel,pins =
+                                                       <AT91_PIOB 7 AT91_PERIPH_B AT91_PINCTRL_NONE    /* PB7 periph B RK1, conflicts with EREFCK */
+                                                        AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB10 periph B RF1, conflicts with GTXER */
+                                                        AT91_PIOB 11 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB11 periph B RD1, conflicts with GRXCK */
+                                       };
+                               };
+
+                               uart0 {
+                                       pinctrl_uart0: uart0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 29 AT91_PERIPH_A AT91_PINCTRL_NONE   /* conflicts with PWMFI2, ISI_D8 */
+                                                        AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* conflicts with ISI_PCK */
+                                       };
+                               };
+
+                               uart1 {
+                                       pinctrl_uart1: uart1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 30 AT91_PERIPH_B AT91_PINCTRL_NONE   /* conflicts with TWD0, ISI_VSYNC */
+                                                        AT91_PIOA 31 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;      /* conflicts with TWCK0, ISI_HSYNC */
+                                       };
+                               };
+
+                               usart0 {
+                                       pinctrl_usart0: usart0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PD17 periph A */
+                                                        AT91_PIOD 18 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PD18 periph A with pullup */
+                                       };
+
+                                       pinctrl_usart0_rts_cts: usart0_rts_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PD15 periph A, conflicts with SPI0_NPCS2, CANTX0 */
+                                                        AT91_PIOD 16 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD16 periph A, conflicts with SPI0_NPCS3, PWMFI3 */
+                                       };
+                               };
+
+                               usart1 {
+                                       pinctrl_usart1: usart1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 28 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB28 periph A */
+                                                        AT91_PIOB 29 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PB29 periph A with pullup */
+                                       };
+
+                                       pinctrl_usart1_rts_cts: usart1_rts_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 26 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB26 periph A, conflicts with GRX7 */
+                                                        AT91_PIOB 27 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB27 periph A, conflicts with G125CKO */
+                                       };
+                               };
+
+                               usart2 {
+                                       pinctrl_usart2: usart2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 25 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PE25 periph B, conflicts with A25 */
+                                                        AT91_PIOE 26 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;      /* PE26 periph B with pullup, conflicts NCS0 */
+                                       };
+
+                                       pinctrl_usart2_rts_cts: usart2_rts_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 23 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PE23 periph B, conflicts with A23 */
+                                                        AT91_PIOE 24 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PE24 periph B, conflicts with A24 */
+                                       };
+                               };
+
+                               usart3 {
+                                       pinctrl_usart3: usart3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 18 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PE18 periph B, conflicts with A18 */
+                                                        AT91_PIOE 19 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;      /* PE19 periph B with pullup, conflicts with A19 */
+                                       };
+
+                                       pinctrl_usart3_rts_cts: usart3_rts_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 16 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PE16 periph B, conflicts with A16 */
+                                                        AT91_PIOE 17 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PE17 periph B, conflicts with A17 */
+                                       };
+                               };
+                       };
+
+                       pioA: gpio@fffff200 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffff200 0x100>;
+                               interrupts = <6 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioA_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pioB: gpio@fffff400 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffff400 0x100>;
+                               interrupts = <7 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioB_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pioC: gpio@fffff600 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffff600 0x100>;
+                               interrupts = <8 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioC_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pioD: gpio@fffff800 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffff800 0x100>;
+                               interrupts = <9 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioD_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pioE: gpio@fffffa00 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffffa00 0x100>;
+                               interrupts = <10 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioE_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               compatible = "atmel,sama5d3-pmc", "syscon";
+                               reg = <0xfffffc00 0x120>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               interrupt-controller;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               #interrupt-cells = <1>;
+                               u-boot,dm-pre-reloc;
+
+                               main_rc_osc: main_rc_osc {
+                                       compatible = "atmel,at91sam9x5-clk-main-rc-osc";
+                                       #clock-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       interrupts = <AT91_PMC_MOSCRCS>;
+                                       clock-frequency = <12000000>;
+                                       clock-accuracy = <50000000>;
+                               };
+
+                               main_osc: main_osc {
+                                       compatible = "atmel,at91rm9200-clk-main-osc";
+                                       #clock-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       interrupts = <AT91_PMC_MOSCS>;
+                                       clocks = <&main_xtal>;
+                               };
+
+                               main: mainck {
+                                       compatible = "atmel,at91sam9x5-clk-main";
+                                       #clock-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       interrupts = <AT91_PMC_MOSCSELS>;
+                                       clocks = <&main_rc_osc &main_osc>;
+                               };
+
+                               plla: pllack@0 {
+                                       compatible = "atmel,sama5d3-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       interrupts = <AT91_PMC_LOCKA>;
+                                       clocks = <&main>;
+                                       reg = <0>;
+                                       atmel,clk-input-range = <8000000 50000000>;
+                                       #atmel,pll-clk-output-range-cells = <4>;
+                                       atmel,pll-clk-output-ranges = <400000000 1000000000 0 0>;
+                               };
+
+                               plladiv: plladivck {
+                                       compatible = "atmel,at91sam9x5-clk-plldiv";
+                                       #clock-cells = <0>;
+                                       clocks = <&plla>;
+                               };
+
+                               utmi: utmick {
+                                       compatible = "atmel,at91sam9x5-clk-utmi";
+                                       #clock-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       interrupts = <AT91_PMC_LOCKU>;
+                                       clocks = <&main>;
+                               };
+
+                               mck: masterck {
+                                       compatible = "atmel,at91sam9x5-clk-master";
+                                       #clock-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       interrupts = <AT91_PMC_MCKRDY>;
+                                       clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>;
+                                       atmel,clk-output-range = <0 166000000>;
+                                       atmel,clk-divisors = <1 2 4 3>;
+                                       u-boot,dm-pre-reloc;
+                               };
+
+                               usb: usbck {
+                                       compatible = "atmel,at91sam9x5-clk-usb";
+                                       #clock-cells = <0>;
+                                       clocks = <&plladiv>, <&utmi>;
+                               };
+
+                               prog: progck {
+                                       compatible = "atmel,at91sam9x5-clk-programmable";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>, <&mck>;
+
+                                       prog0: progck@0 {
+                                               #clock-cells = <0>;
+                                               reg = <0>;
+                                               interrupts = <AT91_PMC_PCKRDY(0)>;
+                                       };
+
+                                       prog1: progck@1 {
+                                               #clock-cells = <0>;
+                                               reg = <1>;
+                                               interrupts = <AT91_PMC_PCKRDY(1)>;
+                                       };
+
+                                       prog2: progck@2 {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                               interrupts = <AT91_PMC_PCKRDY(2)>;
+                                       };
+                               };
+
+                               smd: smdclk {
+                                       compatible = "atmel,at91sam9x5-clk-smd";
+                                       #clock-cells = <0>;
+                                       clocks = <&plladiv>, <&utmi>;
+                               };
+
+                               systemck {
+                                       compatible = "atmel,at91rm9200-clk-system";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       ddrck: ddrck@2 {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                               clocks = <&mck>;
+                                       };
+
+                                       smdck: smdck@4 {
+                                               #clock-cells = <0>;
+                                               reg = <4>;
+                                               clocks = <&smd>;
+                                       };
+
+                                       uhpck: uhpck@6 {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       udpck: udpck@7 {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       pck0: pck@8 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                               clocks = <&prog0>;
+                                       };
+
+                                       pck1: pck@9 {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                               clocks = <&prog1>;
+                                       };
+
+                                       pck2: pck@10 {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                               clocks = <&prog2>;
+                                       };
+                               };
+
+                               periphck {
+                                       compatible = "atmel,at91sam9x5-clk-peripheral";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       clocks = <&mck>;
+                                       u-boot,dm-pre-reloc;
+
+                                       dbgu_clk: dbgu_clk@2 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                       };
+
+                                       hsmc_clk: hsmc_clk@5 {
+                                               #clock-cells = <0>;
+                                               reg = <5>;
+                                       };
+
+                                       pioA_clk: pioA_clk@6 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                       };
+
+                                       pioB_clk: pioB_clk@7 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                       };
+
+                                       pioC_clk: pioC_clk@8 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                       };
+
+                                       pioD_clk: pioD_clk@9 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                       };
+
+                                       pioE_clk: pioE_clk@10 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                       };
+
+                                       usart0_clk: usart0_clk@12 {
+                                               #clock-cells = <0>;
+                                               reg = <12>;
+                                               atmel,clk-output-range = <0 66000000>;
+                                       };
+
+                                       usart1_clk: usart1_clk@13 {
+                                               #clock-cells = <0>;
+                                               reg = <13>;
+                                               atmel,clk-output-range = <0 66000000>;
+                                       };
+
+                                       usart2_clk: usart2_clk@14 {
+                                               #clock-cells = <0>;
+                                               reg = <14>;
+                                               atmel,clk-output-range = <0 66000000>;
+                                       };
+
+                                       usart3_clk: usart3_clk@15 {
+                                               #clock-cells = <0>;
+                                               reg = <15>;
+                                               atmel,clk-output-range = <0 66000000>;
+                                       };
+
+                                       uart0_clk: uart0_clk@16 {
+                                               #clock-cells = <0>;
+                                               reg = <16>;
+                                               atmel,clk-output-range = <0 66000000>;
+                                       };
+
+                                       twi0_clk: twi0_clk@18 {
+                                               reg = <18>;
+                                               #clock-cells = <0>;
+                                               atmel,clk-output-range = <0 16625000>;
+                                       };
+
+                                       twi1_clk: twi1_clk@19 {
+                                               #clock-cells = <0>;
+                                               reg = <19>;
+                                               atmel,clk-output-range = <0 16625000>;
+                                       };
+
+                                       twi2_clk: twi2_clk@20 {
+                                               #clock-cells = <0>;
+                                               reg = <20>;
+                                               atmel,clk-output-range = <0 16625000>;
+                                       };
+
+                                       mci0_clk: mci0_clk@21 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <21>;
+                                       };
+
+                                       mci1_clk: mci1_clk@22 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <22>;
+                                       };
+
+                                       spi0_clk: spi0_clk@24 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <24>;
+                                               atmel,clk-output-range = <0 133000000>;
+                                       };
+
+                                       spi1_clk: spi1_clk@25 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <25>;
+                                               atmel,clk-output-range = <0 133000000>;
+                                       };
+
+                                       tcb0_clk: tcb0_clk@26 {
+                                               #clock-cells = <0>;
+                                               reg = <26>;
+                                               atmel,clk-output-range = <0 133000000>;
+                                       };
+
+                                       pwm_clk: pwm_clk@28 {
+                                               #clock-cells = <0>;
+                                               reg = <28>;
+                                       };
+
+                                       adc_clk: adc_clk@29 {
+                                               #clock-cells = <0>;
+                                               reg = <29>;
+                                               atmel,clk-output-range = <0 66000000>;
+                                       };
+
+                                       dma0_clk: dma0_clk@30 {
+                                               #clock-cells = <0>;
+                                               reg = <30>;
+                                       };
+
+                                       dma1_clk: dma1_clk@31 {
+                                               #clock-cells = <0>;
+                                               reg = <31>;
+                                       };
+
+                                       uhphs_clk: uhphs_clk@32 {
+                                               #clock-cells = <0>;
+                                               reg = <32>;
+                                       };
+
+                                       udphs_clk: udphs_clk@33 {
+                                               #clock-cells = <0>;
+                                               reg = <33>;
+                                       };
+
+                                       isi_clk: isi_clk@37 {
+                                               #clock-cells = <0>;
+                                               reg = <37>;
+                                       };
+
+                                       ssc0_clk: ssc0_clk@38 {
+                                               #clock-cells = <0>;
+                                               reg = <38>;
+                                               atmel,clk-output-range = <0 66000000>;
+                                       };
+
+                                       ssc1_clk: ssc1_clk@39 {
+                                               #clock-cells = <0>;
+                                               reg = <39>;
+                                               atmel,clk-output-range = <0 66000000>;
+                                       };
+
+                                       sha_clk: sha_clk@42 {
+                                               #clock-cells = <0>;
+                                               reg = <42>;
+                                       };
+
+                                       aes_clk: aes_clk@43 {
+                                               #clock-cells = <0>;
+                                               reg = <43>;
+                                       };
+
+                                       tdes_clk: tdes_clk@44 {
+                                               #clock-cells = <0>;
+                                               reg = <44>;
+                                       };
+
+                                       trng_clk: trng_clk@45 {
+                                               #clock-cells = <0>;
+                                               reg = <45>;
+                                       };
+
+                                       fuse_clk: fuse_clk@48 {
+                                               #clock-cells = <0>;
+                                               reg = <48>;
+                                       };
+
+                                       mpddr_clk: mpddr_clk@49 {
+                                               #clock-cells = <0>;
+                                               reg = <49>;
+                                       };
+                               };
+                       };
+
+                       rstc@fffffe00 {
+                               compatible = "atmel,sama5d3-rstc", "atmel,at91sam9g45-rstc";
+                               reg = <0xfffffe00 0x10>;
+                               clocks = <&clk32k>;
+                       };
+
+                       shutdown-controller@fffffe10 {
+                               compatible = "atmel,at91sam9x5-shdwc";
+                               reg = <0xfffffe10 0x10>;
+                               clocks = <&clk32k>;
+                       };
+
+                       pit: timer@fffffe30 {
+                               compatible = "atmel,at91sam9260-pit";
+                               reg = <0xfffffe30 0xf>;
+                               interrupts = <3 IRQ_TYPE_LEVEL_HIGH 5>;
+                               clocks = <&mck>;
+                       };
+
+                       watchdog@fffffe40 {
+                               compatible = "atmel,at91sam9260-wdt";
+                               reg = <0xfffffe40 0x10>;
+                               interrupts = <4 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&clk32k>;
+                               atmel,watchdog-type = "hardware";
+                               atmel,reset-type = "all";
+                               atmel,dbg-halt;
+                               status = "disabled";
+                       };
+
+                       sckc@fffffe50 {
+                               compatible = "atmel,at91sam9x5-sckc";
+                               reg = <0xfffffe50 0x4>;
+
+                               slow_rc_osc: slow_rc_osc {
+                                       compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
+                                       #clock-cells = <0>;
+                                       clock-frequency = <32768>;
+                                       clock-accuracy = <50000000>;
+                                       atmel,startup-time-usec = <75>;
+                               };
+
+                               slow_osc: slow_osc {
+                                       compatible = "atmel,at91sam9x5-clk-slow-osc";
+                                       #clock-cells = <0>;
+                                       clocks = <&slow_xtal>;
+                                       atmel,startup-time-usec = <1200000>;
+                               };
+
+                               clk32k: slowck {
+                                       compatible = "atmel,at91sam9x5-clk-slow";
+                                       #clock-cells = <0>;
+                                       clocks = <&slow_rc_osc &slow_osc>;
+                               };
+                       };
+
+                       rtc@fffffeb0 {
+                               compatible = "atmel,at91rm9200-rtc";
+                               reg = <0xfffffeb0 0x30>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&clk32k>;
+                       };
+               };
+
+               usb0: gadget@00500000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "atmel,sama5d3-udc";
+                       reg = <0x00500000 0x100000
+                              0xf8030000 0x4000>;
+                       interrupts = <33 IRQ_TYPE_LEVEL_HIGH 2>;
+                       clocks = <&udphs_clk>, <&utmi>;
+                       clock-names = "pclk", "hclk";
+                       status = "disabled";
+
+                       ep0: endpoint@0 {
+                               reg = <0>;
+                               atmel,fifo-size = <64>;
+                               atmel,nb-banks = <1>;
+                       };
+
+                       ep1: endpoint@1 {
+                               reg = <1>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <3>;
+                               atmel,can-dma;
+                               atmel,can-isoc;
+                       };
+
+                       ep2: endpoint@2 {
+                               reg = <2>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <3>;
+                               atmel,can-dma;
+                               atmel,can-isoc;
+                       };
+
+                       ep3: endpoint@3 {
+                               reg = <3>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-dma;
+                       };
+
+                       ep4: endpoint@4 {
+                               reg = <4>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-dma;
+                       };
+
+                       ep5: endpoint@5 {
+                               reg = <5>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-dma;
+                       };
+
+                       ep6: endpoint@6 {
+                               reg = <6>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-dma;
+                       };
+
+                       ep7i: endpoint@7 {
+                               reg = <7>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-dma;
+                       };
+
+                       ep8: endpoint@8 {
+                               reg = <8>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                       };
+
+                       ep9: endpoint@9 {
+                               reg = <9>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                       };
+
+                       ep10: endpoint@10 {
+                               reg = <10>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                       };
+
+                       ep11: endpoint@11 {
+                               reg = <11>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                       };
+
+                       ep12: endpoint@12 {
+                               reg = <12>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                       };
+
+                       ep13: endpoint@13 {
+                               reg = <13>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                       };
+
+                       ep14: endpoint@14 {
+                               reg = <14>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                       };
+
+                       ep15: endpoint@15 {
+                               reg = <15>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                       };
+               };
+
+               usb1: ohci@00600000 {
+                       compatible = "atmel,at91rm9200-ohci", "usb-ohci";
+                       reg = <0x00600000 0x100000>;
+                       interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>;
+                       clocks = <&uhphs_clk>, <&uhphs_clk>, <&uhpck>;
+                       clock-names = "ohci_clk", "hclk", "uhpck";
+                       status = "disabled";
+               };
+
+               usb2: ehci@00700000 {
+                       compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
+                       reg = <0x00700000 0x100000>;
+                       interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>;
+                       clocks = <&utmi>, <&uhphs_clk>;
+                       clock-names = "usb_clk", "ehci_clk";
+                       status = "disabled";
+               };
+
+               nand0: nand@60000000 {
+                       compatible = "atmel,at91rm9200-nand";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+                       reg = < 0x60000000 0x01000000   /* EBI CS3 */
+                               0xffffc070 0x00000490   /* SMC PMECC regs */
+                               0xffffc500 0x00000100   /* SMC PMECC Error Location regs */
+                               0x00110000 0x00018000   /* ROM code */
+                               >;
+                       interrupts = <5 IRQ_TYPE_LEVEL_HIGH 6>;
+                       atmel,nand-addr-offset = <21>;
+                       atmel,nand-cmd-offset = <22>;
+                       atmel,nand-has-dma;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_nand0_ale_cle>;
+                       atmel,pmecc-lookup-table-offset = <0x0 0x8000>;
+                       status = "disabled";
+
+                       nfc@70000000 {
+                               compatible = "atmel,sama5d3-nfc";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               reg = <
+                                       0x70000000 0x08000000   /* NFC Command Registers */
+                                       0xffffc000 0x00000070   /* NFC HSMC regs */
+                                       0x00200000 0x00100000   /* NFC SRAM banks */
+                                       >;
+                               clocks = <&hsmc_clk>;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/sama5d31.dtsi b/arch/arm/dts/sama5d31.dtsi
new file mode 100644 (file)
index 0000000..883878b
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * sama5d31.dtsi - Device Tree Include file for SAMA5D31 SoC
+ *
+ *  Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+#include "sama5d3.dtsi"
+#include "sama5d3_lcd.dtsi"
+#include "sama5d3_emac.dtsi"
+#include "sama5d3_mci2.dtsi"
+#include "sama5d3_uart.dtsi"
+
+/ {
+       compatible = "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5";
+};
diff --git a/arch/arm/dts/sama5d31ek.dts b/arch/arm/dts/sama5d31ek.dts
new file mode 100644 (file)
index 0000000..988f865
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * sama5d31ek.dts - Device Tree file for SAMA5D31-EK board
+ *
+ *  Copyright (C) 2013 Atmel,
+ *                2013 Ludovic Desroches <ludovic.desroches@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+#include "sama5d31.dtsi"
+#include "sama5d3xmb.dtsi"
+#include "sama5d3xdm.dtsi"
+
+/ {
+       model = "Atmel SAMA5D31-EK";
+       compatible = "atmel,sama5d31ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5";
+
+       aliases {
+               spi0 = &spi0;
+       };
+
+       ahb {
+               apb {
+                       spi0: spi@f0004000 {
+                               status = "okay";
+                       };
+
+                       ssc0: ssc@f0008000 {
+                               status = "okay";
+                       };
+
+                       i2c0: i2c@f0014000 {
+                               status = "okay";
+                       };
+
+                       i2c1: i2c@f0018000 {
+                               status = "okay";
+                       };
+
+                       macb1: ethernet@f802c000 {
+                               status = "okay";
+                       };
+               };
+       };
+
+       leds {
+               d3 {
+                       label = "d3";
+                       gpios = <&pioE 24 GPIO_ACTIVE_HIGH>;
+               };
+       };
+
+       sound {
+               status = "okay";
+       };
+};
diff --git a/arch/arm/dts/sama5d33.dtsi b/arch/arm/dts/sama5d33.dtsi
new file mode 100644 (file)
index 0000000..4b4434a
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+ * sama5d33.dtsi - Device Tree Include file for SAMA5D33 SoC
+ *
+ *  Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+#include "sama5d3.dtsi"
+#include "sama5d3_lcd.dtsi"
+#include "sama5d3_gmac.dtsi"
+
+/ {
+       compatible = "atmel,sama5d33", "atmel,sama5d3", "atmel,sama5";
+};
diff --git a/arch/arm/dts/sama5d33ek.dts b/arch/arm/dts/sama5d33ek.dts
new file mode 100644 (file)
index 0000000..a2aff7a
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * sama5d33ek.dts - Device Tree file for SAMA5D33-EK board
+ *
+ *  Copyright (C) 2013 Atmel,
+ *                2013 Ludovic Desroches <ludovic.desroches@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+#include "sama5d33.dtsi"
+#include "sama5d3xmb.dtsi"
+#include "sama5d3xdm.dtsi"
+
+/ {
+       model = "Atmel SAMA5D33-EK";
+       compatible = "atmel,sama5d33ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d33", "atmel,sama5d3", "atmel,sama5";
+
+       aliases {
+               spi0 = &spi0;
+       };
+
+       ahb {
+               apb {
+                       spi0: spi@f0004000 {
+                               status = "okay";
+                       };
+
+                       ssc0: ssc@f0008000 {
+                               status = "okay";
+                       };
+
+                       i2c0: i2c@f0014000 {
+                               status = "okay";
+                       };
+
+                       i2c1: i2c@f0018000 {
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@f0028000 {
+                               status = "okay";
+                       };
+               };
+       };
+
+       sound {
+               status = "okay";
+       };
+};
diff --git a/arch/arm/dts/sama5d34.dtsi b/arch/arm/dts/sama5d34.dtsi
new file mode 100644 (file)
index 0000000..aa01573
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * sama5d34.dtsi - Device Tree Include file for SAMA5D34 SoC
+ *
+ *  Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+#include "sama5d3.dtsi"
+#include "sama5d3_lcd.dtsi"
+#include "sama5d3_gmac.dtsi"
+#include "sama5d3_can.dtsi"
+#include "sama5d3_mci2.dtsi"
+
+/ {
+       compatible = "atmel,sama5d34", "atmel,sama5d3", "atmel,sama5";
+};
diff --git a/arch/arm/dts/sama5d34ek.dts b/arch/arm/dts/sama5d34ek.dts
new file mode 100644 (file)
index 0000000..556ba65
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * sama5d34ek.dts - Device Tree file for SAMA5D34-EK board
+ *
+ *  Copyright (C) 2013 Atmel,
+ *                2013 Ludovic Desroches <ludovic.desroches@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+#include "sama5d34.dtsi"
+#include "sama5d3xmb.dtsi"
+#include "sama5d3xdm.dtsi"
+
+/ {
+       model = "Atmel SAMA5D34-EK";
+       compatible = "atmel,sama5d34ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d34", "atmel,sama5d3", "atmel,sama5";
+
+       aliases {
+               spi0 = &spi0;
+       };
+
+       ahb {
+               apb {
+                       spi0: spi@f0004000 {
+                               status = "okay";
+                       };
+
+                       ssc0: ssc@f0008000 {
+                               status = "okay";
+                       };
+
+                       can0: can@f000c000 {
+                               status = "okay";
+                       };
+
+                       i2c0: i2c@f0014000 {
+                               status = "okay";
+                       };
+
+                       i2c1: i2c@f0018000 {
+                               status = "okay";
+
+                               24c256@50 {
+                                       compatible = "24c256";
+                                       reg = <0x50>;
+                                       pagesize = <64>;
+                               };
+                       };
+
+                       macb0: ethernet@f0028000 {
+                               status = "okay";
+                       };
+               };
+       };
+
+       leds {
+               d3 {
+                       label = "d3";
+                       gpios = <&pioE 24 GPIO_ACTIVE_HIGH>;
+               };
+       };
+
+       sound {
+               status = "okay";
+       };
+};
diff --git a/arch/arm/dts/sama5d35.dtsi b/arch/arm/dts/sama5d35.dtsi
new file mode 100644 (file)
index 0000000..16c39f4
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * sama5d35.dtsi - Device Tree Include file for SAMA5D35 SoC
+ *
+ *  Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+#include "sama5d3.dtsi"
+#include "sama5d3_gmac.dtsi"
+#include "sama5d3_emac.dtsi"
+#include "sama5d3_can.dtsi"
+#include "sama5d3_mci2.dtsi"
+#include "sama5d3_uart.dtsi"
+#include "sama5d3_tcb1.dtsi"
+
+/ {
+       compatible = "atmel,sama5d35", "atmel,sama5d3", "atmel,sama5";
+};
diff --git a/arch/arm/dts/sama5d35ek.dts b/arch/arm/dts/sama5d35ek.dts
new file mode 100644 (file)
index 0000000..4e37cfd
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * sama5d35ek.dts - Device Tree file for SAMA5D35-EK board
+ *
+ *  Copyright (C) 2013 Atmel,
+ *                2013 Ludovic Desroches <ludovic.desroches@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+#include "sama5d35.dtsi"
+#include "sama5d3xmb.dtsi"
+
+/ {
+       model = "Atmel SAMA5D35-EK";
+       compatible = "atmel,sama5d35ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d35", "atmel,sama5d3", "atmel,sama5";
+
+       aliases {
+               spi0 = &spi0;
+       };
+
+       ahb {
+               apb {
+                       spi0: spi@f0004000 {
+                               status = "okay";
+                       };
+
+                       can0: can@f000c000 {
+                               status = "okay";
+                       };
+
+                       i2c1: i2c@f0018000 {
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@f0028000 {
+                               status = "okay";
+                       };
+
+                       isi: isi@f0034000 {
+                               status = "okay";
+                       };
+
+                       macb1: ethernet@f802c000 {
+                               status = "okay";
+                       };
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+
+               pb_user1 {
+                       label = "pb_user1";
+                       gpios = <&pioE 27 GPIO_ACTIVE_HIGH>;
+                       linux,code = <0x100>;
+                       wakeup-source;
+               };
+       };
+};
diff --git a/arch/arm/dts/sama5d36.dtsi b/arch/arm/dts/sama5d36.dtsi
new file mode 100644 (file)
index 0000000..e85139e
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * sama5d36.dtsi - Device Tree Include file for SAMA5D36 SoC
+ *
+ *  Copyright (C) 2013 Atmel,
+ *                2013 Josh Wu <josh.wu@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+#include "sama5d3.dtsi"
+#include "sama5d3_can.dtsi"
+#include "sama5d3_gmac.dtsi"
+#include "sama5d3_emac.dtsi"
+#include "sama5d3_lcd.dtsi"
+#include "sama5d3_mci2.dtsi"
+#include "sama5d3_tcb1.dtsi"
+#include "sama5d3_uart.dtsi"
+
+/ {
+       compatible = "atmel,sama5d36", "atmel,sama5d3", "atmel,sama5";
+};
diff --git a/arch/arm/dts/sama5d36ek.dts b/arch/arm/dts/sama5d36ek.dts
new file mode 100644 (file)
index 0000000..1fa7989
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * sama5d36ek.dts - Device Tree file for SAMA5D36-EK board
+ *
+ *  Copyright (C) 2013 Atmel,
+ *                2013 Josh Wu <josh.wu@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+#include "sama5d36.dtsi"
+#include "sama5d3xmb.dtsi"
+#include "sama5d3xdm.dtsi"
+
+/ {
+       model = "Atmel SAMA5D36-EK";
+       compatible = "atmel,sama5d36ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d36", "atmel,sama5d3", "atmel,sama5";
+
+       aliases {
+               spi0 = &spi0;
+       };
+
+       ahb {
+               apb {
+                       spi0: spi@f0004000 {
+                               status = "okay";
+                       };
+
+                       ssc0: ssc@f0008000 {
+                               status = "okay";
+                       };
+
+                       can0: can@f000c000 {
+                               status = "okay";
+                       };
+
+                       i2c0: i2c@f0014000 {
+                               status = "okay";
+                       };
+
+                       i2c1: i2c@f0018000 {
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@f0028000 {
+                               status = "okay";
+                       };
+
+                       macb1: ethernet@f802c000 {
+                               status = "okay";
+                       };
+               };
+       };
+
+       sound {
+               status = "okay";
+       };
+};
diff --git a/arch/arm/dts/sama5d36ek_cmp.dts b/arch/arm/dts/sama5d36ek_cmp.dts
new file mode 100644 (file)
index 0000000..be41490
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * sama5d36ek_cmp.dts - Device Tree file for SAMA5D36-EK CMP board
+ *
+ *  Copyright (C) 2016 Atmel,
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+#include "sama5d36.dtsi"
+#include "sama5d3xmb_cmp.dtsi"
+
+/ {
+       model = "Atmel SAMA5D36-EK";
+       compatible = "atmel,sama5d36ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d36", "atmel,sama5d3", "atmel,sama5";
+
+       aliases {
+               spi0 = &spi0;
+       };
+
+       ahb {
+               apb {
+                       spi0: spi@f0004000 {
+                               status = "okay";
+                       };
+
+                       ssc0: ssc@f0008000 {
+                               status = "okay";
+                       };
+
+                       can0: can@f000c000 {
+                               status = "okay";
+                       };
+
+                       i2c0: i2c@f0014000 {
+                               status = "okay";
+                       };
+
+                       i2c1: i2c@f0018000 {
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@f0028000 {
+                               status = "okay";
+                       };
+
+                       macb1: ethernet@f802c000 {
+                               status = "okay";
+                       };
+               };
+       };
+
+       sound {
+               status = "okay";
+       };
+};
diff --git a/arch/arm/dts/sama5d3_can.dtsi b/arch/arm/dts/sama5d3_can.dtsi
new file mode 100644 (file)
index 0000000..177f088
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * sama5d3_can.dtsi - Device Tree Include file for SAMA5D3 SoC with
+ * CAN support
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff200 {
+                               can0 {
+                                       pinctrl_can0_rx_tx: can0_rx_tx {
+                                               atmel,pins =
+                                                       <AT91_PIOD 14 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PD14 periph C RX, conflicts with SCK0, SPI0_NPCS1 */
+                                                        AT91_PIOD 15 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PD15 periph C TX, conflicts with CTS0, SPI0_NPCS2 */
+                                       };
+                               };
+
+                               can1 {
+                                       pinctrl_can1_rx_tx: can1_rx_tx {
+                                               atmel,pins =
+                                                       <AT91_PIOB 14 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB14 periph B RX, conflicts with GCRS */
+                                                        AT91_PIOB 15 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB15 periph B TX, conflicts with GCOL */
+                                       };
+                               };
+
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               periphck {
+                                       can0_clk: can0_clk@40 {
+                                               #clock-cells = <0>;
+                                               reg = <40>;
+                                               atmel,clk-output-range = <0 66000000>;
+                                       };
+
+                                       can1_clk: can1_clk@41 {
+                                               #clock-cells = <0>;
+                                               reg = <41>;
+                                               atmel,clk-output-range = <0 66000000>;
+                                       };
+                               };
+                       };
+
+                       can0: can@f000c000 {
+                               compatible = "atmel,at91sam9x5-can";
+                               reg = <0xf000c000 0x300>;
+                               interrupts = <40 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_can0_rx_tx>;
+                               clocks = <&can0_clk>;
+                               clock-names = "can_clk";
+                               status = "disabled";
+                       };
+
+                       can1: can@f8010000 {
+                               compatible = "atmel,at91sam9x5-can";
+                               reg = <0xf8010000 0x300>;
+                               interrupts = <41 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_can1_rx_tx>;
+                               clocks = <&can1_clk>;
+                               clock-names = "can_clk";
+                               status = "disabled";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/sama5d3_emac.dtsi b/arch/arm/dts/sama5d3_emac.dtsi
new file mode 100644 (file)
index 0000000..b654e50
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * sama5d3_emac.dtsi - Device Tree Include file for SAMA5D3 SoC with
+ * Ethernet.
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff200 {
+                               macb1 {
+                                       pinctrl_macb1_rmii: macb1_rmii-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC0 periph A ETX0, conflicts with TIOA3 */
+                                                        AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC1 periph A ETX1, conflicts with TIOB3 */
+                                                        AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC2 periph A ERX0, conflicts with TCLK3 */
+                                                        AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC3 periph A ERX1, conflicts with TIOA4 */
+                                                        AT91_PIOC 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC4 periph A ETXEN, conflicts with TIOB4 */
+                                                        AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC5 periph A ECRSDV,conflicts with TCLK4 */
+                                                        AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC6 periph A ERXER, conflicts with TIOA5 */
+                                                        AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC7 periph A EREFCK, conflicts with TIOB5 */
+                                                        AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC8 periph A EMDC, conflicts with TCLK5 */
+                                                        AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PC9 periph A EMDIO  */
+                                       };
+                               };
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               periphck {
+                                       macb1_clk: macb1_clk@35 {
+                                               #clock-cells = <0>;
+                                               reg = <35>;
+                                       };
+                               };
+                       };
+
+                       macb1: ethernet@f802c000 {
+                               compatible = "cdns,at91sam9260-macb", "cdns,macb";
+                               reg = <0xf802c000 0x100>;
+                               interrupts = <35 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_macb1_rmii>;
+                               clocks = <&macb1_clk>, <&macb1_clk>;
+                               clock-names = "hclk", "pclk";
+                               status = "disabled";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/sama5d3_gmac.dtsi b/arch/arm/dts/sama5d3_gmac.dtsi
new file mode 100644 (file)
index 0000000..81f6367
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * sama5d3_gmac.dtsi - Device Tree Include file for SAMA5D3 SoC with
+ * Gigabit Ethernet.
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff200 {
+                               macb0 {
+                                       pinctrl_macb0_data_rgmii: macb0_data_rgmii {
+                                               atmel,pins =
+                                                       <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB0 periph A GTX0, conflicts with PWMH0 */
+                                                        AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB1 periph A GTX1, conflicts with PWML0 */
+                                                        AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB2 periph A GTX2, conflicts with TK1 */
+                                                        AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB3 periph A GTX3, conflicts with TF1 */
+                                                        AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB4 periph A GRX0, conflicts with PWMH1 */
+                                                        AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB5 periph A GRX1, conflicts with PWML1 */
+                                                        AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB6 periph A GRX2, conflicts with TD1 */
+                                                        AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PB7 periph A GRX3, conflicts with RK1 */
+                                       };
+                                       pinctrl_macb0_data_gmii: macb0_data_gmii {
+                                               atmel,pins =
+                                                       <AT91_PIOB 19 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB19 periph B GTX4, conflicts with MCI1_CDA */
+                                                        AT91_PIOB 20 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB20 periph B GTX5, conflicts with MCI1_DA0 */
+                                                        AT91_PIOB 21 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB21 periph B GTX6, conflicts with MCI1_DA1 */
+                                                        AT91_PIOB 22 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB22 periph B GTX7, conflicts with MCI1_DA2 */
+                                                        AT91_PIOB 23 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB23 periph B GRX4, conflicts with MCI1_DA3 */
+                                                        AT91_PIOB 24 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB24 periph B GRX5, conflicts with MCI1_CK */
+                                                        AT91_PIOB 25 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB25 periph B GRX6, conflicts with SCK1 */
+                                                        AT91_PIOB 26 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB26 periph B GRX7, conflicts with CTS1 */
+                                       };
+                                       pinctrl_macb0_signal_rgmii: macb0_signal_rgmii {
+                                               atmel,pins =
+                                                       <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB8 periph A GTXCK, conflicts with PWMH2 */
+                                                        AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB9 periph A GTXEN, conflicts with PWML2 */
+                                                        AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB11 periph A GRXCK, conflicts with RD1 */
+                                                        AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB13 periph A GRXER, conflicts with PWML3 */
+                                                        AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB16 periph A GMDC */
+                                                        AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB17 periph A GMDIO */
+                                                        AT91_PIOB 18 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB18 periph A G125CK */
+                                       };
+                                       pinctrl_macb0_signal_gmii: macb0_signal_gmii {
+                                               atmel,pins =
+                                                       <AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB9 periph A GTXEN, conflicts with PWML2 */
+                                                        AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB10 periph A GTXER, conflicts with RF1 */
+                                                        AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB11 periph A GRXCK, conflicts with RD1 */
+                                                        AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB12 periph A GRXDV, conflicts with PWMH3 */
+                                                        AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB13 periph A GRXER, conflicts with PWML3 */
+                                                        AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB14 periph A GCRS, conflicts with CANRX1 */
+                                                        AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB15 periph A GCOL, conflicts with CANTX1 */
+                                                        AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB16 periph A GMDC */
+                                                        AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB17 periph A GMDIO */
+                                                        AT91_PIOB 27 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB27 periph B G125CKO */
+                                       };
+
+                               };
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               periphck {
+                                       macb0_clk: macb0_clk@34 {
+                                               #clock-cells = <0>;
+                                               reg = <34>;
+                                       };
+                               };
+                       };
+
+                       macb0: ethernet@f0028000 {
+                               compatible = "atmel,sama5d3-gem";
+                               reg = <0xf0028000 0x100>;
+                               interrupts = <34 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_macb0_data_rgmii &pinctrl_macb0_signal_rgmii>;
+                               clocks = <&macb0_clk>, <&macb0_clk>;
+                               clock-names = "hclk", "pclk";
+                               status = "disabled";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/sama5d3_lcd.dtsi b/arch/arm/dts/sama5d3_lcd.dtsi
new file mode 100644 (file)
index 0000000..14d7c2b
--- /dev/null
@@ -0,0 +1,215 @@
+/*
+ * sama5d3_lcd.dtsi - Device Tree Include file for SAMA5D3 SoC with
+ * LCD support
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       hlcdc: hlcdc@f0030000 {
+                               compatible = "atmel,sama5d3-hlcdc";
+                               reg = <0xf0030000 0x2000>;
+                               interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>;
+                               clock-names = "periph_clk","sys_clk", "slow_clk";
+                               status = "disabled";
+
+                               hlcdc-display-controller {
+                                       compatible = "atmel,hlcdc-display-controller";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       port@0 {
+                                               #address-cells = <1>;
+                                               #size-cells = <0>;
+                                               reg = <0>;
+                                       };
+                               };
+
+                               hlcdc_pwm: hlcdc-pwm {
+                                       compatible = "atmel,hlcdc-pwm";
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_lcd_pwm>;
+                                       #pwm-cells = <3>;
+                               };
+                       };
+
+                       pinctrl@fffff200 {
+                               lcd {
+                                       pinctrl_lcd_base: lcd-base-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDVSYNC */
+                                                        AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDHSYNC */
+                                                        AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDDISP */
+                                                        AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDDEN */
+                                                        AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDPCK */
+                                       };
+
+                                       pinctrl_lcd_pwm: lcd-pwm-0 {
+                                               atmel,pins = <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE>;    /* LCDPWM */
+                                       };
+
+                                       pinctrl_lcd_rgb444: lcd-rgb-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD0 pin */
+                                                        AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD1 pin */
+                                                        AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD8 pin */
+                                                        AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD9 pin */
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD11 pin */
+                                       };
+
+                                       pinctrl_lcd_rgb565: lcd-rgb-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD0 pin */
+                                                        AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD1 pin */
+                                                        AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD8 pin */
+                                                        AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD9 pin */
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD11 pin */
+                                                        AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD12 pin */
+                                                        AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
+                                                        AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
+                                                        AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD15 pin */
+                                       };
+
+                                       pinctrl_lcd_rgb666: lcd-rgb-2 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD0 pin */
+                                                        AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD1 pin */
+                                                        AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD8 pin */
+                                                        AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD9 pin */
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD11 pin */
+                                                        AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD12 pin */
+                                                        AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
+                                                        AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
+                                                        AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD15 pin */
+                                                        AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD16 pin */
+                                                        AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD17 pin */
+                                       };
+
+                                       pinctrl_lcd_rgb666_alt: lcd-rgb-2-alt {
+                                               atmel,pins =
+                                                       <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD0 pin */
+                                                        AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD1 pin */
+                                                        AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD8 pin */
+                                                        AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD9 pin */
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD11 pin */
+                                                        AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD12 pin */
+                                                        AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
+                                                        AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
+                                                        AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD15 pin */
+                                                        AT91_PIOC 14 AT91_PERIPH_C AT91_PINCTRL_NONE   /* LCDD16 pin */
+                                                        AT91_PIOC 13 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* LCDD17 pin */
+                                       };
+
+                                       pinctrl_lcd_rgb888: lcd-rgb-3 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD0 pin */
+                                                        AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD1 pin */
+                                                        AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD8 pin */
+                                                        AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD9 pin */
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD11 pin */
+                                                        AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD12 pin */
+                                                        AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
+                                                        AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
+                                                        AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD15 pin */
+                                                        AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD16 pin */
+                                                        AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD17 pin */
+                                                        AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD18 pin */
+                                                        AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD19 pin */
+                                                        AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD20 pin */
+                                                        AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD21 pin */
+                                                        AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD22 pin */
+                                                        AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD23 pin */
+                                       };
+
+                                       pinctrl_lcd_rgb888_alt: lcd-rgb-3-alt {
+                                               atmel,pins =
+                                                       <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD0 pin */
+                                                        AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD1 pin */
+                                                        AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD8 pin */
+                                                        AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD9 pin */
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD11 pin */
+                                                        AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD12 pin */
+                                                        AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
+                                                        AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
+                                                        AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD15 pin */
+                                                        AT91_PIOC 14 AT91_PERIPH_C AT91_PINCTRL_NONE   /* LCDD16 pin */
+                                                        AT91_PIOC 13 AT91_PERIPH_C AT91_PINCTRL_NONE   /* LCDD17 pin */
+                                                        AT91_PIOC 12 AT91_PERIPH_C AT91_PINCTRL_NONE   /* LCDD18 pin */
+                                                        AT91_PIOC 11 AT91_PERIPH_C AT91_PINCTRL_NONE   /* LCDD19 pin */
+                                                        AT91_PIOC 10 AT91_PERIPH_C AT91_PINCTRL_NONE   /* LCDD20 pin */
+                                                        AT91_PIOC 15 AT91_PERIPH_C AT91_PINCTRL_NONE   /* LCDD21 pin */
+                                                        AT91_PIOE 27 AT91_PERIPH_C AT91_PINCTRL_NONE   /* LCDD22 pin */
+                                                        AT91_PIOE 28 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* LCDD23 pin */
+                                       };
+                               };
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               periphck {
+                                       lcdc_clk: lcdc_clk@36 {
+                                               #clock-cells = <0>;
+                                               reg = <36>;
+                                       };
+                               };
+
+                               systemck {
+                                       lcdck: lcdck@3 {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                               clocks = <&mck>;
+                                       };
+                               };
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/sama5d3_mci2.dtsi b/arch/arm/dts/sama5d3_mci2.dtsi
new file mode 100644 (file)
index 0000000..2d289ed
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * sama5d3_mci2.dtsi - Device Tree Include file for SAMA5D3 SoC with
+ * 3 MMC ports
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/clock/at91.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff200 {
+                               mmc2 {
+                                       pinctrl_mmc2_clk_cmd_dat0: mmc2_clk_cmd_dat0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC15 periph A MCI2_CK, conflicts with PCK2 */
+                                                        AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PC10 periph A MCI2_CDA with pullup */
+                                                        AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PC11 periph A MCI2_DA0 with pullup */
+                                       };
+                                       pinctrl_mmc2_dat1_3: mmc2_dat1_3 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PC12 periph A MCI2_DA1 with pullup, conflicts with TIOA1 */
+                                                        AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PC13 periph A MCI2_DA2 with pullup, conflicts with TIOB1 */
+                                                        AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PC14 periph A MCI2_DA3 with pullup, conflicts with TCLK1 */
+                                       };
+                               };
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               periphck {
+                                       mci2_clk: mci2_clk@23 {
+                                               #clock-cells = <0>;
+                                               reg = <23>;
+                                       };
+                               };
+                       };
+
+                       mmc2: mmc@f8004000 {
+                               compatible = "atmel,hsmci";
+                               reg = <0xf8004000 0x600>;
+                               interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>;
+                               dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(1)>;
+                               dma-names = "rxtx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc2_clk_cmd_dat0 &pinctrl_mmc2_dat1_3>;
+                               clocks = <&mci2_clk>;
+                               clock-names = "mci_clk";
+                               status = "disabled";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/sama5d3_tcb1.dtsi b/arch/arm/dts/sama5d3_tcb1.dtsi
new file mode 100644 (file)
index 0000000..5be60b4
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * sama5d3_tcb1.dtsi - Device Tree Include file for SAMA5D3 SoC with
+ * 2 TC blocks.
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/clock/at91.h>
+
+/ {
+       aliases {
+               tcb1 = &tcb1;
+       };
+
+       ahb {
+               apb {
+                       pmc: pmc@fffffc00 {
+                               periphck {
+                                       tcb1_clk: tcb1_clk@27 {
+                                               #clock-cells = <0>;
+                                               reg = <27>;
+                                       };
+                               };
+                       };
+
+                       tcb1: timer@f8014000 {
+                               compatible = "atmel,at91sam9x5-tcb";
+                               reg = <0xf8014000 0x100>;
+                               interrupts = <27 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tcb1_clk>, <&clk32k>;
+                               clock-names = "t0_clk", "slow_clk";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/sama5d3_uart.dtsi b/arch/arm/dts/sama5d3_uart.dtsi
new file mode 100644 (file)
index 0000000..6a547fd
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * sama5d3_uart.dtsi - Device Tree Include file for SAMA5D3 SoC with
+ * UART support
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/clock/at91.h>
+
+/ {
+       aliases {
+               serial5 = &uart0;
+               serial6 = &uart1;
+       };
+
+       ahb {
+               apb {
+                       pinctrl@fffff200 {
+                               uart0 {
+                                       pinctrl_uart0: uart0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 29 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC29 periph A, conflicts with PWMFI2, ISI_D8 */
+                                                        AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PC30 periph A with pullup, conflicts with ISI_PCK */
+                                       };
+                               };
+
+                               uart1 {
+                                       pinctrl_uart1: uart1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 30 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA30 periph B, conflicts with TWD0, ISI_VSYNC */
+                                                        AT91_PIOA 31 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;      /* PA31 periph B with pullup, conflicts with TWCK0, ISI_HSYNC */
+                                       };
+                               };
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               periphck {
+                                       uart0_clk: uart0_clk@16 {
+                                               #clock-cells = <0>;
+                                               reg = <16>;
+                                               atmel,clk-output-range = <0 66000000>;
+                                       };
+
+                                       uart1_clk: uart1_clk@17 {
+                                               #clock-cells = <0>;
+                                               reg = <17>;
+                                               atmel,clk-output-range = <0 66000000>;
+                                       };
+                               };
+                       };
+
+                       uart0: serial@f0024000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf0024000 0x200>;
+                               interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_uart0>;
+                               clocks = <&uart0_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       uart1: serial@f8028000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8028000 0x200>;
+                               interrupts = <17 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_uart1>;
+                               clocks = <&uart1_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/sama5d3xcm.dtsi b/arch/arm/dts/sama5d3xcm.dtsi
new file mode 100644 (file)
index 0000000..2cf9c36
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ * sama5d3xcm.dtsi - Device Tree Include file for SAMA5D3x CPU Module
+ *
+ *  Copyright (C) 2013 Atmel,
+ *                2013 Ludovic Desroches <ludovic.desroches@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/ {
+       compatible = "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5";
+
+       chosen {
+               bootargs = "rootfstype=ubifs ubi.mtd=5 root=ubi0:rootfs";
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory {
+               reg = <0x20000000 0x20000000>;
+       };
+
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       spi0: spi@f0004000 {
+                               cs-gpios = <&pioD 13 0>, <0>, <0>, <0>;
+                       };
+
+                       macb0: ethernet@f0028000 {
+                               phy-mode = "rgmii";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               ethernet-phy@1 {
+                                       reg = <0x1>;
+                                       interrupt-parent = <&pioB>;
+                                       interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
+                                       txen-skew-ps = <800>;
+                                       txc-skew-ps = <3000>;
+                                       rxdv-skew-ps = <400>;
+                                       rxc-skew-ps = <3000>;
+                                       rxd0-skew-ps = <400>;
+                                       rxd1-skew-ps = <400>;
+                                       rxd2-skew-ps = <400>;
+                                       rxd3-skew-ps = <400>;
+                               };
+
+                               ethernet-phy@7 {
+                                       reg = <0x7>;
+                                       interrupt-parent = <&pioB>;
+                                       interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
+                                       txen-skew-ps = <800>;
+                                       txc-skew-ps = <3000>;
+                                       rxdv-skew-ps = <400>;
+                                       rxc-skew-ps = <3000>;
+                                       rxd0-skew-ps = <400>;
+                                       rxd1-skew-ps = <400>;
+                                       rxd2-skew-ps = <400>;
+                                       rxd3-skew-ps = <400>;
+                               };
+                       };
+               };
+
+               nand0: nand@60000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "hw";
+                       atmel,has-pmecc;
+                       atmel,pmecc-cap = <4>;
+                       atmel,pmecc-sector-size = <512>;
+                       nand-on-flash-bbt;
+                       status = "okay";
+
+                       at91bootstrap@0 {
+                               label = "at91bootstrap";
+                               reg = <0x0 0x40000>;
+                       };
+
+                       bootloader@40000 {
+                               label = "bootloader";
+                               reg = <0x40000 0x80000>;
+                       };
+
+                       bootloaderenv@c0000 {
+                               label = "bootloader env";
+                               reg = <0xc0000 0xc0000>;
+                       };
+
+                       dtb@180000 {
+                               label = "device tree";
+                               reg = <0x180000 0x80000>;
+                       };
+
+                       kernel@200000 {
+                               label = "kernel";
+                               reg = <0x200000 0x600000>;
+                       };
+
+                       rootfs@800000 {
+                               label = "rootfs";
+                               reg = <0x800000 0x0f800000>;
+                       };
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               d2 {
+                       label = "d2";
+                       gpios = <&pioE 25 GPIO_ACTIVE_LOW>;     /* PE25, conflicts with A25, RXD2 */
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+};
diff --git a/arch/arm/dts/sama5d3xcm_cmp.dtsi b/arch/arm/dts/sama5d3xcm_cmp.dtsi
new file mode 100644 (file)
index 0000000..77638c3
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+ * sama5d3xcm_cmp.dtsi - Device Tree Include file for SAMA5D36 CMP CPU Module
+ *
+ *  Copyright (C) 2016 Atmel,
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/ {
+       compatible = "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5";
+
+       chosen {
+               bootargs = "rootfstype=ubifs ubi.mtd=5 root=ubi0:rootfs";
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory {
+               reg = <0x20000000 0x20000000>;
+       };
+
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       spi0: spi@f0004000 {
+                               cs-gpios = <&pioD 13 0>, <0>, <0>, <0>;
+                       };
+
+                       macb0: ethernet@f0028000 {
+                               phy-mode = "rgmii";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               ethernet-phy@1 {
+                                       reg = <0x1>;
+                                       interrupt-parent = <&pioB>;
+                                       interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
+                                       txen-skew-ps = <800>;
+                                       txc-skew-ps = <3000>;
+                                       rxdv-skew-ps = <400>;
+                                       rxc-skew-ps = <3000>;
+                                       rxd0-skew-ps = <400>;
+                                       rxd1-skew-ps = <400>;
+                                       rxd2-skew-ps = <400>;
+                                       rxd3-skew-ps = <400>;
+                               };
+
+                               ethernet-phy@7 {
+                                       reg = <0x7>;
+                                       interrupt-parent = <&pioB>;
+                                       interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
+                                       txen-skew-ps = <800>;
+                                       txc-skew-ps = <3000>;
+                                       rxdv-skew-ps = <400>;
+                                       rxc-skew-ps = <3000>;
+                                       rxd0-skew-ps = <400>;
+                                       rxd1-skew-ps = <400>;
+                                       rxd2-skew-ps = <400>;
+                                       rxd3-skew-ps = <400>;
+                               };
+                       };
+
+                       i2c1: i2c@f0018000 {
+                               pmic: act8865@5b {
+                                       compatible = "active-semi,act8865";
+                                       reg = <0x5b>;
+                                       status = "disabled";
+
+                                       regulators {
+                                               vcc_1v8_reg: DCDC_REG1 {
+                                                       regulator-name = "VCC_1V8";
+                                                       regulator-min-microvolt = <1800000>;
+                                                       regulator-max-microvolt = <1800000>;
+                                                       regulator-always-on;
+                                               };
+
+                                               vcc_1v2_reg: DCDC_REG2 {
+                                                       regulator-name = "VCC_1V2";
+                                                       regulator-min-microvolt = <1100000>;
+                                                       regulator-max-microvolt = <1300000>;
+                                                       regulator-always-on;
+                                               };
+
+                                               vcc_3v3_reg: DCDC_REG3 {
+                                                       regulator-name = "VCC_3V3";
+                                                       regulator-min-microvolt = <3300000>;
+                                                       regulator-max-microvolt = <3300000>;
+                                                       regulator-always-on;
+                                               };
+
+                                               vddana_reg: LDO_REG1 {
+                                                       regulator-name = "VDDANA";
+                                                       regulator-min-microvolt = <3300000>;
+                                                       regulator-max-microvolt = <3300000>;
+                                                       regulator-always-on;
+                                               };
+
+                                               vddfuse_reg: LDO_REG2 {
+                                                       regulator-name = "FUSE_2V5";
+                                                       regulator-min-microvolt = <2500000>;
+                                                       regulator-max-microvolt = <2500000>;
+                                               };
+                                       };
+                               };
+                       };
+               };
+
+               nand0: nand@60000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "hw";
+                       atmel,has-pmecc;
+                       atmel,pmecc-cap = <4>;
+                       atmel,pmecc-sector-size = <512>;
+                       nand-on-flash-bbt;
+                       status = "okay";
+
+                       at91bootstrap@0 {
+                               label = "at91bootstrap";
+                               reg = <0x0 0x40000>;
+                       };
+
+                       bootloader@40000 {
+                               label = "bootloader";
+                               reg = <0x40000 0x80000>;
+                       };
+
+                       bootloaderenv@c0000 {
+                               label = "bootloader env";
+                               reg = <0xc0000 0xc0000>;
+                       };
+
+                       dtb@180000 {
+                               label = "device tree";
+                               reg = <0x180000 0x80000>;
+                       };
+
+                       kernel@200000 {
+                               label = "kernel";
+                               reg = <0x200000 0x600000>;
+                       };
+
+                       rootfs@800000 {
+                               label = "rootfs";
+                               reg = <0x800000 0x0f800000>;
+                       };
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               d2 {
+                       label = "d2";
+                       gpios = <&pioE 25 GPIO_ACTIVE_LOW>;     /* PE25, conflicts with A25, RXD2 */
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+};
diff --git a/arch/arm/dts/sama5d3xdm.dtsi b/arch/arm/dts/sama5d3xdm.dtsi
new file mode 100644 (file)
index 0000000..035ab72
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * sama5d3dm.dtsi - Device Tree file for SAMA5 display module
+ *
+ *  Copyright (C) 2013 Atmel,
+ *                2013 Ludovic Desroches <ludovic.desroches@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/ {
+       ahb {
+               apb {
+                       i2c1: i2c@f0018000 {
+                               qt1070: keyboard@1b {
+                                       compatible = "qt1070";
+                                       reg = <0x1b>;
+                                       interrupt-parent = <&pioE>;
+                                       interrupts = <31 0x0>;
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_qt1070_irq>;
+                                       wakeup-source;
+                               };
+                       };
+
+                       adc0: adc@f8018000 {
+                               atmel,adc-ts-wires = <4>;
+                               atmel,adc-ts-pressure-threshold = <10000>;
+                               status = "okay";
+                       };
+
+                       pinctrl@fffff200 {
+                               board {
+                                       pinctrl_qt1070_irq: qt1070_irq {
+                                               atmel,pins =
+                                                       <AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PE31 GPIO with pull up deglith */
+                                       };
+                               };
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/sama5d3xmb.dtsi b/arch/arm/dts/sama5d3xmb.dtsi
new file mode 100644 (file)
index 0000000..f9ef905
--- /dev/null
@@ -0,0 +1,234 @@
+/*
+ * sama5d3xmb.dts - Device Tree file for SAMA5D3x mother board
+ *
+ *  Copyright (C) 2013 Atmel,
+ *                2013 Ludovic Desroches <ludovic.desroches@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+#include "sama5d3xcm.dtsi"
+
+/ {
+       compatible = "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5";
+
+       chosen {
+               u-boot,dm-pre-reloc;
+               stdout-path = &dbgu;
+       };
+
+       ahb {
+               apb {
+                       mmc0: mmc@f0000000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_cd>;
+                               status = "okay";
+                               u-boot,dm-pre-reloc;
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioD 17 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       spi0: spi@f0004000 {
+                               dmas = <0>, <0>;        /*  Do not use DMA for spi0 */
+                               u-boot,dm-pre-reloc;
+
+                               spi_flash@0 {
+                                       compatible = "spi-flash";
+                                       spi-max-frequency = <50000000>;
+                                       reg = <0>;
+                                       u-boot,dm-pre-reloc;
+                               };
+                       };
+
+                       ssc0: ssc@f0008000 {
+                               atmel,clk-from-rk-pin;
+                       };
+
+                       /*
+                        * i2c0 conflicts with ISI:
+                        * disable it to allow the use of ISI
+                        * can not enable audio when i2c0 disabled
+                        */
+                       i2c0: i2c@f0014000 {
+                               wm8904: wm8904@1a {
+                                       compatible = "wlf,wm8904";
+                                       reg = <0x1a>;
+                                       clocks = <&pck0>;
+                                       clock-names = "mclk";
+                               };
+                       };
+
+                       i2c1: i2c@f0018000 {
+                               ov2640: camera@0x30 {
+                                       compatible = "ovti,ov2640";
+                                       reg = <0x30>;
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_pck1_as_isi_mck &pinctrl_sensor_power &pinctrl_sensor_reset>;
+                                       resetb-gpios = <&pioE 24 GPIO_ACTIVE_LOW>;
+                                       pwdn-gpios = <&pioE 29 GPIO_ACTIVE_HIGH>;
+                                       /* use pck1 for the master clock of ov2640 */
+                                       clocks = <&pck1>;
+                                       clock-names = "xvclk";
+                                       assigned-clocks = <&pck1>;
+                                       assigned-clock-rates = <25000000>;
+
+                                       port {
+                                               ov2640_0: endpoint {
+                                                       remote-endpoint = <&isi_0>;
+                                                       bus-width = <8>;
+                                               };
+                                       };
+                               };
+                       };
+
+                       usart1: serial@f0020000 {
+                               dmas = <0>, <0>;        /*  Do not use DMA for usart1 */
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts_cts>;
+                               status = "okay";
+                       };
+
+                       isi: isi@f0034000 {
+                               port {
+                                       isi_0: endpoint {
+                                               remote-endpoint = <&ov2640_0>;
+                                               bus-width = <8>;
+                                               vsync-active = <1>;
+                                               hsync-active = <1>;
+                                       };
+                               };
+                       };
+
+                       mmc1: mmc@f8000000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
+                               status = "okay";
+                               u-boot,dm-pre-reloc;
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioD 18 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       adc0: adc@f8018000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <
+                                       &pinctrl_adc0_adtrg
+                                       &pinctrl_adc0_ad0
+                                       &pinctrl_adc0_ad1
+                                       &pinctrl_adc0_ad2
+                                       &pinctrl_adc0_ad3
+                                       &pinctrl_adc0_ad4
+                                       >;
+                               status = "okay";
+                       };
+
+                       macb1: ethernet@f802c000 {
+                               phy-mode = "rmii";
+
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               phy0: ethernet-phy@1 {
+                                       /*interrupt-parent = <&pioE>;*/
+                                       /*interrupts = <30 IRQ_TYPE_EDGE_FALLING>;*/
+                                       reg = <1>;
+                               };
+                       };
+
+                       pinctrl@fffff200 {
+                               board {
+                                       u-boot,dm-pre-reloc;
+                                       pinctrl_mmc0_cd: mmc0_cd {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOD 17 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD17 GPIO with pullup deglitch */
+                                       };
+
+                                       pinctrl_mmc1_cd: mmc1_cd {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOD 18 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD18 GPIO with pullup deglitch */
+                                       };
+
+                                       pinctrl_pck0_as_audio_mck: pck0_as_audio_mck {
+                                               atmel,pins =
+                                                       <AT91_PIOD 30 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PD30 periph B */
+                                       };
+
+                                       pinctrl_pck1_as_isi_mck: pck1_as_isi_mck-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 31 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PD31 periph B ISI_MCK */
+                                       };
+
+                                       pinctrl_sensor_reset: sensor_reset-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 24 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;   /* PE24 gpio */
+                                       };
+
+                                       pinctrl_sensor_power: sensor_power-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 29 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; /* PE29 gpio */
+                                       };
+
+                                       pinctrl_usba_vbus: usba_vbus {
+                                               atmel,pins =
+                                                       <AT91_PIOD 29 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; /* PD29 GPIO with deglitch */
+                                       };
+                               };
+                       };
+
+                       dbgu: serial@ffffee00 {
+                               dmas = <0>, <0>;        /*  Do not use DMA for dbgu */
+                               status = "okay";
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       watchdog@fffffe40 {
+                               status = "okay";
+                       };
+               };
+
+               usb0: gadget@00500000 {
+                       atmel,vbus-gpio = <&pioD 29 GPIO_ACTIVE_HIGH>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usba_vbus>;
+                       status = "okay";
+               };
+
+               usb1: ohci@00600000 {
+                       num-ports = <3>;
+                       atmel,vbus-gpio = <&pioD 25 GPIO_ACTIVE_HIGH
+                                          &pioD 26 GPIO_ACTIVE_LOW
+                                          &pioD 27 GPIO_ACTIVE_LOW
+                                         >;
+                       status = "okay";
+               };
+
+               usb2: ehci@00700000 {
+                       status = "okay";
+               };
+       };
+
+       sound {
+               compatible = "atmel,asoc-wm8904";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_pck0_as_audio_mck>;
+
+               atmel,model = "wm8904 @ SAMA5D3EK";
+               atmel,audio-routing =
+                       "Headphone Jack", "HPOUTL",
+                       "Headphone Jack", "HPOUTR",
+                       "IN2L", "Line In Jack",
+                       "IN2R", "Line In Jack",
+                       "Mic", "MICBIAS",
+                       "IN1L", "Mic";
+
+               atmel,ssc-controller = <&ssc0>;
+               atmel,audio-codec = <&wm8904>;
+
+               status = "disabled";
+       };
+};
diff --git a/arch/arm/dts/sama5d3xmb_cmp.dtsi b/arch/arm/dts/sama5d3xmb_cmp.dtsi
new file mode 100644 (file)
index 0000000..77f989c
--- /dev/null
@@ -0,0 +1,236 @@
+/*
+ * sama5d3xmb_cmp.dts - Device Tree file for SAMA5D3x CMP mother board
+ *
+ *  Copyright (C) 2016 Atmel,
+ *
+ * Licensed under GPLv2 or later.
+ */
+#include "sama5d3xcm_cmp.dtsi"
+
+/ {
+       compatible = "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5";
+
+       chosen {
+               u-boot,dm-pre-reloc;
+               stdout-path = &dbgu;
+       };
+
+       ahb {
+               apb {
+                       mmc0: mmc@f0000000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_cd>;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioD 17 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       spi0: spi@f0004000 {
+                               dmas = <0>, <0>;        /*  Do not use DMA for spi0 */
+
+                               spi_flash@0 {
+                                       compatible = "spi-flash";
+                                       spi-max-frequency = <50000000>;
+                                       reg = <0>;
+                               };
+                       };
+
+                       ssc0: ssc@f0008000 {
+                               atmel,clk-from-rk-pin;
+                       };
+
+                       /*
+                        * i2c0 conflicts with ISI:
+                        * disable it to allow the use of ISI
+                        * can not enable audio when i2c0 disabled
+                        */
+                       i2c0: i2c@f0014000 {
+                               wm8904: wm8904@1a {
+                                       compatible = "wlf,wm8904";
+                                       reg = <0x1a>;
+                                       clocks = <&pck0>;
+                                       clock-names = "mclk";
+                               };
+                       };
+
+                       i2c1: i2c@f0018000 {
+                               ov2640: camera@0x30 {
+                                       compatible = "ovti,ov2640";
+                                       reg = <0x30>;
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_pck1_as_isi_mck &pinctrl_sensor_power &pinctrl_sensor_reset>;
+                                       resetb-gpios = <&pioE 24 GPIO_ACTIVE_LOW>;
+                                       pwdn-gpios = <&pioE 29 GPIO_ACTIVE_HIGH>;
+                                       /* use pck1 for the master clock of ov2640 */
+                                       clocks = <&pck1>;
+                                       clock-names = "xvclk";
+                                       assigned-clocks = <&pck1>;
+                                       assigned-clock-rates = <25000000>;
+
+                                       port {
+                                               ov2640_0: endpoint {
+                                                       remote-endpoint = <&isi_0>;
+                                                       bus-width = <8>;
+                                               };
+                                       };
+                               };
+                       };
+
+                       usart1: serial@f0020000 {
+                               dmas = <0>, <0>;        /*  Do not use DMA for usart1 */
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts_cts>;
+                               status = "okay";
+                       };
+
+                       isi: isi@f0034000 {
+                               port {
+                                       isi_0: endpoint {
+                                               remote-endpoint = <&ov2640_0>;
+                                               bus-width = <8>;
+                                               vsync-active = <1>;
+                                               hsync-active = <1>;
+                                       };
+                               };
+                       };
+
+                       mmc1: mmc@f8000000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioD 18 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       adc0: adc@f8018000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <
+                                       &pinctrl_adc0_adtrg
+                                       &pinctrl_adc0_ad0
+                                       &pinctrl_adc0_ad1
+                                       &pinctrl_adc0_ad2
+                                       &pinctrl_adc0_ad3
+                                       &pinctrl_adc0_ad4
+                                       >;
+                               status = "okay";
+                       };
+
+                       macb1: ethernet@f802c000 {
+                               phy-mode = "rmii";
+
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               phy0: ethernet-phy@1 {
+                                       /*interrupt-parent = <&pioE>;*/
+                                       /*interrupts = <30 IRQ_TYPE_EDGE_FALLING>;*/
+                                       reg = <1>;
+                               };
+                       };
+
+                       pinctrl@fffff200 {
+                               board {
+                                       pinctrl_gpio_keys: gpio_keys {
+                                               atmel,pins =
+                                                       <AT91_PIOE 27 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
+                                       };
+
+                                       pinctrl_mmc0_cd: mmc0_cd {
+                                               atmel,pins =
+                                                       <AT91_PIOD 17 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD17 GPIO with pullup deglitch */
+                                       };
+
+                                       pinctrl_mmc1_cd: mmc1_cd {
+                                               atmel,pins =
+                                                       <AT91_PIOD 18 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD18 GPIO with pullup deglitch */
+                                       };
+
+                                       pinctrl_pck0_as_audio_mck: pck0_as_audio_mck {
+                                               atmel,pins =
+                                                       <AT91_PIOD 30 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PD30 periph B */
+                                       };
+
+                                       pinctrl_pck1_as_isi_mck: pck1_as_isi_mck-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 31 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PD31 periph B ISI_MCK */
+                                       };
+
+                                       pinctrl_sensor_reset: sensor_reset-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 24 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;   /* PE24 gpio */
+                                       };
+
+                                       pinctrl_sensor_power: sensor_power-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 29 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; /* PE29 gpio */
+                                       };
+
+                                       pinctrl_usba_vbus: usba_vbus {
+                                               atmel,pins =
+                                                       <AT91_PIOD 29 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; /* PD29 GPIO with deglitch */
+                                       };
+                               };
+                       };
+
+                       dbgu: serial@ffffee00 {
+                               dmas = <0>, <0>;        /*  Do not use DMA for dbgu */
+                               status = "okay";
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       watchdog@fffffe40 {
+                               status = "okay";
+                       };
+               };
+
+               usb0: gadget@00500000 {
+                       atmel,vbus-gpio = <&pioD 29 GPIO_ACTIVE_HIGH>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usba_vbus>;
+                       status = "okay";
+               };
+       };
+
+       sound {
+               compatible = "atmel,asoc-wm8904";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_pck0_as_audio_mck>;
+
+               atmel,model = "wm8904 @ SAMA5D3EK";
+               atmel,audio-routing =
+                       "Headphone Jack", "HPOUTL",
+                       "Headphone Jack", "HPOUTR",
+                       "IN2L", "Line In Jack",
+                       "IN2R", "Line In Jack",
+                       "Mic", "MICBIAS",
+                       "IN1L", "Mic";
+
+               atmel,ssc-controller = <&ssc0>;
+               atmel,audio-codec = <&wm8904>;
+
+               status = "disabled";
+       };
+
+       /* Conflict with LCD pins */
+       gpio_keys {
+               compatible = "gpio-keys";
+               status = "okay";
+
+               #address-cells = <1>;
+               #size-cells = <0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpio_keys>;
+
+               pb_user1 {
+                       label = "pb_user1";
+                       gpios = <&pioE 27 GPIO_ACTIVE_HIGH>;
+                       linux,code = <0x100>;
+                       gpio-key,wakeup;
+               };
+       };
+};
diff --git a/arch/arm/dts/sama5d4.dtsi b/arch/arm/dts/sama5d4.dtsi
new file mode 100644 (file)
index 0000000..c6512ae
--- /dev/null
@@ -0,0 +1,1935 @@
+/*
+ * sama5d4.dtsi - Device Tree Include file for SAMA5D4 family SoC
+ *
+ *  Copyright (C) 2014 Atmel,
+ *                2014 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "skeleton.dtsi"
+#include <dt-bindings/clock/at91.h>
+#include <dt-bindings/dma/at91.h>
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       model = "Atmel SAMA5D4 family SoC";
+       compatible = "atmel,sama5d4";
+       interrupt-parent = <&aic>;
+
+       aliases {
+               serial0 = &usart3;
+               serial1 = &usart4;
+               serial2 = &usart2;
+               serial3 = &usart0;
+               serial4 = &usart1;
+               serial5 = &uart0;
+               serial6 = &uart1;
+               gpio0 = &pioA;
+               gpio1 = &pioB;
+               gpio2 = &pioC;
+               gpio3 = &pioD;
+               gpio4 = &pioE;
+               pwm0 = &pwm0;
+               ssc0 = &ssc0;
+               ssc1 = &ssc1;
+               tcb0 = &tcb0;
+               tcb1 = &tcb1;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+       };
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a5";
+                       reg = <0>;
+                       next-level-cache = <&L2>;
+               };
+       };
+
+       memory {
+               reg = <0x20000000 0x20000000>;
+       };
+
+       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 = <1000000>;
+               };
+       };
+
+       ns_sram: sram@00210000 {
+               compatible = "mmio-sram";
+               reg = <0x00210000 0x10000>;
+       };
+
+       ahb {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               u-boot,dm-pre-reloc;
+
+               usb0: gadget@00400000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "atmel,sama5d3-udc";
+                       reg = <0x00400000 0x100000
+                              0xfc02c000 0x4000>;
+                       interrupts = <47 IRQ_TYPE_LEVEL_HIGH 2>;
+                       clocks = <&udphs_clk>, <&utmi>;
+                       clock-names = "pclk", "hclk";
+                       status = "disabled";
+
+                       ep0: endpoint@0 {
+                               reg = <0>;
+                               atmel,fifo-size = <64>;
+                               atmel,nb-banks = <1>;
+                       };
+
+                       ep1: endpoint@1 {
+                               reg = <1>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <3>;
+                               atmel,can-dma;
+                               atmel,can-isoc;
+                       };
+
+                       ep2: endpoint@2 {
+                               reg = <2>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <3>;
+                               atmel,can-dma;
+                               atmel,can-isoc;
+                       };
+
+                       ep3: endpoint@3 {
+                               reg = <3>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-dma;
+                               atmel,can-isoc;
+                       };
+
+                       ep4: endpoint@4 {
+                               reg = <4>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-dma;
+                               atmel,can-isoc;
+                       };
+
+                       ep5: endpoint@5 {
+                               reg = <5>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-dma;
+                               atmel,can-isoc;
+                       };
+
+                       ep6: endpoint@6 {
+                               reg = <6>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-dma;
+                               atmel,can-isoc;
+                       };
+
+                       ep7: endpoint@7 {
+                               reg = <7>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-dma;
+                               atmel,can-isoc;
+                       };
+
+                       ep8: endpoint@8 {
+                               reg = <8>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-isoc;
+                       };
+
+                       ep9: endpoint@9 {
+                               reg = <9>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-isoc;
+                       };
+
+                       ep10: endpoint@10 {
+                               reg = <10>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-isoc;
+                       };
+
+                       ep11: endpoint@11 {
+                               reg = <11>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-isoc;
+                       };
+
+                       ep12: endpoint@12 {
+                               reg = <12>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-isoc;
+                       };
+
+                       ep13: endpoint@13 {
+                               reg = <13>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-isoc;
+                       };
+
+                       ep14: endpoint@14 {
+                               reg = <14>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-isoc;
+                       };
+
+                       ep15: endpoint@15 {
+                               reg = <15>;
+                               atmel,fifo-size = <1024>;
+                               atmel,nb-banks = <2>;
+                               atmel,can-isoc;
+                       };
+               };
+
+               usb1: ohci@00500000 {
+                       compatible = "atmel,at91rm9200-ohci", "usb-ohci";
+                       reg = <0x00500000 0x100000>;
+                       interrupts = <46 IRQ_TYPE_LEVEL_HIGH 2>;
+                       clocks = <&uhphs_clk>, <&uhphs_clk>, <&uhpck>;
+                       clock-names = "ohci_clk", "hclk", "uhpck";
+                       status = "disabled";
+               };
+
+               usb2: ehci@00600000 {
+                       compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
+                       reg = <0x00600000 0x100000>;
+                       interrupts = <46 IRQ_TYPE_LEVEL_HIGH 2>;
+                       clocks = <&utmi>, <&uhphs_clk>;
+                       clock-names = "usb_clk", "ehci_clk";
+                       status = "disabled";
+               };
+
+               L2: cache-controller@00a00000 {
+                       compatible = "arm,pl310-cache";
+                       reg = <0x00a00000 0x1000>;
+                       interrupts = <67 IRQ_TYPE_LEVEL_HIGH 4>;
+                       cache-unified;
+                       cache-level = <2>;
+               };
+
+               nand0: nand@80000000 {
+                       compatible = "atmel,sama5d4-nand", "atmel,at91rm9200-nand";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+                       reg = < 0x80000000 0x08000000   /* EBI CS3 */
+                               0xfc05c070 0x00000490   /* SMC PMECC regs */
+                               0xfc05c500 0x00000100   /* SMC PMECC Error Location regs */
+                               >;
+                       interrupts = <22 IRQ_TYPE_LEVEL_HIGH 6>;
+                       atmel,nand-addr-offset = <21>;
+                       atmel,nand-cmd-offset = <22>;
+                       atmel,nand-has-dma;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_nand>;
+                       status = "disabled";
+
+                       nfc@90000000 {
+                               compatible = "atmel,sama5d3-nfc";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               reg = <
+                                       0x90000000 0x08000000   /* NFC Command Registers */
+                                       0xfc05c000 0x00000070   /* NFC HSMC regs */
+                                       0x00100000 0x00100000   /* NFC SRAM banks */
+                                         >;
+                               clocks = <&hsmc_clk>;
+                               atmel,write-by-sram;
+                       };
+               };
+
+               apb {
+                       compatible = "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+                       u-boot,dm-pre-reloc;
+
+                       hlcdc: hlcdc@f0000000 {
+                               compatible = "atmel,sama5d4-hlcdc";
+                               reg = <0xf0000000 0x4000>;
+                               interrupts = <51 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>;
+                               clock-names = "periph_clk","sys_clk", "slow_clk";
+                               status = "disabled";
+
+                               hlcdc-display-controller {
+                                       compatible = "atmel,hlcdc-display-controller";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       port@0 {
+                                               #address-cells = <1>;
+                                               #size-cells = <0>;
+                                               reg = <0>;
+                                       };
+                               };
+
+                               hlcdc_pwm: hlcdc-pwm {
+                                       compatible = "atmel,hlcdc-pwm";
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_lcd_pwm>;
+                                       #pwm-cells = <3>;
+                               };
+                       };
+
+                       dma1: dma-controller@f0004000 {
+                               compatible = "atmel,sama5d4-dma";
+                               reg = <0xf0004000 0x200>;
+                               interrupts = <50 IRQ_TYPE_LEVEL_HIGH 0>;
+                               #dma-cells = <1>;
+                               clocks = <&dma1_clk>;
+                               clock-names = "dma_clk";
+                       };
+
+                       isi: isi@f0008000 {
+                               compatible = "atmel,at91sam9g45-isi";
+                               reg = <0xf0008000 0x4000>;
+                               interrupts = <52 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_isi_data_0_7>;
+                               clocks = <&isi_clk>;
+                               clock-names = "isi_clk";
+                               status = "disabled";
+                               port {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                               };
+                       };
+
+                       ramc0: ramc@f0010000 {
+                               compatible = "atmel,sama5d3-ddramc";
+                               reg = <0xf0010000 0x200>;
+                               clocks = <&ddrck>, <&mpddr_clk>;
+                               clock-names = "ddrck", "mpddr";
+                       };
+
+                       dma0: dma-controller@f0014000 {
+                               compatible = "atmel,sama5d4-dma";
+                               reg = <0xf0014000 0x200>;
+                               interrupts = <8 IRQ_TYPE_LEVEL_HIGH 0>;
+                               #dma-cells = <1>;
+                               clocks = <&dma0_clk>;
+                               clock-names = "dma_clk";
+                       };
+
+                       pmc: pmc@f0018000 {
+                               compatible = "atmel,sama5d3-pmc", "syscon";
+                               reg = <0xf0018000 0x120>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               interrupt-controller;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               #interrupt-cells = <1>;
+                               u-boot,dm-pre-reloc;
+
+                               main_rc_osc: main_rc_osc {
+                                       compatible = "atmel,at91sam9x5-clk-main-rc-osc";
+                                       #clock-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       interrupts = <AT91_PMC_MOSCRCS>;
+                                       clock-frequency = <12000000>;
+                                       clock-accuracy = <100000000>;
+                               };
+
+                               main_osc: main_osc {
+                                       compatible = "atmel,at91rm9200-clk-main-osc";
+                                       #clock-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       interrupts = <AT91_PMC_MOSCS>;
+                                       clocks = <&main_xtal>;
+                               };
+
+                               main: mainck {
+                                       compatible = "atmel,at91sam9x5-clk-main";
+                                       #clock-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       interrupts = <AT91_PMC_MOSCSELS>;
+                                       clocks = <&main_rc_osc &main_osc>;
+                                       u-boot,dm-pre-reloc;
+                               };
+
+                               plla: pllack@0 {
+                                       compatible = "atmel,sama5d3-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       interrupts = <AT91_PMC_LOCKA>;
+                                       clocks = <&main>;
+                                       reg = <0>;
+                                       atmel,clk-input-range = <12000000 12000000>;
+                                       #atmel,pll-clk-output-range-cells = <4>;
+                                       atmel,pll-clk-output-ranges = <600000000 1200000000 0 0>;
+                               };
+
+                               plladiv: plladivck {
+                                       compatible = "atmel,at91sam9x5-clk-plldiv";
+                                       #clock-cells = <0>;
+                                       clocks = <&plla>;
+                               };
+
+                               utmi: utmick {
+                                       compatible = "atmel,at91sam9x5-clk-utmi";
+                                       #clock-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       interrupts = <AT91_PMC_LOCKU>;
+                                       clocks = <&main>;
+                                       u-boot,dm-pre-reloc;
+                               };
+
+                               mck: masterck {
+                                       compatible = "atmel,at91sam9x5-clk-master";
+                                       #clock-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       interrupts = <AT91_PMC_MCKRDY>;
+                                       clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>;
+                                       atmel,clk-output-range = <125000000 200000000>;
+                                       atmel,clk-divisors = <1 2 4 3>;
+                               };
+
+                               h32ck: h32mxck {
+                                       #clock-cells = <0>;
+                                       compatible = "atmel,sama5d4-clk-h32mx";
+                                       clocks = <&mck>;
+                                       u-boot,dm-pre-reloc;
+                               };
+
+                               usb: usbck {
+                                       compatible = "atmel,at91sam9x5-clk-usb";
+                                       #clock-cells = <0>;
+                                       clocks = <&plladiv>, <&utmi>;
+                               };
+
+                               prog: progck {
+                                       compatible = "atmel,at91sam9x5-clk-programmable";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>, <&mck>;
+
+                                       prog0: prog@0 {
+                                               #clock-cells = <0>;
+                                               reg = <0>;
+                                               interrupts = <AT91_PMC_PCKRDY(0)>;
+                                       };
+
+                                       prog1: prog@1 {
+                                               #clock-cells = <0>;
+                                               reg = <1>;
+                                               interrupts = <AT91_PMC_PCKRDY(1)>;
+                                       };
+
+                                       prog2: prog@2 {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                               interrupts = <AT91_PMC_PCKRDY(2)>;
+                                       };
+                               };
+
+                               smd: smdclk {
+                                       compatible = "atmel,at91sam9x5-clk-smd";
+                                       #clock-cells = <0>;
+                                       clocks = <&plladiv>, <&utmi>;
+                               };
+
+                               systemck {
+                                       compatible = "atmel,at91rm9200-clk-system";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       u-boot,dm-pre-reloc;
+
+                                       ddrck: ddrck@2 {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                               clocks = <&mck>;
+                                       };
+
+                                       lcdck: lcdck@3 {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                               clocks = <&mck>;
+                                       };
+
+                                       smdck: smdck@4 {
+                                               #clock-cells = <0>;
+                                               reg = <4>;
+                                               clocks = <&smd>;
+                                       };
+
+                                       uhpck: uhpcki@6 {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       udpck: udpck@7 {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       pck0: pck0@8 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                               clocks = <&prog0>;
+                                       };
+
+                                       pck1: pck1@9 {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                               clocks = <&prog1>;
+                                       };
+
+                                       pck2: pck2@10 {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                               clocks = <&prog2>;
+                                       };
+                               };
+
+                               periph32ck {
+                                       compatible = "atmel,at91sam9x5-clk-peripheral";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       clocks = <&h32ck>;
+                                       u-boot,dm-pre-reloc;
+
+                                       pioD_clk: pioD_clk@5 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <5>;
+                                       };
+
+                                       usart0_clk: usart0_clk@6 {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                       };
+
+                                       usart1_clk: usart1_clk@7 {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                       };
+
+                                       icm_clk: icm_clk@9 {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                       };
+
+                                       aes_clk: aes_clk@12 {
+                                               #clock-cells = <0>;
+                                               reg = <12>;
+                                       };
+
+                                       tdes_clk: tdes_clk@14 {
+                                               #clock-cells = <0>;
+                                               reg = <14>;
+                                       };
+
+                                       sha_clk: sha_clk@15 {
+                                               #clock-cells = <0>;
+                                               reg = <15>;
+                                       };
+
+                                       matrix1_clk: matrix1_clk@17 {
+                                               #clock-cells = <0>;
+                                               reg = <17>;
+                                       };
+
+                                       hsmc_clk: hsmc_clk@22 {
+                                               #clock-cells = <0>;
+                                               reg = <22>;
+                                       };
+
+                                       pioA_clk: pioA_clk@23 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <23>;
+                                       };
+
+                                       pioB_clk: pioB_clk@24 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <24>;
+                                       };
+
+                                       pioC_clk: pioC_clk@25 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <25>;
+                                       };
+
+                                       pioE_clk: pioE_clk@26 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <26>;
+                                       };
+
+                                       uart0_clk: uart0_clk@27 {
+                                               #clock-cells = <0>;
+                                               reg = <27>;
+                                       };
+
+                                       uart1_clk: uart1_clk@28 {
+                                               #clock-cells = <0>;
+                                               reg = <28>;
+                                       };
+
+                                       usart2_clk: usart2_clk@29 {
+                                               #clock-cells = <0>;
+                                               reg = <29>;
+                                       };
+
+                                       usart3_clk: usart3_clk@30 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <30>;
+                                       };
+
+                                       usart4_clk: usart4_clk@31 {
+                                               #clock-cells = <0>;
+                                               reg = <31>;
+                                       };
+
+                                       twi0_clk: twi0_clk@32 {
+                                               reg = <32>;
+                                               #clock-cells = <0>;
+                                       };
+
+                                       twi1_clk: twi1_clk@33 {
+                                               #clock-cells = <0>;
+                                               reg = <33>;
+                                       };
+
+                                       twi2_clk: twi2_clk@34 {
+                                               #clock-cells = <0>;
+                                               reg = <34>;
+                                       };
+
+                                       mci0_clk: mci0_clk@35 {
+                                               #clock-cells = <0>;
+                                               reg = <35>;
+                                       };
+
+                                       mci1_clk: mci1_clk@36 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <36>;
+                                       };
+
+                                       spi0_clk: spi0_clk@37 {
+                                               u-boot,dm-pre-reloc;
+                                               #clock-cells = <0>;
+                                               reg = <37>;
+                                       };
+
+                                       spi1_clk: spi1_clk@38 {
+                                               #clock-cells = <0>;
+                                               reg = <38>;
+                                       };
+
+                                       spi2_clk: spi2_clk@39 {
+                                               #clock-cells = <0>;
+                                               reg = <39>;
+                                       };
+
+                                       tcb0_clk: tcb0_clk@40 {
+                                               #clock-cells = <0>;
+                                               reg = <40>;
+                                       };
+
+                                       tcb1_clk: tcb1_clk@41 {
+                                               #clock-cells = <0>;
+                                               reg = <41>;
+                                       };
+
+                                       tcb2_clk: tcb2_clk@42 {
+                                               #clock-cells = <0>;
+                                               reg = <42>;
+                                       };
+
+                                       pwm_clk: pwm_clk@43 {
+                                               #clock-cells = <0>;
+                                               reg = <43>;
+                                       };
+
+                                       adc_clk: adc_clk@44 {
+                                               #clock-cells = <0>;
+                                               reg = <44>;
+                                       };
+
+                                       dbgu_clk: dbgu_clk@45 {
+                                               #clock-cells = <0>;
+                                               reg = <45>;
+                                       };
+
+                                       uhphs_clk: uhphs_clk@46 {
+                                               #clock-cells = <0>;
+                                               reg = <46>;
+                                       };
+
+                                       udphs_clk: udphs_clk@47 {
+                                               #clock-cells = <0>;
+                                               reg = <47>;
+                                       };
+
+                                       ssc0_clk: ssc0_clki@48 {
+                                               #clock-cells = <0>;
+                                               reg = <48>;
+                                       };
+
+                                       ssc1_clk: ssc1_clk@49 {
+                                               #clock-cells = <0>;
+                                               reg = <49>;
+                                       };
+
+                                       trng_clk: trng_clk@53 {
+                                               #clock-cells = <0>;
+                                               reg = <53>;
+                                       };
+
+                                       macb0_clk: macb0_clk@54 {
+                                               #clock-cells = <0>;
+                                               reg = <54>;
+                                       };
+
+                                       macb1_clk: macb1_clk@55 {
+                                               #clock-cells = <0>;
+                                               reg = <55>;
+                                       };
+
+                                       fuse_clk: fuse_clk@57 {
+                                               #clock-cells = <0>;
+                                               reg = <57>;
+                                       };
+
+                                       securam_clk: securam_clk@59 {
+                                               #clock-cells = <0>;
+                                               reg = <59>;
+                                       };
+
+                                       smd_clk: smd_clk@61 {
+                                               #clock-cells = <0>;
+                                               reg = <61>;
+                                       };
+
+                                       twi3_clk: twi3_clk@62 {
+                                               #clock-cells = <0>;
+                                               reg = <62>;
+                                       };
+
+                                       catb_clk: catb_clk@63 {
+                                               #clock-cells = <0>;
+                                               reg = <63>;
+                                       };
+                               };
+
+                               periph64ck {
+                                       compatible = "atmel,at91sam9x5-clk-peripheral";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       clocks = <&mck>;
+
+                                       dma0_clk: dma0_clk@8 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                       };
+
+                                       cpkcc_clk: cpkcc_clk@10 {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                       };
+
+                                       aesb_clk: aesb_clk@13 {
+                                               #clock-cells = <0>;
+                                               reg = <13>;
+                                       };
+
+                                       mpddr_clk: mpddr_clk@16 {
+                                               #clock-cells = <0>;
+                                               reg = <16>;
+                                       };
+
+                                       matrix0_clk: matrix0_clk@18 {
+                                               #clock-cells = <0>;
+                                               reg = <18>;
+                                       };
+
+                                       vdec_clk: vdec_clk@19 {
+                                               #clock-cells = <0>;
+                                               reg = <19>;
+                                       };
+
+                                       dma1_clk: dma1_clk@50 {
+                                               #clock-cells = <0>;
+                                               reg = <50>;
+                                       };
+
+                                       lcdc_clk: lcdc_clk@51 {
+                                               #clock-cells = <0>;
+                                               reg = <51>;
+                                       };
+
+                                       isi_clk: isi_clk@52 {
+                                               #clock-cells = <0>;
+                                               reg = <52>;
+                                       };
+                               };
+                       };
+
+                       mmc0: mmc@f8000000 {
+                               compatible = "atmel,hsmci";
+                               reg = <0xf8000000 0x600>;
+                               interrupts = <35 IRQ_TYPE_LEVEL_HIGH 0>;
+                               dmas = <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(0))>;
+                               dma-names = "rxtx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3>;
+                               status = "disabled";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&mci0_clk>;
+                               clock-names = "mci_clk";
+                       };
+
+                       uart0: serial@f8004000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8004000 0x100>;
+                               interrupts = <27 IRQ_TYPE_LEVEL_HIGH 5>;
+                               dmas = <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(22))>,
+                                      <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(23))>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_uart0>;
+                               clocks = <&uart0_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       ssc0: ssc@f8008000 {
+                               compatible = "atmel,at91sam9g45-ssc";
+                               reg = <0xf8008000 0x4000>;
+                               interrupts = <48 IRQ_TYPE_LEVEL_HIGH 0>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
+                               dmas = <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(26))>,
+                                      <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(27))>;
+                               dma-names = "tx", "rx";
+                               clocks = <&ssc0_clk>;
+                               clock-names = "pclk";
+                               status = "disabled";
+                       };
+
+                       pwm0: pwm@f800c000 {
+                               compatible = "atmel,sama5d3-pwm";
+                               reg = <0xf800c000 0x300>;
+                               interrupts = <43 IRQ_TYPE_LEVEL_HIGH 4>;
+                               #pwm-cells = <3>;
+                               clocks = <&pwm_clk>;
+                               status = "disabled";
+                       };
+
+                       spi0: spi@f8010000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xf8010000 0x100>;
+                               interrupts = <37 IRQ_TYPE_LEVEL_HIGH 3>;
+                               dmas = <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(10))>,
+                                      <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(11))>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi0>;
+                               clocks = <&spi0_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       i2c0: i2c@f8014000 {
+                               compatible = "atmel,sama5d4-i2c";
+                               reg = <0xf8014000 0x4000>;
+                               interrupts = <32 IRQ_TYPE_LEVEL_HIGH 6>;
+                               dmas = <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(2))>,
+                                      <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(3))>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_i2c0>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&twi0_clk>;
+                               status = "disabled";
+                       };
+
+                       i2c1: i2c@f8018000 {
+                               compatible = "atmel,sama5d4-i2c";
+                               reg = <0xf8018000 0x4000>;
+                               interrupts = <33 IRQ_TYPE_LEVEL_HIGH 6>;
+                               dmas = <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(4))>,
+                                      <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(5))>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_i2c1>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&twi1_clk>;
+                               status = "disabled";
+                       };
+
+                       tcb0: timer@f801c000 {
+                               compatible = "atmel,at91sam9x5-tcb";
+                               reg = <0xf801c000 0x100>;
+                               interrupts = <40 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tcb0_clk>, <&clk32k>;
+                               clock-names = "t0_clk", "slow_clk";
+                       };
+
+                       macb0: ethernet@f8020000 {
+                               compatible = "atmel,sama5d4-gem";
+                               reg = <0xf8020000 0x100>;
+                               interrupts = <54 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_macb0_rmii>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&macb0_clk>, <&macb0_clk>;
+                               clock-names = "hclk", "pclk";
+                               status = "disabled";
+                       };
+
+                       i2c2: i2c@f8024000 {
+                               compatible = "atmel,sama5d4-i2c";
+                               reg = <0xf8024000 0x4000>;
+                               interrupts = <34 IRQ_TYPE_LEVEL_HIGH 6>;
+                               dmas = <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(6))>,
+                                      <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(7))>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_i2c2>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&twi2_clk>;
+                               status = "disabled";
+                       };
+
+                       sfr: sfr@f8028000 {
+                               compatible = "atmel,sama5d4-sfr", "syscon";
+                               reg = <0xf8028000 0x60>;
+                       };
+
+                       usart0: serial@f802c000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf802c000 0x100>;
+                               interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
+                               dmas = <&dma0
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(36))>,
+                                      <&dma0
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(37))>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart0 &pinctrl_usart0_rts &pinctrl_usart0_cts>;
+                               clocks = <&usart0_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart1: serial@f8030000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8030000 0x100>;
+                               interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
+                               dmas = <&dma0
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(38))>,
+                                      <&dma0
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(39))>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts &pinctrl_usart1_cts>;
+                               clocks = <&usart1_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       mmc1: mmc@fc000000 {
+                               compatible = "atmel,hsmci";
+                               reg = <0xfc000000 0x600>;
+                               interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>;
+                               dmas = <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(1))>;
+                               dma-names = "rxtx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3>;
+                               status = "disabled";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&mci1_clk>;
+                               clock-names = "mci_clk";
+                       };
+
+                       uart1: serial@fc004000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfc004000 0x100>;
+                               interrupts = <28 IRQ_TYPE_LEVEL_HIGH 5>;
+                               dmas = <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(24))>,
+                                      <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(25))>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_uart1>;
+                               clocks = <&uart1_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart2: serial@fc008000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfc008000 0x100>;
+                               interrupts = <29 IRQ_TYPE_LEVEL_HIGH 5>;
+                               dmas = <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(16))>,
+                                      <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(17))>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart2 &pinctrl_usart2_rts &pinctrl_usart2_cts>;
+                               clocks = <&usart2_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart3: serial@fc00c000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfc00c000 0x100>;
+                               interrupts = <30 IRQ_TYPE_LEVEL_HIGH 5>;
+                               dmas = <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(18))>,
+                                      <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(19))>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart3>;
+                               clocks = <&usart3_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart4: serial@fc010000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfc010000 0x100>;
+                               interrupts = <31 IRQ_TYPE_LEVEL_HIGH 5>;
+                               dmas = <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(20))>,
+                                      <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(21))>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart4>;
+                               clocks = <&usart4_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       ssc1: ssc@fc014000 {
+                               compatible = "atmel,at91sam9g45-ssc";
+                               reg = <0xfc014000 0x4000>;
+                               interrupts = <49 IRQ_TYPE_LEVEL_HIGH 0>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
+                               dmas = <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(28))>,
+                                      <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(29))>;
+                               dma-names = "tx", "rx";
+                               clocks = <&ssc1_clk>;
+                               clock-names = "pclk";
+                               status = "disabled";
+                       };
+
+                       spi1: spi@fc018000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xfc018000 0x100>;
+                               interrupts = <38 IRQ_TYPE_LEVEL_HIGH 3>;
+                               dmas = <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(12))>,
+                                      <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(13))>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi1>;
+                               clocks = <&spi1_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       spi2: spi@fc01c000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xfc01c000 0x100>;
+                               interrupts = <39 IRQ_TYPE_LEVEL_HIGH 3>;
+                               dmas = <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(14))>,
+                                      <&dma1
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(15))>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi2>;
+                               clocks = <&spi2_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       tcb1: timer@fc020000 {
+                               compatible = "atmel,at91sam9x5-tcb";
+                               reg = <0xfc020000 0x100>;
+                               interrupts = <41 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tcb1_clk>, <&clk32k>;
+                               clock-names = "t0_clk", "slow_clk";
+                       };
+
+                       macb1: ethernet@fc028000 {
+                               compatible = "atmel,sama5d4-gem";
+                               reg = <0xfc028000 0x100>;
+                               interrupts = <55 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_macb1_rmii>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&macb1_clk>, <&macb1_clk>;
+                               clock-names = "hclk", "pclk";
+                               status = "disabled";
+                       };
+
+                       trng@fc030000 {
+                               compatible = "atmel,at91sam9g45-trng";
+                               reg = <0xfc030000 0x100>;
+                               interrupts = <53 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&trng_clk>;
+                       };
+
+                       adc0: adc@fc034000 {
+                               compatible = "atmel,at91sam9x5-adc";
+                               reg = <0xfc034000 0x100>;
+                               interrupts = <44 IRQ_TYPE_LEVEL_HIGH 5>;
+                               clocks = <&adc_clk>,
+                                        <&adc_op_clk>;
+                               clock-names = "adc_clk", "adc_op_clk";
+                               atmel,adc-channels-used = <0x01f>;
+                               atmel,adc-startup-time = <40>;
+                               atmel,adc-use-external-triggers;
+                               atmel,adc-vref = <3000>;
+                               atmel,adc-res = <8 10>;
+                               atmel,adc-sample-hold-time = <11>;
+                               atmel,adc-res-names = "lowres", "highres";
+                               atmel,adc-ts-pressure-threshold = <10000>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "disabled";
+
+                               trigger@0 {
+                                       trigger-name = "external-rising";
+                                       trigger-value = <0x1>;
+                                       trigger-external;
+                                       reg = <0>;
+                               };
+                               trigger@1 {
+                                       trigger-name = "external-falling";
+                                       trigger-value = <0x2>;
+                                       trigger-external;
+                                       reg = <1>;
+                               };
+                               trigger@2 {
+                                       trigger-name = "external-any";
+                                       trigger-value = <0x3>;
+                                       trigger-external;
+                                       reg = <2>;
+                               };
+                               trigger@3 {
+                                       trigger-name = "continuous";
+                                       trigger-value = <0x6>;
+                                       reg = <3>;
+                               };
+                       };
+
+                       aes@fc044000 {
+                               compatible = "atmel,at91sam9g46-aes";
+                               reg = <0xfc044000 0x100>;
+                               interrupts = <12 IRQ_TYPE_LEVEL_HIGH 0>;
+                               dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(41))>,
+                                      <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(40))>;
+                               dma-names = "tx", "rx";
+                               clocks = <&aes_clk>;
+                               clock-names = "aes_clk";
+                               status = "okay";
+                       };
+
+                       tdes@fc04c000 {
+                               compatible = "atmel,at91sam9g46-tdes";
+                               reg = <0xfc04c000 0x100>;
+                               interrupts = <14 IRQ_TYPE_LEVEL_HIGH 0>;
+                               dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(42))>,
+                                      <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(43))>;
+                               dma-names = "tx", "rx";
+                               clocks = <&tdes_clk>;
+                               clock-names = "tdes_clk";
+                               status = "okay";
+                       };
+
+                       sha@fc050000 {
+                               compatible = "atmel,at91sam9g46-sha";
+                               reg = <0xfc050000 0x100>;
+                               interrupts = <15 IRQ_TYPE_LEVEL_HIGH 0>;
+                               dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(44))>;
+                               dma-names = "tx";
+                               clocks = <&sha_clk>;
+                               clock-names = "sha_clk";
+                               status = "okay";
+                       };
+
+                       rstc@fc068600 {
+                               compatible = "atmel,sama5d3-rstc", "atmel,at91sam9g45-rstc";
+                               reg = <0xfc068600 0x10>;
+                               clocks = <&clk32k>;
+                       };
+
+                       shdwc@fc068610 {
+                               compatible = "atmel,at91sam9x5-shdwc";
+                               reg = <0xfc068610 0x10>;
+                               clocks = <&clk32k>;
+                       };
+
+                       pit: timer@fc068630 {
+                               compatible = "atmel,at91sam9260-pit";
+                               reg = <0xfc068630 0x10>;
+                               interrupts = <3 IRQ_TYPE_LEVEL_HIGH 5>;
+                               clocks = <&h32ck>;
+                       };
+
+                       watchdog@fc068640 {
+                               compatible = "atmel,sama5d4-wdt";
+                               reg = <0xfc068640 0x10>;
+                               interrupts = <4 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&clk32k>;
+                               status = "disabled";
+                       };
+
+                       sckc@fc068650 {
+                               compatible = "atmel,at91sam9x5-sckc";
+                               reg = <0xfc068650 0x4>;
+
+                               slow_rc_osc: slow_rc_osc {
+                                       compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
+                                       #clock-cells = <0>;
+                                       clock-frequency = <32768>;
+                                       clock-accuracy = <250000000>;
+                                       atmel,startup-time-usec = <75>;
+                               };
+
+                               slow_osc: slow_osc {
+                                       compatible = "atmel,at91sam9x5-clk-slow-osc";
+                                       #clock-cells = <0>;
+                                       clocks = <&slow_xtal>;
+                                       atmel,startup-time-usec = <1200000>;
+                               };
+
+                               clk32k: slowck {
+                                       compatible = "atmel,at91sam9x5-clk-slow";
+                                       #clock-cells = <0>;
+                                       clocks = <&slow_rc_osc &slow_osc>;
+                               };
+                       };
+
+                       rtc@fc0686b0 {
+                               compatible = "atmel,at91rm9200-rtc";
+                               reg = <0xfc0686b0 0x30>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&clk32k>;
+                       };
+
+                       dbgu: serial@fc069000 {
+                               compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
+                               reg = <0xfc069000 0x200>;
+                               interrupts = <45 IRQ_TYPE_LEVEL_HIGH 7>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_dbgu>;
+                               clocks = <&dbgu_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       pioA: gpio@fc06a000 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfc06a000 0x100>;
+                               interrupts = <23 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioA_clk>;
+                       };
+
+                       pioB: gpio@fc06b000 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfc06b000 0x100>;
+                               interrupts = <24 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioB_clk>;
+                       };
+
+                       pioC: gpio@fc06c000 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfc06c000 0x100>;
+                               interrupts = <25 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioC_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pioD: gpio@fc068000 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfc068000 0x100>;
+                               interrupts = <5 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioD_clk>;
+                       };
+
+                       pioE: gpio@fc06d000 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfc06d000 0x100>;
+                               interrupts = <26 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioE_clk>;
+                       };
+
+                       pinctrl@fc06a000 {
+                               u-boot,dm-pre-reloc;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "atmel,at91sam9x5-pinctrl", "atmel,at91rm9200-pinctrl", "simple-bus";
+                               ranges = <0xfc068000 0xfc068000 0x100
+                                         0xfc06a000 0xfc06a000 0x4000>;
+                               /* WARNING: revisit as pin spec has changed */
+                               atmel,mux-mask = <
+                                       /*   A          B          C  */
+                                       0xffffffff 0x3ffcfe7c 0x1c010101        /* pioA */
+                                       0x7fffffff 0xfffccc3a 0x3f00cc3a        /* pioB */
+                                       0xffffffff 0x3ff83fff 0xff00ffff        /* pioC */
+                                       0x0003ff00 0x8002a800 0x00000000        /* pioD */
+                                       0xffffffff 0x7fffffff 0x76fff1bf        /* pioE */
+                                       >;
+                               reg = < 0xfc06a000 0x100
+                                       0xfc06b000 0x100
+                                       0xfc06c000 0x100
+                                       0xfc068000 0x100
+                                       0xfc06d000 0x100
+                                       >;
+
+                               /* pinctrl pin settings */
+                               adc0 {
+                                       pinctrl_adc0_adtrg: adc0_adtrg {
+                                               atmel,pins =
+                                                       <AT91_PIOE 31 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* conflicts with USBA_VBUS */
+                                       };
+                                       pinctrl_adc0_ad0: adc0_ad0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 27 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                                       pinctrl_adc0_ad1: adc0_ad1 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 28 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                                       pinctrl_adc0_ad2: adc0_ad2 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 29 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                                       pinctrl_adc0_ad3: adc0_ad3 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                                       pinctrl_adc0_ad4: adc0_ad4 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 31 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               dbgu {
+                                       pinctrl_dbgu: dbgu-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_NONE>,     /* conflicts with D14 and TDI */
+                                                       <AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;  /* conflicts with D15 and TDO */
+                                       };
+                               };
+
+                               i2c0 {
+                                       pinctrl_i2c0: i2c0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE
+                                                        AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               i2c1 {
+                                       pinctrl_i2c1: i2c1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 29 AT91_PERIPH_C AT91_PINCTRL_NONE   /* TWD1, conflicts with UART0 RX and DIBP */
+                                                        AT91_PIOE 30 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* TWCK1, conflicts with UART0 TX and DIBN */
+                                       };
+                               };
+
+                               i2c2 {
+                                       pinctrl_i2c2: i2c2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 29 AT91_PERIPH_A AT91_PINCTRL_NONE   /* TWD2, conflicts with RD0 and PWML1 */
+                                                        AT91_PIOB 30 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* TWCK2, conflicts with RF0 */
+                                       };
+                               };
+
+                               isi {
+                                       pinctrl_isi_data_0_7: isi-0-data-0-7 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 19 AT91_PERIPH_A AT91_PINCTRL_NONE   /* ISI_D0 */
+                                                        AT91_PIOC 20 AT91_PERIPH_A AT91_PINCTRL_NONE   /* ISI_D1 */
+                                                        AT91_PIOC 21 AT91_PERIPH_A AT91_PINCTRL_NONE   /* ISI_D2 */
+                                                        AT91_PIOC 22 AT91_PERIPH_A AT91_PINCTRL_NONE   /* ISI_D3 */
+                                                        AT91_PIOC 23 AT91_PERIPH_A AT91_PINCTRL_NONE   /* ISI_D4 */
+                                                        AT91_PIOC 24 AT91_PERIPH_A AT91_PINCTRL_NONE   /* ISI_D5 */
+                                                        AT91_PIOC 25 AT91_PERIPH_A AT91_PINCTRL_NONE   /* ISI_D6 */
+                                                        AT91_PIOC 26 AT91_PERIPH_A AT91_PINCTRL_NONE   /* ISI_D7 */
+                                                        AT91_PIOB  1 AT91_PERIPH_C AT91_PINCTRL_NONE   /* ISI_PCK, conflict with G0_RXCK */
+                                                        AT91_PIOB  3 AT91_PERIPH_C AT91_PINCTRL_NONE   /* ISI_VSYNC */
+                                                        AT91_PIOB  4 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* ISI_HSYNC */
+                                       };
+                                       pinctrl_isi_data_8_9: isi-0-data-8-9 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 0 AT91_PERIPH_C AT91_PINCTRL_NONE    /* ISI_D8, conflicts with SPI0_MISO, PWMH2 */
+                                                        AT91_PIOC 1 AT91_PERIPH_C AT91_PINCTRL_NONE>;  /* ISI_D9, conflicts with SPI0_MOSI, PWML2 */
+                                       };
+                                       pinctrl_isi_data_10_11: isi-0-data-10-11 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 2 AT91_PERIPH_C AT91_PINCTRL_NONE    /* ISI_D10, conflicts with SPI0_SPCK, PWMH3 */
+                                                        AT91_PIOC 3 AT91_PERIPH_C AT91_PINCTRL_NONE>;  /* ISI_D11, conflicts with SPI0_NPCS0, PWML3 */
+                                       };
+                               };
+
+                               lcd {
+                                       pinctrl_lcd_base: lcd-base-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDVSYNC */
+                                                        AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDHSYNC */
+                                                        AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDDEN */
+                                                        AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDPCK */
+                                       };
+                                       pinctrl_lcd_pwm: lcd-pwm-0 {
+                                               atmel,pins = <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE>;    /* LCDPWM */
+                                       };
+                                       pinctrl_lcd_rgb444: lcd-rgb-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD0 pin */
+                                                        AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD1 pin */
+                                                        AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD8 pin */
+                                                        AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD9 pin */
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD11 pin */
+                                       };
+                                       pinctrl_lcd_rgb565: lcd-rgb-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD0 pin */
+                                                        AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD1 pin */
+                                                        AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD8 pin */
+                                                        AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD9 pin */
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD11 pin */
+                                                        AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD12 pin */
+                                                        AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
+                                                        AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
+                                                        AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD15 pin */
+                                       };
+                                       pinctrl_lcd_rgb666: lcd-rgb-2 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD11 pin */
+                                                        AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD12 pin */
+                                                        AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
+                                                        AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
+                                                        AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD15 pin */
+                                                        AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD18 pin */
+                                                        AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD19 pin */
+                                                        AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD20 pin */
+                                                        AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD21 pin */
+                                                        AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD22 pin */
+                                                        AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD23 pin */
+                                       };
+                                       pinctrl_lcd_rgb777: lcd-rgb-3 {
+                                               atmel,pins =
+                                                        /* LCDDAT0 conflicts with TMS */
+                                                       <AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD1 pin */
+                                                        AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        /* LCDDAT8 conflicts with TCK */
+                                                        AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD9 pin */
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD11 pin */
+                                                        AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD12 pin */
+                                                        AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
+                                                        AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
+                                                        AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD15 pin */
+                                                        /* LCDDAT16 conflicts with NTRST */
+                                                        AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD17 pin */
+                                                        AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD18 pin */
+                                                        AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD19 pin */
+                                                        AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD20 pin */
+                                                        AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD21 pin */
+                                                        AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD22 pin */
+                                                        AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD23 pin */
+                                       };
+                                       pinctrl_lcd_rgb888: lcd-rgb-4 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD0 pin */
+                                                        AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD1 pin */
+                                                        AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD8 pin */
+                                                        AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD9 pin */
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD11 pin */
+                                                        AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD12 pin */
+                                                        AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
+                                                        AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
+                                                        AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD15 pin */
+                                                        AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD16 pin */
+                                                        AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD17 pin */
+                                                        AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD18 pin */
+                                                        AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD19 pin */
+                                                        AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD20 pin */
+                                                        AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD21 pin */
+                                                        AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD22 pin */
+                                                        AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD23 pin */
+                                       };
+                               };
+
+                               macb0 {
+                                       pinctrl_macb0_rmii: macb0_rmii-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* G0_TX0 */
+                                                        AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* G0_TX1 */
+                                                        AT91_PIOB  8 AT91_PERIPH_A AT91_PINCTRL_NONE   /* G0_RX0 */
+                                                        AT91_PIOB  9 AT91_PERIPH_A AT91_PINCTRL_NONE   /* G0_RX1 */
+                                                        AT91_PIOB  6 AT91_PERIPH_A AT91_PINCTRL_NONE   /* G0_RXDV */
+                                                        AT91_PIOB  7 AT91_PERIPH_A AT91_PINCTRL_NONE   /* G0_RXER */
+                                                        AT91_PIOB  2 AT91_PERIPH_A AT91_PINCTRL_NONE   /* G0_TXEN */
+                                                        AT91_PIOB  0 AT91_PERIPH_A AT91_PINCTRL_NONE   /* G0_TXCK */
+                                                        AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* G0_MDC */
+                                                        AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* G0_MDIO */
+                                                       >;
+                                       };
+                               };
+
+                               macb1 {
+                                       pinctrl_macb1_rmii: macb1_rmii-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 14 AT91_PERIPH_B AT91_PINCTRL_NONE   /* G1_TX0 */
+                                                        AT91_PIOA 15 AT91_PERIPH_B AT91_PINCTRL_NONE   /* G1_TX1 */
+                                                        AT91_PIOA 12 AT91_PERIPH_B AT91_PINCTRL_NONE   /* G1_RX0 */
+                                                        AT91_PIOA 13 AT91_PERIPH_B AT91_PINCTRL_NONE   /* G1_RX1 */
+                                                        AT91_PIOA 10 AT91_PERIPH_B AT91_PINCTRL_NONE   /* G1_RXDV */
+                                                        AT91_PIOA 11 AT91_PERIPH_B AT91_PINCTRL_NONE   /* G1_RXER */
+                                                        AT91_PIOA  4 AT91_PERIPH_B AT91_PINCTRL_NONE   /* G1_TXEN */
+                                                        AT91_PIOA  2 AT91_PERIPH_B AT91_PINCTRL_NONE   /* G1_TXCK */
+                                                        AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE   /* G1_MDC */
+                                                        AT91_PIOA 23 AT91_PERIPH_B AT91_PINCTRL_NONE   /* G1_MDIO */
+                                                       >;
+                                       };
+                               };
+
+                               mmc0 {
+                                       pinctrl_mmc0_clk_cmd_dat0: mmc0_clk_cmd_dat0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 4 AT91_PERIPH_B AT91_PINCTRL_NONE    /* MCI0_CK, conflict with PCK1(ISI_MCK) */
+                                                        AT91_PIOC 5 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_CDA, conflict with NAND_D0 */
+                                                        AT91_PIOC 6 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DA0, conflict with NAND_D1 */
+                                                       >;
+                                       };
+                                       pinctrl_mmc0_dat1_3: mmc0_dat1_3 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 7 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DA1, conflict with NAND_D2 */
+                                                        AT91_PIOC 8 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DA2, conflict with NAND_D3 */
+                                                        AT91_PIOC 9 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DA3, conflict with NAND_D4 */
+                                                       >;
+                                       };
+                                       pinctrl_mmc0_dat4_7: mmc0_dat4_7 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 10 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* MCI0_DA4, conflict with NAND_D5 */
+                                                        AT91_PIOC 11 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* MCI0_DA5, conflict with NAND_D6 */
+                                                        AT91_PIOC 12 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* MCI0_DA6, conflict with NAND_D7 */
+                                                        AT91_PIOC 13 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* MCI0_DA7, conflict with NAND_OE */
+                                                       >;
+                                       };
+                               };
+
+                               mmc1 {
+                                       u-boot,dm-pre-reloc;
+                                       pinctrl_mmc1_clk_cmd_dat0: mmc1_clk_cmd_dat0 {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOE 18 AT91_PERIPH_C AT91_PINCTRL_NONE           /* MCI1_CK */
+                                                        AT91_PIOE 19 AT91_PERIPH_C AT91_PINCTRL_PULL_UP        /* MCI1_CDA */
+                                                        AT91_PIOE 20 AT91_PERIPH_C AT91_PINCTRL_PULL_UP        /* MCI1_DA0 */
+                                                       >;
+                                       };
+                                       pinctrl_mmc1_dat1_3: mmc1_dat1_3 {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOE 21 AT91_PERIPH_C AT91_PINCTRL_PULL_UP        /* MCI1_DA1 */
+                                                        AT91_PIOE 22 AT91_PERIPH_C AT91_PINCTRL_PULL_UP        /* MCI1_DA2 */
+                                                        AT91_PIOE 23 AT91_PERIPH_C AT91_PINCTRL_PULL_UP        /* MCI1_DA3 */
+                                                       >;
+                                       };
+                               };
+
+                               nand0 {
+                                       pinctrl_nand: nand-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC13 periph A Read Enable */
+                                                        AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC14 periph A Write Enable */
+
+                                                        AT91_PIOC 17 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PC17 ALE */
+                                                        AT91_PIOC 18 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PC18 CLE */
+
+                                                        AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PC15 NCS3/Chip Enable */
+                                                        AT91_PIOC 16 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PC16 NANDRDY */
+                                                        AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC5 Data bit 0 */
+                                                        AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC6 Data bit 1 */
+                                                        AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC7 Data bit 2 */
+                                                        AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC8 Data bit 3 */
+                                                        AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC9 Data bit 4 */
+                                                        AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC10 Data bit 5 */
+                                                        AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC11 periph A Data bit 6 */
+                                                        AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC12 periph A Data bit 7 */
+                                       };
+                               };
+
+                               spi0 {
+                                       u-boot,dm-pre-reloc;
+                                       pinctrl_spi0: spi0-0 {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* SPI0_MISO */
+                                                        AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* SPI0_MOSI */
+                                                        AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* SPI0_SPCK */
+                                                       >;
+                                       };
+                               };
+
+                               ssc0 {
+                                       pinctrl_ssc0_tx: ssc0_tx {
+                                               atmel,pins =
+                                                       <AT91_PIOB 27 AT91_PERIPH_B AT91_PINCTRL_NONE   /* TK0 */
+                                                        AT91_PIOB 31 AT91_PERIPH_B AT91_PINCTRL_NONE   /* TF0 */
+                                                        AT91_PIOB 28 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* TD0 */
+                                       };
+
+                                       pinctrl_ssc0_rx: ssc0_rx {
+                                               atmel,pins =
+                                                       <AT91_PIOB 26 AT91_PERIPH_B AT91_PINCTRL_NONE   /* RK0 */
+                                                        AT91_PIOB 30 AT91_PERIPH_B AT91_PINCTRL_NONE   /* RF0 */
+                                                        AT91_PIOB 29 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* RD0 */
+                                       };
+                               };
+
+                               ssc1 {
+                                       pinctrl_ssc1_tx: ssc1_tx {
+                                               atmel,pins =
+                                                       <AT91_PIOC 19 AT91_PERIPH_B AT91_PINCTRL_NONE   /* TK1 */
+                                                        AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE   /* TF1 */
+                                                        AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* TD1 */
+                                       };
+
+                                       pinctrl_ssc1_rx: ssc1_rx {
+                                               atmel,pins =
+                                                       <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE   /* RK1 */
+                                                        AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_NONE   /* RF1 */
+                                                        AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* RD1 */
+                                       };
+                               };
+
+                               spi1 {
+                                       pinctrl_spi1: spi1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 18 AT91_PERIPH_A AT91_PINCTRL_NONE   /* SPI1_MISO */
+                                                        AT91_PIOB 19 AT91_PERIPH_A AT91_PINCTRL_NONE   /* SPI1_MOSI */
+                                                        AT91_PIOB 20 AT91_PERIPH_A AT91_PINCTRL_NONE   /* SPI1_SPCK */
+                                                       >;
+                                       };
+                               };
+
+                               spi2 {
+                                       pinctrl_spi2: spi2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 11 AT91_PERIPH_B AT91_PINCTRL_NONE   /* SPI2_MISO conflicts with RTS0 */
+                                                        AT91_PIOD 13 AT91_PERIPH_B AT91_PINCTRL_NONE   /* SPI2_MOSI conflicts with TXD0 */
+                                                        AT91_PIOD 15 AT91_PERIPH_B AT91_PINCTRL_NONE   /* SPI2_SPCK conflicts with RTS1 */
+                                                       >;
+                                       };
+                               };
+
+                               uart0 {
+                                       pinctrl_uart0: uart0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 29 AT91_PERIPH_B AT91_PINCTRL_NONE           /* RXD */
+                                                        AT91_PIOE 30 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* TXD */
+                                                       >;
+                                       };
+                               };
+
+                               uart1 {
+                                       pinctrl_uart1: uart1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 25 AT91_PERIPH_C AT91_PINCTRL_NONE           /* RXD */
+                                                        AT91_PIOC 26 AT91_PERIPH_C AT91_PINCTRL_PULL_UP        /* TXD */
+                                                       >;
+                                       };
+                               };
+
+                               usart0 {
+                                       pinctrl_usart0: usart0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 12 AT91_PERIPH_A AT91_PINCTRL_NONE           /* RXD */
+                                                        AT91_PIOD 13 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* TXD */
+                                                       >;
+                                       };
+                                       pinctrl_usart0_rts: usart0_rts-0 {
+                                               atmel,pins = <AT91_PIOD 11 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                                       pinctrl_usart0_cts: usart0_cts-0 {
+                                               atmel,pins = <AT91_PIOD 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               usart1 {
+                                       pinctrl_usart1: usart1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 16 AT91_PERIPH_A AT91_PINCTRL_NONE           /* RXD */
+                                                        AT91_PIOD 17 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* TXD */
+                                                       >;
+                                       };
+                                       pinctrl_usart1_rts: usart1_rts-0 {
+                                               atmel,pins = <AT91_PIOD 15 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                                       pinctrl_usart1_cts: usart1_cts-0 {
+                                               atmel,pins = <AT91_PIOD 14 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               usart2 {
+                                       pinctrl_usart2: usart2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 4 AT91_PERIPH_B AT91_PINCTRL_NONE            /* RXD - conflicts with G0_CRS, ISI_HSYNC */
+                                                        AT91_PIOB 5 AT91_PERIPH_B AT91_PINCTRL_PULL_UP         /* TXD - conflicts with G0_COL, PCK2 */
+                                                       >;
+                                       };
+                                       pinctrl_usart2_rts: usart2_rts-0 {
+                                               atmel,pins = <AT91_PIOB 11 AT91_PERIPH_B AT91_PINCTRL_NONE>;    /* conflicts with G0_RX3, PWMH1 */
+                                       };
+                                       pinctrl_usart2_cts: usart2_cts-0 {
+                                               atmel,pins = <AT91_PIOB 3 AT91_PERIPH_B AT91_PINCTRL_NONE>;     /* conflicts with G0_TXER, ISI_VSYNC */
+                                       };
+                               };
+
+                               usart3 {
+                                       u-boot,dm-pre-reloc;
+                                       pinctrl_usart3: usart3-0 {
+                                               u-boot,dm-pre-reloc;
+                                               atmel,pins =
+                                                       <AT91_PIOE 16 AT91_PERIPH_B AT91_PINCTRL_NONE           /* RXD */
+                                                        AT91_PIOE 17 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* TXD */
+                                                       >;
+                                       };
+                               };
+
+                               usart4 {
+                                       pinctrl_usart4: usart4-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOE 26 AT91_PERIPH_B AT91_PINCTRL_NONE           /* RXD */
+                                                        AT91_PIOE 27 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* TXD */
+                                                       >;
+                                       };
+                                       pinctrl_usart4_rts: usart4_rts-0 {
+                                               atmel,pins = <AT91_PIOE 28 AT91_PERIPH_B AT91_PINCTRL_NONE>;    /* conflicts with NWAIT, A19 */
+                                       };
+                                       pinctrl_usart4_cts: usart4_cts-0 {
+                                               atmel,pins = <AT91_PIOE 0 AT91_PERIPH_C AT91_PINCTRL_NONE>;     /* conflicts with A0/NBS0, MCI0_CDB */
+                                       };
+                               };
+                       };
+
+                       aic: interrupt-controller@fc06e000 {
+                               #interrupt-cells = <3>;
+                               compatible = "atmel,sama5d4-aic";
+                               interrupt-controller;
+                               reg = <0xfc06e000 0x200>;
+                               atmel,external-irqs = <56>;
+                       };
+               };
+       };
+};
index 7d3f9894723969a16e2b04a26107f16546fd3fcc..833a87d8a2fce8b82344e2b8d0c08b5e1c68f31e 100644 (file)
@@ -7,7 +7,7 @@
 #include "socfpga_cyclone5.dtsi"
 
 / {
-       model = "DENX MCVEVK";
+       model = "Aries MCVEVK";
        compatible = "altr,socfpga-cyclone5", "altr,socfpga";
 
        chosen {
@@ -54,5 +54,6 @@
 };
 
 &usb1 {
+       disable-over-current;
        status = "okay";
 };
index d4df1a14da13d7ce913b925305dc441939011aa2..f175ef2ead9d76ac1c08bb9c969d10dcf2aa644e 100644 (file)
        rxc-skew-ps = <2000>;
 };
 
+&gpio0 {
+       status = "okay";
+};
+
 &gpio1 {
        status = "okay";
 };
 
+&gpio2 {
+       status = "okay";
+};
+
 &i2c0 {
        status = "okay";
 
diff --git a/arch/arm/include/asm/arch-meson/sd_emmc.h b/arch/arm/include/asm/arch-meson/sd_emmc.h
new file mode 100644 (file)
index 0000000..a09e034
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * (C) Copyright 2016 Carlo Caione <carlo@caione.org>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __SD_EMMC_H__
+#define __SD_EMMC_H__
+
+#include <mmc.h>
+
+#define SDIO_PORT_A                    0
+#define SDIO_PORT_B                    1
+#define SDIO_PORT_C                    2
+
+#define SD_EMMC_CLKSRC_24M             24000000        /* 24 MHz */
+#define SD_EMMC_CLKSRC_DIV2            1000000000      /* 1 GHz */
+
+#define MESON_SD_EMMC_CLOCK            0x00
+#define   CLK_MAX_DIV                  63
+#define   CLK_SRC_24M                  (0 << 6)
+#define   CLK_SRC_DIV2                 (1 << 6)
+#define   CLK_CO_PHASE_000             (0 << 8)
+#define   CLK_CO_PHASE_090             (1 << 8)
+#define   CLK_CO_PHASE_180             (2 << 8)
+#define   CLK_CO_PHASE_270             (3 << 8)
+#define   CLK_TX_PHASE_000             (0 << 10)
+#define   CLK_TX_PHASE_090             (1 << 10)
+#define   CLK_TX_PHASE_180             (2 << 10)
+#define   CLK_TX_PHASE_270             (3 << 10)
+#define   CLK_ALWAYS_ON                        BIT(24)
+
+#define MESON_SD_EMMC_CFG              0x44
+#define   CFG_BUS_WIDTH_MASK           GENMASK(1, 0)
+#define   CFG_BUS_WIDTH_1              0
+#define   CFG_BUS_WIDTH_4              1
+#define   CFG_BUS_WIDTH_8              2
+#define   CFG_BL_LEN_MASK              GENMASK(7, 4)
+#define   CFG_BL_LEN_SHIFT             4
+#define   CFG_BL_LEN_512               (9 << 4)
+#define   CFG_RESP_TIMEOUT_MASK                GENMASK(11, 8)
+#define   CFG_RESP_TIMEOUT_256         (8 << 8)
+#define   CFG_RC_CC_MASK               GENMASK(15, 12)
+#define   CFG_RC_CC_16                 (4 << 12)
+#define   CFG_SDCLK_ALWAYS_ON          BIT(18)
+#define   CFG_AUTO_CLK                 BIT(23)
+
+#define MESON_SD_EMMC_STATUS           0x48
+#define   STATUS_MASK                  GENMASK(15, 0)
+#define   STATUS_ERR_MASK              GENMASK(12, 0)
+#define   STATUS_RXD_ERR_MASK          GENMASK(7, 0)
+#define   STATUS_TXD_ERR               BIT(8)
+#define   STATUS_DESC_ERR              BIT(9)
+#define   STATUS_RESP_ERR              BIT(10)
+#define   STATUS_RESP_TIMEOUT          BIT(11)
+#define   STATUS_DESC_TIMEOUT          BIT(12)
+#define   STATUS_END_OF_CHAIN          BIT(13)
+
+#define MESON_SD_EMMC_IRQ_EN           0x4c
+
+#define MESON_SD_EMMC_CMD_CFG          0x50
+#define   CMD_CFG_LENGTH_MASK          GENMASK(8, 0)
+#define   CMD_CFG_BLOCK_MODE           BIT(9)
+#define   CMD_CFG_R1B                  BIT(10)
+#define   CMD_CFG_END_OF_CHAIN         BIT(11)
+#define   CMD_CFG_TIMEOUT_4S           (12 << 12)
+#define   CMD_CFG_NO_RESP              BIT(16)
+#define   CMD_CFG_DATA_IO              BIT(18)
+#define   CMD_CFG_DATA_WR              BIT(19)
+#define   CMD_CFG_RESP_NOCRC           BIT(20)
+#define   CMD_CFG_RESP_128             BIT(21)
+#define   CMD_CFG_CMD_INDEX_SHIFT      24
+#define   CMD_CFG_OWNER                        BIT(31)
+
+#define MESON_SD_EMMC_CMD_ARG          0x54
+#define MESON_SD_EMMC_CMD_DAT          0x58
+#define MESON_SD_EMMC_CMD_RSP          0x5c
+#define MESON_SD_EMMC_CMD_RSP1         0x60
+#define MESON_SD_EMMC_CMD_RSP2         0x64
+#define MESON_SD_EMMC_CMD_RSP3         0x68
+
+struct meson_mmc_platdata {
+       struct mmc_config cfg;
+       struct mmc mmc;
+       void *regbase;
+       void *w_buf;
+};
+
+#endif
index a03abfc3104e42f2e575ae71bc08a4985b8d471a..28c8cf260a1f223619c164c3816880bff72953a2 100644 (file)
@@ -18,45 +18,45 @@ unsigned int has_lcdc()
 
 void at91_serial0_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTA, 0, 1);                /* TXD0 */
-       at91_set_a_periph(AT91_PIO_PORTA, 1, 0);                /* RXD0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 0, 1);           /* TXD0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 1, 0);           /* RXD0 */
        at91_periph_clk_enable(ATMEL_ID_USART0);
 }
 
 void at91_serial1_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTA, 5, 1);                /* TXD1 */
-       at91_set_a_periph(AT91_PIO_PORTA, 6, 0);                /* RXD1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 5, 1);           /* TXD1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 6, 0);           /* RXD1 */
        at91_periph_clk_enable(ATMEL_ID_USART1);
 }
 
 void at91_serial2_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTA, 7, 1);                /* TXD2 */
-       at91_set_a_periph(AT91_PIO_PORTA, 8, 0);                /* RXD2 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 7, 1);           /* TXD2 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 8, 0);           /* RXD2 */
        at91_periph_clk_enable(ATMEL_ID_USART2);
 }
 
 void at91_serial3_hw_init(void)
 {
-       at91_set_b_periph(AT91_PIO_PORTC, 22, 1);               /* TXD3 */
-       at91_set_b_periph(AT91_PIO_PORTC, 23, 0);               /* RXD3 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 22, 1);          /* TXD3 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 23, 0);          /* RXD3 */
        at91_periph_clk_enable(ATMEL_ID_USART3);
 }
 
 void at91_seriald_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTA, 10, 1);               /* DTXD */
-       at91_set_a_periph(AT91_PIO_PORTA, 9, 0);                /* DRXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 10, 1);          /* DTXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 9, 0);           /* DRXD */
        at91_periph_clk_enable(ATMEL_ID_SYS);
 }
 
 #ifdef CONFIG_ATMEL_SPI
 void at91_spi0_hw_init(unsigned long cs_mask)
 {
-       at91_set_a_periph(AT91_PIO_PORTA, 11, 0);       /* SPI0_MISO */
-       at91_set_a_periph(AT91_PIO_PORTA, 12, 0);       /* SPI0_MOSI */
-       at91_set_a_periph(AT91_PIO_PORTA, 13, 0);       /* SPI0_SPCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 11, 0);  /* SPI0_MISO */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 12, 0);  /* SPI0_MOSI */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 13, 0);  /* SPI0_SPCK */
 
        at91_periph_clk_enable(ATMEL_ID_SPI0);
 
@@ -72,9 +72,9 @@ void at91_spi0_hw_init(unsigned long cs_mask)
 
 void at91_spi1_hw_init(unsigned long cs_mask)
 {
-       at91_set_b_periph(AT91_PIO_PORTA, 21, 0);       /* SPI1_MISO */
-       at91_set_b_periph(AT91_PIO_PORTA, 22, 0);       /* SPI1_MOSI */
-       at91_set_b_periph(AT91_PIO_PORTA, 23, 0);       /* SPI1_SPCK */
+       at91_pio3_set_b_periph(AT91_PIO_PORTA, 21, 0);  /* SPI1_MISO */
+       at91_pio3_set_b_periph(AT91_PIO_PORTA, 22, 0);  /* SPI1_MOSI */
+       at91_pio3_set_b_periph(AT91_PIO_PORTA, 23, 0);  /* SPI1_SPCK */
 
        at91_periph_clk_enable(ATMEL_ID_SPI1);
 
@@ -91,12 +91,12 @@ void at91_spi1_hw_init(unsigned long cs_mask)
 
 void at91_mci_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTA, 17, 0);       /* MCCK */
-       at91_set_a_periph(AT91_PIO_PORTA, 16, 0);       /* MCCDA */
-       at91_set_a_periph(AT91_PIO_PORTA, 15, 0);       /* MCDA0 */
-       at91_set_a_periph(AT91_PIO_PORTA, 18, 0);       /* MCDA1 */
-       at91_set_a_periph(AT91_PIO_PORTA, 19, 0);       /* MCDA2 */
-       at91_set_a_periph(AT91_PIO_PORTA, 20, 0);       /* MCDA3 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 17, 0);  /* MCCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 16, 0);  /* MCCDA */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 15, 0);  /* MCDA0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 18, 0);  /* MCDA1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 19, 0);  /* MCDA2 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 20, 0);  /* MCDA3 */
 
        at91_periph_clk_enable(ATMEL_ID_HSMCI0);
 }
@@ -104,37 +104,37 @@ void at91_mci_hw_init(void)
 #ifdef CONFIG_LCD
 void at91_lcd_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTC, 24, 0);       /* LCDDPWR */
-       at91_set_a_periph(AT91_PIO_PORTC, 26, 0);       /* LCDVSYNC */
-       at91_set_a_periph(AT91_PIO_PORTC, 27, 0);       /* LCDHSYNC */
-       at91_set_a_periph(AT91_PIO_PORTC, 28, 0);       /* LCDDOTCK */
-       at91_set_a_periph(AT91_PIO_PORTC, 29, 0);       /* LCDDEN */
-       at91_set_a_periph(AT91_PIO_PORTC, 30, 0);       /* LCDDOTCK */
-
-       at91_set_a_periph(AT91_PIO_PORTC, 0, 0);        /* LCDD0 */
-       at91_set_a_periph(AT91_PIO_PORTC, 1, 0);        /* LCDD1 */
-       at91_set_a_periph(AT91_PIO_PORTC, 2, 0);        /* LCDD2 */
-       at91_set_a_periph(AT91_PIO_PORTC, 3, 0);        /* LCDD3 */
-       at91_set_a_periph(AT91_PIO_PORTC, 4, 0);        /* LCDD4 */
-       at91_set_a_periph(AT91_PIO_PORTC, 5, 0);        /* LCDD5 */
-       at91_set_a_periph(AT91_PIO_PORTC, 6, 0);        /* LCDD6 */
-       at91_set_a_periph(AT91_PIO_PORTC, 7, 0);        /* LCDD7 */
-       at91_set_a_periph(AT91_PIO_PORTC, 8, 0);        /* LCDD8 */
-       at91_set_a_periph(AT91_PIO_PORTC, 9, 0);        /* LCDD9 */
-       at91_set_a_periph(AT91_PIO_PORTC, 10, 0);       /* LCDD10 */
-       at91_set_a_periph(AT91_PIO_PORTC, 11, 0);       /* LCDD11 */
-       at91_set_a_periph(AT91_PIO_PORTC, 12, 0);       /* LCDD12 */
-       at91_set_a_periph(AT91_PIO_PORTC, 13, 0);       /* LCDD13 */
-       at91_set_a_periph(AT91_PIO_PORTC, 14, 0);       /* LCDD14 */
-       at91_set_a_periph(AT91_PIO_PORTC, 15, 0);       /* LCDD15 */
-       at91_set_a_periph(AT91_PIO_PORTC, 16, 0);       /* LCDD16 */
-       at91_set_a_periph(AT91_PIO_PORTC, 17, 0);       /* LCDD17 */
-       at91_set_a_periph(AT91_PIO_PORTC, 18, 0);       /* LCDD18 */
-       at91_set_a_periph(AT91_PIO_PORTC, 19, 0);       /* LCDD19 */
-       at91_set_a_periph(AT91_PIO_PORTC, 20, 0);       /* LCDD20 */
-       at91_set_a_periph(AT91_PIO_PORTC, 21, 0);       /* LCDD21 */
-       at91_set_a_periph(AT91_PIO_PORTC, 22, 0);       /* LCDD22 */
-       at91_set_a_periph(AT91_PIO_PORTC, 23, 0);       /* LCDD23 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 24, 0);  /* LCDDPWR */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 26, 0);  /* LCDVSYNC */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 27, 0);  /* LCDHSYNC */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 28, 0);  /* LCDDOTCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 29, 0);  /* LCDDEN */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 30, 0);  /* LCDDOTCK */
+
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 0, 0);   /* LCDD0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 1, 0);   /* LCDD1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 2, 0);   /* LCDD2 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 3, 0);   /* LCDD3 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 4, 0);   /* LCDD4 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 5, 0);   /* LCDD5 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 6, 0);   /* LCDD6 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 7, 0);   /* LCDD7 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 8, 0);   /* LCDD8 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 9, 0);   /* LCDD9 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 10, 0);  /* LCDD10 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 11, 0);  /* LCDD11 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 12, 0);  /* LCDD12 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 13, 0);  /* LCDD13 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 14, 0);  /* LCDD14 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 15, 0);  /* LCDD15 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 16, 0);  /* LCDD16 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 17, 0);  /* LCDD17 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 18, 0);  /* LCDD18 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 19, 0);  /* LCDD19 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 20, 0);  /* LCDD20 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 21, 0);  /* LCDD21 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 22, 0);  /* LCDD22 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 23, 0);  /* LCDD23 */
 
        at91_periph_clk_enable(ATMEL_ID_LCDC);
 }
index 3e4555a1a1222f99dc05067c7ded0d338b3d1e90..8de086efd6b56178f6f3d980b8d3c9a675148ffc 100644 (file)
@@ -64,32 +64,32 @@ char *get_cpu_name()
 
 void at91_seriald_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTA, 9, 0);        /* DRXD */
-       at91_set_a_periph(AT91_PIO_PORTA, 10, 1);       /* DTXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 9, 0);   /* DRXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 10, 1);  /* DTXD */
 
        at91_periph_clk_enable(ATMEL_ID_SYS);
 }
 
 void at91_serial0_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTA, 0, 1);        /* TXD */
-       at91_set_a_periph(AT91_PIO_PORTA, 1, 0);        /* RXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 0, 1);   /* TXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 1, 0);   /* RXD */
 
        at91_periph_clk_enable(ATMEL_ID_USART0);
 }
 
 void at91_serial1_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTA, 5, 1);        /* TXD */
-       at91_set_a_periph(AT91_PIO_PORTA, 6, 0);        /* RXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 5, 1);   /* TXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 6, 0);   /* RXD */
 
        at91_periph_clk_enable(ATMEL_ID_USART1);
 }
 
 void at91_serial2_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTA, 7, 1);        /* TXD */
-       at91_set_a_periph(AT91_PIO_PORTA, 8, 0);        /* RXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 7, 1);   /* TXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 8, 0);   /* RXD */
 
        at91_periph_clk_enable(ATMEL_ID_USART2);
 }
@@ -97,12 +97,12 @@ void at91_serial2_hw_init(void)
 void at91_mci_hw_init(void)
 {
        /* Initialize the MCI0 */
-       at91_set_a_periph(AT91_PIO_PORTA, 17, 1);       /* MCCK */
-       at91_set_a_periph(AT91_PIO_PORTA, 16, 1);       /* MCCDA */
-       at91_set_a_periph(AT91_PIO_PORTA, 15, 1);       /* MCDA0 */
-       at91_set_a_periph(AT91_PIO_PORTA, 18, 1);       /* MCDA1 */
-       at91_set_a_periph(AT91_PIO_PORTA, 19, 1);       /* MCDA2 */
-       at91_set_a_periph(AT91_PIO_PORTA, 20, 1);       /* MCDA3 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 17, 1);  /* MCCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 16, 1);  /* MCCDA */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 15, 1);  /* MCDA0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 18, 1);  /* MCDA1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 19, 1);  /* MCDA2 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 20, 1);  /* MCDA3 */
 
        at91_periph_clk_enable(ATMEL_ID_HSMCI0);
 }
@@ -110,20 +110,20 @@ void at91_mci_hw_init(void)
 #ifdef CONFIG_ATMEL_SPI
 void at91_spi0_hw_init(unsigned long cs_mask)
 {
-       at91_set_a_periph(AT91_PIO_PORTA, 11, 0);       /* SPI0_MISO */
-       at91_set_a_periph(AT91_PIO_PORTA, 12, 0);       /* SPI0_MOSI */
-       at91_set_a_periph(AT91_PIO_PORTA, 13, 0);       /* SPI0_SPCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 11, 0);  /* SPI0_MISO */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 12, 0);  /* SPI0_MOSI */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 13, 0);  /* SPI0_SPCK */
 
        at91_periph_clk_enable(ATMEL_ID_SPI0);
 
        if (cs_mask & (1 << 0))
-               at91_set_a_periph(AT91_PIO_PORTA, 14, 0);
+               at91_pio3_set_a_periph(AT91_PIO_PORTA, 14, 0);
        if (cs_mask & (1 << 1))
-               at91_set_b_periph(AT91_PIO_PORTA, 7, 0);
+               at91_pio3_set_b_periph(AT91_PIO_PORTA, 7, 0);
        if (cs_mask & (1 << 2))
-               at91_set_b_periph(AT91_PIO_PORTA, 1, 0);
+               at91_pio3_set_b_periph(AT91_PIO_PORTA, 1, 0);
        if (cs_mask & (1 << 3))
-               at91_set_b_periph(AT91_PIO_PORTB, 3, 0);
+               at91_pio3_set_b_periph(AT91_PIO_PORTB, 3, 0);
        if (cs_mask & (1 << 4))
                at91_set_pio_output(AT91_PIO_PORTA, 14, 0);
        if (cs_mask & (1 << 5))
@@ -136,20 +136,20 @@ void at91_spi0_hw_init(unsigned long cs_mask)
 
 void at91_spi1_hw_init(unsigned long cs_mask)
 {
-       at91_set_b_periph(AT91_PIO_PORTA, 21, 0);       /* SPI1_MISO */
-       at91_set_b_periph(AT91_PIO_PORTA, 22, 0);       /* SPI1_MOSI */
-       at91_set_b_periph(AT91_PIO_PORTA, 23, 0);       /* SPI1_SPCK */
+       at91_pio3_set_b_periph(AT91_PIO_PORTA, 21, 0);  /* SPI1_MISO */
+       at91_pio3_set_b_periph(AT91_PIO_PORTA, 22, 0);  /* SPI1_MOSI */
+       at91_pio3_set_b_periph(AT91_PIO_PORTA, 23, 0);  /* SPI1_SPCK */
 
        at91_periph_clk_enable(ATMEL_ID_SPI1);
 
        if (cs_mask & (1 << 0))
-               at91_set_b_periph(AT91_PIO_PORTA, 8, 0);
+               at91_pio3_set_b_periph(AT91_PIO_PORTA, 8, 0);
        if (cs_mask & (1 << 1))
-               at91_set_b_periph(AT91_PIO_PORTA, 0, 0);
+               at91_pio3_set_b_periph(AT91_PIO_PORTA, 0, 0);
        if (cs_mask & (1 << 2))
-               at91_set_b_periph(AT91_PIO_PORTA, 31, 0);
+               at91_pio3_set_b_periph(AT91_PIO_PORTA, 31, 0);
        if (cs_mask & (1 << 3))
-               at91_set_b_periph(AT91_PIO_PORTA, 30, 0);
+               at91_pio3_set_b_periph(AT91_PIO_PORTA, 30, 0);
        if (cs_mask & (1 << 4))
                at91_set_pio_output(AT91_PIO_PORTA, 8, 0);
        if (cs_mask & (1 << 5))
@@ -181,45 +181,45 @@ void at91_macb_hw_init(void)
                /* Enable EMAC0 clock */
                at91_periph_clk_enable(ATMEL_ID_EMAC0);
                /* EMAC0 pins setup */
-               at91_set_a_periph(AT91_PIO_PORTB, 4, 0);        /* ETXCK */
-               at91_set_a_periph(AT91_PIO_PORTB, 3, 0);        /* ERXDV */
-               at91_set_a_periph(AT91_PIO_PORTB, 0, 0);        /* ERX0 */
-               at91_set_a_periph(AT91_PIO_PORTB, 1, 0);        /* ERX1 */
-               at91_set_a_periph(AT91_PIO_PORTB, 2, 0);        /* ERXER */
-               at91_set_a_periph(AT91_PIO_PORTB, 7, 0);        /* ETXEN */
-               at91_set_a_periph(AT91_PIO_PORTB, 9, 0);        /* ETX0 */
-               at91_set_a_periph(AT91_PIO_PORTB, 10, 0);       /* ETX1 */
-               at91_set_a_periph(AT91_PIO_PORTB, 5, 0);        /* EMDIO */
-               at91_set_a_periph(AT91_PIO_PORTB, 6, 0);        /* EMDC */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 4, 0);   /* ETXCK */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 3, 0);   /* ERXDV */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 0, 0);   /* ERX0 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 1, 0);   /* ERX1 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 2, 0);   /* ERXER */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 7, 0);   /* ETXEN */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 9, 0);   /* ETX0 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 10, 0);  /* ETX1 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 5, 0);   /* EMDIO */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 6, 0);   /* EMDC */
        }
 
        if (has_emac1()) {
                /* Enable EMAC1 clock */
                at91_periph_clk_enable(ATMEL_ID_EMAC1);
                /* EMAC1 pins setup */
-               at91_set_b_periph(AT91_PIO_PORTC, 29, 0);       /* ETXCK */
-               at91_set_b_periph(AT91_PIO_PORTC, 28, 0);       /* ECRSDV */
-               at91_set_b_periph(AT91_PIO_PORTC, 20, 0);       /* ERXO */
-               at91_set_b_periph(AT91_PIO_PORTC, 21, 0);       /* ERX1 */
-               at91_set_b_periph(AT91_PIO_PORTC, 16, 0);       /* ERXER */
-               at91_set_b_periph(AT91_PIO_PORTC, 27, 0);       /* ETXEN */
-               at91_set_b_periph(AT91_PIO_PORTC, 18, 0);       /* ETX0 */
-               at91_set_b_periph(AT91_PIO_PORTC, 19, 0);       /* ETX1 */
-               at91_set_b_periph(AT91_PIO_PORTC, 31, 0);       /* EMDIO */
-               at91_set_b_periph(AT91_PIO_PORTC, 30, 0);       /* EMDC */
+               at91_pio3_set_b_periph(AT91_PIO_PORTC, 29, 0);  /* ETXCK */
+               at91_pio3_set_b_periph(AT91_PIO_PORTC, 28, 0);  /* ECRSDV */
+               at91_pio3_set_b_periph(AT91_PIO_PORTC, 20, 0);  /* ERXO */
+               at91_pio3_set_b_periph(AT91_PIO_PORTC, 21, 0);  /* ERX1 */
+               at91_pio3_set_b_periph(AT91_PIO_PORTC, 16, 0);  /* ERXER */
+               at91_pio3_set_b_periph(AT91_PIO_PORTC, 27, 0);  /* ETXEN */
+               at91_pio3_set_b_periph(AT91_PIO_PORTC, 18, 0);  /* ETX0 */
+               at91_pio3_set_b_periph(AT91_PIO_PORTC, 19, 0);  /* ETX1 */
+               at91_pio3_set_b_periph(AT91_PIO_PORTC, 31, 0);  /* EMDIO */
+               at91_pio3_set_b_periph(AT91_PIO_PORTC, 30, 0);  /* EMDC */
        }
 
 #ifndef CONFIG_RMII
        /* Only emac0 support MII */
        if (has_emac0()) {
-               at91_set_a_periph(AT91_PIO_PORTB, 16, 0);       /* ECRS */
-               at91_set_a_periph(AT91_PIO_PORTB, 17, 0);       /* ECOL */
-               at91_set_a_periph(AT91_PIO_PORTB, 13, 0);       /* ERX2 */
-               at91_set_a_periph(AT91_PIO_PORTB, 14, 0);       /* ERX3 */
-               at91_set_a_periph(AT91_PIO_PORTB, 15, 0);       /* ERXCK */
-               at91_set_a_periph(AT91_PIO_PORTB, 11, 0);       /* ETX2 */
-               at91_set_a_periph(AT91_PIO_PORTB, 12, 0);       /* ETX3 */
-               at91_set_a_periph(AT91_PIO_PORTB, 8, 0);        /* ETXER */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 16, 0);  /* ECRS */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 17, 0);  /* ECOL */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 13, 0);  /* ERX2 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 14, 0);  /* ERX3 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 15, 0);  /* ERXCK */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 11, 0);  /* ETX2 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 12, 0);  /* ETX3 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTB, 8, 0);   /* ETXER */
        }
 #endif
 }
index 64ac262818415ab649193ce09e98b58fd8a82ac6..6becdd7fee264f39787c074d1d9add3cded31cab 100644 (file)
@@ -52,8 +52,8 @@ char *get_cpu_name()
 
 void at91_serial0_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTD, 18, 1);       /* TXD0 */
-       at91_set_a_periph(AT91_PIO_PORTD, 17, 0);       /* RXD0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 18, 1);  /* TXD0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 17, 0);  /* RXD0 */
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_USART0);
@@ -61,8 +61,8 @@ void at91_serial0_hw_init(void)
 
 void at91_serial1_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTB, 29, 1);       /* TXD1 */
-       at91_set_a_periph(AT91_PIO_PORTB, 28, 0);       /* RXD1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 29, 1);  /* TXD1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 28, 0);  /* RXD1 */
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_USART1);
@@ -70,8 +70,8 @@ void at91_serial1_hw_init(void)
 
 void at91_serial2_hw_init(void)
 {
-       at91_set_b_periph(AT91_PIO_PORTE, 26, 1);       /* TXD2 */
-       at91_set_b_periph(AT91_PIO_PORTE, 25, 0);       /* RXD2 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTE, 26, 1);  /* TXD2 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTE, 25, 0);  /* RXD2 */
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_USART2);
@@ -79,8 +79,8 @@ void at91_serial2_hw_init(void)
 
 void at91_seriald_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTB, 31, 1);       /* DTXD */
-       at91_set_a_periph(AT91_PIO_PORTB, 30, 0);       /* DRXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 31, 1);  /* DTXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 30, 0);  /* DRXD */
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_DBGU);
@@ -89,9 +89,9 @@ void at91_seriald_hw_init(void)
 #if defined(CONFIG_ATMEL_SPI)
 void at91_spi0_hw_init(unsigned long cs_mask)
 {
-       at91_set_a_periph(AT91_PIO_PORTD, 10, 0);       /* SPI0_MISO */
-       at91_set_a_periph(AT91_PIO_PORTD, 11, 0);       /* SPI0_MOSI */
-       at91_set_a_periph(AT91_PIO_PORTD, 12, 0);       /* SPI0_SPCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 10, 0);       /* SPI0_MISO */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 11, 0);       /* SPI0_MOSI */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 12, 0);       /* SPI0_SPCK */
 
        if (cs_mask & (1 << 0))
                at91_set_pio_output(AT91_PIO_PORTD, 13, 1);
@@ -110,18 +110,18 @@ void at91_spi0_hw_init(unsigned long cs_mask)
 #ifdef CONFIG_GENERIC_ATMEL_MCI
 void at91_mci_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTD, 0, 0);        /* MCI0 CMD */
-       at91_set_a_periph(AT91_PIO_PORTD, 1, 0);        /* MCI0 DA0 */
-       at91_set_a_periph(AT91_PIO_PORTD, 2, 0);        /* MCI0 DA1 */
-       at91_set_a_periph(AT91_PIO_PORTD, 3, 0);        /* MCI0 DA2 */
-       at91_set_a_periph(AT91_PIO_PORTD, 4, 0);        /* MCI0 DA3 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 0, 0);   /* MCI0 CMD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 1, 0);   /* MCI0 DA0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 2, 0);   /* MCI0 DA1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 3, 0);        /* MCI0 DA2 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 4, 0);        /* MCI0 DA3 */
 #ifdef CONFIG_ATMEL_MCI_8BIT
-       at91_set_a_periph(AT91_PIO_PORTD, 5, 0);        /* MCI0 DA4 */
-       at91_set_a_periph(AT91_PIO_PORTD, 6, 0);        /* MCI0 DA5 */
-       at91_set_a_periph(AT91_PIO_PORTD, 7, 0);        /* MCI0 DA6 */
-       at91_set_a_periph(AT91_PIO_PORTD, 8, 0);        /* MCI0 DA7 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 5, 0);        /* MCI0 DA4 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 6, 0);        /* MCI0 DA5 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 7, 0);        /* MCI0 DA6 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 8, 0);        /* MCI0 DA7 */
 #endif
-       at91_set_a_periph(AT91_PIO_PORTD, 9, 0);        /* MCI0 CLK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 9, 0);        /* MCI0 CLK */
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_MCI0);
@@ -131,16 +131,16 @@ void at91_mci_hw_init(void)
 #ifdef CONFIG_MACB
 void at91_macb_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTC, 7, 0);        /* ETXCK_EREFCK */
-       at91_set_a_periph(AT91_PIO_PORTC, 5, 0);        /* ERXDV */
-       at91_set_a_periph(AT91_PIO_PORTC, 2, 0);        /* ERX0 */
-       at91_set_a_periph(AT91_PIO_PORTC, 3, 0);        /* ERX1 */
-       at91_set_a_periph(AT91_PIO_PORTC, 6, 0);        /* ERXER */
-       at91_set_a_periph(AT91_PIO_PORTC, 4, 0);        /* ETXEN */
-       at91_set_a_periph(AT91_PIO_PORTC, 0, 0);        /* ETX0 */
-       at91_set_a_periph(AT91_PIO_PORTC, 1, 0);        /* ETX1 */
-       at91_set_a_periph(AT91_PIO_PORTC, 9, 0);        /* EMDIO */
-       at91_set_a_periph(AT91_PIO_PORTC, 8, 0);        /* EMDC */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 7, 0);   /* ETXCK_EREFCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 5, 0);   /* ERXDV */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 2, 0);   /* ERX0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 3, 0);   /* ERX1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 6, 0);   /* ERXER */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 4, 0);   /* ETXEN */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 0, 0);   /* ETX0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 1, 0);   /* ETX1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 9, 0);   /* EMDIO */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 8, 0);   /* EMDC */
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_EMAC);
@@ -148,23 +148,23 @@ void at91_macb_hw_init(void)
 
 void at91_gmac_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTB, 0, 0);        /* GTX0 */
-       at91_set_a_periph(AT91_PIO_PORTB, 1, 0);        /* GTX1 */
-       at91_set_a_periph(AT91_PIO_PORTB, 2, 0);        /* GTX2 */
-       at91_set_a_periph(AT91_PIO_PORTB, 3, 0);        /* GTX3 */
-       at91_set_a_periph(AT91_PIO_PORTB, 4, 0);        /* GRX0 */
-       at91_set_a_periph(AT91_PIO_PORTB, 5, 0);        /* GRX1 */
-       at91_set_a_periph(AT91_PIO_PORTB, 6, 0);        /* GRX2 */
-       at91_set_a_periph(AT91_PIO_PORTB, 7, 0);        /* GRX3 */
-       at91_set_a_periph(AT91_PIO_PORTB, 8, 0);        /* GTXCK */
-       at91_set_a_periph(AT91_PIO_PORTB, 9, 0);        /* GTXEN */
-
-       at91_set_a_periph(AT91_PIO_PORTB, 11, 0);       /* GRXCK */
-       at91_set_a_periph(AT91_PIO_PORTB, 13, 0);       /* GRXER */
-
-       at91_set_a_periph(AT91_PIO_PORTB, 16, 0);       /* GMDC */
-       at91_set_a_periph(AT91_PIO_PORTB, 17, 0);       /* GMDIO */
-       at91_set_a_periph(AT91_PIO_PORTB, 18, 0);       /* G125CK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 0, 0);   /* GTX0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 1, 0);   /* GTX1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 2, 0);   /* GTX2 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 3, 0);   /* GTX3 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 4, 0);   /* GRX0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 5, 0);   /* GRX1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 6, 0);   /* GRX2 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 7, 0);   /* GRX3 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 8, 0);   /* GTXCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 9, 0);   /* GTXEN */
+
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 11, 0);  /* GRXCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 13, 0);  /* GRXER */
+
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 16, 0);  /* GMDC */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 17, 0);  /* GMDIO */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 18, 0);  /* G125CK */
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_GMAC);
@@ -174,30 +174,30 @@ void at91_gmac_hw_init(void)
 #ifdef CONFIG_LCD
 void at91_lcd_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTA, 24, 0);       /* LCDPWM */
-       at91_set_a_periph(AT91_PIO_PORTA, 25, 0);       /* LCDDISP */
-       at91_set_a_periph(AT91_PIO_PORTA, 26, 0);       /* LCDVSYNC */
-       at91_set_a_periph(AT91_PIO_PORTA, 27, 0);       /* LCDHSYNC */
-       at91_set_a_periph(AT91_PIO_PORTA, 28, 0);       /* LCDDOTCK */
-       at91_set_a_periph(AT91_PIO_PORTA, 29, 0);       /* LCDDEN */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 24, 0);  /* LCDPWM */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 25, 0);  /* LCDDISP */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 26, 0);  /* LCDVSYNC */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 27, 0);  /* LCDHSYNC */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 28, 0);  /* LCDDOTCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 29, 0);  /* LCDDEN */
 
        /* The lower 16-bit of LCD only available on Port A */
-       at91_set_a_periph(AT91_PIO_PORTA,  0, 0);       /* LCDD0 */
-       at91_set_a_periph(AT91_PIO_PORTA,  1, 0);       /* LCDD1 */
-       at91_set_a_periph(AT91_PIO_PORTA,  2, 0);       /* LCDD2 */
-       at91_set_a_periph(AT91_PIO_PORTA,  3, 0);       /* LCDD3 */
-       at91_set_a_periph(AT91_PIO_PORTA,  4, 0);       /* LCDD4 */
-       at91_set_a_periph(AT91_PIO_PORTA,  5, 0);       /* LCDD5 */
-       at91_set_a_periph(AT91_PIO_PORTA,  6, 0);       /* LCDD6 */
-       at91_set_a_periph(AT91_PIO_PORTA,  7, 0);       /* LCDD7 */
-       at91_set_a_periph(AT91_PIO_PORTA,  8, 0);       /* LCDD8 */
-       at91_set_a_periph(AT91_PIO_PORTA,  9, 0);       /* LCDD9 */
-       at91_set_a_periph(AT91_PIO_PORTA, 10, 0);       /* LCDD10 */
-       at91_set_a_periph(AT91_PIO_PORTA, 11, 0);       /* LCDD11 */
-       at91_set_a_periph(AT91_PIO_PORTA, 12, 0);       /* LCDD12 */
-       at91_set_a_periph(AT91_PIO_PORTA, 13, 0);       /* LCDD13 */
-       at91_set_a_periph(AT91_PIO_PORTA, 14, 0);       /* LCDD14 */
-       at91_set_a_periph(AT91_PIO_PORTA, 15, 0);       /* LCDD15 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  0, 0);  /* LCDD0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  1, 0);  /* LCDD1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  2, 0);  /* LCDD2 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  3, 0);  /* LCDD3 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  4, 0);  /* LCDD4 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  5, 0);  /* LCDD5 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  6, 0);  /* LCDD6 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  7, 0);  /* LCDD7 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  8, 0);  /* LCDD8 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  9, 0);  /* LCDD9 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 10, 0);  /* LCDD10 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 11, 0);  /* LCDD11 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 12, 0);  /* LCDD12 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 13, 0);  /* LCDD13 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 14, 0);  /* LCDD14 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 15, 0);  /* LCDD15 */
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_LCDC);
index c667c5555be57cc9e394180558819347d605755a..d2e41a026c4ddf5243af05bf50760a0e4124c4cf 100644 (file)
@@ -47,6 +47,8 @@ SECTIONS
                *(.__end)
        } >.sram
 
+       _image_binary_end = .;
+
        .bss :
        {
                . = ALIGN(4);
index 301227880a63bd8b5d16cdab5754844a048ffa92..4840a2b8f2f3378633e71b1e7fcdec5c9051aa90 100644 (file)
@@ -32,6 +32,8 @@
 #define AT91_ASM_PIOD_ASR      \
        (ATMEL_BASE_PIO + AT91_PIO_PORTD * AT91_ASM_PIO_RANGE + 0x70)
 
+#define PIO_SCDR_DIV           0x3fff  /* Slow Clock Divider Selection for Debouncing Mask */
+
 #ifndef __ASSEMBLY__
 
 typedef struct at91_port {
@@ -63,28 +65,32 @@ typedef struct at91_port {
        u32     puer;           /* 0x64 Pull-up Enable Register */
        u32     pusr;           /* 0x68 Pad Pull-up Status Register */
        u32     reserved4;
-#if defined(CPU_HAS_PIO3)
-       u32     abcdsr1;        /* 0x70 Peripheral ABCD Select Register 1 */
-       u32     abcdsr2;        /* 0x74 Peripheral ABCD Select Register 2 */
-       u32     reserved5[2];
-       u32     ifscdr;         /* 0x80 Input Filter SCLK Disable Register */
-       u32     ifscer;         /* 0x84 Input Filter SCLK Enable Register */
-       u32     ifscsr;         /* 0x88 Input Filter SCLK Status Register */
-       u32     scdr;           /* 0x8C SCLK Divider Debouncing Register */
-       u32     ppddr;          /* 0x90 Pad Pull-down Disable Register */
-       u32     ppder;          /* 0x94 Pad Pull-down Enable Register */
-       u32     ppdsr;          /* 0x98 Pad Pull-down Status Register */
-       u32     reserved6;      /*  */
-#else
-       u32     asr;            /* 0x70 Select A Register */
-       u32     bsr;            /* 0x74 Select B Register */
-       u32     absr;           /* 0x78 AB Select Status Register */
-       u32     reserved5[9];   /*  */
-#endif
+       union {
+               struct {
+                       u32     abcdsr1;        /* 0x70 Peripheral ABCD Select Register 1 */
+                       u32     abcdsr2;        /* 0x74 Peripheral ABCD Select Register 2 */
+                       u32     reserved5[2];
+                       u32     ifscdr;         /* 0x80 Input Filter SCLK Disable Register */
+                       u32     ifscer;         /* 0x84 Input Filter SCLK Enable Register */
+                       u32     ifscsr;         /* 0x88 Input Filter SCLK Status Register */
+                       u32     scdr;           /* 0x8C SCLK Divider Debouncing Register */
+                       u32     ppddr;          /* 0x90 Pad Pull-down Disable Register */
+                       u32     ppder;          /* 0x94 Pad Pull-down Enable Register */
+                       u32     ppdsr;          /* 0x98 Pad Pull-down Status Register */
+                       u32     reserved6;      /*  */
+               } pio3;
+
+               struct {
+                       u32     asr;            /* 0x70 Select A Register */
+                       u32     bsr;            /* 0x74 Select B Register */
+                       u32     absr;           /* 0x78 AB Select Status Register */
+                       u32     reserved5[9];   /*  */
+               } pio2;
+       } mux;
+
        u32     ower;           /* 0xA0 Output Write Enable Register */
        u32     owdr;           /* 0xA4 Output Write Disable Register */
        u32     owsr;           /* OxA8 Output Write Status Register */
-#if defined(CPU_HAS_PIO3)
        u32     reserved7;      /*  */
        u32     aimer;          /* 0xB0 Additional INT Modes Enable Register */
        u32     aimdr;          /* 0xB4 Additional INT Modes Disable Register */
@@ -103,10 +109,11 @@ typedef struct at91_port {
        u32     wpsr;           /* 0xE8 Write Protect Status Register */
        u32     reserved11[5];  /* */
        u32     schmitt;        /* 0x100 Schmitt Trigger Register */
-       u32     reserved12[63];
-#else
-       u32     reserved6[85];
-#endif
+       u32     reserved12[4];  /* 0x104 ~ 0x110 */
+       u32     driver1;        /* 0x114 I/O Driver Register1(AT91SAM9x5's driver1) */
+       u32     driver12;       /* 0x118 I/O Driver Register12(AT91SAM9x5's driver2 or SAMA5D3x's driver1 ) */
+       u32     driver2;        /* 0x11C I/O Driver Register2(SAMA5D3x's driver2) */
+       u32     reserved13[12]; /* 0x120 ~ 0x14C */
 } at91_port_t;
 
 typedef union at91_pio {
@@ -123,13 +130,6 @@ typedef union at91_pio {
 #ifdef CONFIG_AT91_GPIO
 int at91_set_a_periph(unsigned port, unsigned pin, int use_pullup);
 int at91_set_b_periph(unsigned port, unsigned pin, int use_pullup);
-#if defined(CPU_HAS_PIO3)
-int at91_set_c_periph(unsigned port, unsigned pin, int use_pullup);
-int at91_set_d_periph(unsigned port, unsigned pin, int use_pullup);
-int at91_set_pio_debounce(unsigned port, unsigned pin, int is_on, int div);
-int at91_set_pio_pulldown(unsigned port, unsigned pin, int is_on);
-int at91_set_pio_disable_schmitt_trig(unsigned port, unsigned pin);
-#endif
 int at91_set_pio_input(unsigned port, unsigned pin, int use_pullup);
 int at91_set_pio_multi_drive(unsigned port, unsigned pin, int is_on);
 int at91_set_pio_output(unsigned port, unsigned pin, int value);
@@ -138,6 +138,15 @@ int at91_set_pio_pullup(unsigned port, unsigned pin, int use_pullup);
 int at91_set_pio_deglitch(unsigned port, unsigned pin, int is_on);
 int at91_set_pio_value(unsigned port, unsigned pin, int value);
 int at91_get_pio_value(unsigned port, unsigned pin);
+
+int at91_pio3_set_a_periph(unsigned port, unsigned pin, int use_pullup);
+int at91_pio3_set_b_periph(unsigned port, unsigned pin, int use_pullup);
+int at91_pio3_set_c_periph(unsigned port, unsigned pin, int use_pullup);
+int at91_pio3_set_d_periph(unsigned port, unsigned pin, int use_pullup);
+int at91_pio3_set_pio_debounce(unsigned port, unsigned pin, int is_on, int div);
+int at91_pio3_set_pio_pullup(unsigned port, unsigned pin, int use_pullup);
+int at91_pio3_set_pio_pulldown(unsigned port, unsigned pin, int is_on);
+int at91_pio3_set_pio_disable_schmitt_trig(unsigned port, unsigned pin);
 #endif
 #endif
 
index 8100ebed4b814d557f0a52bb8561b1ceeeeb35e1..e7224e432d90fd96f9c5fc24d7385b965d3a95a8 100644 (file)
  * Other misc defines
  */
 #define ATMEL_PIO_PORTS         4
-#define CPU_HAS_PIO3
-#define PIO_SCDR_DIV            (0x3fff <<  0)  /* Slow Clock Divider Mask */
 #define ATMEL_PMC_UHP          AT91SAM926x_PMC_UHP
 #define ATMEL_ID_UHP           ATMEL_ID_UHPHS
 
index 5a32bdba8d83a4fdf747ec2a8639a5c2bf51147c..df0f71975ad85833e4cf2abbe171bf41b432a78f 100644 (file)
@@ -223,15 +223,13 @@ static inline unsigned pin_to_mask(unsigned pin)
        at91_set_pio_output((x - PIN_BASE) / 32,(x % 32), y)
 #define at91_set_gpio_input(x, y) \
        at91_set_pio_input((x - PIN_BASE) / 32,(x % 32), y)
-#define at91_set_gpio_value(x, y) \
-       at91_set_pio_value((x - PIN_BASE) / 32,(x % 32), y)
-#define at91_get_gpio_value(x) \
-       at91_get_pio_value((x - PIN_BASE) / 32,(x % 32))
-#else
-#define at91_set_gpio_value(x, y)      at91_set_pio_value(x, y)
-#define at91_get_gpio_value(x)         at91_get_pio_value(x)
 #endif
 
+#define at91_set_gpio_value(x, y) \
+       at91_set_pio_value((x / 32), (x % 32), y)
+#define at91_get_gpio_value(x) \
+       at91_get_pio_value((x / 32), (x % 32))
+
 #define GPIO_PIOA_BASE  (0)
 #define GPIO_PIOB_BASE  (GPIO_PIOA_BASE + 32)
 #define GPIO_PIOC_BASE  (GPIO_PIOB_BASE + 32)
index 33f6c97c11d32501236317c96e7876b50f8f4202..d558f95141f062ac964582a7685c431fa641d8b6 100644 (file)
  * Other misc defines
  */
 #define ATMEL_PIO_PORTS                5
-#define CPU_HAS_PIO3
-#define PIO_SCDR_DIV           0x3fff
 #define CPU_HAS_PCR
 
 /* Timer */
index 90085da1c6e62970feee38c2a9ff82a5f37bca5d..78cc2a7a0abde860a7d246976857ed85fb7236c9 100644 (file)
  * Other misc defines
  */
 #define ATMEL_PIO_PORTS                5
-#define CPU_HAS_PIO3
-#define PIO_SCDR_DIV           0x3fff
 #define CPU_HAS_PCR
 #define CPU_HAS_H32MXDIV
 
index 98f280cbf7732c460d291a1da0e64be08ecd57f0..e113336b7bfca467ea7049e4c5e0682584ae469f 100644 (file)
@@ -39,12 +39,16 @@ u32 spl_boot_device(void)
 
 #if defined(CONFIG_SYS_USE_MMC)
        if (dev == ATMEL_SAMA5_BOOT_FROM_MCI) {
+#if defined(CONFIG_SPL_OF_CONTROL)
+               return BOOT_DEVICE_MMC1;
+#else
                if (off == 0)
                        return BOOT_DEVICE_MMC1;
                if (off == 1)
                        return BOOT_DEVICE_MMC2;
                printf("ERROR: MMC controller %i not present!\n", dev);
                hang();
+#endif
        }
 #endif
 
@@ -53,6 +57,9 @@ u32 spl_boot_device(void)
                return BOOT_DEVICE_SPI;
 #endif
 
+       if (dev == ATMEL_SAMA5_BOOT_FROM_SMC)
+               return BOOT_DEVICE_NAND;
+
        if (dev == ATMEL_SAMA5_BOOT_FROM_SAMBA)
                return BOOT_DEVICE_USB;
 
index 688289e7cf7b69acc991451706bfcd38c3619b83..b75c2ccefdc2a029dec8fceb243b3fb81679fa0a 100644 (file)
@@ -77,6 +77,8 @@ void s_init(void)
 
 void board_init_f(ulong dummy)
 {
+       int ret;
+
        switch_to_main_crystal_osc();
 
 #ifdef CONFIG_SAMA5D2
@@ -99,7 +101,14 @@ void board_init_f(ulong dummy)
 
        board_early_init_f();
 
+       mem_init();
+
+       ret = spl_init();
+       if (ret) {
+               debug("spl_init() failed: %d\n", ret);
+               hang();
+       }
+
        preloader_console_init();
 
-       mem_init();
 }
index e56b3db1158987ecacca8ab9a9d239bc621311e2..9bfee04098cc307952e872afdac6c3350ce0bd22 100644 (file)
@@ -43,6 +43,7 @@ config TARGET_SOCFPGA_CYCLONE5
 
 config TARGET_SOCFPGA_GEN5
        bool
+       select ALTERA_SDRAM
 
 choice
        prompt "Altera SOCFPGA board select"
@@ -56,8 +57,8 @@ config TARGET_SOCFPGA_CYCLONE5_SOCDK
        bool "Altera SOCFPGA SoCDK (Cyclone V)"
        select TARGET_SOCFPGA_CYCLONE5
 
-config TARGET_SOCFPGA_DENX_MCVEVK
-       bool "DENX MCVEVK (Cyclone V)"
+config TARGET_SOCFPGA_ARIES_MCVEVK
+       bool "Aries MCVEVK (Cyclone V)"
        select TARGET_SOCFPGA_CYCLONE5
 
 config TARGET_SOCFPGA_EBV_SOCRATES
@@ -97,7 +98,7 @@ config SYS_BOARD
        default "de0-nano-soc" if TARGET_SOCFPGA_TERASIC_DE0_NANO
        default "de1-soc" if TARGET_SOCFPGA_TERASIC_DE1_SOC
        default "is1" if TARGET_SOCFPGA_IS1
-       default "mcvevk" if TARGET_SOCFPGA_DENX_MCVEVK
+       default "mcvevk" if TARGET_SOCFPGA_ARIES_MCVEVK
        default "sockit" if TARGET_SOCFPGA_TERASIC_SOCKIT
        default "socrates" if TARGET_SOCFPGA_EBV_SOCRATES
        default "sr1500" if TARGET_SOCFPGA_SR1500
@@ -106,7 +107,7 @@ config SYS_BOARD
 config SYS_VENDOR
        default "altera" if TARGET_SOCFPGA_ARRIA5_SOCDK
        default "altera" if TARGET_SOCFPGA_CYCLONE5_SOCDK
-       default "denx" if TARGET_SOCFPGA_DENX_MCVEVK
+       default "aries" if TARGET_SOCFPGA_ARIES_MCVEVK
        default "ebv" if TARGET_SOCFPGA_EBV_SOCRATES
        default "samtec" if TARGET_SOCFPGA_SAMTEC_VINING_FPGA
        default "terasic" if TARGET_SOCFPGA_TERASIC_DE0_NANO
@@ -122,7 +123,7 @@ config SYS_CONFIG_NAME
        default "socfpga_de0_nano_soc" if TARGET_SOCFPGA_TERASIC_DE0_NANO
        default "socfpga_de1_soc" if TARGET_SOCFPGA_TERASIC_DE1_SOC
        default "socfpga_is1" if TARGET_SOCFPGA_IS1
-       default "socfpga_mcvevk" if TARGET_SOCFPGA_DENX_MCVEVK
+       default "socfpga_mcvevk" if TARGET_SOCFPGA_ARIES_MCVEVK
        default "socfpga_sockit" if TARGET_SOCFPGA_TERASIC_SOCKIT
        default "socfpga_socrates" if TARGET_SOCFPGA_EBV_SOCRATES
        default "socfpga_sr1500" if TARGET_SOCFPGA_SR1500
index aaada31286055a14089bd7a4885455cf6b11ca76..22d9e7f7afbeee27aa0473b926a3b231d0dc209c 100644 (file)
@@ -8,21 +8,17 @@
 #define __BOOT0_H
 
 #ifdef CONFIG_SPL_BUILD
-#define ARM_SOC_BOOT0_HOOK                                             \
-       .balignl 64,0xf33db33f;                                         \
-                                                                       \
-       .word   0x1337c0d3;     /* SoCFPGA preloader validation word */ \
-       .word   0xc01df00d;     /* Version, flags, length */            \
-       .word   0xcafec0d3;     /* Checksum, zero-pad */                \
-       nop;                                                            \
-                                                                       \
-       b reset;                /* SoCFPGA jumps here */                \
-       nop;                                                            \
-       nop;                                                            \
+       .balignl 64,0xf33db33f;
+
+       .word   0x1337c0d3;     /* SoCFPGA preloader validation word */
+       .word   0xc01df00d;     /* Version, flags, length */
+       .word   0xcafec0d3;     /* Checksum, zero-pad */
        nop;
-#else
-#define ARM_SOC_BOOT0_HOOK
-#endif
 
+       b reset;                /* SoCFPGA jumps here */
+       nop;
+       nop;
+       nop;
+#endif
 
 #endif /* __BOOT0_H */
index 1b82fbb591dceb909f2d64110582b45501c0c7b2..eae79217d443519b815c41c2f2dbb990a8cc0ab0 100644 (file)
@@ -8,7 +8,7 @@
 #include <common.h>
 #include <linux/errno.h>
 #include "crypto.h"
-#include "aes.h"
+#include "uboot_aes.h"
 
 static u8 zero_key[16];
 
index 1c73addcb3843f0f152905d4cd2c1f5593e29e52..2706812b918d0dbbc407983722987979b7defbf4 100644 (file)
@@ -11,7 +11,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int initdram(void)
+int dram_init(void)
 {
        ddr_tap_tuning();
        gd->ram_size = get_ram_size((void *)KSEG1, SZ_256M);
index c96e0468485002c44b7663f4829eca4dcfa3ceda..c3194f0a3932f8ea1be765b95c5094bf42ae755e 100644 (file)
@@ -110,7 +110,7 @@ static void ddr2_pmd_ungate(void)
 }
 
 /* initialize the DDR2 Controller and DDR2 PHY */
-int initdram(void)
+int dram_init(void)
 {
        ddr2_pmd_ungate();
        ddr2_phy_init();
index 00abfa3ca913a0249a5e3038b4a65d1bc3ab3dbd..e7da807d66630249b8cffe57d9bc9d97a4b6903b 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef __MICROCHIP_PIC32_DDR_H
 #define __MICROCHIP_PIC32_DDR_H
 
-/* called by initdram() function */
+/* called by dram_init() function */
 void ddr2_phy_init(void);
 void ddr2_ctrl_init(void);
 phys_size_t ddr2_calculate_size(void);
index c1caa651742bbfb7c922a3bbc736086876150b92..6c4ec2cea40b434603e113a25a2e1136e37b3f54 100644 (file)
@@ -150,3 +150,9 @@ U_BOOT_DRIVER(altera_nios2) = {
        .ops            = &altera_nios2_ops,
        .flags          = DM_FLAG_PRE_RELOC,
 };
+
+/* This is a dummy function on nios2 */
+int dram_init(void)
+{
+       return 0;
+}
index 23d201034392a0971368553be233d45b6135f9b8..2d7f6c4a9348a851ff98a3b3b98ff00103c58344 100644 (file)
@@ -32,7 +32,7 @@ void board_init_f(ulong bootflag)
        /*
         * On MPC5200, the initial RAM (and gd) is located in the internal
         * SRAM. So we can actually call the preloader console init code
-        * before calling initdram(). This makes serial output (printf)
+        * before calling dram_init(). This makes serial output (printf)
         * available very early, even before SDRAM init, which has been
         * an U-Boot priciple from day 1.
         */
@@ -62,7 +62,7 @@ void board_init_f(ulong bootflag)
         * First we need to initialize the SDRAM, so that the real
         * U-Boot or the OS (Linux) can be loaded
         */
-       initdram();
+       dram_init();
 
        /* Clear bss */
        memset(__bss_start, '\0', __bss_end - __bss_start);
index 64e0aa751811497fc73f858e33eb6a13683614ad..e3ef4ae816cc669c278f28bacc2db5e18fa7aec8 100644 (file)
@@ -401,7 +401,7 @@ void mpc85xx_reginfo(void)
 #ifndef CONFIG_FSL_CORENET
 #if (defined(CONFIG_SYS_RAMBOOT) || defined(CONFIG_SPL)) && \
        !defined(CONFIG_SYS_INIT_L2_ADDR)
-int initdram(void)
+int dram_init(void)
 {
 #if defined(CONFIG_SPD_EEPROM) || defined(CONFIG_DDR_SPD) || \
        defined(CONFIG_ARCH_QEMU_E500)
@@ -413,7 +413,7 @@ int initdram(void)
        return 0;
 }
 #else /* CONFIG_SYS_RAMBOOT */
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size = 0;
 
index 87fd5e65e0210cdbce4b5f5e4cf46629b8b5bf91..ffc62a5849796dcfd8cba3bf7e78d79a335aad5e 100644 (file)
@@ -403,20 +403,20 @@ static unsigned char spd_read(uchar chip, uint addr)
 }
 
 /*-----------------------------------------------------------------------------+
- * initdram.  Initializes the 440SP Memory Queue and DDR SDRAM controller.
+ * dram_init.  Initializes the 440SP Memory Queue and DDR SDRAM controller.
  * Note: This routine runs from flash with a stack set up in the chip's
  * sram space.  It is important that the routine does not require .sbss, .bss or
  * .data sections.  It also cannot call routines that require these sections.
  *-----------------------------------------------------------------------------*/
 /*-----------------------------------------------------------------------------
- * Function:    initdram
+ * Function:    dram_init
  * Description:  Configures SDRAM memory banks for DDR operation.
  *              Auto Memory Configuration option reads the DDR SDRAM EEPROMs
  *              via the IIC bus and then configures the DDR SDRAM memory
  *              banks appropriately. If Auto Memory Configuration is
  *              not used, it is assumed that no DIMM is plugged
  *-----------------------------------------------------------------------------*/
-int initdram(void)
+int dram_init(void)
 {
        unsigned char iic0_dimm_addr[] = SPD_EEPROM_ADDRESS;
        unsigned long dimm_populated[MAXDIMMS] = {SDRAM_NONE, SDRAM_NONE};
@@ -2855,13 +2855,13 @@ static void test(void)
 #else /* CONFIG_SPD_EEPROM */
 
 /*-----------------------------------------------------------------------------
- * Function:   initdram
+ * Function:   dram_init
  * Description: Configures the PPC4xx IBM DDR1/DDR2 SDRAM memory controller.
  *             The configuration is performed using static, compile-
  *             time parameters.
  *             Configures the PPC405EX(r) and PPC460EX/GT
  *---------------------------------------------------------------------------*/
-int initdram(void)
+int dram_init(void)
 {
        unsigned long val;
 
index 14d0fd915434b47a84dd175e567f17ad6a9d12af..c477853fb8dd085c9814bf7e95928dc3863bce77 100644 (file)
@@ -987,20 +987,20 @@ static void program_ddr0_44(unsigned long dimm_ranks[],
 }
 
 /*-----------------------------------------------------------------------------+
- * initdram.  Initializes the 440EPx/GPx DDR SDRAM controller.
+ * dram_init.  Initializes the 440EPx/GPx DDR SDRAM controller.
  * Note: This routine runs from flash with a stack set up in the chip's
  * sram space.  It is important that the routine does not require .sbss, .bss or
  * .data sections.  It also cannot call routines that require these sections.
  *-----------------------------------------------------------------------------*/
 /*-----------------------------------------------------------------------------
- * Function:    initdram
+ * Function:    dram_init
  * Description:  Configures SDRAM memory banks for DDR operation.
  *              Auto Memory Configuration option reads the DDR SDRAM EEPROMs
  *              via the IIC bus and then configures the DDR SDRAM memory
  *              banks appropriately. If Auto Memory Configuration is
  *              not used, it is assumed that no DIMM is plugged
  *-----------------------------------------------------------------------------*/
-int initdram(void)
+int dram_init(void)
 {
        unsigned char const iic0_dimm_addr[] = SPD_EEPROM_ADDRESS;
        unsigned long dimm_ranks[MAXDIMMS];
@@ -1014,7 +1014,7 @@ int initdram(void)
        unsigned long cas_latency = 0;  /* to quiet initialization warning */
        unsigned long dram_size;
 
-       debug("\nEntering initdram()\n");
+       debug("\nEntering dram_init()\n");
 
        /*------------------------------------------------------------------
         * Stop the DDR-SDRAM controller.
index a49bd69aba1d7af5149e266427778581288911a6..c416bcebf6aa91d32685051bcc2531f3bdd11be5 100644 (file)
@@ -150,7 +150,7 @@ static ulong compute_rtr(ulong speed, ulong rows, ulong refresh)
 /*
  * Autodetect onboard SDRAM on 405 platforms
  */
-int initdram(void)
+int dram_init(void)
 {
        ulong speed;
        ulong sdtr1;
@@ -353,7 +353,7 @@ static void sdram_tr1_set(int ram_address, int* tr1_value)
  *      so this should be extended for other future boards
  *      using this routine!
  */
-int initdram(void)
+int dram_init(void)
 {
        int i;
        int tr1_bank1;
index f3aa46c4f1fb96fac0a4ccef655d558b5c36b698..b30f169e896139ab0e3930f3e1493337e8a603c8 100644 (file)
@@ -26,7 +26,7 @@ void board_init_f(ulong bootflag)
         * First we need to initialize the SDRAM, so that the real
         * U-Boot or the OS (Linux) can be loaded
         */
-       initdram();
+       dram_init();
 
        /* Clear bss */
        memset(__bss_start, '\0', __bss_end - __bss_start);
index 42c09e2fff25c9bd0b68f274548f67a73bf416ee..623cdafefaa5d919c9b21d8e737d8cd13cb55c7e 100644 (file)
@@ -50,7 +50,11 @@ typedef __INT64_TYPE__ s64;
 typedef __UINT64_TYPE__ u64;
 #endif
 
-#define BITS_PER_LONG  CONFIG_SANDBOX_BITS_PER_LONG
+/*
+ * Number of bits in a C 'long' on this architecture. Set this to 32 when
+ * building on a 32-bit machine.
+ */
+#define BITS_PER_LONG  32
 
 typedef unsigned long dma_addr_t;
 typedef u32 phys_addr_t;
index 6787a6182c87a39d872ee8d29254ee470abcb4e0..7044480597d2ed3b24eb259328afb27cdba26dd4 100644 (file)
@@ -47,3 +47,8 @@ int arch_cpu_init(void)
        gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
        return 0;
 }
+
+int dram_init(void)
+{
+       return 0;
+}
index 45e78c63a3c74432c570d5e9c1e69f92d4b4c627..cd484fc44b3aeaf05a26950e1acba1920b3e496d 100644 (file)
@@ -110,7 +110,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
        i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
 #endif
 
-       initdram();
+       dram_init();
 #ifdef CONFIG_SPL_NAND_BOOT
        puts("Tertiary program loader running in sram...");
 #else
index 3024a9c681e3e350bf367c95f9495f663adaa7b3..a00a83a4a545a2c9d7385b46368e79448669caab 100644 (file)
@@ -35,7 +35,7 @@ int checkboard (void)
        return 0;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        int size, i;
 
index c1120c400442039bf6bf3eed57ca7102b44ab4b9..7e16aaf4b244362891508037d9d703e792228fc5 100644 (file)
@@ -72,11 +72,11 @@ static void sdram_start(int hi_addr)
 #endif
 
 /*
- * ATTENTION: Although partially referenced initdram does NOT make real use
+ * ATTENTION: Although partially referenced dram_init does NOT make real use
  * use of CONFIG_SYS_SDRAM_BASE. The code does not work if
  * CONFIG_SYS_SDRAM_BASE is something else than 0x00000000.
  */
-int initdram(void)
+int dram_init(void)
 {
        ulong dramsize = 0;
        ulong dramsize2 = 0;
index d4b30fd1478bde69601166b6aa886ec7b1e2c82e..6f0d4489a25ab74ceac6d65599b7fe7f5b648c86 100644 (file)
@@ -68,12 +68,12 @@ static void sdram_start (int hi_addr)
 #endif
 
 /*
- * ATTENTION: Although partially referenced initdram does NOT make real use
+ * ATTENTION: Although partially referenced dram_init does NOT make real use
  *            use of CONFIG_SYS_SDRAM_BASE. The code does not work if CONFIG_SYS_SDRAM_BASE
  *            is something else than 0x00000000.
  */
 
-int initdram(void)
+int dram_init(void)
 {
        ulong dramsize = 0;
        uint svr, pvr;
index 20750fb0ced38be1d85d05b31598ec12f8e7fb8a..91e96ab0961145e589de2f1102f16c4657d8a147 100644 (file)
@@ -103,8 +103,9 @@ static void setup_iomux_enet(void)
 
        /* Reset AR8033 PHY */
        gpio_direction_output(IMX_GPIO_NR(1, 28), 0);
-       udelay(500);
+       mdelay(10);
        gpio_set_value(IMX_GPIO_NR(1, 28), 1);
+       mdelay(1);
 }
 
 static iomux_v3_cfg_t const usdhc2_pads[] = {
@@ -303,7 +304,8 @@ static int mx6_rgmii_rework(struct phy_device *phydev)
        /* set debug port address: SerDes Test and System Mode Control */
        phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x05);
        /* enable rgmii tx clock delay */
-       phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x100);
+       /* set the reserved bits to avoid board specific voltage peak issue*/
+       phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x3D47);
 
        return 0;
 }
@@ -534,11 +536,61 @@ static const struct boot_mode board_boot_modes[] = {
 };
 #endif
 
+void pmic_init(void)
+{
+
+#define DA9063_ADDR 0x58
+#define BCORE2_CONF 0x9D
+#define BCORE1_CONF 0x9E
+#define BPRO_CONF 0x9F
+#define BIO_CONF 0xA0
+#define BMEM_CONF 0xA1
+#define BPERI_CONF 0xA2
+#define MODE_BIT_H 7
+#define MODE_BIT_L 6
+
+        uchar val;
+        i2c_set_bus_num(2);
+
+        i2c_read(DA9063_ADDR, BCORE2_CONF, 1, &val, 1);
+        val |= (1 << MODE_BIT_H);
+        val &= ~(1 << MODE_BIT_L);
+        i2c_write(DA9063_ADDR, BCORE2_CONF , 1, &val, 1);
+
+        i2c_read(DA9063_ADDR, BCORE1_CONF, 1, &val, 1);
+        val |= (1 << MODE_BIT_H);
+        val &= ~(1 << MODE_BIT_L);
+        i2c_write(DA9063_ADDR, BCORE1_CONF , 1, &val, 1);
+
+        i2c_read(DA9063_ADDR, BPRO_CONF, 1, &val, 1);
+        val |= (1 << MODE_BIT_H);
+        val &= ~(1 << MODE_BIT_L);
+        i2c_write(DA9063_ADDR, BPRO_CONF , 1, &val, 1);
+
+        i2c_read(DA9063_ADDR, BIO_CONF, 1, &val, 1);
+        val |= (1 << MODE_BIT_H);
+        val &= ~(1 << MODE_BIT_L);
+        i2c_write(DA9063_ADDR, BIO_CONF , 1, &val, 1);
+
+        i2c_read(DA9063_ADDR, BMEM_CONF, 1, &val, 1);
+        val |= (1 << MODE_BIT_H);
+        val &= ~(1 << MODE_BIT_L);
+        i2c_write(DA9063_ADDR, BMEM_CONF , 1, &val, 1);
+
+        i2c_read(DA9063_ADDR, BPERI_CONF, 1, &val, 1);
+        val |= (1 << MODE_BIT_H);
+        val &= ~(1 << MODE_BIT_L);
+        i2c_write(DA9063_ADDR, BPERI_CONF , 1, &val, 1);
+
+}
+
 int board_late_init(void)
 {
 #ifdef CONFIG_CMD_BMODE
        add_board_boot_modes(board_boot_modes);
 #endif
+
+#if defined(CONFIG_VIDEO_IPUV3)
        /*
         * We need at least 200ms between power on and backlight on
         * as per specifications from CHI MEI
@@ -555,11 +607,15 @@ int board_late_init(void)
        gpio_direction_output(LVDS_BACKLIGHT_GP, 1);
 
        pwm_enable(0);
+#endif
 
 #ifdef CONFIG_CMD_SATA
        setup_ba16_sata();
 #endif
 
+        /* board specific pmic init */
+        pmic_init();
+
        return 0;
 }
 
index cd78a147b1358faae4b807cbbfbc43929f956434..36500da6f4f7ed1c814c13ee4335c3234dac2829 100644 (file)
@@ -43,7 +43,7 @@ static void cram_bcr_write(u32 wr_val)
        return;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        int i;
        u32 val;
index 453677aa66e0fa44cc22f223dfed75c3d5a7d826..6a50b393f462b56200fcf29a20ebeb9ae5fcde7e 100644 (file)
@@ -438,7 +438,7 @@ int checkboard(void)
 }
 
 
-int initdram(void)
+int dram_init(void)
 {
        gd->ram_size = spd_sdram();
 
index 725b9ca08668617588856cdc3e5425972078dc0b..c73424d8c6f795b53adc044fd8968026b3606625 100644 (file)
@@ -54,10 +54,10 @@ int checkboard(void)
 }
 
 /* -------------------------------------------------------------------------
-  initdram() reads EEPROM via I2c. EEPROM contains all of
+  dram_init() reads EEPROM via I2c. EEPROM contains all of
   the necessary info for SDRAM controller configuration
    ------------------------------------------------------------------------- */
-int initdram(void)
+int dram_init(void)
 {
        gd->ram_size = spd_sdram();
 
index 9bedb5bc8e3ba1eccb63ef8c52d7e075e69d55fd..ea987179e74c2d640ff4be314e5e76bd261c9da7 100644 (file)
@@ -30,10 +30,10 @@ extern void denali_core_search_data_eye(void);
 
 /*************************************************************************
  *
- * initdram -- 440EPx's DDR controller is a DENALI Core
+ * dram_init -- 440EPx's DDR controller is a DENALI Core
  *
  ************************************************************************/
-int initdram(void)
+int dram_init(void)
 {
 #if !defined(CONFIG_SYS_RAMBOOT)
        ulong speed = get_bus_freq(0);
index 2a2441e101e208192ec88a210220665cf4097d12..b21daa0af8e624e06a2f8334e024e9d4305305ad 100644 (file)
@@ -73,10 +73,10 @@ int checkboard(void)
 }
 
 /*
- * initdram() reads EEPROM via I2c. EEPROM contains all of
+ * dram_init() reads EEPROM via I2c. EEPROM contains all of
  * the necessary info for SDRAM controller configuration
  */
-int initdram(void)
+int dram_init(void)
 {
        gd->ram_size = spd_sdram();
 
index fde371d919dc766d22b828ba8b4a6f0ce6d05b91..f46aacfff89925db8c10e98321aa96ecfef5283a 100644 (file)
@@ -205,7 +205,7 @@ int checkboard(void)
 }
 
 /*************************************************************************
- *  initdram -- doesn't use serial presence detect.
+ *  dram_init -- doesn't use serial presence detect.
  *
  *  Assumes:    256 MB, ECC, non-registered
  *              PLB @ 133 MHz
@@ -286,7 +286,7 @@ void sdram_tr1_set(int ram_address, int* tr1_value)
        *tr1_value = (first_good + last_bad) / 2;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        register uint reg;
        int tr1_bank1, tr1_bank2;
diff --git a/board/aries/m28evk/Kconfig b/board/aries/m28evk/Kconfig
new file mode 100644 (file)
index 0000000..ab5577c
--- /dev/null
@@ -0,0 +1,15 @@
+if TARGET_M28EVK
+
+config SYS_BOARD
+       default "m28evk"
+
+config SYS_VENDOR
+       default "aries"
+
+config SYS_SOC
+       default "mxs"
+
+config SYS_CONFIG_NAME
+       default "m28evk"
+
+endif
diff --git a/board/aries/m28evk/MAINTAINERS b/board/aries/m28evk/MAINTAINERS
new file mode 100644 (file)
index 0000000..f600e7d
--- /dev/null
@@ -0,0 +1,6 @@
+M28EVK BOARD
+M:     Marek Vasut <marek.vasut@gmail.com>
+S:     Maintained
+F:     board/aries/m28evk/
+F:     include/configs/m28evk.h
+F:     configs/m28evk_defconfig
diff --git a/board/aries/m28evk/Makefile b/board/aries/m28evk/Makefile
new file mode 100644 (file)
index 0000000..5e890b1
--- /dev/null
@@ -0,0 +1,12 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+ifndef CONFIG_SPL_BUILD
+obj-y  := m28evk.o
+else
+obj-y  := spl_boot.o
+endif
diff --git a/board/aries/m28evk/README b/board/aries/m28evk/README
new file mode 100644 (file)
index 0000000..9f0d995
--- /dev/null
@@ -0,0 +1,13 @@
+Aries M28EVK
+============
+
+Files of the M28/M28EVK port
+----------------------------
+
+arch/arm/cpu/arm926ejs/mxs/    - The CPU support code for the Freescale i.MX28
+arch/arm/include/asm/arch-mxs/ - Header files for the Freescale i.MX28
+board/aries/m28evk/            - M28EVK board specific files
+include/configs/m28evk.h       - M28EVK configuration file
+
+Follow the instructions from doc/README.mxs to generate a bootable SD card or to
+boot from NAND flash.
diff --git a/board/aries/m28evk/m28evk.c b/board/aries/m28evk/m28evk.c
new file mode 100644 (file)
index 0000000..c990ea9
--- /dev/null
@@ -0,0 +1,173 @@
+/*
+ * Aries M28 module
+ *
+ * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
+ * on behalf of DENX Software Engineering GmbH
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/gpio.h>
+#include <asm/io.h>
+#include <asm/arch/imx-regs.h>
+#include <asm/arch/iomux-mx28.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/sys_proto.h>
+#include <linux/mii.h>
+#include <miiphy.h>
+#include <netdev.h>
+#include <errno.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Functions
+ */
+int board_early_init_f(void)
+{
+       /* IO0 clock at 480MHz */
+       mxs_set_ioclk(MXC_IOCLK0, 480000);
+       /* IO1 clock at 480MHz */
+       mxs_set_ioclk(MXC_IOCLK1, 480000);
+
+       /* SSP0 clock at 96MHz */
+       mxs_set_sspclk(MXC_SSPCLK0, 96000, 0);
+       /* SSP2 clock at 160MHz */
+       mxs_set_sspclk(MXC_SSPCLK2, 160000, 0);
+
+#ifdef CONFIG_CMD_USB
+       mxs_iomux_setup_pad(MX28_PAD_SSP2_SS1__USB1_OVERCURRENT);
+       mxs_iomux_setup_pad(MX28_PAD_AUART3_TX__GPIO_3_13 |
+                       MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP);
+       gpio_direction_output(MX28_PAD_AUART3_TX__GPIO_3_13, 0);
+
+       mxs_iomux_setup_pad(MX28_PAD_AUART3_RX__GPIO_3_12 |
+                       MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP);
+       gpio_direction_output(MX28_PAD_AUART3_RX__GPIO_3_12, 0);
+#endif
+
+       return 0;
+}
+
+int board_init(void)
+{
+       /* Adress of boot parameters */
+       gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
+
+       return 0;
+}
+
+int dram_init(void)
+{
+       return mxs_dram_init();
+}
+
+#ifdef CONFIG_CMD_MMC
+static int m28_mmc_wp(int id)
+{
+       if (id != 0) {
+               printf("MXS MMC: Invalid card selected (card id = %d)\n", id);
+               return 1;
+       }
+
+       return gpio_get_value(MX28_PAD_AUART2_CTS__GPIO_3_10);
+}
+
+int board_mmc_init(bd_t *bis)
+{
+       /* Configure WP as input. */
+       gpio_direction_input(MX28_PAD_AUART2_CTS__GPIO_3_10);
+       /* Turn on the power to the card. */
+       gpio_direction_output(MX28_PAD_PWM3__GPIO_3_28, 0);
+
+       return mxsmmc_initialize(bis, 0, m28_mmc_wp, NULL);
+}
+#endif
+
+#ifdef CONFIG_CMD_NET
+
+#define        MII_OPMODE_STRAP_OVERRIDE       0x16
+#define        MII_PHY_CTRL1                   0x1e
+#define        MII_PHY_CTRL2                   0x1f
+
+int fecmxc_mii_postcall(int phy)
+{
+#if    defined(CONFIG_ARIES_M28_V11) || defined(CONFIG_ARIES_M28_V10)
+       /* KZ8031 PHY on old boards. */
+       const uint32_t freq = 0x0080;
+#else
+       /* KZ8021 PHY on new boards. */
+       const uint32_t freq = 0x0000;
+#endif
+
+       miiphy_write("FEC1", phy, MII_BMCR, 0x9000);
+       miiphy_write("FEC1", phy, MII_OPMODE_STRAP_OVERRIDE, 0x0202);
+       if (phy == 3)
+               miiphy_write("FEC1", 3, MII_PHY_CTRL2, 0x8100 | freq);
+       return 0;
+}
+
+int board_eth_init(bd_t *bis)
+{
+       struct mxs_clkctrl_regs *clkctrl_regs =
+               (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
+       struct eth_device *dev;
+       int ret;
+
+       ret = cpu_eth_init(bis);
+       if (ret)
+               return ret;
+
+       clrsetbits_le32(&clkctrl_regs->hw_clkctrl_enet,
+               CLKCTRL_ENET_TIME_SEL_MASK | CLKCTRL_ENET_CLK_OUT_EN,
+               CLKCTRL_ENET_TIME_SEL_RMII_CLK);
+
+#if !defined(CONFIG_ARIES_M28_V11) && !defined(CONFIG_ARIES_M28_V10)
+       /* Reset the new PHY */
+       gpio_direction_output(MX28_PAD_AUART2_RTS__GPIO_3_11, 0);
+       udelay(10000);
+       gpio_set_value(MX28_PAD_AUART2_RTS__GPIO_3_11, 1);
+       udelay(10000);
+#endif
+
+       ret = fecmxc_initialize_multi(bis, 0, 0, MXS_ENET0_BASE);
+       if (ret) {
+               printf("FEC MXS: Unable to init FEC0\n");
+               return ret;
+       }
+
+       ret = fecmxc_initialize_multi(bis, 1, 3, MXS_ENET1_BASE);
+       if (ret) {
+               printf("FEC MXS: Unable to init FEC1\n");
+               return ret;
+       }
+
+       dev = eth_get_dev_by_name("FEC0");
+       if (!dev) {
+               printf("FEC MXS: Unable to get FEC0 device entry\n");
+               return -EINVAL;
+       }
+
+       ret = fecmxc_register_mii_postcall(dev, fecmxc_mii_postcall);
+       if (ret) {
+               printf("FEC MXS: Unable to register FEC0 mii postcall\n");
+               return ret;
+       }
+
+       dev = eth_get_dev_by_name("FEC1");
+       if (!dev) {
+               printf("FEC MXS: Unable to get FEC1 device entry\n");
+               return -EINVAL;
+       }
+
+       ret = fecmxc_register_mii_postcall(dev, fecmxc_mii_postcall);
+       if (ret) {
+               printf("FEC MXS: Unable to register FEC1 mii postcall\n");
+               return ret;
+       }
+
+       return ret;
+}
+
+#endif
diff --git a/board/aries/m28evk/spl_boot.c b/board/aries/m28evk/spl_boot.c
new file mode 100644 (file)
index 0000000..e27a74e
--- /dev/null
@@ -0,0 +1,206 @@
+/*
+ * ARIES M28 Boot setup
+ *
+ * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
+ * on behalf of DENX Software Engineering GmbH
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <config.h>
+#include <asm/io.h>
+#include <asm/arch/iomux-mx28.h>
+#include <asm/arch/imx-regs.h>
+#include <asm/arch/sys_proto.h>
+
+#define        MUX_CONFIG_LED  (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL)
+#define        MUX_CONFIG_LCD  (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL)
+#define        MUX_CONFIG_TSC  (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
+#define        MUX_CONFIG_SSP0 (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_PULLUP)
+#define        MUX_CONFIG_SSP2 (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_PULLUP)
+#define        MUX_CONFIG_GPMI (MXS_PAD_1V8 | MXS_PAD_4MA | MXS_PAD_NOPULL)
+#define        MUX_CONFIG_ENET (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_PULLUP)
+#define        MUX_CONFIG_EMI  (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL)
+
+const iomux_cfg_t iomux_setup[] = {
+       /* LED */
+       MX28_PAD_ENET0_RXD3__GPIO_4_10 | MUX_CONFIG_LED,
+
+       /* framebuffer */
+       MX28_PAD_LCD_D00__LCD_D0 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D01__LCD_D1 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D02__LCD_D2 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D03__LCD_D3 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D04__LCD_D4 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D05__LCD_D5 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D06__LCD_D6 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D07__LCD_D7 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D08__LCD_D8 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D09__LCD_D9 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D10__LCD_D10 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D11__LCD_D11 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D12__LCD_D12 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D13__LCD_D13 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D14__LCD_D14 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D15__LCD_D15 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D16__LCD_D16 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D17__LCD_D17 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D18__LCD_D18 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D19__LCD_D19 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D20__LCD_D20 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D21__LCD_D21 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D22__LCD_D22 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_D23__LCD_D23 | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_DOTCLK__LCD_DOTCLK | MUX_CONFIG_LCD,
+       MX28_PAD_LCD_ENABLE__LCD_ENABLE | MUX_CONFIG_LCD,
+
+       /* UART1 */
+#ifdef CONFIG_ARIES_M28_V10
+       MX28_PAD_AUART0_CTS__DUART_RX,
+       MX28_PAD_AUART0_RTS__DUART_TX,
+#else
+       MX28_PAD_PWM0__DUART_RX,
+       MX28_PAD_PWM1__DUART_TX,
+#endif
+       MX28_PAD_AUART0_TX__DUART_RTS,
+       MX28_PAD_AUART0_RX__DUART_CTS,
+
+       /* UART2 */
+       MX28_PAD_AUART1_RX__AUART1_RX,
+       MX28_PAD_AUART1_TX__AUART1_TX,
+       MX28_PAD_AUART1_RTS__AUART1_RTS,
+       MX28_PAD_AUART1_CTS__AUART1_CTS,
+
+       /* CAN */
+       MX28_PAD_GPMI_RDY2__CAN0_TX,
+       MX28_PAD_GPMI_RDY3__CAN0_RX,
+
+       /* TSC2007 */
+       MX28_PAD_SAIF0_MCLK__GPIO_3_20 | MUX_CONFIG_TSC,
+
+       /* MMC0 */
+       MX28_PAD_SSP0_DATA0__SSP0_D0 | MUX_CONFIG_SSP0,
+       MX28_PAD_SSP0_DATA1__SSP0_D1 | MUX_CONFIG_SSP0,
+       MX28_PAD_SSP0_DATA2__SSP0_D2 | MUX_CONFIG_SSP0,
+       MX28_PAD_SSP0_DATA3__SSP0_D3 | MUX_CONFIG_SSP0,
+       MX28_PAD_SSP0_DATA4__SSP0_D4 | MUX_CONFIG_SSP0,
+       MX28_PAD_SSP0_DATA5__SSP0_D5 | MUX_CONFIG_SSP0,
+       MX28_PAD_SSP0_DATA6__SSP0_D6 | MUX_CONFIG_SSP0,
+       MX28_PAD_SSP0_DATA7__SSP0_D7 | MUX_CONFIG_SSP0,
+       MX28_PAD_SSP0_CMD__SSP0_CMD | MUX_CONFIG_SSP0,
+       MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT |
+               (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL),
+       MX28_PAD_SSP0_SCK__SSP0_SCK |
+               (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL),
+       MX28_PAD_PWM3__GPIO_3_28 | MUX_CONFIG_SSP0 |
+               (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL),  /* Power */
+       MX28_PAD_AUART2_CTS__GPIO_3_10, /* WP */
+
+       /* GPMI NAND */
+       MX28_PAD_GPMI_D00__GPMI_D0 | MUX_CONFIG_GPMI,
+       MX28_PAD_GPMI_D01__GPMI_D1 | MUX_CONFIG_GPMI,
+       MX28_PAD_GPMI_D02__GPMI_D2 | MUX_CONFIG_GPMI,
+       MX28_PAD_GPMI_D03__GPMI_D3 | MUX_CONFIG_GPMI,
+       MX28_PAD_GPMI_D04__GPMI_D4 | MUX_CONFIG_GPMI,
+       MX28_PAD_GPMI_D05__GPMI_D5 | MUX_CONFIG_GPMI,
+       MX28_PAD_GPMI_D06__GPMI_D6 | MUX_CONFIG_GPMI,
+       MX28_PAD_GPMI_D07__GPMI_D7 | MUX_CONFIG_GPMI,
+       MX28_PAD_GPMI_CE0N__GPMI_CE0N | MUX_CONFIG_GPMI,
+       MX28_PAD_GPMI_RDY0__GPMI_READY0 | MUX_CONFIG_GPMI,
+       MX28_PAD_GPMI_RDN__GPMI_RDN |
+               (MXS_PAD_1V8 | MXS_PAD_8MA | MXS_PAD_PULLUP),
+       MX28_PAD_GPMI_WRN__GPMI_WRN | MUX_CONFIG_GPMI,
+       MX28_PAD_GPMI_ALE__GPMI_ALE | MUX_CONFIG_GPMI,
+       MX28_PAD_GPMI_CLE__GPMI_CLE | MUX_CONFIG_GPMI,
+       MX28_PAD_GPMI_RESETN__GPMI_RESETN | MUX_CONFIG_GPMI,
+
+       /* FEC Ethernet */
+       MX28_PAD_ENET0_MDC__ENET0_MDC | MUX_CONFIG_ENET,
+       MX28_PAD_ENET0_MDIO__ENET0_MDIO | MUX_CONFIG_ENET,
+       MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | MUX_CONFIG_ENET,
+       MX28_PAD_ENET0_TX_EN__ENET0_TX_EN | MUX_CONFIG_ENET,
+       MX28_PAD_ENET0_RXD0__ENET0_RXD0 | MUX_CONFIG_ENET,
+       MX28_PAD_ENET0_RXD1__ENET0_RXD1 | MUX_CONFIG_ENET,
+       MX28_PAD_ENET0_TXD0__ENET0_TXD0 | MUX_CONFIG_ENET,
+       MX28_PAD_ENET0_TXD1__ENET0_TXD1 | MUX_CONFIG_ENET,
+       MX28_PAD_ENET_CLK__CLKCTRL_ENET | MUX_CONFIG_ENET,
+
+       MX28_PAD_ENET0_COL__ENET1_TX_EN | MUX_CONFIG_ENET,
+       MX28_PAD_ENET0_CRS__ENET1_RX_EN | MUX_CONFIG_ENET,
+       MX28_PAD_ENET0_RXD2__ENET1_RXD0 | MUX_CONFIG_ENET,
+       MX28_PAD_ENET0_RXD3__ENET1_RXD1 | MUX_CONFIG_ENET,
+       MX28_PAD_ENET0_TXD2__ENET1_TXD0 | MUX_CONFIG_ENET,
+       MX28_PAD_ENET0_TXD3__ENET1_TXD1 | MUX_CONFIG_ENET,
+#if !defined(CONFIG_ARIES_M28_V11) && !defined(CONFIG_ARIES_M28_V10)
+       MX28_PAD_AUART2_RTS__GPIO_3_11, /* PHY reset */
+#endif
+
+       /* I2C */
+       MX28_PAD_I2C0_SCL__I2C0_SCL,
+       MX28_PAD_I2C0_SDA__I2C0_SDA,
+
+       /* EMI */
+       MX28_PAD_EMI_D00__EMI_DATA0 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_D01__EMI_DATA1 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_D02__EMI_DATA2 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_D03__EMI_DATA3 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_D04__EMI_DATA4 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_D05__EMI_DATA5 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_D06__EMI_DATA6 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_D07__EMI_DATA7 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_D08__EMI_DATA8 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_D09__EMI_DATA9 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_D10__EMI_DATA10 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_D11__EMI_DATA11 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_D12__EMI_DATA12 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_D13__EMI_DATA13 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_D14__EMI_DATA14 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_D15__EMI_DATA15 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_ODT0__EMI_ODT0 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_DQM0__EMI_DQM0 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_ODT1__EMI_ODT1 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_DQM1__EMI_DQM1 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_DDR_OPEN_FB__EMI_DDR_OPEN_FEEDBACK | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_CLK__EMI_CLK | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_DQS0__EMI_DQS0 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_DQS1__EMI_DQS1 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_DDR_OPEN__EMI_DDR_OPEN | MUX_CONFIG_EMI,
+
+       MX28_PAD_EMI_A00__EMI_ADDR0 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_A01__EMI_ADDR1 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_A02__EMI_ADDR2 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_A03__EMI_ADDR3 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_A04__EMI_ADDR4 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_A05__EMI_ADDR5 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_A06__EMI_ADDR6 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_A07__EMI_ADDR7 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_A08__EMI_ADDR8 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_A09__EMI_ADDR9 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_A10__EMI_ADDR10 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_A11__EMI_ADDR11 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_A12__EMI_ADDR12 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_A13__EMI_ADDR13 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_A14__EMI_ADDR14 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_BA0__EMI_BA0 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_BA1__EMI_BA1 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_BA2__EMI_BA2 | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_CASN__EMI_CASN | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_RASN__EMI_RASN | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_WEN__EMI_WEN | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_CE0N__EMI_CE0N | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_CE1N__EMI_CE1N | MUX_CONFIG_EMI,
+       MX28_PAD_EMI_CKE__EMI_CKE | MUX_CONFIG_EMI,
+
+       /* SPI2 (for flash) */
+       MX28_PAD_SSP2_SCK__SSP2_SCK | MUX_CONFIG_SSP2,
+       MX28_PAD_SSP2_MOSI__SSP2_CMD | MUX_CONFIG_SSP2,
+       MX28_PAD_SSP2_MISO__SSP2_D0 | MUX_CONFIG_SSP2,
+       MX28_PAD_SSP2_SS0__SSP2_D3 |
+               (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP),
+};
+
+void board_init_ll(const uint32_t arg, const uint32_t *resptr)
+{
+       mxs_common_spl_init(arg, resptr, iomux_setup, ARRAY_SIZE(iomux_setup));
+}
diff --git a/board/aries/m53evk/Kconfig b/board/aries/m53evk/Kconfig
new file mode 100644 (file)
index 0000000..2d49b40
--- /dev/null
@@ -0,0 +1,15 @@
+if TARGET_M53EVK
+
+config SYS_BOARD
+       default "m53evk"
+
+config SYS_VENDOR
+       default "aries"
+
+config SYS_SOC
+       default "mx5"
+
+config SYS_CONFIG_NAME
+       default "m53evk"
+
+endif
diff --git a/board/aries/m53evk/MAINTAINERS b/board/aries/m53evk/MAINTAINERS
new file mode 100644 (file)
index 0000000..71137f0
--- /dev/null
@@ -0,0 +1,6 @@
+M53EVK BOARD
+M:     Marek Vasut <marek.vasut@gmail.com>
+S:     Maintained
+F:     board/aries/m53evk/
+F:     include/configs/m53evk.h
+F:     configs/m53evk_defconfig
diff --git a/board/aries/m53evk/Makefile b/board/aries/m53evk/Makefile
new file mode 100644 (file)
index 0000000..daa0fe4
--- /dev/null
@@ -0,0 +1,8 @@
+#
+# Aries M53EVK
+# Copyright (C) 2012-2013 Marek Vasut <marex@denx.de>
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y  := m53evk.o
diff --git a/board/aries/m53evk/imximage.cfg b/board/aries/m53evk/imximage.cfg
new file mode 100644 (file)
index 0000000..ec855c8
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * Aries M53 DRAM init values
+ * Copyright (C) 2012-2013 Marek Vasut <marex@denx.de>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ *
+ * Refer doc/README.imximage for more details about how-to configure
+ * and create imximage boot image
+ *
+ * The syntax is taken as close as possible with the kwbimage
+ */
+#include <asm/imx-common/imximage.cfg>
+
+/* image version */
+IMAGE_VERSION  2
+
+
+/* Boot Offset 0x400, valid for both SD and NAND boot. */
+BOOT_OFFSET    FLASH_OFFSET_STANDARD
+
+/*
+ * Device Configuration Data (DCD)
+ *
+ * Each entry must have the format:
+ * Addr-type           Address        Value
+ *
+ * where:
+ *     Addr-type register length (1,2 or 4 bytes)
+ *     Address   absolute address of the register
+ *     value     value to be stored in the register
+ */
+DATA 4 0x53fa86f4 0x00000000    /* GRP_DDRMODE_CTL */
+DATA 4 0x53fa8714 0x00000000    /* GRP_DDRMODE */
+DATA 4 0x53fa86fc 0x00000000    /* GRP_DDRPKE */
+DATA 4 0x53fa8724 0x04000000    /* GRP_DDR_TYPE */
+
+DATA 4 0x53fa872c 0x00300000    /* GRP_B3DS */
+DATA 4 0x53fa8554 0x00300000    /* DRAM_DQM3 */
+DATA 4 0x53fa8558 0x00300040    /* DRAM_SDQS3 */
+
+DATA 4 0x53fa8728 0x00300000    /* GRP_B2DS */
+DATA 4 0x53fa8560 0x00300000    /* DRAM_DQM2 */
+DATA 4 0x53fa8568 0x00300040    /* DRAM_SDQS2 */
+
+DATA 4 0x53fa871c 0x00300000    /* GRP_B1DS */
+DATA 4 0x53fa8594 0x00300000    /* DRAM_DQM1 */
+DATA 4 0x53fa8590 0x00300040    /* DRAM_SDQS1 */
+
+DATA 4 0x53fa8718 0x00300000    /* GRP_B0DS */
+DATA 4 0x53fa8584 0x00300000    /* DRAM_DQM0 */
+DATA 4 0x53fa857c 0x00300040    /* DRAM_SDQS0 */
+
+DATA 4 0x53fa8578 0x00300000    /* DRAM_SDCLK_0 */
+DATA 4 0x53fa8570 0x00300000    /* DRAM_SDCLK_1 */
+
+DATA 4 0x53fa8574 0x00300000    /* DRAM_CAS */
+DATA 4 0x53fa8588 0x00300000    /* DRAM_RAS */
+DATA 4 0x53fa86f0 0x00300000    /* GRP_ADDDS */
+DATA 4 0x53fa8720 0x00300000    /* GRP_CTLDS */
+
+DATA 4 0x53fa8564 0x00300040    /* DRAM_SDODT1 */
+DATA 4 0x53fa8580 0x00300040    /* DRAM_SDODT0 */
+
+/* ESDCTL */
+DATA 4 0x63fd9088 0x32383535
+DATA 4 0x63fd9090 0x40383538
+DATA 4 0x63fd907c 0x0136014d
+DATA 4 0x63fd9080 0x01510141
+
+DATA 4 0x63fd9018 0x00011740
+DATA 4 0x63fd9000 0xc3190000
+DATA 4 0x63fd900c 0x555952e3
+DATA 4 0x63fd9010 0xb68e8b63
+DATA 4 0x63fd9014 0x01ff00db
+DATA 4 0x63fd902c 0x000026d2
+DATA 4 0x63fd9030 0x009f0e21
+DATA 4 0x63fd9008 0x12273030
+DATA 4 0x63fd9004 0x0002002d
+DATA 4 0x63fd901c 0x00008032
+DATA 4 0x63fd901c 0x00008033
+DATA 4 0x63fd901c 0x00028031
+DATA 4 0x63fd901c 0x092080b0
+DATA 4 0x63fd901c 0x04008040
+DATA 4 0x63fd901c 0x0000803a
+DATA 4 0x63fd901c 0x0000803b
+DATA 4 0x63fd901c 0x00028039
+DATA 4 0x63fd901c 0x09208138
+DATA 4 0x63fd901c 0x04008048
+DATA 4 0x63fd9020 0x00001800
+DATA 4 0x63fd9040 0x04b80003
+DATA 4 0x63fd9058 0x00022227
+DATA 4 0x63fd901c 0x00000000
diff --git a/board/aries/m53evk/m53evk.c b/board/aries/m53evk/m53evk.c
new file mode 100644 (file)
index 0000000..14c60fc
--- /dev/null
@@ -0,0 +1,404 @@
+/*
+ * Aries M53 module
+ *
+ * Copyright (C) 2012-2013 Marek Vasut <marex@denx.de>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/io.h>
+#include <asm/arch/imx-regs.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/arch/crm_regs.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/iomux-mx53.h>
+#include <asm/imx-common/mx5_video.h>
+#include <asm/spl.h>
+#include <linux/errno.h>
+#include <netdev.h>
+#include <i2c.h>
+#include <mmc.h>
+#include <spl.h>
+#include <fsl_esdhc.h>
+#include <asm/gpio.h>
+#include <usb/ehci-ci.h>
+#include <linux/fb.h>
+#include <ipu_pixfmt.h>
+
+/* Special MXCFB sync flags are here. */
+#include "../drivers/video/mxcfb.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static uint32_t mx53_dram_size[2];
+
+phys_size_t get_effective_memsize(void)
+{
+       /*
+        * WARNING: We must override get_effective_memsize() function here
+        * to report only the size of the first DRAM bank. This is to make
+        * U-Boot relocator place U-Boot into valid memory, that is, at the
+        * end of the first DRAM bank. If we did not override this function
+        * like so, U-Boot would be placed at the address of the first DRAM
+        * bank + total DRAM size - sizeof(uboot), which in the setup where
+        * each DRAM bank contains 512MiB of DRAM would result in placing
+        * U-Boot into invalid memory area close to the end of the first
+        * DRAM bank.
+        */
+       return mx53_dram_size[0];
+}
+
+int dram_init(void)
+{
+       mx53_dram_size[0] = get_ram_size((void *)PHYS_SDRAM_1, 1 << 30);
+       mx53_dram_size[1] = get_ram_size((void *)PHYS_SDRAM_2, 1 << 30);
+
+       gd->ram_size = mx53_dram_size[0] + mx53_dram_size[1];
+
+       return 0;
+}
+
+int dram_init_banksize(void)
+{
+       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+       gd->bd->bi_dram[0].size = mx53_dram_size[0];
+
+       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
+       gd->bd->bi_dram[1].size = mx53_dram_size[1];
+
+       return 0;
+}
+
+static void setup_iomux_uart(void)
+{
+       static const iomux_v3_cfg_t uart_pads[] = {
+               MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX,
+               MX53_PAD_PATA_DMARQ__UART2_TXD_MUX,
+       };
+
+       imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
+}
+
+#ifdef CONFIG_USB_EHCI_MX5
+int board_ehci_hcd_init(int port)
+{
+       if (port == 0) {
+               /* USB OTG PWRON */
+               imx_iomux_v3_setup_pad(NEW_PAD_CTRL(MX53_PAD_GPIO_4__GPIO1_4,
+                                       PAD_CTL_PKE | PAD_CTL_DSE_HIGH));
+               gpio_direction_output(IMX_GPIO_NR(1, 4), 0);
+
+               /* USB OTG Over Current */
+               imx_iomux_v3_setup_pad(MX53_PAD_GPIO_18__GPIO7_13);
+       } else if (port == 1) {
+               /* USB Host PWRON */
+               imx_iomux_v3_setup_pad(NEW_PAD_CTRL(MX53_PAD_GPIO_2__GPIO1_2,
+                                       PAD_CTL_PKE | PAD_CTL_DSE_HIGH));
+               gpio_direction_output(IMX_GPIO_NR(1, 2), 0);
+
+               /* USB Host Over Current */
+               imx_iomux_v3_setup_pad(MX53_PAD_GPIO_3__USBOH3_USBH1_OC);
+       }
+
+       return 0;
+}
+#endif
+
+static void setup_iomux_fec(void)
+{
+       static const iomux_v3_cfg_t fec_pads[] = {
+               /* MDIO pads */
+               NEW_PAD_CTRL(MX53_PAD_FEC_MDIO__FEC_MDIO, PAD_CTL_HYS |
+                       PAD_CTL_DSE_HIGH | PAD_CTL_PUS_22K_UP | PAD_CTL_ODE),
+               NEW_PAD_CTRL(MX53_PAD_FEC_MDC__FEC_MDC, PAD_CTL_DSE_HIGH),
+
+               /* FEC 0 pads */
+               NEW_PAD_CTRL(MX53_PAD_FEC_CRS_DV__FEC_RX_DV,
+                               PAD_CTL_HYS | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_FEC_REF_CLK__FEC_TX_CLK,
+                               PAD_CTL_HYS | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_FEC_RX_ER__FEC_RX_ER,
+                               PAD_CTL_HYS | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_FEC_TX_EN__FEC_TX_EN, PAD_CTL_DSE_HIGH),
+               NEW_PAD_CTRL(MX53_PAD_FEC_RXD0__FEC_RDATA_0,
+                               PAD_CTL_HYS | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_FEC_RXD1__FEC_RDATA_1,
+                               PAD_CTL_HYS | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_FEC_TXD0__FEC_TDATA_0, PAD_CTL_DSE_HIGH),
+               NEW_PAD_CTRL(MX53_PAD_FEC_TXD1__FEC_TDATA_1, PAD_CTL_DSE_HIGH),
+
+               /* FEC 1 pads */
+               NEW_PAD_CTRL(MX53_PAD_KEY_COL0__FEC_RDATA_3,
+                               PAD_CTL_HYS | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_KEY_ROW0__FEC_TX_ER,
+                               PAD_CTL_HYS | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_KEY_COL1__FEC_RX_CLK,
+                               PAD_CTL_HYS | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_KEY_ROW1__FEC_COL,
+                               PAD_CTL_HYS | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_KEY_COL2__FEC_RDATA_2,
+                               PAD_CTL_HYS | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_KEY_ROW2__FEC_TDATA_2, PAD_CTL_DSE_HIGH),
+               NEW_PAD_CTRL(MX53_PAD_KEY_COL3__FEC_CRS,
+                               PAD_CTL_HYS | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_GPIO_19__FEC_TDATA_3, PAD_CTL_DSE_HIGH),
+       };
+
+       imx_iomux_v3_setup_multiple_pads(fec_pads, ARRAY_SIZE(fec_pads));
+}
+
+#ifdef CONFIG_FSL_ESDHC
+struct fsl_esdhc_cfg esdhc_cfg = {
+       MMC_SDHC1_BASE_ADDR,
+};
+
+int board_mmc_getcd(struct mmc *mmc)
+{
+       imx_iomux_v3_setup_pad(MX53_PAD_GPIO_1__GPIO1_1);
+       gpio_direction_input(IMX_GPIO_NR(1, 1));
+
+       return !gpio_get_value(IMX_GPIO_NR(1, 1));
+}
+
+#define SD_CMD_PAD_CTRL                (PAD_CTL_HYS | PAD_CTL_DSE_HIGH | \
+                                PAD_CTL_PUS_100K_UP)
+#define SD_PAD_CTRL            (PAD_CTL_HYS | PAD_CTL_PUS_47K_UP | \
+                                PAD_CTL_DSE_HIGH)
+
+int board_mmc_init(bd_t *bis)
+{
+       static const iomux_v3_cfg_t sd1_pads[] = {
+               NEW_PAD_CTRL(MX53_PAD_SD1_CMD__ESDHC1_CMD, SD_CMD_PAD_CTRL),
+               NEW_PAD_CTRL(MX53_PAD_SD1_CLK__ESDHC1_CLK, SD_PAD_CTRL),
+               NEW_PAD_CTRL(MX53_PAD_SD1_DATA0__ESDHC1_DAT0, SD_PAD_CTRL),
+               NEW_PAD_CTRL(MX53_PAD_SD1_DATA1__ESDHC1_DAT1, SD_PAD_CTRL),
+               NEW_PAD_CTRL(MX53_PAD_SD1_DATA2__ESDHC1_DAT2, SD_PAD_CTRL),
+               NEW_PAD_CTRL(MX53_PAD_SD1_DATA3__ESDHC1_DAT3, SD_PAD_CTRL),
+               MX53_PAD_EIM_DA13__GPIO3_13,
+
+               MX53_PAD_EIM_EB3__GPIO2_31, /* SD power */
+       };
+
+       esdhc_cfg.sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
+
+       imx_iomux_v3_setup_multiple_pads(sd1_pads, ARRAY_SIZE(sd1_pads));
+
+       /* GPIO 2_31 is SD power */
+       gpio_direction_output(IMX_GPIO_NR(2, 31), 0);
+
+       return fsl_esdhc_initialize(bis, &esdhc_cfg);
+}
+#endif
+
+#ifdef CONFIG_VIDEO
+static struct fb_videomode const ampire_wvga = {
+       .name           = "Ampire",
+       .refresh        = 60,
+       .xres           = 800,
+       .yres           = 480,
+       .pixclock       = 29851, /* picosecond (33.5 MHz) */
+       .left_margin    = 89,
+       .right_margin   = 164,
+       .upper_margin   = 23,
+       .lower_margin   = 10,
+       .hsync_len      = 10,
+       .vsync_len      = 10,
+       .sync           = FB_SYNC_CLK_LAT_FALL,
+};
+
+int board_video_skip(void)
+{
+       int ret;
+       ret = ipuv3_fb_init(&ampire_wvga, 1, IPU_PIX_FMT_RGB666);
+       if (ret)
+               printf("Ampire LCD cannot be configured: %d\n", ret);
+       return ret;
+}
+#endif
+
+#define I2C_PAD_CTRL   (PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | \
+                        PAD_CTL_PUS_100K_UP | PAD_CTL_ODE)
+
+static void setup_iomux_i2c(void)
+{
+       static const iomux_v3_cfg_t i2c_pads[] = {
+               NEW_PAD_CTRL(MX53_PAD_EIM_D16__I2C2_SDA, I2C_PAD_CTRL),
+               NEW_PAD_CTRL(MX53_PAD_EIM_EB2__I2C2_SCL, I2C_PAD_CTRL),
+       };
+
+       imx_iomux_v3_setup_multiple_pads(i2c_pads, ARRAY_SIZE(i2c_pads));
+}
+
+static void setup_iomux_video(void)
+{
+       static const iomux_v3_cfg_t lcd_pads[] = {
+               MX53_PAD_EIM_DA9__IPU_DISP1_DAT_0,
+               MX53_PAD_EIM_DA8__IPU_DISP1_DAT_1,
+               MX53_PAD_EIM_DA7__IPU_DISP1_DAT_2,
+               MX53_PAD_EIM_DA6__IPU_DISP1_DAT_3,
+               MX53_PAD_EIM_DA5__IPU_DISP1_DAT_4,
+               MX53_PAD_EIM_DA4__IPU_DISP1_DAT_5,
+               MX53_PAD_EIM_DA3__IPU_DISP1_DAT_6,
+               MX53_PAD_EIM_DA2__IPU_DISP1_DAT_7,
+               MX53_PAD_EIM_DA1__IPU_DISP1_DAT_8,
+               MX53_PAD_EIM_DA0__IPU_DISP1_DAT_9,
+               MX53_PAD_EIM_EB1__IPU_DISP1_DAT_10,
+               MX53_PAD_EIM_EB0__IPU_DISP1_DAT_11,
+               MX53_PAD_EIM_A17__IPU_DISP1_DAT_12,
+               MX53_PAD_EIM_A18__IPU_DISP1_DAT_13,
+               MX53_PAD_EIM_A19__IPU_DISP1_DAT_14,
+               MX53_PAD_EIM_A20__IPU_DISP1_DAT_15,
+               MX53_PAD_EIM_A21__IPU_DISP1_DAT_16,
+               MX53_PAD_EIM_A22__IPU_DISP1_DAT_17,
+               MX53_PAD_EIM_A23__IPU_DISP1_DAT_18,
+               MX53_PAD_EIM_A24__IPU_DISP1_DAT_19,
+               MX53_PAD_EIM_D31__IPU_DISP1_DAT_20,
+               MX53_PAD_EIM_D30__IPU_DISP1_DAT_21,
+               MX53_PAD_EIM_D26__IPU_DISP1_DAT_22,
+               MX53_PAD_EIM_D27__IPU_DISP1_DAT_23,
+               MX53_PAD_EIM_A16__IPU_DI1_DISP_CLK,
+               MX53_PAD_EIM_DA13__IPU_DI1_D0_CS,
+               MX53_PAD_EIM_DA14__IPU_DI1_D1_CS,
+               MX53_PAD_EIM_DA15__IPU_DI1_PIN1,
+               MX53_PAD_EIM_DA11__IPU_DI1_PIN2,
+               MX53_PAD_EIM_DA12__IPU_DI1_PIN3,
+               MX53_PAD_EIM_A25__IPU_DI1_PIN12,
+               MX53_PAD_EIM_DA10__IPU_DI1_PIN15,
+       };
+
+       imx_iomux_v3_setup_multiple_pads(lcd_pads, ARRAY_SIZE(lcd_pads));
+}
+
+static void setup_iomux_nand(void)
+{
+       static const iomux_v3_cfg_t nand_pads[] = {
+               NEW_PAD_CTRL(MX53_PAD_NANDF_WE_B__EMI_NANDF_WE_B,
+                               PAD_CTL_DSE_HIGH),
+               NEW_PAD_CTRL(MX53_PAD_NANDF_RE_B__EMI_NANDF_RE_B,
+                               PAD_CTL_DSE_HIGH),
+               NEW_PAD_CTRL(MX53_PAD_NANDF_CLE__EMI_NANDF_CLE,
+                               PAD_CTL_DSE_HIGH),
+               NEW_PAD_CTRL(MX53_PAD_NANDF_ALE__EMI_NANDF_ALE,
+                               PAD_CTL_DSE_HIGH),
+               NEW_PAD_CTRL(MX53_PAD_NANDF_WP_B__EMI_NANDF_WP_B,
+                               PAD_CTL_PUS_100K_UP),
+               NEW_PAD_CTRL(MX53_PAD_NANDF_RB0__EMI_NANDF_RB_0,
+                               PAD_CTL_PUS_100K_UP),
+               NEW_PAD_CTRL(MX53_PAD_NANDF_CS0__EMI_NANDF_CS_0,
+                               PAD_CTL_DSE_HIGH),
+               NEW_PAD_CTRL(MX53_PAD_PATA_DATA0__EMI_NANDF_D_0,
+                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_PATA_DATA1__EMI_NANDF_D_1,
+                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_PATA_DATA2__EMI_NANDF_D_2,
+                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_PATA_DATA3__EMI_NANDF_D_3,
+                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_PATA_DATA4__EMI_NANDF_D_4,
+                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_PATA_DATA5__EMI_NANDF_D_5,
+                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_PATA_DATA6__EMI_NANDF_D_6,
+                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
+               NEW_PAD_CTRL(MX53_PAD_PATA_DATA7__EMI_NANDF_D_7,
+                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
+       };
+
+       imx_iomux_v3_setup_multiple_pads(nand_pads, ARRAY_SIZE(nand_pads));
+}
+
+static void m53_set_clock(void)
+{
+       int ret;
+       const uint32_t ref_clk = MXC_HCLK;
+       const uint32_t dramclk = 400;
+       uint32_t cpuclk;
+
+       imx_iomux_v3_setup_pad(NEW_PAD_CTRL(MX53_PAD_GPIO_10__GPIO4_0,
+                                           PAD_CTL_DSE_HIGH | PAD_CTL_PKE));
+       gpio_direction_input(IMX_GPIO_NR(4, 0));
+
+       /* GPIO10 selects modules' CPU speed, 1 = 1200MHz ; 0 = 800MHz */
+       cpuclk = gpio_get_value(IMX_GPIO_NR(4, 0)) ? 1200 : 800;
+
+       ret = mxc_set_clock(ref_clk, cpuclk, MXC_ARM_CLK);
+       if (ret)
+               printf("CPU:   Switch CPU clock to %dMHz failed\n", cpuclk);
+
+       ret = mxc_set_clock(ref_clk, dramclk, MXC_PERIPH_CLK);
+       if (ret) {
+               printf("CPU:   Switch peripheral clock to %dMHz failed\n",
+                       dramclk);
+       }
+
+       ret = mxc_set_clock(ref_clk, dramclk, MXC_DDR_CLK);
+       if (ret)
+               printf("CPU:   Switch DDR clock to %dMHz failed\n", dramclk);
+}
+
+static void m53_set_nand(void)
+{
+       u32 i;
+
+       /* NAND flash is muxed on ATA pins */
+       setbits_le32(M4IF_BASE_ADDR + 0xc, M4IF_GENP_WEIM_MM_MASK);
+
+       /* Wait for Grant/Ack sequence (see EIM_CSnGCR2:MUX16_BYP_GRANT) */
+       for (i = 0x4; i < 0x94; i += 0x18) {
+               clrbits_le32(WEIM_BASE_ADDR + i,
+                            WEIM_GCR2_MUX16_BYP_GRANT_MASK);
+       }
+
+       mxc_set_clock(0, 33, MXC_NFC_CLK);
+       enable_nfc_clk(1);
+}
+
+int board_early_init_f(void)
+{
+       setup_iomux_uart();
+       setup_iomux_fec();
+       setup_iomux_i2c();
+       setup_iomux_nand();
+       setup_iomux_video();
+
+       m53_set_clock();
+
+       mxc_set_sata_internal_clock();
+
+       /* NAND clock @ 33MHz */
+       m53_set_nand();
+
+       return 0;
+}
+
+int board_init(void)
+{
+       gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
+
+       return 0;
+}
+
+int checkboard(void)
+{
+       puts("Board: Aries M53EVK\n");
+
+       return 0;
+}
+
+/*
+ * NAND SPL
+ */
+#ifdef CONFIG_SPL_BUILD
+void spl_board_init(void)
+{
+       setup_iomux_nand();
+       m53_set_clock();
+       m53_set_nand();
+}
+
+u32 spl_boot_device(void)
+{
+       return BOOT_DEVICE_NAND;
+}
+#endif
diff --git a/board/aries/mcvevk/MAINTAINERS b/board/aries/mcvevk/MAINTAINERS
new file mode 100644 (file)
index 0000000..c3a3a2b
--- /dev/null
@@ -0,0 +1,5 @@
+Aries MCVEVK BOARD
+M:     Marek Vasut <marek.vasut@gmail.com>
+S:     Maintained
+F:     include/configs/socfpga_mcvevk.h
+F:     configs/socfpga_mcvevk_defconfig
diff --git a/board/aries/mcvevk/Makefile b/board/aries/mcvevk/Makefile
new file mode 100644 (file)
index 0000000..86f9b78
--- /dev/null
@@ -0,0 +1,9 @@
+#
+# (C) Copyright 2001-2006
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+# (C) Copyright 2010, Thomas Chou <thomas@wytron.com.tw>
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y  := socfpga.o
diff --git a/board/aries/mcvevk/qts/iocsr_config.h b/board/aries/mcvevk/qts/iocsr_config.h
new file mode 100644 (file)
index 0000000..3021830
--- /dev/null
@@ -0,0 +1,660 @@
+/*
+ * Altera SoCFPGA IOCSR configuration
+ *
+ * SPDX-License-Identifier:    BSD-3-Clause
+ */
+
+#ifndef __SOCFPGA_IOCSR_CONFIG_H__
+#define __SOCFPGA_IOCSR_CONFIG_H__
+
+#define CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH     764
+#define CONFIG_HPS_IOCSR_SCANCHAIN1_LENGTH     1719
+#define CONFIG_HPS_IOCSR_SCANCHAIN2_LENGTH     955
+#define CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH     16766
+
+const unsigned long iocsr_scan_chain0_table[] = {
+       0x00000000,
+       0x00000000,
+       0x0FF00000,
+       0xC0000000,
+       0x0000003F,
+       0x00008000,
+       0x00000000,
+       0x18060000,
+       0x00000060,
+       0x00000000,
+       0x00000000,
+       0x00004000,
+       0x0C0300C0,
+       0x00000000,
+       0x0C000000,
+       0x0000C030,
+       0x0000C030,
+       0x00002000,
+       0x06018060,
+       0x06018000,
+       0x06000018,
+       0x00006018,
+       0x01806018,
+       0x00001000,
+};
+
+const unsigned long iocsr_scan_chain1_table[] = {
+       0x000C0300,
+       0x300C0000,
+       0x300000C0,
+       0x000000C0,
+       0x000300C0,
+       0x00008000,
+       0x00060180,
+       0x18060000,
+       0x18000000,
+       0x00000060,
+       0x00018060,
+       0x00004000,
+       0x000300C0,
+       0x0C030000,
+       0x0C000000,
+       0x00000030,
+       0x0000C030,
+       0x00002000,
+       0x00018060,
+       0x06018000,
+       0x01FE0000,
+       0xF8000000,
+       0x00000007,
+       0x00001000,
+       0x0300C030,
+       0x00000000,
+       0x03000000,
+       0x0000000C,
+       0x00000000,
+       0x00000800,
+       0x00006018,
+       0x01806000,
+       0x00000000,
+       0x00000000,
+       0x00001806,
+       0x00000400,
+       0x0000300C,
+       0x00C03000,
+       0x00C00000,
+       0x00000003,
+       0x00000C03,
+       0x00000200,
+       0x00001806,
+       0x00601800,
+       0x80600000,
+       0x80000001,
+       0x00000601,
+       0x00000100,
+       0x00001000,
+       0x00300C00,
+       0xC0300000,
+       0xC0000000,
+       0x00000300,
+       0x00000080,
+};
+
+const unsigned long iocsr_scan_chain2_table[] = {
+       0x300C0300,
+       0x00000000,
+       0x0FF00000,
+       0x00000000,
+       0x0C0300C0,
+       0x00008000,
+       0x00060180,
+       0x00000000,
+       0x18000000,
+       0x00018060,
+       0x06018060,
+       0x00004000,
+       0x200300C0,
+       0x0C030000,
+       0x0C000000,
+       0x00000030,
+       0x0000C030,
+       0x00002000,
+       0x00018060,
+       0x00000000,
+       0x06000000,
+       0x00010018,
+       0x01806018,
+       0x00001000,
+       0x0000C030,
+       0x00000000,
+       0x03000000,
+       0x0000000C,
+       0x00C0300C,
+       0x00000800,
+};
+
+const unsigned long iocsr_scan_chain3_table[] = {
+       0x0C420D80,
+       0x0C3000FF,
+       0x0A804001,
+       0x07900000,
+       0x08020000,
+       0x00100000,
+       0x0A800000,
+       0x07900000,
+       0x08020000,
+       0x00100000,
+       0x20430000,
+       0x0C003001,
+       0x00C00481,
+       0x00000000,
+       0x00000021,
+       0x82000004,
+       0x05400000,
+       0x03C80000,
+       0x04010000,
+       0x00080000,
+       0x05400000,
+       0x03C80000,
+       0x05400000,
+       0x03C80000,
+       0x90218000,
+       0x86001800,
+       0x00600240,
+       0x80090218,
+       0x00000001,
+       0x40000002,
+       0x02A00000,
+       0x01E40000,
+       0x02A00000,
+       0x01E40000,
+       0x02A00000,
+       0x01E40000,
+       0x02A00000,
+       0x01E40000,
+       0x4810C000,
+       0x43000C00,
+       0x00300120,
+       0xC004810C,
+       0x12043000,
+       0x20000300,
+       0x00040000,
+       0x50670000,
+       0x00000010,
+       0x24590000,
+       0x00001000,
+       0xA0000034,
+       0x0D000001,
+       0xC0680A28,
+       0x45034030,
+       0x12481A01,
+       0x80A280D0,
+       0x34030C06,
+       0x01A01450,
+       0x280D0000,
+       0x30C0680A,
+       0x02490340,
+       0xD000001A,
+       0x0680A280,
+       0x10040000,
+       0x00200000,
+       0x10040000,
+       0x00200000,
+       0x15000000,
+       0x0F200000,
+       0x15000000,
+       0x0F200000,
+       0x01FE0000,
+       0x18000000,
+       0x01800902,
+       0x00240860,
+       0x007F8006,
+       0x00000000,
+       0x0A800001,
+       0x07900000,
+       0x0A800000,
+       0x07900000,
+       0x0A800000,
+       0x07900000,
+       0x08020000,
+       0x00100000,
+       0x20430000,
+       0x0C003001,
+       0x00C00481,
+       0x00000FF0,
+       0x4810C000,
+       0x80000C00,
+       0x05400000,
+       0x02480000,
+       0x04000000,
+       0x00080000,
+       0x05400000,
+       0x03C80000,
+       0x05400000,
+       0x03C80000,
+       0x90218000,
+       0x86001800,
+       0x00600240,
+       0x80090218,
+       0x24086001,
+       0x40000600,
+       0x02A00040,
+       0x01E40000,
+       0x02A00000,
+       0x01E40000,
+       0x02A00000,
+       0x01E40000,
+       0x02A00000,
+       0x01E40000,
+       0x4810C000,
+       0x43000C00,
+       0x00300120,
+       0xC004810C,
+       0x12043000,
+       0x20000300,
+       0x00040000,
+       0x50670000,
+       0x00000010,
+       0x24590000,
+       0x00001000,
+       0xA0000034,
+       0x0D000001,
+       0xC0680A28,
+       0x49034030,
+       0x12481A02,
+       0x80A280D0,
+       0x34030C06,
+       0x01A00040,
+       0x280D0002,
+       0x30C0680A,
+       0x02490340,
+       0xD00A281A,
+       0x0680A280,
+       0x10040000,
+       0x00200000,
+       0x10040000,
+       0x00200000,
+       0x15000000,
+       0x0F200000,
+       0x15000000,
+       0x0F200000,
+       0x01FE0000,
+       0x18000000,
+       0x01800902,
+       0x00240860,
+       0x007F8006,
+       0x00000000,
+       0x99300001,
+       0x34343400,
+       0xAA0D4000,
+       0x01C3A800,
+       0xAA0D4000,
+       0x01C3A890,
+       0xAA0D4000,
+       0x01C3A800,
+       0x00040100,
+       0x00000800,
+       0x00000000,
+       0x00001208,
+       0x00482000,
+       0x01000000,
+       0x00000000,
+       0x00410482,
+       0x0006A000,
+       0x0001B400,
+       0x00020000,
+       0x00000400,
+       0x0002A000,
+       0x0001E400,
+       0x5506A000,
+       0x00E1D400,
+       0x00000000,
+       0x2043090C,
+       0x00003001,
+       0x90400000,
+       0x00000000,
+       0x2020C243,
+       0x2A835000,
+       0x0070EA00,
+       0x2A835000,
+       0x0070EA24,
+       0x2A835000,
+       0x0070EA00,
+       0x00010040,
+       0x00000200,
+       0x00000000,
+       0x00000482,
+       0x00120800,
+       0x00002000,
+       0x80000000,
+       0x00104120,
+       0x00000200,
+       0xAC0D5F80,
+       0xFFFFFFFF,
+       0x14F3690D,
+       0x1A041414,
+       0x00D00000,
+       0x18864000,
+       0x49247A06,
+       0x9A28A3D7,
+       0xF511451E,
+       0x0356E388,
+       0x821A0000,
+       0x0000D000,
+       0x05140680,
+       0xD749247A,
+       0x1E9A28A3,
+       0x88F51145,
+       0x00034EE3,
+       0x00080000,
+       0x00001000,
+       0x00080200,
+       0x00001000,
+       0x000A8000,
+       0x00075000,
+       0x541A8000,
+       0x03875001,
+       0x00000000,
+       0x00000010,
+       0x0080C000,
+       0x41000000,
+       0x00003FC2,
+       0x00820000,
+       0xAA0D4000,
+       0x01C3A800,
+       0xAA0D4000,
+       0x01C3A890,
+       0xAA0D4000,
+       0x01C3A800,
+       0x00040000,
+       0x00000800,
+       0x00000000,
+       0x00001208,
+       0x00482000,
+       0x00800000,
+       0x00000000,
+       0x00410482,
+       0x0006A000,
+       0x0001B400,
+       0x00020000,
+       0x00000400,
+       0x00020080,
+       0x00000400,
+       0x5506A000,
+       0x00E1D400,
+       0x00000000,
+       0x0000090C,
+       0x00000010,
+       0x90400000,
+       0x00000000,
+       0x2020C243,
+       0x2A835000,
+       0x0070EA00,
+       0x2A835000,
+       0x0070EA24,
+       0x2A835000,
+       0x0070EA00,
+       0x00015000,
+       0x0000F200,
+       0x00000000,
+       0x00000482,
+       0x86120800,
+       0x00600240,
+       0x80000000,
+       0x00104120,
+       0x00000200,
+       0xAC0D5F80,
+       0xFFFFFFFF,
+       0x14F3690D,
+       0x1A041414,
+       0x00D00000,
+       0x18864000,
+       0x49247A06,
+       0xEBCF23D7,
+       0xF611451E,
+       0x034E9248,
+       0x821A038E,
+       0x0000D000,
+       0x00000680,
+       0xD749247A,
+       0x1E9BCF23,
+       0x88F61145,
+       0x00034EE3,
+       0x00080000,
+       0x00001000,
+       0x00080000,
+       0x00001000,
+       0x000A8000,
+       0x00075000,
+       0x541A8000,
+       0x03875001,
+       0x00000000,
+       0x00000010,
+       0x0080C000,
+       0x41000000,
+       0x00000002,
+       0x00820004,
+       0xAA0D4000,
+       0x01C3A800,
+       0xAA0D4000,
+       0x01C3A890,
+       0xAA0D4000,
+       0x01C3A800,
+       0x00040000,
+       0x00000800,
+       0x00000000,
+       0x00001208,
+       0x00482000,
+       0x00800000,
+       0x00000000,
+       0x00410482,
+       0x0006A000,
+       0x0001B400,
+       0x00020000,
+       0x00000400,
+       0x0002A000,
+       0x0001E400,
+       0x5506A000,
+       0x00E1D400,
+       0x00000000,
+       0x2043090C,
+       0x00003001,
+       0x90400000,
+       0x00000000,
+       0x2020C243,
+       0x2A835000,
+       0x0070EA00,
+       0x2A835000,
+       0x0070EA00,
+       0x2A835000,
+       0x0070EA00,
+       0x00010000,
+       0x00000200,
+       0x00000000,
+       0x00000482,
+       0x00120800,
+       0x00200000,
+       0x80000000,
+       0x00104120,
+       0x00000200,
+       0xAC0D5F80,
+       0xFFFFFFFF,
+       0x14F3690D,
+       0x1A041414,
+       0x00D00000,
+       0x18864000,
+       0x49247A06,
+       0x9A28A3D7,
+       0xF431451E,
+       0x034E9248,
+       0x821A0000,
+       0x0000D000,
+       0x00000680,
+       0xD749247A,
+       0x1E9A28A3,
+       0x88F61145,
+       0x000356E3,
+       0x00080000,
+       0x00001000,
+       0x00080000,
+       0x00001000,
+       0x000A8000,
+       0x00075000,
+       0x541A8000,
+       0x03875001,
+       0x00000000,
+       0x00000010,
+       0x0080C000,
+       0x41000000,
+       0x00000002,
+       0x00820004,
+       0xAA0D4000,
+       0x01C3A800,
+       0xAA0D4000,
+       0x01C3A800,
+       0xAA0D4000,
+       0x01C3A800,
+       0x00040000,
+       0x00000800,
+       0x00000000,
+       0x00001208,
+       0x00482000,
+       0x00800000,
+       0x00000000,
+       0x00410482,
+       0x0006A000,
+       0x0001B400,
+       0x00020000,
+       0x00000400,
+       0x00020000,
+       0x00000400,
+       0x5506A000,
+       0x00E1D400,
+       0x00000000,
+       0x0000090C,
+       0x00001000,
+       0x90400000,
+       0x00000000,
+       0x2020C243,
+       0x2A835000,
+       0x0070EA00,
+       0x2A835000,
+       0x0070EA00,
+       0x2A835000,
+       0x0070EA00,
+       0x00010040,
+       0x00000200,
+       0x00000000,
+       0x00000482,
+       0x00120800,
+       0x00400000,
+       0x80000000,
+       0x00104120,
+       0x00000200,
+       0xAC0D5F80,
+       0xFFFFFFFF,
+       0x14F1690D,
+       0x1A041414,
+       0x00D00000,
+       0x08864000,
+       0x49247A02,
+       0xEBCF23DB,
+       0xF431451E,
+       0x0356E388,
+       0x821A0000,
+       0x0000D000,
+       0x00000680,
+       0xD749247A,
+       0x1EEBCF23,
+       0x88F43E79,
+       0x000356A2,
+       0x00080000,
+       0x00001000,
+       0x00080000,
+       0x00001000,
+       0x000A8000,
+       0x00075000,
+       0x541A8000,
+       0x03875001,
+       0x00000000,
+       0x00000010,
+       0x0080C000,
+       0x41000000,
+       0x00000002,
+       0x00820004,
+       0x00489800,
+       0x801A1A1A,
+       0x00000200,
+       0x80000004,
+       0x00000200,
+       0x80000004,
+       0x00000200,
+       0x00000004,
+       0x00000200,
+       0x00000004,
+       0x00040000,
+       0x10000000,
+       0x00000000,
+       0x00004000,
+       0x00010000,
+       0x40002080,
+       0x00000100,
+       0x40000002,
+       0x00000100,
+       0x00000002,
+       0x00000100,
+       0x40000002,
+       0x00000100,
+       0x00000002,
+       0x00020000,
+       0x00000000,
+       0x00000008,
+       0x00000020,
+       0x00008000,
+       0x20001040,
+       0x00000080,
+       0x20000001,
+       0x00000080,
+       0x20000001,
+       0x00000080,
+       0x20000001,
+       0x00000080,
+       0x00000001,
+       0x00010000,
+       0x04000000,
+       0x00FF0000,
+       0x00000000,
+       0x00004000,
+       0x00000800,
+       0xC0000001,
+       0x00041419,
+       0x40000000,
+       0x04000816,
+       0x000D0000,
+       0x00006800,
+       0x00000340,
+       0xD000001A,
+       0x06800000,
+       0x00340000,
+       0x0001A000,
+       0x00000D00,
+       0x40000068,
+       0x1A000003,
+       0x00D00000,
+       0x00068000,
+       0x00003400,
+       0x000001A0,
+       0x00000401,
+       0x00000008,
+       0x00000401,
+       0x00000008,
+       0x00000401,
+       0x00000008,
+       0x00000401,
+       0x80000008,
+       0x0000007F,
+       0x20000000,
+       0x00000000,
+       0xE0000080,
+       0x0000001F,
+       0x00004000,
+};
+
+
+#endif /* __SOCFPGA_IOCSR_CONFIG_H__ */
diff --git a/board/aries/mcvevk/qts/pinmux_config.h b/board/aries/mcvevk/qts/pinmux_config.h
new file mode 100644 (file)
index 0000000..ea2f7ab
--- /dev/null
@@ -0,0 +1,219 @@
+/*
+ * Altera SoCFPGA PinMux configuration
+ *
+ * SPDX-License-Identifier:    BSD-3-Clause
+ */
+
+#ifndef __SOCFPGA_PINMUX_CONFIG_H__
+#define __SOCFPGA_PINMUX_CONFIG_H__
+
+const u8 sys_mgr_init_table[] = {
+       3, /* EMACIO0 */
+       3, /* EMACIO1 */
+       3, /* EMACIO2 */
+       3, /* EMACIO3 */
+       3, /* EMACIO4 */
+       3, /* EMACIO5 */
+       3, /* EMACIO6 */
+       3, /* EMACIO7 */
+       3, /* EMACIO8 */
+       3, /* EMACIO9 */
+       3, /* EMACIO10 */
+       3, /* EMACIO11 */
+       3, /* EMACIO12 */
+       3, /* EMACIO13 */
+       0, /* EMACIO14 */
+       0, /* EMACIO15 */
+       0, /* EMACIO16 */
+       0, /* EMACIO17 */
+       0, /* EMACIO18 */
+       0, /* EMACIO19 */
+       3, /* FLASHIO0 */
+       0, /* FLASHIO1 */
+       3, /* FLASHIO2 */
+       3, /* FLASHIO3 */
+       3, /* FLASHIO4 */
+       3, /* FLASHIO5 */
+       3, /* FLASHIO6 */
+       3, /* FLASHIO7 */
+       0, /* FLASHIO8 */
+       3, /* FLASHIO9 */
+       3, /* FLASHIO10 */
+       3, /* FLASHIO11 */
+       0, /* GENERALIO0 */
+       1, /* GENERALIO1 */
+       1, /* GENERALIO2 */
+       0, /* GENERALIO3 */
+       0, /* GENERALIO4 */
+       1, /* GENERALIO5 */
+       1, /* GENERALIO6 */
+       1, /* GENERALIO7 */
+       1, /* GENERALIO8 */
+       0, /* GENERALIO9 */
+       0, /* GENERALIO10 */
+       0, /* GENERALIO11 */
+       0, /* GENERALIO12 */
+       2, /* GENERALIO13 */
+       2, /* GENERALIO14 */
+       1, /* GENERALIO15 */
+       1, /* GENERALIO16 */
+       1, /* GENERALIO17 */
+       1, /* GENERALIO18 */
+       0, /* GENERALIO19 */
+       0, /* GENERALIO20 */
+       0, /* GENERALIO21 */
+       0, /* GENERALIO22 */
+       0, /* GENERALIO23 */
+       0, /* GENERALIO24 */
+       0, /* GENERALIO25 */
+       0, /* GENERALIO26 */
+       0, /* GENERALIO27 */
+       0, /* GENERALIO28 */
+       0, /* GENERALIO29 */
+       0, /* GENERALIO30 */
+       0, /* GENERALIO31 */
+       0, /* MIXED1IO0 */
+       1, /* MIXED1IO1 */
+       1, /* MIXED1IO2 */
+       1, /* MIXED1IO3 */
+       1, /* MIXED1IO4 */
+       0, /* MIXED1IO5 */
+       0, /* MIXED1IO6 */
+       0, /* MIXED1IO7 */
+       1, /* MIXED1IO8 */
+       1, /* MIXED1IO9 */
+       1, /* MIXED1IO10 */
+       1, /* MIXED1IO11 */
+       0, /* MIXED1IO12 */
+       0, /* MIXED1IO13 */
+       0, /* MIXED1IO14 */
+       1, /* MIXED1IO15 */
+       1, /* MIXED1IO16 */
+       1, /* MIXED1IO17 */
+       1, /* MIXED1IO18 */
+       0, /* MIXED1IO19 */
+       0, /* MIXED1IO20 */
+       0, /* MIXED1IO21 */
+       0, /* MIXED2IO0 */
+       0, /* MIXED2IO1 */
+       0, /* MIXED2IO2 */
+       0, /* MIXED2IO3 */
+       0, /* MIXED2IO4 */
+       0, /* MIXED2IO5 */
+       0, /* MIXED2IO6 */
+       0, /* MIXED2IO7 */
+       0, /* GPLINMUX48 */
+       0, /* GPLINMUX49 */
+       0, /* GPLINMUX50 */
+       0, /* GPLINMUX51 */
+       0, /* GPLINMUX52 */
+       0, /* GPLINMUX53 */
+       0, /* GPLINMUX54 */
+       0, /* GPLINMUX55 */
+       0, /* GPLINMUX56 */
+       0, /* GPLINMUX57 */
+       0, /* GPLINMUX58 */
+       0, /* GPLINMUX59 */
+       0, /* GPLINMUX60 */
+       0, /* GPLINMUX61 */
+       0, /* GPLINMUX62 */
+       0, /* GPLINMUX63 */
+       0, /* GPLINMUX64 */
+       0, /* GPLINMUX65 */
+       0, /* GPLINMUX66 */
+       0, /* GPLINMUX67 */
+       0, /* GPLINMUX68 */
+       0, /* GPLINMUX69 */
+       0, /* GPLINMUX70 */
+       1, /* GPLMUX0 */
+       1, /* GPLMUX1 */
+       1, /* GPLMUX2 */
+       1, /* GPLMUX3 */
+       1, /* GPLMUX4 */
+       1, /* GPLMUX5 */
+       1, /* GPLMUX6 */
+       1, /* GPLMUX7 */
+       1, /* GPLMUX8 */
+       1, /* GPLMUX9 */
+       1, /* GPLMUX10 */
+       1, /* GPLMUX11 */
+       1, /* GPLMUX12 */
+       1, /* GPLMUX13 */
+       1, /* GPLMUX14 */
+       1, /* GPLMUX15 */
+       1, /* GPLMUX16 */
+       1, /* GPLMUX17 */
+       1, /* GPLMUX18 */
+       1, /* GPLMUX19 */
+       1, /* GPLMUX20 */
+       1, /* GPLMUX21 */
+       1, /* GPLMUX22 */
+       1, /* GPLMUX23 */
+       1, /* GPLMUX24 */
+       1, /* GPLMUX25 */
+       1, /* GPLMUX26 */
+       1, /* GPLMUX27 */
+       1, /* GPLMUX28 */
+       1, /* GPLMUX29 */
+       1, /* GPLMUX30 */
+       1, /* GPLMUX31 */
+       1, /* GPLMUX32 */
+       1, /* GPLMUX33 */
+       1, /* GPLMUX34 */
+       1, /* GPLMUX35 */
+       1, /* GPLMUX36 */
+       1, /* GPLMUX37 */
+       1, /* GPLMUX38 */
+       1, /* GPLMUX39 */
+       1, /* GPLMUX40 */
+       1, /* GPLMUX41 */
+       1, /* GPLMUX42 */
+       1, /* GPLMUX43 */
+       1, /* GPLMUX44 */
+       1, /* GPLMUX45 */
+       1, /* GPLMUX46 */
+       1, /* GPLMUX47 */
+       1, /* GPLMUX48 */
+       1, /* GPLMUX49 */
+       1, /* GPLMUX50 */
+       1, /* GPLMUX51 */
+       1, /* GPLMUX52 */
+       1, /* GPLMUX53 */
+       1, /* GPLMUX54 */
+       1, /* GPLMUX55 */
+       1, /* GPLMUX56 */
+       1, /* GPLMUX57 */
+       1, /* GPLMUX58 */
+       1, /* GPLMUX59 */
+       1, /* GPLMUX60 */
+       1, /* GPLMUX61 */
+       1, /* GPLMUX62 */
+       1, /* GPLMUX63 */
+       1, /* GPLMUX64 */
+       1, /* GPLMUX65 */
+       1, /* GPLMUX66 */
+       1, /* GPLMUX67 */
+       1, /* GPLMUX68 */
+       1, /* GPLMUX69 */
+       1, /* GPLMUX70 */
+       0, /* NANDUSEFPGA */
+       0, /* UART0USEFPGA */
+       0, /* RGMII1USEFPGA */
+       0, /* SPIS0USEFPGA */
+       0, /* CAN0USEFPGA */
+       0, /* I2C0USEFPGA */
+       0, /* SDMMCUSEFPGA */
+       0, /* QSPIUSEFPGA */
+       0, /* SPIS1USEFPGA */
+       0, /* RGMII0USEFPGA */
+       1, /* UART1USEFPGA */
+       0, /* CAN1USEFPGA */
+       0, /* USB1USEFPGA */
+       0, /* I2C3USEFPGA */
+       0, /* I2C2USEFPGA */
+       0, /* I2C1USEFPGA */
+       0, /* SPIM1USEFPGA */
+       0, /* USB0USEFPGA */
+       0 /* SPIM0USEFPGA */
+};
+#endif /* __SOCFPGA_PINMUX_CONFIG_H__ */
diff --git a/board/aries/mcvevk/qts/pll_config.h b/board/aries/mcvevk/qts/pll_config.h
new file mode 100644 (file)
index 0000000..b718b39
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Altera SoCFPGA Clock and PLL configuration
+ *
+ * SPDX-License-Identifier:    BSD-3-Clause
+ */
+
+#ifndef __SOCFPGA_PLL_CONFIG_H__
+#define __SOCFPGA_PLL_CONFIG_H__
+
+#define CONFIG_HPS_DBCTRL_STAYOSC1 1
+
+#define CONFIG_HPS_MAINPLLGRP_VCO_DENOM 0
+#define CONFIG_HPS_MAINPLLGRP_VCO_NUMER 63
+#define CONFIG_HPS_MAINPLLGRP_MPUCLK_CNT 0
+#define CONFIG_HPS_MAINPLLGRP_MAINCLK_CNT 0
+#define CONFIG_HPS_MAINPLLGRP_DBGATCLK_CNT 0
+#define CONFIG_HPS_MAINPLLGRP_MAINQSPICLK_CNT 511
+#define CONFIG_HPS_MAINPLLGRP_MAINNANDSDMMCCLK_CNT 511
+#define CONFIG_HPS_MAINPLLGRP_CFGS2FUSER0CLK_CNT 15
+#define CONFIG_HPS_MAINPLLGRP_MAINDIV_L3MPCLK 1
+#define CONFIG_HPS_MAINPLLGRP_MAINDIV_L3SPCLK 1
+#define CONFIG_HPS_MAINPLLGRP_MAINDIV_L4MPCLK 1
+#define CONFIG_HPS_MAINPLLGRP_MAINDIV_L4SPCLK 1
+#define CONFIG_HPS_MAINPLLGRP_DBGDIV_DBGATCLK 0
+#define CONFIG_HPS_MAINPLLGRP_DBGDIV_DBGCLK 1
+#define CONFIG_HPS_MAINPLLGRP_TRACEDIV_TRACECLK 0
+#define CONFIG_HPS_MAINPLLGRP_L4SRC_L4MP 1
+#define CONFIG_HPS_MAINPLLGRP_L4SRC_L4SP 1
+
+#define CONFIG_HPS_PERPLLGRP_VCO_DENOM 0
+#define CONFIG_HPS_PERPLLGRP_VCO_NUMER 39
+#define CONFIG_HPS_PERPLLGRP_VCO_PSRC 0
+#define CONFIG_HPS_PERPLLGRP_EMAC0CLK_CNT 3
+#define CONFIG_HPS_PERPLLGRP_EMAC1CLK_CNT 511
+#define CONFIG_HPS_PERPLLGRP_PERQSPICLK_CNT 511
+#define CONFIG_HPS_PERPLLGRP_PERNANDSDMMCCLK_CNT 4
+#define CONFIG_HPS_PERPLLGRP_PERBASECLK_CNT 4
+#define CONFIG_HPS_PERPLLGRP_S2FUSER1CLK_CNT 511
+#define CONFIG_HPS_PERPLLGRP_DIV_USBCLK 0
+#define CONFIG_HPS_PERPLLGRP_DIV_SPIMCLK 0
+#define CONFIG_HPS_PERPLLGRP_DIV_CAN0CLK 1
+#define CONFIG_HPS_PERPLLGRP_DIV_CAN1CLK 1
+#define CONFIG_HPS_PERPLLGRP_GPIODIV_GPIODBCLK 6249
+#define CONFIG_HPS_PERPLLGRP_SRC_SDMMC 2
+#define CONFIG_HPS_PERPLLGRP_SRC_NAND 2
+#define CONFIG_HPS_PERPLLGRP_SRC_QSPI 1
+
+#define CONFIG_HPS_SDRPLLGRP_VCO_DENOM 0
+#define CONFIG_HPS_SDRPLLGRP_VCO_NUMER 31
+#define CONFIG_HPS_SDRPLLGRP_VCO_SSRC 0
+#define CONFIG_HPS_SDRPLLGRP_DDRDQSCLK_CNT 1
+#define CONFIG_HPS_SDRPLLGRP_DDRDQSCLK_PHASE 0
+#define CONFIG_HPS_SDRPLLGRP_DDR2XDQSCLK_CNT 0
+#define CONFIG_HPS_SDRPLLGRP_DDR2XDQSCLK_PHASE 0
+#define CONFIG_HPS_SDRPLLGRP_DDRDQCLK_CNT 1
+#define CONFIG_HPS_SDRPLLGRP_DDRDQCLK_PHASE 4
+#define CONFIG_HPS_SDRPLLGRP_S2FUSER2CLK_CNT 5
+#define CONFIG_HPS_SDRPLLGRP_S2FUSER2CLK_PHASE 0
+
+#define CONFIG_HPS_CLK_OSC1_HZ 25000000
+#define CONFIG_HPS_CLK_OSC2_HZ 25000000
+#define CONFIG_HPS_CLK_F2S_SDR_REF_HZ 0
+#define CONFIG_HPS_CLK_F2S_PER_REF_HZ 0
+#define CONFIG_HPS_CLK_MAINVCO_HZ 1600000000
+#define CONFIG_HPS_CLK_PERVCO_HZ 1000000000
+#define CONFIG_HPS_CLK_SDRVCO_HZ 800000000
+#define CONFIG_HPS_CLK_EMAC0_HZ 250000000
+#define CONFIG_HPS_CLK_EMAC1_HZ 1953125
+#define CONFIG_HPS_CLK_USBCLK_HZ 200000000
+#define CONFIG_HPS_CLK_NAND_HZ 50000000
+#define CONFIG_HPS_CLK_SDMMC_HZ 200000000
+#define CONFIG_HPS_CLK_QSPI_HZ 3125000
+#define CONFIG_HPS_CLK_SPIM_HZ 200000000
+#define CONFIG_HPS_CLK_CAN0_HZ 100000000
+#define CONFIG_HPS_CLK_CAN1_HZ 100000000
+#define CONFIG_HPS_CLK_GPIODB_HZ 32000
+#define CONFIG_HPS_CLK_L4_MP_HZ 100000000
+#define CONFIG_HPS_CLK_L4_SP_HZ 100000000
+
+#define CONFIG_HPS_ALTERAGRP_MPUCLK 1
+#define CONFIG_HPS_ALTERAGRP_MAINCLK 3
+#define CONFIG_HPS_ALTERAGRP_DBGATCLK 3
+
+
+#endif /* __SOCFPGA_PLL_CONFIG_H__ */
diff --git a/board/aries/mcvevk/qts/sdram_config.h b/board/aries/mcvevk/qts/sdram_config.h
new file mode 100644 (file)
index 0000000..ff64f55
--- /dev/null
@@ -0,0 +1,344 @@
+/*
+ * Altera SoCFPGA SDRAM configuration
+ *
+ * SPDX-License-Identifier:    BSD-3-Clause
+ */
+
+#ifndef __SOCFPGA_SDRAM_CONFIG_H__
+#define __SOCFPGA_SDRAM_CONFIG_H__
+
+/* SDRAM configuration */
+#define CONFIG_HPS_SDR_CTRLCFG_CPORTRDWR_CPORTRDWR             0x5A56A
+#define CONFIG_HPS_SDR_CTRLCFG_CPORTRMAP_CPORTRMAP             0xB00088
+#define CONFIG_HPS_SDR_CTRLCFG_CPORTWIDTH_CPORTWIDTH           0x44555
+#define CONFIG_HPS_SDR_CTRLCFG_CPORTWMAP_CPORTWMAP             0x2C011000
+#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ADDRORDER               0
+#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_DQSTRKEN                        0
+#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ECCCORREN               0
+#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ECCEN                   0
+#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_MEMBL                   8
+#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_MEMTYPE                 2
+#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_NODMPINS                        0
+#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_REORDEREN               1
+#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_STARVELIMIT             10
+#define CONFIG_HPS_SDR_CTRLCFG_CTRLWIDTH_CTRLWIDTH             2
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMADDRW_BANKBITS              3
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMADDRW_COLBITS               10
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMADDRW_CSBITS                        1
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMADDRW_ROWBITS               15
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMDEVWIDTH_DEVWIDTH           8
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMIFWIDTH_IFWIDTH             32
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMINTR_INTREN                 0
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMODT_READ                    0
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMODT_WRITE                   1
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_AL                  0
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TCL                 6
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TCWL                        6
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TFAW                        16
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TRFC                        140
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TRRD                        5
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TRCD             6
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TREFI            1560
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TRP              6
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TWR              6
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TWTR             4
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TCCD                        4
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TMRD                        4
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TRAS                        14
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TRC                 20
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TRTP                        5
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING4_PWRDOWNEXIT         3
+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING4_SELFRFSHEXIT                512
+#define CONFIG_HPS_SDR_CTRLCFG_EXTRATIME1_CFG_EXTRA_CTL_CLK_RD_TO_WR 0
+#define CONFIG_HPS_SDR_CTRLCFG_EXTRATIME1_CFG_EXTRA_CTL_CLK_RD_TO_WR_BC 0
+#define CONFIG_HPS_SDR_CTRLCFG_EXTRATIME1_CFG_EXTRA_CTL_CLK_RD_TO_WR_DIFF_CHIP 0
+#define CONFIG_HPS_SDR_CTRLCFG_FIFOCFG_INCSYNC                 0
+#define CONFIG_HPS_SDR_CTRLCFG_FIFOCFG_SYNCMODE                        0
+#define CONFIG_HPS_SDR_CTRLCFG_FPGAPORTRST                     0x0
+#define CONFIG_HPS_SDR_CTRLCFG_LOWPWREQ_SELFRFSHMASK           3
+#define CONFIG_HPS_SDR_CTRLCFG_LOWPWRTIMING_AUTOPDCYCLES       0
+#define CONFIG_HPS_SDR_CTRLCFG_LOWPWRTIMING_CLKDISABLECYCLES   8
+#define CONFIG_HPS_SDR_CTRLCFG_MPPACING_0_THRESHOLD1_31_0      0x20820820
+#define CONFIG_HPS_SDR_CTRLCFG_MPPACING_1_THRESHOLD1_59_32     0x8208208
+#define CONFIG_HPS_SDR_CTRLCFG_MPPACING_1_THRESHOLD2_3_0       0
+#define CONFIG_HPS_SDR_CTRLCFG_MPPACING_2_THRESHOLD2_35_4      0x41041041
+#define CONFIG_HPS_SDR_CTRLCFG_MPPACING_3_THRESHOLD2_59_36     0x410410
+#define CONFIG_HPS_SDR_CTRLCFG_MPPRIORITY_USERPRIORITY         0x3FFD1088
+#define CONFIG_HPS_SDR_CTRLCFG_MPTHRESHOLDRST_0_THRESHOLDRSTCYCLES_31_0        0x01010101
+#define CONFIG_HPS_SDR_CTRLCFG_MPTHRESHOLDRST_1_THRESHOLDRSTCYCLES_63_32       0x01010101
+#define CONFIG_HPS_SDR_CTRLCFG_MPTHRESHOLDRST_2_THRESHOLDRSTCYCLES_79_64       0x0101
+#define CONFIG_HPS_SDR_CTRLCFG_MPWIEIGHT_0_STATICWEIGHT_31_0   0x21084210
+#define CONFIG_HPS_SDR_CTRLCFG_MPWIEIGHT_1_STATICWEIGHT_49_32  0x1EF84
+#define CONFIG_HPS_SDR_CTRLCFG_MPWIEIGHT_1_SUMOFWEIGHT_13_0    0x2020
+#define CONFIG_HPS_SDR_CTRLCFG_MPWIEIGHT_2_SUMOFWEIGHT_45_14   0x0
+#define CONFIG_HPS_SDR_CTRLCFG_MPWIEIGHT_3_SUMOFWEIGHT_63_46   0xF800
+#define CONFIG_HPS_SDR_CTRLCFG_PHYCTRL_PHYCTRL_0               0x200
+#define CONFIG_HPS_SDR_CTRLCFG_PORTCFG_AUTOPCHEN               0
+#define CONFIG_HPS_SDR_CTRLCFG_RFIFOCMAP_RFIFOCMAP             0x760210
+#define CONFIG_HPS_SDR_CTRLCFG_STATICCFG_MEMBL                 2
+#define CONFIG_HPS_SDR_CTRLCFG_STATICCFG_USEECCASDATA          0
+#define CONFIG_HPS_SDR_CTRLCFG_WFIFOCMAP_WFIFOCMAP             0x980543
+
+/* Sequencer auto configuration */
+#define RW_MGR_ACTIVATE_0_AND_1        0x0D
+#define RW_MGR_ACTIVATE_0_AND_1_WAIT1  0x0E
+#define RW_MGR_ACTIVATE_0_AND_1_WAIT2  0x10
+#define RW_MGR_ACTIVATE_1      0x0F
+#define RW_MGR_CLEAR_DQS_ENABLE        0x49
+#define RW_MGR_GUARANTEED_READ 0x4C
+#define RW_MGR_GUARANTEED_READ_CONT    0x54
+#define RW_MGR_GUARANTEED_WRITE        0x18
+#define RW_MGR_GUARANTEED_WRITE_WAIT0  0x1B
+#define RW_MGR_GUARANTEED_WRITE_WAIT1  0x1F
+#define RW_MGR_GUARANTEED_WRITE_WAIT2  0x19
+#define RW_MGR_GUARANTEED_WRITE_WAIT3  0x1D
+#define RW_MGR_IDLE    0x00
+#define RW_MGR_IDLE_LOOP1      0x7B
+#define RW_MGR_IDLE_LOOP2      0x7A
+#define RW_MGR_INIT_RESET_0_CKE_0      0x6F
+#define RW_MGR_INIT_RESET_1_CKE_0      0x74
+#define RW_MGR_LFSR_WR_RD_BANK_0       0x22
+#define RW_MGR_LFSR_WR_RD_BANK_0_DATA  0x25
+#define RW_MGR_LFSR_WR_RD_BANK_0_DQS   0x24
+#define RW_MGR_LFSR_WR_RD_BANK_0_NOP   0x23
+#define RW_MGR_LFSR_WR_RD_BANK_0_WAIT  0x32
+#define RW_MGR_LFSR_WR_RD_BANK_0_WL_1  0x21
+#define RW_MGR_LFSR_WR_RD_DM_BANK_0    0x36
+#define RW_MGR_LFSR_WR_RD_DM_BANK_0_DATA       0x39
+#define RW_MGR_LFSR_WR_RD_DM_BANK_0_DQS        0x38
+#define RW_MGR_LFSR_WR_RD_DM_BANK_0_NOP        0x37
+#define RW_MGR_LFSR_WR_RD_DM_BANK_0_WAIT       0x46
+#define RW_MGR_LFSR_WR_RD_DM_BANK_0_WL_1       0x35
+#define RW_MGR_MRS0_DLL_RESET  0x02
+#define RW_MGR_MRS0_DLL_RESET_MIRR     0x08
+#define RW_MGR_MRS0_USER       0x07
+#define RW_MGR_MRS0_USER_MIRR  0x0C
+#define RW_MGR_MRS1    0x03
+#define RW_MGR_MRS1_MIRR       0x09
+#define RW_MGR_MRS2    0x04
+#define RW_MGR_MRS2_MIRR       0x0A
+#define RW_MGR_MRS3    0x05
+#define RW_MGR_MRS3_MIRR       0x0B
+#define RW_MGR_PRECHARGE_ALL   0x12
+#define RW_MGR_READ_B2B        0x59
+#define RW_MGR_READ_B2B_WAIT1  0x61
+#define RW_MGR_READ_B2B_WAIT2  0x6B
+#define RW_MGR_REFRESH_ALL     0x14
+#define RW_MGR_RETURN  0x01
+#define RW_MGR_SGLE_READ       0x7D
+#define RW_MGR_ZQCL    0x06
+
+/* Sequencer defines configuration */
+#define AFI_RATE_RATIO 1
+#define CALIB_LFIFO_OFFSET     7
+#define CALIB_VFIFO_OFFSET     5
+#define ENABLE_SUPER_QUICK_CALIBRATION 0
+#define IO_DELAY_PER_DCHAIN_TAP        25
+#define IO_DELAY_PER_DQS_EN_DCHAIN_TAP 25
+#define IO_DELAY_PER_OPA_TAP   312
+#define IO_DLL_CHAIN_LENGTH    8
+#define IO_DQDQS_OUT_PHASE_MAX 0
+#define IO_DQS_EN_DELAY_MAX    31
+#define IO_DQS_EN_DELAY_OFFSET 0
+#define IO_DQS_EN_PHASE_MAX    7
+#define IO_DQS_IN_DELAY_MAX    31
+#define IO_DQS_IN_RESERVE      4
+#define IO_DQS_OUT_RESERVE     4
+#define IO_IO_IN_DELAY_MAX     31
+#define IO_IO_OUT1_DELAY_MAX   31
+#define IO_IO_OUT2_DELAY_MAX   0
+#define IO_SHIFT_DQS_EN_WHEN_SHIFT_DQS 0
+#define MAX_LATENCY_COUNT_WIDTH        5
+#define READ_VALID_FIFO_SIZE   16
+#define REG_FILE_INIT_SEQ_SIGNATURE    0x55550496
+#define RW_MGR_MEM_ADDRESS_MIRRORING   0
+#define RW_MGR_MEM_DATA_MASK_WIDTH     4
+#define RW_MGR_MEM_DATA_WIDTH  32
+#define RW_MGR_MEM_DQ_PER_READ_DQS     8
+#define RW_MGR_MEM_DQ_PER_WRITE_DQS    8
+#define RW_MGR_MEM_IF_READ_DQS_WIDTH   4
+#define RW_MGR_MEM_IF_WRITE_DQS_WIDTH  4
+#define RW_MGR_MEM_NUMBER_OF_CS_PER_DIMM       1
+#define RW_MGR_MEM_NUMBER_OF_RANKS     1
+#define RW_MGR_MEM_VIRTUAL_GROUPS_PER_READ_DQS 1
+#define RW_MGR_MEM_VIRTUAL_GROUPS_PER_WRITE_DQS        1
+#define RW_MGR_TRUE_MEM_DATA_MASK_WIDTH        4
+#define TINIT_CNTR0_VAL        99
+#define TINIT_CNTR1_VAL        32
+#define TINIT_CNTR2_VAL        32
+#define TRESET_CNTR0_VAL       99
+#define TRESET_CNTR1_VAL       99
+#define TRESET_CNTR2_VAL       10
+
+/* Sequencer ac_rom_init configuration */
+const u32 ac_rom_init[] = {
+       0x20700000,
+       0x20780000,
+       0x10080421,
+       0x10080520,
+       0x10090044,
+       0x100a0008,
+       0x100b0000,
+       0x10380400,
+       0x10080441,
+       0x100804c0,
+       0x100a0024,
+       0x10090010,
+       0x100b0000,
+       0x30780000,
+       0x38780000,
+       0x30780000,
+       0x10680000,
+       0x106b0000,
+       0x10280400,
+       0x10480000,
+       0x1c980000,
+       0x1c9b0000,
+       0x1c980008,
+       0x1c9b0008,
+       0x38f80000,
+       0x3cf80000,
+       0x38780000,
+       0x18180000,
+       0x18980000,
+       0x13580000,
+       0x135b0000,
+       0x13580008,
+       0x135b0008,
+       0x33780000,
+       0x10580008,
+       0x10780000
+};
+
+/* Sequencer inst_rom_init configuration */
+const u32 inst_rom_init[] = {
+       0x80000,
+       0x80680,
+       0x8180,
+       0x8200,
+       0x8280,
+       0x8300,
+       0x8380,
+       0x8100,
+       0x8480,
+       0x8500,
+       0x8580,
+       0x8600,
+       0x8400,
+       0x800,
+       0x8680,
+       0x880,
+       0xa680,
+       0x80680,
+       0x900,
+       0x80680,
+       0x980,
+       0xa680,
+       0x8680,
+       0x80680,
+       0xb68,
+       0xcce8,
+       0xae8,
+       0x8ce8,
+       0xb88,
+       0xec88,
+       0xa08,
+       0xac88,
+       0x80680,
+       0xce00,
+       0xcd80,
+       0xe700,
+       0xc00,
+       0x20ce0,
+       0x20ce0,
+       0x20ce0,
+       0x20ce0,
+       0xd00,
+       0x680,
+       0x680,
+       0x680,
+       0x680,
+       0x60e80,
+       0x61080,
+       0x61080,
+       0x61080,
+       0xa680,
+       0x8680,
+       0x80680,
+       0xce00,
+       0xcd80,
+       0xe700,
+       0xc00,
+       0x30ce0,
+       0x30ce0,
+       0x30ce0,
+       0x30ce0,
+       0xd00,
+       0x680,
+       0x680,
+       0x680,
+       0x680,
+       0x70e80,
+       0x71080,
+       0x71080,
+       0x71080,
+       0xa680,
+       0x8680,
+       0x80680,
+       0x1158,
+       0x6d8,
+       0x80680,
+       0x1168,
+       0x7e8,
+       0x7e8,
+       0x87e8,
+       0x40fe8,
+       0x410e8,
+       0x410e8,
+       0x410e8,
+       0x1168,
+       0x7e8,
+       0x7e8,
+       0xa7e8,
+       0x80680,
+       0x40e88,
+       0x41088,
+       0x41088,
+       0x41088,
+       0x40f68,
+       0x410e8,
+       0x410e8,
+       0x410e8,
+       0xa680,
+       0x40fe8,
+       0x410e8,
+       0x410e8,
+       0x410e8,
+       0x41008,
+       0x41088,
+       0x41088,
+       0x41088,
+       0x1100,
+       0xc680,
+       0x8680,
+       0xe680,
+       0x80680,
+       0x0,
+       0x8000,
+       0xa000,
+       0xc000,
+       0x80000,
+       0x80,
+       0x8080,
+       0xa080,
+       0xc080,
+       0x80080,
+       0x9180,
+       0x8680,
+       0xa680,
+       0x80680,
+       0x40f08,
+       0x80680
+};
+
+#endif /* __SOCFPGA_SDRAM_CONFIG_H__ */
diff --git a/board/aries/mcvevk/socfpga.c b/board/aries/mcvevk/socfpga.c
new file mode 100644 (file)
index 0000000..6be58f0
--- /dev/null
@@ -0,0 +1,6 @@
+/*
+ * Copyright (C) 2015 Marek Vasut <marex@denx.de>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+#include <common.h>
index da281e87fc49e796b78d0b01acc2d4c6330b3f7c..d011ae5723e5ed74129cb301cecf17637f408524 100644 (file)
@@ -27,7 +27,7 @@ int checkboard(void)
        return 0;
 }
 
-int initdram(void)
+int dram_init(void)
 {
 #if !defined(CONFIG_MONITOR_IS_IN_RAM)
        sdram_t *sdp = (sdram_t *)(MMAP_SDRAM);
index fc4f50d2192acabb33206a31a58d2bd2dce900d2..58da2d27f8cf74f1e2b7fab18342a5d1b3bd66f8 100644 (file)
@@ -71,10 +71,10 @@ static void at91sam9n12ek_nand_hw_init(void)
        /* Configure ENABLE pin for NandFlash */
        at91_set_pio_output(AT91_PIO_PORTD, 4, 1);
 
-       at91_set_a_periph(AT91_PIO_PORTD, 0, 1);    /* NAND OE */
-       at91_set_a_periph(AT91_PIO_PORTD, 1, 1);    /* NAND WE */
-       at91_set_a_periph(AT91_PIO_PORTD, 2, 1);    /* ALE */
-       at91_set_a_periph(AT91_PIO_PORTD, 3, 1);    /* CLE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 0, 1);    /* NAND OE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 1, 1);    /* NAND WE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 2, 1);    /* ALE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 3, 1);    /* CLE */
 }
 #endif
 
@@ -194,7 +194,7 @@ void at91sam9n12ek_ks8851_hw_init(void)
               &smc->cs[2].mode);
 
        /* Configure NCS2 PIN */
-       at91_set_b_periph(AT91_PIO_PORTD, 19, 0);
+       at91_pio3_set_b_periph(AT91_PIO_PORTD, 19, 0);
 }
 #endif
 
index b0d440d728a6a9c7e7da9b0cad9235bba8c98d2c..cc81776f9be9e81ac4a5e432a1606e2fad367df8 100644 (file)
@@ -77,18 +77,18 @@ static void at91sam9x5ek_nand_hw_init(void)
        /* Enable NandFlash */
        at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
 
-       at91_set_a_periph(AT91_PIO_PORTD, 0, 1);        /* NAND OE */
-       at91_set_a_periph(AT91_PIO_PORTD, 1, 1);        /* NAND WE */
-       at91_set_a_periph(AT91_PIO_PORTD, 2, 1);        /* NAND ALE */
-       at91_set_a_periph(AT91_PIO_PORTD, 3, 1);        /* NAND CLE */
-       at91_set_a_periph(AT91_PIO_PORTD, 6, 1);
-       at91_set_a_periph(AT91_PIO_PORTD, 7, 1);
-       at91_set_a_periph(AT91_PIO_PORTD, 8, 1);
-       at91_set_a_periph(AT91_PIO_PORTD, 9, 1);
-       at91_set_a_periph(AT91_PIO_PORTD, 10, 1);
-       at91_set_a_periph(AT91_PIO_PORTD, 11, 1);
-       at91_set_a_periph(AT91_PIO_PORTD, 12, 1);
-       at91_set_a_periph(AT91_PIO_PORTD, 13, 1);
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 0, 1);   /* NAND OE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 1, 1);   /* NAND WE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 2, 1);   /* NAND ALE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 3, 1);   /* NAND CLE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 6, 1);
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 7, 1);
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 8, 1);
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 9, 1);
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 10, 1);
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 11, 1);
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 12, 1);
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 13, 1);
 }
 #endif
 
@@ -128,49 +128,49 @@ vidinfo_t panel_info = {
 void lcd_enable(void)
 {
        if (has_lcdc())
-               at91_set_a_periph(AT91_PIO_PORTC, 29, 1);       /* power up */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 29, 1);  /* power up */
 }
 
 void lcd_disable(void)
 {
        if (has_lcdc())
-               at91_set_a_periph(AT91_PIO_PORTC, 29, 0);       /* power down */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 29, 0);  /* power down */
 }
 
 static void at91sam9x5ek_lcd_hw_init(void)
 {
        if (has_lcdc()) {
-               at91_set_a_periph(AT91_PIO_PORTC, 26, 0);       /* LCDPWM */
-               at91_set_a_periph(AT91_PIO_PORTC, 27, 0);       /* LCDVSYNC */
-               at91_set_a_periph(AT91_PIO_PORTC, 28, 0);       /* LCDHSYNC */
-               at91_set_a_periph(AT91_PIO_PORTC, 24, 0);       /* LCDDISP */
-               at91_set_a_periph(AT91_PIO_PORTC, 29, 0);       /* LCDDEN */
-               at91_set_a_periph(AT91_PIO_PORTC, 30, 0);       /* LCDPCK */
-
-               at91_set_a_periph(AT91_PIO_PORTC, 0, 0);        /* LCDD0 */
-               at91_set_a_periph(AT91_PIO_PORTC, 1, 0);        /* LCDD1 */
-               at91_set_a_periph(AT91_PIO_PORTC, 2, 0);        /* LCDD2 */
-               at91_set_a_periph(AT91_PIO_PORTC, 3, 0);        /* LCDD3 */
-               at91_set_a_periph(AT91_PIO_PORTC, 4, 0);        /* LCDD4 */
-               at91_set_a_periph(AT91_PIO_PORTC, 5, 0);        /* LCDD5 */
-               at91_set_a_periph(AT91_PIO_PORTC, 6, 0);        /* LCDD6 */
-               at91_set_a_periph(AT91_PIO_PORTC, 7, 0);        /* LCDD7 */
-               at91_set_a_periph(AT91_PIO_PORTC, 8, 0);        /* LCDD8 */
-               at91_set_a_periph(AT91_PIO_PORTC, 9, 0);        /* LCDD9 */
-               at91_set_a_periph(AT91_PIO_PORTC, 10, 0);       /* LCDD10 */
-               at91_set_a_periph(AT91_PIO_PORTC, 11, 0);       /* LCDD11 */
-               at91_set_a_periph(AT91_PIO_PORTC, 12, 0);       /* LCDD12 */
-               at91_set_a_periph(AT91_PIO_PORTC, 13, 0);       /* LCDD13 */
-               at91_set_a_periph(AT91_PIO_PORTC, 14, 0);       /* LCDD14 */
-               at91_set_a_periph(AT91_PIO_PORTC, 15, 0);       /* LCDD15 */
-               at91_set_a_periph(AT91_PIO_PORTC, 16, 0);       /* LCDD16 */
-               at91_set_a_periph(AT91_PIO_PORTC, 17, 0);       /* LCDD17 */
-               at91_set_a_periph(AT91_PIO_PORTC, 18, 0);       /* LCDD18 */
-               at91_set_a_periph(AT91_PIO_PORTC, 19, 0);       /* LCDD19 */
-               at91_set_a_periph(AT91_PIO_PORTC, 20, 0);       /* LCDD20 */
-               at91_set_a_periph(AT91_PIO_PORTC, 21, 0);       /* LCDD21 */
-               at91_set_a_periph(AT91_PIO_PORTC, 22, 0);       /* LCDD22 */
-               at91_set_a_periph(AT91_PIO_PORTC, 23, 0);       /* LCDD23 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 26, 0);  /* LCDPWM */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 27, 0);  /* LCDVSYNC */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 28, 0);  /* LCDHSYNC */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 24, 0);  /* LCDDISP */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 29, 0);  /* LCDDEN */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 30, 0);  /* LCDPCK */
+
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 0, 0);   /* LCDD0 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 1, 0);   /* LCDD1 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 2, 0);   /* LCDD2 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 3, 0);   /* LCDD3 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 4, 0);   /* LCDD4 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 5, 0);   /* LCDD5 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 6, 0);   /* LCDD6 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 7, 0);   /* LCDD7 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 8, 0);   /* LCDD8 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 9, 0);   /* LCDD9 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 10, 0);  /* LCDD10 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 11, 0);  /* LCDD11 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 12, 0);  /* LCDD12 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 13, 0);  /* LCDD13 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 14, 0);  /* LCDD14 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 15, 0);  /* LCDD15 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 16, 0);  /* LCDD16 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 17, 0);  /* LCDD17 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 18, 0);  /* LCDD18 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 19, 0);  /* LCDD19 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 20, 0);  /* LCDD20 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 21, 0);  /* LCDD21 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 22, 0);  /* LCDD22 */
+               at91_pio3_set_a_periph(AT91_PIO_PORTC, 23, 0);  /* LCDD23 */
 
                at91_periph_clk_enable(ATMEL_ID_LCDC);
        }
index ce67478f0be84c99aa63c7f2c45a5e6434077d1c..134c2fe1eb5fecea9e4daa1bc0bdd9efbb201eaf 100644 (file)
@@ -95,31 +95,31 @@ static void sama5d3xek_nor_hw_init(void)
               &smc->cs[0].mode);
 
        /* Address pin (A1 ~ A23) configuration */
-       at91_set_a_periph(AT91_PIO_PORTE, 1, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 2, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 3, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 4, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 5, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 6, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 7, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 8, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 9, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 10, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 11, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 12, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 13, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 14, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 15, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 16, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 17, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 18, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 19, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 20, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 21, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 22, 0);
-       at91_set_a_periph(AT91_PIO_PORTE, 23, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 1, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 2, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 3, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 4, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 5, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 6, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 7, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 8, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 9, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 10, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 11, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 12, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 13, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 14, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 15, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 16, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 17, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 18, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 19, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 20, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 21, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 22, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 23, 0);
        /* CS0 pin configuration */
-       at91_set_a_periph(AT91_PIO_PORTE, 26, 0);
+       at91_pio3_set_a_periph(AT91_PIO_PORTE, 26, 0);
 }
 #endif
 
@@ -170,14 +170,14 @@ static void sama5d3xek_lcd_hw_init(void)
        gd->fb_base = CONFIG_SAMA5D3_LCD_BASE;
 
        /* The higher 8 bit of LCD is board related */
-       at91_set_c_periph(AT91_PIO_PORTC, 14, 0);       /* LCDD16 */
-       at91_set_c_periph(AT91_PIO_PORTC, 13, 0);       /* LCDD17 */
-       at91_set_c_periph(AT91_PIO_PORTC, 12, 0);       /* LCDD18 */
-       at91_set_c_periph(AT91_PIO_PORTC, 11, 0);       /* LCDD19 */
-       at91_set_c_periph(AT91_PIO_PORTC, 10, 0);       /* LCDD20 */
-       at91_set_c_periph(AT91_PIO_PORTC, 15, 0);       /* LCDD21 */
-       at91_set_c_periph(AT91_PIO_PORTE, 27, 0);       /* LCDD22 */
-       at91_set_c_periph(AT91_PIO_PORTE, 28, 0);       /* LCDD23 */
+       at91_pio3_set_c_periph(AT91_PIO_PORTC, 14, 0);  /* LCDD16 */
+       at91_pio3_set_c_periph(AT91_PIO_PORTC, 13, 0);  /* LCDD17 */
+       at91_pio3_set_c_periph(AT91_PIO_PORTC, 12, 0);  /* LCDD18 */
+       at91_pio3_set_c_periph(AT91_PIO_PORTC, 11, 0);  /* LCDD19 */
+       at91_pio3_set_c_periph(AT91_PIO_PORTC, 10, 0);  /* LCDD20 */
+       at91_pio3_set_c_periph(AT91_PIO_PORTC, 15, 0);  /* LCDD21 */
+       at91_pio3_set_c_periph(AT91_PIO_PORTE, 27, 0);  /* LCDD22 */
+       at91_pio3_set_c_periph(AT91_PIO_PORTE, 28, 0);  /* LCDD23 */
 
        /* Configure lower 16 bit of LCD and enable clock */
        at91_lcd_hw_init();
index 23ec2744684aedc5a6cecb4f423dd58e59f84836..94ecab28b9989c94a46305c0b0d7946ed61c3205 100644 (file)
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/atmel_mpddrc.h>
-#include <asm/arch/atmel_usba_udc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/sama5d3_smc.h>
 #include <asm/arch/sama5d4.h>
 #include <atmel_hlcdc.h>
-#include <atmel_mci.h>
+#include <debug_uart.h>
 #include <lcd.h>
-#include <mmc.h>
-#include <net.h>
-#include <netdev.h>
 #include <nand.h>
-#include <spi.h>
 #include <version.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#ifdef CONFIG_ATMEL_SPI
-int spi_cs_is_valid(unsigned int bus, unsigned int cs)
-{
-       return bus == 0 && cs == 0;
-}
-
-void spi_cs_activate(struct spi_slave *slave)
-{
-       at91_set_pio_output(AT91_PIO_PORTC, 3, 0);
-}
-
-void spi_cs_deactivate(struct spi_slave *slave)
-{
-       at91_set_pio_output(AT91_PIO_PORTC, 3, 1);
-}
-
-static void sama5d4_xplained_spi0_hw_init(void)
-{
-       at91_set_a_periph(AT91_PIO_PORTC, 0, 0);        /* SPI0_MISO */
-       at91_set_a_periph(AT91_PIO_PORTC, 1, 0);        /* SPI0_MOSI */
-       at91_set_a_periph(AT91_PIO_PORTC, 2, 0);        /* SPI0_SPCK */
-
-       at91_set_pio_output(AT91_PIO_PORTC, 3, 1);      /* SPI0_CS0 */
-
-       /* Enable clock */
-       at91_periph_clk_enable(ATMEL_ID_SPI0);
-}
-#endif /* CONFIG_ATMEL_SPI */
-
 #ifdef CONFIG_NAND_ATMEL
 static void sama5d4_xplained_nand_hw_init(void)
 {
@@ -82,20 +48,20 @@ static void sama5d4_xplained_nand_hw_init(void)
               AT91_SMC_MODE_TDF_CYCLE(3),
               &smc->cs[3].mode);
 
-       at91_set_a_periph(AT91_PIO_PORTC, 5, 0);        /* D0 */
-       at91_set_a_periph(AT91_PIO_PORTC, 6, 0);        /* D1 */
-       at91_set_a_periph(AT91_PIO_PORTC, 7, 0);        /* D2 */
-       at91_set_a_periph(AT91_PIO_PORTC, 8, 0);        /* D3 */
-       at91_set_a_periph(AT91_PIO_PORTC, 9, 0);        /* D4 */
-       at91_set_a_periph(AT91_PIO_PORTC, 10, 0);       /* D5 */
-       at91_set_a_periph(AT91_PIO_PORTC, 11, 0);       /* D6 */
-       at91_set_a_periph(AT91_PIO_PORTC, 12, 0);       /* D7 */
-       at91_set_a_periph(AT91_PIO_PORTC, 13, 0);       /* RE */
-       at91_set_a_periph(AT91_PIO_PORTC, 14, 0);       /* WE */
-       at91_set_a_periph(AT91_PIO_PORTC, 15, 1);       /* NCS */
-       at91_set_a_periph(AT91_PIO_PORTC, 16, 1);       /* RDY */
-       at91_set_a_periph(AT91_PIO_PORTC, 17, 1);       /* ALE */
-       at91_set_a_periph(AT91_PIO_PORTC, 18, 1);       /* CLE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 5, 0);   /* D0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 6, 0);   /* D1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 7, 0);   /* D2 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 8, 0);   /* D3 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 9, 0);   /* D4 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 10, 0);  /* D5 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 11, 0);  /* D6 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 12, 0);  /* D7 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 13, 0);  /* RE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 14, 0);  /* WE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 15, 1);  /* NCS */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 16, 1);  /* RDY */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 17, 1);  /* ALE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 18, 1);  /* CLE */
 }
 #endif
 
@@ -134,39 +100,39 @@ unsigned int has_lcdc(void)
 
 static void sama5d4_xplained_lcd_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTA, 24, 0);       /* LCDPWM */
-       at91_set_a_periph(AT91_PIO_PORTA, 25, 0);       /* LCDDISP */
-       at91_set_a_periph(AT91_PIO_PORTA, 26, 0);       /* LCDVSYNC */
-       at91_set_a_periph(AT91_PIO_PORTA, 27, 0);       /* LCDHSYNC */
-       at91_set_a_periph(AT91_PIO_PORTA, 28, 0);       /* LCDDOTCK */
-       at91_set_a_periph(AT91_PIO_PORTA, 29, 0);       /* LCDDEN */
-
-       at91_set_a_periph(AT91_PIO_PORTA,  0, 0);       /* LCDD0 */
-       at91_set_a_periph(AT91_PIO_PORTA,  1, 0);       /* LCDD1 */
-       at91_set_a_periph(AT91_PIO_PORTA,  2, 0);       /* LCDD2 */
-       at91_set_a_periph(AT91_PIO_PORTA,  3, 0);       /* LCDD3 */
-       at91_set_a_periph(AT91_PIO_PORTA,  4, 0);       /* LCDD4 */
-       at91_set_a_periph(AT91_PIO_PORTA,  5, 0);       /* LCDD5 */
-       at91_set_a_periph(AT91_PIO_PORTA,  6, 0);       /* LCDD6 */
-       at91_set_a_periph(AT91_PIO_PORTA,  7, 0);       /* LCDD7 */
-
-       at91_set_a_periph(AT91_PIO_PORTA,  8, 0);       /* LCDD9 */
-       at91_set_a_periph(AT91_PIO_PORTA,  9, 0);       /* LCDD8 */
-       at91_set_a_periph(AT91_PIO_PORTA, 10, 0);       /* LCDD10 */
-       at91_set_a_periph(AT91_PIO_PORTA, 11, 0);       /* LCDD11 */
-       at91_set_a_periph(AT91_PIO_PORTA, 12, 0);       /* LCDD12 */
-       at91_set_a_periph(AT91_PIO_PORTA, 13, 0);       /* LCDD13 */
-       at91_set_a_periph(AT91_PIO_PORTA, 14, 0);       /* LCDD14 */
-       at91_set_a_periph(AT91_PIO_PORTA, 15, 0);       /* LCDD15 */
-
-       at91_set_a_periph(AT91_PIO_PORTA, 16, 0);       /* LCDD16 */
-       at91_set_a_periph(AT91_PIO_PORTA, 17, 0);       /* LCDD17 */
-       at91_set_a_periph(AT91_PIO_PORTA, 18, 0);       /* LCDD18 */
-       at91_set_a_periph(AT91_PIO_PORTA, 19, 0);       /* LCDD19 */
-       at91_set_a_periph(AT91_PIO_PORTA, 20, 0);       /* LCDD20 */
-       at91_set_a_periph(AT91_PIO_PORTA, 21, 0);       /* LCDD21 */
-       at91_set_a_periph(AT91_PIO_PORTA, 22, 0);       /* LCDD22 */
-       at91_set_a_periph(AT91_PIO_PORTA, 23, 0);       /* LCDD23 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 24, 0);  /* LCDPWM */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 25, 0);  /* LCDDISP */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 26, 0);  /* LCDVSYNC */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 27, 0);  /* LCDHSYNC */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 28, 0);  /* LCDDOTCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 29, 0);  /* LCDDEN */
+
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  0, 0);  /* LCDD0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  1, 0);  /* LCDD1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  2, 0);  /* LCDD2 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  3, 0);  /* LCDD3 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  4, 0);  /* LCDD4 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  5, 0);  /* LCDD5 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  6, 0);  /* LCDD6 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  7, 0);  /* LCDD7 */
+
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  8, 0);  /* LCDD9 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  9, 0);  /* LCDD8 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 10, 0);  /* LCDD10 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 11, 0);  /* LCDD11 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 12, 0);  /* LCDD12 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 13, 0);  /* LCDD13 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 14, 0);  /* LCDD14 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 15, 0);  /* LCDD15 */
+
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 16, 0);  /* LCDD16 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 17, 0);  /* LCDD17 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 18, 0);  /* LCDD18 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 19, 0);  /* LCDD19 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 20, 0);  /* LCDD20 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 21, 0);  /* LCDD21 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 22, 0);  /* LCDD22 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 23, 0);  /* LCDD23 */
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_LCDC);
@@ -200,109 +166,46 @@ void lcd_show_board_info(void)
 
 #endif /* CONFIG_LCD */
 
-#ifdef CONFIG_GENERIC_ATMEL_MCI
-void sama5d4_xplained_mci1_hw_init(void)
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
+static void sama5d4_xplained_serial3_hw_init(void)
 {
-       at91_set_c_periph(AT91_PIO_PORTE, 19, 1);       /* MCI1 CDA */
-       at91_set_c_periph(AT91_PIO_PORTE, 20, 1);       /* MCI1 DA0 */
-       at91_set_c_periph(AT91_PIO_PORTE, 21, 1);       /* MCI1 DA1 */
-       at91_set_c_periph(AT91_PIO_PORTE, 22, 1);       /* MCI1 DA2 */
-       at91_set_c_periph(AT91_PIO_PORTE, 23, 1);       /* MCI1 DA3 */
-       at91_set_c_periph(AT91_PIO_PORTE, 18, 0);       /* MCI1 CLK */
-
-       /*
-        * As the mci io internal pull down is too strong, so if the io needs
-        * external pull up, the pull up resistor will be very small, if so
-        * the power consumption will increase, so disable the interanl pull
-        * down to save the power.
-        */
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 18, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 19, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 20, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 21, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 22, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 23, 0);
+       at91_pio3_set_b_periph(AT91_PIO_PORTE, 17, 1);  /* TXD3 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTE, 16, 0);  /* RXD3 */
 
        /* Enable clock */
-       at91_periph_clk_enable(ATMEL_ID_MCI1);
-}
-
-int board_mmc_init(bd_t *bis)
-{
-       /* Enable the power supply */
-       at91_set_pio_output(AT91_PIO_PORTE, 4, 0);
-
-       return atmel_mci_init((void *)ATMEL_BASE_MCI1);
+       at91_periph_clk_enable(ATMEL_ID_USART3);
 }
-#endif /* CONFIG_GENERIC_ATMEL_MCI */
 
-#ifdef CONFIG_MACB
-void sama5d4_xplained_macb0_hw_init(void)
+void board_debug_uart_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTB, 0, 0);        /* ETXCK_EREFCK */
-       at91_set_a_periph(AT91_PIO_PORTB, 6, 0);        /* ERXDV */
-       at91_set_a_periph(AT91_PIO_PORTB, 8, 0);        /* ERX0 */
-       at91_set_a_periph(AT91_PIO_PORTB, 9, 0);        /* ERX1 */
-       at91_set_a_periph(AT91_PIO_PORTB, 7, 0);        /* ERXER */
-       at91_set_a_periph(AT91_PIO_PORTB, 2, 0);        /* ETXEN */
-       at91_set_a_periph(AT91_PIO_PORTB, 12, 0);       /* ETX0 */
-       at91_set_a_periph(AT91_PIO_PORTB, 13, 0);       /* ETX1 */
-       at91_set_a_periph(AT91_PIO_PORTB, 17, 0);       /* EMDIO */
-       at91_set_a_periph(AT91_PIO_PORTB, 16, 0);       /* EMDC */
-
-       /* Enable clock */
-       at91_periph_clk_enable(ATMEL_ID_GMAC0);
+       sama5d4_xplained_serial3_hw_init();
 }
 #endif
 
-static void sama5d4_xplained_serial3_hw_init(void)
-{
-       at91_set_b_periph(AT91_PIO_PORTE, 17, 1);       /* TXD3 */
-       at91_set_b_periph(AT91_PIO_PORTE, 16, 0);       /* RXD3 */
-
-       /* Enable clock */
-       at91_periph_clk_enable(ATMEL_ID_USART3);
-}
-
+#ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-       at91_periph_clk_enable(ATMEL_ID_PIOA);
-       at91_periph_clk_enable(ATMEL_ID_PIOB);
-       at91_periph_clk_enable(ATMEL_ID_PIOC);
-       at91_periph_clk_enable(ATMEL_ID_PIOD);
-       at91_periph_clk_enable(ATMEL_ID_PIOE);
-
-       sama5d4_xplained_serial3_hw_init();
-
+#ifdef CONFIG_DEBUG_UART
+       debug_uart_init();
+#endif
        return 0;
 }
+#endif
 
 int board_init(void)
 {
        /* adress of boot parameters */
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
-#ifdef CONFIG_ATMEL_SPI
-       sama5d4_xplained_spi0_hw_init();
-#endif
 #ifdef CONFIG_NAND_ATMEL
        sama5d4_xplained_nand_hw_init();
 #endif
-#ifdef CONFIG_GENERIC_ATMEL_MCI
-       sama5d4_xplained_mci1_hw_init();
-#endif
-#ifdef CONFIG_MACB
-       sama5d4_xplained_macb0_hw_init();
-#endif
 #ifdef CONFIG_LCD
        sama5d4_xplained_lcd_hw_init();
 #endif
 #ifdef CONFIG_CMD_USB
        sama5d4_xplained_usb_hw_init();
 #endif
-#ifdef CONFIG_USB_GADGET_ATMEL_USBA
-       at91_udp_hw_init();
-#endif
 
        return 0;
 }
@@ -314,34 +217,12 @@ int dram_init(void)
        return 0;
 }
 
-int board_eth_init(bd_t *bis)
-{
-       int rc = 0;
-
-#ifdef CONFIG_MACB
-       rc = macb_eth_initialize(0, (void *)ATMEL_BASE_GMAC0, 0x00);
-#endif
-
-#ifdef CONFIG_USB_GADGET_ATMEL_USBA
-       usba_udc_probe(&pdata);
-#ifdef CONFIG_USB_ETH_RNDIS
-       usb_eth_initialize(bis);
-#endif
-#endif
-
-       return rc;
-}
-
 /* SPL */
 #ifdef CONFIG_SPL_BUILD
 void spl_board_init(void)
 {
-#ifdef CONFIG_SYS_USE_MMC
-       sama5d4_xplained_mci1_hw_init();
-#elif CONFIG_SYS_USE_NANDFLASH
+#if CONFIG_SYS_USE_NANDFLASH
        sama5d4_xplained_nand_hw_init();
-#elif CONFIG_SYS_USE_SERIALFLASH
-       sama5d4_xplained_spi0_hw_init();
 #endif
 }
 
index 72bad230871d1994f489bf92f79750ffdb9afa39..ffb4a50a72fe7c2ddac217105ffe57257afd8145 100644 (file)
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/atmel_mpddrc.h>
-#include <asm/arch/atmel_usba_udc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/sama5d3_smc.h>
 #include <asm/arch/sama5d4.h>
 #include <atmel_hlcdc.h>
-#include <atmel_mci.h>
+#include <debug_uart.h>
 #include <lcd.h>
-#include <mmc.h>
-#include <net.h>
-#include <netdev.h>
 #include <nand.h>
-#include <spi.h>
 #include <version.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#ifdef CONFIG_ATMEL_SPI
-int spi_cs_is_valid(unsigned int bus, unsigned int cs)
-{
-       return bus == 0 && cs == 0;
-}
-
-void spi_cs_activate(struct spi_slave *slave)
-{
-       at91_set_pio_output(AT91_PIO_PORTC, 3, 0);
-}
-
-void spi_cs_deactivate(struct spi_slave *slave)
-{
-       at91_set_pio_output(AT91_PIO_PORTC, 3, 1);
-}
-
-static void sama5d4ek_spi0_hw_init(void)
-{
-       at91_set_a_periph(AT91_PIO_PORTC, 0, 0);        /* SPI0_MISO */
-       at91_set_a_periph(AT91_PIO_PORTC, 1, 0);        /* SPI0_MOSI */
-       at91_set_a_periph(AT91_PIO_PORTC, 2, 0);        /* SPI0_SPCK */
-
-       at91_set_pio_output(AT91_PIO_PORTC, 3, 1);      /* SPI0_CS0 */
-
-       /* Enable clock */
-       at91_periph_clk_enable(ATMEL_ID_SPI0);
-}
-#endif /* CONFIG_ATMEL_SPI */
-
 #ifdef CONFIG_NAND_ATMEL
 static void sama5d4ek_nand_hw_init(void)
 {
@@ -82,20 +48,20 @@ static void sama5d4ek_nand_hw_init(void)
               AT91_SMC_MODE_TDF_CYCLE(3),
               &smc->cs[3].mode);
 
-       at91_set_a_periph(AT91_PIO_PORTC, 5, 0);        /* D0 */
-       at91_set_a_periph(AT91_PIO_PORTC, 6, 0);        /* D1 */
-       at91_set_a_periph(AT91_PIO_PORTC, 7, 0);        /* D2 */
-       at91_set_a_periph(AT91_PIO_PORTC, 8, 0);        /* D3 */
-       at91_set_a_periph(AT91_PIO_PORTC, 9, 0);        /* D4 */
-       at91_set_a_periph(AT91_PIO_PORTC, 10, 0);       /* D5 */
-       at91_set_a_periph(AT91_PIO_PORTC, 11, 0);       /* D6 */
-       at91_set_a_periph(AT91_PIO_PORTC, 12, 0);       /* D7 */
-       at91_set_a_periph(AT91_PIO_PORTC, 13, 0);       /* RE */
-       at91_set_a_periph(AT91_PIO_PORTC, 14, 0);       /* WE */
-       at91_set_a_periph(AT91_PIO_PORTC, 15, 1);       /* NCS */
-       at91_set_a_periph(AT91_PIO_PORTC, 16, 1);       /* RDY */
-       at91_set_a_periph(AT91_PIO_PORTC, 17, 1);       /* ALE */
-       at91_set_a_periph(AT91_PIO_PORTC, 18, 1);       /* CLE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 5, 0);   /* D0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 6, 0);   /* D1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 7, 0);   /* D2 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 8, 0);   /* D3 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 9, 0);   /* D4 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 10, 0);  /* D5 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 11, 0);  /* D6 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 12, 0);  /* D7 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 13, 0);  /* RE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 14, 0);  /* WE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 15, 1);  /* NCS */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 16, 1);  /* RDY */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 17, 1);  /* ALE */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 18, 1);  /* CLE */
 }
 #endif
 
@@ -135,33 +101,33 @@ unsigned int has_lcdc(void)
 
 static void sama5d4ek_lcd_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTA, 24, 0);       /* LCDPWM */
-       at91_set_a_periph(AT91_PIO_PORTA, 25, 0);       /* LCDDISP */
-       at91_set_a_periph(AT91_PIO_PORTA, 26, 0);       /* LCDVSYNC */
-       at91_set_a_periph(AT91_PIO_PORTA, 27, 0);       /* LCDHSYNC */
-       at91_set_a_periph(AT91_PIO_PORTA, 28, 0);       /* LCDDOTCK */
-       at91_set_a_periph(AT91_PIO_PORTA, 29, 0);       /* LCDDEN */
-
-       at91_set_a_periph(AT91_PIO_PORTA,  2, 0);       /* LCDD2 */
-       at91_set_a_periph(AT91_PIO_PORTA,  3, 0);       /* LCDD3 */
-       at91_set_a_periph(AT91_PIO_PORTA,  4, 0);       /* LCDD4 */
-       at91_set_a_periph(AT91_PIO_PORTA,  5, 0);       /* LCDD5 */
-       at91_set_a_periph(AT91_PIO_PORTA,  6, 0);       /* LCDD6 */
-       at91_set_a_periph(AT91_PIO_PORTA,  7, 0);       /* LCDD7 */
-
-       at91_set_a_periph(AT91_PIO_PORTA, 10, 0);       /* LCDD10 */
-       at91_set_a_periph(AT91_PIO_PORTA, 11, 0);       /* LCDD11 */
-       at91_set_a_periph(AT91_PIO_PORTA, 12, 0);       /* LCDD12 */
-       at91_set_a_periph(AT91_PIO_PORTA, 13, 0);       /* LCDD13 */
-       at91_set_a_periph(AT91_PIO_PORTA, 14, 0);       /* LCDD14 */
-       at91_set_a_periph(AT91_PIO_PORTA, 15, 0);       /* LCDD15 */
-
-       at91_set_a_periph(AT91_PIO_PORTA, 18, 0);       /* LCDD18 */
-       at91_set_a_periph(AT91_PIO_PORTA, 19, 0);       /* LCDD19 */
-       at91_set_a_periph(AT91_PIO_PORTA, 20, 0);       /* LCDD20 */
-       at91_set_a_periph(AT91_PIO_PORTA, 21, 0);       /* LCDD21 */
-       at91_set_a_periph(AT91_PIO_PORTA, 22, 0);       /* LCDD22 */
-       at91_set_a_periph(AT91_PIO_PORTA, 23, 0);       /* LCDD23 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 24, 0);  /* LCDPWM */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 25, 0);  /* LCDDISP */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 26, 0);  /* LCDVSYNC */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 27, 0);  /* LCDHSYNC */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 28, 0);  /* LCDDOTCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 29, 0);  /* LCDDEN */
+
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  2, 0);  /* LCDD2 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  3, 0);  /* LCDD3 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  4, 0);  /* LCDD4 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  5, 0);  /* LCDD5 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  6, 0);  /* LCDD6 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  7, 0);  /* LCDD7 */
+
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 10, 0);  /* LCDD10 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 11, 0);  /* LCDD11 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 12, 0);  /* LCDD12 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 13, 0);  /* LCDD13 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 14, 0);  /* LCDD14 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 15, 0);  /* LCDD15 */
+
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 18, 0);  /* LCDD18 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 19, 0);  /* LCDD19 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 20, 0);  /* LCDD20 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 21, 0);  /* LCDD21 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 22, 0);  /* LCDD22 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 23, 0);  /* LCDD23 */
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_LCDC);
@@ -196,109 +162,46 @@ void lcd_show_board_info(void)
 
 #endif /* CONFIG_LCD */
 
-#ifdef CONFIG_GENERIC_ATMEL_MCI
-void sama5d4ek_mci1_hw_init(void)
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
+static void sama5d4ek_serial3_hw_init(void)
 {
-       at91_set_c_periph(AT91_PIO_PORTE, 19, 1);       /* MCI1 CDA */
-       at91_set_c_periph(AT91_PIO_PORTE, 20, 1);       /* MCI1 DA0 */
-       at91_set_c_periph(AT91_PIO_PORTE, 21, 1);       /* MCI1 DA1 */
-       at91_set_c_periph(AT91_PIO_PORTE, 22, 1);       /* MCI1 DA2 */
-       at91_set_c_periph(AT91_PIO_PORTE, 23, 1);       /* MCI1 DA3 */
-       at91_set_c_periph(AT91_PIO_PORTE, 18, 0);       /* MCI1 CLK */
-
-       /*
-        * As the mci io internal pull down is too strong, so if the io needs
-        * external pull up, the pull up resistor will be very small, if so
-        * the power consumption will increase, so disable the interanl pull
-        * down to save the power.
-        */
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 18, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 19, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 20, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 21, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 22, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 23, 0);
+       at91_pio3_set_b_periph(AT91_PIO_PORTE, 17, 1);  /* TXD3 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTE, 16, 0);  /* RXD3 */
 
        /* Enable clock */
-       at91_periph_clk_enable(ATMEL_ID_MCI1);
-}
-
-int board_mmc_init(bd_t *bis)
-{
-       /* Enable power for MCI1 interface */
-       at91_set_pio_output(AT91_PIO_PORTE, 15, 0);
-
-       return atmel_mci_init((void *)ATMEL_BASE_MCI1);
+       at91_periph_clk_enable(ATMEL_ID_USART3);
 }
-#endif /* CONFIG_GENERIC_ATMEL_MCI */
 
-#ifdef CONFIG_MACB
-void sama5d4ek_macb0_hw_init(void)
+void board_debug_uart_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTB, 0, 0);        /* ETXCK_EREFCK */
-       at91_set_a_periph(AT91_PIO_PORTB, 6, 0);        /* ERXDV */
-       at91_set_a_periph(AT91_PIO_PORTB, 8, 0);        /* ERX0 */
-       at91_set_a_periph(AT91_PIO_PORTB, 9, 0);        /* ERX1 */
-       at91_set_a_periph(AT91_PIO_PORTB, 7, 0);        /* ERXER */
-       at91_set_a_periph(AT91_PIO_PORTB, 2, 0);        /* ETXEN */
-       at91_set_a_periph(AT91_PIO_PORTB, 12, 0);       /* ETX0 */
-       at91_set_a_periph(AT91_PIO_PORTB, 13, 0);       /* ETX1 */
-       at91_set_a_periph(AT91_PIO_PORTB, 17, 0);       /* EMDIO */
-       at91_set_a_periph(AT91_PIO_PORTB, 16, 0);       /* EMDC */
-
-       /* Enable clock */
-       at91_periph_clk_enable(ATMEL_ID_GMAC0);
+       sama5d4ek_serial3_hw_init();
 }
 #endif
 
-static void sama5d4ek_serial3_hw_init(void)
-{
-       at91_set_b_periph(AT91_PIO_PORTE, 17, 1);       /* TXD3 */
-       at91_set_b_periph(AT91_PIO_PORTE, 16, 0);       /* RXD3 */
-
-       /* Enable clock */
-       at91_periph_clk_enable(ATMEL_ID_USART3);
-}
-
+#ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-       at91_periph_clk_enable(ATMEL_ID_PIOA);
-       at91_periph_clk_enable(ATMEL_ID_PIOB);
-       at91_periph_clk_enable(ATMEL_ID_PIOC);
-       at91_periph_clk_enable(ATMEL_ID_PIOD);
-       at91_periph_clk_enable(ATMEL_ID_PIOE);
-
-       sama5d4ek_serial3_hw_init();
-
+#ifdef CONFIG_DEBUG_UART
+       debug_uart_init();
+#endif
        return 0;
 }
+#endif
 
 int board_init(void)
 {
        /* adress of boot parameters */
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
-#ifdef CONFIG_ATMEL_SPI
-       sama5d4ek_spi0_hw_init();
-#endif
 #ifdef CONFIG_NAND_ATMEL
        sama5d4ek_nand_hw_init();
 #endif
-#ifdef CONFIG_GENERIC_ATMEL_MCI
-       sama5d4ek_mci1_hw_init();
-#endif
-#ifdef CONFIG_MACB
-       sama5d4ek_macb0_hw_init();
-#endif
 #ifdef CONFIG_LCD
        sama5d4ek_lcd_hw_init();
 #endif
 #ifdef CONFIG_CMD_USB
        sama5d4ek_usb_hw_init();
 #endif
-#ifdef CONFIG_USB_GADGET_ATMEL_USBA
-       at91_udp_hw_init();
-#endif
 
        return 0;
 }
@@ -310,34 +213,12 @@ int dram_init(void)
        return 0;
 }
 
-int board_eth_init(bd_t *bis)
-{
-       int rc = 0;
-
-#ifdef CONFIG_MACB
-       rc = macb_eth_initialize(0, (void *)ATMEL_BASE_GMAC0, 0x00);
-#endif
-
-#ifdef CONFIG_USB_GADGET_ATMEL_USBA
-       usba_udc_probe(&pdata);
-#ifdef CONFIG_USB_ETH_RNDIS
-       usb_eth_initialize(bis);
-#endif
-#endif
-
-       return rc;
-}
-
 /* SPL */
 #ifdef CONFIG_SPL_BUILD
 void spl_board_init(void)
 {
-#ifdef CONFIG_SYS_USE_MMC
-       sama5d4ek_mci1_hw_init();
-#elif CONFIG_SYS_USE_NANDFLASH
+#if CONFIG_SYS_USE_NANDFLASH
        sama5d4ek_nand_hw_init();
-#elif CONFIG_SYS_USE_SERIALFLASH
-       sama5d4ek_spi0_hw_init();
 #endif
 }
 
index 41194ecb7e74a2bc70569f199974cc6f92acc994..54de0e267383db0e891cb637ec380f21c9914125 100644 (file)
@@ -62,12 +62,12 @@ static void sdram_start (int hi_addr)
 #endif
 
 /*
- * ATTENTION: Although partially referenced initdram does NOT make real use
+ * ATTENTION: Although partially referenced dram_init does NOT make real use
  *            use of CONFIG_SYS_SDRAM_BASE. The code does not work if CONFIG_SYS_SDRAM_BASE
  *            is something else than 0x00000000.
  */
 
-int initdram(void)
+int dram_init(void)
 {
        ulong dramsize = 0;
        ulong dramsize2 = 0;
index be0d65c694eb8b1fd3d1ef96d1ebe781b851b169..7b862355c8d2a469cf3be71c8d964f685215ab5f 100644 (file)
@@ -97,7 +97,7 @@ static mem_conf_t* get_mem_config(int board_type)
 /*
  * Initalize SDRAM - configure SDRAM controller, detect memory size.
  */
-int initdram(void)
+int dram_init(void)
 {
        ulong dramsize = 0;
 #ifndef CONFIG_SYS_RAMBOOT
index 48366763c10ce6a5e357c5c7416b7eb3034a7969..0ceaa1f772fa1d40341490350362c71079286176 100644 (file)
@@ -17,7 +17,7 @@ int checkboard (void)
        return 0;
 };
 
-int initdram(void)
+int dram_init(void)
 {
        volatile sdramctrl_t *sdp = (sdramctrl_t *) (MMAP_SDRAM);
 
index f0be2cbb9bcdfc9eccbb21372d9f5a38c782523a..e3441cad4eda99e928c82eff26cd4e02c5e35486 100644 (file)
@@ -18,7 +18,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int initdram(void)
+int dram_init(void)
 {
        gd->ram_size = fixed_sdram(NULL, NULL, 0);
 
index ea7cb744dba9bad959d0eba1d62bb2900c22b942..81285d7470b09a9219141abc0068b79e67b5c6b1 100644 (file)
@@ -13,7 +13,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int initdram(void)
+int dram_init(void)
 {
        /* Sdram is setup by assembler code */
        /* If memory could be changed, we should return the true value here */
diff --git a/board/denx/m28evk/Kconfig b/board/denx/m28evk/Kconfig
deleted file mode 100644 (file)
index dd4dc4d..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-if TARGET_M28EVK
-
-config SYS_BOARD
-       default "m28evk"
-
-config SYS_VENDOR
-       default "denx"
-
-config SYS_SOC
-       default "mxs"
-
-config SYS_CONFIG_NAME
-       default "m28evk"
-
-endif
diff --git a/board/denx/m28evk/MAINTAINERS b/board/denx/m28evk/MAINTAINERS
deleted file mode 100644 (file)
index b0535a9..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-M28EVK BOARD
-M:     Marek Vasut <marek.vasut@gmail.com>
-S:     Maintained
-F:     board/denx/m28evk/
-F:     include/configs/m28evk.h
-F:     configs/m28evk_defconfig
diff --git a/board/denx/m28evk/Makefile b/board/denx/m28evk/Makefile
deleted file mode 100644 (file)
index 5e890b1..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-ifndef CONFIG_SPL_BUILD
-obj-y  := m28evk.o
-else
-obj-y  := spl_boot.o
-endif
diff --git a/board/denx/m28evk/README b/board/denx/m28evk/README
deleted file mode 100644 (file)
index cb3ae20..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-DENX M28EVK
-===========
-
-Files of the M28/M28EVK port
-----------------------------
-
-arch/arm/cpu/arm926ejs/mxs/    - The CPU support code for the Freescale i.MX28
-arch/arm/include/asm/arch-mxs/ - Header files for the Freescale i.MX28
-board/denx/m28evk/             - M28EVK board specific files
-include/configs/m28evk.h       - M28EVK configuration file
-
-Follow the instructions from doc/README.mxs to generate a bootable SD card or to
-boot from NAND flash.
diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c
deleted file mode 100644 (file)
index 33d38cf..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * DENX M28 module
- *
- * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
- * on behalf of DENX Software Engineering GmbH
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <asm/gpio.h>
-#include <asm/io.h>
-#include <asm/arch/imx-regs.h>
-#include <asm/arch/iomux-mx28.h>
-#include <asm/arch/clock.h>
-#include <asm/arch/sys_proto.h>
-#include <linux/mii.h>
-#include <miiphy.h>
-#include <netdev.h>
-#include <errno.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-/*
- * Functions
- */
-int board_early_init_f(void)
-{
-       /* IO0 clock at 480MHz */
-       mxs_set_ioclk(MXC_IOCLK0, 480000);
-       /* IO1 clock at 480MHz */
-       mxs_set_ioclk(MXC_IOCLK1, 480000);
-
-       /* SSP0 clock at 96MHz */
-       mxs_set_sspclk(MXC_SSPCLK0, 96000, 0);
-       /* SSP2 clock at 160MHz */
-       mxs_set_sspclk(MXC_SSPCLK2, 160000, 0);
-
-#ifdef CONFIG_CMD_USB
-       mxs_iomux_setup_pad(MX28_PAD_SSP2_SS1__USB1_OVERCURRENT);
-       mxs_iomux_setup_pad(MX28_PAD_AUART3_TX__GPIO_3_13 |
-                       MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP);
-       gpio_direction_output(MX28_PAD_AUART3_TX__GPIO_3_13, 0);
-
-       mxs_iomux_setup_pad(MX28_PAD_AUART3_RX__GPIO_3_12 |
-                       MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP);
-       gpio_direction_output(MX28_PAD_AUART3_RX__GPIO_3_12, 0);
-#endif
-
-       return 0;
-}
-
-int board_init(void)
-{
-       /* Adress of boot parameters */
-       gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
-
-       return 0;
-}
-
-int dram_init(void)
-{
-       return mxs_dram_init();
-}
-
-#ifdef CONFIG_CMD_MMC
-static int m28_mmc_wp(int id)
-{
-       if (id != 0) {
-               printf("MXS MMC: Invalid card selected (card id = %d)\n", id);
-               return 1;
-       }
-
-       return gpio_get_value(MX28_PAD_AUART2_CTS__GPIO_3_10);
-}
-
-int board_mmc_init(bd_t *bis)
-{
-       /* Configure WP as input. */
-       gpio_direction_input(MX28_PAD_AUART2_CTS__GPIO_3_10);
-       /* Turn on the power to the card. */
-       gpio_direction_output(MX28_PAD_PWM3__GPIO_3_28, 0);
-
-       return mxsmmc_initialize(bis, 0, m28_mmc_wp, NULL);
-}
-#endif
-
-#ifdef CONFIG_CMD_NET
-
-#define        MII_OPMODE_STRAP_OVERRIDE       0x16
-#define        MII_PHY_CTRL1                   0x1e
-#define        MII_PHY_CTRL2                   0x1f
-
-int fecmxc_mii_postcall(int phy)
-{
-#if    defined(CONFIG_DENX_M28_V11) || defined(CONFIG_DENX_M28_V10)
-       /* KZ8031 PHY on old boards. */
-       const uint32_t freq = 0x0080;
-#else
-       /* KZ8021 PHY on new boards. */
-       const uint32_t freq = 0x0000;
-#endif
-
-       miiphy_write("FEC1", phy, MII_BMCR, 0x9000);
-       miiphy_write("FEC1", phy, MII_OPMODE_STRAP_OVERRIDE, 0x0202);
-       if (phy == 3)
-               miiphy_write("FEC1", 3, MII_PHY_CTRL2, 0x8100 | freq);
-       return 0;
-}
-
-int board_eth_init(bd_t *bis)
-{
-       struct mxs_clkctrl_regs *clkctrl_regs =
-               (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
-       struct eth_device *dev;
-       int ret;
-
-       ret = cpu_eth_init(bis);
-       if (ret)
-               return ret;
-
-       clrsetbits_le32(&clkctrl_regs->hw_clkctrl_enet,
-               CLKCTRL_ENET_TIME_SEL_MASK | CLKCTRL_ENET_CLK_OUT_EN,
-               CLKCTRL_ENET_TIME_SEL_RMII_CLK);
-
-#if !defined(CONFIG_DENX_M28_V11) && !defined(CONFIG_DENX_M28_V10)
-       /* Reset the new PHY */
-       gpio_direction_output(MX28_PAD_AUART2_RTS__GPIO_3_11, 0);
-       udelay(10000);
-       gpio_set_value(MX28_PAD_AUART2_RTS__GPIO_3_11, 1);
-       udelay(10000);
-#endif
-
-       ret = fecmxc_initialize_multi(bis, 0, 0, MXS_ENET0_BASE);
-       if (ret) {
-               printf("FEC MXS: Unable to init FEC0\n");
-               return ret;
-       }
-
-       ret = fecmxc_initialize_multi(bis, 1, 3, MXS_ENET1_BASE);
-       if (ret) {
-               printf("FEC MXS: Unable to init FEC1\n");
-               return ret;
-       }
-
-       dev = eth_get_dev_by_name("FEC0");
-       if (!dev) {
-               printf("FEC MXS: Unable to get FEC0 device entry\n");
-               return -EINVAL;
-       }
-
-       ret = fecmxc_register_mii_postcall(dev, fecmxc_mii_postcall);
-       if (ret) {
-               printf("FEC MXS: Unable to register FEC0 mii postcall\n");
-               return ret;
-       }
-
-       dev = eth_get_dev_by_name("FEC1");
-       if (!dev) {
-               printf("FEC MXS: Unable to get FEC1 device entry\n");
-               return -EINVAL;
-       }
-
-       ret = fecmxc_register_mii_postcall(dev, fecmxc_mii_postcall);
-       if (ret) {
-               printf("FEC MXS: Unable to register FEC1 mii postcall\n");
-               return ret;
-       }
-
-       return ret;
-}
-
-#endif
diff --git a/board/denx/m28evk/spl_boot.c b/board/denx/m28evk/spl_boot.c
deleted file mode 100644 (file)
index 5a1010e..0000000
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * DENX M28 Boot setup
- *
- * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
- * on behalf of DENX Software Engineering GmbH
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <config.h>
-#include <asm/io.h>
-#include <asm/arch/iomux-mx28.h>
-#include <asm/arch/imx-regs.h>
-#include <asm/arch/sys_proto.h>
-
-#define        MUX_CONFIG_LED  (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL)
-#define        MUX_CONFIG_LCD  (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL)
-#define        MUX_CONFIG_TSC  (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
-#define        MUX_CONFIG_SSP0 (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_PULLUP)
-#define        MUX_CONFIG_SSP2 (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_PULLUP)
-#define        MUX_CONFIG_GPMI (MXS_PAD_1V8 | MXS_PAD_4MA | MXS_PAD_NOPULL)
-#define        MUX_CONFIG_ENET (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_PULLUP)
-#define        MUX_CONFIG_EMI  (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL)
-
-const iomux_cfg_t iomux_setup[] = {
-       /* LED */
-       MX28_PAD_ENET0_RXD3__GPIO_4_10 | MUX_CONFIG_LED,
-
-       /* framebuffer */
-       MX28_PAD_LCD_D00__LCD_D0 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D01__LCD_D1 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D02__LCD_D2 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D03__LCD_D3 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D04__LCD_D4 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D05__LCD_D5 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D06__LCD_D6 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D07__LCD_D7 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D08__LCD_D8 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D09__LCD_D9 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D10__LCD_D10 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D11__LCD_D11 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D12__LCD_D12 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D13__LCD_D13 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D14__LCD_D14 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D15__LCD_D15 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D16__LCD_D16 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D17__LCD_D17 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D18__LCD_D18 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D19__LCD_D19 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D20__LCD_D20 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D21__LCD_D21 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D22__LCD_D22 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_D23__LCD_D23 | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_DOTCLK__LCD_DOTCLK | MUX_CONFIG_LCD,
-       MX28_PAD_LCD_ENABLE__LCD_ENABLE | MUX_CONFIG_LCD,
-
-       /* UART1 */
-#ifdef CONFIG_DENX_M28_V10
-       MX28_PAD_AUART0_CTS__DUART_RX,
-       MX28_PAD_AUART0_RTS__DUART_TX,
-#else
-       MX28_PAD_PWM0__DUART_RX,
-       MX28_PAD_PWM1__DUART_TX,
-#endif
-       MX28_PAD_AUART0_TX__DUART_RTS,
-       MX28_PAD_AUART0_RX__DUART_CTS,
-
-       /* UART2 */
-       MX28_PAD_AUART1_RX__AUART1_RX,
-       MX28_PAD_AUART1_TX__AUART1_TX,
-       MX28_PAD_AUART1_RTS__AUART1_RTS,
-       MX28_PAD_AUART1_CTS__AUART1_CTS,
-
-       /* CAN */
-       MX28_PAD_GPMI_RDY2__CAN0_TX,
-       MX28_PAD_GPMI_RDY3__CAN0_RX,
-
-       /* TSC2007 */
-       MX28_PAD_SAIF0_MCLK__GPIO_3_20 | MUX_CONFIG_TSC,
-
-       /* MMC0 */
-       MX28_PAD_SSP0_DATA0__SSP0_D0 | MUX_CONFIG_SSP0,
-       MX28_PAD_SSP0_DATA1__SSP0_D1 | MUX_CONFIG_SSP0,
-       MX28_PAD_SSP0_DATA2__SSP0_D2 | MUX_CONFIG_SSP0,
-       MX28_PAD_SSP0_DATA3__SSP0_D3 | MUX_CONFIG_SSP0,
-       MX28_PAD_SSP0_DATA4__SSP0_D4 | MUX_CONFIG_SSP0,
-       MX28_PAD_SSP0_DATA5__SSP0_D5 | MUX_CONFIG_SSP0,
-       MX28_PAD_SSP0_DATA6__SSP0_D6 | MUX_CONFIG_SSP0,
-       MX28_PAD_SSP0_DATA7__SSP0_D7 | MUX_CONFIG_SSP0,
-       MX28_PAD_SSP0_CMD__SSP0_CMD | MUX_CONFIG_SSP0,
-       MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT |
-               (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL),
-       MX28_PAD_SSP0_SCK__SSP0_SCK |
-               (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL),
-       MX28_PAD_PWM3__GPIO_3_28 | MUX_CONFIG_SSP0 |
-               (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL),  /* Power */
-       MX28_PAD_AUART2_CTS__GPIO_3_10, /* WP */
-
-       /* GPMI NAND */
-       MX28_PAD_GPMI_D00__GPMI_D0 | MUX_CONFIG_GPMI,
-       MX28_PAD_GPMI_D01__GPMI_D1 | MUX_CONFIG_GPMI,
-       MX28_PAD_GPMI_D02__GPMI_D2 | MUX_CONFIG_GPMI,
-       MX28_PAD_GPMI_D03__GPMI_D3 | MUX_CONFIG_GPMI,
-       MX28_PAD_GPMI_D04__GPMI_D4 | MUX_CONFIG_GPMI,
-       MX28_PAD_GPMI_D05__GPMI_D5 | MUX_CONFIG_GPMI,
-       MX28_PAD_GPMI_D06__GPMI_D6 | MUX_CONFIG_GPMI,
-       MX28_PAD_GPMI_D07__GPMI_D7 | MUX_CONFIG_GPMI,
-       MX28_PAD_GPMI_CE0N__GPMI_CE0N | MUX_CONFIG_GPMI,
-       MX28_PAD_GPMI_RDY0__GPMI_READY0 | MUX_CONFIG_GPMI,
-       MX28_PAD_GPMI_RDN__GPMI_RDN |
-               (MXS_PAD_1V8 | MXS_PAD_8MA | MXS_PAD_PULLUP),
-       MX28_PAD_GPMI_WRN__GPMI_WRN | MUX_CONFIG_GPMI,
-       MX28_PAD_GPMI_ALE__GPMI_ALE | MUX_CONFIG_GPMI,
-       MX28_PAD_GPMI_CLE__GPMI_CLE | MUX_CONFIG_GPMI,
-       MX28_PAD_GPMI_RESETN__GPMI_RESETN | MUX_CONFIG_GPMI,
-
-       /* FEC Ethernet */
-       MX28_PAD_ENET0_MDC__ENET0_MDC | MUX_CONFIG_ENET,
-       MX28_PAD_ENET0_MDIO__ENET0_MDIO | MUX_CONFIG_ENET,
-       MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | MUX_CONFIG_ENET,
-       MX28_PAD_ENET0_TX_EN__ENET0_TX_EN | MUX_CONFIG_ENET,
-       MX28_PAD_ENET0_RXD0__ENET0_RXD0 | MUX_CONFIG_ENET,
-       MX28_PAD_ENET0_RXD1__ENET0_RXD1 | MUX_CONFIG_ENET,
-       MX28_PAD_ENET0_TXD0__ENET0_TXD0 | MUX_CONFIG_ENET,
-       MX28_PAD_ENET0_TXD1__ENET0_TXD1 | MUX_CONFIG_ENET,
-       MX28_PAD_ENET_CLK__CLKCTRL_ENET | MUX_CONFIG_ENET,
-
-       MX28_PAD_ENET0_COL__ENET1_TX_EN | MUX_CONFIG_ENET,
-       MX28_PAD_ENET0_CRS__ENET1_RX_EN | MUX_CONFIG_ENET,
-       MX28_PAD_ENET0_RXD2__ENET1_RXD0 | MUX_CONFIG_ENET,
-       MX28_PAD_ENET0_RXD3__ENET1_RXD1 | MUX_CONFIG_ENET,
-       MX28_PAD_ENET0_TXD2__ENET1_TXD0 | MUX_CONFIG_ENET,
-       MX28_PAD_ENET0_TXD3__ENET1_TXD1 | MUX_CONFIG_ENET,
-#if !defined(CONFIG_DENX_M28_V11) && !defined(CONFIG_DENX_M28_V10)
-       MX28_PAD_AUART2_RTS__GPIO_3_11, /* PHY reset */
-#endif
-
-       /* I2C */
-       MX28_PAD_I2C0_SCL__I2C0_SCL,
-       MX28_PAD_I2C0_SDA__I2C0_SDA,
-
-       /* EMI */
-       MX28_PAD_EMI_D00__EMI_DATA0 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_D01__EMI_DATA1 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_D02__EMI_DATA2 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_D03__EMI_DATA3 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_D04__EMI_DATA4 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_D05__EMI_DATA5 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_D06__EMI_DATA6 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_D07__EMI_DATA7 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_D08__EMI_DATA8 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_D09__EMI_DATA9 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_D10__EMI_DATA10 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_D11__EMI_DATA11 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_D12__EMI_DATA12 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_D13__EMI_DATA13 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_D14__EMI_DATA14 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_D15__EMI_DATA15 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_ODT0__EMI_ODT0 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_DQM0__EMI_DQM0 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_ODT1__EMI_ODT1 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_DQM1__EMI_DQM1 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_DDR_OPEN_FB__EMI_DDR_OPEN_FEEDBACK | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_CLK__EMI_CLK | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_DQS0__EMI_DQS0 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_DQS1__EMI_DQS1 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_DDR_OPEN__EMI_DDR_OPEN | MUX_CONFIG_EMI,
-
-       MX28_PAD_EMI_A00__EMI_ADDR0 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_A01__EMI_ADDR1 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_A02__EMI_ADDR2 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_A03__EMI_ADDR3 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_A04__EMI_ADDR4 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_A05__EMI_ADDR5 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_A06__EMI_ADDR6 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_A07__EMI_ADDR7 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_A08__EMI_ADDR8 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_A09__EMI_ADDR9 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_A10__EMI_ADDR10 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_A11__EMI_ADDR11 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_A12__EMI_ADDR12 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_A13__EMI_ADDR13 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_A14__EMI_ADDR14 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_BA0__EMI_BA0 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_BA1__EMI_BA1 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_BA2__EMI_BA2 | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_CASN__EMI_CASN | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_RASN__EMI_RASN | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_WEN__EMI_WEN | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_CE0N__EMI_CE0N | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_CE1N__EMI_CE1N | MUX_CONFIG_EMI,
-       MX28_PAD_EMI_CKE__EMI_CKE | MUX_CONFIG_EMI,
-
-       /* SPI2 (for flash) */
-       MX28_PAD_SSP2_SCK__SSP2_SCK | MUX_CONFIG_SSP2,
-       MX28_PAD_SSP2_MOSI__SSP2_CMD | MUX_CONFIG_SSP2,
-       MX28_PAD_SSP2_MISO__SSP2_D0 | MUX_CONFIG_SSP2,
-       MX28_PAD_SSP2_SS0__SSP2_D3 |
-               (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP),
-};
-
-void board_init_ll(const uint32_t arg, const uint32_t *resptr)
-{
-       mxs_common_spl_init(arg, resptr, iomux_setup, ARRAY_SIZE(iomux_setup));
-}
diff --git a/board/denx/m53evk/Kconfig b/board/denx/m53evk/Kconfig
deleted file mode 100644 (file)
index 0696ad7..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-if TARGET_M53EVK
-
-config SYS_BOARD
-       default "m53evk"
-
-config SYS_VENDOR
-       default "denx"
-
-config SYS_SOC
-       default "mx5"
-
-config SYS_CONFIG_NAME
-       default "m53evk"
-
-endif
diff --git a/board/denx/m53evk/MAINTAINERS b/board/denx/m53evk/MAINTAINERS
deleted file mode 100644 (file)
index 5d8c764..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-M53EVK BOARD
-M:     Marek Vasut <marek.vasut@gmail.com>
-S:     Maintained
-F:     board/denx/m53evk/
-F:     include/configs/m53evk.h
-F:     configs/m53evk_defconfig
diff --git a/board/denx/m53evk/Makefile b/board/denx/m53evk/Makefile
deleted file mode 100644 (file)
index 19b8977..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# DENX M53EVK
-# Copyright (C) 2012-2013 Marek Vasut <marex@denx.de>
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-y  := m53evk.o
diff --git a/board/denx/m53evk/imximage.cfg b/board/denx/m53evk/imximage.cfg
deleted file mode 100644 (file)
index c0e2602..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * DENX M53 DRAM init values
- * Copyright (C) 2012-2013 Marek Vasut <marex@denx.de>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- *
- * Refer doc/README.imximage for more details about how-to configure
- * and create imximage boot image
- *
- * The syntax is taken as close as possible with the kwbimage
- */
-#include <asm/imx-common/imximage.cfg>
-
-/* image version */
-IMAGE_VERSION  2
-
-
-/* Boot Offset 0x400, valid for both SD and NAND boot. */
-BOOT_OFFSET    FLASH_OFFSET_STANDARD
-
-/*
- * Device Configuration Data (DCD)
- *
- * Each entry must have the format:
- * Addr-type           Address        Value
- *
- * where:
- *     Addr-type register length (1,2 or 4 bytes)
- *     Address   absolute address of the register
- *     value     value to be stored in the register
- */
-DATA 4 0x53fa86f4 0x00000000    /* GRP_DDRMODE_CTL */
-DATA 4 0x53fa8714 0x00000000    /* GRP_DDRMODE */
-DATA 4 0x53fa86fc 0x00000000    /* GRP_DDRPKE */
-DATA 4 0x53fa8724 0x04000000    /* GRP_DDR_TYPE */
-
-DATA 4 0x53fa872c 0x00300000    /* GRP_B3DS */
-DATA 4 0x53fa8554 0x00300000    /* DRAM_DQM3 */
-DATA 4 0x53fa8558 0x00300040    /* DRAM_SDQS3 */
-
-DATA 4 0x53fa8728 0x00300000    /* GRP_B2DS */
-DATA 4 0x53fa8560 0x00300000    /* DRAM_DQM2 */
-DATA 4 0x53fa8568 0x00300040    /* DRAM_SDQS2 */
-
-DATA 4 0x53fa871c 0x00300000    /* GRP_B1DS */
-DATA 4 0x53fa8594 0x00300000    /* DRAM_DQM1 */
-DATA 4 0x53fa8590 0x00300040    /* DRAM_SDQS1 */
-
-DATA 4 0x53fa8718 0x00300000    /* GRP_B0DS */
-DATA 4 0x53fa8584 0x00300000    /* DRAM_DQM0 */
-DATA 4 0x53fa857c 0x00300040    /* DRAM_SDQS0 */
-
-DATA 4 0x53fa8578 0x00300000    /* DRAM_SDCLK_0 */
-DATA 4 0x53fa8570 0x00300000    /* DRAM_SDCLK_1 */
-
-DATA 4 0x53fa8574 0x00300000    /* DRAM_CAS */
-DATA 4 0x53fa8588 0x00300000    /* DRAM_RAS */
-DATA 4 0x53fa86f0 0x00300000    /* GRP_ADDDS */
-DATA 4 0x53fa8720 0x00300000    /* GRP_CTLDS */
-
-DATA 4 0x53fa8564 0x00300040    /* DRAM_SDODT1 */
-DATA 4 0x53fa8580 0x00300040    /* DRAM_SDODT0 */
-
-/* ESDCTL */
-DATA 4 0x63fd9088 0x32383535
-DATA 4 0x63fd9090 0x40383538
-DATA 4 0x63fd907c 0x0136014d
-DATA 4 0x63fd9080 0x01510141
-
-DATA 4 0x63fd9018 0x00011740
-DATA 4 0x63fd9000 0xc3190000
-DATA 4 0x63fd900c 0x555952e3
-DATA 4 0x63fd9010 0xb68e8b63
-DATA 4 0x63fd9014 0x01ff00db
-DATA 4 0x63fd902c 0x000026d2
-DATA 4 0x63fd9030 0x009f0e21
-DATA 4 0x63fd9008 0x12273030
-DATA 4 0x63fd9004 0x0002002d
-DATA 4 0x63fd901c 0x00008032
-DATA 4 0x63fd901c 0x00008033
-DATA 4 0x63fd901c 0x00028031
-DATA 4 0x63fd901c 0x092080b0
-DATA 4 0x63fd901c 0x04008040
-DATA 4 0x63fd901c 0x0000803a
-DATA 4 0x63fd901c 0x0000803b
-DATA 4 0x63fd901c 0x00028039
-DATA 4 0x63fd901c 0x09208138
-DATA 4 0x63fd901c 0x04008048
-DATA 4 0x63fd9020 0x00001800
-DATA 4 0x63fd9040 0x04b80003
-DATA 4 0x63fd9058 0x00022227
-DATA 4 0x63fd901c 0x00000000
diff --git a/board/denx/m53evk/m53evk.c b/board/denx/m53evk/m53evk.c
deleted file mode 100644 (file)
index 1e4db24..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * DENX M53 module
- *
- * Copyright (C) 2012-2013 Marek Vasut <marex@denx.de>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <asm/io.h>
-#include <asm/arch/imx-regs.h>
-#include <asm/arch/sys_proto.h>
-#include <asm/arch/crm_regs.h>
-#include <asm/arch/clock.h>
-#include <asm/arch/iomux-mx53.h>
-#include <asm/imx-common/mx5_video.h>
-#include <asm/spl.h>
-#include <linux/errno.h>
-#include <netdev.h>
-#include <i2c.h>
-#include <mmc.h>
-#include <spl.h>
-#include <fsl_esdhc.h>
-#include <asm/gpio.h>
-#include <usb/ehci-ci.h>
-#include <linux/fb.h>
-#include <ipu_pixfmt.h>
-
-/* Special MXCFB sync flags are here. */
-#include "../drivers/video/mxcfb.h"
-
-DECLARE_GLOBAL_DATA_PTR;
-
-static uint32_t mx53_dram_size[2];
-
-phys_size_t get_effective_memsize(void)
-{
-       /*
-        * WARNING: We must override get_effective_memsize() function here
-        * to report only the size of the first DRAM bank. This is to make
-        * U-Boot relocator place U-Boot into valid memory, that is, at the
-        * end of the first DRAM bank. If we did not override this function
-        * like so, U-Boot would be placed at the address of the first DRAM
-        * bank + total DRAM size - sizeof(uboot), which in the setup where
-        * each DRAM bank contains 512MiB of DRAM would result in placing
-        * U-Boot into invalid memory area close to the end of the first
-        * DRAM bank.
-        */
-       return mx53_dram_size[0];
-}
-
-int dram_init(void)
-{
-       mx53_dram_size[0] = get_ram_size((void *)PHYS_SDRAM_1, 1 << 30);
-       mx53_dram_size[1] = get_ram_size((void *)PHYS_SDRAM_2, 1 << 30);
-
-       gd->ram_size = mx53_dram_size[0] + mx53_dram_size[1];
-
-       return 0;
-}
-
-int dram_init_banksize(void)
-{
-       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-       gd->bd->bi_dram[0].size = mx53_dram_size[0];
-
-       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-       gd->bd->bi_dram[1].size = mx53_dram_size[1];
-
-       return 0;
-}
-
-static void setup_iomux_uart(void)
-{
-       static const iomux_v3_cfg_t uart_pads[] = {
-               MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX,
-               MX53_PAD_PATA_DMARQ__UART2_TXD_MUX,
-       };
-
-       imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
-}
-
-#ifdef CONFIG_USB_EHCI_MX5
-int board_ehci_hcd_init(int port)
-{
-       if (port == 0) {
-               /* USB OTG PWRON */
-               imx_iomux_v3_setup_pad(NEW_PAD_CTRL(MX53_PAD_GPIO_4__GPIO1_4,
-                                       PAD_CTL_PKE | PAD_CTL_DSE_HIGH));
-               gpio_direction_output(IMX_GPIO_NR(1, 4), 0);
-
-               /* USB OTG Over Current */
-               imx_iomux_v3_setup_pad(MX53_PAD_GPIO_18__GPIO7_13);
-       } else if (port == 1) {
-               /* USB Host PWRON */
-               imx_iomux_v3_setup_pad(NEW_PAD_CTRL(MX53_PAD_GPIO_2__GPIO1_2,
-                                       PAD_CTL_PKE | PAD_CTL_DSE_HIGH));
-               gpio_direction_output(IMX_GPIO_NR(1, 2), 0);
-
-               /* USB Host Over Current */
-               imx_iomux_v3_setup_pad(MX53_PAD_GPIO_3__USBOH3_USBH1_OC);
-       }
-
-       return 0;
-}
-#endif
-
-static void setup_iomux_fec(void)
-{
-       static const iomux_v3_cfg_t fec_pads[] = {
-               /* MDIO pads */
-               NEW_PAD_CTRL(MX53_PAD_FEC_MDIO__FEC_MDIO, PAD_CTL_HYS |
-                       PAD_CTL_DSE_HIGH | PAD_CTL_PUS_22K_UP | PAD_CTL_ODE),
-               NEW_PAD_CTRL(MX53_PAD_FEC_MDC__FEC_MDC, PAD_CTL_DSE_HIGH),
-
-               /* FEC 0 pads */
-               NEW_PAD_CTRL(MX53_PAD_FEC_CRS_DV__FEC_RX_DV,
-                               PAD_CTL_HYS | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_FEC_REF_CLK__FEC_TX_CLK,
-                               PAD_CTL_HYS | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_FEC_RX_ER__FEC_RX_ER,
-                               PAD_CTL_HYS | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_FEC_TX_EN__FEC_TX_EN, PAD_CTL_DSE_HIGH),
-               NEW_PAD_CTRL(MX53_PAD_FEC_RXD0__FEC_RDATA_0,
-                               PAD_CTL_HYS | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_FEC_RXD1__FEC_RDATA_1,
-                               PAD_CTL_HYS | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_FEC_TXD0__FEC_TDATA_0, PAD_CTL_DSE_HIGH),
-               NEW_PAD_CTRL(MX53_PAD_FEC_TXD1__FEC_TDATA_1, PAD_CTL_DSE_HIGH),
-
-               /* FEC 1 pads */
-               NEW_PAD_CTRL(MX53_PAD_KEY_COL0__FEC_RDATA_3,
-                               PAD_CTL_HYS | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_KEY_ROW0__FEC_TX_ER,
-                               PAD_CTL_HYS | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_KEY_COL1__FEC_RX_CLK,
-                               PAD_CTL_HYS | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_KEY_ROW1__FEC_COL,
-                               PAD_CTL_HYS | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_KEY_COL2__FEC_RDATA_2,
-                               PAD_CTL_HYS | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_KEY_ROW2__FEC_TDATA_2, PAD_CTL_DSE_HIGH),
-               NEW_PAD_CTRL(MX53_PAD_KEY_COL3__FEC_CRS,
-                               PAD_CTL_HYS | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_GPIO_19__FEC_TDATA_3, PAD_CTL_DSE_HIGH),
-       };
-
-       imx_iomux_v3_setup_multiple_pads(fec_pads, ARRAY_SIZE(fec_pads));
-}
-
-#ifdef CONFIG_FSL_ESDHC
-struct fsl_esdhc_cfg esdhc_cfg = {
-       MMC_SDHC1_BASE_ADDR,
-};
-
-int board_mmc_getcd(struct mmc *mmc)
-{
-       imx_iomux_v3_setup_pad(MX53_PAD_GPIO_1__GPIO1_1);
-       gpio_direction_input(IMX_GPIO_NR(1, 1));
-
-       return !gpio_get_value(IMX_GPIO_NR(1, 1));
-}
-
-#define SD_CMD_PAD_CTRL                (PAD_CTL_HYS | PAD_CTL_DSE_HIGH | \
-                                PAD_CTL_PUS_100K_UP)
-#define SD_PAD_CTRL            (PAD_CTL_HYS | PAD_CTL_PUS_47K_UP | \
-                                PAD_CTL_DSE_HIGH)
-
-int board_mmc_init(bd_t *bis)
-{
-       static const iomux_v3_cfg_t sd1_pads[] = {
-               NEW_PAD_CTRL(MX53_PAD_SD1_CMD__ESDHC1_CMD, SD_CMD_PAD_CTRL),
-               NEW_PAD_CTRL(MX53_PAD_SD1_CLK__ESDHC1_CLK, SD_PAD_CTRL),
-               NEW_PAD_CTRL(MX53_PAD_SD1_DATA0__ESDHC1_DAT0, SD_PAD_CTRL),
-               NEW_PAD_CTRL(MX53_PAD_SD1_DATA1__ESDHC1_DAT1, SD_PAD_CTRL),
-               NEW_PAD_CTRL(MX53_PAD_SD1_DATA2__ESDHC1_DAT2, SD_PAD_CTRL),
-               NEW_PAD_CTRL(MX53_PAD_SD1_DATA3__ESDHC1_DAT3, SD_PAD_CTRL),
-               MX53_PAD_EIM_DA13__GPIO3_13,
-
-               MX53_PAD_EIM_EB3__GPIO2_31, /* SD power */
-       };
-
-       esdhc_cfg.sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
-
-       imx_iomux_v3_setup_multiple_pads(sd1_pads, ARRAY_SIZE(sd1_pads));
-
-       /* GPIO 2_31 is SD power */
-       gpio_direction_output(IMX_GPIO_NR(2, 31), 0);
-
-       return fsl_esdhc_initialize(bis, &esdhc_cfg);
-}
-#endif
-
-#ifdef CONFIG_VIDEO
-static struct fb_videomode const ampire_wvga = {
-       .name           = "Ampire",
-       .refresh        = 60,
-       .xres           = 800,
-       .yres           = 480,
-       .pixclock       = 29851, /* picosecond (33.5 MHz) */
-       .left_margin    = 89,
-       .right_margin   = 164,
-       .upper_margin   = 23,
-       .lower_margin   = 10,
-       .hsync_len      = 10,
-       .vsync_len      = 10,
-       .sync           = FB_SYNC_CLK_LAT_FALL,
-};
-
-int board_video_skip(void)
-{
-       int ret;
-       ret = ipuv3_fb_init(&ampire_wvga, 1, IPU_PIX_FMT_RGB666);
-       if (ret)
-               printf("Ampire LCD cannot be configured: %d\n", ret);
-       return ret;
-}
-#endif
-
-#define I2C_PAD_CTRL   (PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | \
-                        PAD_CTL_PUS_100K_UP | PAD_CTL_ODE)
-
-static void setup_iomux_i2c(void)
-{
-       static const iomux_v3_cfg_t i2c_pads[] = {
-               NEW_PAD_CTRL(MX53_PAD_EIM_D16__I2C2_SDA, I2C_PAD_CTRL),
-               NEW_PAD_CTRL(MX53_PAD_EIM_EB2__I2C2_SCL, I2C_PAD_CTRL),
-       };
-
-       imx_iomux_v3_setup_multiple_pads(i2c_pads, ARRAY_SIZE(i2c_pads));
-}
-
-static void setup_iomux_video(void)
-{
-       static const iomux_v3_cfg_t lcd_pads[] = {
-               MX53_PAD_EIM_DA9__IPU_DISP1_DAT_0,
-               MX53_PAD_EIM_DA8__IPU_DISP1_DAT_1,
-               MX53_PAD_EIM_DA7__IPU_DISP1_DAT_2,
-               MX53_PAD_EIM_DA6__IPU_DISP1_DAT_3,
-               MX53_PAD_EIM_DA5__IPU_DISP1_DAT_4,
-               MX53_PAD_EIM_DA4__IPU_DISP1_DAT_5,
-               MX53_PAD_EIM_DA3__IPU_DISP1_DAT_6,
-               MX53_PAD_EIM_DA2__IPU_DISP1_DAT_7,
-               MX53_PAD_EIM_DA1__IPU_DISP1_DAT_8,
-               MX53_PAD_EIM_DA0__IPU_DISP1_DAT_9,
-               MX53_PAD_EIM_EB1__IPU_DISP1_DAT_10,
-               MX53_PAD_EIM_EB0__IPU_DISP1_DAT_11,
-               MX53_PAD_EIM_A17__IPU_DISP1_DAT_12,
-               MX53_PAD_EIM_A18__IPU_DISP1_DAT_13,
-               MX53_PAD_EIM_A19__IPU_DISP1_DAT_14,
-               MX53_PAD_EIM_A20__IPU_DISP1_DAT_15,
-               MX53_PAD_EIM_A21__IPU_DISP1_DAT_16,
-               MX53_PAD_EIM_A22__IPU_DISP1_DAT_17,
-               MX53_PAD_EIM_A23__IPU_DISP1_DAT_18,
-               MX53_PAD_EIM_A24__IPU_DISP1_DAT_19,
-               MX53_PAD_EIM_D31__IPU_DISP1_DAT_20,
-               MX53_PAD_EIM_D30__IPU_DISP1_DAT_21,
-               MX53_PAD_EIM_D26__IPU_DISP1_DAT_22,
-               MX53_PAD_EIM_D27__IPU_DISP1_DAT_23,
-               MX53_PAD_EIM_A16__IPU_DI1_DISP_CLK,
-               MX53_PAD_EIM_DA13__IPU_DI1_D0_CS,
-               MX53_PAD_EIM_DA14__IPU_DI1_D1_CS,
-               MX53_PAD_EIM_DA15__IPU_DI1_PIN1,
-               MX53_PAD_EIM_DA11__IPU_DI1_PIN2,
-               MX53_PAD_EIM_DA12__IPU_DI1_PIN3,
-               MX53_PAD_EIM_A25__IPU_DI1_PIN12,
-               MX53_PAD_EIM_DA10__IPU_DI1_PIN15,
-       };
-
-       imx_iomux_v3_setup_multiple_pads(lcd_pads, ARRAY_SIZE(lcd_pads));
-}
-
-static void setup_iomux_nand(void)
-{
-       static const iomux_v3_cfg_t nand_pads[] = {
-               NEW_PAD_CTRL(MX53_PAD_NANDF_WE_B__EMI_NANDF_WE_B,
-                               PAD_CTL_DSE_HIGH),
-               NEW_PAD_CTRL(MX53_PAD_NANDF_RE_B__EMI_NANDF_RE_B,
-                               PAD_CTL_DSE_HIGH),
-               NEW_PAD_CTRL(MX53_PAD_NANDF_CLE__EMI_NANDF_CLE,
-                               PAD_CTL_DSE_HIGH),
-               NEW_PAD_CTRL(MX53_PAD_NANDF_ALE__EMI_NANDF_ALE,
-                               PAD_CTL_DSE_HIGH),
-               NEW_PAD_CTRL(MX53_PAD_NANDF_WP_B__EMI_NANDF_WP_B,
-                               PAD_CTL_PUS_100K_UP),
-               NEW_PAD_CTRL(MX53_PAD_NANDF_RB0__EMI_NANDF_RB_0,
-                               PAD_CTL_PUS_100K_UP),
-               NEW_PAD_CTRL(MX53_PAD_NANDF_CS0__EMI_NANDF_CS_0,
-                               PAD_CTL_DSE_HIGH),
-               NEW_PAD_CTRL(MX53_PAD_PATA_DATA0__EMI_NANDF_D_0,
-                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_PATA_DATA1__EMI_NANDF_D_1,
-                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_PATA_DATA2__EMI_NANDF_D_2,
-                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_PATA_DATA3__EMI_NANDF_D_3,
-                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_PATA_DATA4__EMI_NANDF_D_4,
-                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_PATA_DATA5__EMI_NANDF_D_5,
-                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_PATA_DATA6__EMI_NANDF_D_6,
-                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
-               NEW_PAD_CTRL(MX53_PAD_PATA_DATA7__EMI_NANDF_D_7,
-                               PAD_CTL_DSE_HIGH | PAD_CTL_PKE),
-       };
-
-       imx_iomux_v3_setup_multiple_pads(nand_pads, ARRAY_SIZE(nand_pads));
-}
-
-static void m53_set_clock(void)
-{
-       int ret;
-       const uint32_t ref_clk = MXC_HCLK;
-       const uint32_t dramclk = 400;
-       uint32_t cpuclk;
-
-       imx_iomux_v3_setup_pad(NEW_PAD_CTRL(MX53_PAD_GPIO_10__GPIO4_0,
-                                           PAD_CTL_DSE_HIGH | PAD_CTL_PKE));
-       gpio_direction_input(IMX_GPIO_NR(4, 0));
-
-       /* GPIO10 selects modules' CPU speed, 1 = 1200MHz ; 0 = 800MHz */
-       cpuclk = gpio_get_value(IMX_GPIO_NR(4, 0)) ? 1200 : 800;
-
-       ret = mxc_set_clock(ref_clk, cpuclk, MXC_ARM_CLK);
-       if (ret)
-               printf("CPU:   Switch CPU clock to %dMHz failed\n", cpuclk);
-
-       ret = mxc_set_clock(ref_clk, dramclk, MXC_PERIPH_CLK);
-       if (ret) {
-               printf("CPU:   Switch peripheral clock to %dMHz failed\n",
-                       dramclk);
-       }
-
-       ret = mxc_set_clock(ref_clk, dramclk, MXC_DDR_CLK);
-       if (ret)
-               printf("CPU:   Switch DDR clock to %dMHz failed\n", dramclk);
-}
-
-static void m53_set_nand(void)
-{
-       u32 i;
-
-       /* NAND flash is muxed on ATA pins */
-       setbits_le32(M4IF_BASE_ADDR + 0xc, M4IF_GENP_WEIM_MM_MASK);
-
-       /* Wait for Grant/Ack sequence (see EIM_CSnGCR2:MUX16_BYP_GRANT) */
-       for (i = 0x4; i < 0x94; i += 0x18) {
-               clrbits_le32(WEIM_BASE_ADDR + i,
-                            WEIM_GCR2_MUX16_BYP_GRANT_MASK);
-       }
-
-       mxc_set_clock(0, 33, MXC_NFC_CLK);
-       enable_nfc_clk(1);
-}
-
-int board_early_init_f(void)
-{
-       setup_iomux_uart();
-       setup_iomux_fec();
-       setup_iomux_i2c();
-       setup_iomux_nand();
-       setup_iomux_video();
-
-       m53_set_clock();
-
-       mxc_set_sata_internal_clock();
-
-       /* NAND clock @ 33MHz */
-       m53_set_nand();
-
-       return 0;
-}
-
-int board_init(void)
-{
-       gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
-
-       return 0;
-}
-
-int checkboard(void)
-{
-       puts("Board: DENX M53EVK\n");
-
-       return 0;
-}
-
-/*
- * NAND SPL
- */
-#ifdef CONFIG_SPL_BUILD
-void spl_board_init(void)
-{
-       setup_iomux_nand();
-       m53_set_clock();
-       m53_set_nand();
-}
-
-u32 spl_boot_device(void)
-{
-       return BOOT_DEVICE_NAND;
-}
-#endif
index ec0fa28f3ecf6d048da69c62b1d005894c4e8100..81463712fa828641fb4048f740836401280ece96 100644 (file)
@@ -44,9 +44,9 @@ void spi_cs_deactivate(struct spi_slave *slave)
 
 static void ma5d4evk_spi0_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTC, 0, 0);        /* SPI0_MISO */
-       at91_set_a_periph(AT91_PIO_PORTC, 1, 0);        /* SPI0_MOSI */
-       at91_set_a_periph(AT91_PIO_PORTC, 2, 0);        /* SPI0_SPCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 0, 0);   /* SPI0_MISO */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 1, 0);   /* SPI0_MOSI */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 2, 0);   /* SPI0_SPCK */
 
        at91_set_pio_output(AT91_PIO_PORTC, 3, 1);      /* SPI0_CS0 */
 
@@ -90,39 +90,39 @@ unsigned int has_lcdc(void)
 
 static void ma5d4evk_lcd_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTA, 24, 1);       /* LCDPWM */
-       at91_set_a_periph(AT91_PIO_PORTA, 25, 0);       /* LCDDISP */
-       at91_set_a_periph(AT91_PIO_PORTA, 26, 0);       /* LCDVSYNC */
-       at91_set_a_periph(AT91_PIO_PORTA, 27, 0);       /* LCDHSYNC */
-       at91_set_a_periph(AT91_PIO_PORTA, 28, 0);       /* LCDDOTCK */
-       at91_set_a_periph(AT91_PIO_PORTA, 29, 1);       /* LCDDEN */
-
-       at91_set_a_periph(AT91_PIO_PORTA,  0, 0);       /* LCDD0 */
-       at91_set_a_periph(AT91_PIO_PORTA,  1, 0);       /* LCDD1 */
-       at91_set_a_periph(AT91_PIO_PORTA,  2, 0);       /* LCDD2 */
-       at91_set_a_periph(AT91_PIO_PORTA,  3, 0);       /* LCDD3 */
-       at91_set_a_periph(AT91_PIO_PORTA,  4, 0);       /* LCDD4 */
-       at91_set_a_periph(AT91_PIO_PORTA,  5, 0);       /* LCDD5 */
-       at91_set_a_periph(AT91_PIO_PORTA,  6, 0);       /* LCDD6 */
-       at91_set_a_periph(AT91_PIO_PORTA,  7, 0);       /* LCDD7 */
-
-       at91_set_a_periph(AT91_PIO_PORTA,  8, 0);       /* LCDD9 */
-       at91_set_a_periph(AT91_PIO_PORTA,  9, 0);       /* LCDD8 */
-       at91_set_a_periph(AT91_PIO_PORTA, 10, 0);       /* LCDD10 */
-       at91_set_a_periph(AT91_PIO_PORTA, 11, 0);       /* LCDD11 */
-       at91_set_a_periph(AT91_PIO_PORTA, 12, 0);       /* LCDD12 */
-       at91_set_a_periph(AT91_PIO_PORTA, 13, 0);       /* LCDD13 */
-       at91_set_a_periph(AT91_PIO_PORTA, 14, 0);       /* LCDD14 */
-       at91_set_a_periph(AT91_PIO_PORTA, 15, 0);       /* LCDD15 */
-
-       at91_set_a_periph(AT91_PIO_PORTA, 16, 0);       /* LCDD16 */
-       at91_set_a_periph(AT91_PIO_PORTA, 17, 0);       /* LCDD17 */
-       at91_set_a_periph(AT91_PIO_PORTA, 18, 0);       /* LCDD18 */
-       at91_set_a_periph(AT91_PIO_PORTA, 19, 0);       /* LCDD19 */
-       at91_set_a_periph(AT91_PIO_PORTA, 20, 0);       /* LCDD20 */
-       at91_set_a_periph(AT91_PIO_PORTA, 21, 0);       /* LCDD21 */
-       at91_set_a_periph(AT91_PIO_PORTA, 22, 0);       /* LCDD22 */
-       at91_set_a_periph(AT91_PIO_PORTA, 23, 0);       /* LCDD23 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 24, 1);  /* LCDPWM */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 25, 0);  /* LCDDISP */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 26, 0);  /* LCDVSYNC */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 27, 0);  /* LCDHSYNC */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 28, 0);  /* LCDDOTCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 29, 1);  /* LCDDEN */
+
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  0, 0);  /* LCDD0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  1, 0);  /* LCDD1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  2, 0);  /* LCDD2 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  3, 0);  /* LCDD3 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  4, 0);  /* LCDD4 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  5, 0);  /* LCDD5 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  6, 0);  /* LCDD6 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  7, 0);  /* LCDD7 */
+
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  8, 0);  /* LCDD9 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA,  9, 0);  /* LCDD8 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 10, 0);  /* LCDD10 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 11, 0);  /* LCDD11 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 12, 0);  /* LCDD12 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 13, 0);  /* LCDD13 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 14, 0);  /* LCDD14 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 15, 0);  /* LCDD15 */
+
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 16, 0);  /* LCDD16 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 17, 0);  /* LCDD17 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 18, 0);  /* LCDD18 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 19, 0);  /* LCDD19 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 20, 0);  /* LCDD20 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 21, 0);  /* LCDD21 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 22, 0);  /* LCDD22 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTA, 23, 0);  /* LCDD23 */
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_LCDC);
@@ -134,16 +134,16 @@ static void ma5d4evk_lcd_hw_init(void)
 /* On-SoM eMMC */
 void ma5d4evk_mci0_hw_init(void)
 {
-       at91_set_b_periph(AT91_PIO_PORTC, 5, 1);        /* MCI1 CDA */
-       at91_set_b_periph(AT91_PIO_PORTC, 6, 1);        /* MCI1 DA0 */
-       at91_set_b_periph(AT91_PIO_PORTC, 7, 1);        /* MCI1 DA1 */
-       at91_set_b_periph(AT91_PIO_PORTC, 8, 1);        /* MCI1 DA2 */
-       at91_set_b_periph(AT91_PIO_PORTC, 9, 1);        /* MCI1 DA3 */
-       at91_set_b_periph(AT91_PIO_PORTC, 10, 1);       /* MCI1 DA4 */
-       at91_set_b_periph(AT91_PIO_PORTC, 11, 1);       /* MCI1 DA5 */
-       at91_set_b_periph(AT91_PIO_PORTC, 12, 1);       /* MCI1 DA6 */
-       at91_set_b_periph(AT91_PIO_PORTC, 13, 1);       /* MCI1 DA7 */
-       at91_set_b_periph(AT91_PIO_PORTC, 4, 0);        /* MCI1 CLK */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 5, 1);   /* MCI1 CDA */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 6, 1);   /* MCI1 DA0 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 7, 1);   /* MCI1 DA1 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 8, 1);   /* MCI1 DA2 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 9, 1);   /* MCI1 DA3 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 10, 1);  /* MCI1 DA4 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 11, 1);  /* MCI1 DA5 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 12, 1);  /* MCI1 DA6 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 13, 1);  /* MCI1 DA7 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 4, 0);   /* MCI1 CLK */
 
        /*
         * As the mci io internal pull down is too strong, so if the io needs
@@ -151,16 +151,16 @@ void ma5d4evk_mci0_hw_init(void)
         * the power consumption will increase, so disable the internal pull
         * down to save the power.
         */
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 5, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 6, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 7, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 8, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 9, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 10, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 11, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 12, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 13, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 4, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 5, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 6, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 7, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 8, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 9, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 10, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 11, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 12, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 13, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 4, 0);
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_MCI0);
@@ -169,12 +169,12 @@ void ma5d4evk_mci0_hw_init(void)
 /* On-board MicroSD slot */
 void ma5d4evk_mci1_hw_init(void)
 {
-       at91_set_c_periph(AT91_PIO_PORTE, 19, 1);       /* MCI1 CDA */
-       at91_set_c_periph(AT91_PIO_PORTE, 20, 1);       /* MCI1 DA0 */
-       at91_set_c_periph(AT91_PIO_PORTE, 21, 1);       /* MCI1 DA1 */
-       at91_set_c_periph(AT91_PIO_PORTE, 22, 1);       /* MCI1 DA2 */
-       at91_set_c_periph(AT91_PIO_PORTE, 23, 1);       /* MCI1 DA3 */
-       at91_set_c_periph(AT91_PIO_PORTE, 18, 0);       /* MCI1 CLK */
+       at91_pio3_set_c_periph(AT91_PIO_PORTE, 19, 1);  /* MCI1 CDA */
+       at91_pio3_set_c_periph(AT91_PIO_PORTE, 20, 1);  /* MCI1 DA0 */
+       at91_pio3_set_c_periph(AT91_PIO_PORTE, 21, 1);  /* MCI1 DA1 */
+       at91_pio3_set_c_periph(AT91_PIO_PORTE, 22, 1);  /* MCI1 DA2 */
+       at91_pio3_set_c_periph(AT91_PIO_PORTE, 23, 1);  /* MCI1 DA3 */
+       at91_pio3_set_c_periph(AT91_PIO_PORTE, 18, 0);  /* MCI1 CLK */
 
        /*
         * As the mci io internal pull down is too strong, so if the io needs
@@ -182,16 +182,16 @@ void ma5d4evk_mci1_hw_init(void)
         * the power consumption will increase, so disable the internal pull
         * down to save the power.
         */
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 18, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 19, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 20, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 21, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 22, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 23, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 18, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 19, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 20, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 21, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 22, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 23, 0);
 
        /* Deal with WP pin on the microSD slot. */
        at91_set_pio_output(AT91_PIO_PORTE, 16, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 16, 1);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 16, 1);
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_MCI1);
@@ -203,7 +203,7 @@ int board_mmc_init(bd_t *bis)
 
        /* De-assert reset on On-SoM eMMC */
        at91_set_pio_output(AT91_PIO_PORTE, 15, 1);
-       at91_set_pio_pulldown(AT91_PIO_PORTE, 15, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 15, 0);
 
        ret = atmel_mci_init((void *)ATMEL_BASE_MCI0);
        if (ret)        /* eMMC init failed, skip it. */
@@ -223,16 +223,16 @@ int board_mmc_init(bd_t *bis)
 #ifdef CONFIG_MACB
 void ma5d4evk_macb0_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTB, 0, 0);        /* ETXCK_EREFCK */
-       at91_set_a_periph(AT91_PIO_PORTB, 6, 0);        /* ERXDV */
-       at91_set_a_periph(AT91_PIO_PORTB, 8, 0);        /* ERX0 */
-       at91_set_a_periph(AT91_PIO_PORTB, 9, 0);        /* ERX1 */
-       at91_set_a_periph(AT91_PIO_PORTB, 7, 0);        /* ERXER */
-       at91_set_a_periph(AT91_PIO_PORTB, 2, 0);        /* ETXEN */
-       at91_set_a_periph(AT91_PIO_PORTB, 12, 0);       /* ETX0 */
-       at91_set_a_periph(AT91_PIO_PORTB, 13, 0);       /* ETX1 */
-       at91_set_a_periph(AT91_PIO_PORTB, 17, 0);       /* EMDIO */
-       at91_set_a_periph(AT91_PIO_PORTB, 16, 0);       /* EMDC */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 0, 0);   /* ETXCK_EREFCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 6, 0);   /* ERXDV */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 8, 0);   /* ERX0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 9, 0);   /* ERX1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 7, 0);   /* ERXER */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 2, 0);   /* ETXEN */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 12, 0);  /* ETX0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 13, 0);  /* ETX1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 17, 0);  /* EMDIO */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 16, 0);  /* EMDC */
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_GMAC0);
@@ -242,17 +242,17 @@ void ma5d4evk_macb0_hw_init(void)
 static void ma5d4evk_serial_hw_init(void)
 {
        /* USART0 */
-       at91_set_a_periph(AT91_PIO_PORTD, 13, 1);       /* TXD */
-       at91_set_a_periph(AT91_PIO_PORTD, 12, 0);       /* RXD */
-       at91_set_a_periph(AT91_PIO_PORTD, 11, 0);       /* RTS */
-       at91_set_a_periph(AT91_PIO_PORTD, 10, 0);       /* CTS */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 13, 1);  /* TXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 12, 0);  /* RXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 11, 0);  /* RTS */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 10, 0);  /* CTS */
        at91_periph_clk_enable(ATMEL_ID_USART0);
 
        /* USART1 */
-       at91_set_a_periph(AT91_PIO_PORTD, 17, 1);       /* TXD */
-       at91_set_a_periph(AT91_PIO_PORTD, 16, 0);       /* RXD */
-       at91_set_a_periph(AT91_PIO_PORTD, 15, 0);       /* RTS */
-       at91_set_a_periph(AT91_PIO_PORTD, 14, 0);       /* CTS */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 17, 1);  /* TXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 16, 0);  /* RXD */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 15, 0);  /* RTS */
+       at91_pio3_set_a_periph(AT91_PIO_PORTD, 14, 0);  /* CTS */
        at91_periph_clk_enable(ATMEL_ID_USART1);
 }
 
@@ -273,7 +273,7 @@ int board_early_init_f(void)
        at91_set_pio_output(AT91_PIO_PORTB, 21, 0);
        udelay(100);
        at91_set_pio_output(AT91_PIO_PORTB, 21, 1);
-       at91_set_pio_pulldown(AT91_PIO_PORTB, 21, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTB, 21, 0);
 
        ma5d4evk_serial_hw_init();
 
diff --git a/board/denx/mcvevk/MAINTAINERS b/board/denx/mcvevk/MAINTAINERS
deleted file mode 100644 (file)
index 6787727..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-SOCKIT BOARD
-M:     Marek Vasut <marex@denx.de>
-S:     Maintained
-F:     include/configs/socfpga_mcvevk.h
-F:     configs/socfpga_mcvevk_defconfig
diff --git a/board/denx/mcvevk/Makefile b/board/denx/mcvevk/Makefile
deleted file mode 100644 (file)
index 86f9b78..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# (C) Copyright 2001-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-# (C) Copyright 2010, Thomas Chou <thomas@wytron.com.tw>
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-y  := socfpga.o
diff --git a/board/denx/mcvevk/qts/iocsr_config.h b/board/denx/mcvevk/qts/iocsr_config.h
deleted file mode 100644 (file)
index 3021830..0000000
+++ /dev/null
@@ -1,660 +0,0 @@
-/*
- * Altera SoCFPGA IOCSR configuration
- *
- * SPDX-License-Identifier:    BSD-3-Clause
- */
-
-#ifndef __SOCFPGA_IOCSR_CONFIG_H__
-#define __SOCFPGA_IOCSR_CONFIG_H__
-
-#define CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH     764
-#define CONFIG_HPS_IOCSR_SCANCHAIN1_LENGTH     1719
-#define CONFIG_HPS_IOCSR_SCANCHAIN2_LENGTH     955
-#define CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH     16766
-
-const unsigned long iocsr_scan_chain0_table[] = {
-       0x00000000,
-       0x00000000,
-       0x0FF00000,
-       0xC0000000,
-       0x0000003F,
-       0x00008000,
-       0x00000000,
-       0x18060000,
-       0x00000060,
-       0x00000000,
-       0x00000000,
-       0x00004000,
-       0x0C0300C0,
-       0x00000000,
-       0x0C000000,
-       0x0000C030,
-       0x0000C030,
-       0x00002000,
-       0x06018060,
-       0x06018000,
-       0x06000018,
-       0x00006018,
-       0x01806018,
-       0x00001000,
-};
-
-const unsigned long iocsr_scan_chain1_table[] = {
-       0x000C0300,
-       0x300C0000,
-       0x300000C0,
-       0x000000C0,
-       0x000300C0,
-       0x00008000,
-       0x00060180,
-       0x18060000,
-       0x18000000,
-       0x00000060,
-       0x00018060,
-       0x00004000,
-       0x000300C0,
-       0x0C030000,
-       0x0C000000,
-       0x00000030,
-       0x0000C030,
-       0x00002000,
-       0x00018060,
-       0x06018000,
-       0x01FE0000,
-       0xF8000000,
-       0x00000007,
-       0x00001000,
-       0x0300C030,
-       0x00000000,
-       0x03000000,
-       0x0000000C,
-       0x00000000,
-       0x00000800,
-       0x00006018,
-       0x01806000,
-       0x00000000,
-       0x00000000,
-       0x00001806,
-       0x00000400,
-       0x0000300C,
-       0x00C03000,
-       0x00C00000,
-       0x00000003,
-       0x00000C03,
-       0x00000200,
-       0x00001806,
-       0x00601800,
-       0x80600000,
-       0x80000001,
-       0x00000601,
-       0x00000100,
-       0x00001000,
-       0x00300C00,
-       0xC0300000,
-       0xC0000000,
-       0x00000300,
-       0x00000080,
-};
-
-const unsigned long iocsr_scan_chain2_table[] = {
-       0x300C0300,
-       0x00000000,
-       0x0FF00000,
-       0x00000000,
-       0x0C0300C0,
-       0x00008000,
-       0x00060180,
-       0x00000000,
-       0x18000000,
-       0x00018060,
-       0x06018060,
-       0x00004000,
-       0x200300C0,
-       0x0C030000,
-       0x0C000000,
-       0x00000030,
-       0x0000C030,
-       0x00002000,
-       0x00018060,
-       0x00000000,
-       0x06000000,
-       0x00010018,
-       0x01806018,
-       0x00001000,
-       0x0000C030,
-       0x00000000,
-       0x03000000,
-       0x0000000C,
-       0x00C0300C,
-       0x00000800,
-};
-
-const unsigned long iocsr_scan_chain3_table[] = {
-       0x0C420D80,
-       0x0C3000FF,
-       0x0A804001,
-       0x07900000,
-       0x08020000,
-       0x00100000,
-       0x0A800000,
-       0x07900000,
-       0x08020000,
-       0x00100000,
-       0x20430000,
-       0x0C003001,
-       0x00C00481,
-       0x00000000,
-       0x00000021,
-       0x82000004,
-       0x05400000,
-       0x03C80000,
-       0x04010000,
-       0x00080000,
-       0x05400000,
-       0x03C80000,
-       0x05400000,
-       0x03C80000,
-       0x90218000,
-       0x86001800,
-       0x00600240,
-       0x80090218,
-       0x00000001,
-       0x40000002,
-       0x02A00000,
-       0x01E40000,
-       0x02A00000,
-       0x01E40000,
-       0x02A00000,
-       0x01E40000,
-       0x02A00000,
-       0x01E40000,
-       0x4810C000,
-       0x43000C00,
-       0x00300120,
-       0xC004810C,
-       0x12043000,
-       0x20000300,
-       0x00040000,
-       0x50670000,
-       0x00000010,
-       0x24590000,
-       0x00001000,
-       0xA0000034,
-       0x0D000001,
-       0xC0680A28,
-       0x45034030,
-       0x12481A01,
-       0x80A280D0,
-       0x34030C06,
-       0x01A01450,
-       0x280D0000,
-       0x30C0680A,
-       0x02490340,
-       0xD000001A,
-       0x0680A280,
-       0x10040000,
-       0x00200000,
-       0x10040000,
-       0x00200000,
-       0x15000000,
-       0x0F200000,
-       0x15000000,
-       0x0F200000,
-       0x01FE0000,
-       0x18000000,
-       0x01800902,
-       0x00240860,
-       0x007F8006,
-       0x00000000,
-       0x0A800001,
-       0x07900000,
-       0x0A800000,
-       0x07900000,
-       0x0A800000,
-       0x07900000,
-       0x08020000,
-       0x00100000,
-       0x20430000,
-       0x0C003001,
-       0x00C00481,
-       0x00000FF0,
-       0x4810C000,
-       0x80000C00,
-       0x05400000,
-       0x02480000,
-       0x04000000,
-       0x00080000,
-       0x05400000,
-       0x03C80000,
-       0x05400000,
-       0x03C80000,
-       0x90218000,
-       0x86001800,
-       0x00600240,
-       0x80090218,
-       0x24086001,
-       0x40000600,
-       0x02A00040,
-       0x01E40000,
-       0x02A00000,
-       0x01E40000,
-       0x02A00000,
-       0x01E40000,
-       0x02A00000,
-       0x01E40000,
-       0x4810C000,
-       0x43000C00,
-       0x00300120,
-       0xC004810C,
-       0x12043000,
-       0x20000300,
-       0x00040000,
-       0x50670000,
-       0x00000010,
-       0x24590000,
-       0x00001000,
-       0xA0000034,
-       0x0D000001,
-       0xC0680A28,
-       0x49034030,
-       0x12481A02,
-       0x80A280D0,
-       0x34030C06,
-       0x01A00040,
-       0x280D0002,
-       0x30C0680A,
-       0x02490340,
-       0xD00A281A,
-       0x0680A280,
-       0x10040000,
-       0x00200000,
-       0x10040000,
-       0x00200000,
-       0x15000000,
-       0x0F200000,
-       0x15000000,
-       0x0F200000,
-       0x01FE0000,
-       0x18000000,
-       0x01800902,
-       0x00240860,
-       0x007F8006,
-       0x00000000,
-       0x99300001,
-       0x34343400,
-       0xAA0D4000,
-       0x01C3A800,
-       0xAA0D4000,
-       0x01C3A890,
-       0xAA0D4000,
-       0x01C3A800,
-       0x00040100,
-       0x00000800,
-       0x00000000,
-       0x00001208,
-       0x00482000,
-       0x01000000,
-       0x00000000,
-       0x00410482,
-       0x0006A000,
-       0x0001B400,
-       0x00020000,
-       0x00000400,
-       0x0002A000,
-       0x0001E400,
-       0x5506A000,
-       0x00E1D400,
-       0x00000000,
-       0x2043090C,
-       0x00003001,
-       0x90400000,
-       0x00000000,
-       0x2020C243,
-       0x2A835000,
-       0x0070EA00,
-       0x2A835000,
-       0x0070EA24,
-       0x2A835000,
-       0x0070EA00,
-       0x00010040,
-       0x00000200,
-       0x00000000,
-       0x00000482,
-       0x00120800,
-       0x00002000,
-       0x80000000,
-       0x00104120,
-       0x00000200,
-       0xAC0D5F80,
-       0xFFFFFFFF,
-       0x14F3690D,
-       0x1A041414,
-       0x00D00000,
-       0x18864000,
-       0x49247A06,
-       0x9A28A3D7,
-       0xF511451E,
-       0x0356E388,
-       0x821A0000,
-       0x0000D000,
-       0x05140680,
-       0xD749247A,
-       0x1E9A28A3,
-       0x88F51145,
-       0x00034EE3,
-       0x00080000,
-       0x00001000,
-       0x00080200,
-       0x00001000,
-       0x000A8000,
-       0x00075000,
-       0x541A8000,
-       0x03875001,
-       0x00000000,
-       0x00000010,
-       0x0080C000,
-       0x41000000,
-       0x00003FC2,
-       0x00820000,
-       0xAA0D4000,
-       0x01C3A800,
-       0xAA0D4000,
-       0x01C3A890,
-       0xAA0D4000,
-       0x01C3A800,
-       0x00040000,
-       0x00000800,
-       0x00000000,
-       0x00001208,
-       0x00482000,
-       0x00800000,
-       0x00000000,
-       0x00410482,
-       0x0006A000,
-       0x0001B400,
-       0x00020000,
-       0x00000400,
-       0x00020080,
-       0x00000400,
-       0x5506A000,
-       0x00E1D400,
-       0x00000000,
-       0x0000090C,
-       0x00000010,
-       0x90400000,
-       0x00000000,
-       0x2020C243,
-       0x2A835000,
-       0x0070EA00,
-       0x2A835000,
-       0x0070EA24,
-       0x2A835000,
-       0x0070EA00,
-       0x00015000,
-       0x0000F200,
-       0x00000000,
-       0x00000482,
-       0x86120800,
-       0x00600240,
-       0x80000000,
-       0x00104120,
-       0x00000200,
-       0xAC0D5F80,
-       0xFFFFFFFF,
-       0x14F3690D,
-       0x1A041414,
-       0x00D00000,
-       0x18864000,
-       0x49247A06,
-       0xEBCF23D7,
-       0xF611451E,
-       0x034E9248,
-       0x821A038E,
-       0x0000D000,
-       0x00000680,
-       0xD749247A,
-       0x1E9BCF23,
-       0x88F61145,
-       0x00034EE3,
-       0x00080000,
-       0x00001000,
-       0x00080000,
-       0x00001000,
-       0x000A8000,
-       0x00075000,
-       0x541A8000,
-       0x03875001,
-       0x00000000,
-       0x00000010,
-       0x0080C000,
-       0x41000000,
-       0x00000002,
-       0x00820004,
-       0xAA0D4000,
-       0x01C3A800,
-       0xAA0D4000,
-       0x01C3A890,
-       0xAA0D4000,
-       0x01C3A800,
-       0x00040000,
-       0x00000800,
-       0x00000000,
-       0x00001208,
-       0x00482000,
-       0x00800000,
-       0x00000000,
-       0x00410482,
-       0x0006A000,
-       0x0001B400,
-       0x00020000,
-       0x00000400,
-       0x0002A000,
-       0x0001E400,
-       0x5506A000,
-       0x00E1D400,
-       0x00000000,
-       0x2043090C,
-       0x00003001,
-       0x90400000,
-       0x00000000,
-       0x2020C243,
-       0x2A835000,
-       0x0070EA00,
-       0x2A835000,
-       0x0070EA00,
-       0x2A835000,
-       0x0070EA00,
-       0x00010000,
-       0x00000200,
-       0x00000000,
-       0x00000482,
-       0x00120800,
-       0x00200000,
-       0x80000000,
-       0x00104120,
-       0x00000200,
-       0xAC0D5F80,
-       0xFFFFFFFF,
-       0x14F3690D,
-       0x1A041414,
-       0x00D00000,
-       0x18864000,
-       0x49247A06,
-       0x9A28A3D7,
-       0xF431451E,
-       0x034E9248,
-       0x821A0000,
-       0x0000D000,
-       0x00000680,
-       0xD749247A,
-       0x1E9A28A3,
-       0x88F61145,
-       0x000356E3,
-       0x00080000,
-       0x00001000,
-       0x00080000,
-       0x00001000,
-       0x000A8000,
-       0x00075000,
-       0x541A8000,
-       0x03875001,
-       0x00000000,
-       0x00000010,
-       0x0080C000,
-       0x41000000,
-       0x00000002,
-       0x00820004,
-       0xAA0D4000,
-       0x01C3A800,
-       0xAA0D4000,
-       0x01C3A800,
-       0xAA0D4000,
-       0x01C3A800,
-       0x00040000,
-       0x00000800,
-       0x00000000,
-       0x00001208,
-       0x00482000,
-       0x00800000,
-       0x00000000,
-       0x00410482,
-       0x0006A000,
-       0x0001B400,
-       0x00020000,
-       0x00000400,
-       0x00020000,
-       0x00000400,
-       0x5506A000,
-       0x00E1D400,
-       0x00000000,
-       0x0000090C,
-       0x00001000,
-       0x90400000,
-       0x00000000,
-       0x2020C243,
-       0x2A835000,
-       0x0070EA00,
-       0x2A835000,
-       0x0070EA00,
-       0x2A835000,
-       0x0070EA00,
-       0x00010040,
-       0x00000200,
-       0x00000000,
-       0x00000482,
-       0x00120800,
-       0x00400000,
-       0x80000000,
-       0x00104120,
-       0x00000200,
-       0xAC0D5F80,
-       0xFFFFFFFF,
-       0x14F1690D,
-       0x1A041414,
-       0x00D00000,
-       0x08864000,
-       0x49247A02,
-       0xEBCF23DB,
-       0xF431451E,
-       0x0356E388,
-       0x821A0000,
-       0x0000D000,
-       0x00000680,
-       0xD749247A,
-       0x1EEBCF23,
-       0x88F43E79,
-       0x000356A2,
-       0x00080000,
-       0x00001000,
-       0x00080000,
-       0x00001000,
-       0x000A8000,
-       0x00075000,
-       0x541A8000,
-       0x03875001,
-       0x00000000,
-       0x00000010,
-       0x0080C000,
-       0x41000000,
-       0x00000002,
-       0x00820004,
-       0x00489800,
-       0x801A1A1A,
-       0x00000200,
-       0x80000004,
-       0x00000200,
-       0x80000004,
-       0x00000200,
-       0x00000004,
-       0x00000200,
-       0x00000004,
-       0x00040000,
-       0x10000000,
-       0x00000000,
-       0x00004000,
-       0x00010000,
-       0x40002080,
-       0x00000100,
-       0x40000002,
-       0x00000100,
-       0x00000002,
-       0x00000100,
-       0x40000002,
-       0x00000100,
-       0x00000002,
-       0x00020000,
-       0x00000000,
-       0x00000008,
-       0x00000020,
-       0x00008000,
-       0x20001040,
-       0x00000080,
-       0x20000001,
-       0x00000080,
-       0x20000001,
-       0x00000080,
-       0x20000001,
-       0x00000080,
-       0x00000001,
-       0x00010000,
-       0x04000000,
-       0x00FF0000,
-       0x00000000,
-       0x00004000,
-       0x00000800,
-       0xC0000001,
-       0x00041419,
-       0x40000000,
-       0x04000816,
-       0x000D0000,
-       0x00006800,
-       0x00000340,
-       0xD000001A,
-       0x06800000,
-       0x00340000,
-       0x0001A000,
-       0x00000D00,
-       0x40000068,
-       0x1A000003,
-       0x00D00000,
-       0x00068000,
-       0x00003400,
-       0x000001A0,
-       0x00000401,
-       0x00000008,
-       0x00000401,
-       0x00000008,
-       0x00000401,
-       0x00000008,
-       0x00000401,
-       0x80000008,
-       0x0000007F,
-       0x20000000,
-       0x00000000,
-       0xE0000080,
-       0x0000001F,
-       0x00004000,
-};
-
-
-#endif /* __SOCFPGA_IOCSR_CONFIG_H__ */
diff --git a/board/denx/mcvevk/qts/pinmux_config.h b/board/denx/mcvevk/qts/pinmux_config.h
deleted file mode 100644 (file)
index ea2f7ab..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Altera SoCFPGA PinMux configuration
- *
- * SPDX-License-Identifier:    BSD-3-Clause
- */
-
-#ifndef __SOCFPGA_PINMUX_CONFIG_H__
-#define __SOCFPGA_PINMUX_CONFIG_H__
-
-const u8 sys_mgr_init_table[] = {
-       3, /* EMACIO0 */
-       3, /* EMACIO1 */
-       3, /* EMACIO2 */
-       3, /* EMACIO3 */
-       3, /* EMACIO4 */
-       3, /* EMACIO5 */
-       3, /* EMACIO6 */
-       3, /* EMACIO7 */
-       3, /* EMACIO8 */
-       3, /* EMACIO9 */
-       3, /* EMACIO10 */
-       3, /* EMACIO11 */
-       3, /* EMACIO12 */
-       3, /* EMACIO13 */
-       0, /* EMACIO14 */
-       0, /* EMACIO15 */
-       0, /* EMACIO16 */
-       0, /* EMACIO17 */
-       0, /* EMACIO18 */
-       0, /* EMACIO19 */
-       3, /* FLASHIO0 */
-       0, /* FLASHIO1 */
-       3, /* FLASHIO2 */
-       3, /* FLASHIO3 */
-       3, /* FLASHIO4 */
-       3, /* FLASHIO5 */
-       3, /* FLASHIO6 */
-       3, /* FLASHIO7 */
-       0, /* FLASHIO8 */
-       3, /* FLASHIO9 */
-       3, /* FLASHIO10 */
-       3, /* FLASHIO11 */
-       0, /* GENERALIO0 */
-       1, /* GENERALIO1 */
-       1, /* GENERALIO2 */
-       0, /* GENERALIO3 */
-       0, /* GENERALIO4 */
-       1, /* GENERALIO5 */
-       1, /* GENERALIO6 */
-       1, /* GENERALIO7 */
-       1, /* GENERALIO8 */
-       0, /* GENERALIO9 */
-       0, /* GENERALIO10 */
-       0, /* GENERALIO11 */
-       0, /* GENERALIO12 */
-       2, /* GENERALIO13 */
-       2, /* GENERALIO14 */
-       1, /* GENERALIO15 */
-       1, /* GENERALIO16 */
-       1, /* GENERALIO17 */
-       1, /* GENERALIO18 */
-       0, /* GENERALIO19 */
-       0, /* GENERALIO20 */
-       0, /* GENERALIO21 */
-       0, /* GENERALIO22 */
-       0, /* GENERALIO23 */
-       0, /* GENERALIO24 */
-       0, /* GENERALIO25 */
-       0, /* GENERALIO26 */
-       0, /* GENERALIO27 */
-       0, /* GENERALIO28 */
-       0, /* GENERALIO29 */
-       0, /* GENERALIO30 */
-       0, /* GENERALIO31 */
-       0, /* MIXED1IO0 */
-       1, /* MIXED1IO1 */
-       1, /* MIXED1IO2 */
-       1, /* MIXED1IO3 */
-       1, /* MIXED1IO4 */
-       0, /* MIXED1IO5 */
-       0, /* MIXED1IO6 */
-       0, /* MIXED1IO7 */
-       1, /* MIXED1IO8 */
-       1, /* MIXED1IO9 */
-       1, /* MIXED1IO10 */
-       1, /* MIXED1IO11 */
-       0, /* MIXED1IO12 */
-       0, /* MIXED1IO13 */
-       0, /* MIXED1IO14 */
-       1, /* MIXED1IO15 */
-       1, /* MIXED1IO16 */
-       1, /* MIXED1IO17 */
-       1, /* MIXED1IO18 */
-       0, /* MIXED1IO19 */
-       0, /* MIXED1IO20 */
-       0, /* MIXED1IO21 */
-       0, /* MIXED2IO0 */
-       0, /* MIXED2IO1 */
-       0, /* MIXED2IO2 */
-       0, /* MIXED2IO3 */
-       0, /* MIXED2IO4 */
-       0, /* MIXED2IO5 */
-       0, /* MIXED2IO6 */
-       0, /* MIXED2IO7 */
-       0, /* GPLINMUX48 */
-       0, /* GPLINMUX49 */
-       0, /* GPLINMUX50 */
-       0, /* GPLINMUX51 */
-       0, /* GPLINMUX52 */
-       0, /* GPLINMUX53 */
-       0, /* GPLINMUX54 */
-       0, /* GPLINMUX55 */
-       0, /* GPLINMUX56 */
-       0, /* GPLINMUX57 */
-       0, /* GPLINMUX58 */
-       0, /* GPLINMUX59 */
-       0, /* GPLINMUX60 */
-       0, /* GPLINMUX61 */
-       0, /* GPLINMUX62 */
-       0, /* GPLINMUX63 */
-       0, /* GPLINMUX64 */
-       0, /* GPLINMUX65 */
-       0, /* GPLINMUX66 */
-       0, /* GPLINMUX67 */
-       0, /* GPLINMUX68 */
-       0, /* GPLINMUX69 */
-       0, /* GPLINMUX70 */
-       1, /* GPLMUX0 */
-       1, /* GPLMUX1 */
-       1, /* GPLMUX2 */
-       1, /* GPLMUX3 */
-       1, /* GPLMUX4 */
-       1, /* GPLMUX5 */
-       1, /* GPLMUX6 */
-       1, /* GPLMUX7 */
-       1, /* GPLMUX8 */
-       1, /* GPLMUX9 */
-       1, /* GPLMUX10 */
-       1, /* GPLMUX11 */
-       1, /* GPLMUX12 */
-       1, /* GPLMUX13 */
-       1, /* GPLMUX14 */
-       1, /* GPLMUX15 */
-       1, /* GPLMUX16 */
-       1, /* GPLMUX17 */
-       1, /* GPLMUX18 */
-       1, /* GPLMUX19 */
-       1, /* GPLMUX20 */
-       1, /* GPLMUX21 */
-       1, /* GPLMUX22 */
-       1, /* GPLMUX23 */
-       1, /* GPLMUX24 */
-       1, /* GPLMUX25 */
-       1, /* GPLMUX26 */
-       1, /* GPLMUX27 */
-       1, /* GPLMUX28 */
-       1, /* GPLMUX29 */
-       1, /* GPLMUX30 */
-       1, /* GPLMUX31 */
-       1, /* GPLMUX32 */
-       1, /* GPLMUX33 */
-       1, /* GPLMUX34 */
-       1, /* GPLMUX35 */
-       1, /* GPLMUX36 */
-       1, /* GPLMUX37 */
-       1, /* GPLMUX38 */
-       1, /* GPLMUX39 */
-       1, /* GPLMUX40 */
-       1, /* GPLMUX41 */
-       1, /* GPLMUX42 */
-       1, /* GPLMUX43 */
-       1, /* GPLMUX44 */
-       1, /* GPLMUX45 */
-       1, /* GPLMUX46 */
-       1, /* GPLMUX47 */
-       1, /* GPLMUX48 */
-       1, /* GPLMUX49 */
-       1, /* GPLMUX50 */
-       1, /* GPLMUX51 */
-       1, /* GPLMUX52 */
-       1, /* GPLMUX53 */
-       1, /* GPLMUX54 */
-       1, /* GPLMUX55 */
-       1, /* GPLMUX56 */
-       1, /* GPLMUX57 */
-       1, /* GPLMUX58 */
-       1, /* GPLMUX59 */
-       1, /* GPLMUX60 */
-       1, /* GPLMUX61 */
-       1, /* GPLMUX62 */
-       1, /* GPLMUX63 */
-       1, /* GPLMUX64 */
-       1, /* GPLMUX65 */
-       1, /* GPLMUX66 */
-       1, /* GPLMUX67 */
-       1, /* GPLMUX68 */
-       1, /* GPLMUX69 */
-       1, /* GPLMUX70 */
-       0, /* NANDUSEFPGA */
-       0, /* UART0USEFPGA */
-       0, /* RGMII1USEFPGA */
-       0, /* SPIS0USEFPGA */
-       0, /* CAN0USEFPGA */
-       0, /* I2C0USEFPGA */
-       0, /* SDMMCUSEFPGA */
-       0, /* QSPIUSEFPGA */
-       0, /* SPIS1USEFPGA */
-       0, /* RGMII0USEFPGA */
-       1, /* UART1USEFPGA */
-       0, /* CAN1USEFPGA */
-       0, /* USB1USEFPGA */
-       0, /* I2C3USEFPGA */
-       0, /* I2C2USEFPGA */
-       0, /* I2C1USEFPGA */
-       0, /* SPIM1USEFPGA */
-       0, /* USB0USEFPGA */
-       0 /* SPIM0USEFPGA */
-};
-#endif /* __SOCFPGA_PINMUX_CONFIG_H__ */
diff --git a/board/denx/mcvevk/qts/pll_config.h b/board/denx/mcvevk/qts/pll_config.h
deleted file mode 100644 (file)
index b718b39..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Altera SoCFPGA Clock and PLL configuration
- *
- * SPDX-License-Identifier:    BSD-3-Clause
- */
-
-#ifndef __SOCFPGA_PLL_CONFIG_H__
-#define __SOCFPGA_PLL_CONFIG_H__
-
-#define CONFIG_HPS_DBCTRL_STAYOSC1 1
-
-#define CONFIG_HPS_MAINPLLGRP_VCO_DENOM 0
-#define CONFIG_HPS_MAINPLLGRP_VCO_NUMER 63
-#define CONFIG_HPS_MAINPLLGRP_MPUCLK_CNT 0
-#define CONFIG_HPS_MAINPLLGRP_MAINCLK_CNT 0
-#define CONFIG_HPS_MAINPLLGRP_DBGATCLK_CNT 0
-#define CONFIG_HPS_MAINPLLGRP_MAINQSPICLK_CNT 511
-#define CONFIG_HPS_MAINPLLGRP_MAINNANDSDMMCCLK_CNT 511
-#define CONFIG_HPS_MAINPLLGRP_CFGS2FUSER0CLK_CNT 15
-#define CONFIG_HPS_MAINPLLGRP_MAINDIV_L3MPCLK 1
-#define CONFIG_HPS_MAINPLLGRP_MAINDIV_L3SPCLK 1
-#define CONFIG_HPS_MAINPLLGRP_MAINDIV_L4MPCLK 1
-#define CONFIG_HPS_MAINPLLGRP_MAINDIV_L4SPCLK 1
-#define CONFIG_HPS_MAINPLLGRP_DBGDIV_DBGATCLK 0
-#define CONFIG_HPS_MAINPLLGRP_DBGDIV_DBGCLK 1
-#define CONFIG_HPS_MAINPLLGRP_TRACEDIV_TRACECLK 0
-#define CONFIG_HPS_MAINPLLGRP_L4SRC_L4MP 1
-#define CONFIG_HPS_MAINPLLGRP_L4SRC_L4SP 1
-
-#define CONFIG_HPS_PERPLLGRP_VCO_DENOM 0
-#define CONFIG_HPS_PERPLLGRP_VCO_NUMER 39
-#define CONFIG_HPS_PERPLLGRP_VCO_PSRC 0
-#define CONFIG_HPS_PERPLLGRP_EMAC0CLK_CNT 3
-#define CONFIG_HPS_PERPLLGRP_EMAC1CLK_CNT 511
-#define CONFIG_HPS_PERPLLGRP_PERQSPICLK_CNT 511
-#define CONFIG_HPS_PERPLLGRP_PERNANDSDMMCCLK_CNT 4
-#define CONFIG_HPS_PERPLLGRP_PERBASECLK_CNT 4
-#define CONFIG_HPS_PERPLLGRP_S2FUSER1CLK_CNT 511
-#define CONFIG_HPS_PERPLLGRP_DIV_USBCLK 0
-#define CONFIG_HPS_PERPLLGRP_DIV_SPIMCLK 0
-#define CONFIG_HPS_PERPLLGRP_DIV_CAN0CLK 1
-#define CONFIG_HPS_PERPLLGRP_DIV_CAN1CLK 1
-#define CONFIG_HPS_PERPLLGRP_GPIODIV_GPIODBCLK 6249
-#define CONFIG_HPS_PERPLLGRP_SRC_SDMMC 2
-#define CONFIG_HPS_PERPLLGRP_SRC_NAND 2
-#define CONFIG_HPS_PERPLLGRP_SRC_QSPI 1
-
-#define CONFIG_HPS_SDRPLLGRP_VCO_DENOM 0
-#define CONFIG_HPS_SDRPLLGRP_VCO_NUMER 31
-#define CONFIG_HPS_SDRPLLGRP_VCO_SSRC 0
-#define CONFIG_HPS_SDRPLLGRP_DDRDQSCLK_CNT 1
-#define CONFIG_HPS_SDRPLLGRP_DDRDQSCLK_PHASE 0
-#define CONFIG_HPS_SDRPLLGRP_DDR2XDQSCLK_CNT 0
-#define CONFIG_HPS_SDRPLLGRP_DDR2XDQSCLK_PHASE 0
-#define CONFIG_HPS_SDRPLLGRP_DDRDQCLK_CNT 1
-#define CONFIG_HPS_SDRPLLGRP_DDRDQCLK_PHASE 4
-#define CONFIG_HPS_SDRPLLGRP_S2FUSER2CLK_CNT 5
-#define CONFIG_HPS_SDRPLLGRP_S2FUSER2CLK_PHASE 0
-
-#define CONFIG_HPS_CLK_OSC1_HZ 25000000
-#define CONFIG_HPS_CLK_OSC2_HZ 25000000
-#define CONFIG_HPS_CLK_F2S_SDR_REF_HZ 0
-#define CONFIG_HPS_CLK_F2S_PER_REF_HZ 0
-#define CONFIG_HPS_CLK_MAINVCO_HZ 1600000000
-#define CONFIG_HPS_CLK_PERVCO_HZ 1000000000
-#define CONFIG_HPS_CLK_SDRVCO_HZ 800000000
-#define CONFIG_HPS_CLK_EMAC0_HZ 250000000
-#define CONFIG_HPS_CLK_EMAC1_HZ 1953125
-#define CONFIG_HPS_CLK_USBCLK_HZ 200000000
-#define CONFIG_HPS_CLK_NAND_HZ 50000000
-#define CONFIG_HPS_CLK_SDMMC_HZ 200000000
-#define CONFIG_HPS_CLK_QSPI_HZ 3125000
-#define CONFIG_HPS_CLK_SPIM_HZ 200000000
-#define CONFIG_HPS_CLK_CAN0_HZ 100000000
-#define CONFIG_HPS_CLK_CAN1_HZ 100000000
-#define CONFIG_HPS_CLK_GPIODB_HZ 32000
-#define CONFIG_HPS_CLK_L4_MP_HZ 100000000
-#define CONFIG_HPS_CLK_L4_SP_HZ 100000000
-
-#define CONFIG_HPS_ALTERAGRP_MPUCLK 1
-#define CONFIG_HPS_ALTERAGRP_MAINCLK 3
-#define CONFIG_HPS_ALTERAGRP_DBGATCLK 3
-
-
-#endif /* __SOCFPGA_PLL_CONFIG_H__ */
diff --git a/board/denx/mcvevk/qts/sdram_config.h b/board/denx/mcvevk/qts/sdram_config.h
deleted file mode 100644 (file)
index ff64f55..0000000
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- * Altera SoCFPGA SDRAM configuration
- *
- * SPDX-License-Identifier:    BSD-3-Clause
- */
-
-#ifndef __SOCFPGA_SDRAM_CONFIG_H__
-#define __SOCFPGA_SDRAM_CONFIG_H__
-
-/* SDRAM configuration */
-#define CONFIG_HPS_SDR_CTRLCFG_CPORTRDWR_CPORTRDWR             0x5A56A
-#define CONFIG_HPS_SDR_CTRLCFG_CPORTRMAP_CPORTRMAP             0xB00088
-#define CONFIG_HPS_SDR_CTRLCFG_CPORTWIDTH_CPORTWIDTH           0x44555
-#define CONFIG_HPS_SDR_CTRLCFG_CPORTWMAP_CPORTWMAP             0x2C011000
-#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ADDRORDER               0
-#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_DQSTRKEN                        0
-#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ECCCORREN               0
-#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ECCEN                   0
-#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_MEMBL                   8
-#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_MEMTYPE                 2
-#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_NODMPINS                        0
-#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_REORDEREN               1
-#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_STARVELIMIT             10
-#define CONFIG_HPS_SDR_CTRLCFG_CTRLWIDTH_CTRLWIDTH             2
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMADDRW_BANKBITS              3
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMADDRW_COLBITS               10
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMADDRW_CSBITS                        1
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMADDRW_ROWBITS               15
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMDEVWIDTH_DEVWIDTH           8
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMIFWIDTH_IFWIDTH             32
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMINTR_INTREN                 0
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMODT_READ                    0
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMODT_WRITE                   1
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_AL                  0
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TCL                 6
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TCWL                        6
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TFAW                        16
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TRFC                        140
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TRRD                        5
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TRCD             6
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TREFI            1560
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TRP              6
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TWR              6
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TWTR             4
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TCCD                        4
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TMRD                        4
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TRAS                        14
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TRC                 20
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TRTP                        5
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING4_PWRDOWNEXIT         3
-#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING4_SELFRFSHEXIT                512
-#define CONFIG_HPS_SDR_CTRLCFG_EXTRATIME1_CFG_EXTRA_CTL_CLK_RD_TO_WR 0
-#define CONFIG_HPS_SDR_CTRLCFG_EXTRATIME1_CFG_EXTRA_CTL_CLK_RD_TO_WR_BC 0
-#define CONFIG_HPS_SDR_CTRLCFG_EXTRATIME1_CFG_EXTRA_CTL_CLK_RD_TO_WR_DIFF_CHIP 0
-#define CONFIG_HPS_SDR_CTRLCFG_FIFOCFG_INCSYNC                 0
-#define CONFIG_HPS_SDR_CTRLCFG_FIFOCFG_SYNCMODE                        0
-#define CONFIG_HPS_SDR_CTRLCFG_FPGAPORTRST                     0x0
-#define CONFIG_HPS_SDR_CTRLCFG_LOWPWREQ_SELFRFSHMASK           3
-#define CONFIG_HPS_SDR_CTRLCFG_LOWPWRTIMING_AUTOPDCYCLES       0
-#define CONFIG_HPS_SDR_CTRLCFG_LOWPWRTIMING_CLKDISABLECYCLES   8
-#define CONFIG_HPS_SDR_CTRLCFG_MPPACING_0_THRESHOLD1_31_0      0x20820820
-#define CONFIG_HPS_SDR_CTRLCFG_MPPACING_1_THRESHOLD1_59_32     0x8208208
-#define CONFIG_HPS_SDR_CTRLCFG_MPPACING_1_THRESHOLD2_3_0       0
-#define CONFIG_HPS_SDR_CTRLCFG_MPPACING_2_THRESHOLD2_35_4      0x41041041
-#define CONFIG_HPS_SDR_CTRLCFG_MPPACING_3_THRESHOLD2_59_36     0x410410
-#define CONFIG_HPS_SDR_CTRLCFG_MPPRIORITY_USERPRIORITY         0x3FFD1088
-#define CONFIG_HPS_SDR_CTRLCFG_MPTHRESHOLDRST_0_THRESHOLDRSTCYCLES_31_0        0x01010101
-#define CONFIG_HPS_SDR_CTRLCFG_MPTHRESHOLDRST_1_THRESHOLDRSTCYCLES_63_32       0x01010101
-#define CONFIG_HPS_SDR_CTRLCFG_MPTHRESHOLDRST_2_THRESHOLDRSTCYCLES_79_64       0x0101
-#define CONFIG_HPS_SDR_CTRLCFG_MPWIEIGHT_0_STATICWEIGHT_31_0   0x21084210
-#define CONFIG_HPS_SDR_CTRLCFG_MPWIEIGHT_1_STATICWEIGHT_49_32  0x1EF84
-#define CONFIG_HPS_SDR_CTRLCFG_MPWIEIGHT_1_SUMOFWEIGHT_13_0    0x2020
-#define CONFIG_HPS_SDR_CTRLCFG_MPWIEIGHT_2_SUMOFWEIGHT_45_14   0x0
-#define CONFIG_HPS_SDR_CTRLCFG_MPWIEIGHT_3_SUMOFWEIGHT_63_46   0xF800
-#define CONFIG_HPS_SDR_CTRLCFG_PHYCTRL_PHYCTRL_0               0x200
-#define CONFIG_HPS_SDR_CTRLCFG_PORTCFG_AUTOPCHEN               0
-#define CONFIG_HPS_SDR_CTRLCFG_RFIFOCMAP_RFIFOCMAP             0x760210
-#define CONFIG_HPS_SDR_CTRLCFG_STATICCFG_MEMBL                 2
-#define CONFIG_HPS_SDR_CTRLCFG_STATICCFG_USEECCASDATA          0
-#define CONFIG_HPS_SDR_CTRLCFG_WFIFOCMAP_WFIFOCMAP             0x980543
-
-/* Sequencer auto configuration */
-#define RW_MGR_ACTIVATE_0_AND_1        0x0D
-#define RW_MGR_ACTIVATE_0_AND_1_WAIT1  0x0E
-#define RW_MGR_ACTIVATE_0_AND_1_WAIT2  0x10
-#define RW_MGR_ACTIVATE_1      0x0F
-#define RW_MGR_CLEAR_DQS_ENABLE        0x49
-#define RW_MGR_GUARANTEED_READ 0x4C
-#define RW_MGR_GUARANTEED_READ_CONT    0x54
-#define RW_MGR_GUARANTEED_WRITE        0x18
-#define RW_MGR_GUARANTEED_WRITE_WAIT0  0x1B
-#define RW_MGR_GUARANTEED_WRITE_WAIT1  0x1F
-#define RW_MGR_GUARANTEED_WRITE_WAIT2  0x19
-#define RW_MGR_GUARANTEED_WRITE_WAIT3  0x1D
-#define RW_MGR_IDLE    0x00
-#define RW_MGR_IDLE_LOOP1      0x7B
-#define RW_MGR_IDLE_LOOP2      0x7A
-#define RW_MGR_INIT_RESET_0_CKE_0      0x6F
-#define RW_MGR_INIT_RESET_1_CKE_0      0x74
-#define RW_MGR_LFSR_WR_RD_BANK_0       0x22
-#define RW_MGR_LFSR_WR_RD_BANK_0_DATA  0x25
-#define RW_MGR_LFSR_WR_RD_BANK_0_DQS   0x24
-#define RW_MGR_LFSR_WR_RD_BANK_0_NOP   0x23
-#define RW_MGR_LFSR_WR_RD_BANK_0_WAIT  0x32
-#define RW_MGR_LFSR_WR_RD_BANK_0_WL_1  0x21
-#define RW_MGR_LFSR_WR_RD_DM_BANK_0    0x36
-#define RW_MGR_LFSR_WR_RD_DM_BANK_0_DATA       0x39
-#define RW_MGR_LFSR_WR_RD_DM_BANK_0_DQS        0x38
-#define RW_MGR_LFSR_WR_RD_DM_BANK_0_NOP        0x37
-#define RW_MGR_LFSR_WR_RD_DM_BANK_0_WAIT       0x46
-#define RW_MGR_LFSR_WR_RD_DM_BANK_0_WL_1       0x35
-#define RW_MGR_MRS0_DLL_RESET  0x02
-#define RW_MGR_MRS0_DLL_RESET_MIRR     0x08
-#define RW_MGR_MRS0_USER       0x07
-#define RW_MGR_MRS0_USER_MIRR  0x0C
-#define RW_MGR_MRS1    0x03
-#define RW_MGR_MRS1_MIRR       0x09
-#define RW_MGR_MRS2    0x04
-#define RW_MGR_MRS2_MIRR       0x0A
-#define RW_MGR_MRS3    0x05
-#define RW_MGR_MRS3_MIRR       0x0B
-#define RW_MGR_PRECHARGE_ALL   0x12
-#define RW_MGR_READ_B2B        0x59
-#define RW_MGR_READ_B2B_WAIT1  0x61
-#define RW_MGR_READ_B2B_WAIT2  0x6B
-#define RW_MGR_REFRESH_ALL     0x14
-#define RW_MGR_RETURN  0x01
-#define RW_MGR_SGLE_READ       0x7D
-#define RW_MGR_ZQCL    0x06
-
-/* Sequencer defines configuration */
-#define AFI_RATE_RATIO 1
-#define CALIB_LFIFO_OFFSET     7
-#define CALIB_VFIFO_OFFSET     5
-#define ENABLE_SUPER_QUICK_CALIBRATION 0
-#define IO_DELAY_PER_DCHAIN_TAP        25
-#define IO_DELAY_PER_DQS_EN_DCHAIN_TAP 25
-#define IO_DELAY_PER_OPA_TAP   312
-#define IO_DLL_CHAIN_LENGTH    8
-#define IO_DQDQS_OUT_PHASE_MAX 0
-#define IO_DQS_EN_DELAY_MAX    31
-#define IO_DQS_EN_DELAY_OFFSET 0
-#define IO_DQS_EN_PHASE_MAX    7
-#define IO_DQS_IN_DELAY_MAX    31
-#define IO_DQS_IN_RESERVE      4
-#define IO_DQS_OUT_RESERVE     4
-#define IO_IO_IN_DELAY_MAX     31
-#define IO_IO_OUT1_DELAY_MAX   31
-#define IO_IO_OUT2_DELAY_MAX   0
-#define IO_SHIFT_DQS_EN_WHEN_SHIFT_DQS 0
-#define MAX_LATENCY_COUNT_WIDTH        5
-#define READ_VALID_FIFO_SIZE   16
-#define REG_FILE_INIT_SEQ_SIGNATURE    0x55550496
-#define RW_MGR_MEM_ADDRESS_MIRRORING   0
-#define RW_MGR_MEM_DATA_MASK_WIDTH     4
-#define RW_MGR_MEM_DATA_WIDTH  32
-#define RW_MGR_MEM_DQ_PER_READ_DQS     8
-#define RW_MGR_MEM_DQ_PER_WRITE_DQS    8
-#define RW_MGR_MEM_IF_READ_DQS_WIDTH   4
-#define RW_MGR_MEM_IF_WRITE_DQS_WIDTH  4
-#define RW_MGR_MEM_NUMBER_OF_CS_PER_DIMM       1
-#define RW_MGR_MEM_NUMBER_OF_RANKS     1
-#define RW_MGR_MEM_VIRTUAL_GROUPS_PER_READ_DQS 1
-#define RW_MGR_MEM_VIRTUAL_GROUPS_PER_WRITE_DQS        1
-#define RW_MGR_TRUE_MEM_DATA_MASK_WIDTH        4
-#define TINIT_CNTR0_VAL        99
-#define TINIT_CNTR1_VAL        32
-#define TINIT_CNTR2_VAL        32
-#define TRESET_CNTR0_VAL       99
-#define TRESET_CNTR1_VAL       99
-#define TRESET_CNTR2_VAL       10
-
-/* Sequencer ac_rom_init configuration */
-const u32 ac_rom_init[] = {
-       0x20700000,
-       0x20780000,
-       0x10080421,
-       0x10080520,
-       0x10090044,
-       0x100a0008,
-       0x100b0000,
-       0x10380400,
-       0x10080441,
-       0x100804c0,
-       0x100a0024,
-       0x10090010,
-       0x100b0000,
-       0x30780000,
-       0x38780000,
-       0x30780000,
-       0x10680000,
-       0x106b0000,
-       0x10280400,
-       0x10480000,
-       0x1c980000,
-       0x1c9b0000,
-       0x1c980008,
-       0x1c9b0008,
-       0x38f80000,
-       0x3cf80000,
-       0x38780000,
-       0x18180000,
-       0x18980000,
-       0x13580000,
-       0x135b0000,
-       0x13580008,
-       0x135b0008,
-       0x33780000,
-       0x10580008,
-       0x10780000
-};
-
-/* Sequencer inst_rom_init configuration */
-const u32 inst_rom_init[] = {
-       0x80000,
-       0x80680,
-       0x8180,
-       0x8200,
-       0x8280,
-       0x8300,
-       0x8380,
-       0x8100,
-       0x8480,
-       0x8500,
-       0x8580,
-       0x8600,
-       0x8400,
-       0x800,
-       0x8680,
-       0x880,
-       0xa680,
-       0x80680,
-       0x900,
-       0x80680,
-       0x980,
-       0xa680,
-       0x8680,
-       0x80680,
-       0xb68,
-       0xcce8,
-       0xae8,
-       0x8ce8,
-       0xb88,
-       0xec88,
-       0xa08,
-       0xac88,
-       0x80680,
-       0xce00,
-       0xcd80,
-       0xe700,
-       0xc00,
-       0x20ce0,
-       0x20ce0,
-       0x20ce0,
-       0x20ce0,
-       0xd00,
-       0x680,
-       0x680,
-       0x680,
-       0x680,
-       0x60e80,
-       0x61080,
-       0x61080,
-       0x61080,
-       0xa680,
-       0x8680,
-       0x80680,
-       0xce00,
-       0xcd80,
-       0xe700,
-       0xc00,
-       0x30ce0,
-       0x30ce0,
-       0x30ce0,
-       0x30ce0,
-       0xd00,
-       0x680,
-       0x680,
-       0x680,
-       0x680,
-       0x70e80,
-       0x71080,
-       0x71080,
-       0x71080,
-       0xa680,
-       0x8680,
-       0x80680,
-       0x1158,
-       0x6d8,
-       0x80680,
-       0x1168,
-       0x7e8,
-       0x7e8,
-       0x87e8,
-       0x40fe8,
-       0x410e8,
-       0x410e8,
-       0x410e8,
-       0x1168,
-       0x7e8,
-       0x7e8,
-       0xa7e8,
-       0x80680,
-       0x40e88,
-       0x41088,
-       0x41088,
-       0x41088,
-       0x40f68,
-       0x410e8,
-       0x410e8,
-       0x410e8,
-       0xa680,
-       0x40fe8,
-       0x410e8,
-       0x410e8,
-       0x410e8,
-       0x41008,
-       0x41088,
-       0x41088,
-       0x41088,
-       0x1100,
-       0xc680,
-       0x8680,
-       0xe680,
-       0x80680,
-       0x0,
-       0x8000,
-       0xa000,
-       0xc000,
-       0x80000,
-       0x80,
-       0x8080,
-       0xa080,
-       0xc080,
-       0x80080,
-       0x9180,
-       0x8680,
-       0xa680,
-       0x80680,
-       0x40f08,
-       0x80680
-};
-
-#endif /* __SOCFPGA_SDRAM_CONFIG_H__ */
diff --git a/board/denx/mcvevk/socfpga.c b/board/denx/mcvevk/socfpga.c
deleted file mode 100644 (file)
index 6be58f0..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * Copyright (C) 2015 Marek Vasut <marex@denx.de>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-#include <common.h>
index 80963fefa508987c331190fbf6b6299b00b2d4c3..66dc407baeb616f6965d18094cf471935dd1af8e 100644 (file)
@@ -62,7 +62,7 @@ int board_early_init_f(void)
        return 0;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        gd->ram_size = get_ram_size(0, fixed_sdram(NULL, NULL, 0));
 
index e962d4c4bb41429d6d3b8da1206ae11df6192685..c379e7723d5f1449c1824773cedfa5b376b2cbde 100644 (file)
@@ -42,7 +42,7 @@ struct sdram_conf_s sdram_conf[] = {
 };
 
 /*
- * initdram -- 440EPx's DDR controller is a DENALI Core
+ * dram_init -- 440EPx's DDR controller is a DENALI Core
  */
 int initdram_by_rb(int rows, int banks)
 {
@@ -107,7 +107,7 @@ int initdram_by_rb(int rows, int banks)
        return 0;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t size;
        int n;
index 0e7f8b130a34f602cca5bfe98727b957d00e5d6d..36a55195df67e84b59016dea2a90a4d8234932f1 100644 (file)
@@ -30,7 +30,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 void ddr_enable_ecc(unsigned int dram_size);
 
-int initdram(void)
+int dram_init(void)
 {
        volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        u32 msize = 0;
index 085323132c5b41b1e03512167a98be633f91e940..5cc2f73a169f9cd78f21a48ad992787b61ee41d0 100644 (file)
@@ -176,7 +176,7 @@ found:
        popts->cpo_sample = 0x3e;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size;
 
index a27ad7fa842cf2614d2552071e5c913beb424473..60d7f0d48a83d513ee23802d73c9d8ed02ad5b5f 100644 (file)
@@ -108,7 +108,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        puts("\n\n");
 
-       initdram();
+       dram_init();
 
 #ifdef CONFIG_SPL_NAND_BOOT
        nand_boot();
index 86d55bf2ac28dc4f5e5f301f035004e501e8f406..94093f11a88092663cc3e894e3487591c440dbcc 100644 (file)
@@ -67,7 +67,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       initdram();
+       dram_init();
 
 #ifdef CONFIG_SPL_NAND_BOOT
        puts("TPL\n");
index ad93abf9f413dddd3693b5250daac2e323447f66..496d8415ec90bfa1fdc6b2d435cd1e87797abc71 100644 (file)
@@ -260,7 +260,7 @@ found:
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size;
 
index 3bf2e49762902c4cabe2153fb350275d5c587909..d16a69fc981fcc6fa8fe11e88fc5ad7c39d79381 100644 (file)
@@ -164,7 +164,7 @@ void board_mem_sleep_setup(void)
 }
 #endif
 
-int initdram(void)
+int fsl_initdram(void)
 {
        phys_size_t dram_size;
 
index 909fc5627515cdecb3d7d1cd3e3ee07ee1778ba3..d81d8abc9bf37f93bf39c4995329a2bb33136d5d 100644 (file)
@@ -162,7 +162,7 @@ int dram_init(void)
         * before accessing DDR SPD.
         */
        select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
-       return initdram();
+       return fsl_initdram();
 }
 
 #ifdef CONFIG_FSL_ESDHC
index db350e27b897353455f37970988199fa41eeecc9..2643f5bf4aa2e604d193dc25a89fdfd3f4a308ce 100644 (file)
@@ -108,7 +108,7 @@ found:
 #endif
 }
 
-int initdram(void)
+int fsl_initdram(void)
 {
        phys_size_t dram_size;
 
index 538bba53da9997de5ed53c4dd9102232d1f1b8ea..2df63e468d8b976dcb1184e99ba2157752978762 100644 (file)
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <fdt_support.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
@@ -153,7 +154,7 @@ int dram_init(void)
         * before accessing DDR SPD.
         */
        select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
-       initdram();
+       fsl_initdram();
 #if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)
        /* This will break-before-make MMU for DDR */
        update_early_mmu_table();
index 2f133db0a6317bf8f4427f3e1998757b6d1374ca..36d27ecfae79295ae13c58661062df0e3c330da4 100644 (file)
@@ -170,7 +170,7 @@ int fsl_ddr_get_dimm_params(dimm_params_t *pdimm,
 }
 #endif
 
-int initdram(void)
+int fsl_initdram(void)
 {
        phys_size_t dram_size;
 
index 481ed440468e82af6b187743ffe3d9667e532489..d37af34a9c95bcde2bc2b939009dcb317f3c5541 100644 (file)
@@ -92,7 +92,7 @@ found:
        popts->cpo_sample = 0x70;
 }
 
-int initdram(void)
+int fsl_initdram(void)
 {
        phys_size_t dram_size;
 
index 6238852af55a8a7bf17c7ee54adbc8e328a5dc53..69fc15b681501144e5366a125f08ccb7a801e9cf 100644 (file)
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <fdt_support.h>
+#include <fsl_ddr_sdram.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
@@ -149,7 +150,7 @@ int dram_init(void)
         * before accessing DDR SPD.
         */
        select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
-       initdram();
+       fsl_initdram();
 #if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)
        /* This will break-before-make MMU for DDR */
        update_early_mmu_table();
index d1290e27f8d65556a6138b139c5f4aaad8381bec..a16f7bc83a91a0dcf2ae061051d6d5d059423cb4 100644 (file)
@@ -96,7 +96,7 @@ found:
        popts->cpo_sample = 0x70;
 }
 
-int initdram(void)
+int fsl_initdram(void)
 {
        phys_size_t dram_size;
 
index d340c4162dc0577f620ff1929ad7e224d3ee03e9..9d176d385128bd37c68f059fdbb2bf4343cf7947 100644 (file)
@@ -158,7 +158,8 @@ int fsl_ddr_get_dimm_params(dimm_params_t *pdimm,
        return 0;
 }
 #endif
-int initdram(void)
+
+int fsl_initdram(void)
 {
        puts("Initializing DDR....");
 
index 1e9145d6ab28de1abb5c67e43c91d5ef6ad3b52a..22a2676a95ad6b17c92433dbf48e1667f9aa477b 100644 (file)
@@ -155,7 +155,7 @@ found:
        }
 }
 
-int initdram(void)
+int fsl_initdram(void)
 {
 #if defined(CONFIG_SPL) && !defined(CONFIG_SPL_BUILD)
        gd->ram_size = fsl_ddr_sdram_size();
index 029ea61b959049c7589683d0f7bf0411a638b327..7002dfb236f0b6328020046475547cc02b3c11bd 100644 (file)
@@ -158,7 +158,7 @@ found:
        }
 }
 
-int initdram(void)
+int fsl_initdram(void)
 {
 #if defined(CONFIG_SPL) && !defined(CONFIG_SPL_BUILD)
        gd->ram_size = fsl_ddr_sdram_size();
index edf486acc8671ff10574d5a00572835a315e0cab..4b841c6221ce7f6f7cda4da3e6a6d95ea51a301f 100644 (file)
@@ -22,7 +22,7 @@ int checkboard(void)
        return 0;
 };
 
-int initdram(void)
+int dram_init(void)
 {
        sdram_t *sdram = (sdram_t *)(MMAP_SDRAM);
        u32 dramsize, i;
index 2873643582882b488f13019e7a322c3d75ad1490..e4dfb6fda0ca2261966564284307e0435586fe65 100644 (file)
@@ -21,7 +21,7 @@ int checkboard(void)
        return 0;
 };
 
-int initdram(void)
+int dram_init(void)
 {
        u32 dramsize;
 
index 1d82e937862dc555470ab50fe40af823f6af4f55..93403f6748480fdd34e84f55997d9da52e33615d 100644 (file)
@@ -22,7 +22,7 @@ int checkboard(void)
        return 0;
 };
 
-int initdram(void)
+int dram_init(void)
 {
        sdram_t *sdram = (sdram_t *)(MMAP_SDRAM);
        gpio_t *gpio = (gpio_t *)(MMAP_GPIO);
index d3c2acd08985e208b4bb701c489c308e74043704..7c9b599d666a42d35a1fee1d28b1e67915bfbaf5 100644 (file)
@@ -31,7 +31,7 @@ int checkboard (void) {
 };
 
 
-int initdram(void)
+int dram_init(void)
 {
        unsigned long   junk = 0xa5a59696;
 
index 1c100e6d8c969be7addedb7be133e059b282b209..c2cc2d76e43d8abfca3d5f9b5e57e21f6ffc7b81 100644 (file)
@@ -22,7 +22,7 @@ int checkboard(void)
        return 0;
 };
 
-int initdram(void)
+int dram_init(void)
 {
        u32 dramsize = 0;
 
index eae499fa9dbaf90e8569184a843b1db8b814f863..c1ed4311908a5f82e4d225b3b4b8b0f553158acc 100644 (file)
@@ -21,7 +21,7 @@ int checkboard(void)
        return 0;
 };
 
-int initdram(void)
+int dram_init(void)
 {
        /*
         * Check to see if the SDRAM has already been initialized
index bbe06ba9dfc59d1153da109efdbf3a86cc93280a..efff465d0ff995a0b9a7ee8ddae0a31ccb314b34 100644 (file)
@@ -19,7 +19,7 @@ int checkboard (void) {
        return 0;
        };
 
-int initdram(void)
+int dram_init(void)
 {
        sdramctrl_t * sdp = (sdramctrl_t *)(MMAP_SDRAM);
 
index 48ad4a86b9e33563644ee942670bb10c6084f985..5a9831d619c05f7800dcfd6ab0dd4c87f27dd8e8 100644 (file)
@@ -25,7 +25,7 @@ int checkboard(void)
        return 0;
 };
 
-int initdram(void)
+int dram_init(void)
 {
        sdramctrl_t *sdp = (sdramctrl_t *)(MMAP_SDRAM);
        gpio_t *gpio_reg = (gpio_t *)(MMAP_GPIO);
index 7f3c04c37914bfd8882ce67b630dd8ed2c3bb992..eb618b54f48d57959da355a9b24e288da7a8423c 100644 (file)
@@ -16,7 +16,7 @@ int checkboard (void)
        return 0;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        u32 dramsize, i, dramclk;
 
index b0c27b4967037ae3a1d5755f82b58e5478dfbbb1..71cca35e0283c3ecfd53a27c9374404f5da20db4 100644 (file)
@@ -22,7 +22,7 @@ int checkboard(void)
        return 0;
 };
 
-int initdram(void)
+int dram_init(void)
 {
        sdram_t *sdram = (sdram_t *)(MMAP_SDRAM);
        u32 dramsize, i;
index 5609a7b3766f9001d7b7e8d5929c3280672d60a1..4e0b4e4bd8152b47506066d1131671c6ae31ebd8 100644 (file)
@@ -22,7 +22,7 @@ int checkboard(void)
        return 0;
 };
 
-int initdram(void)
+int dram_init(void)
 {
        sdram_t *sdram = (sdram_t *)(MMAP_SDRAM);
        u32 dramsize, i;
index 48a262c12ffc38eceb7178e7ab2a8e9dec5e8f50..f2ed298f0fd6f7e9c8980338adfe40f29c5f4cd9 100644 (file)
@@ -22,7 +22,7 @@ int checkboard(void)
        return 0;
 };
 
-int initdram(void)
+int dram_init(void)
 {
        sdram_t *sdram = (sdram_t *)(MMAP_SDRAM);
        u32 dramsize, i;
index 3f1100c3557bd938d5dbbde98402aa30322fa382..433539486e39cb8a6bb9ab0505866643e1b6abf2 100644 (file)
@@ -25,7 +25,7 @@ int checkboard(void)
        return 0;
 };
 
-int initdram(void)
+int dram_init(void)
 {
        u32 dramsize;
 
index 653a11352cca5d554957e03eada05a0b85d90283..050624bf92a002e5e1bbeb6802a212bc2b30ec8d 100644 (file)
@@ -26,7 +26,7 @@ int checkboard(void)
        return 0;
 };
 
-int initdram(void)
+int dram_init(void)
 {
        u32 dramsize;
 #ifdef CONFIG_CF_SBF
index b9850c1a2a28354226602f5cce7d5f02e892e768..d6b0650b99add8e3ff88a6f3c6cdf4e3c251e405 100644 (file)
@@ -22,7 +22,7 @@ int checkboard(void)
        return 0;
 };
 
-int initdram(void)
+int dram_init(void)
 {
        u32 dramsize;
 #ifdef CONFIG_CF_SBF
index fc674522f64641c0c5d12f7906b50404aa5692db..d28f43da04349259a2bdd70dbdfed7acaf5674e9 100644 (file)
@@ -23,7 +23,7 @@ int checkboard(void)
        return 0;
 };
 
-int initdram(void)
+int dram_init(void)
 {
        siu_t *siu = (siu_t *) (MMAP_SIU);
        sdram_t *sdram = (sdram_t *)(MMAP_SDRAM);
index c268ec6a608bfa887b3a5d825230c6e702be2c6e..56060b68b6f44940d7fd9e93fdfa6fb80359b40d 100644 (file)
@@ -23,7 +23,7 @@ int checkboard(void)
        return 0;
 };
 
-int initdram(void)
+int dram_init(void)
 {
        siu_t *siu = (siu_t *) (MMAP_SIU);
        sdram_t *sdram = (sdram_t *)(MMAP_SDRAM);
index a0e5d91c8fd45411624b647ee23333d043655dce..f87579f19372fa946d27438301397d86b64d6d11 100644 (file)
@@ -95,7 +95,7 @@ int is_micron(void){
        return(ismicron);
 }
 
-int initdram(void)
+int dram_init(void)
 {
        u32 msize = 0;
        /*
index aac56c3983c3b4d381e4041a9a00e2dc6c1e51a9..81e155a40142214c650fd602d18d58c8231d38de 100644 (file)
@@ -65,7 +65,7 @@ static long fixed_sdram(void)
        return get_ram_size(CONFIG_SYS_DDR_SDRAM_BASE, msize);
 }
 
-int initdram(void)
+int dram_init(void)
 {
        immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        u32 msize;
index e3a5941f20feac7df0dbbc0a606d418d72b1942f..89743783262401f7695be92e21b4f55d71dddb51 100644 (file)
@@ -134,7 +134,7 @@ void board_init_f(ulong bootflag)
                     CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
        puts("NAND boot... ");
        timer_init();
-       initdram();
+       dram_init();
        relocate_code(CONFIG_SYS_NAND_U_BOOT_RELOC_SP, (gd_t *)gd,
                      CONFIG_SYS_NAND_U_BOOT_RELOC);
 }
index 4e5dfe6f15728fd21bc8a3f54b126dbcf5956546..a4128cbd11255bb1be83bd6e5c248d11f0d063e0 100644 (file)
@@ -97,7 +97,7 @@ static long fixed_sdram(void)
        return msize;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        volatile immap_t *im = (volatile immap_t *)CONFIG_SYS_IMMR;
        volatile fsl_lbc_t *lbc = &im->im_lbc;
index 7779b6daed258a52c962b181f0f4f554d1225d81..22f1565b4c264cb1fb5762b246122f6beca1973c 100644 (file)
@@ -222,7 +222,7 @@ void board_init_f(ulong bootflag)
                     CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
        puts("NAND boot... ");
        timer_init();
-       initdram();
+       dram_init();
        relocate_code(CONFIG_SYS_NAND_U_BOOT_RELOC + 0x10000, (gd_t *)gd,
                      CONFIG_SYS_NAND_U_BOOT_RELOC);
 }
index 947ffabbb5b79b8ddc60498e1755750ec606613f..b69c86bb812c38621f730fdf5ad1bd5ea0efc293 100644 (file)
@@ -92,7 +92,7 @@ static long fixed_sdram(void)
 }
 #endif /* CONFIG_SYS_RAMBOOT */
 
-int initdram(void)
+int dram_init(void)
 {
        volatile immap_t *im = (volatile immap_t *)CONFIG_SYS_IMMR;
        u32 msize;
index e7d8b99738c3ebf0a8dc00f08c762705c6d6e438..f30a1510ee406c1537d2368e4fbff30089777f08 100644 (file)
@@ -70,7 +70,7 @@ const qe_iop_conf_t qe_iop_conf_tab[] = {
 
 int fixed_sdram(void);
 
-int initdram(void)
+int dram_init(void)
 {
        volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
        u32 msize = 0;
index 907ad09dc8e09024b5c9df72062dddc3f13b3a33..b49e03e4f973f95c8a6e49e87ba04d9f77b9ddb6 100644 (file)
@@ -90,7 +90,7 @@ int board_early_init_r(void)
 
 int fixed_sdram(void);
 
-int initdram(void)
+int dram_init(void)
 {
        volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
        u32 msize = 0;
index 595bce16d10b958745f29661cf799011ade38a18..5f502e2a65137359ce13e15591523d8ede5631e7 100644 (file)
@@ -48,7 +48,7 @@ int board_early_init_f (void)
 
 #define ns2clk(ns) (ns / (1000000000 / CONFIG_8349_CLKIN) + 1)
 
-int initdram(void)
+int dram_init(void)
 {
        volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        phys_size_t msize = 0;
index 27f0ccd9a6c05fa5ad5fa1ce23659824d2372a5a..895e9ffda6d7fb7050c26399ec528455169ab5bf 100644 (file)
@@ -118,7 +118,7 @@ volatile static struct pci_controller hose[] = {
 };
 #endif                         /* CONFIG_PCI */
 
-int initdram(void)
+int dram_init(void)
 {
        volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
        u32 msize = 0;
index a3af246854899f4f8996e55aaa0f06984155aeaf..233049227fc2f5e3f0c59743af54bd23acdbb834 100644 (file)
@@ -218,7 +218,7 @@ extern void ddr_enable_ecc(unsigned int dram_size);
 #endif
 int fixed_sdram(void);
 
-int initdram(void)
+int dram_init(void)
 {
        volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
        u32 msize = 0;
index 2f5431ee21d7b097fb6d7c12ab1deeed5a5da3c5..319f0479e2c246e454f5c260463ec20916569c19 100644 (file)
@@ -62,7 +62,7 @@ void ddr_enable_ecc(unsigned int dram_size);
 #endif
 int fixed_sdram(void);
 
-int initdram(void)
+int dram_init(void)
 {
        immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
        u32 msize = 0;
index 0422208133a0542461195bb5e38b5ba78e4194d3..d97562c849cec07e83bc2629079633437de3da44 100644 (file)
@@ -118,7 +118,7 @@ int checkboard(void)
 }
 
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size = 0;
 
index 07cb08b6b8cfbd477a83634c11295a53dd0dda6d..2604a51e91753ee4a8bd8dac16d39b25a6097ebe 100644 (file)
@@ -39,7 +39,7 @@ int checkboard(void)
        return 0;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size = 0;
 
index 5814b9d3805045d36f31031eeef7f233dd4001d0..bc0c0d0d1629577bbe2cb763d54798cb77bfdb71 100644 (file)
@@ -1,17 +1,19 @@
 How to use and build U-Boot on mx6sabresd:
 ----------------------------------
 
-Currently there are three methods for booting mx6sabresd boards:
+Currently there are four methods for booting mx6sabresd boards:
 
-1. Booting via Normal U-Boot (u-boot.imx)
+1. Booting from SD card via normal U-Boot (u-boot.imx)
 
-2. Booting via SPL (SPL and u-boot.img)
+2. Booting from eMMC via normal U-Boot
 
-3. Booting via Falcon mode (SPL launches the kernel directly)
+3. Booting via SPL (SPL and u-boot.img)
 
+4. Booting via Falcon mode (SPL launches the kernel directly)
 
-1. Booting via Normal U-Boot
-----------------------------
+
+1. Booting from SD card via normal U-Boot
+-----------------------------------------
 
 $ make mx6qsabresd_defconfig (If you want to build for mx6qsabresd)
 
@@ -28,7 +30,44 @@ This will generate the image called u-boot.imx.
 $ sudo dd if=u-boot.imx of=/dev/sdb bs=1K seek=1 && sync
 
 
-2. Booting via SPL
+2. Booting from eMMC via normal U-Boot
+--------------------------------------
+
+$ make mx6qsabresd_defconfig (If you want to build for mx6qsabresd)
+
+or
+
+$ make mx6dlsabresd_defconfig (If you want to build for mx6dlsabresd)
+
+$ make
+
+This will generate the image called u-boot.imx.
+
+- Flash the u-boot.imx binary into the eMMC:
+
+Set SW6 to download mode: 00001100
+
+Plug a usb cable to USB-OTG and load the u-boot image using the imx_usb_loader
+tool (https://github.com/boundarydevices/imx_usb_loader):
+
+$ sudo ./imx_usb u-boot.imx
+
+In U-boot change the eMMC partition config:
+
+=> mmc partconf 2 1 0 0
+
+Mount the eMMC in the host PC:
+
+=> ums 0 mmc 2
+
+Flash the u-boot.imx binary
+
+$ sudo dd if=u-boot.imx of=/dev/sdX bs=1K seek=1 && sync
+
+Set SW6 to eMMC 8-bit boot: 11010110
+
+
+3. Booting via SPL
 ------------------
 
 Other method for building U-Boot on mx6qsabresd and mx6qpsabresd is
@@ -48,7 +87,7 @@ $ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 && sync
 $ sudo dd if=u-boot.img of=/dev/sdbbs=1K seek=69 && sync
 
 
-3. Booting via Falcon mode
+4. Booting via Falcon mode
 --------------------------
 
 $ make mx6sabresd_spl_defconfig
index 96c0e8cfc71c2f9dc7dc229afab270ebd5007b8e..d49543315b92a7e44933952714211bcc25c0c7de 100644 (file)
@@ -47,11 +47,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define SPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \
                      PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST)
 
-#define I2C_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE |              \
-                     PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
-                     PAD_CTL_DSE_40ohm | PAD_CTL_HYS |         \
-                     PAD_CTL_ODE | PAD_CTL_SRE_FAST)
-
 #define OTGID_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE |            \
                        PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_LOW |\
                        PAD_CTL_DSE_80ohm | PAD_CTL_HYS |       \
@@ -155,157 +150,55 @@ static void setup_iomux_fec(void)
        imx_iomux_v3_setup_multiple_pads(fec_pads, ARRAY_SIZE(fec_pads));
 
        /* Power up LAN8720 PHY */
+       gpio_request(ETH_PHY_POWER, "eth_pwr");
        gpio_direction_output(ETH_PHY_POWER , 1);
        udelay(15000);
 }
 
-#define USDHC1_CD_GPIO IMX_GPIO_NR(4, 7)
-#define USDHC2_CD_GPIO IMX_GPIO_NR(5, 0)
-#define USDHC3_CD_GPIO IMX_GPIO_NR(3, 22)
-
-static struct fsl_esdhc_cfg usdhc_cfg[3] = {
-       {USDHC1_BASE_ADDR},
-       {USDHC2_BASE_ADDR, 0, 4},
-       {USDHC3_BASE_ADDR, 0, 4},
-};
-
 int board_mmc_get_env_dev(int devno)
 {
        return devno;
 }
 
-int board_mmc_getcd(struct mmc *mmc)
+#ifdef CONFIG_DM_PMIC_PFUZE100
+int power_init_board(void)
 {
-       struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
-       int ret = 0;
+       struct udevice *dev;
+       int ret;
+       u32 dev_id, rev_id, i;
+       u32 switch_num = 6;
+       u32 offset = PFUZE100_SW1CMODE;
 
-       switch (cfg->esdhc_base) {
-       case USDHC1_BASE_ADDR:
-               ret = !gpio_get_value(USDHC1_CD_GPIO);
-               break;
-       case USDHC2_BASE_ADDR:
-               ret = !gpio_get_value(USDHC2_CD_GPIO);
-               break;
-       case USDHC3_BASE_ADDR:
-               ret = !gpio_get_value(USDHC3_CD_GPIO);
-               break;
-       }
-
-       return ret;
-}
+       ret = pmic_get("pfuze100", &dev);
+       if (ret == -ENODEV)
+               return 0;
 
-int board_mmc_init(bd_t *bis)
-{
-#ifndef CONFIG_SPL_BUILD
-       int i, ret;
-
-       /*
-        * According to the board_mmc_init() the following map is done:
-        * (U-Boot device node)    (Physical Port)
-        * mmc0                    USDHC1
-        * mmc1                    USDHC2
-        * mmc2                    USDHC3
-        */
-       for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) {
-               switch (i) {
-               case 0:
-                       imx_iomux_v3_setup_multiple_pads(
-                               usdhc1_pads, ARRAY_SIZE(usdhc1_pads));
-                       gpio_direction_input(USDHC1_CD_GPIO);
-                       usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
-                       break;
-               case 1:
-                       imx_iomux_v3_setup_multiple_pads(
-                               usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
-                       gpio_direction_input(USDHC2_CD_GPIO);
-                       usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
-                       break;
-               case 2:
-                       imx_iomux_v3_setup_multiple_pads(
-                               usdhc3_pads, ARRAY_SIZE(usdhc3_pads));
-                       gpio_direction_input(USDHC3_CD_GPIO);
-                       usdhc_cfg[2].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
-                       break;
-               default:
-                       printf("Warning: you configured more USDHC controllers"
-                               "(%d) than supported by the board\n", i + 1);
-                       return -EINVAL;
-               }
-
-               ret = fsl_esdhc_initialize(bis, &usdhc_cfg[i]);
-               if (ret) {
-                       printf("Warning: failed to initialize "
-                               "mmc dev %d\n", i);
-                       return ret;
-               }
-       }
+       if (ret != 0)
+               return ret;
 
-       return 0;
-#else
-       struct src *src_regs = (struct src *)SRC_BASE_ADDR;
-       u32 val;
-       u32 port;
+       dev_id = pmic_reg_read(dev, PFUZE100_DEVICEID);
+       rev_id = pmic_reg_read(dev, PFUZE100_REVID);
+       printf("PMIC: PFUZE100! DEV_ID=0x%x REV_ID=0x%x\n", dev_id, rev_id);
 
-       val = readl(&src_regs->sbmr1);
+       /* set SW1AB staby volatage 0.975V */
+       pmic_clrsetbits(dev, PFUZE100_SW1ABSTBY, 0x3f, 0x1b);
 
-       /* Boot from USDHC */
-       port = (val >> 11) & 0x3;
-       switch (port) {
-       case 0:
-               imx_iomux_v3_setup_multiple_pads(usdhc1_pads,
-                                                ARRAY_SIZE(usdhc1_pads));
-               gpio_direction_input(USDHC1_CD_GPIO);
-               usdhc_cfg[0].esdhc_base = USDHC1_BASE_ADDR;
-               usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
-               break;
-       case 1:
-               imx_iomux_v3_setup_multiple_pads(usdhc2_pads,
-                                                ARRAY_SIZE(usdhc2_pads));
-               gpio_direction_input(USDHC2_CD_GPIO);
-               usdhc_cfg[0].esdhc_base = USDHC2_BASE_ADDR;
-               usdhc_cfg[0].max_bus_width = 4;
-               usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
-               break;
-       case 2:
-               imx_iomux_v3_setup_multiple_pads(usdhc3_pads,
-                                                ARRAY_SIZE(usdhc3_pads));
-               gpio_direction_input(USDHC3_CD_GPIO);
-               usdhc_cfg[0].esdhc_base = USDHC3_BASE_ADDR;
-               usdhc_cfg[0].max_bus_width = 4;
-               usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
-               break;
-       }
+       /* set SW1AB/VDDARM step ramp up time from 16us to 4us/25mV */
+       pmic_clrsetbits(dev, PFUZE100_SW1ABCONF, 0xc0, 0x40);
 
-       gd->arch.sdhc_clk = usdhc_cfg[0].sdhc_clk;
-       return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
-#endif
-}
+       /* set SW1C staby volatage 0.975V */
+       pmic_clrsetbits(dev, PFUZE100_SW1CSTBY, 0x3f, 0x1b);
 
-#ifdef CONFIG_SYS_I2C_MXC
-#define PC     MUX_PAD_CTRL(I2C_PAD_CTRL)
-/* I2C1 for PMIC */
-struct i2c_pads_info i2c_pad_info1 = {
-       .sda = {
-               .i2c_mode = MX6_PAD_I2C1_SDA__I2C1_SDA | PC,
-               .gpio_mode = MX6_PAD_I2C1_SDA__GPIO_3_13 | PC,
-               .gp = IMX_GPIO_NR(3, 13),
-       },
-       .scl = {
-               .i2c_mode = MX6_PAD_I2C1_SCL__I2C1_SCL | PC,
-               .gpio_mode = MX6_PAD_I2C1_SCL__GPIO_3_12 | PC,
-               .gp = IMX_GPIO_NR(3, 12),
-       },
-};
+       /* set SW1C/VDDSOC step ramp up time to from 16us to 4us/25mV */
+       pmic_clrsetbits(dev, PFUZE100_SW1CCONF, 0xc0, 0x40);
 
-int power_init_board(void)
-{
-       struct pmic *p;
+       /* Init mode to APS_PFM */
+       pmic_reg_write(dev, PFUZE100_SW1ABMODE, APS_PFM);
 
-       p = pfuze_common_init(I2C_PMIC);
-       if (!p)
-               return -ENODEV;
+       for (i = 0; i < switch_num - 1; i++)
+               pmic_reg_write(dev, offset + i * SWITCH_SIZE, APS_PFM);
 
-       return pfuze_mode_init(p, APS_PFM);
+       return 0;
 }
 #endif
 
@@ -374,9 +267,7 @@ int board_ehci_hcd_init(int port)
 int board_early_init_f(void)
 {
        setup_iomux_uart();
-#ifdef CONFIG_MXC_SPI
-       setup_spi();
-#endif
+
        return 0;
 }
 
@@ -385,8 +276,9 @@ int board_init(void)
        /* address of boot parameters */
        gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
-#ifdef CONFIG_SYS_I2C_MXC
-       setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
+#ifdef CONFIG_MXC_SPI
+       gpio_request(IMX_GPIO_NR(4, 11), "spi_cs");
+       setup_spi();
 #endif
 
 #ifdef CONFIG_FEC_MXC
@@ -411,6 +303,76 @@ int checkboard(void)
 #include <spl.h>
 #include <libfdt.h>
 
+#define USDHC1_CD_GPIO IMX_GPIO_NR(4, 7)
+#define USDHC2_CD_GPIO IMX_GPIO_NR(5, 0)
+#define USDHC3_CD_GPIO IMX_GPIO_NR(3, 22)
+
+static struct fsl_esdhc_cfg usdhc_cfg[3] = {
+       {USDHC1_BASE_ADDR},
+       {USDHC2_BASE_ADDR, 0, 4},
+       {USDHC3_BASE_ADDR, 0, 4},
+};
+
+int board_mmc_getcd(struct mmc *mmc)
+{
+       struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
+       int ret = 0;
+
+       switch (cfg->esdhc_base) {
+       case USDHC1_BASE_ADDR:
+               ret = !gpio_get_value(USDHC1_CD_GPIO);
+               break;
+       case USDHC2_BASE_ADDR:
+               ret = !gpio_get_value(USDHC2_CD_GPIO);
+               break;
+       case USDHC3_BASE_ADDR:
+               ret = !gpio_get_value(USDHC3_CD_GPIO);
+               break;
+       }
+
+       return ret;
+}
+
+int board_mmc_init(bd_t *bis)
+{
+       struct src *src_regs = (struct src *)SRC_BASE_ADDR;
+       u32 val;
+       u32 port;
+
+       val = readl(&src_regs->sbmr1);
+
+       /* Boot from USDHC */
+       port = (val >> 11) & 0x3;
+       switch (port) {
+       case 0:
+               imx_iomux_v3_setup_multiple_pads(usdhc1_pads,
+                                                ARRAY_SIZE(usdhc1_pads));
+               gpio_direction_input(USDHC1_CD_GPIO);
+               usdhc_cfg[0].esdhc_base = USDHC1_BASE_ADDR;
+               usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
+               break;
+       case 1:
+               imx_iomux_v3_setup_multiple_pads(usdhc2_pads,
+                                                ARRAY_SIZE(usdhc2_pads));
+               gpio_direction_input(USDHC2_CD_GPIO);
+               usdhc_cfg[0].esdhc_base = USDHC2_BASE_ADDR;
+               usdhc_cfg[0].max_bus_width = 4;
+               usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
+               break;
+       case 2:
+               imx_iomux_v3_setup_multiple_pads(usdhc3_pads,
+                                                ARRAY_SIZE(usdhc3_pads));
+               gpio_direction_input(USDHC3_CD_GPIO);
+               usdhc_cfg[0].esdhc_base = USDHC3_BASE_ADDR;
+               usdhc_cfg[0].max_bus_width = 4;
+               usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
+               break;
+       }
+
+       gd->arch.sdhc_clk = usdhc_cfg[0].sdhc_clk;
+       return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
+}
+
 const struct mx6sl_iomux_ddr_regs mx6_ddr_ioregs = {
        .dram_sdqs0 = 0x00003030,
        .dram_sdqs1 = 0x00003030,
index 0565367937d0d8505377990540472b287efbef1a..2cebc2c00218f41ef5e7a91d954abf3467d79d44 100644 (file)
@@ -94,7 +94,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       initdram();
+       dram_init();
 #ifdef CONFIG_SPL_NAND_BOOT
        puts("\nTertiary program loader running in sram...");
 #else
index 1f490dc94378d8ef9ff19ee9ceaa588f713b7925..a117dc3a2c6eda0c048921a65e7ee7794b15e166 100644 (file)
@@ -111,7 +111,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
        i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
 #endif
 
-       initdram();
+       dram_init();
 #ifdef CONFIG_SPL_NAND_BOOT
        puts("Tertiary program loader running in sram...");
 #else
index 67637390be6558c8e65a362495d2ed904aa04cdf..1cf3497aa688a62ba85fb0df3bbf2c0424a4419e 100644 (file)
@@ -108,7 +108,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
        i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
 #endif
 
-       initdram();
+       dram_init();
 #ifdef CONFIG_SPL_NAND_BOOT
        puts("Tertiary program loader running in sram...");
 #else
index 3df8d217256bb7aa27c834e9efadb39ebf521057..1ab98fc089e0ab664db45a05e3256d353f1e20a5 100644 (file)
@@ -118,7 +118,7 @@ found:
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size = 0;
 
index 93003c25d866c611944658b3a0c4ef61ca019d22..d822d3f806d020fb90b155f096a5a8a3b987860e 100644 (file)
@@ -169,7 +169,7 @@ void board_mem_sleep_setup(void)
 }
 #endif
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size;
 
index c847b01e7e0b6535839491e1f334b9c7b3baf9ba..b987ecea1d23e0552b81f279c2fa1b84495c2c7a 100644 (file)
@@ -142,7 +142,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       initdram();
+       dram_init();
 
 #ifdef CONFIG_SPL_MMC_BOOT
        mmc_boot();
index 773aa77781d66209297a2dba9143953066df3612..49460a02d17f6c763c83bec5cdd949ed9a57a23c 100644 (file)
@@ -229,7 +229,7 @@ void board_mem_sleep_setup(void)
 }
 #endif
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size;
 
index 5be71628afd5aa864accb2b587b4d616800f58bc..dc6d9eeef626a785f23c14ab23fafdb5acbfcd4c 100644 (file)
@@ -129,7 +129,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       initdram();
+       dram_init();
 
 #ifdef CONFIG_SPL_MMC_BOOT
        mmc_boot();
index d23787d43a22e8b0f74c1c665d8c9aa1af43919b..8f7909dc68b3280645bd48f0eeca091be5aa35af 100644 (file)
@@ -117,7 +117,7 @@ void board_mem_sleep_setup(void)
 }
 #endif
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size;
 
index b99ab953977b634e1ddd57a16a7dce15126f2474..4e55844abe1b7a90b8d7c60423155b88d6036173 100644 (file)
@@ -120,7 +120,7 @@ void board_mem_sleep_setup(void)
 }
 #endif
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size;
 
index 899691a7794a5f666da73bc639d610a7bf2be7a9..2e43307b2d471c09c30310e31f5b3dcdc26397b7 100644 (file)
@@ -125,7 +125,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        puts("\n\n");
 
-       initdram();
+       dram_init();
 
 #ifdef CONFIG_SPL_MMC_BOOT
        mmc_boot();
index adc109042bdfc7b5b59e566da2614864295e27a2..ba6504970996a3ab13b8888cf70be0c00caff5b9 100644 (file)
@@ -104,7 +104,7 @@ found:
        popts->cpo_sample = 0x64;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size;
 
index 3e713dc2c365eb1e6c2c9700f3dabf15bac5e716..d7d716b690a23c833ab07522f2d6480015a038b3 100644 (file)
@@ -128,7 +128,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       initdram();
+       dram_init();
 
 #ifdef CONFIG_SPL_MMC_BOOT
        mmc_boot();
index b4ad615846a65697f2642ef61d3986f883c326d2..50dc69a443160c0aba05faef0dcaf650045dc608 100644 (file)
@@ -97,7 +97,7 @@ found:
        popts->cpo_sample = 0x54;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size;
 
index a5f940c6f6356a4d60820b51f91fa31cf597229e..b43140148b18c554cdef10e39fe05095acbd79d2 100644 (file)
@@ -98,7 +98,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       initdram();
+       dram_init();
 
 #ifdef CONFIG_SPL_MMC_BOOT
        mmc_boot();
index 84ff792225450b757ee1360f79a5d3c9b386da90..740897015e04c7a76f91fa57cf668c2115733caa 100644 (file)
@@ -112,7 +112,7 @@ found:
        popts->cpo_sample = 0x63;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size;
 
index 05feedecc25aba1ef0cb6c63939c9bc575e25e08..9ecdaedda333844a9fa01483260cf4ac025bc8cd 100644 (file)
@@ -133,7 +133,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       initdram();
+       dram_init();
 
 #ifdef CONFIG_SPL_MMC_BOOT
        mmc_boot();
index d03baa3f45d2591a34d9ebe1e7e28c1c6ecaa2cc..8415527ec2e1bf34311c7045ffb5196cd29dab8e 100644 (file)
@@ -105,7 +105,7 @@ found:
        popts->cpo_sample = 0x64;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size;
 
index e96f3d38c56e168aafbf556a2306cd23ce62a96a..5feab1cfcd60951780962337ca0edb5cd641ec91 100644 (file)
@@ -91,7 +91,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       initdram();
+       dram_init();
 
        mmc_boot();
 }
index 4ceb48b09d825caa377616c7b3422f9c047b4c03..f1868550c785ef7362929ecf9b2af1cac381882e 100644 (file)
@@ -10,7 +10,7 @@
 #include <config.h>
 #include <asm/leon.h>
 
-int initdram(void)
+int dram_init(void)
 {
        /* Does not set gd->ram_size here */
 
index 12d8c1025c3181b5903315bafe001cc4839885ea..a73d89db2f0f6bcd2e2113522fe007a2dac4bf9d 100644 (file)
@@ -10,7 +10,7 @@
 #include <config.h>
 #include <asm/leon.h>
 
-int initdram(void)
+int dram_init(void)
 {
        /* Does not set gd->ram_size here */
 
index 02beb5c926ebe6e8dce5c426e46bdd8711bec829..d86047a7856db061a27772cfae6d748c3740e988 100644 (file)
@@ -9,7 +9,7 @@
 #include <config.h>
 #include <asm/leon.h>
 
-int initdram(void)
+int dram_init(void)
 {
        /* Does not set gd->ram_size here */
 
index aa9ba50877c9b6c62eea5da4c9aeb78e9fe50f20..99262b08133cfc4d046c5539fb66bfbe8621c8c0 100644 (file)
@@ -10,7 +10,7 @@
 #include <common.h>
 #include <asm/leon.h>
 
-int initdram(void)
+int dram_init(void)
 {
        /* Does not set gd->ram_size here */
 
index 384db3d84bcf07daf14ecce57e136c046299ef3f..c6c4bb42701fc6c35ae6d4ed628f7a1d53eee8a7 100644 (file)
@@ -10,7 +10,7 @@
 #include <common.h>
 #include <asm/leon.h>
 
-int initdram(void)
+int dram_init(void)
 {
        /* Does not set gd->ram_size here */
 
index b44fb4dc4b0e6d1bd572dee8d8aa9c886871f95e..265ddac1c054b9c844e543a356aadb6685b3cd2b 100644 (file)
@@ -3,4 +3,6 @@ M:      Tim Harvey <tharvey@gateworks.com>
 S:     Maintained
 F:     board/gateworks/gw_ventana/
 F:     include/configs/gw_ventana.h
-F:     configs/gwventana_defconfig
+F:     configs/gwventana_nand_defconfig
+F:     configs/gwventana_emmc_defconfig
+F:     configs/gwventana_gw5904_defconfig
index 3dc5f88102f5f7e1daf0af5673556ae10a12f0c5..56a7b3e7fd482b6a65f865a0ad8120287ee79169 100644 (file)
@@ -38,6 +38,44 @@ void setup_iomux_uart(void)
 }
 
 /* MMC */
+static iomux_v3_cfg_t const gw5904_emmc_pads[] = {
+       IOMUX_PADS(PAD_SD3_DAT0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_DAT1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_DAT2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_DAT3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_DAT4__SD3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_DAT5__SD3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_DAT6__SD3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_DAT7__SD3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_CLK__SD3_CLK    | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_CMD__SD3_CMD    | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_RST__SD3_RESET  | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+};
+/* 4-bit microSD on SD2 */
+static iomux_v3_cfg_t const gw5904_mmc_pads[] = {
+       IOMUX_PADS(PAD_SD2_CLK__SD2_CLK    | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD2_CMD__SD2_CMD    | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD2_DAT0__SD2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD2_DAT1__SD2_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD2_DAT2__SD2_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD2_DAT3__SD2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       /* CD */
+       IOMUX_PADS(PAD_NANDF_CS0__GPIO6_IO11 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+};
+/* 8-bit eMMC on SD2/NAND */
+static iomux_v3_cfg_t const gw560x_emmc_sd2_pads[] = {
+       IOMUX_PADS(PAD_SD2_CLK__SD2_CLK    | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD2_CMD__SD2_CMD    | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD2_DAT0__SD2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD2_DAT1__SD2_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD2_DAT2__SD2_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD2_DAT3__SD2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_NANDF_D4__SD2_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_NANDF_D5__SD2_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_NANDF_D6__SD2_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_NANDF_D7__SD2_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+};
+
 static iomux_v3_cfg_t const usdhc3_pads[] = {
        IOMUX_PADS(PAD_SD3_CLK__SD3_CLK    | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
        IOMUX_PADS(PAD_SD3_CMD__SD3_CMD    | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
@@ -352,6 +390,107 @@ static iomux_v3_cfg_t const gw553x_gpio_pads[] = {
        IOMUX_PADS(PAD_GPIO_17__GPIO7_IO12 | DIO_PAD_CFG),
 };
 
+static iomux_v3_cfg_t const gw560x_gpio_pads[] = {
+       /* RS232_EN# */
+       IOMUX_PADS(PAD_SD4_DAT3__GPIO2_IO11 | DIO_PAD_CFG),
+       /* CAN_STBY */
+       IOMUX_PADS(PAD_GPIO_2__GPIO1_IO02 | DIO_PAD_CFG),
+       /* USB_HUBRST# */
+       IOMUX_PADS(PAD_GPIO_9__GPIO1_IO09 | DIO_PAD_CFG),
+       /* PANLEDG# */
+       IOMUX_PADS(PAD_KEY_COL0__GPIO4_IO06 | DIO_PAD_CFG),
+       /* PANLEDR# */
+       IOMUX_PADS(PAD_KEY_ROW0__GPIO4_IO07 | DIO_PAD_CFG),
+       /* MX6_LOCLED# */
+       IOMUX_PADS(PAD_KEY_ROW4__GPIO4_IO15 | DIO_PAD_CFG),
+       /* IOEXP_PWREN# */
+       IOMUX_PADS(PAD_EIM_A19__GPIO2_IO19 | DIO_PAD_CFG),
+       /* IOEXP_IRQ# */
+       IOMUX_PADS(PAD_EIM_A20__GPIO2_IO18 | MUX_PAD_CTRL(IRQ_PAD_CTRL)),
+       /* DIOI2C_DIS# */
+       IOMUX_PADS(PAD_GPIO_19__GPIO4_IO05 | DIO_PAD_CFG),
+       /* VID_EN */
+       IOMUX_PADS(PAD_EIM_D31__GPIO3_IO31 | DIO_PAD_CFG),
+       /* PCI_RST# */
+       IOMUX_PADS(PAD_DISP0_DAT10__GPIO4_IO31 | DIO_PAD_CFG),
+       /* RS485_EN */
+       IOMUX_PADS(PAD_SD3_DAT4__GPIO7_IO01 | DIO_PAD_CFG),
+       /* PCIESKT_WDIS# */
+       IOMUX_PADS(PAD_GPIO_17__GPIO7_IO12 | DIO_PAD_CFG),
+       /* USBH2_PEN (OTG) */
+       IOMUX_PADS(PAD_KEY_ROW4__GPIO4_IO15 | DIO_PAD_CFG),
+       /* 12V0_PWR_EN */
+       IOMUX_PADS(PAD_DISP0_DAT5__GPIO4_IO26 | DIO_PAD_CFG),
+};
+
+static iomux_v3_cfg_t const gw5903_gpio_pads[] = {
+       /* BKLT_12VEN */
+       IOMUX_PADS(PAD_GPIO_7__GPIO1_IO07 | DIO_PAD_CFG),
+       /* EMMY_PDN# */
+       IOMUX_PADS(PAD_NANDF_D2__GPIO2_IO02 | DIO_PAD_CFG),
+       /* EMMY_CFG1# */
+       IOMUX_PADS(PAD_NANDF_D3__GPIO2_IO03 | DIO_PAD_CFG),
+       /* EMMY_CFG1# */
+       IOMUX_PADS(PAD_NANDF_D4__GPIO2_IO04 | DIO_PAD_CFG),
+       /* USBH1_PEN (EHCI) */
+       IOMUX_PADS(PAD_EIM_D31__GPIO3_IO31 | DIO_PAD_CFG),
+       /* USBH2_PEN (OTG) */
+       IOMUX_PADS(PAD_KEY_ROW4__GPIO4_IO15 | DIO_PAD_CFG),
+       /* USBDPC_PEN */
+       IOMUX_PADS(PAD_KEY_ROW0__GPIO4_IO07 | DIO_PAD_CFG),
+       /* TOUCH_RST */
+       IOMUX_PADS(PAD_KEY_COL1__GPIO4_IO08 | DIO_PAD_CFG),
+       /* AUDIO_RST# */
+       IOMUX_PADS(PAD_DISP0_DAT23__GPIO5_IO17 | DIO_PAD_CFG),
+       /* UART1_TEN# */
+       IOMUX_PADS(PAD_CSI0_DAT12__GPIO5_IO30 | DIO_PAD_CFG),
+       /* MX6_LOCLED# */
+       IOMUX_PADS(PAD_NANDF_CS1__GPIO6_IO14 | DIO_PAD_CFG),
+       /* LVDS_BKLEN # */
+       IOMUX_PADS(PAD_GPIO_17__GPIO7_IO12 | DIO_PAD_CFG),
+       /* RGMII_PDWN# */
+       IOMUX_PADS(PAD_ENET_CRS_DV__GPIO1_IO25 | DIO_PAD_CFG),
+       /* TOUCH_IRQ# */
+       IOMUX_PADS(PAD_KEY_COL0__GPIO4_IO06 | DIO_PAD_CFG),
+       /* TOUCH_RST# */
+       IOMUX_PADS(PAD_KEY_COL1__GPIO4_IO08 | DIO_PAD_CFG),
+};
+
+static iomux_v3_cfg_t const gw5904_gpio_pads[] = {
+       /* USB_HUBRST# */
+       IOMUX_PADS(PAD_GPIO_9__GPIO1_IO09 | DIO_PAD_CFG),
+       /* PANLEDG# */
+       IOMUX_PADS(PAD_KEY_COL0__GPIO4_IO06 | DIO_PAD_CFG),
+       /* PANLEDR# */
+       IOMUX_PADS(PAD_KEY_ROW0__GPIO4_IO07 | DIO_PAD_CFG),
+       /* MX6_LOCLED# */
+       IOMUX_PADS(PAD_KEY_ROW4__GPIO4_IO15 | DIO_PAD_CFG),
+       /* IOEXP_PWREN# */
+       IOMUX_PADS(PAD_EIM_A19__GPIO2_IO19 | DIO_PAD_CFG),
+       /* IOEXP_IRQ# */
+       IOMUX_PADS(PAD_EIM_A20__GPIO2_IO18 | MUX_PAD_CTRL(IRQ_PAD_CTRL)),
+       /* DIOI2C_DIS# */
+       IOMUX_PADS(PAD_GPIO_19__GPIO4_IO05 | DIO_PAD_CFG),
+       /* UART_RS485 */
+       IOMUX_PADS(PAD_DISP0_DAT2__GPIO4_IO23 | DIO_PAD_CFG),
+       /* UART_HALF */
+       IOMUX_PADS(PAD_DISP0_DAT3__GPIO4_IO24 | DIO_PAD_CFG),
+       /* SKT1_WDIS# */
+       IOMUX_PADS(PAD_DISP0_DAT17__GPIO5_IO11 | DIO_PAD_CFG),
+       /* SKT1_RST# */
+       IOMUX_PADS(PAD_DISP0_DAT18__GPIO5_IO12 | DIO_PAD_CFG),
+       /* SKT2_WDIS# */
+       IOMUX_PADS(PAD_DISP0_DAT19__GPIO5_IO13 | DIO_PAD_CFG),
+       /* SKT2_RST# */
+       IOMUX_PADS(PAD_GPIO_0__GPIO1_IO00 | DIO_PAD_CFG),
+       /* M2_OFF# */
+       IOMUX_PADS(PAD_SD2_DAT0__GPIO1_IO15 | DIO_PAD_CFG),
+       /* M2_WDIS# */
+       IOMUX_PADS(PAD_SD2_DAT1__GPIO1_IO14 | DIO_PAD_CFG),
+       /* M2_RST# */
+       IOMUX_PADS(PAD_SD2_DAT2__GPIO1_IO13 | DIO_PAD_CFG),
+};
+
 /* Digital I/O */
 struct dio_cfg gw51xx_dio[] = {
        {
@@ -566,6 +705,111 @@ struct dio_cfg gw553x_dio[] = {
        },
 };
 
+struct dio_cfg gw560x_dio[] = {
+       {
+               { IOMUX_PADS(PAD_SD1_DAT0__GPIO1_IO16) },
+               IMX_GPIO_NR(1, 16),
+               { 0, 0 },
+               0
+       },
+       {
+               { IOMUX_PADS(PAD_SD1_DAT2__GPIO1_IO19) },
+               IMX_GPIO_NR(1, 19),
+               { IOMUX_PADS(PAD_SD1_DAT2__PWM2_OUT) },
+               2
+       },
+       {
+               { IOMUX_PADS(PAD_SD1_DAT1__GPIO1_IO17) },
+               IMX_GPIO_NR(1, 17),
+               { IOMUX_PADS(PAD_SD1_DAT1__PWM3_OUT) },
+               3
+       },
+       {
+               {IOMUX_PADS(PAD_SD1_CLK__GPIO1_IO20) },
+               IMX_GPIO_NR(1, 20),
+               { 0, 0 },
+               0
+       },
+};
+
+struct dio_cfg gw5903_dio[] = {
+};
+
+struct dio_cfg gw5904_dio[] = {
+       {
+               { IOMUX_PADS(PAD_SD1_DAT0__GPIO1_IO16) },
+               IMX_GPIO_NR(1, 16),
+               { 0, 0 },
+               0
+       },
+       {
+               { IOMUX_PADS(PAD_SD1_DAT2__GPIO1_IO19) },
+               IMX_GPIO_NR(1, 19),
+               { IOMUX_PADS(PAD_SD1_DAT2__PWM2_OUT) },
+               2
+       },
+       {
+               { IOMUX_PADS(PAD_SD1_DAT1__GPIO1_IO17) },
+               IMX_GPIO_NR(1, 17),
+               { IOMUX_PADS(PAD_SD1_DAT1__PWM3_OUT) },
+               3
+       },
+       {
+               {IOMUX_PADS(PAD_SD1_CLK__GPIO1_IO20) },
+               IMX_GPIO_NR(1, 20),
+               { 0, 0 },
+               0
+       },
+       {
+               {IOMUX_PADS(PAD_NANDF_D0__GPIO2_IO00) },
+               IMX_GPIO_NR(2, 0),
+               { 0, 0 },
+               0
+       },
+       {
+               {IOMUX_PADS(PAD_NANDF_D1__GPIO2_IO01) },
+               IMX_GPIO_NR(2, 1),
+               { 0, 0 },
+               0
+       },
+       {
+               {IOMUX_PADS(PAD_NANDF_D2__GPIO2_IO02) },
+               IMX_GPIO_NR(2, 2),
+               { 0, 0 },
+               0
+       },
+       {
+               {IOMUX_PADS(PAD_NANDF_D3__GPIO2_IO03) },
+               IMX_GPIO_NR(2, 3),
+               { 0, 0 },
+               0
+       },
+       {
+               {IOMUX_PADS(PAD_NANDF_D4__GPIO2_IO04) },
+               IMX_GPIO_NR(2, 4),
+               { 0, 0 },
+               0
+       },
+       {
+               {IOMUX_PADS(PAD_NANDF_D5__GPIO2_IO05) },
+               IMX_GPIO_NR(2, 5),
+               { 0, 0 },
+               0
+       },
+       {
+               {IOMUX_PADS(PAD_NANDF_D6__GPIO2_IO06) },
+               IMX_GPIO_NR(2, 6),
+               { 0, 0 },
+               0
+       },
+       {
+               {IOMUX_PADS(PAD_NANDF_D7__GPIO2_IO07) },
+               IMX_GPIO_NR(2, 7),
+               { 0, 0 },
+               0
+       },
+};
+
 /*
  * Board Specific GPIO
  */
@@ -588,6 +832,7 @@ struct ventana gpio_cfg[GW_UNKNOWN] = {
                .dioi2c_en = IMX_GPIO_NR(4,  5),
                .pcie_sson = IMX_GPIO_NR(1, 20),
                .otgpwr_en = IMX_GPIO_NR(3, 22),
+               .mmc_cd = IMX_GPIO_NR(7, 0),
        },
 
        /* GW51xx */
@@ -631,6 +876,7 @@ struct ventana gpio_cfg[GW_UNKNOWN] = {
                .rs232_en = GP_RS232_EN,
                .otgpwr_en = IMX_GPIO_NR(3, 22),
                .vsel_pin = IMX_GPIO_NR(6, 14),
+               .mmc_cd = IMX_GPIO_NR(7, 0),
        },
 
        /* GW53xx */
@@ -654,6 +900,7 @@ struct ventana gpio_cfg[GW_UNKNOWN] = {
                .rs232_en = GP_RS232_EN,
                .otgpwr_en = IMX_GPIO_NR(3, 22),
                .vsel_pin = IMX_GPIO_NR(6, 14),
+               .mmc_cd = IMX_GPIO_NR(7, 0),
        },
 
        /* GW54xx */
@@ -679,6 +926,7 @@ struct ventana gpio_cfg[GW_UNKNOWN] = {
                .rs232_en = GP_RS232_EN,
                .otgpwr_en = IMX_GPIO_NR(3, 22),
                .vsel_pin = IMX_GPIO_NR(6, 14),
+               .mmc_cd = IMX_GPIO_NR(7, 0),
        },
 
        /* GW551x */
@@ -726,6 +974,58 @@ struct ventana gpio_cfg[GW_UNKNOWN] = {
                .wdis = IMX_GPIO_NR(7, 12),
                .otgpwr_en = IMX_GPIO_NR(3, 22),
                .vsel_pin = IMX_GPIO_NR(6, 14),
+               .mmc_cd = IMX_GPIO_NR(7, 0),
+       },
+
+       /* GW560x */
+       {
+               .gpio_pads = gw560x_gpio_pads,
+               .num_pads = ARRAY_SIZE(gw560x_gpio_pads)/2,
+               .dio_cfg = gw560x_dio,
+               .dio_num = ARRAY_SIZE(gw560x_dio),
+               .leds = {
+                       IMX_GPIO_NR(4, 6),
+                       IMX_GPIO_NR(4, 7),
+                       IMX_GPIO_NR(4, 15),
+               },
+               .pcie_rst = IMX_GPIO_NR(4, 31),
+               .mezz_pwren = IMX_GPIO_NR(2, 19),
+               .mezz_irq = IMX_GPIO_NR(2, 18),
+               .rs232_en = GP_RS232_EN,
+               .vidin_en = IMX_GPIO_NR(3, 31),
+               .wdis = IMX_GPIO_NR(7, 12),
+               .otgpwr_en = IMX_GPIO_NR(4, 15),
+               .mmc_cd = IMX_GPIO_NR(7, 0),
+       },
+
+       /* GW5903 */
+       {
+               .gpio_pads = gw5903_gpio_pads,
+               .num_pads = ARRAY_SIZE(gw5903_gpio_pads)/2,
+               .dio_cfg = gw5903_dio,
+               .dio_num = ARRAY_SIZE(gw5903_dio),
+               .leds = {
+                       IMX_GPIO_NR(6, 14),
+               },
+               .otgpwr_en = IMX_GPIO_NR(4, 15),
+               .mmc_cd = IMX_GPIO_NR(6, 11),
+       },
+
+       /* GW5904 */
+       {
+               .gpio_pads = gw5904_gpio_pads,
+               .num_pads = ARRAY_SIZE(gw5904_gpio_pads)/2,
+               .dio_cfg = gw5904_dio,
+               .dio_num = ARRAY_SIZE(gw5904_dio),
+               .leds = {
+                       IMX_GPIO_NR(4, 6),
+                       IMX_GPIO_NR(4, 7),
+                       IMX_GPIO_NR(4, 15),
+               },
+               .pcie_rst = IMX_GPIO_NR(1, 0),
+               .mezz_pwren = IMX_GPIO_NR(2, 19),
+               .mezz_irq = IMX_GPIO_NR(2, 18),
+               .otgpwr_en = IMX_GPIO_NR(3, 22),
        },
 };
 
@@ -834,6 +1134,50 @@ void setup_iomux_gpio(int board, struct ventana_board_info *info)
                gpio_direction_input(gpio_cfg[board].vsel_pin);
                gpio_cfg[board].usd_vsel = !gpio_get_value(gpio_cfg[board].vsel_pin);
        }
+
+       /* microSD CD */
+       if (gpio_cfg[board].mmc_cd) {
+               gpio_request(gpio_cfg[board].mmc_cd, "sd_cd");
+               gpio_direction_input(gpio_cfg[board].mmc_cd);
+       }
+
+       /* Anything else board specific */
+       switch(board) {
+       case GW560x:
+               gpio_request(IMX_GPIO_NR(4, 26), "12p0_en");
+               gpio_direction_output(IMX_GPIO_NR(4, 26), 1);
+               break;
+       case GW5903:
+               gpio_request(IMX_GPIO_NR(3, 31) , "usbh1-ehci_pwr");
+               gpio_direction_output(IMX_GPIO_NR(3, 31), 1);
+               gpio_request(IMX_GPIO_NR(4, 15) , "usbh2-otg_pwr");
+               gpio_direction_output(IMX_GPIO_NR(4, 15), 1);
+               gpio_request(IMX_GPIO_NR(4, 7) , "usbdpc_pwr");
+               gpio_direction_output(IMX_GPIO_NR(4, 15), 1);
+               gpio_request(IMX_GPIO_NR(1, 25) , "rgmii_en");
+               gpio_direction_output(IMX_GPIO_NR(1, 25), 1);
+               gpio_request(IMX_GPIO_NR(4, 6) , "touch_irq#");
+               gpio_direction_input(IMX_GPIO_NR(4, 6));
+               gpio_request(IMX_GPIO_NR(4, 8) , "touch_rst");
+               gpio_direction_output(IMX_GPIO_NR(4, 8), 1);
+               gpio_request(IMX_GPIO_NR(1, 7) , "bklt_12ven");
+               gpio_direction_output(IMX_GPIO_NR(1, 7), 1);
+               break;
+       case GW5904:
+               gpio_request(IMX_GPIO_NR(5, 11), "skt1_wdis#");
+               gpio_direction_output(IMX_GPIO_NR(5, 11), 1);
+               gpio_request(IMX_GPIO_NR(5, 12), "skt1_rst#");
+               gpio_direction_output(IMX_GPIO_NR(5, 12), 1);
+               gpio_request(IMX_GPIO_NR(5, 13), "skt2_wdis#");
+               gpio_direction_output(IMX_GPIO_NR(5, 13), 1);
+               gpio_request(IMX_GPIO_NR(1, 15), "m2_off#");
+               gpio_direction_output(IMX_GPIO_NR(1, 15), 1);
+               gpio_request(IMX_GPIO_NR(1, 14), "m2_wdis#");
+               gpio_direction_output(IMX_GPIO_NR(1, 14), 1);
+               gpio_request(IMX_GPIO_NR(1, 13), "m2_rst#");
+               gpio_direction_output(IMX_GPIO_NR(1, 13), 1);
+               break;
+       }
 }
 
 /* setup GPIO pinmux and default configuration per baseboard and env */
@@ -926,6 +1270,8 @@ void setup_board_gpio(int board, struct ventana_board_info *info)
 void setup_pmic(void)
 {
        struct pmic *p;
+       struct ventana_board_info ventana_info;
+       int board = read_eeprom(CONFIG_I2C_GSC, &ventana_info);
        u32 reg;
 
        i2c_set_bus_num(CONFIG_I2C_PMIC);
@@ -958,23 +1304,40 @@ void setup_pmic(void)
                debug("probed LTC3676@0x%x\n", CONFIG_POWER_LTC3676_I2C_ADDR);
                power_ltc3676_init(CONFIG_I2C_PMIC);
                p = pmic_get("LTC3676_PMIC");
-               if (p && !pmic_probe(p)) {
-                       puts("PMIC:  LTC3676\n");
-                       /*
-                        * set board-specific scalar for max CPU frequency
-                        * per CPU based on the LDO enabled Operating Ranges
-                        * defined in the respective IMX6DQ and IMX6SDL
-                        * datasheets. The voltage resulting from the R1/R2
-                        * feedback inputs on Ventana is 1308mV. Note that this
-                        * is a bit shy of the Vmin of 1350mV in the datasheet
-                        * for LDO enabled mode but is as high as we can go.
-                        *
-                        * We will rely on an OS kernel driver to properly
-                        * regulate these per CPU operating point and use LDO
-                        * bypass mode when using the higher frequency
-                        * operating points to compensate as LDO bypass mode
-                        * allows the rails be 125mV lower.
-                        */
+               if (!p || pmic_probe(p))
+                       return;
+               puts("PMIC:  LTC3676\n");
+               /*
+                * set board-specific scalar for max CPU frequency
+                * per CPU based on the LDO enabled Operating Ranges
+                * defined in the respective IMX6DQ and IMX6SDL
+                * datasheets. The voltage resulting from the R1/R2
+                * feedback inputs on Ventana is 1308mV. Note that this
+                * is a bit shy of the Vmin of 1350mV in the datasheet
+                * for LDO enabled mode but is as high as we can go.
+                */
+               switch (board) {
+               case GW560x:
+                       /* mask PGOOD during SW3 transition */
+                       pmic_reg_write(p, LTC3676_DVB3B,
+                                      0x1f | LTC3676_PGOOD_MASK);
+                       /* set SW3 (VDD_ARM) */
+                       pmic_reg_write(p, LTC3676_DVB3A, 0x1f);
+                       break;
+               case GW5903:
+                       /* mask PGOOD during SW1 transition */
+                       pmic_reg_write(p, LTC3676_DVB3B,
+                                      0x1f | LTC3676_PGOOD_MASK);
+                       /* set SW3 (VDD_ARM) */
+                       pmic_reg_write(p, LTC3676_DVB3A, 0x1f);
+
+                       /* mask PGOOD during SW4 transition */
+                       pmic_reg_write(p, LTC3676_DVB4B,
+                                      0x1f | LTC3676_PGOOD_MASK);
+                       /* set SW4 (VDD_SOC) */
+                       pmic_reg_write(p, LTC3676_DVB4A, 0x1f);
+                       break;
+               default:
                        /* mask PGOOD during SW1 transition */
                        pmic_reg_write(p, LTC3676_DVB1B,
                                       0x1f | LTC3676_PGOOD_MASK);
@@ -991,23 +1354,96 @@ void setup_pmic(void)
 }
 
 #ifdef CONFIG_FSL_ESDHC
-static struct fsl_esdhc_cfg usdhc_cfg = { USDHC3_BASE_ADDR };
+static struct fsl_esdhc_cfg usdhc_cfg[2];
 
 int board_mmc_init(bd_t *bis)
 {
-       /* Only one USDHC controller on Ventana */
-       SETUP_IOMUX_PADS(usdhc3_pads);
-       usdhc_cfg.sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
-       usdhc_cfg.max_bus_width = 4;
-
-       return fsl_esdhc_initialize(bis, &usdhc_cfg);
+       struct ventana_board_info ventana_info;
+       int board_type = read_eeprom(CONFIG_I2C_GSC, &ventana_info);
+       int ret;
+
+       switch (board_type) {
+       case GW52xx:
+       case GW53xx:
+       case GW54xx:
+       case GW553x:
+               /* usdhc3: 4bit microSD */
+               SETUP_IOMUX_PADS(usdhc3_pads);
+               usdhc_cfg[0].esdhc_base = USDHC3_BASE_ADDR;
+               usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
+               usdhc_cfg[0].max_bus_width = 4;
+               return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
+       case GW560x:
+               /* usdhc2: 8-bit eMMC */
+               SETUP_IOMUX_PADS(gw560x_emmc_sd2_pads);
+               usdhc_cfg[0].esdhc_base = USDHC2_BASE_ADDR;
+               usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
+               usdhc_cfg[0].max_bus_width = 8;
+               ret = fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
+               if (ret)
+                       return ret;
+               /* usdhc3: 4-bit microSD */
+               SETUP_IOMUX_PADS(usdhc3_pads);
+               usdhc_cfg[1].esdhc_base = USDHC3_BASE_ADDR;
+               usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
+               usdhc_cfg[1].max_bus_width = 4;
+               return fsl_esdhc_initialize(bis, &usdhc_cfg[1]);
+       case GW5903:
+               /* usdhc3: 8-bit eMMC */
+               SETUP_IOMUX_PADS(gw5904_emmc_pads);
+               usdhc_cfg[0].esdhc_base = USDHC3_BASE_ADDR;
+               usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
+               usdhc_cfg[0].max_bus_width = 8;
+               ret = fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
+               if (ret)
+                       return ret;
+               /* usdhc2: 4-bit microSD */
+               SETUP_IOMUX_PADS(gw5904_mmc_pads);
+               usdhc_cfg[1].esdhc_base = USDHC2_BASE_ADDR;
+               usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
+               usdhc_cfg[1].max_bus_width = 4;
+               return fsl_esdhc_initialize(bis, &usdhc_cfg[1]);
+       case GW5904:
+               /* usdhc3: 8bit eMMC */
+               SETUP_IOMUX_PADS(gw5904_emmc_pads);
+               usdhc_cfg[0].esdhc_base = USDHC3_BASE_ADDR;
+               usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
+               usdhc_cfg[0].max_bus_width = 8;
+               return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
+       default:
+               /* doesn't have MMC */
+               return -1;
+       }
 }
 
 int board_mmc_getcd(struct mmc *mmc)
 {
+       struct ventana_board_info ventana_info;
+       struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
+       int board = read_eeprom(CONFIG_I2C_GSC, &ventana_info);
+       int gpio = gpio_cfg[board].mmc_cd;
+
        /* Card Detect */
-       gpio_request(GP_SD3_CD, "sd_cd");
-       gpio_direction_input(GP_SD3_CD);
-       return !gpio_get_value(GP_SD3_CD);
+       switch (board) {
+       case GW560x:
+               /* emmc is always present */
+               if (cfg->esdhc_base == USDHC2_BASE_ADDR)
+                       return 1;
+               break;
+       case GW5903:
+       case GW5904:
+               /* emmc is always present */
+               if (cfg->esdhc_base == USDHC3_BASE_ADDR)
+                       return 1;
+               break;
+       }
+
+       if (gpio) {
+               debug("%s: gpio%d=%d\n", __func__, gpio, gpio_get_value(gpio));
+               return !gpio_get_value(gpio);
+       }
+
+       return -1;
 }
+
 #endif /* CONFIG_FSL_ESDHC */
index 18909a02b58e1582d68b2e2251b1d8c53247fcc6..3eb4c59400255fea89dcb2060ef96794e0ebc827 100644 (file)
@@ -13,7 +13,6 @@
 
 /* GPIO's common to all baseboards */
 #define GP_PHY_RST     IMX_GPIO_NR(1, 30)
-#define GP_SD3_CD      IMX_GPIO_NR(7, 0)
 #define GP_RS232_EN    IMX_GPIO_NR(2, 11)
 #define GP_MSATA_SEL   IMX_GPIO_NR(2, 8)
 
@@ -79,6 +78,7 @@ struct ventana {
        int rs232_en;
        int otgpwr_en;
        int vsel_pin;
+       int mmc_cd;
        /* various features */
        bool usd_vsel;
 };
index 1382e5debea12b1fbfc2dc5d395ff27dd4f94244..2c07a84fffcb8e25201051513d0e887f1bc6a0d3 100644 (file)
@@ -64,6 +64,7 @@ read_eeprom(int bus, struct ventana_board_info *info)
        if (strncasecmp((const char *)info->model, "GW5400-A", 8) == 0)
                baseboard = '0';
 
+       type = GW_UNKNOWN;
        switch (baseboard) {
        case '0': /* original GW5400-A prototype */
                type = GW54proto;
@@ -91,10 +92,16 @@ read_eeprom(int bus, struct ventana_board_info *info)
                        type = GW553x;
                        break;
                }
-               /* fall through */
-       default:
-               printf("EEPROM: Unknown model in EEPROM: %s\n", info->model);
-               type = GW_UNKNOWN;
+               break;
+       case '6':
+               if (info->model[4] == '0')
+                       type = GW560x;
+               break;
+       case '9':
+               if (info->model[4] == '0' && info->model[5] == '3')
+                       type = GW5903;
+               if (info->model[4] == '0' && info->model[5] == '4')
+                       type = GW5904;
                break;
        }
        return type;
index 613a275a8f34bc32dca7f85a08813f0892dece47..68b1ddb532e0cf60bd43a1b61f181536609b6ca8 100644 (file)
@@ -137,6 +137,10 @@ int gsc_info(int verbose)
                break;
        case '5': /* GW55xx */
                break;
+       case '6': /* GW560x */
+               read_hwmon("VDD_IO4",  GSC_HWMON_VDD_IO4, 3);
+               read_hwmon("VDD_GPS",  GSC_HWMON_VDD_IO3, 3);
+               break;
        }
        return 0;
 }
index 3f9d2f7010fecb58ed0adda7bbab224735b4dccd..dc8cd883e904f278b977daf0bb2fa62c702e256e 100644 (file)
@@ -132,8 +132,9 @@ static void setup_iomux_enet(int gpio)
        /* toggle PHY_RST# */
        gpio_request(gpio, "phy_rst#");
        gpio_direction_output(gpio, 0);
-       mdelay(2);
+       mdelay(10);
        gpio_set_value(gpio, 1);
+       mdelay(100);
 }
 
 #ifdef CONFIG_USB_EHCI_MX6
@@ -226,12 +227,56 @@ int board_phy_config(struct phy_device *phydev)
                phy_write(phydev, MDIO_DEVAD_NONE, 22, 0);
        }
 
+       /* TI DP83867 */
+       else if (phydev->phy_id == 0x2000a231) {
+               /* configure register 0x170 for ref CLKOUT */
+               phy_write(phydev, MDIO_DEVAD_NONE, 13, 0x001f);
+               phy_write(phydev, MDIO_DEVAD_NONE, 14, 0x0170);
+               phy_write(phydev, MDIO_DEVAD_NONE, 13, 0x401f);
+               val = phy_read(phydev, MDIO_DEVAD_NONE, 14);
+               val &= ~0x1f00;
+               val |= 0x0b00; /* chD tx clock*/
+               phy_write(phydev, MDIO_DEVAD_NONE, 14, val);
+       }
+
        if (phydev->drv->config)
                phydev->drv->config(phydev);
 
        return 0;
 }
 
+#ifdef CONFIG_MV88E61XX_SWITCH
+int mv88e61xx_hw_reset(struct phy_device *phydev)
+{
+       struct mii_dev *bus = phydev->bus;
+
+       /* GPIO[0] output, CLK125 */
+       debug("enabling RGMII_REFCLK\n");
+       bus->write(bus, 0x1c /*MV_GLOBAL2*/, 0,
+                  0x1a /*MV_SCRATCH_MISC*/,
+                  (1 << 15) | (0x62 /*MV_GPIO_DIR*/ << 8) | 0xfe);
+       bus->write(bus, 0x1c /*MV_GLOBAL2*/, 0,
+                  0x1a /*MV_SCRATCH_MISC*/,
+                  (1 << 15) | (0x68 /*MV_GPIO01_CNTL*/ << 8) | 7);
+
+       /* RGMII delay - Physical Control register bit[15:14] */
+       debug("setting port%d RGMII rx/tx delay\n", CONFIG_MV88E61XX_CPU_PORT);
+       /* forced 1000mbps full-duplex link */
+       bus->write(bus, 0x10 + CONFIG_MV88E61XX_CPU_PORT, 0, 1, 0xc0fe);
+       phydev->autoneg = AUTONEG_DISABLE;
+       phydev->speed = SPEED_1000;
+       phydev->duplex = DUPLEX_FULL;
+
+       /* LED configuration: 7:4-green (8=Activity)  3:0 amber (9=10Link) */
+       bus->write(bus, 0x10, 0, 0x16, 0x8089);
+       bus->write(bus, 0x11, 0, 0x16, 0x8089);
+       bus->write(bus, 0x12, 0, 0x16, 0x8089);
+       bus->write(bus, 0x13, 0, 0x16, 0x8089);
+
+       return 0;
+}
+#endif // CONFIG_MV88E61XX_SWITCH
+
 int board_eth_init(bd_t *bis)
 {
 #ifdef CONFIG_FEC_MXC
@@ -661,6 +706,8 @@ int checkboard(void)
 static const struct boot_mode board_boot_modes[] = {
        /* NAND: 64pages per block, 3 row addr cycles, 2 copies of FCB/DBBT */
        { "nand", MAKE_CFGVAL(0x80, 0x02, 0x00, 0x00) },
+       { "emmc2", MAKE_CFGVAL(0x60, 0x48, 0x00, 0x00) }, /* GW5600 */
+       { "emmc3", MAKE_CFGVAL(0x60, 0x50, 0x00, 0x00) }, /* GW5903/GW5904 */
        { NULL, 0 },
 };
 #endif
@@ -712,7 +759,8 @@ int misc_init_r(void)
                        setenv("fdt_file1", fdt);
                        if (board_type != GW551x &&
                            board_type != GW552x &&
-                           board_type != GW553x)
+                           board_type != GW553x &&
+                           board_type != GW560x)
                                str[4] = 'x';
                        str[5] = 'x';
                        str[6] = 0;
index 8cc2a571d3811834c53e02551cd417d483056716..6060b4421680d90789009105924b1e780044253c 100644 (file)
@@ -374,6 +374,25 @@ static struct mx6_mmdc_calibration mx6sdl_256x64_mmdc_calib = {
        .p1_mpwrdlctl = 0x383A3930,
 };
 
+static struct mx6_mmdc_calibration mx6sdl_256x64x2_mmdc_calib = {
+       /* write leveling calibration determine */
+       .p0_mpwldectrl0 = 0x001F003F,
+       .p0_mpwldectrl1 = 0x001F001F,
+       .p1_mpwldectrl0 = 0x001F004E,
+       .p1_mpwldectrl1 = 0x0059001F,
+       /* Read DQS Gating calibration */
+       .p0_mpdgctrl0   = 0x42220225,
+       .p0_mpdgctrl1   = 0x0213021F,
+       .p1_mpdgctrl0   = 0x022C0242,
+       .p1_mpdgctrl1   = 0x022C0244,
+       /* Read Calibration: DQS delay relative to DQ read access */
+       .p0_mprddlctl   = 0x474A4C4A,
+       .p1_mprddlctl   = 0x48494C45,
+       /* Write Calibration: DQ/DM delay relative to DQS write access */
+       .p0_mpwrdlctl   = 0x3F3F3F36,
+       .p1_mpwrdlctl   = 0x3F36363F,
+};
+
 static struct mx6_mmdc_calibration mx6dq_512x32_mmdc_calib = {
        /* write leveling calibration determine */
        .p0_mpwldectrl0 = 0x002A0025,
@@ -510,10 +529,25 @@ static void spl_dram_init(int width, int size_mb, int board_model)
                        calib = &mx6sdl_256x64_mmdc_calib;
                debug("4gB density\n");
        } else if (width == 64 && size_mb == 4096) {
-               mem = &mt41k512m16ha_125;
-               if (is_cpu_type(MXC_CPU_MX6Q))
-                       calib = &mx6dq_512x64_mmdc_calib;
-               debug("8gB density\n");
+               switch(board_model) {
+               case GW5903:
+                       /* 8xMT41K256M16 (4GiB) fly-by mirrored 2-chipsels */
+                       mem = &mt41k256m16ha_125;
+                       debug("4gB density\n");
+                       if (!is_cpu_type(MXC_CPU_MX6Q)) {
+                               calib = &mx6sdl_256x64x2_mmdc_calib;
+                               sysinfo.ncs = 2;
+                               sysinfo.cs_density = 18; /* CS0_END=71 */
+                               sysinfo.cs1_mirror = 1; /* mirror enabled */
+                       }
+                       break;
+               default:
+                       mem = &mt41k512m16ha_125;
+                       if (is_cpu_type(MXC_CPU_MX6Q))
+                               calib = &mx6dq_512x64_mmdc_calib;
+                       debug("8gB density\n");
+                       break;
+               }
        }
 
        if (!(mem && calib)) {
@@ -608,6 +642,20 @@ void board_init_f(ulong dummy)
        memset(__bss_start, 0, __bss_end - __bss_start);
 }
 
+void board_boot_order(u32 *spl_boot_list)
+{
+       spl_boot_list[0] = spl_boot_device();
+       switch (spl_boot_list[0]) {
+       case BOOT_DEVICE_NAND:
+               spl_boot_list[1] = BOOT_DEVICE_MMC1;
+               spl_boot_list[2] = BOOT_DEVICE_UART;
+               break;
+       case BOOT_DEVICE_MMC1:
+               spl_boot_list[1] = BOOT_DEVICE_UART;
+               break;
+       }
+}
+
 /* called from board_init_r after gd setup if CONFIG_SPL_BOARD_INIT defined */
 /* its our chance to print info about boot device */
 void spl_board_init(void)
index 9ffad58e03e906cf0ec311a87481057ab7548f8d..8a42d67ba190f8b0266ff3ee47492cb11c1325e5 100644 (file)
@@ -112,6 +112,9 @@ enum {
        GW551x,
        GW552x,
        GW553x,
+       GW560x,
+       GW5903,
+       GW5904,
        GW_UNKNOWN,
        GW_BADCRC,
 };
index 5b67a013da7eb0719f4c235dc921414098e0585f..5d2ec89b8cc9d46e1946fc771319d9a4b5e240fe 100644 (file)
@@ -66,7 +66,7 @@ static long fixed_sdram(void)
        return get_ram_size(CONFIG_SYS_DDR_SDRAM_BASE, msize);
 }
 
-int initdram(void)
+int dram_init(void)
 {
        immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        u32 msize;
index d8e6701fac545ab6be4122679c9e5962ea786a40..4433e8c77e9053463fc2671759c271856e7d28b2 100644 (file)
@@ -119,7 +119,7 @@ static int setup_sdram(void)
        return msize;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        fsl_lbc_t *lbc = &im->im_lbc;
index 129eb47b0e13334cea42ad8ae0b675ac4ab95b9b..348613736d3c068b0a794c249ae0367e87ca2d65 100644 (file)
@@ -310,7 +310,7 @@ u32 sdram_init_seq[] = {
        /* EMPTY, optional, we don't do it */
 };
 
-int initdram(void)
+int dram_init(void)
 {
        gd->ram_size = fixed_sdram(NULL, sdram_init_seq,
                                   ARRAY_SIZE(sdram_init_seq));
index 4f81007ead113e1dc4e2b044d62c374e90dc93a9..7770806bd27fe3eb70f22df295bb5605ae11c8ca 100644 (file)
@@ -62,11 +62,11 @@ static void sdram_start(int hi_addr)
 #endif
 
 /*
- * ATTENTION: Although partially referenced initdram does NOT make real use
+ * ATTENTION: Although partially referenced dram_init does NOT make real use
  *            use of CONFIG_SYS_SDRAM_BASE. The code does not work if
  *            CONFIG_SYS_SDRAM_BASE is something else than 0x00000000.
  */
-int initdram(void)
+int dram_init(void)
 {
        struct mpc5xxx_mmap_ctl *mmap_ctl =
                (struct mpc5xxx_mmap_ctl *)CONFIG_SYS_MBAR;
index b92ff2aa885aeb60e1831342082d1b23d27c2621..3479b98b881ef87b1f7d3278f2c51fe57c94f604 100644 (file)
@@ -12,7 +12,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int initdram(void)
+int dram_init(void)
 {
        u32 ddrconf0 = __raw_readl((uint32_t *)BOSTON_PLAT_DDRCONF0);
 
index f8c65b0e46d517096bf0123a11119806ece3e457..de81aa01f0dc3ffd40bc6cf67ee21f6d1a389250 100644 (file)
@@ -85,7 +85,7 @@ static enum sys_con malta_sys_con(void)
        }
 }
 
-int initdram(void)
+int dram_init(void)
 {
        gd->ram_size = CONFIG_SYS_MEM_SIZE;
 
index 8aa7c10bffce3e849133be17e3c55ba17dec5a29..841d61459de11e37fa6b2050a7d4a0d0fe7289a2 100644 (file)
@@ -14,7 +14,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 /* initialize the DDR Controller and PHY */
-int initdram(void)
+int dram_init(void)
 {
        /* MIG IP block is smart and doesn't need SW
         * to do any init */
index 2dd9799ea7d33dab3d8e8ed6edd18f35b8228646..88cae59e8f5bab673fe15a64897757f4e4ca99fb 100644 (file)
@@ -74,12 +74,12 @@ static void sdram_start (int hi_addr)
 #endif
 
 /*
- * ATTENTION: Although partially referenced initdram does NOT make real use
+ * ATTENTION: Although partially referenced dram_init does NOT make real use
  *           use of CONFIG_SYS_SDRAM_BASE. The code does not work if CONFIG_SYS_SDRAM_BASE
  *           is something else than 0x00000000.
  */
 
-int initdram(void)
+int dram_init(void)
 {
        volatile struct mpc5xxx_mmap_ctl *mm =
                (struct mpc5xxx_mmap_ctl *) CONFIG_SYS_MBAR;
index 922d9ef0a17576bc57454e8d01dfbc5b33966283..b8bc0459f8dec069e2595a3c3a8bd6a945553f55 100644 (file)
@@ -74,12 +74,12 @@ static void sdram_start(int hi_addr)
 #endif
 
 /*
- * ATTENTION: Although partially referenced initdram does NOT make real use
+ * ATTENTION: Although partially referenced dram_init does NOT make real use
  *            use of CONFIG_SYS_SDRAM_BASE. The code does not work if
  *            CONFIG_SYS_SDRAM_BASE is something other than 0x00000000.
  */
 
-int initdram(void)
+int dram_init(void)
 {
        ulong dramsize = 0;
        ulong dramsize2 = 0;
index ca99332e51b2388be0557ce30323f28d9b1c3155..133db8c6bdc46ffe94dfa9d8c5de6cf8fa2c1d3d 100644 (file)
@@ -75,12 +75,12 @@ static void sdram_start (int hi_addr)
 }
 
 /*
- * ATTENTION: Although partially referenced initdram does NOT make real
+ * ATTENTION: Although partially referenced dram_init does NOT make real
  *           use of CONFIG_SYS_SDRAM_BASE. The code does not work if
  *           CONFIG_SYS_SDRAM_BASE is something else than 0x00000000.
  */
 
-int initdram(void)
+int dram_init(void)
 {
        struct mpc5xxx_mmap_ctl *mmap_ctl =
                (struct mpc5xxx_mmap_ctl *)CONFIG_SYS_MBAR;
index d13469136186f95d82d369510ab642c12f97f40f..ea24eaa5c01c1fadc1cc5c5e0c44fee95827b474 100644 (file)
@@ -73,12 +73,12 @@ static void sdram_start (int hi_addr)
 #endif
 
 /*
- * ATTENTION: Although partially referenced initdram does NOT make real use
+ * ATTENTION: Although partially referenced dram_init does NOT make real use
  *            use of CONFIG_SYS_SDRAM_BASE. The code does not work if CONFIG_SYS_SDRAM_BASE
  *            is something else than 0x00000000.
  */
 
-int initdram(void)
+int dram_init(void)
 {
        ulong dramsize = 0;
        ulong dramsize2 = 0;
index bbabbcfc0bcaa358a86da3b47b4c5c42d610766e..51b4571d40aa1adea9c7d14944db4e8e98f792c3 100644 (file)
@@ -291,7 +291,7 @@ static long probe_sdram(memctl8260_t *memctl)
 #endif /* CONFIG_SYS_SDRAM_LIST */
 
 
-int initdram(void)
+int dram_init(void)
 {
        immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
        memctl8260_t *memctl = &immap->im_memctl;
index f83fa06e93c69220c2a8a6d40bcf9e98c9024994..8020c379fdb1947705b9c1ec1435c66d0fb552f3 100644 (file)
@@ -330,7 +330,7 @@ static int fixed_sdram(void)
        return msize;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        u32 msize = 0;
index 006b80965461b19f840ab935b24f56464498140d..6f82e15f82c3ec1b65dcdc2d4318c35642ee2db6 100644 (file)
@@ -50,7 +50,7 @@ void fsl_ddr_board_options(memctl_options_t *popts,
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR_ODT_75ohm;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size = 0;
 
index 3d7af092e8396885179735b77c43d61a40fd8952..a938a2c2e1d468023388a0c177d95c97b868c690 100644 (file)
@@ -51,9 +51,9 @@ void spi_cs_deactivate(struct spi_slave *slave)
 
 static void vinco_spi0_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTC, 0, 0);        /* SPI0_MISO */
-       at91_set_a_periph(AT91_PIO_PORTC, 1, 0);        /* SPI0_MOSI */
-       at91_set_a_periph(AT91_PIO_PORTC, 2, 0);        /* SPI0_SPCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 0, 0);   /* SPI0_MISO */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 1, 0);   /* SPI0_MOSI */
+       at91_pio3_set_a_periph(AT91_PIO_PORTC, 2, 0);   /* SPI0_SPCK */
 
        at91_set_pio_output(AT91_PIO_PORTC, 3, 1);      /* SPI0_CS0 */
 
@@ -76,16 +76,16 @@ static void vinco_usb_hw_init(void)
 #ifdef CONFIG_GENERIC_ATMEL_MCI
 void vinco_mci0_hw_init(void)
 {
-       at91_set_b_periph(AT91_PIO_PORTC, 5, 1);        /* MCI0 CDA */
-       at91_set_b_periph(AT91_PIO_PORTC, 6, 1);        /* MCI0 DA0 */
-       at91_set_b_periph(AT91_PIO_PORTC, 7, 1);        /* MCI0 DA1 */
-       at91_set_b_periph(AT91_PIO_PORTC, 8, 1);        /* MCI0 DA2 */
-       at91_set_b_periph(AT91_PIO_PORTC, 9, 1);        /* MCI0 DA3 */
-       at91_set_b_periph(AT91_PIO_PORTC, 10, 1);       /* MCI0 DA4 */
-       at91_set_b_periph(AT91_PIO_PORTC, 11, 1);       /* MCI0 DA5 */
-       at91_set_b_periph(AT91_PIO_PORTC, 12, 1);       /* MCI0 DA6 */
-       at91_set_b_periph(AT91_PIO_PORTC, 13, 1);       /* MCI0 DA7 */
-       at91_set_b_periph(AT91_PIO_PORTC, 4, 0);        /* MCI0 CLK */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 5, 1);   /* MCI0 CDA */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 6, 1);   /* MCI0 DA0 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 7, 1);   /* MCI0 DA1 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 8, 1);   /* MCI0 DA2 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 9, 1);   /* MCI0 DA3 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 10, 1);  /* MCI0 DA4 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 11, 1);  /* MCI0 DA5 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 12, 1);  /* MCI0 DA6 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 13, 1);  /* MCI0 DA7 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTC, 4, 0);   /* MCI0 CLK */
 
        /*
         * As the mci io internal pull down is too strong, so if the io needs
@@ -93,16 +93,16 @@ void vinco_mci0_hw_init(void)
         * the power consumption will increase, so disable the interanl pull
         * down to save the power.
         */
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 4, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 5, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 6, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 7, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 8, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 9, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 10, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 11, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 12, 0);
-       at91_set_pio_pulldown(AT91_PIO_PORTC, 13, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 4, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 5, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 6, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 7, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 8, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 9, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 10, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 11, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 12, 0);
+       at91_pio3_set_pio_pulldown(AT91_PIO_PORTC, 13, 0);
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_MCI0);
@@ -120,16 +120,16 @@ int board_mmc_init(bd_t *bis)
 #ifdef CONFIG_MACB
 void vinco_macb0_hw_init(void)
 {
-       at91_set_a_periph(AT91_PIO_PORTB, 0, 0);        /* ETXCK_EREFCK */
-       at91_set_a_periph(AT91_PIO_PORTB, 6, 0);        /* ERXDV */
-       at91_set_a_periph(AT91_PIO_PORTB, 8, 0);        /* ERX0 */
-       at91_set_a_periph(AT91_PIO_PORTB, 9, 0);        /* ERX1 */
-       at91_set_a_periph(AT91_PIO_PORTB, 7, 0);        /* ERXER */
-       at91_set_a_periph(AT91_PIO_PORTB, 2, 0);        /* ETXEN */
-       at91_set_a_periph(AT91_PIO_PORTB, 12, 0);       /* ETX0 */
-       at91_set_a_periph(AT91_PIO_PORTB, 13, 0);       /* ETX1 */
-       at91_set_a_periph(AT91_PIO_PORTB, 17, 0);       /* EMDIO */
-       at91_set_a_periph(AT91_PIO_PORTB, 16, 0);       /* EMDC */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 0, 0);   /* ETXCK_EREFCK */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 6, 0);   /* ERXDV */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 8, 0);   /* ERX0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 9, 0);   /* ERX1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 7, 0);   /* ERXER */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 2, 0);   /* ETXEN */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 12, 0);  /* ETX0 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 13, 0);  /* ETX1 */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 17, 0);  /* EMDIO */
+       at91_pio3_set_a_periph(AT91_PIO_PORTB, 16, 0);  /* EMDC */
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_GMAC0);
@@ -141,8 +141,8 @@ void vinco_macb0_hw_init(void)
 
 static void vinco_serial3_hw_init(void)
 {
-       at91_set_b_periph(AT91_PIO_PORTE, 17, 1);       /* TXD3 */
-       at91_set_b_periph(AT91_PIO_PORTE, 16, 0);       /* RXD3 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTE, 17, 1);  /* TXD3 */
+       at91_pio3_set_b_periph(AT91_PIO_PORTE, 16, 0);  /* RXD3 */
 
        /* Enable clock */
        at91_periph_clk_enable(ATMEL_ID_USART3);
index f7251e567fcb3345601c10c3ac9c9d1e529b520c..4a65d74443c54e8655239a01e5076a8602cdf164 100644 (file)
@@ -144,10 +144,10 @@ static void program_ecc(u32 start_address,
 
 /*************************************************************************
  *
- * initdram -- 440EPx's DDR controller is a DENALI Core
+ * dram_init -- 440EPx's DDR controller is a DENALI Core
  *
  ************************************************************************/
-int initdram(void)
+int dram_init(void)
 {
        /* CL=4 */
        mtsdram(DDR0_02, 0x00000000);
diff --git a/board/logicpd/imx6/Kconfig b/board/logicpd/imx6/Kconfig
new file mode 100644 (file)
index 0000000..f5e2f58
--- /dev/null
@@ -0,0 +1,12 @@
+if TARGET_MX6LOGICPD
+
+config SYS_BOARD
+       default "imx6"
+
+config SYS_VENDOR
+       default "logicpd"
+
+config SYS_CONFIG_NAME
+       default "imx6_logic"
+
+endif
diff --git a/board/logicpd/imx6/MAINTAINERS b/board/logicpd/imx6/MAINTAINERS
new file mode 100644 (file)
index 0000000..5db7d2c
--- /dev/null
@@ -0,0 +1,6 @@
+MX6LOGICPD BOARD
+M:     Adam Ford <aford173@gmail.com>
+S:     Maintained
+F:     board/logicpd/imx6/
+F:     include/configs/imx6_logic.h
+F:     configs/imx6q_logic_defconfig
diff --git a/board/logicpd/imx6/Makefile b/board/logicpd/imx6/Makefile
new file mode 100644 (file)
index 0000000..337df92
--- /dev/null
@@ -0,0 +1,10 @@
+#
+# Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de>
+#
+# (C) Copyright 2011 Freescale Semiconductor, Inc.
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y  := imx6logic.o
+
diff --git a/board/logicpd/imx6/README b/board/logicpd/imx6/README
new file mode 100644 (file)
index 0000000..df43b55
--- /dev/null
@@ -0,0 +1,37 @@
+U-Boot for LogicPD i.MX6 Development Kit
+----------------------------------------
+
+This file contains information for the port of U-Boot to the Logic PD Development kit.
+
+Logic PD has an i.MX6 System On Module (SOM) and a correspondong development
+board.  SOM has a built-in microSD socket, DDR and NAND flash.  The development kit has
+an SMSC Ethernet PHY, serial debug port and a variety of peripherals.
+
+On the intial release, the SOM came with either an i.MX6D or i.MX6Q.
+
+For more details about Logic PD i.MX6 Development kit, visit:
+https://www.logicpd.com/
+
+Building U-Boot for Logic PD Development Kit
+--------------------------------------------
+To build U-Boot for the Dual and Quad variants:
+
+ make imx6q_logic_defconfig
+ make u-boot.imx ARCH=arm CROSS_COMPILE=arm-linux-
+
+
+Flashing U-Boot into the SD card
+--------------------------------
+
+See README.imximage for details on booting from SD
+
+Flashing U-Boot into NAND
+-------------------------
+Once in Linux with MTD support for the NAND on /dev/mtd0, program U-Boot with the following:
+with:
+
+  kobs-ng init -v -x u-boot-dtb.imx
+
+Additional Support Documentation can be found at:
+https://support.logicpd.com/
+
diff --git a/board/logicpd/imx6/imx6logic.c b/board/logicpd/imx6/imx6logic.c
new file mode 100644 (file)
index 0000000..5576799
--- /dev/null
@@ -0,0 +1,184 @@
+/*
+ * Copyright (C) 2017 Logic PD, Inc.
+ *
+ * Author: Adam Ford <aford173@gmail.com>
+ *
+ * Based on SabreSD by Fabio Estevam <fabio.estevam@nxp.com>
+ * and updates by Jagan Teki <jagan@amarulasolutions.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <miiphy.h>
+#include <mmc.h>
+#include <fsl_esdhc.h>
+#include <asm/io.h>
+#include <asm/gpio.h>
+#include <linux/sizes.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/crm_regs.h>
+#include <asm/arch/iomux.h>
+#include <asm/arch/mxc_hdmi.h>
+#include <asm/arch/mx6-pins.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/imx-common/boot_mode.h>
+#include <asm/imx-common/iomux-v3.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define UART_PAD_CTRL  (PAD_CTL_PKE | PAD_CTL_PUE |            \
+       PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED |               \
+       PAD_CTL_DSE_40ohm   | PAD_CTL_SRE_FAST  | PAD_CTL_HYS)
+
+#define NAND_PAD_CTRL  (PAD_CTL_PKE | PAD_CTL_PUE |            \
+       PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED   |             \
+       PAD_CTL_DSE_40ohm   | PAD_CTL_HYS)
+
+int dram_init(void)
+{
+       gd->ram_size = imx_ddr_size();
+       return 0;
+}
+
+static iomux_v3_cfg_t const uart1_pads[] = {
+       MX6_PAD_SD3_DAT7__UART1_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
+       MX6_PAD_SD3_DAT6__UART1_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
+};
+
+static iomux_v3_cfg_t const uart2_pads[] = {
+       MX6_PAD_SD4_DAT4__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
+       MX6_PAD_SD4_DAT5__UART2_RTS_B | MUX_PAD_CTRL(UART_PAD_CTRL),
+       MX6_PAD_SD4_DAT6__UART2_CTS_B | MUX_PAD_CTRL(UART_PAD_CTRL),
+       MX6_PAD_SD4_DAT7__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
+};
+
+static iomux_v3_cfg_t const uart3_pads[] = {
+       MX6_PAD_EIM_D23__UART3_CTS_B | MUX_PAD_CTRL(UART_PAD_CTRL),
+       MX6_PAD_EIM_D24__UART3_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
+       MX6_PAD_EIM_D25__UART3_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
+       MX6_PAD_EIM_EB3__UART3_RTS_B | MUX_PAD_CTRL(UART_PAD_CTRL),
+};
+
+static void fixup_enet_clock(void)
+{
+       struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
+       struct gpio_desc nint;
+       struct gpio_desc reset;
+       int ret;
+
+       /* Set Ref Clock to 50 MHz */
+       enable_fec_anatop_clock(0, ENET_50MHZ);
+
+       /* Set GPIO_16 as ENET_REF_CLK_OUT */
+       setbits_le32(&iomuxc_regs->gpr[1], IOMUXC_GPR1_ENET_CLK_SEL_MASK);
+
+       /* Request GPIO Pins to reset Ethernet with new clock */
+       ret = dm_gpio_lookup_name("GPIO4_7", &nint);
+       if (ret) {
+               printf("Unable to lookup GPIO4_7\n");
+               return;
+       }
+
+       ret = dm_gpio_request(&nint, "eth0_nInt");
+       if (ret) {
+               printf("Unable to request eth0_nInt\n");
+               return;
+       }
+
+       /* Ensure nINT is input or PHY won't startup */
+       dm_gpio_set_dir_flags(&nint, GPIOD_IS_IN);
+
+       ret = dm_gpio_lookup_name("GPIO4_9", &reset);
+       if (ret) {
+               printf("Unable to lookup GPIO4_9\n");
+               return;
+       }
+
+       ret = dm_gpio_request(&reset, "eth0_reset");
+       if (ret) {
+               printf("Unable to request eth0_reset\n");
+               return;
+       }
+
+       /* Reset LAN8710A PHY */
+       dm_gpio_set_dir_flags(&reset, GPIOD_IS_OUT);
+       dm_gpio_set_value(&reset, 0);
+       udelay(150);
+       dm_gpio_set_value(&reset, 1);
+       mdelay(50);
+}
+
+static void setup_iomux_uart(void)
+{
+       imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
+       imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads));
+       imx_iomux_v3_setup_multiple_pads(uart3_pads, ARRAY_SIZE(uart3_pads));
+}
+
+static iomux_v3_cfg_t const nand_pads[] = {
+       MX6_PAD_NANDF_CS0__NAND_CE0_B | MUX_PAD_CTRL(NAND_PAD_CTRL),
+       MX6_PAD_NANDF_ALE__NAND_ALE  | MUX_PAD_CTRL(NAND_PAD_CTRL),
+       MX6_PAD_NANDF_CLE__NAND_CLE  | MUX_PAD_CTRL(NAND_PAD_CTRL),
+       MX6_PAD_NANDF_WP_B__NAND_WP_B  | MUX_PAD_CTRL(NAND_PAD_CTRL),
+       MX6_PAD_NANDF_RB0__NAND_READY_B   | MUX_PAD_CTRL(NAND_PAD_CTRL),
+       MX6_PAD_NANDF_D0__NAND_DATA00    | MUX_PAD_CTRL(NAND_PAD_CTRL),
+       MX6_PAD_NANDF_D1__NAND_DATA01    | MUX_PAD_CTRL(NAND_PAD_CTRL),
+       MX6_PAD_NANDF_D2__NAND_DATA02    | MUX_PAD_CTRL(NAND_PAD_CTRL),
+       MX6_PAD_NANDF_D3__NAND_DATA03    | MUX_PAD_CTRL(NAND_PAD_CTRL),
+       MX6_PAD_NANDF_D4__NAND_DATA04    | MUX_PAD_CTRL(NAND_PAD_CTRL),
+       MX6_PAD_NANDF_D5__NAND_DATA05    | MUX_PAD_CTRL(NAND_PAD_CTRL),
+       MX6_PAD_NANDF_D6__NAND_DATA06    | MUX_PAD_CTRL(NAND_PAD_CTRL),
+       MX6_PAD_NANDF_D7__NAND_DATA07    | MUX_PAD_CTRL(NAND_PAD_CTRL),
+       MX6_PAD_SD4_CLK__NAND_WE_B    | MUX_PAD_CTRL(NAND_PAD_CTRL),
+       MX6_PAD_SD4_CMD__NAND_RE_B    | MUX_PAD_CTRL(NAND_PAD_CTRL),
+};
+
+static void setup_nand_pins(void)
+{
+       imx_iomux_v3_setup_multiple_pads(nand_pads, ARRAY_SIZE(nand_pads));
+}
+
+int board_phy_config(struct phy_device *phydev)
+{
+       if (phydev->drv->config)
+               phydev->drv->config(phydev);
+
+       return 0;
+}
+
+/*
+ * Do not overwrite the console
+ * Use always serial for U-Boot console
+ */
+int overwrite_console(void)
+{
+       return 1;
+}
+
+int board_early_init_f(void)
+{
+       fixup_enet_clock();
+       setup_iomux_uart();
+       setup_nand_pins();
+       return 0;
+}
+
+int board_init(void)
+{
+       /* address of boot parameters */
+       gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
+       return 0;
+}
+
+int board_late_init(void)
+{
+       setenv("board_name", "imx6logic");
+
+       if (is_mx6dq()) {
+               setenv("board_rev", "MX6DQ");
+               setenv("fdt_file", "imx6q-logicpd.dtb");
+       }
+
+       return 0;
+}
diff --git a/board/logicpd/imx6/mx6q_2x_MT41K512M16HA.cfg b/board/logicpd/imx6/mx6q_2x_MT41K512M16HA.cfg
new file mode 100644 (file)
index 0000000..b206548
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2017 Logic PD, Inc.
+ * Adam Ford <aford173@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ *
+ * Refer doc/README.imximage for more details about how-to configure
+ * and create imximage boot image
+ *
+ * The syntax is taken as close as possible with the kwbimage
+ */
+
+#include <asm/imx-common/imximage.cfg>
+
+/* image version */
+IMAGE_VERSION 2
+
+BOOT_OFFSET FLASH_OFFSET_STANDARD
+
+/*
+ * Device Configuration Data (DCD)
+ *
+ * Each entry must have the format:
+ * Addr-type           Address        Value
+ *
+ * where:
+ *      Addr-type register length (1,2 or 4 bytes)
+ *      Address   absolute address of the register
+ *      value     value to be stored in the register
+ */
+
+#define __ASSEMBLY__
+#include <config.h>
+#include "asm/arch-mx6/mx6-ddr.h"
+#include "asm/arch-mx6/iomux.h"
+#include "asm/arch-mx6/crm_regs.h"
+
+DATA 4, MX6_IOM_GRP_DDR_TYPE, 0x000C0000
+DATA 4, MX6_IOM_GRP_DDRPKE, 0x00000000
+DATA 4, MX6_IOM_DRAM_SDCLK_0, 0x00000030
+DATA 4, MX6_IOM_DRAM_SDCLK_1, 0x00000030
+DATA 4, MX6_IOM_DRAM_CAS, 0x00000030
+DATA 4, MX6_IOM_DRAM_RAS, 0x00000030
+DATA 4, MX6_IOM_GRP_ADDDS, 0x00000030
+DATA 4, MX6_IOM_DRAM_RESET, 0x00000030
+DATA 4, MX6_IOM_DRAM_SDBA2, 0x00000000
+DATA 4, MX6_IOM_DRAM_SDODT0, 0x00000030
+DATA 4, MX6_IOM_DRAM_SDODT1, 0x00000030
+DATA 4, MX6_IOM_GRP_CTLDS, 0x00000030
+DATA 4, MX6_IOM_DDRMODE_CTL, 0x00020000
+DATA 4, MX6_IOM_DRAM_SDQS0, 0x00000030
+DATA 4, MX6_IOM_DRAM_SDQS1, 0x00000030
+DATA 4, MX6_IOM_DRAM_SDQS2, 0x00000030
+DATA 4, MX6_IOM_DRAM_SDQS3, 0x00000030
+DATA 4, MX6_IOM_GRP_DDRMODE, 0x00020000
+DATA 4, MX6_IOM_GRP_B0DS, 0x00000030
+DATA 4, MX6_IOM_GRP_B1DS, 0x00000030
+DATA 4, MX6_IOM_GRP_B2DS, 0x00000030
+DATA 4, MX6_IOM_GRP_B3DS, 0x00000030
+DATA 4, MX6_IOM_DRAM_DQM0, 0x00000030
+DATA 4, MX6_IOM_DRAM_DQM1, 0x00000030
+DATA 4, MX6_IOM_DRAM_DQM2, 0x00000030
+DATA 4, MX6_IOM_DRAM_DQM3, 0x00000030
+DATA 4, MX6_MMDC_P0_MDSCR, 0x00008000
+DATA 4, MX6_MMDC_P0_MPZQHWCTRL, 0xA1390003
+DATA 4, MX6_MMDC_P0_MPWLDECTRL0, 0x002D003A
+DATA 4, MX6_MMDC_P0_MPWLDECTRL1, 0x0038002B
+DATA 4, MX6_MMDC_P0_MPDGCTRL0, 0x03340338
+DATA 4, MX6_MMDC_P0_MPDGCTRL1, 0x0334032C
+DATA 4, MX6_MMDC_P0_MPRDDLCTL, 0x4036383C
+DATA 4, MX6_MMDC_P0_MPWRDLCTL, 0x2E384038
+DATA 4, MX6_MMDC_P0_MPRDDQBY0DL, 0x33333333
+DATA 4, MX6_MMDC_P0_MPRDDQBY1DL, 0x33333333
+DATA 4, MX6_MMDC_P0_MPRDDQBY2DL, 0x33333333
+DATA 4, MX6_MMDC_P0_MPRDDQBY3DL, 0x33333333
+DATA 4, MX6_MMDC_P0_MPMUR0, 0x00000800
+DATA 4, MX6_MMDC_P0_MDPDC, 0x00020036
+DATA 4, MX6_MMDC_P0_MDOTC, 0x09444040
+DATA 4, MX6_MMDC_P0_MDCFG0, 0xB8BE7955
+DATA 4, MX6_MMDC_P0_MDCFG1, 0xFF328F64
+DATA 4, MX6_MMDC_P0_MDCFG2, 0x01FF00DB
+DATA 4, MX6_MMDC_P0_MDMISC, 0x00011740
+DATA 4, MX6_MMDC_P0_MDSCR, 0x00008000
+DATA 4, MX6_MMDC_P0_MDRWD, 0x000026D2
+DATA 4, MX6_MMDC_P0_MDOR, 0x00BE1023
+DATA 4, MX6_MMDC_P0_MDASP, 0x00000047
+DATA 4, MX6_MMDC_P0_MDCTL, 0x85190000
+DATA 4, MX6_MMDC_P0_MDSCR, 0x00888032
+DATA 4, MX6_MMDC_P0_MDSCR, 0x00008033
+DATA 4, MX6_MMDC_P0_MDSCR, 0x00008031
+DATA 4, MX6_MMDC_P0_MDSCR, 0x19408030
+DATA 4, MX6_MMDC_P0_MDSCR, 0x04008040
+DATA 4, MX6_MMDC_P0_MDREF, 0x00007800
+DATA 4, MX6_MMDC_P0_MPODTCTRL, 0x00000007
+DATA 4, MX6_MMDC_P0_MDPDC, 0x00025576
+DATA 4, MX6_MMDC_P0_MAPSR, 0x00011006
+DATA 4, MX6_MMDC_P0_MDSCR, 0x00000000
+
+/* set the default clock gate to save power */
+DATA 4, CCM_CCGR0, 0x00C03F3F
+DATA 4, CCM_CCGR1, 0x0030FC03
+DATA 4, CCM_CCGR2, 0x0FFFC000
+DATA 4, CCM_CCGR3, 0x3FF00000
+DATA 4, CCM_CCGR4, 0xFFFFF300
+DATA 4, CCM_CCGR5, 0x0F0000F3
+DATA 4, CCM_CCGR6, 0x00000FFF
+
+/* enable AXI cache for VDOA/VPU/IPU */
+DATA 4 MX6_IOMUXC_GPR4 0xF00000CF
+/* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */
+DATA 4 MX6_IOMUXC_GPR6 0x007F007F
+DATA 4 MX6_IOMUXC_GPR7 0x007F007F
index 02824eaf4fcb978499ca7b0dae48a5288be6040a..8bf8d5f4e813fe0693267d296fbe9bd45454108c 100644 (file)
@@ -61,7 +61,7 @@ void _machine_restart(void)
  * SDRAM is already configured by the bootstrap code, only return the
  * auto-detected size here
  */
-int initdram(void)
+int dram_init(void)
 {
        gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
                            CONFIG_SYS_MBYTES_SDRAM << 20);
index a2520bc3bc98b94ed251ee822880383405d1ce90..7883a179e85388ae478154bfbdd862ceff9aa29a 100644 (file)
@@ -118,7 +118,7 @@ static void sdram_start(int hi_addr)
 /*
  * Initalize SDRAM - configure SDRAM controller, detect memory size.
  */
-int initdram(void)
+int dram_init(void)
 {
        ulong dramsize = 0;
 #ifndef CONFIG_SYS_RAMBOOT
index e0f4671b17eb3784e2e5b4685c3ecf7846600f35..05c477d38953e97a700c901cd6c7dfb6de7b6e61 100644 (file)
@@ -61,7 +61,7 @@ static long fixed_sdram(void)
        return get_ram_size(CONFIG_SYS_DDR_SDRAM_BASE, msize);
 }
 
-int initdram(void)
+int dram_init(void)
 {
        immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        u32 msize;
index e6422965f9c6619708da4e96b40f317e379fb1b2..4d8671fe67237b7d4e00039c7532358c816f5fc0 100644 (file)
@@ -615,14 +615,14 @@ int checkboard (void)
 /* ------------------------------------------------------------------------- */
 /* ------------------------------------------------------------------------- */
 /*
-  initdram() reads EEPROM via I2c. EEPROM contains all of
+  dram_init() reads EEPROM via I2c. EEPROM contains all of
   the necessary info for SDRAM controller configuration
 */
 /* ------------------------------------------------------------------------- */
 /* ------------------------------------------------------------------------- */
 static int test_dram (unsigned long ramsize);
 
-int initdram(void)
+int dram_init(void)
 {
 
        unsigned long bank_reg[4], tmp, bank_size;
index 7b7b93f6828bb7b704387fd1ca67456c68e84c0b..1288f743cc6bfa0b0b78c020cb94b99166e868c4 100644 (file)
@@ -135,7 +135,7 @@ extern int mem_test (unsigned long start, unsigned long ramsize, int quiet);
 /*
  * Get RAM size.
  */
-int initdram(void)
+int dram_init(void)
 {
        unsigned char board_rev;
        unsigned long reg;
index c07d8f88b9a14a8369fdef44314a127599539e03..408518d648ebe6847a02f8c6e5aa9457063615bf 100644 (file)
@@ -605,14 +605,14 @@ int checkboard (void)
 /* ------------------------------------------------------------------------- */
 /* ------------------------------------------------------------------------- */
 /*
-  initdram() reads EEPROM via I2c. EEPROM contains all of
+  dram_init() reads EEPROM via I2c. EEPROM contains all of
   the necessary info for SDRAM controller configuration
 */
 /* ------------------------------------------------------------------------- */
 /* ------------------------------------------------------------------------- */
 static int test_dram (unsigned long ramsize);
 
-int initdram(void)
+int dram_init(void)
 {
        unsigned long bank_reg[4], tmp, bank_size;
        int i, ds;
index 8f1a5a83411ce251e20d9e7f73deada20cc9e4dc..468eb3723ecf99d0158b86dd2f59ab217a0e3339 100644 (file)
@@ -55,12 +55,12 @@ static void sdram_start (int hi_addr)
 #endif
 
 /*
- * ATTENTION: Although partially referenced initdram does NOT make real use
+ * ATTENTION: Although partially referenced dram_init does NOT make real use
  *            use of CONFIG_SYS_SDRAM_BASE. The code does not work if CONFIG_SYS_SDRAM_BASE
  *            is something else than 0x00000000.
  */
 
-int initdram(void)
+int dram_init(void)
 {
        ulong dramsize = 0;
        ulong dramsize2 = 0;
index e473531fd3c25e55bed252f2c72c48b18222f4d9..1c0540a9899e80ba21530d178a9a054ef0c16810 100644 (file)
@@ -13,7 +13,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int initdram(void)
+int dram_init(void)
 {
        /* Sdram is setup by assembler code */
        /* If memory could be changed, we should return the true value here */
index c833aec9b26fe783f1c0e601c38692e734ff6f9c..9db31d33124f51c5bec68ff4c6714f9e54010e55 100644 (file)
@@ -48,7 +48,7 @@ sdram_conf_t mddrc_config[] = {
        },
 };
 
-int initdram(void)
+int dram_init(void)
 {
        int i;
        u32 msize = 0;
index 19d87169ee56236fb8bfbb4cfb8e4e1a1e22b8c9..983559e81e60d6b7cef02cebb2c1f0266c80d578 100644 (file)
@@ -69,13 +69,13 @@ static void sdram_start(int hi_addr)
 #endif
 
 /*
- * ATTENTION: Although partially referenced initdram does NOT make
+ * ATTENTION: Although partially referenced dram_init does NOT make
  *     real use of CONFIG_SYS_SDRAM_BASE. The code does not
  *     work if CONFIG_SYS_SDRAM_BASE
  *     is something else than 0x00000000.
  */
 
-int initdram(void)
+int dram_init(void)
 {
        volatile struct mpc5xxx_mmap_ctl *mm =
                (struct mpc5xxx_mmap_ctl *)CONFIG_SYS_MBAR;
index 2638ea67d3b0a177b8427549242f09fe72c35aa3..583acc2e440043a2ac05c2d8774a3af6cc07f27e 100644 (file)
@@ -13,7 +13,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int initdram(void)
+int dram_init(void)
 {
        /* Sdram is setup by assembler code */
        /* If memory could be changed, we should return the true value here */
index f01cd7ed52190f2bce9268aabc366e17e141475a..a3395ed68099653689b5aa5b15334b8ab403f7e0 100644 (file)
@@ -37,7 +37,7 @@ int board_early_init_f (void)
 
 #define ns2clk(ns) (ns / (1000000000 / CONFIG_8349_CLKIN) + 1)
 
-int initdram(void)
+int dram_init(void)
 {
        volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        u32 msize = 0;
index 44842d5af19a244b73bbc70350fb9f36401af81d..08ced102b67d50dbe1446cbd0018964b0320361e 100644 (file)
@@ -39,7 +39,7 @@ int checkboard (void)
        return 0;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        long dram_size = 0;
 
index e2b9123bac5e4cfae06ec7e4a4e4fa9c57a8e564..3bfe511a981d1244d4cd2289d23c19d039b48aaf 100644 (file)
@@ -40,7 +40,7 @@ int checkboard(void)
 }
 
 /*
- * in initdram we are here executing from flash
+ * in dram_init we are here executing from flash
  * case 1:
  * is with no ACR/flash cache enabled
  * nop = 40ns (scope measured)
@@ -51,7 +51,7 @@ void fudelay(int usec)
                asm volatile ("nop");
 }
 
-int initdram(void)
+int dram_init(void)
 {
        u32 dramsize, RC;
 
index baf32087400b88ee6e623a0c603282507b1b8fa4..92db093dbf85b3ff7b80870a400d18cc73405ba2 100644 (file)
@@ -128,12 +128,12 @@ static void sdram_start (int hi_addr)
 #endif
 
 /*
- * ATTENTION: Although partially referenced initdram does NOT make real use
+ * ATTENTION: Although partially referenced dram_init does NOT make real use
  *           use of CONFIG_SYS_SDRAM_BASE. The code does not work if CONFIG_SYS_SDRAM_BASE
  *           is something else than 0x00000000.
  */
 
-int initdram(void)
+int dram_init(void)
 {
        ulong dramsize = 0;
        ulong dramsize2 = 0;
index 0968e494a533e697bce21657777d5aec2ddeb0ad..4642342bfb3d7755e425d8a5521ee54027fde4e8 100644 (file)
@@ -66,7 +66,7 @@ int board_early_init_r (void) {
 /**************************************************************************
  * DRAM initalization and size detection
  */
-int initdram(void)
+int dram_init(void)
 {
        long bank_size;
        long size;
index 489a22c1614fdebbb41313257674c1dc1f13815b..58bd7fae47059a4f47dc2464e3d21632a4b04f2f 100644 (file)
@@ -126,7 +126,7 @@ int checkboard (void)
 
 /* ------------------------------------------------------------------------- */
 
-int initdram(void)
+int dram_init(void)
 {
        volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
        volatile memctl8xx_t *memctl = &immap->im_memctl;
index c271fb587344737129c0da942a71d4216a2d879b..73227c1b15cdaac243047829b0fa4205d368f543 100644 (file)
@@ -57,7 +57,7 @@ static void sdram_start(int hi_addr)
 #endif /* !CONFIG_SYS_RAMBOOT */
 
 
-int initdram(void)
+int dram_init(void)
 {
        ulong dramsize = 0;
        ulong dramsize2 = 0;
index abf4e932652320c765dbd69529528b5512d88d44..2ba7b3a3ead087fe9028589b0eee68754e3cca62 100644 (file)
@@ -168,7 +168,7 @@ found:
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size;
 
index 37441c7a468c8fb198bc5fcfcc6e7b0564bf153d..3818ab96b38038a559b3e8a82982ed56d4ecd64a 100644 (file)
@@ -88,7 +88,7 @@ static long fixed_sdram(void)
        return msize;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        volatile immap_t *im = (volatile immap_t *)CONFIG_SYS_IMMR;
        volatile fsl_lbc_t *lbc = &im->im_lbc;
index df5a7a0539f2975548265f40cf0376366d87876e..ef646fa4a13e61224151bde469c4ce2a49d32f17 100644 (file)
@@ -116,7 +116,7 @@ int checkboard(void)
        return 0;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        gd->ram_size = spd_sdram();
 
index e436c28f785771c0471a50fb271ed68ea3e68e9e..19b96f636db893c9cd8ce258accaad5499a02f34 100644 (file)
@@ -58,7 +58,7 @@ int board_early_init_r(void)
        return 0;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        phys_size_t dram_size = fsl_ddr_sdram();
 
index 6148a4b69c11c509955ee970b47adf2254052195..be6b4dc5b9ad05c356efdcdcb7f8d0a09f5cf137 100644 (file)
@@ -23,7 +23,7 @@ int checkboard(void)
        return 0;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        gd->ram_size = get_ram_size(XPAR_DDR2_SDRAM_MEM_BASEADDR,
                            CONFIG_SYS_SDRAM_SIZE_MB * 1024 * 1024);
index d7e6aee706de5a8d4327be80a76f71b12b055742..07a3ab7f82fbbe74fb9774244da6b604628ea1b7 100644 (file)
@@ -19,7 +19,7 @@ int checkboard(void)
        return 0;
 }
 
-int initdram(void)
+int dram_init(void)
 {
        gd->ram_size = get_ram_size(XPAR_DDR2_SDRAM_MEM_BASEADDR,
                            CONFIG_SYS_SDRAM_SIZE_MB * 1024 * 1024);
index 76da3efffec8bd9337bf53d07cd9fabda2f7259a..ee1ae13c06ece13827475c42fb79aaeeed023133 100644 (file)
--- a/cmd/aes.c
+++ b/cmd/aes.c
@@ -9,7 +9,7 @@
 #include <common.h>
 #include <command.h>
 #include <environment.h>
-#include <aes.h>
+#include <uboot_aes.h>
 #include <malloc.h>
 #include <asm/byteorder.h>
 #include <linux/compiler.h>
index b8dcc26eef05f6f0ccec54e2bab34e6939adbacd..f83032ec4572b8c31f839945421772e46a5fbb9e 100644 (file)
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -710,7 +710,7 @@ static int do_mmc_setdsr(cmd_tbl_t *cmdtp, int flag,
 
        if (argc != 2)
                return CMD_RET_USAGE;
-       val = simple_strtoul(argv[2], NULL, 16);
+       val = simple_strtoul(argv[1], NULL, 16);
 
        mmc = find_mmc_device(curr_device);
        if (!mmc) {
index 7993c1a09955af490d10ac846981d3dab8a3bc88..41b4fffcf9e42b7dd28fd7ee9e8b366bf52b0067 100644 (file)
--- a/cmd/pci.c
+++ b/cmd/pci.c
@@ -606,6 +606,47 @@ static int pci_cfg_modify(pci_dev_t bdf, ulong addr, ulong size, ulong value,
        return 0;
 }
 
+#ifdef CONFIG_DM_PCI
+static const struct pci_flag_info {
+       uint flag;
+       const char *name;
+} pci_flag_info[] = {
+       { PCI_REGION_IO, "io" },
+       { PCI_REGION_PREFETCH, "prefetch" },
+       { PCI_REGION_SYS_MEMORY, "sysmem" },
+       { PCI_REGION_RO, "readonly" },
+       { PCI_REGION_IO, "io" },
+};
+
+static void pci_show_regions(struct udevice *bus)
+{
+       struct pci_controller *hose = dev_get_uclass_priv(bus);
+       const struct pci_region *reg;
+       int i, j;
+
+       if (!hose) {
+               printf("Bus '%s' is not a PCI controller\n", bus->name);
+               return;
+       }
+
+       printf("#   %-16s %-16s %-16s  %s\n", "Bus start", "Phys start", "Size",
+              "Flags");
+       for (i = 0, reg = hose->regions; i < hose->region_count; i++, reg++) {
+               printf("%d   %#016llx %#016llx %#016llx  ", i,
+                      (unsigned long long)reg->bus_start,
+                      (unsigned long long)reg->phys_start,
+                      (unsigned long long)reg->size);
+               if (!(reg->flags & PCI_REGION_TYPE))
+                       printf("mem ");
+               for (j = 0; j < ARRAY_SIZE(pci_flag_info); j++) {
+                       if (reg->flags & pci_flag_info[j].flag)
+                               printf("%s ", pci_flag_info[j].name);
+               }
+               printf("\n");
+       }
+}
+#endif
+
 /* PCI Configuration Space access commands
  *
  * Syntax:
@@ -657,10 +698,11 @@ static int do_pci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                pci_init();
                return 0;
 #endif
+       case 'r': /* no break */
        default:                /* scan bus */
                value = 1; /* short listing */
                if (argc > 1) {
-                       if (argv[argc-1][0] == 'l') {
+                       if (cmd != 'r' && argv[argc-1][0] == 'l') {
                                value = 0;
                                argc--;
                        }
@@ -673,7 +715,10 @@ static int do_pci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                        printf("No such bus\n");
                        return CMD_RET_FAILURE;
                }
-               pciinfo(bus, value);
+               if (cmd == 'r')
+                       pci_show_regions(bus);
+               else
+                       pciinfo(bus, value);
 #else
                pciinfo(busnum, value);
 #endif
@@ -745,6 +790,8 @@ static char pci_help_text[] =
 #ifdef CONFIG_DM_PCI
        "pci bar b.d.f\n"
        "    - show BARs base and size for device b.d.f'\n"
+       "pci regions\n"
+       "    - show PCI regions\n"
 #endif
        "pci display[.b, .w, .l] b.d.f [address] [# of objects]\n"
        "    - display PCI configuration space (CFG)\n"
index ff078866655a89af0a7ae4bce1a43cbfae03c077..d9431ee79a86bbcb8d4a3fceabbc8f0d3ae0dc69 100644 (file)
@@ -146,13 +146,6 @@ static int announce_dram_init(void)
        return 0;
 }
 
-#if defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_M68K)
-static int init_func_ram(void)
-{
-       return initdram();
-}
-#endif
-
 static int show_dram_config(void)
 {
        unsigned long long size;
@@ -779,15 +772,7 @@ static const init_fnc_t init_sequence_f[] = {
        init_func_spi,
 #endif
        announce_dram_init,
-       /* TODO: unify all these dram functions? */
-#if defined(CONFIG_ARM) || defined(CONFIG_X86) || defined(CONFIG_NDS32) || \
-               defined(CONFIG_MICROBLAZE) || defined(CONFIG_AVR32) || \
-               defined(CONFIG_SH)
        dram_init,              /* configure available RAM banks */
-#endif
-#if defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_M68K)
-       init_func_ram,
-#endif
 #ifdef CONFIG_POST
        post_init_f,
 #endif
index 7fb62e8b45753616053e7b3856936c0d99a0ad87..6845f8d8d542945f90b005f8fcef1e261092c9c8 100644 (file)
@@ -140,7 +140,7 @@ int set_default_vars(int nvars, char * const vars[])
 }
 
 #ifdef CONFIG_ENV_AES
-#include <aes.h>
+#include <uboot_aes.h>
 /**
  * env_aes_cbc_get_key() - Get AES-128-CBC key for the environment
  *
index 921d3770ead5b6fb5af561c9e82744b2e31eef71..3c50620cb34df8b527131d3809e4ce5cddf3ff12 100644 (file)
@@ -11,6 +11,7 @@
 #ifdef USE_HOSTCC /* Eliminate "ANSI does not permit..." warnings */
 #include <stdint.h>
 #include <stdio.h>
+#include "fw_env_private.h"
 #include "fw_env.h"
 #include <env_attr.h>
 #include <env_flags.h>
index 96d76e45168ecc07b79ffce906a12f0187329ab5..2788219e960cee3ee901e84e516289c1202a11b8 100644 (file)
@@ -45,6 +45,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_CMD_UBI=y
 CONFIG_DM=y
+CONFIG_PHYLIB=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_PCI=y
diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig
new file mode 100644 (file)
index 0000000..7369d23
--- /dev/null
@@ -0,0 +1,68 @@
+CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_TARGET_GW_VENTANA=y
+CONFIG_SPL_I2C_SUPPORT=y
+CONFIG_SPL_MMC_SUPPORT=y
+CONFIG_SPL_POWER_SUPPORT=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_WATCHDOG_SUPPORT=y
+CONFIG_VIDEO=y
+CONFIG_SPL_STACK_R_ADDR=0x18000000
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_OF_BOARD_SETUP=y
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL"
+CONFIG_BOOTDELAY=3
+# CONFIG_SYS_STDIO_DEREGISTER is not set
+# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_BOARD_EARLY_INIT_F=y
+CONFIG_SPL=y
+CONFIG_SPL_STACK_R=y
+CONFIG_SPL_DMA_SUPPORT=y
+CONFIG_SPL_OS_BOOT=y
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_PROMPT="Ventana > "
+CONFIG_CMD_BOOTZ=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_MMC=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_USB_MASS_STORAGE=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_TIME=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
+CONFIG_DM=y
+CONFIG_PHYLIB=y
+CONFIG_MV88E61XX_SWITCH=y
+CONFIG_MV88E61XX_CPU_PORT=5
+CONFIG_MV88E61XX_PHY_PORTS=0xf
+CONFIG_MV88E61XX_FIXED_PORTS=0x0
+CONFIG_NETDEVICES=y
+CONFIG_E1000=y
+CONFIG_PCI=y
+CONFIG_DM_SERIAL=y
+CONFIG_USB=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_KEYBOARD=y
+CONFIG_USB_GADGET=y
+CONFIG_CI_UDC=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_G_DNL_MANUFACTURER="Gateworks"
+CONFIG_G_DNL_VENDOR_NUM=0x0525
+CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
+# CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_OF_LIBFDT=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
index 6cc58970cd2995f7a55a15a8dd22035b3a3ea160..e1e5200889e25be93cd61af3600c68f905d026c7 100644 (file)
@@ -46,6 +46,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_CMD_UBI=y
 CONFIG_DM=y
+CONFIG_PHYLIB=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_PCI=y
index f521292bbf8ba02a70a01fac87fd7ffbfe067802..64fa2ec7cd3877bbd9bb1e877da4d3bead88256a 100644 (file)
@@ -38,4 +38,3 @@ CONFIG_FEC_MXC=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_MXC_UART=y
-CONFIG_BOARD_LATE_INIT=y
index 6bd3387b8ecee8cee26e9f80cc17a1e7ff4d5293..6bbdfa8981f74f85074bc32952d3b0870627e687 100644 (file)
@@ -38,4 +38,3 @@ CONFIG_FEC_MXC=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_MXC_UART=y
-CONFIG_BOARD_LATE_INIT=y
diff --git a/configs/imx6q_logic_defconfig b/configs/imx6q_logic_defconfig
new file mode 100644 (file)
index 0000000..503b14c
--- /dev/null
@@ -0,0 +1,38 @@
+CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
+CONFIG_TARGET_MX6LOGICPD=y
+CONFIG_DEFAULT_DEVICE_TREE="imx6q-logicpd"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/logicpd/imx6/mx6q_2x_MT41K512M16HA.cfg,MX6Q"
+CONFIG_BOOTDELAY=3
+CONFIG_SYS_CONSOLE_IS_IN_ENV=y
+CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_PROMPT="i.MX6 Logic # "
+CONFIG_CMD_BOOTZ=y
+# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_MEMTEST=y
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PMIC=y
+CONFIG_CMD_REGULATOR=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+# CONFIG_BLK is not set
+CONFIG_SYS_I2C_MXC=y
+# CONFIG_DM_MMC_OPS is not set
+CONFIG_NAND_MXS=y
+CONFIG_FEC_MXC=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_IMX6=y
+CONFIG_DM_PMIC_PFUZE100=y
+CONFIG_DM_REGULATOR_PFUZE100=y
index 4c3664f320f2c8f5c7c53cc66ddfb899c94e4d79..94fe80866dcbc7dabf387f9dad92801d38a11b58 100644 (file)
@@ -37,4 +37,3 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_MXC_UART=y
 CONFIG_IMX_THERMAL=y
-CONFIG_BOARD_LATE_INIT=y
index ea2d378dff88b3dd91abea0b2a9dd26c059af736..8ecdd8e569126b340ec8f1bd85ccc9fc8f33e851 100644 (file)
@@ -39,4 +39,3 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_MXC_UART=y
 CONFIG_IMX_THERMAL=y
-CONFIG_BOARD_LATE_INIT=y
index f02a2ac242b75aa5ea322ad4f9eb5f316f77c1ca..6f1a05471f94a42461c7a5bfba4abe1d7d94f0fa 100644 (file)
@@ -40,4 +40,3 @@ CONFIG_PINCTRL_IMX6=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_MXC_UART=y
 CONFIG_IMX_THERMAL=y
-CONFIG_BOARD_LATE_INIT=y
index 9e3b8af989199acaf3068bd3e2d0e30f23102599..4dff335ef5cc530a7b10130a29cbf7daaf8f99a8 100644 (file)
@@ -7,7 +7,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_VIDEO=y
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/denx/m53evk/imximage.cfg"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/aries/m53evk/imximage.cfg"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
index 39bcabad28531fb69d96fa0eef782836faa0ef2e..fcacd21680bf6d69960ec1797d123a009c14276b 100644 (file)
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_MX6SLEVK=y
+CONFIG_DEFAULT_DEVICE_TREE="imx6sl-evk"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL"
 CONFIG_BOOTDELAY=3
 CONFIG_BOARD_EARLY_INIT_F=y
@@ -23,10 +24,23 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
+CONFIG_OF_CONTROL=y
 CONFIG_DM=y
+# CONFIG_BLK is not set
+CONFIG_DM_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_DM_MMC=y
+# CONFIG_DM_MMC_OPS is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_IMX6=y
+CONFIG_DM_PMIC=y
+CONFIG_DM_PMIC_PFUZE100=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_PFUZE100=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_THERMAL=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
-CONFIG_OF_LIBFDT=y
index 7c0a3a801af1fd7cb71c22e263d789c99a3fa1d7..f9eba0c1f6d585b7dd1ee787cb2c977fa77fe6d1 100644 (file)
@@ -1,7 +1,9 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_MX6SLEVK=y
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL,SYS_BOOT_SPINOR"
+CONFIG_DEFAULT_DEVICE_TREE="imx6sl-evk"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL"
+CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_HUSH_PARSER=y
@@ -23,10 +25,23 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
+CONFIG_OF_CONTROL=y
 CONFIG_DM=y
+# CONFIG_BLK is not set
+CONFIG_DM_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_DM_MMC=y
+# CONFIG_DM_MMC_OPS is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_IMX6=y
+CONFIG_DM_PMIC=y
+CONFIG_DM_PMIC_PFUZE100=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_PFUZE100=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_THERMAL=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
-CONFIG_OF_LIBFDT=y
index dcdc747f2e3e0b11adc61cdec197e57784f1ae7d..7d3de1f943e4e05d89650483fb67644b7085199a 100644 (file)
@@ -8,7 +8,7 @@ CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6SL"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6SL,SYS_I2C"
 CONFIG_BOOTDELAY=3
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL=y
index 2cf5011f46bc586bca5a9cf67fdded976d1c2930..00da76e49ee161d15a7a1993b4d07b670f6605b0 100644 (file)
@@ -14,7 +14,10 @@ CONFIG_DEFAULT_DEVICE_TREE="meson-gxbb-odroidc2"
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
 CONFIG_NET_RANDOM_ETHADDR=y
-# CONFIG_MMC is not set
+CONFIG_MMC=y
+CONFIG_DM_MMC=y
+CONFIG_MMC_MESON_GX=y
+CONFIG_CMD_MMC=y
 CONFIG_DM_ETH=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_PINCTRL=y
index 20a065a18db52d680f774af64781457aadab02ae..b61286e84b6bc0bc297615155c7788abdc21f6fc 100644 (file)
@@ -40,6 +40,7 @@ CONFIG_PMIC_ACT8846=y
 CONFIG_REGULATOR_ACT8846=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_RAM=y
+# CONFIG_TPL_DM_SERIAL is not set
 CONFIG_DEBUG_UART=y
 CONFIG_DEBUG_UART_BASE=0x20064000
 CONFIG_DEBUG_UART_CLOCK=24000000
index 3e5849510e58d89ee97da75e69a7154a9c64ef43..2b95a16fc9c865b05dda5c44d47f0fce70ff9ef0 100644 (file)
@@ -8,11 +8,15 @@ CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_FIT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
+CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4_xplained"
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
+CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -26,10 +30,41 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dma-names dmas"
+CONFIG_DM=y
+CONFIG_SPL_DM=y
+CONFIG_CLK=y
+CONFIG_SPL_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_AT91_H32MX=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfc00c000
+CONFIG_DEBUG_UART_CLOCK=88000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
-CONFIG_OF_LIBFDT=y
index 0c47883ddcbea249621afa28058ea56b7626dc9e..b0466c2973985920b851d4e7dc6945601f16585b 100644 (file)
@@ -6,7 +6,10 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_NAND_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_FIT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
+CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4_xplained"
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
@@ -24,10 +27,41 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dma-names dmas"
+CONFIG_DM=y
+CONFIG_SPL_DM=y
+CONFIG_CLK=y
+CONFIG_SPL_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_AT91_H32MX=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfc00c000
+CONFIG_DEBUG_UART_CLOCK=88000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
-CONFIG_OF_LIBFDT=y
index e5d2f54458eb3272d0ffb111b1c3e9c3991f1d1e..57dec69b38015a6a7178a1a27062f577d05a654c 100644 (file)
@@ -4,9 +4,12 @@ CONFIG_TARGET_SAMA5D4_XPLAINED=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4_xplained"
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
 CONFIG_BOOTDELAY=3
@@ -25,10 +28,42 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dma-names dmas"
+CONFIG_DM=y
+CONFIG_SPL_DM=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_CLK=y
+CONFIG_SPL_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_AT91_H32MX=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfc00c000
+CONFIG_DEBUG_UART_CLOCK=88000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
-CONFIG_OF_LIBFDT=y
index 7bf32e3fe7b4a3b3ed7f017efdc7265f6d7379fa..8601d5622b28bbd1fca6dc57a429f9fb4e2765e0 100644 (file)
@@ -8,6 +8,9 @@ CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
+CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4ek"
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
 CONFIG_BOOTDELAY=3
@@ -15,6 +18,7 @@ CONFIG_BOOTDELAY=3
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
+CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -28,9 +32,42 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dma-names dmas"
+CONFIG_DM=y
+CONFIG_SPL_DM=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_CLK=y
+CONFIG_SPL_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_AT91_H32MX=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfc00c000
+CONFIG_DEBUG_UART_CLOCK=88000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
index 609260613b1b47ba459cbbd95e76855516259bf0..a9bcabf1825f1828793b67a5bcb1bdea7a9248ee 100644 (file)
@@ -6,9 +6,13 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_NAND_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
+CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4ek"
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
+CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
@@ -26,11 +30,43 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dma-names dmas"
+CONFIG_DM=y
+CONFIG_SPL_DM=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_CLK=y
+CONFIG_SPL_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_AT91_H32MX=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfc00c000
+CONFIG_DEBUG_UART_CLOCK=88000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index dff8995c4eee3cdbba12fb97f8de4571e43d0f8c..b56fd631f5f9b65138f00d8e05e537e2c13c8a02 100644 (file)
@@ -4,13 +4,15 @@ CONFIG_TARGET_SAMA5D4EK=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4ek"
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
 CONFIG_BOOTDELAY=3
-# CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
@@ -27,11 +29,43 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dma-names dmas"
+CONFIG_DM=y
+CONFIG_SPL_DM=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_CLK=y
+CONFIG_SPL_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_AT91_H32MX=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfc00c000
+CONFIG_DEBUG_UART_CLOCK=88000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index 43c51fe94ddae1ac141a4aa4553dece4fc76afc7..5aa8e253154ece40cde1a05ed6d789558a5f79e7 100644 (file)
@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_SOCFPGA_ARRIA5_SOCDK=y
 CONFIG_SPL_STACK_R_ADDR=0x00800000
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria5_socdk"
+CONFIG_DEFAULT_FDT_FILE="socfpga_arria5_socdk.dtb"
 CONFIG_FIT=y
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
@@ -64,3 +65,5 @@ CONFIG_G_DNL_MANUFACTURER="altera"
 CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 CONFIG_USE_TINY_PRINTF=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2
index 8b050b95c48e5247ad0bfc5e4acae1dde0ce36f0..c8b80844552583ec8b798428d25462fa920471db 100644 (file)
@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_SOCFPGA_CYCLONE5_SOCDK=y
 CONFIG_SPL_STACK_R_ADDR=0x00800000
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk"
+CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_socdk.dtb"
 CONFIG_FIT=y
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
@@ -64,3 +65,5 @@ CONFIG_G_DNL_MANUFACTURER="altera"
 CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 CONFIG_USE_TINY_PRINTF=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2
index af41e1e0d260d9516a5c4a4c706b2d5abb135206..b122135690d025697b7d91ada43fbb6f8d4bf5aa 100644 (file)
@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_SOCFPGA_TERASIC_DE0_NANO=y
 CONFIG_SPL_STACK_R_ADDR=0x00800000
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de0_nano_soc"
+CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de0_nano_soc.dtb"
 CONFIG_FIT=y
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
@@ -58,3 +59,5 @@ CONFIG_G_DNL_MANUFACTURER="terasic"
 CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 CONFIG_USE_TINY_PRINTF=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2
\ No newline at end of file
index 135dfac12c11467ab3aeb881e74b022793593a08..211ea410223f27798992b4f75f91ecf1626b39ae 100644 (file)
@@ -5,6 +5,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_SOCFPGA_TERASIC_DE1_SOC=y
 CONFIG_SPL_STACK_R_ADDR=0x00800000
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de1_soc"
+CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de1_soc.dtb"
 CONFIG_FIT=y
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
index b16ee1c06ab2b61e325c9b1f00be091d13ea21f0..627b90f7718e92617ce21baed94aaf249e80fc7b 100644 (file)
@@ -1,7 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
-CONFIG_TARGET_SOCFPGA_DENX_MCVEVK=y
+CONFIG_TARGET_SOCFPGA_ARIES_MCVEVK=y
 CONFIG_SPL_STACK_R_ADDR=0x00800000
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_mcvevk"
 CONFIG_FIT=y
index d0c2bda18f0dd6ec0678ec4623371ede028092c8..bf607830ac698c7a16deca570c5ca4d14d5b1832 100644 (file)
@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_SOCFPGA_TERASIC_SOCKIT=y
 CONFIG_SPL_STACK_R_ADDR=0x00800000
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_sockit"
+CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_sockit.dtb"
 CONFIG_FIT=y
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
index e9276f90af08260cef8479cdfee5dd859dbcd3b1..4246ad65162083dab480cdd778bfb8cb09d0b77f 100644 (file)
@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_SOCFPGA_EBV_SOCRATES=y
 CONFIG_SPL_STACK_R_ADDR=0x00800000
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socrates"
+CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_socrates.dtb"
 CONFIG_FIT=y
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
index 981600b766aecf5182312d1337d120fa2c9c47b1..ac1ed53eb437eec9e2fc7b64af54b5db9dc58025 100644 (file)
@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_SOCFPGA_SR1500=y
 CONFIG_SPL_STACK_R_ADDR=0x00800000
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_sr1500"
+CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_sr1500.dtb"
 CONFIG_FIT=y
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
index f9b023f28413b6b0d3c0f6183220cda7b066e866..93ed641df30eade78d8cf8f84f58528bbeed6079 100644 (file)
@@ -156,7 +156,7 @@ B) !defined(CONFIG_SYS_RAMBOOT) i.e. NOR boot
        Disable   : 15, 14
 
    11) Create DDR's TLB entriy
-       Location          : Board_init_f -> init_func_ram -> initdram
+       Location          : Board_init_f -> dram_init
        TLB entry  : Search free TLB entry
 
    12) Update Flash's TLB entry
index 4edf19faab8d70170126aa3db5cb01d82eb2f139..e23ab9cc6d9a173756e80d3f4482b6f38ab5e61f 100644 (file)
@@ -95,7 +95,7 @@ Next, configure U-Boot for a MXS based board
 
 Examples:
 
-1. For building U-Boot for Denx M28EVK board:
+1. For building U-Boot for Aries M28EVK board:
 
        $ make m28evk_config
 
index cb805cfd3a0fdcaa7565a02339a48ab0cb569175..cae0ef1a214653915d94fb74b40cd8b4596fed28 100644 (file)
-
---------------------------------------------
+----------------------------------------
 SOCFPGA Documentation for U-Boot and SPL
---------------------------------------------
+----------------------------------------
 
 This README is about U-Boot and SPL support for Altera's ARM Cortex-A9MPCore
 based SOCFPGA. To know more about the hardware itself, please refer to
 www.altera.com.
 
 
---------------------------------------------
 socfpga_dw_mmc
---------------------------------------------
+--------------
+
 Here are macro and detailed configuration required to enable DesignWare SDMMC
 controller support within SOCFPGA
 
 #define CONFIG_SYS_MMC_MAX_BLK_COUNT   256
 -> Using smaller max blk cnt to avoid flooding the limited stack in OCRAM
+
+--------------------------------------------------
+Generating the handoff header files for U-Boot SPL
+--------------------------------------------------
+
+This text is assuming quartus 16.1, but newer versions will probably work just fine too;
+verified with DE1_SOC_Linux_FB demo project (https://github.com/VCTLabs/DE1_SOC_Linux_FB).
+Updated/working projects should build using either process below.
+
+Note: it *should* work from Quartus 14.0.200 onwards, however, the current vendor demo
+projects must have the IP cores updated as shown below.
+
+Rebuilding your Quartus project
+-------------------------------
+
+Choose one of the follwing methods, either command line or GUI.
+
+Using the comaand line
+~~~~~~~~~~~~~~~~~~~~~~
+
+First run the embedded command shell, using your path to the Quartus install:
+
+  $ /path/to/intelFPGA/16.1/embedded/embedded_command_shell.sh
+
+Then (if necessary) update the IP cores in the project, generate HDL code, and
+build the project:
+
+  $ cd path/to/project/dir
+  $ qsys-generate soc_system.qsys --upgrade-ip-cores
+  $ qsys-generate soc_system.qsys --synthesis=[VERILOG|VHDL]
+  $ quartus_sh --flow compile <project name>
+
+Convert the resulting .sof file (SRAM object file) to .rbf file (Raw bit file):
+
+  $ quartus_cpf -c <project_name>.sof soc_system.rbf
+
+
+Generate BSP handoff files
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+You can run the bsp editor GUI below, or run the following command from the
+project directory:
+
+  $ /path/to/bsb/tools/bsp-create-settings --type spl --bsp-dir build \
+      --preloader-settings-dir hps_isw_handoff/soc_system_hps_0/ \
+      --settings build/settings.bsp
+
+You should use the bsp "build" directory above (ie, where the settings.bsp file is)
+in the following u-boot command to update the board headers.  Once these headers
+are updated for a given project build, u-boot should be configured for the
+project board (eg, de0-nano-sockit) and then build the normal spl build.
+
+Now you can skip the GUI section.
+
+
+Using the Qsys GUI
+~~~~~~~~~~~~~~~~~~
+
+1. Navigate to your project directory
+2. Run Quartus II
+3. Open Project (Ctrl+J), select <project_name>.qpf
+4. Run QSys [Tools->QSys]
+  4.1 In the Open dialog, select '<project_name>.qsys'
+  4.2 In the Open System dialog, wait until completion and press 'Close'
+  4.3 In the Qsys window, click on 'Generate HDL...' in bottom right corner
+     4.3.1 In the 'Generation' window, click 'Generate'
+     4.3.2 In the 'Generate' dialog, wait until completion and click 'Close'
+  4.4 In the QSys window, click 'Finish'
+     4.4.1 In the 'Quartus II' pop up window, click 'OK'
+5. Back in Quartus II main window, do the following
+  5.1 Use Processing -> Start -> Start Analysis & Synthesis (Ctrl+K)
+  5.2 Use Processing -> Start Compilation (Ctrl+L)
+
+    ... this may take some time, have patience ...
+
+6. Start the embedded command shell as shown in the previous section
+  6.1 Change directory to 'software/spl_bsp'
+  6.2 Prepare BSP by launching the BSP editor from ECS
+       => bsp-editor
+  6.3 In BSP editor
+      6.3.1 Use File -> Open
+      6.3.2 Select 'settings.bsp' file
+      6.3.3 Click Generate
+      6.3.4 Click Exit
+
+
+Post handoff generation
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Now that the handoff files are generated, U-Boot can be used to process
+the handoff files generated by the bsp-editor. For this, please use the
+following script from the u-boot source tree:
+
+  $ ./arch/arm/mach-socfpga/qts-filter.sh \
+        <soc_type> \
+        <input_qts_dir> \
+        <input_bsp_dir> \
+        <output_dir>
+
+Process QTS-generated files into U-Boot compatible ones.
+
+    soc_type      - Type of SoC, either 'cyclone5' or 'arria5'.
+    input_qts_dir - Directory with compiled Quartus project
+                    and containing the Quartus project file (QPF).
+    input_bsp_dir - Directory with generated bsp containing
+                    the settings.bsp file.
+    output_dir    - Directory to store the U-Boot compatible
+                    headers.
+
+This will generate (or update) the following 4 files:
+
+  iocsr_config.h
+  pinmux_config.h
+  pll_config.h
+  sdram_config.h
+
+These files should be copied into "qts" directory in the board directory
+(see output argument of qts-filter.sh command above).
+
+Here is an example for the DE-0 Nano SoC after the above rebuild process:
+
+  $ ll board/terasic/de0-nano-soc/qts/
+  total 36
+  -rw-r--r-- 1 sarnold sarnold 8826 Mar 21 18:11 iocsr_config.h
+  -rw-r--r-- 1 sarnold sarnold 4398 Mar 21 18:11 pinmux_config.h
+  -rw-r--r-- 1 sarnold sarnold 3190 Mar 21 18:11 pll_config.h
+  -rw-r--r-- 1 sarnold sarnold 9022 Mar 21 18:11 sdram_config.h
+
+Note: file sizes will differ slightly depending on the selected board.
+
+Now your board is ready for full mainline support including U-Boot SPL.
+The Preloader will not be needed any more.
index 0e5d97d166464f3cb77dfff635353dc9d74d1ddc..3e6bbacd15c0064ae7cc67903e522227543c89c4 100644 (file)
@@ -14,6 +14,8 @@ source "drivers/cpu/Kconfig"
 
 source "drivers/crypto/Kconfig"
 
+source "drivers/ddr/Kconfig"
+
 source "drivers/demo/Kconfig"
 
 source "drivers/ddr/fsl/Kconfig"
index e1b0ebffc559c9ddf52c86c68b4404eafe966dae..09a115f753de4b5b6b579c1afbacb2c9a4166802 100644 (file)
@@ -255,8 +255,36 @@ static void *alloc_priv(int size, uint flags)
 
        if (flags & DM_FLAG_ALLOC_PRIV_DMA) {
                priv = memalign(ARCH_DMA_MINALIGN, size);
-               if (priv)
+               if (priv) {
                        memset(priv, '\0', size);
+
+                       /*
+                        * Ensure that the zero bytes are flushed to memory.
+                        * This prevents problems if the driver uses this as
+                        * both an input and an output buffer:
+                        *
+                        * 1. Zeroes written to buffer (here) and sit in the
+                        *      cache
+                        * 2. Driver issues a read command to DMA
+                        * 3. CPU runs out of cache space and evicts some cache
+                        *      data in the buffer, writing zeroes to RAM from
+                        *      the memset() above
+                        * 4. DMA completes
+                        * 5. Buffer now has some DMA data and some zeroes
+                        * 6. Data being read is now incorrect
+                        *
+                        * To prevent this, ensure that the cache is clean
+                        * within this range at the start. The driver can then
+                        * use normal flush-after-write, invalidate-before-read
+                        * procedures.
+                        *
+                        * TODO(sjg@chromium.org): Drop this microblaze
+                        * exception.
+                        */
+#ifndef CONFIG_MICROBLAZE
+                       flush_dcache_range((ulong)priv, (ulong)priv + size);
+#endif
+               }
        } else {
                priv = calloc(1, size);
        }
index d94d43a98d2f8619d6a803029ee2e162fa1d1b24..04fb45b01a54b4d8f014bc4b15238ea5387eb43c 100644 (file)
@@ -250,7 +250,7 @@ int uclass_find_device_by_seq(enum uclass_id id, int seq_or_req_seq,
                return ret;
 
        list_for_each_entry(dev, &uc->dev_head, uclass_node) {
-               debug("   - %d %d\n", dev->req_seq, dev->seq);
+               debug("   - %d %d '%s'\n", dev->req_seq, dev->seq, dev->name);
                if ((find_req_seq ? dev->req_seq : dev->seq) ==
                                seq_or_req_seq) {
                        *devp = dev;
diff --git a/drivers/ddr/Kconfig b/drivers/ddr/Kconfig
new file mode 100644 (file)
index 0000000..b764add
--- /dev/null
@@ -0,0 +1 @@
+source "drivers/ddr/altera/Kconfig"
diff --git a/drivers/ddr/altera/Kconfig b/drivers/ddr/altera/Kconfig
new file mode 100644 (file)
index 0000000..021ec1d
--- /dev/null
@@ -0,0 +1,5 @@
+config ALTERA_SDRAM
+       bool "SoCFPGA DDR SDRAM driver"
+       depends on TARGET_SOCFPGA_GEN5
+       help
+         Enable DDR SDRAM controller for the SoCFPGA devices.
index 1ca705856d2b354a31243c7fe5ac2f82426ff706..bdd28722a98a638b078f73e678c8309f2fb82604 100644 (file)
@@ -8,4 +8,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_ALTERA_SDRAM) += sdram.o sequencer.o
+ifdef CONFIG_ALTERA_SDRAM
+obj-$(CONFIG_TARGET_SOCFPGA_GEN5) += sdram.o sequencer.o
+endif
index 9aa3eecd34fc03e7844bb709da9bf4b14e6362d6..d0a7b3f107630e67b2bb0d2f4248b10774e7efaf 100644 (file)
@@ -786,7 +786,7 @@ phys_size_t __fsl_ddr_sdram(fsl_ddr_info_t *pinfo)
                print_size(total_memory, " of memory\n");
                printf("       This U-Boot only supports < 4G of DDR\n");
                printf("       You could rebuild it with CONFIG_PHYS_64BIT\n");
-               printf("       "); /* re-align to match init_func_ram print */
+               printf("       "); /* re-align to match init_dram print */
                total_memory = CONFIG_MAX_MEM_MAPPED;
        }
 #endif
@@ -796,7 +796,7 @@ phys_size_t __fsl_ddr_sdram(fsl_ddr_info_t *pinfo)
 
 /*
  * fsl_ddr_sdram(void) -- this is the main function to be
- * called by initdram() in the board file.
+ * called by dram_init() in the board file.
  *
  * It returns amount of memory configured in bytes.
  */
index dc4108f378f6fb00d834de803509dbcb129da210..c95e9acd5f73a7383036469c24e02e3af2a66f56 100644 (file)
@@ -28,6 +28,19 @@ config DWAPB_GPIO
        help
          Support for the Designware APB GPIO driver.
 
+config AT91_GPIO
+       bool "AT91 PIO GPIO driver"
+       depends on DM_GPIO
+       default n
+       help
+         Say yes here to select AT91 PIO GPIO driver. AT91 PIO
+         controller manages up to 32 fully programmable input/output
+         lines. Each I/O line may be dedicated as a general-purpose
+         I/O or be assigned to a function of an embedded peripheral.
+         The assignment to a function of an embedded peripheral is
+         the responsibility of AT91 Pinctrl driver. This driver is
+         responsible for the general-purpose I/O.
+
 config ATMEL_PIO4
        bool "ATMEL PIO4 driver"
        depends on DM_GPIO
index 8e52e3dad0af181e0df608466134ea3ba0660bef..98dbd8210eb86046e0ecdeab42ed89810d1ec532 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <clk.h>
 #include <dm.h>
 #include <asm/io.h>
 #include <linux/sizes.h>
@@ -59,11 +60,6 @@ int at91_set_pio_pullup(unsigned port, unsigned pin, int use_pullup)
 {
        struct at91_port *at91_port = at91_pio_get_port(port);
 
-#if defined(CPU_HAS_PIO3)
-       if (use_pullup)
-               at91_set_pio_pulldown(port, pin, 0);
-#endif
-
        if (at91_port && (pin < GPIO_PER_BANK))
                at91_set_port_pullup(at91_port, pin, use_pullup);
 
@@ -100,14 +96,7 @@ int at91_set_a_periph(unsigned port, unsigned pin, int use_pullup)
                mask = 1 << pin;
                writel(mask, &at91_port->idr);
                at91_set_pio_pullup(port, pin, use_pullup);
-#if defined(CPU_HAS_PIO3)
-               writel(readl(&at91_port->abcdsr1) & ~mask,
-                      &at91_port->abcdsr1);
-               writel(readl(&at91_port->abcdsr2) & ~mask,
-                      &at91_port->abcdsr2);
-#else
-               writel(mask, &at91_port->asr);
-#endif
+               writel(mask, &at91_port->mux.pio2.asr);
                writel(mask, &at91_port->pdr);
        }
 
@@ -126,25 +115,62 @@ int at91_set_b_periph(unsigned port, unsigned pin, int use_pullup)
                mask = 1 << pin;
                writel(mask, &at91_port->idr);
                at91_set_pio_pullup(port, pin, use_pullup);
-#if defined(CPU_HAS_PIO3)
-               writel(readl(&at91_port->abcdsr1) | mask,
-                      &at91_port->abcdsr1);
-               writel(readl(&at91_port->abcdsr2) & ~mask,
-                      &at91_port->abcdsr2);
-#else
-               writel(mask, &at91_port->bsr);
-#endif
+               writel(mask, &at91_port->mux.pio2.bsr);
                writel(mask, &at91_port->pdr);
        }
 
        return 0;
 }
 
-#if defined(CPU_HAS_PIO3)
+/*
+ * mux the pin to the "A" internal peripheral role.
+ */
+int at91_pio3_set_a_periph(unsigned port, unsigned pin, int use_pullup)
+{
+       struct at91_port *at91_port = at91_pio_get_port(port);
+       u32 mask;
+
+       if (at91_port && (pin < GPIO_PER_BANK)) {
+               mask = 1 << pin;
+               writel(mask, &at91_port->idr);
+               at91_set_pio_pullup(port, pin, use_pullup);
+               writel(readl(&at91_port->mux.pio3.abcdsr1) & ~mask,
+                      &at91_port->mux.pio3.abcdsr1);
+               writel(readl(&at91_port->mux.pio3.abcdsr2) & ~mask,
+                      &at91_port->mux.pio3.abcdsr2);
+
+               writel(mask, &at91_port->pdr);
+       }
+
+       return 0;
+}
+
+/*
+ * mux the pin to the "B" internal peripheral role.
+ */
+int at91_pio3_set_b_periph(unsigned port, unsigned pin, int use_pullup)
+{
+       struct at91_port *at91_port = at91_pio_get_port(port);
+       u32 mask;
+
+       if (at91_port && (pin < GPIO_PER_BANK)) {
+               mask = 1 << pin;
+               writel(mask, &at91_port->idr);
+               at91_set_pio_pullup(port, pin, use_pullup);
+               writel(readl(&at91_port->mux.pio3.abcdsr1) | mask,
+                      &at91_port->mux.pio3.abcdsr1);
+               writel(readl(&at91_port->mux.pio3.abcdsr2) & ~mask,
+                      &at91_port->mux.pio3.abcdsr2);
+
+               writel(mask, &at91_port->pdr);
+       }
+
+       return 0;
+}
 /*
  * mux the pin to the "C" internal peripheral role.
  */
-int at91_set_c_periph(unsigned port, unsigned pin, int use_pullup)
+int at91_pio3_set_c_periph(unsigned port, unsigned pin, int use_pullup)
 {
        struct at91_port *at91_port = at91_pio_get_port(port);
        u32 mask;
@@ -153,10 +179,10 @@ int at91_set_c_periph(unsigned port, unsigned pin, int use_pullup)
                mask = 1 << pin;
                writel(mask, &at91_port->idr);
                at91_set_pio_pullup(port, pin, use_pullup);
-               writel(readl(&at91_port->abcdsr1) & ~mask,
-                      &at91_port->abcdsr1);
-               writel(readl(&at91_port->abcdsr2) | mask,
-                      &at91_port->abcdsr2);
+               writel(readl(&at91_port->mux.pio3.abcdsr1) & ~mask,
+                      &at91_port->mux.pio3.abcdsr1);
+               writel(readl(&at91_port->mux.pio3.abcdsr2) | mask,
+                      &at91_port->mux.pio3.abcdsr2);
                writel(mask, &at91_port->pdr);
        }
 
@@ -166,7 +192,7 @@ int at91_set_c_periph(unsigned port, unsigned pin, int use_pullup)
 /*
  * mux the pin to the "D" internal peripheral role.
  */
-int at91_set_d_periph(unsigned port, unsigned pin, int use_pullup)
+int at91_pio3_set_d_periph(unsigned port, unsigned pin, int use_pullup)
 {
        struct at91_port *at91_port = at91_pio_get_port(port);
        u32 mask;
@@ -175,16 +201,15 @@ int at91_set_d_periph(unsigned port, unsigned pin, int use_pullup)
                mask = 1 << pin;
                writel(mask, &at91_port->idr);
                at91_set_pio_pullup(port, pin, use_pullup);
-               writel(readl(&at91_port->abcdsr1) | mask,
-                      &at91_port->abcdsr1);
-               writel(readl(&at91_port->abcdsr2) | mask,
-                      &at91_port->abcdsr2);
+               writel(readl(&at91_port->mux.pio3.abcdsr1) | mask,
+                      &at91_port->mux.pio3.abcdsr1);
+               writel(readl(&at91_port->mux.pio3.abcdsr2) | mask,
+                      &at91_port->mux.pio3.abcdsr2);
                writel(mask, &at91_port->pdr);
        }
 
        return 0;
 }
-#endif
 
 #ifdef CONFIG_DM_GPIO
 static bool at91_get_port_output(struct at91_port *at91_port, int offset)
@@ -261,12 +286,29 @@ int at91_set_pio_deglitch(unsigned port, unsigned pin, int is_on)
        struct at91_port *at91_port = at91_pio_get_port(port);
        u32 mask;
 
+       if (at91_port && (pin < GPIO_PER_BANK)) {
+               mask = 1 << pin;
+               if (is_on)
+                       writel(mask, &at91_port->ifer);
+               else
+                       writel(mask, &at91_port->ifdr);
+       }
+
+       return 0;
+}
+
+/*
+ * enable/disable the glitch filter. mostly used with IRQ handling.
+ */
+int at91_pio3_set_pio_deglitch(unsigned port, unsigned pin, int is_on)
+{
+       struct at91_port *at91_port = at91_pio_get_port(port);
+       u32 mask;
+
        if (at91_port && (pin < GPIO_PER_BANK)) {
                mask = 1 << pin;
                if (is_on) {
-#if defined(CPU_HAS_PIO3)
-                       writel(mask, &at91_port->ifscdr);
-#endif
+                       writel(mask, &at91_port->mux.pio3.ifscdr);
                        writel(mask, &at91_port->ifer);
                } else {
                        writel(mask, &at91_port->ifdr);
@@ -276,11 +318,10 @@ int at91_set_pio_deglitch(unsigned port, unsigned pin, int is_on)
        return 0;
 }
 
-#if defined(CPU_HAS_PIO3)
 /*
  * enable/disable the debounce filter.
  */
-int at91_set_pio_debounce(unsigned port, unsigned pin, int is_on, int div)
+int at91_pio3_set_pio_debounce(unsigned port, unsigned pin, int is_on, int div)
 {
        struct at91_port *at91_port = at91_pio_get_port(port);
        u32 mask;
@@ -288,8 +329,8 @@ int at91_set_pio_debounce(unsigned port, unsigned pin, int is_on, int div)
        if (at91_port && (pin < GPIO_PER_BANK)) {
                mask = 1 << pin;
                if (is_on) {
-                       writel(mask, &at91_port->ifscer);
-                       writel(div & PIO_SCDR_DIV, &at91_port->scdr);
+                       writel(mask, &at91_port->mux.pio3.ifscer);
+                       writel(div & PIO_SCDR_DIV, &at91_port->mux.pio3.scdr);
                        writel(mask, &at91_port->ifer);
                } else {
                        writel(mask, &at91_port->ifdr);
@@ -303,7 +344,7 @@ int at91_set_pio_debounce(unsigned port, unsigned pin, int is_on, int div)
  * enable/disable the pull-down.
  * If pull-up already enabled while calling the function, we disable it.
  */
-int at91_set_pio_pulldown(unsigned port, unsigned pin, int is_on)
+int at91_pio3_set_pio_pulldown(unsigned port, unsigned pin, int is_on)
 {
        struct at91_port *at91_port = at91_pio_get_port(port);
        u32 mask;
@@ -312,18 +353,31 @@ int at91_set_pio_pulldown(unsigned port, unsigned pin, int is_on)
                mask = 1 << pin;
                if (is_on) {
                        at91_set_pio_pullup(port, pin, 0);
-                       writel(mask, &at91_port->ppder);
+                       writel(mask, &at91_port->mux.pio3.ppder);
                } else
-                       writel(mask, &at91_port->ppddr);
+                       writel(mask, &at91_port->mux.pio3.ppddr);
        }
 
        return 0;
 }
 
+int at91_pio3_set_pio_pullup(unsigned port, unsigned pin, int use_pullup)
+{
+       struct at91_port *at91_port = at91_pio_get_port(port);
+
+       if (use_pullup)
+               at91_pio3_set_pio_pulldown(port, pin, 0);
+
+       if (at91_port && (pin < GPIO_PER_BANK))
+               at91_set_port_pullup(at91_port, pin, use_pullup);
+
+       return 0;
+}
+
 /*
  * disable Schmitt trigger
  */
-int at91_set_pio_disable_schmitt_trig(unsigned port, unsigned pin)
+int at91_pio3_set_pio_disable_schmitt_trig(unsigned port, unsigned pin)
 {
        struct at91_port *at91_port = at91_pio_get_port(port);
        u32 mask;
@@ -336,7 +390,6 @@ int at91_set_pio_disable_schmitt_trig(unsigned port, unsigned pin)
 
        return 0;
 }
-#endif
 
 /*
  * enable/disable the multi-driver. This is only valid for output and
@@ -517,17 +570,44 @@ static int at91_gpio_probe(struct udevice *dev)
        struct at91_port_priv *port = dev_get_priv(dev);
        struct at91_port_platdata *plat = dev_get_platdata(dev);
        struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
+       struct clk clk;
+       int ret;
+
+       ret = clk_get_by_index(dev, 0, &clk);
+       if (ret)
+               return ret;
+
+       ret = clk_enable(&clk);
+       if (ret)
+               return ret;
+
+       clk_free(&clk);
 
        uc_priv->bank_name = plat->bank_name;
        uc_priv->gpio_count = GPIO_PER_BANK;
+
+#if CONFIG_IS_ENABLED(OF_CONTROL)
+       plat->base_addr = (uint32_t)dev_get_addr_ptr(dev);
+#endif
        port->regs = (struct at91_port *)plat->base_addr;
 
        return 0;
 }
 
+#if CONFIG_IS_ENABLED(OF_CONTROL)
+static const struct udevice_id at91_gpio_ids[] = {
+       { .compatible = "atmel,at91rm9200-gpio" },
+       { }
+};
+#endif
+
 U_BOOT_DRIVER(gpio_at91) = {
        .name   = "gpio_at91",
        .id     = UCLASS_GPIO,
+#if CONFIG_IS_ENABLED(OF_CONTROL)
+       .of_match = at91_gpio_ids,
+       .platdata_auto_alloc_size = sizeof(struct at91_port_platdata),
+#endif
        .ops    = &gpio_at91_ops,
        .probe  = at91_gpio_probe,
        .priv_auto_alloc_size = sizeof(struct at91_port_priv),
index 560391fae249d16c42e8642feeea6165fe6ef381..6ac26dd137c570956b9647cdb1fdaa02ddc0d249 100644 (file)
@@ -105,6 +105,12 @@ config MMC_DW_SOCFPGA
          Synopsys DesignWare Memory Card Interface driver. Select this option
          for platforms based on Altera SOCFPGA.
 
+config MMC_MESON_GX
+       bool "Meson GX EMMC controller support"
+       depends on DM_MMC && BLK && DM_MMC_OPS && ARCH_MESON
+       help
+        Support for EMMC host controller on Meson GX ARM SoCs platform (S905)
+
 config MMC_MXC
        bool "Freescale i.MX21/27/31 or MPC512x Multimedia Card support"
        help
@@ -365,6 +371,15 @@ config MMC_SUNXI
          This selects support for the SD/MMC Host Controller on
          Allwinner sunxi SoCs.
 
+config GENERIC_ATMEL_MCI
+       bool "Atmel Multimedia Card Interface support"
+       depends on DM_MMC && BLK && DM_MMC_OPS && ARCH_AT91
+       help
+         This enables support for Atmel High Speed Multimedia Card Interface
+         (HSMCI), which supports the MultiMedia Card (MMC) Specification V4.3,
+         the SD Memory Card Specification V2.0, the SDIO V2.0 specification
+         and CE-ATA V1.1.
+
 endif
 
 config TEGRA124_MMC_DISABLE_EXT_LOOPBACK
index 6a26a52c282e336fb11c795a73eb3109fbb5376f..a61a9e9ca6c61e8f3c8fece7f0e5f212442321ba 100644 (file)
@@ -29,6 +29,7 @@ ifdef CONFIG_SUPPORT_EMMC_BOOT
 obj-$(CONFIG_GENERIC_MMC) += mmc_boot.o
 endif
 obj-$(CONFIG_GENERIC_ATMEL_MCI) += gen_atmel_mci.o
+obj-$(CONFIG_MMC_MESON_GX) += meson_gx_mmc.o
 obj-$(CONFIG_MMC_SPI) += mmc_spi.o
 obj-$(CONFIG_MVEBU_MMC) += mvebu_mmc.o
 obj-$(CONFIG_MMC_OMAP_HS)              += omap_hsmmc.o
index 29c2a85812fc4a0ad3a44f70d9caefd88d0af56b..20079bce48b81819e923f51b98aa8100b0a49cad 100644 (file)
@@ -44,6 +44,7 @@
 
 /* 400KHz is max freq for card ID etc. Use that as min */
 #define MIN_FREQ 400000
+#define SDHCI_BUFFER 0x20
 
 struct bcm2835_sdhci_host {
        struct sdhci_host host;
@@ -69,8 +70,11 @@ static inline void bcm2835_sdhci_raw_writel(struct sdhci_host *host, u32 val,
         * (Which is just as well - otherwise we'd have to nobble the DMA engine
         * too)
         */
-       while (timer_get_us() - bcm_host->last_write < bcm_host->twoticks_delay)
-               ;
+       if (reg != SDHCI_BUFFER) {
+               while (timer_get_us() - bcm_host->last_write <
+                      bcm_host->twoticks_delay)
+                       ;
+       }
 
        writel(val, host->ioaddr + reg);
        bcm_host->last_write = timer_get_us();
index 7dc4a5de74e88c4f7dd796b6ad95009525a411cb..c25d9ed96ed1c972ff65c3aa2e66a1a95ef94e6d 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <clk.h>
 #include <mmc.h>
 #include <part.h>
 #include <malloc.h>
 #include <asm/byteorder.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/hardware.h>
+#include <dm/device.h>
 #include "atmel_mci.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #ifndef CONFIG_SYS_MMC_CLK_OD
 # define CONFIG_SYS_MMC_CLK_OD 150000
 #endif
@@ -37,6 +41,10 @@ struct atmel_mci_priv {
        struct atmel_mci        *mci;
        unsigned int            initialized:1;
        unsigned int            curr_clk;
+#ifdef CONFIG_DM_MMC
+       struct mmc      mmc;
+       ulong           bus_clk_rate;
+#endif
 };
 
 /* Read Atmel MCI IP version */
@@ -58,11 +66,19 @@ static void dump_cmd(u32 cmdr, u32 arg, u32 status, const char* msg)
 }
 
 /* Setup for MCI Clock and Block Size */
+#ifdef CONFIG_DM_MMC
+static void mci_set_mode(struct atmel_mci_priv *priv, u32 hz, u32 blklen)
+{
+       struct mmc *mmc = &priv->mmc;
+       u32 bus_hz = priv->bus_clk_rate;
+#else
 static void mci_set_mode(struct mmc *mmc, u32 hz, u32 blklen)
 {
        struct atmel_mci_priv *priv = mmc->priv;
-       atmel_mci_t *mci = priv->mci;
        u32 bus_hz = get_mci_clk_rate();
+#endif
+
+       atmel_mci_t *mci = priv->mci;
        u32 clkdiv = 255;
        unsigned int version = atmel_mci_get_version(mci);
        u32 clkodd = 0;
@@ -202,10 +218,18 @@ io_fail:
  * Sends a command out on the bus and deals with the block data.
  * Takes the mmc pointer, a command pointer, and an optional data pointer.
  */
+#ifdef CONFIG_DM_MMC
+static int atmel_mci_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
+                             struct mmc_data *data)
+{
+       struct atmel_mci_priv *priv = dev_get_priv(dev);
+       struct mmc *mmc = mmc_get_mmc_dev(dev);
+#else
 static int
 mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
 {
        struct atmel_mci_priv *priv = mmc->priv;
+#endif
        atmel_mci_t *mci = priv->mci;
        u32 cmdr;
        u32 error_flags = 0;
@@ -335,17 +359,28 @@ mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
        return 0;
 }
 
+#ifdef CONFIG_DM_MMC
+static int atmel_mci_set_ios(struct udevice *dev)
+{
+       struct atmel_mci_priv *priv = dev_get_priv(dev);
+       struct mmc *mmc = mmc_get_mmc_dev(dev);
+#else
 /* Entered into mmc structure during driver init */
 static int mci_set_ios(struct mmc *mmc)
 {
        struct atmel_mci_priv *priv = mmc->priv;
+#endif
        atmel_mci_t *mci = priv->mci;
        int bus_width = mmc->bus_width;
        unsigned int version = atmel_mci_get_version(mci);
        int busw;
 
        /* Set the clock speed */
+#ifdef CONFIG_DM_MMC
+       mci_set_mode(priv, mmc->clock, MMC_DEFAULT_BLKLEN);
+#else
        mci_set_mode(mmc, mmc->clock, MMC_DEFAULT_BLKLEN);
+#endif
 
        /*
         * set the bus width and select slot for this interface
@@ -374,10 +409,15 @@ static int mci_set_ios(struct mmc *mmc)
        return 0;
 }
 
+#ifdef CONFIG_DM_MMC
+static int atmel_mci_hw_init(struct atmel_mci_priv *priv)
+{
+#else
 /* Entered into mmc structure during driver init */
 static int mci_init(struct mmc *mmc)
 {
        struct atmel_mci_priv *priv = mmc->priv;
+#endif
        atmel_mci_t *mci = priv->mci;
 
        /* Initialize controller */
@@ -392,11 +432,16 @@ static int mci_init(struct mmc *mmc)
        writel(~0UL, &mci->idr);
 
        /* Set default clocks and blocklen */
+#ifdef CONFIG_DM_MMC
+       mci_set_mode(priv, CONFIG_SYS_MMC_CLK_OD, MMC_DEFAULT_BLKLEN);
+#else
        mci_set_mode(mmc, CONFIG_SYS_MMC_CLK_OD, MMC_DEFAULT_BLKLEN);
+#endif
 
        return 0;
 }
 
+#ifndef CONFIG_DM_MMC
 static const struct mmc_ops atmel_mci_ops = {
        .send_cmd       = mci_send_cmd,
        .set_ios        = mci_set_ios,
@@ -456,3 +501,114 @@ int atmel_mci_init(void *regs)
 
        return 0;
 }
+#endif
+
+#ifdef CONFIG_DM_MMC
+static const struct dm_mmc_ops atmel_mci_mmc_ops = {
+       .send_cmd = atmel_mci_send_cmd,
+       .set_ios = atmel_mci_set_ios,
+};
+
+static void atmel_mci_setup_cfg(struct atmel_mci_priv *priv)
+{
+       struct mmc_config *cfg;
+       u32 version;
+
+       cfg = &priv->cfg;
+       cfg->name = "Atmel mci";
+       cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
+
+       /*
+        * If the version is above 3.0, the capabilities of the 8-bit
+        * bus width and high speed are supported.
+        */
+       version = atmel_mci_get_version(priv->mci);
+       if ((version & 0xf00) >= 0x300) {
+               cfg->host_caps = MMC_MODE_8BIT |
+                                MMC_MODE_HS | MMC_MODE_HS_52MHz;
+       }
+
+       cfg->host_caps |= MMC_MODE_4BIT;
+       cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
+       cfg->f_min = priv->bus_clk_rate / (2 * 256);
+       cfg->f_max = priv->bus_clk_rate / 2;
+}
+
+static int atmel_mci_enable_clk(struct udevice *dev)
+{
+       struct atmel_mci_priv *priv = dev_get_priv(dev);
+       struct clk clk;
+       ulong clk_rate;
+       int ret = 0;
+
+       ret = clk_get_by_index(dev, 0, &clk);
+       if (ret) {
+               ret = -EINVAL;
+               goto failed;
+       }
+
+       ret = clk_enable(&clk);
+       if (ret)
+               goto failed;
+
+       clk_rate = clk_get_rate(&clk);
+       if (!clk_rate) {
+               ret = -EINVAL;
+               goto failed;
+       }
+
+       priv->bus_clk_rate = clk_rate;
+
+failed:
+       clk_free(&clk);
+
+       return ret;
+}
+
+static int atmel_mci_probe(struct udevice *dev)
+{
+       struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
+       struct atmel_mci_priv *priv = dev_get_priv(dev);
+       struct mmc *mmc;
+       int ret;
+
+       ret = atmel_mci_enable_clk(dev);
+       if (ret)
+               return ret;
+
+       priv->mci = (struct atmel_mci *)dev_get_addr_ptr(dev);
+
+       atmel_mci_setup_cfg(priv);
+
+       mmc = &priv->mmc;
+       mmc->cfg = &priv->cfg;
+       mmc->dev = dev;
+       upriv->mmc = mmc;
+
+       atmel_mci_hw_init(priv);
+
+       return 0;
+}
+
+static int atmel_mci_bind(struct udevice *dev)
+{
+       struct atmel_mci_priv *priv = dev_get_priv(dev);
+
+       return mmc_bind(dev, &priv->mmc, &priv->cfg);
+}
+
+static const struct udevice_id atmel_mci_ids[] = {
+       { .compatible = "atmel,hsmci" },
+       { }
+};
+
+U_BOOT_DRIVER(atmel_mci) = {
+       .name = "atmel-mci",
+       .id = UCLASS_MMC,
+       .of_match = atmel_mci_ids,
+       .bind = atmel_mci_bind,
+       .probe = atmel_mci_probe,
+       .priv_auto_alloc_size = sizeof(struct atmel_mci_priv),
+       .ops = &atmel_mci_mmc_ops,
+};
+#endif
diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c
new file mode 100644 (file)
index 0000000..8e28ab7
--- /dev/null
@@ -0,0 +1,291 @@
+/*
+ * (C) Copyright 2016 Carlo Caione <carlo@caione.org>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <fdtdec.h>
+#include <malloc.h>
+#include <mmc.h>
+#include <asm/io.h>
+#include <asm/arch/sd_emmc.h>
+#include <dm/device.h>
+#include <linux/log2.h>
+
+static inline void *get_regbase(const struct mmc *mmc)
+{
+       struct meson_mmc_platdata *pdata = mmc->priv;
+
+       return pdata->regbase;
+}
+
+static inline uint32_t meson_read(struct mmc *mmc, int offset)
+{
+       return readl(get_regbase(mmc) + offset);
+}
+
+static inline void meson_write(struct mmc *mmc, uint32_t val, int offset)
+{
+       writel(val, get_regbase(mmc) + offset);
+}
+
+static void meson_mmc_config_clock(struct mmc *mmc)
+{
+       uint32_t meson_mmc_clk = 0;
+       unsigned int clk, clk_src, clk_div;
+
+       /* 1GHz / CLK_MAX_DIV = 15,9 MHz */
+       if (mmc->clock > 16000000) {
+               clk = SD_EMMC_CLKSRC_DIV2;
+               clk_src = CLK_SRC_DIV2;
+       } else {
+               clk = SD_EMMC_CLKSRC_24M;
+               clk_src = CLK_SRC_24M;
+       }
+       clk_div = DIV_ROUND_UP(clk, mmc->clock);
+
+       /* 180 phase core clock */
+       meson_mmc_clk |= CLK_CO_PHASE_180;
+
+       /* 180 phase tx clock */
+       meson_mmc_clk |= CLK_TX_PHASE_000;
+
+       /* clock settings */
+       meson_mmc_clk |= clk_src;
+       meson_mmc_clk |= clk_div;
+
+       meson_write(mmc, meson_mmc_clk, MESON_SD_EMMC_CLOCK);
+}
+
+static int meson_dm_mmc_set_ios(struct udevice *dev)
+{
+       struct mmc *mmc = mmc_get_mmc_dev(dev);
+       uint32_t meson_mmc_cfg;
+
+       meson_mmc_config_clock(mmc);
+
+       meson_mmc_cfg = meson_read(mmc, MESON_SD_EMMC_CFG);
+
+       meson_mmc_cfg &= ~CFG_BUS_WIDTH_MASK;
+       if (mmc->bus_width == 1)
+               meson_mmc_cfg |= CFG_BUS_WIDTH_1;
+       else if (mmc->bus_width == 4)
+               meson_mmc_cfg |= CFG_BUS_WIDTH_4;
+       else if (mmc->bus_width == 8)
+               meson_mmc_cfg |= CFG_BUS_WIDTH_8;
+       else
+               return -EINVAL;
+
+       /* 512 bytes block length */
+       meson_mmc_cfg &= ~CFG_BL_LEN_MASK;
+       meson_mmc_cfg |= CFG_BL_LEN_512;
+
+       /* Response timeout 256 clk */
+       meson_mmc_cfg &= ~CFG_RESP_TIMEOUT_MASK;
+       meson_mmc_cfg |= CFG_RESP_TIMEOUT_256;
+
+       /* Command-command gap 16 clk */
+       meson_mmc_cfg &= ~CFG_RC_CC_MASK;
+       meson_mmc_cfg |= CFG_RC_CC_16;
+
+       meson_write(mmc, meson_mmc_cfg, MESON_SD_EMMC_CFG);
+
+       return 0;
+}
+
+static void meson_mmc_setup_cmd(struct mmc *mmc, struct mmc_data *data,
+                               struct mmc_cmd *cmd)
+{
+       uint32_t meson_mmc_cmd = 0, cfg;
+
+       meson_mmc_cmd |= cmd->cmdidx << CMD_CFG_CMD_INDEX_SHIFT;
+
+       if (cmd->resp_type & MMC_RSP_PRESENT) {
+               if (cmd->resp_type & MMC_RSP_136)
+                       meson_mmc_cmd |= CMD_CFG_RESP_128;
+
+               if (cmd->resp_type & MMC_RSP_BUSY)
+                       meson_mmc_cmd |= CMD_CFG_R1B;
+
+               if (!(cmd->resp_type & MMC_RSP_CRC))
+                       meson_mmc_cmd |= CMD_CFG_RESP_NOCRC;
+       } else {
+               meson_mmc_cmd |= CMD_CFG_NO_RESP;
+       }
+
+       if (data) {
+               cfg = meson_read(mmc, MESON_SD_EMMC_CFG);
+               cfg &= ~CFG_BL_LEN_MASK;
+               cfg |= ilog2(data->blocksize) << CFG_BL_LEN_SHIFT;
+               meson_write(mmc, cfg, MESON_SD_EMMC_CFG);
+
+               if (data->flags == MMC_DATA_WRITE)
+                       meson_mmc_cmd |= CMD_CFG_DATA_WR;
+
+               meson_mmc_cmd |= CMD_CFG_DATA_IO | CMD_CFG_BLOCK_MODE |
+                                data->blocks;
+       }
+
+       meson_mmc_cmd |= CMD_CFG_TIMEOUT_4S | CMD_CFG_OWNER |
+                        CMD_CFG_END_OF_CHAIN;
+
+       meson_write(mmc, meson_mmc_cmd, MESON_SD_EMMC_CMD_CFG);
+}
+
+static void meson_mmc_setup_addr(struct mmc *mmc, struct mmc_data *data)
+{
+       struct meson_mmc_platdata *pdata = mmc->priv;
+       unsigned int data_size;
+       uint32_t data_addr = 0;
+
+       if (data) {
+               data_size = data->blocks * data->blocksize;
+
+               if (data->flags == MMC_DATA_READ) {
+                       data_addr = (ulong) data->dest;
+                       invalidate_dcache_range(data_addr,
+                                               data_addr + data_size);
+               } else {
+                       pdata->w_buf = calloc(data_size, sizeof(char));
+                       data_addr = (ulong) pdata->w_buf;
+                       memcpy(pdata->w_buf, data->src, data_size);
+                       flush_dcache_range(data_addr, data_addr + data_size);
+               }
+       }
+
+       meson_write(mmc, data_addr, MESON_SD_EMMC_CMD_DAT);
+}
+
+static void meson_mmc_read_response(struct mmc *mmc, struct mmc_cmd *cmd)
+{
+       if (cmd->resp_type & MMC_RSP_136) {
+               cmd->response[0] = meson_read(mmc, MESON_SD_EMMC_CMD_RSP3);
+               cmd->response[1] = meson_read(mmc, MESON_SD_EMMC_CMD_RSP2);
+               cmd->response[2] = meson_read(mmc, MESON_SD_EMMC_CMD_RSP1);
+               cmd->response[3] = meson_read(mmc, MESON_SD_EMMC_CMD_RSP);
+       } else {
+               cmd->response[0] = meson_read(mmc, MESON_SD_EMMC_CMD_RSP);
+       }
+}
+
+static int meson_dm_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
+                                struct mmc_data *data)
+{
+       struct mmc *mmc = mmc_get_mmc_dev(dev);
+       struct meson_mmc_platdata *pdata = mmc->priv;
+       uint32_t status;
+       ulong start;
+       int ret = 0;
+
+       /* max block size supported by chip is 512 byte */
+       if (data && data->blocksize > 512)
+               return -EINVAL;
+
+       meson_mmc_setup_cmd(mmc, data, cmd);
+       meson_mmc_setup_addr(mmc, data);
+
+       meson_write(mmc, cmd->cmdarg, MESON_SD_EMMC_CMD_ARG);
+
+       /* use 10s timeout */
+       start = get_timer(0);
+       do {
+               status = meson_read(mmc, MESON_SD_EMMC_STATUS);
+       } while(!(status & STATUS_END_OF_CHAIN) && get_timer(start) < 10000);
+
+       if (!(status & STATUS_END_OF_CHAIN))
+               ret = -ETIMEDOUT;
+       else if (status & STATUS_RESP_TIMEOUT)
+               ret = -ETIMEDOUT;
+       else if (status & STATUS_ERR_MASK)
+               ret = -EIO;
+
+       meson_mmc_read_response(mmc, cmd);
+
+       if (data && data->flags == MMC_DATA_WRITE)
+               free(pdata->w_buf);
+
+       /* reset status bits */
+       meson_write(mmc, STATUS_MASK, MESON_SD_EMMC_STATUS);
+
+       return ret;
+}
+
+static const struct dm_mmc_ops meson_dm_mmc_ops = {
+       .send_cmd = meson_dm_mmc_send_cmd,
+       .set_ios = meson_dm_mmc_set_ios,
+};
+
+static int meson_mmc_ofdata_to_platdata(struct udevice *dev)
+{
+       struct meson_mmc_platdata *pdata = dev_get_platdata(dev);
+       fdt_addr_t addr;
+
+       addr = dev_get_addr(dev);
+       if (addr == FDT_ADDR_T_NONE)
+               return -EINVAL;
+
+       pdata->regbase = (void *)addr;
+
+       return 0;
+}
+
+static int meson_mmc_probe(struct udevice *dev)
+{
+       struct meson_mmc_platdata *pdata = dev_get_platdata(dev);
+       struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
+       struct mmc *mmc = &pdata->mmc;
+       struct mmc_config *cfg = &pdata->cfg;
+       uint32_t val;
+
+       cfg->voltages = MMC_VDD_33_34 | MMC_VDD_32_33 |
+                       MMC_VDD_31_32 | MMC_VDD_165_195;
+       cfg->host_caps = MMC_MODE_8BIT | MMC_MODE_4BIT |
+                       MMC_MODE_HS_52MHz | MMC_MODE_HS;
+       cfg->f_min = DIV_ROUND_UP(SD_EMMC_CLKSRC_24M, CLK_MAX_DIV);
+       cfg->f_max = 100000000; /* 100 MHz */
+       cfg->b_max = 256; /* max 256 blocks */
+       cfg->name = dev->name;
+
+       mmc->priv = pdata;
+       upriv->mmc = mmc;
+
+       mmc_set_clock(mmc, cfg->f_min);
+
+       /* reset all status bits */
+       meson_write(mmc, STATUS_MASK, MESON_SD_EMMC_STATUS);
+
+       /* disable interrupts */
+       meson_write(mmc, 0, MESON_SD_EMMC_IRQ_EN);
+
+       /* enable auto clock mode */
+       val = meson_read(mmc, MESON_SD_EMMC_CFG);
+       val &= ~CFG_SDCLK_ALWAYS_ON;
+       val |= CFG_AUTO_CLK;
+       meson_write(mmc, val, MESON_SD_EMMC_CFG);
+
+       return 0;
+}
+
+int meson_mmc_bind(struct udevice *dev)
+{
+       struct meson_mmc_platdata *pdata = dev_get_platdata(dev);
+
+       return mmc_bind(dev, &pdata->mmc, &pdata->cfg);
+}
+
+static const struct udevice_id meson_mmc_match[] = {
+       { .compatible = "amlogic,meson-gx-mmc" },
+       { /* sentinel */ }
+};
+
+U_BOOT_DRIVER(meson_mmc) = {
+       .name = "meson_gx_mmc",
+       .id = UCLASS_MMC,
+       .of_match = meson_mmc_match,
+       .ops = &meson_dm_mmc_ops,
+       .probe = meson_mmc_probe,
+       .bind = meson_mmc_bind,
+       .ofdata_to_platdata = meson_mmc_ofdata_to_platdata,
+       .platdata_auto_alloc_size = sizeof(struct meson_mmc_platdata),
+};
index c94d58db65c70ee8b32cd64e79ebd1b8f44dc262..b745977b3fba17dcd2299dfde73c47688b3835ae 100644 (file)
@@ -72,6 +72,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data,
                                unsigned int start_addr)
 {
        unsigned int stat, rdy, mask, timeout, block = 0;
+       bool transfer_done = false;
 #ifdef CONFIG_MMC_SDHCI_SDMA
        unsigned char ctrl;
        ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL);
@@ -89,17 +90,23 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data,
                               __func__, stat);
                        return -EIO;
                }
-               if (stat & rdy) {
+               if (!transfer_done && (stat & rdy)) {
                        if (!(sdhci_readl(host, SDHCI_PRESENT_STATE) & mask))
                                continue;
                        sdhci_writel(host, rdy, SDHCI_INT_STATUS);
                        sdhci_transfer_pio(host, data);
                        data->dest += data->blocksize;
-                       if (++block >= data->blocks)
-                               break;
+                       if (++block >= data->blocks) {
+                               /* Keep looping until the SDHCI_INT_DATA_END is
+                                * cleared, even if we finished sending all the
+                                * blocks.
+                                */
+                               transfer_done = true;
+                               continue;
+                       }
                }
 #ifdef CONFIG_MMC_SDHCI_SDMA
-               if (stat & SDHCI_INT_DMA_END) {
+               if (!transfer_done && (stat & SDHCI_INT_DMA_END)) {
                        sdhci_writel(host, SDHCI_INT_DMA_END, SDHCI_INT_STATUS);
                        start_addr &= ~(SDHCI_DEFAULT_BOUNDARY_SIZE - 1);
                        start_addr += SDHCI_DEFAULT_BOUNDARY_SIZE;
index 8669432debb47244ea0c28c462b028263fe939ee..21d5d0e70d01226eec980a155124740afcdcb2c8 100644 (file)
@@ -1222,7 +1222,8 @@ static void at91_nand_hwcontrol(struct mtd_info *mtd,
                        IO_ADDR_W |= CONFIG_SYS_NAND_MASK_ALE;
 
 #ifdef CONFIG_SYS_NAND_ENABLE_PIN
-               gpio_set_value(CONFIG_SYS_NAND_ENABLE_PIN, !(ctrl & NAND_NCE));
+               at91_set_gpio_value(CONFIG_SYS_NAND_ENABLE_PIN,
+                                   !(ctrl & NAND_NCE));
 #endif
                this->IO_ADDR_W = (void *) IO_ADDR_W;
        }
@@ -1234,7 +1235,7 @@ static void at91_nand_hwcontrol(struct mtd_info *mtd,
 #ifdef CONFIG_SYS_NAND_READY_PIN
 static int at91_nand_ready(struct mtd_info *mtd)
 {
-       return gpio_get_value(CONFIG_SYS_NAND_READY_PIN);
+       return at91_get_gpio_value(CONFIG_SYS_NAND_READY_PIN);
 }
 #endif
 
index be3d82e67eaccb9dd76c111263856215bdccc665..eb8d2b31ecb61f890487e7c10ea363ded186ac96 100644 (file)
@@ -333,7 +333,7 @@ static int at91emac_init(struct eth_device *netdev, bd_t *bd)
                ATMEL_PMX_AA_ETXEN |    ATMEL_PMX_AA_EREFCK;
 
        writel(value, &pio->pioa.pdr);
-       writel(value, &pio->pioa.asr);
+       writel(value, &pio->pioa.mux.pio2.asr);
 
 #ifdef CONFIG_RMII
        value = ATMEL_PMX_BA_ERXCK;
@@ -344,7 +344,7 @@ static int at91emac_init(struct eth_device *netdev, bd_t *bd)
                ATMEL_PMX_BA_ETX3 |     ATMEL_PMX_BA_ETX2;
 #endif
        writel(value, &pio->piob.pdr);
-       writel(value, &pio->piob.bsr);
+       writel(value, &pio->piob.mux.pio2.bsr);
 
        at91_periph_clk_enable(ATMEL_ID_EMAC);
 
index e562a8ac1a77852c4cf7094c6e17e1966bd55bc0..aca3990aebf12296701c1d48d44522bd966f7551 100644 (file)
@@ -15,6 +15,19 @@ if PHYLIB
 config MV88E61XX_SWITCH
        bool "Marvel MV88E61xx Ethernet switch PHY support."
 
+if MV88E61XX_SWITCH
+
+config MV88E61XX_CPU_PORT
+       int "CPU Port"
+
+config MV88E61XX_PHY_PORTS
+       hex "Bitmask of PHY Ports"
+
+config MV88E61XX_FIXED_PORTS
+       hex "Bitmask of PHYless serdes Ports"
+
+endif # MV88E61XX_SWITCH
+
 config PHYLIB_10G
        bool "Generic 10G PHY support"
 
index 9d0f5016ca4ae9e1df5c303891e012dfa600625b..355aeae854d8dd554997b59ad66b1f8d380ff19f 100644 (file)
@@ -150,6 +150,20 @@ config ROCKCHIP_RK3288_PINCTRL
          definitions and pin control functions for each available multiplex
          function.
 
+config PINCTRL_AT91
+       bool "AT91 pinctrl driver"
+       depends on DM
+       help
+         This option is to enable the AT91 pinctrl driver for AT91 PIO
+         controller. AT91 PIO controller is a combined gpio-controller,
+         pin-mux and pin-config module. Each I/O pin may be dedicated as
+         a general-purpose I/O or be assigned to a function of an embedded
+         peripheral. Each I/O pin has a glitch filter providing rejection of
+         glitches lower than one-half of peripheral clock cycle and
+         a debouncing filter providing rejection of unwanted pulses from key
+         or push button operations. You can also control the multi-driver
+         capability, pull-up and pull-down feature on each I/O pin.
+
 config PINCTRL_AT91PIO4
        bool "AT91 PIO4 pinctrl driver"
        depends on DM
index 2ac9c19734eb12e3c91f73a383886e2e8e5f410f..bbb2480e865173405768ee30e9527677f16f3bd8 100644 (file)
@@ -5,6 +5,7 @@
 obj-y                                  += pinctrl-uclass.o
 obj-$(CONFIG_$(SPL_)PINCTRL_GENERIC)   += pinctrl-generic.o
 
+obj-$(CONFIG_PINCTRL_AT91)             += pinctrl-at91.o
 obj-$(CONFIG_PINCTRL_AT91PIO4)         += pinctrl-at91-pio4.o
 obj-y                                  += nxp/
 obj-$(CONFIG_ARCH_ATH79) += ath79/
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
new file mode 100644 (file)
index 0000000..904e1bd
--- /dev/null
@@ -0,0 +1,453 @@
+/*
+ * Atmel PIO pinctrl driver
+ *
+ * Copyright (C) 2016 Atmel Corporation
+ *               Wenyou.Yang <wenyou.yang@atmel.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm/device.h>
+#include <dm/pinctrl.h>
+#include <linux/io.h>
+#include <linux/err.h>
+#include <mach/at91_pio.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define MAX_GPIO_BANKS         5
+#define MAX_NB_GPIO_PER_BANK   32
+
+#define MAX_PINMUX_ENTRIES     200
+
+struct at91_pinctrl_priv {
+       struct at91_port *reg_base[MAX_GPIO_BANKS];
+       u32 nbanks;
+};
+
+#define PULL_UP                        BIT(0)
+#define MULTI_DRIVE            BIT(1)
+#define DEGLITCH               BIT(2)
+#define PULL_DOWN              BIT(3)
+#define DIS_SCHMIT             BIT(4)
+#define DRIVE_STRENGTH_SHIFT   5
+#define DRIVE_STRENGTH_MASK    0x3
+#define DRIVE_STRENGTH         (DRIVE_STRENGTH_MASK << DRIVE_STRENGTH_SHIFT)
+#define OUTPUT                 BIT(7)
+#define OUTPUT_VAL_SHIFT       8
+#define OUTPUT_VAL             (0x1 << OUTPUT_VAL_SHIFT)
+#define DEBOUNCE               BIT(16)
+#define DEBOUNCE_VAL_SHIFT     17
+#define DEBOUNCE_VAL           (0x3fff << DEBOUNCE_VAL_SHIFT)
+
+/**
+ * These defines will translated the dt binding settings to our internal
+ * settings. They are not necessarily the same value as the register setting.
+ * The actual drive strength current of low, medium and high must be looked up
+ * from the corresponding device datasheet. This value is different for pins
+ * that are even in the same banks. It is also dependent on VCC.
+ * DRIVE_STRENGTH_DEFAULT is just a placeholder to avoid changing the drive
+ * strength when there is no dt config for it.
+ */
+#define DRIVE_STRENGTH_DEFAULT (0 << DRIVE_STRENGTH_SHIFT)
+#define DRIVE_STRENGTH_LOW     (1 << DRIVE_STRENGTH_SHIFT)
+#define DRIVE_STRENGTH_MED     (2 << DRIVE_STRENGTH_SHIFT)
+#define DRIVE_STRENGTH_HI      (3 << DRIVE_STRENGTH_SHIFT)
+
+enum at91_mux {
+       AT91_MUX_GPIO = 0,
+       AT91_MUX_PERIPH_A = 1,
+       AT91_MUX_PERIPH_B = 2,
+       AT91_MUX_PERIPH_C = 3,
+       AT91_MUX_PERIPH_D = 4,
+};
+
+/**
+ * struct at91_pinctrl_mux_ops - describes an AT91 mux ops group
+ * on new IP with support for periph C and D the way to mux in
+ * periph A and B has changed
+ * So provide the right callbacks
+ * if not present means the IP does not support it
+ * @mux_A_periph: assign the corresponding pin to the peripheral A function.
+ * @mux_B_periph: assign the corresponding pin to the peripheral B function.
+ * @mux_C_periph: assign the corresponding pin to the peripheral C function.
+ * @mux_D_periph: assign the corresponding pin to the peripheral D function.
+ * @set_deglitch: enable/disable the deglitch feature.
+ * @set_debounce: enable/disable the debounce feature.
+ * @set_pulldown: enable/disable the pulldown feature.
+ * @disable_schmitt_trig: disable schmitt trigger
+ */
+struct at91_pinctrl_mux_ops {
+       void (*mux_A_periph)(struct at91_port *pio, u32 mask);
+       void (*mux_B_periph)(struct at91_port *pio, u32 mask);
+       void (*mux_C_periph)(struct at91_port *pio, u32 mask);
+       void (*mux_D_periph)(struct at91_port *pio, u32 mask);
+       void (*set_deglitch)(struct at91_port *pio, u32 mask, bool is_on);
+       void (*set_debounce)(struct at91_port *pio, u32 mask, bool is_on,
+                            u32 div);
+       void (*set_pulldown)(struct at91_port *pio, u32 mask, bool is_on);
+       void (*disable_schmitt_trig)(struct at91_port *pio, u32 mask);
+       void (*set_drivestrength)(struct at91_port *pio, u32 pin,
+                                 u32 strength);
+};
+
+static u32 two_bit_pin_value_shift_amount(u32 pin)
+{
+       /* return the shift value for a pin for "two bit" per pin registers,
+        * i.e. drive strength */
+       return 2 * ((pin >= MAX_NB_GPIO_PER_BANK/2)
+                       ? pin - MAX_NB_GPIO_PER_BANK/2 : pin);
+}
+
+static void at91_mux_disable_interrupt(struct at91_port *pio, u32 mask)
+{
+       writel(mask, &pio->idr);
+}
+
+static void at91_mux_set_pullup(struct at91_port *pio, u32 mask, bool on)
+{
+       if (on)
+               writel(mask, &pio->mux.pio3.ppddr);
+
+       writel(mask, (on ? &pio->puer : &pio->pudr));
+}
+
+static void at91_mux_set_output(struct at91_port *pio, unsigned mask,
+                               bool is_on, bool val)
+{
+       writel(mask, (val ? &pio->sodr : &pio->codr));
+       writel(mask, (is_on ? &pio->oer : &pio->odr));
+}
+
+static void at91_mux_set_multidrive(struct at91_port *pio, u32 mask, bool on)
+{
+       writel(mask, (on ? &pio->mder : &pio->mddr));
+}
+
+static void at91_mux_set_A_periph(struct at91_port *pio, u32 mask)
+{
+       writel(mask, &pio->mux.pio2.asr);
+}
+
+static void at91_mux_set_B_periph(struct at91_port *pio, u32 mask)
+{
+       writel(mask, &pio->mux.pio2.bsr);
+}
+
+static void at91_mux_pio3_set_A_periph(struct at91_port *pio, u32 mask)
+{
+       writel(readl(&pio->mux.pio3.abcdsr1) & ~mask, &pio->mux.pio3.abcdsr1);
+       writel(readl(&pio->mux.pio3.abcdsr2) & ~mask, &pio->mux.pio3.abcdsr2);
+}
+
+static void at91_mux_pio3_set_B_periph(struct at91_port *pio, u32 mask)
+{
+       writel(readl(&pio->mux.pio3.abcdsr1) | mask, &pio->mux.pio3.abcdsr1);
+       writel(readl(&pio->mux.pio3.abcdsr2) & ~mask, &pio->mux.pio3.abcdsr2);
+}
+
+static void at91_mux_pio3_set_C_periph(struct at91_port *pio, u32 mask)
+{
+       writel(readl(&pio->mux.pio3.abcdsr1) & ~mask, &pio->mux.pio3.abcdsr1);
+       writel(readl(&pio->mux.pio3.abcdsr2) | mask, &pio->mux.pio3.abcdsr2);
+}
+
+static void at91_mux_pio3_set_D_periph(struct at91_port *pio, u32 mask)
+{
+       writel(readl(&pio->mux.pio3.abcdsr1) | mask, &pio->mux.pio3.abcdsr1);
+       writel(readl(&pio->mux.pio3.abcdsr2) | mask, &pio->mux.pio3.abcdsr2);
+}
+
+static void at91_mux_set_deglitch(struct at91_port *pio, u32 mask, bool is_on)
+{
+       writel(mask, (is_on ? &pio->ifer : &pio->ifdr));
+}
+
+static void at91_mux_pio3_set_deglitch(struct at91_port *pio,
+                                      u32 mask, bool is_on)
+{
+       if (is_on)
+               writel(mask, &pio->mux.pio3.ifscdr);
+       at91_mux_set_deglitch(pio, mask, is_on);
+}
+
+static void at91_mux_pio3_set_debounce(struct at91_port *pio, u32 mask,
+                                      bool is_on, u32 div)
+{
+       if (is_on) {
+               writel(mask, &pio->mux.pio3.ifscer);
+               writel(div & PIO_SCDR_DIV, &pio->mux.pio3.scdr);
+               writel(mask, &pio->ifer);
+       } else {
+               writel(mask, &pio->mux.pio3.ifscdr);
+       }
+}
+
+static void at91_mux_pio3_set_pulldown(struct at91_port *pio,
+                                      u32 mask, bool is_on)
+{
+       if (is_on)
+               writel(mask, &pio->pudr);
+
+       writel(mask, (is_on ? &pio->mux.pio3.ppder : &pio->mux.pio3.ppddr));
+}
+
+static void at91_mux_pio3_disable_schmitt_trig(struct at91_port *pio,
+                                              u32 mask)
+{
+       writel(readl(&pio->schmitt) | mask, &pio->schmitt);
+}
+
+static void set_drive_strength(void *reg, u32 pin, u32 strength)
+{
+       u32 shift = two_bit_pin_value_shift_amount(pin);
+
+       clrsetbits_le32(reg, DRIVE_STRENGTH_MASK << shift, strength << shift);
+}
+
+static void at91_mux_sama5d3_set_drivestrength(struct at91_port *pio,
+                                              u32 pin, u32 setting)
+{
+       void *reg;
+
+       reg = &pio->driver12;
+       if (pin >= MAX_NB_GPIO_PER_BANK / 2)
+               reg = &pio->driver2;
+
+       /* do nothing if setting is zero */
+       if (!setting)
+               return;
+
+       /* strength is 1 to 1 with setting for SAMA5 */
+       set_drive_strength(reg, pin, setting);
+}
+
+static void at91_mux_sam9x5_set_drivestrength(struct at91_port *pio,
+                                             u32 pin, u32 setting)
+{
+       void *reg;
+
+       reg = &pio->driver1;
+       if (pin >= MAX_NB_GPIO_PER_BANK / 2)
+               reg = &pio->driver12;
+
+       /* do nothing if setting is zero */
+       if (!setting)
+               return;
+
+       /* strength is inverse on SAM9x5s with our defines
+        * 0 = hi, 1 = med, 2 = low, 3 = rsvd */
+       setting = DRIVE_STRENGTH_HI - setting;
+
+       set_drive_strength(reg, pin, setting);
+}
+
+static struct at91_pinctrl_mux_ops at91rm9200_ops = {
+       .mux_A_periph   = at91_mux_set_A_periph,
+       .mux_B_periph   = at91_mux_set_B_periph,
+       .set_deglitch   = at91_mux_set_deglitch,
+};
+
+static struct at91_pinctrl_mux_ops at91sam9x5_ops = {
+       .mux_A_periph   = at91_mux_pio3_set_A_periph,
+       .mux_B_periph   = at91_mux_pio3_set_B_periph,
+       .mux_C_periph   = at91_mux_pio3_set_C_periph,
+       .mux_D_periph   = at91_mux_pio3_set_D_periph,
+       .set_deglitch   = at91_mux_pio3_set_deglitch,
+       .set_debounce   = at91_mux_pio3_set_debounce,
+       .set_pulldown   = at91_mux_pio3_set_pulldown,
+       .disable_schmitt_trig = at91_mux_pio3_disable_schmitt_trig,
+       .set_drivestrength = at91_mux_sam9x5_set_drivestrength,
+};
+
+static struct at91_pinctrl_mux_ops sama5d3_ops = {
+       .mux_A_periph   = at91_mux_pio3_set_A_periph,
+       .mux_B_periph   = at91_mux_pio3_set_B_periph,
+       .mux_C_periph   = at91_mux_pio3_set_C_periph,
+       .mux_D_periph   = at91_mux_pio3_set_D_periph,
+       .set_deglitch   = at91_mux_pio3_set_deglitch,
+       .set_debounce   = at91_mux_pio3_set_debounce,
+       .set_pulldown   = at91_mux_pio3_set_pulldown,
+       .disable_schmitt_trig = at91_mux_pio3_disable_schmitt_trig,
+       .set_drivestrength = at91_mux_sama5d3_set_drivestrength,
+};
+
+static void at91_mux_gpio_disable(struct at91_port *pio, u32 mask)
+{
+       writel(mask, &pio->pdr);
+}
+
+static void at91_mux_gpio_enable(struct at91_port *pio, u32 mask, bool input)
+{
+       writel(mask, &pio->per);
+       writel(mask, (input ? &pio->odr : &pio->oer));
+}
+
+static int at91_pmx_set(struct at91_pinctrl_mux_ops *ops,
+                       struct at91_port *pio, u32 mask, enum at91_mux mux)
+{
+       at91_mux_disable_interrupt(pio, mask);
+       switch (mux) {
+       case AT91_MUX_GPIO:
+               at91_mux_gpio_enable(pio, mask, 1);
+               break;
+       case AT91_MUX_PERIPH_A:
+               ops->mux_A_periph(pio, mask);
+               break;
+       case AT91_MUX_PERIPH_B:
+               ops->mux_B_periph(pio, mask);
+               break;
+       case AT91_MUX_PERIPH_C:
+               if (!ops->mux_C_periph)
+                       return -EINVAL;
+               ops->mux_C_periph(pio, mask);
+               break;
+       case AT91_MUX_PERIPH_D:
+               if (!ops->mux_D_periph)
+                       return -EINVAL;
+               ops->mux_D_periph(pio, mask);
+               break;
+       }
+       if (mux)
+               at91_mux_gpio_disable(pio, mask);
+
+       return 0;
+}
+
+static int at91_pinconf_set(struct at91_pinctrl_mux_ops *ops,
+                           struct at91_port *pio, u32 pin, u32 config)
+{
+       u32 mask = BIT(pin);
+
+       if ((config & PULL_UP) && (config & PULL_DOWN))
+               return -EINVAL;
+
+       at91_mux_set_output(pio, mask, config & OUTPUT,
+                           (config & OUTPUT_VAL) >> OUTPUT_VAL_SHIFT);
+       at91_mux_set_pullup(pio, mask, config & PULL_UP);
+       at91_mux_set_multidrive(pio, mask, config & MULTI_DRIVE);
+       if (ops->set_deglitch)
+               ops->set_deglitch(pio, mask, config & DEGLITCH);
+       if (ops->set_debounce)
+               ops->set_debounce(pio, mask, config & DEBOUNCE,
+                       (config & DEBOUNCE_VAL) >> DEBOUNCE_VAL_SHIFT);
+       if (ops->set_pulldown)
+               ops->set_pulldown(pio, mask, config & PULL_DOWN);
+       if (ops->disable_schmitt_trig && config & DIS_SCHMIT)
+               ops->disable_schmitt_trig(pio, mask);
+       if (ops->set_drivestrength)
+               ops->set_drivestrength(pio, pin,
+                       (config & DRIVE_STRENGTH) >> DRIVE_STRENGTH_SHIFT);
+
+       return 0;
+}
+
+static int at91_pin_check_config(struct udevice *dev, u32 bank, u32 pin)
+{
+       struct at91_pinctrl_priv *priv = dev_get_priv(dev);
+
+       if (bank >= priv->nbanks) {
+               debug("pin conf bank %d >= nbanks %d\n", bank, priv->nbanks);
+               return -EINVAL;
+       }
+
+       if (pin >= MAX_NB_GPIO_PER_BANK) {
+               debug("pin conf pin %d >= %d\n", pin, MAX_NB_GPIO_PER_BANK);
+               return -EINVAL;
+       }
+
+       return 0;
+}
+
+static int at91_pinctrl_set_state(struct udevice *dev, struct udevice *config)
+{
+       struct at91_pinctrl_priv *priv = dev_get_priv(dev);
+       const void *blob = gd->fdt_blob;
+       int node = config->of_offset;
+       u32 cells[MAX_PINMUX_ENTRIES];
+       const u32 *list = cells;
+       u32 bank, pin;
+       u32 conf, mask, count, i;
+       int size;
+       int ret;
+       enum at91_mux mux;
+       struct at91_port *pio;
+       struct at91_pinctrl_mux_ops *ops =
+                       (struct at91_pinctrl_mux_ops *)dev_get_driver_data(dev);
+
+       /*
+        * the binding format is atmel,pins = <bank pin mux CONFIG ...>,
+        * do sanity check and calculate pins number
+        */
+       size = fdtdec_get_int_array_count(blob, node, "atmel,pins",
+                                         cells, ARRAY_SIZE(cells));
+
+       /* we do not check return since it's safe node passed down */
+       count = size >> 2;
+       if (!count)
+               return -EINVAL;
+
+       for (i = 0; i < count; i++) {
+               bank = *list++;
+               pin = *list++;
+               mux = *list++;
+               conf = *list++;
+
+               ret = at91_pin_check_config(dev, bank, pin);
+               if (ret)
+                       return ret;
+
+               pio = priv->reg_base[bank];
+               mask = BIT(pin);
+
+               ret = at91_pmx_set(ops, pio, mask, mux);
+               if (ret)
+                       return ret;
+
+               ret = at91_pinconf_set(ops, pio, pin, conf);
+               if (ret)
+                       return ret;
+       }
+
+       return 0;
+}
+
+const struct pinctrl_ops at91_pinctrl_ops  = {
+       .set_state = at91_pinctrl_set_state,
+};
+
+static int at91_pinctrl_probe(struct udevice *dev)
+{
+       struct at91_pinctrl_priv *priv = dev_get_priv(dev);
+       fdt_addr_t addr_base;
+       int index;
+
+       for (index = 0; index < MAX_GPIO_BANKS; index++) {
+               addr_base = dev_get_addr_index(dev, index);
+               if (addr_base == FDT_ADDR_T_NONE)
+                       break;
+
+               priv->reg_base[index] = (struct at91_port *)addr_base;
+       }
+
+       priv->nbanks = index;
+
+       return 0;
+}
+
+static const struct udevice_id at91_pinctrl_match[] = {
+       { .compatible = "atmel,sama5d3-pinctrl", .data = (ulong)&sama5d3_ops },
+       { .compatible = "atmel,at91sam9x5-pinctrl", .data = (ulong)&at91sam9x5_ops },
+       { .compatible = "atmel,at91rm9200-pinctrl", .data = (ulong)&at91rm9200_ops },
+       {}
+};
+
+U_BOOT_DRIVER(at91_pinctrl) = {
+       .name = "pinctrl_at91",
+       .id = UCLASS_PINCTRL,
+       .of_match = at91_pinctrl_match,
+       .probe = at91_pinctrl_probe,
+       .priv_auto_alloc_size = sizeof(struct at91_pinctrl_priv),
+       .ops = &at91_pinctrl_ops,
+};
index 1f819d487b6e84bada1002c1436bb3752965eca9..4f86780cb120b37ed78d849ac9d1f0e86f3195cd 100644 (file)
@@ -452,8 +452,7 @@ const struct dm_serial_ops ns16550_serial_ops = {
        .setbrg = ns16550_serial_setbrg,
 };
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
 /*
  * Please consider existing compatible strings before adding a new
  * one to keep this table compact. Or you may add a generic "ns16550"
@@ -473,13 +472,16 @@ static const struct udevice_id ns16550_serial_ids[] = {
        { .compatible = "ti,dra742-uart",       .data = PORT_NS16550 },
        {}
 };
-#endif
+#endif /* OF_CONTROL && !OF_PLATDATA */
 
 #if CONFIG_IS_ENABLED(SERIAL_PRESENT)
+
+/* TODO(sjg@chromium.org): Integrate this into a macro like CONFIG_IS_ENABLED */
+#if !defined(CONFIG_TPL_BUILD) || defined(CONFIG_TPL_DM_SERIAL)
 U_BOOT_DRIVER(ns16550_serial) = {
        .name   = "ns16550_serial",
        .id     = UCLASS_SERIAL,
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
        .of_match = ns16550_serial_ids,
        .ofdata_to_platdata = ns16550_serial_ofdata_to_platdata,
        .platdata_auto_alloc_size = sizeof(struct ns16550_platdata),
@@ -490,5 +492,6 @@ U_BOOT_DRIVER(ns16550_serial) = {
        .flags  = DM_FLAG_PRE_RELOC,
 };
 #endif
-#endif /* !OF_PLATDATA */
+#endif /* SERIAL_PRESENT */
+
 #endif /* CONFIG_DM_SERIAL */
index a49134a95a8e877be262dd8893d5d87042e19d0c..941b424a4c6ea961711d82d90041d754f7900a23 100644 (file)
@@ -117,7 +117,7 @@ static int pl01x_generic_setbrg(struct pl01x_regs *regs, enum pl01x_type type,
                        divisor = UART_PL010_BAUD_9600;
                        break;
                case 19200:
-                       divisor = UART_PL010_BAUD_9600;
+                       divisor = UART_PL010_BAUD_19200;
                        break;
                case 38400:
                        divisor = UART_PL010_BAUD_38400;
index 32ecbe2b0991c34b93cbecf7ba5f785f33286ad0..20455ffb54219e9965bbd989c0e601d1392d50ae 100644 (file)
@@ -36,7 +36,7 @@ __weak void mxsfb_system_setup(void)
 }
 
 /*
- * DENX M28EVK:
+ * ARIES M28EVK:
  * setenv videomode
  * video=ctfb:x:800,y:480,depth:18,mode:0,pclk:30066,
  *       le:0,ri:256,up:0,lo:45,hs:1,vs:1,sync:100663296,vmode:0
diff --git a/include/aes.h b/include/aes.h
deleted file mode 100644 (file)
index 6315c02..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2011 The Chromium OS Authors.
- * (C) Copyright 2010 - 2011 NVIDIA Corporation <www.nvidia.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#ifndef _AES_REF_H_
-#define _AES_REF_H_
-
-#ifdef USE_HOSTCC
-/* Define compat stuff for use in fw_* tools. */
-typedef unsigned char u8;
-typedef unsigned int u32;
-#define debug(...) do {} while (0)
-#endif
-
-/*
- * AES encryption library, with small code size, supporting only 128-bit AES
- *
- * AES is a stream cipher which works a block at a time, with each block
- * in this case being AES_KEY_LENGTH bytes.
- */
-
-enum {
-       AES_STATECOLS   = 4,    /* columns in the state & expanded key */
-       AES_KEYCOLS     = 4,    /* columns in a key */
-       AES_ROUNDS      = 10,   /* rounds in encryption */
-
-       AES_KEY_LENGTH  = 128 / 8,
-       AES_EXPAND_KEY_LENGTH   = 4 * AES_STATECOLS * (AES_ROUNDS + 1),
-};
-
-/**
- * aes_expand_key() - Expand the AES key
- *
- * Expand a key into a key schedule, which is then used for the other
- * operations.
- *
- * @key                Key, of length AES_KEY_LENGTH bytes
- * @expkey     Buffer to place expanded key, AES_EXPAND_KEY_LENGTH
- */
-void aes_expand_key(u8 *key, u8 *expkey);
-
-/**
- * aes_encrypt() - Encrypt single block of data with AES 128
- *
- * @in         Input data
- * @expkey     Expanded key to use for encryption (from aes_expand_key())
- * @out                Output data
- */
-void aes_encrypt(u8 *in, u8 *expkey, u8 *out);
-
-/**
- * aes_decrypt() - Decrypt single block of data with AES 128
- *
- * @in         Input data
- * @expkey     Expanded key to use for decryption (from aes_expand_key())
- * @out                Output data
- */
-void aes_decrypt(u8 *in, u8 *expkey, u8 *out);
-
-/**
- * Apply chain data to the destination using EOR
- *
- * Each array is of length AES_KEY_LENGTH.
- *
- * @cbc_chain_data     Chain data
- * @src                        Source data
- * @dst                        Destination data, which is modified here
- */
-void aes_apply_cbc_chain_data(u8 *cbc_chain_data, u8 *src, u8 *dst);
-
-/**
- * aes_cbc_encrypt_blocks() - Encrypt multiple blocks of data with AES CBC.
- *
- * @key_exp            Expanded key to use
- * @src                        Source data to encrypt
- * @dst                        Destination buffer
- * @num_aes_blocks     Number of AES blocks to encrypt
- */
-void aes_cbc_encrypt_blocks(u8 *key_exp, u8 *src, u8 *dst, u32 num_aes_blocks);
-
-/**
- * Decrypt multiple blocks of data with AES CBC.
- *
- * @key_exp            Expanded key to use
- * @src                        Source data to decrypt
- * @dst                        Destination buffer
- * @num_aes_blocks     Number of AES blocks to decrypt
- */
-void aes_cbc_decrypt_blocks(u8 *key_exp, u8 *src, u8 *dst, u32 num_aes_blocks);
-
-#endif /* _AES_REF_H_ */
index 26db67a034545ec0b2cd1be1015b85c6703a14a7..83e4037a86d6d2796d6a831061c8ee86470f7f1f 100644 (file)
@@ -225,9 +225,6 @@ void        hang            (void) __attribute__ ((noreturn));
 int    timer_init(void);
 int    cpu_init(void);
 
-/* */
-int initdram(void);
-
 #include <display_options.h>
 
 /* common/main.c */
index 4886500d6a89bbf7abc3a46aab217b643630bab9..30dd9e59667bb1f22faf1a4b47bb1ec7c31cdc1c 100644 (file)
 #define CONFIG_SYS_FSL_USDHC_NUM        3
 
 /* Framebuffer */
+#ifdef CONFIG_VIDEO
 #define CONFIG_VIDEO_IPUV3
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_SPLASH_SCREEN
 #define CONFIG_IPUV3_CLK                260000000
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
+#endif
 
 #define CONFIG_PWM_IMX
 #define CONFIG_IMX6_PWM_PER_CLK         66000000
index 3e979482f6a7b77d19962d4d9fef310774f31f29..dbd4d843ebdeee9c6d85539a0f83c763796ff066 100644 (file)
@@ -27,7 +27,9 @@
 #define CONFIG_ENV_VARS_UBOOT_CONFIG
 
 /* general purpose I/O */
+#ifndef CONFIG_DM_GPIO
 #define CONFIG_AT91_GPIO
+#endif
 
 
 /*
index 1606f204ce9069eba8b8a14e89245ae6127d026f..2b98f535c6ba0ee78be4f6d2f58511d4841c396f 100644 (file)
 
 /* MMC Configs */
 #define CONFIG_SYS_FSL_ESDHC_ADDR      0
-#define CONFIG_SYS_FSL_USDHC_NUM       1
+
+/* eMMC Configs */
+#define CONFIG_SUPPORT_EMMC_BOOT
+#define CONFIG_SUPPORT_EMMC_RPMB
 
 /* Filesystem support */
 #define CONFIG_CMD_UBIFS
 #define IMX_FEC_BASE             ENET_BASE_ADDR
 #define CONFIG_FEC_XCV_TYPE      RGMII
 #define CONFIG_FEC_MXC_PHYADDR   0
-#define CONFIG_PHYLIB
 #define CONFIG_ARP_TIMEOUT       200UL
 
 /* USB Configs */
 #endif
 #if defined(CONFIG_ENV_IS_IN_MMC)
   #define CONFIG_SYS_MMC_ENV_DEV         0
+  #define CONFIG_SYS_MMC_ENV_PART        1
   #define CONFIG_ENV_OFFSET              (709 * SZ_1K)
   #define CONFIG_ENV_SIZE                (128 * SZ_1K)
   #define CONFIG_ENV_OFFSET_REDUND       (CONFIG_ENV_OFFSET + (128 * SZ_1K))
diff --git a/include/configs/imx6_logic.h b/include/configs/imx6_logic.h
new file mode 100644 (file)
index 0000000..175ddc4
--- /dev/null
@@ -0,0 +1,176 @@
+/*
+ * Copyright (C) 2017 Logic PD, Inc.
+ *
+ * Configuration settings for the LogicPD i.MX6 SOM.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __IMX6LOGIC_CONFIG_H
+#define __IMX6LOGIC_CONFIG_H
+
+#define CONFIG_MXC_UART_BASE   UART1_BASE
+#define CONSOLE_DEV            "ttymxc0"
+
+#include <config_distro_defaults.h>
+#include "mx6_common.h"
+
+/* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_LEN          (10 * SZ_1M)
+
+#define CONFIG_MXC_UART
+
+/* MMC Configs */
+#define CONFIG_SYS_FSL_ESDHC_ADDR      0
+#define CONFIG_SYS_FSL_USDHC_NUM       2
+#define CONFIG_MMCROOT         "/dev/mmcblk1p2" /* Dev kit SD card */
+
+/* Ethernet Configs */
+#define CONFIG_MII
+#define CONFIG_FEC_XCV_TYPE            RMII
+#define CONFIG_ETHPRIME                "FEC"
+#define CONFIG_FEC_MXC_PHYADDR         0
+#define CONFIG_PHYLIB
+#define CONFIG_PHY_SMSC
+
+/* Command definition */
+#define CONFIG_CMD_BMODE
+
+#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+       "script=boot.scr\0" \
+       "image=zImage\0" \
+       "bootm_size=0x10000000\0" \
+       "fdt_addr_r=0x18000000\0" \
+       "fdt_addr=0x18000000\0" \
+       "ramdisk_addr_r=0x13000000\0" \
+       "ramdiskaddr=0x13000000\0" \
+       "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
+       "ramdisk_file=rootfs.cpio.uboot\0" \
+       "boot_fdt=try\0" \
+       "ip_dyn=yes\0" \
+       "console=" CONSOLE_DEV "\0" \
+       "mmcdev=1\0" \
+       "mmcpart=1\0" \
+       "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
+       "nandroot=ubi0:rootfs rootfstype=ubifs\0" \
+       "mmcargs=setenv bootargs console=${console},${baudrate}" \
+       " root=${mmcroot} ${mtdparts}\0" \
+       "nandargs=setenv bootargs console=${console},${baudrate}" \
+       " ubi.mtd=fs root=${nandroot} ${mtdparts}\0" \
+       "ramargs=setenv bootargs console=${console},${baudrate}" \
+       " root=/dev/ram rw ${mtdparts}\0"                    \
+       "loadbootscript=" \
+       "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+       "bootscript=echo Running bootscript from mmc ...;" \
+       " source\0" \
+       "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image};" \
+       " setenv kernelsize ${filesize}\0" \
+       "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
+       "loadramdisk=fatload mmc ${mmcdev}:${mmcpart} ${ramdiskaddr}" \
+       " ${ramdisk_file}; setenv ramdisksize ${filesize}\0" \
+       "mmcboot=echo Booting from mmc...; run mmcargs; run loadimage;" \
+       " run loadfdt; bootz ${loadaddr} - ${fdt_addr}\0" \
+       "mmcramboot=run ramargs; run loadimage;" \
+       " run loadfdt; run loadramdisk;" \
+       " bootz ${loadaddr} ${ramdiskaddr} ${fdt_addr}\0" \
+       "nandboot=echo Booting from nand ...; " \
+       " run nandargs;" \
+       " nand read ${loadaddr} kernel ${kernelsize};" \
+       " nand read ${fdt_addr} dtb;" \
+       " bootz ${loadaddr} - ${fdt_addr}\0" \
+       "nandramboot=echo Booting RAMdisk from nand ...; " \
+       " nand read ${ramdiskaddr} fs ${ramdisksize};" \
+       " nand read ${loadaddr} kernel ${kernelsize};" \
+       " nand read ${fdt_addr} dtb;" \
+       " run ramargs;" \
+       " bootz ${loadaddr} ${ramdiskaddr} ${fdt_addr}\0" \
+       "netargs=setenv bootargs console=${console},${baudrate} " \
+       "root=/dev/nfs" \
+       " ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
+       "netboot=echo Booting from net ...; " \
+       "run netargs; " \
+       "if test ${ip_dyn} = yes; then " \
+               "setenv get_cmd dhcp; " \
+       "else " \
+               "setenv get_cmd tftp; " \
+       "fi; " \
+       "${get_cmd} ${image}; " \
+       "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
+               "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
+                       "bootz ${loadaddr} - ${fdt_addr}; " \
+               "else " \
+                       "if test ${boot_fdt} = try; then " \
+                               "bootz; " \
+                               "else " \
+                               "echo WARN: Cannot load the DT; " \
+                       "fi; " \
+               "fi; " \
+       "else " \
+              "bootz; " \
+       "fi;\0" \
+       "autoboot=mmc dev ${mmcdev};" \
+       "if mmc rescan; then " \
+               "if run loadbootscript; then " \
+                       "run bootscript; " \
+               "else " \
+               "if run loadimage; then " \
+                       "run mmcboot; " \
+               "else run netboot; " \
+               "fi; " \
+       "fi; " \
+       "else run netboot; fi"
+#define CONFIG_BOOTCOMMAND \
+       "run autoboot"
+
+#define CONFIG_ARP_TIMEOUT     200UL
+
+#define CONFIG_SYS_MEMTEST_START       0x10000000
+#define CONFIG_SYS_MEMTEST_END         0x10010000
+#define CONFIG_SYS_MEMTEST_SCRATCH     0x10800000
+
+/* Physical Memory Map */
+#define CONFIG_NR_DRAM_BANKS           1
+#define PHYS_SDRAM                     MMDC0_ARB_BASE_ADDR
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM
+#define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR
+#define CONFIG_SYS_INIT_RAM_SIZE       IRAM_SIZE
+
+#define CONFIG_SYS_INIT_SP_OFFSET \
+       (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR \
+       (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
+
+/* Environment organization */
+#define CONFIG_ENV_SIZE                        (8 * 1024)
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET             0x400000
+#define CONFIG_ENV_SECT_SIZE          CONFIG_ENV_SIZE
+
+/* NAND stuff */
+#define CONFIG_CMD_NAND_TRIMFFS
+#define CONFIG_SYS_MAX_NAND_DEVICE     1
+#define CONFIG_SYS_NAND_BASE           0x40000000
+#define CONFIG_SYS_NAND_5_ADDR_CYCLE
+#define CONFIG_SYS_NAND_ONFI_DETECTION
+#define CONFIG_SYS_NAND_U_BOOT_START   CONFIG_SYS_TEXT_BASE
+#define CONFIG_SYS_NAND_U_BOOT_OFFS    0x200000
+
+/* MTD device */
+# define CONFIG_MTD_DEVICE
+# define CONFIG_CMD_MTDPARTS
+# define CONFIG_MTD_PARTITIONS
+# define MTDIDS_DEFAULT                "nand0=gpmi-nand"
+# define MTDPARTS_DEFAULT      "mtdparts=gpmi-nand:4m(uboot)," \
+                                       "1m(env),16m(kernel),1m(dtb),-(fs)"
+
+/* DMA stuff, needed for GPMI/MXS NAND support */
+#define CONFIG_APBH_DMA
+#define CONFIG_APBH_DMA_BURST
+#define CONFIG_APBH_DMA_BURST8
+
+/* EEPROM  contains serial no, MAC addr and other Logic PD info */
+#define CONFIG_I2C_EEPROM
+
+#endif                         /* __IMX6LOGIC_CONFIG_H */
index a70f041b2d58afad39d088dfa010ed2b58eadaa7..275ecf36ca07d1edf13238b560120b1d4999edc6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * DENX M53 configuration
+ * Aries M53 configuration
  * Copyright (C) 2012-2013 Marek Vasut <marex@denx.de>
  *
  * SPDX-License-Identifier:    GPL-2.0+
index 7bda977c972f01ce931eaa088b88a1a2ebd5f0e5..9e5c29f92f2cf33273f7b57a77b3cce8c1310f78 100644 (file)
                "if tftpboot ${nor_img_addr} ${nor_img_file}; then " \
                    "run nor_update;" \
                "fi\0" \
+       "tftp_nor_dtb="\
+               "echo 'Update mccmon6 NOR DTB via TFTP'; " \
+               "setenv nor_img_file imx6q-mccmon6.dtb; " \
+               "setenv nor_img_size 0x20000; " \
+               "setenv nor_bank_start 0x09980000; " \
+               "if tftpboot ${nor_img_addr} ${nor_img_file}; then " \
+                   "run nor_update;" \
+               "fi\0" \
        "tftp_nor_img="\
                "echo 'Update mccmon6 NOR image via TFTP'; " \
                "if tftpboot ${nor_img_addr} ${nor_img_file}; then " \
index 2782911da3ee46713c61419a5b374317b1028a81..84fdf656cd66f71b6e1dd25e41b9d6de7b412e45 100644 (file)
@@ -84,7 +84,7 @@
        "initrd_high=0xffffffff\0" \
        "fdt_high=0xffffffff\0" \
        "ip_dyn=yes\0" \
-       "console=" CONSOLE_DEV "\0" \
+       "console=" CONSOLE_DEV ",115200\0" \
        "bootm_size=0x10000000\0" \
        "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
        "update_sd_firmware=" \
index f35d1265b0ee9fff723cdd54923a92aad73048fc..2fff7995eac7a1eac191331758088621aa5677ef 100644 (file)
 #define CONFIG_SYS_FSL_ESDHC_ADDR      USDHC2_BASE_ADDR
 
 /* I2C Configs */
-#define CONFIG_SYS_I2C
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1                /* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2                /* enable I2C bus 2 */
 #define CONFIG_SYS_I2C_MXC_I2C3                /* enable I2C bus 3 */
 #define CONFIG_SYS_I2C_SPEED             100000
 
-/* PMIC */
-#define CONFIG_POWER
-#define CONFIG_POWER_I2C
-#define CONFIG_POWER_PFUZE100
-#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
-
 #define CONFIG_FEC_MXC
 #define CONFIG_MII
 #define IMX_FEC_BASE                   ENET_BASE_ADDR
 /* Environment organization */
 #define CONFIG_ENV_SIZE                        SZ_8K
 
-#if defined CONFIG_SYS_BOOT_SPINOR
+#if defined CONFIG_SPI_BOOT
 #define CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_ENV_OFFSET               (768 * 1024)
 #define CONFIG_ENV_SECT_SIZE            (64 * 1024)
index 55f10ad1f0aa7cc450f260e710b92d4c8a897fd9..aced293fa8493a493d7cf59f29af2b1d9a4d2196 100644 (file)
 
 #include "at91-sama5_common.h"
 
-/* serial console */
-#define CONFIG_ATMEL_USART
-#define CONFIG_USART_BASE              ATMEL_BASE_USART3
-#define CONFIG_USART_ID                        ATMEL_ID_USART3
-
 /* SDRAM */
 #define CONFIG_NR_DRAM_BANKS           1
 #define CONFIG_SYS_SDRAM_BASE           ATMEL_BASE_DDRCS
 #define CONFIG_SYS_SDRAM_SIZE          0x20000000
 
 #ifdef CONFIG_SPL_BUILD
-#define CONFIG_SYS_INIT_SP_ADDR                0x210000
+#define CONFIG_SYS_INIT_SP_ADDR                0x218000
 #else
 #define CONFIG_SYS_INIT_SP_ADDR \
-       (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
+       (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
 #endif
 
 #define CONFIG_SYS_LOAD_ADDR           0x22000000 /* load address */
 
-/* SerialFlash */
-
 #ifdef CONFIG_CMD_SF
-#define CONFIG_ATMEL_SPI
-#define CONFIG_ATMEL_SPI0
-#define CONFIG_SF_DEFAULT_BUS          0
-#define CONFIG_SF_DEFAULT_CS           0
 #define CONFIG_SF_DEFAULT_SPEED                30000000
 #endif
 
 #define CONFIG_ATMEL_NAND_HW_PMECC
 #endif
 
-/* MMC */
-
-#ifdef CONFIG_CMD_MMC
-#define CONFIG_GENERIC_ATMEL_MCI
-#define ATMEL_BASE_MMCI                        ATMEL_BASE_MCI1
-#endif
-
-/* USB */
-
-#ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_ATMEL
-#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     3
-#endif
-
-/* USB device */
-#define CONFIG_USB_ETHER
-#define CONFIG_USB_ETH_RNDIS
-#define CONFIG_USBNET_MANUFACTURER      "Atmel SAMA5D4EK"
-
-/* Ethernet Hardware */
-#define CONFIG_MACB
-#define CONFIG_RMII
-#define CONFIG_NET_RETRY_COUNT         20
-#define CONFIG_MACB_SEARCH_PHY
-
 /* LCD */
 #ifdef CONFIG_LCD
 #define LCD_BPP                                LCD_COLOR16
 /* SPL */
 #define CONFIG_SPL_FRAMEWORK
 #define CONFIG_SPL_TEXT_BASE           0x200000
-#define CONFIG_SPL_MAX_SIZE            0x10000
+#define CONFIG_SPL_MAX_SIZE            0x18000
 #define CONFIG_SPL_BSS_START_ADDR      0x20000000
 #define CONFIG_SPL_BSS_MAX_SIZE                0x80000
 #define CONFIG_SYS_SPL_MALLOC_START    0x20080000
 
 #elif CONFIG_SYS_USE_SERIALFLASH
 #define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SYS_SPI_U_BOOT_OFFS     0x8000
+#define CONFIG_SYS_SPI_U_BOOT_OFFS     0x10000
 
 #endif
 #endif
index 680d5918d71e5042e3956944f63c6efdd830e050..a5fd37f46b207c9c3e1d50f5dcd9dff087c8c89b 100644 (file)
 
 #include "at91-sama5_common.h"
 
-/* serial console */
-#define CONFIG_ATMEL_USART
-#define CONFIG_USART_BASE              ATMEL_BASE_USART3
-#define        CONFIG_USART_ID                 ATMEL_ID_USART3
-
 /* SDRAM */
 #define CONFIG_NR_DRAM_BANKS           1
 #define CONFIG_SYS_SDRAM_BASE           ATMEL_BASE_DDRCS
 #define CONFIG_SYS_SDRAM_SIZE          0x20000000
 
 #ifdef CONFIG_SPL_BUILD
-#define CONFIG_SYS_INIT_SP_ADDR                0x210000
+#define CONFIG_SYS_INIT_SP_ADDR                0x218000
 #else
 #define CONFIG_SYS_INIT_SP_ADDR \
-       (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
+       (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
 #endif
 
 #define CONFIG_SYS_LOAD_ADDR           0x22000000 /* load address */
 
-/* SerialFlash */
-
 #ifdef CONFIG_CMD_SF
-#define CONFIG_ATMEL_SPI
-#define CONFIG_ATMEL_SPI0
-#define CONFIG_SF_DEFAULT_BUS          0
-#define CONFIG_SF_DEFAULT_CS           0
 #define CONFIG_SF_DEFAULT_SPEED                30000000
 #endif
 
 #define CONFIG_ATMEL_NAND_HW_PMECC
 #endif
 
-/* MMC */
-
-#ifdef CONFIG_CMD_MMC
-#define CONFIG_GENERIC_ATMEL_MCI
-#define ATMEL_BASE_MMCI                        ATMEL_BASE_MCI1
-#endif
-
-/* USB */
-
-#ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_ATMEL
-#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     3
-#endif
-
-/* USB device */
-#define CONFIG_USB_ETHER
-#define CONFIG_USB_ETH_RNDIS
-#define CONFIG_USBNET_MANUFACTURER      "Atmel SAMA5D4EK"
-
-/* Ethernet Hardware */
-#define CONFIG_MACB
-#define CONFIG_RMII
-#define CONFIG_NET_RETRY_COUNT         20
-#define CONFIG_MACB_SEARCH_PHY
-
 /* LCD */
 #define LCD_BPP                                LCD_COLOR16
 #define LCD_OUTPUT_BPP                  18
 /* SPL */
 #define CONFIG_SPL_FRAMEWORK
 #define CONFIG_SPL_TEXT_BASE           0x200000
-#define CONFIG_SPL_MAX_SIZE            0x10000
+#define CONFIG_SPL_MAX_SIZE            0x18000
 #define CONFIG_SPL_BSS_START_ADDR      0x20000000
 #define CONFIG_SPL_BSS_MAX_SIZE                0x80000
 #define CONFIG_SYS_SPL_MALLOC_START    0x20080000
 
 #elif CONFIG_SYS_USE_SERIALFLASH
 #define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SYS_SPI_U_BOOT_OFFS     0x8000
+#define CONFIG_SYS_SPI_U_BOOT_OFFS     0x10000
 
 #endif
 #endif
index 7de8765dc803eed4ecb01e1b937a2b417ed2ca56..4c112cc1a99d916e2cfb5d7e5aaaafe5c10695f8 100644 (file)
 #define CONFIG_SYS_TIMER_RATE          1000000
 #endif
 
-/*
- * Number of bits in a C 'long' on this architecture. Set this to 32 when
- * building on a 32-bit machine.
- */
-#define CONFIG_SANDBOX_BITS_PER_LONG   64
-
 #define CONFIG_LMB
 #define CONFIG_ANDROID_BOOT_IMAGE
 
index 9b1f753b4c5e786ea1324d6c430a2ab0d32beeb6..b60d007478dfcfd5773676956069dad4b0ad16ae 100644 (file)
 #define PHYS_SDRAM_1_SIZE              0x40000000      /* 1GiB on SoCDK */
 
 /* Booting Linux */
-#define CONFIG_BOOTFILE                "zImage"
-#define CONFIG_BOOTARGS                "console=ttyS0," __stringify(CONFIG_BAUDRATE)
-#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET
-#define CONFIG_BOOTCOMMAND     "run ramboot"
-#else
-#define CONFIG_BOOTCOMMAND     "run mmcload; run mmcboot"
-#endif
 #define CONFIG_LOADADDR                0x01000000
 #define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
 
 
 #define CONFIG_ENV_IS_IN_MMC
 
-/* Extra Environment */
-#define CONFIG_EXTRA_ENV_SETTINGS \
-       "verify=n\0" \
-       "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
-       "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
-               "bootm ${loadaddr} - ${fdt_addr}\0" \
-       "bootimage=zImage\0" \
-       "fdt_addr=100\0" \
-       "fdtimage=socfpga.dtb\0" \
-       "bootm ${loadaddr} - ${fdt_addr}\0" \
-       "mmcroot=/dev/mmcblk0p2\0" \
-       "mmcboot=setenv bootargs " CONFIG_BOOTARGS \
-               " root=${mmcroot} rw rootwait;" \
-               "bootz ${loadaddr} - ${fdt_addr}\0" \
-       "mmcload=mmc rescan;" \
-               "load mmc 0:1 ${loadaddr} ${bootimage};" \
-               "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
-       "qspiload=sf probe && mtdparts default && run ubiload\0" \
-       "qspiboot=setenv bootargs " CONFIG_BOOTARGS \
-               " ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\
-               "bootz ${loadaddr} - ${fdt_addr}\0" \
-       "ubiload=ubi part UBI && ubifsmount ubi0 && " \
-               "ubifsload ${loadaddr} /boot/${bootimage} && " \
-               "ubifsload ${fdt_addr} /boot/${fdtimage}\0"
-
 /* The rest of the configuration is shared */
 #include <configs/socfpga_common.h>
 
index 8472b52e0a4be2da2459e3d97bc96355c74bf019..107c6d5b668403aa04976e41fcfa8a9130222e96 100644 (file)
 #define CONFIG_SYS_HOSTNAME    CONFIG_SYS_BOARD
 #endif
 
+#define CONFIG_CMD_PXE
+#define CONFIG_MENU
+
 /*
  * Cache
  */
 #define CONFIG_SYS_L2_PL310
 #define CONFIG_SYS_PL310_BASE          SOCFPGA_MPUL2_ADDRESS
 
-/*
- * SDRAM controller
- */
-#define CONFIG_ALTERA_SDRAM
-
 /*
  * EPCS/EPCQx1 Serial Flash Controller
  */
@@ -230,7 +228,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 #if defined(CONFIG_CMD_DFU) || defined(CONFIG_CMD_USB_MASS_STORAGE)
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 
-#define CONFIG_SYS_DFU_DATA_BUF_SIZE   (32 * 1024 * 1024)
+#define CONFIG_SYS_DFU_DATA_BUF_SIZE   (16 * 1024 * 1024)
 #define DFU_DEFAULT_POLL_TIMEOUT       300
 
 /* USB IDs */
@@ -242,13 +240,13 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
  * U-Boot environment
  */
 #if !defined(CONFIG_ENV_SIZE)
-#define CONFIG_ENV_SIZE                        4096
+#define CONFIG_ENV_SIZE                        (8 * 1024)
 #endif
 
 /* Environment for SDMMC boot */
 #if defined(CONFIG_ENV_IS_IN_MMC) && !defined(CONFIG_ENV_OFFSET)
-#define CONFIG_SYS_MMC_ENV_DEV         0       /* device 0 */
-#define CONFIG_ENV_OFFSET              512     /* just after the MBR */
+#define CONFIG_SYS_MMC_ENV_DEV         0 /* device 0 */
+#define CONFIG_ENV_OFFSET              (34 * 512) /* just after the GPT */
 #endif
 
 /* Environment for QSPI boot */
@@ -305,8 +303,12 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 /* SPL SDMMC boot support */
 #ifdef CONFIG_SPL_MMC_SUPPORT
 #if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT)
-#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION     2
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME                "u-boot-dtb.img"
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION     1
+#endif
+#else
+#ifndef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION     1
 #endif
 #endif
 
@@ -328,4 +330,41 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
  */
 #define CONFIG_SPL_STACK               CONFIG_SYS_INIT_SP_ADDR
 
+/* Extra Environment */
+#ifndef CONFIG_SPL_BUILD
+#include <config_distro_defaults.h>
+
+#ifdef CONFIG_CMD_PXE
+#define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na)
+#else
+#define BOOT_TARGET_DEVICES_PXE(func)
+#endif
+
+#ifdef CONFIG_CMD_MMC
+#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0)
+#else
+#define BOOT_TARGET_DEVICES_MMC(func)
+#endif
+
+#define BOOT_TARGET_DEVICES(func) \
+       BOOT_TARGET_DEVICES_MMC(func) \
+       BOOT_TARGET_DEVICES_PXE(func) \
+       func(DHCP, dhcp, na)
+
+#include <config_distro_bootcmd.h>
+
+#ifndef CONFIG_EXTRA_ENV_SETTINGS
+#define CONFIG_EXTRA_ENV_SETTINGS \
+       "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
+       "bootm_size=0xa000000\0" \
+       "kernel_addr_r="__stringify(CONFIG_SYS_LOAD_ADDR)"\0" \
+       "fdt_addr_r=0x02000000\0" \
+       "scriptaddr=0x02100000\0" \
+       "pxefile_addr_r=0x02200000\0" \
+       "ramdisk_addr_r=0x02300000\0" \
+       BOOTENV
+
+#endif
+#endif
+
 #endif /* __CONFIG_SOCFPGA_COMMON_H__ */
index 4100ef93d3b33a091e9961d02435b82d673db730..dfe4980b85a0f33bb273c947e22a251b83d65342 100644 (file)
 #define PHYS_SDRAM_1_SIZE              0x40000000      /* 1GiB on SoCDK */
 
 /* Booting Linux */
-#define CONFIG_BOOTFILE                "zImage"
-#define CONFIG_BOOTARGS                "console=ttyS0," __stringify(CONFIG_BAUDRATE)
-#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET
-#define CONFIG_BOOTCOMMAND     "run ramboot"
-#else
-#define CONFIG_BOOTCOMMAND     "run mmcload; run mmcboot"
-#endif
 #define CONFIG_LOADADDR                0x01000000
 #define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
 
 
 #define CONFIG_ENV_IS_IN_MMC
 
-/* Extra Environment */
-#define CONFIG_EXTRA_ENV_SETTINGS \
-       "verify=n\0" \
-       "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
-       "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
-               "bootm ${loadaddr} - ${fdt_addr}\0" \
-       "bootimage=zImage\0" \
-       "fdt_addr=100\0" \
-       "fdtimage=socfpga.dtb\0" \
-       "bootm ${loadaddr} - ${fdt_addr}\0" \
-       "mmcroot=/dev/mmcblk0p2\0" \
-       "mmcboot=setenv bootargs " CONFIG_BOOTARGS \
-               " root=${mmcroot} rw rootwait;" \
-               "bootz ${loadaddr} - ${fdt_addr}\0" \
-       "mmcload=mmc rescan;" \
-               "load mmc 0:1 ${loadaddr} ${bootimage};" \
-               "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
-       "qspiload=sf probe && mtdparts default && run ubiload\0" \
-       "qspiboot=setenv bootargs " CONFIG_BOOTARGS \
-               " ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\
-               "bootz ${loadaddr} - ${fdt_addr}\0" \
-       "ubiload=ubi part UBI && ubifsmount ubi0 && " \
-               "ubifsload ${loadaddr} /boot/${bootimage} && " \
-               "ubifsload ${fdt_addr} /boot/${fdtimage}\0"
-
 /* The rest of the configuration is shared */
 #include <configs/socfpga_common.h>
 
index f6559722f4acb76d0a3aff7100114f45c7808067..dd5933d43c24fd91c4f57405ccf57882b7fc2c58 100644 (file)
@@ -16,9 +16,6 @@
 #define PHYS_SDRAM_1_SIZE              0x40000000      /* 1GiB */
 
 /* Booting Linux */
-#define CONFIG_BOOTFILE                "fitImage"
-#define CONFIG_BOOTARGS                "console=ttyS0," __stringify(CONFIG_BAUDRATE)
-#define CONFIG_BOOTCOMMAND     "run mmcload; run mmcboot"
 #define CONFIG_LOADADDR                0x01000000
 #define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
 
 
 #define CONFIG_ENV_IS_IN_MMC
 
-/* Extra Environment */
-#define CONFIG_EXTRA_ENV_SETTINGS \
-       "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
-       "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
-               "bootm ${loadaddr} - ${fdt_addr}\0" \
-       "bootimage=zImage\0" \
-       "fdt_addr=100\0" \
-       "fdtimage=socfpga.dtb\0" \
-       "bootm ${loadaddr} - ${fdt_addr}\0" \
-       "mmcroot=/dev/mmcblk0p2\0" \
-       "mmcboot=setenv bootargs " CONFIG_BOOTARGS \
-               " root=${mmcroot} rw rootwait;" \
-               "bootz ${loadaddr} - ${fdt_addr}\0" \
-       "mmcload=mmc rescan;" \
-               "load mmc 0:1 ${loadaddr} ${bootimage};" \
-               "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
-
 /* The rest of the configuration is shared */
 #include <configs/socfpga_common.h>
 
index c6e8d81be6fba981d04b67eacddeca9f6595f4df..014828bc08279c873d8cf873baaa31e7f05b6a57 100644 (file)
@@ -16,9 +16,6 @@
 #define PHYS_SDRAM_1_SIZE              0x40000000      /* 1GiB */
 
 /* Booting Linux */
-#define CONFIG_BOOTFILE                "fitImage"
-#define CONFIG_BOOTARGS                "console=ttyS0," __stringify(CONFIG_BAUDRATE)
-#define CONFIG_BOOTCOMMAND     "run mmcload; run mmcboot"
 #define CONFIG_LOADADDR                0x01000000
 #define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
 
 
 #define CONFIG_ENV_IS_IN_MMC
 
-/* Extra Environment */
-#define CONFIG_EXTRA_ENV_SETTINGS \
-       "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
-       "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
-               "bootm ${loadaddr} - ${fdtaddr}\0" \
-       "bootimage=zImage\0" \
-       "fdtaddr=100\0" \
-       "fdtimage=socfpga.dtb\0" \
-       "bootm ${loadaddr} - ${fdtaddr}\0" \
-       "mmcroot=/dev/mmcblk0p2\0" \
-       "mmcboot=setenv bootargs " CONFIG_BOOTARGS \
-               " root=${mmcroot} rw rootwait;" \
-               "bootz ${loadaddr} - ${fdtaddr}\0" \
-       "mmcload=mmc rescan;" \
-               "load mmc 0:1 ${loadaddr} ${bootimage};" \
-               "load mmc 0:1 ${fdtaddr} ${fdtimage}\0" \
-
 /* The rest of the configuration is shared */
 #include <configs/socfpga_common.h>
 
index 3c9ba6de23f4db2a6a29c4053487f5d4d270dfb7..2d367026b6eb49992d0cef832468f163d4d5d707 100644 (file)
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
-#ifndef __CONFIG_DENX_MCVEVK_H__
-#define __CONFIG_DENX_MCVEVK_H__
+#ifndef __CONFIG_ARIES_MCVEVK_H__
+#define __CONFIG_ARIES_MCVEVK_H__
 
 #include <asm/arch/base_addr_ac5.h>
 
@@ -37,6 +37,7 @@
        "netdev=eth0\0"                                                 \
        "hostname=mcvevk\0"                                             \
        "kernel_addr_r=0x10000000\0"                                    \
+       "dfu_alt_info=mmc raw 0 3867148288\0"                           \
        "update_filename=u-boot-with-spl.sfp\0"                         \
        "update_sd_offset=0x800\0"                                      \
        "update_sd="            /* Update the SD firmware partition */  \
 /* The rest of the configuration is shared */
 #include <configs/socfpga_common.h>
 
-#endif /* __CONFIG_DENX_MCVEVK_H__ */
+#endif /* __CONFIG_ARIES_MCVEVK_H__ */
index 326310b5399707cb79dca1de8a4f99887d5e3375..c9fc5c90d96371f3d4bbf12106f5d2c21a6f7c06 100644 (file)
@@ -16,9 +16,6 @@
 #define PHYS_SDRAM_1_SIZE              0x40000000      /* 1GiB on SoCDK */
 
 /* Booting Linux */
-#define CONFIG_BOOTFILE                "fitImage"
-#define CONFIG_BOOTARGS                "console=ttyS0," __stringify(CONFIG_BAUDRATE)
-#define CONFIG_BOOTCOMMAND     "run mmcload; run mmcboot"
 #define CONFIG_LOADADDR                0x01000000
 #define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
 
 
 #define CONFIG_ENV_IS_IN_MMC
 
-/* Extra Environment */
-#define CONFIG_EXTRA_ENV_SETTINGS \
-       "verify=n\0" \
-       "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
-       "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
-               "bootm ${loadaddr} - ${fdt_addr}\0" \
-       "bootimage=zImage\0" \
-       "fdt_addr=100\0" \
-       "fdtimage=socfpga.dtb\0" \
-       "bootm ${loadaddr} - ${fdt_addr}\0" \
-       "mmcroot=/dev/mmcblk0p2\0" \
-       "mmcboot=setenv bootargs " CONFIG_BOOTARGS \
-               " root=${mmcroot} rw rootwait;" \
-               "bootz ${loadaddr} - ${fdt_addr}\0" \
-       "mmcload=mmc rescan;" \
-               "load mmc 0:1 ${loadaddr} ${bootimage};" \
-               "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
-       "qspiload=sf probe && mtdparts default && run ubiload\0" \
-       "qspiboot=setenv bootargs " CONFIG_BOOTARGS \
-               " ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\
-               "bootz ${loadaddr} - ${fdt_addr}\0" \
-       "ubiload=ubi part UBI && ubifsmount ubi0 && " \
-               "ubifsload ${loadaddr} /boot/${bootimage} && " \
-               "ubifsload ${fdt_addr} /boot/${fdtimage}\0"
-
 /* The rest of the configuration is shared */
 #include <configs/socfpga_common.h>
 
index 90343b7c6dde56c880afdb93b838b1c8007b9664..5dc929852bcac73cdd7d1605d83017832e2a3784 100644 (file)
@@ -16,9 +16,6 @@
 #define PHYS_SDRAM_1_SIZE              0x40000000      /* 1GiB on SoCrates */
 
 /* Booting Linux */
-#define CONFIG_BOOTFILE                "zImage"
-#define CONFIG_BOOTARGS                "console=ttyS0," __stringify(CONFIG_BAUDRATE)
-#define CONFIG_BOOTCOMMAND     "run mmcload; run mmcboot"
 #define CONFIG_LOADADDR                0x01000000
 #define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
 
 
 #define CONFIG_ENV_IS_IN_MMC
 
-/* Extra Environment */
-#define CONFIG_EXTRA_ENV_SETTINGS \
-       "verify=n\0" \
-       "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
-       "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
-               "bootm ${loadaddr} - ${fdt_addr}\0" \
-       "bootimage=zImage\0" \
-       "fdt_addr=100\0" \
-       "fdtimage=socfpga.dtb\0" \
-       "bootm ${loadaddr} - ${fdt_addr}\0" \
-       "mmcroot=/dev/mmcblk0p2\0" \
-       "mmcboot=setenv bootargs " CONFIG_BOOTARGS \
-               " root=${mmcroot} rw rootwait;" \
-               "bootz ${loadaddr} - ${fdt_addr}\0" \
-       "mmcload=mmc rescan;" \
-               "load mmc 0:1 ${loadaddr} ${bootimage};" \
-               "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
-       "qspiroot=/dev/mtdblock0\0" \
-       "qspirootfstype=jffs2\0" \
-       "qspiboot=setenv bootargs " CONFIG_BOOTARGS \
-               " root=${qspiroot} rw rootfstype=${qspirootfstype};"\
-               "bootm ${loadaddr} - ${fdt_addr}\0"
-
 /* The rest of the configuration is shared */
 #include <configs/socfpga_common.h>
 
index f67fafd756e661e7da4cfd18267483b9844ec3a8..64e1595cbe79a1db3723a8c15c69e1a8634b3288 100644 (file)
@@ -16,9 +16,6 @@
 #define PHYS_SDRAM_1_SIZE              0x40000000      /* 1GiB on SR1500 */
 
 /* Booting Linux */
-#define CONFIG_BOOTFILE                "uImage"
-#define CONFIG_BOOTARGS                "console=ttyS0," __stringify(CONFIG_BAUDRATE)
-#define CONFIG_BOOTCOMMAND     "run mmcload; run mmcboot"
 #define CONFIG_LOADADDR                0x01000000
 #define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
 
 #define CONFIG_PHY_MARVELL
 #define PHY_ANEG_TIMEOUT       8000
 
-#define CONFIG_EXTRA_ENV_SETTINGS \
-       "verify=n\0" \
-       "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
-       "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
-               "bootm ${loadaddr} - ${fdt_addr}\0" \
-       "bootimage=zImage\0" \
-       "fdt_addr=100\0" \
-       "fdtimage=socfpga.dtb\0" \
-               "fsloadcmd=ext2load\0" \
-       "bootm ${loadaddr} - ${fdt_addr}\0" \
-       "mmcroot=/dev/mmcblk0p2\0" \
-       "mmcboot=setenv bootargs " CONFIG_BOOTARGS \
-               " root=${mmcroot} rw rootwait;" \
-               "bootz ${loadaddr} - ${fdt_addr}\0" \
-       "mmcload=mmc rescan;" \
-               "load mmc 0:1 ${loadaddr} ${bootimage};" \
-               "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
-       "qspiload=sf probe && mtdparts default && run ubiload\0" \
-       "qspiboot=setenv bootargs " CONFIG_BOOTARGS \
-               " ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\
-               "bootz ${loadaddr} - ${fdt_addr}\0" \
-       "ubiload=ubi part UBI && ubifsmount ubi0 && " \
-               "ubifsload ${loadaddr} /boot/${bootimage} && " \
-               "ubifsload ${fdt_addr} /boot/${fdtimage}\0"
-
 /* Environment */
 #define CONFIG_ENV_IS_IN_SPI_FLASH
 
index 0d640b96e7b11337cb2cffb045a5d5887c415fdf..2980ae6200f25949c75a32e834b0329ae3020471 100644 (file)
@@ -115,17 +115,23 @@ void printhex8(uint value);
  * Now define some functions - this should be inserted into the serial driver
  */
 #define DEBUG_UART_FUNCS \
-       void printch(int ch) \
+\
+       static inline void _printch(int ch) \
        { \
                if (ch == '\n') \
                        _debug_uart_putc('\r'); \
                _debug_uart_putc(ch); \
        } \
+\
+       void printch(int ch) \
+       { \
+               _printch(ch); \
+       } \
 \
        void printascii(const char *str) \
        { \
                while (*str) \
-                       printch(*str++); \
+                       _printch(*str++); \
        } \
 \
        static inline void printhex1(uint digit) \
index d83314435d860d59ffb9d5a14284d70a3c3a4453..cecb2322bcbf0dbc8bc109782a9cc76745dbefa6 100644 (file)
@@ -4,13 +4,16 @@
  * Copyright (C) 2003 Bernardo Innocenti <bernie@develer.com>
  * Based on former asm-ppc/div64.h and asm-m68knommu/div64.h
  *
+ * Optimization for constant divisors on 32-bit machines:
+ * Copyright (C) 2006-2015 Nicolas Pitre
+ *
  * The semantics of do_div() are:
  *
  * uint32_t do_div(uint64_t *n, uint32_t base)
  * {
- *     uint32_t remainder = *n % base;
- *     *n = *n / base;
- *     return remainder;
+ *     uint32_t remainder = *n % base;
+ *     *n = *n / base;
+ *     return remainder;
  * }
  *
  * NOTE: macro parameter n is evaluated multiple times,
  */
 
 #include <linux/types.h>
+#include <linux/compiler.h>
+
+#if BITS_PER_LONG == 64
+
+# define do_div(n,base) ({                                     \
+       uint32_t __base = (base);                               \
+       uint32_t __rem;                                         \
+       __rem = ((uint64_t)(n)) % __base;                       \
+       (n) = ((uint64_t)(n)) / __base;                         \
+       __rem;                                                  \
+ })
+
+#elif BITS_PER_LONG == 32
+
+#include <linux/log2.h>
+
+/*
+ * If the divisor happens to be constant, we determine the appropriate
+ * inverse at compile time to turn the division into a few inline
+ * multiplications which ought to be much faster. And yet only if compiling
+ * with a sufficiently recent gcc version to perform proper 64-bit constant
+ * propagation.
+ *
+ * (It is unfortunate that gcc doesn't perform all this internally.)
+ */
+
+#ifndef __div64_const32_is_OK
+#define __div64_const32_is_OK (__GNUC__ >= 4)
+#endif
+
+#define __div64_const32(n, ___b)                                       \
+({                                                                     \
+       /*                                                              \
+        * Multiplication by reciprocal of b: n / b = n * (p / b) / p   \
+        *                                                              \
+        * We rely on the fact that most of this code gets optimized    \
+        * away at compile time due to constant propagation and only    \
+        * a few multiplication instructions should remain.             \
+        * Hence this monstrous macro (static inline doesn't always     \
+        * do the trick here).                                          \
+        */                                                             \
+       uint64_t ___res, ___x, ___t, ___m, ___n = (n);                  \
+       uint32_t ___p, ___bias;                                         \
+                                                                       \
+       /* determine MSB of b */                                        \
+       ___p = 1 << ilog2(___b);                                        \
+                                                                       \
+       /* compute m = ((p << 64) + b - 1) / b */                       \
+       ___m = (~0ULL / ___b) * ___p;                                   \
+       ___m += (((~0ULL % ___b + 1) * ___p) + ___b - 1) / ___b;        \
+                                                                       \
+       /* one less than the dividend with highest result */            \
+       ___x = ~0ULL / ___b * ___b - 1;                                 \
+                                                                       \
+       /* test our ___m with res = m * x / (p << 64) */                \
+       ___res = ((___m & 0xffffffff) * (___x & 0xffffffff)) >> 32;     \
+       ___t = ___res += (___m & 0xffffffff) * (___x >> 32);            \
+       ___res += (___x & 0xffffffff) * (___m >> 32);                   \
+       ___t = (___res < ___t) ? (1ULL << 32) : 0;                      \
+       ___res = (___res >> 32) + ___t;                                 \
+       ___res += (___m >> 32) * (___x >> 32);                          \
+       ___res /= ___p;                                                 \
+                                                                       \
+       /* Now sanitize and optimize what we've got. */                 \
+       if (~0ULL % (___b / (___b & -___b)) == 0) {                     \
+               /* special case, can be simplified to ... */            \
+               ___n /= (___b & -___b);                                 \
+               ___m = ~0ULL / (___b / (___b & -___b));                 \
+               ___p = 1;                                               \
+               ___bias = 1;                                            \
+       } else if (___res != ___x / ___b) {                             \
+               /*                                                      \
+                * We can't get away without a bias to compensate       \
+                * for bit truncation errors.  To avoid it we'd need an \
+                * additional bit to represent m which would overflow   \
+                * a 64-bit variable.                                   \
+                *                                                      \
+                * Instead we do m = p / b and n / b = (n * m + m) / p. \
+                */                                                     \
+               ___bias = 1;                                            \
+               /* Compute m = (p << 64) / b */                         \
+               ___m = (~0ULL / ___b) * ___p;                           \
+               ___m += ((~0ULL % ___b + 1) * ___p) / ___b;             \
+       } else {                                                        \
+               /*                                                      \
+                * Reduce m / p, and try to clear bit 31 of m when      \
+                * possible, otherwise that'll need extra overflow      \
+                * handling later.                                      \
+                */                                                     \
+               uint32_t ___bits = -(___m & -___m);                     \
+               ___bits |= ___m >> 32;                                  \
+               ___bits = (~___bits) << 1;                              \
+               /*                                                      \
+                * If ___bits == 0 then setting bit 31 is  unavoidable. \
+                * Simply apply the maximum possible reduction in that  \
+                * case. Otherwise the MSB of ___bits indicates the     \
+                * best reduction we should apply.                      \
+                */                                                     \
+               if (!___bits) {                                         \
+                       ___p /= (___m & -___m);                         \
+                       ___m /= (___m & -___m);                         \
+               } else {                                                \
+                       ___p >>= ilog2(___bits);                        \
+                       ___m >>= ilog2(___bits);                        \
+               }                                                       \
+               /* No bias needed. */                                   \
+               ___bias = 0;                                            \
+       }                                                               \
+                                                                       \
+       /*                                                              \
+        * Now we have a combination of 2 conditions:                   \
+        *                                                              \
+        * 1) whether or not we need to apply a bias, and               \
+        *                                                              \
+        * 2) whether or not there might be an overflow in the cross    \
+        *    product determined by (___m & ((1 << 63) | (1 << 31))).   \
+        *                                                              \
+        * Select the best way to do (m_bias + m * n) / (1 << 64).      \
+        * From now on there will be actual runtime code generated.     \
+        */                                                             \
+       ___res = __arch_xprod_64(___m, ___n, ___bias);                  \
+                                                                       \
+       ___res /= ___p;                                                 \
+})
+
+#ifndef __arch_xprod_64
+/*
+ * Default C implementation for __arch_xprod_64()
+ *
+ * Prototype: uint64_t __arch_xprod_64(const uint64_t m, uint64_t n, bool bias)
+ * Semantic:  retval = ((bias ? m : 0) + m * n) >> 64
+ *
+ * The product is a 128-bit value, scaled down to 64 bits.
+ * Assuming constant propagation to optimize away unused conditional code.
+ * Architectures may provide their own optimized assembly implementation.
+ */
+static inline uint64_t __arch_xprod_64(const uint64_t m, uint64_t n, bool bias)
+{
+       uint32_t m_lo = m;
+       uint32_t m_hi = m >> 32;
+       uint32_t n_lo = n;
+       uint32_t n_hi = n >> 32;
+       uint64_t res, tmp;
+
+       if (!bias) {
+               res = ((uint64_t)m_lo * n_lo) >> 32;
+       } else if (!(m & ((1ULL << 63) | (1ULL << 31)))) {
+               /* there can't be any overflow here */
+               res = (m + (uint64_t)m_lo * n_lo) >> 32;
+       } else {
+               res = m + (uint64_t)m_lo * n_lo;
+               tmp = (res < m) ? (1ULL << 32) : 0;
+               res = (res >> 32) + tmp;
+       }
+
+       if (!(m & ((1ULL << 63) | (1ULL << 31)))) {
+               /* there can't be any overflow here */
+               res += (uint64_t)m_lo * n_hi;
+               res += (uint64_t)m_hi * n_lo;
+               res >>= 32;
+       } else {
+               tmp = res += (uint64_t)m_lo * n_hi;
+               res += (uint64_t)m_hi * n_lo;
+               tmp = (res < tmp) ? (1ULL << 32) : 0;
+               res = (res >> 32) + tmp;
+       }
 
+       res += (uint64_t)m_hi * n_hi;
+
+       return res;
+}
+#endif
+
+#ifndef __div64_32
 extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
+#endif
 
 /* The unnecessary pointer compare is there
  * to check for type safety (n must be 64bit)
@@ -28,14 +205,32 @@ extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
        uint32_t __base = (base);                       \
        uint32_t __rem;                                 \
        (void)(((typeof((n)) *)0) == ((uint64_t *)0));  \
-       if (((n) >> 32) == 0) {                 \
+       if (__builtin_constant_p(__base) &&             \
+           is_power_of_2(__base)) {                    \
+               __rem = (n) & (__base - 1);             \
+               (n) >>= ilog2(__base);                  \
+       } else if (__div64_const32_is_OK &&             \
+                  __builtin_constant_p(__base) &&      \
+                  __base != 0) {                       \
+               uint32_t __res_lo, __n_lo = (n);        \
+               (n) = __div64_const32(n, __base);       \
+               /* the remainder can be computed with 32-bit regs */ \
+               __res_lo = (n);                         \
+               __rem = __n_lo - __res_lo * __base;     \
+       } else if (likely(((n) >> 32) == 0)) {          \
                __rem = (uint32_t)(n) % __base;         \
                (n) = (uint32_t)(n) / __base;           \
-       } else                                          \
+       } else                                          \
                __rem = __div64_32(&(n), __base);       \
        __rem;                                          \
  })
 
+#else /* BITS_PER_LONG == ?? */
+
+# error do_div() does not yet support the C64
+
+#endif /* BITS_PER_LONG */
+
 /* Wrapper for do_div(). Doesn't modify dividend and returns
  * the result, not reminder.
  */
diff --git a/include/dt-bindings/clock/gxbb-aoclkc.h b/include/dt-bindings/clock/gxbb-aoclkc.h
new file mode 100644 (file)
index 0000000..3175148
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * This file is provided under a dual BSD/GPLv2 license.  When using or
+ * redistributing this file, you may do so under either license.
+ *
+ * GPL LICENSE SUMMARY
+ *
+ * Copyright (c) 2016 BayLibre, SAS.
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ * The full GNU General Public License is included in this distribution
+ * in the file called COPYING.
+ *
+ * BSD LICENSE
+ *
+ * Copyright (c) 2016 BayLibre, SAS.
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *   * Neither the name of Intel Corporation nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DT_BINDINGS_CLOCK_AMLOGIC_MESON_GXBB_AOCLK
+#define DT_BINDINGS_CLOCK_AMLOGIC_MESON_GXBB_AOCLK
+
+#define CLKID_AO_REMOTE                0
+#define CLKID_AO_I2C_MASTER    1
+#define CLKID_AO_I2C_SLAVE     2
+#define CLKID_AO_UART1         3
+#define CLKID_AO_UART2         4
+#define CLKID_AO_IR_BLASTER    5
+
+#endif
diff --git a/include/dt-bindings/clock/gxbb-clkc.h b/include/dt-bindings/clock/gxbb-clkc.h
new file mode 100644 (file)
index 0000000..692846c
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * GXBB clock tree IDs
+ */
+
+#ifndef __GXBB_CLKC_H
+#define __GXBB_CLKC_H
+
+#define CLKID_CPUCLK           1
+#define CLKID_HDMI_PLL         2
+#define CLKID_FCLK_DIV2                4
+#define CLKID_FCLK_DIV3                5
+#define CLKID_FCLK_DIV4                6
+#define CLKID_CLK81            12
+#define CLKID_MPLL2            15
+#define CLKID_SPI              34
+#define CLKID_I2C              22
+#define CLKID_SAR_ADC          23
+#define CLKID_ETH              36
+#define CLKID_USB0             50
+#define CLKID_USB1             51
+#define CLKID_USB              55
+#define CLKID_HDMI_PCLK                63
+#define CLKID_USB1_DDR_BRIDGE  64
+#define CLKID_USB0_DDR_BRIDGE  65
+#define CLKID_SANA             69
+#define CLKID_GCLK_VENCI_INT0  77
+#define CLKID_AO_I2C           93
+#define CLKID_SD_EMMC_A                94
+#define CLKID_SD_EMMC_B                95
+#define CLKID_SD_EMMC_C                96
+#define CLKID_SAR_ADC_CLK      97
+#define CLKID_SAR_ADC_SEL      98
+
+#endif /* __GXBB_CLKC_H */
diff --git a/include/dt-bindings/clock/imx6sl-clock.h b/include/dt-bindings/clock/imx6sl-clock.h
new file mode 100644 (file)
index 0000000..e14573e
--- /dev/null
@@ -0,0 +1,180 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#ifndef __DT_BINDINGS_CLOCK_IMX6SL_H
+#define __DT_BINDINGS_CLOCK_IMX6SL_H
+
+#define IMX6SL_CLK_DUMMY               0
+#define IMX6SL_CLK_CKIL                        1
+#define IMX6SL_CLK_OSC                 2
+#define IMX6SL_CLK_PLL1_SYS            3
+#define IMX6SL_CLK_PLL2_BUS            4
+#define IMX6SL_CLK_PLL3_USB_OTG                5
+#define IMX6SL_CLK_PLL4_AUDIO          6
+#define IMX6SL_CLK_PLL5_VIDEO          7
+#define IMX6SL_CLK_PLL6_ENET           8
+#define IMX6SL_CLK_PLL7_USB_HOST       9
+#define IMX6SL_CLK_USBPHY1             10
+#define IMX6SL_CLK_USBPHY2             11
+#define IMX6SL_CLK_USBPHY1_GATE                12
+#define IMX6SL_CLK_USBPHY2_GATE                13
+#define IMX6SL_CLK_PLL4_POST_DIV       14
+#define IMX6SL_CLK_PLL5_POST_DIV       15
+#define IMX6SL_CLK_PLL5_VIDEO_DIV      16
+#define IMX6SL_CLK_ENET_REF            17
+#define IMX6SL_CLK_PLL2_PFD0           18
+#define IMX6SL_CLK_PLL2_PFD1           19
+#define IMX6SL_CLK_PLL2_PFD2           20
+#define IMX6SL_CLK_PLL3_PFD0           21
+#define IMX6SL_CLK_PLL3_PFD1           22
+#define IMX6SL_CLK_PLL3_PFD2           23
+#define IMX6SL_CLK_PLL3_PFD3           24
+#define IMX6SL_CLK_PLL2_198M           25
+#define IMX6SL_CLK_PLL3_120M           26
+#define IMX6SL_CLK_PLL3_80M            27
+#define IMX6SL_CLK_PLL3_60M            28
+#define IMX6SL_CLK_STEP                        29
+#define IMX6SL_CLK_PLL1_SW             30
+#define IMX6SL_CLK_OCRAM_ALT_SEL       31
+#define IMX6SL_CLK_OCRAM_SEL           32
+#define IMX6SL_CLK_PRE_PERIPH2_SEL     33
+#define IMX6SL_CLK_PRE_PERIPH_SEL      34
+#define IMX6SL_CLK_PERIPH2_CLK2_SEL    35
+#define IMX6SL_CLK_PERIPH_CLK2_SEL     36
+#define IMX6SL_CLK_CSI_SEL             37
+#define IMX6SL_CLK_LCDIF_AXI_SEL       38
+#define IMX6SL_CLK_USDHC1_SEL          39
+#define IMX6SL_CLK_USDHC2_SEL          40
+#define IMX6SL_CLK_USDHC3_SEL          41
+#define IMX6SL_CLK_USDHC4_SEL          42
+#define IMX6SL_CLK_SSI1_SEL            43
+#define IMX6SL_CLK_SSI2_SEL            44
+#define IMX6SL_CLK_SSI3_SEL            45
+#define IMX6SL_CLK_PERCLK_SEL          46
+#define IMX6SL_CLK_PXP_AXI_SEL         47
+#define IMX6SL_CLK_EPDC_AXI_SEL                48
+#define IMX6SL_CLK_GPU2D_OVG_SEL       49
+#define IMX6SL_CLK_GPU2D_SEL           50
+#define IMX6SL_CLK_LCDIF_PIX_SEL       51
+#define IMX6SL_CLK_EPDC_PIX_SEL                52
+#define IMX6SL_CLK_SPDIF0_SEL          53
+#define IMX6SL_CLK_SPDIF1_SEL          54
+#define IMX6SL_CLK_EXTERN_AUDIO_SEL    55
+#define IMX6SL_CLK_ECSPI_SEL           56
+#define IMX6SL_CLK_UART_SEL            57
+#define IMX6SL_CLK_PERIPH              58
+#define IMX6SL_CLK_PERIPH2             59
+#define IMX6SL_CLK_OCRAM_PODF          60
+#define IMX6SL_CLK_PERIPH_CLK2_PODF    61
+#define IMX6SL_CLK_PERIPH2_CLK2_PODF   62
+#define IMX6SL_CLK_IPG                 63
+#define IMX6SL_CLK_CSI_PODF            64
+#define IMX6SL_CLK_LCDIF_AXI_PODF      65
+#define IMX6SL_CLK_USDHC1_PODF         66
+#define IMX6SL_CLK_USDHC2_PODF         67
+#define IMX6SL_CLK_USDHC3_PODF         68
+#define IMX6SL_CLK_USDHC4_PODF         69
+#define IMX6SL_CLK_SSI1_PRED           70
+#define IMX6SL_CLK_SSI1_PODF           71
+#define IMX6SL_CLK_SSI2_PRED           72
+#define IMX6SL_CLK_SSI2_PODF           73
+#define IMX6SL_CLK_SSI3_PRED           74
+#define IMX6SL_CLK_SSI3_PODF           75
+#define IMX6SL_CLK_PERCLK              76
+#define IMX6SL_CLK_PXP_AXI_PODF                77
+#define IMX6SL_CLK_EPDC_AXI_PODF       78
+#define IMX6SL_CLK_GPU2D_OVG_PODF      79
+#define IMX6SL_CLK_GPU2D_PODF          80
+#define IMX6SL_CLK_LCDIF_PIX_PRED      81
+#define IMX6SL_CLK_EPDC_PIX_PRED       82
+#define IMX6SL_CLK_LCDIF_PIX_PODF      83
+#define IMX6SL_CLK_EPDC_PIX_PODF       84
+#define IMX6SL_CLK_SPDIF0_PRED         85
+#define IMX6SL_CLK_SPDIF0_PODF         86
+#define IMX6SL_CLK_SPDIF1_PRED         87
+#define IMX6SL_CLK_SPDIF1_PODF         88
+#define IMX6SL_CLK_EXTERN_AUDIO_PRED   89
+#define IMX6SL_CLK_EXTERN_AUDIO_PODF   90
+#define IMX6SL_CLK_ECSPI_ROOT          91
+#define IMX6SL_CLK_UART_ROOT           92
+#define IMX6SL_CLK_AHB                 93
+#define IMX6SL_CLK_MMDC_ROOT           94
+#define IMX6SL_CLK_ARM                 95
+#define IMX6SL_CLK_ECSPI1              96
+#define IMX6SL_CLK_ECSPI2              97
+#define IMX6SL_CLK_ECSPI3              98
+#define IMX6SL_CLK_ECSPI4              99
+#define IMX6SL_CLK_EPIT1               100
+#define IMX6SL_CLK_EPIT2               101
+#define IMX6SL_CLK_EXTERN_AUDIO                102
+#define IMX6SL_CLK_GPT                 103
+#define IMX6SL_CLK_GPT_SERIAL          104
+#define IMX6SL_CLK_GPU2D_OVG           105
+#define IMX6SL_CLK_I2C1                        106
+#define IMX6SL_CLK_I2C2                        107
+#define IMX6SL_CLK_I2C3                        108
+#define IMX6SL_CLK_OCOTP               109
+#define IMX6SL_CLK_CSI                 110
+#define IMX6SL_CLK_PXP_AXI             111
+#define IMX6SL_CLK_EPDC_AXI            112
+#define IMX6SL_CLK_LCDIF_AXI           113
+#define IMX6SL_CLK_LCDIF_PIX           114
+#define IMX6SL_CLK_EPDC_PIX            115
+#define IMX6SL_CLK_OCRAM               116
+#define IMX6SL_CLK_PWM1                        117
+#define IMX6SL_CLK_PWM2                        118
+#define IMX6SL_CLK_PWM3                        119
+#define IMX6SL_CLK_PWM4                        120
+#define IMX6SL_CLK_SDMA                        121
+#define IMX6SL_CLK_SPDIF               122
+#define IMX6SL_CLK_SSI1                        123
+#define IMX6SL_CLK_SSI2                        124
+#define IMX6SL_CLK_SSI3                        125
+#define IMX6SL_CLK_UART                        126
+#define IMX6SL_CLK_UART_SERIAL         127
+#define IMX6SL_CLK_USBOH3              128
+#define IMX6SL_CLK_USDHC1              129
+#define IMX6SL_CLK_USDHC2              130
+#define IMX6SL_CLK_USDHC3              131
+#define IMX6SL_CLK_USDHC4              132
+#define IMX6SL_CLK_PLL4_AUDIO_DIV      133
+#define IMX6SL_CLK_SPBA                        134
+#define IMX6SL_CLK_ENET                        135
+#define IMX6SL_CLK_LVDS1_SEL           136
+#define IMX6SL_CLK_LVDS1_OUT           137
+#define IMX6SL_CLK_LVDS1_IN            138
+#define IMX6SL_CLK_ANACLK1             139
+#define IMX6SL_PLL1_BYPASS_SRC         140
+#define IMX6SL_PLL2_BYPASS_SRC         141
+#define IMX6SL_PLL3_BYPASS_SRC         142
+#define IMX6SL_PLL4_BYPASS_SRC         143
+#define IMX6SL_PLL5_BYPASS_SRC         144
+#define IMX6SL_PLL6_BYPASS_SRC         145
+#define IMX6SL_PLL7_BYPASS_SRC         146
+#define IMX6SL_CLK_PLL1                        147
+#define IMX6SL_CLK_PLL2                        148
+#define IMX6SL_CLK_PLL3                        149
+#define IMX6SL_CLK_PLL4                        150
+#define IMX6SL_CLK_PLL5                        151
+#define IMX6SL_CLK_PLL6                        152
+#define IMX6SL_CLK_PLL7                        153
+#define IMX6SL_PLL1_BYPASS             154
+#define IMX6SL_PLL2_BYPASS             155
+#define IMX6SL_PLL3_BYPASS             156
+#define IMX6SL_PLL4_BYPASS             157
+#define IMX6SL_PLL5_BYPASS             158
+#define IMX6SL_PLL6_BYPASS             159
+#define IMX6SL_PLL7_BYPASS             160
+#define IMX6SL_CLK_SSI1_IPG            161
+#define IMX6SL_CLK_SSI2_IPG            162
+#define IMX6SL_CLK_SSI3_IPG            163
+#define IMX6SL_CLK_SPDIF_GCLK          164
+#define IMX6SL_CLK_END                 165
+
+#endif /* __DT_BINDINGS_CLOCK_IMX6SL_H */
index bbca3d038900730a1f203eea2e15cb0ddcb19155..2732d6c0fb39ebd28ef4ec81d415fc0d0677c8e7 100644 (file)
@@ -15,6 +15,8 @@
 #define AT91_PINCTRL_DEGLITCH          (1 << 2)
 #define AT91_PINCTRL_PULL_DOWN         (1 << 3)
 #define AT91_PINCTRL_DIS_SCHMIT                (1 << 4)
+#define AT91_PINCTRL_OUTPUT            (1 << 7)
+#define AT91_PINCTRL_OUTPUT_VAL(x)     ((x & 0x1) << 8)
 #define AT91_PINCTRL_DEBOUNCE          (1 << 16)
 #define AT91_PINCTRL_DEBOUNCE_VAL(x)   (x << 17)
 
diff --git a/include/dt-bindings/reset/gxbb-aoclkc.h b/include/dt-bindings/reset/gxbb-aoclkc.h
new file mode 100644 (file)
index 0000000..9e3fd60
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * This file is provided under a dual BSD/GPLv2 license.  When using or
+ * redistributing this file, you may do so under either license.
+ *
+ * GPL LICENSE SUMMARY
+ *
+ * Copyright (c) 2016 BayLibre, SAS.
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ * The full GNU General Public License is included in this distribution
+ * in the file called COPYING.
+ *
+ * BSD LICENSE
+ *
+ * Copyright (c) 2016 BayLibre, SAS.
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *   * Neither the name of Intel Corporation nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DT_BINDINGS_RESET_AMLOGIC_MESON_GXBB_AOCLK
+#define DT_BINDINGS_RESET_AMLOGIC_MESON_GXBB_AOCLK
+
+#define RESET_AO_REMOTE                0
+#define RESET_AO_I2C_MASTER    1
+#define RESET_AO_I2C_SLAVE     2
+#define RESET_AO_UART1         3
+#define RESET_AO_UART2         4
+#define RESET_AO_IR_BLASTER    5
+
+#endif
index d074478f1415e4c9ca73b324ef7a856dbe1c93f6..2134701c547275e16d280923a0de7733997edbcf 100644 (file)
@@ -155,6 +155,14 @@ enum fdt_compat_id {
        COMPAT_INTEL_BAYTRAIL_FSP_MDP,  /* Intel FSP memory-down params */
        COMPAT_INTEL_IVYBRIDGE_FSP,     /* Intel Ivy Bridge FSP */
        COMPAT_SUNXI_NAND,              /* SUNXI NAND controller */
+       COMPAT_ALTERA_SOCFPGA_CLK,      /* SoCFPGA Clock initialization */
+       COMPAT_ALTERA_SOCFPGA_PINCTRL_SINGLE,   /* SoCFPGA pinctrl-single */
+       COMPAT_ALTERA_SOCFPGA_H2F_BRG,          /* SoCFPGA hps2fpga bridge */
+       COMPAT_ALTERA_SOCFPGA_LWH2F_BRG,        /* SoCFPGA lwhps2fpga bridge */
+       COMPAT_ALTERA_SOCFPGA_F2H_BRG,          /* SoCFPGA fpga2hps bridge */
+       COMPAT_ALTERA_SOCFPGA_F2SDR0,           /* SoCFPGA fpga2SDRAM0 bridge */
+       COMPAT_ALTERA_SOCFPGA_F2SDR1,           /* SoCFPGA fpga2SDRAM1 bridge */
+       COMPAT_ALTERA_SOCFPGA_F2SDR2,           /* SoCFPGA fpga2SDRAM2 bridge */
 
        COMPAT_COUNT,
 };
index b8de46bb42e8ec4e0d1af604fcdcfe909341dbb2..6a1f04b81ac400485c9f401ebba050e78502e922 100644 (file)
@@ -477,4 +477,12 @@ typedef struct fixed_ddr_parm{
        int max_freq;
        fsl_ddr_cfg_regs_t *ddr_settings;
 } fixed_ddr_parm_t;
+
+/**
+ * fsl_initdram() - Set up the SDRAM
+ *
+ * @return 0 if OK, -ve on error
+ */
+int fsl_initdram(void);
+
 #endif
index 6d760d75c4f789e95776adc7733aba3fbe850829..08584c8f237f39640650c9b93ee794f6ba8f5b2d 100644 (file)
@@ -1,10 +1,15 @@
 #ifndef _LINUX_MATH64_H
 #define _LINUX_MATH64_H
 
+#include <div64.h>
+#include <linux/bitops.h>
 #include <linux/types.h>
 
 #if BITS_PER_LONG == 64
 
+#define div64_long(x, y) div64_s64((x), (y))
+#define div64_ul(x, y)   div64_u64((x), (y))
+
 /**
  * div_u64_rem - unsigned 64bit divide with 32bit divisor with remainder
  *
@@ -26,6 +31,15 @@ static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder)
        return dividend / divisor;
 }
 
+/**
+ * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder
+ */
+static inline u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder)
+{
+       *remainder = dividend % divisor;
+       return dividend / divisor;
+}
+
 /**
  * div64_u64 - unsigned 64bit divide with 64bit divisor
  */
@@ -34,8 +48,19 @@ static inline u64 div64_u64(u64 dividend, u64 divisor)
        return dividend / divisor;
 }
 
+/**
+ * div64_s64 - signed 64bit divide with 64bit divisor
+ */
+static inline s64 div64_s64(s64 dividend, s64 divisor)
+{
+       return dividend / divisor;
+}
+
 #elif BITS_PER_LONG == 32
 
+#define div64_long(x, y) div_s64((x), (y))
+#define div64_ul(x, y)   div_u64((x), (y))
+
 #ifndef div_u64_rem
 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
 {
@@ -48,10 +73,18 @@ static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
 extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder);
 #endif
 
+#ifndef div64_u64_rem
+extern u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder);
+#endif
+
 #ifndef div64_u64
 extern u64 div64_u64(u64 dividend, u64 divisor);
 #endif
 
+#ifndef div64_s64
+extern s64 div64_s64(s64 dividend, s64 divisor);
+#endif
+
 #endif /* BITS_PER_LONG */
 
 /**
@@ -82,4 +115,143 @@ static inline s64 div_s64(s64 dividend, s32 divisor)
 
 u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder);
 
+static __always_inline u32
+__iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder)
+{
+       u32 ret = 0;
+
+       while (dividend >= divisor) {
+               /* The following asm() prevents the compiler from
+                  optimising this loop into a modulo operation.  */
+               asm("" : "+rm"(dividend));
+
+               dividend -= divisor;
+               ret++;
+       }
+
+       *remainder = dividend;
+
+       return ret;
+}
+
+#ifndef mul_u32_u32
+/*
+ * Many a GCC version messes this up and generates a 64x64 mult :-(
+ */
+static inline u64 mul_u32_u32(u32 a, u32 b)
+{
+       return (u64)a * b;
+}
+#endif
+
+#if defined(CONFIG_ARCH_SUPPORTS_INT128) && defined(__SIZEOF_INT128__)
+
+#ifndef mul_u64_u32_shr
+static inline u64 mul_u64_u32_shr(u64 a, u32 mul, unsigned int shift)
+{
+       return (u64)(((unsigned __int128)a * mul) >> shift);
+}
+#endif /* mul_u64_u32_shr */
+
+#ifndef mul_u64_u64_shr
+static inline u64 mul_u64_u64_shr(u64 a, u64 mul, unsigned int shift)
+{
+       return (u64)(((unsigned __int128)a * mul) >> shift);
+}
+#endif /* mul_u64_u64_shr */
+
+#else
+
+#ifndef mul_u64_u32_shr
+static inline u64 mul_u64_u32_shr(u64 a, u32 mul, unsigned int shift)
+{
+       u32 ah, al;
+       u64 ret;
+
+       al = a;
+       ah = a >> 32;
+
+       ret = mul_u32_u32(al, mul) >> shift;
+       if (ah)
+               ret += mul_u32_u32(ah, mul) << (32 - shift);
+
+       return ret;
+}
+#endif /* mul_u64_u32_shr */
+
+#ifndef mul_u64_u64_shr
+static inline u64 mul_u64_u64_shr(u64 a, u64 b, unsigned int shift)
+{
+       union {
+               u64 ll;
+               struct {
+#ifdef __BIG_ENDIAN
+                       u32 high, low;
+#else
+                       u32 low, high;
+#endif
+               } l;
+       } rl, rm, rn, rh, a0, b0;
+       u64 c;
+
+       a0.ll = a;
+       b0.ll = b;
+
+       rl.ll = mul_u32_u32(a0.l.low, b0.l.low);
+       rm.ll = mul_u32_u32(a0.l.low, b0.l.high);
+       rn.ll = mul_u32_u32(a0.l.high, b0.l.low);
+       rh.ll = mul_u32_u32(a0.l.high, b0.l.high);
+
+       /*
+        * Each of these lines computes a 64-bit intermediate result into "c",
+        * starting at bits 32-95.  The low 32-bits go into the result of the
+        * multiplication, the high 32-bits are carried into the next step.
+        */
+       rl.l.high = c = (u64)rl.l.high + rm.l.low + rn.l.low;
+       rh.l.low = c = (c >> 32) + rm.l.high + rn.l.high + rh.l.low;
+       rh.l.high = (c >> 32) + rh.l.high;
+
+       /*
+        * The 128-bit result of the multiplication is in rl.ll and rh.ll,
+        * shift it right and throw away the high part of the result.
+        */
+       if (shift == 0)
+               return rl.ll;
+       if (shift < 64)
+               return (rl.ll >> shift) | (rh.ll << (64 - shift));
+       return rh.ll >> (shift & 63);
+}
+#endif /* mul_u64_u64_shr */
+
+#endif
+
+#ifndef mul_u64_u32_div
+static inline u64 mul_u64_u32_div(u64 a, u32 mul, u32 divisor)
+{
+       union {
+               u64 ll;
+               struct {
+#ifdef __BIG_ENDIAN
+                       u32 high, low;
+#else
+                       u32 low, high;
+#endif
+               } l;
+       } u, rl, rh;
+
+       u.ll = a;
+       rl.ll = mul_u32_u32(u.l.low, mul);
+       rh.ll = mul_u32_u32(u.l.high, mul) + rl.l.high;
+
+       /* Bits 32-63 of the result will be in rh.l.low. */
+       rl.l.high = do_div(rh.ll, divisor);
+
+       /* Bits 0-31 of the result will be in rl.l.low. */
+       do_div(rl.ll, divisor);
+
+       rl.l.high = rh.l.low;
+       return rl.ll;
+}
+#endif /* mul_u64_u32_div */
+
 #endif /* _LINUX_MATH64_H */
diff --git a/include/uboot_aes.h b/include/uboot_aes.h
new file mode 100644 (file)
index 0000000..6315c02
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2011 The Chromium OS Authors.
+ * (C) Copyright 2010 - 2011 NVIDIA Corporation <www.nvidia.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef _AES_REF_H_
+#define _AES_REF_H_
+
+#ifdef USE_HOSTCC
+/* Define compat stuff for use in fw_* tools. */
+typedef unsigned char u8;
+typedef unsigned int u32;
+#define debug(...) do {} while (0)
+#endif
+
+/*
+ * AES encryption library, with small code size, supporting only 128-bit AES
+ *
+ * AES is a stream cipher which works a block at a time, with each block
+ * in this case being AES_KEY_LENGTH bytes.
+ */
+
+enum {
+       AES_STATECOLS   = 4,    /* columns in the state & expanded key */
+       AES_KEYCOLS     = 4,    /* columns in a key */
+       AES_ROUNDS      = 10,   /* rounds in encryption */
+
+       AES_KEY_LENGTH  = 128 / 8,
+       AES_EXPAND_KEY_LENGTH   = 4 * AES_STATECOLS * (AES_ROUNDS + 1),
+};
+
+/**
+ * aes_expand_key() - Expand the AES key
+ *
+ * Expand a key into a key schedule, which is then used for the other
+ * operations.
+ *
+ * @key                Key, of length AES_KEY_LENGTH bytes
+ * @expkey     Buffer to place expanded key, AES_EXPAND_KEY_LENGTH
+ */
+void aes_expand_key(u8 *key, u8 *expkey);
+
+/**
+ * aes_encrypt() - Encrypt single block of data with AES 128
+ *
+ * @in         Input data
+ * @expkey     Expanded key to use for encryption (from aes_expand_key())
+ * @out                Output data
+ */
+void aes_encrypt(u8 *in, u8 *expkey, u8 *out);
+
+/**
+ * aes_decrypt() - Decrypt single block of data with AES 128
+ *
+ * @in         Input data
+ * @expkey     Expanded key to use for decryption (from aes_expand_key())
+ * @out                Output data
+ */
+void aes_decrypt(u8 *in, u8 *expkey, u8 *out);
+
+/**
+ * Apply chain data to the destination using EOR
+ *
+ * Each array is of length AES_KEY_LENGTH.
+ *
+ * @cbc_chain_data     Chain data
+ * @src                        Source data
+ * @dst                        Destination data, which is modified here
+ */
+void aes_apply_cbc_chain_data(u8 *cbc_chain_data, u8 *src, u8 *dst);
+
+/**
+ * aes_cbc_encrypt_blocks() - Encrypt multiple blocks of data with AES CBC.
+ *
+ * @key_exp            Expanded key to use
+ * @src                        Source data to encrypt
+ * @dst                        Destination buffer
+ * @num_aes_blocks     Number of AES blocks to encrypt
+ */
+void aes_cbc_encrypt_blocks(u8 *key_exp, u8 *src, u8 *dst, u32 num_aes_blocks);
+
+/**
+ * Decrypt multiple blocks of data with AES CBC.
+ *
+ * @key_exp            Expanded key to use
+ * @src                        Source data to decrypt
+ * @dst                        Destination buffer
+ * @num_aes_blocks     Number of AES blocks to decrypt
+ */
+void aes_cbc_decrypt_blocks(u8 *key_exp, u8 *src, u8 *dst, u32 num_aes_blocks);
+
+#endif /* _AES_REF_H_ */
index 9d7a0a1c11850ac76eda5e66715bbc18f534d87b..d6144e61d6ef089a8138cc6f33a3560e6b44c2ba 100644 (file)
--- a/lib/aes.c
+++ b/lib/aes.c
@@ -27,7 +27,7 @@
 #else
 #include <string.h>
 #endif
-#include "aes.h"
+#include "uboot_aes.h"
 
 /* forward s-box */
 static const u8 sbox[256] = {
index 319fca50fa79e2a61b2bbb1b48f3dbecb339647e..206f582ca96c5a11df528cd7dfc7f16eb57145da 100644 (file)
  *
  * Code generated for this function might be very inefficient
  * for some CPUs. __div64_32() can be overridden by linking arch-specific
- * assembly versions such as arch/powerpc/lib/div64.S and arch/sh/lib/div64.S.
+ * assembly versions such as arch/ppc/lib/div64.S and arch/sh/lib/div64.S
+ * or by defining a preprocessor macro in arch/include/asm/div64.h.
  */
 
-#include <div64.h>
-#include <linux/types.h>
-#include <linux/compiler.h>
+#include <linux/compat.h>
+#include <linux/kernel.h>
+#include <linux/math64.h>
 
-uint32_t notrace __div64_32(uint64_t *n, uint32_t base)
+/* Not needed on 64bit architectures */
+#if BITS_PER_LONG == 32
+
+#ifndef __div64_32
+uint32_t __attribute__((weak)) __div64_32(uint64_t *n, uint32_t base)
 {
        uint64_t rem = *n;
        uint64_t b = base;
@@ -52,3 +57,129 @@ uint32_t notrace __div64_32(uint64_t *n, uint32_t base)
        *n = res;
        return rem;
 }
+EXPORT_SYMBOL(__div64_32);
+#endif
+
+#ifndef div_s64_rem
+s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder)
+{
+       u64 quotient;
+
+       if (dividend < 0) {
+               quotient = div_u64_rem(-dividend, abs(divisor), (u32 *)remainder);
+               *remainder = -*remainder;
+               if (divisor > 0)
+                       quotient = -quotient;
+       } else {
+               quotient = div_u64_rem(dividend, abs(divisor), (u32 *)remainder);
+               if (divisor < 0)
+                       quotient = -quotient;
+       }
+       return quotient;
+}
+EXPORT_SYMBOL(div_s64_rem);
+#endif
+
+/**
+ * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder
+ * @dividend:  64bit dividend
+ * @divisor:   64bit divisor
+ * @remainder:  64bit remainder
+ *
+ * This implementation is a comparable to algorithm used by div64_u64.
+ * But this operation, which includes math for calculating the remainder,
+ * is kept distinct to avoid slowing down the div64_u64 operation on 32bit
+ * systems.
+ */
+#ifndef div64_u64_rem
+u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder)
+{
+       u32 high = divisor >> 32;
+       u64 quot;
+
+       if (high == 0) {
+               u32 rem32;
+               quot = div_u64_rem(dividend, divisor, &rem32);
+               *remainder = rem32;
+       } else {
+               int n = 1 + fls(high);
+               quot = div_u64(dividend >> n, divisor >> n);
+
+               if (quot != 0)
+                       quot--;
+
+               *remainder = dividend - quot * divisor;
+               if (*remainder >= divisor) {
+                       quot++;
+                       *remainder -= divisor;
+               }
+       }
+
+       return quot;
+}
+EXPORT_SYMBOL(div64_u64_rem);
+#endif
+
+/**
+ * div64_u64 - unsigned 64bit divide with 64bit divisor
+ * @dividend:  64bit dividend
+ * @divisor:   64bit divisor
+ *
+ * This implementation is a modified version of the algorithm proposed
+ * by the book 'Hacker's Delight'.  The original source and full proof
+ * can be found here and is available for use without restriction.
+ *
+ * 'http://www.hackersdelight.org/hdcodetxt/divDouble.c.txt'
+ */
+#ifndef div64_u64
+u64 div64_u64(u64 dividend, u64 divisor)
+{
+       u32 high = divisor >> 32;
+       u64 quot;
+
+       if (high == 0) {
+               quot = div_u64(dividend, divisor);
+       } else {
+               int n = 1 + fls(high);
+               quot = div_u64(dividend >> n, divisor >> n);
+
+               if (quot != 0)
+                       quot--;
+               if ((dividend - quot * divisor) >= divisor)
+                       quot++;
+       }
+
+       return quot;
+}
+EXPORT_SYMBOL(div64_u64);
+#endif
+
+/**
+ * div64_s64 - signed 64bit divide with 64bit divisor
+ * @dividend:  64bit dividend
+ * @divisor:   64bit divisor
+ */
+#ifndef div64_s64
+s64 div64_s64(s64 dividend, s64 divisor)
+{
+       s64 quot, t;
+
+       quot = div64_u64(abs(dividend), abs(divisor));
+       t = (dividend ^ divisor) >> 63;
+
+       return (quot ^ t) - t;
+}
+EXPORT_SYMBOL(div64_s64);
+#endif
+
+#endif /* BITS_PER_LONG == 32 */
+
+/*
+ * Iterative div/mod for use when dividend is not expected to be much
+ * bigger than divisor.
+ */
+u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder)
+{
+       return __iter_div_u64_rem(dividend, divisor, remainder);
+}
+EXPORT_SYMBOL(iter_div_u64_rem);
index 1edfbf2d39213046ad95e12567d73f28cdcf2820..94372cc6cd5a08023c46a2fb21ff46e2c2420847 100644 (file)
@@ -66,6 +66,14 @@ static const char * const compat_names[COMPAT_COUNT] = {
        COMPAT(INTEL_BAYTRAIL_FSP_MDP, "intel,baytrail-fsp-mdp"),
        COMPAT(INTEL_IVYBRIDGE_FSP, "intel,ivybridge-fsp"),
        COMPAT(COMPAT_SUNXI_NAND, "allwinner,sun4i-a10-nand"),
+       COMPAT(ALTERA_SOCFPGA_CLK, "altr,clk-mgr"),
+       COMPAT(ALTERA_SOCFPGA_PINCTRL_SINGLE, "pinctrl-single"),
+       COMPAT(ALTERA_SOCFPGA_H2F_BRG, "altr,socfpga-hps2fpga-bridge"),
+       COMPAT(ALTERA_SOCFPGA_LWH2F_BRG, "altr,socfpga-lwhps2fpga-bridge"),
+       COMPAT(ALTERA_SOCFPGA_F2H_BRG, "altr,socfpga-fpga2hps-bridge"),
+       COMPAT(ALTERA_SOCFPGA_F2SDR0, "altr,socfpga-fpga2sdram0-bridge"),
+       COMPAT(ALTERA_SOCFPGA_F2SDR1, "altr,socfpga-fpga2sdram1-bridge"),
+       COMPAT(ALTERA_SOCFPGA_F2SDR2, "altr,socfpga-fpga2sdram2-bridge"),
 };
 
 const char *fdtdec_get_compatible(enum fdt_compat_id id)
index d2ce4c1c537baed2970850ccb38ada4e627c6c94..8b8a54755549844a3479d7a5d42d2d43e25d24b4 100644 (file)
@@ -63,6 +63,30 @@ static int region_list_contains_offset(struct fdt_region_state *info,
        return 0;
 }
 
+/**
+ * fdt_add_alias_regions() - Add regions covering the aliases that we want
+ *
+ * The /aliases node is not automatically included by fdtgrep unless the
+ * command-line arguments cause to be included (or not excluded). However
+ * aliases are special in that we generally want to include those which
+ * reference a node that fdtgrep includes.
+ *
+ * In fact we want to include only aliases for those nodes still included in
+ * the fdt, and drop the other aliases since they point to nodes that will not
+ * be present.
+ *
+ * This function scans the aliases and adds regions for those which we want
+ * to keep.
+ *
+ * @fdt: Device tree to scan
+ * @region: List of regions
+ * @count: Number of regions in the list so far (i.e. starting point for this
+ *     function)
+ * @max_regions: Maximum number of regions in @region list
+ * @info: Place to put the region state
+ * @return number of regions after processing, or -FDT_ERR_NOSPACE if we did
+ * not have enough room in the regions table for the regions we wanted to add.
+ */
 int fdt_add_alias_regions(const void *fdt, struct fdt_region *region, int count,
                          int max_regions, struct fdt_region_state *info)
 {
@@ -74,11 +98,17 @@ int fdt_add_alias_regions(const void *fdt, struct fdt_region *region, int count,
        if (node < 0)
                return -FDT_ERR_NOTFOUND;
 
-       /* The aliases node must come before the others */
+       /*
+        * Find the next node so that we know where the /aliases node ends. We
+        * need special handling if /aliases is the last node.
+        */
        node_end = fdt_next_subnode(fdt, node);
-       if (node_end <= 0)
-               return -FDT_ERR_BADLAYOUT;
-       node_end -= sizeof(fdt32_t);
+       if (node_end == -FDT_ERR_NOTFOUND)
+               /* Move back to the FDT_END_NODE tag of '/' */
+               node_end = fdt_size_dt_struct(fdt) - sizeof(fdt32_t) * 2;
+       else if (node_end < 0) /* other error */
+               return node_end;
+       node_end -= sizeof(fdt32_t);  /* Move to FDT_END_NODE tag of /aliases */
 
        did_alias_header = 0;
        info->region = region;
@@ -109,7 +139,7 @@ int fdt_add_alias_regions(const void *fdt, struct fdt_region *region, int count,
                fdt_add_region(info, base + offset, next - offset);
        }
 
-       /* Add the 'end' tag */
+       /* Add the FDT_END_NODE tag */
        if (did_alias_header)
                fdt_add_region(info, base + node_end, sizeof(fdt32_t));
 
index 6def8f98aa4111e3800a4e723cf93f83c6d0fdb0..0b04813dc206be9cd6163136574b7213e5933e91 100644 (file)
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <stdarg.h>
 #include <serial.h>
+#include <linux/ctype.h>
 
 struct printf_info {
        char *bf;       /* Digit buffer */
@@ -52,6 +53,154 @@ static void div_out(struct printf_info *info, unsigned long *num,
                out_dgt(info, dgt);
 }
 
+#ifdef CONFIG_SPL_NET_SUPPORT
+static void string(struct printf_info *info, char *s)
+{
+       char ch;
+
+       while ((ch = *s++))
+               out(info, ch);
+}
+
+static const char hex_asc[] = "0123456789abcdef";
+#define hex_asc_lo(x)  hex_asc[((x) & 0x0f)]
+#define hex_asc_hi(x)  hex_asc[((x) & 0xf0) >> 4]
+
+static inline char *pack_hex_byte(char *buf, u8 byte)
+{
+       *buf++ = hex_asc_hi(byte);
+       *buf++ = hex_asc_lo(byte);
+       return buf;
+}
+
+static void mac_address_string(struct printf_info *info, u8 *addr,
+                               bool separator)
+{
+       /* (6 * 2 hex digits), 5 colons and trailing zero */
+       char mac_addr[6 * 3];
+       char *p = mac_addr;
+       int i;
+
+       for (i = 0; i < 6; i++) {
+               p = pack_hex_byte(p, addr[i]);
+               if (separator && i != 5)
+                       *p++ = ':';
+       }
+       *p = '\0';
+
+       string(info, mac_addr);
+}
+
+static char *put_dec_trunc(char *buf, unsigned int q)
+{
+       unsigned int d3, d2, d1, d0;
+       d1 = (q >> 4) & 0xf;
+       d2 = (q >> 8) & 0xf;
+       d3 = (q >> 12);
+
+       d0 = 6 * (d3 + d2 + d1) + (q & 0xf);
+       q = (d0 * 0xcd) >> 11;
+       d0 = d0 - 10 * q;
+       *buf++ = d0 + '0'; /* least significant digit */
+       d1 = q + 9 * d3 + 5 * d2 + d1;
+       if (d1 != 0) {
+               q = (d1 * 0xcd) >> 11;
+               d1 = d1 - 10 * q;
+               *buf++ = d1 + '0'; /* next digit */
+
+               d2 = q + 2 * d2;
+               if ((d2 != 0) || (d3 != 0)) {
+                       q = (d2 * 0xd) >> 7;
+                       d2 = d2 - 10 * q;
+                       *buf++ = d2 + '0'; /* next digit */
+
+                       d3 = q + 4 * d3;
+                       if (d3 != 0) {
+                               q = (d3 * 0xcd) >> 11;
+                               d3 = d3 - 10 * q;
+                               *buf++ = d3 + '0';  /* next digit */
+                               if (q != 0)
+                                       *buf++ = q + '0'; /* most sign. digit */
+                       }
+               }
+       }
+       return buf;
+}
+
+static void ip4_addr_string(struct printf_info *info, u8 *addr)
+{
+       /* (4 * 3 decimal digits), 3 dots and trailing zero */
+       char ip4_addr[4 * 4];
+       char temp[3];   /* hold each IP quad in reverse order */
+       char *p = ip4_addr;
+       int i, digits;
+
+       for (i = 0; i < 4; i++) {
+               digits = put_dec_trunc(temp, addr[i]) - temp;
+               /* reverse the digits in the quad */
+               while (digits--)
+                       *p++ = temp[digits];
+               if (i != 3)
+                       *p++ = '.';
+       }
+       *p = '\0';
+
+       string(info, ip4_addr);
+}
+#endif
+
+/*
+ * Show a '%p' thing.  A kernel extension is that the '%p' is followed
+ * by an extra set of characters that are extended format
+ * specifiers.
+ *
+ * Right now we handle:
+ *
+ * - 'M' For a 6-byte MAC address, it prints the address in the
+ *       usual colon-separated hex notation.
+ * - 'm' Same as above except there is no colon-separator.
+ * - 'I4'for IPv4 addresses printed in the usual way (dot-separated
+ *       decimal).
+ */
+
+static void pointer(struct printf_info *info, const char *fmt, void *ptr)
+{
+#ifdef DEBUG
+       unsigned long num = (uintptr_t)ptr;
+       unsigned long div;
+#endif
+
+       switch (*fmt) {
+#ifdef DEBUG
+       case 'a':
+
+               switch (fmt[1]) {
+               case 'p':
+               default:
+                       num = *(phys_addr_t *)ptr;
+                       break;
+               }
+               break;
+#endif
+#ifdef CONFIG_SPL_NET_SUPPORT
+       case 'm':
+               return mac_address_string(info, ptr, false);
+       case 'M':
+               return mac_address_string(info, ptr, true);
+       case 'I':
+               if (fmt[1] == '4')
+                       return ip4_addr_string(info, ptr);
+#endif
+       default:
+               break;
+       }
+#ifdef DEBUG
+       div = 1UL << (sizeof(long) * 8 - 4);
+       for (; div; div /= 0x10)
+               div_out(info, &num, div);
+#endif
+}
+
 static int _vprintf(struct printf_info *info, const char *fmt, va_list va)
 {
        char ch;
@@ -144,6 +293,11 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va)
                        case 's':
                                p = va_arg(va, char*);
                                break;
+                       case 'p':
+                               pointer(info, fmt, va_arg(va, void *));
+                               while (isalnum(fmt[0]))
+                                       fmt++;
+                               break;
                        case '%':
                                out(info, '%');
                        default:
index 330bc5897a1c6ad58a91a4fbdd25a075e8c40425..7bc51696fab340a3bac9f521f75cf0d88f259add 100644 (file)
@@ -125,6 +125,7 @@ CONFIG_ARC_SERIAL
 CONFIG_ARC_UART_BASE
 CONFIG_ARIA
 CONFIG_ARIA_FPGA
+CONFIG_ARIES_M28_V10
 CONFIG_ARM926EJS
 CONFIG_ARMADA100
 CONFIG_ARMADA100_FEC
@@ -661,7 +662,6 @@ CONFIG_DEFAULT_SPI_CS
 CONFIG_DEFAULT_SPI_MODE
 CONFIG_DEF_HWCONFIG
 CONFIG_DELAY_ENVIRONMENT
-CONFIG_DENX_M28_V10
 CONFIG_DESIGNWARE_ETH
 CONFIG_DESIGNWARE_WATCHDOG
 CONFIG_DEVCONCENTER
index fa1b85bdae2f4281662b48647249fd5fdc985e89..2fc4a583d448638ce03b5d9984f495cd06983306 100644 (file)
@@ -120,7 +120,7 @@ _libfdt.so-sharedobjs += $(LIBFDT_OBJS)
 libfdt:
 
 tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c
-       LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= python $(srctree)/lib/libfdt/setup.py \
+       LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= ${PYTHON} $(srctree)/lib/libfdt/setup.py \
                "$(_hostc_flags)" $^
        mv _libfdt.so $@
 
index 236e0617ac42ac6d9d1c7e872fcbe1b606b2e68b..b0ea57ebb4a93b940cea61c056c334b36c19f810 100644 (file)
@@ -95,8 +95,9 @@ u-boot/             source directory
 # Possible build outcomes
 OUTCOME_OK, OUTCOME_WARNING, OUTCOME_ERROR, OUTCOME_UNKNOWN = range(4)
 
-# Translate a commit subject into a valid filename
-trans_valid_chars = string.maketrans("/: ", "---")
+# Translate a commit subject into a valid filename (and handle unicode)
+trans_valid_chars = string.maketrans('/: ', '---')
+trans_valid_chars = trans_valid_chars.decode('latin-1')
 
 BASE_CONFIG_FILENAMES = [
     'u-boot.cfg', 'u-boot-spl.cfg', 'u-boot-tpl.cfg'
index e6d523b9de65699ec08ebf863b1e614699d16b9c..b9dfae8d0e7b606c28fac252f82afcaef801fe49 100644 (file)
@@ -24,6 +24,8 @@ def fdt32_to_cpu(val):
         A native-endian integer value
     """
     if sys.version_info > (3, 0):
+        if isinstance(val, bytes):
+            val = val.decode('utf-8')
         val = val.encode('raw_unicode_escape')
     return struct.unpack('>I', val)[0]
 
index 862a0b1a02a1b49840a6d0ab2107cb0556fbeeac..299e0c9608bb2bc3b9e0298929726c14a337f96c 100644 (file)
@@ -34,6 +34,7 @@
 # include <mtd/mtd-user.h>
 #endif
 
+#include "fw_env_private.h"
 #include "fw_env.h"
 
 struct env_opts default_opts = {
@@ -277,6 +278,7 @@ int fw_printenv(int argc, char *argv[], int value_only, struct env_opts *opts)
 
                        printf ("%s\n", env);
                }
+               fw_env_close(opts);
                return 0;
        }
 
@@ -299,10 +301,12 @@ int fw_printenv(int argc, char *argv[], int value_only, struct env_opts *opts)
                printf("%s=%s\n", name, val);
        }
 
+       fw_env_close(opts);
+
        return rc;
 }
 
-int fw_env_close(struct env_opts *opts)
+int fw_env_flush(struct env_opts *opts)
 {
        int ret;
 
@@ -471,6 +475,7 @@ int fw_setenv(int argc, char *argv[], struct env_opts *opts)
        char *name, **valv;
        char *value = NULL;
        int valc;
+       int ret;
 
        if (!opts)
                opts = &default_opts;
@@ -490,8 +495,10 @@ int fw_setenv(int argc, char *argv[], struct env_opts *opts)
        valv = argv + 1;
        valc = argc - 1;
 
-       if (env_flags_validate_env_set_params(name, valv, valc) < 0)
+       if (env_flags_validate_env_set_params(name, valv, valc) < 0) {
+               fw_env_close(opts);
                return -1;
+       }
 
        len = 0;
        for (i = 0; i < valc; ++i) {
@@ -517,7 +524,10 @@ int fw_setenv(int argc, char *argv[], struct env_opts *opts)
 
        free(value);
 
-       return fw_env_close(opts);
+       ret = fw_env_flush(opts);
+       fw_env_close(opts);
+
+       return ret;
 }
 
 /*
@@ -638,7 +648,9 @@ int fw_parse_script(char *fname, struct env_opts *opts)
        if (strcmp(fname, "-") != 0)
                fclose(fp);
 
-       ret |= fw_env_close(opts);
+       ret |= fw_env_flush(opts);
+
+       fw_env_close(opts);
 
        return ret;
 }
@@ -1104,11 +1116,11 @@ int fw_env_open(struct env_opts *opts)
 {
        int crc0, crc0_ok;
        unsigned char flag0;
-       void *addr0;
+       void *addr0 = NULL;
 
        int crc1, crc1_ok;
        unsigned char flag1;
-       void *addr1;
+       void *addr1 = NULL;
 
        int ret;
 
@@ -1119,14 +1131,15 @@ int fw_env_open(struct env_opts *opts)
                opts = &default_opts;
 
        if (parse_config(opts))         /* should fill envdevices */
-               return -1;
+               return -EINVAL;
 
        addr0 = calloc(1, CUR_ENVSIZE);
        if (addr0 == NULL) {
                fprintf(stderr,
                        "Not enough memory for environment (%ld bytes)\n",
                        CUR_ENVSIZE);
-               return -1;
+               ret = -ENOMEM;
+               goto open_cleanup;
        }
 
        /* read environment from FLASH to local buffer */
@@ -1145,8 +1158,10 @@ int fw_env_open(struct env_opts *opts)
        }
 
        dev_current = 0;
-       if (flash_io (O_RDONLY))
-               return -1;
+       if (flash_io(O_RDONLY)) {
+               ret = -EIO;
+               goto open_cleanup;
+       }
 
        crc0 = crc32 (0, (uint8_t *) environment.data, ENV_SIZE);
 
@@ -1154,7 +1169,7 @@ int fw_env_open(struct env_opts *opts)
                ret = env_aes_cbc_crypt(environment.data, 0,
                                        opts->aes_key);
                if (ret)
-                       return ret;
+                       goto open_cleanup;
        }
 
        crc0_ok = (crc0 == *environment.crc);
@@ -1173,7 +1188,8 @@ int fw_env_open(struct env_opts *opts)
                        fprintf(stderr,
                                "Not enough memory for environment (%ld bytes)\n",
                                CUR_ENVSIZE);
-                       return -1;
+                       ret = -ENOMEM;
+                       goto open_cleanup;
                }
                redundant = addr1;
 
@@ -1182,8 +1198,10 @@ int fw_env_open(struct env_opts *opts)
                 * other pointers in environment still point inside addr0
                 */
                environment.image = addr1;
-               if (flash_io (O_RDONLY))
-                       return -1;
+               if (flash_io(O_RDONLY)) {
+                       ret = -EIO;
+                       goto open_cleanup;
+               }
 
                /* Check flag scheme compatibility */
                if (DEVTYPE(dev_current) == MTD_NORFLASH &&
@@ -1203,7 +1221,8 @@ int fw_env_open(struct env_opts *opts)
                        environment.flag_scheme = FLAG_INCREMENTAL;
                } else {
                        fprintf (stderr, "Incompatible flash types!\n");
-                       return -1;
+                       ret = -EINVAL;
+                       goto open_cleanup;
                }
 
                crc1 = crc32 (0, (uint8_t *) redundant->data, ENV_SIZE);
@@ -1212,7 +1231,7 @@ int fw_env_open(struct env_opts *opts)
                        ret = env_aes_cbc_crypt(redundant->data, 0,
                                                opts->aes_key);
                        if (ret)
-                               return ret;
+                               goto open_cleanup;
                }
 
                crc1_ok = (crc1 == redundant->crc);
@@ -1284,6 +1303,28 @@ int fw_env_open(struct env_opts *opts)
 #endif
        }
        return 0;
+
+open_cleanup:
+       if (addr0)
+               free(addr0);
+
+       if (addr1)
+               free(addr0);
+
+       return ret;
+}
+
+/*
+ * Simply free allocated buffer with environment
+ */
+int fw_env_close(struct env_opts *opts)
+{
+       if (environment.image)
+               free(environment.image);
+
+       environment.image = NULL;
+
+       return 0;
 }
 
 static int check_device_config(int dev)
index 05588ab6d55f838731204971a24633a05284d710..04bb64602b2561dfbb9982faa128eb2327296407 100644 (file)
@@ -5,57 +5,15 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
-#include <aes.h>
 #include <stdint.h>
-
-/* Pull in the current config to define the default environment */
-#include <linux/kconfig.h>
-
-#ifndef __ASSEMBLY__
-#define __ASSEMBLY__ /* get only #defines from config.h */
-#include <config.h>
-#undef __ASSEMBLY__
-#else
-#include <config.h>
-#endif
+#include <uboot_aes.h>
 
 /*
- * To build the utility with the static configuration
- * comment out the next line.
- * See included "fw_env.config" sample file
- * for notes on configuration.
+ * Programs using the library must check which API is available,
+ * that varies depending on the U-Boot version.
+ * This can be changed in future
  */
-#define CONFIG_FILE     "/etc/fw_env.config"
-
-#ifndef CONFIG_FILE
-#define HAVE_REDUND /* For systems with 2 env sectors */
-#define DEVICE1_NAME      "/dev/mtd1"
-#define DEVICE2_NAME      "/dev/mtd2"
-#define DEVICE1_OFFSET    0x0000
-#define ENV1_SIZE         0x4000
-#define DEVICE1_ESIZE     0x4000
-#define DEVICE1_ENVSECTORS     2
-#define DEVICE2_OFFSET    0x0000
-#define ENV2_SIZE         0x4000
-#define DEVICE2_ESIZE     0x4000
-#define DEVICE2_ENVSECTORS     2
-#endif
-
-#ifndef CONFIG_BAUDRATE
-#define CONFIG_BAUDRATE                115200
-#endif
-
-#ifndef CONFIG_BOOTDELAY
-#define CONFIG_BOOTDELAY       5       /* autoboot after 5 seconds     */
-#endif
-
-#ifndef CONFIG_BOOTCOMMAND
-#define CONFIG_BOOTCOMMAND                                                     \
-       "bootp; "                                                               \
-       "setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} "        \
-       "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; "   \
-       "bootm"
-#endif
+#define FW_ENV_API_VERSION     1
 
 struct env_opts {
 #ifdef CONFIG_FILE
@@ -95,7 +53,7 @@ int fw_printenv(int argc, char *argv[], int value_only, struct env_opts *opts);
  * @opts: how to retrieve environment from flash, defaults are used if NULL
  *
  * Description:
- *  Uses fw_env_open, fw_env_write, fw_env_close
+ *  Uses fw_env_open, fw_env_write, fw_env_flush
  *
  * Return:
  *  0 on success, -1 on failure (modifies errno)
@@ -112,7 +70,7 @@ int fw_setenv(int argc, char *argv[], struct env_opts *opts);
  * @opts: encryption key, configuration file, defaults are used if NULL
  *
  * Description:
- *  Uses fw_env_open, fw_env_write, fw_env_close
+ *  Uses fw_env_open, fw_env_write, fw_env_flush
  *
  * Return:
  *  0 success, -1 on failure (modifies errno)
@@ -180,7 +138,17 @@ char *fw_getenv(char *name);
 int fw_env_write(char *name, char *value);
 
 /**
- * fw_env_close - write the environment from RAM cache back to flash
+ * fw_env_flush - write the environment from RAM cache back to flash
+ *
+ * @opts: encryption key, configuration file, defaults are used if NULL
+ *
+ * Return:
+ *  0 on success, -1 on failure (modifies errno)
+ */
+int fw_env_flush(struct env_opts *opts);
+
+/**
+ * fw_env_close - free allocated structure and close env
  *
  * @opts: encryption key, configuration file, defaults are used if NULL
  *
@@ -189,4 +157,13 @@ int fw_env_write(char *name, char *value);
  */
 int fw_env_close(struct env_opts *opts);
 
+
+/**
+ * fw_env_version - return the current version of the library
+ *
+ * Return:
+ *  version string of the library
+ */
+char *fw_env_version(void);
+
 unsigned long crc32(unsigned long, const unsigned char *, unsigned);
index 443de36e437e063bfdd55624d0472c0aaa61639f..b8bff264eb4ef5e0da6f90d3aff3b2aed3406d6e 100644 (file)
@@ -34,6 +34,7 @@
 #include <stdlib.h>
 #include <sys/file.h>
 #include <unistd.h>
+#include "fw_env_private.h"
 #include "fw_env.h"
 
 #define CMD_PRINTENV   "fw_printenv"
diff --git a/tools/env/fw_env_private.h b/tools/env/fw_env_private.h
new file mode 100644 (file)
index 0000000..0c27da0
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * (C) Copyright 2002-2008
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/* Pull in the current config to define the default environment */
+#include <linux/kconfig.h>
+
+#ifndef __ASSEMBLY__
+#define __ASSEMBLY__ /* get only #defines from config.h */
+#include <config.h>
+#undef __ASSEMBLY__
+#else
+#include <config.h>
+#endif
+
+/*
+ * To build the utility with the static configuration
+ * comment out the next line.
+ * See included "fw_env.config" sample file
+ * for notes on configuration.
+ */
+#define CONFIG_FILE     "/etc/fw_env.config"
+
+#ifndef CONFIG_FILE
+#define HAVE_REDUND /* For systems with 2 env sectors */
+#define DEVICE1_NAME      "/dev/mtd1"
+#define DEVICE2_NAME      "/dev/mtd2"
+#define DEVICE1_OFFSET    0x0000
+#define ENV1_SIZE         0x4000
+#define DEVICE1_ESIZE     0x4000
+#define DEVICE1_ENVSECTORS     2
+#define DEVICE2_OFFSET    0x0000
+#define ENV2_SIZE         0x4000
+#define DEVICE2_ESIZE     0x4000
+#define DEVICE2_ENVSECTORS     2
+#endif
+
+#ifndef CONFIG_BAUDRATE
+#define CONFIG_BAUDRATE                115200
+#endif
+
+#ifndef CONFIG_BOOTDELAY
+#define CONFIG_BOOTDELAY       5       /* autoboot after 5 seconds     */
+#endif
+
+#ifndef CONFIG_BOOTCOMMAND
+#define CONFIG_BOOTCOMMAND                                             \
+       "bootp; "                                                       \
+       "setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} "\
+       "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; "\
+       "bootm"
+#endif
index b9078273c954b97c6d7740147cd51fc1e42ff4a2..e373c43e3699e3d4387072f4dd89dfa061284ce6 100644 (file)
@@ -810,9 +810,6 @@ static int do_fdtgrep(struct display_info *disp, const char *filename)
                                disp->flags);
                if (count < 0) {
                        report_error("fdt_find_regions", count);
-                       if (count == -FDT_ERR_BADLAYOUT)
-                               fprintf(stderr,
-                                       "/aliases node must come before all other nodes\n");
                        return -1;
                }
                if (count <= max_regions)
index ebd4300dfd5728d6f5ff52b360d8d8d5be629687..7c760143407b9fe36667312db1ea73f11059073c 100644 (file)
@@ -190,6 +190,8 @@ class Popen(subprocess.Popen):
                 # We will get an error on read if the pty is closed
                 try:
                     data = os.read(self.stdout.fileno(), 1024)
+                    if isinstance(data, bytes):
+                        data = data.decode('utf-8')
                 except OSError:
                     pass
                 if data == "":
@@ -205,6 +207,8 @@ class Popen(subprocess.Popen):
                 # We will get an error on read if the pty is closed
                 try:
                     data = os.read(self.stderr.fileno(), 1024)
+                    if isinstance(data, bytes):
+                        data = data.decode('utf-8')
                 except OSError:
                     pass
                 if data == "":