Maxim Polyakov has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43571 )
Change subject: mb/system76/lemp9/gpio: 2/2 Convert field macros to PAD_CFG ......................................................................
mb/system76/lemp9/gpio: 2/2 Convert field macros to PAD_CFG
Converts bit field macros to target PAD_CFG_*() macros. To do this, the following command was used:
./intelp2m -n -t 1 -file ../../src/mainboard/system76/lemp9/gpio.h
This is part of the patch set "system76/lemp9/gpio: Convert raw DW0/1 regs to macro using intelp2m"
CB: - 1/2 Decode raw register values CB: - 2/2 Convert field macros to PAD_CFG
Change-Id: I0225cff1ecac8c2ba181239e924ff508add94ad6 Signed-off-by: Maxim Polyakov max.senia.poliak@gmail.com --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/gpio.h 2 files changed, 6 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/43571/1
diff --git a/src/mainboard/system76/lemp9/Kconfig b/src/mainboard/system76/lemp9/Kconfig index 0fe5e8d..21b0233 100644 --- a/src/mainboard/system76/lemp9/Kconfig +++ b/src/mainboard/system76/lemp9/Kconfig @@ -17,6 +17,7 @@ select SOC_INTEL_COMETLAKE select SOC_INTEL_COMMON_BLOCK_HDA select SOC_INTEL_COMMON_BLOCK_HDA_VERB + select SOC_INTEL_COMMON_BLOCK_GPIO_LEGACY_MACROS select SPD_READ_BY_WORD select SYSTEM_TYPE_LAPTOP select USE_LEGACY_8254_TIMER # Fix failure to boot GRUB diff --git a/src/mainboard/system76/lemp9/gpio.h b/src/mainboard/system76/lemp9/gpio.h index 4a67927..748a310 100644 --- a/src/mainboard/system76/lemp9/gpio.h +++ b/src/mainboard/system76/lemp9/gpio.h @@ -89,7 +89,7 @@
// GSPI1 // INTP_OUT - _PAD_CFG_STRUCT(GPP_A11, PAD_RESET(PLTRST) | PAD_IRQ_ROUTE(IOAPIC) | PAD_BUF(TX_DISABLE), 0), + PAD_CFG_GPI_APIC(GPP_A11, NONE, PLTRST),
// ISH_GP // PCH_GPP_A12 @@ -140,7 +140,7 @@
// CPU Misc // GPP_B3 - _PAD_CFG_STRUCT(GPP_B3, PAD_RESET(PLTRST) | PAD_IRQ_ROUTE(IOAPIC) | PAD_BUF(TX_DISABLE), 0), + PAD_CFG_GPI_APIC(GPP_B3, NONE, PLTRST), // NC PAD_CFG_NC(GPP_B4),
@@ -280,7 +280,7 @@
// GSPI2 // SWI# - _PAD_CFG_STRUCT(GPP_D9, PAD_RESET(DEEP) | PAD_IRQ_ROUTE(SCI) | PAD_RX_POL(INVERT) | PAD_BUF(TX_DISABLE), 0), + PAD_CFG_GPI_SCI(GPP_D9, NONE, DEEP, LEVEL, INVERT), // NC PAD_CFG_NC(GPP_D10), // BOARD_ID @@ -363,9 +363,9 @@ // HDMI_HPD PAD_CFG_NF(GPP_E14, NONE, DEEP, NF1), // SMI# - _PAD_CFG_STRUCT(GPP_E15, PAD_RESET(DEEP) | PAD_TRIG(EDGE_SINGLE) | PAD_IRQ_ROUTE(SMI) | PAD_RX_POL(INVERT) | PAD_BUF(TX_DISABLE), 0), + PAD_CFG_GPI_ACPI_SMI(GPP_E15, NONE, DEEP, INVERT), // SCI# - _PAD_CFG_STRUCT(GPP_E16, PAD_RESET(PLTRST) | PAD_IRQ_ROUTE(SCI) | PAD_RX_POL(INVERT) | PAD_BUF(TX_DISABLE), 0), + PAD_CFG_GPI_SCI(GPP_E16, NONE, PLTRST, LEVEL, INVERT), // EDP_HPD PAD_CFG_NF(GPP_E17, NONE, DEEP, NF1), // MDP_CTRLCLK
Maxim Polyakov has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/43571 )
Change subject: mb/system76/lemp9/gpio: 2/2 Convert field macros to PAD_CFG ......................................................................
mb/system76/lemp9/gpio: 2/2 Convert field macros to PAD_CFG
Converts bit field macros to target PAD_CFG_*() macros. To do this, the following command was used:
./intelp2m -n -t 1 -file ../../src/mainboard/system76/lemp9/gpio.h
This is part of the patch set "system76/lemp9/gpio: Convert raw DW0/1 regs to macro using intelp2m"
CB:43570 - 1/2 Decode raw register values CB:43571 - 2/2 Convert field macros to PAD_CFG
Change-Id: I0225cff1ecac8c2ba181239e924ff508add94ad6 Signed-off-by: Maxim Polyakov max.senia.poliak@gmail.com --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/gpio.h 2 files changed, 6 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/43571/2
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43571
to look at the new patch set (#3).
Change subject: mb/system76/lemp9/gpio: 2/2 Convert field macros to PAD_CFG ......................................................................
mb/system76/lemp9/gpio: 2/2 Convert field macros to PAD_CFG
Converts bit field macros to target PAD_CFG_*() macros. To do this, the following command was used:
./intelp2m -n -t 1 -file ../../src/mainboard/system76/lemp9/gpio.h
This is part of the patch set "system76/lemp9/gpio: Convert raw DW0/1 regs to macro using intelp2m"
CB:43570 - 1/2 Decode raw register values CB:43571 - 2/2 Convert field macros to PAD_CFG
Change-Id: I0225cff1ecac8c2ba181239e924ff508add94ad6 Signed-off-by: Maxim Polyakov max.senia.poliak@gmail.com --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/gpio.h 2 files changed, 6 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/43571/3
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43571 )
Change subject: mb/system76/lemp9/gpio: 2/2 Convert field macros to PAD_CFG ......................................................................
Patch Set 3:
(2 comments)
I am currently reworking this by checking schematics and board. Can we agree on dropping this one?
https://review.coreboot.org/c/coreboot/+/43571/3/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/gpio.h:
https://review.coreboot.org/c/coreboot/+/43571/3/src/mainboard/system76/lemp... PS3, Line 92: PAD_CFG_GPI_APIC(GPP_A11, NONE, PLTRST), I wonder, how that even passes buildbot... PAD_CFG_GPI_APIC(pad, pull, rst) is legacy (SOC_INTEL_COMMON_BLOCK_GPIO_LEGACY_MACROS) which is not used by CML. This should be PAD_CFG_GPI_APIC_HIGH(pad, pull, rst, trig, inv) instead, shouldn't it?
https://review.coreboot.org/c/coreboot/+/43571/3/src/mainboard/system76/lemp... PS3, Line 143: PAD_CFG_GPI_APIC same as above
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43571 )
Change subject: mb/system76/lemp9/gpio: 2/2 Convert field macros to PAD_CFG ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43571/3/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/gpio.h:
https://review.coreboot.org/c/coreboot/+/43571/3/src/mainboard/system76/lemp... PS3, Line 143: PAD_CFG_GPI_APIC
same as above
btw. I'm not sure if that is right at all... this is the interrupt used for the touchpad, so probably this should be PAD_CFG_GPI_APIC_EDGE_LOW(GPP_B3, NONE, PLTRST) or even PAD_CFG_GPI_IRQ_WAKE(GPP_B3, NONE, PLTRST, LEVEL, INVERT)
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43571 )
Change subject: mb/system76/lemp9/gpio: 2/2 Convert field macros to PAD_CFG ......................................................................
Patch Set 3:
(1 comment)
@Maxim: I am already working on reworking the lemp9/l140cu.
https://review.coreboot.org/c/coreboot/+/43571/3/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/gpio.h:
https://review.coreboot.org/c/coreboot/+/43571/3/src/mainboard/system76/lemp... PS3, Line 143: PAD_CFG_GPI_APIC
btw. I'm not sure if that is right at all... […]
lol I was right.. just checked s76's github repo... Well, this is missing a devtree entry for touchpad anyways, so feel free to drop that change. I can make that part of my lemp9/l140cu rework ;)
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43571 )
Change subject: mb/system76/lemp9/gpio: 2/2 Convert field macros to PAD_CFG ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43571/3/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/gpio.h:
https://review.coreboot.org/c/coreboot/+/43571/3/src/mainboard/system76/lemp... PS3, Line 143: PAD_CFG_GPI_APIC
lol I was right.. just checked s76's github repo... […]
For context: System76 did some fixes for this board downstream [1], but they haven't been upstreamed yet. So, this code is out-of-date and it isn't worth fixing it as-is.
This code got upstreamed through CB:38463 which was submitted on January 27. According to history, there have been several fixes to this mainboard afterwards [2], none of which seem to have been upstreamed yet.
[1]: https://github.com/system76/coreboot [2]: https://github.com/system76/coreboot/commits/system76/src/mainboard/system76...
Maxim Polyakov has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43571 )
Change subject: mb/system76/lemp9/gpio: 2/2 Convert field macros to PAD_CFG ......................................................................
Patch Set 3:
(2 comments)
Patch Set 3:
(2 comments)
I am currently reworking this by checking schematics and board. Can we agree on dropping this one?
yes, sure. no problem
https://review.coreboot.org/c/coreboot/+/43571/3/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/gpio.h:
https://review.coreboot.org/c/coreboot/+/43571/3/src/mainboard/system76/lemp... PS3, Line 92: PAD_CFG_GPI_APIC(GPP_A11, NONE, PLTRST),
I wonder, how that even passes buildbot... […]
I added SOC_INTEL_COMMON_BLOCK_GPIO_LEGACY_MACROS to local Kconfig so it builds. Yes, we can also use PAD_CFG_GPI_APIC_HIGH(pad, pull, rst) here.
https://review.coreboot.org/c/coreboot/+/43571/3/src/mainboard/system76/lemp... PS3, Line 143: PAD_CFG_GPI_APIC
For context: System76 did some fixes for this board downstream [1], but they haven't been upstreamed […]
Ok, understood. Thanks
Maxim Polyakov has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/43571 )
Change subject: mb/system76/lemp9/gpio: 2/2 Convert field macros to PAD_CFG ......................................................................
Abandoned
this code is out-of-date and there is no needed to fix it as-is