iMX6Q First boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello list,
I am trying to bootup my custom designed board (actually a rev.0, but I know it will need a rev.1 ASAP ;-).

I started with the latest (2016.02) barebox version, adding my board to the Kconfig & Makefile stuff, copying the udoo stuff to the arch/arm/boards/eurek-ek360 (as the board name is EK360) and cut-off any unneeded initialization.

I am using imx_v7_defconfig as a starting point for configuration.

I kept the device tree file as short as possible, keeping only the model, memory, gpio-pinmux for uart (debug) and the uart3 configurator.

In attachment there are the board.c, the lowlevel.c and the device-tree file.

Well, I am using the imx-usb-loader to upload barebox to the iMX6.

When I am DO NOT USING the CONFIG_LL debug option, NOTHING is printed on the serial port, meanwhile if I config CONFIG_LL option, it writes:

imx-ipuv3 2400000.ipu: IPUv3H probed
imx-ipuv3 2800000.ipu: IPUv3H probed
netconsole: registered as netconsole-1
malloc space: 0x2ff7c7e0 -> 0x4fef8fbf (size 511.5 MiB)
environment load /dev/env0: No such file or directory
Maybe you have to create the partition.
running /env/bin/init...

Hit m for menu or any other key to stop autoboot:  1
blspec: blspec_scan_directory: net loader/entries
ifup: Cannot find device eth0
ifup: No such file or directory
running automount command 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp' failed
ifup: Cannot find device eth0
ifup: No such file or directory
running automount command 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp' failed
ifup: Cannot find device eth0
ifup: No such file or directory
running automount command 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp' failed
could not open /mnt/tftp/none-linux-ek360: No such file or directory
Booting net failed: No such file or directory
booting net failed: No such file or directory
boot: No such file or directory

type exit to get to the menu
                            barebox@EK360 Eurek i.MX6 Quad:/

and the console is not working...

Where I am wrong???

--
Eurek s.r.l.                          |
Electronic Engineering                | http://www.eurek.it
via Celletta 8/B, 40026 Imola, Italy  | Phone: +39-(0)542-609120
p.iva 00690621206 - c.f. 04020030377  | Fax:   +39-(0)542-609212
/*
 * Copyright (C) 2016 Gianluca Renzi, Eurek Elettronica S.R.L.
 * Copyright (C) 2014 Raphaël Poggi
 * Copyright (C) 2012 Steffen Trumtrar, Pengutronix
 *
 * based on arch/arm/boards/freescale-mx6-arm2/board.c
 *
 * This program 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 program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include <common.h>
#include <init.h>
#include <environment.h>
#include <mach/imx6-regs.h>
#include <fec.h>
#include <gpio.h>
#include <mach/bbu.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <partition.h>
#include <linux/phy.h>
#include <asm/io.h>
#include <asm/mmu.h>
#include <mach/generic.h>
#include <linux/sizes.h>
#include <net.h>
#include <linux/micrel_phy.h>
#include <mach/imx6.h>
#include <mach/devices-imx6.h>
#include <mach/iomux-mx6.h>
#include <spi/spi.h>
#include <mach/spi.h>
#include <mach/usb.h>

static iomux_v3_cfg_t ek360_led[] = {
	MX6Q_PAD_DISP0_DAT17__GPIO_5_11 | MUX_PAD_CTRL(NO_PAD_CTRL),
};

static int ek360_led_setup(void)
{
	mxc_iomux_v3_setup_multiple_pads(ek360_led, ARRAY_SIZE(ek360_led));
	gpio_direction_output(IMX_GPIO_NR(5, 11) , 0); /* Led On */
	return 0;
}
fs_initcall(ek360_led_setup);

static void ek360_epit_init(void)
{
	writel(0x0000000, MX6_EPIT1_BASE_ADDR);
	writel(0x142000F, MX6_EPIT1_BASE_ADDR);
	writel(0x30000, MX6_EPIT1_BASE_ADDR + 0x8);
	writel(0x0, MX6_EPIT1_BASE_ADDR + 0xC);
}

static int ek360_devices_init(void)
{
	if (!of_machine_is_compatible("eurek,ek360"))
		return 0;

	ek360_epit_init();

	armlinux_set_bootparams((void *)0x10000100);
	barebox_set_hostname("ek360");

	gpio_set_value(IMX_GPIO_NR(5, 11), 1); /* Led Off */
	return 0;
}
device_initcall(ek360_devices_init);

static int ek360_coredevices_init(void)
{
	if (!of_machine_is_compatible("eurek,ek360"))
		return 0;

	return 0;
}
coredevice_initcall(ek360_coredevices_init);
soc imx6
loadaddr 0x20000000
dcdofs 0x400


/* MX6_IOM_DRAM_SDQS0 -> MX6_IOM_DRAM_SDQS7 */
wm 32 0x020e05a8 0x00000030
wm 32 0x020e05b0 0x00000030
wm 32 0x020e0524 0x00000030
wm 32 0x020e051c 0x00000030
wm 32 0x020e0518 0x00000030
wm 32 0x020e050c 0x00000030
wm 32 0x020e05b8 0x00000030
wm 32 0x020e05c0 0x00000030
/********************************************/

/* MX6_IOM_DRAM_DQM0 -> MX6_IOM_DRAM_DQM7 */
wm 32 0x020e05ac 0x00020030
wm 32 0x020e05b4 0x00020030
wm 32 0x020e0528 0x00020030
wm 32 0x020e0520 0x00020030
wm 32 0x020e0514 0x00020030
wm 32 0x020e0510 0x00020030
wm 32 0x020e05bc 0x00020030
wm 32 0x020e05c4 0x00020030
/******************************************/

