The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/device-tree/Bindings/i2c/i2c-mux-gpio.txt

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 GPIO-based I2C Bus Mux
    2 
    3 This binding describes an I2C bus multiplexer that uses GPIOs to
    4 route the I2C signals.
    5 
    6                                   +-----+  +-----+
    7                                   | dev |  | dev |
    8     +------------+                +-----+  +-----+
    9     | SoC        |                   |        |
   10     |            |          /--------+--------+
   11     |   +------+ |  +------+    child bus A, on GPIO value set to 0
   12     |   | I2C  |-|--| Mux  |
   13     |   +------+ |  +--+---+    child bus B, on GPIO value set to 1
   14     |            |     |    \----------+--------+--------+
   15     |   +------+ |     |               |        |        |
   16     |   | GPIO |-|-----+            +-----+  +-----+  +-----+
   17     |   +------+ |                  | dev |  | dev |  | dev |
   18     +------------+                  +-----+  +-----+  +-----+
   19 
   20 Required properties:
   21 - compatible: i2c-mux-gpio
   22 - i2c-parent: The phandle of the I2C bus that this multiplexer's master-side
   23   port is connected to.
   24 - mux-gpios: list of gpios used to control the muxer
   25 * Standard I2C mux properties. See i2c-mux.yaml in this directory.
   26 * I2C child bus nodes. See i2c-mux.yaml in this directory.
   27 
   28 Optional properties:
   29 - idle-state: value to set the muxer to when idle. When no value is
   30   given, it defaults to the last value used.
   31 
   32 For each i2c child node, an I2C child bus will be created. They will
   33 be numbered based on their order in the device tree.
   34 
   35 Whenever an access is made to a device on a child bus, the value set
   36 in the relevant node's reg property will be output using the list of
   37 GPIOs, the first in the list holding the least-significant value.
   38 
   39 If an idle state is defined, using the idle-state (optional) property,
   40 whenever an access is not being made to a device on a child bus, the
   41 GPIOs will be set according to the idle value.
   42 
   43 If an idle state is not defined, the most recently used value will be
   44 left programmed into hardware whenever no access is being made to a
   45 device on a child bus.
   46 
   47 Example:
   48         i2cmux {
   49                 compatible = "i2c-mux-gpio";
   50                 #address-cells = <1>;
   51                 #size-cells = <0>;
   52                 mux-gpios = <&gpio1 22 0 &gpio1 23 0>;
   53                 i2c-parent = <&i2c1>;
   54 
   55                 i2c@1 {
   56                         reg = <1>;
   57                         #address-cells = <1>;
   58                         #size-cells = <0>;
   59 
   60                         ssd1307: oled@3c {
   61                                 compatible = "solomon,ssd1307fb-i2c";
   62                                 reg = <0x3c>;
   63                                 pwms = <&pwm 4 3000>;
   64                                 reset-gpios = <&gpio2 7 1>;
   65                         };
   66                 };
   67 
   68                 i2c@3 {
   69                         reg = <3>;
   70                         #address-cells = <1>;
   71                         #size-cells = <0>;
   72 
   73                         pca9555: pca9555@20 {
   74                                 compatible = "nxp,pca9555";
   75                                 gpio-controller;
   76                                 #gpio-cells = <2>;
   77                                 reg = <0x20>;
   78                         };
   79                 };
   80         };

Cache object: 98c3c852ec3ce973bcc478d9ac56a2d9


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.