Hi Robert,
First I create am335x-customboneblack.dts:
#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"
#include "am335x-boneblack-common.dtsi"
/ {
       model = "TI AM335x BeagleBone Black";
       compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
};

&cpu0_opp_table {
    /*
     * All PG 2.0 silicon may not support 1GHz but some of the early
     * BeagleBone Blacks have PG 2.0 silicon which is guaranteed
     * to support 1GHz OPP so enable it for PG 2.0 on this board.
     */
    oppnitro-1000000000 {
        opp-supported-hw = <0x06 0x0100>;
    };
};

&i2c1 {
      status = "okay";
      clock-frequency = <100000>;
      nunchuk@52 {
            model = "Nintendo Wiichuk";
            compatible = "nintendo,nunchuk";
            reg = <0x52>;
      };

};

&am33xx_pinmux {
    i2c1_pins: pinmux_i2c1_pins {
        pinctrl-single,pins = <
            AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE2)    /*
spi0_d1.i2c1_sda */
            AM33XX_IOPAD(0x95c, PIN_INPUT_PULLUP | MUX_MODE2)    /*
spi0_cs0.i2c1_scl */
        >;
    };
};

After that the dmesg doesn't show the *modalias failure* anymore.
The dmesg shows:
[    0.334015] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[    1.702369] i2c /dev entries driver
[    2.240387] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    2.256890] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz

But when I do i2cdetect -r 1, the output:
root@beaglebone:~# i2cdetect -r 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] [   37.715246]
y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          [   42.169348] omap_i2c 4802a000.i2c: timeout waiting for bus
ready
-- [   43.189199] omap_i2c 4802a000.i2c: timeout waiting for bus ready
-- [   44.209016] omap_i2c 4802a000.i2c: timeout waiting for bus ready
-- [   45.229050] omap_i2c 4802a000.i2c: timeout waiting for bus ready

Then I compile the nunchuk driver from this link:
*https://github.com/martingkelly/nunchuk/blob/master/drivers/misc/nunchuk/nunchuk.c
<https://github.com/martingkelly/nunchuk/blob/master/drivers/misc/nunchuk/nunchuk.c>*
Then insmod shows this output:
[  138.005236] nunchuk: loading out-of-tree module taints kernel.
[  139.029395] omap_i2c 4802a000.i2c: timeout waiting for bus ready
[  139.036451] nunchuk 1-0052: nunchuk bailed: 0xfffffff0!
[  139.042327] nunchuk: probe of 1-0052 failed with error -16

Please help me to solve it.
Best Regards.

Zulham

On Wed, Dec 12, 2018 at 11:56 PM Robert Nelson <robertcnel...@gmail.com>
wrote:

> On Wed, Dec 12, 2018 at 10:43 AM <dzoel...@gmail.com> wrote:
> >
> > Hello.
> > I built using mainline kernel 4.19.2 and add am335x-customboneblack.dts
> in the source tree.
> > This is the output of dmesg:
> >
> > # dmesg | grep i2c
> > [    0.333709] i2c i2c-0: of_i2c: modalias failure on /ocp/i2c@4802a000
> /pinmux_i2c1_pins
> > [    0.333746] i2c i2c-0: Failed to create I2C device for
> /ocp/i2c@4802a000/pinmux_i2c1_pins
> > [    0.333789] omap_i2c 4802a000.i2c: bus 0 rev0.11 at 100 kHz
> > [    1.711959] i2c /dev entries driver
> > [    2.271800] omap_i2c 44e0b000.i2c: bus 1 rev0.11 at 400 kHz
> > [    2.281681] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
> >
> > Would you like to explain it?
>
> I would not..
>
> > Best Regards.
>
> Did you load the correct driver module?
>
> How did you wire the remote?
>
> https://bootlin.com/labs/doc/nunchuk.pdf
>
> Regards,
>
> --
> Robert Nelson
> https://rcn-ee.com/
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAP0ygCy6rmNODrCstpEqa8PaXyEiFwHgaKSyjqX21O4QQsjXbw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to