From patchwork Fri Nov 15 20:16:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Emilio_L=C3=B3pez?= X-Patchwork-Id: 3189631 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6EF609F3AE for ; Fri, 15 Nov 2013 20:18:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 84C4820944 for ; Fri, 15 Nov 2013 20:18:14 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6DC2A20937 for ; Fri, 15 Nov 2013 20:18:13 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VhPpr-0002s6-G0; Fri, 15 Nov 2013 20:17:47 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VhPpg-0006vQ-6k; Fri, 15 Nov 2013 20:17:36 +0000 Received: from zetta.elopez.com.ar ([199.30.59.35]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VhPpX-0006u4-O8 for linux-arm-kernel@lists.infradead.org; Fri, 15 Nov 2013 20:17:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=elopez.com.ar; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From; bh=guyZ6SNmqSdx0Rlx51HFP6MHQJfYCmpfZmGVBU9W8ho=; b=eyFd5oN7GaXzZKgd7mhfBgnerrYpQwrtYi8H5OU1toiOMiJh3Nl2IwtAfgt9QItKxCiv5F7mUDdCQ3tusLotigYaBbCdcQlIuKpJAnOjraiIz4rDZM4bQIOYPTAHuMs+yVuzt9qmb/hk6YWF7Oz6obbGZKokXHCNcxytBINgKvblzcnO3suuxUkGfA9iLbPo5QeQpv4GIoIszgqIJDfvNxtha0KNDzzLm8ifYUXt3mr+RerRVD3DXcwUbe2L7MBnJ44p0g5ES2W1Px6D49Ezq22wmk/ZDirK6SdSnqfAt/1jH2Rk+iSexaNMIHGprrc8vwDOIblgQusjsTRZ3bVyag==; Received: from [181.164.111.231] (helo=desktop.lan) by zetta.elopez.com.ar with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) id 1VhPp8-0007wQ-3a; Fri, 15 Nov 2013 17:17:02 -0300 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= To: Maxime Ripard , Olof Johansson Subject: [PATCH] ARM: sunxi: dt: add EMAC aliases Date: Fri, 15 Nov 2013 17:16:40 -0300 Message-Id: <1384546600-14384-1-git-send-email-emilio@elopez.com.ar> X-Mailer: git-send-email 1.8.4.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131115_151727_931687_1B1CDE96 X-CRM114-Status: GOOD ( 12.92 ) X-Spam-Score: -2.0 (--) Cc: =?UTF-8?q?Emilio=20L=C3=B3pez?= , slapinid@gmail.com, hramrach@gmail.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 U-Boot uses the ethernet0 alias to locate the right node to fill in the MAC address of the first ethernet interface. This patch adds the alias on all the sunxi boards with EMAC and an ethernet port. In this way, people using ethernet in U-Boot (eg, for tftp) can keep a consistent address on both U-Boot and Linux with no additional effort. Signed-off-by: Emilio López --- Hi everyone, I have tested this on a cubieboard2 and found it to work as intended, and I don't see why it wouldn't work on the other boards, given that the U-Boot codebase is shared. It may be worth submitting this for 3.13-rc0, but I'm not the one that has to make that call :) Cheers, Emilio arch/arm/boot/dts/sun4i-a10-a1000.dts | 1 + arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 1 + arch/arm/boot/dts/sun4i-a10-hackberry.dts | 4 ++++ arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 4 ++++ arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 4 ++++ arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 4 ++++ 6 files changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/sun4i-a10-a1000.dts b/arch/arm/boot/dts/sun4i-a10-a1000.dts index eb4d73b..6e56986 100644 --- a/arch/arm/boot/dts/sun4i-a10-a1000.dts +++ b/arch/arm/boot/dts/sun4i-a10-a1000.dts @@ -20,6 +20,7 @@ aliases { serial0 = &uart0; + ethernet0 = &emac; }; soc@01c00000 { diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts index 425a7db..c2e251d 100644 --- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts +++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts @@ -20,6 +20,7 @@ aliases { serial0 = &uart0; serial1 = &uart1; + ethernet0 = &emac; }; chosen { diff --git a/arch/arm/boot/dts/sun4i-a10-hackberry.dts b/arch/arm/boot/dts/sun4i-a10-hackberry.dts index b3ae51f..551ccbd 100644 --- a/arch/arm/boot/dts/sun4i-a10-hackberry.dts +++ b/arch/arm/boot/dts/sun4i-a10-hackberry.dts @@ -18,6 +18,10 @@ model = "Miniand Hackberry"; compatible = "miniand,hackberry", "allwinner,sun4i-a10"; + aliases { + ethernet0 = &emac; + }; + chosen { bootargs = "earlyprintk console=ttyS0,115200"; }; diff --git a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts index 88ec795..bb48737 100644 --- a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts +++ b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts @@ -18,6 +18,10 @@ model = "Olimex A10s-Olinuxino Micro"; compatible = "olimex,a10s-olinuxino-micro", "allwinner,sun5i-a10s"; + aliases { + ethernet0 = &emac; + }; + soc@01c00000 { emac: ethernet@01c0b000 { pinctrl-names = "default"; diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts index 15e625e..cad4c19 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts @@ -18,6 +18,10 @@ model = "Cubietech Cubieboard2"; compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20"; + aliases { + ethernet0 = &emac; + }; + soc@01c00000 { emac: ethernet@01c0b000 { pinctrl-names = "default"; diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts index 9e77855..39e1fd0 100644 --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts @@ -18,6 +18,10 @@ model = "Olimex A20-Olinuxino Micro"; compatible = "olimex,a20-olinuxino-micro", "allwinner,sun7i-a20"; + aliases { + ethernet0 = &emac; + }; + soc@01c00000 { emac: ethernet@01c0b000 { pinctrl-names = "default";