From patchwork Fri Jul 5 15:26:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2824269 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 278C2BF4A1 for ; Fri, 5 Jul 2013 15:26:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2163A20178 for ; Fri, 5 Jul 2013 15:26:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3120D2016C for ; Fri, 5 Jul 2013 15:26:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757398Ab3GEP0u (ORCPT ); Fri, 5 Jul 2013 11:26:50 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:52942 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757399Ab3GEP0s (ORCPT ); Fri, 5 Jul 2013 11:26:48 -0400 Received: from axis700.grange (dslb-178-001-146-173.pools.arcor-ip.net [178.1.146.173]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0Lf0ON-1UR0H21LEF-00qDEC; Fri, 05 Jul 2013 17:26:47 +0200 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id EA60340BB7; Fri, 5 Jul 2013 17:26:46 +0200 (CEST) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1Uv7uI-0005Cm-SH; Fri, 05 Jul 2013 17:26:46 +0200 From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org Cc: Magnus Damm , Simon Horman , Guennadi Liakhovetski Subject: [PATCH/RFC v2 4/4] ARM: shmobile: APE6EVM-reference: add ethernet support Date: Fri, 5 Jul 2013 17:26:46 +0200 Message-Id: <1373038006-19973-5-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1373038006-19973-1-git-send-email-g.liakhovetski@gmx.de> References: <1373038006-19973-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:oJ2g+qtqsWjpfgr//3UBClCqTHI/FZU/ypGc2xKSF8W bShIO8pLALkCRRyYpjqdPc8lIFZ7Ew0JaFyhlFrTPtoaiEq3oO Hsz1z4RSMV/UWYHZ2TfP+79a1I4ktLU3P4V5mkSxCCxrgAnSu5 iJ326/1F5wj+fa3qdA4CE2jJBKxunKamwxveE2amfV0Jwcj52m ZhZVWlZ7tRLOpE3u2pW8PDfF9WrImonotX872tk0Y/xtgvn5jR pBJ8tPUn+T3VLR3rRJZGJuPd2elAzyXgNCbFHkKawxTNVxZUBw LkC9Go/PNPZ3THLWaoIIwApB9VKZ2dyAfJMNU0Ul6LwnTXYwHy aiNBnhmLYAebKC71RJBv9+4J9lEfViT23SDurnfDXOC/goblPr dQpNaR0UjpJTA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Add SMSC9220 support to APE6EVM-reference. Since pinctrl configuration is not yet available in DT, temporarily add pin configuration in C. Similarly PHY reset has to be done in C. Signed-off-by: Guennadi Liakhovetski --- Marked "RFC," because it configures pinmux and requests a GPIO in C. If undesired this patch can just be left out until DT pinctrl configuration is available on mach-shmobile. arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts | 21 +++++++++++++++++++++ arch/arm/mach-shmobile/board-ape6evm-reference.c | 6 ++++++ 2 files changed, 27 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts b/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts index aa84b09..ea386fe 100644 --- a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts +++ b/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts @@ -24,11 +24,32 @@ reg = <0 0x40000000 0 0x40000000>; }; + ape6evm_fixed_3v3: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + lbsc { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; ranges = <0 0 0 0x80000000>; + + ethernet@8000000 { + compatible = "smsc,lan9118", "smsc,lan9115"; + reg = <0x08000000 0x1000>; + interrupt-parent = <&irqc1>; + interrupts = <8 0x4>; + phy-mode = "mii"; + reg-io-width = <4>; + smsc,irq-active-high; + smsc,irq-push-pull; + vdd33a-supply = <&ape6evm_fixed_3v3>; + vddvario-supply = <&ape6evm_fixed_3v3>; + }; }; }; diff --git a/arch/arm/mach-shmobile/board-ape6evm-reference.c b/arch/arm/mach-shmobile/board-ape6evm-reference.c index ee9f75d..909c1bc 100644 --- a/arch/arm/mach-shmobile/board-ape6evm-reference.c +++ b/arch/arm/mach-shmobile/board-ape6evm-reference.c @@ -32,6 +32,9 @@ static const struct pinctrl_map ape6evm_pinctrl_map[] = { /* SCIFA0 console */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a73a4", "scifa0_data", "scifa0"), + /* SMSC */ + PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a73a4", + "irqc_irq40", "irqc"), }; static void __init ape6evm_add_standard_devices(void) @@ -57,6 +60,9 @@ static void __init ape6evm_add_standard_devices(void) r8a73a4_add_aux_devices_dt(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); r8a73a4_add_cpufreq_device_dt(); + + /* LAN9220 ethernet */ + gpio_request_one(270, GPIOF_OUT_INIT_HIGH, NULL); /* smsc9220 RESET */ } static const char *ape6evm_boards_compat_dt[] __initdata = {