iMX6Q First boot
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.
Quoted 24 lines · it
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
Quoted 2 lines
type exit to get to the menu
barebox@EK360 Eurek i.MX6 Quad:/
and the console is not working...
Where I am wrong???
Signature · 4 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 9 lines · gianluca
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&Makefilestuff, copying the udoo stuff to thearch/arm/boards/eurek-ek360(as the board name is EK360) and cut-off any unneeded initialization.
Quoted 7 lines
I am using
imx_v7_defconfigas 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, thelowlevel.cand the device-tree file.
gianluca, the information you included is somewhat incomplete. Attached file is a .dsti file (include file, not a standalone .dts) which references phandles not defined in the file itself, so it seems like there should be more to it.
However there are a couple of things to note about the code you included:
- The device tree code that you provided doesn't have
chosen {
linux,stdout-path = <something>;
};
which means that BB's console subsystem doesn't have a assigned"stdout" device, which might explain why you don't see the output
- Udoo board, that you used as a reference for your implementation
actually doesn't "support" for CONFIG_DEBUG_LL, and what I mean by this is that there's no code in lowlevel.c that would set-up pinmux or UART blocks correctly (see phytech-som-imx6/lowlevel.c for example), so the fact that you were able to see any output would mean that either default in all involved registers are good for your board or that settings were set during some other initialization process (most likely when UART driver was probed and pinmux configured as a part of it)
Hope this helps,
Andrey
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 15 lines · Andrey Smirnov
Quoted 14 lines · gianluca
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&Makefilestuff, copying the udoo stuff to thearch/arm/boards/eurek-ek360(as the board name is EK360) and cut-off any unneeded initialization.I am using
imx_v7_defconfigas 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.
Quoted 8 lines
Quoted 2 lines
In attachment there are the
board.c, thelowlevel.cand the device-tree file.gianluca, the information you included is somewhat incomplete. Attached file is a .dsti file (include file, not a standalone .dts) which references phandles not defined in the file itself, so it seems like there should be more to it.
The .dts file is almost empty. In attachment there is such a file. ;-)
Quoted 9 lines
However there are a couple of things to note about the code you included:
- The device tree code that you provided doesn't have
chosen { linux,stdout-path = <something>; }; which means that BB's console subsystem doesn't have a assigned"stdout" device, which might explain why you don't see the output
Even if it says: linux,stdout-path = .... ??? I suppose it was good only for Linux Kernel.
My goal is to have ONLY one device-tree for Linux & Barebox. It is simpler to maintain, and if I add something to linux, it is automagically added to barebox too (if barebox drivers exists...)
Quoted 10 lines
- Udoo board, that you used as a reference for your implementation
actually doesn't "support" forCONFIG_DEBUG_LL, and what I mean by this is that there's no code inlowlevel.cthat would set-up pinmux or UART blocks correctly (seephytech-som-imx6/lowlevel.cfor example), so the fact that you were able to see any output would mean that either default in all involved registers are good for your board or that settings were set during some other initialization process (most likely when UART driver was probed and pinmux configured as a part of it)
I didn't kown it. I will try ASAP.
Quoted 2 lines
Hope this helps,
I hope too... ;-)
Signature · 4 lines
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 2014 Raphaël Poggi
* 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
*/
/dts-v1/;
#include <arm/imx6q.dtsi>
#include "imx6q.dtsi"
#include "imx6q-eurek-ek360.dtsi"
/ {
model = "EK360 Eurek i.MX6 Quad";
compatible = "eurek,ek360", "fsl,imx6q";
};_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 38 lines · gianluca
Quoted 15 lines · Andrey Smirnov
Quoted 14 lines · gianluca
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&Makefilestuff, copying the udoo stuff to thearch/arm/boards/eurek-ek360(as the board name is EK360) and cut-off any unneeded initialization.I am using
imx_v7_defconfigas 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.
Quoted 8 lines
Quoted 2 lines
In attachment there are the
board.c, thelowlevel.cand the device-tree file.gianluca, the information you included is somewhat incomplete. Attached file is a .dsti file (include file, not a standalone .dts) which references phandles not defined in the file itself, so it seems like there should be more to it.
The .dts file is almost empty. In attachment there is such a file. ;-)
Quoted 9 lines
However there are a couple of things to note about the code you included:
- The device tree code that you provided doesn't have
chosen { linux,stdout-path = <something>; }; which means that BB's console subsystem doesn't have a assigned"stdout" device, which might explain why you don't see the output
Quoted 2 lines
Even if it says: linux,stdout-path = .... ??? I suppose it was good only for Linux Kernel.
Both barebox and the kernel treat the "linux,stdout-path" and "stdout-path" property equally. It doesn't matter which one you use, but one of them must be present. Otherwise barebox won't find the console device. "stdout-path" is preferred over the linux, variant.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox