From owner-freebsd-arm@freebsd.org Tue Mar 16 18:37:25 2021 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E992568B82 for ; Tue, 16 Mar 2021 18:37:25 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F0MTc6vXhz3DbR for ; Tue, 16 Mar 2021 18:37:24 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f41.google.com with SMTP id u20so38256494iot.9 for ; Tue, 16 Mar 2021 11:37:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/pTU19mdglEQYoMGsFNY3kMpZYprK0TkeYkTc9UIYBU=; b=F1SpbYjd8GzZgDNDjpAFhZXLnO9VR2T9mR/Tu9QRPQZ7H/BDB1Kjv93EuORvbDa+pJ X1zCMmQJXQzWjCxJlDt944jRDpR3lRW4oyOhwqNWqfppZIgeW7ybiZEE9Q0aLnM1MqIB goWhQQJH+KWUJCqaGusgw3YrdkmdeFQJJ7OPyUayZYP7Oumrd37Bp33cJ6ROP2E7539z B27JakCz/6hm4hZfzbzUKg9Kbnpd8VmX69XeqOXVwFyiuptWaqcSYOORT5oKe9gUz3+z zNh0P2fwIenU2I2KW6jLqR9I6NB9HORlrGeU7Eo84ue6BGc2DKMoAhaJE+RNhZhkAEGz aFOA== X-Gm-Message-State: AOAM532DT0njGfvtxzBAM7UJfsMfmx4/+pvwobp9PZCR0hHgACR9YE+2 O3//ZvuFqA7ufinpiSM+faWq7ZtqmWeUszbZZFq+7mbsuGHFAA== X-Google-Smtp-Source: ABdhPJx7th1PXkKZDURKYaO0NkbhxoChlcQBcJrC+T3LeFeQTXekfONnI9ggS4NdEnHvBHCj9218zuCIkWczPf6RJjU= X-Received: by 2002:a5d:93cc:: with SMTP id j12mr4407303ioo.15.1615919843769; Tue, 16 Mar 2021 11:37:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ed Maste Date: Tue, 16 Mar 2021 14:36:19 -0400 Message-ID: Subject: Re: Activating RPi 3B+ network port LED's To: Ralf Wenk Cc: "freebsd-arm@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4F0MTc6vXhz3DbR X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting FreeBSD to ARM processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2021 18:37:25 -0000 On Tue, 16 Mar 2021 at 10:49, Ralf Wenk wrote: > > > Buildworld, buildkernel are running now to get a CURRENT from today. > > I will also update the contents of the MSDOS partition to match what > > is in the latest 14.0 image. > > As almost expected: No success. The Ethernet LEDs stayed dark. There are a couple of things I'm unsure about with respect to this issue. First, I did not see a microchip,led-modes entry in `ofwdump -a`. I'm not sure if this is expected or not. I do however see it in the dts dump (from `sysctl -b hw.fdt.dtb | dtc -I dtb -O dts`), and I've attached that extracted dts to PR 254267. For the second item, consider this excerpt from the dts: usb-port@1 { compatible = "usb424,2514"; ethernet@1 { local-mac-address = [...]; compatible = "usb424,7800"; mdio { ethernet-phy@1 { microchip,led-modes = <0x1 0x6>; }; }; }; }; Both usb_fdt_get_mac_addr() and muge_set_leds() obtain the fdt node from usb_fdt_get_node(). The MAC address is found as expected ("MAC assigned from FDT data" is printed), but the LED mode data is not. The driver attempts to fetch the LED mode data via OF_getencprop(node, "microchip,led-modes", modes, sizeof(modes)). I'm not really familiar with the OF_* routines, but as it stands the driver would require OF_getencprop() to search for properties in subnodes, and I don't think it does. We'd need to instead use the ethernet-phy@1 node in the OF_getencprop() call.