15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 25def4c47SEmmanuel Vadot%YAML 1.2 35def4c47SEmmanuel Vadot--- 45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/i3c/i3c.yaml# 55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 65def4c47SEmmanuel Vadot 78bab661aSEmmanuel Vadottitle: I3C bus 85def4c47SEmmanuel Vadot 95def4c47SEmmanuel Vadotmaintainers: 105def4c47SEmmanuel Vadot - Alexandre Belloni <alexandre.belloni@bootlin.com> 115def4c47SEmmanuel Vadot - Miquel Raynal <miquel.raynal@bootlin.com> 125def4c47SEmmanuel Vadot 135def4c47SEmmanuel Vadotdescription: | 145def4c47SEmmanuel Vadot I3C busses can be described with a node for the primary I3C controller device 155def4c47SEmmanuel Vadot and a set of child nodes for each I2C or I3C slave on the bus. Each of them 165def4c47SEmmanuel Vadot may, during the life of the bus, request mastership. 175def4c47SEmmanuel Vadot 185def4c47SEmmanuel Vadotproperties: 195def4c47SEmmanuel Vadot $nodename: 20*01950c46SEmmanuel Vadot pattern: "^i3c@[0-9a-f]+$" 215def4c47SEmmanuel Vadot 225def4c47SEmmanuel Vadot "#address-cells": 235def4c47SEmmanuel Vadot const: 3 245def4c47SEmmanuel Vadot description: | 255def4c47SEmmanuel Vadot Each I2C device connected to the bus should be described in a subnode. 265def4c47SEmmanuel Vadot 275def4c47SEmmanuel Vadot All I3C devices are supposed to support DAA (Dynamic Address Assignment), 285def4c47SEmmanuel Vadot and are thus discoverable. So, by default, I3C devices do not have to be 295def4c47SEmmanuel Vadot described in the device tree. This being said, one might want to attach 305def4c47SEmmanuel Vadot extra resources to these devices, and those resources may have to be 315def4c47SEmmanuel Vadot described in the device tree, which in turn means we have to describe 325def4c47SEmmanuel Vadot I3C devices. 335def4c47SEmmanuel Vadot 345def4c47SEmmanuel Vadot Another use case for describing an I3C device in the device tree is when 355def4c47SEmmanuel Vadot this I3C device has a static I2C address and we want to assign it a 365def4c47SEmmanuel Vadot specific I3C dynamic address before the DAA takes place (so that other 375def4c47SEmmanuel Vadot devices on the bus can't take this dynamic address). 385def4c47SEmmanuel Vadot 395def4c47SEmmanuel Vadot "#size-cells": 405def4c47SEmmanuel Vadot const: 0 415def4c47SEmmanuel Vadot 425def4c47SEmmanuel Vadot i3c-scl-hz: 435def4c47SEmmanuel Vadot description: | 445def4c47SEmmanuel Vadot Frequency of the SCL signal used for I3C transfers. When undefined, the 455def4c47SEmmanuel Vadot default value should be 12.5MHz. 465def4c47SEmmanuel Vadot 475def4c47SEmmanuel Vadot May not be supported by all controllers. 485def4c47SEmmanuel Vadot 495def4c47SEmmanuel Vadot i2c-scl-hz: 505def4c47SEmmanuel Vadot description: | 515def4c47SEmmanuel Vadot Frequency of the SCL signal used for I2C transfers. When undefined, the 525def4c47SEmmanuel Vadot default should be to look at LVR (Legacy Virtual Register) values of 535def4c47SEmmanuel Vadot I2C devices described in the device tree to determine the maximum I2C 545def4c47SEmmanuel Vadot frequency. 555def4c47SEmmanuel Vadot 565def4c47SEmmanuel Vadot May not be supported by all controllers. 575def4c47SEmmanuel Vadot 5884943d6fSEmmanuel Vadot mctp-controller: 5984943d6fSEmmanuel Vadot type: boolean 6084943d6fSEmmanuel Vadot description: | 6184943d6fSEmmanuel Vadot Indicates that the system is accessible via this bus as an endpoint for 6284943d6fSEmmanuel Vadot MCTP over I3C transport. 6384943d6fSEmmanuel Vadot 645def4c47SEmmanuel Vadotrequired: 655def4c47SEmmanuel Vadot - "#address-cells" 665def4c47SEmmanuel Vadot - "#size-cells" 675def4c47SEmmanuel Vadot 685def4c47SEmmanuel VadotpatternProperties: 695def4c47SEmmanuel Vadot "@[0-9a-f]+$": 705def4c47SEmmanuel Vadot type: object 715def4c47SEmmanuel Vadot description: | 725def4c47SEmmanuel Vadot I2C child, should be named: <device-type>@<i2c-address> 735def4c47SEmmanuel Vadot 74*01950c46SEmmanuel Vadot All properties described in dtschema schemas/i2c/i2c-controller.yaml 755def4c47SEmmanuel Vadot are valid here, except the reg property whose content is changed. 765def4c47SEmmanuel Vadot 775def4c47SEmmanuel Vadot properties: 785def4c47SEmmanuel Vadot compatible: 795def4c47SEmmanuel Vadot description: 805def4c47SEmmanuel Vadot Compatible of the I2C device. 815def4c47SEmmanuel Vadot 825def4c47SEmmanuel Vadot reg: 835def4c47SEmmanuel Vadot items: 845def4c47SEmmanuel Vadot - items: 855def4c47SEmmanuel Vadot - description: | 865def4c47SEmmanuel Vadot I2C address. 10 bit addressing is not supported. Devices with 875def4c47SEmmanuel Vadot 10-bit address can't be properly passed through DEFSLVS 885def4c47SEmmanuel Vadot command. 895def4c47SEmmanuel Vadot minimum: 0 905def4c47SEmmanuel Vadot maximum: 0x7f 915def4c47SEmmanuel Vadot - const: 0 925def4c47SEmmanuel Vadot - description: | 935def4c47SEmmanuel Vadot Shall encode the I3C LVR (Legacy Virtual Register): 945def4c47SEmmanuel Vadot bit[31:8]: unused/ignored 955def4c47SEmmanuel Vadot bit[7:5]: I2C device index. Possible values: 965def4c47SEmmanuel Vadot * 0: I2C device has a 50 ns spike filter 975def4c47SEmmanuel Vadot * 1: I2C device does not have a 50 ns spike filter but 985def4c47SEmmanuel Vadot supports high frequency on SCL 995def4c47SEmmanuel Vadot * 2: I2C device does not have a 50 ns spike filter and is 1005def4c47SEmmanuel Vadot not tolerant to high frequencies 1015def4c47SEmmanuel Vadot * 3-7: reserved 1025def4c47SEmmanuel Vadot bit[4]: tell whether the device operates in FM (Fast Mode) 1035def4c47SEmmanuel Vadot or FM+ mode: 1045def4c47SEmmanuel Vadot * 0: FM+ mode 1055def4c47SEmmanuel Vadot * 1: FM mode 1065def4c47SEmmanuel Vadot bit[3:0]: device type 1075def4c47SEmmanuel Vadot * 0-15: reserved 1085def4c47SEmmanuel Vadot 1095def4c47SEmmanuel Vadot required: 1105def4c47SEmmanuel Vadot - compatible 1115def4c47SEmmanuel Vadot - reg 1125def4c47SEmmanuel Vadot 1135def4c47SEmmanuel Vadot "@[0-9a-f]+,[0-9a-f]+$": 1145def4c47SEmmanuel Vadot type: object 1155def4c47SEmmanuel Vadot description: | 1165def4c47SEmmanuel Vadot I3C child, should be named: <device-type>@<static-i2c-address>,<i3c-pid> 1175def4c47SEmmanuel Vadot 1185def4c47SEmmanuel Vadot properties: 1195def4c47SEmmanuel Vadot reg: 1205def4c47SEmmanuel Vadot items: 1215def4c47SEmmanuel Vadot - items: 1225def4c47SEmmanuel Vadot - description: | 1235def4c47SEmmanuel Vadot Encodes the static I2C address. Should be 0 if the device does 1245def4c47SEmmanuel Vadot not have one (0 is not a valid I2C address). 1255def4c47SEmmanuel Vadot minimum: 0 1265def4c47SEmmanuel Vadot maximum: 0x7f 1275def4c47SEmmanuel Vadot - description: | 12884943d6fSEmmanuel Vadot First half of the Provisioned ID (following the PID 1295def4c47SEmmanuel Vadot definition provided by the I3C specification). 1305def4c47SEmmanuel Vadot 1315def4c47SEmmanuel Vadot Contains the manufacturer ID left-shifted by 1. 1325def4c47SEmmanuel Vadot - description: | 13384943d6fSEmmanuel Vadot Second half of the Provisioned ID (following the PID 1345def4c47SEmmanuel Vadot definition provided by the I3C specification). 1355def4c47SEmmanuel Vadot 1365def4c47SEmmanuel Vadot Contains the ORing of the part ID left-shifted by 16, 1375def4c47SEmmanuel Vadot the instance ID left-shifted by 12 and extra information. 1385def4c47SEmmanuel Vadot 1395def4c47SEmmanuel Vadot assigned-address: 1405def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 1415def4c47SEmmanuel Vadot minimum: 0x1 1425def4c47SEmmanuel Vadot maximum: 0xff 1435def4c47SEmmanuel Vadot description: | 144aa1a8ff2SEmmanuel Vadot Dynamic address to be assigned to this device. In case static address is 145aa1a8ff2SEmmanuel Vadot present (first cell of the reg property != 0), this address is assigned 146aa1a8ff2SEmmanuel Vadot through SETDASA. If static address is not present, this address is assigned 147aa1a8ff2SEmmanuel Vadot through SETNEWDA after assigning a temporary address via ENTDAA. 1485def4c47SEmmanuel Vadot 1495def4c47SEmmanuel Vadot required: 1505def4c47SEmmanuel Vadot - reg 1515def4c47SEmmanuel Vadot 1525def4c47SEmmanuel VadotadditionalProperties: true 1535def4c47SEmmanuel Vadot 1545def4c47SEmmanuel Vadotexamples: 1555def4c47SEmmanuel Vadot - | 156*01950c46SEmmanuel Vadot i3c@d040000 { 1575def4c47SEmmanuel Vadot compatible = "cdns,i3c-master"; 1585def4c47SEmmanuel Vadot clocks = <&coreclock>, <&i3csysclock>; 1595def4c47SEmmanuel Vadot clock-names = "pclk", "sysclk"; 1605def4c47SEmmanuel Vadot interrupts = <3 0>; 1615def4c47SEmmanuel Vadot reg = <0x0d040000 0x1000>; 1625def4c47SEmmanuel Vadot #address-cells = <3>; 1635def4c47SEmmanuel Vadot #size-cells = <0>; 1645def4c47SEmmanuel Vadot i2c-scl-hz = <100000>; 1655def4c47SEmmanuel Vadot 1665def4c47SEmmanuel Vadot /* I2C device. */ 1672eb4d8dcSEmmanuel Vadot eeprom@57 { 1682eb4d8dcSEmmanuel Vadot compatible = "atmel,24c01"; 1692eb4d8dcSEmmanuel Vadot reg = <0x57 0x0 0x10>; 1702eb4d8dcSEmmanuel Vadot pagesize = <0x8>; 1715def4c47SEmmanuel Vadot }; 1725def4c47SEmmanuel Vadot 173aa1a8ff2SEmmanuel Vadot /* I3C device with a static I2C address and assigned address. */ 1745def4c47SEmmanuel Vadot thermal_sensor: sensor@68,39200144004 { 1755def4c47SEmmanuel Vadot reg = <0x68 0x392 0x144004>; 1765def4c47SEmmanuel Vadot assigned-address = <0xa>; 1775def4c47SEmmanuel Vadot }; 1785def4c47SEmmanuel Vadot 179aa1a8ff2SEmmanuel Vadot /* I3C device with only assigned address. */ 180aa1a8ff2SEmmanuel Vadot pressure_sensor: sensor@0,39200124004 { 181aa1a8ff2SEmmanuel Vadot reg = <0x0 0x392 0x124000>; 182aa1a8ff2SEmmanuel Vadot assigned-address = <0xc>; 183aa1a8ff2SEmmanuel Vadot }; 184aa1a8ff2SEmmanuel Vadot 1855def4c47SEmmanuel Vadot /* 1865def4c47SEmmanuel Vadot * I3C device without a static I2C address but requiring 1875def4c47SEmmanuel Vadot * resources described in the DT. 1885def4c47SEmmanuel Vadot */ 1895def4c47SEmmanuel Vadot sensor@0,39200154004 { 1905def4c47SEmmanuel Vadot reg = <0x0 0x392 0x154004>; 1915def4c47SEmmanuel Vadot clocks = <&clock_provider 0>; 1925def4c47SEmmanuel Vadot }; 1935def4c47SEmmanuel Vadot }; 194