Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Orange pi support for i2c



On Saturday 07 Aug 2021 23:50:09 Tobias Nygren wrote:
> On Sat, 07 Aug 2021 21:54:40 +0000
> 
> Dave Tyson <dtyson%anduin.org.uk@localhost> wrote:
> > The Banana pi seems to work OK with i2c with light testing, but I would
> > really like a more 'lightweight' platform like the Orange pi zero or
> > Orange pi one. Under a recent current both these boot up OK, but there
> > doesn't appear to be any support for i2c - how hard would that be to add?
> 
> Already supported -- but you need to enable the i2c nodes in the device tree
> with a dtb overlay. It will be something like below. You'll have to consult
> the data sheet to see if any of the respective i2c controller's pins are
> used for conflicting purposes.
> 
> --- sys/arch/arm/dts/sun8i-h3-orangepi-one.dts  30 Nov 2017 21:39:35 -0000  
>    1.3 +++ sys/arch/arm/dts/sun8i-h3-orangepi-one.dts  7 Aug 2021 21:47:46
> -0000 @@ -29,3 +29,12 @@
>  #include
> "../../../external/gpl2/dts/dist/arch/arm/boot/dts/sun8i-h3-orangepi-one.dt
> s" #include "sun8i-h3.dtsi"
> 
> +&i2c0 {
> +        status = "okay";
> +};
> +&i2c1 {
> +        status = "okay";
> +};
> +&i2c2 {
> +        status = "okay";
> +};

Ok, thanks for the quick response! - will consult the data sheet and give it a 
try.later in the week then report back

Cheers,
Dave


Home | Main Index | Thread Index | Old Index