From owner-freebsd-arm@freebsd.org Sun Jan 12 03:55:58 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 2E2EB222050 for ; Sun, 12 Jan 2020 03:55:58 +0000 (UTC) (envelope-from matheus@eternamente.info) Received: from hobbes.arroway.org (hobbes.arroway.org [173.199.118.77]) by mx1.freebsd.org (Postfix) with ESMTP id 47wNDW6vP2z3PNf for ; Sun, 12 Jan 2020 03:55:55 +0000 (UTC) (envelope-from matheus@eternamente.info) Received: from elita (unknown [177.89.5.111]) by hobbes.arroway.org (Postfix) with ESMTPA id 73B881C6918 for ; Sun, 12 Jan 2020 00:55:49 -0300 (BRT) Date: Sun, 12 Jan 2020 00:54:54 -0300 From: Nenhum_de_Nos To: freebsd-arm@freebsd.org Subject: own freebsd-update server for RPi3 Message-Id: <20200112005454.e7599be873eada0f40d7760a@eternamente.info> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47wNDW6vP2z3PNf X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of matheus@eternamente.info has no SPF policy when checking 173.199.118.77) smtp.mailfrom=matheus@eternamente.info X-Spamd-Result: default: False [-0.08 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.67)[-0.674,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.58)[-0.581,0]; DMARC_NA(0.00)[eternamente.info]; R_SPF_NA(0.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:20473, ipnet:173.199.116.0/22, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.32)[asn: 20473(-1.56), country: US(-0.05)]; 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: Sun, 12 Jan 2020 03:55:58 -0000 Hi, I have a RPi3 running freebsd 12.1R and I need to use custom kernel (pf compiled) after all was configured. I used crochet to have this img with pf compiled in, and now I need to update my RPi with that image. I found this link https://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/index.html But it is old and I tested it and was not working for me. Is that another way I can update my RPi rather then compile it on itself? If anyone has any hints, thanks. matheus -- Nenhum_de_Nos From owner-freebsd-arm@freebsd.org Sun Jan 12 06:14:38 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 99D3F22582B for ; Sun, 12 Jan 2020 06:14:38 +0000 (UTC) (envelope-from jonc@chen.org.nz) Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47wRJY3Tq1z42h2 for ; Sun, 12 Jan 2020 06:14:37 +0000 (UTC) (envelope-from jonc@chen.org.nz) Received: by mail-ot1-x342.google.com with SMTP id h9so6029525otj.11 for ; Sat, 11 Jan 2020 22:14:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chen-org-nz.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wpSqi+ErG25NuoQXlEWFzlzgsGKbEWzuPtVhxDS8XAs=; b=yLD4suuFay9bZWHwkghRBFPWFZvUBchVjHZhRu8VtbthZNCBRLjSMeCP3EWLjhsx1P w7lDh0xqkKwYkMeO3rjs+UA/WMRgxizzMjODxZpSZWJg62iHwT5GJ5au+XJl5sYkX6FV lVTUVKJJDd74Q731Rra43abooQEfQLOU1FGTHwi2t0afp/JFcaRug6gUp8KMyLpLfMbP 9Suntb3WLXAnWW5vVBaoYGzSxD48Ciz8TuzAGGKrY5nsjLi91c2ON181GUbMK7LW+4Jw WYmRSBgBS0gUzy4lgkyO0cSm7w4GzE5ySSliWa4UFZFgMbNqmjDv6ncYU74a4TulDOOg Yp+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wpSqi+ErG25NuoQXlEWFzlzgsGKbEWzuPtVhxDS8XAs=; b=Wjh2RjqTOeSW2BttMUtx3Q0io1FDckZt5QYCtCyv+2IyFHNr9UPAnfOe/bAIihdQjw 4dJZh6M1YI4kFCLhA7p00ZYRygazLe6ymQuft1J6eIamsO8JeLR2dT8BqNHjmOsZed8T s57Doqwa6Ti6JRMrl/stZs0jS6v7MbjeNTdH6c5HbMwvvtGnvSLQwwTqTCvguxibVvFq weEYbU1yWCEoHZSj9G6zcx0NuzKjAP5i8Yn8os1F6BfCFT3isPSmKzeY2z2HPIzQYw2d hgd9oSRghmqr4jjtmOMmFGllFgeogk15wneI3yI55ZO1jtqImZR59YjiWa7glcmS6kmS L5qQ== X-Gm-Message-State: APjAAAW7w5/4K9wKG4k1Fun246jIMviBG/I4eh1rnIbi4sn3uWBbDCKG Wa/OcmZpBPZlJOIo/W98HCR4qaxaycagVRxpRyz0am/TXYM= X-Google-Smtp-Source: APXvYqw4JoBLSczgKW9C8Un4eaGWB9WKEh6qDkSKcrw2bArCFx/O8JyrPQm5hmDDJJ26O7KKdMFaqIJ/ONQAcWnWebk= X-Received: by 2002:a9d:10d:: with SMTP id 13mr8314315otu.149.1578809676373; Sat, 11 Jan 2020 22:14:36 -0800 (PST) MIME-Version: 1.0 References: <20200112005454.e7599be873eada0f40d7760a@eternamente.info> In-Reply-To: <20200112005454.e7599be873eada0f40d7760a@eternamente.info> From: Jonathan Chen Date: Sun, 12 Jan 2020 19:14:20 +1300 Message-ID: Subject: Re: own freebsd-update server for RPi3 To: Nenhum_de_Nos Cc: freebsd-arm@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 47wRJY3Tq1z42h2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=chen-org-nz.20150623.gappssmtp.com header.s=20150623 header.b=yLD4suuF; dmarc=none; spf=softfail (mx1.freebsd.org: 2607:f8b0:4864:20::342 is neither permitted nor denied by domain of jonc@chen.org.nz) smtp.mailfrom=jonc@chen.org.nz X-Spamd-Result: default: False [-2.49 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[chen-org-nz.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DMARC_NA(0.00)[chen.org.nz]; R_SPF_SOFTFAIL(0.00)[~all]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[chen-org-nz.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2.4.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-0.19)[ip: (3.07), ipnet: 2607:f8b0::/32(-2.11), asn: 15169(-1.84), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; 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: Sun, 12 Jan 2020 06:14:38 -0000 On Sun, 12 Jan 2020 at 16:56, Nenhum_de_Nos wrote: > > Hi, > > I have a RPi3 running freebsd 12.1R and I need to use custom kernel (pf compiled) after all was configured. > I used crochet to have this img with pf compiled in, and now I need to update my RPi with that image. > > I found this link https://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/index.html > > But it is old and I tested it and was not working for me. Is that another way I can update my RPi rather then compile it on itself? I crossbuild my RPI3 kernel, world and ports on an amd64 host, with the help of qemu-aarch64-static and binmiscctl(8); based from: https://wiki.freebsd.org/QemuUserModeHowTo Once you have built everything, just mount the filesystem on the RPI3 SD card and install everything onto it. Cheers. -- Jonathan Chen From owner-freebsd-arm@freebsd.org Sun Jan 12 08:03:03 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 38E4B22863C for ; Sun, 12 Jan 2020 08:03:03 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vtr.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47wTjf0cVyz47cK for ; Sun, 12 Jan 2020 08:03:01 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) by vtr.rulingia.com (8.15.2/8.15.2) with ESMTPS id 00C82qM4068964 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 12 Jan 2020 19:02:58 +1100 (AEDT) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id 00C82lcl086007 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sun, 12 Jan 2020 19:02:47 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id 00C82lJo086006 for freebsd-arm@freebsd.org; Sun, 12 Jan 2020 19:02:47 +1100 (AEDT) (envelope-from peter) Date: Sun, 12 Jan 2020 19:02:47 +1100 From: Peter Jeremy To: freebsd-arm@freebsd.org Subject: Banana Pi M1 SATA problems Message-ID: <20200112080247.GF25924@server.rulingia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jCrbxBqMcLqd4mOl" Content-Disposition: inline X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47wTjf0cVyz47cK X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of peter@rulingia.com designates 2001:19f0:5801:ebe:5400:1ff:fe53:30fd as permitted sender) smtp.mailfrom=peter@rulingia.com X-Spamd-Result: default: False [-7.64 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[rulingia.com]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5800::/38, country:US]; RCVD_TLS_ALL(0.00)[]; IP_SCORE(-3.24)[ip: (-9.70), ipnet: 2001:19f0:5800::/38(-4.85), asn: 20473(-1.57), country: US(-0.05)] 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, 12 Jan 2020 08:03:03 -0000 --jCrbxBqMcLqd4mOl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'm trying to get my (new) Banana Pi M1 to talk to a SATA drive. Unfortunately, something is disabling the SATA port. According to a verbose boot (using both the Release 12.1 memstick and a newly built head at r356414): ahci0: mem 0x1c18000-0x1c18fff irq 2= 5 on simplebus0 ahci0: AHCI v1.10 with 1 3Gbps ports, Port Multiplier not supported ahci0: quirks=3D0x2 ahci0: Caps: NCQ SNTF ALP AL CLO 3Gbps PMD SSC PSC 32cmd CCC 1ports ahcich0: not probed (disabled) I haven't explicitly disabled anything. Running "devctl enable ahcich0" results in the device probing/attaching but it still won't talk to a HDD. I've looked at my loader configuration (and kenv), sysctl and u-boot environment without finding anything obviously wrong. Does anyone have any ideas? --=20 Peter Jeremy --jCrbxBqMcLqd4mOl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAl4a0qBfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzSCog//QsZ2qNd54fGEoP1fHL16yWZ8vqy36kX7CAnOK9lfXN7nKhjMM/bZizWx llZtCi81R35lX2qmL7q0mLW+erKZqWir8oa2XKI8gEtc8mgY5BCYSM+BcyzNcWem 22N4Ww8JAbUFpI8CvKqpFSSuNVvybRGxC+/SyjDkI9Oa+Gajd5L08XNjY1H8URd4 xvCMayWKi4T9/o4vxATpFUaT1sPyZeLNBLcdeZdph6r0Jy4cWTu40J877BUwc9HV 4/xtNyTHwJ/CFdSslR0mJN6Og9CVMmS7NDmayMFgKqGS510aV7E+NeBLdKCKlkOn 2YMNh+QWVbV1VIOFi8m8Boj72lE15QuR3JUFa5E5eKUSJuQkeHTIX732TdscE1F3 40B26HkEbStgQTkHm5yb/CQCWVRSqgsyAkeGqOcbuQ+8DPAU0nj75smiP992H8uI +1LVb7BOtibCryMk0T9iSomeUtKElAiB57OcGbupMFd39VjJnnTaG9YFHZ29NK/y tfTaKQsKxNUsbPgRiIc9pu5hOzAbIMGHNsno6ad+BjKNRrm9ZD/exPIjFyMUjM3y /DUVdG4tzlAZ53mC8fO/53zIkLZeQitXZyi1EPe/1ItQzRUX35wwyTbrTd+K52i5 2O3l6KXAmalC8DbV0Ih5mVC91QNAxYFe3cYw4Pkn1D8lLzgcVYA= =Bofg -----END PGP SIGNATURE----- --jCrbxBqMcLqd4mOl-- From owner-freebsd-arm@freebsd.org Sun Jan 12 15:22:26 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 682301D97CB for ; Sun, 12 Jan 2020 15:22:26 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47wgSf27F4z4TG8 for ; Sun, 12 Jan 2020 15:22:26 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 3B60116B73 for ; Sun, 12 Jan 2020 15:22:26 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f179.google.com with SMTP id n15so6894354qtp.5 for ; Sun, 12 Jan 2020 07:22:26 -0800 (PST) X-Gm-Message-State: APjAAAVvRC9OqTHMckZYVZH0+j8co297NzkaJy6kRiich/mRub905Euh WAxaKVyBTaDt9hNnUx+WCT66+mG+VBxIIimzkD8= X-Google-Smtp-Source: APXvYqy1ElDoeyLC660mgYOO8WONBRgZPbSmSqBuqwKRwTfdJeLilRsEb0OkJiRkprYm1I7WRVUTVHwV/ZRh9IvlgNo= X-Received: by 2002:ac8:f77:: with SMTP id l52mr10519343qtk.310.1578842545812; Sun, 12 Jan 2020 07:22:25 -0800 (PST) MIME-Version: 1.0 References: <20200112080247.GF25924@server.rulingia.com> In-Reply-To: <20200112080247.GF25924@server.rulingia.com> From: Kyle Evans Date: Sun, 12 Jan 2020 09:22:14 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Banana Pi M1 SATA problems To: Peter Jeremy Cc: "freebsd-arm@freebsd.org" Content-Type: text/plain; charset="UTF-8" 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, 12 Jan 2020 15:22:26 -0000 On Sun, Jan 12, 2020 at 2:03 AM Peter Jeremy wrote: > > I'm trying to get my (new) Banana Pi M1 to talk to a SATA drive. > Unfortunately, something is disabling the SATA port. According to a > verbose boot (using both the Release 12.1 memstick and a newly built > head at r356414): > ahci0: mem 0x1c18000-0x1c18fff irq 25 on simplebus0 > ahci0: AHCI v1.10 with 1 3Gbps ports, Port Multiplier not supported > ahci0: quirks=0x2 > ahci0: Caps: NCQ SNTF ALP AL CLO 3Gbps PMD SSC PSC 32cmd CCC 1ports > ahcich0: not probed (disabled) > > I haven't explicitly disabled anything. Running "devctl enable ahcich0" > results in the device probing/attaching but it still won't talk to a HDD. > > I've looked at my loader configuration (and kenv), sysctl and u-boot > environment without finding anything obviously wrong. Does anyone have any > ideas? Try updating past r356600; earlier than that and probably 12.1-RELEASE we were shutting down the regulator. hw.regulator.disable_unused=0 should also work around it. Thanks, Kyle Evans From owner-freebsd-arm@freebsd.org Mon Jan 13 09:58:02 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 0C97F1FDA20 for ; Mon, 13 Jan 2020 09:58:02 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vtr.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47x8Cr6sp9z4GKY; Mon, 13 Jan 2020 09:58:00 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) by vtr.rulingia.com (8.15.2/8.15.2) with ESMTPS id 00D9vkWo077916 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Jan 2020 20:57:51 +1100 (AEDT) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id 00D9veWI020678 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 13 Jan 2020 20:57:40 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id 00D9veif020677; Mon, 13 Jan 2020 20:57:40 +1100 (AEDT) (envelope-from peter) Date: Mon, 13 Jan 2020 20:57:40 +1100 From: Peter Jeremy To: Kyle Evans Cc: "freebsd-arm@freebsd.org" Subject: Re: Banana Pi M1 SATA problems Message-ID: <20200113095740.GG25924@server.rulingia.com> References: <20200112080247.GF25924@server.rulingia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ytoMbUMiTKPMT3hY" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47x8Cr6sp9z4GKY X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of peter@rulingia.com designates 2001:19f0:5801:ebe:5400:1ff:fe53:30fd as permitted sender) smtp.mailfrom=peter@rulingia.com X-Spamd-Result: default: False [-7.65 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[rulingia.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-3.25)[ip: (-9.71), ipnet: 2001:19f0:5800::/38(-4.85), asn: 20473(-1.62), country: US(-0.05)]; RCPT_COUNT_TWO(0.00)[2]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5800::/38, country:US]; 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: Mon, 13 Jan 2020 09:58:02 -0000 --ytoMbUMiTKPMT3hY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-Jan-12 09:22:14 -0600, Kyle Evans wrote: >On Sun, Jan 12, 2020 at 2:03 AM Peter Jeremy wrote: >> I'm trying to get my (new) Banana Pi M1 to talk to a SATA drive. >> Unfortunately, something is disabling the SATA port. > >Try updating past r356600; earlier than that and probably 12.1-RELEASE >we were shutting down the regulator. hw.regulator.disable_unused=3D0 >should also work around it. I need hw.regulator.disable_unused=3D"0" because the BPi powers itself off completely without it. I am building a new world+kernel at r356657 but that will take a while because it has triggered a clang rebuild. --=20 Peter Jeremy --ytoMbUMiTKPMT3hY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAl4cPwFfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzTtpw//ZAFS6kmWPvSurl84hMAKwZFBJhrcF8NfoDd47LFFWZXJfCAUw7vXdYJ1 Vo6d7n1p8RKDpOCvpJzwMopmPUFOCOt1nK+tyn5hNE/I4XOBWkX2nKCcLFvovMF+ SPPYTNAb7P1qdYedcMVuCIZ2SQDZUQjwnzkWxlVuWSQ/opS3Gs4YnPvNC86shgl3 19AqAXVPvNz0kXHpWCp2JjysEclnTIAyd7watnaX5ZrqrGnlEucfKL2e25unDf/d seheaqwQPaEdb2nF2BsKInqN/OzsJ3qv1PgIFE+qSUb/X0BmGMdiGVvQBlaePKvK ov7oHoLAIdVobKfy1Se5KxoJhIeIB6j6K0UFNl3+xRqvwydtqiKFyGNg0hwG6cUE Ztcs6mk5sh5UzE08cHKWtkc+GeWqe2oUQoXtwldYDWRZ55phhAIfr9ZaH5LYpD9q skBgKq8iNkeEDcXPM7tf0r/9yU3bL/fnxaSipVHkB/ZWtncihkcOZVfLKKUSMtGv h8dUW4jTXaH3Se+IGe7KONkba4wiNjy0Fdj0Fu9djk1EotVKgdbSd/0VFY/P4nlz O5IwZ96xfA+Frhy21+c1st7qs+BiqY3sABL4RTqL4KuD5IpZhp14SpsSEoOv0/3m fytk541/3mQ9IX19iC1V9P+aRwqaAmGK+R2fUUyYmDhuDdgVckw= =Z2KX -----END PGP SIGNATURE----- --ytoMbUMiTKPMT3hY-- From owner-freebsd-arm@freebsd.org Mon Jan 13 10:19:37 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 B58C41FE3BC for ; Mon, 13 Jan 2020 10:19:37 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47x8hm2Rg0z4HSg; Mon, 13 Jan 2020 10:19:35 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id aedc0220; Mon, 13 Jan 2020 11:19:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=sxSCi3KtCvuYXKg2oUFYXKbg0WY=; b=VUD4PodXGc1uiMVflQTlg88CEdzi NykpC2U09N21V74Li+tm3XtV2tBstIM29uf131DtAk4c75D/gBUVweAufjRColUO PrtwITyB1LxyIOAcyqr3C0ZxOt4ntwC9RnaZSdSV3bT6a7JlODoaU6NXUth7ur0M HOudOC5Pl1rMsn4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=QRGfD+tJgsC7M6dLznzkqfcb4KW25pRbLh/mZMVN924HX3JRNyQfCHwk aC4Gk5qd89an5JDHJ43zLrUT34ncbRWGzBjVjUVSiaMGJ2FpHf20YjwKx+KWUy2D NdFeAydaverLhq8F4ksTRiY7XMFwLkDPqOZNPQgz4OBKHEPAMFg= Received: from sonic.home.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 9f8b9eab TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Mon, 13 Jan 2020 11:19:31 +0100 (CET) Date: Mon, 13 Jan 2020 11:19:32 +0100 From: Emmanuel Vadot To: Peter Jeremy Cc: Kyle Evans , "freebsd-arm@freebsd.org" Subject: Re: Banana Pi M1 SATA problems Message-Id: <20200113111932.9e8e648733d530b70011456f@bidouilliste.com> In-Reply-To: <20200113095740.GG25924@server.rulingia.com> References: <20200112080247.GF25924@server.rulingia.com> <20200113095740.GG25924@server.rulingia.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47x8hm2Rg0z4HSg X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mail header.b=VUD4PodX; dmarc=none; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.177.182 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-1.32 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mail]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:212.83.177.182/32]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bidouilliste.com]; NEURAL_HAM_LONG(-0.90)[-0.896,0]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; NEURAL_HAM_MEDIUM(-0.92)[-0.915,0]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.39)[ip: (-0.62), ipnet: 212.83.160.0/19(2.37), asn: 12876(0.22), country: FR(0.00)]; ASN(0.00)[asn:12876, ipnet:212.83.160.0/19, country:FR]; MID_RHS_MATCH_FROM(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: Mon, 13 Jan 2020 10:19:37 -0000 On Mon, 13 Jan 2020 20:57:40 +1100 Peter Jeremy wrote: > On 2020-Jan-12 09:22:14 -0600, Kyle Evans wrote: > >On Sun, Jan 12, 2020 at 2:03 AM Peter Jeremy wrote: > >> I'm trying to get my (new) Banana Pi M1 to talk to a SATA drive. > >> Unfortunately, something is disabling the SATA port. > > > >Try updating past r356600; earlier than that and probably 12.1-RELEASE > >we were shutting down the regulator. hw.regulator.disable_unused=0 > >should also work around it. > > I need hw.regulator.disable_unused="0" because the BPi powers itself > off completely without it. I am building a new world+kernel at r356657 > but that will take a while because it has triggered a clang rebuild. > > -- > Peter Jeremy This problem should be fixed with r356609. -- Emmanuel Vadot From owner-freebsd-arm@freebsd.org Mon Jan 13 14:40:32 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 6357A225FA2 for ; Mon, 13 Jan 2020 14:40:32 +0000 (UTC) (envelope-from iz-rpi03@hs-karlsruhe.de) Received: from smtp.hs-karlsruhe.de (smtp.HS-Karlsruhe.DE [193.196.64.25]) (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 47xGTq3gkRz4ZpZ for ; Mon, 13 Jan 2020 14:40:31 +0000 (UTC) (envelope-from iz-rpi03@hs-karlsruhe.de) Received: from iz-wera01.hs-karlsruhe.de ([193.196.65.46]) by smtp.hs-karlsruhe.de with esmtp (Exim 4.80.1) (envelope-from ) id 1ir0tK-0057Z2-4N; Mon, 13 Jan 2020 15:40:30 +0100 X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.6 From: Ralf Wenk To: Konstantin Belousov cc: freebsd-arm@freebsd.org Subject: Re: panic: non-current pmap on RPI3 on CURRENT (GENERIC) #4 r356366 In-reply-to: <20200109115123.GZ23031@kib.kiev.ua> References: <20200108235630.GA17485@www.zefox.net> <20200109115123.GZ23031@kib.kiev.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 13 Jan 2020 15:40:29 +0100 Message-Id: X-Rspamd-Queue-Id: 47xGTq3gkRz4ZpZ X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of iz-rpi03@hs-karlsruhe.de has no SPF policy when checking 193.196.64.25) smtp.mailfrom=iz-rpi03@hs-karlsruhe.de X-Spamd-Result: default: False [1.84 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[hs-karlsruhe.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.03)[0.026,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[25.64.196.193.list.dnswl.org : 127.0.10.0]; NEURAL_SPAM_LONG(0.32)[0.316,0]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:553, ipnet:193.196.64.0/18, country:EU]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.10)[asn: 553(0.49), country: EU(-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: Mon, 13 Jan 2020 14:40:32 -0000 Hi, On 2020-01-09 at 13:51 +0200 Konstantin Belousov wrote: > On Wed, Jan 08, 2020 at 03:56:30PM -0800, bob prohaska wrote: > > A Pi3 running FreeBSD 13.0-CURRENT (GENERIC) #4 r356366 reported, > > while compiling www/chromium: > > > > panic: non-current pmap 0xfffffd000385f5a0 > [...] > > db> While doing "mergemaster -F -m /usr/src" one of my RPi3s experienced the same kind of panic: panic: non-current pmap 0xfffffd0001bca2a0 cpuid = 1 time = 1578921150 KDB: stack backtrace: db_trace_self() at db_trace_self_wrapper+0x28 pc = 0xffff000000736b3c lr = 0xffff000000106814 sp = 0xffff00005a1782b0 fp = 0xffff00005a1784c0 db_trace_self_wrapper() at vpanic+0x18c pc = 0xffff000000106814 lr = 0xffff000000408600 sp = 0xffff00005a1784d0 fp = 0xffff00005a178580 vpanic() at panic+0x44 pc = 0xffff000000408600 lr = 0xffff0000004083b0 sp = 0xffff00005a178590 fp = 0xffff00005a178610 panic() at pmap_remove_pages+0x8b4 pc = 0xffff0000004083b0 lr = 0xffff00000074d890 sp = 0xffff00005a178620 fp = 0xffff00005a1786e0 pmap_remove_pages() at vmspace_exit+0xc0 pc = 0xffff00000074d890 lr = 0xffff0000006d3710 sp = 0xffff00005a1786f0 fp = 0xffff00005a178720 vmspace_exit() at exit1+0x4f8 pc = 0xffff0000006d3710 lr = 0xffff0000003c2ab4 sp = 0xffff00005a178730 fp = 0xffff00005a1787a0 exit1() at sys_sys_exit+0x10 pc = 0xffff0000003c2ab4 lr = 0xffff0000003c25b8 sp = 0xffff00005a1787b0 fp = 0xffff00005a1787b0 sys_sys_exit() at do_el0_sync+0x514 pc = 0xffff0000003c25b8 lr = 0xffff000000753c44 sp = 0xffff00005a1787c0 fp = 0xffff00005a178860 do_el0_sync() at handle_el0_sync+0x90 pc = 0xffff000000753c44 lr = 0xffff000000739224 sp = 0xffff00005a178870 fp = 0xffff00005a178980 handle_el0_sync() at 0x403ef6bc pc = 0xffff000000739224 lr = 0x00000000403ef6bc sp = 0xffff00005a178990 fp = 0x0000ffffffffd7c0 KDB: enter: panic [ thread pid 44425 tid 100460 ] Stopped at 0x4040ddfc db> db> bt Tracing pid 44425 tid 100460 td 0xfffffd000fff5560 db_trace_self() at db_stack_trace+0xf8 pc = 0xffff000000736b3c lr = 0xffff000000103c58 sp = 0xffff00005a177e80 fp = 0xffff00005a177eb0 db_stack_trace() at db_command+0x228 pc = 0xffff000000103c58 lr = 0xffff0000001038d0 sp = 0xffff00005a177ec0 fp = 0xffff00005a177fa0 db_command() at db_command_loop+0x58 pc = 0xffff0000001038d0 lr = 0xffff000000103678 sp = 0xffff00005a177fb0 fp = 0xffff00005a177fd0 db_command_loop() at db_trap+0xf4 pc = 0xffff000000103678 lr = 0xffff00000010697c sp = 0xffff00005a177fe0 fp = 0xffff00005a178200 db_trap() at kdb_trap+0x1d8 pc = 0xffff00000010697c lr = 0xffff00000044fa74 sp = 0xffff00005a178210 fp = 0xffff00005a1782c0 kdb_trap() at do_el1h_sync+0xf4 pc = 0xffff00000044fa74 lr = 0xffff0000007535b8 sp = 0xffff00005a1782d0 fp = 0xffff00005a178300 do_el1h_sync() at handle_el1h_sync+0x78 pc = 0xffff0000007535b8 lr = 0xffff000000739078 sp = 0xffff00005a178310 fp = 0xffff00005a178420 handle_el1h_sync() at kdb_enter+0x34 pc = 0xffff000000739078 lr = 0xffff00000044f0c0 sp = 0xffff00005a178430 fp = 0xffff00005a1784c0 kdb_enter() at vpanic+0x1a8 pc = 0xffff00000044f0c0 lr = 0xffff00000040861c sp = 0xffff00005a1784d0 fp = 0xffff00005a178580 vpanic() at panic+0x44 pc = 0xffff00000040861c lr = 0xffff0000004083b0 sp = 0xffff00005a178590 fp = 0xffff00005a178610 panic() at pmap_remove_pages+0x8b4 pc = 0xffff0000004083b0 lr = 0xffff00000074d890 sp = 0xffff00005a178620 fp = 0xffff00005a1786e0 pmap_remove_pages() at vmspace_exit+0xc0 pc = 0xffff00000074d890 lr = 0xffff0000006d3710 sp = 0xffff00005a1786f0 fp = 0xffff00005a178720 vmspace_exit() at exit1+0x4f8 pc = 0xffff0000006d3710 lr = 0xffff0000003c2ab4 sp = 0xffff00005a178730 fp = 0xffff00005a1787a0 exit1() at sys_sys_exit+0x10 pc = 0xffff0000003c2ab4 lr = 0xffff0000003c25b8 sp = 0xffff00005a1787b0 fp = 0xffff00005a1787b0 sys_sys_exit() at do_el0_sync+0x514 pc = 0xffff0000003c25b8 lr = 0xffff000000753c44 sp = 0xffff00005a1787c0 fp = 0xffff00005a178860 do_el0_sync() at handle_el0_sync+0x90 pc = 0xffff000000753c44 lr = 0xffff000000739224 sp = 0xffff00005a178870 fp = 0xffff00005a178980 handle_el0_sync() at 0x403ef6bc pc = 0xffff000000739224 lr = 0x00000000403ef6bc sp = 0xffff00005a178990 fp = 0x0000ffffffffd7c0 db> db> show pcpu cpuid = 1 dynamic pcpu = 0x3fea1f00 curthread = 0xfffffd000fff5560: pid 44425 tid 100460 critnest 1 "install" curpcb = 0xffff00005a178aa0 fpcurthread = 0xfffffd000fff5560: pid 44425 "install" idlethread = 0xfffffd0000aaa560: tid 100004 "idle: cpu1" curvnet = 0 spin locks held: db> > It would be useful to see both the curcpu pc_curpmap content, > and dump both *(struct pmap *)0xfffffd000385f5a0 and *pc_curpmap > from the vmcore. I do not know the exact kernel debugger commands to print/show the "curcpu pc_curpmap content" or dump "*(struct pmap *)0xfffffd0001bca2a0" and "*pc_curpmap" to help, but this RPi3 can stay in the kernel debugger for a while. If you can tell me the neccessary kernel debugger commands I will execute them and mail the results. As there is no swap-space configured, I think I am unable to procude a kernel coredump which could be analysed later. The panic happend during an update to a CURRENT of today, but I saved former state in a boot environment. Ralf From owner-freebsd-arm@freebsd.org Mon Jan 13 15:23:15 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 69CF9227AF6 for ; Mon, 13 Jan 2020 15:23:15 +0000 (UTC) (envelope-from gdotten@gmail.com) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47xHR630bwz4f4k for ; Mon, 13 Jan 2020 15:23:14 +0000 (UTC) (envelope-from gdotten@gmail.com) Received: by mail-qt1-x831.google.com with SMTP id v25so9394567qto.7 for ; Mon, 13 Jan 2020 07:23:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fnvUb46QR+g+rnslw/0jE4AVNb0lQm3VgH96HtHJrww=; b=Jak7YdqElW7CEHwa3s2h9OPjBObHlctX+PAiDab7wqRlIKl8iqkLjAkF1lwDuVUYcs hT4XkeuYeX+HrilQXKyB8+LdXs0wJBvlFhbdqSjxEakx7kVi0g+w4Nl3Nv7STiaGzVVv acJVFBfgL1qRh9Mpfv4aZsxsApXOt32E9/vl9FnTrjj+11fAiNJcyjCVLn/sK1xwJx6O MxPcTtrfN4Zd8IQmH4+4r3ZdPMcSxUCSPXhxwM6QyjDq61vTAsUxRzkgU1MeLP9JkDkO OTDb8Kez9GbQDH/tinTF9w00GvutgxMHJWyudvpC+TY6xpt0dl1KUGzeJwv+qRPADo/9 QCFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fnvUb46QR+g+rnslw/0jE4AVNb0lQm3VgH96HtHJrww=; b=AASGRChdiMJ6BQWX+4gDOQ5CxlQDEfulFhtIa4zcAgtBFGDLb7DxGSuNeCmjN1enZp 5+ojbdOw8hfUWTbeNFqb52FOJ6TTZcYu+/DYyKQYCl17gi7sRRHywzOHfp01srjPIywN e/ZR7vPCY9V8LbYjxaH0L8TpIraXRUgf6CtiuNYkEuaxFBqLIZuXYUpbNqwTFlQOnprp r+0AA4fNuAxcKe3hdKuw92ckZ01ArVFQYEDctc7Srrl+JYHEnFGMzlVG8QGOJXzmOxNW 5jwx7UgYl75KjwvQxWMpLoal8SEQUm2H0CVUY9wPjPS5XLzBQ5pJJpg1hsq5KZSq/36f HzAg== X-Gm-Message-State: APjAAAVB/p3AgvLCu99YpQW45du+HWDSP0hqwWDgPo8CTmB97dJxj+ih /J8ieUPpXsnKj8/I6kRd4xsU6dKztlaw6J33jlfwvg== X-Google-Smtp-Source: APXvYqwqm24zdNAIuiJm7hDAGcc2oiAfK0kBTJ2zhO0VWGufJLRvteQssPe6vBkpkAMQ39dJ80c6QVD59kYKd9a4Bac= X-Received: by 2002:aed:2e03:: with SMTP id j3mr10727238qtd.365.1578928993035; Mon, 13 Jan 2020 07:23:13 -0800 (PST) MIME-Version: 1.0 References: <20191228161726.9efb08df5b69eaa0a0ff478f@bidouilliste.com> <20191230123322.fa579638df66e3eac3e16c91@bidouilliste.com> <20200111193627.6616bc804ef15bbfa341dea0@bidouilliste.com> In-Reply-To: <20200111193627.6616bc804ef15bbfa341dea0@bidouilliste.com> From: Gary Otten Date: Mon, 13 Jan 2020 10:23:04 -0500 Message-ID: Subject: Re: SPI support for A64-OLinuXino board Allwinner A64 processor To: Emmanuel Vadot Cc: freebsd-arm@freebsd.org X-Rspamd-Queue-Id: 47xHR630bwz4f4k X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=Jak7YdqE; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gdotten@gmail.com designates 2607:f8b0:4864:20::831 as permitted sender) smtp.mailfrom=gdotten@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[1.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; IP_SCORE(0.00)[ip: (-9.23), ipnet: 2607:f8b0::/32(-2.10), asn: 15169(-1.84), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Mon, 13 Jan 2020 15:23:15 -0000 Thanks for checking. I will do further testing and report my results. On Sat, Jan 11, 2020 at 1:36 PM Emmanuel Vadot wrote: > On Mon, 30 Dec 2019 16:13:41 -0500 > Gary Otten wrote: > > > On Mon, Dec 30, 2019 at 6:33 AM Emmanuel Vadot > > wrote: > > > > > On Sun, 29 Dec 2019 23:40:19 -0500 > > > Gary Otten wrote: > > > > > > > Thanks, Ian Lepore mentioned this too, spigen wasn't loaded. I > have now > > > > loaded spigen. The driver appears to be working, but I am not > seeing > > > any > > > > output. > > > > > > > > I can toggle pins PC0,PC1,PC2, PC3 with gpioctl, but I don't get > > > anything > > > > with spi. > > > > > > You mean settings them as gpio, toggling them and check the pins on > > > the uext port ? > > > > > > > Yes that is correct, toggling them with gpioctl and seeing the voltage > > swing after setting that pin to OUT with gpioctl. > > > > > > > > > I also had another odd behavior with BANK E. not having any output, > using > > > > gpoictl, I was not able to get any pin on Bank E to toggle. I did > turn on > > > > the voltage regulator as suggested. > > > > > > The SPI pins for SPI0 are on BANKC which is always powered on. > > > > > > > OK, I was mentioning this on the chance that the gpioctl doesn't work > with > > BANK E because Bank E is set to work with the csi function on the > > A64-OLinuXino board. > > > > > > > > > I wonder if FreeBSD is properly setting the configuration registers > for > > > > each port/pin of the the A64. > > > > > > I'll not say that the code is bug free but this really should be ok, > > > especially for such basic pin setting like spi0 where you only have one > > > pin group. > > > > > > > Basically letting the A64 know to use alt > > > > function or general gpio in/out in the proper way for each pin, maybe > > > some > > > > of the (default?) settings for the more popular pine boards work, but > > > > don't work correctly for the Olimex A64 board, or maybe there is > some > > > > setting in the overlays that I am overlooking that need to be set to > use > > > an > > > > alt function or gpio in/out to get the pins to function properly. > If in > > > > the overlay I have spi0 enabled, should I still be able to toggle the > > > pins > > > > with gpioctl? Thanks for the help. > > > > > > Yes unfortunately the gpio/pinmux code is shared on allwinner and > > > doesn't have all the needed "protection" so you can toggle a pin even > > > if it's not in gpio mode. I don't remember if the value is still output > > > on the physical pin or not. > > > > > > > Yes with SPI enabled in the overlay after a boot, I am still able to set > > the pins to output with gpioctl and see the voltage swing. I must set > the > > pins to output to see the voltage swing. Reloading gpio_aw.ko or running > > spi after that doesn't appear to change the fact that the pins are set > to > > output as I am still able to run gpioctl and see the toggle. > > > > > > Are you using the -sXM version on the board (where you have an spi > > > flash present on the board) or did you wire something via the uext > > > port ? If the later what's wired and how ? > > > > > > > On my board the flash isn't populated. I wasn't aware of the uext port > so I > > just soldered wires on to the pads where the flash would have been, and a > > ground. These wires go to my logic analyzer setup to edge detect. For > > testing I used a loopback (short between) MOSI (PC0) /MISO(PC1) > > > > > > > I have this board but I will not have time to do a proper setup to > > > test something for some time. > > > > > > > Ok that would be great. I will also order a pine board today to have > > another board to test on. Any help or advice would be appreciated. I > could > > be making a simple mistake or have the most basic of settings wrong, it > > could be something simple I am overlooking. Is there anyway to read > back > > the configuration of a pin from user land? I wonder if anyone else can > use > > GPIO pins on bank E on the Olimex A64 board, or has a working SPI on this > > board. > > > > Thanks > > I've just tested on my a64-olinuxino using the UEXT port and the > overlay I've just commited (which is the one you wrote). > I've hooked up an spiflash on a breadboard and I can use it properly. > > > > > > > > > My diagnostics > > > > ****************************************** > > > > root@:/dev # spi -i > > > > Device name: /dev/spigen0.0 > > > > Device mode: 2 > > > > Device speed: 500000 > > > > root@:/dev # spi -d r -m 0 -C '9F 00' -v -c 2 > > > > Binary output of 2 bytes > > > > 2 command bytes and 2 data bytes read from SPI device > > > > | 0 1 2 3 4 5 6 7 8 9 A B C D E F | > > > > | > > > > 0 | 00 00 00 00 | .... > > > > | > > > > > > > > I > > > > > > > > > > > > > > > > On Sat, Dec 28, 2019 at 10:44 AM Emmanuel Vadot < > manu@bidouilliste.com> > > > > wrote: > > > > > > > > > On Wed, 25 Dec 2019 19:12:28 -0500 > > > > > Gary Otten wrote: > > > > > > > > > > > Thanks, I have created the following overlay and tried a > variety of > > > > > other > > > > > > things but I haven't been able to get spigen0.0 to appear in > /dev. > > > > > > > > > > > > > > > > > > > > > > > > /* $FreeBSD$ */ > > > > > > /dts-v1/; > > > > > > /plugin/; > > > > > > > > > > > > / { > > > > > > compatible = "allwinner,sun50i-a64"; > > > > > > }; > > > > > > > > > > > > &{/soc/spi@1c68000} { > > > > > > > > > > > > status = "okay"; > > > > > > > > > > > > spigen0: spigen0 { > > > > > > compatible = "freebsd,spigen"; > > > > > > reg = <0>; > > > > > > spi-max-frequency = <500000>; > > > > > > status = "okay"; > > > > > > }; > > > > > > > > > > > > }; > > > > > > > > > > > > > > > > > > > > > > > > Some diagnostics > > > > > > > > > > > > ------------------------------------------------------- > > > > > > On Boot > > > > > > > > > > > > Loading DTB overlays: 'sun50i-a64-spi-spidev' > > > > > > /boot/dtb/overlays/sun50i-a64-spi-spidev.dtbo size=0x15c > > > > > > applying DTB overlay > '/boot/dtb/overlays/sun50i-a64-spi-spidev.dtbo' > > > > > > .. > > > > > > .... > > > > > > ..... > > > > > > > > > > > > Autoloading module: aw_spi.ko > > > > > > aw_spi0: mem 0x1c68000-0x1c68fff irq 29 on > simplebus0 > > > > > > spibus0: on aw_spi0 > > > > > > spibus0: at cs 0 mode 0 > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > > > root@:/boot/dtb/overlays # kldstat > > > > > > Id Refs Address Size Name > > > > > > 1 5 0xffff000000000000 144dda8 kernel > > > > > > 2 1 0xffff000054c00000 41000 aw_spi.ko > > > > > > > > > > > > ------------------------------------------------------- > > > > > > root@:/boot/dtb/overlays # devinfo > > > > > > .. > > > > > > ... > > > > > > aw_spi0 > > > > > > spibus0 > > > > > > > > > > > > ------------------------------------------------------- > > > > > > root@:/boot/dtb/overlays # devinfo > > > > > > > > > > > > .... > > > > > > ...... > > > > > > Node 0x2f60: spi@1c68000 > > > > > > Node 0x309c: spigen0 > > > > > > _______________________________________________ > > > > > > freebsd-arm@freebsd.org mailing list > > > > > > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > > > > > > To unsubscribe, send any mail to " > > > freebsd-arm-unsubscribe@freebsd.org" > > > > > > > > > > Hi Gary, > > > > > > > > > > You overlay worked for me on the pine64-lts. Here is what I did : > > > > > - Use https://github.com/evadot/freebsd/commits/aw_spigen > > > > > - aw_spi is autoloaded via devmatch > > > > > - kldload spigen (it's not in GENERIC for arm64, maybe we should > add > > > it > > > > > or do some devmatch magic) > > > > > - root@pine64-lts:~ # spi -i > > > > > Device name: /dev/spigen0.0 > > > > > Device mode: 0 > > > > > Device speed: 500000 > > > > > root@pine64-lts:~ # spi -d r -m 0 -C '9F 00' -v -c 2 > > > > > Binary output of 2 bytes > > > > > 2 command bytes and 2 data bytes read from SPI device > > > > > | 0 1 2 3 4 5 6 7 8 9 A B C D E F > > > > > | | 0 | 00 ef 40 18 > > > | > > > > > ..@. | > > > > > > > > > > Maybe you just forgot to load spigen ? > > > > > > > > > > -- > > > > > Emmanuel Vadot > > > > > > > > > > > > > > -- > > > Emmanuel Vadot > > > > > > -- > Emmanuel Vadot > From owner-freebsd-arm@freebsd.org Mon Jan 13 16:53:38 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 F16AD1E2E3B for ; Mon, 13 Jan 2020 16:53:38 +0000 (UTC) (envelope-from freebsd-arm@dino.sk) Received: from mailhost.netlabit.sk (mailhost.netlabit.sk [84.245.65.72]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47xKRP4GF3z3HF9; Mon, 13 Jan 2020 16:53:37 +0000 (UTC) (envelope-from freebsd-arm@dino.sk) Received: from zeta.dino.sk (fw3.dino.sk [84.245.95.254]) (AUTH: LOGIN milan) by mailhost.netlabit.sk with ESMTPA; Mon, 13 Jan 2020 17:53:34 +0100 id 00E5483C.5E1CA08E.0000A0AD Date: Mon, 13 Jan 2020 17:53:34 +0100 From: Milan Obuch To: Ian Lepore Cc: Warner Losh , freebsd-arm@freebsd.org Subject: Re: Zynq qspi driver https://reviews.freebsd.org/D14698 Message-ID: <20200113175334.7b4b5e4a@zeta.dino.sk> In-Reply-To: <9f0d3934c9b715696643f0ea93de8e589355a560.camel@freebsd.org> References: <20190818121741.7bd82a63@zeta.dino.sk> <9f0d3934c9b715696643f0ea93de8e589355a560.camel@freebsd.org> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i386-portbld-freebsd11.3) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47xKRP4GF3z3HF9 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-arm@dino.sk designates 84.245.65.72 as permitted sender) smtp.mailfrom=freebsd-arm@dino.sk X-Spamd-Result: default: False [-4.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; URL_IN_SUBJECT(1.00)[reviews.freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[dino.sk]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[72.65.245.84.list.dnswl.org : 127.0.10.0]; IP_SCORE(-2.70)[ip: (-7.98), ipnet: 84.245.64.0/18(-3.99), asn: 16160(-1.61), country: SK(0.09)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16160, ipnet:84.245.64.0/18, country:SK]; 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: Mon, 13 Jan 2020 16:53:39 -0000 On Sun, 18 Aug 2019 09:21:31 -0600 Ian Lepore wrote: > On Sun, 2019-08-18 at 08:23 -0600, Warner Losh wrote: > > On Sun, Aug 18, 2019 at 4:18 AM Milan Obuch > > wrote: > > > > > Hi, > > > > > > I was able to use in subject mentioned driver on my Zybo Z7 > > > board. I just downloaded zy7_qspi.c file, put it in > > > sys/arm/xilinx directory and all other necessary patches applied > > > per hand to 12.0-STABLE source tree. > > > > > > I am able to read and write flash attached to qspi on my board. > > > u-boot uses qspi flash for environment storage so some caution > > > should be taken with that. > > > > > > Question: what needs to be done in order to get this driver into > > > official source tree? Is there any show stopper? My experience is > > > - it Just Works (tm). > > > > > > > It looks almost ready to my eye. Not sure what the hold up is. > > > > Warner > > > > I think I'm probably among those who dropped the ball on this. I > vaguely remember that when it was submitted, I thought I was going to > be buying a xilinx development board soon and I'd just test and commit > it after that. But then plans changed at $work and the devel board > thing never happened. > > -- Ian > Hi, is there still something to do? Recently I have access to another Zynq based board, MYD-Y7Z010 from MYIR tech, this driver works here too. Flash used on this board is reported as w25q128, on Zybo Z7 s25fl128. Regards, Milan From owner-freebsd-arm@freebsd.org Tue Jan 14 16:42:23 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 588BB1F0396 for ; Tue, 14 Jan 2020 16:42:23 +0000 (UTC) (envelope-from peter@libassi.se) Received: from smtp2.outgoing.loopia.se (smtp2.outgoing.loopia.se [93.188.3.37]) (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 47xx7y07RHz4Ltl for ; Tue, 14 Jan 2020 16:42:21 +0000 (UTC) (envelope-from peter@libassi.se) Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 002092E5C75A for ; Tue, 14 Jan 2020 17:42:19 +0100 (CET) Received: from s500.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id D64342E33906 for ; Tue, 14 Jan 2020 17:42:18 +0100 (CET) Received: from s475.loopia.se (unknown [172.22.191.6]) by s500.loopia.se (Postfix) with ESMTP id D4D731E146EE for ; Tue, 14 Jan 2020 17:42:18 +0100 (CET) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1] autolearn=disabled Received: from s645.loopia.se ([172.22.191.5]) by s475.loopia.se (s475.loopia.se [172.22.190.15]) (amavisd-new, port 10024) with LMTP id Fq-ncX3MIaIB for ; Tue, 14 Jan 2020 17:42:18 +0100 (CET) X-Loopia-Auth: user X-Loopia-User: peter@libassi.se X-Loopia-Originating-IP: 78.82.163.229 Received: from [10.79.0.7] (c-e5a3524e.03-77-73746f30.bbcust.telenor.se [78.82.163.229]) (Authenticated sender: peter@libassi.se) by s645.loopia.se (Postfix) with ESMTPSA id 7EF9C156E50A for ; Tue, 14 Jan 2020 17:42:18 +0100 (CET) From: Peter Libassi Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: is wireguard available on arm64 Message-Id: <8C7FC333-409C-4227-A8F1-52134CF98B4B@libassi.se> Date: Tue, 14 Jan 2020 17:42:18 +0100 To: freebsd-arm@freebsd.org X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 47xx7y07RHz4Ltl X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of peter@libassi.se has no SPF policy when checking 93.188.3.37) smtp.mailfrom=peter@libassi.se X-Spamd-Result: default: False [2.57 / 15.00]; ARC_NA(0.00)[]; FAKE_REPLY(1.00)[]; RCVD_COUNT_FIVE(0.00)[6]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_DN_NONE(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_TLS_LAST(0.00)[]; NEURAL_SPAM_LONG(0.82)[0.822,0]; RCVD_IN_DNSWL_NONE(0.00)[37.3.188.93.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-0.65)[-0.645,0]; R_SPF_NA(0.00)[]; DMARC_NA(0.00)[libassi.se]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:39570, ipnet:93.188.2.0/23, country:SE]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.01)[country: SE(-0.03)] 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: Tue, 14 Jan 2020 16:42:23 -0000 I managed to compile (after adding swap space) and install go-devel and = the wireguard bits on the RPI3. I also installed the packages on a = second RPI3. Set up a wireguard tunnel between the RPI3's using wg-quick = and run iperf test. iperf direct on the local lan: 94.1 Mbits/sec iperf over the wireguard tunnel: 71.1 Mbits/sec The wg(8) man page references man pages that do not exist on freebsd, = where should I file a bug report? From owner-freebsd-arm@freebsd.org Tue Jan 14 17:13:36 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 729091F15EB for ; Tue, 14 Jan 2020 17:13:36 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47xxr02THBz4Qp5; Tue, 14 Jan 2020 17:13:36 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: brd/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4B0C2D8A0; Tue, 14 Jan 2020 17:13:36 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 00AAE21B62; Tue, 14 Jan 2020 12:13:36 -0500 (EST) Received: from imap2 ([10.202.2.52]) by compute5.internal (MEProxy); Tue, 14 Jan 2020 12:13:36 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrtddugddthecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfuehrrggu ucffrghvihhsfdcuoegsrhgusefhrhgvvgeuufffrdhorhhgqeenucffohhmrghinhepfh hrvggvsghsugdrohhrghenucfrrghrrghmpehmrghilhhfrhhomhepsghrrgguodhmvghs mhhtphgruhhthhhpvghrshhonhgrlhhithihqdejtdejieefvdefvddqudektdeileeike ekqdgsrhgupeephfhrvggvuefuffdrohhrghesshhoudegkhdrtghomhenucevlhhushht vghrufhiiigvpedt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id CB59EE00AF; Tue, 14 Jan 2020 12:13:34 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-754-g09d1619-fmstable-20200113v1 Mime-Version: 1.0 Message-Id: <801a5a8d-4b0e-4295-90b0-b38d6d6224e9@www.fastmail.com> In-Reply-To: <20200112005454.e7599be873eada0f40d7760a@eternamente.info> References: <20200112005454.e7599be873eada0f40d7760a@eternamente.info> Date: Tue, 14 Jan 2020 10:13:12 -0700 From: "Brad Davis" To: Nenhum_de_Nos , "Robert Crowston via freebsd-arm" Subject: Re: own freebsd-update server for RPi3 Content-Type: text/plain 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: Tue, 14 Jan 2020 17:13:36 -0000 On Sat, Jan 11, 2020, at 8:54 PM, Nenhum_de_Nos wrote: > Hi, > > I have a RPi3 running freebsd 12.1R and I need to use custom kernel (pf > compiled) after all was configured. > I used crochet to have this img with pf compiled in, and now I need to > update my RPi with that image. > > I found this link > https://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/index.html > > But it is old and I tested it and was not working for me. Is that > another way I can update my RPi rather then compile it on itself? > > If anyone has any hints, thanks. It really isn't practical to run freebsd-update on the RPi as a client. The way freebsd-update involves lots of fork/exec and sha256 calls that would take far too long on the SD Card. You are better off actually building and installing on the SD Card. In the future we hope that pkgbase will make updating small ARM boards much easier. Regards, Brad Davis From owner-freebsd-arm@freebsd.org Wed Jan 15 02:16:51 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 DC4691FC0E6 for ; Wed, 15 Jan 2020 02:16:51 +0000 (UTC) (envelope-from gdotten@gmail.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47y9tq0pH4z3Qsx for ; Wed, 15 Jan 2020 02:16:50 +0000 (UTC) (envelope-from gdotten@gmail.com) Received: by mail-qk1-x731.google.com with SMTP id r14so14276714qke.13 for ; Tue, 14 Jan 2020 18:16:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=L6NY+OuxbgQCOhgqY/af7wEXGmsCNZ6aVvPOtx9NATY=; b=n/tKTGcxA92ex4KGOi81A9jC2Da9JjOKQuxjRzQszknVNCioI5O6C68jb8dEOwzuyC TJL5sFmgYpm2vwPedcLgb1UpFB1NyKBDh49rN6I6td3Ius1lYglZcgordr/QOx5aCV3u y4gON4McnQ04SNk0Br7KAsunptaM0lOqj2mPDiONiQl+/ikxyB2jPd0zzfaSoCM+1dFd 8aXbEvyANgIEoFsXRM2mzPInU4qWA7PD6LcO9WMbfIASJ3XEs2QtwHNvxNYVdx0RBLjx 9j1LKsOBRfNM5LGCpjGvBfPuLeVieFVjAyhkZQ34lRzWGcf/XZ/6rbW6k9Zi9usabmYO zrtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L6NY+OuxbgQCOhgqY/af7wEXGmsCNZ6aVvPOtx9NATY=; b=QGMbkV4w0Feb5rkMNeBPYpRmp8i7ODzxT9ZAnX+TNGjSRE+CiegtFBVFCsWzEz+ndt +0xla176g4LjXCSs9OSYttF2YSyKjWe0pebmSdFaFdoc4Z17XUSfeId76pqq+ZGHuRG/ kq+L6D/JHlTTool2WKmTYqaXhQ5Oark2MejXlKEJU+b9QFwAZyyVmAMkTDbOatwo2rpV 4c+p2eetcuvloED98DU3+sJMB+Mf/Dis8N16VCP9tcPD835tkdEz2nvVPjkMXi9GWJVJ jcQn21cC9ypxOSzwzpjbcXkE0OasllvFOSkPSZExQMKvBqLGEuZ6sGe9TN0nOTYFbKQ1 +7xQ== X-Gm-Message-State: APjAAAVQPh4JmKtXtm3AzpFo0xxyCm2Mew8evOpjoVWCEdtPYIUhD0wA Ub9xVP5c7UlulgglIWTpfalPI1dG4S9hFQ8PArZl0FoK X-Google-Smtp-Source: APXvYqz6I52Y4vrXPOoUHxrbkmKOtiREipIxfkPIlMBtjDoVe2trmvnA5QfCQcJjczbT+tlqC+ZVQEJRebKYID0lfWs= X-Received: by 2002:a37:944:: with SMTP id 65mr23958022qkj.444.1579054609167; Tue, 14 Jan 2020 18:16:49 -0800 (PST) MIME-Version: 1.0 References: <20191228161726.9efb08df5b69eaa0a0ff478f@bidouilliste.com> <20191230123322.fa579638df66e3eac3e16c91@bidouilliste.com> <20200111193627.6616bc804ef15bbfa341dea0@bidouilliste.com> In-Reply-To: From: Gary Otten Date: Tue, 14 Jan 2020 21:16:38 -0500 Message-ID: Subject: Re: SPI support for A64-OLinuXino board Allwinner A64 processor To: Emmanuel Vadot Cc: freebsd-arm@freebsd.org X-Rspamd-Queue-Id: 47y9tq0pH4z3Qsx X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=n/tKTGcx; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gdotten@gmail.com designates 2607:f8b0:4864:20::731 as permitted sender) smtp.mailfrom=gdotten@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[1.3.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; IP_SCORE(0.00)[ip: (-9.23), ipnet: 2607:f8b0::/32(-2.09), asn: 15169(-1.83), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Wed, 15 Jan 2020 02:16:51 -0000 So that I have the same test environment as you do. What version of Freebsd are you using and which overlay were you using to boot the Olimex board? I have used 12 stable and 13 current, and a couple of different overlays. (pine and olimex) If this would be of interest to others these are the steps I took. I mounted the boot partition of course. mkdir /aaa mount -t msdos /dev/mmcsd0s1 /aaa cd /aaa ls EFI dtb cd dtb cd allwinner (directory where overlays are loaded from at boot, this is not the main partition where most files are located, this is the boot partition) I am used the sun50i-a64-olinuxino.dtb with changes you previously suggested because my Bank E gpio wasn't working. Compiling of course merges sun50i-a64-olinuxino.dts and sun50i-a64.dtsi so my loaded overlay is sun50i-a64-olinuxino.dtb The regulator powering Bank E is not turned on after reading the overlay. Directly writing to the register on the AXP803 did turn the regulator/bank on though. I inserted this code at the end of the axp8xx_attach function in the driver. axp8xx_write(dev,AXP_POWERCTL3,(AXP_POWERCTL3_ALDO1|0xC8)); sysctl says always on, boot on regardless if the regulator is on or not. hw.regulator.vcc-pe.always_on: 1 hw.regulator.vcc-pe.boot_on: 1 Anyway I want to make sure I am using the exact same overlay as you so that I can narrow down why my SPI isn't working and Bank E isn't being read correctly from the overlay. Thanks On Mon, Jan 13, 2020 at 10:23 AM Gary Otten wrote: > Thanks for checking. I will do further testing and report my results. > > On Sat, Jan 11, 2020 at 1:36 PM Emmanuel Vadot > wrote: > >> On Mon, 30 Dec 2019 16:13:41 -0500 >> Gary Otten wrote: >> >> > On Mon, Dec 30, 2019 at 6:33 AM Emmanuel Vadot >> > wrote: >> > >> > > On Sun, 29 Dec 2019 23:40:19 -0500 >> > > Gary Otten wrote: >> > > >> > > > Thanks, Ian Lepore mentioned this too, spigen wasn't loaded. I >> have now >> > > > loaded spigen. The driver appears to be working, but I am not >> seeing >> > > any >> > > > output. >> > > > >> > > > I can toggle pins PC0,PC1,PC2, PC3 with gpioctl, but I don't get >> > > anything >> > > > with spi. >> > > >> > > You mean settings them as gpio, toggling them and check the pins on >> > > the uext port ? >> > > >> > >> > Yes that is correct, toggling them with gpioctl and seeing the voltage >> > swing after setting that pin to OUT with gpioctl. >> > >> > > >> > > > I also had another odd behavior with BANK E. not having any output, >> using >> > > > gpoictl, I was not able to get any pin on Bank E to toggle. I did >> turn on >> > > > the voltage regulator as suggested. >> > > >> > > The SPI pins for SPI0 are on BANKC which is always powered on. >> > > >> > >> > OK, I was mentioning this on the chance that the gpioctl doesn't work >> with >> > BANK E because Bank E is set to work with the csi function on the >> > A64-OLinuXino board. >> > >> > > >> > > > I wonder if FreeBSD is properly setting the configuration registers >> for >> > > > each port/pin of the the A64. >> > > >> > > I'll not say that the code is bug free but this really should be ok, >> > > especially for such basic pin setting like spi0 where you only have >> one >> > > pin group. >> > > >> > > > Basically letting the A64 know to use alt >> > > > function or general gpio in/out in the proper way for each pin, >> maybe >> > > some >> > > > of the (default?) settings for the more popular pine boards work, >> but >> > > > don't work correctly for the Olimex A64 board, or maybe there is >> some >> > > > setting in the overlays that I am overlooking that need to be set >> to use >> > > an >> > > > alt function or gpio in/out to get the pins to function properly. >> If in >> > > > the overlay I have spi0 enabled, should I still be able to toggle >> the >> > > pins >> > > > with gpioctl? Thanks for the help. >> > > >> > > Yes unfortunately the gpio/pinmux code is shared on allwinner and >> > > doesn't have all the needed "protection" so you can toggle a pin even >> > > if it's not in gpio mode. I don't remember if the value is still >> output >> > > on the physical pin or not. >> > > >> > >> > Yes with SPI enabled in the overlay after a boot, I am still able to >> set >> > the pins to output with gpioctl and see the voltage swing. I must set >> the >> > pins to output to see the voltage swing. Reloading gpio_aw.ko or >> running >> > spi after that doesn't appear to change the fact that the pins are set >> to >> > output as I am still able to run gpioctl and see the toggle. >> > >> > >> > Are you using the -sXM version on the board (where you have an spi >> > > flash present on the board) or did you wire something via the uext >> > > port ? If the later what's wired and how ? >> > > >> > >> > On my board the flash isn't populated. I wasn't aware of the uext port >> so I >> > just soldered wires on to the pads where the flash would have been, and >> a >> > ground. These wires go to my logic analyzer setup to edge detect. For >> > testing I used a loopback (short between) MOSI (PC0) /MISO(PC1) >> > >> > >> > > I have this board but I will not have time to do a proper setup to >> > > test something for some time. >> > > >> > >> > Ok that would be great. I will also order a pine board today to have >> > another board to test on. Any help or advice would be appreciated. I >> could >> > be making a simple mistake or have the most basic of settings wrong, it >> > could be something simple I am overlooking. Is there anyway to read >> back >> > the configuration of a pin from user land? I wonder if anyone else can >> use >> > GPIO pins on bank E on the Olimex A64 board, or has a working SPI on >> this >> > board. >> > >> > Thanks >> >> I've just tested on my a64-olinuxino using the UEXT port and the >> overlay I've just commited (which is the one you wrote). >> I've hooked up an spiflash on a breadboard and I can use it properly. >> >> > >> > >> > > > My diagnostics >> > > > ****************************************** >> > > > root@:/dev # spi -i >> > > > Device name: /dev/spigen0.0 >> > > > Device mode: 2 >> > > > Device speed: 500000 >> > > > root@:/dev # spi -d r -m 0 -C '9F 00' -v -c 2 >> > > > Binary output of 2 bytes >> > > > 2 command bytes and 2 data bytes read from SPI device >> > > > | 0 1 2 3 4 5 6 7 8 9 A B C D E F | >> > > > | >> > > > 0 | 00 00 00 00 | .... >> > > > | >> > > > >> > > > I >> > > > >> > > > >> > > > >> > > > On Sat, Dec 28, 2019 at 10:44 AM Emmanuel Vadot < >> manu@bidouilliste.com> >> > > > wrote: >> > > > >> > > > > On Wed, 25 Dec 2019 19:12:28 -0500 >> > > > > Gary Otten wrote: >> > > > > >> > > > > > Thanks, I have created the following overlay and tried a >> variety of >> > > > > other >> > > > > > things but I haven't been able to get spigen0.0 to appear in >> /dev. >> > > > > > >> > > > > > >> > > > > > >> > > > > > /* $FreeBSD$ */ >> > > > > > /dts-v1/; >> > > > > > /plugin/; >> > > > > > >> > > > > > / { >> > > > > > compatible = "allwinner,sun50i-a64"; >> > > > > > }; >> > > > > > >> > > > > > &{/soc/spi@1c68000} { >> > > > > > >> > > > > > status = "okay"; >> > > > > > >> > > > > > spigen0: spigen0 { >> > > > > > compatible = "freebsd,spigen"; >> > > > > > reg = <0>; >> > > > > > spi-max-frequency = <500000>; >> > > > > > status = "okay"; >> > > > > > }; >> > > > > > >> > > > > > }; >> > > > > > >> > > > > > >> > > > > > >> > > > > > Some diagnostics >> > > > > > >> > > > > > ------------------------------------------------------- >> > > > > > On Boot >> > > > > > >> > > > > > Loading DTB overlays: 'sun50i-a64-spi-spidev' >> > > > > > /boot/dtb/overlays/sun50i-a64-spi-spidev.dtbo size=0x15c >> > > > > > applying DTB overlay >> '/boot/dtb/overlays/sun50i-a64-spi-spidev.dtbo' >> > > > > > .. >> > > > > > .... >> > > > > > ..... >> > > > > > >> > > > > > Autoloading module: aw_spi.ko >> > > > > > aw_spi0: mem 0x1c68000-0x1c68fff irq 29 on >> simplebus0 >> > > > > > spibus0: on aw_spi0 >> > > > > > spibus0: at cs 0 mode 0 >> > > > > > >> > > > > > >> > > > > > ------------------------------------------------------- >> > > > > > root@:/boot/dtb/overlays # kldstat >> > > > > > Id Refs Address Size Name >> > > > > > 1 5 0xffff000000000000 144dda8 kernel >> > > > > > 2 1 0xffff000054c00000 41000 aw_spi.ko >> > > > > > >> > > > > > ------------------------------------------------------- >> > > > > > root@:/boot/dtb/overlays # devinfo >> > > > > > .. >> > > > > > ... >> > > > > > aw_spi0 >> > > > > > spibus0 >> > > > > > >> > > > > > ------------------------------------------------------- >> > > > > > root@:/boot/dtb/overlays # devinfo >> > > > > > >> > > > > > .... >> > > > > > ...... >> > > > > > Node 0x2f60: spi@1c68000 >> > > > > > Node 0x309c: spigen0 >> > > > > > _______________________________________________ >> > > > > > freebsd-arm@freebsd.org mailing list >> > > > > > https://lists.freebsd.org/mailman/listinfo/freebsd-arm >> > > > > > To unsubscribe, send any mail to " >> > > freebsd-arm-unsubscribe@freebsd.org" >> > > > > >> > > > > Hi Gary, >> > > > > >> > > > > You overlay worked for me on the pine64-lts. Here is what I did : >> > > > > - Use https://github.com/evadot/freebsd/commits/aw_spigen >> > > > > - aw_spi is autoloaded via devmatch >> > > > > - kldload spigen (it's not in GENERIC for arm64, maybe we should >> add >> > > it >> > > > > or do some devmatch magic) >> > > > > - root@pine64-lts:~ # spi -i >> > > > > Device name: /dev/spigen0.0 >> > > > > Device mode: 0 >> > > > > Device speed: 500000 >> > > > > root@pine64-lts:~ # spi -d r -m 0 -C '9F 00' -v -c 2 >> > > > > Binary output of 2 bytes >> > > > > 2 command bytes and 2 data bytes read from SPI device >> > > > > | 0 1 2 3 4 5 6 7 8 9 A B C D E F >> > > > > | | 0 | 00 ef 40 18 >> > > | >> > > > > ..@. | >> > > > > >> > > > > Maybe you just forgot to load spigen ? >> > > > > >> > > > > -- >> > > > > Emmanuel Vadot >> > > > > >> > > >> > > >> > > -- >> > > Emmanuel Vadot >> > > >> >> >> -- >> Emmanuel Vadot >> > From owner-freebsd-arm@freebsd.org Wed Jan 15 06:27:33 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 6744B222323 for ; Wed, 15 Jan 2020 06:27:33 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47yHS34Bzlz48Q3 for ; Wed, 15 Jan 2020 06:27:31 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 04abc1fa; Wed, 15 Jan 2020 07:27:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=9L1medQuvoiEWI4iYu9vmuq4luI=; b=Tx0lD0hBd+MCF4kPMHrlP2sRD+Jw QIRifsY71hw/93J6yJMigQa9Mfaw5S2Y/ukh2BqGaVI09+r9FXwlPWtzbPYrSjEi Bzuv3EXbif2HSSWZFp7qg89wqCa7id9gCFhbwa6Jk3npFPCjN5Dpp0lmjXnp4LOi YGUJdg75RwXlX5s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=jzaSiGVY2o2APOtzfYuhToE9bQk9uDnezEQmb40p+WKBVAun0nKHsbBO TGjy9E16npOg6P/9SsIBoZpOcIWL4sr4hAHvHmGk3Of3PMsaJh5r0SpNPuz6ho3U qEb8J2gLRWPQbbveIF1glqBSrX7KJFSjMpeUTevSsaVMhF7W7Xs= Received: from tails (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 2b3aee43 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Wed, 15 Jan 2020 07:27:28 +0100 (CET) Date: Wed, 15 Jan 2020 07:27:27 +0100 From: Emmanuel Vadot To: Gary Otten Cc: freebsd-arm@freebsd.org Subject: Re: SPI support for A64-OLinuXino board Allwinner A64 processor Message-Id: <20200115072727.1e9793860bdcf62b799e2079@bidouilliste.com> In-Reply-To: References: <20191228161726.9efb08df5b69eaa0a0ff478f@bidouilliste.com> <20191230123322.fa579638df66e3eac3e16c91@bidouilliste.com> <20200111193627.6616bc804ef15bbfa341dea0@bidouilliste.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47yHS34Bzlz48Q3 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mail header.b=Tx0lD0hB; dmarc=none; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.177.182 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mail]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.83.177.182/32]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bidouilliste.com]; NEURAL_HAM_LONG(-0.97)[-0.971,0]; NEURAL_SPAM_MEDIUM(0.40)[0.402,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.37)[ip: (-0.73), ipnet: 212.83.160.0/19(2.35), asn: 12876(0.23), country: FR(0.00)]; ASN(0.00)[asn:12876, ipnet:212.83.160.0/19, country:FR]; MID_RHS_MATCH_FROM(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: Wed, 15 Jan 2020 06:27:33 -0000 On Tue, 14 Jan 2020 21:16:38 -0500 Gary Otten wrote: > So that I have the same test environment as you do. What version of > Freebsd are you using and which overlay were you using to boot the Olimex > board? > I have used 12 stable and 13 current, and a couple of different overlays. > (pine and olimex) > > If this would be of interest to others these are the steps I took. I > mounted the boot partition of course. > mkdir /aaa > mount -t msdos /dev/mmcsd0s1 /aaa > cd /aaa > ls > EFI dtb > cd dtb > cd allwinner (directory where overlays are loaded from at boot, this is > not the main partition where most files are located, this is the boot > partition) > > > I am used the sun50i-a64-olinuxino.dtb with changes you previously > suggested because my Bank E gpio wasn't working. > Compiling of course merges sun50i-a64-olinuxino.dts and sun50i-a64.dtsi so > my loaded overlay is sun50i-a64-olinuxino.dtb > > The regulator powering Bank E is not turned on after reading the overlay. > Directly writing to the register on the AXP803 did turn the regulator/bank > on though. > I inserted this code at the end of the axp8xx_attach function in the > driver. axp8xx_write(dev,AXP_POWERCTL3,(AXP_POWERCTL3_ALDO1|0xC8)); > > sysctl says always on, boot on regardless if the regulator is on or not. > > hw.regulator.vcc-pe.always_on: 1 > hw.regulator.vcc-pe.boot_on: 1 > > Anyway I want to make sure I am using the exact same overlay as you so that > I can narrow down why my SPI isn't working and Bank E isn't being read > correctly from the overlay. > > Thanks > Please test latest head with no overlays except the spi one (so just add fdt_overlays=sun50i-a64-spi0-spigen in /boot/loader.conf Revert all your changes just to be sure. I've tested SPI on the UEXT connector two ways: hooking it up to an SPI Flash and bridging MOSI/MISO. Both work. > > On Mon, Jan 13, 2020 at 10:23 AM Gary Otten wrote: > > > Thanks for checking. I will do further testing and report my results. > > > > On Sat, Jan 11, 2020 at 1:36 PM Emmanuel Vadot > > wrote: > > > >> On Mon, 30 Dec 2019 16:13:41 -0500 > >> Gary Otten wrote: > >> > >> > On Mon, Dec 30, 2019 at 6:33 AM Emmanuel Vadot > >> > wrote: > >> > > >> > > On Sun, 29 Dec 2019 23:40:19 -0500 > >> > > Gary Otten wrote: > >> > > > >> > > > Thanks, Ian Lepore mentioned this too, spigen wasn't loaded. I > >> have now > >> > > > loaded spigen. The driver appears to be working, but I am not > >> seeing > >> > > any > >> > > > output. > >> > > > > >> > > > I can toggle pins PC0,PC1,PC2, PC3 with gpioctl, but I don't get > >> > > anything > >> > > > with spi. > >> > > > >> > > You mean settings them as gpio, toggling them and check the pins on > >> > > the uext port ? > >> > > > >> > > >> > Yes that is correct, toggling them with gpioctl and seeing the voltage > >> > swing after setting that pin to OUT with gpioctl. > >> > > >> > > > >> > > > I also had another odd behavior with BANK E. not having any output, > >> using > >> > > > gpoictl, I was not able to get any pin on Bank E to toggle. I did > >> turn on > >> > > > the voltage regulator as suggested. > >> > > > >> > > The SPI pins for SPI0 are on BANKC which is always powered on. > >> > > > >> > > >> > OK, I was mentioning this on the chance that the gpioctl doesn't work > >> with > >> > BANK E because Bank E is set to work with the csi function on the > >> > A64-OLinuXino board. > >> > > >> > > > >> > > > I wonder if FreeBSD is properly setting the configuration registers > >> for > >> > > > each port/pin of the the A64. > >> > > > >> > > I'll not say that the code is bug free but this really should be ok, > >> > > especially for such basic pin setting like spi0 where you only have > >> one > >> > > pin group. > >> > > > >> > > > Basically letting the A64 know to use alt > >> > > > function or general gpio in/out in the proper way for each pin, > >> maybe > >> > > some > >> > > > of the (default?) settings for the more popular pine boards work, > >> but > >> > > > don't work correctly for the Olimex A64 board, or maybe there is > >> some > >> > > > setting in the overlays that I am overlooking that need to be set > >> to use > >> > > an > >> > > > alt function or gpio in/out to get the pins to function properly. > >> If in > >> > > > the overlay I have spi0 enabled, should I still be able to toggle > >> the > >> > > pins > >> > > > with gpioctl? Thanks for the help. > >> > > > >> > > Yes unfortunately the gpio/pinmux code is shared on allwinner and > >> > > doesn't have all the needed "protection" so you can toggle a pin even > >> > > if it's not in gpio mode. I don't remember if the value is still > >> output > >> > > on the physical pin or not. > >> > > > >> > > >> > Yes with SPI enabled in the overlay after a boot, I am still able to > >> set > >> > the pins to output with gpioctl and see the voltage swing. I must set > >> the > >> > pins to output to see the voltage swing. Reloading gpio_aw.ko or > >> running > >> > spi after that doesn't appear to change the fact that the pins are set > >> to > >> > output as I am still able to run gpioctl and see the toggle. > >> > > >> > > >> > Are you using the -sXM version on the board (where you have an spi > >> > > flash present on the board) or did you wire something via the uext > >> > > port ? If the later what's wired and how ? > >> > > > >> > > >> > On my board the flash isn't populated. I wasn't aware of the uext port > >> so I > >> > just soldered wires on to the pads where the flash would have been, and > >> a > >> > ground. These wires go to my logic analyzer setup to edge detect. For > >> > testing I used a loopback (short between) MOSI (PC0) /MISO(PC1) > >> > > >> > > >> > > I have this board but I will not have time to do a proper setup to > >> > > test something for some time. > >> > > > >> > > >> > Ok that would be great. I will also order a pine board today to have > >> > another board to test on. Any help or advice would be appreciated. I > >> could > >> > be making a simple mistake or have the most basic of settings wrong, it > >> > could be something simple I am overlooking. Is there anyway to read > >> back > >> > the configuration of a pin from user land? I wonder if anyone else can > >> use > >> > GPIO pins on bank E on the Olimex A64 board, or has a working SPI on > >> this > >> > board. > >> > > >> > Thanks > >> > >> I've just tested on my a64-olinuxino using the UEXT port and the > >> overlay I've just commited (which is the one you wrote). > >> I've hooked up an spiflash on a breadboard and I can use it properly. > >> > >> > > >> > > >> > > > My diagnostics > >> > > > ****************************************** > >> > > > root@:/dev # spi -i > >> > > > Device name: /dev/spigen0.0 > >> > > > Device mode: 2 > >> > > > Device speed: 500000 > >> > > > root@:/dev # spi -d r -m 0 -C '9F 00' -v -c 2 > >> > > > Binary output of 2 bytes > >> > > > 2 command bytes and 2 data bytes read from SPI device > >> > > > | 0 1 2 3 4 5 6 7 8 9 A B C D E F | > >> > > > | > >> > > > 0 | 00 00 00 00 | .... > >> > > > | > >> > > > > >> > > > I > >> > > > > >> > > > > >> > > > > >> > > > On Sat, Dec 28, 2019 at 10:44 AM Emmanuel Vadot < > >> manu@bidouilliste.com> > >> > > > wrote: > >> > > > > >> > > > > On Wed, 25 Dec 2019 19:12:28 -0500 > >> > > > > Gary Otten wrote: > >> > > > > > >> > > > > > Thanks, I have created the following overlay and tried a > >> variety of > >> > > > > other > >> > > > > > things but I haven't been able to get spigen0.0 to appear in > >> /dev. > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > > /* $FreeBSD$ */ > >> > > > > > /dts-v1/; > >> > > > > > /plugin/; > >> > > > > > > >> > > > > > / { > >> > > > > > compatible = "allwinner,sun50i-a64"; > >> > > > > > }; > >> > > > > > > >> > > > > > &{/soc/spi@1c68000} { > >> > > > > > > >> > > > > > status = "okay"; > >> > > > > > > >> > > > > > spigen0: spigen0 { > >> > > > > > compatible = "freebsd,spigen"; > >> > > > > > reg = <0>; > >> > > > > > spi-max-frequency = <500000>; > >> > > > > > status = "okay"; > >> > > > > > }; > >> > > > > > > >> > > > > > }; > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > > Some diagnostics > >> > > > > > > >> > > > > > ------------------------------------------------------- > >> > > > > > On Boot > >> > > > > > > >> > > > > > Loading DTB overlays: 'sun50i-a64-spi-spidev' > >> > > > > > /boot/dtb/overlays/sun50i-a64-spi-spidev.dtbo size=0x15c > >> > > > > > applying DTB overlay > >> '/boot/dtb/overlays/sun50i-a64-spi-spidev.dtbo' > >> > > > > > .. > >> > > > > > .... > >> > > > > > ..... > >> > > > > > > >> > > > > > Autoloading module: aw_spi.ko > >> > > > > > aw_spi0: mem 0x1c68000-0x1c68fff irq 29 on > >> simplebus0 > >> > > > > > spibus0: on aw_spi0 > >> > > > > > spibus0: at cs 0 mode 0 > >> > > > > > > >> > > > > > > >> > > > > > ------------------------------------------------------- > >> > > > > > root@:/boot/dtb/overlays # kldstat > >> > > > > > Id Refs Address Size Name > >> > > > > > 1 5 0xffff000000000000 144dda8 kernel > >> > > > > > 2 1 0xffff000054c00000 41000 aw_spi.ko > >> > > > > > > >> > > > > > ------------------------------------------------------- > >> > > > > > root@:/boot/dtb/overlays # devinfo > >> > > > > > .. > >> > > > > > ... > >> > > > > > aw_spi0 > >> > > > > > spibus0 > >> > > > > > > >> > > > > > ------------------------------------------------------- > >> > > > > > root@:/boot/dtb/overlays # devinfo > >> > > > > > > >> > > > > > .... > >> > > > > > ...... > >> > > > > > Node 0x2f60: spi@1c68000 > >> > > > > > Node 0x309c: spigen0 > >> > > > > > _______________________________________________ > >> > > > > > freebsd-arm@freebsd.org mailing list > >> > > > > > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > >> > > > > > To unsubscribe, send any mail to " > >> > > freebsd-arm-unsubscribe@freebsd.org" > >> > > > > > >> > > > > Hi Gary, > >> > > > > > >> > > > > You overlay worked for me on the pine64-lts. Here is what I did : > >> > > > > - Use https://github.com/evadot/freebsd/commits/aw_spigen > >> > > > > - aw_spi is autoloaded via devmatch > >> > > > > - kldload spigen (it's not in GENERIC for arm64, maybe we should > >> add > >> > > it > >> > > > > or do some devmatch magic) > >> > > > > - root@pine64-lts:~ # spi -i > >> > > > > Device name: /dev/spigen0.0 > >> > > > > Device mode: 0 > >> > > > > Device speed: 500000 > >> > > > > root@pine64-lts:~ # spi -d r -m 0 -C '9F 00' -v -c 2 > >> > > > > Binary output of 2 bytes > >> > > > > 2 command bytes and 2 data bytes read from SPI device > >> > > > > | 0 1 2 3 4 5 6 7 8 9 A B C D E F > >> > > > > | | 0 | 00 ef 40 18 > >> > > | > >> > > > > ..@. | > >> > > > > > >> > > > > Maybe you just forgot to load spigen ? > >> > > > > > >> > > > > -- > >> > > > > Emmanuel Vadot > >> > > > > > >> > > > >> > > > >> > > -- > >> > > Emmanuel Vadot > >> > > > >> > >> > >> -- > >> Emmanuel Vadot > >> > > -- Emmanuel Vadot From owner-freebsd-arm@freebsd.org Wed Jan 15 09:50:35 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 11AF2226E1F for ; Wed, 15 Jan 2020 09:50:35 +0000 (UTC) (envelope-from jwbentum44@gmail.com) Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47yMyK6rX6z4JqV for ; Wed, 15 Jan 2020 09:50:33 +0000 (UTC) (envelope-from jwbentum44@gmail.com) Received: by mail-lf1-x141.google.com with SMTP id b15so12196071lfc.4 for ; Wed, 15 Jan 2020 01:50:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=MiIoxNgmHIaRfx6keuC8xTpCimcOtAC1Jz4dRKGeAGM=; b=Z0dxwjwK0V6b0JBAc/rF87HuZOOyueYYBbF8TwQywsjspFZRJ5B5+2SH/bPoJOCguE /+g33/dy5J1Fy/PlPjCCngEGhiGyxLKjFvnpwZmx9+GZqogaGKUuNk/cItacOdhgdPso M2ah7Zl+5SNKPc5L1yvzu/+GCKDUsITtkED0CCNbm2DWhEx2FiNJ1IREj7VGf85s4jvU jm5Q+DFd4iAwNfqkjwsQUA1zZh3IfnfX2P+ty6tG+ZUpWrME22STXgUr8tmn+uT8/Yq+ gwT+tGW3NBluLclC2hhBVdaId8K59cDnlhlncXSDMIPWc72S/Sq3mAs9mjahio/7uwUC KbCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=MiIoxNgmHIaRfx6keuC8xTpCimcOtAC1Jz4dRKGeAGM=; b=p7kx0JXMOJQiZZzwXb55X1hNoKjhNattDrCmFlf4Tx5SRZpviNwqzRXL1x1HhcONEV tZB7hzt6S8wMbtt37mXaAiJLhEVnlrY5gLmjp7/y+kO+nYkaI0Anx7ERK/0PMqsOsK7g iwyYH4FKhMHUDMiezMhHvMX/AAunK1Uq06kdin/xJzq4bkyRopFQPtqCkP5hocqamTjw aKchMgKrtSmleaRUMyEQsCl070+d8Xg9RbxKiI+DBfOJHLFZ84jN6tKyPqzvYcgFBo3j tW/of1TSbhmlSQstcs9Cj+9Tcic/9ZVAew+azgMltcV76XDUZQkLwZW2+UomCBQ9wARl es7Q== X-Gm-Message-State: APjAAAVdextjt8z4aQxe85059JvrUSVnWOkVNRDqoOl2Wck7JL9NE5ga vF1zHm+KpV1TlbWBfA1UMXRiKxAFeVmLGYZYGXD0FmjJ91H41Q== X-Google-Smtp-Source: APXvYqwzRr2I/6I4sBllRZ9jgylxKBna7Xc2M1ZuLQEvfGpTQF03bMxyk4aoo2RqR23SuUbWu0V0HNciubKLgjBFul0= X-Received: by 2002:ac2:58c2:: with SMTP id u2mr4540246lfo.206.1579081831748; Wed, 15 Jan 2020 01:50:31 -0800 (PST) MIME-Version: 1.0 From: Hans Bentum Date: Wed, 15 Jan 2020 10:50:20 +0100 Message-ID: Subject: How to get pin to mode 6 on beagle bone black To: freebsd-arm@freebsd.org X-Rspamd-Queue-Id: 47yMyK6rX6z4JqV X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=Z0dxwjwK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of jwbentum44@gmail.com designates 2a00:1450:4864:20::141 as permitted sender) smtp.mailfrom=jwbentum44@gmail.com X-Spamd-Result: default: False [-2.90 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MIME_BASE64_TEXT(0.10)[]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (2.55), ipnet: 2a00:1450::/32(-2.59), asn: 15169(-1.83), country: US(-0.05)]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; SH_EMAIL_ZRD(0.00)[0.0.0.0,0.0.0.1]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; SH_EMAIL_DBL_DONT_QUERY_IPS(0.00)[0.0.0.1,0.0.0.0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[1.4.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Wed, 15 Jan 2020 09:50:35 -0000 Hello, I tried several things to put pin 8_16 into mode 6 for usage by the PRU for high speed IO. Up to now without any luck. I am using FreeBSD 12.1 Question: how can I put a pin on beagle bone black to mode 6? I did the following: To get full speed IO signals I would like to use the enhanced GPIO on the PRU. To do this a device tree overlay is needed. I found a nice example on the internet. https://nilshoel.home.blog/ In this example pin P8.16 is set to input mode 6. /dts-v1/; /plugin/; / { compatible =3D "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green= "; // identification part-number =3D "PRU-UIO-EXAMPLE-PINS"; version =3D "00A0"; fragment@0 { target =3D <&am33xx_pinmux>; __overlay__ { example_pins: pinmux_pru_pru_pins { pinctrl-single,pins =3D < 0x38 0x26 /* Pin 8_16 in gpmc_ad14 Mode 6 */ >; }; }; }; fragment@1 { target-path=3D"<&pruss>"; __overlay__ { pinctrl-names =3D "default"; pinctrl-0 =3D <&example_pins>; status =3D "okay"; }; }; }; The file (egpio.dtso) is converted by dtc =E2=80=93I dts =E2=80=93O dtb =E2=80=93o /boot/dtb/overlays/egpio.dtbo = egpio.dtso The egpio.dtbo is added in the file loader.conf to the line fdt_overlays=3D"am335x-boneblack-pruss.dtbo,egpio.dtbo" am335x-boneblack-pruss.dtbo is to enable the pruss /dts-v1/; /plugin/; / { compatible =3D "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; fragment@0 { target-path=3D"/"; __overlay__ { ocp { #address-cells =3D <1>; #size-cells =3D <1>; pruss@4a300000 { status =3D "okay"; compatible =3D "ti,pruss-v2"; ti,deassert-hard-reset =3D "pruss", "pruss"; reg =3D <0x4a300000 0x080000>; ti,pintc-offset =3D <0x20000>; interrupt-parent =3D <&intc>; interrupts =3D <20 21 22 23 24 25 26 27>; }; }; }; }; }; In the PRU(0) I start a little test program which sets a userled to on when the pin is sampled high and sets the userled to off when the pin is sampled low. The pin should be in mode 6 to be able to read the high value. If I use some timer construction in the pru assembly program bellow the leds are blinking so the pru is up and running. # cat rtu_w.p .origin 0 .entrypoint START #define GPIO0 0x44E07000 #define GPIO1 0x4804c000 #define GPIO2 0x481AC000 #define GPIO3 0x481AE000 #define GPIO_CLEARDATAOUT 0x190 #define GPIO_SETDATAOUT 0x194 #define LED_USER 1<<24 #define CONST_PRUCFG C4 #define CTPPR_0 0x24028 #define CTPPR_1 0x2402C .macro ST32 .mparam src,dst SBBO src,dst,#0x00,4 .endm START:LBCO r0, CONST_PRUCFG, 4, 4 CLR r0, r0, SBCO r0, CONST_PRUCFG, 4, 4 MOV r0, 0x00000100 MOV r1, CTPPR_0 ST32 r0, r1 MOV r0, 0x00100000 MOV r1, CTPPR_1 ST32 r0, r1 NO_CMD:QBBC L1, r31.t14 // Quick Branch to L1 if Bit is Clear CALL LED_USER_LANE_1_ON QBA NO_CMD L1: CALL LED_USER_LANE_1_OFF QBA NO_CMD LED_USER_LANE_1_ON: MOV r2, LED_USER MOV r3, GPIO1 | GPIO_SETDATAOUT SBBO r2, r3, 0, 4 RET LED_USER_LANE_1_OFF: MOV r2, LED_USER MOV r3, GPIO1 | GPIO_CLEARDATAOUT SBBO r2, r3, 0, 4 RET Makefile pru =3D rtu_w LIB_PATH =3D . LIBRARIES =3D pthread INCLUDES =3D -I. ${LIB_PATH} INCLUDES =3D -I/home/freebsd/iws EXTRA_DEFINE =3D CCCFLAGS =3D $(EXTRA_DEFINE) CC =3D clang CFLAGS =3D $(EXTRA_DEFINE) PASM =3D pasm all : $(clean) $(pru) pru : $(pru) $(pru) : $(pru:%=3D%.p) rm -rf *.o *.bin $(project) core *~ $(PASM) -V3 -b $@.p clean: rm -rf *.o *.bin $(project) core *~ compile wtih: #make Run on pru:(and give the pin signals) # pructl =E2=80=93t ti =E2=80=93p 0 =E2=80=93e rtu_w.bin I also tried to set the pinmux using the pru but no luck (as expected). https://vadl.github.io/beagleboneblack/2016/07/29/setting-up-bbb-gpio #define P8_16 0x44E10838 MOV r2, 0x26 // val MOV r0, P8_16 // address SBBO r2, r0, 0, 4 // store For low speed setting or reading pin like #include gself.m_gpio2 =3D gpio_open(2); gpio_pin_input (gself.m_gpio2, 22); gpio_close(gself.m_gpio2); works very well. Regards, Hans Bentum From owner-freebsd-arm@freebsd.org Wed Jan 15 12:47:35 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 4F77D1F2E41 for ; Wed, 15 Jan 2020 12:47:35 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (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 47yRtY5PM3z4SxW for ; Wed, 15 Jan 2020 12:47:33 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Date: Wed, 15 Jan 2020 13:47:31 +0100 (CET) From: Ronald Klop To: Peter Libassi Cc: freebsd-arm@freebsd.org Message-ID: <169812223.9.1579092451897@localhost> In-Reply-To: <8C7FC333-409C-4227-A8F1-52134CF98B4B@libassi.se> References: <8C7FC333-409C-4227-A8F1-52134CF98B4B@libassi.se> Subject: Re: is wireguard available on arm64 MIME-Version: 1.0 X-Mailer: Realworks (490.1934.009fd9d6ee0) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 47yRtY5PM3z4SxW X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 194.109.157.24 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-0.51 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.95)[-0.945,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; NEURAL_HAM_LONG(-0.74)[-0.736,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[klop.ws]; URI_COUNT_ODD(1.00)[9]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[24.157.109.194.list.dnswl.org : 127.0.15.0]; HAS_X_PRIO_THREE(0.00)[3]; IP_SCORE(-0.03)[ipnet: 194.109.0.0/16(-0.15), asn: 3265(-0.02), country: NL(0.03)]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; MIME_TRACE(0.00)[0:+,1:+,2:~] Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Wed, 15 Jan 2020 12:47:35 -0000 Hello Peter, Good to hear that it works. For the bugreport. You could try to mail the maintainer of the port. See https://www.freshports.org/net/wireguard/ or https://www.freshports.org/net/wireguard-go/ for the email address of the maintainer. If the maintainer does not reply you can create a bug report at https://bugs.freebsd.org/. Regards, Ronald. Van: Peter Libassi Datum: dinsdag, 14 januari 2020 17:42 Aan: freebsd-arm@freebsd.org Onderwerp: Re: is wireguard available on arm64 > > I managed to compile (after adding swap space) and install go-devel and the wireguard bits on the RPI3. I also installed the packages on a second RPI3. Set up a wireguard tunnel between the RPI3's using wg-quick and run iperf test. > > iperf direct on the local lan: 94.1 Mbits/sec > iperf over the wireguard tunnel: 71.1 Mbits/sec > > > The wg(8) man page references man pages that do not exist on freebsd, where should I file a bug report? > > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > > > From owner-freebsd-arm@freebsd.org Wed Jan 15 14:47:43 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 02DFE1F55D1 for ; Wed, 15 Jan 2020 14:47:43 +0000 (UTC) (envelope-from decke@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47yVYB6DFRz4ZXP for ; Wed, 15 Jan 2020 14:47:42 +0000 (UTC) (envelope-from decke@freebsd.org) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: decke) by smtp.freebsd.org (Postfix) with ESMTPSA id 94791170D3 for ; Wed, 15 Jan 2020 14:47:42 +0000 (UTC) (envelope-from decke@freebsd.org) Received: by mail-lj1-f175.google.com with SMTP id a13so18847538ljm.10 for ; Wed, 15 Jan 2020 06:47:42 -0800 (PST) X-Gm-Message-State: APjAAAVCir4XAlxMWlPzR7ksEl5HUtp0jBU6AIjLCYqQ4rkFIZhyNzXf I4Esb1FvhxEKIkPuznhOPwcj4mRPiM3DzzoDIY9grQ== X-Google-Smtp-Source: APXvYqy0iO43PEcXe8QK+ii76VetWRyfgD+Q27NzZthoBOtiajIx3LG9q74yRl7z91OZ5fSt3JLEvET7IuvWMsgTZ7w= X-Received: by 2002:a2e:7311:: with SMTP id o17mr2094879ljc.197.1579099661132; Wed, 15 Jan 2020 06:47:41 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a19:791c:0:0:0:0:0 with HTTP; Wed, 15 Jan 2020 06:47:40 -0800 (PST) X-Originating-IP: [2001:470:7527:8400:55fd:2544:fdff:f25b] In-Reply-To: <8C7FC333-409C-4227-A8F1-52134CF98B4B@libassi.se> References: <8C7FC333-409C-4227-A8F1-52134CF98B4B@libassi.se> From: =?UTF-8?Q?Bernhard_Fr=C3=B6hlich?= Date: Wed, 15 Jan 2020 15:47:40 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: is wireguard available on arm64 To: Peter Libassi Cc: "freebsd-arm@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Wed, 15 Jan 2020 14:47:43 -0000 On Tuesday, January 14, 2020, Peter Libassi wrote: > I managed to compile (after adding swap space) and install go-devel and the wireguard bits on the RPI3. I also installed the packages on a second RPI3. Set up a wireguard tunnel between the RPI3's using wg-quick and run iperf test. > > iperf direct on the local lan: 94.1 Mbits/sec > iperf over the wireguard tunnel: 71.1 Mbits/sec > > > The wg(8) man page references man pages that do not exist on freebsd, where should I file a bugreport. I will have a look and put it on my todo list. If you want you can create a bugreport on bugs.freebsd.org but it's not needed. -- Bernhard Froehlich http://www.bluelife.at/ From owner-freebsd-arm@freebsd.org Wed Jan 15 21:09:06 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 20BE31FD89A for ; Wed, 15 Jan 2020 21:09:06 +0000 (UTC) (envelope-from freebsdnewbie@freenet.de) Received: from mout0.freenet.de (mout0.freenet.de [IPv6:2001:748:100:40::2:2]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (Client CN "*.freenet.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47yg1F21gRz41yv for ; Wed, 15 Jan 2020 21:09:04 +0000 (UTC) (envelope-from freebsdnewbie@freenet.de) Received: from [195.4.92.165] (helo=mjail2.freenet.de) by mout0.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (port 25) (Exim 4.92 #3) id 1irpuQ-0007Nv-0T; Wed, 15 Jan 2020 22:09:02 +0100 Received: from [::1] (port=40988 helo=mjail2.freenet.de) by mjail2.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (Exim 4.92 #3) id 1irpuP-00039i-W3; Wed, 15 Jan 2020 22:09:01 +0100 Received: from sub7.freenet.de ([195.4.92.126]:50346) by mjail2.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (Exim 4.92 #3) id 1irpsG-0002qY-Aj; Wed, 15 Jan 2020 22:06:48 +0100 Received: from p4fd9ee8f.dip0.t-ipconnect.de ([79.217.238.143]:37138 helo=freebsd-t450.fritz.box) by sub7.freenet.de with esmtpsa (ID freebsdnewbie@freenet.de) (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256) (port 465) (Exim 4.92 #3) id 1irpsF-0006ll-Re; Wed, 15 Jan 2020 22:06:48 +0100 Date: Wed, 15 Jan 2020 22:06:47 +0100 From: Manuel =?ISO-8859-1?Q?St=FChn?= To: Hans Bentum Cc: freebsd-arm@freebsd.org Subject: Re: How to get pin to mode 6 on beagle bone black Message-Id: <20200115220647.1958e8639dc718e714775fed@freenet.de> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Originated-At: 79.217.238.143!37138 X-Rspamd-Queue-Id: 47yg1F21gRz41yv X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsdnewbie@freenet.de designates 2001:748:100:40::2:2 as permitted sender) smtp.mailfrom=freebsdnewbie@freenet.de X-Spamd-Result: default: False [-1.69 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[freenet.de]; R_SPF_ALLOW(-0.20)[+ip6:2001:748:100:40::2:0/112]; MV_CASE(0.50)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[freenet.de]; ASN(0.00)[asn:5430, ipnet:2001:748::/32, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[143.238.217.79.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.89)[-0.894,0]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (-0.28), ipnet: 2001:748::/32(-0.25), asn: 5430(-0.28), country: DE(-0.02)]; DMARC_NA(0.00)[freenet.de]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2.0.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.4.0.0.0.0.1.0.8.4.7.0.1.0.0.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(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: Wed, 15 Jan 2020 21:09:06 -0000 On Wed, 15 Jan 2020 10:50:20 +0100 Hans Bentum wrote: > Hello, >=20 > I tried several things to put pin 8_16 into mode 6 for usage by the PRU f= or > high speed IO. > Up to now without any luck. I am using FreeBSD 12.1 >=20 > Question: how can I put a pin on beagle bone black to mode 6? >=20 I've sucessfully run the PRU reading PRU-GPIN with a very similar setup as = you describe and don't see why it should not work.=20 Please try to gather some additional information: - How are the gpio-pins actually assigned. This can be observed by booting = in verbose mode (boot -v).=20 - How does the actual used devicetree look like (sysctl -b hw.fdt.dtb | dtc= -I dtb -O dts | less) [... snip ...] > I also tried to set the pinmux using the pru but no luck (as expected). > https://vadl.github.io/beagleboneblack/2016/07/29/setting-up-bbb-gpio >=20 > #define P8_16 0x44E10838 > MOV r2, 0x26 // val > MOV r0, P8_16 // address > SBBO r2, r0, 0, 4 // store IIRC: You would have to enable OCP master ports in order to enable the PRU = to write outside of its memory area. --=20 Manuel St=FChn From owner-freebsd-arm@freebsd.org Thu Jan 16 09:44:31 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 B99D623072B for ; Thu, 16 Jan 2020 09:44:31 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vtr.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47yzmt4LXnz3GC3; Thu, 16 Jan 2020 09:44:29 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) by vtr.rulingia.com (8.15.2/8.15.2) with ESMTPS id 00G9iEgu004625 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 20:44:20 +1100 (AEDT) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id 00G9i9jV012272 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 16 Jan 2020 20:44:09 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id 00G9i9Od012271; Thu, 16 Jan 2020 20:44:09 +1100 (AEDT) (envelope-from peter) Date: Thu, 16 Jan 2020 20:44:09 +1100 From: Peter Jeremy To: Emmanuel Vadot Cc: Kyle Evans , "freebsd-arm@freebsd.org" Subject: Re: Banana Pi M1 SATA problems Message-ID: <20200116094409.GJ25924@server.rulingia.com> References: <20200112080247.GF25924@server.rulingia.com> <20200113095740.GG25924@server.rulingia.com> <20200113111932.9e8e648733d530b70011456f@bidouilliste.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2NLGdgz3UMHa/lqP" Content-Disposition: inline In-Reply-To: <20200113111932.9e8e648733d530b70011456f@bidouilliste.com> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47yzmt4LXnz3GC3 X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of peter@rulingia.com designates 2001:19f0:5801:ebe:5400:1ff:fe53:30fd as permitted sender) smtp.mailfrom=peter@rulingia.com X-Spamd-Result: default: False [-7.66 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[rulingia.com]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5800::/38, country:US]; RCVD_TLS_ALL(0.00)[]; IP_SCORE(-3.26)[ip: (-9.72), ipnet: 2001:19f0:5800::/38(-4.86), asn: 20473(-1.67), country: US(-0.05)] 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: Thu, 16 Jan 2020 09:44:31 -0000 --2NLGdgz3UMHa/lqP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-Jan-13 11:19:32 +0100, Emmanuel Vadot wrote: >On Mon, 13 Jan 2020 20:57:40 +1100 >Peter Jeremy wrote: > >> On 2020-Jan-12 09:22:14 -0600, Kyle Evans wrote: >> >On Sun, Jan 12, 2020 at 2:03 AM Peter Jeremy wrote: >> >> I'm trying to get my (new) Banana Pi M1 to talk to a SATA drive. >> >> Unfortunately, something is disabling the SATA port. >> > >> >Try updating past r356600; earlier than that and probably 12.1-RELEASE >> >we were shutting down the regulator. hw.regulator.disable_unused=3D0 >> >should also work around it. Actually, r356600 increases the breakage. It attaches the regulator defined by "target-supply" to the ahci device, however there is no target-supply field on the ahci device in sun7i-a20-bananapi.dts and the ahci_5v regulator is disabled so achi0 no longer probes. After I added following patch, the behaviour went returned to the previous - ahci0 attaches but ahcich0 is disabled. Index: gnu/dts/arm/sun7i-a20-bananapi.dts =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- gnu/dts/arm/sun7i-a20-bananapi.dts (revision 356657) +++ gnu/dts/arm/sun7i-a20-bananapi.dts (working copy) @@ -95,6 +95,7 @@ }; =20 &ahci { + target-supply =3D <®_ahci_5v>; status =3D "okay"; }; =20 @@ -252,6 +253,10 @@ =20 #include "axp209.dtsi" =20 +®_ahci_5v { + status =3D "okay"; +}; + ®_dcdc2 { regulator-always-on; regulator-min-microvolt =3D <1000000>; >> I need hw.regulator.disable_unused=3D"0" because the BPi powers itself >> off completely without it. I am building a new world+kernel at r356657 >> but that will take a while because it has triggered a clang rebuild. > This problem should be fixed with r356609. This part does work, thanks. --=20 Peter Jeremy --2NLGdgz3UMHa/lqP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAl4gMGJfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzTAhxAAhfYmUkLEt7RyefhSLSmDPb9fL5jKuvu2QX9pfwC0enk3J+mSLwzE9jRL 3Romem0uroYed67Sey4qlpWZiWTVS16W1PlKsEMJmj+M63G2POi+CTerYNATLWuD iBEHKki4iFNRA9yNGviGeQm02pR4XLQacaIuE9gcI01GcaF+a0Q0Eck5CIl8iOiE IrVp4uv7TFqwS9A8Zw+RBPLQhu1WX355GxoomxD6l+EXu9DfT4PKGKfAIkPq7OUR 8o+5pm7T7DQh/f83LdDBtb/T1qBkCQYorOr9C3kCeyMSzsNuLhZfts0bnEliXiiz aqNI21Gl7iVLVdQ+ypWg3SSeZRIiwc/qGgW9UU8zYTMbczLo5Dhh9KOBP4JnZJ/g nzhzLUcvNmooVCvDeFZvxNqxzibRop9+C/JNn6ciwul/MXgbX4Y5QdjMSsupRfOA PbsmRKbOeuBxam40FNT4lFIW/d+GLoT4AyVBi0qotXFLyKu5AI0crLSqstqT49KK 0g7ZijbH4j5mJAACmaGkCa5vYpLSK/tDq/SpIu8sgH6aJwUXFFG4+qwpWpE29GlP 9u6VkcORnXLIU6TUeXTDgPDt8FR005LLBSCI08qrW39K7MfiyaA+4OylkZ2dQECN W9QwiQ2pLgFQdYTFIf3NrEA6ombixWYZV0FfgEgC2yOEGpbtFkw= =eGdx -----END PGP SIGNATURE----- --2NLGdgz3UMHa/lqP-- From owner-freebsd-arm@freebsd.org Thu Jan 16 12:01:24 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 7104F234EB6 for ; Thu, 16 Jan 2020 12:01:24 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47z2pq19Thz3Pxj; Thu, 16 Jan 2020 12:01:22 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id e385f0b5; Thu, 16 Jan 2020 13:01:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=K/EMUvx5BMP6EKaS68eDoJYOq2Q=; b=S6yO6gourGruWEC/uuV//L+UZh7W qVRvsC73/0+Rc99qCtnc3z0vlegjOdN9k1p7awLxN8kUPWs607jtdgYgb//UFpzm DY9nMFydwBNlDeiijEc6cKLE7T4/DGyHJKAhpaY5D5u/ILq7IcQkx0XcycWbhSX7 7X+YwXvhDXMi6Zw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=o6f1OTBf79PA2vVFwXDjC0l+WPdMImTulnEfL6zeU7n4e+BwzKg3glYk RvtA2YZJU/nH1vP74itwEG3olgY9FXlXHQIwX8D26E2VXVlYzAuCBW9liS/t9MFV UKDwZBo+qoePLtSiXuiVkO0fZYwrwcaR1bMyC/aw+wZrVxY6Tf4= Received: from skull.home.blih.net (lfbn-idf2-1-1164-130.w90-92.abo.wanadoo.fr [90.92.223.130]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 667b33e8 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Thu, 16 Jan 2020 13:01:18 +0100 (CET) Date: Thu, 16 Jan 2020 13:01:15 +0100 From: Emmanuel Vadot To: Peter Jeremy Cc: Kyle Evans , "freebsd-arm@freebsd.org" Subject: Re: Banana Pi M1 SATA problems Message-Id: <20200116130115.253fe5902a5b2c1c4f5bc359@bidouilliste.com> In-Reply-To: <20200116094409.GJ25924@server.rulingia.com> References: <20200112080247.GF25924@server.rulingia.com> <20200113095740.GG25924@server.rulingia.com> <20200113111932.9e8e648733d530b70011456f@bidouilliste.com> <20200116094409.GJ25924@server.rulingia.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47z2pq19Thz3Pxj X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mail header.b=S6yO6gou; dmarc=none; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.177.182 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [0.26 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mail]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:212.83.177.182/32]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bidouilliste.com]; NEURAL_HAM_LONG(-0.92)[-0.916,0]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_MEDIUM(0.70)[0.702,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.37)[ip: (-0.72), ipnet: 212.83.160.0/19(2.34), asn: 12876(0.23), country: FR(0.00)]; ASN(0.00)[asn:12876, ipnet:212.83.160.0/19, country:FR]; MID_RHS_MATCH_FROM(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: Thu, 16 Jan 2020 12:01:24 -0000 On Thu, 16 Jan 2020 20:44:09 +1100 Peter Jeremy wrote: > On 2020-Jan-13 11:19:32 +0100, Emmanuel Vadot wrote: > >On Mon, 13 Jan 2020 20:57:40 +1100 > >Peter Jeremy wrote: > > > >> On 2020-Jan-12 09:22:14 -0600, Kyle Evans wrote: > >> >On Sun, Jan 12, 2020 at 2:03 AM Peter Jeremy wrote: > >> >> I'm trying to get my (new) Banana Pi M1 to talk to a SATA drive. > >> >> Unfortunately, something is disabling the SATA port. > >> > > >> >Try updating past r356600; earlier than that and probably 12.1-RELEASE > >> >we were shutting down the regulator. hw.regulator.disable_unused=0 > >> >should also work around it. > > Actually, r356600 increases the breakage. It attaches the regulator > defined by "target-supply" to the ahci device, however there is no > target-supply field on the ahci device in sun7i-a20-bananapi.dts and > the ahci_5v regulator is disabled so achi0 no longer probes. Indeed, the target-supply regulator is optional, I'll commit a patch this afternoon that fixes this. > After I added following patch, the behaviour went returned to the > previous - ahci0 attaches but ahcich0 is disabled. Looks correct to me, anyway you can submit that upstream ? Also note that you should use sun7i-a20-bananapi-m1-plus.dts > Index: gnu/dts/arm/sun7i-a20-bananapi.dts > =================================================================== > --- gnu/dts/arm/sun7i-a20-bananapi.dts (revision 356657) > +++ gnu/dts/arm/sun7i-a20-bananapi.dts (working copy) > @@ -95,6 +95,7 @@ > }; > > &ahci { > + target-supply = <®_ahci_5v>; > status = "okay"; > }; > > @@ -252,6 +253,10 @@ > > #include "axp209.dtsi" > > +®_ahci_5v { > + status = "okay"; > +}; > + > ®_dcdc2 { > regulator-always-on; > regulator-min-microvolt = <1000000>; > > >> I need hw.regulator.disable_unused="0" because the BPi powers itself > >> off completely without it. I am building a new world+kernel at r356657 > >> but that will take a while because it has triggered a clang rebuild. > > This problem should be fixed with r356609. > > This part does work, thanks. Good to know that is also fixes problems for you. > -- > Peter Jeremy -- Emmanuel Vadot From owner-freebsd-arm@freebsd.org Thu Jan 16 14:43:33 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 8521A1EA408 for ; Thu, 16 Jan 2020 14:43:33 +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 47z6Pw3JG4z45rL; Thu, 16 Jan 2020 14:43:32 +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 1is6Mm-0005Rd-7z; Thu, 16 Jan 2020 14:43:24 +0000 Date: Thu, 16 Jan 2020 16:43:21 +0200 From: Nick Kostirya To: Ian Lepore Cc: Milan Obuch , freebsd-arm@freebsd.org Subject: Re: gpioiic FDT overlays for sun8i-h3 Message-ID: <20200116164321.68d6a219@i11.co> In-Reply-To: <78c7d14bb681f8bca11525bf61cf871c6e89c235.camel@freebsd.org> References: <20191128152901.39dbeb4d@thinkpad> <20191128062149.577be86eb7dc15ae5805f31a@bidouilliste.com> <20191129153754.28fb5763@thinkpad> <20191129144316.739c8664@zeta.dino.sk> <20191129155431.05d4e14f@thinkpad> <20191129150944.67a2b723a6724c46f7559f96@bidouilliste.com> <0ce78262af1dd3b404b9a85a780933d7e11f008e.camel@freebsd.org> <20191129201244.0bc85b09@thinkpad> <20191219095935.6fed7431@i11.co> <78c7d14bb681f8bca11525bf61cf871c6e89c235.camel@freebsd.org> 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: 47z6Pw3JG4z45rL X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.08 / 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)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:159.69.78.69]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; SH_EMAIL_ZRD(0.00)[0.0.0.0,0.0.0.1]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[i11.co:+]; DMARC_POLICY_ALLOW(-0.50)[i11.co,reject]; SH_EMAIL_DBL_DONT_QUERY_IPS(0.00)[0.0.0.1,0.0.0.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-2.08)[ip: (-9.59), ipnet: 159.69.0.0/16(0.74), asn: 24940(-1.51), 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: Thu, 16 Jan 2020 14:43:33 -0000 On Thu, 19 Dec 2019 10:29:16 -0700 Ian Lepore wrote: > > The gpioiic node needs to be defined at the root of the devicetree, not > under the pinctrl node. Assuming that all pins are configured as gpios > by default (they are on most SOCs) you probably don't need a pinctrl > node for them at all. If you do, someone who knows allwinner stuff > better than me would have to provide an example of that part. > > To add the gpioiic driver node using pins 0 and 2 like your example, I > think it should be just this: > > /dts-v1/; > /plugin/; > > / { > compatible = "allwinner,sun8i-h3"; > }; > > &{/} { > gpioiic@0 { > compatible = "i2c-gpio"; > scl-gpios = > <&pio 0 0 GPIO_ACTIVE_HIGH>; > sdl-gpios = <&pio 0 2 > GPIO_ACTIVE_HIGH>; > }; Hello. This is me again. I have gpioiic0 and I wanted to add another gpioiic (gpioiic1): gpioiic@1 { compatible = "i2c-gpio"; scl-gpios = <&pio 0 22 GPIO_ACTIVE_HIGH>; /* GPIO pin 22 (PC0) */ sda-gpios = <&pio 0 23 GPIO_ACTIVE_HIGH>; /* GPIO pin 23 (PC1) */ }; But I got error in dmesg: gpiobus0: invalid pin -1058976448, max: 93 Must gpioiic be only one? Nick. From owner-freebsd-arm@freebsd.org Thu Jan 16 20:06:31 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 BFBF21F4188 for ; Thu, 16 Jan 2020 20:06:31 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47zFZb0CCLz4WZJ for ; Thu, 16 Jan 2020 20:06:30 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id cd331757; Thu, 16 Jan 2020 21:06:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=8CLKcdDU80G2Fsq5cHHBfOtqtF4=; b=MCN7UL6ngPXb16xamNPOb8/tuE4N GoTQJafdilXP/RTF2sOuAuBq88FSjCsekDwwq/Ig6x5vlVGsI9O8JiU+O1DUGk0E dioEV09O4DCfUwICsM1qOqqE3KLl89Ytrbksus/odOYFNzMOBp4wRCeKDETEzOC8 86A/QGPOEcthEL8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=TH01yRJAL3IlBgnClVjhyJ4V2WkEYXOL3wWdVa26bhqbDwVu8+2rHzBu z/xuFtRHHzHpwJpy/uwao1dceuTXaxTiZAY8W0jP+rzZZslo3lZ1X+bjwn9P00gy 6nwWC9FFl25/2QQ1gYLcrezT3PyXOStvUOpjFExys4rdDu42DwA= Received: from skull.home.blih.net (lfbn-idf2-1-1164-130.w90-92.abo.wanadoo.fr [90.92.223.130]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 01edca7a TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Thu, 16 Jan 2020 21:06:29 +0100 (CET) Date: Thu, 16 Jan 2020 21:06:26 +0100 From: Emmanuel Vadot To: Gary Otten Cc: freebsd-arm@freebsd.org Subject: Re: SPI support for A64-OLinuXino board Allwinner A64 processor Message-Id: <20200116210626.097ecdfab0a7aa5d03483944@bidouilliste.com> In-Reply-To: References: <20191228161726.9efb08df5b69eaa0a0ff478f@bidouilliste.com> <20191230123322.fa579638df66e3eac3e16c91@bidouilliste.com> <20200111193627.6616bc804ef15bbfa341dea0@bidouilliste.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47zFZb0CCLz4WZJ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mail header.b=MCN7UL6n; dmarc=none; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.177.182 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-0.91 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mail]; NEURAL_HAM_MEDIUM(-0.48)[-0.476,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.83.177.182/32:c]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bidouilliste.com]; NEURAL_HAM_LONG(-0.91)[-0.908,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.37)[ip: (-0.71), ipnet: 212.83.160.0/19(2.33), asn: 12876(0.23), country: FR(0.00)]; ASN(0.00)[asn:12876, ipnet:212.83.160.0/19, country:FR]; MID_RHS_MATCH_FROM(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: Thu, 16 Jan 2020 20:06:31 -0000 On Tue, 14 Jan 2020 21:16:38 -0500 Gary Otten wrote: > So that I have the same test environment as you do. What version of > Freebsd are you using and which overlay were you using to boot the Olimex > board? > I have used 12 stable and 13 current, and a couple of different overlays. > (pine and olimex) > > If this would be of interest to others these are the steps I took. I > mounted the boot partition of course. > mkdir /aaa > mount -t msdos /dev/mmcsd0s1 /aaa > cd /aaa > ls > EFI dtb > cd dtb > cd allwinner (directory where overlays are loaded from at boot, this is > not the main partition where most files are located, this is the boot > partition) > > > I am used the sun50i-a64-olinuxino.dtb with changes you previously > suggested because my Bank E gpio wasn't working. > Compiling of course merges sun50i-a64-olinuxino.dts and sun50i-a64.dtsi so > my loaded overlay is sun50i-a64-olinuxino.dtb > > The regulator powering Bank E is not turned on after reading the overlay. > Directly writing to the register on the AXP803 did turn the regulator/bank > on though. > I inserted this code at the end of the axp8xx_attach function in the > driver. axp8xx_write(dev,AXP_POWERCTL3,(AXP_POWERCTL3_ALDO1|0xC8)); > > sysctl says always on, boot on regardless if the regulator is on or not. > > hw.regulator.vcc-pe.always_on: 1 > hw.regulator.vcc-pe.boot_on: 1 Since r356800 you will need only one patch for the DTS that specify the vcc-pe-supply in the pio node (the regulator needed to be enabled for bank E). I've submitted my change in Linux and waiting a few days before commiting the patch to the FreeBSD source tree. The patch for the dts is here https://patchwork.kernel.org/patch/11337723/ Note that on this board the PE bank is also used for MIPI-CSI so the regulator is set at 2.8V, if you want 3.3V you will need to use an overlay or change the value in the reg_aldo1 node in the dts. > Anyway I want to make sure I am using the exact same overlay as you so that > I can narrow down why my SPI isn't working and Bank E isn't being read > correctly from the overlay. > > Thanks > > > > On Mon, Jan 13, 2020 at 10:23 AM Gary Otten wrote: > > > Thanks for checking. I will do further testing and report my results. > > > > On Sat, Jan 11, 2020 at 1:36 PM Emmanuel Vadot > > wrote: > > > >> On Mon, 30 Dec 2019 16:13:41 -0500 > >> Gary Otten wrote: > >> > >> > On Mon, Dec 30, 2019 at 6:33 AM Emmanuel Vadot > >> > wrote: > >> > > >> > > On Sun, 29 Dec 2019 23:40:19 -0500 > >> > > Gary Otten wrote: > >> > > > >> > > > Thanks, Ian Lepore mentioned this too, spigen wasn't loaded. I > >> have now > >> > > > loaded spigen. The driver appears to be working, but I am not > >> seeing > >> > > any > >> > > > output. > >> > > > > >> > > > I can toggle pins PC0,PC1,PC2, PC3 with gpioctl, but I don't get > >> > > anything > >> > > > with spi. > >> > > > >> > > You mean settings them as gpio, toggling them and check the pins on > >> > > the uext port ? > >> > > > >> > > >> > Yes that is correct, toggling them with gpioctl and seeing the voltage > >> > swing after setting that pin to OUT with gpioctl. > >> > > >> > > > >> > > > I also had another odd behavior with BANK E. not having any output, > >> using > >> > > > gpoictl, I was not able to get any pin on Bank E to toggle. I did > >> turn on > >> > > > the voltage regulator as suggested. > >> > > > >> > > The SPI pins for SPI0 are on BANKC which is always powered on. > >> > > > >> > > >> > OK, I was mentioning this on the chance that the gpioctl doesn't work > >> with > >> > BANK E because Bank E is set to work with the csi function on the > >> > A64-OLinuXino board. > >> > > >> > > > >> > > > I wonder if FreeBSD is properly setting the configuration registers > >> for > >> > > > each port/pin of the the A64. > >> > > > >> > > I'll not say that the code is bug free but this really should be ok, > >> > > especially for such basic pin setting like spi0 where you only have > >> one > >> > > pin group. > >> > > > >> > > > Basically letting the A64 know to use alt > >> > > > function or general gpio in/out in the proper way for each pin, > >> maybe > >> > > some > >> > > > of the (default?) settings for the more popular pine boards work, > >> but > >> > > > don't work correctly for the Olimex A64 board, or maybe there is > >> some > >> > > > setting in the overlays that I am overlooking that need to be set > >> to use > >> > > an > >> > > > alt function or gpio in/out to get the pins to function properly. > >> If in > >> > > > the overlay I have spi0 enabled, should I still be able to toggle > >> the > >> > > pins > >> > > > with gpioctl? Thanks for the help. > >> > > > >> > > Yes unfortunately the gpio/pinmux code is shared on allwinner and > >> > > doesn't have all the needed "protection" so you can toggle a pin even > >> > > if it's not in gpio mode. I don't remember if the value is still > >> output > >> > > on the physical pin or not. > >> > > > >> > > >> > Yes with SPI enabled in the overlay after a boot, I am still able to > >> set > >> > the pins to output with gpioctl and see the voltage swing. I must set > >> the > >> > pins to output to see the voltage swing. Reloading gpio_aw.ko or > >> running > >> > spi after that doesn't appear to change the fact that the pins are set > >> to > >> > output as I am still able to run gpioctl and see the toggle. > >> > > >> > > >> > Are you using the -sXM version on the board (where you have an spi > >> > > flash present on the board) or did you wire something via the uext > >> > > port ? If the later what's wired and how ? > >> > > > >> > > >> > On my board the flash isn't populated. I wasn't aware of the uext port > >> so I > >> > just soldered wires on to the pads where the flash would have been, and > >> a > >> > ground. These wires go to my logic analyzer setup to edge detect. For > >> > testing I used a loopback (short between) MOSI (PC0) /MISO(PC1) > >> > > >> > > >> > > I have this board but I will not have time to do a proper setup to > >> > > test something for some time. > >> > > > >> > > >> > Ok that would be great. I will also order a pine board today to have > >> > another board to test on. Any help or advice would be appreciated. I > >> could > >> > be making a simple mistake or have the most basic of settings wrong, it > >> > could be something simple I am overlooking. Is there anyway to read > >> back > >> > the configuration of a pin from user land? I wonder if anyone else can > >> use > >> > GPIO pins on bank E on the Olimex A64 board, or has a working SPI on > >> this > >> > board. > >> > > >> > Thanks > >> > >> I've just tested on my a64-olinuxino using the UEXT port and the > >> overlay I've just commited (which is the one you wrote). > >> I've hooked up an spiflash on a breadboard and I can use it properly. > >> > >> > > >> > > >> > > > My diagnostics > >> > > > ****************************************** > >> > > > root@:/dev # spi -i > >> > > > Device name: /dev/spigen0.0 > >> > > > Device mode: 2 > >> > > > Device speed: 500000 > >> > > > root@:/dev # spi -d r -m 0 -C '9F 00' -v -c 2 > >> > > > Binary output of 2 bytes > >> > > > 2 command bytes and 2 data bytes read from SPI device > >> > > > | 0 1 2 3 4 5 6 7 8 9 A B C D E F | > >> > > > | > >> > > > 0 | 00 00 00 00 | .... > >> > > > | > >> > > > > >> > > > I > >> > > > > >> > > > > >> > > > > >> > > > On Sat, Dec 28, 2019 at 10:44 AM Emmanuel Vadot < > >> manu@bidouilliste.com> > >> > > > wrote: > >> > > > > >> > > > > On Wed, 25 Dec 2019 19:12:28 -0500 > >> > > > > Gary Otten wrote: > >> > > > > > >> > > > > > Thanks, I have created the following overlay and tried a > >> variety of > >> > > > > other > >> > > > > > things but I haven't been able to get spigen0.0 to appear in > >> /dev. > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > > /* $FreeBSD$ */ > >> > > > > > /dts-v1/; > >> > > > > > /plugin/; > >> > > > > > > >> > > > > > / { > >> > > > > > compatible = "allwinner,sun50i-a64"; > >> > > > > > }; > >> > > > > > > >> > > > > > &{/soc/spi@1c68000} { > >> > > > > > > >> > > > > > status = "okay"; > >> > > > > > > >> > > > > > spigen0: spigen0 { > >> > > > > > compatible = "freebsd,spigen"; > >> > > > > > reg = <0>; > >> > > > > > spi-max-frequency = <500000>; > >> > > > > > status = "okay"; > >> > > > > > }; > >> > > > > > > >> > > > > > }; > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > > Some diagnostics > >> > > > > > > >> > > > > > ------------------------------------------------------- > >> > > > > > On Boot > >> > > > > > > >> > > > > > Loading DTB overlays: 'sun50i-a64-spi-spidev' > >> > > > > > /boot/dtb/overlays/sun50i-a64-spi-spidev.dtbo size=0x15c > >> > > > > > applying DTB overlay > >> '/boot/dtb/overlays/sun50i-a64-spi-spidev.dtbo' > >> > > > > > .. > >> > > > > > .... > >> > > > > > ..... > >> > > > > > > >> > > > > > Autoloading module: aw_spi.ko > >> > > > > > aw_spi0: mem 0x1c68000-0x1c68fff irq 29 on > >> simplebus0 > >> > > > > > spibus0: on aw_spi0 > >> > > > > > spibus0: at cs 0 mode 0 > >> > > > > > > >> > > > > > > >> > > > > > ------------------------------------------------------- > >> > > > > > root@:/boot/dtb/overlays # kldstat > >> > > > > > Id Refs Address Size Name > >> > > > > > 1 5 0xffff000000000000 144dda8 kernel > >> > > > > > 2 1 0xffff000054c00000 41000 aw_spi.ko > >> > > > > > > >> > > > > > ------------------------------------------------------- > >> > > > > > root@:/boot/dtb/overlays # devinfo > >> > > > > > .. > >> > > > > > ... > >> > > > > > aw_spi0 > >> > > > > > spibus0 > >> > > > > > > >> > > > > > ------------------------------------------------------- > >> > > > > > root@:/boot/dtb/overlays # devinfo > >> > > > > > > >> > > > > > .... > >> > > > > > ...... > >> > > > > > Node 0x2f60: spi@1c68000 > >> > > > > > Node 0x309c: spigen0 > >> > > > > > _______________________________________________ > >> > > > > > freebsd-arm@freebsd.org mailing list > >> > > > > > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > >> > > > > > To unsubscribe, send any mail to " > >> > > freebsd-arm-unsubscribe@freebsd.org" > >> > > > > > >> > > > > Hi Gary, > >> > > > > > >> > > > > You overlay worked for me on the pine64-lts. Here is what I did : > >> > > > > - Use https://github.com/evadot/freebsd/commits/aw_spigen > >> > > > > - aw_spi is autoloaded via devmatch > >> > > > > - kldload spigen (it's not in GENERIC for arm64, maybe we should > >> add > >> > > it > >> > > > > or do some devmatch magic) > >> > > > > - root@pine64-lts:~ # spi -i > >> > > > > Device name: /dev/spigen0.0 > >> > > > > Device mode: 0 > >> > > > > Device speed: 500000 > >> > > > > root@pine64-lts:~ # spi -d r -m 0 -C '9F 00' -v -c 2 > >> > > > > Binary output of 2 bytes > >> > > > > 2 command bytes and 2 data bytes read from SPI device > >> > > > > | 0 1 2 3 4 5 6 7 8 9 A B C D E F > >> > > > > | | 0 | 00 ef 40 18 > >> > > | > >> > > > > ..@. | > >> > > > > > >> > > > > Maybe you just forgot to load spigen ? > >> > > > > > >> > > > > -- > >> > > > > Emmanuel Vadot > >> > > > > > >> > > > >> > > > >> > > -- > >> > > Emmanuel Vadot > >> > > > >> > >> > >> -- > >> Emmanuel Vadot > >> > > -- Emmanuel Vadot From owner-freebsd-arm@freebsd.org Thu Jan 16 20:37:09 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 5CF991F5261 for ; Thu, 16 Jan 2020 20:37:09 +0000 (UTC) (envelope-from freebsdnewbie@freenet.de) Received: from mout3.freenet.de (mout3.freenet.de [195.4.92.93]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (Client CN "*.freenet.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47zGFw4Bdtz4Yc5 for ; Thu, 16 Jan 2020 20:37:08 +0000 (UTC) (envelope-from freebsdnewbie@freenet.de) Received: from [195.4.92.164] (helo=mjail1.freenet.de) by mout3.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (port 25) (Exim 4.92 #3) id 1isBt0-0003ey-Uq; Thu, 16 Jan 2020 21:37:02 +0100 Received: from [::1] (port=33142 helo=mjail1.freenet.de) by mjail1.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (Exim 4.92 #3) id 1isBt0-0007D7-U3; Thu, 16 Jan 2020 21:37:02 +0100 Received: from sub8.freenet.de ([195.4.92.127]:57168) by mjail1.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (Exim 4.92 #3) id 1isBqG-0005oH-Qb; Thu, 16 Jan 2020 21:34:12 +0100 Received: from p4fd9f0d9.dip0.t-ipconnect.de ([79.217.240.217]:37451 helo=freebsd-t450.fritz.box) by sub8.freenet.de with esmtpsa (ID freebsdnewbie@freenet.de) (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256) (port 465) (Exim 4.92 #3) id 1isBqG-0001zc-Lj; Thu, 16 Jan 2020 21:34:12 +0100 Date: Thu, 16 Jan 2020 21:34:11 +0100 From: Manuel =?ISO-8859-1?Q?St=FChn?= To: Hans Bentum Cc: freebsd-arm@freebsd.org Subject: Re: How to get pin to mode 6 on beagle bone black Message-Id: <20200116213411.ba213b01885d2108c9ace7a5@freenet.de> In-Reply-To: References: <20200115220647.1958e8639dc718e714775fed@freenet.de> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originated-At: 79.217.240.217!37451 X-Rspamd-Queue-Id: 47zGFw4Bdtz4Yc5 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsdnewbie@freenet.de designates 195.4.92.93 as permitted sender) smtp.mailfrom=freebsdnewbie@freenet.de X-Spamd-Result: default: False [-1.79 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:195.4.92.0/23]; FREEMAIL_FROM(0.00)[freenet.de]; RWL_MAILSPIKE_GOOD(0.00)[93.92.4.195.rep.mailspike.net : 127.0.0.18]; MV_CASE(0.50)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[freenet.de]; ASN(0.00)[asn:5430, ipnet:195.4.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[217.240.217.79.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (-0.90), ipnet: 195.4.0.0/16(-0.55), asn: 5430(-0.28), country: DE(-0.02)]; DMARC_NA(0.00)[freenet.de]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[93.92.4.195.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(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: Thu, 16 Jan 2020 20:37:09 -0000 Hello Hans, On Thu, 16 Jan 2020 16:05:53 +0100 Hans Bentum wrote: > > > > Hello Manuel, > > > > I discovered this tool: https://github.com/nmingotti/pinfun > > > > As you can see pin 8_16 has mode 7 (should be 6). So something must give > > it mode 7. The overlays seems to be loaded. > > I think the egpio.dtso is not applied, because all of its entries are missing in the devicetree-dump of yours. It seems that only am335x-boneblack-pruss.dtbo was applied correctly. You could try to add your changed directly to the original devicetree file (sys/gnu/dts/arm/am335x-bone-common.dtsi) without using overlays at all to workaround some overlay trouble. Additionally you could have an closer look at the early boot. loader(8) prints also some information during devicetree loading and applying of overlays. Those messages are not visible via dmesg, they can only be seen on the serial console during boot. Best Regards, -- Manuel From owner-freebsd-arm@freebsd.org Fri Jan 17 10:42:05 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 C6A2822A58B for ; Fri, 17 Jan 2020 10:42:05 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vtr.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47zd0r0g3Vz4M4J for ; Fri, 17 Jan 2020 10:42:03 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) by vtr.rulingia.com (8.15.2/8.15.2) with ESMTPS id 00HAflCH019956 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 17 Jan 2020 21:41:53 +1100 (AEDT) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id 00HAfglR043103 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 17 Jan 2020 21:41:42 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id 00HAfgB5043102 for freebsd-arm@freebsd.org; Fri, 17 Jan 2020 21:41:42 +1100 (AEDT) (envelope-from peter) Date: Fri, 17 Jan 2020 21:41:42 +1100 From: Peter Jeremy To: freebsd-arm@freebsd.org Subject: SATA on BananaPi M1 Message-ID: <20200117104142.GM25924@server.rulingia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YrlhzR9YrZtruaFS" Content-Disposition: inline X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47zd0r0g3Vz4M4J X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of peter@rulingia.com designates 2001:19f0:5801:ebe:5400:1ff:fe53:30fd as permitted sender) smtp.mailfrom=peter@rulingia.com X-Spamd-Result: default: False [-7.67 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[rulingia.com]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5800::/38, country:US]; RCVD_TLS_ALL(0.00)[]; IP_SCORE(-3.27)[ip: (-9.73), ipnet: 2001:19f0:5800::/38(-4.86), asn: 20473(-1.70), country: US(-0.05)] 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, 17 Jan 2020 10:42:05 -0000 --YrlhzR9YrZtruaFS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Is anyone using the SATA interface on a BPi M1 with FreeBSD? I'm having problems getting the SATA PHY to communicate with a HDD and would appreciate chatting to someone who has it working. --=20 Peter Jeremy --YrlhzR9YrZtruaFS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAl4hj19fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzRR0g//UzSiZCE2lk/vqvY/jqcko6WMv3NN1f5NpCFxRde38VSgtNxiPcBCQfJE fpqHtDL/5xJrYd4l/etimrAUZwNQV9kF8txUZSzJMAQLhWuKsw8hFW/lOechSLjz UBSwNjG4rNGHIKlGovOGseyz95m80RMBtlLYsdiikv2EwbqUUfcG98/ep18GfRlX Zm4/bBEvfWO1pF5YDxXSK94fszGorF/GRiPoV6Y/8Re4ojbEKg+8fY6XWRG1ahX+ AGbn/o++T/5pp9ARB4fMIxzgNSUJEVtxod5YORRLacKa5zzctRvLrMghlBdDFBRt vpNBlcXNAeI/DmvsfEsczz6z1JjgzqvKyZxN6BfnMwjVfUMmw9eiXZZYpOWtGQFm fpfPTbFFR0aUVy+SCJGcvqm7EqiNsHpelKsrwgPglGrq3cRkY2Ko5hqhgaOhjZ8r GQAUYrcsf9j8WsI1/Pku2uFX/In/HxPT0vsPxdlaQDeWHhETqDDs4ntT9FDf6Lwe WO7kzsfkHdxfGJLBgyd2aH99u/fZISVamCdAn/VPJy1htWv66O4niqxSpC2j/t9q AK2Jxkoz6JVEKtuT4LYqbApXMGWirCVE+lqMRLrS0XwiFNvXTGgLRAIy2iHE90K+ QHorXnceVF1flSaQZpVVPlkspKpA4dpByjDVpwryVyd6qqzegjM= =BoD5 -----END PGP SIGNATURE----- --YrlhzR9YrZtruaFS-- From owner-freebsd-arm@freebsd.org Fri Jan 17 16:16:50 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 4170A1F2BD6 for ; Fri, 17 Jan 2020 16:16:50 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47zmR611nyz4g4W for ; Fri, 17 Jan 2020 16:16:50 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 0E12DDB81 for ; Fri, 17 Jan 2020 16:16:50 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f42.google.com with SMTP id u1so10919082qvk.13 for ; Fri, 17 Jan 2020 08:16:50 -0800 (PST) X-Gm-Message-State: APjAAAXlAHLYbucbTR+Nrpcnhp8UzvDXKj+gL7jU0agi7wB6edwUQVQo xdYydgypsJzaH1+W0caCsocDVnTcYrIZMyczZcU= X-Google-Smtp-Source: APXvYqxfAv88XZlt9shvnvrsJN/Olcl20HNg8s1kRBkLfEL9VNfy45H+oW4w3C0RRq0Xxpmi0R8Ah/ztgh6yjlb4pcU= X-Received: by 2002:a05:6214:3e7:: with SMTP id cf7mr8392309qvb.129.1579277809614; Fri, 17 Jan 2020 08:16:49 -0800 (PST) MIME-Version: 1.0 References: <20200117104142.GM25924@server.rulingia.com> In-Reply-To: <20200117104142.GM25924@server.rulingia.com> From: Kyle Evans Date: Fri, 17 Jan 2020 10:16:37 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: SATA on BananaPi M1 To: Peter Jeremy Cc: "freebsd-arm@freebsd.org" Content-Type: text/plain; charset="UTF-8" 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, 17 Jan 2020 16:16:50 -0000 On Fri, Jan 17, 2020 at 4:42 AM Peter Jeremy wrote: > > Is anyone using the SATA interface on a BPi M1 with FreeBSD? I'm > having problems getting the SATA PHY to communicate with a HDD and > would appreciate chatting to someone who has it working. > Hi, We've had reports of it non-working pretty much across the board- I found myself with a rather large unexpected chunk of free time today, so I'm poking at it. Thanks, Kyle Evans From owner-freebsd-arm@freebsd.org Fri Jan 17 23:31:16 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 C1B561FE002 for ; Fri, 17 Jan 2020 23:31:16 +0000 (UTC) (envelope-from jfc@mit.edu) Received: from outgoing-exchange-1.mit.edu (outgoing-exchange-1.mit.edu [18.9.28.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.outgoing-exchange.mit.edu", Issuer "InCommon RSA Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47zy4M65mVz4Fp2 for ; Fri, 17 Jan 2020 23:31:15 +0000 (UTC) (envelope-from jfc@mit.edu) Received: from w92exedge3.exchange.mit.edu (W92EXEDGE3.EXCHANGE.MIT.EDU [18.7.73.15]) by outgoing-exchange-1.mit.edu (8.14.7/8.12.4) with ESMTP id 00HNVU2m018089 for ; Fri, 17 Jan 2020 18:31:46 -0500 Received: from OC11EXPO29.exchange.mit.edu (18.9.4.102) by w92exedge3.exchange.mit.edu (18.7.73.15) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Fri, 17 Jan 2020 18:29:32 -0500 Received: from OC11EXPO29.exchange.mit.edu (18.9.4.102) by oc11expo29.exchange.mit.edu (18.9.4.102) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Fri, 17 Jan 2020 18:31:10 -0500 Received: from OC11EXPO29.exchange.mit.edu ([18.9.4.102]) by oc11expo29.exchange.mit.edu ([18.9.4.102]) with mapi id 15.00.1365.000; Fri, 17 Jan 2020 18:31:10 -0500 From: John F Carr To: "freebsd-arm@freebsd.org" Subject: Mellanox ethernet in Ampere eMAG system Thread-Topic: Mellanox ethernet in Ampere eMAG system Thread-Index: AQHVzY4z+piL7KMeUU+Xo3ruCVXPtw== Date: Fri, 17 Jan 2020 23:31:10 +0000 Message-ID: <8C2F97F8-A504-4521-BF2C-4E86ABFB6F34@exchange.mit.edu> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [108.7.221.50] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Rspamd-Queue-Id: 47zy4M65mVz4Fp2 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jfc@mit.edu designates 18.9.28.15 as permitted sender) smtp.mailfrom=jfc@mit.edu X-Spamd-Result: default: False [-3.46 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_COUNT_FIVE(0.00)[5]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:18.9.28.0/24]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DMARC_NA(0.00)[mit.edu]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-0.96)[ipnet: 18.9.0.0/16(-4.74), asn: 3(-0.01), country: US(-0.05)]; RCVD_IN_DNSWL_MED(-0.20)[15.28.9.18.list.dnswl.org : 127.0.11.2]; TO_DN_EQ_ADDR_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:3, ipnet:18.9.0.0/16, country:US]; RCVD_TLS_LAST(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: Fri, 17 Jan 2020 23:31:16 -0000 I am installing FreeBSD CURRENT on an Ampere eMAG (Lenovo HR330A). The ker= nel can't find a driver for two of the ethernet ports. Linux sees them as = mlx5, and FreeBSD has a driver by that name in sys/dev/mlx5. Is there a fi= le I need to tweak to get a driver bound? pciconf reports none0@pci0:1:0:0: class=3D0x020000 rev=3D0x00 hdr=3D0x00 vendor=3D0x15b3 de= vice=3D0x1015 subvendor=3D0x15b3 subdevice=3D0x0057 vendor =3D 'Mellanox Technologies' device =3D 'MT27710 Family [ConnectX-4 Lx]' class =3D network subclass =3D ethernet none1@pci0:1:0:1: class=3D0x020000 rev=3D0x00 hdr=3D0x00 vendor=3D0x15b3 de= vice=3D0x1015 subvendor=3D0x15b3 subdevice=3D0x0057 vendor =3D 'Mellanox Technologies' device =3D 'MT27710 Family [ConnectX-4 Lx]' class =3D network subclass =3D ethernet dmesg reports pcib1: at device 0.0 on pci0 pci1: on pcib1 pci1: at device 0.0 (no driver attached) pci1: at device 0.1 (no driver attached) From owner-freebsd-arm@freebsd.org Fri Jan 17 23:35:39 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 6F43E1FE20E for ; Fri, 17 Jan 2020 23:35:39 +0000 (UTC) (envelope-from jfc@mit.edu) Received: from outgoing-exchange-5.mit.edu (outgoing-exchange-5.mit.edu [18.9.28.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.outgoing-exchange.mit.edu", Issuer "InCommon RSA Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47zy9Q54jLz4G4P for ; Fri, 17 Jan 2020 23:35:38 +0000 (UTC) (envelope-from jfc@mit.edu) Received: from oc11exedge2.exchange.mit.edu (OC11EXEDGE2.EXCHANGE.MIT.EDU [18.9.3.18]) by outgoing-exchange-5.mit.edu (8.14.7/8.12.4) with ESMTP id 00HNcB61001887 for ; Fri, 17 Jan 2020 18:38:13 -0500 Received: from OC11EXPO29.exchange.mit.edu (18.9.4.102) by oc11exedge2.exchange.mit.edu (18.9.3.18) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Fri, 17 Jan 2020 18:35:34 -0500 Received: from OC11EXPO29.exchange.mit.edu (18.9.4.102) by oc11expo29.exchange.mit.edu (18.9.4.102) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Fri, 17 Jan 2020 18:35:36 -0500 Received: from OC11EXPO29.exchange.mit.edu ([18.9.4.102]) by oc11expo29.exchange.mit.edu ([18.9.4.102]) with mapi id 15.00.1365.000; Fri, 17 Jan 2020 18:35:36 -0500 From: John F Carr To: "freebsd-arm@freebsd.org" Subject: Re: Mellanox ethernet in Ampere eMAG system Thread-Topic: Mellanox ethernet in Ampere eMAG system Thread-Index: AQHVzY4z9ydH/AvfUEqe+YTWADVD8afv1lgA Date: Fri, 17 Jan 2020 23:35:36 +0000 Message-ID: <057A51DA-024A-4B4D-9B99-C9298D446E99@exchange.mit.edu> References: <8C2F97F8-A504-4521-BF2C-4E86ABFB6F34@exchange.mit.edu> In-Reply-To: <8C2F97F8-A504-4521-BF2C-4E86ABFB6F34@exchange.mit.edu> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [108.7.221.50] Content-Type: text/plain; charset="us-ascii" Content-ID: <5AC213E0822E91428E5978B0841EC623@exchange.mit.edu> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Rspamd-Queue-Id: 47zy9Q54jLz4G4P X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jfc@mit.edu designates 18.9.28.59 as permitted sender) smtp.mailfrom=jfc@mit.edu X-Spamd-Result: default: False [-3.46 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_COUNT_FIVE(0.00)[5]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:18.9.28.0/24]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DMARC_NA(0.00)[mit.edu]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-0.96)[ipnet: 18.9.0.0/16(-4.75), asn: 3(-0.01), country: US(-0.05)]; RCVD_IN_DNSWL_MED(-0.20)[59.28.9.18.list.dnswl.org : 127.0.11.2]; TO_DN_EQ_ADDR_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:3, ipnet:18.9.0.0/16, country:US]; RCVD_TLS_LAST(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: Fri, 17 Jan 2020 23:35:39 -0000 On Jan 17, 2020, at 18:31 , John F Carr wrote: >=20 > I am installing FreeBSD CURRENT on an Ampere eMAG (Lenovo HR330A). The k= ernel can't find a driver for two of the ethernet ports. Linux sees them a= s mlx5, and FreeBSD has a driver by that name in sys/dev/mlx5. Is there a = file I need to tweak to get a driver bound? >=20 > pciconf reports >=20 > none0@pci0:1:0:0: class=3D0x020000 rev=3D0x00 hdr=3D0x00 vendor=3D0x15b3 = device=3D0x1015 subvendor=3D0x15b3 subdevice=3D0x0057 > vendor =3D 'Mellanox Technologies' > device =3D 'MT27710 Family [ConnectX-4 Lx]' > class =3D network > subclass =3D ethernet > none1@pci0:1:0:1: class=3D0x020000 rev=3D0x00 hdr=3D0x00 vendor=3D0x15b3 = device=3D0x1015 subvendor=3D0x15b3 subdevice=3D0x0057 > vendor =3D 'Mellanox Technologies' > device =3D 'MT27710 Family [ConnectX-4 Lx]' > class =3D network > subclass =3D ethernet >=20 > dmesg reports >=20 > pcib1: at device 0.0 on pci0 > pci1: on pcib1 > pci1: at device 0.0 (no driver attached) > pci1: at device 0.1 (no driver attached) >=20 Further information. I should have tried this before emailing. kldload m= lx5 generates kernel messages: mlx5_core0: mem 0x14082000000-0x14083ffffff at device 0.0 on pc= i1 mlx5_core0: INFO: mlx5_port_module_event:696:(pid 12): Module 0, status: un= plugged mlx5_core1: mem 0x14080000000-0x14081ffffff at device 0.1 on pc= i1 mlx5_core1: INFO: mlx5_port_module_event:696:(pid 12): Module 1, status: un= plugged but ifconfig does not report any new devices. So why doesn't module mlx5 load automatically? And what are the ifconfig d= evice names? From owner-freebsd-arm@freebsd.org Sat Jan 18 00:58:10 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 1331B1FFCEB for ; Sat, 18 Jan 2020 00:58:10 +0000 (UTC) (envelope-from greg@unrelenting.technology) Received: from out.migadu.com (out.migadu.com [91.121.223.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.migadu.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48000c4hbvz4KZ8 for ; Sat, 18 Jan 2020 00:58:07 +0000 (UTC) (envelope-from greg@unrelenting.technology) Received: (Migadu outbound); Sat, 18 Jan 2020 00:58:06 +0000 Received: from [127.0.0.1] (broadband-37.204-145-186.ip.moscow.rt.ru [37.204.145.186]) by out.migadu.com (Haraka/2.8.16) with ESMTPSA id C4ACD940-2CFB-4E69-9C7D-F110D4E751D9.1 envelope-from (authenticated bits=0) (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 verify=FAIL); Sat, 18 Jan 2020 00:58:05 +0000 Date: Sat, 18 Jan 2020 00:58:03 +0000 (UTC) From: Greg V To: John F Carr Cc: "freebsd-arm@freebsd.org" Message-ID: <12dc327c-064f-4818-addc-31d861cfffdd@localhost> In-Reply-To: <057A51DA-024A-4B4D-9B99-C9298D446E99@exchange.mit.edu> References: <8C2F97F8-A504-4521-BF2C-4E86ABFB6F34@exchange.mit.edu> <057A51DA-024A-4B4D-9B99-C9298D446E99@exchange.mit.edu> Subject: Re: Mellanox ethernet in Ampere eMAG system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Correlation-ID: <12dc327c-064f-4818-addc-31d861cfffdd@localhost> DKIM-Signature: v=1; a=rsa-sha256; bh=gVLWk098AE16vkc4ee9VMp19NsjoENZuFY0PqAGI7VQ=; c=relaxed/simple; d=unrelenting.technology; h=from:subject:date:to; s=default; b=judBgEDh6/uAaUebnK677PN0/PVAuaDrX32yY/5PJ3a7L3JmusqBQDs4lCcnqHqnV11ML0UhX7N7FXkkVVEZZ9xdmmRsk7t6Stf4udke28oNLR1+16y+iMBNLlDq3P0kpxOEhgOcH3nI4DQRVYW42qs+VitdME1hh/ku53b8Utc= X-Rspamd-Queue-Id: 48000c4hbvz4KZ8 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=unrelenting.technology header.s=default header.b=judBgEDh; dmarc=pass (policy=none) header.from=unrelenting.technology; spf=pass (mx1.freebsd.org: domain of greg@unrelenting.technology designates 91.121.223.63 as permitted sender) smtp.mailfrom=greg@unrelenting.technology X-Spamd-Result: default: False [-4.29 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[unrelenting.technology:s=default]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:91.121.223.63]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-1.79)[ip: (-9.79), ipnet: 91.121.0.0/16(-1.23), asn: 16276(2.07), country: FR(0.00)]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[unrelenting.technology:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[63.223.121.91.list.dnswl.org : 127.0.10.0]; DMARC_POLICY_ALLOW(-0.50)[unrelenting.technology,none]; RECEIVED_SPAMHAUS_PBL(0.00)[186.145.204.37.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:16276, ipnet:91.121.0.0/16, country:FR]; MIME_TRACE(0.00)[0:+]; 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: Sat, 18 Jan 2020 00:58:10 -0000 Jan 18, 2020 2:35:50 AM John F Carr : >=20 > On Jan 17, 2020, at 18:31 , John F Carr wrote: >=20 >=20 > >=20 > > I am installing FreeBSD CURRENT on an Ampere eMAG (Lenovo HR330A). The = kernel can't find a driver for two of the ethernet ports. Linux sees them a= s mlx5, and FreeBSD has a driver by that name in sys/dev/mlx5. Is there a f= ile I need to tweak to get a driver bound? > >=20 > >=20 >=20 >=20 >=20 >=20 > Further information. I should have tried this before emailing. kldload ml= x5 generates kernel messages: >=20 >=20 [=E2=80=A6] >=20 > but ifconfig does not report any new devices. >=20 >=20 Well, you didn't load the Ethernet driver. Just load mlx5en, mlx5 is the co= re dependency shared by mlx5en and mlx5ib, you shouldn't need to load it ma= nually. >=20 > So why doesn't module mlx5 load automatically? >=20 >=20 Because no one added pnp info or whatever that's called I guess. >=20 > And what are the ifconfig device names? >=20 >=20 IIRC it's mceN. From owner-freebsd-arm@freebsd.org Sat Jan 18 16:41:50 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 4EF471FAC6F for ; Sat, 18 Jan 2020 16:41:50 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 480NxT1Yvbz47C4 for ; Sat, 18 Jan 2020 16:41:48 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from skull.home.blih.net (lfbn-idf2-1-1164-130.w90-92.abo.wanadoo.fr [90.92.223.130]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 83ea578c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 18 Jan 2020 16:41:46 +0000 (UTC) Date: Sat, 18 Jan 2020 17:41:44 +0100 From: Emmanuel Vadot To: Peter Jeremy Cc: freebsd-arm@freebsd.org Subject: Re: SATA on BananaPi M1 Message-Id: <20200118174144.ad45c9296f7bab8f70f35131@bidouilliste.com> In-Reply-To: <20200117104142.GM25924@server.rulingia.com> References: <20200117104142.GM25924@server.rulingia.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 480NxT1Yvbz47C4 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [0.40 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.46)[-0.465,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.41)[ipnet: 212.83.128.0/19(1.82), asn: 12876(0.24), country: FR(0.00)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; NEURAL_SPAM_LONG(0.75)[0.755,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; 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: Sat, 18 Jan 2020 16:41:50 -0000 Hi Peter, On Fri, 17 Jan 2020 21:41:42 +1100 Peter Jeremy wrote: > Is anyone using the SATA interface on a BPi M1 with FreeBSD? I'm > having problems getting the SATA PHY to communicate with a HDD and > would appreciate chatting to someone who has it working. > > -- > Peter Jeremy I've just test SATA on my A20-Olinuxino and it works if I first tell u-boot to detect drives ("scsi scan"). I have the same behavior as you if I don't. IIRC we always relied on u-boot for SATA, our driver misses some stuff. Maybe u-boot use to scan automatically at one point so nobody though that we missed stuff. Could you test if you have the same behavior ? Thanks. -- Emmanuel Vadot From owner-freebsd-arm@freebsd.org Sat Jan 18 23:13:03 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 403B52345F1 for ; Sat, 18 Jan 2020 23:13:03 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "www.zefox.org", Issuer "www.zefox.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 480Yct17hgz4Xwx for ; Sat, 18 Jan 2020 23:13:01 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.15.2/8.15.2) with ESMTPS id 00IND73j065208 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 18 Jan 2020 15:13:08 -0800 (PST) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id 00IND7p2065207; Sat, 18 Jan 2020 15:13:07 -0800 (PST) (envelope-from fbsd) Date: Sat, 18 Jan 2020 15:13:06 -0800 From: bob prohaska To: freebsd-arm@freebsd.org Subject: r356835 on rpi2 still waiting for CAM Message-ID: <20200118231306.GA65106@www.zefox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Rspamd-Queue-Id: 480Yct17hgz4Xwx X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net X-Spamd-Result: default: False [3.34 / 15.00]; ARC_NA(0.00)[]; WWW_DOT_DOMAIN(0.50)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; IP_SCORE(0.06)[ip: (0.28), ipnet: 50.1.16.0/20(0.14), asn: 7065(-0.04), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zefox.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.38)[0.383,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(1.00)[0.996,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; MID_RHS_WWW(0.50)[]; 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: Sat, 18 Jan 2020 23:13:03 -0000 After updating to r356835 my rpi2 still tends to get stuck at Root mount waiting for: CAM but the duration varies from a few iterations to many tens. As an aside, the machine also exhibits very slow initial reaction to login, taking many seconds to put up a password prompt and about an equal time to put up a shell prompt. On a subsequent attempt to reboot the machine dropped into single user with Unknown error 3; help! On running fsck, it again asked ADD CYLINDER GROUP CHECK-HASH PROTECTION? [yn] for what has to be the 3rd or 4th time. Utimately the machine couldn't find da0, so I rebooted. After one complaint about "bad magic" and another reboot it came up clean, but again with a long "waiting for CAM" session. Do the repeated requests to add cylinder group hash protection suggest bad hardware? Both the microSD card and USB flash drive are getting old, but apart from these startup problems the machine seems to run, buildworld and make ports without errors. Thanks for reading! bob prohaska From owner-freebsd-arm@freebsd.org Sat Jan 18 23:17:33 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 73FCB234A46 for ; Sat, 18 Jan 2020 23:17:33 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vtr.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 480Yk34SZBz4Y16 for ; Sat, 18 Jan 2020 23:17:31 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) by vtr.rulingia.com (8.15.2/8.15.2) with ESMTPS id 00INH8sX058494 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 19 Jan 2020 10:17:14 +1100 (AEDT) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id 00INH1pj076524 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 19 Jan 2020 10:17:02 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id 00INH1WK076523; Sun, 19 Jan 2020 10:17:01 +1100 (AEDT) (envelope-from peter) Date: Sun, 19 Jan 2020 10:17:01 +1100 From: Peter Jeremy To: Emmanuel Vadot Cc: freebsd-arm@freebsd.org Subject: Re: SATA on BananaPi M1 Message-ID: <20200118231701.GA65624@server.rulingia.com> References: <20200117104142.GM25924@server.rulingia.com> <20200118174144.ad45c9296f7bab8f70f35131@bidouilliste.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="J/dobhs11T7y2rNN" Content-Disposition: inline In-Reply-To: <20200118174144.ad45c9296f7bab8f70f35131@bidouilliste.com> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 480Yk34SZBz4Y16 X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of peter@rulingia.com designates 2001:19f0:5801:ebe:5400:1ff:fe53:30fd as permitted sender) smtp.mailfrom=peter@rulingia.com X-Spamd-Result: default: False [-7.68 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[rulingia.com]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5800::/38, country:US]; RCVD_TLS_ALL(0.00)[]; IP_SCORE(-3.28)[ip: (-9.73), ipnet: 2001:19f0:5800::/38(-4.87), asn: 20473(-1.76), country: US(-0.05)] 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, 18 Jan 2020 23:17:33 -0000 --J/dobhs11T7y2rNN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-Jan-18 17:41:44 +0100, Emmanuel Vadot wrote: > I've just test SATA on my A20-Olinuxino and it works if I first tell >u-boot to detect drives ("scsi scan"). I have the same behavior as you >if I don't. =2E. > Could you test if you have the same behavior ? Yes. If I run "scsi scan" then both u-boot and FreeBSD correctly see the disk. Thanks for that suggestion. This suggests that ahci_a10_phy_reset() is missing some magic bits but it also suggests where to look for them. --=20 Peter Jeremy --J/dobhs11T7y2rNN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAl4jkeFfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzTuHA/9GCjfI9F7dx31LPfoIWG7DRlX+zMjRJ8xR0XBRGuER2zuPxTLuDGPBblm UUbgbX9Jcvj1tJ2JArt558NfscLzBT9plpLqy0HEg2cq3vGCNb6r3xk0WnxThPPn FYvyWSfvYMCuZ/kIfbdlDBUO3mid0OUWcc2jhNr/2pltK/VQax0IITjUgPqFg/kj dqMz19sPy17KabMhIoZXVdCLz5e9XuHo1okTAdHJwiYLJWzwBgdh3ywKOAUutj7K 5ijYOgn4cMKDW3VoQIrzYVeSUopkrHdwgIItVi4Ahlc3TrNoPxGmTaR/1gdLj39s 9/n4b1iJMLobuEF5eJarfN5DwlIGMJgB+glrU9IkvHag2YQJHITbg+BdYS8ndMZ8 ipA62oOR9cdS6fLjU5WVFTVGsvIZr6395DoCp74hKm4io5MIGRyWSjrKD8JuqAZa 5UxN5I39WHgtaseVWf9vGgbQdncNBbiXZDNmjXn38pqr4UpZpigFAq0XV/r34Vz6 CreciSjMk3uuDfUQah/1G4Ak5g6SFokaEftFyVC1ucFBDesLx7KlP8Uksdx7b2oI 5nyyWG7qSKKTZUO1K3y+hv2ND0jw44XpM8J5trEdz29hYitDD289lEm5t9Ej73u6 hN5W0u4dipAfPZIIxYp+PvviGMMbVpHH0baaxnjyyIf+8uuGLGc= =ZC58 -----END PGP SIGNATURE----- --J/dobhs11T7y2rNN--