Setting up i2c on bbb using device tree: error: could not find pctldev for node

I’m trying to set up i2c on the beaglebone black with a yocto build of v3.19.3.

My dts contains

`

&i2c1 {
status = “okay”;
pinctrl-names = “default”;
pinctrl-0 = <&i2c1_pins>;
clock-frequency = <100000>;
};
`

and …

`
&am33xx_pinmux {

i2c1_pins: pin_mux_i2c1_pins {
pinctrl-single,pins = <
0x158 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE2) /* spi0_d1.i2c1_sda, P9_18 /
0x15C (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE2) /
spi0_cs0.i2c1_scl, P9_17 */

;
};

};

`

When I boot I get this error in the log

`
[ 1.506928] omap_i2c 44e0b000.i2c: could not find pctldev for node /pinmux@44e10800/pinmux_i2c0_pins, deferring probe
[ 1.517979] platform 44e0b000.i2c: Driver omap_i2c requests probe deferral
[ 1.525177] omap_i2c 4802a000.i2c: could not find pctldev for node /pinmux@44e10800/i2c1_pins, deferring probe
[ 1.535576] platform 4802a000.i2c: Driver omap_i2c requests probe deferral
[ 1.542751] omap_i2c 4819c000.i2c: could not find pctldev for node /pinmux@44e10800/i2c2_pins, deferring probe
[ 1.553146] platform 4819c000.i2c: Driver omap_i2c requests probe deferral

`

How do I debug this error?

"requests probe deferral" means it's waiting for something.. aka
pinctrl driver, maybe a clock, etc.. Essentially at "1.553146" the
i2c was not 'ready'..

Regards,

Thanks so much for the quick reply - I’ll have to look into how to defer this to later in the bootup.

Hey Matthew,

I had the same problem you’re having when trying to use the I2C bus. After spending days debugging and trying to find a solution on the internet I stumbled upon this.

In summary; the i2c-dev module needs to be loaded, and the I2C buses will appear under /dev/i2c*. This can be done as;

sudo modprobe i2c-dev

Appears to be a bug with the kernel, I am running Linux arm 4.1.0-rc4-bone2, after following Robert Nelsons wiki page for linux on arm as found here.

Hopefully this assists other people with the same problem in the future.

Cheers,
Eric

Yeap it was, fixed in rc6-bone6 :wink:

https://github.com/RobertCNelson/bb-kernel/commit/cb3dca3fe73f5ede131643943541405d8360c859

Regards,