Skip to contentSkip to conversation

Add PWM and TPU support to r8a7743

PATCH Applied Fabrizio Castro 5 participants 17 messages Dec 19, 2017 – Mar 27, 2018 2 messages not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v3 cover Add PWM and TPU support to r8a7743

Dear All,

this series includes all that is required to add PWM and TPU SoC specific support for the r8a7743.

Thanks,

Fabrizio Castro (5):
ARM: shmobile: defconfig: Enable PWM
dt-bindings: pwm: rcar: Document r8a774[35] PWM bindings
ARM: dts: r8a7743: Add PWM SoC support
dt-bindings: pwm: renesas-tpu: Document r8a774[35] support
ARM: dts: r8a7743: Add TPU support

 .../devicetree/bindings/pwm/renesas,pwm-rcar.txt   | 10 ++-
 .../devicetree/bindings/pwm/renesas,tpu-pwm.txt    |  4 +-
 arch/arm/boot/dts/r8a7743.dtsi                     | 80 ++++++++++++++++++++++
 arch/arm/configs/shmobile_defconfig                |  1 +
 4 files changed, 91 insertions(+), 4 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH v3 1/5 ARM: shmobile: defconfig: Enable PWM

RZ/G1 and R-Car platforms have PWM timers. This patch enables PWM support by default.

---
v2->v3:
* No change

 arch/arm/configs/shmobile_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/shmobile_defconfig +1 -0
index d60dbe1..578434c 100644
@@ -208,6 +208,7 @@ CONFIG_STAGING_BOARD=y
 CONFIG_IIO=y
 CONFIG_AK8975=y
 CONFIG_PWM=y
+CONFIG_PWM_RCAR=y
 CONFIG_PWM_RENESAS_TPU=y
 CONFIG_GENERIC_PHY=y
 CONFIG_PHY_RCAR_GEN2=y
Signature · 1 line
2.7.4

A message that is not in the archive (sent off-list or not yet received): 1513690500-12165-1-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/[email protected]

#4 lore raw

PATCH v3 2/5 dt-bindings: pwm: rcar: Document r8a774[35] PWM bindings

This patch adds compatible strings specific to r8a774[35], no driver change is needed as the fallback compatible string will activate the right code. Also, this patch replaces the example with a DT snippet used for adding PWM0 support to an r8a7743 based platform.

---
v2->v3:
* No change

 Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt +7 -3
index 74c1180..f3bba59 100644
@@ -2,6 +2,8 @@
 
 Required Properties:
 - compatible: should be "renesas,pwm-rcar" and one of the following.
+ - "renesas,pwm-r8a7743": for RZ/G1M
+ - "renesas,pwm-r8a7745": for RZ/G1E
  - "renesas,pwm-r8a7778": for R-Car M1A
  - "renesas,pwm-r8a7779": for R-Car H1
  - "renesas,pwm-r8a7790": for R-Car H2
@@ -17,13 +19,15 @@ Required Properties:
 - pinctrl-0: phandle, referring to a default pin configuration node.
 - pinctrl-names: Set to "default".
 
-Example: R8A7790 (R-Car H2) PWM Timer node
+Example: R8A7743 (RZ/G1M) PWM Timer node
 
 	pwm0: pwm@e6e30000 {
-		compatible = "renesas,pwm-r8a7790", "renesas,pwm-rcar";
+		compatible = "renesas,pwm-r8a7743", "renesas,pwm-rcar";
 		reg = <0 0xe6e30000 0 0x8>;
+		clocks = <&cpg CPG_MOD 523>;
+		power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+		resets = <&cpg 523>;
 		#pwm-cells = <2>;
-		clocks = <&mstp5_clks R8A7790_CLK_PWM>;
 		pinctrl-0 = <&pwm0_pins>;
 		pinctrl-names = "default";
 	};
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw

Re: [PATCH v3 2/5] dt-bindings: pwm: rcar: Document r8a774[35] PWM bindings

