Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Aug 2020 16:02:15 +0200 (CEST)
From:      Ronald Klop <ronald-lists@klop.ws>
To:        "freebsd-arm@freebsd.org" <arm@freebsd.org>, Per olof Ljungmark <peo@nethead.se>
Subject:   Re: rpi serial port and GPS hat
Message-ID:  <71719672.12579.1598104935440@localhost>
In-Reply-To: <fdddfdf6-9481-f1eb-1806-327ed5c3eeb5@nethead.se>

next in thread | previous in thread | raw e-mail | index | archive | help
An addition to the notes.


- Make a backup.


=F0=9F=98=89=F0=9F=98=80


Regards,
Ronald.


Van: Per olof Ljungmark <peo@nethead.se>
Datum: 22 augustus 2020 15:20
Aan: "freebsd-arm@freebsd.org" <arm@freebsd.org>
Onderwerp: rpi serial port and GPS hat

>=20
>=20
> A couple of years ago with the help of this list I built a NTP server bas=
ed on a RPI3B and 12-current and an Adafruit GPS hat.
>=20
> Now the SD card in the Pi decided it was time to give up so I thought I'd=
 just replace it and rebuild it based on my notes from that time.
>=20
> So far I have accomplished,
>=20
> Build an image with a PPS kernel and the pps-gpio.dtbo
> Silence the serial console so that the Pi boots with the hat on
>=20
> What remains is to have the NMEA sequences to show up on uart0, currently=
 they are at uart1 as I would like to try gpsd as well.
>=20
> Assuming I need to recompile a .dtb file, which one should I look into? T=
he board is marked "Pi 3 Model B v1.2"
>=20
> Any help appriciated, especially if someone could post the patch needed a=
s my notes are insufficient.
>=20
> Thanks,
>=20
> Per
>=20
> _______________________________________________
> 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"
>=20
>=20
>=20
>=20
From owner-freebsd-arm@freebsd.org  Sat Aug 22 16:38:24 2020
Return-Path: <owner-freebsd-arm@freebsd.org>
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 3E0C23C00FC
 for <freebsd-arm@mailman.nyi.freebsd.org>;
 Sat, 22 Aug 2020 16:38:24 +0000 (UTC)
 (envelope-from jsorocil@gmail.com)
Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com
 [IPv6:2607:f8b0:4864:20::241])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 4BYkbM42Msz4q3h;
 Sat, 22 Aug 2020 16:38:23 +0000 (UTC)
 (envelope-from jsorocil@gmail.com)
Received: by mail-oi1-x241.google.com with SMTP id b9so923004oiy.3;
 Sat, 22 Aug 2020 09:38:23 -0700 (PDT)
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=MoakF5Dt4Tz9BHbYHRI33n6IRRgyvahtKpZ1E3hcQAc=;
 b=jD6bwr4/u/1eJh/wYZeWnwDgfy3Zb79cZZNtuzed+FLSMn4cbNZ/NWK4VQnr9gM/Fq
 FEe4F61Bsz0VXcYpBWzR5NoUrDDQqhoB0lJpRSFrW+TMeB0imQUI8fj7mYaAtd1n6LHo
 5YzT3GCThSfZNGX7RD5MiFh+u9M2I1O1c6znLVQGNCEZfTh9crp0PQxLzYGeAXU2G6SL
 kF31RZ4JdjNcopI5FiqtWjD0pUDE3SCSwn+9euYlUnukUJbLojKVncoeDbAw9h4wDPgj
 nP5JoKkfMxSgTq2QtdKQUL/p7QvRAhagUNtKCrc/RhYy0ofpXtI5PR7XcvAmnmK0R9VO
 gpyQ==
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=MoakF5Dt4Tz9BHbYHRI33n6IRRgyvahtKpZ1E3hcQAc=;
 b=bKLrPwU+SpEdsfZDPyGL3Gd5XtHtLNNjoLi/XQoX31FR6VPsKBnOf+2o2/eyW8kp1A
 YeomTFFxHf+qfZCPisMJHr6rCcLR7lNIlDxsshcdbZ2FALMdsBt4WY2oH7f0myyoIIcf
 j/fD3YPEKIrlrAnIDCZHJN3UQRza1UkAlJtfCdmwO2tCVKbu3O2S1UkNLiLnGuCvsi+n
 HgbuWS4dEYmAoGE5bL323ZS2x1vVvJA8DUtFu5WyX4eqXWWEjXgDAZilDa4RMH83sO+L
 4yoewQFoz/uLyIGQs7gffMF7b8/t1Wx3sUC6TtgjdkLO/u90k2Yq5/zlL0/ZB3IDAyCW
 NLJw==
X-Gm-Message-State: AOAM5311zCDgugX9mv/QiGXFG+XLJfr1DCRyONwmaHWKmZzXF/wR4y/x
 yHxfpYOYGBYqYN9IzGSmII1+pXTUuQw/MqWaO+bJw0q08Rg=
X-Google-Smtp-Source: ABdhPJw4hOkA7jKu7pd9QWDfCtwbInNSIwX9FGO1f0Aafy0RBvD7El7TPIUeuotY+gP/sEMYTxplkpdP45ZxZpT/EXg=
X-Received: by 2002:aca:4088:: with SMTP id n130mr5197706oia.65.1598114302465; 
 Sat, 22 Aug 2020 09:38:22 -0700 (PDT)
MIME-Version: 1.0
References: <CADxA8Sq6TrjDBW0PH_HoywrKDjT=mKxH0F27XYLxDN=d=QHHyw@mail.gmail.com>
 <CADxA8Sr+mkx1GvgabFWOCaN3nURy=LoOH9VM9DduynWbW+o_Mg@mail.gmail.com>
 <6d88bd5659b854d9af73cb9a325c719c3d7d9da9.camel@freebsd.org>
 <CADxA8SpD9qZEL=4GN=opcztjRN3NWSV+3bqxkhvG3fp0WwuHfg@mail.gmail.com>
 <20200821165805.f36090fee5afac8a3ad1d570@bidouilliste.com>
In-Reply-To: <20200821165805.f36090fee5afac8a3ad1d570@bidouilliste.com>
From: Johnny Sorocil <jsorocil@gmail.com>
Date: Sat, 22 Aug 2020 18:37:19 +0200
Message-ID: <CADxA8SobYNoCdRGxbSFvoqgtU-FMSvLX3ekKzye2LY6ev5kqfw@mail.gmail.com>
Subject: Re: Disabling internal RTC ends up in hang
To: Emmanuel Vadot <manu@bidouilliste.com>
Cc: Ian Lepore <ian@freebsd.org>, freebsd-arm@freebsd.org
X-Rspamd-Queue-Id: 4BYkbM42Msz4q3h
X-Spamd-Bar: -
Authentication-Results: mx1.freebsd.org;
 dkim=pass header.d=gmail.com header.s=20161025 header.b=jD6bwr4/;
 dmarc=pass (policy=none) header.from=gmail.com;
 spf=pass (mx1.freebsd.org: domain of jsorocil@gmail.com designates
 2607:f8b0:4864:20::241 as permitted sender) smtp.mailfrom=jsorocil@gmail.com
X-Spamd-Result: default: False [-1.23 / 15.00]; ARC_NA(0.00)[];
 R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025];
 RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[];
 RCPT_COUNT_THREE(0.00)[3];
 R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c];
 FREEMAIL_FROM(0.00)[gmail.com];
 MIME_GOOD(-0.10)[multipart/alternative,text/plain];
 TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[];
 DKIM_TRACE(0.00)[gmail.com:+]; MIME_BASE64_TEXT(0.10)[];
 DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
 RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::241:from];
 NEURAL_HAM_SHORT(-0.33)[-0.327]; 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]; MAILMAN_DEST(0.00)[freebsd-arm];
 DWL_DNSWL_NONE(0.00)[gmail.com:dkim]
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.33
X-BeenThere: freebsd-arm@freebsd.org
X-Mailman-Version: 2.1.33
Precedence: list
List-Id: "Porting FreeBSD to ARM processors." <freebsd-arm.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-arm>,
 <mailto:freebsd-arm-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-arm/>;
List-Post: <mailto:freebsd-arm@freebsd.org>
List-Help: <mailto:freebsd-arm-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-arm>,
 <mailto:freebsd-arm-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 22 Aug 2020 16:38:24 -0000

On Fri, Aug 21, 2020 at 4:58 PM Emmanuel Vadot <manu@bidouilliste.com>
wrote:

