Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp314375lql; Mon, 11 Mar 2024 03:45:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUD3qSGqKAh26jExHsbp7RuPQ3ROEH0QrK65RCshF8s2NkDhlmB59SmY51K9vhtnXA4Q4dimwUNRgOdJnsR/Wl1ul4x9e/6Y4jxReIlZg== X-Google-Smtp-Source: AGHT+IFKv4tVAO96SrXU93UqE8VvUy2LseVvV6qOxXEqSAikACl2tX0ycmlaNvUiPwmdjyueALBm X-Received: by 2002:a0c:fec6:0:b0:690:cff7:bdd2 with SMTP id z6-20020a0cfec6000000b00690cff7bdd2mr3144545qvs.47.1710153936139; Mon, 11 Mar 2024 03:45:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710153936; cv=pass; d=google.com; s=arc-20160816; b=jNi025yKUCOe3FmFr7uaGNn6MM91dez5Ult83g/ZtW6ogFmuq5rzxeNJeinDK1SrYD cGtSyLEaQRmJyhDcS6ZApAkZmBBbOSvCDqvajr71Q/11OVU9bGf/EqFtrQ/RSHWKRyTx WChjluBKM4S3vpyRYcli3LbBX99LJupNkus3e8MEvbBaKYSzGvACy6IAsLmYzsagqz8z dRd/3Jh5nnkoflXmDxLjN9U2LebMv6DCLt42Y8BtBHwOBuWAuv9MCBaTpaMcB97FwL9E ocTWfTPLKDqB3kN6lRQO8QizTfti3VMoI7Sma8/u59hymFNyD+TDm5CHBzjpPebnqt0D 6d0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=brk8hEUtZhRYQimGd+K1WoJ4/pWrBZiyIAP9nhQEREs=; fh=xeFh299P/bkya+/xNZw6uqdHHHtn7E+GIPnUdva1CGA=; b=bGwK2n/7clkVSXnqH4XK5n4i8tqVNDxzxXnY+LimJGPhMQU7c3XHfvsIQ+dXMf/Gr/ mqpLxDQg9YBMkh6D1qQi81XshYFnFy6owuJUcogDHnqGGWBJ5AzpmsTGQTFTqd2qGOZo v+AugKWNEi30rE7N/2DeCrQhP33Wt2CUMY3FIE8P9rdp4sCTW+h8ahCrzcoYjy6M+gKu uuuC5X27aH53vkBpdANHsbtLbYq5iyFlueeq0IZ6YCVymz5EXO9Sv5OiRI3hMJ31Q9xL z6SoiuO8R4KGEdit3IL7rP9u2J8HOhYNJAEx9HpNlcOuiXEr4JHz1vlR5MP0HN06LIYT l9fw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hyt+S1xV; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-98713-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98713-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id kr12-20020a0562142b8c00b00690bfb207fesi4725855qvb.279.2024.03.11.03.45.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 03:45:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98713-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hyt+S1xV; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-98713-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98713-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DAD5D1C2146D for ; Mon, 11 Mar 2024 10:45:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3DADF3A1BE; Mon, 11 Mar 2024 10:45:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="hyt+S1xV" Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A4AF638DD2; Mon, 11 Mar 2024 10:45:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710153910; cv=none; b=erS+JJsjgKvMV6IKBzwqFPLxF4WxIfDy67ft1cEJ14ugThNotzrEgmzv8H/ppoQkUKKwl6lLuTEziZVkF1yszsnEZwhEETEHO6Re0O4PSY6n82aw0Drio2zZjTsG6JAgAPCZhAwvvXulQcnb9cqCVpdTKsXb10L/JOL57ZUGWME= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710153910; c=relaxed/simple; bh=+sxHONNnx1hFuxK0YIAbVsDwlEeH+igDtPPWM75FSv4=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=BFPUNGZmw6t0ICYdgYH/9TqOjoDrZAmY4uqeNSA20oOfndeBzIMlHuK1Rg5KPZUN2590axFouflHR12AX5NS6+HnFOliCQPOJt2ZKuVMUtCVcxWP7rGmwSUDr6st/JEcxGVYJrN3IdXpzG1uSbsAM2Hd8TQDP2A84ulWYr6G2gg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=hyt+S1xV; arc=none smtp.client-ip=198.47.23.249 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42BAiruH107557; Mon, 11 Mar 2024 05:44:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1710153893; bh=brk8hEUtZhRYQimGd+K1WoJ4/pWrBZiyIAP9nhQEREs=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=hyt+S1xVq5Aa03sAcOxLAYUTmzaRTG91NigalPACIk2CoYlzcA3vdQNQtQgbS9Jfx 73lEWYCDa/Y0xGf7by0MS0M2mW6ZkVY7rXCLUO5vT+68zy9X1lNpyIyGBBQWSLuchf 7K8GFf9kG6LK4f9D6TlDMN3rrOXURGXSNUAl5MAI= Received: from DFLE106.ent.ti.com (dfle106.ent.ti.com [10.64.6.27]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42BAirPa113120 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 11 Mar 2024 05:44:53 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 11 Mar 2024 05:44:52 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 11 Mar 2024 05:44:52 -0500 Received: from [172.24.227.220] (chintan-thinkstation-p360-tower.dhcp.ti.com [172.24.227.220]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 42BAikUT105135; Mon, 11 Mar 2024 05:44:47 -0500 Message-ID: <0512d57f-af22-4bd8-8266-33d943d7eb4a@ti.com> Date: Mon, 11 Mar 2024 16:14:46 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/6] arm64: dts: ti: k3-j784s4: Add alias to MCU CPSW2G Content-Language: en-US To: Andrew Davis , Peter Rosin , Greg Kroah-Hartman , Conor Dooley , Krzysztof Kozlowski , Rob Herring , Tero Kristo , Vignesh Raghavendra , Nishanth Menon CC: , , , , , , References: <20240131101441.1362409-1-c-vankar@ti.com> <20240131101441.1362409-3-c-vankar@ti.com> <469a7f15-0539-48e9-993c-5b9c638917e0@ti.com> From: Chintan Vankar In-Reply-To: <469a7f15-0539-48e9-993c-5b9c638917e0@ti.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On 31/01/24 21:06, Andrew Davis wrote: > On 1/31/24 4:14 AM, Chintan Vankar wrote: >> Add alias for the MCU CPSW2G port to enable Linux to fetch MAC Address >> for the port directly from U-Boot. > > Could you explain *how* this alias allows Linux to fetch a MAC > address from U-Boot? Sounds like we are doing something hacky here.. > Using "probe_daughtercards()" function U-Boot parses MAC addresses from EEPROM, then it internally calls "eth_env_set_enetaddr_by_index()" function which stores these MAC addresses into environment variables ethaddr, eth1addr, eth2addr and so on based on number of ports. U-Boot loads DTB during boot process, and it calls "fdt_fixup_ethernet()" function, which uses environment variables to update MAC addresses of ethernet ports as specified in the aliases section. > Why can't Linux fetch the MAC from efuses the same way U-Boot does, Linux can fetch the MAC address from efuses if "ti,syscon-efuse" property is enabled. > what happens if I don't use U-Boot to boot? If you don't use U-Boot to boot then the equivalent of "probe_daughtercards()" has to be implemented which is currently missing. > > Andrew > >> --- >>   arch/arm64/boot/dts/ti/k3-j784s4-evm.dts | 1 + >>   1 file changed, 1 insertion(+) >> >> diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts >> b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts >> index f34b92acc56d..b74f7d3025de 100644 >> --- a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts >> +++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts >> @@ -27,6 +27,7 @@ aliases { >>           mmc1 = &main_sdhci1; >>           i2c0 = &wkup_i2c0; >>           i2c3 = &main_i2c0; >> +        ethernet0 = &mcu_cpsw_port1; >>       }; >>       memory@80000000 {