diff mbox series

[1/4] dt-binds: display: mediatek: add property to control mipi tx drive current

Message ID 20191216082937.119164-2-jitao.shi@mediatek.com (mailing list archive)
State New, archived
Headers show
Series Config mipi tx drive current and impedance | expand

Commit Message

Jitao Shi Dec. 16, 2019, 8:29 a.m. UTC
Add a property to control mipi tx drive current:
"mipitx-current-drive"

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
---
 .../devicetree/bindings/display/mediatek/mediatek,dsi.txt     | 4 ++++
 1 file changed, 4 insertions(+)

Comments

CK Hu (胡俊光) Dec. 18, 2019, 5:41 a.m. UTC | #1
Hi, Jitao:

On Mon, 2019-12-16 at 16:29 +0800, Jitao Shi wrote:
> Add a property to control mipi tx drive current:
> "mipitx-current-drive"
> 
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
>  .../devicetree/bindings/display/mediatek/mediatek,dsi.txt     | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt
> index a19a6cc375ed..780201ddcd5c 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt
> @@ -33,6 +33,9 @@ Required properties:
>  - #clock-cells: must be <0>;
>  - #phy-cells: must be <0>.
>  
> +Optional properties:
> +- mipitx-current-drive: adjust driving current, should be 1 ~ 0xF
> +

In "[PATCH 3/4] drm/mediatek: add the mipitx driving control" [1], I see
that you actually control a register its name is MIPITX_VOLTAGE_SEL, so
I guess this control the voltage. If mipi_tx has the ability to control
the voltage, could we just treat mipi_tx as a regulator? For a
regulator, regulator-min-microvolt and regulator-max-microvolt would
limit the volt range and you could get it by
of_get_regulator_init_data(). If it actually control the current,
regulator-min-microamp and regulator-max-microamp could be used. I'm not
expert on this, so please give me more information on this.

[1]
http://lists.infradead.org/pipermail/linux-mediatek/2019-December/025638.html

Regards,
CK

>  Example:
>  
>  mipi_tx0: mipi-dphy@10215000 {
> @@ -42,6 +45,7 @@ mipi_tx0: mipi-dphy@10215000 {
>  	clock-output-names = "mipi_tx0_pll";
>  	#clock-cells = <0>;
>  	#phy-cells = <0>;
> +	mipitx-current-drive = <0x8>;
>  };
>  
>  dsi0: dsi@1401b000 {
Jitao Shi Feb. 25, 2020, 11:42 a.m. UTC | #2
On Wed, 2019-12-18 at 13:41 +0800, CK Hu wrote:
> Hi, Jitao:
> 
> On Mon, 2019-12-16 at 16:29 +0800, Jitao Shi wrote:
> > Add a property to control mipi tx drive current:
> > "mipitx-current-drive"
> > 
> > Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> > ---
> >  .../devicetree/bindings/display/mediatek/mediatek,dsi.txt     | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt
> > index a19a6cc375ed..780201ddcd5c 100644
> > --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt
> > +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt
> > @@ -33,6 +33,9 @@ Required properties:
> >  - #clock-cells: must be <0>;
> >  - #phy-cells: must be <0>.
> >  
> > +Optional properties:
> > +- mipitx-current-drive: adjust driving current, should be 1 ~ 0xF
> > +
> 
> In "[PATCH 3/4] drm/mediatek: add the mipitx driving control" [1], I see
> that you actually control a register its name is MIPITX_VOLTAGE_SEL, so
> I guess this control the voltage. If mipi_tx has the ability to control
> the voltage, could we just treat mipi_tx as a regulator? For a
> regulator, regulator-min-microvolt and regulator-max-microvolt would
> limit the volt range and you could get it by
> of_get_regulator_init_data(). If it actually control the current,
> regulator-min-microamp and regulator-max-microamp could be used. I'm not
> expert on this, so please give me more information on this.
> 
> [1]
> http://lists.infradead.org/pipermail/linux-mediatek/2019-December/025638.html
> 
> Regards,
> CK
> 

'MIPITX_VOLTAGE_SEL' is the whole 32bit name.
mipitx-current-drive is just bit[9:6] RG_DSI_HSTX_LDO_REF_SEL,

Not for voltage.

Best Regards
Jitao

> >  Example:
> >  
> >  mipi_tx0: mipi-dphy@10215000 {
> > @@ -42,6 +45,7 @@ mipi_tx0: mipi-dphy@10215000 {
> >  	clock-output-names = "mipi_tx0_pll";
> >  	#clock-cells = <0>;
> >  	#phy-cells = <0>;
> > +	mipitx-current-drive = <0x8>;
> >  };
> >  
> >  dsi0: dsi@1401b000 {
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt
index a19a6cc375ed..780201ddcd5c 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt
@@ -33,6 +33,9 @@  Required properties:
 - #clock-cells: must be <0>;
 - #phy-cells: must be <0>.
 
+Optional properties:
+- mipitx-current-drive: adjust driving current, should be 1 ~ 0xF
+
 Example:
 
 mipi_tx0: mipi-dphy@10215000 {
@@ -42,6 +45,7 @@  mipi_tx0: mipi-dphy@10215000 {
 	clock-output-names = "mipi_tx0_pll";
 	#clock-cells = <0>;
 	#phy-cells = <0>;
+	mipitx-current-drive = <0x8>;
 };
 
 dsi0: dsi@1401b000 {