From patchwork Tue May 4 12:41:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 12238027 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 B213AC433B4 for ; Tue, 4 May 2021 12:43:44 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3B1C161164 for ; Tue, 4 May 2021 12:43:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3B1C161164 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lduOt-0004Rq-9A for qemu-devel@archiver.kernel.org; Tue, 04 May 2021 08:43:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lduN2-0003qs-4t; Tue, 04 May 2021 08:41:48 -0400 Received: from mail-ot1-x32a.google.com ([2607:f8b0:4864:20::32a]:41545) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lduN0-0007J2-5C; Tue, 04 May 2021 08:41:47 -0400 Received: by mail-ot1-x32a.google.com with SMTP id c36-20020a05683034a4b02902a5b84b1d12so7671567otu.8; Tue, 04 May 2021 05:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZI/Y5KhzOyVR4Eea+CJes/TjhYkFO1T4zOnnXlLiM4g=; b=apGiFmGtaGKXkOKKgqywuruqww0FAJZefQhELHIp9Ph64PaNlHxVVD7rEgHLX7XR7D DdI1fhqLLFv9W50Pe8s1prpJt/ZVFef434bNld9luvtVBxniEJNXjmzxiQhQeOKTCbEv qPs/xcsrqzkuMWARzt+vU8FJCS8z8KDuTYoLONnS8SdogQ0fF74uH5IeIPF/Jsdy4+yI OX6XnUYpxId4S7GaBpOulmrqquSHMcUZUs4vnukbIipQx7RwWlkgzhYh26KqVaQT8EPt h3ilbQx3NeAv3oiYNBsivfw1Bx0URrlCdley5ZgmUsS1vdCkQ7iOe55TRydY7lHs15s7 JI0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=ZI/Y5KhzOyVR4Eea+CJes/TjhYkFO1T4zOnnXlLiM4g=; b=mId01Ybr93fm/bP894uy/xl+V8H+k/1RJseHwFgiZaLMrBp4xwW92YwqnpnzDqzo5t U0QrUvuK5N8fuza+V+TFvTaMQY5Uf88dDS5HOjFCFjdhE0618kvjDkxgLlz/h/0Psvs8 5VYYpWSSzWH4+p4cdmeIm09kE8fPloT0IeD9s6QPg/yiwL8HEXfICGMrQs2EoBYTZNi6 XM+qgML6X8UQ46w9sPcffPjkUeG8yl0xurpHKm+1kgb1gS/QII3jnl8IIDkWEqU4NPpd tF7YHJThmeguP9Lcqzh1bUTz8bbXRLauE+lXH9040/xciW06ptBp4TjR0pqAiZqWx9O3 Iy3A== X-Gm-Message-State: AOAM530Cl9qTf48+G1EcLGObegSoSB6qfPrKd3ETjFuZrY5Zd4poXmqs RFxqwXC1s85BbSRh1/wmRx8= X-Google-Smtp-Source: ABdhPJwJSZpyuPiTbvheRPH7QLAFc5Gcb32oP2ReO1JVQV74lhJDrWTou/VEhau5TiMCWhSgjM8emQ== X-Received: by 2002:a9d:8cb:: with SMTP id 69mr18789803otf.247.1620132104178; Tue, 04 May 2021 05:41:44 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id r124sm639703oig.38.2021.05.04.05.41.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 May 2021 05:41:43 -0700 (PDT) From: Guenter Roeck To: "Edgar E . Iglesias" Subject: [PATCH] hw/arm/xlnx: Fix PHY address for xilinx-zynq-a9 Date: Tue, 4 May 2021 05:41:40 -0700 Message-Id: <20210504124140.1100346-1-linux@roeck-us.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::32a; envelope-from=groeck7@gmail.com; helo=mail-ot1-x32a.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Alistair Francis , Bin Meng , qemu-devel@nongnu.org, qemu-arm@nongnu.org, Guenter Roeck Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Commit dfc388797cc4 ("hw/arm: xlnx: Set all boards' GEM 'phy-addr' property value to 23") configured the PHY address for xilinx-zynq-a9 to 23. When trying to boot xilinx-zynq-a9 with zynq-zc702.dtb or zynq-zc706.dtb, this results in the following error message when trying to use the Ethernet interface. macb e000b000.ethernet eth0: Could not attach PHY (-19) The devicetree files for ZC702 and ZC706 configure PHY address 7. The documentation for the ZC702 and ZC706 evaluation boards suggest that the PHY address is 7, not 23. Other boards use PHY address 0, 1, 3, or 7. I was unable to find a documentation or a devicetree file suggesting or using PHY address 23. The Ethernet interface starts working with zynq-zc702.dtb and zynq-zc706.dtb when setting the PHY address to 7, so let's use it. Cc: Bin Meng Signed-off-by: Guenter Roeck Reviewed-by: Bin Meng Acked-by: Edgar E. Iglesias --- hw/arm/xilinx_zynq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index 8db6cfd47f..5ac0294f9e 100644 --- a/hw/arm/xilinx_zynq.c +++ b/hw/arm/xilinx_zynq.c @@ -119,7 +119,7 @@ static void gem_init(NICInfo *nd, uint32_t base, qemu_irq irq) qemu_check_nic_model(nd, TYPE_CADENCE_GEM); qdev_set_nic_properties(dev, nd); } - object_property_set_int(OBJECT(dev), "phy-addr", 23, &error_abort); + object_property_set_int(OBJECT(dev), "phy-addr", 7, &error_abort); s = SYS_BUS_DEVICE(dev); sysbus_realize_and_unref(s, &error_fatal); sysbus_mmio_map(s, 0, base);