Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jan 2020 16:43:21 +0200
From:      Nick Kostirya <nikolay.kostirya@i11.co>
To:        Ian Lepore <ian@freebsd.org>
Cc:        Milan Obuch <milan@obuch.sk>, freebsd-arm@freebsd.org
Subject:   Re: gpioiic FDT overlays for sun8i-h3
Message-ID:  <20200116164321.68d6a219@i11.co>
In-Reply-To: <78c7d14bb681f8bca11525bf61cf871c6e89c235.camel@freebsd.org>
References:  <20191128152901.39dbeb4d@thinkpad> <20191128062149.577be86eb7dc15ae5805f31a@bidouilliste.com> <20191129153754.28fb5763@thinkpad> <20191129144316.739c8664@zeta.dino.sk> <20191129155431.05d4e14f@thinkpad> <20191129150944.67a2b723a6724c46f7559f96@bidouilliste.com> <0ce78262af1dd3b404b9a85a780933d7e11f008e.camel@freebsd.org> <20191129201244.0bc85b09@thinkpad> <ee0593a31a64ba264d579f7a4548f6b1b6e948fe.camel@freebsd.org> <20191219095935.6fed7431@i11.co> <78c7d14bb681f8bca11525bf61cf871c6e89c235.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 19 Dec 2019 10:29:16 -0700
Ian Lepore <ian@freebsd.org> wrote:

> 
> The gpioiic node needs to be defined at the root of the devicetree, not
> under the pinctrl node.  Assuming that all pins are configured as gpios
> by default (they are on most SOCs) you probably don't need a pinctrl
> node for them at all.  If you do, someone who knows allwinner stuff
> better than me would have to provide an example of that part.
> 
> To add the gpioiic driver node using pins 0 and 2 like your example, I
> think it should be just this:
> 
>    /dts-v1/;
>    /plugin/;
> 
>    / {
>        compatible = "allwinner,sun8i-h3";
>    };
> 
>    &{/} {
>        gpioiic@0 {
>            compatible = "i2c-gpio";
>            scl-gpios =
>    <&pio 0 0 GPIO_ACTIVE_HIGH>;
>            sdl-gpios = <&pio 0 2
>    GPIO_ACTIVE_HIGH>;  
>    };

Hello.
This is me again.
I have gpioiic0 and I wanted to add another gpioiic (gpioiic1):

    gpioiic@1 {
        compatible = "i2c-gpio";
        scl-gpios = <&pio 0 22 GPIO_ACTIVE_HIGH>; /* GPIO pin 22 (PC0) */
        sda-gpios = <&pio 0 23 GPIO_ACTIVE_HIGH>; /* GPIO pin 23 (PC1) */
    };

But I got error in dmesg:
gpiobus0: invalid pin -1058976448, max: 93

Must gpioiic be only one?

Nick.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200116164321.68d6a219>