From patchwork Mon Sep 21 14:53:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mugunthan V N X-Patchwork-Id: 7231951 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E22EEBEEC1 for ; Mon, 21 Sep 2015 14:54:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E9C572071C for ; Mon, 21 Sep 2015 14:54:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0039F20718 for ; Mon, 21 Sep 2015 14:54:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756391AbbIUOyZ (ORCPT ); Mon, 21 Sep 2015 10:54:25 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:42667 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752857AbbIUOyY (ORCPT ); Mon, 21 Sep 2015 10:54:24 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id t8LEsLh2018468; Mon, 21 Sep 2015 09:54:22 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8LEsLVr019341; Mon, 21 Sep 2015 09:54:21 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.224.2; Mon, 21 Sep 2015 09:54:21 -0500 Received: from mugunthan-pc.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8LEsJ8E025403; Mon, 21 Sep 2015 09:54:20 -0500 From: Mugunthan V N To: CC: , Tony Lindgren , Sekhar Nori , Mugunthan V N Subject: [PATCH v2 1/1] ARM: DTS: dra72-evm: remove cpsw gpio hogging and add mode-gpios Date: Mon, 21 Sep 2015 20:23:51 +0530 Message-ID: <1442847231-23637-1-git-send-email-mugunthanvnm@ti.com> X-Mailer: git-send-email 2.6.0.rc2.10.gf4d9753 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With the current implementation of GPIO hogging and with gpio-pcf857x is built as module, ethernet doesn't work on boot and doesn't throw any error/warning to user. Ethernet becomes operational when inserting gpio-pcf857x module, even this time there is no error/warning logs to user that ethernet is operational. When using with NFS rootfs and gpio-pcf857x as module, board doesn't boot as it doesn't get any ip address and doesn't throw any error/warning. To over come this, now cpsw driver tries to get mode-gpios. When gpio-pcf857x is built as module it will throw error, so that user can decide either to built in gpio-pcf857x to continue with nfs boot or choose alternate rootfs filesystem like sd/ramdisk. When using mmc/ramdisk as root fs, cpsw will probe defer and re-probes again when gpio-pcf857x module is inserted and ethernet becomes operational. Signed-off-by: Mugunthan V N --- The driver patch is applied to net-next branch (also present in linux-next) with commit: '1d147ccbfc35 ("drivers: net: cpsw: Add support to drive gpios for ethernet to be functional") Tested on DRA72x EVM, logs [1] and pushed a branch [2] for testing [1]: http://pastebin.ubuntu.com/12514591/ [2]: git://git.ti.com/~mugunthanvnm/ti-linux-kernel/linux.git cpsw-mode-gpios-dt Changes from initial version: * Modified the commit message to add more information --- arch/arm/boot/dts/dra72-evm.dts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/dra72-evm.dts b/arch/arm/boot/dts/dra72-evm.dts index 6f6bd98..a12c6f4 100644 --- a/arch/arm/boot/dts/dra72-evm.dts +++ b/arch/arm/boot/dts/dra72-evm.dts @@ -353,12 +353,6 @@ interrupts = <11 IRQ_TYPE_EDGE_FALLING>; interrupt-controller; #interrupt-cells = <2>; - - cpsw_sel_s0 { - gpio-hog; - gpios = <4 GPIO_ACTIVE_HIGH>; - output-low; - }; }; }; @@ -590,6 +584,7 @@ pinctrl-0 = <&cpsw_default>; pinctrl-1 = <&cpsw_sleep>; slaves = <1>; + mode-gpios = <&pcf_gpio_21 4 GPIO_ACTIVE_HIGH>; }; &cpsw_emac0 {