linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: i.MX7 clock support broken
Date: Fri, 10 Feb 2017 08:03:41 +0100	[thread overview]
Message-ID: <20170210070341.7xjnim5nq37gvnlg@pengutronix.de> (raw)
In-Reply-To: <DB5PR04MB1431EB280E8B9BA929FF006D80420@DB5PR04MB1431.eurprd04.prod.outlook.com>

On Wed, Feb 08, 2017 at 04:47:06PM +0000, A.S. Dong wrote:
> Hi Sascha,
> 
> > -----Original Message-----
> > From: Sascha Hauer [mailto:s.hauer at pengutronix.de]
> > Sent: Tuesday, February 07, 2017 10:22 PM
> > To: linux-arm-kernel at lists.infradead.org
> > Cc: Shawn Guo; A.S. Dong; Fabio Estevam; kernel at pengutronix.de
> > Subject: i.MX7 clock support broken
> > 
> > Hi All,
> > 
> > I recently adopted the i.MX7 clock tree from Linux to barebox and wondered
> > why ethernet doesn't work.
> 
> I just reproduced the issue on MX7D SDB board with latest upstream kernel
> That kernel NULL point crash during boot on
> fec_enet_open->..->phy_attach_direct.
> 
> Not sure if the same as yours.
> (Paste log at last)
> 
> Andy,
> Can you help check it?
> 
> > I found out that the clock tree in Linux is
> > quite different from what the reference manual describes and also quite
> > different from the hardware I have on my desk. There are several clocks
> > that only exist in the driver, but not in the actual hardware and also
> > several clocks which are in hardware, but not in the driver.
> > 
> > These clocks exist in the driver only, but not in the hardware:
> > 
> 
> Please refer to secion 5.2.5 in RM.
> They're LPCG gates.
> 
> But I did notice some of them seem not find in RM.
> e.g. IMX7D_ARM_A7_ROOT_CLK, IMX7D_ARM_M0_ROOT_CLK, IMX7D_SPDIF_ROOT_CLK ...
> 
> It might be true that not all listed in RM as I see a Note
> " Not all CCGRs are mapped " right upon Table 5-19.

Ok, I try to be more explicit:

The current clock driver controls ethernet gates at CCM_BASE + 0x44e0 and
CCM_BASE + 0x44f0. These registers do not have any effect on the
hardware. The real gate for enet1 is at CCM_BASE + 0x4700, also
documented in the reference manual. Changing this register really has
an effect on the hardware. Or to put it different: Ethernet won't work
in the kernel when the (real) gates have not been previously enabled in
the bootloader.


> 
> Overally the current imx7d clk driver in upstream seems intend to be
> an initial version and may miss many local fix patches.
> 
> You can also refer to:
> http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/?h=imx_4.1.15_2.0.0_ga

This tree has the same bugs.

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 |

  parent reply	other threads:[~2017-02-10  7:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 14:22 i.MX7 clock support broken Sascha Hauer
2017-02-08  3:06 ` Shawn Guo
2017-02-08 16:47 ` A.S. Dong
2017-02-08 17:00   ` Frank Li
2017-02-10  3:37   ` Andy Duan
2017-02-10  4:13     ` Andrew Lunn
2017-02-10  6:49     ` Sascha Hauer
2017-02-10  6:59       ` A.S. Dong
2017-02-10  7:03   ` Sascha Hauer [this message]
2017-02-10  7:07     ` A.S. Dong

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=20170210070341.7xjnim5nq37gvnlg@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).