Date: Sat, 11 Aug 2018 16:01:52 +0000 (UTC) From: lyd mc <alydiomc@yahoo.com> To: Daniel Braniss <danny@cs.huji.ac.il>, "ian@freebsd.org" <ian@freebsd.org> Cc: "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>, eval@iptk.ru, Milan Obuch <freebsd-arm@dino.sk> Subject: Re: Nanopi Neo I2C Message-ID: <289384556.5384363.1534003312078@mail.yahoo.com> In-Reply-To: <5E1DB0F5-EF98-46A8-8D33-11052834E35C@cs.huji.ac.il> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
=20 Thanks Danny and Ian! Regards,Alyd On Saturday, August 11, 2018, 11:50:37 PM GMT+8, Daniel Braniss <danny@= cs.huji.ac.il> wrote: =20 =20 =20 > On 11 Aug 2018, at 18:21, lyd mc via freebsd-arm <freebsd-arm@freebsd.org= > 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 m= ethod. > 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 CAL= L=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,0x= bfbfec64) >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No su= ch file or directory >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=C2=A0 ioctl(0x3,I2CSTOP,0xb= fbfec64) >=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,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,I2CRDWR,0xb= fbfec50) >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No su= ch file or directory >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 CALL=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,I2CRDWR,0xb= fbfec50) >=C2=A0 =C2=A0 871 i2c=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No su= ch 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 Lepore = <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,0xbfbfec= d4) >>=C2=A0 1290 mcp=C2=A0 =C2=A0 =C2=A0 RET=C2=A0 ioctl -1 errno 2 No such fi= le 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 the driver has timing issues (among others :-). I=E2=80=99m cc=E2=80=99ing = the guys I got a =E2=80=98working=E2=80=99=C2=A0 twsi stuff=20 to see if I can pass it on. danny =20 From owner-freebsd-arm@freebsd.org Sat Aug 11 16:58:19 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 CE1F11073D16 for <freebsd-arm@mailman.ysv.freebsd.org>; Sat, 11 Aug 2018 16:58:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 644908912B for <freebsd-arm@freebsd.org>; Sat, 11 Aug 2018 16:58:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id w11-v6so10509441iob.2 for <freebsd-arm@freebsd.org>; Sat, 11 Aug 2018 09:58:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1QLuUpyF4QExTPSy3xXbuSqQGA+XNY/7IAwNQFr2U7Q=; b=x8x8De5EBuVanWhAHR19gmaUXBSAV8Nlh7nLl/UqQTpf7TqriG6Z3KCsnWjKw46tpH kYLSfj+wxn01xP5b+zUksLJvkOA7VIaPXEFXGjxT4tLsVKxh8/vDQEiYcficlh5Q7NnO V0v5bc2PaDYUfevCWU6EnKb54mZmdZDnGg7sk+3kqAeWpvBS6QsemiFien45mXX7XI2V 0h9y+aRLb1Cgt7uX84dfXoc57RGH4+1bCVj7zm49BVec+4388p35g5dwWOJRM7Af9Vd1 WE1ZmiGZsqVOgKlZGzzq6fgd0Kj1ryN9YF052ESTrsBsEdCciEAR3uKZDfaIfvdffQRY Cg1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1QLuUpyF4QExTPSy3xXbuSqQGA+XNY/7IAwNQFr2U7Q=; b=csFOMs4+1TStKdwht/uZtJ0WUwHjegAU2k//KuCozkuBsNAIzPg+1NUMod+pfs6dpj KFY4f0RZsbw+1ekepDQtkD/N0eiZ6770up+g3ZaPPcvTjoOH37Az/jcw9p8MZICc31Tj 4W4Ql246VqG2BWqssMJrunXnLzb2u4W8T03m1FGAWYhWnsWchf3cnuj7gqqa02owzb3m eN/98s+LSYsesWkMndIGonNt31ug3xzQ7t2QVq/nHm5YEhaObvOWntof4ZzktwFdpOuJ 8ZpDSfT25jXV7RkDkHntYjbnQ4Jr5F9KKi0RdLgRn9ruIWGwFC5YrLL21PktvvXqUfPn I78Q== X-Gm-Message-State: AOUpUlFVnS2xIM9VuIZfUKTbadXdmH82l3aFhsIAmy6frx6nwpTPfEIF fr+KKcvuLDA2kcXNcF/9LA4nPm/oISO2qdBemdwOAXy0 X-Google-Smtp-Source: AA+uWPy5fKPPDrxrnGhvpVHRVRnRdUCQHWdKZCuwrKg9NPUvzV6EMZq13aMqBde/mz37U+ATvUc9CIqCue93R9ZQRmA= X-Received: by 2002:a6b:3902:: with SMTP id g2-v6mr9347418ioa.168.1534006698486; Sat, 11 Aug 2018 09:58:18 -0700 (PDT) MIME-Version: 1.0 References: <CANCZdfo3D1P7eOkZGuLNTPdQ6V00W1-gieVYTE7R=-qaYnehbA@mail.gmail.com> <201808111507.w7BF7Fmi028163@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201808111507.w7BF7Fmi028163@pdx.rh.CN85.dnsmgr.net> From: Warner Losh <imp@bsdimp.com> Date: Sat, 11 Aug 2018 10:33:16 -0600 Message-ID: <CANCZdfr1gPHARyfE9XV5+jMHoNtfWPof9Yn5_6+pJqtUPm-MkA@mail.gmail.com> Subject: Re: Kill old, non-INTRNG code on ARM To: "Rodney W. Grimes" <freebsd-rwg@pdx.rh.cn85.dnsmgr.net> Cc: freebsd-arm@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 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: Sat, 11 Aug 2018 16:58:20 -0000 On Sat, Aug 11, 2018, 9:07 AM Rodney W. Grimes < freebsd-rwg@pdx.rh.cn85.dnsmgr.net> wrote: > > One last thing, even though we're in a slush, is to kill the pre-INTRNG > > code. > > > > It's required for armv6 and v7 for some time (only the Amlogic 8726 > boards > > remain broken there). And we're down to two families of chips which > support > > armv5: rt1310 and the Marvel gear. Both of them support INTRNG. > > > > I propose we eliminate the INTRNG option and unifdef the code to remove > the > > undefined case. > > > > Comments? > > Where is the deprication policy? > This is dead code elimination only... ;) Warner >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?289384556.5384363.1534003312078>