From: Amitkumar Karwar <akarwar@marvell.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: BlueZ development <linux-bluetooth@vger.kernel.org>,
Nishant Sarmukadam <nishants@marvell.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Cathy Luo <cluo@marvell.com>, Ganapathi Bhat <gbhat@marvell.com>
Subject: RE: [PATCH v2] Bluetooth: hci_uart: Support firmware download for Marvell
Date: Tue, 1 Mar 2016 17:08:38 +0000 [thread overview]
Message-ID: <b7d52fc731a14f28b207ccf4470f6a43@SC-EXCH04.marvell.com> (raw)
In-Reply-To: <273F0F9E-5E5C-4F21-A503-027A83B7F61E@holtmann.org>
[-- Attachment #1: Type: text/plain, Size: 533 bytes --]
Hi Marcel,
> > +
> > + kfree(skb);
> > + BT_INFO("leave dnld_fw\n");
> > +
> > + return ret;
> > +}
>
> I think it would help if you explain on how the firmware download for
> your UART devices work. I have the feeling we need a bit better core
> handling in this case and not end up hacking it in this way.
>
> > +
I have explained our firmware download mechanism in attached text file.
I will shortly send V3 patch which address your review comments. Let me know if you have any suggestions.
Regards,
Amit
[-- Attachment #2: Marvell_UART_FW_download.txt --]
[-- Type: text/plain, Size: 1592 bytes --]
Firmware download works on the feedback mechanism between
driver and the device. For every chunk of firmware downloaded,
the device will send an ACK and append the next length (in bytes)
to be downloaded. Driver will decode this info and download bytes
accordingly.
On power on, the device starts sending below heartbeat sequence:
heartbeat (5 bytes) : |HDR|XX|XX|XX|XX|
HDR 0xA5: Header indicating ACK
If HDR is ACK(0xA5) then rest of the bytes are decoded as below:
|0xA5|L1|L2|CL1|CL2|
L1 : LSB of length of the firmware bytes to be sent from the host
L2 : MSB of length of the firmware bytes to be sent from the host
CL1: Complement of L1
CL2: Complement of L2
Driver will decode the length from above sequence and download
bytes accordingly. Device will acknowledge the same and append
lenth to be downloaded in next transmission.
HDR 0xAA: Header indicating chip id and revision
If HDR is chip info(0xAA) then rest of the bytes are decoded as below:
|0xA5|CHIP_ID|CHIP_REV|CCHIP_ID|CCHIP_REV|
CHIP ID : Id of the chip
CHIP_REV : Chip revision
CCHIP_ID : Complement of chip id
CCHIP_REV: Complement of chip revision
The device will start sending above 0xAA sequence once helper
file gets downloaded. Helper file is needed to make device
work with higher baud rate.
After downloding the helper, driver will change the baudrate
in device and start downloading the firmware. This reduces the
time needed to download the firmware. For each baud rate there
exists different helper files. In the given patch we are
using helper file which enabled firmware download in 3MB speed.
prev parent reply other threads:[~2016-03-01 17:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 12:53 Amitkumar Karwar
2016-02-20 8:07 ` Marcel Holtmann
2016-02-25 14:49 ` Amitkumar Karwar
2016-03-01 17:08 ` Amitkumar Karwar [this message]
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=b7d52fc731a14f28b207ccf4470f6a43@SC-EXCH04.marvell.com \
--to=akarwar@marvell.com \
--cc=cluo@marvell.com \
--cc=gbhat@marvell.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=nishants@marvell.com \
/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®