Mike Banon has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38241 )
Change subject: asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode ......................................................................
asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode
Set up the proper IRQ routing for OHCI/EHCI devices which appear if XHCI controller is disabled (CONFIG_HUDSON_XHCI_ENABLE is not set). Now both "USB 3.0" ports are working fine at OHCI/EHCI "USB 2.0" mode.
Signed-off-by: Mike Banon mikebdp2@gmail.com Change-Id: I50a773eeab890627abc963e0a61f781d1cea3259 --- M src/mainboard/asus/am1i-a/Kconfig M src/mainboard/asus/am1i-a/acpi/routing.asl M src/mainboard/asus/am1i-a/devicetree.cb M src/mainboard/asus/am1i-a/irq_tables.c M src/mainboard/asus/am1i-a/mainboard.c M src/mainboard/asus/am1i-a/mptable.c 6 files changed, 27 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/38241/1
diff --git a/src/mainboard/asus/am1i-a/Kconfig b/src/mainboard/asus/am1i-a/Kconfig index a0dae9f..172d808 100644 --- a/src/mainboard/asus/am1i-a/Kconfig +++ b/src/mainboard/asus/am1i-a/Kconfig @@ -37,7 +37,7 @@
config IRQ_SLOT_COUNT int - default 9 + default 10
config ONBOARD_VGA_IS_PRIMARY bool diff --git a/src/mainboard/asus/am1i-a/acpi/routing.asl b/src/mainboard/asus/am1i-a/acpi/routing.asl index 95881fa..8b21a25 100644 --- a/src/mainboard/asus/am1i-a/acpi/routing.asl +++ b/src/mainboard/asus/am1i-a/acpi/routing.asl @@ -48,8 +48,14 @@ Package(){0x0013FFFF, 0, INTC, 0 }, Package(){0x0013FFFF, 1, INTB, 0 },
- /* Bus 0, Dev 10 Func 0 - USB: XHCI */ + /* Bus 0, Dev 16 Func 0 - USB: OHCI */ + /* Bus 0, Dev 16 Func 2 - USB: EHCI */ + Package(){0x0016FFFF, 0, INTC, 0 }, + Package(){0x0016FFFF, 1, INTB, 0 }, + + /* Bus 0, Dev 10 - USB: XHCI func 0, 1 */ Package(){0x0010FFFF, 0, INTC, 0 }, + Package(){0x0010FFFF, 1, INTB, 0 },
/* Bus 0, Dev 11 - SATA controller */ Package(){0x0011FFFF, 0, INTD, 0 }, @@ -87,8 +93,14 @@ Package(){0x0013FFFF, 0, 0, 18 }, Package(){0x0013FFFF, 1, 0, 17 },
- /* Bus 0, Dev 10, Func 0 - USB: XHCI */ + /* Bus 0, Dev 16 Func 0 - USB: OHCI */ + /* Bus 0, Dev 16 Func 1 - USB: EHCI */ + Package(){0x0016FFFF, 0, 0, 18 }, + Package(){0x0016FFFF, 1, 0, 17 }, + + /* Bus 0, Dev 10 - USB: XHCI func 0, 1 */ Package(){0x0010FFFF, 0, 0, 18 }, + Package(){0x0010FFFF, 1, 0, 17 },
/* Bus 0, Dev 11 - SATA controller */ Package(){0x0011FFFF, 0, 0, 19 }, diff --git a/src/mainboard/asus/am1i-a/devicetree.cb b/src/mainboard/asus/am1i-a/devicetree.cb index 8e44874..2d7265a 100644 --- a/src/mainboard/asus/am1i-a/devicetree.cb +++ b/src/mainboard/asus/am1i-a/devicetree.cb @@ -84,6 +84,8 @@ end end #device pci 14.3 # LPC device pci 14.7 off end # SD - no card reader present + device pci 16.0 on end # OHCI USB + device pci 16.2 on end # EHCI USB end #chip southbridge/amd/agesa/hudson
chip northbridge/amd/agesa/family16kb diff --git a/src/mainboard/asus/am1i-a/irq_tables.c b/src/mainboard/asus/am1i-a/irq_tables.c index c8ccbeb..84110d1 100644 --- a/src/mainboard/asus/am1i-a/irq_tables.c +++ b/src/mainboard/asus/am1i-a/irq_tables.c @@ -26,7 +26,7 @@ 0x439d, /* Device */ 0, /* Miniport */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* u8 rfu[11] */ - 0xa8, /* Checksum (has to be set to some value that + 0x3b, /* Checksum (has to be set to some value that * would give 0 after the sum of all bytes * for this structure (including checksum). */ @@ -39,6 +39,7 @@ {0x00, (0x12 << 3) | 0x0, {{0x03, 0x9cb8}, {0x02, 0x9cb8}, {0x00, 0x0000}, {0x00, 0x0000}}, 0x0, 0x0}, {0x00, (0x13 << 3) | 0x0, {{0x03, 0x9cb8}, {0x02, 0x9cb8}, {0x00, 0x0000}, {0x00, 0x0000}}, 0x0, 0x0}, {0x00, (0x14 << 3) | 0x0, {{0x01, 0x9cb8}, {0x02, 0x9cb8}, {0x03, 0x9cb8}, {0x04, 0x9cb8}}, 0x0, 0x0}, + {0x00, (0x16 << 3) | 0x0, {{0x03, 0x9cb8}, {0x02, 0x9cb8}, {0x00, 0x0000}, {0x00, 0x0000}}, 0x0, 0x0}, {0x01, (0x00 << 3) | 0x0, {{0x01, 0x9cb8}, {0x02, 0x9cb8}, {0x03, 0x9cb8}, {0x04, 0x9cb8}}, 0x0, 0x0}, {0x02, (0x00 << 3) | 0x0, {{0x02, 0x9cb8}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x0000}}, 0x0, 0x0}, } diff --git a/src/mainboard/asus/am1i-a/mainboard.c b/src/mainboard/asus/am1i-a/mainboard.c index bd6d3a3..65fd79a 100644 --- a/src/mainboard/asus/am1i-a/mainboard.c +++ b/src/mainboard/asus/am1i-a/mainboard.c @@ -34,8 +34,8 @@ [0x10] = 0x1F,0x1F,0x1F,0x03,0x1F,0x1F,0x1F,0x1F, /* IMC INT0 - 5 */ [0x20] = 0x1F,0x1F,0x1F,0x1F,0x1F,0x1F, - /* USB Devs 18/19 INTA-B */ - [0x30] = 0x05,0x04,0x05,0x04,0x1F,0x1F, + /* USB Devs 18/19/22 INTA-B */ + [0x30] = 0x05,0x04,0x05,0x04,0x05,0x04,0x1F,0x1F, /* RSVD, SATA */ [0x40] = 0x1F, 0x07 }; @@ -49,8 +49,8 @@ [0x10] = 0x09,0x1F,0x1F,0x10,0x1F,0x1F,0x1F,0x1F, /* IMC INT0 - 5 */ [0x20] = 0x1F,0x1F,0x1F,0x1F,0x1F,0x1F, - /* USB Devs 18/19 INTA-B */ - [0x30] = 0x12,0x11,0x12,0x11,0x1F,0x1F, + /* USB Devs 18/19/22 INTA-B */ + [0x30] = 0x12,0x11,0x12,0x11,0x12,0x11,0x1F,0x1F, /* RSVD, SATA */ [0x40] = 0x1F, 0x13 }; @@ -77,6 +77,8 @@ {EHCI1_DEVFN, {PIRQ_NC, PIRQ_EHCI1, PIRQ_NC, PIRQ_NC}}, /* EHCI1: 12.2 */ {OHCI2_DEVFN, {PIRQ_OHCI2, PIRQ_NC, PIRQ_NC, PIRQ_NC}}, /* OHCI2: 13.0 */ {EHCI2_DEVFN, {PIRQ_NC, PIRQ_EHCI2, PIRQ_NC, PIRQ_NC}}, /* EHCI2: 13.2 */ + {OHCI3_DEVFN, {PIRQ_OHCI3, PIRQ_NC, PIRQ_NC, PIRQ_NC}}, /* OHCI3: 16.0 */ + {EHCI3_DEVFN, {PIRQ_NC, PIRQ_EHCI3, PIRQ_NC, PIRQ_NC}}, /* EHCI3: 16.2 */ {HDA_DEVFN, {PIRQ_HDA, PIRQ_NC, PIRQ_NC, PIRQ_NC}}, /* HDA: 14.2 */ };
diff --git a/src/mainboard/asus/am1i-a/mptable.c b/src/mainboard/asus/am1i-a/mptable.c index 9efcab3..3a6131f 100644 --- a/src/mainboard/asus/am1i-a/mptable.c +++ b/src/mainboard/asus/am1i-a/mptable.c @@ -91,6 +91,8 @@ PCI_INT(0x0, 0x12, 0x1, intr_data_ptr[PIRQ_EHCI1]); PCI_INT(0x0, 0x13, 0x0, intr_data_ptr[PIRQ_OHCI2]); PCI_INT(0x0, 0x13, 0x1, intr_data_ptr[PIRQ_EHCI2]); + PCI_INT(0x0, 0x16, 0x0, intr_data_ptr[PIRQ_OHCI3]); + PCI_INT(0x0, 0x16, 0x1, intr_data_ptr[PIRQ_EHCI3]);
/* Southbridge HD Audio */ PCI_INT(0x0, 0x14, 0x0, intr_data_ptr[PIRQ_HDA]);
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38241 )
Change subject: asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode ......................................................................
Patch Set 1:
(18 comments)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/i... File src/mainboard/asus/am1i-a/irq_tables.c:
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/i... PS1, Line 42: {0x00, (0x16 << 3) | 0x0, {{0x03, 0x9cb8}, {0x02, 0x9cb8}, {0x00, 0x0000}, {0x00, 0x0000}}, 0x0, 0x0}, line over 96 characters
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/i... PS1, Line 42: {0x00, (0x16 << 3) | 0x0, {{0x03, 0x9cb8}, {0x02, 0x9cb8}, {0x00, 0x0000}, {0x00, 0x0000}}, 0x0, 0x0}, space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... File src/mainboard/asus/am1i-a/mainboard.c:
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 38: [0x30] = 0x05,0x04,0x05,0x04,0x05,0x04,0x1F,0x1F, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 38: [0x30] = 0x05,0x04,0x05,0x04,0x05,0x04,0x1F,0x1F, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 38: [0x30] = 0x05,0x04,0x05,0x04,0x05,0x04,0x1F,0x1F, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 38: [0x30] = 0x05,0x04,0x05,0x04,0x05,0x04,0x1F,0x1F, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 38: [0x30] = 0x05,0x04,0x05,0x04,0x05,0x04,0x1F,0x1F, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 38: [0x30] = 0x05,0x04,0x05,0x04,0x05,0x04,0x1F,0x1F, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 38: [0x30] = 0x05,0x04,0x05,0x04,0x05,0x04,0x1F,0x1F, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 53: [0x30] = 0x12,0x11,0x12,0x11,0x12,0x11,0x1F,0x1F, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 53: [0x30] = 0x12,0x11,0x12,0x11,0x12,0x11,0x1F,0x1F, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 53: [0x30] = 0x12,0x11,0x12,0x11,0x12,0x11,0x1F,0x1F, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 53: [0x30] = 0x12,0x11,0x12,0x11,0x12,0x11,0x1F,0x1F, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 53: [0x30] = 0x12,0x11,0x12,0x11,0x12,0x11,0x1F,0x1F, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 53: [0x30] = 0x12,0x11,0x12,0x11,0x12,0x11,0x1F,0x1F, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 53: [0x30] = 0x12,0x11,0x12,0x11,0x12,0x11,0x1F,0x1F, space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 80: {OHCI3_DEVFN, {PIRQ_OHCI3, PIRQ_NC, PIRQ_NC, PIRQ_NC}}, /* OHCI3: 16.0 */ space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/m... PS1, Line 81: {EHCI3_DEVFN, {PIRQ_NC, PIRQ_EHCI3, PIRQ_NC, PIRQ_NC}}, /* EHCI3: 16.2 */ space required after that close brace '}'
Mike Banon has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38241 )
Change subject: asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode ......................................................................
Patch Set 1:
Jenkins warnings are despite the new code is the same style.
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38241 )
Change subject: asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/c/coreboot/+/38241/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/38241/1//COMMIT_MSG@8 PS1, Line 8: So the devices were not enabled at all in the devicetree, weren’t they? Do they have to be, or would they be found automatically?
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/K... File src/mainboard/asus/am1i-a/Kconfig:
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/K... PS1, Line 40: default 10 Why does this need to be increased?
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/a... File src/mainboard/asus/am1i-a/acpi/routing.asl:
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/a... PS1, Line 54: 1 Why 1 and not 2?
Mike Banon has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38241 )
Change subject: asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/c/coreboot/+/38241/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/38241/1//COMMIT_MSG@8 PS1, Line 8:
So the devices were not enabled at all in the devicetree, weren’t they? Do they have to be, or would […]
Just tested, and these 16.0 / 16.2 devices are found automatically even if they aren't mentioned at devicetree. I still added them to devicetree for the information purposes (add info what's situated at 16.0 / 16.2 lines), however this fix works fine even without a devicetree change.
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/K... File src/mainboard/asus/am1i-a/Kconfig:
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/K... PS1, Line 40: default 10
Why does this need to be increased?
IRQ_SLOT_COUNT is an array dimension of a struct at irq_tables.c and I add one new element there.
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/a... File src/mainboard/asus/am1i-a/acpi/routing.asl:
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/a... PS1, Line 54: 1
Why 1 and not 2?
This is identical to the code above for USB at dev 12 and 13.
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38241 )
Change subject: asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode ......................................................................
Patch Set 1:
Does XHCI work with this change too? Have you checked with USB3.0 when XHCI firmware is loaded?
Elisenda has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38241 )
Change subject: asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode ......................................................................
Patch Set 1:
Patch Set 1:
Does XHCI work with this change too? Have you checked with USB3.0 when XHCI firmware is loaded?
I booted with this change applied and CONFIG_HUDSON_XHCI_ENABLE=y and it seems it's working correctly.
cbmem -c | grep XHCI
XHCI init on dev 00:10.0: regs @ 0xf0a68000, 4 ports, 32 slots, 32 byte contexts XHCI extcap 0x1 @ 0xf0a68500 XHCI protocol USB 3.00, 2 ports (offset 1), def 0 XHCI protocol USB 2.00, 2 ports (offset 3), def 18 XHCI extcap 0xa @ 0xf0a68540 XHCI port #4: 0x00200e03, powered, enabled, pls 0, speed 3 [High]
dmesg | grep xHCI
[ 2.878740] xhci_hcd 0000:00:10.0: xHCI Host Controller [ 2.987069] usb usb5: Product: xHCI Host Controller [ 2.987458] xhci_hcd 0000:00:10.0: xHCI Host Controller [ 2.990215] usb usb6: Product: xHCI Host Controller
[ 243.487821] usb 6-2: USB disconnect, device number 12 [ 254.889968] usb 6-2: new SuperSpeed USB device number 13 using xhci_hcd [ 254.922795] usb 6-2: New USB device found, idVendor=13fe, idProduct=5500 [ 254.922802] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 254.922807] usb 6-2: Product: Patriot Memory
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38241 )
Change subject: asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/a... File src/mainboard/asus/am1i-a/acpi/routing.asl:
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/a... PS1, Line 54: 1
This is identical to the code above for USB at dev 12 and 13.
The second field in the package describes the pin number, not the function number of the PCI device it describes the interrupt for.
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38241 )
Change subject: asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode ......................................................................
Patch Set 1:
Patch Set 1:
Patch Set 1:
Does XHCI work with this change too? Have you checked with USB3.0 when XHCI firmware is loaded?
I booted with this change applied and CONFIG_HUDSON_XHCI_ENABLE=y and it seems it's working correctly.
cbmem -c | grep XHCI
XHCI init on dev 00:10.0: regs @ 0xf0a68000, 4 ports, 32 slots, 32 byte contexts XHCI extcap 0x1 @ 0xf0a68500 XHCI protocol USB 3.00, 2 ports (offset 1), def 0 XHCI protocol USB 2.00, 2 ports (offset 3), def 18 XHCI extcap 0xa @ 0xf0a68540 XHCI port #4: 0x00200e03, powered, enabled, pls 0, speed 3 [High]
dmesg | grep xHCI
[ 2.878740] xhci_hcd 0000:00:10.0: xHCI Host Controller [ 2.987069] usb usb5: Product: xHCI Host Controller [ 2.987458] xhci_hcd 0000:00:10.0: xHCI Host Controller [ 2.990215] usb usb6: Product: xHCI Host Controller
[ 243.487821] usb 6-2: USB disconnect, device number 12 [ 254.889968] usb 6-2: new SuperSpeed USB device number 13 using xhci_hcd [ 254.922795] usb 6-2: New USB device found, idVendor=13fe, idProduct=5500 [ 254.922802] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 254.922807] usb 6-2: Product: Patriot Memory
Did you also test an actual device, and run some speed tests? (To find data corruption, it’s good to have a file system with checksumming support (like Btrfs), then you get notified, if data corruption happens.)
Anyway, Mike, please update the commit message accordingly.
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38241 )
Change subject: asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/a... File src/mainboard/asus/am1i-a/acpi/routing.asl:
https://review.coreboot.org/c/coreboot/+/38241/1/src/mainboard/asus/am1i-a/a... PS1, Line 54: 1
The second field in the package describes the pin number, not the function number of the PCI device […]
Done
Hello Elisenda, build bot (Jenkins), Michał Żygowski,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38241
to look at the new patch set (#2).
Change subject: asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode ......................................................................
asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode
Set up the proper IRQ routing for OHCI/EHCI devices which appear if XHCI controller is disabled (CONFIG_HUDSON_XHCI_ENABLE is not set). Now both "USB 3.0" ports are working fine at OHCI/EHCI "USB 2.0" mode. They also work fine if XHCI controller is enabled.
Signed-off-by: Mike Banon mikebdp2@gmail.com Change-Id: I50a773eeab890627abc963e0a61f781d1cea3259 --- M src/mainboard/asus/am1i-a/Kconfig M src/mainboard/asus/am1i-a/acpi/routing.asl M src/mainboard/asus/am1i-a/devicetree.cb M src/mainboard/asus/am1i-a/irq_tables.c M src/mainboard/asus/am1i-a/mainboard.c M src/mainboard/asus/am1i-a/mptable.c 6 files changed, 27 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/38241/2
Mike Banon has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38241 )
Change subject: asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode ......................................................................
Patch Set 2:
Patch Set 1: Anyway, Mike, please update the commit message accordingly.
Done (if I understood correctly how to update).
Nico Huber has submitted this change. ( https://review.coreboot.org/c/coreboot/+/38241 )
Change subject: asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode ......................................................................
asus/am1i-a: fix the blue "USB 3.0" ports for OHCI/EHCI "USB 2.0" mode
Set up the proper IRQ routing for OHCI/EHCI devices which appear if XHCI controller is disabled (CONFIG_HUDSON_XHCI_ENABLE is not set). Now both "USB 3.0" ports are working fine at OHCI/EHCI "USB 2.0" mode. They also work fine if XHCI controller is enabled.
Signed-off-by: Mike Banon mikebdp2@gmail.com Change-Id: I50a773eeab890627abc963e0a61f781d1cea3259 Reviewed-on: https://review.coreboot.org/c/coreboot/+/38241 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Michał Żygowski michal.zygowski@3mdeb.com --- M src/mainboard/asus/am1i-a/Kconfig M src/mainboard/asus/am1i-a/acpi/routing.asl M src/mainboard/asus/am1i-a/devicetree.cb M src/mainboard/asus/am1i-a/irq_tables.c M src/mainboard/asus/am1i-a/mainboard.c M src/mainboard/asus/am1i-a/mptable.c 6 files changed, 27 insertions(+), 8 deletions(-)
Approvals: build bot (Jenkins): Verified Michał Żygowski: Looks good to me, approved
diff --git a/src/mainboard/asus/am1i-a/Kconfig b/src/mainboard/asus/am1i-a/Kconfig index a0dae9f..172d808 100644 --- a/src/mainboard/asus/am1i-a/Kconfig +++ b/src/mainboard/asus/am1i-a/Kconfig @@ -37,7 +37,7 @@
config IRQ_SLOT_COUNT int - default 9 + default 10
config ONBOARD_VGA_IS_PRIMARY bool diff --git a/src/mainboard/asus/am1i-a/acpi/routing.asl b/src/mainboard/asus/am1i-a/acpi/routing.asl index 95881fa..8b21a25 100644 --- a/src/mainboard/asus/am1i-a/acpi/routing.asl +++ b/src/mainboard/asus/am1i-a/acpi/routing.asl @@ -48,8 +48,14 @@ Package(){0x0013FFFF, 0, INTC, 0 }, Package(){0x0013FFFF, 1, INTB, 0 },
- /* Bus 0, Dev 10 Func 0 - USB: XHCI */ + /* Bus 0, Dev 16 Func 0 - USB: OHCI */ + /* Bus 0, Dev 16 Func 2 - USB: EHCI */ + Package(){0x0016FFFF, 0, INTC, 0 }, + Package(){0x0016FFFF, 1, INTB, 0 }, + + /* Bus 0, Dev 10 - USB: XHCI func 0, 1 */ Package(){0x0010FFFF, 0, INTC, 0 }, + Package(){0x0010FFFF, 1, INTB, 0 },
/* Bus 0, Dev 11 - SATA controller */ Package(){0x0011FFFF, 0, INTD, 0 }, @@ -87,8 +93,14 @@ Package(){0x0013FFFF, 0, 0, 18 }, Package(){0x0013FFFF, 1, 0, 17 },
- /* Bus 0, Dev 10, Func 0 - USB: XHCI */ + /* Bus 0, Dev 16 Func 0 - USB: OHCI */ + /* Bus 0, Dev 16 Func 1 - USB: EHCI */ + Package(){0x0016FFFF, 0, 0, 18 }, + Package(){0x0016FFFF, 1, 0, 17 }, + + /* Bus 0, Dev 10 - USB: XHCI func 0, 1 */ Package(){0x0010FFFF, 0, 0, 18 }, + Package(){0x0010FFFF, 1, 0, 17 },
/* Bus 0, Dev 11 - SATA controller */ Package(){0x0011FFFF, 0, 0, 19 }, diff --git a/src/mainboard/asus/am1i-a/devicetree.cb b/src/mainboard/asus/am1i-a/devicetree.cb index 8e44874..2d7265a 100644 --- a/src/mainboard/asus/am1i-a/devicetree.cb +++ b/src/mainboard/asus/am1i-a/devicetree.cb @@ -84,6 +84,8 @@ end end #device pci 14.3 # LPC device pci 14.7 off end # SD - no card reader present + device pci 16.0 on end # OHCI USB + device pci 16.2 on end # EHCI USB end #chip southbridge/amd/agesa/hudson
chip northbridge/amd/agesa/family16kb diff --git a/src/mainboard/asus/am1i-a/irq_tables.c b/src/mainboard/asus/am1i-a/irq_tables.c index c8ccbeb..84110d1 100644 --- a/src/mainboard/asus/am1i-a/irq_tables.c +++ b/src/mainboard/asus/am1i-a/irq_tables.c @@ -26,7 +26,7 @@ 0x439d, /* Device */ 0, /* Miniport */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* u8 rfu[11] */ - 0xa8, /* Checksum (has to be set to some value that + 0x3b, /* Checksum (has to be set to some value that * would give 0 after the sum of all bytes * for this structure (including checksum). */ @@ -39,6 +39,7 @@ {0x00, (0x12 << 3) | 0x0, {{0x03, 0x9cb8}, {0x02, 0x9cb8}, {0x00, 0x0000}, {0x00, 0x0000}}, 0x0, 0x0}, {0x00, (0x13 << 3) | 0x0, {{0x03, 0x9cb8}, {0x02, 0x9cb8}, {0x00, 0x0000}, {0x00, 0x0000}}, 0x0, 0x0}, {0x00, (0x14 << 3) | 0x0, {{0x01, 0x9cb8}, {0x02, 0x9cb8}, {0x03, 0x9cb8}, {0x04, 0x9cb8}}, 0x0, 0x0}, + {0x00, (0x16 << 3) | 0x0, {{0x03, 0x9cb8}, {0x02, 0x9cb8}, {0x00, 0x0000}, {0x00, 0x0000}}, 0x0, 0x0}, {0x01, (0x00 << 3) | 0x0, {{0x01, 0x9cb8}, {0x02, 0x9cb8}, {0x03, 0x9cb8}, {0x04, 0x9cb8}}, 0x0, 0x0}, {0x02, (0x00 << 3) | 0x0, {{0x02, 0x9cb8}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x0000}}, 0x0, 0x0}, } diff --git a/src/mainboard/asus/am1i-a/mainboard.c b/src/mainboard/asus/am1i-a/mainboard.c index ecf4006..f9a12e5 100644 --- a/src/mainboard/asus/am1i-a/mainboard.c +++ b/src/mainboard/asus/am1i-a/mainboard.c @@ -34,8 +34,8 @@ [0x10] = 0x1F,0x1F,0x1F,0x03,0x1F,0x1F,0x1F,0x1F, /* IMC INT0 - 5 */ [0x20] = 0x1F,0x1F,0x1F,0x1F,0x1F,0x1F, - /* USB Devs 18/19 INTA-B */ - [0x30] = 0x05,0x04,0x05,0x04,0x1F,0x1F, + /* USB Devs 18/19/22 INTA-B */ + [0x30] = 0x05,0x04,0x05,0x04,0x05,0x04,0x1F,0x1F, /* RSVD, SATA */ [0x40] = 0x1F, 0x07 }; @@ -49,8 +49,8 @@ [0x10] = 0x09,0x1F,0x1F,0x10,0x1F,0x1F,0x1F,0x1F, /* IMC INT0 - 5 */ [0x20] = 0x1F,0x1F,0x1F,0x1F,0x1F,0x1F, - /* USB Devs 18/19 INTA-B */ - [0x30] = 0x12,0x11,0x12,0x11,0x1F,0x1F, + /* USB Devs 18/19/22 INTA-B */ + [0x30] = 0x12,0x11,0x12,0x11,0x12,0x11,0x1F,0x1F, /* RSVD, SATA */ [0x40] = 0x1F, 0x13 }; @@ -77,6 +77,8 @@ {EHCI1_DEVFN, {PIRQ_NC, PIRQ_EHCI1, PIRQ_NC, PIRQ_NC}}, /* EHCI1: 12.2 */ {OHCI2_DEVFN, {PIRQ_OHCI2, PIRQ_NC, PIRQ_NC, PIRQ_NC}}, /* OHCI2: 13.0 */ {EHCI2_DEVFN, {PIRQ_NC, PIRQ_EHCI2, PIRQ_NC, PIRQ_NC}}, /* EHCI2: 13.2 */ + {OHCI3_DEVFN, {PIRQ_OHCI3, PIRQ_NC, PIRQ_NC, PIRQ_NC}}, /* OHCI3: 16.0 */ + {EHCI3_DEVFN, {PIRQ_NC, PIRQ_EHCI3, PIRQ_NC, PIRQ_NC}}, /* EHCI3: 16.2 */ {HDA_DEVFN, {PIRQ_HDA, PIRQ_NC, PIRQ_NC, PIRQ_NC}}, /* HDA: 14.2 */ };
diff --git a/src/mainboard/asus/am1i-a/mptable.c b/src/mainboard/asus/am1i-a/mptable.c index 9efcab3..3a6131f 100644 --- a/src/mainboard/asus/am1i-a/mptable.c +++ b/src/mainboard/asus/am1i-a/mptable.c @@ -91,6 +91,8 @@ PCI_INT(0x0, 0x12, 0x1, intr_data_ptr[PIRQ_EHCI1]); PCI_INT(0x0, 0x13, 0x0, intr_data_ptr[PIRQ_OHCI2]); PCI_INT(0x0, 0x13, 0x1, intr_data_ptr[PIRQ_EHCI2]); + PCI_INT(0x0, 0x16, 0x0, intr_data_ptr[PIRQ_OHCI3]); + PCI_INT(0x0, 0x16, 0x1, intr_data_ptr[PIRQ_EHCI3]);
/* Southbridge HD Audio */ PCI_INT(0x0, 0x14, 0x0, intr_data_ptr[PIRQ_HDA]);