[PATCH v1 2/6] dt-bindings: reset: mt8188: Add reset control bits for VDOSYS1

Hsiao Chien Sung posted 6 patches 1 year, 3 months ago
There is a newer version of this series
[PATCH v1 2/6] dt-bindings: reset: mt8188: Add reset control bits for VDOSYS1
Posted by Hsiao Chien Sung 1 year, 3 months ago
Add reset control bits for  MT8188 VDOSYS1.

Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
---
 include/dt-bindings/reset/mt8188-resets.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/dt-bindings/reset/mt8188-resets.h b/include/dt-bindings/reset/mt8188-resets.h
index 377cdfda82a9..439a9a25ca19 100644
--- a/include/dt-bindings/reset/mt8188-resets.h
+++ b/include/dt-bindings/reset/mt8188-resets.h
@@ -33,4 +33,16 @@

 #define MT8188_TOPRGU_SW_RST_NUM               24

+/* VDOSYS1 */
+#define MT8188_VDO1_RST_MERGE0_DL_ASYNC         9
+#define MT8188_VDO1_RST_MERGE1_DL_ASYNC         10
+#define MT8188_VDO1_RST_MERGE2_DL_ASYNC         11
+#define MT8188_VDO1_RST_MERGE3_DL_ASYNC         32
+#define MT8188_VDO1_RST_MERGE4_DL_ASYNC         33
+#define MT8188_VDO1_RST_HDR_VDO_FE0_DL_ASYNC    64
+#define MT8188_VDO1_RST_HDR_GFX_FE0_DL_ASYNC    65
+#define MT8188_VDO1_RST_HDR_VDO_BE_DL_ASYNC     66
+#define MT8188_VDO1_RST_HDR_VDO_FE1_DL_ASYNC    80
+#define MT8188_VDO1_RST_HDR_GFX_FE1_DL_ASYNC    81
+
 #endif  /* _DT_BINDINGS_RESET_CONTROLLER_MT8188 */
--
2.18.0
Re: [PATCH v1 2/6] dt-bindings: reset: mt8188: Add reset control bits for VDOSYS1
Posted by AngeloGioacchino Del Regno 1 year, 3 months ago
Il 07/06/23 08:11, Hsiao Chien Sung ha scritto:
> Add reset control bits for  MT8188 VDOSYS1.
> 
> Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
> ---
>   include/dt-bindings/reset/mt8188-resets.h | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> diff --git a/include/dt-bindings/reset/mt8188-resets.h b/include/dt-bindings/reset/mt8188-resets.h
> index 377cdfda82a9..439a9a25ca19 100644
> --- a/include/dt-bindings/reset/mt8188-resets.h
> +++ b/include/dt-bindings/reset/mt8188-resets.h
> @@ -33,4 +33,16 @@
> 
>   #define MT8188_TOPRGU_SW_RST_NUM               24
> 
> +/* VDOSYS1 */
> +#define MT8188_VDO1_RST_MERGE0_DL_ASYNC         9

Sorry, I've just noticed that there's no index 0 in previous definitions: this
is wrong, it must start from 0 and must be sequential.
Re: [PATCH v1 2/6] dt-bindings: reset: mt8188: Add reset control bits for VDOSYS1
Posted by Shawn Sung (宋孝謙) 1 year, 3 months ago
Hi AngeloGioacchino,

Should I use enum instead of #define if reset ID must starts from 0?

Thanks,
Hsiao Chien Sung

On Wed, 2023-06-07 at 09:51 +0200, AngeloGioacchino Del Regno wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  
> Il 07/06/23 08:11, Hsiao Chien Sung ha scritto:
> > Add reset control bits for  MT8188 VDOSYS1.
> > 
> > Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
> > ---
> >   include/dt-bindings/reset/mt8188-resets.h | 12 ++++++++++++
> >   1 file changed, 12 insertions(+)
> > 
> > diff --git a/include/dt-bindings/reset/mt8188-resets.h
> b/include/dt-bindings/reset/mt8188-resets.h
> > index 377cdfda82a9..439a9a25ca19 100644
> > --- a/include/dt-bindings/reset/mt8188-resets.h
> > +++ b/include/dt-bindings/reset/mt8188-resets.h
> > @@ -33,4 +33,16 @@
> > 
> >   #define MT8188_TOPRGU_SW_RST_NUM               24
> > 
> > +/* VDOSYS1 */
> > +#define MT8188_VDO1_RST_MERGE0_DL_ASYNC         9
> 
> Sorry, I've just noticed that there's no index 0 in previous
> definitions: this
> is wrong, it must start from 0 and must be sequential.
> 
> 
Re: [PATCH v1 2/6] dt-bindings: reset: mt8188: Add reset control bits for VDOSYS1
Posted by Krzysztof Kozlowski 1 year, 3 months ago
On 08/06/2023 05:01, Shawn Sung (宋孝謙) wrote:
> Hi AngeloGioacchino,
> 
> Should I use enum instead of #define if reset ID must starts from 0?

Open existing bindings (there are many, many files) which will give you
the answer. It will be faster than asking us and you will learn something.

Best regards,
Krzysztof

Re: [PATCH v1 2/6] dt-bindings: reset: mt8188: Add reset control bits for VDOSYS1
Posted by Shawn Sung (宋孝謙) 1 year, 3 months ago
Update:

It seems device tree doesn't accept enum.
I'll use #define here.

On Thu, 2023-06-08 at 11:01 +0800, shawn.sung wrote:
> Hi AngeloGioacchino,
> 
> Should I use enum instead of #define if reset ID must starts from 0?
> 
> Thanks,
> Hsiao Chien Sung
> 
> On Wed, 2023-06-07 at 09:51 +0200, AngeloGioacchino Del Regno wrote:
> >  	 
> > External email : Please do not click links or open attachments
> > until
> > you have verified the sender or the content.
> >  
> > Il 07/06/23 08:11, Hsiao Chien Sung ha scritto:
> > > Add reset control bits for  MT8188 VDOSYS1.
> > > 
> > > Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
> > > ---
> > >   include/dt-bindings/reset/mt8188-resets.h | 12 ++++++++++++
> > >   1 file changed, 12 insertions(+)
> > > 
> > > diff --git a/include/dt-bindings/reset/mt8188-resets.h
> > 
> > b/include/dt-bindings/reset/mt8188-resets.h
> > > index 377cdfda82a9..439a9a25ca19 100644
> > > --- a/include/dt-bindings/reset/mt8188-resets.h
> > > +++ b/include/dt-bindings/reset/mt8188-resets.h
> > > @@ -33,4 +33,16 @@
> > > 
> > >   #define MT8188_TOPRGU_SW_RST_NUM               24
> > > 
> > > +/* VDOSYS1 */
> > > +#define MT8188_VDO1_RST_MERGE0_DL_ASYNC         9
> > 
> > Sorry, I've just noticed that there's no index 0 in previous
> > definitions: this
> > is wrong, it must start from 0 and must be sequential.
> > 
> > 
Re: [PATCH v1 2/6] dt-bindings: reset: mt8188: Add reset control bits for VDOSYS1
Posted by AngeloGioacchino Del Regno 1 year, 3 months ago
Il 07/06/23 08:11, Hsiao Chien Sung ha scritto:
> Add reset control bits for  MT8188 VDOSYS1.
> 
> Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Re: [PATCH v1 2/6] dt-bindings: reset: mt8188: Add reset control bits for VDOSYS1
Posted by Krzysztof Kozlowski 1 year, 3 months ago
On 07/06/2023 08:11, Hsiao Chien Sung wrote:
> Add reset control bits for  MT8188 VDOSYS1.

Double space -> one space.

> 
> Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
> ---
>  include/dt-bindings/reset/mt8188-resets.h | 12 ++++++++++++

This should be squashed with patch adding compatible.


>  1 file changed, 12 insertions(+)
> 
> diff --git a/include/dt-bindings/reset/mt8188-resets.h b/include/dt-bindings/reset/mt8188-resets.h
> index 377cdfda82a9..439a9a25ca19 100644
> --- a/include/dt-bindings/reset/mt8188-resets.h
> +++ b/include/dt-bindings/reset/mt8188-resets.h
> @@ -33,4 +33,16 @@
> 
>  #define MT8188_TOPRGU_SW_RST_NUM               24
> 
> +/* VDOSYS1 */
> +#define MT8188_VDO1_RST_MERGE0_DL_ASYNC         9

Indices start from 0.

> +#define MT8188_VDO1_RST_MERGE1_DL_ASYNC         10
> +#define MT8188_VDO1_RST_MERGE2_DL_ASYNC         11
> +#define MT8188_VDO1_RST_MERGE3_DL_ASYNC         32

... and are continuous.

Commit explains here nothing that it is for existing reset, so you got
such review.

Best regards,
Krzysztof
Re: [PATCH v1 2/6] dt-bindings: reset: mt8188: Add reset control bits for VDOSYS1
Posted by Shawn Sung (宋孝謙) 1 year, 3 months ago
Hi Krzysztof,

Got it, I'll squash this commit with the one adds compatible, and
commit another patch to modify mmsys reset control to handle the new
rule of indexing.

Thanks,
Hsiao Chien Sung

On Wed, 2023-06-07 at 09:27 +0200, Krzysztof Kozlowski wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  
> On 07/06/2023 08:11, Hsiao Chien Sung wrote:
> > Add reset control bits for  MT8188 VDOSYS1.
> 
> Double space -> one space.
> 
> > 
> > Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
> > ---
> >  include/dt-bindings/reset/mt8188-resets.h | 12 ++++++++++++
> 
> This should be squashed with patch adding compatible.
> 
> 
> >  1 file changed, 12 insertions(+)
> > 
> > diff --git a/include/dt-bindings/reset/mt8188-resets.h
> b/include/dt-bindings/reset/mt8188-resets.h
> > index 377cdfda82a9..439a9a25ca19 100644
> > --- a/include/dt-bindings/reset/mt8188-resets.h
> > +++ b/include/dt-bindings/reset/mt8188-resets.h
> > @@ -33,4 +33,16 @@
> > 
> >  #define MT8188_TOPRGU_SW_RST_NUM               24
> > 
> > +/* VDOSYS1 */
> > +#define MT8188_VDO1_RST_MERGE0_DL_ASYNC         9
> 
> Indices start from 0.
> 
> > +#define MT8188_VDO1_RST_MERGE1_DL_ASYNC         10
> > +#define MT8188_VDO1_RST_MERGE2_DL_ASYNC         11
> > +#define MT8188_VDO1_RST_MERGE3_DL_ASYNC         32
> 
> ... and are continuous.
> 
> Commit explains here nothing that it is for existing reset, so you
> got
> such review.
> 
> Best regards,
> Krzysztof
>