diff mbox

[09/10] ARM: r8a779x: Add boot mode reg support

Message ID 1462778041-19595-10-git-send-email-dirk.behme@de.bosch.com (mailing list archive)
State Superseded
Delegated to: Simon Horman
Headers show

Commit Message

Dirk Behme May 9, 2016, 7:14 a.m. UTC
From: Dirk Behme <dirk.behme@gmail.com>

The boot mode register is a 32bit unsigned entity, the meaning of its values
are implementation dependent.

Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
---
 arch/arm/boot/dts/r8a7790.dtsi           | 5 +++++
 arch/arm/boot/dts/r8a7791.dtsi           | 5 +++++
 arch/arm/boot/dts/r8a7793.dtsi           | 5 +++++
 arch/arm/boot/dts/r8a7794.dtsi           | 6 ++++++
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 5 +++++
 arch/arm64/boot/dts/renesas/r8a7796.dtsi | 5 +++++
 6 files changed, 31 insertions(+)

Comments

Geert Uytterhoeven May 9, 2016, 7:44 a.m. UTC | #1
On Mon, May 9, 2016 at 9:14 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
> --- a/arch/arm/boot/dts/r8a7790.dtsi
> +++ b/arch/arm/boot/dts/r8a7790.dtsi
> @@ -1102,6 +1102,11 @@
>                         #power-domain-cells = <0>;
>                 };
>
> +               modemr: modemr@e6160060 {
> +                       compatible = "renesas,modemr";
> +                       reg = <0 0xe6160060 0 0x4>;
> +               };
> +

This should be a node for the complete RST module, not just for the RST module's
MODEMR register.

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
Dirk Behme May 9, 2016, 7:52 a.m. UTC | #2
On 09.05.2016 09:44, Geert Uytterhoeven wrote:
> On Mon, May 9, 2016 at 9:14 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
>> --- a/arch/arm/boot/dts/r8a7790.dtsi
>> +++ b/arch/arm/boot/dts/r8a7790.dtsi
>> @@ -1102,6 +1102,11 @@
>>                         #power-domain-cells = <0>;
>>                 };
>>
>> +               modemr: modemr@e6160060 {
>> +                       compatible = "renesas,modemr";
>> +                       reg = <0 0xe6160060 0 0x4>;
>> +               };
>> +
>
> This should be a node for the complete RST module, not just for the RST module's
> MODEMR register.


You mean

reset: reset@e6160000 {
         compatible = "renesas,reset";
         reg = <0 0xe6160000 0 0x200>;
};

and then use anything like

#define MODEMR 0x60

in the code?

Best regards

Dirk
Geert Uytterhoeven May 9, 2016, 7:54 a.m. UTC | #3
Hi Dirk,

On Mon, May 9, 2016 at 9:52 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
> On 09.05.2016 09:44, Geert Uytterhoeven wrote:
>>
>> On Mon, May 9, 2016 at 9:14 AM, Dirk Behme <dirk.behme@de.bosch.com>
>> wrote:
>>>
>>> --- a/arch/arm/boot/dts/r8a7790.dtsi
>>> +++ b/arch/arm/boot/dts/r8a7790.dtsi
>>> @@ -1102,6 +1102,11 @@
>>>                         #power-domain-cells = <0>;
>>>                 };
>>>
>>> +               modemr: modemr@e6160060 {
>>> +                       compatible = "renesas,modemr";
>>> +                       reg = <0 0xe6160060 0 0x4>;
>>> +               };
>>> +
>>
>>
>> This should be a node for the complete RST module, not just for the RST
>> module's
>> MODEMR register.
>
>
>
> You mean
>
> reset: reset@e6160000 {
>         compatible = "renesas,reset";
>         reg = <0 0xe6160000 0 0x200>;
> };
>
> and then use anything like
>
> #define MODEMR 0x60
>
> in the code?

Yes, more or less:

        reset-controller@e6160000 {
                compatible = "renesas,r8a7795-rst";
                reg = <0 0xe6160000 0 0x0200>;
        };

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
Dirk Behme May 9, 2016, 7:57 a.m. UTC | #4
Hi Geert,

