From patchwork Wed Jul 3 08:47:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Simion X-Patchwork-Id: 13721532 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 37F02C30653 for ; Wed, 3 Jul 2024 08:49:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: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:List-Owner; bh=Lc8yMpDceVE2WHGv92RnmheqY6gsjGPaSMTHzK05GRU=; b=H4Vay8AO7vV4IA6Ir4TV8uHkus EC0gClL3+QDZJxjzPiKlhne0/Skk3XyNwevmFzea+I+Wn6L/57TVFa2ruq6J7agPCceoEEK9XNnki VPj3NAuNlmmQAubVYaf1fwp4lRMd72uhkSq+21p94ZjRswoV4Ut6xVquOZpANzZCIj4wXVeo8pOiZ 9NrgLwDGzxSLkoSuktSa8LzN9+m3P3wL6HCYSdON3IxV272rLNkxtnm8OPasFOp6SUIfWoYfULeoh LqsgJXPbdbcryDp3x2eu5kx75glBlhP4pN0IIlGa0hdtIx+N+CIxklq5zOXyz+vJV6Iln6DRb2VQ8 CzsQXjDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOvfe-00000009TOm-0rPB; Wed, 03 Jul 2024 08:48:58 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOvfG-00000009TGo-3MOX for linux-arm-kernel@lists.infradead.org; Wed, 03 Jul 2024 08:48:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1719996514; x=1751532514; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yJKh9MN0G/jN/6D64ek5o6PiA/bzUrBrFHRw4k29LUw=; b=1dMH6ZKl2fzXVbBgaFpTni/qgODnHnJYbIwu1D0wt2ATZbk6IWYS+BlW YHXHcSdgdm3FY5JYIuLVfbfCF76lsUYdcUOsphgyf2YxeNwBD5E7s/Orv dKRqp4C5pXRMR5JS4aVTA3FP+Y2gCw5+Jq3aAwSIawFpsGx6OrPezgCpq PxVxQkujv0OOsyLYxRcFkU086x4el/6K2DZ4o2b3fcC2BPvB8IHN7v7xj BwfEay/JI2m8vlbcnLXN6SLOBwDBNIBUv5GW/nltC+BNEH+J0W5E6Z594 xQvFEjDDziqqpOZGYUtMgrutL6PUZendfl2GJrto3pqmvmsFk1UryxaR1 g==; X-CSE-ConnectionGUID: s71X572eQVinIeDMsyDqRg== X-CSE-MsgGUID: /kdSH4kKTWGcJZtboUz+cA== X-IronPort-AV: E=Sophos;i="6.09,181,1716274800"; d="scan'208";a="196193659" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 03 Jul 2024 01:48:30 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 3 Jul 2024 01:48:05 -0700 Received: from ROB-ULT-M76677.microchip.com (10.10.85.11) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Wed, 3 Jul 2024 01:48:02 -0700 From: Andrei Simion To: , , , , , , , , CC: , , , , Claudiu Beznea , Andrei Simion Subject: [PATCH v4 2/3] ARM: dts: microchip: at91-sama7g5ek: add EEPROMs Date: Wed, 3 Jul 2024 11:47:03 +0300 Message-ID: <20240703084704.197697-3-andrei.simion@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240703084704.197697-1-andrei.simion@microchip.com> References: <20240703084704.197697-1-andrei.simion@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240703_014834_936480_8A2007E2 X-CRM114-Status: GOOD ( 12.67 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Claudiu Beznea Our main boot sequence is (1) ROM BOOT -> AT91Bootstrap -> U-Boot -> Linux Kernel. U-Boot is the stage where we set up the MAC address. Also we can skip U-Boot and use the following boot sequence : (2) ROM BOOT -> AT91Boostrap -> Linux Kernel. Add EEPROMs and nvmem-layout to describe eui48 MAC address region to be used for case (2). Signed-off-by: Claudiu Beznea [andrei.simion@microchip.com: Add nvmem-layout to describe eui48 mac region. Align compatible name with datasheet. Reword commit message.] Signed-off-by: Andrei Simion --- v3 -> v4: - reword commit message - change commit title v2 -> v3: - change from atmel,24mac02e4 to microchip,24aa025e48 to align with datasheet - drop co-developed-by to maintain the chronological order of the changes v1 -> v2: - remove unnecessary #address-cells #size-cells --- .../arm/boot/dts/microchip/at91-sama7g5ek.dts | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm/boot/dts/microchip/at91-sama7g5ek.dts b/arch/arm/boot/dts/microchip/at91-sama7g5ek.dts index 20b2497657ae..40f4480e298b 100644 --- a/arch/arm/boot/dts/microchip/at91-sama7g5ek.dts +++ b/arch/arm/boot/dts/microchip/at91-sama7g5ek.dts @@ -403,6 +403,42 @@ i2c8: i2c@600 { i2c-digital-filter; i2c-digital-filter-width-ns = <35>; status = "okay"; + + eeprom0: eeprom@52 { + compatible = "microchip,24aa025e48"; + reg = <0x52>; + size = <256>; + pagesize = <16>; + vcc-supply = <&vdd_3v3>; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom0_eui48: eui48@fa { + reg = <0xfa 0x6>; + }; + }; + }; + + eeprom1: eeprom@53 { + compatible = "microchip,24aa025e48"; + reg = <0x53>; + size = <256>; + pagesize = <16>; + vcc-supply = <&vdd_3v3>; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom1_eui48: eui48@fa { + reg = <0xfa 0x6>; + }; + }; + }; }; }; @@ -440,6 +476,8 @@ &pinctrl_gmac0_mdio_default &pinctrl_gmac0_txck_default &pinctrl_gmac0_phy_irq>; phy-mode = "rgmii-id"; + nvmem-cells = <&eeprom0_eui48>; + nvmem-cell-names = "mac-address"; status = "okay"; ethernet-phy@7 { @@ -457,6 +495,8 @@ &gmac1 { &pinctrl_gmac1_mdio_default &pinctrl_gmac1_phy_irq>; phy-mode = "rmii"; + nvmem-cells = <&eeprom1_eui48>; + nvmem-cell-names = "mac-address"; status = "okay"; /* Conflict with pdmc0. */ ethernet-phy@0 {