From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 43488CD1292 for ; Thu, 4 Apr 2024 12:46:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=4z7Ah0hiJNLW40MC3KROUrDcNDmpFBRdNjUdBdFR2kc=; b=SFGZF/M9JvE82/ ZVNslecXxGnGT0B76PvQqnhAyRTtQ6zHohg4gaAWBPMvAv6SXP0DPn1w592kHciL0Ny93/JG00gss Zjr2Shsd1Bx1ZVzgbvi76qdgW3hiaA7czYSY29RqXjxFjaIuCT4ApbHzy7wr9pe+LtVbAJhu7BjWQ 2PcNvhP5DtgOW6EbGBsr8YoRXB8A+zM6zzwkSNli/MvYNtrVvOKiiEof3ITc/dW6P6yV4C8NsNCH6 9iO1F8iJ7CO2eR88OhLEhABImh65+HCPSpbva23dPggSoEQktWnfjHBCumgRz6vmC23A7a3QYF99B dr5EvVXpy+FjZgyuy1dA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsMU8-00000002hgP-0dRU; Thu, 04 Apr 2024 12:46:28 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsMU4-00000002heS-2cmj for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2024 12:46:26 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 434CkJtG031225; Thu, 4 Apr 2024 07:46:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1712234779; bh=qJg1mXxEBeSMHwRCIuB9hLceXhAMTVZyXHOqCCpB/kQ=; h=From:To:CC:Subject:Date; b=INwBympiz9+H+p/rPLx76IjQMfYsO/3ee8Tdgq2rZ6cihVSpKNxClCFjo6vQzHf0Z ZirSByzB+OKq7vqWy4DehAgkZj04M4v5iPTNbighs48m53yaeQRf0oXjA17XWe7xH3 15brUwoJlVCBZf85ecWPkejaFTWte8UCQGk2lcTQ= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 434CkJwv119773 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 4 Apr 2024 07:46:19 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 4 Apr 2024 07:46:19 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE105.ent.ti.com (10.64.6.26) 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; Thu, 4 Apr 2024 07:46:18 -0500 Received: from uda0492258.dhcp.ti.com (uda0492258.dhcp.ti.com [172.24.227.9]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 434CkFK0077955; Thu, 4 Apr 2024 07:46:16 -0500 From: Siddharth Vadapalli To: , , , , , CC: , , , , Subject: [PATCH v3] arm64: dts: ti: k3-am62p: use eFuse MAC Address for CPSW3G Port 1 Date: Thu, 4 Apr 2024 18:16:14 +0530 Message-ID: <20240404124614.891416-1-s-vadapalli@ti.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240404_054624_773586_68184FEC X-CRM114-Status: GOOD ( 14.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the "ethernet-mac-syscon" node within "wkup_conf" node corresponding to the CTRLMMR_MAC_IDx registers within the CTRL_MMR space. Assign the compatible "ti,am62p-cpsw-mac-efuse" to enable "syscon_regmap" operations on these registers. The MAC Address programmed in the eFuse is accessible through the CTRLMMR_MAC_IDx registers. The "ti,syscon-efuse" device-tree property points to the CTRLMMR_MAC_IDx registers, allowing the CPSW driver to fetch the MAC Address and assign it to the network interface associated with CPSW3G MAC Port 1. Signed-off-by: Siddharth Vadapalli --- This patch is based on linux-next tagged next-20240404. Patch depends on: https://patchwork.kernel.org/project/linux-arm-kernel/patch/20240402105708.4114146-1-s-vadapalli@ti.com/ for the newly added "ti,am62p-cpsw-mac-efuse" compatible. v2: https://patchwork.kernel.org/project/linux-arm-kernel/patch/20240404081845.622707-1-s-vadapalli@ti.com/ Changes since v2: - Renamed "cpsw-mac-efuse" node as "ethernet-mac-syscon" based on Krzysztof's suggestion. - Renamed "cpsw_mac_efuse" label as "cpsw_mac_syscon" to match node naming convention. - Updated node-name in commit message to "ethernet-mac-syscon". v1: https://patchwork.kernel.org/project/linux-arm-kernel/patch/20240402094200.4036076-1-s-vadapalli@ti.com/ Changes since v1: - Since "wkup_conf" is modelled as a "simple-bus" rather than being modelled as a System Controller node with the "syscon" compatible, directly passing the reference to the "wkup_conf" node using the "ti,syscon-efuse" device-tree property will not work. Therefore, I posted the patch at: https://patchwork.kernel.org/project/linux-arm-kernel/patch/20240402105708.4114146-1-s-vadapalli@ti.com/ in order to add a new compatible to be used for modelling the CTRLMMR_MAC_IDx registers as System Controller nodes, thereby allowing the existing "ti,syscon-efuse" property to be used. Now, "ti,syscon-efuse" points to the "cpsw_mac_efuse" node within "wkup_conf" node, with "cpsw_mac_efuse" being a "syscon" node. Logs verifying that the CPSW driver assigns the MAC Address from the eFuse based on the CTRLMMR_MAC_IDx registers at 0x43000200 and 0x43000204 to the interface eth0 corresponding to CPSW3G MAC Port 1: https://gist.github.com/Siddharth-Vadapalli-at-TI/63473d68e7a34860566c1339ce3da9f0 arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi index 7337a9e13535..21020b7d3034 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi @@ -696,6 +696,7 @@ cpsw_port1: port@1 { label = "port1"; phys = <&phy_gmii_sel 1>; mac-address = [00 00 00 00 00 00]; + ti,syscon-efuse = <&cpsw_mac_syscon 0x0>; }; cpsw_port2: port@2 { diff --git a/arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi index a84756c336d0..7469b3d3a8c9 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi @@ -18,6 +18,11 @@ chipid: chipid@14 { reg = <0x14 0x4>; bootph-all; }; + + cpsw_mac_syscon: ethernet-mac-syscon@200 { + compatible = "ti,am62p-cpsw-mac-efuse", "syscon"; + reg = <0x200 0x8>; + }; }; wkup_uart0: serial@2b300000 { -- 2.40.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel