From nobody Wed Jan 12 00:23:31 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 B2353194495B for ; Wed, 12 Jan 2022 00:23:44 +0000 (UTC) (envelope-from mafsys1234@gmail.com) Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JYSwH5lVdz3RDl for ; Wed, 12 Jan 2022 00:23:43 +0000 (UTC) (envelope-from mafsys1234@gmail.com) Received: by mail-pj1-x102e.google.com with SMTP id oa15so1758766pjb.4 for ; Tue, 11 Jan 2022 16:23:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=j2QDQDca8kGhMKPozXmG5n8APwRDYrZ7FjdiY2W/Ezo=; b=mBOVXkVU4avecwKBYxrQd0JwVgEe/9FyWMGl/kwLflu8BDh6hN6AiVMdO0DpqZWvmO kNk+4XfKnT1phIcDI/IVjTWe1ADSmF/QPjPxircw6IZZyvBG+QGSEPA0IIm2+PTqZ5gN HfOd19nUtSDEmm3JdMI+5XCODlbyaDon2aKAK8TrpxV27uY4jBsgKmq6L9coDfDTDkJm 62OpTXXt+5s5fC8gRZbHPyqYKPajzg56w1QiR64o8AQ8qZf56qTRN0mK4DMsBP/BiZju jrAKF8AWA9UyZB0N/cAqZac3/FSs9PjCjwmHDEiS/XkD9+o/aAyPjjXo5af7m8oRgwsf ylDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=j2QDQDca8kGhMKPozXmG5n8APwRDYrZ7FjdiY2W/Ezo=; b=wH8loCKbR3I00NA4ly2Tbpn5IXahqXrvCbGGNaIkerTdeSomAoulKy+88tNB/F4gNX Q8wrfj7pQvhjN8bTkOANntw4ng5oQv/LAH5ldzudU7EsEyUvachQRX6YO2DYXenV+Tam T9J3ZbdUN7x/d3oyK22C3c+hCGuMTk13E7QCaL0Fae2YJwSIzhNf8DJccODS3qkLy9KS 2uH1/9r8o4qTZi/E9FgfuDFA7MHFDwwmFEQ9ZOovQSm7L2/G2E5j8rHSUWSA21eLA+mV 72+aAWmZbVP6JpGYeT3PgcDJjfu7Evaa1MZrSyliP7BxRkxRyKVvUmJ+wH+vOgb4rFvH M4Ow== X-Gm-Message-State: AOAM533RjhfICo3VvKhGBtOTMPBwgGwruf36wro5LspNyBvjqPwgq3Gn hANBLG4hogjBtwy900KKr85/pwumXE3nJE8h X-Google-Smtp-Source: ABdhPJwfT/rFaEBF97QYKq4n3wxtWaAfYTrA/RRFrvTjKOLIo7M9jRgpDxQ0FwZmzak4jxfh2GtcOQ== X-Received: by 2002:a17:90a:8c0e:: with SMTP id a14mr5845357pjo.111.1641947016608; Tue, 11 Jan 2022 16:23:36 -0800 (PST) Received: from [192.168.1.10] ([115.69.53.183]) by smtp.gmail.com with ESMTPSA id 20sm3828998pfh.71.2022.01.11.16.23.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jan 2022 16:23:36 -0800 (PST) Subject: Re: RPi4B, POE+. Fan To: freebsd-arm@freebsd.org References: <7ddec2da-b22a-9d3d-b64b-6c8137ff8f6d@bunyatech.com.au> From: MJ Message-ID: <5a2db808-d90a-cebd-51d2-7b4ee9953a75@gmail.com> Date: Wed, 12 Jan 2022 11:23:31 +1100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 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 In-Reply-To: <7ddec2da-b22a-9d3d-b64b-6c8137ff8f6d@bunyatech.com.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-AU Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4JYSwH5lVdz3RDl X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=mBOVXkVU; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mafsys1234@gmail.com designates 2607:f8b0:4864:20::102e as permitted sender) smtp.mailfrom=mafsys1234@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; NEURAL_HAM_MEDIUM(-1.00)[-0.995]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::102e:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-ThisMailContainsUnwantedMimeParts: N 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. > 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. 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