From patchwork Wed Apr 10 17:31:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hunter, Jon" X-Patchwork-Id: 2422461 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id A21C03FCA5 for ; Wed, 10 Apr 2013 17:31:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936549Ab3DJRbM (ORCPT ); Wed, 10 Apr 2013 13:31:12 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:49771 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932803Ab3DJRbJ (ORCPT ); Wed, 10 Apr 2013 13:31:09 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r3AHV8qb023729; Wed, 10 Apr 2013 12:31:08 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r3AHV8GH031432; Wed, 10 Apr 2013 12:31:08 -0500 Received: from [192.157.144.139] (192.157.144.139) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Wed, 10 Apr 2013 12:31:07 -0500 Message-ID: <5165A1DB.3020404@ti.com> Date: Wed, 10 Apr 2013 12:31:07 -0500 From: Jon Hunter User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Tony Lindgren CC: , "Cousson, Benoit" Subject: Re: 4430sdp nfsroot broken with ff5c9059 References: <20130409212318.GR10155@atomide.com> In-Reply-To: <20130409212318.GR10155@atomide.com> X-Originating-IP: [192.157.144.139] Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Hi Tony, On 04/09/2013 04:23 PM, Tony Lindgren wrote: > Hi Jon, > > Looks like at least 4430sdp nfsroot got broken with commit > ff5c9059 (ARM: dts: OMAP3+: Correct gpio #interrupts-cells > property). Thanks for reporting. I am actually amazed that ethernet is working on any OMAP board (with device-tree) that requires a gpio as an interrupt because we have still not come to an agreement on [1]. Looking at the OMAP4 SDP I believe this is working by luck because there are other gpios in the same bank that are active and so the bank is enabled. If that were not the case then this would not work. Hence, I have not been testing ethernet when booting with device-tree because we need to fix [1] which has been really crippling my testing. So this needs to be resolved so ethernet can work consistently on all omap boards. > Do we need to pass the GPIO edge/level info now? Yes and here is a patch. I have tested on my OMAP4 SDP this morning. Reviewing all the OMAP/AM dts(i) files I believe that only the SDP and OMAP4-VAR-SOM are impacted by this. I don't see any other boards currently using the gpio as an interrupt-controller. Cheers Jon [1] comments.gmane.org/gmane.linux.ports.arm.omap/92192 From ed3e66bcd4c0cb3df4cb70e75c45fa4462f70565 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Wed, 10 Apr 2013 11:44:44 -0500 Subject: [PATCH] ARM: dts: OMAP4: Fix ethernet IRQ for OMAP4 boards Commit ff5c9059 (ARM: dts: OMAP3+: Correct gpio #interrupts-cells property) updated the number of interrupt cells required for configuring gpios as interrupts for other devices (such as ethernet controllers). This update allowed the interrupt type (edge, level, etc) to be configured via device-tree (as described in the Documentation/devicetree/bindings/gpio/gpio-omap.txt). This broke ethernet support on the OMAP4 SDP board that defines a gpio as the ethernet IRQ because the interrupt type (level, edge, etc) was not getting configured correctly. This board use the ks8851 ethernet chip which has an active low interrupt. Fix this by defining the gpio interrupt as active-low in the device-tree binding. Please note that the OMAP4-VAR-SOM also uses the same ethernet controller and it is expected it will have the same problem. So the same fix is also applied to this board. Signed-off-by: Jon Hunter --- arch/arm/boot/dts/omap4-sdp.dts | 2 +- arch/arm/boot/dts/omap4-var-som.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts index c387bdc..25cbe43 100644 --- a/arch/arm/boot/dts/omap4-sdp.dts +++ b/arch/arm/boot/dts/omap4-sdp.dts @@ -363,7 +363,7 @@ spi-max-frequency = <24000000>; reg = <0>; interrupt-parent = <&gpio2>; - interrupts = <2>; /* gpio line 34 */ + interrupts = <2 8>; /* gpio line 34, low triggered */ vdd-supply = <&vdd_eth>; }; }; diff --git a/arch/arm/boot/dts/omap4-var-som.dts b/arch/arm/boot/dts/omap4-var-som.dts index 222a413..7e04103 100644 --- a/arch/arm/boot/dts/omap4-var-som.dts +++ b/arch/arm/boot/dts/omap4-var-som.dts @@ -68,7 +68,7 @@ spi-max-frequency = <24000000>; reg = <0>; interrupt-parent = <&gpio6>; - interrupts = <11>; /* gpio line 171 */ + interrupts = <11 8>; /* gpio line 171, low triggered */ vdd-supply = <&vdd_eth>; }; };