Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Aug 2018 20:48:37 +0000 (UTC)
From:      lyd mc <alydiomc@yahoo.com>
To:        Daniel Braniss <danny@cs.huji.ac.il>,  Emmanuel Vadot <manu@bidouilliste.com>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>,  Ian Lepore <ian@freebsd.org>
Subject:   Re: Nanopi Neo I2C
Message-ID:  <1483769405.6803274.1534279717489@mail.yahoo.com>
In-Reply-To: <20180812065314.ff83dd595460a0fadee77f59@bidouilliste.com>
References:  <165877705.5351934.1533988165694.ref@mail.yahoo.com> <165877705.5351934.1533988165694@mail.yahoo.com> <1533999888.31375.6.camel@freebsd.org> <2122126425.5355832.1534000914963@mail.yahoo.com> <5E1DB0F5-EF98-46A8-8D33-11052834E35C@cs.huji.ac.il> <20180812065314.ff83dd595460a0fadee77f59@bidouilliste.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>=20
>=20
> > On 11 Aug 2018, at 18:21, lyd mc via freebsd-arm <freebsd-arm@freebsd.o=
rg> wrote:
> >=20
> > Hi Ian,
> > The iic bus seem to be working on linux image. I can detect the device =
at 0x18.
> > root@nanopi-neo:~/prog/I2C #=C2=A0 i2c -f /dev/iic0 -s
> > Hardware may not support START/STOP scanning; trying less-reliable read=
 method.
> > Scanning I2C devices on /dev/iic0: <none found>
> >=20
> > some kdump output of above command:=C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 C=
ALL=C2=A0 ioctl(0x3,I2CRSTCARD,0xbfbfec64)
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl 0
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CSTART,=
0xbfbfec64)
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No =
such file or directory
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CSTOP,0=
xbfbfec64)
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl 0
> > .<snip>=C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CRSTCA=
RD,0xbfbfec64)
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl 0
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CRDWR,0=
xbfbfec50)
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No =
such file or directory
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CRSTCAR=
D,0xbfbfec64)
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl 0
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CRDWR,0=
xbfbfec50)
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No =
such file or directory
> > Seems I2CRSTCARD and I2CSTOP are the only working ioctl on me.
> > I activated i2c0 using below dts code:
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 i2c@1c2ac00 {
> >=20
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 compatible =3D "allwinner,sun6i-a31-i2c";
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 reg =3D <0x1c2ac00 0x400>;
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 interrupts =3D <0x0 0x6 0x4>;
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 clocks =3D <0x1d 0x3b>;
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 resets =3D <0x1d 0x2e>;
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 pinctrl-names =3D "default";
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 pinctrl-0 =3D <0x20>;
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 status =3D "okay";
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 #address-cells =3D <0x1>;
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 #size-cells =3D <0x0>;
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 phandle =3D <0x41>;
> >=20
> >=20
> > Regards,Alyd
> >=C2=A0 =C2=A0 On Saturday, August 11, 2018, 11:04:54 PM GMT+8, Ian Lepor=
e <ian@freebsd.org> wrote:=C2=A0=20
> >=20
> > On Sat, 2018-08-11 at 11:49 +0000, lyd mc via freebsd-arm wrote:
> >> Hi List,
> >> Can you help me make I2C work in this board?
> >> I can detect the controller but cannot access it through iic ioctl.=20
> >>=20
> >> root@nanopi-neo:~/prog/I2C # dmesg |grep iic
> >> iichb0: <Allwinner Integrated I2C Bus Controller> mem 0x1c2ac00-
> >> 0x1c2afff irq 34 on simplebus0
> >> iicbus0: <OFW I2C bus> on iichb0
> >> iichb1: <Allwinner Integrated I2C Bus Controller> mem 0x1c2b000-
> >> 0x1c2b3ff irq 35 on simplebus0
> >> iicbus1: <OFW I2C bus> on iichb1
> >> iichb2: <Allwinner Integrated I2C Bus Controller> mem 0x1c2b400-
> >> 0x1c2b7ff irq 36 on simplebus0
> >> iicbus2: <OFW I2C bus> on iichb2
> >> iic0: <I2C generic I/O> on iicbus0
> >> iic1: <I2C generic I/O> on iicbus1
> >> iic2: <I2C generic I/O> on iicbus2
> >>=20
> >> kdump output:
> >>=20
> >>=C2=A0 1290 mcp=C2=A0 =C2=A0 =C2=A0 NAMI=C2=A0 "/dev/iic0"
> >>=C2=A0 1290 mcp=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 openat 3
> >>=C2=A0 1290 mcp=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CRDWR,0xbfbf=
ecd4)
> >>=C2=A0 1290 mcp=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No such =
file or directory
> >>=20
> >> This seems to work on my RPI.
> >>=20
> >=20
> > In this case, I wonder if the "errno 2" is not ENOENT, but
> > rather IIC_ENOACK which has not been translated to a proper errno
> > before returning. IIC_ENOACK is basically a timeout and can happen if
> > the slave address is wrong, or if the pinmux is wrong so that the bus
> > is electrically inactive.
> >=20
> > Is the bus working in general? Do any devices show up on a scan with
> >=20
> >=C2=A0 i2c -f /dev/iic0 -s
> >=20
> > -- Ian
> >=20
>=20
> the driver has timing issues (among others :-). I?m cc?ing the guys I got=
 a ?working?=C2=A0 twsi stuff=20
> to see if I can pass it on.

 >What timing issue and "other issues" are you talking about ?

> danny
Hi Manu,
Thanks for dropping by! Can you help me address my issue?
I already recompiled the with:1. TARGET_ARCH=3Darmv6 (same issue)2. Disable=
d some i2c modules (same issue)=C2=A0=C2=A0=C2=A0 # I2C support
=C2=A0=C2=A0=C2=A0=C2=A0 device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 iicbus
=C2=A0=C2=A0=C2=A0=C2=A0 device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 iic
=C2=A0=C2=A0=C2=A0=C2=A0 device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 twsi
=C2=A0=C2=A0=C2=A0=C2=A0 #device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 rsb=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Allwinner Reduc=
ed Serial Bus
=C2=A0=C2=A0=C2=A0=C2=A0 #device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 p2wi=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Allwinner Push-Pull T=
wo Wire
=C2=A0=C2=A0=C2=A0=C2=A0 #device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 axp209=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # AXP209 Power Management Unit
=C2=A0=C2=A0=C2=A0=C2=A0 #device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 axp81x=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # AXP813/818 Power Management Un=
it
=C2=A0=C2=A0=C2=A0=C2=A0 #device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 bcm2835_bsc
=C2=A0=C2=A0=C2=A0=C2=A0 #device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 fsliic=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Freescale i2c/iic
=C2=A0=C2=A0=C2=A0=C2=A0 #device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 icee=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # AT24Cxxx and compatib=
le EEPROMs
=C2=A0=C2=A0=C2=A0=C2=A0 #device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 sy8106a=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # SY8106A Buck Regulator
=C2=A0=C2=A0=C2=A0=C2=A0 #device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 ti_i2c
=C2=A0=C2=A0=C2=A0=C2=A0 #device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 am335x_pmic=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 # AM335x Power Management IC (TPC65217)
=C2=A0=C2=A0=C2=A0=C2=A0 #device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 am335x_rtc=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 # RTC support (power management only)
=C2=A0=C2=A0=C2=A0=C2=A0 #device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 twl=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # TI TWLX0X0/TPS6=
59x0 Power Management
=C2=A0=C2=A0=C2=A0=C2=A0 #device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 twl_vreg=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # twl voltage regulation
=C2=A0=C2=A0=C2=A0=C2=A0 #device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 twl_clks=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # twl external clocks
=20

Regards,Alyd

    On Sunday, August 12, 2018, 12:53:18 PM GMT+8, Emmanuel Vadot <manu@bid=
ouilliste.com> wrote: =20
=20
 On Sat, 11 Aug 2018 18:50:18 +0300
Daniel Braniss <danny@cs.huji.ac.il> wrote:

>=20
>=20
> > On 11 Aug 2018, at 18:21, lyd mc via freebsd-arm <freebsd-arm@freebsd.o=
rg> wrote:
> >=20
> > Hi Ian,
> > The iic bus seem to be working on linux image. I can detect the device =
at 0x18.
> > root@nanopi-neo:~/prog/I2C #=C2=A0 i2c -f /dev/iic0 -s
> > Hardware may not support START/STOP scanning; trying less-reliable read=
 method.