Quoted 4 lines · Fabrizio Castro

This patch adds compatible strings specific to r8a774[35], no driver change is needed as the fallback compatible string will activate the right code. Also, this patch replaces the example with a DT snippet used for adding PWM0 support to an r8a7743 based platform.

What is the motivation for updating the example?
Could it be stated here?

#6 lore raw

RE: [PATCH v3 2/5] dt-bindings: pwm: rcar: Document r8a774[35] PWM bindings

Hello Simon,

Quoted 9 lines

Subject: Re: [PATCH v3 2/5] dt-bindings: pwm: rcar: Document r8a774[35] PWM bindings

Quoted 4 lines · Fabrizio Castro

This patch adds compatible strings specific to r8a774[35], no driver change is needed as the fallback compatible string will activate the right code. Also, this patch replaces the example with a DT snippet used for adding PWM0 support to an r8a7743 based platform.

What is the motivation for updating the example?

I am sorry I forgot to copy the explanation across from the first version of the patch:
https://patchwork.kernel.org/patch/10111831/

"the reason for replacing the example with one of a different SoC is that the new example refers to recent code from a real use case. I hope that's ok."

Basically the r8a7743 will be the first platform with full upstream support, and I believe it is better to have up-to-date examples proven to work in the documentation.

Quoted 1 line

Could it be stated here?

Shall I send a new version for this?

Thanks,
Fab

[https://www2.renesas.eu/media/email/unicef_2017.jpg]

This Christmas, instead of sending out cards, Renesas Electronics Europe have decided to support Unicef with a donation. For further details click here<https://www.unicef.org/> to find out about the valuable work they do, helping children all over the world. We would like to take this opportunity to wish you a Merry Christmas and a prosperous New Year.

Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

#7 lore raw

Re: [PATCH v3 2/5] dt-bindings: pwm: rcar: Document r8a774[35] PWM bindings

Quoted 12 lines · Fabrizio Castro

Hello Simon,

Quoted 9 lines

Subject: Re: [PATCH v3 2/5] dt-bindings: pwm: rcar: Document r8a774[35] PWM bindings

Quoted 4 lines · Fabrizio Castro

This patch adds compatible strings specific to r8a774[35], no driver change is needed as the fallback compatible string will activate the right code. Also, this patch replaces the example with a DT snippet used for adding PWM0 support to an r8a7743 based platform.

What is the motivation for updating the example?

Quoted 7 lines

I am sorry I forgot to copy the explanation across from the first version of the patch:
https://patchwork.kernel.org/patch/10111831/

"the reason for replacing the example with one of a different SoC is that the new example refers to recent code from a real use case. I hope that's ok."

Basically the r8a7743 will be the first platform with full upstream support, and I believe it is better to have up-to-date examples proven to work in the documentation.

Thanks, that sounds reasonable.

Quoted 4 lines
Quoted 2 lines

Could it be stated here?

Shall I send a new version for this?

That would be best in my opinion.

#8 lore raw

RE: [PATCH v3 2/5] dt-bindings: pwm: rcar: Document r8a774[35] PWM bindings

Hello Simon,

Quoted 24 lines

Subject: Re: [PATCH v3 2/5] dt-bindings: pwm: rcar: Document r8a774[35] PWM bindings

Quoted 12 lines · Fabrizio Castro

Hello Simon,

Quoted 9 lines

Subject: Re: [PATCH v3 2/5] dt-bindings: pwm: rcar: Document r8a774[35] PWM bindings

Quoted 4 lines · Fabrizio Castro

This patch adds compatible strings specific to r8a774[35], no driver change is needed as the fallback compatible string will activate the right code. Also, this patch replaces the example with a DT snippet used for adding PWM0 support to an r8a7743 based platform.

What is the motivation for updating the example?

Quoted 7 lines

I am sorry I forgot to copy the explanation across from the first version of the patch:
https://patchwork.kernel.org/patch/10111831/

"the reason for replacing the example with one of a different SoC is that the new example refers to recent code from a real use case. I hope that's ok."

Basically the r8a7743 will be the first platform with full upstream support, and I believe it is better to have up-to-date examples

proven to work in the documentation.

Quoted 8 lines

Thanks, that sounds reasonable.

Quoted 4 lines
Quoted 2 lines

Could it be stated here?

Shall I send a new version for this?

That would be best in my opinion.

Thank you for your feedback, I'll send a new version separately (not in the context of this series anymore as the pending patches from this series are dt-bindings related) to enhance the changelog.

Cheers,
Fab

[https://www2.renesas.eu/media/email/unicef_2017.jpg]

This Christmas, instead of sending out cards, Renesas Electronics Europe have decided to support Unicef with a donation. For further details click here<https://www.unicef.org/> to find out about the valuable work they do, helping children all over the world. We would like to take this opportunity to wish you a Merry Christmas and a prosperous New Year.

Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

#9 lore raw

PATCH v3 3/5 ARM: dts: r8a7743: Add PWM SoC support

In reply to Fabrizio Castro

Add the definitions for pwm[0123456] to the SoC .dtsi.

---
v2->v3:
* pwm[0123456] compatible definitions don't wrap anymore

 arch/arm/boot/dts/r8a7743.dtsi | 70 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)
arch/arm/boot/dts/r8a7743.dtsi +70 -0
index 6a6c40c..282ba5a 100644
@@ -1082,6 +1082,76 @@
 			status = "disabled";
 		};
 
