xref: /linux/Documentation/ABI/testing/sysfs-bus-i2c-devices-m24lr (revision 63740349eba78f242bcbf60d5244d7f2b2600853)
1What:           /sys/bus/i2c/devices/<busnum>-<primary-addr>/unlock
2Date:           2025-07-04
3KernelVersion:  6.17
4Contact:        Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
5Description:
6                Write-only attribute used to present a password and unlock
7                access to protected areas of the M24LR chip, including
8                configuration registers such as the Sector Security Status
9                (SSS) bytes. A valid password must be written to enable write
10                access to these regions via the I2C interface.
11
12                Format:
13                  - Hexadecimal string representing a 32-bit (4-byte) password
14                  - Accepts 1 to 8 hex digits (e.g., "c", "1F", "a1b2c3d4")
15                  - No "0x" prefix, whitespace, or trailing newline
16                  - Case-insensitive
17
18                Behavior:
19                  - If the password matches the internal stored value,
20                    access to protected memory/configuration is granted
21                  - If the password does not match the internally stored value,
22                    it will fail silently
23
24What:           /sys/bus/i2c/devices/<busnum>-<primary-addr>/new_pass
25Date:           2025-07-04
26KernelVersion:  6.17
27Contact:        Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
28Description:
29                Write-only attribute used to update the password required to
30                unlock the M24LR chip.
31
32                Format:
33                  - Hexadecimal string representing a new 32-bit password
34                  - Accepts 1 to 8 hex digits (e.g., "1A", "ffff", "c0ffee00")
35                  - No "0x" prefix, whitespace, or trailing newline
36                  - Case-insensitive
37
38                Behavior:
39                  - Overwrites the current password stored in the I2C password
40                    register
41                  - Requires the device to be unlocked before changing the
42                    password
43                  - If the device is locked, the write silently fails
44
45What:           /sys/bus/i2c/devices/<busnum>-<primary-addr>/uid
46Date:           2025-07-04
47KernelVersion:  6.17
48Contact:        Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
49Description:
50                Read-only attribute that exposes the 8-byte unique identifier
51                programmed into the M24LR chip at the factory.
52
53                Format:
54                  - Lowercase hexadecimal string representing a 64-bit value
55                  - 1 to 16 hex digits (e.g., "e00204f12345678")
56                  - No "0x" prefix
57                  - Includes a trailing newline
58
59What:           /sys/bus/i2c/devices/<busnum>-<primary-addr>/total_sectors
60Date:           2025-07-04
61KernelVersion:  6.17
62Contact:        Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
63Description:
64                Read-only attribute that exposes the total number of EEPROM
65                sectors available in the M24LR chip.
66
67                Format:
68                  - 1 to 2 hex digits (e.g. "F")
69                  - No "0x" prefix
70                  - Includes a trailing newline
71
72                Notes:
73                  - Value is encoded by the chip and corresponds to the EEPROM
74                    size (e.g., 3 = 4 kbit for M24LR04E-R)
75
76What:           /sys/bus/i2c/devices/<busnum>-<primary-addr>/sss
77Date:           2025-07-04
78KernelVersion:  6.17
79Contact:        Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
80Description:
81                Read/write binary attribute representing the Sector Security
82                Status (SSS) bytes for all EEPROM sectors in STMicroelectronics
83                M24LR chips.
84
85                Each EEPROM sector has one SSS byte, which controls I2C and
86                RF access through protection bits and optional password
87                authentication.
88
89                Format:
90                  - The file contains one byte per EEPROM sector
91                  - Byte at offset N corresponds to sector N
92                  - Binary access only; use tools like dd, Python, or C that
93                    support byte-level I/O and offset control.
94
95                Notes:
96                  - The number of valid bytes in this file is equal to the
97                    value exposed by 'total_sectors' file
98                  - Write access requires prior password authentication in
99                    I2C mode
100                  - Refer to the M24LR datasheet for full SSS bit layout
101