Path: blob/master/Documentation/devicetree/bindings/fsi/fsi.txt
26308 views
FSI bus & engine generic device tree bindings1=============================================23The FSI bus is probe-able, so the OS is able to enumerate FSI slaves, and4engines within those slaves. However, we have a facility to match devicetree5nodes to probed engines. This allows for fsi engines to expose non-probeable6busses, which are then exposed by the device tree. For example, an FSI engine7that is an I2C master - the I2C bus can be described by the device tree under8the engine's device tree node.910FSI masters may require their own DT nodes (to describe the master HW itself);11that requirement is defined by the master's implementation, and is described by12the fsi-master-* binding specifications.1314Under the masters' nodes, we can describe the bus topology using nodes to15represent the FSI slaves and their slave engines. As a basic outline:1617fsi-master {18/* top-level of FSI bus topology, bound to an FSI master driver and19* exposes an FSI bus */2021fsi-slave@<link,id> {22/* this node defines the FSI slave device, and is handled23* entirely with FSI core code */2425fsi-slave-engine@<addr> {26/* this node defines the engine endpoint & address range, which27* is bound to the relevant fsi device driver */28...29};3031fsi-slave-engine@<addr> {32...33};3435};36};3738Note that since the bus is probe-able, some (or all) of the topology may39not be described; this binding only provides an optional facility for40adding subordinate device tree nodes as children of FSI engines.4142FSI masters43-----------4445FSI master nodes declare themselves as such with the "fsi-master" compatible46value. It's likely that an implementation-specific compatible value will47be needed as well, for example:4849compatible = "fsi-master-gpio", "fsi-master";5051Since the master nodes describe the top-level of the FSI topology, they also52need to declare the FSI-standard addressing scheme. This requires two cells for53addresses (link index and slave ID), and no size:5455#address-cells = <2>;56#size-cells = <0>;5758An optional boolean property can be added to indicate that a particular master59should not scan for connected devices at initialization time. This is60necessary in cases where a scan could cause arbitration issues with other61masters that may be present on the bus.6263no-scan-on-init;6465FSI slaves66----------6768Slaves are identified by a (link-index, slave-id) pair, so require two cells69for an address identifier. Since these are not a range, no size cells are70required. For an example, a slave on link 1, with ID 2, could be represented71as:7273cfam@1,2 {74reg = <1 2>;75[...];76}7778Each slave provides an address-space, under which the engines are accessible.79That address space has a maximum of 23 bits, so we use one cell to represent80addresses and sizes in the slave address space:8182#address-cells = <1>;83#size-cells = <1>;8485Optionally, a slave can provide a global unique chip ID which is used to86identify the physical location of the chip in a system specific way8788chip-id = <0>;8990FSI engines (devices)91---------------------9293Engines are identified by their address under the slaves' address spaces. We94use a single cell for address and size. Engine nodes represent the endpoint95FSI device, and are passed to those FSI device drivers' ->probe() functions.9697For example, for a slave using a single 0x400-byte page starting at address980xc00:99100engine@c00 {101reg = <0xc00 0x400>;102};103104105Full example106------------107108Here's an example that illustrates:109- an FSI master110- connected to an FSI slave111- that contains an engine that is an I2C master112- connected to an I2C EEPROM113114The FSI master may be connected to additional slaves, and slaves may have115additional engines, but they don't necessarily need to be describe in the116device tree if no extra platform information is required.117118/* The GPIO-based FSI master node, describing the top level of the119* FSI bus120*/121gpio-fsi {122compatible = "fsi-master-gpio", "fsi-master";123#address-cells = <2>;124#size-cells = <0>;125126/* A FSI slave (aka. CFAM) at link 0, ID 0. */127cfam@0,0 {128reg = <0 0>;129#address-cells = <1>;130#size-cells = <1>;131chip-id = <0>;132133/* FSI engine at 0xc00, using a single page. In this example,134* it's an I2C master controller, so subnodes describe the135* I2C bus.136*/137i2c-controller@c00 {138reg = <0xc00 0x400>;139140/* Engine-specific data. In this case, we're describing an141* I2C bus, so we're conforming to the generic I2C binding142*/143compatible = "some-vendor,fsi-i2c-controller";144#address-cells = <1>;145#size-cells = <1>;146147/* I2C endpoint device: an Atmel EEPROM */148eeprom@50 {149compatible = "atmel,24c256";150reg = <0x50>;151pagesize = <64>;152};153};154};155};156157158