> > Scanning I2C devices on /dev/iic0: <none found>
> >=20
> > some kdump output of above command:=C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 C=
ALL=C2=A0 ioctl(0x3,I2CRSTCARD,0xbfbfec64)
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl 0
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CSTART,=
0xbfbfec64)
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No =
such file or directory
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CSTOP,0=
xbfbfec64)
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl 0
> > .<snip>=C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CRSTCA=
RD,0xbfbfec64)
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl 0
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CRDWR,0=
xbfbfec50)
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No =
such file or directory
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CRSTCAR=
D,0xbfbfec64)
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl 0
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CRDWR,0=
xbfbfec50)
> >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No =
such file or directory
> > Seems I2CRSTCARD and I2CSTOP are the only working ioctl on me.
> > I activated i2c0 using below dts code:
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 i2c@1c2ac00 {
> >=20
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 compatible =3D "allwinner,sun6i-a31-i2c";
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 reg =3D <0x1c2ac00 0x400>;
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 interrupts =3D <0x0 0x6 0x4>;
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 clocks =3D <0x1d 0x3b>;
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 resets =3D <0x1d 0x2e>;
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 pinctrl-names =3D "default";
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 pinctrl-0 =3D <0x20>;
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 status =3D "okay";
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 #address-cells =3D <0x1>;
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 #size-cells =3D <0x0>;
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 phandle =3D <0x41>;
> >=20
> >=20
> > Regards,Alyd
> >=C2=A0 =C2=A0 On Saturday, August 11, 2018, 11:04:54 PM GMT+8, Ian Lepor=
e <ian@freebsd.org> wrote:=C2=A0=20
> >=20
> > On Sat, 2018-08-11 at 11:49 +0000, lyd mc via freebsd-arm wrote:
> >> Hi List,
> >> Can you help me make I2C work in this board?
> >> I can detect the controller but cannot access it through iic ioctl.=20
> >>=20
> >> root@nanopi-neo:~/prog/I2C # dmesg |grep iic
> >> iichb0: <Allwinner Integrated I2C Bus Controller> mem 0x1c2ac00-
> >> 0x1c2afff irq 34 on simplebus0
> >> iicbus0: <OFW I2C bus> on iichb0
> >> iichb1: <Allwinner Integrated I2C Bus Controller> mem 0x1c2b000-
> >> 0x1c2b3ff irq 35 on simplebus0
> >> iicbus1: <OFW I2C bus> on iichb1
> >> iichb2: <Allwinner Integrated I2C Bus Controller> mem 0x1c2b400-
> >> 0x1c2b7ff irq 36 on simplebus0
> >> iicbus2: <OFW I2C bus> on iichb2
> >> iic0: <I2C generic I/O> on iicbus0
> >> iic1: <I2C generic I/O> on iicbus1
> >> iic2: <I2C generic I/O> on iicbus2
> >>=20
> >> kdump output:
> >>=20
> >>=C2=A0 1290 mcp=C2=A0 =C2=A0 =C2=A0 NAMI=C2=A0 "/dev/iic0"
> >>=C2=A0 1290 mcp=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 openat 3
> >>=C2=A0 1290 mcp=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CRDWR,0xbfbf=
ecd4)
> >>=C2=A0 1290 mcp=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No such =
file or directory
> >>=20
> >> This seems to work on my RPI.
> >>=20
> >=20
> > In this case, I wonder if the "errno 2" is not ENOENT, but
> > rather IIC_ENOACK which has not been translated to a proper errno
> > before returning. IIC_ENOACK is basically a timeout and can happen if
> > the slave address is wrong, or if the pinmux is wrong so that the bus
> > is electrically inactive.
> >=20
> > Is the bus working in general? Do any devices show up on a scan with
> >=20
> >=C2=A0 i2c -f /dev/iic0 -s
> >=20
> > -- Ian
> >=20
>=20
> the driver has timing issues (among others :-). I?m cc?ing the guys I got=
 a ?working?=C2=A0 twsi stuff=20
> to see if I can pass it on.

 What timing issue and "other issues" are you talking about ?

> danny
>=20
> _______________________________________________
> freebsd-arm@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"


--=20
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org> =20
From owner-freebsd-arm@freebsd.org  Tue Aug 14 21:30:52 2018
Return-Path: <owner-freebsd-arm@freebsd.org>
Delivered-To: freebsd-arm@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58A4E10651FA
 for <freebsd-arm@mailman.ysv.freebsd.org>;
 Tue, 14 Aug 2018 21:30:52 +0000 (UTC)
 (envelope-from fbsd@www.zefox.net)
Received: from www.zefox.net (www.zefox.net [50.1.20.27])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "www.zefox.org", Issuer "www.zefox.org" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id CB56E89EE4
 for <freebsd-arm@freebsd.org>; Tue, 14 Aug 2018 21:30:51 +0000 (UTC)
 (envelope-from fbsd@www.zefox.net)
Received: from www.zefox.net (localhost [127.0.0.1])
 by www.zefox.net (8.15.2/8.15.2) with ESMTPS id w7ELV8jQ055030
 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Tue, 14 Aug 2018 14:31:09 -0700 (PDT)
 (envelope-from fbsd@www.zefox.net)
Received: (from fbsd@localhost)
 by www.zefox.net (8.15.2/8.15.2/Submit) id w7ELV7gV055029;
 Tue, 14 Aug 2018 14:31:07 -0700 (PDT) (envelope-from fbsd)
