diff mbox series

arm64: dts: renesas: r9a07g043: Add ADC node

Message ID 20220505184353.512133-1-biju.das.jz@bp.renesas.com (mailing list archive)
State Mainlined
Commit 6b4d2c1b03e7eca6c5fd7ec879e8c3859395109d
Delegated to: Geert Uytterhoeven
Headers show
Series arm64: dts: renesas: r9a07g043: Add ADC node | expand

Commit Message

Biju Das May 5, 2022, 6:43 p.m. UTC
Add ADC node to R9A07G043 (RZ/G2UL) SoC DTSI.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

Comments

Sergei Shtylyov May 10, 2022, 8:18 a.m. UTC | #1
Hello!

On 5/5/22 9:43 PM, Biju Das wrote:

> Add ADC node to R9A07G043 (RZ/G2UL) SoC DTSI.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
>  arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 21 ++++++++++++++++++++-
>  1 file changed, 20 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
> index b31fb713ae4d..40201a16d653 100644
> --- a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
> @@ -483,8 +483,27 @@ i2c3: i2c@10058c00 {
>  		};
>  
>  		adc: adc@10059000 {
> +			compatible = "renesas,r9a07g043-adc", "renesas,rzg2l-adc";
>  			reg = <0 0x10059000 0 0x400>;
> -			/* place holder */
> +			interrupts = <GIC_SPI 347 IRQ_TYPE_EDGE_RISING>;
> +			clocks = <&cpg CPG_MOD R9A07G043_ADC_ADCLK>,
> +				 <&cpg CPG_MOD R9A07G043_ADC_PCLK>;
> +			clock-names = "adclk", "pclk";
> +			resets = <&cpg R9A07G043_ADC_PRESETN>,
> +				 <&cpg R9A07G043_ADC_ADRST_N>;
> +			reset-names = "presetn", "adrst-n";

   Not "adrst_n"?

[...]

MBR, Sergey
Biju Das May 10, 2022, 8:24 a.m. UTC | #2
Hi Sergei,

> Subject: Re: [PATCH] arm64: dts: renesas: r9a07g043: Add ADC node
> 
> Hello!
> 
> On 5/5/22 9:43 PM, Biju Das wrote:
> 
> > Add ADC node to R9A07G043 (RZ/G2UL) SoC DTSI.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> >  arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 21 ++++++++++++++++++++-
> >  1 file changed, 20 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
> b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
> > index b31fb713ae4d..40201a16d653 100644
> > --- a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
> > @@ -483,8 +483,27 @@ i2c3: i2c@10058c00 {
> >  		};
> >
> >  		adc: adc@10059000 {
> > +			compatible = "renesas,r9a07g043-adc", "renesas,rzg2l-
> adc";
> >  			reg = <0 0x10059000 0 0x400>;
> > -			/* place holder */
> > +			interrupts = <GIC_SPI 347 IRQ_TYPE_EDGE_RISING>;
> > +			clocks = <&cpg CPG_MOD R9A07G043_ADC_ADCLK>,
> > +				 <&cpg CPG_MOD R9A07G043_ADC_PCLK>;
> > +			clock-names = "adclk", "pclk";
> > +			resets = <&cpg R9A07G043_ADC_PRESETN>,
> > +				 <&cpg R9A07G043_ADC_ADRST_N>;
> > +			reset-names = "presetn", "adrst-n";
> 
>    Not "adrst_n"?

As per bindings[1], it is correct ie, "adrst-n"

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/iio/adc/renesas,rzg2l-adc.yaml?h=next-20220509#n51

Cheers,
Biju
Sergey Shtylyov May 10, 2022, 9:09 a.m. UTC | #3
On 5/10/22 11:24 AM, Biju Das wrote:
[...]

>>> Add ADC node to R9A07G043 (RZ/G2UL) SoC DTSI.
>>>
>>> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
>>> ---
>>>  arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 21 ++++++++++++++++++++-
>>>  1 file changed, 20 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
>> b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
>>> index b31fb713ae4d..40201a16d653 100644
>>> --- a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
>>> +++ b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
>>> @@ -483,8 +483,27 @@ i2c3: i2c@10058c00 {
>>>  		};
>>>
>>>  		adc: adc@10059000 {
>>> +			compatible = "renesas,r9a07g043-adc", "renesas,rzg2l-
>> adc";
>>>  			reg = <0 0x10059000 0 0x400>;
>>> -			/* place holder */
>>> +			interrupts = <GIC_SPI 347 IRQ_TYPE_EDGE_RISING>;
>>> +			clocks = <&cpg CPG_MOD R9A07G043_ADC_ADCLK>,
>>> +				 <&cpg CPG_MOD R9A07G043_ADC_PCLK>;
>>> +			clock-names = "adclk", "pclk";
>>> +			resets = <&cpg R9A07G043_ADC_PRESETN>,
>>> +				 <&cpg R9A07G043_ADC_ADRST_N>;
>>> +			reset-names = "presetn", "adrst-n";
>>
>>    Not "adrst_n"?
> 
> As per bindings[1], it is correct ie, "adrst-n"
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/iio/adc/renesas,rzg2l-adc.yaml?h=next-20220509#n51

   Then I think the bindings aren't actually correct. But nevermind... :-)

> Cheers,
> Biju

MBR, Sergey
Biju Das May 10, 2022, 9:15 a.m. UTC | #4
Hi Sergei,

Thanks for the feedback.

> Subject: Re: [PATCH] arm64: dts: renesas: r9a07g043: Add ADC node
> 
> On 5/10/22 11:24 AM, Biju Das wrote:
> [...]
> 
> >>> Add ADC node to R9A07G043 (RZ/G2UL) SoC DTSI.
> >>>
> >>> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> >>> ---
> >>>  arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 21 ++++++++++++++++++++-
> >>>  1 file changed, 20 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
> >> b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
> >>> index b31fb713ae4d..40201a16d653 100644
> >>> --- a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
> >>> +++ b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
> >>> @@ -483,8 +483,27 @@ i2c3: i2c@10058c00 {
> >>>  		};
> >>>
> >>>  		adc: adc@10059000 {
> >>> +			compatible = "renesas,r9a07g043-adc", "renesas,rzg2l-
> >> adc";
> >>>  			reg = <0 0x10059000 0 0x400>;
> >>> -			/* place holder */
> >>> +			interrupts = <GIC_SPI 347 IRQ_TYPE_EDGE_RISING>;
> >>> +			clocks = <&cpg CPG_MOD R9A07G043_ADC_ADCLK>,
> >>> +				 <&cpg CPG_MOD R9A07G043_ADC_PCLK>;
> >>> +			clock-names = "adclk", "pclk";
> >>> +			resets = <&cpg R9A07G043_ADC_PRESETN>,
> >>> +				 <&cpg R9A07G043_ADC_ADRST_N>;
> >>> +			reset-names = "presetn", "adrst-n";
> >>
> >>    Not "adrst_n"?
> >
> > As per bindings[1], it is correct ie, "adrst-n"
> >
> >
> 
>    Then I think the bindings aren't actually correct. But nevermind... :-)

Why do you think it is not correct? What difference it make, changing from 
adrst-n->adrst_n? Is it violating any DT specification?

Please clarify.

Regards,
Biju
Sergey Shtylyov May 10, 2022, 6:36 p.m. UTC | #5
On 5/10/22 12:15 PM, Biju Das wrote:
[...]

>>>>> Add ADC node to R9A07G043 (RZ/G2UL) SoC DTSI.
>>>>>
>>>>> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
>>>>> ---
>>>>>  arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 21 ++++++++++++++++++++-
>>>>>  1 file changed, 20 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
>>>> b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
>>>>> index b31fb713ae4d..40201a16d653 100644
>>>>> --- a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
>>>>> +++ b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
>>>>> @@ -483,8 +483,27 @@ i2c3: i2c@10058c00 {
>>>>>  		};
>>>>>
>>>>>  		adc: adc@10059000 {
>>>>> +			compatible = "renesas,r9a07g043-adc", "renesas,rzg2l-
>>>> adc";
>>>>>  			reg = <0 0x10059000 0 0x400>;
>>>>> -			/* place holder */
>>>>> +			interrupts = <GIC_SPI 347 IRQ_TYPE_EDGE_RISING>;
>>>>> +			clocks = <&cpg CPG_MOD R9A07G043_ADC_ADCLK>,
>>>>> +				 <&cpg CPG_MOD R9A07G043_ADC_PCLK>;
>>>>> +			clock-names = "adclk", "pclk";
>>>>> +			resets = <&cpg R9A07G043_ADC_PRESETN>,
>>>>> +				 <&cpg R9A07G043_ADC_ADRST_N>;
>>>>> +			reset-names = "presetn", "adrst-n";
>>>>
>>>>    Not "adrst_n"?
>>>
>>> As per bindings[1], it is correct ie, "adrst-n"
>>
>>    Then I think the bindings aren't actually correct. But nevermind... :-)
> 
> Why do you think it is not correct? What difference it make, changing from 
> adrst-n->adrst_n? Is it violating any DT specification?
> 
> Please clarify.

   No, I don't think this violates the DT spec. It just doesn't feel right to
convert underscores to hyphens in the "reset-names" prop...

> Regards,
> Biju

MBR, Sergey
Biju Das May 11, 2022, 5:52 a.m. UTC | #6
Hi Sergei,

> Subject: Re: [PATCH] arm64: dts: renesas: r9a07g043: Add ADC node
> 
> On 5/10/22 12:15 PM, Biju Das wrote:
> [...]
> 
> >>>>> Add ADC node to R9A07G043 (RZ/G2UL) SoC DTSI.
> >>>>>
> >>>>> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> >>>>> ---
> >>>>>  arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 21
> >>>>> ++++++++++++++++++++-
> >>>>>  1 file changed, 20 insertions(+), 1 deletion(-)
> >>>>>
> >>>>> diff --git a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
> >>>> b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
> >>>>> index b31fb713ae4d..40201a16d653 100644
> >>>>> --- a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
> >>>>> +++ b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
> >>>>> @@ -483,8 +483,27 @@ i2c3: i2c@10058c00 {
> >>>>>  		};
> >>>>>
> >>>>>  		adc: adc@10059000 {
> >>>>> +			compatible = "renesas,r9a07g043-adc",
> "renesas,rzg2l-
> >>>> adc";
> >>>>>  			reg = <0 0x10059000 0 0x400>;
> >>>>> -			/* place holder */
> >>>>> +			interrupts = <GIC_SPI 347 IRQ_TYPE_EDGE_RISING>;
> >>>>> +			clocks = <&cpg CPG_MOD R9A07G043_ADC_ADCLK>,
> >>>>> +				 <&cpg CPG_MOD R9A07G043_ADC_PCLK>;
> >>>>> +			clock-names = "adclk", "pclk";
> >>>>> +			resets = <&cpg R9A07G043_ADC_PRESETN>,
> >>>>> +				 <&cpg R9A07G043_ADC_ADRST_N>;
> >>>>> +			reset-names = "presetn", "adrst-n";
> >>>>
> >>>>    Not "adrst_n"?
> >>>
> >>> As per bindings[1], it is correct ie, "adrst-n"
> >>
> >>    Then I think the bindings aren't actually correct. But
> >> nevermind... :-)
> >
> > Why do you think it is not correct? What difference it make, changing
> > from
> > adrst-n->adrst_n? Is it violating any DT specification?
> >
> > Please clarify.
> 
>    No, I don't think this violates the DT spec. It just doesn't feel right
> to convert underscores to hyphens in the "reset-names" prop...

Ok, Thanks for clarification, since it is not violating any Spec,
It is just matter of personal taste.

Cheers,
BIju
Geert Uytterhoeven May 17, 2022, 8:14 a.m. UTC | #7
On Thu, May 5, 2022 at 8:44 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Add ADC node to R9A07G043 (RZ/G2UL) SoC DTSI.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v5.20.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
index b31fb713ae4d..40201a16d653 100644
--- a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi
@@ -483,8 +483,27 @@  i2c3: i2c@10058c00 {
 		};
 
 		adc: adc@10059000 {
+			compatible = "renesas,r9a07g043-adc", "renesas,rzg2l-adc";
 			reg = <0 0x10059000 0 0x400>;
-			/* place holder */
+			interrupts = <GIC_SPI 347 IRQ_TYPE_EDGE_RISING>;
+			clocks = <&cpg CPG_MOD R9A07G043_ADC_ADCLK>,
+				 <&cpg CPG_MOD R9A07G043_ADC_PCLK>;
+			clock-names = "adclk", "pclk";
+			resets = <&cpg R9A07G043_ADC_PRESETN>,
+				 <&cpg R9A07G043_ADC_ADRST_N>;
+			reset-names = "presetn", "adrst-n";
+			power-domains = <&cpg>;
+			status = "disabled";
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			channel@0 {
+				reg = <0>;
+			};
+			channel@1 {
+				reg = <1>;
+			};
 		};
 
 		tsu: thermal@10059400 {