From patchwork Fri Jul 30 03:02:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Dinh X-Patchwork-Id: 1511499 X-Patchwork-Delegate: sr@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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=bJG1F569; 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 4GbXKT14yWz9sXS for ; Fri, 30 Jul 2021 13:03:41 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EB5FD83167; Fri, 30 Jul 2021 05:03:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (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=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="bJG1F569"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 884288319C; Fri, 30 Jul 2021 05:03:35 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) (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 94CA883167 for ; Fri, 30 Jul 2021 05:03:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mibodhi@gmail.com Received: by mail-qv1-xf30.google.com with SMTP id 3so4510702qvd.2 for ; Thu, 29 Jul 2021 20:03:31 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=pnu2ihJDArOizXs5NTJpSiII7lkWDfD2PbKnTXLpG+4=; b=bJG1F569yLB904SHHmpYAjpKWd9uaNI1WVHXbwigrsQu1PsVN5o4uEpqeYAWro+ieN fppHk8J4w5Bv+4ZU332vqRr7Ay8SiGv4hUnCBYI5YAqZbY5oBuO1+bucCSNLLIFX4xTt B/JsDNwqOqDRZwz4vrNKW04V9NwbT1BqBWROywpzF2fJyDtqsbDs5maTMOhcRZepxTw4 vEeixo6JhlbE4A+L22q0ZFYt/b1BOqkaZZR0zbf7gLaOz6G0QzFbZCUzHlpiFV84UJOH WUsG8cDO1lF9LEQIpDXZ/KcED2OKFBu2sdZpG8kwDqUZqnsygRWCQ6T76zVSdwYUMkBD HsKA== 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:mime-version:content-transfer-encoding; bh=pnu2ihJDArOizXs5NTJpSiII7lkWDfD2PbKnTXLpG+4=; b=T8xnI+xlzrSiW77kJ/5mRVRj54SIEpGRHTPVXSewoNwoBIg6cFiHy4g2Kifd5ILAGw xa7s3ojj8oDv21H5R7/lkpe4L49CqsD/bC50JTjUxU8jVszGhInfN8dQodD16aTK6/wc /8yY1xOyKTdCG8vnqJpc4N4JGih2PVhjPMfGEjOlUhE9cCrCnjwO/sHp2+m0PYHY2+hx 0xFB/4RLu6czdVHx3OkQ9baogPSk4Yd6TUU+1leqNrCOqUToak/Ndwz/5NUTW4XiaDF0 Ti8+SyiKaY6oOg6K3d1OviTEcxr2SnqLKrtvTdLDmuV1yXD3rTUN93mLeFLVXCx4f7mJ cqvA== X-Gm-Message-State: AOAM533oZuxjDVtqPrZDz4fJpS+5rCSuF4jKSl7HBO2Of0peIVf6J51p MzQKGEMuDmheY5FnRiyDyZef/QtuNyI= X-Google-Smtp-Source: ABdhPJxO3zLTnoc/QV/CLODvY+Gl06Wewrzf7ksugt+8hfcRmLH1zkTkblfEopJ7wvNmlYrpSkxv7A== X-Received: by 2002:ad4:5bec:: with SMTP id k12mr569482qvc.5.1627614210187; Thu, 29 Jul 2021 20:03:30 -0700 (PDT) Received: from localhost.localdomain ([66.218.48.244]) by smtp.gmail.com with ESMTPSA id s19sm99900qtx.5.2021.07.29.20.03.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jul 2021 20:03:29 -0700 (PDT) From: Tony Dinh To: U-Boot Mailing List , Stefan Roese , Suriyan Ramasami Cc: Chris Packham , Tom Rini , Tony Dinh Subject: [PATCH 1/3] arm: kirkwood: GoFlex Home: Add DM Ethernet, remove IDE, and add DM SATA configs Date: Thu, 29 Jul 2021 20:02:41 -0700 Message-Id: <20210730030244.25308-2-mibodhi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210730030244.25308-1-mibodhi@gmail.com> References: <20210730030244.25308-1-mibodhi@gmail.com> MIME-Version: 1.0 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 Add DM_ETH, SATA_MV and associated configs to goflexhome_defconfig. Signed-off-by: Tony Dinh Reviewed-by: Stefan Roese --- configs/goflexhome_defconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configs/goflexhome_defconfig b/configs/goflexhome_defconfig index 7207fa27e0..17adeca92f 100644 --- a/configs/goflexhome_defconfig +++ b/configs/goflexhome_defconfig @@ -16,7 +16,6 @@ CONFIG_CONSOLE_MUX=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SYS_PROMPT="GoFlexHome> " # CONFIG_CMD_FLASH is not set -CONFIG_CMD_IDE=y CONFIG_CMD_NAND=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set @@ -48,3 +47,7 @@ CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y +CONFIG_CMD_SATA=y +CONFIG_SATA_MV=y +CONFIG_DM_ETH=y +CONFIG_NET_RANDOM_ETHADDR=y From patchwork Fri Jul 30 03:02:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Dinh X-Patchwork-Id: 1511500 X-Patchwork-Delegate: sr@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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=belPDqNs; 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 4GbXKw65l9z9sXS for ; Fri, 30 Jul 2021 13:04:04 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 63935831C2; Fri, 30 Jul 2021 05:04:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (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=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="belPDqNs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4C0AA831C8; Fri, 30 Jul 2021 05:04:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,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-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (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 8A076831BB for ; Fri, 30 Jul 2021 05:03:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mibodhi@gmail.com Received: by mail-qt1-x82b.google.com with SMTP id t18so5463415qta.8 for ; Thu, 29 Jul 2021 20:03:57 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=0x9uOFkSdmuHwyo9zBQRBbjSOSHxIrp24Gt5prs8h5E=; b=belPDqNsFIA4XTsOqA8GMN5Lk39LeDuBAmWguu4mSQqLVr8xgQj1ArNDNQm9oiDhnk ILnh3eHxKy/QaBIM5SkDOxiKVVILdZhBaGcDZpFaMLiv/PxpA4bUGLp4sfL5EoozkneQ MXhchGOKK7kP6cj5Xah3fIyGxxQBE2aHL/ZJj1mrcCB9TNEpsQ/RgL8a4KjPOFaGtxZF oTR+D45NXhvpAgh30NtbXNCZY2yYx0POw2/YKP2iW7yBm0q8nubjT+wK57BIXJBdkJLY 3HuqsxQdVrhtLavO1OatYwVw0nPY4bKBkKjNgQv2c4lkLWyG+Y9hHblUpuUt1XpZP120 hrGQ== 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:mime-version:content-transfer-encoding; bh=0x9uOFkSdmuHwyo9zBQRBbjSOSHxIrp24Gt5prs8h5E=; b=DyuIP0T7V2Qnta82pRAB+h0Ta6phoKkTaWtQjgzH2E9i85njZ8Cno+hd6N2YSiXh8x FbQnr0mcM0vveVNGHGlCkb8spH/hC3nGtQw34SA3wo7famWuVJiBvF7LoAP5FXA+zCyb XoJbNwn9cA+nY4IBRoIcjht3EuFt0h7RS6FV4hpVzdu3KcWBDre3Z3LJ6nQbM38cYlDe XiRo0ML426+haLLORuCvPMoldE/IThilpTKQOQ1RuW8gRwC/lBku+3qIukw3VbgZqDrZ iTjmnaUjlptvpMNa213GzghKPAR4En4pjfrwsHPkJ61JSvzkztmY0Wl6UfLwo57mFbaj a//A== X-Gm-Message-State: AOAM533fD/yRsT2IyHe9jjTfoqYS81EXy44tQxGnjUT9rPqBeuWmfZWC MtgmVmcKvzPuCdz5qUIGRBC8H0wlG7k= X-Google-Smtp-Source: ABdhPJw15dE5xf3B9fIHnyh5SZ9YB85g0QlQREL+vwPcAByRBLRixoTzkKjXC6HrcNl6bim4n5jgSw== X-Received: by 2002:ac8:66c6:: with SMTP id m6mr530079qtp.152.1627614236406; Thu, 29 Jul 2021 20:03:56 -0700 (PDT) Received: from localhost.localdomain ([66.218.48.244]) by smtp.gmail.com with ESMTPSA id s19sm99900qtx.5.2021.07.29.20.03.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jul 2021 20:03:56 -0700 (PDT) From: Tony Dinh To: U-Boot Mailing List , Stefan Roese , Suriyan Ramasami Cc: Chris Packham , Tom Rini , Tony Dinh Subject: [PATCH 2/3] arm: kirkwood: GoFlex Home: Add DM SATA configs Date: Thu, 29 Jul 2021 20:02:42 -0700 Message-Id: <20210730030244.25308-3-mibodhi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210730030244.25308-1-mibodhi@gmail.com> References: <20210730030244.25308-1-mibodhi@gmail.com> MIME-Version: 1.0 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 DM SATA in board file. Signed-off-by: Tony Dinh Reviewed-by: Stefan Roese --- include/configs/goflexhome.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/configs/goflexhome.h b/include/configs/goflexhome.h index a18e7869b0..2e89d72285 100644 --- a/include/configs/goflexhome.h +++ b/include/configs/goflexhome.h @@ -72,4 +72,10 @@ #define CONFIG_PHY_BASE_ADR 0 #endif /* CONFIG_CMD_NET */ +/* SATA driver configuration */ +#ifdef CONFIG_SATA +#define CONFIG_SYS_SATA_MAX_DEVICE 1 +#define CONFIG_LBA48 +#endif /* CONFIG_SATA */ + #endif /* _CONFIG_GOFLEXHOME_H */ From patchwork Fri Jul 30 03:02:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Dinh X-Patchwork-Id: 1511501 X-Patchwork-Delegate: sr@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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=PYcPUtJr; 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 4GbXLW1PRJz9sXS for ; Fri, 30 Jul 2021 13:04:35 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6527E831D4; Fri, 30 Jul 2021 05:04:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (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=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="PYcPUtJr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 20CC7831D8; Fri, 30 Jul 2021 05:04:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (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 BD7CA831D4 for ; Fri, 30 Jul 2021 05:04:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mibodhi@gmail.com Received: by mail-qk1-x72f.google.com with SMTP id 184so8121170qkh.1 for ; Thu, 29 Jul 2021 20:04:21 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=w0XcDS7aczPTcKXbI0iJPnCFDcWbRsMAint3RuN66b8=; b=PYcPUtJrT2hz7652x8KV5wI0z6BXnyIh5XGs3qSz5m6xnyd9vDLwOH9K0abSTirPWl kzPPmR1+GVa2D7vr+J9sfO4KKIUyuBcostEhx91ciZQ84TwQxPeRET2nRIgyDxo3QgQP siTD5esTSIC5TQ0MMgJ7NHjwhKBwrt3j+kyro4he8ZpeVdEHmmKeEwmZtAQhMQB2o5Gh C2zPucTXsBLxjKtOKMUYUr9/8K0lpuEQQrZHziHlbwvnUHBxGVIjy8uTR27KGf3788jx fbM82AURLRLnE9XsHdfmB2C87NJq9hQ6n7WTa8mYh7/iZxlHzxYXeP3UgQKHjUMOnMsb aVkQ== 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:mime-version:content-transfer-encoding; bh=w0XcDS7aczPTcKXbI0iJPnCFDcWbRsMAint3RuN66b8=; b=LWNKnzhE/UhEbiA4Hw0NSzvEXv1Jrdmpkg65VzrMhJhuRy2ooZ+434A83gZnzPgxcw HwHqExI8lXIm+VvM7GHPio/PNessyhnHFy09cL7IxeCFx16yhAUd5MwAbY2G+oiIXp9x ePS213djJ3Dk9ANoI7Jb1AatqgVrE4E8VkZvVnXEbxofSORxvpx4CYRIFhaoLJOJsABJ Z19t1LeT9W51XZnXj6s5fpxf73N3mNE6t7krjxNbuhqzAUzoroJbZ4ohoJAz0zRu0k5R hw2SHqOY/7Ab6/1oJ8WUKcUeI58bCwZh/z5FwGwCAYvFvksh0fRXByNzHkkZLD8V9xDb /ysA== X-Gm-Message-State: AOAM531IKD7DXbVDbBcTfFe0iymdRyp8lIC1W+dOmE+IOWPEPREJhuOi LateJoiUdjTjDuZZoNEukfpjV9IRBFo= X-Google-Smtp-Source: ABdhPJyoqLojzKO4vxHvRyiNzSwZ3LyrwTGXUSoa8Om7xaqyiJ4CBfZ7UCuDhvfjqwZkydouvkSQBw== X-Received: by 2002:a05:620a:628:: with SMTP id 8mr235660qkv.290.1627614260593; Thu, 29 Jul 2021 20:04:20 -0700 (PDT) Received: from localhost.localdomain ([66.218.48.244]) by smtp.gmail.com with ESMTPSA id s19sm99900qtx.5.2021.07.29.20.04.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jul 2021 20:04:20 -0700 (PDT) From: Tony Dinh To: U-Boot Mailing List , Stefan Roese , Suriyan Ramasami Cc: Chris Packham , Tom Rini , Tony Dinh , Simon Glass Subject: [PATCH 3/3] arm: kirkwood: GoFlex Home: Use Ethernet PHY name and address from device tree Date: Thu, 29 Jul 2021 20:02:43 -0700 Message-Id: <20210730030244.25308-4-mibodhi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210730030244.25308-1-mibodhi@gmail.com> References: <20210730030244.25308-1-mibodhi@gmail.com> MIME-Version: 1.0 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 In DM Ethernet, the old "egiga0" name is no longer valid, so replace these with Ethernet PHY names from device tree. Also, read Ethernet PHY address from device tree. Signed-off-by: Tony Dinh Reviewed-by: Stefan Roese --- board/Seagate/goflexhome/goflexhome.c | 57 +++++++++++++++++++++------ 1 file changed, 45 insertions(+), 12 deletions(-) diff --git a/board/Seagate/goflexhome/goflexhome.c b/board/Seagate/goflexhome/goflexhome.c index af8cab7bdc..52be64fb8c 100644 --- a/board/Seagate/goflexhome/goflexhome.c +++ b/board/Seagate/goflexhome/goflexhome.c @@ -1,5 +1,9 @@ // SPDX-License-Identifier: GPL-2.0+ /* + * Copyright (C) 2021 + * Tony Dinh + * Suriyan Ramasami + * * Copyright (C) 2013 Suriyan Ramasami * * Based on dockstar.c originally written by @@ -107,36 +111,65 @@ int board_init(void) return 0; } +static int fdt_get_phy_addr(const char *path) +{ + const void *fdt = gd->fdt_blob; + const u32 *reg; + const u32 *val; + int node, phandle, addr; + + /* Find the node by its full path */ + node = fdt_path_offset(fdt, path); + if (node >= 0) { + /* Look up phy-handle */ + val = fdt_getprop(fdt, node, "phy-handle", NULL); + if (val) { + phandle = fdt32_to_cpu(*val); + if (!phandle) + return -1; + /* Follow it to its node */ + node = fdt_node_offset_by_phandle(fdt, phandle); + if (node) { + /* Look up reg */ + reg = fdt_getprop(fdt, node, "reg", NULL); + if (reg) { + addr = fdt32_to_cpu(*reg); + return addr; + } + } + } + } + return -1; +} + #ifdef CONFIG_RESET_PHY_R /* Configure and enable MV88E1116 PHY */ void reset_phy(void) { u16 reg; - u16 devadr; - char *name = "egiga0"; + int phyaddr; + char *name = "ethernet-controller@72000"; + char *eth0_path = "/ocp@f1000000/ethernet-controller@72000/ethernet0-port@0"; if (miiphy_set_current_dev(name)) return; - /* command to read PHY dev address */ - if (miiphy_read(name, 0xEE, 0xEE, (u16 *)&devadr)) { - printf("Err..%s could not read PHY dev address\n", - __func__); + phyaddr = fdt_get_phy_addr(eth0_path); + if (phyaddr < 0) return; - } /* * Enable RGMII delay on Tx and Rx for CPU port * Ref: sec 4.7.2 of chip datasheet */ - miiphy_write(name, devadr, MV88E1116_PGADR_REG, 2); - miiphy_read(name, devadr, MV88E1116_MAC_CTRL_REG, ®); + miiphy_write(name, phyaddr, MV88E1116_PGADR_REG, 2); + miiphy_read(name, phyaddr, MV88E1116_MAC_CTRL_REG, ®); reg |= (MV88E1116_RGMII_RXTM_CTRL | MV88E1116_RGMII_TXTM_CTRL); - miiphy_write(name, devadr, MV88E1116_MAC_CTRL_REG, reg); - miiphy_write(name, devadr, MV88E1116_PGADR_REG, 0); + miiphy_write(name, phyaddr, MV88E1116_MAC_CTRL_REG, reg); + miiphy_write(name, phyaddr, MV88E1116_PGADR_REG, 0); /* reset the phy */ - miiphy_reset(name, devadr); + miiphy_reset(name, phyaddr); printf("88E1116 Initialized on %s\n", name); }