From: Hector Martin <marcan@marcan.st>
To: Sven Peter <sven@svenpeter.dev>,
Sasha Finkelstein <fnkl.kernel@gmail.com>,
Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: Alyssa Rosenzweig <alyssa@rosenzweig.io>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
asahi@lists.linux.dev, Henrik Rydberg <rydberg@bitmath.org>,
linux-arm-kernel@lists.infradead.org,
linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 1/4] dt-bindings: input: touchscreen: Add Z2 controller bindings.
Date: Tue, 28 Feb 2023 11:58:28 +0900 [thread overview]
Message-ID: <1874e194-5210-460b-3e8f-0f48962f8a47@marcan.st> (raw)
In-Reply-To: <e6c7eb27-1b60-4894-a623-28ca3bccdea5@app.fastmail.com>
On 24/02/2023 20.08, Sven Peter wrote:
> Hi,
>
>
> On Fri, Feb 24, 2023, at 12:04, Sasha Finkelstein wrote:
>> On Fri, 24 Feb 2023 at 11:55, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>>
>>> What is the motivation for including the firmware name in the device
>>> tree rather than constructing it in the driver like what is done for
>>> the broadcom wireless?
>> There is no way to identify the device subtype before the firmware is
>> uploaded, and so i need some way of figuring out which firmware to use.
>
> Some Broadcom bluetooth boards use the compatible of the root node (see
> btbcm_get_board_name in drivers/bluetooth/btbcm.c) which would be "apple,jXXX"
> for Apple Silicon. I believe the Broadcom WiFi driver has similar logic as well
> which marcan had to extend to instead of "brcm,board-type" because different
> WiFi boards can me matched to different Apple Silicon boards. I don't think
> that's the case for this touchscreen though.
The reason why the brcmfmac stuff needs to construct the firmware name
itself is that parts of it come from the OTP contents, so there is no
way to know from the bootloader what the right firmware is.
That is not the case here, so it makes perfect sense to specify the
firmware with `firmware-name` (which is a standard DT property).
As for the layout, both bare names and paths are in common use:
qcom/sm8450-qrd.dts: firmware-name = "qcom/sm8450/slpi.mbn";
ti/k3-am64-main.dtsi: firmware-name = "am64-main-r5f0_0-fw";
... but the bare names in particular, judging by some Google searches,
are *actually* mapped to bare files in /lib/firmware anyway. So the
firmware-name property contains the firmware path in the linux-firmware
standard hierarchy, in every case.
I already did the same thing for the touchpad on M2s (which requires
analogous Z2 firmware passed to it, just in a different format):
dts/apple/t8112-j413.dts: firmware-name = "apple/tpmtfw-j413.bin";
Why is having a directory a problem for OpenBSD? Regardless of how
firmware is handled behind the scenes, it seems logical to organize it
by vendor somehow. It seems to me that gratuitously diverging from the
standard firmware hierarchy is only going to cause trouble for OpenBSD.
Obviously it's fine to store it somewhere other than /lib/firmware or
use a completely unrelated mechanism other than files, but why does the
*organization* of the firmware have to diverge? There can only be one DT
binding, so we need to agree on a way of specifying firmwares that works
cross-OS, and I don't see why "apple/foo.bin" couldn't be made to work
for everyone in some way or another.
- Hector
next prev parent reply other threads:[~2023-02-28 2:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 10:20 [PATCH RFC 0/4] Driver for Apple Z2 touchscreens Sasha Finkelstein via B4 Relay
2023-02-24 10:20 ` [PATCH RFC 1/4] dt-bindings: input: touchscreen: Add Z2 controller bindings Sasha Finkelstein via B4 Relay
2023-02-24 10:55 ` Mark Kettenis
2023-02-24 11:04 ` Sasha Finkelstein
2023-02-24 11:08 ` Sven Peter
2023-02-28 2:58 ` Hector Martin [this message]
2023-02-28 20:53 ` Mark Kettenis
2023-03-01 3:13 ` Hector Martin
2023-02-24 11:03 ` Sven Peter
2023-02-24 11:08 ` Sasha Finkelstein
2023-02-27 22:23 ` Rob Herring
2023-02-27 19:51 ` Rob Herring
2023-02-27 20:06 ` Sasha Finkelstein
2023-02-27 22:14 ` Rob Herring
2023-02-27 22:25 ` Sasha Finkelstein
2023-02-28 3:05 ` Hector Martin
2023-02-24 10:20 ` [PATCH RFC 2/4] input: apple_z2: Add a driver for Apple Z2 touchscreens Sasha Finkelstein via B4 Relay
2023-03-09 3:04 ` Jeff LaBundy
2023-02-24 10:20 ` [PATCH RFC 3/4] arm64: dts: apple: t8103: Add touchbar bindings Sasha Finkelstein via B4 Relay
2023-02-24 10:20 ` [PATCH RFC 4/4] MAINTAINERS: Add entries for Apple Z2 touchscreen driver Sasha Finkelstein via B4 Relay
2023-02-28 2:43 ` [PATCH RFC 0/4] Driver for Apple Z2 touchscreens Hector Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1874e194-5210-460b-3e8f-0f48962f8a47@marcan.st \
--to=marcan@marcan.st \
--cc=alyssa@rosenzweig.io \
--cc=asahi@lists.linux.dev \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=fnkl.kernel@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.kettenis@xs4all.nl \
--cc=robh+dt@kernel.org \
--cc=rydberg@bitmath.org \
--cc=sven@svenpeter.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®