From nobody Sat Oct 4 14:17:02 2025 Received: from mx08-007fc201.pphosted.com (mx08-007fc201.pphosted.com [91.207.212.40]) (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 7EB3C2FCBEC; Fri, 15 Aug 2025 09:59:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.40 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755251957; cv=none; b=Oi6u7gl42H86Xi7HTf9EdQaY2nBHGFgfvRC0zLc3UGHCa6UgIn/ScGxI+lu4jR0o0S5PTx2J/28BpVuH4wXswBU22LK7y+CE887bwnzMVPOQyTy8HvCuqMADjOXuQ245NKqI856+4at5knr9cN/uxhw9gCytZguluL6FO/NAaeg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755251957; c=relaxed/simple; bh=JrZBB9SjSEr3RHgKI0yjaY++p4/8sPNT9N7zdkldrT4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eycBiiSkFAvXJ9q5gJJ66unzr/BtXkDA3hGQ++aa/9YlhbTye1ghjJ+DBhZCG5dyhoAcvtTKNDxzxnrqhwZlK0Ocd+Tmwr2KQMSfsS4WTuYYr1R/zC6beMBBs3MW8/qZJIpnsKm2dN/nVFOel0awfDQM1J/UqntIAaNKv5rWKPw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cab.de; spf=pass smtp.mailfrom=cab.de; dkim=pass (2048-bit key) header.d=cab.de header.i=@cab.de header.b=BHVkfmRH; arc=none smtp.client-ip=91.207.212.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cab.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cab.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cab.de header.i=@cab.de header.b="BHVkfmRH" Received: from pps.filterd (m0456229.ppops.net [127.0.0.1]) by mx08-007fc201.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 57F9wt85265753; Fri, 15 Aug 2025 11:58:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cab.de; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp-2025; bh=ws dFspxcJ7fT6GiwQeEWt/cQe22eZH3hxAMd5rKDcBQ=; b=BHVkfmRHJKg4eyRlXI Ty5U+k72lnVs63h4rr55WUCy0w2FfvBpVGl3sLJD45FvefMjrmiWvTlrwNwaEjkW cV95Z928DP8/FVyIGA+JujMthNpRRupgPrErMAxP1HuDbPvXL5SHahAcAIJW4p7C 7vrQ/EaldVpKQNu1s7h5PH6Kw4eh+E4BnDoT11WxARtfx7w6vrWcNF/h87MnlqvZ sIQGS3f8hLGPQAIBX5qR6vyN0K1lQkVVXbsn4QkVPam4MNUVhRGASwhhHp8watr8 Apu19SmeN0G7z/u2q1hnu4AXDnZ5g2VZAWUSZejX/+yyPWfrsrtudIMFeMHHGqEo 7A6A== Received: from adranos.cab.de (adranos.cab.de [46.232.229.107]) by mx08-007fc201.pphosted.com (PPS) with ESMTPS id 48fqcpsbfb-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Aug 2025 11:58:56 +0200 (MEST) Received: from KAN23-025.cab.de (10.10.3.180) by Adranos.cab.de (10.10.1.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.36; Fri, 15 Aug 2025 11:59:11 +0200 From: Markus Heidelberg To: Arnd Bergmann , Greg Kroah-Hartman , CC: Markus Heidelberg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Christian Eggers , Alexander Sverdlin , Jiri Prchal , Subject: [PATCH v2 1/3] dt-bindings: eeprom: at25: use "size" for FRAMs without device ID Date: Fri, 15 Aug 2025 11:58:36 +0200 Message-ID: <20250815095839.4219-2-m.heidelberg@cab.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250815095839.4219-1-m.heidelberg@cab.de> References: <20250815095839.4219-1-m.heidelberg@cab.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: Adranos.cab.de (10.10.1.54) To Adranos.cab.de (10.10.1.54) X-Proofpoint-ORIG-GUID: xJzdvML5RlH9LQ9zc2t49L7GhaIygMk1 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODE1MDA4MCBTYWx0ZWRfXxh0tlf4dDdSC ODfMyG0CSXhG6+iqanpSqdlnkR7+hzxYxRpMmNmEIDBmJmLyTJBXU0uPO3AjfNdRZ6sEToIIp5n GE0yMhkvPV4dSP5tJwOUAFvrre6dGpfd2oUDJwQbqqxWUAODobDcq4AjLvDYkqjuj6pC7V1WF2C CfrZm2AhLxSr/vo+R5eyWJvUs3FSTjST54KVEdHgS0rF7+8X6Qhe8EtAOaagJlpUlYseM8f5Gwt C7YVA5S9acuda5NNj43GikC/Wb/OKQ2OMfBVGJR6GjADKA8zyjok/X4Sq1ADC8TDZ2U9NY+uYFu mgp0DVwuy6qVRmkwWfBLiREvVudPNXYBRO3afXujJ4zLCyfJpnHIhcLFZWyBaI= X-Authority-Analysis: v=2.4 cv=bctrUPPB c=1 sm=1 tr=0 ts=689f04e0 cx=c_pps a=LmW7qmVeM6tFdl5svFU9Cg==:117 a=LmW7qmVeM6tFdl5svFU9Cg==:17 a=kldc_9v1VKEA:10 a=2OwXVqhp2XgA:10 a=VwQbUJbxAAAA:8 a=WIdweGkvO5YuuAzG6HcA:9 X-Proofpoint-GUID: xJzdvML5RlH9LQ9zc2t49L7GhaIygMk1 Content-Type: text/plain; charset="utf-8" Not all FRAM chips have a device ID and implement the corresponding read command. Thus the memory size, which is contained in the device ID, cannot be detected and has to be set manually as it is done for EEPROMs. Link: https://lore.kernel.org/all/20250401133148.38330-1-m.heidelberg@cab.d= e/ Signed-off-by: Markus Heidelberg Reviewed-by: Rob Herring (Arm) --- Documentation/devicetree/bindings/eeprom/at25.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/eeprom/at25.yaml b/Documenta= tion/devicetree/bindings/eeprom/at25.yaml index c31e5e719525..00e0f07b44f8 100644 --- a/Documentation/devicetree/bindings/eeprom/at25.yaml +++ b/Documentation/devicetree/bindings/eeprom/at25.yaml @@ -56,6 +56,7 @@ properties: $ref: /schemas/types.yaml#/definitions/uint32 description: Total eeprom size in bytes. + Also used for FRAMs without device ID where the size cannot be detec= ted. =20 address-width: $ref: /schemas/types.yaml#/definitions/uint32 @@ -146,4 +147,11 @@ examples: reg =3D <1>; spi-max-frequency =3D <40000000>; }; + + fram@2 { + compatible =3D "cypress,fm25", "atmel,at25"; + reg =3D <2>; + spi-max-frequency =3D <20000000>; + size =3D <2048>; + }; }; --=20 2.43.0 From nobody Sat Oct 4 14:17:02 2025 Received: from mx08-007fc201.pphosted.com (mx08-007fc201.pphosted.com [91.207.212.40]) (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 944AA2D3A71; Fri, 15 Aug 2025 09:59:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.40 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755251956; cv=none; b=QMNHIdOsg2dn86tmqQni55jAGinPFxO368QN9lK1DTNT+Awg+ueFGZVWqBivddcjR3ArS/TTbAKcNMPbWwcaCj1BXPAt7o4OFtYGmzNnTdAWx2prRfeLrw+z9SuSc/bSiPYgyj6FOFJYAJ4wsxAxWW6Q6vuyEj0HLs3L/5js1GE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755251956; c=relaxed/simple; bh=ON0kCnNAKPyE0hvO/awFtYwGiNRCQmLNTY6HMQbjTq4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JkorGmzFwk0KmWVSF+s9XltmOnwLIf5h7xKzZQVs3W6n4c5uiMbk58uF5s5rk6N2Kh0ZDYHjRkL3WoRQZXGOjr8ul1fsTAkq0z4D2TsPjNXHy50q3OO90RaK3umHZZuUIrncr4s+QN+kgKTMP7R3WEHG5/pmqeev24elJKO0NFI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cab.de; spf=pass smtp.mailfrom=cab.de; dkim=pass (2048-bit key) header.d=cab.de header.i=@cab.de header.b=2iKRGpDU; arc=none smtp.client-ip=91.207.212.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cab.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cab.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cab.de header.i=@cab.de header.b="2iKRGpDU" Received: from pps.filterd (m0456229.ppops.net [127.0.0.1]) by mx08-007fc201.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 57F9wt86265753; Fri, 15 Aug 2025 11:58:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cab.de; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp-2025; bh=w+ XeOnLX9GOfAbfcK2+8jxCZSldesJ5OP2+IrSmHnzc=; b=2iKRGpDUnW1anVRlHR mMvZZxCD/KT6T46TBQqg/cVyj3KFeohhWeihON2hT5bSZ9DvwJiAulxCQINBxRXV CBr1S3f0YIvYYy6KUOsf9hY04B93mWYuRN6s0rNMhgkRGgMBlfLzm5qem8lWrKj0 QpCMk0fAa9Fu+94rff4368O2UAbAPLyNBsewDR4peMMHriA13e+iNusuV+5DIE1L hDWrK/9Kxrtihdm2/KuvK8cMSCzVtYDthN8vjSn4KCl5e3V5WxGergrtBbJ4uqs9 zlMH3Hll0Mctt/skMPs7moa/qyvhY8WRCUlemuaV3/Pa7gqciylE7MiHM4Wt2a0D 8mcA== Received: from adranos.cab.de (adranos.cab.de [46.232.229.107]) by mx08-007fc201.pphosted.com (PPS) with ESMTPS id 48fqcpsbfb-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Aug 2025 11:58:56 +0200 (MEST) Received: from KAN23-025.cab.de (10.10.3.180) by Adranos.cab.de (10.10.1.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.36; Fri, 15 Aug 2025 11:59:11 +0200 From: Markus Heidelberg To: Arnd Bergmann , Greg Kroah-Hartman , CC: Markus Heidelberg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Christian Eggers , Alexander Sverdlin , Jiri Prchal , Subject: [PATCH v2 2/3] eeprom: at25: support Cypress FRAMs without device ID Date: Fri, 15 Aug 2025 11:58:37 +0200 Message-ID: <20250815095839.4219-3-m.heidelberg@cab.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250815095839.4219-1-m.heidelberg@cab.de> References: <20250815095839.4219-1-m.heidelberg@cab.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: Adranos.cab.de (10.10.1.54) To Adranos.cab.de (10.10.1.54) X-Proofpoint-ORIG-GUID: qZxtB2SIk1Ug5wOySF0goSb8YTMCAJlL X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODE1MDA4MCBTYWx0ZWRfX5fDhVwC1vkc4 5/uX/vlxl3BocfzLj0fvrTtETeRDTugYGgy9ay7fO6/xCc6qi4mKZzo6F1rZv6vIHhMMcEgtdTT H0PVrRWJVhdEFQvDFBfEzUur52/qB0a5E69AZod7HUqaoP0eES4NIl9A8fAOqMd90FMhP3u65kv NnpF0Yqa4o5gEgP75FSBs86g3hoomAkdaXPaDpiBLCa0x5cr04Klg9qOoF6um+lnzEski1hH8ch HySNguPG7iThequXkJAbCCrBPzREOBDtizBrimkrhSuY5yVD8Wi/Qw2WSvZjIxhMEL9/MNvNeu4 eKVTCYhNTGiqssiZgjkVVTM3mEFnZuZD4h18x5+fEcFJs573QVXDajMW3+slsI= X-Authority-Analysis: v=2.4 cv=bctrUPPB c=1 sm=1 tr=0 ts=689f04e0 cx=c_pps a=LmW7qmVeM6tFdl5svFU9Cg==:117 a=LmW7qmVeM6tFdl5svFU9Cg==:17 a=kldc_9v1VKEA:10 a=2OwXVqhp2XgA:10 a=VwQbUJbxAAAA:8 a=pGLkceISAAAA:8 a=rCJ37w5iS5YF4Iu26g0A:9 X-Proofpoint-GUID: qZxtB2SIk1Ug5wOySF0goSb8YTMCAJlL Content-Type: text/plain; charset="utf-8" Not all FRAM chips have a device ID and implement the corresponding read command. For such chips this led to the following error on module loading: at25 spi2.0: Error: no Cypress FRAM (id 00) The device ID contains the memory size, so devices without this ID are supported now by setting the size manually in Devicetree using the "size" property. Tested with FM25L16B and "size =3D <2048>;": at25 spi2.0: 2 KByte fm25 fram, pagesize 4096 According to Infineon/Cypress datasheets, these FRAMs have a device ID: FM25V01A FM25V02A FM25V05 FM25V10 FM25V20A FM25VN10 but these do not: FM25040B FM25640B FM25C160B FM25CL64B FM25L04B FM25L16B FM25W256 So all "FM25V*" FRAMs and only these have a device ID. The letter after "FM25" (V/C/L/W) only describes the voltage range, though. Link: https://lore.kernel.org/all/20250401133148.38330-1-m.heidelberg@cab.d= e/ Signed-off-by: Markus Heidelberg Reviewed-by: Alexander Sverdlin --- drivers/misc/eeprom/at25.c | 67 ++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c index 2d0492867054..c90150f72836 100644 --- a/drivers/misc/eeprom/at25.c +++ b/drivers/misc/eeprom/at25.c @@ -379,37 +379,49 @@ static int at25_fram_to_chip(struct device *dev, stru= ct spi_eeprom *chip) struct at25_data *at25 =3D container_of(chip, struct at25_data, chip); u8 sernum[FM25_SN_LEN]; u8 id[FM25_ID_LEN]; + u32 val; int i; =20 strscpy(chip->name, "fm25", sizeof(chip->name)); =20 - /* Get ID of chip */ - fm25_aux_read(at25, id, FM25_RDID, FM25_ID_LEN); - /* There are inside-out FRAM variations, detect them and reverse the ID b= ytes */ - if (id[6] =3D=3D 0x7f && id[2] =3D=3D 0xc2) - for (i =3D 0; i < ARRAY_SIZE(id) / 2; i++) { - u8 tmp =3D id[i]; - int j =3D ARRAY_SIZE(id) - i - 1; + if (!device_property_read_u32(dev, "size", &val)) { + chip->byte_len =3D val; + } else { + /* Get ID of chip */ + fm25_aux_read(at25, id, FM25_RDID, FM25_ID_LEN); + /* There are inside-out FRAM variations, detect them and reverse the ID = bytes */ + if (id[6] =3D=3D 0x7f && id[2] =3D=3D 0xc2) + for (i =3D 0; i < ARRAY_SIZE(id) / 2; i++) { + u8 tmp =3D id[i]; + int j =3D ARRAY_SIZE(id) - i - 1; + + id[i] =3D id[j]; + id[j] =3D tmp; + } + if (id[6] !=3D 0xc2) { + dev_err(dev, "Error: no Cypress FRAM (id %02x)\n", id[6]); + return -ENODEV; + } =20 - id[i] =3D id[j]; - id[j] =3D tmp; + switch (id[7]) { + case 0x21 ... 0x26: + chip->byte_len =3D BIT(id[7] - 0x21 + 4) * 1024; + break; + case 0x2a ... 0x30: + /* CY15B116QN ... CY15B116QN */ + chip->byte_len =3D BIT(((id[7] >> 1) & 0xf) + 13); + break; + default: + dev_err(dev, "Error: unsupported size (id %02x)\n", id[7]); + return -ENODEV; } - if (id[6] !=3D 0xc2) { - dev_err(dev, "Error: no Cypress FRAM (id %02x)\n", id[6]); - return -ENODEV; - } =20 - switch (id[7]) { - case 0x21 ... 0x26: - chip->byte_len =3D BIT(id[7] - 0x21 + 4) * 1024; - break; - case 0x2a ... 0x30: - /* CY15B116QN ... CY15B116QN */ - chip->byte_len =3D BIT(((id[7] >> 1) & 0xf) + 13); - break; - default: - dev_err(dev, "Error: unsupported size (id %02x)\n", id[7]); - return -ENODEV; + if (id[8]) { + fm25_aux_read(at25, sernum, FM25_RDSN, FM25_SN_LEN); + /* Swap byte order */ + for (i =3D 0; i < FM25_SN_LEN; i++) + at25->sernum[i] =3D sernum[FM25_SN_LEN - 1 - i]; + } } =20 if (chip->byte_len > 64 * 1024) @@ -417,13 +429,6 @@ static int at25_fram_to_chip(struct device *dev, struc= t spi_eeprom *chip) else chip->flags |=3D EE_ADDR2; =20 - if (id[8]) { - fm25_aux_read(at25, sernum, FM25_RDSN, FM25_SN_LEN); - /* Swap byte order */ - for (i =3D 0; i < FM25_SN_LEN; i++) - at25->sernum[i] =3D sernum[FM25_SN_LEN - 1 - i]; - } - chip->page_size =3D PAGE_SIZE; return 0; } --=20 2.43.0 From nobody Sat Oct 4 14:17:02 2025 Received: from mx08-007fc201.pphosted.com (mx08-007fc201.pphosted.com [91.207.212.40]) (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 7EBBD2FCBF0; Fri, 15 Aug 2025 09:59:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.40 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755251957; cv=none; b=JVd0mHBpy+BfDgPD+NlIi9cHx3cCtw7FYNX/HLyVfOwVa0fQtaRZK928kYMfKy3te/An0KFFXUgs8+Ng74N6PrKBtaciyB+BB3s22nyCRFZjUsdtP2c2XdiGRB7dSx0qyH5rLWA7NSrPkuBh5k7KNTdZwmUW63bl7eMvvNlAaOk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755251957; c=relaxed/simple; bh=bFtem6bal3ozKFQIhj24cxDStk8G+Bf8rrvgaQg9RkU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aqbXRuXkCrsyDD2X6CuXpYD3A5Vn72a9Fzg8whs5WSRWvZQ8g5KrXc8AJ9lfRmoR5tFN1y2T4lf0a0xpl2xeBiN/dqHnrWRyRCGzu1Vz89oxCMwDrpRL8Hy7kbisMbkG79PayUNJWmQO16NsbfK9+BeAVbdjiyuGa0dkFrmEbnw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cab.de; spf=pass smtp.mailfrom=cab.de; dkim=pass (2048-bit key) header.d=cab.de header.i=@cab.de header.b=Jy0V77Vr; arc=none smtp.client-ip=91.207.212.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cab.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cab.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cab.de header.i=@cab.de header.b="Jy0V77Vr" Received: from pps.filterd (m0456229.ppops.net [127.0.0.1]) by mx08-007fc201.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 57F9wt87265753; Fri, 15 Aug 2025 11:58:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cab.de; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp-2025; bh=Ys PmJmggYIdtvpY+JvdYm/4kgr5qIWEnATsmjZlXaWA=; b=Jy0V77VrkuETI8CNR/ TOgyuRF1jXtQw76yaJ1unQxncP2e/v2P+RwQBpWS4qCE7Y2qzxoXHwgM+0fzMoCe kbkU135io0iQW5Do4h29XDxThlWtsaZmDRqfOx/1KT6hKt6EJw5nFskj93uFuwis byUUZ3dNabJSnOAadGXU/oB3vDLMFlDY+0rBnLYYFfjV5Tbv9PDHES/eG+fsOomi TQ2jho/ZXoSTUI5zMLsXr+1zjDqd9aR/XJVY8u+n4WtOeJ1RUaTdZcSD2YHZCeFP DZe2kLWSYhhxxufsx/k8rgbEqnV2xgwYYYj0jM7zgmjlgQAxNhK2Ck32ChQS/AZS 6VNg== Received: from adranos.cab.de (adranos.cab.de [46.232.229.107]) by mx08-007fc201.pphosted.com (PPS) with ESMTPS id 48fqcpsbfb-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Aug 2025 11:58:56 +0200 (MEST) Received: from KAN23-025.cab.de (10.10.3.180) by Adranos.cab.de (10.10.1.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.36; Fri, 15 Aug 2025 11:59:12 +0200 From: Markus Heidelberg To: Arnd Bergmann , Greg Kroah-Hartman , CC: Markus Heidelberg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Christian Eggers , Alexander Sverdlin , Jiri Prchal , Subject: [PATCH v2 3/3] eeprom: at25: make FRAM device ID error message more precise Date: Fri, 15 Aug 2025 11:58:38 +0200 Message-ID: <20250815095839.4219-4-m.heidelberg@cab.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250815095839.4219-1-m.heidelberg@cab.de> References: <20250815095839.4219-1-m.heidelberg@cab.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: Adranos.cab.de (10.10.1.54) To Adranos.cab.de (10.10.1.54) X-Proofpoint-ORIG-GUID: FOP4TzmLZxLnHahOUlaOhnkgUB9CJtuu X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODE1MDA4MCBTYWx0ZWRfX2vxfAdB/6vLZ I5TCKJDPQ4SMKBypCyIQuKK9obAMoKu11pWaqZKHEX7L5mqAvQa+OSE/r/8sJCd4tbKrzG4WE14 KdhDdclwiXB8HuhR9+j6qsz1vnYPHRhUQaiAjNyac6RgGgE+QG+PpJj8lFZiXJHffHSnHv66ov8 q+ov8oOvLP43U9USjLhvM8L5kBonnWLnXYfkAFZFRycJ4p3TJRbbMn1rRHabtwo9zTG+f9zLKKG CV1jB3USGuHKL5Z7Gh5cnWXfY18gCNmrPBn3cvJcqCAXgE+3dkyHN7uH55LyhHQiChgf615nTTP NCLJAdmE5zsdg3HLC74IePy3ikbYtUSNvjEjrcxyFXJmhwrR8V335D2gw9uWX4= X-Authority-Analysis: v=2.4 cv=bctrUPPB c=1 sm=1 tr=0 ts=689f04e0 cx=c_pps a=LmW7qmVeM6tFdl5svFU9Cg==:117 a=LmW7qmVeM6tFdl5svFU9Cg==:17 a=kldc_9v1VKEA:10 a=2OwXVqhp2XgA:10 a=pGLkceISAAAA:8 a=VCfmM45KO3mYAKdcRPcA:9 X-Proofpoint-GUID: FOP4TzmLZxLnHahOUlaOhnkgUB9CJtuu Content-Type: text/plain; charset="utf-8" The error description would be wrong in case the "size" Devicetree property is missing for an FRAM without device ID. Signed-off-by: Markus Heidelberg Reviewed-by: Alexander Sverdlin --- drivers/misc/eeprom/at25.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c index c90150f72836..e2868f7bdb03 100644 --- a/drivers/misc/eeprom/at25.c +++ b/drivers/misc/eeprom/at25.c @@ -399,7 +399,7 @@ static int at25_fram_to_chip(struct device *dev, struct= spi_eeprom *chip) id[j] =3D tmp; } if (id[6] !=3D 0xc2) { - dev_err(dev, "Error: no Cypress FRAM (id %02x)\n", id[6]); + dev_err(dev, "Error: no Cypress FRAM with device ID (manufacturer ID ba= nk 7: %02x)\n", id[6]); return -ENODEV; } =20 --=20 2.43.0