Edward Hill has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43263 )
Change subject: soc/amd/picasso: Remove I2C4 ......................................................................
soc/amd/picasso: Remove I2C4
Remove I2C4 since it is a slave device only and should not be included with the other master devices.
BUG=b:160624619 TEST=EC can communicate with AP mux I2C4 slave
Change-Id: Idaad618e90d6264d881dc66628cf581a856c231d Signed-off-by: Edward Hill ecgh@chromium.org --- M src/soc/amd/picasso/acpi/aoac.asl M src/soc/amd/picasso/acpi/sb_fch.asl M src/soc/amd/picasso/i2c.c M src/soc/amd/picasso/include/soc/iomap.h 4 files changed, 3 insertions(+), 49 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/43263/1
diff --git a/src/soc/amd/picasso/acpi/aoac.asl b/src/soc/amd/picasso/acpi/aoac.asl index f26f85f..727b9bb 100644 --- a/src/soc/amd/picasso/acpi/aoac.asl +++ b/src/soc/amd/picasso/acpi/aoac.asl @@ -139,7 +139,6 @@
AOAC_DEVICE(I2C2, 7, 0) AOAC_DEVICE(I2C3, 8, 0) - AOAC_DEVICE(I2C4, 9, 5) /* I2C4 is powered from the S5 power group. */ AOAC_DEVICE(FUR1, 12, 0) AOAC_DEVICE(FUR2, 16, 0) AOAC_DEVICE(FUR3, 26, 0) diff --git a/src/soc/amd/picasso/acpi/sb_fch.asl b/src/soc/amd/picasso/acpi/sb_fch.asl index 00774fd..7623d9b 100644 --- a/src/soc/amd/picasso/acpi/sb_fch.asl +++ b/src/soc/amd/picasso/acpi/sb_fch.asl @@ -345,52 +345,6 @@ } }
-Device (I2C4) { - Name (_HID, "AMD0010") - Name (_UID, 0x4) - Method (_CRS, 0) { - Local0 = ResourceTemplate() { - Interrupt ( - ResourceConsumer, - Edge, - ActiveHigh, - Exclusive, , , IRQR) - { 0 } - Memory32Fixed (ReadWrite, APU_I2C4_BASE, 0x1000) - } - CreateDWordField (Local0, IRQR._INT, IRQN) - If (PMOD) { - IRQN = II24 - } Else { - IRQN = PI24 - } - If (IRQN == 0x1f) { - Return (ResourceTemplate() { - Memory32Fixed (ReadWrite, APU_I2C4_BASE, 0x1000) - }) - } Else { - Return (Local0) - } - } - - Method (_STA, 0x0, NotSerialized) - { - Return (0x0F) - } - - Name (_PR0, Package () { _SB.AOAC.I2C4 }) - Name (_PR2, Package () { _SB.AOAC.I2C4 }) - Name (_PR3, Package () { _SB.AOAC.I2C4 }) - Method (_PS0, 0, Serialized) { - Printf("I2C4._PS0") - _SB.AOAC.I2C4.TDS = 1 - } - Method (_PS3, 0, Serialized) { - Printf("I2C4._PS3") - _SB.AOAC.I2C4.TDS = 3 - } -} - Device (MISC) { Name (_HID, "AMD0040") diff --git a/src/soc/amd/picasso/i2c.c b/src/soc/amd/picasso/i2c.c index 881278f..098715c 100644 --- a/src/soc/amd/picasso/i2c.c +++ b/src/soc/amd/picasso/i2c.c @@ -84,7 +84,7 @@ /* config is not NULL; if it was, config_of_soc calls die() internally */ config = config_of_soc();
- for (i = I2C_MASTER_START_INDEX; i < ARRAY_SIZE(config->i2c); i++) { + for (i = I2C_MASTER_START_INDEX; i < I2C_MASTER_DEV_COUNT; i++) { const struct dw_i2c_bus_config *cfg = &config->i2c[i];
if (cfg->early_init != is_early_init) diff --git a/src/soc/amd/picasso/include/soc/iomap.h b/src/soc/amd/picasso/include/soc/iomap.h index bc2c964..295aa53 100644 --- a/src/soc/amd/picasso/include/soc/iomap.h +++ b/src/soc/amd/picasso/include/soc/iomap.h @@ -39,7 +39,8 @@ /* I2C parameters for lpc_read_resources */ #define I2C_BASE_ADDRESS APU_I2C2_BASE #define I2C_DEVICE_SIZE 0x00001000 -#define I2C_DEVICE_COUNT 3 +#define I2C_DEVICE_COUNT (I2C_MASTER_DEV_COUNT \ + - I2C_MASTER_START_INDEX)
#define APU_DMAC0_BASE 0xfedc7000 #define APU_DMAC1_BASE 0xfedc8000
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43263 )
Change subject: soc/amd/picasso: Remove I2C4 ......................................................................
Patch Set 1:
Ah, the kernel is powering off the device since it doesn't think it has a purpose.
Can you make this patch just the AOAC changes.
Hello Raul Rangel, Martin Roth, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43263
to look at the new patch set (#2).
Change subject: soc/amd/picasso: Remove I2C4 AOAC ......................................................................
soc/amd/picasso: Remove I2C4 AOAC
Remove I2C4 AOAC since it is a slave device used for USB-C mux control and we don't want the kernel to power it off.
BUG=b:160624619 TEST=EC can communicate with AP mux I2C4 slave
Change-Id: Idaad618e90d6264d881dc66628cf581a856c231d Signed-off-by: Edward Hill ecgh@chromium.org --- M src/soc/amd/picasso/acpi/aoac.asl M src/soc/amd/picasso/acpi/sb_fch.asl M src/soc/amd/picasso/aoac.c 3 files changed, 0 insertions(+), 14 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/43263/2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43263 )
Change subject: soc/amd/picasso: Remove I2C4 AOAC ......................................................................
Patch Set 1:
Patch Set 1:
Ah, the kernel is powering off the device since it doesn't think it has a purpose.
Can you make this patch just the AOAC changes.
Looks like the kernel is also complaining about incorrect IRQ for I2C4:b/160292546. Shouldn't we be dropping the entire I2C4 device from sb_fch.asl?
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43263 )
Change subject: soc/amd/picasso: Remove I2C4 AOAC ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43263/2/src/soc/amd/picasso/aoac.c File src/soc/amd/picasso/aoac.c:
https://review.coreboot.org/c/coreboot/+/43263/2/src/soc/amd/picasso/aoac.c@... PS2, Line 28: FCH_AOAC_DEV_I2C4 We still want to ensure it's powered don't we?
Hello build bot (Jenkins), Raul Rangel, Furquan Shaikh, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43263
to look at the new patch set (#3).
Change subject: soc/amd/picasso: Remove I2C4 ......................................................................
soc/amd/picasso: Remove I2C4
Remove I2C4 since it is a slave device used for USB-C mux control and should not be included with the other master devices.
BUG=b:160624619 b:160292546 TEST=EC can communicate with AP mux I2C4 slave
Change-Id: Idaad618e90d6264d881dc66628cf581a856c231d Signed-off-by: Edward Hill ecgh@chromium.org --- M src/soc/amd/picasso/acpi/aoac.asl M src/soc/amd/picasso/acpi/sb_fch.asl M src/soc/amd/picasso/aoac.c M src/soc/amd/picasso/include/soc/iomap.h 4 files changed, 2 insertions(+), 49 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/43263/3
Edward Hill has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43263 )
Change subject: soc/amd/picasso: Remove I2C4 ......................................................................
Patch Set 3:
(1 comment)
Patch Set 1:
Ah, the kernel is powering off the device since it doesn't think it has a purpose.
Can you make this patch just the AOAC changes.
https://review.coreboot.org/c/coreboot/+/43263/2/src/soc/amd/picasso/aoac.c File src/soc/amd/picasso/aoac.c:
https://review.coreboot.org/c/coreboot/+/43263/2/src/soc/amd/picasso/aoac.c@... PS2, Line 28: FCH_AOAC_DEV_I2C4
We still want to ensure it's powered don't we?
It seems to be powered up: the EC is able to talk to it.
Edward Hill has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43263 )
Change subject: soc/amd/picasso: Remove I2C4 ......................................................................
Patch Set 3:
I went back to dropping the whole I2C4 for b/160292546.
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43263 )
Change subject: soc/amd/picasso: Remove I2C4 ......................................................................
Patch Set 3: Code-Review+2
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43263 )
Change subject: soc/amd/picasso: Remove I2C4 ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43263/3/src/soc/amd/picasso/aoac.c File src/soc/amd/picasso/aoac.c:
https://review.coreboot.org/c/coreboot/+/43263/3/src/soc/amd/picasso/aoac.c@... PS3, Line 28: FCH_AOAC_DEV_I2C4 I would still feel better if this was here. Just to make sure it's always powered.
Hello build bot (Jenkins), Raul Rangel, Martin Roth, Furquan Shaikh, Aaron Durbin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43263
to look at the new patch set (#4).
Change subject: soc/amd/picasso: Remove I2C4 ......................................................................
soc/amd/picasso: Remove I2C4
Remove I2C4 since it is a slave device used for USB-C mux control and should not be included with the other master devices.
BUG=b:160624619 b:160292546 TEST=EC can communicate with AP mux I2C4 slave
Change-Id: Idaad618e90d6264d881dc66628cf581a856c231d Signed-off-by: Edward Hill ecgh@chromium.org --- M src/soc/amd/picasso/acpi/aoac.asl M src/soc/amd/picasso/acpi/sb_fch.asl M src/soc/amd/picasso/include/soc/iomap.h 3 files changed, 2 insertions(+), 48 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/43263/4
Edward Hill has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43263 )
Change subject: soc/amd/picasso: Remove I2C4 ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43263/3/src/soc/amd/picasso/aoac.c File src/soc/amd/picasso/aoac.c:
https://review.coreboot.org/c/coreboot/+/43263/3/src/soc/amd/picasso/aoac.c@... PS3, Line 28: FCH_AOAC_DEV_I2C4
I would still feel better if this was here. Just to make sure it's always powered.
Done
Edward Hill has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43263 )
Change subject: soc/amd/picasso: Remove I2C4 ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43263/2/src/soc/amd/picasso/aoac.c File src/soc/amd/picasso/aoac.c:
https://review.coreboot.org/c/coreboot/+/43263/2/src/soc/amd/picasso/aoac.c@... PS2, Line 28: FCH_AOAC_DEV_I2C4
It seems to be powered up: the EC is able to talk to it.
Done
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43263 )
Change subject: soc/amd/picasso: Remove I2C4 ......................................................................
Patch Set 4: Code-Review+2
Martin Roth has submitted this change. ( https://review.coreboot.org/c/coreboot/+/43263 )
Change subject: soc/amd/picasso: Remove I2C4 ......................................................................
soc/amd/picasso: Remove I2C4
Remove I2C4 since it is a slave device used for USB-C mux control and should not be included with the other master devices.
BUG=b:160624619 b:160292546 TEST=EC can communicate with AP mux I2C4 slave
Change-Id: Idaad618e90d6264d881dc66628cf581a856c231d Signed-off-by: Edward Hill ecgh@chromium.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/43263 Reviewed-by: Raul Rangel rrangel@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/amd/picasso/acpi/aoac.asl M src/soc/amd/picasso/acpi/sb_fch.asl M src/soc/amd/picasso/include/soc/iomap.h 3 files changed, 2 insertions(+), 48 deletions(-)
Approvals: build bot (Jenkins): Verified Raul Rangel: Looks good to me, approved
diff --git a/src/soc/amd/picasso/acpi/aoac.asl b/src/soc/amd/picasso/acpi/aoac.asl index f26f85f..727b9bb 100644 --- a/src/soc/amd/picasso/acpi/aoac.asl +++ b/src/soc/amd/picasso/acpi/aoac.asl @@ -139,7 +139,6 @@
AOAC_DEVICE(I2C2, 7, 0) AOAC_DEVICE(I2C3, 8, 0) - AOAC_DEVICE(I2C4, 9, 5) /* I2C4 is powered from the S5 power group. */ AOAC_DEVICE(FUR1, 12, 0) AOAC_DEVICE(FUR2, 16, 0) AOAC_DEVICE(FUR3, 26, 0) diff --git a/src/soc/amd/picasso/acpi/sb_fch.asl b/src/soc/amd/picasso/acpi/sb_fch.asl index 00774fd..7623d9b 100644 --- a/src/soc/amd/picasso/acpi/sb_fch.asl +++ b/src/soc/amd/picasso/acpi/sb_fch.asl @@ -345,52 +345,6 @@ } }
-Device (I2C4) { - Name (_HID, "AMD0010") - Name (_UID, 0x4) - Method (_CRS, 0) { - Local0 = ResourceTemplate() { - Interrupt ( - ResourceConsumer, - Edge, - ActiveHigh, - Exclusive, , , IRQR) - { 0 } - Memory32Fixed (ReadWrite, APU_I2C4_BASE, 0x1000) - } - CreateDWordField (Local0, IRQR._INT, IRQN) - If (PMOD) { - IRQN = II24 - } Else { - IRQN = PI24 - } - If (IRQN == 0x1f) { - Return (ResourceTemplate() { - Memory32Fixed (ReadWrite, APU_I2C4_BASE, 0x1000) - }) - } Else { - Return (Local0) - } - } - - Method (_STA, 0x0, NotSerialized) - { - Return (0x0F) - } - - Name (_PR0, Package () { _SB.AOAC.I2C4 }) - Name (_PR2, Package () { _SB.AOAC.I2C4 }) - Name (_PR3, Package () { _SB.AOAC.I2C4 }) - Method (_PS0, 0, Serialized) { - Printf("I2C4._PS0") - _SB.AOAC.I2C4.TDS = 1 - } - Method (_PS3, 0, Serialized) { - Printf("I2C4._PS3") - _SB.AOAC.I2C4.TDS = 3 - } -} - Device (MISC) { Name (_HID, "AMD0040") diff --git a/src/soc/amd/picasso/include/soc/iomap.h b/src/soc/amd/picasso/include/soc/iomap.h index bc2c964..295aa53 100644 --- a/src/soc/amd/picasso/include/soc/iomap.h +++ b/src/soc/amd/picasso/include/soc/iomap.h @@ -39,7 +39,8 @@ /* I2C parameters for lpc_read_resources */ #define I2C_BASE_ADDRESS APU_I2C2_BASE #define I2C_DEVICE_SIZE 0x00001000 -#define I2C_DEVICE_COUNT 3 +#define I2C_DEVICE_COUNT (I2C_MASTER_DEV_COUNT \ + - I2C_MASTER_START_INDEX)
#define APU_DMAC0_BASE 0xfedc7000 #define APU_DMAC1_BASE 0xfedc8000