summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCiprian Regus <ciprian.regus@analog.com>2026-07-08 01:33:30 +0300
committerPaolo Abeni <pabeni@redhat.com>2026-07-21 10:53:23 +0200
commit7d0e4c4b8c85d8ea2c77a90e1f7a7f74ce531e52 (patch)
tree4d56a8e7c025484985c5137f28da02c5be187f15 /include
parent2aa955bc52e93228e2ae6be91806cfc707476deb (diff)
downloadlinux-next-7d0e4c4b8c85d8ea2c77a90e1f7a7f74ce531e52.tar.gz
linux-next-7d0e4c4b8c85d8ea2c77a90e1f7a7f74ce531e52.zip
net: ethernet: oa_tc6: Handle the OA TC6 SPI protected mode
Implement the OA TC6 standard defined protected mode for control (register access) transactions. In addition to the current register access formats the oa_tc6 driver handles, 1's complement values of the data field are included (by both the host and the MACPHY) in the SPI transfer frames. This feature acts as an integrity check. Control write transactions look like this: |<- 32 bits ->|<--- data_size --->|<- 32 bits ->| MOSI: | ctrl header | reg write data | ignored | MISO: | (discard) | echoed ctrl hdr | echoed data | data_size (LEN = number of registers to read in a sequence): Unprotected: 32 x (LEN + 1) bits Protected: 2 x 32 x (LEN + 1) bits Control read transaction: |<- 32 bits ->|<--- 32 bits --> |<- data_size ->| MOSI: | ctrl header | ignored ... | MISO: | (discard) | echoed ctrl hdr | reg read data | data_size (LEN = number of registers to read in a sequence): Unprotected: 32 x (LEN + 1) bits Protected: 2 x 32 x (LEN + 1) bits Register data format ("reg write data" and "reg read data"): Unprotected: | W1 (normal) | W2 (normal) | ... | Wx (normal) | Protected: | W1 (normal) | W1 (complement) | ... | Wx (normal) | Wx (complement)| The protected mode state can be read from the bit 5 of CONFIG0 (0x4) register, and this setting is usually only configured during the MACPHY's reset (depending on the device it can be done by setting the state of a pin). We can read the protected mode configuration before any other register access and since the SPI transfer is initially sized for an unprotected read, the MACPHY's complement words are never clocked out and no checking is required. The data transactions (Ethernet frames) remain unchanged. Signed-off-by: Ciprian Regus <ciprian.regus@analog.com> Link: https://patch.msgid.link/20260708-adin1140-driver-v5-2-4aca7b51a58b@analog.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions