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

probe of ppgpio@0 failed with error -22 #57

Open
cervellopl opened this issue Mar 8, 2021 · 7 comments
Open

probe of ppgpio@0 failed with error -22 #57

cervellopl opened this issue Mar 8, 2021 · 7 comments

Comments

@cervellopl
Copy link

After boot and loading modules as in instruction I had something like this:

Mar 8 18:45:29 astroberry kernel: [ 3497.542536] parport: loading out-of-tree module taints kernel.
Mar 8 18:45:36 astroberry kernel: [ 3504.134802] pinctrl-bcm2835 3f200000.gpio: pin gpio11 already requested by 3f204000.spi; cannot claim for ppgpio@0
Mar 8 18:45:36 astroberry kernel: [ 3504.134833] pinctrl-bcm2835 3f200000.gpio: pin-11 (ppgpio@0) status -22
Mar 8 18:45:36 astroberry kernel: [ 3504.134848] pinctrl-bcm2835 3f200000.gpio: could not request pin 11 (gpio11) from group gpio11 on device pinctrl-bcm2835
Mar 8 18:45:36 astroberry kernel: [ 3504.134859] parport-gpio ppgpio@0: Error applying setting, reverse things back
Mar 8 18:45:36 astroberry kernel: [ 3504.134963] parport-gpio: probe of ppgpio@0 failed with error -22
Mar 8 18:45:56 astroberry kernel: [ 3524.533219] ppdev: user-space parallel port driver

Any suggestions?
Best regards,
Maciej

@garlick
Copy link
Collaborator

garlick commented Mar 8, 2021

It sounds like you'll need to disable spi0 (pin 11 is assigned to spi0 SCLK per this doc)
Commenting out this in your /boot/config.txt and rebooting may do it

dtparam=spi=on

Or if another device is using spi0 you might need to comment that out.

@cervellopl
Copy link
Author

Done but still have:
Mar 8 20:03:55 astroberry kernel: [ 499.281789] parport: loading out-of-tree module taints kernel.
Mar 8 20:04:03 astroberry kernel: [ 507.668429] pinctrl-bcm2835 3f200000.gpio: pin gpio2 already requested by 3f804000.i2c; cannot claim for ppgpio@0
Mar 8 20:04:03 astroberry kernel: [ 507.668450] pinctrl-bcm2835 3f200000.gpio: pin-2 (ppgpio@0) status -22
Mar 8 20:04:03 astroberry kernel: [ 507.668464] pinctrl-bcm2835 3f200000.gpio: could not request pin 2 (gpio2) from group gpio2 on device pinctrl-bcm2835
Mar 8 20:04:03 astroberry kernel: [ 507.668474] parport-gpio ppgpio@0: Error applying setting, reverse things back
Mar 8 20:04:03 astroberry kernel: [ 507.668569] parport-gpio: probe of ppgpio@0 failed with error -22

@garlick
Copy link
Collaborator

garlick commented Mar 8, 2021

Looks like a conflict with i2c1. You could try commenting out

dtparam=i2c_arm=on

@cervellopl
Copy link
Author

Ok it looks after that parport correct running driver. But how about EEPROM? I2C is not available after this operation.

@garlick
Copy link
Collaborator

garlick commented Mar 8, 2021

I think the fact that it is not available from linux does not prevent it from being accessed during boot.

For flashing, which involves temporarily enabling i2c, I think you should be able to follow the instructions here, even with dtparam=i2c_arm=on commented out. The parport_gpio driver does not need to be loading during this process (although as I recall, there is no conflict reported).

@quorten
Copy link
Collaborator

quorten commented Mar 9, 2021

Yeah, the flashing instructions point you to using i2c0 rather than i2c1. However, it may be easier to use the GPIO-based i2c driver instead, that can be dynamically loaded without reboot and is apparently officially recommended in preference to using i2c0. I haven't tested it yet, though, but you would do it like this:

# Dynamically install the overlay and driver.
sudo dtoverlay i2c-gpio i2c_gpio_sda=0 i2c_gpio_scl=1 bus=3

# Run the flashing commands here.  Use i2c bus 3.

# Remove the overlay.
sudo dtoverlay -r i2c-gpio
# N.B.: Any auto-loaded kernel modules will remain resident until explicitly removed.

@quorten
Copy link
Collaborator

quorten commented Mar 9, 2021

As a side note, I'm curious to see how pi-parport fits into the astroberry picture. Mentioning the i2c conflict, it's in the list of the number of things we'd like to change in a future revision, along with making other adjustments to ease the simultaneous connection of an RTC, GPS, power button, etc.

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

3 participants