From nobody Sat Sep 10 05:00:48 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MPgfv6TBCz4cJJS for ; Sat, 10 Sep 2022 05:00:55 +0000 (UTC) (envelope-from peterj@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MPgfv5xG4z44Gm for ; Sat, 10 Sep 2022 05:00:55 +0000 (UTC) (envelope-from peterj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662786055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=scQ5BZ+DkW0+zTBrFcJGvkCiJCS9gagiaCaladAJ+sc=; b=gGjooLmdDn6xkEjY1lUANF1ek0zg9d477pOuZckxxmyrTCRGHxt2qUHZrRtrC/4CF6H/LR brCdP7r7tGyAguY02ivA8Qo7QldSIW1etnnw9Nb1erwint62U+fSW+HOOi9w5HWZPDsQbD Kr7+faa2EHkIyB+ThFVIR564FfGA/DydvcOK2tcBGM7SJLCjH4RF2elYtVv9+NmMxlcKfv 20CiXKz7KC2hwafHbzYz6KAWnMXByOScVRfLg6uFId4KwtX/2/dh1uyjnyARp7rWNSsfm6 up9II5zKHQzNhlEcKsnZqQfOt81RRtqkuY8ejQEEN8+l0/fo3R6uHnwwJ9By7w== Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) (Authenticated sender: peterj) by smtp.freebsd.org (Postfix) with ESMTPSA id 4MPgfv0GDBz1HgV for ; Sat, 10 Sep 2022 05:00:54 +0000 (UTC) (envelope-from peterj@freebsd.org) Date: Sat, 10 Sep 2022 15:00:48 +1000 From: Peter Jeremy To: freebsd-arm@freebsd.org Subject: Pine H64 won't boot with DTB version 5.13 Message-ID: List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qRNmYJpGmYjsY6ts" Content-Disposition: inline X-PGP-Key: http://www.rulingia.com/keys/peter.pgp ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662786055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=scQ5BZ+DkW0+zTBrFcJGvkCiJCS9gagiaCaladAJ+sc=; b=rOfmWFjD48lW0atK5fXO9ED46WDvF6j8AXTv9UkqpPgPaG0ErM+t2O+8/XVbdLzEfEHPAM iGmLiP3/KR4BanjqzG8oiXyAnvXiym7ukqJvuZCsfB565TeK+b2G8F4fT6q1OunWXD7hEr 3opKTALdg+6+kccOHkgkbV+ddBu4+BhNezC19BpmNlr93r19cmruVGhANK0u7Y6J1YhZZg fdWx2qx70HpR4AhmAJSk30gE8F/eeO9+NkY4nTarF2AlENj1QuBIBTweQ1G/ddDd4r5gHg kCJPEHBBkmfg68fv8PvGjdUKAn5Lc+IgEorbTcDaI2tAn6GMaRopPJkKUtSeeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662786055; a=rsa-sha256; cv=none; b=Tn/3sqJ+HPW25cal4Bn32ZlDliOvJTmGvwcj66WWNM1BNWtxFjZftPQ0oQwyGtvWUrLjeh bxxY8nFyiakm6ZYLI4A4hp/CLKsjSpDOiqzvrRXmerjLSMMSTVxoOSdFv8jwc+4ApGlI4r NpfE9um//NuCqC7gLcCeIsCtAixCzispkYHQtBrcHcz0AXQg65qgaAnzfWUCXdDTkiZH2z zGzuuffFXqK30k2WH9U+g4MPH8MgPHkkOaiv+ovfrLHvY3LBRI69Rxr3y2F8sOnmCKnrHc jy5Qdegb6evdJ4U2hBu7sq6z9vnejBvncWUBSRfA9zT/nRYeiatoI8IpV9xxIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --qRNmYJpGmYjsY6ts Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I have updated my Pine H64 to -current and the kernel advises me: WARNING: DTB version is 5.9 while kernel expects 5.13, please update the DT= B in the ESP unfortunately, when I do so, it fails to attach mmc1 to aw_mmc0 (the microSD slot) and therefore there's no root device. The onboard flash mmc0 connected to aw_mmc1 probes normally. I've compared the boot messages and the critical difference seems to be that with the newer DTB, the following device is missing: aw_r_intc_gicp0: mem 0x7021000-0x70213ff irq 48 on simpl= ebus0 Instead, I get: simplebus0: mem 0x7021000-0x70213ff irq 51 c= ompat allwinner,sun50i-h6-r-intc (no driver attached) Looking through the DTS changes the crucial difference is: --- /tmp/zzz/5def4c47d4bd/sys/contrib/device-tree/src/arm64/allwinner/sun50= i-h6.dtsi 2022-09-10 12:49:39.000000000 +1000 +++ /tmp/zzz/src/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h6.dtsi= 2022-09-10 13:24:13.751345000 +1000 =2E.. @@ -927,10 +929,9 @@ }; =20 r_intc: interrupt-controller@7021000 { - compatible =3D "allwinner,sun50i-h6-r-intc", - "allwinner,sun6i-a31-r-intc"; + compatible =3D "allwinner,sun50i-h6-r-intc"; interrupt-controller; - #interrupt-cells =3D <2>; + #interrupt-cells =3D <3>; reg =3D <0x07021000 0x400>; interrupts =3D ; }; The problem is that the FreeBSD interrupt controller drivers (sys/arm/allwinner/aw_nmi.c and sys/arm/allwinner/aw_r_intc.c) only recognize "allwinner,sun6i-a31-r-intc". I tried adding "allwinner,sun6i-a31-r-intc" back in and the resultant DTB works. I'm not sure if the correct fix is to locally patch sun50i-h6.dtsi or fix the interrupt controller drivers. --=20 Peter Jeremy --qRNmYJpGmYjsY6ts Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmMcGflfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzSYSA/8D70JQQFngxOs7501NCyUVuR6w8Tr4E0Ib9l8WqSfTwKOH6X17OZEyBpv +SJOGwKUn6VsEm37IfxvQPe2VmbVMwCa/4dC3p3YNjt/MigQKNy2khveco+y4L2J LDiBwZJnHvF0QWT1ZYES2/esy2cPpLDiIa7V8hYP9qxRdkEVw+noZVIJQ7fb/00c gTFiaELCj1qw7GfHQKEXQjgDqN4N04gfTo1l9u5QnUGBXOS5V3nuP7aMBj6nIpzv 3qQh7PnooWl9QTL+NDuKifB472lBJ0LOoNaMCfJ4ae/G2wNmQu1Feexj387lFh3c yXTpmU1KyvmfoEwIK5px6mFnBzSgdejlVuAkezIWus0CHbtL51xOjl8hyaN+H7f5 HlmxxZvL3Z73Y+G6bMHy92vO9sZLausurC9udeZt7oVoFWMJ/T2j69HWZZdE3FGc niQvPNITXTN5t/FMIfyc5mVIqBXHNDxO0/cMKqbY0OEpfV0sFr5dG4aU0WUTKeFK NwkgKg6tr3Kbyjjtb4JPGKQlv80lBswlBQ+87E+J6lMznRT3bQ5Cc6RcArY4DMvn Duob46O5S3xTZW1ly3ZJttcEyukKK18KmKDI5xwhYfzXPZ5u0fkoPtDU0575cvWI 1kCzqSgJ1wetXZiY693Ex8yX6mhVqD3C2/YVizAx9wXm7T/5DYk= =rtLH -----END PGP SIGNATURE----- --qRNmYJpGmYjsY6ts--