All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: mediatek: Get device clock-stretch time via dts
@ 2021-02-03 10:35 ` qii.wang
  0 siblings, 0 replies; 12+ messages in thread
From: qii.wang @ 2021-02-03 10:35 UTC (permalink / raw)
  To: wsa
  Cc: matthias.bgg, linux-i2c, linux-arm-kernel, linux-kernel,
	linux-mediatek, srv_heupstream, leilk.liu, qii.wang

From: Qii Wang <qii.wang@mediatek.com>

tSU,STA/tHD,STA/tSU,STOP maybe out of spec due to device
clock-stretching or circuit loss, we could get device
clock-stretch time from dts to adjust these parameters
to meet the spec via EXT_CONF register.

Signed-off-by: Qii Wang <qii.wang@mediatek.com>
---
 drivers/i2c/busses/i2c-mt65xx.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
index 2ffd2f3..47c7255 100644
--- a/drivers/i2c/busses/i2c-mt65xx.c
+++ b/drivers/i2c/busses/i2c-mt65xx.c
@@ -245,6 +245,7 @@ struct mtk_i2c {
 	u16 irq_stat;			/* interrupt status */
 	unsigned int clk_src_div;
 	unsigned int speed_hz;		/* The speed in transfer */
+	unsigned int clock_stretch_ns;
 	enum mtk_trans_op op;
 	u16 timing_reg;
 	u16 high_speed_reg;
@@ -607,7 +608,8 @@ static int mtk_i2c_check_ac_timing(struct mtk_i2c *i2c,
 	else
 		clk_ns = sample_ns / 2;
 
-	su_sta_cnt = DIV_ROUND_UP(spec->min_su_sta_ns, clk_ns);
+	su_sta_cnt = DIV_ROUND_UP(spec->min_su_sta_ns + i2c->clock_stretch_ns,
+				  clk_ns);
 	if (su_sta_cnt > max_sta_cnt)
 		return -1;
 
@@ -1171,6 +1173,8 @@ static int mtk_i2c_parse_dt(struct device_node *np, struct mtk_i2c *i2c)
 	if (i2c->clk_src_div == 0)
 		return -EINVAL;
 
+	of_property_read_u32(np, "clock-stretch-ns", &i2c->clock_stretch_ns);
+
 	i2c->have_pmic = of_property_read_bool(np, "mediatek,have-pmic");
 	i2c->use_push_pull =
 		of_property_read_bool(np, "mediatek,use-push-pull");
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] i2c: mediatek: Get device clock-stretch time via dts
@ 2021-02-03 10:35 ` qii.wang
  0 siblings, 0 replies; 12+ messages in thread
From: qii.wang @ 2021-02-03 10:35 UTC (permalink / raw)
  To: wsa
  Cc: qii.wang, srv_heupstream, leilk.liu, linux-kernel,
	linux-mediatek, linux-i2c, matthias.bgg, linux-arm-kernel

From: Qii Wang <qii.wang@mediatek.com>

tSU,STA/tHD,STA/tSU,STOP maybe out of spec due to device
clock-stretching or circuit loss, we could get device
clock-stretch time from dts to adjust these parameters
to meet the spec via EXT_CONF register.

Signed-off-by: Qii Wang <qii.wang@mediatek.com>
---
 drivers/i2c/busses/i2c-mt65xx.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
index 2ffd2f3..47c7255 100644
--- a/drivers/i2c/busses/i2c-mt65xx.c
+++ b/drivers/i2c/busses/i2c-mt65xx.c
@@ -245,6 +245,7 @@ struct mtk_i2c {
 	u16 irq_stat;			/* interrupt status */
 	unsigned int clk_src_div;
 	unsigned int speed_hz;		/* The speed in transfer */
+	unsigned int clock_stretch_ns;
 	enum mtk_trans_op op;
 	u16 timing_reg;
 	u16 high_speed_reg;
@@ -607,7 +608,8 @@ static int mtk_i2c_check_ac_timing(struct mtk_i2c *i2c,
 	else
 		clk_ns = sample_ns / 2;
 
-	su_sta_cnt = DIV_ROUND_UP(spec->min_su_sta_ns, clk_ns);
+	su_sta_cnt = DIV_ROUND_UP(spec->min_su_sta_ns + i2c->clock_stretch_ns,
+				  clk_ns);
 	if (su_sta_cnt > max_sta_cnt)
 		return -1;
 
@@ -1171,6 +1173,8 @@ static int mtk_i2c_parse_dt(struct device_node *np, struct mtk_i2c *i2c)
 	if (i2c->clk_src_div == 0)
 		return -EINVAL;
 
+	of_property_read_u32(np, "clock-stretch-ns", &i2c->clock_stretch_ns);
+
 	i2c->have_pmic = of_property_read_bool(np, "mediatek,have-pmic");
 	i2c->use_push_pull =
 		of_property_read_bool(np, "mediatek,use-push-pull");
-- 
1.9.1
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] i2c: mediatek: Get device clock-stretch time via dts
@ 2021-02-03 10:35 ` qii.wang
  0 siblings, 0 replies; 12+ messages in thread
From: qii.wang @ 2021-02-03 10:35 UTC (permalink / raw)
  To: wsa
  Cc: qii.wang, srv_heupstream, leilk.liu, linux-kernel,
	linux-mediatek, linux-i2c, matthias.bgg, linux-arm-kernel

From: Qii Wang <qii.wang@mediatek.com>

tSU,STA/tHD,STA/tSU,STOP maybe out of spec due to device
clock-stretching or circuit loss, we could get device
clock-stretch time from dts to adjust these parameters
to meet the spec via EXT_CONF register.

Signed-off-by: Qii Wang <qii.wang@mediatek.com>
---
 drivers/i2c/busses/i2c-mt65xx.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
index 2ffd2f3..47c7255 100644
--- a/drivers/i2c/busses/i2c-mt65xx.c
+++ b/drivers/i2c/busses/i2c-mt65xx.c
@@ -245,6 +245,7 @@ struct mtk_i2c {
 	u16 irq_stat;			/* interrupt status */
 	unsigned int clk_src_div;
 	unsigned int speed_hz;		/* The speed in transfer */
+	unsigned int clock_stretch_ns;
 	enum mtk_trans_op op;
 	u16 timing_reg;
 	u16 high_speed_reg;
@@ -607,7 +608,8 @@ static int mtk_i2c_check_ac_timing(struct mtk_i2c *i2c,
 	else
 		clk_ns = sample_ns / 2;
 
-	su_sta_cnt = DIV_ROUND_UP(spec->min_su_sta_ns, clk_ns);
+	su_sta_cnt = DIV_ROUND_UP(spec->min_su_sta_ns + i2c->clock_stretch_ns,
+				  clk_ns);
 	if (su_sta_cnt > max_sta_cnt)
 		return -1;
 
@@ -1171,6 +1173,8 @@ static int mtk_i2c_parse_dt(struct device_node *np, struct mtk_i2c *i2c)
 	if (i2c->clk_src_div == 0)
 		return -EINVAL;
 
+	of_property_read_u32(np, "clock-stretch-ns", &i2c->clock_stretch_ns);
+
 	i2c->have_pmic = of_property_read_bool(np, "mediatek,have-pmic");
 	i2c->use_push_pull =
 		of_property_read_bool(np, "mediatek,use-push-pull");
-- 
1.9.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] i2c: mediatek: Get device clock-stretch time via dts
  2021-02-03 10:35 ` qii.wang
  (?)
@ 2021-03-01 12:22   ` Qii Wang
  -1 siblings, 0 replies; 12+ messages in thread
From: Qii Wang @ 2021-03-01 12:22 UTC (permalink / raw)
  To: wsa
  Cc: matthias.bgg, linux-i2c, linux-arm-kernel, linux-kernel,
	linux-mediatek, srv_heupstream, leilk.liu

Hi,
On Wed, 2021-02-03 at 18:35 +0800, qii.wang@mediatek.com wrote:
> From: Qii Wang <qii.wang@mediatek.com>
> 
> tSU,STA/tHD,STA/tSU,STOP maybe out of spec due to device
> clock-stretching or circuit loss, we could get device
> clock-stretch time from dts to adjust these parameters
> to meet the spec via EXT_CONF register.
> 
> Signed-off-by: Qii Wang <qii.wang@mediatek.com>
> ---

Can it merge into 5.12? or do I need to resend the patch?

Thanks,
	Qii

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] i2c: mediatek: Get device clock-stretch time via dts
@ 2021-03-01 12:22   ` Qii Wang
  0 siblings, 0 replies; 12+ messages in thread
From: Qii Wang @ 2021-03-01 12:22 UTC (permalink / raw)
  To: wsa
  Cc: srv_heupstream, leilk.liu, linux-kernel, linux-mediatek,
	linux-i2c, matthias.bgg, linux-arm-kernel

Hi,
On Wed, 2021-02-03 at 18:35 +0800, qii.wang@mediatek.com wrote:
> From: Qii Wang <qii.wang@mediatek.com>
> 
> tSU,STA/tHD,STA/tSU,STOP maybe out of spec due to device
> clock-stretching or circuit loss, we could get device
> clock-stretch time from dts to adjust these parameters
> to meet the spec via EXT_CONF register.
> 
> Signed-off-by: Qii Wang <qii.wang@mediatek.com>
> ---

Can it merge into 5.12? or do I need to resend the patch?

Thanks,
	Qii
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] i2c: mediatek: Get device clock-stretch time via dts
@ 2021-03-01 12:22   ` Qii Wang
  0 siblings, 0 replies; 12+ messages in thread
From: Qii Wang @ 2021-03-01 12:22 UTC (permalink / raw)
  To: wsa
  Cc: srv_heupstream, leilk.liu, linux-kernel, linux-mediatek,
	linux-i2c, matthias.bgg, linux-arm-kernel

Hi,
On Wed, 2021-02-03 at 18:35 +0800, qii.wang@mediatek.com wrote:
> From: Qii Wang <qii.wang@mediatek.com>
> 
> tSU,STA/tHD,STA/tSU,STOP maybe out of spec due to device
> clock-stretching or circuit loss, we could get device
> clock-stretch time from dts to adjust these parameters
> to meet the spec via EXT_CONF register.
> 
> Signed-off-by: Qii Wang <qii.wang@mediatek.com>
> ---

Can it merge into 5.12? or do I need to resend the patch?

Thanks,
	Qii
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] i2c: mediatek: Get device clock-stretch time via dts
  2021-02-03 10:35 ` qii.wang
  (?)
