linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ynezz@true.cz (Petr Štetiar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: dts: imx6: Add support for Toradex Apalis SoM
Date: Sat, 28 Nov 2015 20:38:24 +0100	[thread overview]
Message-ID: <20151128193824.GN19674@ibawizard.net> (raw)
In-Reply-To: <5b507c5d85e51d56074a8f8c32b8dcf9@agner.ch>

Stefan Agner <stefan@agner.ch> [2015-11-27 12:02:46]:

> Hi Petr,

Hi,

> > &fec {
> > 	pinctrl-names = "default";
> > 	pinctrl-0 = <&pinctrl_enet &pinctrl_enet_ctrl>;
> > 	phy-mode = "rgmii";
> > 
> > 	phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
> > 	interrupts-extended = <&gpio1 30 IRQ_TYPE_LEVEL_LOW>,
> > 			      <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
> > 	status = "okay";
> > };
> 
> According to the schema, &gpio1 30 is low active as well as the reset
> GPIO &gpio1 25. Both pulled high externally...
> 
> So phy reset GPIO should be ACTIVE_LOW, otherwise things look correct to
> me.
> 
> I guess in that case U-Boot took care of it. However, this is not a
> clean solution...

Yes, I think, that it's being setup by U-Boot and there is something not
properly(*) defined in the DTS or in kernel. I'll probably start over with a
vanilla U-Boot to get relatively clean table.

* If I boot Toradex's 3.10.17+gitr602505a35 first and then reboot into
  4.4.0-rc2, the kernel hangs somewhere in the platform init. It's probably
  the PAD_CTRL_NO problem. I'll get into this once I fix the fec.

> Not sure what happens exactly, maybe the phy-reset does not honor the
> GPIO_ACTIVE_LOW flag?

Reset works probably fine, I haven't verified that with a scope, but if I boot
over NFS, it takes longer then without reset-gpio defined.

The issue is with IRQ GPIO, which I can't get to work. Here are two cases I've
observed so far:

1. PHY init failure due to MDIO read timeout

  interrupts-extended = <&gpio1 30 IRQ_TYPE_LEVEL_LOW>, <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;

  [    2.685556] of_irq_parse_raw:  /soc/aips-bus at 02000000/gpio at 0209c000:0000001e,00000008
  [    2.701521] of_irq_parse_raw:  /interrupt-controller at 00a01000:00000000,00000077,00000004
  [    2.732258] fec 2188000.ethernet (unnamed net_device) (uninitialized): MDIO read timeout
  [    2.740859] fec: probe of 2188000.ethernet failed with error -5

2. PHY init is OK, but MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 is not being used as IRQ:

  interrupts-extended = <&gpio1 30 IRQ_TYPE_LEVEL_LOW>, <&intc 0 118 IRQ_TYPE_LEVEL_HIGH>;

  [    2.685479] of_irq_parse_raw:  /soc/aips-bus at 02000000/gpio at 0209c000:0000001e,00000008
  [    2.701440] of_irq_parse_raw:  /interrupt-controller at 00a01000:00000000,00000076,00000004
  [    2.714595] libphy: fec_enet_mii_bus: probed
  [    2.719674] fec 2188000.ethernet eth0: registered PHC device 0

  root at OpenWrt:/# cat /proc/interrupts | grep ethernet
   65:          0          0          0          0  gpio-mxc  30 Level     2188000.ethernet
  288:       7513          0          0          0       GIC 150 Level     2188000.ethernet

I've to look into it deeper next week. Thanks!

-- ynezz

  reply	other threads:[~2015-11-28 19:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19 12:24 [PATCH 0/2] ARM: dts: imx6: Add support for Toradex Apalis SoM/Ixora Petr Štetiar
2015-11-19 12:24 ` [PATCH 1/2] ARM: dts: imx6: Add support for Toradex Apalis SoM Petr Štetiar
2015-11-19 14:12   ` Lucas Stach
2015-11-19 16:59     ` Joshua Clayton
2015-11-19 17:03       ` Fabio Estevam
2015-11-20 10:40       ` Petr Štetiar
2015-11-20 17:09         ` Joshua Clayton
2015-11-26 10:17     ` Petr Štetiar
2015-11-27 20:02       ` Stefan Agner
2015-11-28 19:38         ` Petr Štetiar [this message]
2015-11-27 19:38     ` Stefan Agner
2015-11-28 19:47       ` Petr Štetiar
2015-11-30 10:16       ` Lucas Stach
2015-11-19 12:25 ` [PATCH 2/2] ARM: dts: imx6: Add support for Toradex Apalis Ixora board Petr Štetiar

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=20151128193824.GN19674@ibawizard.net \
    --to=ynezz@true.cz \
    --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).