From owner-freebsd-arm@freebsd.org Fri Feb 14 12:15:41 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA59923238A for ; Fri, 14 Feb 2020 12:15:41 +0000 (UTC) (envelope-from nikolay.kostirya@i11.co) Received: from mx.i11.co (mx.i11.co [159.69.78.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48Jslw6HWjz4VBt for ; Fri, 14 Feb 2020 12:15:40 +0000 (UTC) (envelope-from nikolay.kostirya@i11.co) Received: from [82.207.42.188] (helo=localhost) by mx.i11.co with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j2Zsb-0001Gs-G4 for freebsd-arm@freebsd.org; Fri, 14 Feb 2020 12:15:33 +0000 Date: Fri, 14 Feb 2020 14:15:31 +0200 From: Nick Kostirya To: freebsd-arm@freebsd.org Subject: gpioiic and APDS9960 sensors Message-ID: <20200214141531.5bb948e5@i11.co> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i386-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48Jslw6HWjz4VBt X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.14 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[i11.co:s=omicron]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:159.69.78.69]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_ONE(0.00)[1]; DKIM_TRACE(0.00)[i11.co:+]; DMARC_POLICY_ALLOW(-0.50)[i11.co,reject]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-2.14)[ip: (-9.63), ipnet: 159.69.0.0/16(0.48), asn: 24940(-1.55), country: DE(-0.02)]; ASN(0.00)[asn:24940, ipnet:159.69.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 12:15:41 -0000 Hello. I use iicbus over gpioiic on NanoPi NEO. All my sensors work fine, except for APDS9960 sensors. I have two APDS9960 sensors and and both give an error: > i2c -f /dev/iic0 -s Scanning I2C devices on /dev/iic0: 39 > ktrace -t+ i2c -f /dev/iic0 -a 0x39 -d r -o 0 -c 1 1654 i2c CALL ioctl(0x3,I2CSTART,0xbfbfebf0) 1654 i2c RET ioctl 0 1654 i2c CALL ioctl(0x3,I2CWRITE,0xbfbfebf0) 1654 i2c RET ioctl -1 errno 2 No such file or directory 1654 i2c CALL ioctl(0x3,I2CSTOP,0x20056010) 1654 i2c RET ioctl 0 > ktrace -t+ i2c -f /dev/iic0 -a 0x39 -d r -o 0 -c 1 -m tr 1657 i2c CALL ioctl(0x3,I2CRDWR,0xbfbfebd8) 1657 i2c RET ioctl -1 errno 2 No such file or directory If I use iicbus over iichb0 on another NanoPi NEO then APDS9960 sensors work fine. What do you think about it and is it possible to fix this error? I use FreeBSD-12.1-STABLE-arm-armv7-GENERICSD-20191212-r355610.img Nick.