Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 081A0189BB0 for ; Sat, 8 Nov 2025 10:28:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762597705; cv=none; b=LsglxrATmOyNenykWKtXBFJ80fzmbbNF45UMr7DaIy3UGi7+Af0lQnqBW6BExffB18l0HhbpScpJrOfiNE54RP5Xrvn/efh7aa+jyWmBQpoC11WSkfYtPHCw+CEIdxhqbkml8wLSQL7bc7V/dIV+TwuthWr8ZFnQ7OXil+ali08= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762597705; c=relaxed/simple; bh=12f7GILPUkXCDP8tGHXH7ltT0vBUKfdqmW/twThO/0I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=G0018dYiH8UhEr2q38o3AFi1i8OHci7zSSUaMWbJvMefsTay4s7YfyZc61NKPGGi5IpbaauZMpsV2teKTZUAAki/MV5vdksj5CmCg0MUeGV6S3OdkHaWhUxlJsmI3kUYCNNMyVuAhBxLBjRe2yIvAc8MVJqHxk5Ll/S537iKbSA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dCOJkNNa; arc=none smtp.client-ip=209.85.166.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dCOJkNNa" Received: by mail-io1-f49.google.com with SMTP id ca18e2360f4ac-940d9772e28so53803639f.2 for ; Sat, 08 Nov 2025 02:28:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762597702; x=1763202502; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+TuTLhzgnX5Pfkj0imA6DgDfaCJeQjdc19ou/wTAVkI=; b=dCOJkNNaj6msls4EFNBb389OxjvTww4cPtQaxayJYmZ10mxKsnqCa4CUIXDwDYOxji bP/3CcaggZ+ONtWlh3xO4O9iSW47cXbP3T0wBdeRZIg5/DO0XYVcO+FfGNKEITmVZV0U 77am3M4fFIlvQEqtrzNI8gHiYjAW20us+OZL+4LHrglT6wmyN9DTvYldvpSoc9PQHM2Q uw+Fz5n1a+ZMrsqkblGbSj4nc2bwOruSqj9NP6nMElJ8SqTAb7qRDI8+fFcbKjFAy3On 6XxYYO2nci8iaWqximzh6r+4Vd/sCX37qCwreYsAeDhspqhbfLL4B+SWySxNlvcgT7Bj Ja8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762597702; x=1763202502; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+TuTLhzgnX5Pfkj0imA6DgDfaCJeQjdc19ou/wTAVkI=; b=knjxDbh+VWIE53xvP0RL6bpuxDUrDynN4as1ce4lANefpHXxjjsmetTO78fjZfZ09Y /95HFJxN3XQXeHjWgG7warzU5p9uYvj7P0Nf5PmE6/o8s5cBOLFe2euBy1fp1woJTiPd OnKz8BwlYgGMt8FvR7ylPxH2Gv99XJm6ikW5xiiQeaxpmJHVL9RPx2b+zdseu9g08QZn rWulZT7SfVzBWerYUEyXaiQzdmE8s0xMSYHsqAQ0Fgq0a+w7Zaw8lMfncVUmqdUwDb3o DV94MRM43+EmLhZ8n5l7pdmAgYdinVhXya/WjDiaSEE0W3FnMEZS0RGOm0e3B9TsQyg9 b5sg== X-Forwarded-Encrypted: i=1; AJvYcCX3FJkIIaaehgAam7TZA8G8sfRwbHyayZIm5dkW3Ef5u6goA+ZGhTF+jpkWhwvibfTozVAk014XjomU@vger.kernel.org X-Gm-Message-State: AOJu0YxmaIxqc+6eDXRLTz0UDhCSuit5mbXicgTBaCTFvMBF4lKf6/mb 6WGmooM6AezVfwXOnergtzqNa8S8mgLBWAPN7AgQNPEQvaPMpc2yVxCz X-Gm-Gg: ASbGncs4If1ycvqOomO1ZZtt/69UMeliUjgSZkq+qGfmJi1f33WNoSZInll6IVPg924 4rzURXMAsE2fAzT7xHdIeCFWtdfwBYF7la/YzKe3932w9kt/pyvxTQaFmj3XqH2FltU1JIEmD5/ Kga5louNSBF2/pI+vC2RLqRqiwFWS/hm4TRoPMLNAAmbVbrxjjqP8VI0RSa/Ifap9R68ae56k0v 0TCQNGD/yD6pZcmEmgiVX/8ytNuikDPlZf809kj6IzB7810PM2OTKImWssCpp5A4zFO0DoVbKYN W++QfAINC4fXpD0LMD1mZlUZwc/lbuQyl6+P41U94NgqpApbX+oFnk6nGnfnFmjX4vJtWb+6mzj lrqCCbMhGE+HX0gqtiAH6CJ/RcBaWiuN+wcK4IcudQSnwKH7kljjBVsBN9lNI4LYkUeZu2SUvcH Oi/tsBYqCGViCP2w== X-Google-Smtp-Source: AGHT+IHJQ2fl+UoiHF4mPlmvFSjl+F0j04tbYDfTx7zB3y716ahbTwMpXNlaun5Mwk6isZ1YqsGJpA== X-Received: by 2002:a05:6602:1609:b0:945:a16a:c7f8 with SMTP id ca18e2360f4ac-94895f98e51mr294678839f.6.1762597702060; Sat, 08 Nov 2025 02:28:22 -0800 (PST) Received: from p15.. ([2600:1007:b0b8:8420:9895:3669:27c4:c1d6]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-5b74698d5bdsm2954694173.61.2025.11.08.02.28.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Nov 2025 02:28:21 -0800 (PST) From: George Kelly To: Tony Lindgren , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, George Kelly Subject: [PATCH] ARM: dts: ti/omap: fix incorrect compatible string in internal eeprom node Date: Sat, 8 Nov 2025 05:27:41 -0500 Message-ID: <20251108102741.47628-1-george.kelly1097@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit While the Beaglebone capes have the Atmel AT24C256 chip (256kbit or 32kB), the internal Beaglebone eeprom chip (i2c bus 0, addr 0x50), is an AT24C32 (32kbit or 4kB). Yet the device tree lists AT24C256 as the compatible chip prior to this patch. You can confirm this by running `sudo hexdump -C /sys/bus/nvmem/devices/0-00500/nvmem`. You can see the factory data is repeated every 0x1000 addresses (every 4096 bytes or 32768 bits). This is because the read command wraps around to reading 0x0000 when a user requests address 0x1000. This is not a huge issue for reading, but it is for writing to the EEPROM for two reasons: 1) If a user writes to addresses 0x1000 - 0x104e, they'll accidentally overwrite the factory data stored at 0x0000 - 0x104e. This also is an issue for writing to 0x2000 - 0x204e, and so on. 2) AT24C256 has 64-byte pages, but AT24C32 only has 32 byte pages. Thus, if you attempt to write more than 32 bytes, bytes 32-64 will wrap around. This causes your data in the actual EEPROM chip's bytes 0-32 to be overwritten by the data in your request's bytes 32-64, while the EEPROM chip's bytes 32-64 remain 0xFF (unwritten). Lastly, the Beaglebone Black's user manual does correctly mention that the internal EEPROM is 4kB (while capes are 32kB or 256kbit). It's just this bit of code that does not match. Signed-off-by: George Kelly --- arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi b/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi index ad1e60a9b6fde..73a571c135f81 100644 --- a/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi @@ -217,7 +217,7 @@ tps: pmic@24 { }; baseboard_eeprom: eeprom@50 { - compatible = "atmel,24c256"; + compatible = "atmel,24c32"; reg = <0x50>; vcc-supply = <&ldo4_reg>; -- 2.43.0