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,URIBL_BLOCKED,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 13059C11F68 for ; Fri, 2 Jul 2021 11:20:53 +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 5C4CF613F7 for ; Fri, 2 Jul 2021 11:20:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C4CF613F7 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 62C9282903; Fri, 2 Jul 2021 13:20:21 +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="hmWvaEhS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 19169829B9; Fri, 2 Jul 2021 13:20:06 +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 D625C82824 for ; Fri, 2 Jul 2021 13:19:49 +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=1625224789; x=1627816789; 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=SGSY+hfhDXquNTIhR1E/RlHlItnAxge7UNTWWpfcjj8=; b=hmWvaEhSAjY0/s6vyGQyV0EXMFT/Yo9/j9lFvjnDewVDmGY2AlW29SodVFycz+Q7 owVBrLZR0QXuJtVRuI4aYXXMA/uwChNTmQcz6gigvd3IpVnFjOcfT2/Q1OWrZavY OuGuE6zU9EqNR9XIke2YrrmsmI66HMQb+Ti0x1eZDwU=; X-AuditID: c39127d2-a9fbd70000001c5e-8b-60def655946b Received: from idefix.phytec.de (Unknown_Domain [172.16.0.10]) by mickerik.phytec.de (PHYTEC Mail Gateway) with SMTP id D5.B1.07262.556FED06; Fri, 2 Jul 2021 13:19:49 +0200 (CEST) Received: from augenblix3.phytec.de ([172.16.0.233]) by idefix.phytec.de (IBM Domino Release 9.0.1FP7) with ESMTP id 2021070213194947-1081545 ; Fri, 2 Jul 2021 13:19:49 +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 v2 5/9] board: phytec: phycore_imx8mp: Add fec support Date: Fri, 2 Jul 2021 11:19:44 +0000 Message-Id: <20210702111948.2197868-6-t.remmet@phytec.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210702111948.2197868-1-t.remmet@phytec.de> References: <20210702111948.2197868-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 02.07.2021 13:19:49, Serialize by Router on Idefix/Phytec(Release 9.0.1FP7|August 17, 2016) at 02.07.2021 13:19:49 X-TNEFEvaluated: 1 Content-Transfer-Encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHLMWRmVeSWpSXmKPExsWyRoCBSzf0270EgwdbDSweXvW32HHnPrPF l00T2Cx+rPrCatF+ysfi7d5Odospj9ezO7B7rP14n9Vj3qwTLB47Z91l9zh7Zwejx8Z3O5gC WKO4bFJSczLLUov07RK4Mm4/8y24LVXx6c1c1gbGG2JdjJwcEgImEr+fTWEBsYUEtjFKPP9o 38XIBWRfYJRY/3QlE0iCTUBD4umK02C2iICExK/+q4wgRcwC1xklJq8/AZYQFnCTWPSvjw3E ZhFQkehc9hMszitgKbH96CFWiG3yEjMvfWcHsTkFrCQ6W1eyQWy2lPj1s5kNol5Q4uTMJywg CyQErjBKHDz4ghmiWUji9OKzYDazgLbEsoWvmScwCsxC0jMLSWoBI9MqRqHczOTs1KLMbL2C jMqS1GS9lNRNjMAwPjxR/dIOxr45HocYmTgYDzFKcDArifCGzruXIMSbklhZlVqUH19UmpNa fIhRmoNFSZx3A29JmJBAemJJanZqakFqEUyWiYNTqoFRX95A6tIayy1ekW6pBU8MZ2vfnPB/ YQhHlaHEUsPgiSfXVnq//tA1/e4rW/V9Px33n1/iPmv3oaVOzfbur7Q+KgZLKUTx256O3cOo HZyxbreD1rtaxcT3IXdUIzyjpH5NVAt+d+9lB6+YQfKua6bpzzXfNV1z+/Fywc//ESZrq4/6 qE1/vH+zEktxRqKhFnNRcSIA6yz1z1ECAAA= 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 --- 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