public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] arm: mx6: add support for TBS2910 Matrix ARM miniPC
Date: Wed, 22 Oct 2014 10:36:19 +0200	[thread overview]
Message-ID: <54476C83.5090904@denx.de> (raw)
In-Reply-To: <54469DF0.3030703@web.de>

Hi Soeren,

On 21/10/2014 19:54, Soeren Moch wrote:
>>
>> This is also copied from sabresd. Can we factorize in some way ?
> 
> I can, and probably should, simplify this code. But in fact this code
> is wrong, and in the same way for many imx6q boards (e.g. sabresd,
> wandboard, nitrogen6x,...).

That makes things only worse. Duplicating the code, we have an
additional board with bad / wrong code.

> 
> This code configures the external video clock (LDB_DIx clock). This
> clock is hardcoded to have 65MHz in drivers/video/ipu_common.c:ldb_clk.
> But in fact the clock rate is configured to 75.42MHz (528MHz/7) on all
> boards. So the display does not show 1024x768 at 60Hz as configured, but
> something similar to 1024x768 at 70Hz (not VESA compliant), which much
> monitors can handle, but on other monitors there are problems.
> (one out of tree monitors works for me).

Ok, understood.

> 
> My intention was to get this initial support for tbs2910 merged with the
> (wrong) code from sabresd used as template, and later to discuss how to
> cleanup this code.
> 
> Do you prefer a simplified version of this code for the initial patch?

Maybe this is the best approach: you can at the beginning drop support
for video, an let your board be merged without wrong code. Then we can
discuss about fixing the wrong clock as shared code, letting that all
boards take advantage for that.

> 
>>> +#endif /* CONFIG_VIDEO_IPUV3 */
>>> +
>>> +int board_eth_init(bd_t *bis)
>>> +{
>>> +    setup_iomux_enet();
>>> +    setup_pcie();
>>> +
>>> +    return cpu_eth_init(bis);
>>> +}
>>> +
>>> +int board_early_init_f(void)
>>> +{
>>> +    setup_iomux_uart();
>>> +#ifdef CONFIG_VIDEO_IPUV3
>>> +    setup_display();
>>
>> I do not understand why setup_display() should be called at this point.
>> Generally, board_early_init_f() is called to setup iomux for peripherals
>> needed before relocation, as uart, letting the rest of the setup in
>> board_init(). Why do you need here ?
> 
> In fact this was also copied from sabresd/wandboard/nitrogen6x.
> My assumption was, that the clocks must be configured before the
> ipu is initialized.

That is correct, but ipu is initialized by video_init() after
board_init() is called. Generally, board_early_init() is responsible for
setup some initial peripherals, for example the iomux for uart or for
RAM controller. The common initialization is then put into board_init().
I am expecting that you have no issues by moving setup_display() in the
board_init() function.

> 
>>> diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
>>> new file mode 100644
>>> index 0000000..602d691
>>> --- /dev/null
>>> +++ b/configs/tbs2910_defconfig
>>> @@ -0,0 +1,3 @@
>>> +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q2g.cfg,MX6Q"
>>>
>>
>> Be aware that changes in the ddr-setup in that file will have a
>> consequence on your board.
> 
> Yes, I'm aware of that. But nitrogen6x is very well maintained. So I see
> no need to
> duplicate this config and reuse it in the same way as wandboard does.

ok, that is enough, then it is fine with me.

Best regards,
Stefano Babic


-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

  reply	other threads:[~2014-10-22  8:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-18 11:13 [U-Boot] [PATCH 1/2] arm: mx6: add support for TBS2910 Matrix ARM miniPC Soeren Moch
2014-10-18 11:13 ` [U-Boot] [PATCH 2/2] video: speedup writing strings to fb console Soeren Moch
2014-10-21 11:40 ` [U-Boot] [PATCH 1/2] arm: mx6: add support for TBS2910 Matrix ARM miniPC Stefano Babic
2014-10-21 17:54   ` Soeren Moch
2014-10-22  8:36     ` Stefano Babic [this message]
2014-10-22 12:16       ` Soeren Moch
2014-10-22 14:23         ` Stefano Babic
2014-10-24 14:33 ` [U-Boot] [PATCH v2 1/3] arm: arch-mx6: typo fixes in crm_regs.h Soeren Moch
2014-10-24 14:33   ` [U-Boot] [PATCH v2 2/3] arm: mx6: add support for TBS2910 Matrix ARM miniPC Soeren Moch
2014-10-30 11:02     ` Stefano Babic
2014-10-30 13:26       ` [U-Boot] [PATCH v3] " Soeren Moch
2014-11-03  9:37         ` Stefano Babic
2014-11-03 10:39           ` Soeren Moch
2014-11-03 10:54             ` Stefano Babic
2014-11-03 11:27               ` Fabio Estevam
2014-11-03 12:57           ` [U-Boot] [PATCH v4] " Soeren Moch
2014-11-13 17:10             ` Stefano Babic
2014-10-30 12:59     ` [U-Boot] [PATCH v2 2/3] " Fabio Estevam
2014-10-24 14:33   ` [U-Boot] [PATCH v2 3/3] video: speedup writing strings to fb console Soeren Moch
2014-10-30 10:52     ` Stefano Babic
2014-10-30 21:06     ` Anatolij Gustschin
2014-10-30 11:00   ` [U-Boot] [PATCH v2 1/3] arm: arch-mx6: typo fixes in crm_regs.h Stefano Babic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54476C83.5090904@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox