From patchwork Mon Jan 20 16:31:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alifer Moraes X-Patchwork-Id: 1226062 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=PRqQlXVO; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 481ccc59THz9sSD for ; Tue, 21 Jan 2020 03:31:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8450C817AC; Mon, 20 Jan 2020 17:31:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.com 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" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="PRqQlXVO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AA031818A4; Mon, 20 Jan 2020 17:31:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 68C288178B for ; Mon, 20 Jan 2020 17:31:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alifer.wsdm@gmail.com Received: by mail-qt1-x843.google.com with SMTP id j5so206394qtq.9 for ; Mon, 20 Jan 2020 08:31:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=0aJJl+cBjiZut5dBjOitDZC29S244y//r/FaGNG4mj4=; b=PRqQlXVOnaU1b3/BJNuWRv1GfQ/doBZskf5HhKDludbN8KNnX+lelfOKUuExijIqYi X2L/BFgu5MTBzUPPOr1g9/9jepswjDH6Ir6Kjl0CeGyQGHEzyQv8R7TWRTRAVRH39lZ+ TeCMV/VD1STj/xGVlWgdHdzkzHmgqjB5oFcBk26UvgvxnEQqKIMwQUVw5jIELBkE2iXX Vt4aE3ptmbf3Q6gDuKyz1uTSzju84eYwTe7rLfmsluFVPe8nYC9hPg0GvAX3d+2JHPSo xVpb+6awqAx3z6wH2DI8efdBcJM8Jdr4HFUIqATuQr9k5bE2Zyd9z4/3Xq5pkx7Ft17C ngsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0aJJl+cBjiZut5dBjOitDZC29S244y//r/FaGNG4mj4=; b=OTCRU5zvbxi9WEoHOYXsIIXV8gJwDqTEleNYbheXkLADn/bsGmi/LgFbRxKwf5Gus5 N2XTCcUVqdEMVweNAQqW5PRgVwnwjIFTWmEgBQhP+Iujao8VL+qe51dq0QeOWTDqXfVB rC3Wx/QbzKlzxwpr/B7axuiq2FZKWN02z/15qiLcc8um/kgmrq3PHN1tTZdQQeXL70Ta WrTgO7wKEUu3kHiIvS7i+QRhQWLrhXB/2QhYf4QYHLSDUJb7r3nesEXDawVI5imwj3io c81LUJ4q7i8JNms2kpbW3xTJxSxgKWRjW83vEKIKYClwLTsc1qD5DpUSSr35wJPZXPtV 0D1Q== X-Gm-Message-State: APjAAAXw8TDW9qd/Jcb9Mk2uBxrOfaWUw/VRhGnq369pu9Rrep3lTgEw QFwkgy137MlJoLpM1z8Fvdk= X-Google-Smtp-Source: APXvYqxUHYCp2cH7DwBB1ATfLYE4ZyaIFt1pW+Q4XtOZ5YqJffVCe2YCWDbEldKoxh3OTpID0EdGzA== X-Received: by 2002:ac8:7586:: with SMTP id s6mr60582qtq.309.1579537874283; Mon, 20 Jan 2020 08:31:14 -0800 (PST) Received: from NXL86673.nxp.com ([177.221.114.206]) by smtp.googlemail.com with ESMTPSA id b24sm17639672qto.71.2020.01.20.08.31.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 08:31:13 -0800 (PST) From: Alifer Moraes To: sbabic@denx.de Subject: [PATCH 1/4] mx6sabre_common: Remove FEC related settings Date: Mon, 20 Jan 2020 13:31:01 -0300 Message-Id: <20200120163104.32487-1-alifer.wsdm@gmail.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, fabio.estevam@nxp.com Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean From: Fabio Estevam In preparation for converting to DM_ETH and moving the FEC symbols to Kconfig we need to move the FEC definitions to mx6sabreauto.h and mx6sabresd.h to avoid build breakage during the conversion. Signed-off-by: Fabio Estevam Signed-off-by: Alifer Moraes --- include/configs/mx6sabre_common.h | 8 -------- include/configs/mx6sabreauto.h | 8 ++++++++ include/configs/mx6sabresd.h | 9 +++++++++ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index 9309e0320f..ee3b754910 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -20,14 +20,6 @@ /* MMC Configs */ #define CONFIG_SYS_FSL_ESDHC_ADDR 0 -#define CONFIG_FEC_MXC -#define IMX_FEC_BASE ENET_BASE_ADDR -#define CONFIG_FEC_XCV_TYPE RGMII -#define CONFIG_ETHPRIME "FEC" -#define CONFIG_FEC_MXC_PHYADDR 1 - -#define CONFIG_PHY_ATHEROS - #ifdef CONFIG_SUPPORT_EMMC_BOOT #define EMMC_ENV \ "emmcdev=2\0" \ diff --git a/include/configs/mx6sabreauto.h b/include/configs/mx6sabreauto.h index e444930dc8..c07b03984a 100644 --- a/include/configs/mx6sabreauto.h +++ b/include/configs/mx6sabreauto.h @@ -75,4 +75,12 @@ #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 +#define CONFIG_FEC_MXC +#define IMX_FEC_BASE ENET_BASE_ADDR +#define CONFIG_FEC_XCV_TYPE RGMII +#define CONFIG_ETHPRIME "FEC" +#define CONFIG_FEC_MXC_PHYADDR 1 + +#define CONFIG_PHY_ATHEROS + #endif /* __MX6SABREAUTO_CONFIG_H */ diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h index ec1537541a..d810202117 100644 --- a/include/configs/mx6sabresd.h +++ b/include/configs/mx6sabresd.h @@ -62,4 +62,13 @@ #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 /* Enabled USB controller number */ #endif +#define CONFIG_FEC_MXC +#define IMX_FEC_BASE ENET_BASE_ADDR +#define CONFIG_FEC_XCV_TYPE RGMII +#define CONFIG_ETHPRIME "FEC" +#define CONFIG_FEC_MXC_PHYADDR 1 + +#define CONFIG_PHY_ATHEROS + + #endif /* __MX6SABRESD_CONFIG_H */ From patchwork Mon Jan 20 16:31:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alifer Moraes X-Patchwork-Id: 1226063 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=n5OhZMiC; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 481ccv3wCvz9sPJ for ; Tue, 21 Jan 2020 03:31:43 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3C196818BD; Mon, 20 Jan 2020 17:31:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.com 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" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="n5OhZMiC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9473D818B0; Mon, 20 Jan 2020 17:31:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1734F817BC for ; Mon, 20 Jan 2020 17:31:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alifer.wsdm@gmail.com Received: by mail-qt1-x842.google.com with SMTP id c24so230324qtp.5 for ; Mon, 20 Jan 2020 08:31:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=C6FGhMJFe78hrFplpEQuORf6pHtp9+xkl9wFbGBa8aY=; b=n5OhZMiCLDIALykpLxItgnc3sUlJfbhjV86+LNQI18NRFRsiFFXPYBSFsU7UPOLH6G 0CqC1xGXCYPUzZ0DSIqPv9srgd0+Co7sLuq1tZ25NhMYBi2/wEkqrZML3tzaZ9LZd3UL MWUgTQk5DVObmKHUDbHVPTQGzYXtqyeC3+NJY8771i0XwNbFYb+ebazL/JICdDKy9xsa BFlBRovS1G4dW2M+RanINgKfFDMRuqDv2nJMQN8dOXjhKGVg40G5UpSOoWCO73mNcO7Z rwLoraexWaOoYQ/xTioAKfnnchwgZQ5Ndk2PC5LOR3beChME4k41xh0zmZ/hhDAa/LSA h6AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=C6FGhMJFe78hrFplpEQuORf6pHtp9+xkl9wFbGBa8aY=; b=fMJiJKh/1MHPcQJLDkXfregfhxK5F80tOX4I9lIVOkKRlpGLQJaDDapl6Hs3EzdBE9 IeWl1nKv/WvCxIg0AkBxH9kE+UkkYSFok7BAZAhNLSnO01nzzf1Stu8AGkAVTFhSBUfA mvUeI0jAc3dVNXXUJ8VtelM3YDLr/dV8hUcHl3YwwOMvvLdgzxiMLUqy3vC8uD6MQykW jvfPPfKts363r8uZbLKudirwXP2KC5ZRkOuL6/55zvHcLnQtpdPkns1PeniwVewfWkUI XZ8zvmo5lVOwQyrWIMvuazTFqz0Gebqk1xR0RjGflQMI41Kr/ysWwtHCWSZg5/Tg7y+I CeNw== X-Gm-Message-State: APjAAAXYqAhTx1GdgS+WqijMaacfsPpra2BVpFjUtptj1FQb1LFVDTnh l+HcVvMnyC5Qk2Q5eOZhzM8= X-Google-Smtp-Source: APXvYqyIeUrtf4cMnY1Zl207jvxhMhsDl3kgfmceA5U3CPR1PPI304vRxEs3/s26UrvqtUZmAH3C9g== X-Received: by 2002:ac8:21ec:: with SMTP id 41mr120084qtz.242.1579537877084; Mon, 20 Jan 2020 08:31:17 -0800 (PST) Received: from NXL86673.nxp.com ([177.221.114.206]) by smtp.googlemail.com with ESMTPSA id b24sm17639672qto.71.2020.01.20.08.31.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 08:31:16 -0800 (PST) From: Alifer Moraes To: sbabic@denx.de Subject: [PATCH 2/4] mx6sabresd: Convert PCI to driver model Date: Mon, 20 Jan 2020 13:31:02 -0300 Message-Id: <20200120163104.32487-2-alifer.wsdm@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200120163104.32487-1-alifer.wsdm@gmail.com> References: <20200120163104.32487-1-alifer.wsdm@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fabio.estevam@nxp.com, u-boot@lists.denx.de, uboot-imx@nxp.com Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean Convert imx6sabresd PCI to driver model to fix the following warning: ===================== WARNING ====================== This board does not use CONFIG_DM_PCI Please update the board to use CONFIG_DM_PCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/MIGRATION.txt for more info. ==================================================== After the conversion the following commands were used for testing: => pci enum PCI: Failed autoconfig bar 10 PCI: Failed autoconfig bar 10 => pci 1 Scanning PCI devices on bus 1 BusDevFun VendorId DeviceId Device Class Sub-Class Reviewed-by: Fabio Estevam diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index b346ca4ced..4a208277ac 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -231,16 +231,6 @@ static void setup_spi(void) SETUP_IOMUX_PADS(ecspi1_pads); } -iomux_v3_cfg_t const pcie_pads[] = { - IOMUX_PADS(PAD_EIM_D19__GPIO3_IO19 | MUX_PAD_CTRL(NO_PAD_CTRL)), /* POWER */ - IOMUX_PADS(PAD_GPIO_17__GPIO7_IO12 | MUX_PAD_CTRL(NO_PAD_CTRL)), /* RESET */ -}; - -static void setup_pcie(void) -{ - SETUP_IOMUX_PADS(pcie_pads); -} - iomux_v3_cfg_t const di0_pads[] = { IOMUX_PADS(PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK), /* DISP0_CLK */ IOMUX_PADS(PAD_DI0_PIN2__IPU1_DI0_PIN02), /* DISP0_HSYNC */ @@ -508,7 +498,6 @@ int overwrite_console(void) int board_eth_init(bd_t *bis) { setup_iomux_enet(); - setup_pcie(); return cpu_eth_init(bis); } diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig index 0bd686ec86..e3b8908928 100644 --- a/configs/mx6sabresd_defconfig +++ b/configs/mx6sabresd_defconfig @@ -83,6 +83,7 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y CONFIG_DM_REGULATOR=y From patchwork Mon Jan 20 16:31:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alifer Moraes X-Patchwork-Id: 1226064 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=oxJAJjNB; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 481ccy5Yc7z9sSD for ; Tue, 21 Jan 2020 03:31:46 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 18C9B818A0; Mon, 20 Jan 2020 17:31:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.com 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" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="oxJAJjNB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E3118818BB; Mon, 20 Jan 2020 17:31:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, SPF_HELO_NONE, UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.2 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C610F818A0 for ; Mon, 20 Jan 2020 17:31:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alifer.wsdm@gmail.com Received: by mail-qk1-x742.google.com with SMTP id k6so30636698qki.5 for ; Mon, 20 Jan 2020 08:31:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Yjsdake2d4Li2k7yuIMZjuQt2vm0el0vok4CA/RhqWg=; b=oxJAJjNB1HyswNRYZji2U9y7WsGVKFq/MCKxFRk3rG/6mewfm1bot6+quQ4VrAmIN6 FfFuUwXNAYxSpXZEAf121sKS/+24TkfE14OhcAbg0OyqIDG2oqfw3q+08pkXEzSrD9Ut 53xiH0RvnqyTBqW7mez+n4xGd0R0T5GIrh7a2Wff0sTfl8veb1h1hB4I5e1gf1uTh64v hE6b/MYQ6Hy4sSKNDla8iw5UANYDM9xW9kYbX5LPikOeQ3KyPhrldlcQwDL6YDD6u5y8 y7WEF0XpqsJ6kgu1/RDF1lkuke0UkcwHP7azui6JO9oasFsoDfoPs9j4QR8N8s18nbSp dqBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Yjsdake2d4Li2k7yuIMZjuQt2vm0el0vok4CA/RhqWg=; b=S+49T8iaRQiNciW6R63D4/jDIYXW3OpHdWx0guFljTtQ30Z0gM2Mihqsw0eS50T6zQ 2/yeaNf7O6D+9YftujaQJx+F0s6pODyheSAgWc3Bv6FyCfcD1FoLVL2ORhr/vYtsTswz iKn1omvNzCvdpvt9w2o3FvxovYAhmcOAvUk6DKif/U7j7btDGuDworr2nzsgV6eYMKx2 7cbD9mVGxdBoCKbrlGaT+N1ZL5epGTcNFFb/py3jebvFsm2tC8ulFoIYCboM21cAeYVm fYGjktFLqiQ4YVwK4CMqayHvRxTLa/8yDtdGSKD8hl51TROGHioylEdYdTYa9MW1c7yj 851Q== X-Gm-Message-State: APjAAAVmalPPn9irbypbtuqziugLAH5KQt9yR/H2LpMLHZSde6+Q0Mef 1zdKsmkQUeirpNp5/LGTFMXfyCVNdbDjmQ== X-Google-Smtp-Source: APXvYqyfBPy4oVTE46mnDM0AOjs8Nnwy9BnxvdOKN+P8YKPfzMa2fxNBGkEZwdN0yWA/wejaEcwnhQ== X-Received: by 2002:a37:a795:: with SMTP id q143mr372180qke.86.1579537879754; Mon, 20 Jan 2020 08:31:19 -0800 (PST) Received: from NXL86673.nxp.com ([177.221.114.206]) by smtp.googlemail.com with ESMTPSA id b24sm17639672qto.71.2020.01.20.08.31.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 08:31:19 -0800 (PST) From: Alifer Moraes To: sbabic@denx.de Subject: [PATCH 3/4] mx6sabresd: Convert ethernet to driver model Date: Mon, 20 Jan 2020 13:31:03 -0300 Message-Id: <20200120163104.32487-3-alifer.wsdm@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200120163104.32487-1-alifer.wsdm@gmail.com> References: <20200120163104.32487-1-alifer.wsdm@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fabio.estevam@nxp.com, u-boot@lists.denx.de, uboot-imx@nxp.com Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean Convert imx6sabresd ethernet to driver model to fix the following warning: ===================== WARNING ====================== This board does not use CONFIG_DM_ETH (Driver Model for Ethernet drivers). Please update the board to use CONFIG_DM_ETH before the v2020.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== Signed-off-by: Alifer Moraes --- board/freescale/mx6sabresd/mx6sabresd.c | 29 ------------------------- configs/mx6sabresd_defconfig | 5 +++++ include/configs/mx6sabresd.h | 9 -------- 3 files changed, 5 insertions(+), 38 deletions(-) diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index 4a208277ac..4b0af86f0b 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -44,9 +43,6 @@ DECLARE_GLOBAL_DATA_PTR; PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \ PAD_CTL_SRE_FAST | PAD_CTL_HYS) -#define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ - PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) - #define SPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \ PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) @@ -73,31 +69,6 @@ static iomux_v3_cfg_t const uart1_pads[] = { IOMUX_PADS(PAD_CSI0_DAT11__UART1_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)), }; -static iomux_v3_cfg_t const enet_pads[] = { - IOMUX_PADS(PAD_ENET_MDIO__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_ENET_MDC__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_TXC__RGMII_TXC | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_TD0__RGMII_TD0 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_TD1__RGMII_TD1 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_TD2__RGMII_TD2 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_TD3__RGMII_TD3 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_TX_CTL__RGMII_TX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_ENET_REF_CLK__ENET_TX_CLK | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_RXC__RGMII_RXC | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_RD0__RGMII_RD0 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_RD1__RGMII_RD1 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_RD2__RGMII_RD2 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_RD3__RGMII_RD3 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_RX_CTL__RGMII_RX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL)), - /* AR8031 PHY Reset */ - IOMUX_PADS(PAD_ENET_CRS_DV__GPIO1_IO25 | MUX_PAD_CTRL(NO_PAD_CTRL)), -}; - -static void setup_iomux_enet(void) -{ - SETUP_IOMUX_PADS(enet_pads); -} - static iomux_v3_cfg_t const usdhc2_pads[] = { IOMUX_PADS(PAD_SD2_CLK__SD2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)), IOMUX_PADS(PAD_SD2_CMD__SD2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)), diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig index e3b8908928..05428a142c 100644 --- a/configs/mx6sabresd_defconfig +++ b/configs/mx6sabresd_defconfig @@ -81,6 +81,11 @@ CONFIG_SF_DEFAULT_MODE=0 CONFIG_SF_DEFAULT_SPEED=20000000 CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y +CONFIG_PHY_ATHEROS=y +CONFIG_DM_ETH=y +CONFIG_DM_MDIO=y +CONFIG_FEC_MXC=y +CONFIG_RGMII=y CONFIG_MII=y CONFIG_PCI=y CONFIG_DM_PCI=y diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h index d810202117..ec1537541a 100644 --- a/include/configs/mx6sabresd.h +++ b/include/configs/mx6sabresd.h @@ -62,13 +62,4 @@ #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 /* Enabled USB controller number */ #endif -#define CONFIG_FEC_MXC -#define IMX_FEC_BASE ENET_BASE_ADDR -#define CONFIG_FEC_XCV_TYPE RGMII -#define CONFIG_ETHPRIME "FEC" -#define CONFIG_FEC_MXC_PHYADDR 1 - -#define CONFIG_PHY_ATHEROS - - #endif /* __MX6SABRESD_CONFIG_H */ From patchwork Mon Jan 20 16:31:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alifer Moraes X-Patchwork-Id: 1226065 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=g6zFrMzd; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 481cd90nwQz9sRp for ; Tue, 21 Jan 2020 03:31:57 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 26D97818C4; Mon, 20 Jan 2020 17:31:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.com 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" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="g6zFrMzd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5F814818BB; Mon, 20 Jan 2020 17:31:29 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3E1F7818AD for ; Mon, 20 Jan 2020 17:31:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alifer.wsdm@gmail.com Received: by mail-qk1-x741.google.com with SMTP id 21so30684549qky.4 for ; Mon, 20 Jan 2020 08:31:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EMe4JOzM3r7XD0hht7c2RsoFJ8sGBbxN/17mX2SKxKM=; b=g6zFrMzdM5FblbnhfyI03TNoQbm3SCBSpG8Z/UqgX3DTMYu0Gaq9DHmsEU6UP2M04w ZaMyFavchdsGRgl6EadOTFCN2FDi5JOSabI7S+tPAn3nQg383sSFfL+2vOmPcBcFw2Bs qSt84t40fj+dLP9WQsoTJ2SIbwaMu+ATF3hy7De768vSlQvpESK/H2WZMTBOg1XDTfYk +R0Wg1ZoChBHPey3LauwUbPQJ8vKI2qoruCPxXAs/rEmcrGG2RJt/tx2QckvUwKDu1Jl taSBnCtHECl6t4CfMlywBVCRhZwu05v1hH36URTfO8ssDeTdbE8AlKcLxBRgasJFSk4D 8j/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EMe4JOzM3r7XD0hht7c2RsoFJ8sGBbxN/17mX2SKxKM=; b=YfTmi0sYth1H4V3exZKPieATAk/ABzWMcDbXO7WCip/hAQKio/KnASkwLAA3is6Ui3 ZukA3AWQpNOR8JazqoFBV3Kxp8DeWznnMMv7j+PvRpaqXTxfFZHlbBsx/XcR4cTbA13Y 3CUZ2625fwPSUXNbqH/Acl3nI2fqk941OSwl/T2gb3kgeawOhGk2xVp4FzAGcqdws8r9 z64kfP92mbflAEs3Wl3zsgd3Rwo2j+LjKRS4o0+vk7uZ58hwaKdhu4jYyGN0Lembv8SM x+dFFwQb63nJH90dD8sniQMsTzMbdDt1GW+cDFmeAnOFs4DXE6uq7p0PFaZBKzofeGGS cAaw== X-Gm-Message-State: APjAAAVqmGfQH74zUrDBF8Ezkj4/Q4z33YFRVY2Z95hbxRpTNjAJEEZU O0CSh1RNDLHEAd7+g5G54wI= X-Google-Smtp-Source: APXvYqxF+ddISX/tT+to3xQE+rA3K2Bey8WvNVH2gBZVUDa67+I9oN7Ch7BOJeIP8PgB7eQwNtx2cg== X-Received: by 2002:ae9:f709:: with SMTP id s9mr278430qkg.463.1579537883055; Mon, 20 Jan 2020 08:31:23 -0800 (PST) Received: from NXL86673.nxp.com ([177.221.114.206]) by smtp.googlemail.com with ESMTPSA id b24sm17639672qto.71.2020.01.20.08.31.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 08:31:22 -0800 (PST) From: Alifer Moraes To: sbabic@denx.de, alifer.wsdm@gmail.com Subject: [PATCH 4/4] mx6sabreauto: Convert to DM_ETH Date: Mon, 20 Jan 2020 13:31:04 -0300 Message-Id: <20200120141000.28250-1-jardim.c.pedro@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200120163104.32487-1-alifer.wsdm@gmail.com> References: <20200120163104.32487-1-alifer.wsdm@gmail.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, fabio.estevam@nxp.com, Pedro Jardim Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean From: Pedro Jardim This fixes the following warning: ===================== WARNING ====================== This board does not use CONFIG_DM_ETH (Driver Model for Ethernet drivers). Please update the board to use CONFIG_DM_ETH before the v2020.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== Signed-off-by: Pedro Jardim Signed-off-by: Alifer Moraes Reviewed-by: Fabio Estevam --- board/freescale/mx6sabreauto/mx6sabreauto.c | 42 ------------- configs/mx6sabreauto_defconfig | 8 +++ include/configs/mx6sabreauto.h | 7 --- 3 files changed, 8 insertions(+), 49 deletions(-) diff --git a/board/freescale/mx6sabreauto/mx6sabreauto.c b/board/freescale/mx6sabreauto/mx6sabreauto.c index 140f24459d..de19a562eb 100644 --- a/board/freescale/mx6sabreauto/mx6sabreauto.c +++ b/board/freescale/mx6sabreauto/mx6sabreauto.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -76,23 +75,6 @@ static iomux_v3_cfg_t const uart4_pads[] = { IOMUX_PADS(PAD_KEY_ROW0__UART4_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)), }; -static iomux_v3_cfg_t const enet_pads[] = { - IOMUX_PADS(PAD_KEY_COL1__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_KEY_COL2__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_TXC__RGMII_TXC | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_TD0__RGMII_TD0 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_TD1__RGMII_TD1 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_TD2__RGMII_TD2 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_TD3__RGMII_TD3 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_TX_CTL__RGMII_TX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_ENET_REF_CLK__ENET_TX_CLK | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_RXC__RGMII_RXC | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_RD0__RGMII_RD0 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_RD1__RGMII_RD1 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_RD2__RGMII_RD2 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_RD3__RGMII_RD3 | MUX_PAD_CTRL(ENET_PAD_CTRL)), - IOMUX_PADS(PAD_RGMII_RX_CTL__RGMII_RX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL)), -}; /* I2C2 PMIC, iPod, Tuner, Codec, Touch, HDMI EDID, MIPI CSI2 card */ static struct i2c_pads_info mx6q_i2c_pad_info1 = { @@ -259,10 +241,6 @@ static void setup_iomux_eimnor(void) } #endif -static void setup_iomux_enet(void) -{ - SETUP_IOMUX_PADS(enet_pads); -} static iomux_v3_cfg_t const usdhc3_pads[] = { IOMUX_PADS(PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)), @@ -340,26 +318,6 @@ static void setup_gpmi_nand(void) } #endif -static void setup_fec(void) -{ - if (is_mx6dqp()) { - /* - * select ENET MAC0 TX clock from PLL - */ - imx_iomux_set_gpr_register(5, 9, 1, 1); - enable_fec_anatop_clock(0, ENET_125MHZ); - } - - setup_iomux_enet(); -} - -int board_eth_init(bd_t *bis) -{ - setup_fec(); - - return cpu_eth_init(bis); -} - u32 get_board_rev(void) { int rev = nxp_board_rev(); diff --git a/configs/mx6sabreauto_defconfig b/configs/mx6sabreauto_defconfig index c53d079f88..69dfc1a3a1 100644 --- a/configs/mx6sabreauto_defconfig +++ b/configs/mx6sabreauto_defconfig @@ -96,3 +96,11 @@ CONFIG_DM_VIDEO=y CONFIG_VIDEO_BPP16=y CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_VIDEO_IPUV3=y +CONFIG_FEC_MXC=y +CONFIG_PHY_ATHEROS=y +CONFIG_DM_ETH=y +CONFIG_DM_MDIO=y +CONFIG_RGMII=y diff --git a/include/configs/mx6sabreauto.h b/include/configs/mx6sabreauto.h index c07b03984a..68465b8e08 100644 --- a/include/configs/mx6sabreauto.h +++ b/include/configs/mx6sabreauto.h @@ -75,12 +75,5 @@ #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 -#define CONFIG_FEC_MXC -#define IMX_FEC_BASE ENET_BASE_ADDR -#define CONFIG_FEC_XCV_TYPE RGMII -#define CONFIG_ETHPRIME "FEC" -#define CONFIG_FEC_MXC_PHYADDR 1 - -#define CONFIG_PHY_ATHEROS #endif /* __MX6SABREAUTO_CONFIG_H */