Date: Tue, 14 Aug 2018 14:31:07 -0700
From: bob prohaska <fbsd@www.zefox.net>
To: Patrick Crilly <pcrilly@goodgas.com.au>
Cc: freebsd-arm@freebsd.org
Subject: Re: RPI3 swap experiments (grace under pressure)
Message-ID: <20180814213107.GA51051@www.zefox.net>
References: <20180812173248.GA81324@phouka1.phouka.net>
 <20180812224021.GA46372@www.zefox.net>
 <B81E53A9-459E-4489-883B-24175B87D049@yahoo.com>
 <20180813021226.GA46750@www.zefox.net>
 <0D8B9A29-DD95-4FA3-8F7D-4B85A3BB54D7@yahoo.com>
 <FC0798A1-C805-4096-9EB1-15E3F854F729@yahoo.com>
 <20180813185350.GA47132@www.zefox.net>
 <FA3B8541-73E0-4796-B2AB-D55CE40B9654@yahoo.com>
 <20180814014226.GA50013@www.zefox.net>
 <02fe39af-a02c-fb6a-70b0-da3b7fd06c22@goodgas.com.au>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <02fe39af-a02c-fb6a-70b0-da3b7fd06c22@goodgas.com.au>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-BeenThere: freebsd-arm@freebsd.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: "Porting FreeBSD to ARM processors." <freebsd-arm.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-arm>,
 <mailto:freebsd-arm-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-arm/>;
List-Post: <mailto:freebsd-arm@freebsd.org>
List-Help: <mailto:freebsd-arm-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-arm>,
 <mailto:freebsd-arm-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Aug 2018 21:30:52 -0000

On Tue, Aug 14, 2018 at 05:56:20PM +1000, Patrick Crilly wrote:
> On 14-Aug-18 11:42 AM, bob prohaska wrote:
> > I understand that the RPi isn't a primary platform for FreeBSD.
> > But, decent performance under overload seems like a universal
> > problem that's always worth solving, whether for a computer or
> > an office. The exact goals might vary, but coping with too much
> > to do and not enough to do it with is humanity's oldest puzzle.
> 
> It's a very difficult problem to solve.?? And provokes some pretty heated 
> arguments.

Understood. The arguments that apply to a Mars rover don't apply to a
rack server, and vice versa. To a degree I'm hoping for Mars rover behavior 
by a rack server OS on a smartphone platform 8-)
> 
> If you are experiencing overload, then there's a case for saying the 
> platform/system isup to the task.
                  ^^^^
Did you mean to say "isn't up"? In general, I agree in that case.

> >   
> > Maybe I should ask what the goals of the OOMA process serve.
> > I always thought an OS's goals were along the lines of:
> > 1. maintain control
> > 2. get the work done
> > 3. remain responsive
> >
> > OOMA seems to sacrifice getting work done, potentially entirely,
> > in support of keeping the system responsive and under control.
> 
Yes, but it seems to be the _first_visible_  response. Seems to me it would
be better reserved as a last resort.

> I believe the thinking is that if the system remains remains responsive 
> you have a chance of fixing the problem or at the very least you can 
> login and gather information about what is causing the problem.
>
Yes, some responsiveness is needed to distinguish from stuck.  
> >
> > To have some fun with the office analogy, when business is
> > slow the clerk serves customers as they come in. When things
> > get busy, the clerk says "take a number". When they get really
> > busy new customers are told "come back tomorrow" and when they
> > get absolutely frantic present customers are told "I can't finish
> > this now, I'll call you when it's done". That's grace under pressure.
> 
> Nice analogy. If people just keep coming all day, I think what you've 
> described is a responsive system.
 
I'm thinking of transient overloads; for permanent overloads there's no hope.
"Transient" would be more than a task duration but less than a vacation interval,
by how much I'm not sure, but it would scale with those intervals.

> The clerk isn't getting any work done,?? he's just responding to customers.?? 

The clerk is timesharing, going from one task to the next in turn. Response time
will suffer, because that's the only elasticity left in the problem. 
 
> And would "can't finish it now" be analogous to killing?? off processes?
Not if the "I'll call you when it's done" is honored. The task is placed in
a queue, finished when the overload passes, and the clerk returns the results.
When the queue gets short enough he begins starting new tasks again. Mark M.
equated this with swapping, as opposed to paging and I think he's right. 

In a sense, the "I'll call you when it's done" is like an old-fashioned 
batch processing scheme. Does FreeBSD have any vestigal remnant features
for accepting batch jobs? High nicenes is similar but still interactive. 
 
Responsiveness, if only to say "There are nnn tasks ahead of you, please call 
back after ....." is the only degree of freedom left. Exactly out how bad to 
let that get before admitting defeat would vary greatly between an interactive
job and a batch job.

To a degree, OOMA is biased toward interactive use. Buildworld  is 
more like a batch job.

Thanks for reading!

bob prohaska 





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