wm 32 0x020e056c 0x00020030 /* MX6_IOM_DRAM_CAS */
wm 32 0x020e0578 0x00020030 /* MX6_IOM_DRAM_RAS */
wm 32 0x020e0588 0x00020030 /* MX6_IOM_DRAM_SDCLK_0 */
wm 32 0x020e0594 0x00020030    /* MX6_IOM_DRAM_SDCLK_1 */
wm 32 0x020e057c 0x00020030 /* MX6_IOM_DRAM_RESET */
wm 32 0x020e0590 0x00003000
wm 32 0x020e0598 0x00003000
wm 32 0x020e058c 0x00000000
wm 32 0x020e059c 0x00003030
wm 32 0x020e05a0 0x00003030

/* MX6_IOM_GRP_B0DS -> MX6_IOM_GRP_B7DS */
wm 32 0x020e0784 0x00000030
wm 32 0x020e0788 0x00000030
wm 32 0x020e0794 0x00000030
wm 32 0x020e079c 0x00000030
wm 32 0x020e07a0 0x00000030
wm 32 0x020e07a4 0x00000030
wm 32 0x020e07a8 0x00000030
wm 32 0x020e0748 0x00000030
/***************************************/

wm 32 0x020e074c 0x00000030 /* MX6_IOM_GRP_ADDDS */
wm 32 0x020e0750 0x00020000
wm 32 0x020e0758 0x00000000
wm 32 0x020e0774 0x00020000
wm 32 0x020e078c 0x00000030 /* MX6_IOM_GRP_CTLDS */
wm 32 0x020e0798 0x000c0000
wm 32 0x021b081c 0x33333333
wm 32 0x021b0820 0x33333333
wm 32 0x021b0824 0x33333333
wm 32 0x021b0828 0x33333333
wm 32 0x021b481c 0x33333333
wm 32 0x021b4820 0x33333333
wm 32 0x021b4824 0x33333333
wm 32 0x021b4828 0x33333333


wm 32 0x021b0004 0x00020036
wm 32 0x021b0008 0x09444040
wm 32 0x021b000c 0x54597955
wm 32 0x021b0010 0xFF328F64
wm 32 0x021b0014 0x01FF00DB
wm 32 0x021b0018 0x00001740
wm 32 0x021b001c 0x00008000
wm 32 0x021b002c 0x000026D2
wm 32 0x021b0030 0x00591023
wm 32 0x021b0040 0x00000027
wm 32 0x021b0000 0x831A0000
wm 32 0x021b001c 0x04088032
wm 32 0x021b001c 0x00008033
wm 32 0x021b001c 0x00048031
wm 32 0x021b001c 0x09408030
wm 32 0x021b001c 0x04008040
wm 32 0x021b0800 0xA1380003
wm 32 0x021b4800 0xA1380003
wm 32 0x021b0020 0x00005800
wm 32 0x021b0818 0x00011117
wm 32 0x021b4818 0x00011117
wm 32 0x021b083c 0x43510360
wm 32 0x021b0840 0x0342033F
wm 32 0x021b483c 0x033F033F
wm 32 0x021b4840 0x03290266
wm 32 0x021b0848 0x4B3E4141
wm 32 0x021b4848 0x47413B4A
wm 32 0x021b0850 0x42404843
wm 32 0x021b4850 0x4C3F4C45
wm 32 0x021b080c 0x00350035
wm 32 0x021b0810 0x001F001F
wm 32 0x021b480c 0x00010001
wm 32 0x021b4810 0x00010001
wm 32 0x021b08b8 0x00000800
wm 32 0x021b48b8 0x00000800
wm 32 0x021b0004 0x00025576
wm 32 0x021b0404 0x00011006
wm 32 0x021b001c 0x00000000

#include <common.h>
#include <linux/sizes.h>
#include <mach/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>

extern char __dtb_imx6q_eurek_ek360_start[];

ENTRY_FUNCTION(start_imx6_eurek_ek360, r0, r1, r2)
{
	void *fdt;

	imx6_cpu_lowlevel_init();

	fdt = __dtb_imx6q_eurek_ek360_start - get_runtime_offset();

	barebox_arm_entry(0x10000000, SZ_1G, fdt);
}
/*
 * Copyright 2016 Gianluca Renzi, Eurek Elettronica S.R.L.
 * Copyright 2014 Raphaël Poggi
 * Copyright 2011 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>

/ {
	model = "EK360 Eurek i.MX6 Quad";
	compatible = "eurek,ek360", "fsl,imx6q";

	memory {
		reg = <0x10000000 0x40000000>;
	};

	regulators {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;

		reg_2p5v: regulator@0 {
			compatible = "regulator-fixed";
			reg = <0>;
			regulator-name = "2P5V";
			regulator-min-microvolt = <2500000>;
			regulator-max-microvolt = <2500000>;
			regulator-always-on;
		};

		reg_3p3v: regulator@1 {
			compatible = "regulator-fixed";
			reg = <1>;
			regulator-name = "3P3V";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			regulator-always-on;
		};
	};
};

&iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart3>;
	imx6q-ek380 {
		pinctrl_uart3: uart3grp {
			/* debug port, serial console */
			fsl,pins = <
				MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1
				MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1
			>;
		};
	};
};

&uart3 {
	/* Debug port / console */
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart3>;
	status = "okay";
};
_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox

[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux