From nobody Wed Jan 12 03:59:13 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7FAEF19666A1 for ; Wed, 12 Jan 2022 03:59:35 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) Received: from vmse01.mailcluster.com.au (vmse01.mailcluster.com.au [IPv6:2401:fc00:2:13f::6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4JYYjK36CXz4p9x for ; Wed, 12 Jan 2022 03:59:32 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) Received: from vmcp43.digitalpacific.com.au ([101.0.119.58]) by vmse01.mailcluster.com.au with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1n7Un5-000843-N3 for freebsd-arm@freebsd.org; Wed, 12 Jan 2022 14:59:27 +1100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bunyatech.com.au; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:To:Subject:MIME-Version:Date:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ODjZEnMb5dPdfAP9W5EEEzLQgaAeYhJ7kvACAt1kiU4=; b=YVUsjOGsXcUU/5i0yo3PA/0R9Q QuKyElxMPb4wIwvFnaAimZSmpa1tiAcEeHs2vH79ki43QCBBwqUVs6k103Fxe6kjrP0vhobIkySyA eg3g2+9JLP//fV5IUlYWFhQ3Rz114BR3CNWxiKlSt/7B6RNgohRoE6qWTG07/sbAUo5hMLikxXdTB Y9vUl5gei04KkSwOF9NsJ2J6SXMz1+ld9UnwqR75na7PHG5uwf4j9qlhwKnU6H4gdU32zlOmNqbPJ Lzpdu6fnbtyQgAZsIIVAnMXO31d7fMZsnKN5bIaL5/ir7CkVGWN24awkGcCiR7kxnYAPjLfUW+8Dn YAA6XaXw==; Received: from ppp221-139.static.internode.on.net ([150.101.221.139]:38708 helo=[10.0.1.106]) by vmcp43.digitalpacific.com.au with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1n7Un3-00CPrc-TQ for freebsd-arm@freebsd.org; Wed, 12 Jan 2022 14:59:13 +1100 Message-ID: <4b24de3a-0124-50d6-e1bc-cc45785e3755@bunyatech.com.au> Date: Wed, 12 Jan 2022 14:59:13 +1100 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: RPi4B, POE+. Fan To: freebsd-arm@freebsd.org References: <7ddec2da-b22a-9d3d-b64b-6c8137ff8f6d@bunyatech.com.au> <5a2db808-d90a-cebd-51d2-7b4ee9953a75@gmail.com> From: Brian Scott In-Reply-To: <5a2db808-d90a-cebd-51d2-7b4ee9953a75@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Authenticated-User: bscott@bunyatech.com.au X-Authenticator: dovecot_plain X-Originating-IP: 101.0.119.58 X-SpamExperts-Domain: digipac-sh-outbound4.mailcluster.com.au X-SpamExperts-Username: 101.0.119.58 X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.06) X-Recommended-Action: accept X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8bjRMzItlyS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pg/800vALz8mnE6wA706qGokY7okO g7HJIt1nJKmB0MxOKVrDfQzDgqFDumjx9w03a6SLNhJ6Q12/4jZa7jE= X-Report-Abuse-To: spam@vmse01.mailcluster.com.au X-Rspamd-Queue-Id: 4JYYjK36CXz4p9x X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bunyatech.com.au header.s=default header.b=YVUsjOGs; dmarc=none; spf=pass (mx1.freebsd.org: domain of bscott@bunyatech.com.au designates 2401:fc00:2:13f::6 as permitted sender) smtp.mailfrom=bscott@bunyatech.com.au X-Spamd-Result: default: False [-3.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bunyatech.com.au:s=default]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[bunyatech.com.au]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DKIM_TRACE(0.00)[bunyatech.com.au:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:55803, ipnet:2401:fc00::/32, country:AU]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Status: O Content-Length: 2265 Lines: 63 Hi, On 12/1/22 11:23 am, MJ wrote: > > > On 11/01/2022 9:50 pm, Brian Scott wrote: >> Hi List, >> >> Is there a known method to get the fan running on the rpi-poe+ board >> under FreeBSD? >> > > I would assume this depends on the board. You've not specified anything. Sorry, I should have been more explicit. The board is the 'official' rpi-poe+ board from the raspberry pi foundation. I should have underlined that. https://www.raspberrypi.com/products/poe-plus-hat/ >> It looks like it is controlled completely by the kernel in Linux >> land. Adding the rpi-poe dtb overlay has no effect on FreeBSD so I'm >> guessing there is no driver for it. >> >>  From what I've read, its controlled by something on the iic bus used >> for HAT identification. Beyond that, information seems to get very >> scarce. The Linux driver operates it by sending messages to the >> firmware. This would be a lot more tricky than just sending commands >> to an iic device from userland and beyond my hacking skills. > > If it is i2c rather than some n-channel FET, then you have a few options: > 1. Look on the design specifications or data sheet for the address of > the i2c. > 2. Build an i2c scanner using an arduino. This will scan for the > address on the bus. All of the official documentation seems to revolve around enabling the device in the Linux kernel. I have found schematics for the power handling side of the board but nothing for the fan side. I'm happy scanning the i2c bus from the Pi directly. The FreeBSD i2c command has worked well in the past. Knowing the address of the device doesn't tell me what it is since many i2c addresses are shared between many different device types. > > Once you have the address it's trivial to program i2c.There's lots of > examples of how to do this out in the internet. > > MJ Thanks. As I said, knowing the address doesn't tell me what it is, only how to address it. The only example of code that I've found for this device is in the Linux kernel and uses an interface to the firmware rather than directly through i2c. I'll follow your advice and do some bus probing to see what is there since I believe it's possible to access the second i2c bus with the right config.txt entries. Thanks Brian