]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
Merge git://git.denx.de/u-boot-dm
authorTom Rini <trini@konsulko.com>
Thu, 13 Apr 2017 21:31:06 +0000 (17:31 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 13 Apr 2017 21:31:06 +0000 (17:31 -0400)
Here with some DM changes as well as the long-standing AT91 DM/DT
conversion patches which I have picked up via dm.

229 files changed:
MAINTAINERS
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/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/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 [moved from board/denx/m28evk/Kconfig with 89% similarity]
board/aries/m28evk/MAINTAINERS [moved from board/denx/m28evk/MAINTAINERS with 84% similarity]
board/aries/m28evk/Makefile [moved from board/denx/m28evk/Makefile with 100% similarity]
board/aries/m28evk/README [moved from board/denx/m28evk/README with 82% similarity]
board/aries/m28evk/m28evk.c [moved from board/denx/m28evk/m28evk.c with 96% similarity]
board/aries/m28evk/spl_boot.c [moved from board/denx/m28evk/spl_boot.c with 98% similarity]
board/aries/m53evk/Kconfig [moved from board/denx/m53evk/Kconfig with 89% similarity]
board/aries/m53evk/MAINTAINERS [moved from board/denx/m53evk/MAINTAINERS with 84% similarity]
board/aries/m53evk/Makefile [moved from board/denx/m53evk/Makefile with 88% similarity]
board/aries/m53evk/imximage.cfg [moved from board/denx/m53evk/imximage.cfg with 98% similarity]
board/aries/m53evk/m53evk.c [moved from board/denx/m53evk/m53evk.c with 99% similarity]
board/astro/mcf5373l/mcf5373l.c
board/canmb/canmb.c
board/cm5200/cm5200.c
board/cobra5272/cobra5272.c
board/davedenx/aria/aria.c
board/dbau1x00/dbau1x00.c
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/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
doc/README.mpc85xx
doc/README.mxs
drivers/ddr/fsl/main.c
drivers/net/phy/Kconfig
drivers/serial/serial_pl01x.c
drivers/video/mxsfb.c
include/common.h
include/configs/advantech_dms-ba16.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/sandbox.h
include/debug_uart.h
include/div64.h
include/dt-bindings/clock/imx6sl-clock.h [new file with mode: 0644]
include/fsl_ddr_sdram.h
include/linux/math64.h
include/uboot_aes.h [moved from include/aes.h with 100% similarity]
lib/aes.c
lib/div64.c
lib/tiny-printf.c
scripts/config_whitelist.txt
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]

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 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 6a1d9c2b089605954c8ee18b71db31dd30951484..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 \
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";
+                       };
+               };
+       };
+};
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;
similarity index 89%
rename from board/denx/m28evk/Kconfig
rename to board/aries/m28evk/Kconfig
index dd4dc4d096d8de9959cd25fec121d03eedd8c056..ab5577cf742aa24d983ba6184d3c78ea2ed7156f 100644 (file)
@@ -4,7 +4,7 @@ config SYS_BOARD
        default "m28evk"
 
 config SYS_VENDOR
-       default "denx"
+       default "aries"
 
 config SYS_SOC
        default "mxs"
similarity index 84%
rename from board/denx/m28evk/MAINTAINERS
rename to board/aries/m28evk/MAINTAINERS
index b0535a91864ccce4a0d67578b9e345c1b064072c..f600e7d884706b763e85ba13502f9938888643c3 100644 (file)
@@ -1,6 +1,6 @@
 M28EVK BOARD
 M:     Marek Vasut <marek.vasut@gmail.com>
 S:     Maintained
-F:     board/denx/m28evk/
+F:     board/aries/m28evk/
 F:     include/configs/m28evk.h
 F:     configs/m28evk_defconfig
similarity index 82%
rename from board/denx/m28evk/README
rename to board/aries/m28evk/README
index cb3ae20f862d77c4c0a2548b48af5fdf6f0eb229..9f0d9954521ce70382e3b6dd13e3ecc87b48e0ad 100644 (file)
@@ -1,12 +1,12 @@
-DENX M28EVK
-===========
+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/denx/m28evk/             - M28EVK board specific files
+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
similarity index 96%
rename from board/denx/m28evk/m28evk.c
rename to board/aries/m28evk/m28evk.c
index 33d38cfc5493ff683e482dce2af41cc1e2e7bf26..c990ea9fec14232ab4a5b8b8f2d2d068c6d33b08 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * DENX M28 module
+ * Aries M28 module
  *
  * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
  * on behalf of DENX Software Engineering GmbH
@@ -93,7 +93,7 @@ int board_mmc_init(bd_t *bis)
 
 int fecmxc_mii_postcall(int phy)
 {
-#if    defined(CONFIG_DENX_M28_V11) || defined(CONFIG_DENX_M28_V10)
+#if    defined(CONFIG_ARIES_M28_V11) || defined(CONFIG_ARIES_M28_V10)
        /* KZ8031 PHY on old boards. */
        const uint32_t freq = 0x0080;
 #else
@@ -123,7 +123,7 @@ int board_eth_init(bd_t *bis)
                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)
+#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);
similarity index 98%
rename from board/denx/m28evk/spl_boot.c
rename to board/aries/m28evk/spl_boot.c
index 5a1010e59550a4c65d9e2fc2ad3922ae0e5f9660..e27a74e07a6982a0208e3ea189076cf22a90a139 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * DENX M28 Boot setup
+ * ARIES M28 Boot setup
  *
  * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
  * on behalf of DENX Software Engineering GmbH
@@ -56,7 +56,7 @@ const iomux_cfg_t iomux_setup[] = {
        MX28_PAD_LCD_ENABLE__LCD_ENABLE | MUX_CONFIG_LCD,
 
        /* UART1 */
-#ifdef CONFIG_DENX_M28_V10
+#ifdef CONFIG_ARIES_M28_V10
        MX28_PAD_AUART0_CTS__DUART_RX,
        MX28_PAD_AUART0_RTS__DUART_TX,
 #else
@@ -132,7 +132,7 @@ const iomux_cfg_t iomux_setup[] = {
        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)
+#if !defined(CONFIG_ARIES_M28_V11) && !defined(CONFIG_ARIES_M28_V10)
        MX28_PAD_AUART2_RTS__GPIO_3_11, /* PHY reset */
 #endif
 
similarity index 89%
rename from board/denx/m53evk/Kconfig
rename to board/aries/m53evk/Kconfig
index 0696ad7ffb7782c9de066975552f3916392e8411..2d49b409126ba1bcce29b3c1575d420bb2b1981b 100644 (file)
@@ -4,7 +4,7 @@ config SYS_BOARD
        default "m53evk"
 
 config SYS_VENDOR
-       default "denx"
+       default "aries"
 
 config SYS_SOC
        default "mx5"
similarity index 84%
rename from board/denx/m53evk/MAINTAINERS
rename to board/aries/m53evk/MAINTAINERS
index 5d8c76455c1dd3b5ce2f8731ca92ab166f4bbe37..71137f0802127e1b0d5a90bc009d69f8c6749657 100644 (file)
@@ -1,6 +1,6 @@
 M53EVK BOARD
 M:     Marek Vasut <marek.vasut@gmail.com>
 S:     Maintained
-F:     board/denx/m53evk/
+F:     board/aries/m53evk/
 F:     include/configs/m53evk.h
 F:     configs/m53evk_defconfig
similarity index 88%
rename from board/denx/m53evk/Makefile
rename to board/aries/m53evk/Makefile
index 19b8977ae75517689d10203b1f1c96cb92ffb893..daa0fe4dd9462d3e93d983ff328157cfdfabcacb 100644 (file)
@@ -1,5 +1,5 @@
 #
-# DENX M53EVK
+# Aries M53EVK
 # Copyright (C) 2012-2013 Marek Vasut <marex@denx.de>
 #
 # SPDX-License-Identifier:     GPL-2.0+
similarity index 98%
rename from board/denx/m53evk/imximage.cfg
rename to board/aries/m53evk/imximage.cfg
index c0e260295079148de452768d99449e913ad9f875..ec855c835d2e8ce88ac5da94893c62979a8fc95e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * DENX M53 DRAM init values
+ * Aries M53 DRAM init values
  * Copyright (C) 2012-2013 Marek Vasut <marex@denx.de>
  *
  * SPDX-License-Identifier:    GPL-2.0+
similarity index 99%
rename from board/denx/m53evk/m53evk.c
rename to board/aries/m53evk/m53evk.c
index 1e4db24c897a2125575d883776e8586c5ce333a4..14c60fc5397588c7798373a5f6f90dc5796a8dab 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * DENX M53 module
+ * Aries M53 module
  *
  * Copyright (C) 2012-2013 Marek Vasut <marex@denx.de>
  *
@@ -381,7 +381,7 @@ int board_init(void)
 
 int checkboard(void)
 {
-       puts("Board: DENX M53EVK\n");
+       puts("Board: Aries M53EVK\n");
 
        return 0;
 }
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 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 */
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 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 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 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 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 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
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 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 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 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/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 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 */
similarity index 100%
rename from include/aes.h
rename to include/uboot_aes.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 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 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