Path: blob/master/Documentation/devicetree/bindings/i3c/i3c.yaml
26308 views
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/i3c/i3c.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: I3C bus78maintainers:9- Alexandre Belloni <alexandre.belloni@bootlin.com>10- Miquel Raynal <miquel.raynal@bootlin.com>1112description: |13I3C busses can be described with a node for the primary I3C controller device14and a set of child nodes for each I2C or I3C slave on the bus. Each of them15may, during the life of the bus, request mastership.1617properties:18$nodename:19pattern: "^i3c@[0-9a-f]+$"2021"#address-cells":22const: 323description: |24Each I2C device connected to the bus should be described in a subnode.2526All I3C devices are supposed to support DAA (Dynamic Address Assignment),27and are thus discoverable. So, by default, I3C devices do not have to be28described in the device tree. This being said, one might want to attach29extra resources to these devices, and those resources may have to be30described in the device tree, which in turn means we have to describe31I3C devices.3233Another use case for describing an I3C device in the device tree is when34this I3C device has a static I2C address and we want to assign it a35specific I3C dynamic address before the DAA takes place (so that other36devices on the bus can't take this dynamic address).3738"#size-cells":39const: 04041i3c-scl-hz:42description: |43Frequency of the SCL signal used for I3C transfers. When undefined, the44default value should be 12.5MHz.4546May not be supported by all controllers.4748i2c-scl-hz:49description: |50Frequency of the SCL signal used for I2C transfers. When undefined, the51default should be to look at LVR (Legacy Virtual Register) values of52I2C devices described in the device tree to determine the maximum I2C53frequency.5455May not be supported by all controllers.5657mctp-controller:58type: boolean59description: |60Indicates that the system is accessible via this bus as an endpoint for61MCTP over I3C transport.6263required:64- "#address-cells"65- "#size-cells"6667patternProperties:68"@[0-9a-f]+$":69type: object70description: |71I2C child, should be named: <device-type>@<i2c-address>7273All properties described in dtschema schemas/i2c/i2c-controller.yaml74are valid here, except the reg property whose content is changed.7576properties:77compatible:78description:79Compatible of the I2C device.8081reg:82items:83- items:84- description: |85I2C address. 10 bit addressing is not supported. Devices with8610-bit address can't be properly passed through DEFSLVS87command.88minimum: 089maximum: 0x7f90- const: 091- description: |92Shall encode the I3C LVR (Legacy Virtual Register):93See include/dt-bindings/i3c/i3c.h94bit[31:8]: unused/ignored95bit[7:5]: I2C device index. Possible values:96* 0: I2C device has a 50 ns spike filter97* 1: I2C device does not have a 50 ns spike filter but98supports high frequency on SCL99* 2: I2C device does not have a 50 ns spike filter and is100not tolerant to high frequencies101* 3-7: reserved102bit[4]: tell whether the device operates in FM (Fast Mode)103or FM+ mode:104* 0: FM+ mode105* 1: FM mode106bit[3:0]: device type107* 0-15: reserved108109required:110- compatible111- reg112113"@[0-9a-f]+,[0-9a-f]+$":114type: object115description: |116I3C child, should be named: <device-type>@<static-i2c-address>,<i3c-pid>117118properties:119reg:120items:121- items:122- description: |123Encodes the static I2C address. Should be 0 if the device does124not have one (0 is not a valid I2C address).125minimum: 0126maximum: 0x7f127- description: |128First half of the Provisioned ID (following the PID129definition provided by the I3C specification).130131Contains the manufacturer ID left-shifted by 1.132- description: |133Second half of the Provisioned ID (following the PID134definition provided by the I3C specification).135136Contains the ORing of the part ID left-shifted by 16,137the instance ID left-shifted by 12 and extra information.138139assigned-address:140$ref: /schemas/types.yaml#/definitions/uint32141minimum: 0x1142maximum: 0xff143description: |144Dynamic address to be assigned to this device. In case static address is145present (first cell of the reg property != 0), this address is assigned146through SETDASA. If static address is not present, this address is assigned147through SETNEWDA after assigning a temporary address via ENTDAA.148149required:150- reg151152additionalProperties: true153154examples:155- |156#include <dt-bindings/i3c/i3c.h>157158i3c@d040000 {159compatible = "cdns,i3c-master";160clocks = <&coreclock>, <&i3csysclock>;161clock-names = "pclk", "sysclk";162interrupts = <3 0>;163reg = <0x0d040000 0x1000>;164#address-cells = <3>;165#size-cells = <0>;166i2c-scl-hz = <100000>;167168/* I2C device. */169eeprom@57 {170compatible = "atmel,24c01";171reg = <0x57 0x0 (I2C_FM | I2C_FILTER)>;172pagesize = <0x8>;173};174175/* I3C device with a static I2C address and assigned address. */176thermal_sensor: sensor@68,39200144004 {177reg = <0x68 0x392 0x144004>;178assigned-address = <0xa>;179};180181/* I3C device with only assigned address. */182pressure_sensor: sensor@0,39200124004 {183reg = <0x0 0x392 0x124000>;184assigned-address = <0xc>;185};186187/*188* I3C device without a static I2C address but requiring189* resources described in the DT.190*/191sensor@0,39200154004 {192reg = <0x0 0x392 0x154004>;193clocks = <&clock_provider 0>;194};195};196197198