overlays: mcp23017: Support the MCP23008
authorPhil Elwell <phil@raspberrypi.org>
Mon, 21 Jan 2019 12:19:57 +0000 (12:19 +0000)
committerpopcornmix <popcornmix@gmail.com>
Mon, 13 May 2019 23:08:17 +0000 (00:08 +0100)
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: https://github.com/raspberrypi/linux/issues/2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
arch/arm/boot/dts/overlays/README
arch/arm/boot/dts/overlays/mcp23017-overlay.dts

index 707ea49..6aa0059 100644 (file)
@@ -1212,6 +1212,8 @@ Params: gpiopin                 Gpio pin connected to the INTA output of the
 
         addr                    I2C address of the MCP23017 (default: 0x20)
 
+        mcp23008                Configure an MCP23008 instead.
+
 
 Name:   mcp23s17
 Info:   Configures the MCP23S08/17 SPI GPIO expanders.
index 412f966..42f2d0f 100644 (file)
                        };
                };
        };
-       
+
+       fragment@3 {
+               target = <&mcp23017>;
+               __dormant__ {
+                       compatible = "microchip,mcp23008";
+               };
+       };
+
        __overrides__ {
                gpiopin = <&mcp23017_pins>,"brcm,pins:0",
                                <&mcp23017>,"interrupts:0";
                addr = <&mcp23017>,"reg:0";
+               mcp23008 = <0>,"=3";
        };
 };