Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add MCP23008 I2C I/O extender overlay #2818

Closed
soosp opened this issue Jan 19, 2019 · 3 comments
Closed

Please add MCP23008 I2C I/O extender overlay #2818

soosp opened this issue Jan 19, 2019 · 3 comments

Comments

@soosp
Copy link

soosp commented Jan 19, 2019

Describe the bug
There is an overlay for MCP23017 but there is no one for MCP23008
The kernel driver (pinctrl_mcp23s08) is present and properly loaded by the following command:
echo mcp23008 0x20 > /sys/class/i2c-adapter/i2c-1/new_device

To reproduce
ls /boot/overlays/mcp23*
/boot/overlays/mcp23017.dtbo /boot/overlays/mcp23s17.dtbo

Expected behaviour
The prsence of the overlay.

Actual behaviour
Missing overlay

System

  • Which model of Raspberry Pi?
    Raspberry Pi 3 model B

  • Which OS and version (cat /etc/rpi-issue)?
    Raspberry Pi reference 2018-11-13
    Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7e0c786c641ba15990b5662f092c106beed40c9f, stage2

  • Which firmware version (vcgencmd version)?
    Nov 4 2018 16:31:07
    Copyright (c) 2012 Broadcom
    version ed5baf9520a3c4ca82ba38594b898f0c0446da66 (clean) (release)

  • Which kernel version (uname -a)?
    Linux pi3 4.14.79-v7+ USB-Harddrive gets fully powered down #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux
    Logs
    If applicable, add the relevant output from dmesg or similar.

Additional context
Add any other relevant context for the problem.

@pelwell
Copy link
Contributor

pelwell commented Jan 21, 2019

This modified mcp23017 overlay accepts an extra parameter - mcp23008 - that should make it compatible with the MCP23008. Please download it, copy it to /boot/overlays (you'll need to sudo cp mcp23017.dtbo /boot/overlays...), then edit your config.txt to include the new parameter, e.g.:

dtoverlay=mcp23017,mcp23008,addr=0x20,gpiopin=4

That can become the new mcp23017 overlay if it works for you.

@soosp
Copy link
Author

soosp commented Jan 21, 2019

Thank you for quick response!
I made a quick test, and it works.

My /boot/config.txt entry:

# Enable MCP23008 I/O expander
dtoverlay=mcp23017,mcp23008,addr=0x20

The result:

lsmod | grep mcp23
pinctrl_mcp23s08       24576  8
for i in `seq 504 511`; do
        echo $i > /sys/class/gpio/export
        echo out > /sys/class/gpio/gpio$i/direction
done

ls -1 /sys/class/gpio/
export
gpio504
gpio505
gpio506
gpio507
gpio508
gpio509
gpio510
gpio511
gpiochip0
gpiochip100
gpiochip128
gpiochip504
unexport

I tested some gpios to toggle relays and it worked for me.

pelwell pushed a commit that referenced this issue Jan 22, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
@pelwell
Copy link
Contributor

pelwell commented Jan 22, 2019

Thanks - that's now merged, and will be in future releases.

popcornmix added a commit to raspberrypi/firmware that referenced this issue Jan 22, 2019
kernel: overlays: Add ssd1306 overlay for OLED display
See: #1098

kernel: overlays: mcp23017: Support the MCP23008
See: raspberrypi/linux#2818

kernel: overlays: Add mcp342x overlay
See: raspberrypi/linux#2819

kernel: configs: Add CONFIG_USB_UAS=m
See: raspberrypi/linux#2813

firmware: interface: Drop vcfiled
See: raspberrypi/userland#525

firmware: Add reference counting to the local audio players
See: #547

firmware: arm_loader: Add reporting the firmware git hash via the mailbox
firmware: vcos: Add reporting of which variant was built
See: raspberrypi/linux#2806

firmware: Update vcdbg help
See: #594
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Jan 22, 2019
kernel: overlays: Add ssd1306 overlay for OLED display
See: raspberrypi/firmware#1098

kernel: overlays: mcp23017: Support the MCP23008
See: raspberrypi/linux#2818

kernel: overlays: Add mcp342x overlay
See: raspberrypi/linux#2819

kernel: configs: Add CONFIG_USB_UAS=m
See: raspberrypi/linux#2813

firmware: interface: Drop vcfiled
See: raspberrypi/userland#525

firmware: Add reference counting to the local audio players
See: raspberrypi/firmware#547

firmware: arm_loader: Add reporting the firmware git hash via the mailbox
firmware: vcos: Add reporting of which variant was built
See: raspberrypi/linux#2806

firmware: Update vcdbg help
See: raspberrypi/firmware#594
pelwell pushed a commit that referenced this issue Jan 23, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
pelwell pushed a commit that referenced this issue Jan 23, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
pelwell pushed a commit that referenced this issue Jan 23, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Jan 24, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
ahmedradaideh pushed a commit to ahmedradaideh/Pi-Kernel that referenced this issue Jan 29, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: raspberrypi/linux#2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Signed-off-by: ahmedradaideh <ahmed.radaideh@gmail.com>
popcornmix pushed a commit that referenced this issue Feb 4, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Feb 4, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Feb 4, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Feb 12, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Feb 12, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Feb 12, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Feb 18, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Feb 18, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Feb 18, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Feb 22, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Feb 24, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Feb 26, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Mar 6, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Mar 6, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Mar 6, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Mar 12, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Mar 12, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Mar 12, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Mar 15, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Mar 15, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Mar 15, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Mar 21, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Mar 21, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Apr 2, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Apr 2, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Apr 2, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
artynet pushed a commit to artynet/rpi-linux that referenced this issue Apr 3, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: raspberrypi#2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Apr 8, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Apr 8, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Gadgetoid pushed a commit to Gadgetoid/linux that referenced this issue Apr 10, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: raspberrypi#2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Apr 18, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Apr 18, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Apr 23, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Apr 30, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue Apr 30, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix pushed a commit that referenced this issue May 7, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
@pelwell pelwell closed this as completed May 8, 2019
popcornmix pushed a commit that referenced this issue May 13, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
TiejunChina pushed a commit that referenced this issue Jun 19, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
TiejunChina pushed a commit that referenced this issue Jul 23, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: #2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
anirbanray1981-zz pushed a commit to anirbanray1981-zz/ubuntu-disco that referenced this issue Sep 18, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: raspberrypi/linux#2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
shyam334 pushed a commit to shyam334/disco that referenced this issue Oct 1, 2019
Add an 'mcp23008' parameter to enable support for the MCP23008 device.

See: raspberrypi/linux#2818

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants