diff mbox series

[6/6] i2c: qcom-geni: add support for I2C Master Hub variant

Message ID 20221114-narmstrong-sm8550-upstream-i2c-master-hub-v1-6-64449106a148@linaro.org
State Superseded
Headers show
Series soc: qcom: add support for the I2C Master Hub | expand

Commit Message

Neil Armstrong Nov. 16, 2022, 10:21 a.m. UTC
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.

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

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 drivers/i2c/busses/i2c-qcom-geni.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Konrad Dybcio Nov. 16, 2022, 10:38 a.m. UTC | #1
On 16/11/2022 11:21, Neil Armstrong wrote:
> 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.
> 
> This adds the I2C Master Hub serial engine compatible along the
> specific requirements in a new desc struct passed throug the device
> match data.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>   drivers/i2c/busses/i2c-qcom-geni.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
> index 75dd0718c5a1..bfe75038bc14 100644
> --- a/drivers/i2c/busses/i2c-qcom-geni.c
> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
> @@ -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);
>
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index 75dd0718c5a1..bfe75038bc14 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -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);