Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21BBCC07E95 for ; Wed, 7 Jul 2021 12:59:14 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8E12061CB9 for ; Wed, 7 Jul 2021 12:59:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E12061CB9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=phytec.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B727D82E06; Wed, 7 Jul 2021 14:58:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=phytec.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=phytec.de header.i=@phytec.de header.b="jLbt/xGv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 75A0E82E2B; Wed, 7 Jul 2021 14:58:18 +0200 (CEST) Received: from mickerik.phytec.de (mickerik.phytec.de [195.145.39.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 11F9C82E08 for ; Wed, 7 Jul 2021 14:58:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=phytec.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=t.remmet@phytec.de DKIM-Signature: v=1; a=rsa-sha256; d=phytec.de; s=a4; c=relaxed/simple; q=dns/txt; i=@phytec.de; t=1625662686; x=1628254686; h=From:Sender:Reply-To:Subject:Date:Message-Id:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xs+Qzk4vdIjs9z9S20lZIwdZD07wcCBuRgvKxOJgrBc=; b=jLbt/xGvUGCTbrXmwP3MUtGJHmH6brc5Q74gTWbhDWSpZ83FCu5cw+HhR8Idkbri ROMvM5dTGSuMjNOFZZJVA9tmWWAy9ozoEUZHQRe4T1JOk5easZhpepRd+Cq7Wj0O elawebk4hTZNjlDh19qd/kBAeheD/yFJ6Z6OB1BYSys=; X-AuditID: c39127d2-1e4f970000001daf-f5-60e5a4dd46fa Received: from idefix.phytec.de (Unknown_Domain [172.16.0.10]) by mickerik.phytec.de (PHYTEC Mail Gateway) with SMTP id 9C.71.07599.DD4A5E06; Wed, 7 Jul 2021 14:58:05 +0200 (CEST) Received: from augenblix3.phytec.de ([172.16.0.233]) by idefix.phytec.de (IBM Domino Release 9.0.1FP7) with ESMTP id 2021070714580564-1108504 ; Wed, 7 Jul 2021 14:58:05 +0200 From: Teresa Remmet To: u-boot@lists.denx.de Cc: Stefano Babic , Fabio Estevam , "NXP i . MX U-Boot Team" , Peng Fan , Jagan Teki , Heiko Schocher Subject: [PATCH v3 5/9] board: phytec: phycore_imx8mp: Add fec support Date: Wed, 7 Jul 2021 12:58:00 +0000 Message-Id: <20210707125804.3010652-6-t.remmet@phytec.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210707125804.3010652-1-t.remmet@phytec.de> References: <20210707125804.3010652-1-t.remmet@phytec.de> MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on Idefix/Phytec(Release 9.0.1FP7|August 17, 2016) at 07.07.2021 14:58:05, Serialize by Router on Idefix/Phytec(Release 9.0.1FP7|August 17, 2016) at 07.07.2021 14:58:05 X-TNEFEvaluated: 1 Content-Transfer-Encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrPLMWRmVeSWpSXmKPExsWyRoCBS/fukqcJBl9O21g8vOpvsePOfWaL L5smsFn8WPWF1aL9lI/F272d7BZTHq9nd2D3WPvxPqvHvFknWDx2zrrL7nH2zg5Gj43vdjAF sEZx2aSk5mSWpRbp2yVwZbR0dTEXnJWpuHnsHFMD4zyJLkZODgkBE4m302cydzFycQgJbGOU 6O7eB+VcYJQ42PySEaSKTUBD4umK00wgtoiAhMSv/quMIEXMAtcZJSavPwGWEBZwk1iz/AdL FyMHB4uAisSMmWYgYV4BS4l7rWfYILbJS8y89J0dxOYUsJLYe+IemC0EVHNz+gdWiHpBiZMz n7CAzJcQuMIo8ebyUWaIZiGJ04vPgtnMAtoSyxa+Zp7AKDALSc8sJKkFjEyrGIVyM5OzU4sy s/UKMipLUpP1UlI3MQID+fBE9Us7GPvmeBxiZOJgPMQowcGsJMLL6PA0QYg3JbGyKrUoP76o NCe1+BCjNAeLkjjvBt6SMCGB9MSS1OzU1ILUIpgsEwenVAPjhLhJs9IqS5f0futebFf7p0BP OmJr7qx+zeU72aZytWVckX0y6ZTazAe/6sLmuRfIzJhudvHIoUtWFbND1yd/O7K7l12wNZNt u9sHk/3rlIUXzqg7sb+HTTMqaELlWXnBWUXrF619zFmZu+We7Yu6U9dn8xZ6eJ6onbrO9uSv E9M8JjU+vdxkocRSnJFoqMVcVJwIAKfhoKhSAgAA X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Enable support for the fec ethernet on phyCORE-i.MX8MP. Signed-off-by: Teresa Remmet Reviewed-by: Fabio Estevam Reviewed-by: Heiko Schocher --- Changes in v3: - none Changes in v2: - removed hardcoded serverip in environment - removed not needed fec eth defines in board config include board/phytec/phycore=5Fimx8mp/phycore-imx8mp.c | 14 ++++++++++++++ configs/phycore-imx8mp=5Fdefconfig | 7 +++++++ include/configs/phycore=5Fimx8mp.h | 17 +++++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/board/phytec/phycore=5Fimx8mp/phycore-imx8mp.c b/board/phytec/= phycore=5Fimx8mp/phycore-imx8mp.c index 67649078c201..a8f082143762 100644 --- a/board/phytec/phycore=5Fimx8mp/phycore-imx8mp.c +++ b/board/phytec/phycore=5Fimx8mp/phycore-imx8mp.c @@ -10,11 +10,25 @@ #include #include #include +#include =20 DECLARE=5FGLOBAL=5FDATA=5FPTR; =20 +static int setup=5Ffec(void) +{ + struct iomuxc=5Fgpr=5Fbase=5Fregs *gpr =3D + (struct iomuxc=5Fgpr=5Fbase=5Fregs *)IOMUXC=5FGPR=5FBASE=5FADDR; + + /* Use 125M anatop REF=5FCLK1 for ENET1, not from external */ + clrsetbits=5Fle32(&gpr->gpr[1], 0x2000, 0); + + return 0; +} + int board=5Finit(void) { + setup=5Ffec(); + return 0; } =20 diff --git a/configs/phycore-imx8mp=5Fdefconfig b/configs/phycore-imx8mp=5F= defconfig index 7f21e8888e0e..a22f5e089d97 100644 --- a/configs/phycore-imx8mp=5Fdefconfig +++ b/configs/phycore-imx8mp=5Fdefconfig @@ -58,6 +58,7 @@ CONFIG=5FENV=5FIS=5FIN=5FMMC=3Dy CONFIG=5FSYS=5FRELOC=5FGD=5FENV=5FADDR=3Dy CONFIG=5FSYS=5FMMC=5FENV=5FDEV=3D2 CONFIG=5FENV=5FVARS=5FUBOOT=5FRUNTIME=5FCONFIG=3Dy +CONFIG=5FNET=5FRANDOM=5FETHADDR=3Dy CONFIG=5FSPL=5FDM=3Dy CONFIG=5FCLK=5FCOMPOSITE=5FCCF=3Dy CONFIG=5FCLK=5FIMX8MP=3Dy @@ -79,7 +80,13 @@ CONFIG=5FMMC=5FUHS=5FSUPPORT=3Dy CONFIG=5FMMC=5FHS400=5FES=5FSUPPORT=3Dy CONFIG=5FMMC=5FHS400=5FSUPPORT=3Dy CONFIG=5FFSL=5FESDHC=5FIMX=3Dy +CONFIG=5FPHYLIB=3Dy +CONFIG=5FPHY=5FTI=5FDP83867=3Dy CONFIG=5FDM=5FETH=3Dy +CONFIG=5FDM=5FETH=5FPHY=3Dy +CONFIG=5FFEC=5FMXC=3Dy +CONFIG=5FRGMII=3Dy +CONFIG=5FMII=3Dy CONFIG=5FPINCTRL=3Dy CONFIG=5FSPL=5FPINCTRL=3Dy CONFIG=5FPINCTRL=5FIMX8M=3Dy diff --git a/include/configs/phycore=5Fimx8mp.h b/include/configs/phycore= =5Fimx8mp.h index e24f223c21d3..75f84e60f5da 100644 --- a/include/configs/phycore=5Fimx8mp.h +++ b/include/configs/phycore=5Fimx8mp.h @@ -42,6 +42,7 @@ "console=3Dttymxc0,115200\0" \ "fdt=5Faddr=3D0x48000000\0" \ "fdt=5Ffile=3D" CONFIG=5FDEFAULT=5FFDT=5FFILE "\0" \ + "ip=5Fdyn=3Dyes\0" \ "mmcdev=3D" =5F=5Fstringify(CONFIG=5FSYS=5FMMC=5FENV=5FDEV) "\0" \ "mmcpart=3D" =5F=5Fstringify(CONFIG=5FSYS=5FMMC=5FIMG=5FLOAD=5FPART) "\0"= \ "mmcroot=3D2\0" \ @@ -57,6 +58,22 @@ "else " \ "echo WARN: Cannot load the DT; " \ "fi;\0 " \ + "nfsroot=3D/nfs\0" \ + "netargs=3Dsetenv bootargs console=3D${console} root=3D/dev/nfs ip=3Ddhcp= " \ + "nfsroot=3D${serverip}:${nfsroot},v3,tcp\0" \ + "netboot=3Decho Booting from net ...; " \ + "run netargs; " \ + "if test ${ip=5Fdyn} =3D yes; then " \ + "setenv get=5Fcmd dhcp; " \ + "else " \ + "setenv get=5Fcmd tftp; " \ + "fi; " \ + "${get=5Fcmd} ${loadaddr} ${image}; " \ + "if ${get=5Fcmd} ${fdt=5Faddr} ${fdt=5Ffile}; then " \ + "booti ${loadaddr} - ${fdt=5Faddr}; " \ + "else " \ + "echo WARN: Cannot load the DT; " \ + "fi;\0" \ =20 #define CONFIG=5FBOOTCOMMAND \ "mmc dev ${mmcdev}; if mmc rescan; then " \ --=20 2.25.1