Bug 256101

Summary: Add Gemini Lake SIO/LPSS UARTs PCI IDs
Product: Base System Reporter: Daniel Ponte <amigan>
Component: kernAssignee: Konstantin Belousov <kib>
Status: Closed FIXED    
Severity: Affects Some People CC: amigan, markj
Priority: ---    
Version: 13.0-STABLE   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Gemini Lake UART patch none

Description Daniel Ponte 2021-05-23 13:27:49 UTC
Created attachment 225194 [details]
Gemini Lake UART patch

Mostly copied from #255556.

Add support for Gemini Lake LPSS UARTs. For some reason, on this Seeed Odyssey X86J4105, unit numbers start at 2 with this patch:

% dmesg | grep -i uart
uart2: <Intel Gemini Lake SIO/LPSS UART 0> mem 0xa1426000-0xa1426fff,0xa1425000-0xa1425fff irq 4 at device 24.0 on pci0
uart3: <Intel Gemini Lake SIO/LPSS UART 1> mem 0xa1424000-0xa1424fff,0xa1423000-0xa1423fff irq 5 at device 24.1 on pci0
uart4: <Intel Gemini Lake SIO/LPSS UART 2> mem 0xfea10000-0xfea10fff irq 6 at device 24.2 on pci0
uart5: <Intel Gemini Lake SIO/LPSS UART 3> mem 0xa1422000-0xa1422fff,0xa1421000-0xa1421fff irq 7 at device 24.3 on pci0
Comment 1 commit-hook freebsd_committer 2021-05-23 17:47:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=eaf00819bcfa90ab7ac8af324826eb985197d8c8

commit eaf00819bcfa90ab7ac8af324826eb985197d8c8
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-05-23 16:38:54 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-05-23 17:46:32 +0000

    Add support for Gemini Lake LPSS UARTs.

    With this patch:
    % dmesg | grep -i uart
    uart2: <Intel Gemini Lake SIO/LPSS UART 0> mem 0xa1426000-0xa1426fff,0xa1425000-0xa1425fff irq 4 at device 24.0 on pci0
    uart3: <Intel Gemini Lake SIO/LPSS UART 1> mem 0xa1424000-0xa1424fff,0xa1423000-0xa1423fff irq 5 at device 24.1 on pci0
    uart4: <Intel Gemini Lake SIO/LPSS UART 2> mem 0xfea10000-0xfea10fff irq 6 at device 24.2 on pci0
    uart5: <Intel Gemini Lake SIO/LPSS UART 3> mem 0xa1422000-0xa1422fff,0xa1421000-0xa1421fff irq 7 at device 24.3 on pci0

    PR:     256101
    Submitted by:    Daniel Ponte <amigan@gmail.com>
    MFC after:      1 week

 sys/dev/uart/uart_bus_pci.c | 8 ++++++++
 1 file changed, 8 insertions(+)
Comment 2 Daniel Ponte 2021-05-23 23:34:40 UTC
(In reply to Daniel Ponte from comment #0)

Removing the existing PC uart lines from device.hints resolved the unit numbering. It appears that this cannot be used as a comconsole, since it is not a regular 16550 and does not enumerate as a "simple comms" device, according to (8) comconsole_pcidev.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2021-05-26 10:10:28 UTC
^Triage: assign to committer.
Comment 4 commit-hook freebsd_committer 2021-05-30 01:10:47 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=2e170ce65b10e4a06345df561535677413bb723c

commit 2e170ce65b10e4a06345df561535677413bb723c
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-05-23 16:38:54 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-05-30 00:44:45 +0000

    Add support for Gemini Lake LPSS UARTs.

    PR:     256101

    (cherry picked from commit eaf00819bcfa90ab7ac8af324826eb985197d8c8)

 sys/dev/uart/uart_bus_pci.c | 8 ++++++++
 1 file changed, 8 insertions(+)
Comment 5 commit-hook freebsd_committer 2021-05-30 01:11:48 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=5d6806ffd66e1b028f19e5c87fc601566be7906c

commit 5d6806ffd66e1b028f19e5c87fc601566be7906c
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-05-23 16:38:54 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-05-30 01:10:48 +0000

    Add support for Gemini Lake LPSS UARTs.

    PR:     256101

    (cherry picked from commit eaf00819bcfa90ab7ac8af324826eb985197d8c8)

 sys/dev/uart/uart_bus_pci.c | 8 ++++++++
 1 file changed, 8 insertions(+)