About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Documentation / devicetree / bindings / gpio / gpio-mcp23s08.txt




Custom Search

Based on kernel version 3.13. Page generated on 2014-01-20 22:00 EST.

1	Microchip MCP2308/MCP23S08/MCP23017/MCP23S17 driver for
2	8-/16-bit I/O expander with serial interface (I2C/SPI)
3	
4	Required properties:
5	- compatible : Should be
6	    - "mcp,mcp23s08" (DEPRECATED) for  8 GPIO SPI version
7	    - "mcp,mcp23s17" (DEPRECATED) for 16 GPIO SPI version
8	    - "mcp,mcp23008" (DEPRECATED) for  8 GPIO I2C version or
9	    - "mcp,mcp23017" (DEPRECATED) for 16 GPIO I2C version of the chip
10	
11	    - "microchip,mcp23s08" for  8 GPIO SPI version
12	    - "microchip,mcp23s17" for 16 GPIO SPI version
13	    - "microchip,mcp23008" for  8 GPIO I2C version or
14	    - "microchip,mcp23017" for 16 GPIO I2C version of the chip
15	    NOTE: Do not use the old mcp prefix any more. It is deprecated and will be
16	    removed.
17	- #gpio-cells : Should be two.
18	  - first cell is the pin number
19	  - second cell is used to specify flags. Flags are currently unused.
20	- gpio-controller : Marks the device node as a GPIO controller.
21	- reg : For an address on its bus. I2C uses this a the I2C address of the chip.
22	        SPI uses this to specify the chipselect line which the chip is
23	        connected to. The driver and the SPI variant of the chip support
24	        multiple chips on the same chipselect. Have a look at
25	        microchip,spi-present-mask below.
26	
27	Required device specific properties (only for SPI chips):
28	- mcp,spi-present-mask (DEPRECATED)
29	- microchip,spi-present-mask : This is a present flag, that makes only sense for SPI
30	        chips - as the name suggests. Multiple SPI chips can share the same
31	        SPI chipselect. Set a bit in bit0-7 in this mask to 1 if there is a
32	        chip connected with the corresponding spi address set. For example if
33	        you have a chip with address 3 connected, you have to set bit3 to 1,
34	        which is 0x08. mcp23s08 chip variant only supports bits 0-3. It is not
35	        possible to mix mcp23s08 and mcp23s17 on the same chipselect. Set at
36	        least one bit to 1 for SPI chips.
37	    NOTE: Do not use the old mcp prefix any more. It is deprecated and will be
38	    removed.
39	- spi-max-frequency = The maximum frequency this chip is able to handle
40	
41	Example I2C:
42	gpiom1: gpio@20 {
43	        compatible = "microchip,mcp23017";
44	        gpio-controller;
45	        #gpio-cells = <2>;
46	        reg = <0x20>;
47	};
48	
49	Example SPI:
50	gpiom1: gpio@0 {
51	        compatible = "microchip,mcp23s17";
52	        gpio-controller;
53	        #gpio-cells = <2>;
54	        spi-present-mask = <0x01>;
55	        reg = <0>;
56	        spi-max-frequency = <1000000>;
57	};
Hide Line Numbers
About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Information is copyright its respective author. All material is available from the Linux Kernel Source distributed under a GPL License. This page is provided as a free service by mjmwired.net.