Skip to contentSkip to conversation

i2c: designware: Add ACPI HID for Hisilicon Hip08-Lite I2C controller

PATCH Superseded Hanjun Guo 2 participants 4 messages Feb 2, 2020 – Feb 3, 2020

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Hanjun Guo

author
#0 lore raw

PATCH 1/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.

---
 drivers/i2c/busses/i2c-designware-platdrv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-designware-platdrv.c +1 -0
index 16dd338..3b7d58c 100644
@@ -130,6 +130,7 @@ static int dw_i2c_acpi_configure(struct platform_device *pdev)
 	{ "APMC0D0F", 0 },
 	{ "HISI02A1", 0 },
 	{ "HISI02A2", 0 },
+	{ "HISI02A3", 0 },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
Signature · 1 line
1.7.12.4
author
#1 lore raw

PATCH 2/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.

---
 drivers/acpi/acpi_apd.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/acpi/acpi_apd.c +6 -0
index 71511ae..ba2612e 100644
@@ -161,6 +161,11 @@ static int st_misc_setup(struct apd_private_data *pdata)
 	.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 int acpi_apd_create_device(struct acpi_device *adev,
 	{ "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
Signature · 1 line
1.7.12.4
#2 lore raw
In reply to Hanjun Guo
Quoted 2 lines · Hanjun Guo

Add ACPI HID HISI02A3 for Hisilicon Hip08 Lite, which has different clock frequency from Hip08 for I2C controller.

The series is good for me, but I think you should reverse the order of the patches in it.

Quoted 21 lines
---
 drivers/i2c/busses/i2c-designware-platdrv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-designware-platdrv.c +1 -0
index 16dd338..3b7d58c 100644
@@ -130,6 +130,7 @@ static int dw_i2c_acpi_configure(struct platform_device *pdev)
 	{ "APMC0D0F", 0 },
 	{ "HISI02A1", 0 },
 	{ "HISI02A2", 0 },
+	{ "HISI02A3", 0 },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
Signature · 1 line
1.7.12.4
Signature · 2 lines
With Best Regards,
Andy Shevchenko
author
#3 lore raw
Quoted 6 lines · Andy Shevchenko
Quoted 2 lines · Hanjun Guo

Add ACPI HID HISI02A3 for Hisilicon Hip08 Lite, which has different clock frequency from Hip08 for I2C controller.

The series is good for me, but I think you should reverse the order of the patches in it.

I will send a updated version as you suggested.

Thanks
Hanjun