Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #68820

devicetrees overlays support

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Vincent Pelletier <plr.vincent@gmail.com>
Newsgroups linux.debian.kernel
Subject devicetrees overlays support
Date Sun, 13 Dec 2020 09:20:02 +0100
Message-ID <BluLM-4ER-7@gated-at.bofh.it> (permalink)
X-Mailbox-Line From debian-kernel-request@lists.debian.org Sun Dec 13 08:15:09 2020
Old-Return-Path <plr.vincent@gmail.com>
X-Amavis-Spam-Status No, score=-2.099 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FOURLA=0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no autolearn_force=no
X-Policyd-Weight NOT_IN_SBL_XBL_SPAMHAUS=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-pf1-x42e.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -5.5
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=T43IarMj/mtldAiO2gC0F8mB3uKW5qtcEPo/wMscnss=; b=sGhVTyZ/oGjRS4k5UJ+wLWh8jY78Mk04MeUllAhydEscmejI4owmtYw+rgomktO8fu 2FIrI/7UP/1+z8jvpwUxtR8CUt3rg1gp8KtF6cyNRq/nbwatfnMmMls8Z68d+9Es3a+c T6meDdqoI1AkSGXHM8x1oth4ZxSa9+iUO7ZYiYmKG9SoDFYkfsgCAvmkFbte5jlzS/1b S6c8nUE3useUlcPF9hNtaesWeywD0CrPZN4hd4LS0PeXts0pzNUV78ppyUbhfxCpX6T8 3VB9yeDcEXG8YtxREDtRR3+S45EtXnHz72p6Ry3/+LNbJioF5XAr29zu81WpXQu9yrJB dfKA==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=T43IarMj/mtldAiO2gC0F8mB3uKW5qtcEPo/wMscnss=; b=uIgYci0LHmxxhaicSVfJy9eYT7EC++KAdkgKeHmeAFEKnLLdWi887HLH67lE2TQ7dM o0e5qT6bWFu1L3U8kXyS8EWZG9mpqL3BP2sbO3FGZIsG3g8koG8VehnMKPCEVD8XkiWm uY/b5UoO/4VBNi+3Ih5MLCI1LtVnd6sFQjPvMyfczCCeAKkToVs+6KqQ/Ox79aB0L3nG GjYoSE7jDEaeb6AFyU2MUeQ5TYWEa6eivDMS0aWzSsj9TjSMB/l3kyJLyHiLm7wkZKCc mmhs1kXDg3Vkksa+zsfQkjibwBudS5LAGDkJcaRBCruUBSwXXiA/8oLsQckHxzSpiuJI JZbA==
X-Gm-Message-State AOAM532JO6CEvySCPTmYo6VRF4o9RglOBl0MOErWr6lhnC1/PvjyXqi5 KDHZyjwdPVJFMjPFQixTEiVRsyWgwiA=
X-Google-SMTP-Source ABdhPJwiMHoMfgThuSe1VBISCOwYOtu21LgpFHTUCw/QUIcC2T/+95kE0zcFCTHKwObls2PsVO8E2w==
X-Received by 2002:a63:2163:: with SMTP id s35mr19035076pgm.224.1607846248944; Sat, 12 Dec 2020 23:57:28 -0800 (PST)
X-Mailer Claws Mail 3.17.8 (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-Mailing-List <debian-kernel@lists.debian.org> archive/latest/126106
List-ID <debian-kernel.lists.debian.org>
List-URL <https://lists.debian.org/debian-kernel/>
List-Archive https://lists.debian.org/msgid-search/20201213075724.0d843473@gmail.com
Approved robomod@news.nic.it
Lines 47
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Sun, 13 Dec 2020 07:57:24 +0000
X-Original-Message-ID <20201213075724.0d843473@gmail.com>
Xref csiph.com linux.debian.kernel:68820

Show key headers only | View raw


Hello,

(please keep me CC'ed, I'm not subscribed)

I am using the (non-official) Debian port for raspberry pi from
raspi.debian.net , and have a device connected to the SPI bus pins on
the 40-pins extension connector. In my understanding, the proper
approach to interfacing with such device is to write a devicetree
overlay declaring the device.
So I wrote one, but then when I tried to confirm it would apply over
the package-provided dtb (using the fdtoverlay command as a simulation
of what would happen during boot), I realised it would not: it fails
with FDT_ERR_NOTFOUND, which I traced to the absence of any __symbols__
in the base dtb.

Rebuilding the devicetree from source, just adding "-@" to the cmd_dtc
rule in scripts/Makefile.lib, and the overlay could be applied by
fdtoverlay, and worked as expected after a reboot on this new dtb.

Given the widespread use of such devices (SPI or otherwise) in the
raspberry pi ecosystem and the widespread use of overlays to interface
with them, wouldn't it be better to provide devicetrees with
__symbols__ ?

Sadly, the commonly available overlays do not expect a Debian kernel,
so they may not apply cleanly. I did not try any myself, but the
raspberrypi.org kernel do contain symbols and elements not present in
vanilla, so this seems likely to happen. Which means either these would
need to be adapted to vanilla dtb (hopefully Debian will not customise
the vanilla dtb), or the vanilla dtb extended to meet the needs. IMHO,
both are out of Debian responsibility, but I thought I should mention
this family of possible issues.

Another possible issue may be that the produced device tree is
substantially larger than without __symbols__: +40% on the "pi zero
wifi". Which seems huge, but this is in fact an increase of only a bit
above 5kB, which, once put next to a kernel image, seems really not
much.

Would there be a particular reason __symbols__ are not output by the
kernel build command ?
Maybe making it optional if the size increase matters for some very
tightly constrained platforms ?

Regards,
-- 
Vincent Pelletier

Back to linux.debian.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

devicetrees overlays support Vincent Pelletier <plr.vincent@gmail.com> - 2020-12-13 09:20 +0100
  Re: devicetrees overlays support Vincent Pelletier <plr.vincent@gmail.com> - 2020-12-20 03:30 +0100
    Re: devicetrees overlays support Vincent Pelletier <plr.vincent@gmail.com> - 2020-12-20 10:50 +0100
  Re: devicetrees overlays support Vincent Pelletier <plr.vincent@gmail.com> - 2021-01-05 02:20 +0100
    Re: devicetrees overlays support Vincent Pelletier <plr.vincent@gmail.com> - 2021-01-05 14:30 +0100

csiph-web