On 09.05.2016 09:54, Geert Uytterhoeven wrote:
> Hi Dirk,
>
> On Mon, May 9, 2016 at 9:52 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
>> On 09.05.2016 09:44, Geert Uytterhoeven wrote:
>>>
>>> On Mon, May 9, 2016 at 9:14 AM, Dirk Behme <dirk.behme@de.bosch.com>
>>> wrote:
>>>>
>>>> --- a/arch/arm/boot/dts/r8a7790.dtsi
>>>> +++ b/arch/arm/boot/dts/r8a7790.dtsi
>>>> @@ -1102,6 +1102,11 @@
>>>>                         #power-domain-cells = <0>;
>>>>                 };
>>>>
>>>> +               modemr: modemr@e6160060 {
>>>> +                       compatible = "renesas,modemr";
>>>> +                       reg = <0 0xe6160060 0 0x4>;
>>>> +               };
>>>> +
>>>
>>>
>>> This should be a node for the complete RST module, not just for the RST
>>> module's
>>> MODEMR register.
>>
>>
>>
>> You mean
>>
>> reset: reset@e6160000 {
>>         compatible = "renesas,reset";
>>         reg = <0 0xe6160000 0 0x200>;
>> };
>>
>> and then use anything like
>>
>> #define MODEMR 0x60
>>
>> in the code?
>
> Yes, more or less:
>
>         reset-controller@e6160000 {
>                 compatible = "renesas,r8a7795-rst";


Hmm, do we really want the r8a7795 here? Then we would need

r8a7790-rst
r8a7791-rst
r8a7792-rst
r8a7793-rst
r8a7794-rst
r8a7795-rst
r8a7796-rst
...

?


Best regards

Dirk
Geert Uytterhoeven May 9, 2016, 7:58 a.m. UTC | #5
On Mon, May 9, 2016 at 9:57 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
>>         reset-controller@e6160000 {
>>                 compatible = "renesas,r8a7795-rst";
>
> Hmm, do we really want the r8a7795 here? Then we would need
>
> r8a7790-rst
> r8a7791-rst
> r8a7792-rst
> r8a7793-rst
> r8a7794-rst
> r8a7795-rst
> r8a7796-rst

We can add fallback values "renesas,rcar-gen2-rst" and "renesas,rcar-gen3-rst".

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
Simon Horman May 12, 2016, 4:21 a.m. UTC | #6
On Mon, May 09, 2016 at 09:58:32AM +0200, Geert Uytterhoeven wrote:
> On Mon, May 9, 2016 at 9:57 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
> >>         reset-controller@e6160000 {
> >>                 compatible = "renesas,r8a7795-rst";
> >
> > Hmm, do we really want the r8a7795 here? Then we would need
> >
> > r8a7790-rst
> > r8a7791-rst
> > r8a7792-rst
> > r8a7793-rst
> > r8a7794-rst
> > r8a7795-rst
> > r8a7796-rst
> 
> We can add fallback values "renesas,rcar-gen2-rst" and "renesas,rcar-gen3-rst".

+1

This is the scheme we have been using (more and more) consistently
for Renesas hardware.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 83cf23c..3f775b0 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -1102,6 +1102,11 @@ 
 			#power-domain-cells = <0>;
 		};
 
+		modemr: modemr@e6160060 {
+			compatible = "renesas,modemr";
+			reg = <0 0xe6160060 0 0x4>;
+		};
+
 		/* Variable factor clocks */
 		sd2_clk: sd2@e6150078 {
 			compatible = "renesas,r8a7790-div6-clock", "renesas,cpg-div6-clock";
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index db67e34..e1cd497 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -1122,6 +1122,11 @@ 
 			#power-domain-cells = <0>;
 		};
 
+		modemr: modemr@e6160060 {
+			compatible = "renesas,modemr";
+			reg = <0 0xe6160060 0 0x4>;
+		};
+
 		/* Variable factor clocks */
 		sd2_clk: sd2@e6150078 {
 			compatible = "renesas,r8a7791-div6-clock", "renesas,cpg-div6-clock";
diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
index 1dd6d20..683f11d 100644
--- a/arch/arm/boot/dts/r8a7793.dtsi
+++ b/arch/arm/boot/dts/r8a7793.dtsi
@@ -933,6 +933,11 @@ 
 			#power-domain-cells = <0>;
 		};
 
+		modemr: modemr@e6160060 {
+			compatible = "renesas,modemr";
+			reg = <0 0xe6160060 0 0x4>;
+		};
+
 		/* Variable factor clocks */
 		sd2_clk: sd2@e6150078 {
 			compatible = "renesas,r8a7793-div6-clock",
diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index f334a3a..f849306 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -932,6 +932,12 @@ 
 					     "rcan";
 			#power-domain-cells = <0>;
 		};
+
+		modemr: modemr@e6160060 {
+			compatible = "renesas,modemr";
+			reg = <0 0xe6160060 0 0x4>;
+		};
+
 		/* Variable factor clocks */
 		sd2_clk: sd2@e6150078 {
 			compatible = "renesas,r8a7794-div6-clock", "renesas,cpg-div6-clock";
diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index 7181db0..2b957a8 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -309,6 +309,11 @@ 
 			#power-domain-cells = <0>;
 		};
 
+		modemr: modemr@e6160060 {
+			compatible = "renesas,modemr";
+			reg = <0 0xe6160060 0 0x4>;
+		};
+
 		sysc: system-controller@e6180000 {
 			compatible = "renesas,r8a7795-sysc";
 			reg = <0 0xe6180000 0 0x0400>;
diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
index 1389528..4a9054c 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
@@ -109,6 +109,11 @@ 
 			#power-domain-cells = <0>;
 		};
 
+		modemr: modemr@e6160060 {
+			compatible = "renesas,modemr";
+			reg = <0 0xe6160060 0 0x4>;
+		};
+
 		sysc: system-controller@e6180000 {
 			compatible = "renesas,r8a7796-sysc";
 			reg = <0 0xe6180000 0 0x0400>;