Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3142160pxj; Mon, 7 Jun 2021 03:29:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0SmSKBvXJsemoPwz2ntwGqzdonL0EB1SgjxZ7zEJcj+j3Si1YtTiWxe7uMTOndDex6zf9 X-Received: by 2002:a17:907:62a7:: with SMTP id nd39mr17238292ejc.502.1623061741255; Mon, 07 Jun 2021 03:29:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623061741; cv=none; d=google.com; s=arc-20160816; b=osX8GZq3wnXaBV0e2duJzI3vkYXM2HSJUW8x4QfejGUzsnb0y37yYoI9MnGKJ3BaDE o4f6vGIFNcPy9SVa3RGvMYdwea5gTtIUZnRSX8FMRVNyYe29Z8zOnf3qIEEnREhMEwyw MIOT+y6lj86pmwrXSqYMkyvnUlHxXrNtTgPHpVYwWpfdp45rCD0ryOsYNnre2+r+9f2v LmC0Rj3aZm0V1cASORw9q6RR3QaKjc4WgBTSAn+R2NuK6fV48kELH2gvsrPEqWXCEuw9 SzpWMMW/Ac4C+2N36XOErkQbtokCOkok+oBhYPF1NXLDLOD7t9I+qb/e2POAcJdpAOv7 XdFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=AGZ4t2IZtx3vp84RivJkuklm+6Eclk4GjnQsNM+4cwY=; b=1FiFIyA9cMgjgYkJb4LOOnAju/xbQtm0wwQzm0eW8qA0wUySEG0Qvd82XnsnoJuSC6 7l9WmXls4e4RfkhpOeuA0dYng63UyJEgkL2fax6RCLh2rkj953nPqp+3cwc1a3St8YIR KEyX9gXqGdFTuUeNCjb5wBfLRhTmkybL1DCpQprU+6WQB0+IG75jZfR53wWvpd99X9YX Jpi7uSZK0EEz6lPeCNmJTjUx7VISggntpe2c7It/j/rOr0CSzCxlZ71kLlmqEZE+efrY CTq5keK1LNF/q8G0CGKkLTQbWiwzh+QGyLo06ineOBCdHHDaTpF1LR44tmRp+SjiBKUj pnFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IS3GHMuZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bm2si13003966ejb.470.2021.06.07.03.28.38; Mon, 07 Jun 2021 03:29:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IS3GHMuZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230219AbhFGK31 (ORCPT + 99 others); Mon, 7 Jun 2021 06:29:27 -0400 Received: from mail-ed1-f51.google.com ([209.85.208.51]:34728 "EHLO mail-ed1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230097AbhFGK3Z (ORCPT ); Mon, 7 Jun 2021 06:29:25 -0400 Received: by mail-ed1-f51.google.com with SMTP id cb9so19723036edb.1; Mon, 07 Jun 2021 03:27:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=AGZ4t2IZtx3vp84RivJkuklm+6Eclk4GjnQsNM+4cwY=; b=IS3GHMuZYXL3+6Tp4HPoZ5enuZ34IX8rZx2bRRf3MRngY5SdMvqqyyTLauV6wTei4t C7JQ4cCpmCYUBwB2crFj3iMZiV8CRQbiecT5xc023UvriaSRz3G7D9oRBmxTGlF0nrK7 JG5DHCRKB3qm+6bqzzyKdJ+YT62SfWJM6IYWs5IIi2c+K9aqKvJuz3AaxynldiALf9Za 1htKh5RKL8eT1x7MQTi0kQZ2QscmWOS+y9Lcl8d8QANYTaUqp+xU4kOOj0wnqKnmQaCu 9qdSCE+sC11TkIuoigCgaihtiYzOgFdPBe6hmIySmOGUQNJgDdI6j+VlSsE6P8pxSwNY 4KKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AGZ4t2IZtx3vp84RivJkuklm+6Eclk4GjnQsNM+4cwY=; b=s5WXihdBx+hQhLaKEYsY8PP18mPQHziPaY51Et7CZ6em2A+WXhReMnMdU7fkTpzNFO MBZgviQSnP3NnyxPvG2a3PccfA4hzaPclrVriGJsn0nR2hAOvAESZzhl38x3ywP3jYI+ Rg54sjTupjkmwz155wRXJekavc3uGLk/KyNJDCHxjsYoKQ50doMO18l0tjWe+kQrndPY a/4o2hB/whv6Hu0PAtRh1VxPxbIr9LSPmrEnBSn06zBJza3wE5/W515WJZ7TiLw+6est YRo5fpPAoztYzKClSH+RiWGKdaXdfDeIoyd9wLAjiKpGYc8kbKNXpsAq2gQ8vraZ4rHa umwQ== X-Gm-Message-State: AOAM530it5SaxxMYguXkLhjWKAetcEbCZAeo8mmte7k7hmJZMl5snCVt P8ul/5+3wAsluP/POVz8Z4F8rVA3Ql3tlg== X-Received: by 2002:a50:9d8d:: with SMTP id w13mr19185406ede.94.1623061584372; Mon, 07 Jun 2021 03:26:24 -0700 (PDT) Received: from [192.168.2.2] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id h6sm3973285edj.91.2021.06.07.03.26.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Jun 2021 03:26:24 -0700 (PDT) Subject: Re: [PATCH] arm64: dts: rockchip: add EEPROM node for NanoPi R4S To: wens@kernel.org Cc: Tianling Shen , Rob Herring , Heiko Stuebner , Marty Jones , Pavel Machek , devicetree , linux-arm-kernel , "open list:ARM/Rockchip SoC..." , linux-kernel References: <20210607081727.4723-1-cnsztl@gmail.com> <9258ab23-ef65-2c3d-f0d2-ca5f77d7c12a@gmail.com> From: Johan Jonker Message-ID: Date: Mon, 7 Jun 2021 12:26:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chen-Yu, On 6/7/21 11:40 AM, Chen-Yu Tsai wrote: > On Mon, Jun 7, 2021 at 5:31 PM Johan Jonker wrote: >> >> Hi Tianling, >> >> On 6/7/21 10:17 AM, Tianling Shen wrote: >>> NanoPi R4S has a EEPROM attached to the 2nd I2C bus (U92), which >>> stores the MAC address. >>> >>> Signed-off-by: Tianling Shen >>> --- >>> arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts | 9 +++++++++ >>> 1 file changed, 9 insertions(+) >>> >>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts >>> index cef4d18b599d..4a82f50a07c5 100644 >>> --- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts >>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts >>> @@ -68,6 +68,15 @@ >>> status = "disabled"; >>> }; >>> >>> +&i2c2 { >>> + eeprom@51 { >>> + compatible = "microchip,24c02", "atmel,24c02"; >>> + reg = <0x51>; >>> + pagesize = <16>; >> >>> + read-only; /* This holds our MAC */ >> >> The mainline dts files should be generic I think. >> Any comment about "use", partitions or write ability should be avoided. >> It's up the user. > > Per the datasheet for this specific EEPROM, the latter half (128 bytes) > is read-only in hardware by design though. The 24AA02XEXX is programmed at the factory with a globally unique node address stored in the upper half of the array and permanently write-protected. The remaining 1,024 bits are available for application use. Just a question... nvmem-cells = <&mac_address>; nvmem-cells-names = "mac-address"; Which part does this point to? Can we use the lower part to store/rewrite this too? === From at24.yaml: items: - pattern: "^(atmel|catalyst|microchip|nxp|ramtron|renesas|rohm|st),(24(c|cs|lc|mac)[0-9]+|spd)$" - pattern: "^atmel,(24(c|cs|mac)[0-9]+|spd)$" How does Microchip 24AA025E48 fit the regex? What compatible would you advise? === Johan > > ChenYu >