1# Copyright (c) 2017, Linaro Limited 2# SPDX-License-Identifier: Apache-2.0 3 4# Common fields for I3C devices 5 6include: [base.yaml, power.yaml] 7 8on-bus: i3c 9 10properties: 11 reg: 12 required: true 13 description: | 14 Contains 3 fields. 15 16 For I3C devices, the 3 fields are static address, first half 17 of Provisioned ID, and the second half of the Provisioned ID. 18 1. The static address can be assigned to be the target device's 19 dynamic address before Dynamic Address Assignment (DAA) 20 starts. Can be zero if static address is not used, and 21 target address is determined via DAA. 22 2. First half of the Provisioned ID contains the manufacturer 23 ID left-shifted by 1, where the manufacturer ID is 24 the bits 33-47 (zero-based) of the 48-bit Provisioned ID. 25 3. Second half of the Provisioned ID contains the combination of 26 the part ID (bits 16-31 of the Provisioned ID) left-shifted 27 by 16, and the instance ID (bits 12-15 of the Provisioned ID) 28 left-shifted by 12. Basically, this is the lower 32 bits 29 of the Provisioned ID. 30 31 Note that the DT node of a I3C target device should be in format 32 "<node name>@<address + PID>", e.g. "sensor@4200001234012345678", 33 where the PID part is expanded to be a 64-bit integer. 34 35 For I2C devices, the 3 fields are static address, 0x00, and 36 value of the Legacy Virtual Register (LVR). 37 1. 7-bit address of the I2C device. (Note that 10-bit 38 addressing is not supported.) 39 2. Always 0x00. 40 3. LVR describes the I2C device where, 41 * bit[31:8]: unused. 42 * bit[7:5]: I2C device index: 43 * Index 0: I2C device has a 50 ns spike filter where 44 it is not affected by high frequency on SCL. 45 * Index 1: I2C device does not have a 50 ns spike filter 46 but can work with high frequency on SCL. 47 * Index 2: I2C device does not have a 50 ns spike filter 48 and cannot work with high frequency on SCL. 49 * Other values are reserved. 50 * bit[4]: I2C mode indicator: 51 * 0: FM+ mode 52 * 1: FM mode 53 * bit[3:0]: reserved. 54 55 The DT node of a I2C device should be in format 56 "<node name>@<address + 00000000 + LVR>", 57 e.g. "sensor@5000000000000000FF", where the middle 0x00 and LVR 58 are both expanded to 32-bit integers. 59 60 assigned-address: 61 type: int 62 description: | 63 Dynamic address to be assigned to the device. 64