From patchwork Wed Jul 3 08:47:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Simion X-Patchwork-Id: 13721530 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 8E8ABC2BD09 for ; Wed, 3 Jul 2024 08:48:50 +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: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=75Ut0yNDGOJZzb8j3WoSCRGs4FLsd6mZjk2VHtNM4Tg=; b=3I7ri9PHLJ96xBAgITa32fQCN4 lzVPa6tAvkTn95sNLRSM1fOCtDy45BP2kJgnPUKJV3A2FbaX5J77eV6cLzarQ6Tl3aBUuL955ctnd F8ekwWcaJH/btqoaijib87/n6d/JZ/oqA+Hn40GUmr0bHR3o97gPxf5nfG0Tj6u1nUsmfYQgSceeQ tTsGCY6wAXdZiZzEtxZh/yw8qPeYbCZ6CSq+XJV81VjV5qlLihggTrwglyiGmT8qQ3Rwdh7v9/Eya ko6t6Al3SbTcM09/aKd9cUrGCs+2cGzrJ1We2VM2MYLYBWJKn6059MV/JqunyX1BzYuhUNPxmSm94 i2eYmntA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOvfL-00000009TI4-230w; Wed, 03 Jul 2024 08:48:39 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOvf8-00000009TGI-3Zg6 for linux-arm-kernel@lists.infradead.org; Wed, 03 Jul 2024 08:48:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1719996507; x=1751532507; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=o8Vab3oK2e41iH2uJwl/mpjZ6PWChqVCRQGMvWU4P/s=; b=aewSVUCJFobiRMg0lheeoujwOt7bHPR/Oy1p9O7Vl6dhJskGoS5mAuvq 55a/43g15xmgmlWKQwYvVKuf/578Kf0lhNezmZZE5Wocsd89AUPyf4LIv faap2yIv7Wc5ruheWs3kM6HKktp14PA1IoCFVxxXVWyejNSW9hYYfMxoe WRPgF87MKOLyakPAHOmKs7jEXMwtN12iVDlMI5VNzHn8u8a+DAjEzpHqv oEvWxmM7pCs6epAOOFgj8z5sC4Bio3oIVrQJjyIc4y165mpjzbzAWQ9R3 JMsC5m0rZGbr4ZGkv0PDtl0wtB6Set6gQtNKQf1WGjmMsSm1rGHsmXpO/ g==; X-CSE-ConnectionGUID: saTZmC0lTLSxy+qNNP4X9w== X-CSE-MsgGUID: AeHk27KuT0eHZHRbTgphfA== X-IronPort-AV: E=Sophos;i="6.09,181,1716274800"; d="scan'208";a="28801127" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 03 Jul 2024 01:48:25 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) 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:47:58 -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:47:55 -0700 From: Andrei Simion To: , , , , , , , , CC: , , , , Andrei Simion Subject: [PATCH v4 0/3] Read MAC address through NVMEM for sama7g5ek Date: Wed, 3 Jul 2024 11:47:01 +0300 Message-ID: <20240703084704.197697-1-andrei.simion@microchip.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240703_014827_135682_C676953A X-CRM114-Status: GOOD ( 14.28 ) 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 Our main boot sequence : (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). This series proposes to add EEPROM support and reading MAC addresses through NVMEM (via Devicetree) for sama7g5ek: - Add in DT bindings document the EEPROM compatibles : "microchip,24aa025e48" and "microchip,24aa025e64" - Update to the driver to support "microchip,24aa025e48" and "microchip,24aa025e64". - Added the nodes in devicetree for eeproms where are stored EUI-48 MAC, and update gmac nodes to read the MAC via devicetree through NVMEM. ----------------------------------------------------------------------- v3 -> v4: * dt-bindings: eeprom: at24: Add Microchip 24AA025E48/24AA025E64 - update the rule to select compatible * eeprom: at24: Add support for Microchip 24AA025E48/24AA025E64 EEPROMs - Use AT24_CHIP_DATA with AT24_FLAG_READONLY - drop AT24_CHIP_DATA_CB_AO - drop AT24_CHIP_DATA_AO - drop u8 adjoff - change commit message * ARM: dts: microchip: at91-sama7g5ek: add EEPROMs - reword commit message v2 -> v3: * dt-bindings: eeprom: at24: Add Microchip 24AA025E48/24AA025E64 - commit subject changed to reference Microchip 24AA025E48/24AA025E64 - drop the pattern: mac02e4$ and mac02e6$ and a-z from regex - add these two devices down at the bottom - added Reviewed-by * eeprom: at24: avoid adjusting offset for 24AA025E{48, 64} - add specific compatible names according with https://ww1.microchip.com/downloads/en/DeviceDoc/24AA02E48-24AA025E48-24AA02E64-24AA025E64-Data-Sheet-20002124H.pdf - add extended macros to initialize the structure with explicit value for adjoff - drop co-developed-by to maintain the commit history (chronological order of modifications) * ARM: dts: at91: at91-sama7g5ek: add EEPROMs - change from atmel,24mac02e4 to microchip,24aa025e48 to align with the datasheet - drop co-developed-by to maintain the chronological order of the changes v1 -> v2: * dt-bindings: eeprom: at24: Add at24,mac02e4 and at24,mac02e6 - change pattern into "^atmel,(24(c|cs|mac)[a-z0-9]+|spd)$" to keep simpler * eeprom: at24: avoid adjusting offset for 24AA025E{48, 64} - no change * ARM: dts: at91: at91-sama7g5ek: add EEPROMs - remove unnecessary #address-cells #size-cells ----------------------------------------------------------------------- Andrei Simion (1): dt-bindings: eeprom: at24: Add Microchip 24AA025E48/24AA025E64 Claudiu Beznea (2): eeprom: at24: Add support for Microchip 24AA025E48/24AA025E64 EEPROMs ARM: dts: microchip: at91-sama7g5ek: add EEPROMs .../devicetree/bindings/eeprom/at24.yaml | 8 +++- .../arm/boot/dts/microchip/at91-sama7g5ek.dts | 40 +++++++++++++++++++ drivers/misc/eeprom/at24.c | 8 ++++ 3 files changed, 55 insertions(+), 1 deletion(-) base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233