> On Fri, 21 Aug 2020 12:24:17 +0200
> Johnny Sorocil <jsorocil@gmail.com> wrote:
>
> > Attempt #3:
> > Booting GENERIC kernel which has builtin patched "aw_rtc":
> >
> > mmc0: No compatible cards found on bus
> > aw_mmc1: Spurious interrupt - no active request, rint: 0x00000004
> >
> > mmc1: <MMC/SD bus> on aw_mmc0
> > Cannot set frequency for clk: mmc0, error: 34
> > aw_mmc0: failed to set frequency to 50000000 Hz: 34
> > uhub2: 1 port with 1 removable, self powered
> > uhub0: 1 port with 1 removable, self powered
> > ugen2.2: <Realtek 802.11n NIC> at usbus2
> > mountroot: waiting for device /dev/ufs/rootfs...
> > Mounting from ufs:/dev/ufs/rootfs failed with error 19.
> >
> > Loader variables:
> >   vfs.root.mountfrom=ufs:/dev/ufs/rootfs
> >   vfs.root.mountfrom.options=rw
> >
> > Manual root filesystem specification:
> >   <fstype>:<device> [options]
> >       Mount <device> using filesystem <fstype>
> >       and with the specified (optional) option list.
> >
> >     eg. ufs:/dev/da0s1a
> >         zfs:zroot/ROOT/default
> >         cd9660:/dev/cd0 ro
> >           (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /)
> >
> >   ?               List valid disk boot devices
> >   .               Yield 1 second (for background tasks)
> >   <empty line>    Abort manual input
> >
> > mountroot> aw_mmc0: controller timeout
> > aw_mmc0: timeout resetting DMA/FIFO
> > aw_mmc0: timeout updating clock
> > aw_mmc0: controller timeout
> > aw_mmc0: timeout resetting DMA/FIFO
> > aw_mmc0: timeout updating clock
> > aw_mmc0: controller timeout
> > aw_mmc0: timeout resetting DMA/FIFO
>
>  That doesn't seems related at all, do you have any other modification ?
>

No, only that patch applied against -CURRENT (git commit
13a3f44675f633f7d8ca5bd736b1ce0e50e7771a from Aug 19).
Cross compiled kernel and world again on my amd64 board, installed it on
microSD card, put it in OrangePi, booted it and the result is same:
FreeBSD is a registered trademark of The FreeBSD Foundation.


FreeBSD 13.0-CURRENT #3 13a3f44675f-c270720(master)-dirty: Sat Aug 22
11:20:09 CEST 2020

    johnny@innovator:/usr/obj/user/build-13.0/usr/src/current/arm.armv7/sys/GENERIC
arm

FreeBSD clang version 11.0.0 (git@github.com:llvm/llvm-project.git
llvmorg-11.0.0-rc1-47-gff47911ddfc)

WARNING: WITNESS option enabled, expect reduced performance.


VT: init without driver.


CPU: ARM Cortex-A7 r0p5 (ECO: 0x00000000)
...
Mounting from ufs:/dev/ufs/rootfs failed with error 19.


...

But after waiting a few seconds, mmcsd0 device appears but system can not
mount rootfs from it:
aw_mmc0: timeout resetting DMA/FIFO








List of GEOM managed disk devices:








mountroot> aw_mmc0: timeout updating clock


aw_mmc0: controller timeout


aw_mmc0: timeout resetting DMA/FIFO


aw_mmc0: timeout updating clock


aw_mmc0: controller timeout


aw_mmc0: timeout resetting DMA/FIFO


aw_mmc0: timeout updating clock
mmc1: CMD7 failed, RESULT: 1
mmcsd0: 64GB <SDHC SC64G 8.0 SN C2EC1965 MFG 09/2019 by 3 SD> at mmc1
50.0MHz/4bit/32768-block
?

List of GEOM managed disk devices:
  mmcsd0

mountroot> ufs:/dev/ufs/rootfs
Trying to mount root from ufs:/dev/ufs/rootfs []...
aw_mmc0: controller timeout
aw_mmc0: timeout resetting DMA/FIFO
aw_mmc0: timeout updating clock
aw_mmc0: controller timeout
aw_mmc0: timeout resetting DMA/FIFO
aw_mmc0: timeout updating clock
aw_mmc0: controller timeout
aw_mmc0: timeout resetting DMA/FIFO
aw_mmc0: timeout updating clock
aw_mmc0: controller timeout
aw_mmc0: timeout resetting DMA/FIFO
aw_mmc0: timeout updating clock
mmc1: CMD7 failed, RESULT: 1
mmc1: Card at relative address 58916 failed to select
aw_mmc0: controller timeout
aw_mmc0: timeout resetting DMA/FIFO
aw_mmc0: timeout updating clock



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?71719672.12579.1598104935440>