From cef3db86339b6bb864297074f5a0989b42a14752 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 21 Jan 2019 12:19:57 +0000 Subject: [PATCH] overlays: mcp23017: Support the MCP23008 Add an 'mcp23008' parameter to enable support for the MCP23008 device. See: https://github.com/raspberrypi/linux/issues/2818 Signed-off-by: Phil Elwell --- arch/arm/boot/dts/overlays/README | 2 ++ arch/arm/boot/dts/overlays/mcp23017-overlay.dts | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index 4edd96cf65e3b0..1ac0bbaeebc8f7 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -1186,6 +1186,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. diff --git a/arch/arm/boot/dts/overlays/mcp23017-overlay.dts b/arch/arm/boot/dts/overlays/mcp23017-overlay.dts index 412f966a3cc0a3..42f2d0f4ea6684 100644 --- a/arch/arm/boot/dts/overlays/mcp23017-overlay.dts +++ b/arch/arm/boot/dts/overlays/mcp23017-overlay.dts @@ -44,11 +44,19 @@ }; }; }; - + + 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"; }; };