@ 2021-03-02 11:30   ` Ikjoon Jang
  -1 siblings, 0 replies; 12+ messages in thread
From: Ikjoon Jang @ 2021-03-02 11:30 UTC (permalink / raw)
  To: qii.wang
  Cc: wsa, srv_heupstream, leilk.liu, open list,
	moderated list:ARM/Mediatek SoC support, linux-i2c,
	Matthias Brugger, moderated list:ARM/Mediatek SoC support

Hi Qii,

On Wed, Feb 3, 2021 at 6:43 PM <qii.wang@mediatek.com> wrote:
>
> From: Qii Wang <qii.wang@mediatek.com>
>
> tSU,STA/tHD,STA/tSU,STOP maybe out of spec due to device
> clock-stretching or circuit loss, we could get device
> clock-stretch time from dts to adjust these parameters
> to meet the spec via EXT_CONF register.
>
> Signed-off-by: Qii Wang <qii.wang@mediatek.com>
> ---
>  drivers/i2c/busses/i2c-mt65xx.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
> index 2ffd2f3..47c7255 100644
> --- a/drivers/i2c/busses/i2c-mt65xx.c
> +++ b/drivers/i2c/busses/i2c-mt65xx.c
> @@ -245,6 +245,7 @@ struct mtk_i2c {
>         u16 irq_stat;                   /* interrupt status */
>         unsigned int clk_src_div;
>         unsigned int speed_hz;          /* The speed in transfer */
> +       unsigned int clock_stretch_ns;
>         enum mtk_trans_op op;
>         u16 timing_reg;
>         u16 high_speed_reg;
> @@ -607,7 +608,8 @@ static int mtk_i2c_check_ac_timing(struct mtk_i2c *i2c,
>         else
>                 clk_ns = sample_ns / 2;
>
> -       su_sta_cnt = DIV_ROUND_UP(spec->min_su_sta_ns, clk_ns);
> +       su_sta_cnt = DIV_ROUND_UP(spec->min_su_sta_ns + i2c->clock_stretch_ns,
> +                                 clk_ns);
>         if (su_sta_cnt > max_sta_cnt)
>                 return -1;
>
> @@ -1171,6 +1173,8 @@ static int mtk_i2c_parse_dt(struct device_node *np, struct mtk_i2c *i2c)
>         if (i2c->clk_src_div == 0)
>                 return -EINVAL;
>
> +       of_property_read_u32(np, "clock-stretch-ns", &i2c->clock_stretch_ns);
> +

I think this new property "clock-stretch-ns" is for the same purpose of
"i2c-scl-falling-time-ns" + "i2c-scl-rising-time-ns" defined in
Documentation/devicetree/bindings/i2c/i2c.txt?

>         i2c->have_pmic = of_property_read_bool(np, "mediatek,have-pmic");
>         i2c->use_push_pull =
>                 of_property_read_bool(np, "mediatek,use-push-pull");
> --
> 1.9.1
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] i2c: mediatek: Get device clock-stretch time via dts
@ 2021-03-02 11:30   ` Ikjoon Jang
  0 siblings, 0 replies; 12+ messages in thread
