From owner-freebsd-arm@freebsd.org Sun Feb 10 17:33:39 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 9117914D36CA for ; Sun, 10 Feb 2019 17:33:39 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [195.149.99.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "raven.bwct.de", Issuer "raven.bwct.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E204E884D7 for ; Sun, 10 Feb 2019 17:33:37 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.15.2/8.15.2) with ESMTPS id x1AHXXfj061873 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 10 Feb 2019 18:33:33 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cicely.de; s=default; t=1549820014; bh=7Byk0jOAFch2etxhYMO1kWL1a+v9yoo2fD2ovm/yCoQ=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To; b=sAfhpdaTCn0MFO1K3gXI6XjeZTf8NnZ4vJQgsxRu15KqVIbHnH/ow6QPAP94Q6ewH zbvyDU/B6vWRd1xCZoKO/bNxlKv8ZD4OaO9qHyrbLfISGtPmr5+m98KtqgV5sBYeZz wXhtLu6LbOJFWEVXavL1e6kNJGdnD7mTknitTuWc= Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id x1AHXU3s097936 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 10 Feb 2019 18:33:30 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.15.2/8.15.2) with ESMTP id x1AHXUFq084449; Sun, 10 Feb 2019 18:33:30 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.15.2/8.15.2/Submit) id x1AHXSGD084448; Sun, 10 Feb 2019 18:33:28 +0100 (CET) (envelope-from ticso) Date: Sun, 10 Feb 2019 18:33:28 +0100 From: Bernd Walter To: Emmanuel Vadot Cc: ticso@cicely.de, freebsd-arm@freebsd.org, Bernd Walter Subject: Re: Battery support on Pine64-LTS and power button Message-ID: <20190210173327.GG54799@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <20190210120633.GE54799@cicely7.cicely.de> <20190210141043.039850d3d27528c87eae9f3c@bidouilliste.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190210141043.039850d3d27528c87eae9f3c@bidouilliste.com> X-Operating-System: FreeBSD cicely7.cicely.de 12.0-STABLE amd64 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=4.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de X-Rspamd-Queue-Id: E204E884D7 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cicely.de header.s=default header.b=sAfhpdaT X-Spamd-Result: default: False [-1.14 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[ticso@cicely.de]; R_DKIM_ALLOW(-0.20)[cicely.de:s=default]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-0.996,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cicely.de]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.60)[0.598,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[cicely.de:+]; MX_GOOD(-0.01)[cached: mx1.bwct.de]; RCVD_IN_DNSWL_NONE(0.00)[3.99.149.195.list.dnswl.org : 127.0.20.0]; NEURAL_HAM_MEDIUM(-0.93)[-0.933,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:21461, ipnet:195.149.99.0/24, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.00)[country: DE(-0.01)] 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: Sun, 10 Feb 2019 17:33:39 -0000 On Sun, Feb 10, 2019 at 02:10:43PM +0100, Emmanuel Vadot wrote: > > Hi, > > On Sun, 10 Feb 2019 13:06:34 +0100 > Bernd Walter wrote: > > > The Pine64-LTS runs perfectly with the battery pack in addition to mains > > supply. > > But I don't see any way to see the remaining charge left, e.g. for > > a clean shuttdown. > > It's not available right now. thj@ added some non-acpi battery support > and ganbold@ said he will add support for battery status for the > pinebook. Both pinebook and pine64-lts uses the same PMIC > (AXP803/AXP813) so it will work on both. Amazing. Since both of my Orange Pi PC2 don't have stable ethernet with a GBit link, the Pine64-LTS became more interesting to me. Will have to ask the vendor about it, it is very much a hardware issue and the boards behave differently in that one works mostly and the other mostly don't work. > > Also how is the power button integrated in the OS that is triggers a clean > > shutdown? > > It's done at the PMIC level, see > https://svnweb.freebsd.org/base/head/sys/arm/allwinner/axp81x.c?revision=343952&view=markup#l834 I see, thank you. > > I'm asking if we have ready available support to trigger a shuttdown > > via GPIO on other boards, or if such a support has to be done individually? > > It wouldn't be a big deal to poll a GPIO though. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.