Daniel Maslowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36071 )
Change subject: superio: IT8587E (WIP) ......................................................................
superio: IT8587E (WIP)
Change-Id: I1e541daa2b3d48a4f5a0e7b7fa88a2c2f8a1b0c5 Signed-off-by: Daniel Maslowski info@orangecms.org --- A src/superio/ite/it8587e/Kconfig A src/superio/ite/it8587e/Makefile.inc A src/superio/ite/it8587e/it8587e.h A src/superio/ite/it8587e/superio.c 4 files changed, 137 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/36071/1
diff --git a/src/superio/ite/it8587e/Kconfig b/src/superio/ite/it8587e/Kconfig new file mode 100644 index 0000000..438bd3e --- /dev/null +++ b/src/superio/ite/it8587e/Kconfig @@ -0,0 +1,16 @@ +## +## This file is part of the coreboot project. +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; version 2 of the License. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## + +config SUPERIO_ITE_IT8587E + bool + select SUPERIO_ITE_COMMON_PRE_RAM diff --git a/src/superio/ite/it8587e/Makefile.inc b/src/superio/ite/it8587e/Makefile.inc new file mode 100644 index 0000000..dbde0b7 --- /dev/null +++ b/src/superio/ite/it8587e/Makefile.inc @@ -0,0 +1,15 @@ +## +## This file is part of the coreboot project. +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## + +ramstage-$(CONFIG_SUPERIO_ITE_IT8587E) += superio.c diff --git a/src/superio/ite/it8587e/it8587e.h b/src/superio/ite/it8587e/it8587e.h new file mode 100644 index 0000000..eab3527 --- /dev/null +++ b/src/superio/ite/it8587e/it8587e.h @@ -0,0 +1,34 @@ +/* + * This file is part of the coreboot project. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef SUPERIO_ITE_IT8587E_H +#define SUPERIO_ITE_IT8587E_H + +#define IT8528E_SP1 0x01 /* Com1 */ +#define IT8528E_SP2 0x02 /* Com2 */ +#define IT8587E_SWUC 0x04 /* System Wake-Up */ +#define IT8587E_KBCM 0x05 /* PS/2 mouse */ +#define IT8587E_KBCK 0x06 /* PS/2 keyboard */ +#define IT8587E_SMFI 0x0f /* Shared Memory/Flash Interface */ +#define IT8587E_RTCT 0x10 /* RTC-like Timer */ +#define IT8587E_PMC1 0x11 /* Power Management Channel 1 */ +#define IT8587E_PMC2 0x12 /* Power Management Channel 2 */ +#define IT8587E_SSPI 0x13 /* Serial Periphial Interface */ +#define IT8587E_PECI 0x14 /* Platform EC Interface */ +#define IT8587E_PMC3 0x17 /* Power Management Channel 3 */ +#define IT8587E_PMC4 0x18 /* Power Management Channel 4 */ +#define IT8587E_PMC5 0x19 /* Power Management Channel 5 */ + + +#endif /* SUPERIO_ITE_IT8587E_H */ diff --git a/src/superio/ite/it8587e/superio.c b/src/superio/ite/it8587e/superio.c new file mode 100644 index 0000000..cdb97e6 --- /dev/null +++ b/src/superio/ite/it8587e/superio.c @@ -0,0 +1,72 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2006 Uwe Hermann uwe@hermann-uwe.de + * Copyright (C) 2007 Philipp Degler pdegler@rumms.uni-mannheim.de + * Copyright (C) 2017 Gergely Kiss mail.gery@gmail.com + * Copyright (C) 2019 9Elements GmbH patrick.rudolph@9elements.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <device/device.h> +#include <device/pnp.h> +#include <stdlib.h> +#include <superio/conf_mode.h> + +#include "it8587e.h" + +static void it8587e_init(struct device *dev) +{ +} + +static struct device_operations ops = { + .read_resources = pnp_read_resources, + .set_resources = pnp_set_resources, + .enable_resources = pnp_enable_resources, + .enable = pnp_alt_enable, + .init = it8587e_init, + .ops_pnp_mode = &pnp_conf_mode_870155_aa, +}; + +static struct pnp_info pnp_dev_info[] = { + { NULL, IT8587E_SP1, PNP_IO0 | PNP_IRQ0, 0x0ff8, }, + { NULL, IT8587E_SP2, PNP_IO0 | PNP_IRQ0, 0x0ff8, }, + { NULL, IT8587E_SWUC, PNP_IO0 | PNP_IRQ0, 0xfff0, }, + /* Documentation: Unused */ + { NULL, IT8587E_KBCM, PNP_IRQ0, }, + /* Documentation: Program io0 = 0x60 and io1 = 0x64 */ + { NULL, IT8587E_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff, }, + { NULL, IT8587E_SMFI, PNP_IO0 | PNP_IRQ0, 0xfff0, }, + /* Documentation: Program io0 = 0x70-0x73 */ + { NULL, IT8587E_RTCT, PNP_IO0 | PNP_IO1 | PNP_IO2 | PNP_IO3 | PNP_IRQ0, + 0xfffe, 0xfffe, 0xfffe, 0xfffe}, + /* Documentation: Program io0 = 0x62 and io1 = 0x66 */ + { NULL, IT8587E_PMC1, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff }, + /* Documentation: Program io0 = 0x68 and io1 = 0x6c */ + { NULL, IT8587E_PMC2, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07fc, 0x07fc }, + /* Documentation: Program io0 = 0x6a and io1 = 0x6e */ + { NULL, IT8587E_PMC3, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff }, + { NULL, IT8587E_PMC4, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff }, + { NULL, IT8587E_PMC5, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff }, + { NULL, IT8587E_SSPI, PNP_IO0 | PNP_IRQ0, 0xfff8 }, + { NULL, IT8528E_PECI, PNP_IO0, 0xfff8 }, +}; + +static void enable_dev(struct device *dev) +{ + pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info); +} + +struct chip_operations superio_ite_it8587e_ops = { + CHIP_NAME("ITE IT8587E Super I/O") + .enable_dev = enable_dev, +};
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36071 )
Change subject: superio: IT8587E (WIP) ......................................................................
Patch Set 2:
(2 comments)
i'm not sure which comment belongs to which line; would be good if all comments were in the line above the code line they refer to
https://review.coreboot.org/c/coreboot/+/36071/2/src/superio/ite/it8587e/sup... File src/superio/ite/it8587e/superio.c:
https://review.coreboot.org/c/coreboot/+/36071/2/src/superio/ite/it8587e/sup... PS2, Line 28: { does it need the keyboard init most other SIO chips have here?
https://review.coreboot.org/c/coreboot/+/36071/2/src/superio/ite/it8587e/sup... PS2, Line 49: Program io0 = 0x70-0x73 the mask for io0 contradicts this, since it if only for a 2 byte io space and not a 4 byte one.
or did you write the comment below the line it refers to? i'd expect that the comment refers to the line below it? at least for IT8587E_KBCK the comment is above the line it refers to
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Felix Held,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36071
to look at the new patch set (#3).
Change subject: superio: IT8587E (WIP) ......................................................................
superio: IT8587E (WIP)
Change-Id: I1e541daa2b3d48a4f5a0e7b7fa88a2c2f8a1b0c5 Signed-off-by: Daniel Maslowski info@orangecms.org --- M src/superio/ite/Makefile.inc A src/superio/ite/it8587e/Kconfig A src/superio/ite/it8587e/Makefile.inc A src/superio/ite/it8587e/it8587e.h A src/superio/ite/it8587e/superio.c 5 files changed, 85 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/36071/3
Daniel Maslowski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36071 )
Change subject: superio: IT8587E (WIP) ......................................................................
Patch Set 3:
(1 comment)
This change is ready for review.
https://review.coreboot.org/c/coreboot/+/36071/2/src/superio/ite/it8587e/sup... File src/superio/ite/it8587e/superio.c:
https://review.coreboot.org/c/coreboot/+/36071/2/src/superio/ite/it8587e/sup... PS2, Line 49: Program io0 = 0x70-0x73
the mask for io0 contradicts this, since it if only for a 2 byte io space and not a 4 byte one. […]
I had merely copied from a similar SIO without any clue back then. I'll see what I can figure out. With some help, I managed to set the changes to be marked as WIP now. 😊
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36071 )
Change subject: superio: IT8587E (WIP) ......................................................................
Patch Set 3:
(3 comments)
https://review.coreboot.org/c/coreboot/+/36071/3/src/superio/ite/it8587e/it8... File src/superio/ite/it8587e/it8587e.h:
https://review.coreboot.org/c/coreboot/+/36071/3/src/superio/ite/it8587e/it8... PS3, Line 6: SP1 UART1
https://review.coreboot.org/c/coreboot/+/36071/3/src/superio/ite/it8587e/it8... PS3, Line 7: SP2 UART2
https://review.coreboot.org/c/coreboot/+/36071/3/src/superio/ite/it8587e/it8... PS3, Line 10: #define IT8587E_KBCK 0x06 /* PS/2 keyboard */ Add ..
#define IT8587E_CIR 0x0a /* Consumer IR */
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36071 )
Change subject: superio: IT8587E (WIP) ......................................................................
Patch Set 3:
(1 comment)
d
https://review.coreboot.org/c/coreboot/+/36071/3/src/superio/ite/it8587e/it8... File src/superio/ite/it8587e/it8587e.h:
https://review.coreboot.org/c/coreboot/+/36071/3/src/superio/ite/it8587e/it8... PS3, Line 6: SP1
UART1
Also, write UART1 as comment for consistency
Hello Felix Singer, build bot (Jenkins), Patrick Georgi, Martin Roth, Felix Held,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36071
to look at the new patch set (#4).
Change subject: superio: IT8587E (WIP) ......................................................................
superio: IT8587E (WIP)
Change-Id: I1e541daa2b3d48a4f5a0e7b7fa88a2c2f8a1b0c5 Signed-off-by: Daniel Maslowski info@orangecms.org --- M src/superio/ite/Makefile.inc A src/superio/ite/it8587e/Kconfig A src/superio/ite/it8587e/Makefile.inc A src/superio/ite/it8587e/it8587e.h A src/superio/ite/it8587e/superio.c 5 files changed, 87 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/36071/4
Hello Felix Singer, build bot (Jenkins), Patrick Georgi, Martin Roth, Felix Held,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36071
to look at the new patch set (#5).
Change subject: superio/ite: add IT8587E ......................................................................
superio/ite: add IT8587E
Change-Id: I1e541daa2b3d48a4f5a0e7b7fa88a2c2f8a1b0c5 Signed-off-by: Daniel Maslowski info@orangecms.org --- M src/superio/ite/Makefile.inc A src/superio/ite/it8587e/Kconfig A src/superio/ite/it8587e/Makefile.inc A src/superio/ite/it8587e/it8587e.h A src/superio/ite/it8587e/superio.c 5 files changed, 87 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/36071/5
Martin L Roth has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/36071?usp=email )
Change subject: superio/ite: add IT8587E ......................................................................
Abandoned
This patch has not been touched in over 12 months. Anyone who wants to take over work on this patch, please feel free to restore it and do any work needed to get it merged. If you create a new patch based on this work, please credit the original author.