From: Ikjoon Jang @ 2021-03-02 11:30 UTC (permalink / raw)
  To: qii.wang
  Cc: wsa, srv_heupstream, leilk.liu, open list,
	moderated list:ARM/Mediatek SoC support, linux-i2c,
	Matthias Brugger, moderated list:ARM/Mediatek SoC support

Hi Qii,

On Wed, Feb 3, 2021 at 6:43 PM <qii.wang@mediatek.com> wrote:
>
> From: Qii Wang <qii.wang@mediatek.com>
>
> tSU,STA/tHD,STA/tSU,STOP maybe out of spec due to device
> clock-stretching or circuit loss, we could get device
> clock-stretch time from dts to adjust these parameters
> to meet the spec via EXT_CONF register.
>
> Signed-off-by: Qii Wang <qii.wang@mediatek.com>
> ---
>  drivers/i2c/busses/i2c-mt65xx.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
> index 2ffd2f3..47c7255 100644
> --- a/drivers/i2c/busses/i2c-mt65xx.c
> +++ b/drivers/i2c/busses/i2c-mt65xx.c
> @@ -245,6 +245,7 @@ struct mtk_i2c {
>         u16 irq_stat;                   /* interrupt status */
>         unsigned int clk_src_div;
>         unsigned int speed_hz;          /* The speed in transfer */
> +       unsigned int clock_stretch_ns;
>         enum mtk_trans_op op;
>         u16 timing_reg;
>         u16 high_speed_reg;
> @@ -607,7 +608,8 @@ static int mtk_i2c_check_ac_timing(struct mtk_i2c *i2c,
>         else
>                 clk_ns = sample_ns / 2;
>
> -       su_sta_cnt = DIV_ROUND_UP(spec->min_su_sta_ns, clk_ns);
> +       su_sta_cnt = DIV_ROUND_UP(spec->min_su_sta_ns + i2c->clock_stretch_ns,
> +                                 clk_ns);
>         if (su_sta_cnt > max_sta_cnt)
>                 return -1;
>
> @@ -1171,6 +1173,8 @@ static int mtk_i2c_parse_dt(struct device_node *np, struct mtk_i2c *i2c)
>         if (i2c->clk_src_div == 0)
>                 return -EINVAL;
>
> +       of_property_read_u32(np, "clock-stretch-ns", &i2c->clock_stretch_ns);
> +

I think this new property "clock-stretch-ns" is for the same purpose of
"i2c-scl-falling-time-ns" + "i2c-scl-rising-time-ns" defined in
Documentation/devicetree/bindings/i2c/i2c.txt?

>         i2c->have_pmic = of_property_read_bool(np, "mediatek,have-pmic");
>         i2c->use_push_pull =
>                 of_property_read_bool(np, "mediatek,use-push-pull");
> --
> 1.9.1
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] i2c: mediatek: Get device clock-stretch time via dts
@ 2021-03-02 11:30   ` Ikjoon Jang
  0 siblings, 0 replies; 12+ messages in thread
From: Ikjoon Jang @ 2021-03-02 11:30 UTC (permalink / raw)
  To: qii.wang
  Cc: wsa, srv_heupstream, leilk.liu, open list,
	moderated list:ARM/Mediatek SoC support, linux-i2c,
	Matthias Brugger, moderated list:ARM/Mediatek SoC support

Hi Qii,

On Wed, Feb 3, 2021 at 6:43 PM <qii.wang@mediatek.com> wrote:
>
> From: Qii Wang <qii.wang@mediatek.com>
>
> tSU,STA/tHD,STA/tSU,STOP maybe out of spec due to device
> clock-stretching or circuit loss, we could get device
> clock-stretch time from dts to adjust these parameters
> to meet the spec via EXT_CONF register.
>
> Signed-off-by: Qii Wang <qii.wang@mediatek.com>
> ---
>  drivers/i2c/busses/i2c-mt65xx.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
> index 2ffd2f3..47c7255 100644
> --- a/drivers/i2c/busses/i2c-mt65xx.c
> +++ b/drivers/i2c/busses/i2c-mt65xx.c
> @@ -245,6 +245,7 @@ struct mtk_i2c {
>         u16 irq_stat;                   /* interrupt status */
>         unsigned int clk_src_div;
>         unsigned int speed_hz;          /* The speed in transfer */
> +       unsigned int clock_stretch_ns;
>         enum mtk_trans_op op;
>         u16 timing_reg;
>         u16 high_speed_reg;
> @@ -607,7 +608,8 @@ static int mtk_i2c_check_ac_timing(struct mtk_i2c *i2c,
>         else
>                 clk_ns = sample_ns / 2;
>
> -       su_sta_cnt = DIV_ROUND_UP(spec->min_su_sta_ns, clk_ns);
> +       su_sta_cnt = DIV_ROUND_UP(spec->min_su_sta_ns + i2c->clock_stretch_ns,
> +                                 clk_ns);
>         if (su_sta_cnt > max_sta_cnt)
>                 return -1;
>
> @@ -1171,6 +1173,8 @@ static int mtk_i2c_parse_dt(struct device_node *np, struct mtk_i2c *i2c)
>         if (i2c->clk_src_div == 0)
>                 return -EINVAL;
>
> +       of_property_read_u32(np, "clock-stretch-ns", &i2c->clock_stretch_ns);
> +

I think this new property "clock-stretch-ns" is for the same purpose of
"i2c-scl-falling-time-ns" + "i2c-scl-rising-time-ns" defined in
Documentation/devicetree/bindings/i2c/i2c.txt?

>         i2c->have_pmic = of_property_read_bool(np, "mediatek,have-pmic");
>         i2c->use_push_pull =
>                 of_property_read_bool(np, "mediatek,use-push-pull");
> --
> 1.9.1
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] i2c: mediatek: Get device clock-stretch time via dts
  2021-03-02 11:30   ` Ikjoon Jang
  (?)
@ 2021-03-02 12:32     ` Qii Wang
  -1 siblings, 0 replies; 12+ messages in thread
From: Qii Wang @ 2021-03-02 12:32 UTC (permalink / raw)
  To: Ikjoon Jang
  Cc: wsa, srv_heupstream, leilk.liu, open list,
	moderated list:ARM/Mediatek SoC support, linux-i2c,
	Matthias Brugger, moderated list:ARM/Mediatek SoC support

Hi,
On Tue, 2021-03-02 at 19:30 +0800, Ikjoon Jang wrote:
> Hi Qii,
> >
> > @@ -1171,6 +1173,8 @@ static int mtk_i2c_parse_dt(struct device_node *np, struct mtk_i2c *i2c)
> >         if (i2c->clk_src_div == 0)
> >                 return -EINVAL;
> >
> > +       of_property_read_u32(np, "clock-stretch-ns", &i2c->clock_stretch_ns);
> > +
> 
> I think this new property "clock-stretch-ns" is for the same purpose of
> "i2c-scl-falling-time-ns" + "i2c-scl-rising-time-ns" defined in
> Documentation/devicetree/bindings/i2c/i2c.txt?
> 

I haven't find the corresponding instructions;and this patch is for the
problem caused by clock-stretch when the scl is pulled.

> >         i2c->have_pmic = of_property_read_bool(np, "mediatek,have-pmic");
> >         i2c->use_push_pull =
> >                 of_property_read_bool(np, "mediatek,use-push-pull");
> > --
> > 1.9.1
> > _______________________________________________
> > Linux-mediatek mailing list
> > Linux-mediatek@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-mediatek


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] i2c: mediatek: Get device clock-stretch time via dts
@ 2021-03-02 12:32     ` Qii Wang
  0 siblings, 0 replies; 12+ messages in thread
From: Qii Wang @ 2021-03-02 12:32 UTC (permalink / raw)
  To: Ikjoon Jang
  Cc: wsa, srv_heupstream, leilk.liu, open list,
	moderated list:ARM/Mediatek SoC support, linux-i2c,
	Matthias Brugger, moderated list:ARM/Mediatek SoC support

Hi,
On Tue, 2021-03-02 at 19:30 +0800, Ikjoon Jang wrote:
> Hi Qii,
> >
> > @@ -1171,6 +1173,8 @@ static int mtk_i2c_parse_dt(struct device_node *np, struct mtk_i2c *i2c)
> >         if (i2c->clk_src_div == 0)
> >                 return -EINVAL;
> >
> > +       of_property_read_u32(np, "clock-stretch-ns", &i2c->clock_stretch_ns);
> > +
> 
> I think this new property "clock-stretch-ns" is for the same purpose of
> "i2c-scl-falling-time-ns" + "i2c-scl-rising-time-ns" defined in
> Documentation/devicetree/bindings/i2c/i2c.txt?
> 

I haven't find the corresponding instructions;and this patch is for the
problem caused by clock-stretch when the scl is pulled.

> >         i2c->have_pmic = of_property_read_bool(np, "mediatek,have-pmic");
> >         i2c->use_push_pull =
> >                 of_property_read_bool(np, "mediatek,use-push-pull");
> > --
> > 1.9.1
> > _______________________________________________
> > Linux-mediatek mailing list
> > Linux-mediatek@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-mediatek

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] i2c: mediatek: Get device clock-stretch time via dts
@ 2021-03-02 12:32     ` Qii Wang
  0 siblings, 0 replies; 12+ messages in thread
From: Qii Wang @ 2021-03-02 12:32 UTC (permalink / raw)
  To: Ikjoon Jang
  Cc: wsa, srv_heupstream, leilk.liu, open list,
	moderated list:ARM/Mediatek SoC support, linux-i2c,
	Matthias Brugger, moderated list:ARM/Mediatek SoC support

Hi,
On Tue, 2021-03-02 at 19:30 +0800, Ikjoon Jang wrote:
> Hi Qii,
> >
> > @@ -1171,6 +1173,8 @@ static int mtk_i2c_parse_dt(struct device_node *np, struct mtk_i2c *i2c)
> >         if (i2c->clk_src_div == 0)
> >                 return -EINVAL;
> >
> > +       of_property_read_u32(np, "clock-stretch-ns", &i2c->clock_stretch_ns);
> > +
> 
> I think this new property "clock-stretch-ns" is for the same purpose of
> "i2c-scl-falling-time-ns" + "i2c-scl-rising-time-ns" defined in
> Documentation/devicetree/bindings/i2c/i2c.txt?
> 

I haven't find the corresponding instructions;and this patch is for the
problem caused by clock-stretch when the scl is pulled.

> >         i2c->have_pmic = of_property_read_bool(np, "mediatek,have-pmic");
> >         i2c->use_push_pull =
> >                 of_property_read_bool(np, "mediatek,use-push-pull");
> > --
> > 1.9.1
> > _______________________________________________
> > Linux-mediatek mailing list
> > Linux-mediatek@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-mediatek

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-03-03 20:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-03 10:35 [PATCH] i2c: mediatek: Get device clock-stretch time via dts qii.wang
2021-02-03 10:35 ` qii.wang
2021-02-03 10:35 ` qii.wang
2021-03-01 12:22 ` Qii Wang
2021-03-01 12:22   ` Qii Wang
2021-03-01 12:22   ` Qii Wang
2021-03-02 11:30 ` Ikjoon Jang
2021-03-02 11:30   ` Ikjoon Jang
2021-03-02 11:30   ` Ikjoon Jang
2021-03-02 12:32   ` Qii Wang
2021-03-02 12:32     ` Qii Wang
2021-03-02 12:32     ` Qii Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.