From patchwork Fri Sep 28 09:36:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 187747 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (unknown [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6A4B72C00C3 for ; Fri, 28 Sep 2012 19:39:21 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1THWzu-0002nu-Bp; Fri, 28 Sep 2012 09:36:38 +0000 Received: from mail.free-electrons.com ([88.190.12.23]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1THWzq-0002ng-Rj for linux-arm-kernel@lists.infradead.org; Fri, 28 Sep 2012 09:36:35 +0000 Received: by mail.free-electrons.com (Postfix, from userid 106) id 2FD041BE; Fri, 28 Sep 2012 11:36:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham version=3.3.1 Received: from localhost (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id 5BD33C2; Fri, 28 Sep 2012 11:36:19 +0200 (CEST) From: Maxime Ripard To: shawn.guo@linaro.org Subject: [PATCH] ARM: dts: cfa10049: Add FEC to the CFA-10049 expansion board Date: Fri, 28 Sep 2012 11:36:18 +0200 Message-Id: <1348824978-25340-1-git-send-email-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 1.7.9.5 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: brian@crystalfontz.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/imx28-cfa10049.dts | 11 +++++++++++ arch/arm/mach-mxs/mach-mxs.c | 14 ++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/arch/arm/boot/dts/imx28-cfa10049.dts b/arch/arm/boot/dts/imx28-cfa10049.dts index d91d16c..97ee098 100644 --- a/arch/arm/boot/dts/imx28-cfa10049.dts +++ b/arch/arm/boot/dts/imx28-cfa10049.dts @@ -102,4 +102,15 @@ gpio = <&gpio0 7 1>; }; }; + + ahb@80080000 { + mac0: ethernet@800f0000 { + phy-mode = "rmii"; + pinctrl-names = "default"; + pinctrl-0 = <&mac0_pins_a>; + phy-reset-gpios = <&gpio2 21 0>; + phy-reset-duration = <100>; + status = "okay"; + }; + }; }; diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 8dabfe8..65b8fbb 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -157,6 +157,7 @@ static struct sys_timer imx28_timer = { enum mac_oui { OUI_FSL, OUI_DENX, + OUI_CRYSTALFONTZ, }; static void __init update_fec_mac_prop(enum mac_oui oui) @@ -202,6 +203,11 @@ static void __init update_fec_mac_prop(enum mac_oui oui) macaddr[1] = 0xe5; macaddr[2] = 0x4e; break; + case OUI_CRYSTALFONTZ: + macaddr[0] = 0x58; + macaddr[1] = 0xb9; + macaddr[2] = 0xe1; + break; } val = ocotp[i]; macaddr[3] = (val >> 16) & 0xff; @@ -270,6 +276,12 @@ static void __init apx4devkit_init(void) mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT; } +static void __init cfa10049_init(void) +{ + enable_clk_enet_out(); + update_fec_mac_prop(OUI_CRYSTALFONTZ); +} + static void __init mxs_machine_init(void) { if (of_machine_is_compatible("fsl,imx28-evk")) @@ -280,6 +292,8 @@ static void __init mxs_machine_init(void) m28evk_init(); else if (of_machine_is_compatible("bluegiga,apx4devkit")) apx4devkit_init(); + else if (of_machine_is_compatible("crystalfontz,cfa10049")) + cfa10049_init(); of_platform_populate(NULL, of_default_bus_match_table, mxs_auxdata_lookup, NULL);