From 24231aceacd46a6b5f1c29dda6c97a436495555d Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Tue, 6 Jun 2017 09:46:01 +0200 Subject: drivers/i2c/ck505: Add generic driver to configure clockgen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the ics/954309 driver with a more generic version to accommodate clockgens with a different amount of registers. It also features a mask to only touch certain bits of the clockgen. TODO: set appropriate mask for X60/T60 since the datasheets for their clockgens can be found. Change-Id: Ie43c4de7891a39f2f443e78213ecd688134e68d7 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/20042 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/mainboard/lenovo/t60/Kconfig | 2 +- src/mainboard/lenovo/t60/devicetree.cb | 20 +++++++------------- src/mainboard/lenovo/x60/Kconfig | 2 +- src/mainboard/lenovo/x60/devicetree.cb | 20 +++++++------------- 4 files changed, 16 insertions(+), 28 deletions(-) (limited to 'src/mainboard/lenovo') diff --git a/src/mainboard/lenovo/t60/Kconfig b/src/mainboard/lenovo/t60/Kconfig index 3c77a8a98f..960be0efc8 100644 --- a/src/mainboard/lenovo/t60/Kconfig +++ b/src/mainboard/lenovo/t60/Kconfig @@ -12,7 +12,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy select SOUTHBRIDGE_TI_PCI1X2X select EC_LENOVO_PMH7 select EC_LENOVO_H8 - select DRIVERS_ICS_954309 + select DRIVERS_I2C_CK505 select HAVE_OPTION_TABLE select INTEL_INT15 select HAVE_MP_TABLE diff --git a/src/mainboard/lenovo/t60/devicetree.cb b/src/mainboard/lenovo/t60/devicetree.cb index 6ad054cc8f..36efe556ea 100644 --- a/src/mainboard/lenovo/t60/devicetree.cb +++ b/src/mainboard/lenovo/t60/devicetree.cb @@ -209,19 +209,13 @@ chip northbridge/intel/i945 end device pci 1f.3 on # SMBUS subsystemid 0x17aa 0x200f - chip drivers/ics/954309 - register "reg0" = "0x2e" - register "reg1" = "0xf7" - register "reg2" = "0x3c" - register "reg3" = "0x20" - register "reg4" = "0x01" - register "reg5" = "0x00" - register "reg6" = "0x1b" - register "reg7" = "0x01" - register "reg8" = "0x54" - register "reg9" = "0xff" - register "reg10" = "0xff" - register "reg11" = "0x07" + chip drivers/i2c/ck505 + register "mask" = "{ 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff }" + register "regs" = "{ 0x2e, 0xf7, 0x3c, + 0x20, 0x01, 0x00, 0x1b, 0x01, + 0x54, 0xff, 0xff, 0x07 }" device i2c 69 on end end # eeprom, 8 virtual devices, same chip diff --git a/src/mainboard/lenovo/x60/Kconfig b/src/mainboard/lenovo/x60/Kconfig index 1d55f988ee..91cb9eaa6d 100644 --- a/src/mainboard/lenovo/x60/Kconfig +++ b/src/mainboard/lenovo/x60/Kconfig @@ -12,7 +12,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy select SUPERIO_NSC_PC87392 select EC_LENOVO_PMH7 select EC_LENOVO_H8 - select DRIVERS_ICS_954309 + select DRIVERS_I2C_CK505 select HAVE_OPTION_TABLE select INTEL_INT15 select HAVE_CMOS_DEFAULT diff --git a/src/mainboard/lenovo/x60/devicetree.cb b/src/mainboard/lenovo/x60/devicetree.cb index 28b63d3665..50b0d56855 100644 --- a/src/mainboard/lenovo/x60/devicetree.cb +++ b/src/mainboard/lenovo/x60/devicetree.cb @@ -191,19 +191,13 @@ chip northbridge/intel/i945 end device pci 1f.3 on # SMBUS subsystemid 0x17aa 0x200f - chip drivers/ics/954309 - register "reg0" = "0x2e" - register "reg1" = "0xf7" - register "reg2" = "0x3c" - register "reg3" = "0x20" - register "reg4" = "0x01" - register "reg5" = "0x00" - register "reg6" = "0x1b" - register "reg7" = "0x01" - register "reg8" = "0x54" - register "reg9" = "0xff" - register "reg10" = "0xff" - register "reg11" = "0x07" + chip drivers/i2c/ck505 + register "mask" = "{ 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff }" + register "regs" = "{ 0x2e, 0xf7, 0x3c, + 0x20, 0x01, 0x00, 0x1b, 0x01, + 0x54, 0xff, 0xff, 0x07 }" device i2c 69 on end end # eeprom, 8 virtual devices, same chip -- cgit v1.2.3