i2c: qcom-geni: add support for I2C Master Hub variant
authorNeil Armstrong <neil.armstrong@linaro.org>
Tue, 29 Nov 2022 14:47:06 +0000 (15:47 +0100)
committerWolfram Sang <wsa@kernel.org>
Mon, 5 Dec 2022 08:30:25 +0000 (09:30 +0100)
The I2C Master Hub is a stripped down version of the GENI Serial Engine
QUP Wrapper Controller but only supporting I2C serial engines without
DMA support.

Add the I2C Master Hub serial engine compatible along the specific
requirements in a new desc struct passed through the device match data.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-qcom-geni.c

index 75dd0718c5a12781a73154b47f5117d1f197f7c9..bfe75038bc1492bca9006540d34236c280af5c6c 100644 (file)
@@ -1026,8 +1026,16 @@ static const struct dev_pm_ops geni_i2c_pm_ops = {
                                                                        NULL)
 };
 
+const struct geni_i2c_desc i2c_master_hub = {
+       .has_core_clk = true,
+       .icc_ddr = NULL,
+       .no_dma_support = true,
+       .tx_fifo_depth = 16,
+};
+
 static const struct of_device_id geni_i2c_dt_match[] = {
        { .compatible = "qcom,geni-i2c" },
+       { .compatible = "qcom,geni-i2c-master-hub", .data = &i2c_master_hub },
        {}
 };
 MODULE_DEVICE_TABLE(of, geni_i2c_dt_match);