Re: Getting serial console output on new imx7d tqma7 board UART4

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

 



Hello Lars,

On 8/4/20 3:07 PM, Lars Pedersen wrote:
> I just go an MCIMX7SABRE board and it now trying to start barebox from
> the external SD card, which I guess should be possible right?
> 
> I have taken barebox 2020.07.0 and copied the imx_v7_defconfig and
> deselected all boards except the "NXP i.MX7 SabreSD board"
> 
> After compilation i copy the image using:
> 
> sudo dd if=barebox-freescale-mx7-sabresd.img of=/dev/sdb bs=1024 skip=1 seek=1
> sync> 
> But still no boot screen for that either. :/
> 
> Shouldn't this work out of the box??

Works for me.

imx_v7_defconfig
OSELAS.Toolchain-2019.09.1
Image written to SD card (offset 0) and booted from.

Can you try with same toolchain? If that works, it
might be a compiler issue? What are you using?

> 
> /Lars Pedersen
> 
> On Mon, 3 Aug 2020 at 12:10, Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> wrote:
>>
>> Hi,
>>
>> On 7/29/20 6:52 PM, Lars Pedersen wrote:
>>> I have spent the last couple of days trying to port our bootloader
>>> from u-boot to barebox 2020.07 but have yet to get any console output.
>>> Our product is based on tqma7d i.MX7 dual core cpu and uses UART4 for
>>> serial console and boots from internal eMMC.
>>>
>>> I created a new board inspired from "NXP i.MX7 SabreSD board" and
>>> tried to only add the basic in the first step to get a console output
>>> working. The image is built using ptxdist and the imx_v7_defconfig
>>> where the new board is selected. The image is flashed with "dd
>>> if=barebox-image of=/dev/mmcblk0 bs=1024 skip=1 seek=1 conv=fsync".
>>> The device works using u-boot 2020.07 with the same device trees but
>>> we thought it was time to try out barebox since u-boot felt a little
>>> bloated :)
>>>
>>> So can anyone be of assistance and tell me what I'm missing?
>>
>> When I looked through your patch the first time, I just looked
>> for stuff that would cause it to not boot. Some more comments
>> inline that are unrelated to your boot problems.
>>
>>>
>>> /Lars Pedersen
>>>
>>> From: Lars Pedersen <laa@xxxxxxxxxxxx>
>>> Date: Tue, 28 Jul 2020 08:57:57 +0000
>>> Subject: [PATCH] Add kamstrup imx7d dev board
>>>
>>> ---
>>>  arch/arm/boards/Makefile                           |   1 +
>>>  arch/arm/boards/kamstrup-imx7d-tqma7d/Makefile     |   2 +
>>>  arch/arm/boards/kamstrup-imx7d-tqma7d/board.c      |  19 ++
>>>  .../flash-header-kamstrup-imx7d-tqma7d.imxcfg      |  79 ++++++
>>>  arch/arm/boards/kamstrup-imx7d-tqma7d/lowlevel.c   |  35 +++
>>>  arch/arm/dts/Makefile                              |   1 +
>>>  arch/arm/dts/imx7d-flex-concentrator-mfg.dts       |  11 +
>>>  arch/arm/mach-imx/Kconfig                          |   5 +
>>>  drivers/regulator/Kconfig                          |   2 +-
>>>  dts/src/arm/imx7d-flex-concentrator-mfg.dts        |  25 ++
>>>  dts/src/arm/imx7d-flex-concentrator.dts            | 313 +++++++++++++++++++++
>>>  images/Makefile.imx                                |   5 +
>>>  12 files changed, 497 insertions(+), 1 deletion(-)
>>>  create mode 100644 arch/arm/boards/kamstrup-imx7d-tqma7d/Makefile
>>>  create mode 100644 arch/arm/boards/kamstrup-imx7d-tqma7d/board.c
>>>  create mode 100644
>>> arch/arm/boards/kamstrup-imx7d-tqma7d/flash-header-kamstrup-imx7d-tqma7d.imxcfg
>>>  create mode 100644 arch/arm/boards/kamstrup-imx7d-tqma7d/lowlevel.c
>>>  create mode 100644 arch/arm/dts/imx7d-flex-concentrator-mfg.dts
>>>  create mode 100644 dts/src/arm/imx7d-flex-concentrator-mfg.dts
>>>  create mode 100644 dts/src/arm/imx7d-flex-concentrator.dts
>>>
>>> diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
>>> index e9e9163d589b..58bb4cf2adab 100644
>>> --- a/arch/arm/boards/Makefile
>>> +++ b/arch/arm/boards/Makefile
>>> @@ -64,6 +64,7 @@ obj-$(CONFIG_MACH_HIGHBANK)            += highbank/
>>>  obj-$(CONFIG_MACH_IMX21ADS)            += freescale-mx21-ads/
>>>  obj-$(CONFIG_MACH_IMX233_OLINUXINO)        += imx233-olinuxino/
>>>  obj-$(CONFIG_MACH_IMX27ADS)            += freescale-mx27-ads/
>>> +obj-$(CONFIG_MACH_KAMSTRUP_IMX7D_TQMA7D)    += kamstrup-imx7d-tqma7d/
>>>  obj-$(CONFIG_MACH_KINDLE3)            += kindle3/
>>>  obj-$(CONFIG_MACH_KONTRON_SAMX6I)        += kontron-samx6i/
>>>  obj-$(CONFIG_MACH_LENOVO_IX4_300D)        += lenovo-ix4-300d/
>>> diff --git a/arch/arm/boards/kamstrup-imx7d-tqma7d/Makefile
>>> b/arch/arm/boards/kamstrup-imx7d-tqma7d/Makefile
>>> new file mode 100644
>>> index 000000000000..01c7a259e9a5
>>> --- /dev/null
>>> +++ b/arch/arm/boards/kamstrup-imx7d-tqma7d/Makefile
>>> @@ -0,0 +1,2 @@
>>> +obj-y += board.o
>>> +lwl-y += lowlevel.o
>>> diff --git a/arch/arm/boards/kamstrup-imx7d-tqma7d/board.c
>>> b/arch/arm/boards/kamstrup-imx7d-tqma7d/board.c
>>> new file mode 100644
>>> index 000000000000..b3ffa851f3e6
>>> --- /dev/null
>>> +++ b/arch/arm/boards/kamstrup-imx7d-tqma7d/board.c
>>> @@ -0,0 +1,19 @@
>>> +// SPDX-License-Identifier: GPL-2.0-or-later
>>> +// SPDX-FileCopyrightText: 2020 Kamstrup A/S
>>> +
>>> +/* Author: Lars Pedersen <lapeddk@xxxxxxxxx> */
>>> +
>>> +#include <common.h>
>>> +#include <init.h>
>>> +#include <io.h>
>>> +#include <mach/imx7-regs.h>
>>> +#include <mfd/imx7-iomuxc-gpr.h>
>>> +
>>> +static int kamstrup_mx7_tqma7d_coredevices_init(void)
>>> +{
>>> +    if (!of_machine_is_compatible("kam,imx7d-flex-concentrator"))
>>> +        return 0;
>>> +
>>> +    return 0;
>>> +}
>>
>> Function serves no purpose. If you don't have baord code, drop it altogether.
>>
> 
> I'll do a cleanup when I have it working :D
> 
>>> +coredevice_initcall(kamstrup_mx7_tqma7d_coredevices_init);
>>> diff --git a/arch/arm/boards/kamstrup-imx7d-tqma7d/flash-header-kamstrup-imx7d-tqma7d.imxcfg
>>> b/arch/arm/boards/kamstrup-imx7d-tqma7d/flash-header-kamstrup-imx7d-tqma7d.imxcfg
>>> new file mode 100644
>>> index 000000000000..7656619c1b2e
>>> --- /dev/null
>>> +++ b/arch/arm/boards/kamstrup-imx7d-tqma7d/flash-header-kamstrup-imx7d-tqma7d.imxcfg
>>> @@ -0,0 +1,79 @@
>>> +soc imx7
>>> +loadaddr 0x80000000
>>> +dcdofs 0x400
>>
>> Called ivtofs now in barebox next branch now.
>>
> 
> Okay thanks.
> 
>>> diff --git a/arch/arm/dts/imx7d-flex-concentrator-mfg.dts
>>> b/arch/arm/dts/imx7d-flex-concentrator-mfg.dts
>>> new file mode 100644
>>> index 000000000000..746e36a70f4c
>>> --- /dev/null
>>> +++ b/arch/arm/dts/imx7d-flex-concentrator-mfg.dts
>>> @@ -0,0 +1,11 @@
>>> +/*
>>> + * 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 <arm/imx7d-flex-concentrator-mfg.dts>
>>> +
>>> diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
>>> index 6dd5cb2aca15..d0a9332c7a24 100644
>>> --- a/arch/arm/mach-imx/Kconfig
>>> +++ b/arch/arm/mach-imx/Kconfig
>>> @@ -492,6 +492,11 @@ config MACH_ZII_IMX7D_DEV
>>>      select ARCH_IMX7
>>>      select ARM_USE_COMPRESSED_DTB
>>>
>>> +config MACH_KAMSTRUP_IMX7D_TQMA7D
>>> +    bool "Kamstrup TQMa7D based devices"
>>> +    select ARCH_IMX7
>>> +    select ARM_USE_COMPRESSED_DTB
>>> +
>>>  config MACH_PHYTEC_PHYCORE_IMX7
>>>      bool "Phytec phyCORE i.MX7"
>>>      select ARCH_IMX7
>>> diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
>>> index 1ce057180a01..b0bdc48399e3 100644
>>> --- a/drivers/regulator/Kconfig
>>> +++ b/drivers/regulator/Kconfig
>>> @@ -19,7 +19,7 @@ config REGULATOR_BCM283X
>>>  config REGULATOR_PFUZE
>>>      bool "Freescale PFUZE100/200/3000 regulator driver"
>>>      depends on I2C
>>> -    depends on ARCH_IMX6 || ARCH_IMX8MQ
>>> +    depends on ARCH_IMX6 || ARCH_IMX7 || ARCH_IMX8MQ
>>>
>>>  config REGULATOR_STM32_PWR
>>>      bool "STMicroelectronics STM32 PWR"
>>> diff --git a/dts/src/arm/imx7d-flex-concentrator-mfg.dts
>>> b/dts/src/arm/imx7d-flex-concentrator-mfg.dts
>>> new file mode 100644
>>> index 000000000000..789f0837058f
>>> --- /dev/null
>>> +++ b/dts/src/arm/imx7d-flex-concentrator-mfg.dts
>>
>> Perfectly fine for your patch stack in BSP, but if you want to upstream
>> it, you need to either:
>>
>> 1) upstream your device tree to Linux. dts/ is a sync with Linux and
>>    shortly after, it will be imported into barebox
>> 2) put your device tree in arch/arm/dts
>>
> The dts will upstreamed soon. Hopefully :D
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
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