From c01a4a136440cb9727a519bb10f5f2696a80e8de Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Mon, 3 Feb 2020 09:36:06 +0800 Subject: [PATCH 1/2] ACPI / APD: Add clock frequency for Hisilicon Hip08-Lite I2C controller I2C clock frequency of Designware ip for Hisilicon Hip08 Lite is 125M, use a new ACPI HID to enable it. Tested-by: Sheng Feng Signed-off-by: Hanjun Guo Reviewed-by: Jarkko Nikula Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_apd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c index 71511ae2dfcd..ba2612e9a0eb 100644 --- a/drivers/acpi/acpi_apd.c +++ b/drivers/acpi/acpi_apd.c @@ -161,6 +161,11 @@ static const struct apd_device_desc hip08_i2c_desc = { .fixed_clk_rate = 250000000, }; +static const struct apd_device_desc hip08_lite_i2c_desc = { + .setup = acpi_apd_setup, + .fixed_clk_rate = 125000000, +}; + static const struct apd_device_desc thunderx2_i2c_desc = { .setup = acpi_apd_setup, .fixed_clk_rate = 125000000, @@ -243,6 +248,7 @@ static const struct acpi_device_id acpi_apd_device_ids[] = { { "CAV9007", APD_ADDR(thunderx2_i2c_desc) }, { "HISI02A1", APD_ADDR(hip07_i2c_desc) }, { "HISI02A2", APD_ADDR(hip08_i2c_desc) }, + { "HISI02A3", APD_ADDR(hip08_lite_i2c_desc) }, { "HISI0173", APD_ADDR(hip08_spi_desc) }, { "NXP0001", APD_ADDR(nxp_i2c_desc) }, #endif From dec0a81a7814c8a876e663e0627468e6b1a7d2fb Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Mon, 3 Feb 2020 09:36:07 +0800 Subject: [PATCH 2/2] i2c: designware: Add ACPI HID for Hisilicon Hip08-Lite I2C controller Add ACPI HID HISI02A3 for Hisilicon Hip08 Lite, which has different clock frequency from Hip08 for I2C controller. Tested-by: Sheng Feng Signed-off-by: Hanjun Guo Acked-by: Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki --- drivers/i2c/busses/i2c-designware-platdrv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 16dd338877d0..3b7d58c2fe85 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -130,6 +130,7 @@ static const struct acpi_device_id dw_i2c_acpi_match[] = { { "APMC0D0F", 0 }, { "HISI02A1", 0 }, { "HISI02A2", 0 }, + { "HISI02A3", 0 }, { } }; MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);