-
Notifications
You must be signed in to change notification settings - Fork 212
Fintek F81214E driver support #547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gordon-nexthop
wants to merge
1
commit into
sonic-net:master
Choose a base branch
from
nexthop-ai:gordon.fintek_F81214E_driver_support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+93
−1
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
92 changes: 92 additions & 0 deletions
92
patches-sonic/driver-tty-serial-8250-add-support-for-fintek-F81214E.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| From c8f3ac729f827b655e0a239a3967b47c9dfce606 Mon Sep 17 00:00:00 2001 | ||
| From: Ravi Rama <ravindra@nexthop.ai> | ||
| Date: Fri, 13 Mar 2026 14:47:27 -0500 | ||
| Subject: [PATCH] serial: 8250_fintek: Add support for F81214E | ||
|
|
||
| The F81214E is a LPC/eSPI to 2 UART Super I/O chip. | ||
|
|
||
| Functionally, it is the same as the F81216E. The only difference | ||
| is that the F81216E has 4 UART ports, whereas the F81214E has 2 | ||
| UART ports. | ||
|
|
||
| Signed-off-by: Ravi Rama <ravi.rama@nexthop.ai> | ||
| --- | ||
| drivers/tty/serial/8250/8250_fintek.c | 10 +++++++++- | ||
| 1 file changed, 9 insertions(+), 1 deletion(-) | ||
|
|
||
| diff --git a/drivers/tty/serial/8250/8250_fintek.c b/drivers/tty/serial/8250/8250_fintek.c | ||
| index b4461a89b8d0..976c5748905c 100644 | ||
| --- a/drivers/tty/serial/8250/8250_fintek.c | ||
| +++ b/drivers/tty/serial/8250/8250_fintek.c | ||
| @@ -1,6 +1,6 @@ | ||
| // SPDX-License-Identifier: GPL-2.0 | ||
| /* | ||
| - * Probe for F81216A LPC to 4 UART | ||
| + * Probe for F81216A LPC to 4 UART and F81214E LPC/eSPI to 2 UART | ||
| * | ||
| * Copyright (C) 2014-2016 Ricardo Ribalda, Qtechnology A/S | ||
| */ | ||
| @@ -23,6 +23,7 @@ | ||
| #define CHIP_ID_F81216AD 0x1602 | ||
| #define CHIP_ID_F81216E 0x1617 | ||
| #define CHIP_ID_F81216H 0x0501 | ||
| +#define CHIP_ID_F81214E 0x1417 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder why you didn’t put it below |
||
| #define CHIP_ID_F81216 0x0802 | ||
| #define VENDOR_ID1 0x23 | ||
| #define VENDOR_ID1_VAL 0x19 | ||
| @@ -161,6 +162,7 @@ static int fintek_8250_check_id(struct fintek_8250 *pdata) | ||
| case CHIP_ID_F81216AD: | ||
| case CHIP_ID_F81216E: | ||
| case CHIP_ID_F81216H: | ||
| + case CHIP_ID_F81214E: | ||
| case CHIP_ID_F81216: | ||
| break; | ||
| default: | ||
| @@ -185,6 +187,7 @@ static int fintek_8250_get_ldn_range(struct fintek_8250 *pdata, int *min, | ||
| case CHIP_ID_F81216AD: | ||
| case CHIP_ID_F81216E: | ||
| case CHIP_ID_F81216H: | ||
| + case CHIP_ID_F81214E: | ||
| case CHIP_ID_F81216: | ||
| *min = F81216_LDN_LOW; | ||
| *max = F81216_LDN_HIGH; | ||
| @@ -255,6 +258,7 @@ static void fintek_8250_set_irq_mode(struct fintek_8250 *pdata, bool is_level) | ||
| case CHIP_ID_F81216AD: | ||
| case CHIP_ID_F81216E: | ||
| case CHIP_ID_F81216H: | ||
| + case CHIP_ID_F81214E: | ||
| case CHIP_ID_F81216: | ||
| sio_write_mask_reg(pdata, FINTEK_IRQ_MODE, IRQ_SHARE, | ||
| IRQ_SHARE); | ||
| @@ -269,6 +273,7 @@ static void fintek_8250_set_max_fifo(struct fintek_8250 *pdata) | ||
| switch (pdata->pid) { | ||
| case CHIP_ID_F81216E: /* 128Bytes FIFO */ | ||
| case CHIP_ID_F81216H: | ||
| + case CHIP_ID_F81214E: | ||
| case CHIP_ID_F81966: | ||
| case CHIP_ID_F81866: | ||
| sio_write_mask_reg(pdata, FIFO_CTRL, | ||
| @@ -304,6 +309,7 @@ static void fintek_8250_set_termios(struct uart_port *port, | ||
| switch (pdata->pid) { | ||
| case CHIP_ID_F81216E: | ||
| case CHIP_ID_F81216H: | ||
| + case CHIP_ID_F81214E: | ||
| reg = RS485; | ||
| break; | ||
| case CHIP_ID_F81966: | ||
| @@ -354,6 +360,7 @@ static void fintek_8250_set_termios_handler(struct uart_8250_port *uart) | ||
| switch (pdata->pid) { | ||
| case CHIP_ID_F81216E: | ||
| case CHIP_ID_F81216H: | ||
| + case CHIP_ID_F81214E: | ||
| case CHIP_ID_F81966: | ||
| case CHIP_ID_F81866: | ||
| uart->port.set_termios = fintek_8250_set_termios; | ||
| @@ -446,6 +453,7 @@ static void fintek_8250_set_rs485_handler(struct uart_8250_port *uart) | ||
| break; | ||
|
|
||
| case CHIP_ID_F81216E: /* F81216E does not support RS485 delays */ | ||
| + case CHIP_ID_F81214E: /* F81214E does not support RS485 delays */ | ||
| uart->port.rs485_config = fintek_8250_rs485_config; | ||
| uart->port.rs485_supported = fintek_8250_rs485_supported; | ||
| break; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.