gpioiic FDT overlays for sun8i-h3
Nick Kostirya
nikolay.kostirya at i11.co
Thu Jan 16 14:43:33 UTC 2020
On Thu, 19 Dec 2019 10:29:16 -0700
Ian Lepore <ian at 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 at 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 at 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.
More information about the freebsd-arm
mailing list