From patchwork Mon May 30 14:54:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wills Wang X-Patchwork-Id: 627846 X-Patchwork-Delegate: daniel.schwierzeck@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3rJKS36mW6z9t3q for ; Tue, 31 May 2016 00:55:47 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1F60AA7527; Mon, 30 May 2016 16:55:46 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q2yPGfAcv9hJ; Mon, 30 May 2016 16:55:45 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EA069A7629; Mon, 30 May 2016 16:55:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7AE2AA7629 for ; Mon, 30 May 2016 16:55:40 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5ANalrKRngzS for ; Mon, 30 May 2016 16:55:40 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from BLU004-OMC1S4.hotmail.com (blu004-omc1s4.hotmail.com [65.55.116.15]) by theia.denx.de (Postfix) with ESMTPS id 69A46A7641 for ; Mon, 30 May 2016 16:55:30 +0200 (CEST) Received: from BLU436-SMTP240 ([65.55.116.7]) by BLU004-OMC1S4.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Mon, 30 May 2016 07:55:29 -0700 X-TMN: [5N3nK5xn3S+pqP9cOy1Bb8LpKw1chDEG] X-Originating-Email: [wills.wang@live.com] Message-ID: From: Wills Wang To: u-boot@lists.denx.de Date: Mon, 30 May 2016 22:54:51 +0800 X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464620095-4333-1-git-send-email-wills.wang@live.com> References: <1464620095-4333-1-git-send-email-wills.wang@live.com> X-OriginalArrivalTime: 30 May 2016 14:55:27.0215 (UTC) FILETIME=[4D6127F0:01D1BA83] MIME-Version: 1.0 Cc: Marek Vasut Subject: [U-Boot] [PATCH 2/6] mips: ath79: ap121: Enable ethernet X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch enable network function for ap121 board. Signed-off-by: Wills Wang Acked-by: Marek Vasut --- arch/mips/dts/ap121.dts | 5 +++++ arch/mips/dts/ar933x.dtsi | 4 ++-- board/qca/ap121/ap121.c | 2 ++ configs/ap121_defconfig | 9 +++++++-- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/arch/mips/dts/ap121.dts b/arch/mips/dts/ap121.dts index e31f601..a934a58 100644 --- a/arch/mips/dts/ap121.dts +++ b/arch/mips/dts/ap121.dts @@ -41,3 +41,8 @@ reg = <0>; }; }; + +&gmac0 { + phy-mode = "rmii"; + status = "okay"; +}; diff --git a/arch/mips/dts/ar933x.dtsi b/arch/mips/dts/ar933x.dtsi index 00896b2..971f13e 100644 --- a/arch/mips/dts/ar933x.dtsi +++ b/arch/mips/dts/ar933x.dtsi @@ -75,7 +75,7 @@ }; gmac0: eth@0x19000000 { - compatible = "qca,ag7240-mac"; + compatible = "qca,ag933x-mac"; reg = <0x19000000 0x200>; phy = <&phy0>; phy-mode = "rmii"; @@ -92,7 +92,7 @@ }; gmac1: eth@0x1a000000 { - compatible = "qca,ag7240-mac"; + compatible = "qca,ag933x-mac"; reg = <0x1a000000 0x200>; phy = <&phy0>; phy-mode = "rgmii"; diff --git a/board/qca/ap121/ap121.c b/board/qca/ap121/ap121.c index d6c60fe..e245faa 100644 --- a/board/qca/ap121/ap121.c +++ b/board/qca/ap121/ap121.c @@ -10,6 +10,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -46,5 +47,6 @@ int board_early_init_f(void) debug_uart_init(); #endif ddr_init(); + ath79_eth_reset(); return 0; } diff --git a/configs/ap121_defconfig b/configs/ap121_defconfig index 7604e2e..91fa734 100644 --- a/configs/ap121_defconfig +++ b/configs/ap121_defconfig @@ -19,8 +19,13 @@ CONFIG_SYS_PROMPT="ap121 # " CONFIG_CMD_SF=y CONFIG_CMD_SPI=y # CONFIG_CMD_FPGA is not set -# CONFIG_CMD_NET is not set -# CONFIG_CMD_NFS is not set +CONFIG_CMD_NET=y +CONFIG_CMD_NFS=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_PING=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_DM_ETH=y +CONFIG_AG7XXX=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_BAR=y CONFIG_SPI_FLASH_ATMEL=y