+		pwm0: pwm at e6e30000 {
+			compatible = "renesas,pwm-r8a7743", "renesas,pwm-rcar";
+			reg = <0 0xe6e30000 0 0x8>;
+			clocks = <&cpg CPG_MOD 523>;
+			power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+			resets = <&cpg 523>;
+			#pwm-cells = <2>;
+			status = "disabled";
+		};
+
+		pwm1: pwm at e6e31000 {
+			compatible = "renesas,pwm-r8a7743", "renesas,pwm-rcar";
+			reg = <0 0xe6e31000 0 0x8>;
+			clocks = <&cpg CPG_MOD 523>;
+			power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+			resets = <&cpg 523>;
+			#pwm-cells = <2>;
+			status = "disabled";
+		};
+
+		pwm2: pwm at e6e32000 {
+			compatible = "renesas,pwm-r8a7743", "renesas,pwm-rcar";
+			reg = <0 0xe6e32000 0 0x8>;
+			clocks = <&cpg CPG_MOD 523>;
+			power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+			resets = <&cpg 523>;
+			#pwm-cells = <2>;
+			status = "disabled";
+		};
+
+		pwm3: pwm at e6e33000 {
+			compatible = "renesas,pwm-r8a7743", "renesas,pwm-rcar";
+			reg = <0 0xe6e33000 0 0x8>;
+			clocks = <&cpg CPG_MOD 523>;
+			power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+			resets = <&cpg 523>;
+			#pwm-cells = <2>;
+			status = "disabled";
+		};
+
+		pwm4: pwm at e6e34000 {
+			compatible = "renesas,pwm-r8a7743", "renesas,pwm-rcar";
+			reg = <0 0xe6e34000 0 0x8>;
+			clocks = <&cpg CPG_MOD 523>;
+			power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+			resets = <&cpg 523>;
+			#pwm-cells = <2>;
+			status = "disabled";
+		};
+
+		pwm5: pwm at e6e35000 {
+			compatible = "renesas,pwm-r8a7743", "renesas,pwm-rcar";
+			reg = <0 0xe6e35000 0 0x8>;
+			clocks = <&cpg CPG_MOD 523>;
+			power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+			resets = <&cpg 523>;
+			#pwm-cells = <2>;
+			status = "disabled";
+		};
+
+		pwm6: pwm at e6e36000 {
+			compatible = "renesas,pwm-r8a7743", "renesas,pwm-rcar";
+			reg = <0 0xe6e36000 0 0x8>;
+			clocks = <&cpg CPG_MOD 523>;
+			power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+			resets = <&cpg 523>;
+			#pwm-cells = <2>;
+			status = "disabled";
+		};
+
 		sdhi0: sd at ee100000 {
 			compatible = "renesas,sdhi-r8a7743",
 				     "renesas,rcar-gen2-sdhi";
Signature · 1 line
2.7.4
#11 lore raw

PATCH v3 4/5 dt-bindings: pwm: renesas-tpu: Document r8a774[35] support

In reply to Fabrizio Castro

Document r8a774[35] specific compatible strings. No driver change is needed as the fallback compatible string "renesas,tpu" activates the right code in the driver.

---
v2->v3:
* No change

 Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.txt +3 -1
index 1aadc80..16e5748 100644
@@ -5,8 +5,10 @@ Required Properties:
   - compatible: should be one of the following.
     - "renesas,tpu-r8a73a4": for R8A77A4 (R-Mobile APE6) compatible PWM controller.
     - "renesas,tpu-r8a7740": for R8A7740 (R-Mobile A1) compatible PWM controller.
+    - "renesas,tpu-r8a7743": for R8A7743 (RZ/G1M) compatible PWM controller.
+    - "renesas,tpu-r8a7745": for R8A7745 (RZ/G1E) compatible PWM controller.
     - "renesas,tpu-r8a7790": for R8A7790 (R-Car H2) compatible PWM controller.
-    - "renesas,tpu": for generic R-Car TPU PWM controller.
+    - "renesas,tpu": for generic R-Car and RZ/G1 TPU PWM controller.
 
   - reg: Base address and length of each memory resource used by the PWM
     controller hardware module.
Signature · 1 line
2.7.4

A message that is not in the archive (sent off-list or not yet received): 1513690500-12165-5-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/[email protected]

Reviewed-by
#13 lore raw

Re: [PATCH v3 4/5] dt-bindings: pwm: renesas-tpu: Document r8a774[35] support

Quoted 11 lines · Fabrizio Castro

Document r8a774[35] specific compatible strings. No driver change is needed as the fallback compatible string "renesas,tpu" activates the right code in the driver.

---
v2->v3:
* No change

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#14 lore raw

RE: [PATCH v3 4/5] dt-bindings: pwm: renesas-tpu: Document r8a774[35] support

In reply to Fabrizio Castro

Hello Thierry,

I am sorry to bother you, just wondering if this patch has any chance to end up in v4.16?

Thanks,
Fabrizio

Quoted 35 lines

Subject: [PATCH v3 4/5] dt-bindings: pwm: renesas-tpu: Document r8a774[35] support

Document r8a774[35] specific compatible strings. No driver change is needed as the fallback compatible string "renesas,tpu" activates the right code in the driver.

---
v2->v3:
* No change

 Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.txt +3 -2
index 1aadc80..16e5748 100644
@@ -5,8 +5,10 @@ Required Properties:
   - compatible: should be one of the following.
     - "renesas,tpu-r8a73a4": for R8A77A4 (R-Mobile APE6) compatible PWM controller.
     - "renesas,tpu-r8a7740": for R8A7740 (R-Mobile A1) compatible PWM controller.
+    - "renesas,tpu-r8a7743": for R8A7743 (RZ/G1M) compatible PWM controller.
+    - "renesas,tpu-r8a7745": for R8A7745 (RZ/G1E) compatible PWM controller.
     - "renesas,tpu-r8a7790": for R8A7790 (R-Car H2) compatible PWM controller.
-    - "renesas,tpu": for generic R-Car TPU PWM controller.
+    - "renesas,tpu": for generic R-Car and RZ/G1 TPU PWM controller.
 
   - reg: Base address and length of each memory resource used by the PWM
     controller hardware module.
--
Quoted 1 line

2.7.4

Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

#15 lore raw

RE: [PATCH v3 4/5] dt-bindings: pwm: renesas-tpu: Document r8a774[35] support

Dear All,

same thing for this one, can someone take this patch?

Thanks,
Fab

Quoted 49 lines

-----Original Message-----
From: Fabrizio Castro
Sent: 24 January 2018 17:17
To: Thierry Reding <[email protected]>
Cc: [email protected]; [email protected]; Simon Horman <[email protected]>; Geert Uytterhoeven <[email protected]>; Chris Paterson <[email protected]>; Biju Das <[email protected]>; linux-renesas- [email protected]; Fabrizio Castro <[email protected]>; Mark Rutland <[email protected]>; Rob Herring <[email protected]>
Subject: RE: [PATCH v3 4/5] dt-bindings: pwm: renesas-tpu: Document r8a774[35] support

Hello Thierry,

I am sorry to bother you, just wondering if this patch has any chance to end up in v4.16?

Thanks,
Fabrizio

Quoted 32 lines

Subject: [PATCH v3 4/5] dt-bindings: pwm: renesas-tpu: Document r8a774[35] support

Document r8a774[35] specific compatible strings. No driver change is needed as the fallback compatible string "renesas,tpu" activates the right code in the driver.

---
v2->v3:
* No change

 Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.txt +3 -1
index 1aadc80..16e5748 100644
@@ -5,8 +5,10 @@ Required Properties:
   - compatible: should be one of the following.
     - "renesas,tpu-r8a73a4": for R8A77A4 (R-Mobile APE6) compatible PWM controller.
     - "renesas,tpu-r8a7740": for R8A7740 (R-Mobile A1) compatible PWM controller.
+    - "renesas,tpu-r8a7743": for R8A7743 (RZ/G1M) compatible PWM controller.
+    - "renesas,tpu-r8a7745": for R8A7745 (RZ/G1E) compatible PWM controller.
     - "renesas,tpu-r8a7790": for R8A7790 (R-Car H2) compatible PWM controller.
-    - "renesas,tpu": for generic R-Car TPU PWM controller.
+    - "renesas,tpu": for generic R-Car and RZ/G1 TPU PWM controller.
 
Quoted 4 lines
Quoted 4 lines
Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.txt +0 -1
   - reg: Base address and length of each memory resource used by the PWM
     controller hardware module.
--

2.7.4

Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

#16 lore raw

Re: [PATCH v3 4/5] dt-bindings: pwm: renesas-tpu: Document r8a774[35] support

In reply to Fabrizio Castro
Quoted 8 lines · Fabrizio Castro

Document r8a774[35] specific compatible strings. No driver change is needed as the fallback compatible string "renesas,tpu" activates the right code in the driver.

Quoted 6 lines

---
v2->v3:
* No change

 Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Applied, thanks.

Thierry

#17 lore raw

PATCH v3 5/5 ARM: dts: r8a7743: Add TPU support

In reply to Fabrizio Castro

Add TPU support to SoC DT.

---
v2->v3:
* No change

 arch/arm/boot/dts/r8a7743.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/r8a7743.dtsi +10 -0
index 282ba5a..f24f36d 100644
@@ -1152,6 +1152,16 @@
 			status = "disabled";
 		};
 
+		tpu: pwm at e60f0000 {
+			compatible = "renesas,tpu-r8a7743", "renesas,tpu";
+			reg = <0 0xe60f0000 0 0x148>;
+			clocks = <&cpg CPG_MOD 304>;
+			power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+			resets = <&cpg 304>;
+			#pwm-cells = <3>;
+			status = "disabled";
+		};
+
 		sdhi0: sd at ee100000 {
 			compatible = "renesas,sdhi-r8a7743",
 				     "renesas,rcar-gen2-sdhi";
Signature · 1 line
2.7.4