Skip to content

Commit

Permalink
Remove ESPI config and enable LPC decodes for EC command and debug
Browse files Browse the repository at this point in the history
Change-Id: I301829fc67fc1b255cf1a6f468a5433b64e03828
  • Loading branch information
jackpot51 committed Nov 9, 2021
1 parent 2e47e82 commit 967bc10
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 35 deletions.
23 changes: 23 additions & 0 deletions src/mainboard/system76/kudu6/bootblock.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <bootblock_common.h>
#include <amdblocks/lpc.h>
#include <console/console.h>
#include "gpio.h"

void bootblock_mainboard_early_init(void)
{
post_code(0x76);
post_code(0x01);

mainboard_program_early_gpios();

post_code(0x76);
post_code(0x02);

// AP/EC command
lpc_set_wideio_range(0xE00, 256);

// AP/EC debug
lpc_set_wideio_range(0xF00, 256);

post_code(0x76);
post_code(0x03);
}

void bootblock_mainboard_init(void)
{
post_code(0x76);
post_code(0x10);
}
35 changes: 0 additions & 35 deletions src/mainboard/system76/kudu6/devicetree.cb
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,6 @@ chip soc/amd/cezanne
.dmic_present = 1,
}"

register "common_config.espi_config" = "{
.std_io_decode_bitmap = ESPI_DECODE_IO_0x80_EN | ESPI_DECODE_IO_0X60_0X64_EN,
/* EC PM channel */
.generic_io_range[0] = {
.base = 0x62,
/*
* Only 0x62 and 0x66 are required. But, this is not supported by
* standard IO decodes and there are only 4 generic I/O windows
* available. Hence, open a window from 0x62-0x67.
*/
.size = 5,
},
/* AP/EC debug */
.generic_io_range[1] = {
.base = 0xE00,
.size = 256,
},
/* AP/EC debug */
.generic_io_range[2] = {
.base = 0xF00,
.size = 256,
},

.io_mode = ESPI_IO_MODE_QUAD,
.op_freq_mhz = ESPI_OP_FREQ_33_MHZ,
.crc_check_enable = 1,
.alert_pin = ESPI_ALERT_PIN_OPEN_DRAIN,
.periph_ch_en = 1,
.vw_ch_en = 1,
.oob_ch_en = 0,
.flash_ch_en = 0,

.vw_irq_polarity = ESPI_VW_IRQ_LEVEL_HIGH(1),
}"

register "i2c_scl_reset" = "GPIO_I2C0_SCL | GPIO_I2C1_SCL |
GPIO_I2C2_SCL | GPIO_I2C3_SCL"
# I2C Pad Control RX Select Configuration
Expand Down

0 comments on commit 967bc10

Please sign in to comment.