coreboot-kgpe-d16/src/drivers/smbus/i2c_smbus_console.c
Husni Faiz b80535a135 drivers/smbus: initialize SC16IS7XX I2C to UART converter chip
This patch adds the functionality to initialize the sc16is750
i2c to uart converter chip with a 14.7MHz input clock to support
115200 baud rate.

Change-Id: Ib31188b8c0f9b0ce9454da984e630eca9101d145
Signed-off-by: Husni Faiz <ahamedhusni73@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67342
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-10-03 16:14:25 +00:00

19 lines
462 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
#include <console/i2c_smbus.h>
#include <device/smbus_host.h>
#include <southbridge/intel/bd82x6x/pch.h>
#include "sc16is7xx_init.h"
void i2c_smbus_console_init(void)
{
if (CONFIG(SC16IS7XX_INIT))
sc16is7xx_init();
}
void i2c_smbus_console_tx_byte(unsigned char c)
{
do_smbus_write_byte(CONFIG_FIXED_SMBUS_IO_BASE,
CONFIG_CONSOLE_I2C_SMBUS_SLAVE_ADDRESS,
CONFIG_CONSOLE_I2C_SMBUS_SLAVE_DATA_REGISTER, c);
}