From: bugzilla-daemon@bugzilla.kernel.org
To: linux-usb@vger.kernel.org
Subject: [Bug 210351] Wrong setting baudrate for FTDI chip FT230X
Date: Fri, 08 Jan 2021 11:37:13 +0000 [thread overview]
Message-ID: <bug-210351-208809-IMwW15niPF@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-210351-208809@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=210351
--- Comment #2 from Vladimir (svv75@mail.ru) ---
Hello, Johan.
Unfortunately, I don't have a device at hand right now. But I remember the
lsusb output was showing FT-X type. And under Windows, all three chips I
mentioned work correctly with all prescalers. I contacted FTDI tech support
with this problem. They advised me to have such a patch for ftdi_sio.c and it
solved the problem. Here's the patch:
static int change_speed (struct tty_struct * tty, struct usb_serial_port *
port)
...
index_value = get_ftdi_divisor (tty, port);
value = (u16) index_value;
index = (u16) (index_value >> 16);
if ((priv-> chip_type == FT2232C) || (priv-> chip_type == FT2232H) ||
(priv-> chip_type == FT4232H) || (priv-> chip_type == FT232H)) {
/ * Probably the BM type needs the MSB of the encoded fractional
* divider also moved like for the chips above. Any infos? * /
index = (u16) ((index << 8) | priv-> interface);
}
So, the high bit of the factional part is lost on the FT-X chips. To fix it in
the kernel try:
if ((priv-> chip_type == FT2232C) || (priv-> chip_type == FT2232H) ||
(priv-> chip_type == FT4232H) || (priv-> chip_type == FT232H) ||
(priv-> chip_type == FTX)) {
/ * Probably the BM type needs the MSB of the encoded fractional
* divider also moved like for the chips above. Any infos? * /
index = (u16) ((index << 8) | priv-> interface);
}
But I don't know why the most significant bit of the prescaler is masked by
something. I have no information about the chip configuration registers. It
looks like this is confidential information. But they could provide it to you
as the driver developer.
Vladimir
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2021-01-08 11:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-25 5:14 [Bug 210351] New: Wrong setting baudrate for FTDI chip FT230X bugzilla-daemon
2021-01-08 10:37 ` [Bug 210351] " bugzilla-daemon
2021-01-08 11:37 ` bugzilla-daemon [this message]
2021-01-08 13:30 ` bugzilla-daemon
2021-01-26 14:09 ` bugzilla-daemon
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=bug-210351-208809-IMwW15niPF@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-usb@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).