summaryrefslogtreecommitdiff
path: root/Documentation/ABI/testing/sysfs-bus-i2c-devices-m24lr
blob: 7c51ce8d38ba214c451047911841bf8d7a1fab82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
What:           /sys/bus/i2c/devices/<busnum>-<primary-addr>/unlock
Date:           2025-07-04
KernelVersion:  6.17
Contact:        Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
Description:
                Write-only attribute used to present a password and unlock
                access to protected areas of the M24LR chip, including
                configuration registers such as the Sector Security Status
                (SSS) bytes. A valid password must be written to enable write
                access to these regions via the I2C interface.

                Format:
                  - Hexadecimal string representing a 32-bit (4-byte) password
                  - Accepts 1 to 8 hex digits (e.g., "c", "1F", "a1b2c3d4")
                  - No "0x" prefix, whitespace, or trailing newline
                  - Case-insensitive

                Behavior:
                  - If the password matches the internal stored value,
                    access to protected memory/configuration is granted
                  - If the password does not match the internally stored value,
                    it will fail silently

What:           /sys/bus/i2c/devices/<busnum>-<primary-addr>/new_pass
Date:           2025-07-04
KernelVersion:  6.17
Contact:        Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
Description:
                Write-only attribute used to update the password required to
                unlock the M24LR chip.

                Format:
                  - Hexadecimal string representing a new 32-bit password
                  - Accepts 1 to 8 hex digits (e.g., "1A", "ffff", "c0ffee00")
                  - No "0x" prefix, whitespace, or trailing newline
                  - Case-insensitive

                Behavior:
                  - Overwrites the current password stored in the I2C password
                    register
                  - Requires the device to be unlocked before changing the
                    password
                  - If the device is locked, the write silently fails

What:           /sys/bus/i2c/devices/<busnum>-<primary-addr>/uid
Date:           2025-07-04
KernelVersion:  6.17
Contact:        Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
Description:
                Read-only attribute that exposes the 8-byte unique identifier
                programmed into the M24LR chip at the factory.

                Format:
                  - Lowercase hexadecimal string representing a 64-bit value
                  - 1 to 16 hex digits (e.g., "e00204f12345678")
                  - No "0x" prefix
                  - Includes a trailing newline

What:           /sys/bus/i2c/devices/<busnum>-<primary-addr>/total_sectors
Date:           2025-07-04
KernelVersion:  6.17
Contact:        Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
Description:
                Read-only attribute that exposes the total number of EEPROM
                sectors available in the M24LR chip.

                Format:
                  - 1 to 2 hex digits (e.g. "F")
                  - No "0x" prefix
                  - Includes a trailing newline

                Notes:
                  - Value is encoded by the chip and corresponds to the EEPROM
                    size (e.g., 3 = 4 kbit for M24LR04E-R)

What:           /sys/bus/i2c/devices/<busnum>-<primary-addr>/sss
Date:           2025-07-04
KernelVersion:  6.17
Contact:        Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
Description:
                Read/write binary attribute representing the Sector Security
                Status (SSS) bytes for all EEPROM sectors in STMicroelectronics
                M24LR chips.

                Each EEPROM sector has one SSS byte, which controls I2C and
                RF access through protection bits and optional password
                authentication.

                Format:
                  - The file contains one byte per EEPROM sector
                  - Byte at offset N corresponds to sector N
                  - Binary access only; use tools like dd, Python, or C that
                    support byte-level I/O and offset control.

                Notes:
                  - The number of valid bytes in this file is equal to the
                    value exposed by 'total_sectors' file
                  - Write access requires prior password authentication in
                    I2C mode
                  - Refer to the M24LR datasheet for full SSS bit layout