mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: marcel@holtmann.org (Marcel Holtmann)
To: linus-amlogic@lists.infradead.org
Subject: [RFC v2 7/9] bluetooth: btrtl: load the config blob from devicetree when available
Date: Fri, 5 Jan 2018 15:57:53 +0100	[thread overview]
Message-ID: <EC216531-81EC-4EE8-BAC4-C6954C222092@holtmann.org> (raw)
In-Reply-To: <CAL9uMOGkZefjD_JNxjf4yJ0ATFtOG5Cm_XQq1fy0VQDjiMFBmg@mail.gmail.com>

Hi Carlo,

>>> As Marcel suggested we can assume that the information in the DSDT is
>>> correct so that we can get rid of the config blob also for x86
>>> platforms (assuming that the only useful information in the config
>>> blobs is the UART configuration).
>> in my tests I tried to send only the firmware without the config to my
>> RTL8723BS. unfortunately the last firmware chunk (sent to the
>> controller) times out in that case (even if I set a proper baudrate
>> before or if I specify no baudrate at all and keep the serdev at
>> 115200)
> 
> What's in the config blobs besides UART configuration?

is anybody writing a rtlfw.c tool (like nokfw.c) so that we can print out what we actually have in these config files?

> It's odd because reading into hciattach_rtk.c it seems that the config
> file is actually only used by the userspace tools (hciattach) to
> retrieve the UART configuration and nothing else, whereas in the
> kernel driver the config blob is appended to the firmware.

Frankly, I am inclined to not use the config file even for DT based system and just allow specifying the UART settings via normal DT properties like we do for Broadcom and others.

>> have you tested this (= uploading the firmware without the config
>> blob) on your x86 board before?
> 
> No, on the cherry-trail I have I'm using hciattach to upload the
> firmware and AFAICT only the firmware is uploaded and (as written
> before) the config blob is only used to get the UART configuration.
> 
>> so far the following solutions for the config blob were discussed:
>> 1) put the config blob in userspace (/lib/firmware/...) -> not good
>> because it makes the rootfs board-specific
>> 2) auto-generate the config blob -> didn't work for me, last firmware
>> chunk times out (just as if I had no config at all)
>> 3) putting the config blob in DT -> possible but not very nice to read
>> 
>> I had another idea:
>> what if we mix solution 1) and 2)?
>> the idea: load the config blob from userspace (/lib/firmware/...) and
>> update it's settings with the values we got from devicetree-properties
>> / DSDT
> 
> If you are shipping already the config blob in userspace I don't see
> why you would do the update since you have already all the info you
> need.
> I would rather check why (2) didn't work fine. Have you any
> documentation how the config blobs are generated? The code in
> hciattach_rtk.c seems a good starting point.

I would almost bet it needs a HCI commands or some HCI command is embedded in the config blob somewhere that essentially tells the firmware it is done and ready. Hence my ask above, we need to know what is in these config file.

Even settings like crystal timing or some RF pieces or even enabled/disabled features are board specific and should be in DT rather than a config blob on the general purpose filesystem.

Regards

Marcel

  reply	other threads:[~2018-01-05 14:57 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-01 20:42 [RFC v2 0/9] Realtek Bluetooth serdev support (H5 protocol) Martin Blumenstingl
2018-01-01 20:42 ` [RFC v2 1/9] serdev: implement parity configuration Martin Blumenstingl
2018-01-02 11:16   ` Marcel Holtmann
2018-01-02 21:16     ` Martin Blumenstingl
2018-01-02 21:34       ` Martin Blumenstingl
2018-01-03  9:06         ` Johan Hovold
2018-01-03 12:37         ` Marcel Holtmann
2018-01-01 20:42 ` [RFC v2 2/9] dt-bindings: net: bluetooth: add support for Realtek Bluetooth chips Martin Blumenstingl
2018-01-02 11:16   ` Marcel Holtmann
2018-01-02 21:10     ` Martin Blumenstingl
2018-01-03 19:07       ` Rob Herring
2018-01-01 20:42 ` [RFC v2 3/9] Bluetooth: btrtl: add MODULE_FIRMWARE declarations Martin Blumenstingl
2018-01-01 20:42 ` [RFC v2 4/9] Bluetooth: btrtl: split the device initialization into smaller parts Martin Blumenstingl
2018-01-01 20:42 ` [RFC v2 5/9] Bluetooth: btrtl: add support for retrieving the UART settings Martin Blumenstingl
2018-01-01 20:42 ` [RFC v2 6/9] Bluetooth: btrtl: add support for the RTL8723BS and RTL8723DS chips Martin Blumenstingl
2018-01-01 20:42 ` [RFC v2 7/9] bluetooth: btrtl: load the config blob from devicetree when available Martin Blumenstingl
2018-01-02 11:11   ` Marcel Holtmann
2018-01-02 11:15     ` Carlo Caione
2018-01-02 11:19       ` Marcel Holtmann
2018-01-02 11:31         ` Carlo Caione
2018-01-02 11:38           ` Marcel Holtmann
2018-01-02 21:43             ` Martin Blumenstingl
2018-01-02 21:46           ` Martin Blumenstingl
2018-01-02 23:06             ` Carlo Caione
2018-01-03 20:50               ` Martin Blumenstingl
2018-01-04  9:46                 ` Carlo Caione
2018-01-05 14:57                   ` Marcel Holtmann [this message]
2018-01-05 16:15                     ` Marcel Holtmann
2018-01-05 20:44                       ` Marcel Holtmann
2018-01-07 20:07                         ` Martin Blumenstingl
2018-01-09 15:26                           ` Marcel Holtmann
2018-01-01 20:42 ` [RFC v2 8/9] Bluetooth: drop HCI_UART_INIT_PENDING support Martin Blumenstingl
2018-01-02 11:04   ` Marcel Holtmann
2018-01-02 21:06     ` Martin Blumenstingl
2018-01-03 17:14       ` Loic Poulain
2018-01-03 20:30         ` Martin Blumenstingl
2018-01-03 18:38   ` Rob Herring
2018-01-03 20:38     ` Martin Blumenstingl
2018-01-01 20:42 ` [RFC v2 9/9] Bluetooth: hci_h5: add support for Realtek UART Bluetooth modules Martin Blumenstingl
2018-01-02 11:11   ` Marcel Holtmann
2018-01-02 21:27     ` Martin Blumenstingl

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=EC216531-81EC-4EE8-BAC4-C6954C222092@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=linus-amlogic@lists.infradead.org \
    /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®