From: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
To: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Fabio Estevam <festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: device tree binding documentation outdated
Date: Fri, 27 Sep 2013 16:19:00 +0100 [thread overview]
Message-ID: <20130927151900.GA12758@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20130927132601.GL25146-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
On Fri, Sep 27, 2013 at 09:26:02PM +0800, Shawn Guo wrote:
> On Fri, Sep 27, 2013 at 01:13:57PM +0100, Russell King - ARM Linux wrote:
> > There's also this which follows the above:
> >
> > + /* Set enet clock to 50MHz RMII */
> > + enet = clk_get_sys("enet.0", NULL);
> > + if (IS_ERR(enet))
> > + pr_err("Unable to get enet.0 clock\n");
>
> I can not find clock lookup for "enet.0" in FSL 3.0.35 BSP 4.1.0, so
> I'm not sure how this works at all. Can you confirm that by running
> Rabeeh's kernel to see if you get that error message?
Here . Trying to find clock enet.0 (null)
Returning clk_lookup at 824f9854
Here . Trying to find clock (null) esai_clk
Returning clk_lookup at 824f95ac
Here . Trying to find clock (null) pll3_pfd_508M
Returning clk_lookup at 824f919c
Here . Trying to find clock (null) asrc_clk
Returning clk_lookup at 824f96ec
So it seems to be able to get that clock. I'm wondering if it's based
on BSP 4.0.0 which does have that clock, rather than 4.1.0.
> > + else {
> > + clk_prepare(enet);
> > + clk_set_rate(enet, 50000000);
> > + clk_enable(enet);
> > + }
> >
> > I'm not sure at the moment which clock that refers to, or whether that's
> > necessary only for the AR8030 (which is used in RMII mode). The enable
> > bit seems to be CCM_CCGR1 CG5_OFFSET.
>
> There are two clocks ENET related, 'enet' (117) and 'enet_ref' (190).
> The enet is fec internal working clock, and enet_ref is provided by
> imx6q CCM (Clock Controller Module) on pad ENET_REF_CLK which can
> generally be used to clock the external PHY.
In this case, the phy provides the clock to the IMX6.
> The CCM_CCGR1_CG5 is clock 'enet', while I think the clock in above
> code should be 'enet_ref'. It seems you need to set up
> MX6QDL_PAD_GPIO_16__ENET_REF_CLK to use the clock though.
Okay, and it seems Rabeeh is setting the enet clock (117) to 50MHz.
It defaults to 66MHz for me in 3.12-rc1, but I've hacked clk-imx6q.c
to call clk_set_rate(clk[enet], 50000000).
I've changed the enet_ref clock pinctrl settings to:
/* ENET_REF_CLK is an output on AR8035 - SION must be set */
MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0xc0000000
(which expands to: 0x214 0x5e4 0x80c 0x2 0x0 0xc0000000)
which in Rabeeh's version corresponds to:
MX6DL_PAD_GPIO_16__ENET_ANATOP_ETHERNET_REF_OUT,
(which expands to: IOMUX_PAD(0x05E4, 0x0214, 0x12, 0x080C, 0, NO_PAD_CTRL))
I've been through all the pinctrl settings for this now, taking them
back to the hex numbers and comparing. I'm quite certain I have the
pinctrl settings correct now.
Probing the AR8035, I see that it's generating its 125M clock, as per
the fixup function, so at least that's working.
I've just enabled the debug in pinctrl-imx.c, and I get this:
imx6dl-pinctrl 20e0000.iomuxc: group(3): enetgrp-4
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE0: 1 0x0001b0b0
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE1: 1 0x0001b0b0
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE2: 5 0x000130b0
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE3: 5 0x80000000
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE4: 1 0x00003000
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE5: 1 0x00003000
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE6: 1 0x00003000
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE7: 1 0x80000000
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE8: 1 0x80000000
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE9: 1 0x80000000
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE10: 18 0x80000000
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE11: 1 0x80000000
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE12: 1 0x0001b0b0
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE13: 1 0x0001b0b0
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE14: 1 0x0001b0b0
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE15: 1 0x0001b0b0
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE16: 1 0x0001b0b0
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE17: 1 0x0000a0b1
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_RESERVE18: 1 0x0001b0b0
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_CSI0_DAT10: 1 0x000130b0
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_CSI0_DAT11: 1 0x000130b0
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_CSI0_DAT12: 1 0x0001b0b0
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_CSI0_DAT13: 1 0x0001b0b0
imx6dl-pinctrl 20e0000.iomuxc: MX6DL_PAD_CSI0_DAT14: 1 0x000130b0
...
brd: module loaded
loop: module loaded
imx6dl-pinctrl 20e0000.iomuxc: maps: function enet group enetgrp-4 num 19
ar8035_phy_fixup()
libphy: fec_enet_mii_bus: probed
fec 2188000.ethernet eth0: registered PHC device 0
So where is the pinctrl settings applied - or more to the point, why
aren't they being applied? This would probably explain why ethernet
doesn't work - I mean, if the pinctrl settings are never written to
the registers...
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-09-27 15:19 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 19:51 device tree binding documentation outdated Russell King - ARM Linux
[not found] ` <20130926195158.GS12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-09-26 20:29 ` Fabio Estevam
[not found] ` <CAOMZO5ANsZGcpvmtBE7d0q0E6+f0bE_U8CBF7G2v3xtqoLbqcA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-26 20:59 ` Russell King - ARM Linux
[not found] ` <20130926205906.GT12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-09-26 23:10 ` Matt Sealey
[not found] ` <CAHCPf3u9KyoJiAPv6oc_ZdVBqgix41__RAGRXh8z+d5bXO8fQw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-26 23:29 ` Russell King - ARM Linux
[not found] ` <20130926232907.GV12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-09-26 23:48 ` Matt Sealey
2013-09-27 13:15 ` Jason Cooper
[not found] ` <20130927131554.GB31178-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2013-09-27 17:05 ` Russell King - ARM Linux
[not found] ` <20130927170552.GC12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-09-27 18:31 ` Russell King - ARM Linux
[not found] ` <20130927183101.GE12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-09-27 18:52 ` Fabio Estevam
[not found] ` <CAOMZO5Csr-vgsKHahnTcMKu1DfgSToYnoVncAfhYFJid-bwviQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-27 20:16 ` Matt Sealey
[not found] ` <CAHCPf3t=rG-sV-kNe5mQjSvs8k0rddv9=tgh+ub=Tt1xObYxVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-27 20:43 ` Russell King - ARM Linux
2013-09-26 23:25 ` Fabio Estevam
2013-09-27 12:13 ` Russell King - ARM Linux
[not found] ` <20130927121357.GY12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-09-27 13:26 ` Shawn Guo
[not found] ` <20130927132601.GL25146-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2013-09-27 15:19 ` Russell King - ARM Linux [this message]
[not found] ` <20130927151900.GA12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-09-27 15:49 ` Russell King - ARM Linux
2013-09-27 16:52 ` Matt Sealey
[not found] ` <CAHCPf3t8=mJn-RCz3C1cY6zqsH9ds8UANKpKx9ZpwPM6WjJt3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-27 17:49 ` Russell King - ARM Linux
[not found] ` <20130927174916.GD12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-09-27 18:33 ` Matt Sealey
[not found] ` <CAHCPf3sC7bY=p4vpBQFpRUmyPspT_PVjx0rH9cm1ov=SqkO+Vg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-27 19:05 ` Russell King - ARM Linux
[not found] ` <20130927190546.GG12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-09-27 19:41 ` Matt Sealey
[not found] ` <CAHCPf3vxGAzTnY360KC7Yt-DB1FB14Sv_Cn7DBTH6HGZ6y=stg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-27 19:48 ` Matt Sealey
[not found] ` <CAHCPf3sv3wSbUc9QFVhmYsPc1kqiWYRuOMO7rreuiGSrwyepBQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-27 20:21 ` Russell King - ARM Linux
[not found] ` <20130927202110.GI12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-09-28 8:38 ` Russell King - ARM Linux
[not found] ` <20130928083859.GQ12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-09-29 6:13 ` Shawn Guo
[not found] ` <20130929061303.GB26156-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2013-09-29 6:23 ` Duan Fugang-B38611
[not found] ` <9848F2DB572E5649BA045B288BE08FBE017115C8-RL0Hj/+nBVC81RJBUSuqCa4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
2013-09-29 6:35 ` Shawn Guo
[not found] ` <20130929063515.GC26156-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2013-09-29 6:47 ` Duan Fugang-B38611
2013-10-02 19:33 ` Russell King - ARM Linux
[not found] ` <20131002193316.GR12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-10-02 23:49 ` Russell King - ARM Linux
[not found] ` <20131002234911.GD12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-10-03 2:21 ` Fabio Estevam
2013-10-04 15:45 ` Shawn Guo
[not found] ` <20131004154536.GB2734-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2013-10-04 15:58 ` Russell King - ARM Linux
2013-09-29 5:01 ` Shawn Guo
2013-09-27 20:18 ` Russell King - ARM Linux
2013-09-28 3:28 ` Fabio Estevam
2013-09-26 21:35 ` Linus Walleij
[not found] ` <CACRpkda9HZ4JKnidnJJh-HkhCgtvJwQPQJnv9CZ4iYcQP36_Nw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-27 2:51 ` Shawn Guo
[not found] ` <20130927025116.GG25146-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2013-09-27 8:45 ` Russell King - ARM Linux
[not found] ` <20130927084504.GW12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-09-27 12:28 ` Shawn Guo
[not found] ` <20130927122814.GK25146-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2013-09-27 13:12 ` Jason Cooper
[not found] ` <20130927131225.GA31178-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2013-09-27 13:21 ` Russell King - ARM Linux
2013-09-27 13:29 ` Linus Walleij
[not found] ` <20130927132107.GZ12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-09-27 13:31 ` Jason Cooper
[not found] ` <20130927133120.GC31178-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2013-09-27 16:33 ` Matt Sealey
[not found] ` <CAHCPf3tfc9Z14YYm9K0AXNinMDsTwE51_6tbYfyFU7cA8M7MgA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-27 20:52 ` Russell King - ARM Linux
2013-09-27 13:52 ` Arnaud Patard
2013-09-27 15:40 ` Matt Sealey
2013-09-27 9:49 ` Russell King - ARM Linux
[not found] ` <20130927094902.GX12758-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-09-27 12:08 ` Sascha Hauer
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=20130927151900.GA12758@n2100.arm.linux.org.uk \
--to=linux-lfz/pmaqli7xmaaqvzeohq@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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).