* iMX6Q First boot
@ 2016-02-25 13:50 gianluca
2016-02-25 19:27 ` Andrey Smirnov
0 siblings, 1 reply; 4+ messages in thread
From: gianluca @ 2016-02-25 13:50 UTC (permalink / raw)
To: barebox
[-- Attachment #1: Type: text/plain, Size: 2320 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: board.c --]
[-- Type: text/x-csrc; name="board.c", Size: 2250 bytes --]
/*
* 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);
[-- Attachment #3: flash-header-mx6-eurek-ek360.imxcfg --]
[-- Type: text/plain, Size: 2904 bytes --]
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
[-- Attachment #4: lowlevel.c --]
[-- Type: text/x-csrc, Size: 383 bytes --]
#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);
}
[-- Attachment #5: imx6q-eurek-ek360.dtsi --]
[-- Type: text/plain, Size: 1584 bytes --]
/*
* 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";
};
[-- Attachment #6: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: iMX6Q First boot
2016-02-25 13:50 iMX6Q First boot gianluca
@ 2016-02-25 19:27 ` Andrey Smirnov
2016-02-26 9:32 ` gianluca
0 siblings, 1 reply; 4+ messages in thread
From: Andrey Smirnov @ 2016-02-25 19:27 UTC (permalink / raw)
To: gianluca; +Cc: barebox
On Thu, Feb 25, 2016 at 5:50 AM, gianluca <gianlucarenzi@eurek.it> wrote:
> 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.
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: iMX6Q First boot
2016-02-25 19:27 ` Andrey Smirnov
@ 2016-02-26 9:32 ` gianluca
2016-02-26 13:01 ` Sascha Hauer
0 siblings, 1 reply; 4+ messages in thread
From: gianluca @ 2016-02-26 9:32 UTC (permalink / raw)
To: barebox
[-- Attachment #1: Type: text/plain, Size: 2652 bytes --]
On 02/25/2016 08:27 PM, Andrey Smirnov wrote:
> On Thu, Feb 25, 2016 at 5:50 AM, gianluca <gianlucarenzi@eurek.it> wrote:
>> 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.
>
> 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. ;-)
> 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...)
> - 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)
>
I didn't kown it. I will try ASAP.
> Hope this helps,
>
I hope too... ;-)
--
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
[-- Attachment #2: imx6q-eurek-ek360.dts --]
[-- Type: text/plain, Size: 598 bytes --]
/*
* 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";
};
[-- Attachment #3: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: iMX6Q First boot
2016-02-26 9:32 ` gianluca
@ 2016-02-26 13:01 ` Sascha Hauer
0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2016-02-26 13:01 UTC (permalink / raw)
To: gianluca; +Cc: barebox
On Fri, Feb 26, 2016 at 10:32:25AM +0100, gianluca wrote:
> On 02/25/2016 08:27 PM, Andrey Smirnov wrote:
> >On Thu, Feb 25, 2016 at 5:50 AM, gianluca <gianlucarenzi@eurek.it> wrote:
> >>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.
> >
> >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. ;-)
>
>
> >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.
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
--
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-26 13:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-25 13:50 iMX6Q First boot gianluca
2016-02-25 19:27 ` Andrey Smirnov
2016-02-26 9:32 ` gianluca
2016-02-26 13:01 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox