summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-03-13 16:07:41 -0400
committerTom Rini <trini@konsulko.com>2019-03-13 16:07:41 -0400
commita0d12cd2392af52000790739df3fc8ddbd4db460 (patch)
tree75730552278c8ed9dde126cf4141d244ce29b991 /board
parent116a3a1ae085753e04b62c37a0f11f80cab9d730 (diff)
parentb882005a18dec45848e153dcf8d29b4a2feecf14 (diff)
Merge tag 'u-boot-imx-20190313' of git://git.denx.de/u-boot-imx
Small fixes in several i.MX boards ---------------------------------- - imx8: add pinctrl driveri (mx8m), fix documentation and fix reported CPU frequency. Fabio is co-maintainer - pico-imx6ul: switch to DM - local fixes for ventana, mx6ul_14x14_evk, engicam, imx6(q)_logic, liteboard
Diffstat (limited to 'board')
-rw-r--r--board/boundary/nitrogen6x/README.mx6qsabrelite119
-rw-r--r--board/engicam/common/board.c5
-rw-r--r--board/freescale/imx8mq_evk/MAINTAINERS1
-rw-r--r--board/freescale/imx8mq_evk/README3
-rw-r--r--board/freescale/mx6sabreauto/README12
-rw-r--r--board/freescale/mx6sabresd/README18
-rw-r--r--board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c9
-rw-r--r--board/gateworks/gw_ventana/eeprom.c10
-rw-r--r--board/gateworks/gw_ventana/gw_ventana_spl.c5
-rw-r--r--board/grinn/liteboard/board.c36
-rw-r--r--board/technexion/pico-imx6ul/README14
-rw-r--r--board/technexion/pico-imx6ul/pico-imx6ul.c96
-rw-r--r--board/warp7/README12
-rw-r--r--board/warp7/warp7.c6
14 files changed, 153 insertions, 193 deletions
diff --git a/board/boundary/nitrogen6x/README.mx6qsabrelite b/board/boundary/nitrogen6x/README.mx6qsabrelite
index 12a9c856cf..6283c9575e 100644
--- a/board/boundary/nitrogen6x/README.mx6qsabrelite
+++ b/board/boundary/nitrogen6x/README.mx6qsabrelite
@@ -1,72 +1,119 @@
U-Boot for the Freescale i.MX6q SabreLite board
+===============================================
This file contains information for the port of U-Boot to the Freescale
i.MX6q SabreLite board.
-1. Boot source, boot from SD card
----------------------------------
-The recent mainline U-Boot for the Freescale i.MX6q SabreLite board supports
-boot from SD card only. However, by default, the SabreLite
-boards boot from the SPI NOR flash. These boards need to be reflashed with
-a small SD card loader to support boot from SD card. This small SD card loader
-will be flashed into the SPI NOR. The board will still boot from SPI NOR, but
-the loader will in turn request the BootROM to load the U-Boot from SD card.
+1. Build
+--------
+
+To build U-Boot for the SabreLite board:
+
+ make mx6qsabrelite_config
+ make
+
+
+2. Boot from SD card
+--------------------
+
+The SabreLite boards boot from the SPI NOR flash. These boards need their SPI
+to be reflashed with a small SD card loader to support boot from SD card. The
+board will still boot from SPI NOR, but the loader will in turn request the
+BootROM to load the U-Boot from SD card.
The SD card loader is available from
https://wiki.linaro.org/Boards/MX6QSabreLite
-under a open-source 3-clause BSD license.
+This is provided under a open-source 3-clause BSD license.
-To update the SPI-NOR on the SabreLite board without the Freescale
-manufacturing tool use the following procedure:
+To following procedure can be used to update the SPI-NOR on the SabreLite
+board:
1. Write this SD card loader onto a large SD card using:
- sudo dd if=iMX6DQ_SPI_to_uSDHC3.bin of=/dev/sXx
+ sudo dd if=iMX6DQ_SPI_to_uSDHC3.bin of=/dev/sXx
-Note: Replace sXx with the device representing the SD card in your system.
+ Note: Replace sXx with the device representing the SD card in your system.
-Note: This writes SD card loader at address 0
+ Note: This writes SD card loader at address 0
2. Put this SD card into the slot for the large SD card (SD3 on the bottom of
-the board). Make sure SW1 switch is at position "00", so that it can boot
-from the fuses.
+ the board). Make sure SW1 switch is at position "00", so that it can boot
+ from the fuses.
3. Power-up the SabreLite, press 'space' to enter command mode in the U-Boot
-(the default one the board is shipped with, starting from the SPI NOR) and
-enter the following commands:
+ (the default one the board is shipped with, starting from the SPI NOR) and
+ enter the following commands:
+
+ MX6Q SABRELITE U-Boot > mmc dev 0
+ MX6Q SABRELITE U-Boot > mmc read 0x10800000 0 200
+ MX6Q SABRELITE U-Boot > sf probe
+ MX6Q SABRELITE U-Boot > sf erase 0 0x40000
+ MX6Q SABRELITE U-Boot > sf write 0x10800000 0 0x40000
- MX6Q SABRELITE U-Boot > mmc dev 0
- MX6Q SABRELITE U-Boot > mmc read 0x10800000 0 200
- MX6Q SABRELITE U-Boot > sf probe
- MX6Q SABRELITE U-Boot > sf erase 0 0x40000
- MX6Q SABRELITE U-Boot > sf write 0x10800000 0 0x40000
+4. Write the u-boot.imx produced during the U-Boot build to the SD card:
-4. done.
+ sudo dd if=u-boot.imx of=/dev/sXx bs=512 seek=2 && sudo sync
-In case you somehow do not succeed with this procedure you will have to use
-the Freescale manufacturing tool in order to reflash the SPI-NOR.
+ Note: Replace sXx with the device representing the SD card in your system.
+
+5. Re-insert the SD card back in the slot for the large SD card and power-cycle
+ the board.
Note: The board now boots from full size SD3 on the bottom of the board. NOT
the micro SD4/BOOT slot on the top of the board. I.e. you have to use
full size SD cards.
-This information is taken from
+This information originally taken from:
-https://wiki.linaro.org/Boards/MX6QSabreLite
+ https://wiki.linaro.org/Boards/MX6QSabreLite
-2. Build
---------
-To build U-Boot for the SabreLite board:
+3. Boot from SPI NOR
+--------------------
- make mx6qsabrelite_config
- make
+The SabreLite board can also boot U-Boot directly from the SPI NOR flash:
+
+1. Power-up the SabreLite, press 'space' to enter command mode in the U-Boot
+ and enter the following commands:
+
+ => mmc dev 0
+ => mmc read 0x10800000 0x400 0x80000
+ => sf probe 0
+ => sf erase 0 0xc0000
+ => sf write 0x10800000 0x400 0x80000
+
+Note: This procedure assumes you have booted using the desired U-Boot from an
+ SD card as prepared in the previous section. Alternative mechanisms, such
+ as using tftpboot to copy an alternative U-Boot image into memory can
+ also be used.
+
+
+4. Recovering SPI-NOR
+---------------------
+
+In case you somehow do not succeed with this procedure you can upload U-Boot
+via USB:
+
+1. Download and install the imx_loader following the instructions provided:
+
+ https://github.com/boundarydevices/imx_usb_loader
+
+2. Connect the board to USB via the USB OTG port.
+
+3. Make sure SW1 switch is at position "01", so that it can boot from USB OTG.
+
+4. Power-up the SabreLite and run the imx_loader to upload the U-Boot image:
+
+ sudo imx_usb u-boot.imx
+
+Note: This will upload and run the U-Boot image in memory, the SPI will not be
+ reprogrammed and this procedure will need to be repeated if the board is
+ reset.
-To copy the resulting u-boot.imx to the SD card:
+5. Use one of previous descriptions to re-flash the SPI-NOR as required.
- sudo dd if=u-boot.imx of=/dev/sXx bs=512 seek=2&&sudo sync
+6. Ensure SW1 is returned to "00" to boot from the fuses once done.
-Note: Replace sXx with the device representing the SD card in your system.
diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c
index 5dccb17cb2..7486f0ac2d 100644
--- a/board/engicam/common/board.c
+++ b/board/engicam/common/board.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <mmc.h>
#include <asm/arch/sys_proto.h>
+#include <watchdog.h>
#include "board.h"
@@ -88,6 +89,10 @@ int board_late_init(void)
setenv_fdt_file();
+#ifdef CONFIG_HW_WATCHDOG
+ hw_watchdog_init();
+#endif
+
return 0;
}
diff --git a/board/freescale/imx8mq_evk/MAINTAINERS b/board/freescale/imx8mq_evk/MAINTAINERS
index a2e320cb10..a00bb4ef78 100644
--- a/board/freescale/imx8mq_evk/MAINTAINERS
+++ b/board/freescale/imx8mq_evk/MAINTAINERS
@@ -1,5 +1,6 @@
i.MX8MQ EVK BOARD
M: Peng Fan <peng.fan@nxp.com>
+M: Fabio Estevam <festevam@gmail.com>
S: Maintained
F: board/freescale/imx8mq_evk/
F: include/configs/imx8mq_evk.h
diff --git a/board/freescale/imx8mq_evk/README b/board/freescale/imx8mq_evk/README
index 1da6eaf242..2529f7da3d 100644
--- a/board/freescale/imx8mq_evk/README
+++ b/board/freescale/imx8mq_evk/README
@@ -18,8 +18,9 @@ Get the ddr and hdmi firmware
Note: srctree is U-Boot source directory
$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-7.9.bin
$ chmod +x firmware-imx-7.9.bin
+$ ./firmware-imx-7.9.bin
$ cp firmware-imx-7.9/firmware/hdmi/cadence/signed_hdmi_imx8m.bin $(srctree)
-$ cp firmware-imx-7.9/firmware-imx-7.9/firmware/ddr/synopsys/lpddr4*.bin $(srctee)
+$ cp firmware-imx-7.9/firmware/ddr/synopsys/lpddr4*.bin $(srctee)
Build U-Boot
====================
diff --git a/board/freescale/mx6sabreauto/README b/board/freescale/mx6sabreauto/README
index e8c589b92a..4c0fda1a2d 100644
--- a/board/freescale/mx6sabreauto/README
+++ b/board/freescale/mx6sabreauto/README
@@ -9,15 +9,15 @@ $ make mx6sabreauto_defconfig
$ make
-This will generate the SPL and u-boot.img binaries.
+This will generate the SPL and u-boot-dtb.img binaries.
- Flash the SPL binary into the SD card:
$ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 && sync
-- Flash the u-boot.img binary into the SD card:
+- Flash the u-boot-dtb.img binary into the SD card:
-$ sudo dd if=u-boot.img of=/dev/sdX bs=1K seek=69 && sync
+$ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1K seek=69 && sync
Booting via Falcon mode
-----------------------
@@ -32,15 +32,15 @@ $ make mx6sabreauto_defconfig
$ make
-This will generate the SPL image called SPL and the u-boot.img.
+This will generate the SPL image called SPL and the u-boot-dtb.img.
- Flash the SPL image into the SD card:
$ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 && sync
-- Flash the u-boot.img image into the SD card:
+- Flash the u-boot-dtb.img image into the SD card:
-$ sudo dd if=u-boot.img of=/dev/sdb bs=1K seek=69 && sync
+$ sudo dd if=u-boot-dtb.img of=/dev/sdb bs=1K seek=69 && sync
Create a FAT16 boot partition to store uImage and the dtb file, then copy the files there:
diff --git a/board/freescale/mx6sabresd/README b/board/freescale/mx6sabresd/README
index 4b4df06330..4ea4454b9f 100644
--- a/board/freescale/mx6sabresd/README
+++ b/board/freescale/mx6sabresd/README
@@ -21,15 +21,15 @@ $ make mx6sabresd_defconfig
$ make
-This will generate the SPL and u-boot.img binaries.
+This will generate the SPL and u-boot-dtb.img binaries.
- Flash the SPL binary into the SD card:
$ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 && sync
-- Flash the u-boot.img binary into the SD card:
+- Flash the u-boot-dtb.img binary into the SD card:
-$ sudo dd if=u-boot.img of=/dev/sdX bs=1K seek=69 && sync
+$ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1K seek=69 && sync
2. Booting from eMMC
@@ -39,7 +39,7 @@ $ make mx6sabresd_defconfig
$ make
-This will generate the SPL and u-boot.img binaries.
+This will generate the SPL and u-boot-dtb.img binaries.
- Boot first from SD card as shown in the previous section
@@ -51,10 +51,10 @@ Mount the eMMC in the host PC:
=> ums 0 mmc 2
-- Flash SPL and u-boot.img binaries into the eMMC:
+- Flash SPL and u-boot-dtb.img binaries into the eMMC:
$ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 && sync
-$ sudo dd if=u-boot.img of=/dev/sdX bs=1K seek=69 && sync
+$ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1K seek=69 && sync
Set SW6 to eMMC 8-bit boot: 11010110
@@ -65,15 +65,15 @@ Set SW6 to eMMC 8-bit boot: 11010110
$ make mx6sabresd_defconfig
$ make
-This will generate the SPL image called SPL and the u-boot.img.
+This will generate the SPL image called SPL and the u-boot-dtb.img.
- Flash the SPL image into the SD card:
$ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 oflag=sync status=none && sync
-- Flash the u-boot.img image into the SD card:
+- Flash the u-boot-dtb.img image into the SD card:
-$ sudo dd if=u-boot.img of=/dev/sdX bs=1K seek=69 oflag=sync status=none && sync
+$ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1K seek=69 oflag=sync status=none && sync
Create a partition for root file system and extract it there:
diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
index 595ad76bbe..636c008993 100644
--- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
+++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
@@ -86,16 +86,13 @@ int power_init_board(void)
pmic_reg_write(dev, PFUZE3000_LDOGCTL, reg);
/* SW1B step ramp up time from 2us to 4us/25mV */
- reg = 0x40;
- pmic_reg_write(dev, PFUZE3000_SW1BCONF, reg);
+ pmic_reg_write(dev, PFUZE3000_SW1BCONF, 0x40);
/* SW1B mode to APS/PFM */
- reg = 0xc;
- pmic_reg_write(dev, PFUZE3000_SW1BMODE, reg);
+ pmic_reg_write(dev, PFUZE3000_SW1BMODE, 0xc);
/* SW1B standby voltage set to 0.975V */
- reg = 0xb;
- pmic_reg_write(dev, PFUZE3000_SW1BSTBY, reg);
+ pmic_reg_write(dev, PFUZE3000_SW1BSTBY, 0xb);
return 0;
}
diff --git a/board/gateworks/gw_ventana/eeprom.c b/board/gateworks/gw_ventana/eeprom.c
index ee227320c0..5e9cf11575 100644
--- a/board/gateworks/gw_ventana/eeprom.c
+++ b/board/gateworks/gw_ventana/eeprom.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <errno.h>
+#include <hexdump.h>
#include <i2c.h>
#include <malloc.h>
#include <asm/bitops.h>
@@ -46,6 +47,8 @@ read_eeprom(int bus, struct ventana_board_info *info)
/* sanity checks */
if (info->model[0] != 'G' || info->model[1] != 'W') {
puts("EEPROM: Invalid Model in EEPROM\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf,
+ sizeof(*info));
return GW_UNKNOWN;
}
@@ -55,6 +58,8 @@ read_eeprom(int bus, struct ventana_board_info *info)
if ((info->chksum[0] != chksum>>8) ||
(info->chksum[1] != (chksum&0xff))) {
puts("EEPROM: Failed EEPROM checksum\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf,
+ sizeof(*info));
return GW_UNKNOWN;
}
@@ -116,6 +121,11 @@ read_eeprom(int bus, struct ventana_board_info *info)
else if (info->model[4] == '0' && info->model[5] == '9')
type = GW5909;
break;
+ default:
+ printf("EEPROM: Unknown model in EEPROM: %s\n", info->model);
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf,
+ sizeof(*info));
+ break;
}
return type;
}
diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c
index 27f3774140..eaf7aa9eca 100644
--- a/board/gateworks/gw_ventana/gw_ventana_spl.c
+++ b/board/gateworks/gw_ventana/gw_ventana_spl.c
@@ -540,6 +540,11 @@ static void spl_dram_init(int width, int size_mb, int board_model)
else
calib = &mx6sdl_256x16_mmdc_calib;
debug("4gB density\n");
+ } else if (width == 16 && size_mb == 1024) {
+ mem = &mt41k512m16ha_125;
+ if (is_cpu_type(MXC_CPU_MX6Q))
+ calib = &mx6dq_512x32_mmdc_calib;
+ debug("8gB density\n");
} else if (width == 32 && size_mb == 256) {
/* Same calib as width==16, size==128 */
mem = &mt41k64m16jt_125;
diff --git a/board/grinn/liteboard/board.c b/board/grinn/liteboard/board.c
index 18d152a381..80910e4713 100644
--- a/board/grinn/liteboard/board.c
+++ b/board/grinn/liteboard/board.c
@@ -24,8 +24,6 @@
#include <mmc.h>
#include <netdev.h>
#include <spl.h>
-#include <usb.h>
-#include <usb/ehci-ci.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -63,26 +61,6 @@ static iomux_v3_cfg_t const sd_pads[] = {
MX6_PAD_UART1_RTS_B__GPIO1_IO19 | MUX_PAD_CTRL(NO_PAD_CTRL),
};
-#ifdef CONFIG_FEC_MXC
-static iomux_v3_cfg_t const fec1_pads[] = {
- MX6_PAD_GPIO1_IO06__ENET1_MDIO | MUX_PAD_CTRL(MDIO_PAD_CTRL),
- MX6_PAD_GPIO1_IO07__ENET1_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_ENET1_TX_DATA0__ENET1_TDATA00 | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_ENET1_TX_DATA1__ENET1_TDATA01 | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_ENET1_TX_EN__ENET1_TX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 | MUX_PAD_CTRL(ENET_CLK_PAD_CTRL),
- MX6_PAD_ENET1_RX_DATA0__ENET1_RDATA00 | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_ENET1_RX_DATA1__ENET1_RDATA01 | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_ENET1_RX_ER__ENET1_RX_ER | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_ENET1_RX_EN__ENET1_RX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL),
-};
-
-static void setup_iomux_fec(void)
-{
- imx_iomux_v3_setup_multiple_pads(fec1_pads, ARRAY_SIZE(fec1_pads));
-}
-#endif
-
static void setup_iomux_uart(void)
{
imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
@@ -180,13 +158,6 @@ void board_late_mmc_init(void)
#endif
#ifdef CONFIG_FEC_MXC
-int board_eth_init(bd_t *bis)
-{
- setup_iomux_fec();
-
- return fecmxc_initialize(bis);
-}
-
static int setup_fec(void)
{
struct iomuxc *const iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
@@ -207,13 +178,6 @@ static int setup_fec(void)
}
#endif
-#ifdef CONFIG_USB_EHCI_MX6
-int board_usb_phy_mode(int port)
-{
- return USB_INIT_HOST;
-}
-#endif
-
int board_early_init_f(void)
{
setup_iomux_uart();
diff --git a/board/technexion/pico-imx6ul/README b/board/technexion/pico-imx6ul/README
index 1cabd90759..bb8ee3f463 100644
--- a/board/technexion/pico-imx6ul/README
+++ b/board/technexion/pico-imx6ul/README
@@ -13,7 +13,7 @@ $ make mrproper
$ make pico-imx6ul_defconfig
$ make
-This generates the SPL and u-boot.img binaries.
+This generates the SPL and u-boot-dtb.img binaries.
1. Loading U-Boot via USB Serial Download Protocol
@@ -31,15 +31,15 @@ Connect a USB cable between the OTG pico port and the host PC.
Open a terminal program such as minicom.
-Copy SPL and u-boot.img to the imx_usb_loader folder.
+Copy SPL and u-boot-dtb.img to the imx_usb_loader folder.
Load the SPL binary via USB:
$ sudo ./imx_usb SPL
-Load the u-boot.img binary via USB:
+Load the u-boot-dtb.img binary via USB:
-$ sudo ./imx_usb u-boot.img
+$ sudo ./imx_usb u-boot-dtb.img
Then U-Boot starts and its messages appear in the console program.
@@ -54,11 +54,11 @@ Run the DFU agent so we can flash the new images using dfu-util tool:
=> dfu 0 mmc 0
-Flash SPL and u-boot.img into the eMMC running the following commands on a PC:
+Flash SPL and u-boot-dtb.img into the eMMC running the following commands on a PC:
$ sudo dfu-util -D SPL -a spl
-$ sudo dfu-util -D u-boot.img -a u-boot
+$ sudo dfu-util -D u-boot-dtb.img -a u-boot
Remove power from the pico board.
@@ -142,7 +142,7 @@ Launch UMS:
Flash the new binaries:
$ sudo dd if=SPL of=/dev/sdX bs=1k seek=1; sync
-$ sudo dd if=u-boot.img of=/dev/sdX bs=1k seek=69; sync
+$ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1k seek=69; sync
And then SPL binary will load and jump directly to the kernel:
diff --git a/board/technexion/pico-imx6ul/pico-imx6ul.c b/board/technexion/pico-imx6ul/pico-imx6ul.c
index 8c76778276..95b482a602 100644
--- a/board/technexion/pico-imx6ul/pico-imx6ul.c
+++ b/board/technexion/pico-imx6ul/pico-imx6ul.c
@@ -13,13 +13,10 @@
#include <asm/arch/sys_proto.h>
#include <asm/gpio.h>
#include <asm/mach-imx/iomux-v3.h>
-#include <asm/mach-imx/mxc_i2c.h>
#include <asm/io.h>
#include <common.h>
#include <miiphy.h>
#include <netdev.h>
-#include <fsl_esdhc.h>
-#include <i2c.h>
#include <linux/sizes.h>
#include <usb.h>
#include <power/pmic.h>
@@ -32,15 +29,6 @@ DECLARE_GLOBAL_DATA_PTR;
PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS)
-#define USDHC_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \
- PAD_CTL_PUS_22K_UP | PAD_CTL_SPEED_LOW | \
- PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS)
-
-#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)
-
#define OTG_ID_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \
PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_LOW | \
PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS)
@@ -56,23 +44,6 @@ DECLARE_GLOBAL_DATA_PTR;
#define RMII_PHY_RESET IMX_GPIO_NR(1, 28)
-#ifdef CONFIG_SYS_I2C_MXC
-#define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
-/* I2C2 for PMIC */
-struct i2c_pads_info i2c_pad_info1 = {
- .scl = {
- .i2c_mode = MX6_PAD_GPIO1_IO02__I2C1_SCL | PC,
- .gpio_mode = MX6_PAD_GPIO1_IO02__GPIO1_IO02 | PC,
- .gp = IMX_GPIO_NR(1, 2),
- },
- .sda = {
- .i2c_mode = MX6_PAD_GPIO1_IO03__I2C1_SDA | PC,
- .gpio_mode = MX6_PAD_GPIO1_IO03__GPIO1_IO03 | PC,
- .gp = IMX_GPIO_NR(1, 3),
- },
-};
-#endif
-
static iomux_v3_cfg_t const fec_pads[] = {
MX6_PAD_ENET1_TX_EN__ENET2_MDC | MUX_PAD_CTRL(MDIO_PAD_CTRL),
MX6_PAD_ENET1_TX_DATA1__ENET2_MDIO | MUX_PAD_CTRL(MDIO_PAD_CTRL),
@@ -96,6 +67,7 @@ int board_eth_init(bd_t *bis)
{
setup_iomux_fec();
+ gpio_request(RMII_PHY_RESET, "enet_phy_reset");
gpio_direction_output(RMII_PHY_RESET, 0);
/*
* According to KSZ8081MNX-RNB manual:
@@ -155,19 +127,6 @@ static iomux_v3_cfg_t const uart6_pads[] = {
MX6_PAD_CSI_PIXCLK__UART6_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
};
-static iomux_v3_cfg_t const usdhc1_pads[] = {
- MX6_PAD_SD1_CLK__USDHC1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
- MX6_PAD_SD1_CMD__USDHC1_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
- MX6_PAD_SD1_DATA0__USDHC1_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
- MX6_PAD_SD1_DATA1__USDHC1_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
- MX6_PAD_SD1_DATA2__USDHC1_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
- MX6_PAD_SD1_DATA3__USDHC1_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
- MX6_PAD_NAND_READY_B__USDHC1_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
- MX6_PAD_NAND_CE0_B__USDHC1_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
- MX6_PAD_NAND_CE1_B__USDHC1_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
- MX6_PAD_NAND_CLE__USDHC1_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-};
-
#define USB_OTHERREGS_OFFSET 0x800
#define UCTRL_PWR_POL (1 << 9)
@@ -185,22 +144,6 @@ static void setup_usb(void)
imx_iomux_v3_setup_multiple_pads(usb_otg_pad, ARRAY_SIZE(usb_otg_pad));
}
-static struct fsl_esdhc_cfg usdhc_cfg[1] = {
- {USDHC1_BASE_ADDR},
-};
-
-int board_mmc_getcd(struct mmc *mmc)
-{
- return 1;
-}
-
-int board_mmc_init(bd_t *bis)
-{
- imx_iomux_v3_setup_multiple_pads(usdhc1_pads, ARRAY_SIZE(usdhc1_pads));
- usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
- return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
-}
-
int board_early_init_f(void)
{
setup_iomux_uart();
@@ -208,38 +151,33 @@ int board_early_init_f(void)
return 0;
}
-#ifdef CONFIG_POWER
-#define I2C_PMIC 0
-static struct pmic *pfuze;
+#ifdef CONFIG_DM_PMIC
int power_init_board(void)
{
- int ret;
- unsigned int reg, rev_id;
+ struct udevice *dev;
+ int ret, dev_id, rev_id;
- ret = power_pfuze3000_init(I2C_PMIC);
- if (ret)
+ ret = pmic_get("pfuze3000", &dev);
+ if (ret == -ENODEV)
+ return 0;
+ if (ret != 0)
return ret;
- pfuze = pmic_get("PFUZE3000");
- ret = pmic_probe(pfuze);
- if (ret)
- return ret;
-
- pmic_reg_read(pfuze, PFUZE3000_DEVICEID, &reg);
- pmic_reg_read(pfuze, PFUZE3000_REVID, &rev_id);
- printf("PMIC: PFUZE3000 DEV_ID=0x%x REV_ID=0x%x\n", reg, rev_id);
+ dev_id = pmic_reg_read(dev, PFUZE3000_DEVICEID);
+ rev_id = pmic_reg_read(dev, PFUZE3000_REVID);
+ printf("PMIC: PFUZE3000 DEV_ID=0x%x REV_ID=0x%x\n", dev_id, rev_id);
/* disable Low Power Mode during standby mode */
- pmic_reg_write(pfuze, PFUZE3000_LDOGCTL, 0x1);
+ pmic_reg_write(dev, PFUZE3000_LDOGCTL, 0x1);
/* SW1B step ramp up time from 2us to 4us/25mV */
- pmic_reg_write(pfuze, PFUZE3000_SW1BCONF, 0x40);
+ pmic_reg_write(dev, PFUZE3000_SW1BCONF, 0x40);
/* SW1B mode to APS/PFM */
- pmic_reg_write(pfuze, PFUZE3000_SW1BMODE, 0xc);
+ pmic_reg_write(dev, PFUZE3000_SW1BMODE, 0xc);
/* SW1B standby voltage set to 0.975V */
- pmic_reg_write(pfuze, PFUZE3000_SW1BSTBY, 0xb);
+ pmic_reg_write(dev, PFUZE3000_SW1BSTBY, 0xb);
return 0;
}
@@ -274,10 +212,6 @@ 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);
- #endif
-
setup_fec();
setup_usb();
diff --git a/board/warp7/README b/board/warp7/README
index 60339da543..579bb2de38 100644
--- a/board/warp7/README
+++ b/board/warp7/README
@@ -17,7 +17,7 @@ $ make mrproper
$ make warp7_config
$ make
-This will generate the U-Boot binary called u-boot.imx.
+This will generate the U-Boot binary called u-boot-dtb.imx.
Put warp7 board in USB download mode:
@@ -28,11 +28,11 @@ Connect a USB to serial adapter between the host PC and warp7
Connect a USB cable between the OTG warp7 port and the host PC
-Copy u-boot.imx to the imx_usb_loader folder.
+Copy u-boot-dtb.imx to the imx_usb_loader folder.
-Load u-boot.imx via USB:
+Load u-boot-dtb.imx via USB:
-$ sudo ./imx_usb u-boot.imx
+$ sudo ./imx_usb u-boot-dtb.imx
Then U-Boot should start and its messages will appear in the console program.
@@ -46,9 +46,9 @@ Use the default environment variables:
Run the DFU command:
=> dfu 0 mmc 0
-Transfer u-boot.imx that will be flashed into the eMMC:
+Transfer u-boot-dtb.imx that will be flashed into the eMMC:
-$ sudo dfu-util -D u-boot.imx -a boot
+$ sudo dfu-util -D u-boot-dtb.imx -a boot
Then on the U-Boot prompt the following message should be seen after a
successful upgrade:
diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index 6ebeb08e33..2882dc9870 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -11,12 +11,8 @@
#include <asm/gpio.h>
#include <asm/mach-imx/hab.h>
#include <asm/mach-imx/iomux-v3.h>
-#include <asm/mach-imx/mxc_i2c.h>
#include <asm/io.h>
#include <common.h>
-#include <fsl_esdhc.h>
-#include <i2c.h>
-#include <mmc.h>
#include <asm/arch/crm_regs.h>
#include <usb.h>
#include <netdev.h>
@@ -81,7 +77,7 @@ int power_init_board(void)
printf("PMIC: PFUZE3000 DEV_ID=0x%x REV_ID=0x%x\n", dev_id, rev_id);
/* disable Low Power Mode during standby mode */
- pmic_clrsetbits(dev, PFUZE3000_LDOGCTL, 0, 1);
+ pmic_reg_write(dev, PFUZE3000_LDOGCTL, 1);
return 0;
}