From owner-freebsd-arm@freebsd.org Sat Jan 5 21:41:06 2019 Return-Path: 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 9D89E1423FF8 for ; Sat, 5 Jan 2019 21:41:06 +0000 (UTC) (envelope-from per@hedeland.org) Received: from outbound1g.eu.mailhop.org (outbound1g.eu.mailhop.org [52.28.6.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F9526E489 for ; Sat, 5 Jan 2019 21:41:05 +0000 (UTC) (envelope-from per@hedeland.org) ARC-Seal: i=1; a=rsa-sha256; t=1546723494; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=fi0RTum42igWTzA03yauNZKyTbYKgLIzOoXhG/9HTwMRio66XNZbr+lbC1RTiP50eJP9rBist0pIw kKEG7hPqD7xH8g9HGgjSxPQ0HCDkpL3J70ve0l/9DmrLzT1eFZAZ3sRdW556kIY1TQ3WxcWF2elyq/ XO3HhK8mYlcZ5MDsDmOzj6Acnp0IGTc8YqU79HlyUXkabwtz+cnKEaIyAqI4GKJoDi8X3n/Jy5KcOt GIKNpdJYxxmiTHeIGeB/ePQFM+U0qTaZYkup0s7ygoAQkpygowCTez04zmsCvopXa3VCg8o7r70dEC bbJaD/ukvdcWlrjAT3revhxL/8iVoig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:content-type:in-reply-to:mime-version:date: message-id:from:references:cc:to:subject:dkim-signature:from; bh=Hi/KB7KFyGZgB393XQv+7nWSd+lnNhBXXLIpjj6Ezgw=; b=JTeh9cu8LZKS+wpvZ2qPoAZfHdrcp/wR2eUrbigIUWWywXZJ5xtH4/FjrU9+rgDE2ymqt1dLpXL9R UmWN6WyZWROHSSfKLcG1jMJ+8/Ep/d1je8megZMxlqAs2ozpYpMv8T3Vrup0pUTyh8mZ7l5R7rUy9g ctIB3YHxV3U/GRJDxMzsmWYzVBxPC8aXVusPOpWvLUO90e/zoif4P7C69Z/7Ty30FtI9vEzZdi52qw Um9c1S0D4lNJb///KiAygWu6PZ12WGAct5zE0mxLSZ1wyr5bMhRSuDCcem0P3l8b7NqZ77Ri/mKLr3 oOptihibnFDtBdeNI3dY69g+3fh9MSg== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=none smtp.mailfrom=hedeland.org smtp.remote-ip=81.228.152.101; dmarc=none header.from=hedeland.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:content-type:in-reply-to:mime-version:date: message-id:from:references:cc:to:subject:from; bh=Hi/KB7KFyGZgB393XQv+7nWSd+lnNhBXXLIpjj6Ezgw=; b=OHgLZYX1xmdKMW/pgvUrf4rQ9wkTzqPhj6Snn0GDNMLAM7Vxy76ETeUEy61cGnoix9CPBqhHK49yQ qkev7rIbimXVXEq3P9osHZXABwpIRh9ZVThJQ2TcWgx5IEMyCGYHzBExLQze5MD+Bbi8Kz8tY/QmmO 9ra3Zc//BnLMF00vqxniAUrMn1LyH9D/APuew0Uc9YxQfA5bGNqOaFEhqn5Lc26BIFTpU+yYOG/6bP xx54yHXyD2rRyIfQzdVD8hrB3px93sQe75JXMi3fkwwIcopqnTlgQtnjFKO4RtUoruyqhfNgutJ0Ek E3g6aNQR1g717jQ2KGQP4VYuZz7AKxg== X-MHO-RoutePath: cGVyaGVkZWxhbmQ= X-MHO-User: 55c59a8e-1130-11e9-8a28-a1efd8da9a94 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 81.228.152.101 X-Mail-Handler: DuoCircle Outbound SMTP Received: from hedeland.org (unknown [81.228.152.101]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id 55c59a8e-1130-11e9-8a28-a1efd8da9a94; Sat, 05 Jan 2019 21:24:51 +0000 (UTC) Received: from pluto.hedeland.org (pluto.hedeland.org [10.1.1.5]) by tellus.hedeland.org (8.15.2/8.15.2) with ESMTPS id x05LOojj072293 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sat, 5 Jan 2019 22:24:50 +0100 (CET) (envelope-from per@hedeland.org) Subject: Re: i2c on RPi Zero? To: Oleksandr Tymoshenko Cc: freebsd-arm@freebsd.org References: <229e0d36-a07b-8551-9613-0bf5748352e7@hedeland.org> <20190105195808.GA53872@bluezbox.com> From: Per Hedeland Message-ID: Date: Sat, 5 Jan 2019 22:24:49 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190105195808.GA53872@bluezbox.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 7F9526E489 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=outbound.mailhop.org header.s=dkim-high header.b=OHgLZYX1 X-Spamd-Result: default: False [-3.47 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_XOIP(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[outbound.mailhop.org:+]; MX_GOOD(-0.01)[cached: hedeland.org]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.89)[-0.893,0]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(-0.27)[asn: 16509(-1.25), country: US(-0.08)]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_ALLOW(-1.00)[i=1]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:16509, ipnet:52.28.0.0/16, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; R_DKIM_ALLOW(-0.20)[outbound.mailhop.org:s=dkim-high]; RECEIVED_SPAMHAUS_PBL(0.00)[101.152.228.81.zen.spamhaus.org : 127.0.0.11]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[hedeland.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[212.6.28.52.list.dnswl.org : 127.0.20.0]; R_SPF_NA(0.00)[]; RCVD_TLS_ALL(0.00)[] 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: Sat, 05 Jan 2019 21:41:06 -0000 On 2019-01-05 20:58, Oleksandr Tymoshenko wrote: > Per Hedeland (per@hedeland.org) wrote: >> I did a bit more testing on the Zero to see if the FreeBSD version >> mattered: >> >> FreeBSD-12.0-STABLE-arm-armv6-RPI-B-20190103-r342709.img - still no >> luck. >> >> FreeBSD-11.2-STABLE-arm-armv6-RPI-B-20190103-r342709.img - works! >> (I.e. dmesg reports as below and /dev/iic{0,1} get created - I haven't >> tested actual usage beyond having 'i2c -s' report "no devices found".) >> >> I guess that the i2c support hasn't been removed intentionally, >> i.e. this seems to be a regression - or is there some additional >> config etc required to enable it with FreeBSD-12? The iic and iicbus >> drivers appear to be built into the kernel in both 11 and 12. >> >> (I haven't tested FreeBSD-12 on the Pi B, but I would guess that the >> result will be the same as on the Zero, since it seems the hardware is >> the same.) > > There was a transition in device tree files between 11 and 12. > bcm2708-rpi-0-w.dtb has i2c nodes but they're disabled by default. > Try editing config.txt on FAT partition and adding following line: > > dtparam=i2c > > This should make boot firmware to enable device nodes in the device > tree blob during the boot. Thanks a lot! I can confirm that this makes i2c "work" on Zero with 12-RELEASE (almost) to the extent described above for 11.2-STABLE (it detects/creates only iic0, not iic1, but as far as I understand from other sources, iic0 is all that is needed for "plain B" and thus also for Zero). Should I file a PR for this? I assume that the i2c nodes being disabled is not intentional... --Per Hedeland