This patch series adds support for PWM for DRA7. The IP is the same as the
one present in AM33XX and AM437XX.
However, before doing so remove unnecessary hwmod entries for eCAP, ePWM
and eQEP.
The following are the biggest changes from v6 to v7:
* Several patches to document previously undocumented bindings.
* Fix minor issues in binding documents.
The following are the biggest changes from v5 to v6:
* Created two new bindings to allow ECAP and PWM to grab their functional
clock from DT rather than depending on PWMSS parent.
* Pull in a couple of patches from the "Correct PWM bindings" series. This
makes it a bit easier to understand.
>From the two patchsets a handful of patches have already been pulled in by
maintainers and have already made it to linux-next. Therefore, this
patch series is built ontop of the latest linux-next.
Tested on:
AM335x, AM437x and X15 + lcd w/backlight
Franklin S Cooper Jr (8):
clk: ti: am335x/am4372: Add tbclk to pwm node
ARM: dts: am437x: Add missing compatibles to PWM binding documents
pwm: pwm-tiehrpwm: Update dt binding document to use generic node name
pwm: pwm-tiecap: Update dt binding document to use proper unit address
ARM: dts: am437x/am33xx/da850: Add new ECAP and EPWM bindings
pwms: pwm-ti*: Get the clock from the PWMSS parent when using old
bindings
ARM: dts: am437x/am33xx: Remove hwmod entries for ECAP and EPWM nodes
ARM: AM335x/AM437x: hwmod: Remove eQEP, ePWM and eCAP hwmod entries
Vignesh R (1):
ARM: dts: DRA7: Add dt nodes for PWMSS
.../devicetree/bindings/pwm/pwm-tiecap.txt | 36 +++++++--
.../devicetree/bindings/pwm/pwm-tiehrpwm.txt | 36 +++++++--
.../devicetree/bindings/pwm/pwm-tipwmss.txt | 33 +++++++-
arch/arm/boot/dts/am33xx.dtsi | 36 ++++++---
arch/arm/boot/dts/am4372.dtsi | 63 ++++++++++-----
arch/arm/boot/dts/da850.dtsi | 15 ++--
arch/arm/boot/dts/dra7.dtsi | 90 ++++++++++++++++++++++
.../mach-omap2/omap_hwmod_33xx_43xx_common_data.h | 18 -----
.../omap_hwmod_33xx_43xx_interconnect_data.c | 64 ---------------
.../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 84 --------------------
arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 9 ---
arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 54 -------------
drivers/clk/ti/clk-33xx.c | 3 +
drivers/clk/ti/clk-43xx.c | 6 ++
drivers/pwm/pwm-tiecap.c | 7 ++
drivers/pwm/pwm-tiehrpwm.c | 7 ++
16 files changed, 279 insertions(+), 282 deletions(-)
--
2.7.0
There are several SOC specific compatibles for ECAP, EHRPWM and PWMMS
that are in use but aren't properly documented. Therefore, fix this
by adding the compatibles to the appropriate binding documents.
While at it make minor corrections to the binding document.
Signed-off-by: Franklin S Cooper Jr <[email protected]>
---
.../devicetree/bindings/pwm/pwm-tiecap.txt | 12 ++++++++++--
.../devicetree/bindings/pwm/pwm-tiehrpwm.txt | 12 ++++++++++--
.../devicetree/bindings/pwm/pwm-tipwmss.txt | 21 +++++++++++++++++++--
3 files changed, 39 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
index fb81179..788da6c 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
@@ -2,8 +2,9 @@ TI SOC ECAP based APWM controller
Required properties:
- compatible: Must be "ti,<soc>-ecap".
- for am33xx - compatible = "ti,am33xx-ecap";
- for da850 - compatible = "ti,da850-ecap", "ti,am33xx-ecap";
+ for am33xx - compatible = "ti,am33xx-ecap";
+ for am4372 - compatible = "ti,am4372-ecap", "ti,am33xx-ecap";
+ for da850 - compatible = "ti,da850-ecap", "ti,am33xx-ecap";
- #pwm-cells: should be 3. See pwm.txt in this directory for a description of
the cells format. The PWM channel index ranges from 0 to 4. The only third
cell flag supported by this binding is PWM_POLARITY_INVERTED.
@@ -22,6 +23,13 @@ ecap0: ecap@0 { /* ECAP on am33xx */
ti,hwmods = "ecap0";
};
+ecap0: ecap@0 { /* ECAP on am4372 */
+ compatible = "ti,am4372-ecap", "ti,am33xx-ecap";
+ #pwm-cells = <3>;
+ reg = <0x48300100 0x80>;
+ ti,hwmods = "ecap0";
+};
+
ecap0: ecap@0 { /* ECAP on da850 */
compatible = "ti,da850-ecap", "ti,am33xx-ecap";
#pwm-cells = <3>;
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
index 9c100b2..99b544f 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
@@ -2,8 +2,9 @@ TI SOC EHRPWM based PWM controller
Required properties:
- compatible: Must be "ti,<soc>-ehrpwm".
- for am33xx - compatible = "ti,am33xx-ehrpwm";
- for da850 - compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
+ for am33xx - compatible = "ti,am33xx-ehrpwm";
+ for am4372 - compatible = "ti,am4372-ehrpwm", "ti,am33xx-ehrpwm";
+ for da850 - compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
- #pwm-cells: should be 3. See pwm.txt in this directory for a description of
the cells format. The only third cell flag supported by this binding is
PWM_POLARITY_INVERTED.
@@ -22,6 +23,13 @@ ehrpwm0: ehrpwm@0 { /* EHRPWM on am33xx */
ti,hwmods = "ehrpwm0";
};
+ehrpwm0: ehrpwm@0 { /* EHRPWM on am4372 */
+ compatible = "ti,am4372-ehrpwm", "ti,am33xx-ehrpwm";
+ #pwm-cells = <3>;
+ reg = <0x48300200 0x80>;
+ ti,hwmods = "ehrpwm0";
+};
+
ehrpwm0: ehrpwm@0 { /* EHRPWM on da850 */
compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt b/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
index f7eae77..fd8e87c 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
@@ -1,7 +1,10 @@
TI SOC based PWM Subsystem
Required properties:
-- compatible: Must be "ti,am33xx-pwmss";
+- compatible: Must be "ti,<soc>-pwmss".
+ for am33xx - compatible = "ti,am33xx-pwmss";
+ for am4372 - compatible = "ti,am4372-pwmss","ti,am33xx-pwmss";
+
- reg: physical base address and size of the registers map.
- address-cells: Specify the number of u32 entries needed in child nodes.
Should set to 1.
@@ -16,7 +19,7 @@ Required properties:
Also child nodes should also populated under PWMSS DT node.
Example:
-pwmss0: pwmss@48300000 {
+epwmss0: epwmss@48300000 { /* PWMSS for am33xx */
compatible = "ti,am33xx-pwmss";
reg = <0x48300000 0x10>;
ti,hwmods = "epwmss0";
@@ -29,3 +32,17 @@ pwmss0: pwmss@48300000 {
/* child nodes go here */
};
+
+epwmss0: epwmss@48300000 { /* PWMSS for am4372 */
+ compatible = "ti,am4372-pwmss","ti,am33xx-pwmss"
+ reg = <0x48300000 0x10>;
+ ti,hwmods = "epwmss0";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ status = "disabled";
+ ranges = <0x48300100 0x48300100 0x80 /* ECAP */
+ 0x48300180 0x48300180 0x80 /* EQEP */
+ 0x48300200 0x48300200 0x80>; /* EHRPWM */
+
+ /* child nodes go here */
+};
--
2.7.0
Switch to a new ECAP and EPWM bindings that doesn't depend on hwmod to
provide the various required clocks.
For AM437 and AM335x, add the required clocks explicitly to DT. The
hwmod entries for ECAP and EPWM will be removed and this will prevent
anything from breaking.
Signed-off-by: Franklin S Cooper Jr <[email protected]>
---
.../devicetree/bindings/pwm/pwm-tiecap.txt | 18 +++++---
.../devicetree/bindings/pwm/pwm-tiehrpwm.txt | 18 +++++---
arch/arm/boot/dts/am33xx.dtsi | 30 +++++++++---
arch/arm/boot/dts/am4372.dtsi | 54 ++++++++++++++++++----
arch/arm/boot/dts/da850.dtsi | 15 ++++--
5 files changed, 103 insertions(+), 32 deletions(-)
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
index 1b7eec5..76cf322 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
@@ -2,9 +2,9 @@ TI SOC ECAP based APWM controller
Required properties:
- compatible: Must be "ti,<soc>-ecap".
- for am33xx - compatible = "ti,am33xx-ecap";
- for am4372 - compatible = "ti,am4372-ecap", "ti,am33xx-ecap";
- for da850 - compatible = "ti,da850-ecap", "ti,am33xx-ecap";
+ for am33xx - compatible = "ti,am3352-ecap", "ti,am33xx-ecap";
+ for am4372 - compatible = "ti,am4372-ecap", "ti,am3352-ecap", "ti,am33xx-ecap";
+ for da850 - compatible = "ti,da850-ecap", "ti,am3352-ecap", "ti,am33xx-ecap";
- #pwm-cells: should be 3. See pwm.txt in this directory for a description of
the cells format. The PWM channel index ranges from 0 to 4. The only third
cell flag supported by this binding is PWM_POLARITY_INVERTED.
@@ -13,25 +13,31 @@ Required properties:
Optional properties:
- ti,hwmods: Name of the hwmod associated to the ECAP:
"ecap<x>", <x> being the 0-based instance number from the HW spec
+- clocks: Handle to the ECAP's functional clock.
+- clock-names: Must be set to "fck".
Example:
ecap0: ecap@48300100 { /* ECAP on am33xx */
- compatible = "ti,am33xx-ecap";
+ compatible = "ti,am3352-ecap", "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x48300100 0x80>;
ti,hwmods = "ecap0";
+ clocks = <&l4ls_gclk>;
+ clock-names = "fck";
};
ecap0: ecap@48300100 { /* ECAP on am4372 */
- compatible = "ti,am4372-ecap", "ti,am33xx-ecap";
+ compatible = "ti,am4372-ecap", "ti,am3352-ecap", "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x48300100 0x80>;
ti,hwmods = "ecap0";
+ clocks = <&l4ls_gclk>;
+ clock-names = "fck";
};
ecap0: ecap@1f06000 { /* ECAP on da850 */
- compatible = "ti,da850-ecap", "ti,am33xx-ecap";
+ compatible = "ti,da850-ecap", "ti,am3352-ecap", "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x306000 0x80>;
};
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
index cbc538b..87ef528 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
@@ -2,9 +2,9 @@ TI SOC EHRPWM based PWM controller
Required properties:
- compatible: Must be "ti,<soc>-ehrpwm".
- for am33xx - compatible = "ti,am33xx-ehrpwm";
- for am4372 - compatible = "ti,am4372-ehrpwm", "ti,am33xx-ehrpwm";
- for da850 - compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
+ for am33xx - compatible = "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
+ for am4372 - compatible = "ti,am4372-ehrpwm", "ti-am3352-ehrpwm", "ti,am33xx-ehrpwm";
+ for da850 - compatible = "ti,da850-ehrpwm", "ti-am3352-ehrpwm", "ti,am33xx-ehrpwm";
- #pwm-cells: should be 3. See pwm.txt in this directory for a description of
the cells format. The only third cell flag supported by this binding is
PWM_POLARITY_INVERTED.
@@ -13,25 +13,31 @@ Required properties:
Optional properties:
- ti,hwmods: Name of the hwmod associated to the EHRPWM:
"ehrpwm<x>", <x> being the 0-based instance number from the HW spec
+- clocks: Handle to the PWM's time-base and functional clock.
+- clock-names: Must be set to "tbclk" and "fck".
Example:
ehrpwm0: pwm@48300200 { /* EHRPWM on am33xx */
- compatible = "ti,am33xx-ehrpwm";
+ compatible = "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48300200 0x100>;
+ clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
+ clock-names = "tbclk", "fck";
ti,hwmods = "ehrpwm0";
};
ehrpwm0: pwm@48300200 { /* EHRPWM on am4372 */
- compatible = "ti,am4372-ehrpwm", "ti,am33xx-ehrpwm";
+ compatible = "ti,am4372-ehrpwm", "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48300200 0x80>;
+ clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
+ clock-names = "tbclk", "fck";
ti,hwmods = "ehrpwm0";
};
ehrpwm0: pwm@1f00000 { /* EHRPWM on da850 */
- compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
+ compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x300000 0x2000>;
};
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 52be48b..999ba2f 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -679,9 +679,12 @@
0x48300200 0x48300200 0x80>; /* EHRPWM */
ecap0: ecap@48300100 {
- compatible = "ti,am33xx-ecap";
+ compatible = "ti,am3352-ecap",
+ "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x48300100 0x80>;
+ clocks = <&l4ls_gclk>;
+ clock-names = "fck";
interrupts = <31>;
interrupt-names = "ecap0";
ti,hwmods = "ecap0";
@@ -689,10 +692,13 @@
};
ehrpwm0: pwm@48300200 {
- compatible = "ti,am33xx-ehrpwm";
+ compatible = "ti,am3352-ehrpwm",
+ "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48300200 0x80>;
ti,hwmods = "ehrpwm0";
+ clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
+ clock-names = "tbclk", "fck";
status = "disabled";
};
};
@@ -709,9 +715,12 @@
0x48302200 0x48302200 0x80>; /* EHRPWM */
ecap1: ecap@48302100 {
- compatible = "ti,am33xx-ecap";
+ compatible = "ti,am3352-ecap",
+ "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x48302100 0x80>;
+ clocks = <&l4ls_gclk>;
+ clock-names = "fck";
interrupts = <47>;
interrupt-names = "ecap1";
ti,hwmods = "ecap1";
@@ -719,10 +728,13 @@
};
ehrpwm1: pwm@48302200 {
- compatible = "ti,am33xx-ehrpwm";
+ compatible = "ti,am3352-ehrpwm",
+ "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48302200 0x80>;
ti,hwmods = "ehrpwm1";
+ clocks = <&ehrpwm1_tbclk>, <&l4ls_gclk>;
+ clock-names = "tbclk", "fck";
status = "disabled";
};
};
@@ -739,9 +751,12 @@
0x48304200 0x48304200 0x80>; /* EHRPWM */
ecap2: ecap@48304100 {
- compatible = "ti,am33xx-ecap";
+ compatible = "ti,am3352-ecap",
+ "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x48304100 0x80>;
+ clocks = <&l4ls_gclk>;
+ clock-names = "fck";
interrupts = <61>;
interrupt-names = "ecap2";
ti,hwmods = "ecap2";
@@ -749,10 +764,13 @@
};
ehrpwm2: pwm@48304200 {
- compatible = "ti,am33xx-ehrpwm";
+ compatible = "ti,am3352-ehrpwm",
+ "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48304200 0x80>;
ti,hwmods = "ehrpwm2";
+ clocks = <&ehrpwm2_tbclk>, <&l4ls_gclk>;
+ clock-names = "tbclk", "fck";
status = "disabled";
};
};
diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 12fcde4..e858460 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -672,18 +672,26 @@
status = "disabled";
ecap0: ecap@48300100 {
- compatible = "ti,am4372-ecap","ti,am33xx-ecap";
+ compatible = "ti,am4372-ecap",
+ "ti,am3352-ecap",
+ "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x48300100 0x80>;
ti,hwmods = "ecap0";
+ clocks = <&l4ls_gclk>;
+ clock-names = "fck";
status = "disabled";
};
ehrpwm0: pwm@48300200 {
- compatible = "ti,am4372-ehrpwm","ti,am33xx-ehrpwm";
+ compatible = "ti,am4372-ehrpwm",
+ "ti,am3352-ehrpwm",
+ "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48300200 0x80>;
ti,hwmods = "ehrpwm0";
+ clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
+ clock-names = "tbclk", "fck";
status = "disabled";
};
};
@@ -698,18 +706,26 @@
status = "disabled";
ecap1: ecap@48302100 {
- compatible = "ti,am4372-ecap","ti,am33xx-ecap";
+ compatible = "ti,am4372-ecap",
+ "ti,am3352-ecap",
+ "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x48302100 0x80>;
ti,hwmods = "ecap1";
+ clocks = <&l4ls_gclk>;
+ clock-names = "fck";
status = "disabled";
};
ehrpwm1: pwm@48302200 {
- compatible = "ti,am4372-ehrpwm","ti,am33xx-ehrpwm";
+ compatible = "ti,am4372-ehrpwm",
+ "ti,am3352-ehrpwm",
+ "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48302200 0x80>;
ti,hwmods = "ehrpwm1";
+ clocks = <&ehrpwm1_tbclk>, <&l4ls_gclk>;
+ clock-names = "tbclk", "fck";
status = "disabled";
};
};
@@ -724,18 +740,26 @@
status = "disabled";
ecap2: ecap@48304100 {
- compatible = "ti,am4372-ecap","ti,am33xx-ecap";
+ compatible = "ti,am4372-ecap",
+ "ti,am3352-ecap",
+ "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x48304100 0x80>;
+ clocks = <&l4ls_gclk>;
+ clock-names = "fck";
ti,hwmods = "ecap2";
status = "disabled";
};
ehrpwm2: pwm@48304200 {
- compatible = "ti,am4372-ehrpwm","ti,am33xx-ehrpwm";
+ compatible = "ti,am4372-ehrpwm",
+ "ti,am3352-ehrpwm",
+ "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48304200 0x80>;
ti,hwmods = "ehrpwm2";
+ clocks = <&ehrpwm2_tbclk>, <&l4ls_gclk>;
+ clock-names = "tbclk", "fck";
status = "disabled";
};
};
@@ -750,10 +774,14 @@
status = "disabled";
ehrpwm3: pwm@48306200 {
- compatible = "ti,am4372-ehrpwm","ti,am33xx-ehrpwm";
+ compatible = "ti,am4372-ehrpwm",
+ "ti,am3352-ehrpwm",
+ "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48306200 0x80>;
ti,hwmods = "ehrpwm3";
+ clocks = <&ehrpwm3_tbclk>, <&l4ls_gclk>;
+ clock-names = "tbclk", "fck";
status = "disabled";
};
};
@@ -768,10 +796,14 @@
status = "disabled";
ehrpwm4: pwm@48308200 {
- compatible = "ti,am4372-ehrpwm","ti,am33xx-ehrpwm";
+ compatible = "ti,am4372-ehrpwm",
+ "ti,am3352-ehrpwm",
+ "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48308200 0x80>;
ti,hwmods = "ehrpwm4";
+ clocks = <&ehrpwm4_tbclk>, <&l4ls_gclk>;
+ clock-names = "tbclk", "fck";
status = "disabled";
};
};
@@ -786,9 +818,13 @@
status = "disabled";
ehrpwm5: pwm@4830a200 {
- compatible = "ti,am4372-ehrpwm","ti,am33xx-ehrpwm";
+ compatible = "ti,am4372-ehrpwm",
+ "ti,am3352-ehrpwm",
+ "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x4830a200 0x80>;
+ clocks = <&ehrpwm5_tbclk>, <&l4ls_gclk>;
+ clock-names = "tbclk", "fck";
ti,hwmods = "ehrpwm5";
status = "disabled";
};
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index c3910e2..28a1064 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -248,31 +248,36 @@
status = "disabled";
};
ehrpwm0: pwm@01f00000 {
- compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
+ compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm",
+ "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x300000 0x2000>;
status = "disabled";
};
ehrpwm1: pwm@01f02000 {
- compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
+ compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm",
+ "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x302000 0x2000>;
status = "disabled";
};
ecap0: ecap@01f06000 {
- compatible = "ti,da850-ecap", "ti,am33xx-ecap";
+ compatible = "ti,da850-ecap", "ti,am3352-ecap",
+ "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x306000 0x80>;
status = "disabled";
};
ecap1: ecap@01f07000 {
- compatible = "ti,da850-ecap", "ti,am33xx-ecap";
+ compatible = "ti,da850-ecap", "ti,am3352-ecap",
+ "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x307000 0x80>;
status = "disabled";
};
ecap2: ecap@01f08000 {
- compatible = "ti,da850-ecap", "ti,am33xx-ecap";
+ compatible = "ti,da850-ecap", "ti,am3352-ecap",
+ "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x308000 0x80>;
status = "disabled";
--
2.7.0
When using the old eCAP and ePWM bindings for AM335x and AM437x the clock
can be retrieved from the PWMSS parent. Newer bindings will insure that
this clock is provided via device tree.
Therefore, update this driver to support the newer and older bindings. In
the case of the older binding being used give a warning.
Signed-off-by: Franklin S Cooper Jr <[email protected]>
---
drivers/pwm/pwm-tiecap.c | 7 +++++++
drivers/pwm/pwm-tiehrpwm.c | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c
index 616af76..a0833c8 100644
--- a/drivers/pwm/pwm-tiecap.c
+++ b/drivers/pwm/pwm-tiecap.c
@@ -195,6 +195,7 @@ static const struct pwm_ops ecap_pwm_ops = {
};
static const struct of_device_id ecap_of_match[] = {
+ { .compatible = "ti,am3352-ecap" },
{ .compatible = "ti,am33xx-ecap" },
{},
};
@@ -213,6 +214,12 @@ static int ecap_pwm_probe(struct platform_device *pdev)
return -ENOMEM;
clk = devm_clk_get(&pdev->dev, "fck");
+
+ if (IS_ERR(clk) && of_device_is_compatible(pdev->dev.of_node, "ti,am33xx-ecap")) {
+ dev_warn(&pdev->dev, "Binding is obsolete.\n");
+ clk = devm_clk_get(pdev->dev.parent, "fck");
+ }
+
if (IS_ERR(clk)) {
dev_err(&pdev->dev, "failed to get clock\n");
return PTR_ERR(clk);
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index 6a41e66..cee29a2 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -426,6 +426,7 @@ static const struct pwm_ops ehrpwm_pwm_ops = {
};
static const struct of_device_id ehrpwm_of_match[] = {
+ { .compatible = "ti,am3352-ehrpwm" },
{ .compatible = "ti,am33xx-ehrpwm" },
{},
};
@@ -444,6 +445,12 @@ static int ehrpwm_pwm_probe(struct platform_device *pdev)
return -ENOMEM;
clk = devm_clk_get(&pdev->dev, "fck");
+
+ if (IS_ERR(clk) && of_device_is_compatible(pdev->dev.of_node, "ti,am33xx-ecap")) {
+ dev_warn(&pdev->dev, "Binding is obsolete.\n");
+ clk = devm_clk_get(pdev->dev.parent, "fck");
+ }
+
if (IS_ERR(clk)) {
dev_err(&pdev->dev, "failed to get clock\n");
return PTR_ERR(clk);
--
2.7.0
Devices that utilize the OCP registers and/or PRCM registers and
register bit fields should be modeled using hwmod. Since eQEP, ePWM and
eCAP don't fall under this category, remove their hwmod entries.
Instead these clocks simply use the clock that is passed through by its
parent PWMSS. Therefore, PWMSS handles the clock for itself and its
subdevices.
Signed-off-by: Franklin S Cooper Jr <[email protected]>
Acked-by: Paul Walmsley <[email protected]>
---
.../mach-omap2/omap_hwmod_33xx_43xx_common_data.h | 18 -----
.../omap_hwmod_33xx_43xx_interconnect_data.c | 64 -----------------
.../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 84 ----------------------
arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 9 ---
arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 54 --------------
5 files changed, 229 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h
index 7f73796..d3e61d1 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h
@@ -36,17 +36,8 @@ extern struct omap_hwmod_ocp_if am33xx_l4_per__gpio3;
extern struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio;
extern struct omap_hwmod_ocp_if am33xx_l4_ls__elm;
extern struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss0;
-extern struct omap_hwmod_ocp_if am33xx_epwmss0__ecap0;
-extern struct omap_hwmod_ocp_if am33xx_epwmss0__eqep0;
-extern struct omap_hwmod_ocp_if am33xx_epwmss0__ehrpwm0;
extern struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss1;
-extern struct omap_hwmod_ocp_if am33xx_epwmss1__ecap1;
-extern struct omap_hwmod_ocp_if am33xx_epwmss1__eqep1;
-extern struct omap_hwmod_ocp_if am33xx_epwmss1__ehrpwm1;
extern struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss2;
-extern struct omap_hwmod_ocp_if am33xx_epwmss2__ecap2;
-extern struct omap_hwmod_ocp_if am33xx_epwmss2__eqep2;
-extern struct omap_hwmod_ocp_if am33xx_epwmss2__ehrpwm2;
extern struct omap_hwmod_ocp_if am33xx_l3_s__gpmc;
extern struct omap_hwmod_ocp_if am33xx_l4_per__i2c2;
extern struct omap_hwmod_ocp_if am33xx_l4_per__i2c3;
@@ -98,17 +89,8 @@ extern struct omap_hwmod am33xx_dcan0_hwmod;
extern struct omap_hwmod am33xx_dcan1_hwmod;
extern struct omap_hwmod am33xx_elm_hwmod;
extern struct omap_hwmod am33xx_epwmss0_hwmod;
-extern struct omap_hwmod am33xx_ecap0_hwmod;
-extern struct omap_hwmod am33xx_eqep0_hwmod;
-extern struct omap_hwmod am33xx_ehrpwm0_hwmod;
extern struct omap_hwmod am33xx_epwmss1_hwmod;
-extern struct omap_hwmod am33xx_ecap1_hwmod;
-extern struct omap_hwmod am33xx_eqep1_hwmod;
-extern struct omap_hwmod am33xx_ehrpwm1_hwmod;
extern struct omap_hwmod am33xx_epwmss2_hwmod;
-extern struct omap_hwmod am33xx_ecap2_hwmod;
-extern struct omap_hwmod am33xx_eqep2_hwmod;
-extern struct omap_hwmod am33xx_ehrpwm2_hwmod;
extern struct omap_hwmod am33xx_gpio1_hwmod;
extern struct omap_hwmod am33xx_gpio2_hwmod;
extern struct omap_hwmod am33xx_gpio3_hwmod;
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c
index 1c210cb..10dff2f 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c
@@ -176,28 +176,6 @@ struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss0 = {
.user = OCP_USER_MPU,
};
-struct omap_hwmod_ocp_if am33xx_epwmss0__ecap0 = {
- .master = &am33xx_epwmss0_hwmod,
- .slave = &am33xx_ecap0_hwmod,
- .clk = "l4ls_gclk",
- .user = OCP_USER_MPU,
-};
-
-struct omap_hwmod_ocp_if am33xx_epwmss0__eqep0 = {
- .master = &am33xx_epwmss0_hwmod,
- .slave = &am33xx_eqep0_hwmod,
- .clk = "l4ls_gclk",
- .user = OCP_USER_MPU,
-};
-
-struct omap_hwmod_ocp_if am33xx_epwmss0__ehrpwm0 = {
- .master = &am33xx_epwmss0_hwmod,
- .slave = &am33xx_ehrpwm0_hwmod,
- .clk = "l4ls_gclk",
- .user = OCP_USER_MPU,
-};
-
-
static struct omap_hwmod_addr_space am33xx_epwmss1_addr_space[] = {
{
.pa_start = 0x48302000,
@@ -215,27 +193,6 @@ struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss1 = {
.user = OCP_USER_MPU,
};
-struct omap_hwmod_ocp_if am33xx_epwmss1__ecap1 = {
- .master = &am33xx_epwmss1_hwmod,
- .slave = &am33xx_ecap1_hwmod,
- .clk = "l4ls_gclk",
- .user = OCP_USER_MPU,
-};
-
-struct omap_hwmod_ocp_if am33xx_epwmss1__eqep1 = {
- .master = &am33xx_epwmss1_hwmod,
- .slave = &am33xx_eqep1_hwmod,
- .clk = "l4ls_gclk",
- .user = OCP_USER_MPU,
-};
-
-struct omap_hwmod_ocp_if am33xx_epwmss1__ehrpwm1 = {
- .master = &am33xx_epwmss1_hwmod,
- .slave = &am33xx_ehrpwm1_hwmod,
- .clk = "l4ls_gclk",
- .user = OCP_USER_MPU,
-};
-
static struct omap_hwmod_addr_space am33xx_epwmss2_addr_space[] = {
{
.pa_start = 0x48304000,
@@ -253,27 +210,6 @@ struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss2 = {
.user = OCP_USER_MPU,
};
-struct omap_hwmod_ocp_if am33xx_epwmss2__ecap2 = {
- .master = &am33xx_epwmss2_hwmod,
- .slave = &am33xx_ecap2_hwmod,
- .clk = "l4ls_gclk",
- .user = OCP_USER_MPU,
-};
-
-struct omap_hwmod_ocp_if am33xx_epwmss2__eqep2 = {
- .master = &am33xx_epwmss2_hwmod,
- .slave = &am33xx_eqep2_hwmod,
- .clk = "l4ls_gclk",
- .user = OCP_USER_MPU,
-};
-
-struct omap_hwmod_ocp_if am33xx_epwmss2__ehrpwm2 = {
- .master = &am33xx_epwmss2_hwmod,
- .slave = &am33xx_ehrpwm2_hwmod,
- .clk = "l4ls_gclk",
- .user = OCP_USER_MPU,
-};
-
/* l3s cfg -> gpmc */
struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
.master = &am33xx_l3_s_hwmod,
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
index aed3362..6a73b6c 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
@@ -449,18 +449,6 @@ struct omap_hwmod_class am33xx_epwmss_hwmod_class = {
.sysc = &am33xx_epwmss_sysc,
};
-static struct omap_hwmod_class am33xx_ecap_hwmod_class = {
- .name = "ecap",
-};
-
-static struct omap_hwmod_class am33xx_eqep_hwmod_class = {
- .name = "eqep",
-};
-
-struct omap_hwmod_class am33xx_ehrpwm_hwmod_class = {
- .name = "ehrpwm",
-};
-
/* epwmss0 */
struct omap_hwmod am33xx_epwmss0_hwmod = {
.name = "epwmss0",
@@ -474,30 +462,6 @@ struct omap_hwmod am33xx_epwmss0_hwmod = {
},
};
-/* ecap0 */
-struct omap_hwmod am33xx_ecap0_hwmod = {
- .name = "ecap0",
- .class = &am33xx_ecap_hwmod_class,
- .clkdm_name = "l4ls_clkdm",
- .main_clk = "l4ls_gclk",
-};
-
-/* eqep0 */
-struct omap_hwmod am33xx_eqep0_hwmod = {
- .name = "eqep0",
- .class = &am33xx_eqep_hwmod_class,
- .clkdm_name = "l4ls_clkdm",
- .main_clk = "l4ls_gclk",
-};
-
-/* ehrpwm0 */
-struct omap_hwmod am33xx_ehrpwm0_hwmod = {
- .name = "ehrpwm0",
- .class = &am33xx_ehrpwm_hwmod_class,
- .clkdm_name = "l4ls_clkdm",
- .main_clk = "l4ls_gclk",
-};
-
/* epwmss1 */
struct omap_hwmod am33xx_epwmss1_hwmod = {
.name = "epwmss1",
@@ -511,30 +475,6 @@ struct omap_hwmod am33xx_epwmss1_hwmod = {
},
};
-/* ecap1 */
-struct omap_hwmod am33xx_ecap1_hwmod = {
- .name = "ecap1",
- .class = &am33xx_ecap_hwmod_class,
- .clkdm_name = "l4ls_clkdm",
- .main_clk = "l4ls_gclk",
-};
-
-/* eqep1 */
-struct omap_hwmod am33xx_eqep1_hwmod = {
- .name = "eqep1",
- .class = &am33xx_eqep_hwmod_class,
- .clkdm_name = "l4ls_clkdm",
- .main_clk = "l4ls_gclk",
-};
-
-/* ehrpwm1 */
-struct omap_hwmod am33xx_ehrpwm1_hwmod = {
- .name = "ehrpwm1",
- .class = &am33xx_ehrpwm_hwmod_class,
- .clkdm_name = "l4ls_clkdm",
- .main_clk = "l4ls_gclk",
-};
-
/* epwmss2 */
struct omap_hwmod am33xx_epwmss2_hwmod = {
.name = "epwmss2",
@@ -548,30 +488,6 @@ struct omap_hwmod am33xx_epwmss2_hwmod = {
},
};
-/* ecap2 */
-struct omap_hwmod am33xx_ecap2_hwmod = {
- .name = "ecap2",
- .class = &am33xx_ecap_hwmod_class,
- .clkdm_name = "l4ls_clkdm",
- .main_clk = "l4ls_gclk",
-};
-
-/* eqep2 */
-struct omap_hwmod am33xx_eqep2_hwmod = {
- .name = "eqep2",
- .class = &am33xx_eqep_hwmod_class,
- .clkdm_name = "l4ls_clkdm",
- .main_clk = "l4ls_gclk",
-};
-
-/* ehrpwm2 */
-struct omap_hwmod am33xx_ehrpwm2_hwmod = {
- .name = "ehrpwm2",
- .class = &am33xx_ehrpwm_hwmod_class,
- .clkdm_name = "l4ls_clkdm",
- .main_clk = "l4ls_gclk",
-};
-
/*
* 'gpio' class: for gpio 0,1,2,3
*/
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index cc0791d..e1c2025 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -593,17 +593,8 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
&am33xx_l4_ls__spinlock,
&am33xx_l4_ls__elm,
&am33xx_l4_ls__epwmss0,
- &am33xx_epwmss0__ecap0,
- &am33xx_epwmss0__eqep0,
- &am33xx_epwmss0__ehrpwm0,
&am33xx_l4_ls__epwmss1,
- &am33xx_epwmss1__ecap1,
- &am33xx_epwmss1__eqep1,
- &am33xx_epwmss1__ehrpwm1,
&am33xx_l4_ls__epwmss2,
- &am33xx_epwmss2__ecap2,
- &am33xx_epwmss2__eqep2,
- &am33xx_epwmss2__ehrpwm2,
&am33xx_l3_s__gpmc,
&am33xx_l3_main__lcdc,
&am33xx_l4_ls__mcspi0,
diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
index 97fd399..61f2f30 100644
--- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
@@ -202,13 +202,6 @@ static struct omap_hwmod am43xx_epwmss3_hwmod = {
},
};
-static struct omap_hwmod am43xx_ehrpwm3_hwmod = {
- .name = "ehrpwm3",
- .class = &am33xx_ehrpwm_hwmod_class,
- .clkdm_name = "l4ls_clkdm",
- .main_clk = "l4ls_gclk",
-};
-
static struct omap_hwmod am43xx_epwmss4_hwmod = {
.name = "epwmss4",
.class = &am33xx_epwmss_hwmod_class,
@@ -222,13 +215,6 @@ static struct omap_hwmod am43xx_epwmss4_hwmod = {
},
};
-static struct omap_hwmod am43xx_ehrpwm4_hwmod = {
- .name = "ehrpwm4",
- .class = &am33xx_ehrpwm_hwmod_class,
- .clkdm_name = "l4ls_clkdm",
- .main_clk = "l4ls_gclk",
-};
-
static struct omap_hwmod am43xx_epwmss5_hwmod = {
.name = "epwmss5",
.class = &am33xx_epwmss_hwmod_class,
@@ -242,13 +228,6 @@ static struct omap_hwmod am43xx_epwmss5_hwmod = {
},
};
-static struct omap_hwmod am43xx_ehrpwm5_hwmod = {
- .name = "ehrpwm5",
- .class = &am33xx_ehrpwm_hwmod_class,
- .clkdm_name = "l4ls_clkdm",
- .main_clk = "l4ls_gclk",
-};
-
static struct omap_hwmod am43xx_spi2_hwmod = {
.name = "spi2",
.class = &am33xx_spi_hwmod_class,
@@ -744,13 +723,6 @@ static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss3 = {
.user = OCP_USER_MPU,
};
-static struct omap_hwmod_ocp_if am43xx_epwmss3__ehrpwm3 = {
- .master = &am43xx_epwmss3_hwmod,
- .slave = &am43xx_ehrpwm3_hwmod,
- .clk = "l4ls_gclk",
- .user = OCP_USER_MPU,
-};
-
static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss4 = {
.master = &am33xx_l4_ls_hwmod,
.slave = &am43xx_epwmss4_hwmod,
@@ -758,13 +730,6 @@ static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss4 = {
.user = OCP_USER_MPU,
};
-static struct omap_hwmod_ocp_if am43xx_epwmss4__ehrpwm4 = {
- .master = &am43xx_epwmss4_hwmod,
- .slave = &am43xx_ehrpwm4_hwmod,
- .clk = "l4ls_gclk",
- .user = OCP_USER_MPU,
-};
-
static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss5 = {
.master = &am33xx_l4_ls_hwmod,
.slave = &am43xx_epwmss5_hwmod,
@@ -772,13 +737,6 @@ static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss5 = {
.user = OCP_USER_MPU,
};
-static struct omap_hwmod_ocp_if am43xx_epwmss5__ehrpwm5 = {
- .master = &am43xx_epwmss5_hwmod,
- .slave = &am43xx_ehrpwm5_hwmod,
- .clk = "l4ls_gclk",
- .user = OCP_USER_MPU,
-};
-
static struct omap_hwmod_ocp_if am43xx_l4_ls__mcspi2 = {
.master = &am33xx_l4_ls_hwmod,
.slave = &am43xx_spi2_hwmod,
@@ -919,11 +877,8 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
&am43xx_l4_ls__timer10,
&am43xx_l4_ls__timer11,
&am43xx_l4_ls__epwmss3,
- &am43xx_epwmss3__ehrpwm3,
&am43xx_l4_ls__epwmss4,
- &am43xx_epwmss4__ehrpwm4,
&am43xx_l4_ls__epwmss5,
- &am43xx_epwmss5__ehrpwm5,
&am43xx_l4_ls__mcspi2,
&am43xx_l4_ls__mcspi3,
&am43xx_l4_ls__mcspi4,
@@ -982,17 +937,8 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
&am33xx_l4_ls__spinlock,
&am33xx_l4_ls__elm,
&am33xx_l4_ls__epwmss0,
- &am33xx_epwmss0__ecap0,
- &am33xx_epwmss0__eqep0,
- &am33xx_epwmss0__ehrpwm0,
&am33xx_l4_ls__epwmss1,
- &am33xx_epwmss1__ecap1,
- &am33xx_epwmss1__eqep1,
- &am33xx_epwmss1__ehrpwm1,
&am33xx_l4_ls__epwmss2,
- &am33xx_epwmss2__ecap2,
- &am33xx_epwmss2__eqep2,
- &am33xx_epwmss2__ehrpwm2,
&am33xx_l3_s__gpmc,
&am33xx_l4_ls__mcspi0,
&am33xx_l4_ls__mcspi1,
--
2.7.0
From: Vignesh R <[email protected]>
Add PWMSS device tree nodes for DRA7 SoC family and add documentation
for dt bindings.
Signed-off-by: Vignesh R <[email protected]>
[[email protected]: Add eCAP and use updated bindings for PWMSS and ePWM]
Signed-off-by: Franklin S Cooper Jr <[email protected]>
Acked-by: Rob Herring <[email protected]>
---
.../devicetree/bindings/pwm/pwm-tiecap.txt | 9 +++
.../devicetree/bindings/pwm/pwm-tiehrpwm.txt | 9 +++
.../devicetree/bindings/pwm/pwm-tipwmss.txt | 12 +++
arch/arm/boot/dts/dra7.dtsi | 90 ++++++++++++++++++++++
4 files changed, 120 insertions(+)
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
index 4d4c977..759de05 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
@@ -5,6 +5,7 @@ Required properties:
for am33xx - compatible = "ti,am3352-ecap", "ti,am33xx-ecap";
for am4372 - compatible = "ti,am4372-ecap", "ti,am3352-ecap", "ti,am33xx-ecap";
for da850 - compatible = "ti,da850-ecap", "ti,am3352-ecap", "ti,am33xx-ecap";
+ for dra746 - compatible = "ti,dra746-ecap", "ti,am3352-ecap";
- #pwm-cells: should be 3. See pwm.txt in this directory for a description of
the cells format. The PWM channel index ranges from 0 to 4. The only third
cell flag supported by this binding is PWM_POLARITY_INVERTED.
@@ -38,3 +39,11 @@ ecap0: ecap@1f06000 { /* ECAP on da850 */
#pwm-cells = <3>;
reg = <0x306000 0x80>;
};
+
+ecap0: ecap@4843e100 {
+ compatible = "ti,dra746-ecap", "ti,am3352-ecap";
+ #pwm-cells = <3>;
+ reg = <0x4843e100 0x80>;
+ clocks = <&l4_root_clk_div>;
+ clock-names = "fck";
+};
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
index c1d6a2a..135132a 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
@@ -5,6 +5,7 @@ Required properties:
for am33xx - compatible = "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
for am4372 - compatible = "ti,am4372-ehrpwm", "ti-am3352-ehrpwm", "ti,am33xx-ehrpwm";
for da850 - compatible = "ti,da850-ehrpwm", "ti-am3352-ehrpwm", "ti,am33xx-ehrpwm";
+ for dra746 - compatible = "ti,dra746-ehrpwm", "ti-am3352-ehrpwm";
- #pwm-cells: should be 3. See pwm.txt in this directory for a description of
the cells format. The only third cell flag supported by this binding is
PWM_POLARITY_INVERTED.
@@ -38,3 +39,11 @@ ehrpwm0: pwm@1f00000 { /* EHRPWM on da850 */
#pwm-cells = <3>;
reg = <0x300000 0x2000>;
};
+
+ehrpwm0: pwm@4843e200 { /* EHRPWM on dra746 */
+ compatible = "ti,dra746-ehrpwm", "ti,am3352-ehrpwm";
+ #pwm-cells = <3>;
+ reg = <0x48440200 0x80>;
+ clocks = <&ehrpwm0_tbclk>, <&l4_root_clk_div>;
+ clock-names = "tbclk", "fck";
+};
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt b/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
index fd8e87c..1a5d7b7 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
@@ -4,6 +4,7 @@ Required properties:
- compatible: Must be "ti,<soc>-pwmss".
for am33xx - compatible = "ti,am33xx-pwmss";
for am4372 - compatible = "ti,am4372-pwmss","ti,am33xx-pwmss";
+ for dra746 - compatible = "ti,dra746-pwmss", "ti,am33xx-pwmss"
- reg: physical base address and size of the registers map.
- address-cells: Specify the number of u32 entries needed in child nodes.
@@ -46,3 +47,14 @@ epwmss0: epwmss@48300000 { /* PWMSS for am4372 */
/* child nodes go here */
};
+
+epwmss0: epwmss@4843e000 { /* PWMSS for DRA7xx */
+ compatible = "ti,dra746-pwmss", "ti,am33xx-pwmss";
+ reg = <0x4843e000 0x30>;
+ ti,hwmods = "epwmss0";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ /* child nodes go here */
+};
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index e007401..5a21e46 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -1743,6 +1743,96 @@
clock-names = "fck", "sys_clk";
};
};
+
+ epwmss0: epwmss@4843e000 {
+ compatible = "ti,dra746-pwmss", "ti,am33xx-pwmss";
+ reg = <0x4843e000 0x30>;
+ ti,hwmods = "epwmss0";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ status = "disabled";
+ ranges;
+
+ ehrpwm0: pwm@4843e200 {
+ compatible = "ti,dra746-ehrpwm",
+ "ti,am3352-ehrpwm";
+ #pwm-cells = <3>;
+ reg = <0x4843e200 0x80>;
+ clocks = <&ehrpwm0_tbclk>, <&l4_root_clk_div>;
+ clock-names = "tbclk", "fck";
+ status = "disabled";
+ };
+
+ ecap0: ecap@4843e100 {
+ compatible = "ti,dra746-ecap",
+ "ti,am3352-ecap";
+ #pwm-cells = <3>;
+ reg = <0x4843e100 0x80>;
+ clocks = <&l4_root_clk_div>;
+ clock-names = "fck";
+ status = "disabled";
+ };
+ };
+
+ epwmss1: epwmss@48440000 {
+ compatible = "ti,dra746-pwmss", "ti,am33xx-pwmss";
+ reg = <0x48440000 0x30>;
+ ti,hwmods = "epwmss1";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ status = "disabled";
+ ranges;
+
+ ehrpwm1: pwm@48440200 {
+ compatible = "ti,dra746-ehrpwm",
+ "ti,am3352-ehrpwm";
+ #pwm-cells = <3>;
+ reg = <0x48440200 0x80>;
+ clocks = <&ehrpwm1_tbclk>, <&l4_root_clk_div>;
+ clock-names = "tbclk", "fck";
+ status = "disabled";
+ };
+
+ ecap1: ecap@48440100 {
+ compatible = "ti,dra746-ecap",
+ "ti,am3352-ecap";
+ #pwm-cells = <3>;
+ reg = <0x48440100 0x80>;
+ clocks = <&l4_root_clk_div>;
+ clock-names = "fck";
+ status = "disabled";
+ };
+ };
+
+ epwmss2: epwmss@48442000 {
+ compatible = "ti,dra746-pwmss", "ti,am33xx-pwmss";
+ reg = <0x48442000 0x30>;
+ ti,hwmods = "epwmss2";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ status = "disabled";
+ ranges;
+
+ ehrpwm2: pwm@48442200 {
+ compatible = "ti,dra746-ehrpwm",
+ "ti,am3352-ehrpwm";
+ #pwm-cells = <3>;
+ reg = <0x48442200 0x80>;
+ clocks = <&ehrpwm2_tbclk>, <&l4_root_clk_div>;
+ clock-names = "tbclk", "fck";
+ status = "disabled";
+ };
+
+ ecap2: ecap@48442100 {
+ compatible = "ti,dra746-ecap",
+ "ti,am3352-ecap";
+ #pwm-cells = <3>;
+ reg = <0x48442100 0x80>;
+ clocks = <&l4_root_clk_div>;
+ clock-names = "fck";
+ status = "disabled";
+ };
+ };
};
thermal_zones: thermal-zones {
--
2.7.0
Replace unit address from 0 to the proper physical address.
Signed-off-by: Franklin S Cooper Jr <[email protected]>
---
Documentation/devicetree/bindings/pwm/pwm-tiecap.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
index 788da6c..1b7eec5 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
@@ -16,21 +16,21 @@ Optional properties:
Example:
-ecap0: ecap@0 { /* ECAP on am33xx */
+ecap0: ecap@48300100 { /* ECAP on am33xx */
compatible = "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x48300100 0x80>;
ti,hwmods = "ecap0";
};
-ecap0: ecap@0 { /* ECAP on am4372 */
+ecap0: ecap@48300100 { /* ECAP on am4372 */
compatible = "ti,am4372-ecap", "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x48300100 0x80>;
ti,hwmods = "ecap0";
};
-ecap0: ecap@0 { /* ECAP on da850 */
+ecap0: ecap@1f06000 { /* ECAP on da850 */
compatible = "ti,da850-ecap", "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x306000 0x80>;
--
2.7.0
Previous patches switched the ECAP and EPWM to use the new bindings.
These bindings explicitly adds the various required clocks via DT rather
than depending on hwmod.
Therefore, it is safe to remove the hwmod entries since they are no longer
needed.
Signed-off-by: Franklin S Cooper Jr <[email protected]>
Acked-by: Rob Herring <[email protected]>
Acked-by: Paul Walmsley <[email protected]>
---
Documentation/devicetree/bindings/pwm/pwm-tiecap.txt | 3 ---
Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt | 3 ---
arch/arm/boot/dts/am33xx.dtsi | 6 ------
arch/arm/boot/dts/am4372.dtsi | 9 ---------
4 files changed, 21 deletions(-)
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
index 76cf322..4d4c977 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
@@ -11,8 +11,6 @@ Required properties:
- reg: physical base address and size of the registers map.
Optional properties:
-- ti,hwmods: Name of the hwmod associated to the ECAP:
- "ecap<x>", <x> being the 0-based instance number from the HW spec
- clocks: Handle to the ECAP's functional clock.
- clock-names: Must be set to "fck".
@@ -22,7 +20,6 @@ ecap0: ecap@48300100 { /* ECAP on am33xx */
compatible = "ti,am3352-ecap", "ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x48300100 0x80>;
- ti,hwmods = "ecap0";
clocks = <&l4ls_gclk>;
clock-names = "fck";
};
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
index 87ef528..c1d6a2a 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
@@ -11,8 +11,6 @@ Required properties:
- reg: physical base address and size of the registers map.
Optional properties:
-- ti,hwmods: Name of the hwmod associated to the EHRPWM:
- "ehrpwm<x>", <x> being the 0-based instance number from the HW spec
- clocks: Handle to the PWM's time-base and functional clock.
- clock-names: Must be set to "tbclk" and "fck".
@@ -24,7 +22,6 @@ ehrpwm0: pwm@48300200 { /* EHRPWM on am33xx */
reg = <0x48300200 0x100>;
clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
clock-names = "tbclk", "fck";
- ti,hwmods = "ehrpwm0";
};
ehrpwm0: pwm@48300200 { /* EHRPWM on am4372 */
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 999ba2f..2661acc 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -687,7 +687,6 @@
clock-names = "fck";
interrupts = <31>;
interrupt-names = "ecap0";
- ti,hwmods = "ecap0";
status = "disabled";
};
@@ -696,7 +695,6 @@
"ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48300200 0x80>;
- ti,hwmods = "ehrpwm0";
clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
clock-names = "tbclk", "fck";
status = "disabled";
@@ -723,7 +721,6 @@
clock-names = "fck";
interrupts = <47>;
interrupt-names = "ecap1";
- ti,hwmods = "ecap1";
status = "disabled";
};
@@ -732,7 +729,6 @@
"ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48302200 0x80>;
- ti,hwmods = "ehrpwm1";
clocks = <&ehrpwm1_tbclk>, <&l4ls_gclk>;
clock-names = "tbclk", "fck";
status = "disabled";
@@ -759,7 +755,6 @@
clock-names = "fck";
interrupts = <61>;
interrupt-names = "ecap2";
- ti,hwmods = "ecap2";
status = "disabled";
};
@@ -768,7 +763,6 @@
"ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48304200 0x80>;
- ti,hwmods = "ehrpwm2";
clocks = <&ehrpwm2_tbclk>, <&l4ls_gclk>;
clock-names = "tbclk", "fck";
status = "disabled";
diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index e858460..cfdd4b7 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -677,7 +677,6 @@
"ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x48300100 0x80>;
- ti,hwmods = "ecap0";
clocks = <&l4ls_gclk>;
clock-names = "fck";
status = "disabled";
@@ -689,7 +688,6 @@
"ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48300200 0x80>;
- ti,hwmods = "ehrpwm0";
clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
clock-names = "tbclk", "fck";
status = "disabled";
@@ -711,7 +709,6 @@
"ti,am33xx-ecap";
#pwm-cells = <3>;
reg = <0x48302100 0x80>;
- ti,hwmods = "ecap1";
clocks = <&l4ls_gclk>;
clock-names = "fck";
status = "disabled";
@@ -723,7 +720,6 @@
"ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48302200 0x80>;
- ti,hwmods = "ehrpwm1";
clocks = <&ehrpwm1_tbclk>, <&l4ls_gclk>;
clock-names = "tbclk", "fck";
status = "disabled";
@@ -747,7 +743,6 @@
reg = <0x48304100 0x80>;
clocks = <&l4ls_gclk>;
clock-names = "fck";
- ti,hwmods = "ecap2";
status = "disabled";
};
@@ -757,7 +752,6 @@
"ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48304200 0x80>;
- ti,hwmods = "ehrpwm2";
clocks = <&ehrpwm2_tbclk>, <&l4ls_gclk>;
clock-names = "tbclk", "fck";
status = "disabled";
@@ -779,7 +773,6 @@
"ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48306200 0x80>;
- ti,hwmods = "ehrpwm3";
clocks = <&ehrpwm3_tbclk>, <&l4ls_gclk>;
clock-names = "tbclk", "fck";
status = "disabled";
@@ -801,7 +794,6 @@
"ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48308200 0x80>;
- ti,hwmods = "ehrpwm4";
clocks = <&ehrpwm4_tbclk>, <&l4ls_gclk>;
clock-names = "tbclk", "fck";
status = "disabled";
@@ -825,7 +817,6 @@
reg = <0x4830a200 0x80>;
clocks = <&ehrpwm5_tbclk>, <&l4ls_gclk>;
clock-names = "tbclk", "fck";
- ti,hwmods = "ehrpwm5";
status = "disabled";
};
};
--
2.7.0
Now that the node name has been changed from ehrpwm to pwm the document
should show this proper usage. Also change the unit address in the example
from 0 to the proper physical address value that should be used.
Signed-off-by: Franklin S Cooper Jr <[email protected]>
Acked-by: Rob Herring <[email protected]>
---
Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
index 99b544f..cbc538b 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
@@ -16,21 +16,21 @@ Optional properties:
Example:
-ehrpwm0: ehrpwm@0 { /* EHRPWM on am33xx */
+ehrpwm0: pwm@48300200 { /* EHRPWM on am33xx */
compatible = "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48300200 0x100>;
ti,hwmods = "ehrpwm0";
};
-ehrpwm0: ehrpwm@0 { /* EHRPWM on am4372 */
+ehrpwm0: pwm@48300200 { /* EHRPWM on am4372 */
compatible = "ti,am4372-ehrpwm", "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x48300200 0x80>;
ti,hwmods = "ehrpwm0";
};
-ehrpwm0: ehrpwm@0 { /* EHRPWM on da850 */
+ehrpwm0: pwm@1f00000 { /* EHRPWM on da850 */
compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
#pwm-cells = <3>;
reg = <0x300000 0x2000>;
--
2.7.0
Add tblck to the pwm nodes. This insures that the ehrpwm driver has access
to the time-based clk.
Do not remove similar entries for ehrpwm node. Later patches will switch
from using ehrpwm node name to pwm. But to maintain ABI compatibility we
shouldn't remove the old entries.
Signed-off-by: Franklin S Cooper Jr <[email protected]>
Acked-by: Stephen Boyd <[email protected]>
---
drivers/clk/ti/clk-33xx.c | 3 +++
drivers/clk/ti/clk-43xx.c | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/drivers/clk/ti/clk-33xx.c b/drivers/clk/ti/clk-33xx.c
index ef2ec64..0e47d95 100644
--- a/drivers/clk/ti/clk-33xx.c
+++ b/drivers/clk/ti/clk-33xx.c
@@ -108,6 +108,9 @@ static struct ti_dt_clk am33xx_clks[] = {
DT_CLK("48300200.ehrpwm", "tbclk", "ehrpwm0_tbclk"),
DT_CLK("48302200.ehrpwm", "tbclk", "ehrpwm1_tbclk"),
DT_CLK("48304200.ehrpwm", "tbclk", "ehrpwm2_tbclk"),
+ DT_CLK("48300200.pwm", "tbclk", "ehrpwm0_tbclk"),
+ DT_CLK("48302200.pwm", "tbclk", "ehrpwm1_tbclk"),
+ DT_CLK("48304200.pwm", "tbclk", "ehrpwm2_tbclk"),
{ .node_name = NULL },
};
diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c
index 097fc90..7255aa8 100644
--- a/drivers/clk/ti/clk-43xx.c
+++ b/drivers/clk/ti/clk-43xx.c
@@ -115,6 +115,12 @@ static struct ti_dt_clk am43xx_clks[] = {
DT_CLK("48306200.ehrpwm", "tbclk", "ehrpwm3_tbclk"),
DT_CLK("48308200.ehrpwm", "tbclk", "ehrpwm4_tbclk"),
DT_CLK("4830a200.ehrpwm", "tbclk", "ehrpwm5_tbclk"),
+ DT_CLK("48300200.pwm", "tbclk", "ehrpwm0_tbclk"),
+ DT_CLK("48302200.pwm", "tbclk", "ehrpwm1_tbclk"),
+ DT_CLK("48304200.pwm", "tbclk", "ehrpwm2_tbclk"),
+ DT_CLK("48306200.pwm", "tbclk", "ehrpwm3_tbclk"),
+ DT_CLK("48308200.pwm", "tbclk", "ehrpwm4_tbclk"),
+ DT_CLK("4830a200.pwm", "tbclk", "ehrpwm5_tbclk"),
{ .node_name = NULL },
};
--
2.7.0
On 27/04/16 01:36, Franklin S Cooper Jr wrote:
> Add tblck to the pwm nodes. This insures that the ehrpwm driver has access
> to the time-based clk.
>
> Do not remove similar entries for ehrpwm node. Later patches will switch
> from using ehrpwm node name to pwm. But to maintain ABI compatibility we
> shouldn't remove the old entries.
>
> Signed-off-by: Franklin S Cooper Jr <[email protected]>
> Acked-by: Stephen Boyd <[email protected]>
I don't like adding new clock aliases to the list as I am trying to get
rid of them, but in this case we can't avoid it I believe. Thus,
Acked-by: Tero Kristo <[email protected]>
> ---
> drivers/clk/ti/clk-33xx.c | 3 +++
> drivers/clk/ti/clk-43xx.c | 6 ++++++
> 2 files changed, 9 insertions(+)
>
> diff --git a/drivers/clk/ti/clk-33xx.c b/drivers/clk/ti/clk-33xx.c
> index ef2ec64..0e47d95 100644
> --- a/drivers/clk/ti/clk-33xx.c
> +++ b/drivers/clk/ti/clk-33xx.c
> @@ -108,6 +108,9 @@ static struct ti_dt_clk am33xx_clks[] = {
> DT_CLK("48300200.ehrpwm", "tbclk", "ehrpwm0_tbclk"),
> DT_CLK("48302200.ehrpwm", "tbclk", "ehrpwm1_tbclk"),
> DT_CLK("48304200.ehrpwm", "tbclk", "ehrpwm2_tbclk"),
> + DT_CLK("48300200.pwm", "tbclk", "ehrpwm0_tbclk"),
> + DT_CLK("48302200.pwm", "tbclk", "ehrpwm1_tbclk"),
> + DT_CLK("48304200.pwm", "tbclk", "ehrpwm2_tbclk"),
> { .node_name = NULL },
> };
>
> diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c
> index 097fc90..7255aa8 100644
> --- a/drivers/clk/ti/clk-43xx.c
> +++ b/drivers/clk/ti/clk-43xx.c
> @@ -115,6 +115,12 @@ static struct ti_dt_clk am43xx_clks[] = {
> DT_CLK("48306200.ehrpwm", "tbclk", "ehrpwm3_tbclk"),
> DT_CLK("48308200.ehrpwm", "tbclk", "ehrpwm4_tbclk"),
> DT_CLK("4830a200.ehrpwm", "tbclk", "ehrpwm5_tbclk"),
> + DT_CLK("48300200.pwm", "tbclk", "ehrpwm0_tbclk"),
> + DT_CLK("48302200.pwm", "tbclk", "ehrpwm1_tbclk"),
> + DT_CLK("48304200.pwm", "tbclk", "ehrpwm2_tbclk"),
> + DT_CLK("48306200.pwm", "tbclk", "ehrpwm3_tbclk"),
> + DT_CLK("48308200.pwm", "tbclk", "ehrpwm4_tbclk"),
> + DT_CLK("4830a200.pwm", "tbclk", "ehrpwm5_tbclk"),
> { .node_name = NULL },
> };
>
>
Hi,
* Franklin S Cooper Jr <[email protected]> [160426 15:38]:
>
> .../devicetree/bindings/pwm/pwm-tiecap.txt | 36 +++++++--
> .../devicetree/bindings/pwm/pwm-tiehrpwm.txt | 36 +++++++--
> .../devicetree/bindings/pwm/pwm-tipwmss.txt | 33 +++++++-
> arch/arm/boot/dts/am33xx.dtsi | 36 ++++++---
> arch/arm/boot/dts/am4372.dtsi | 63 ++++++++++-----
> arch/arm/boot/dts/da850.dtsi | 15 ++--
> arch/arm/boot/dts/dra7.dtsi | 90 ++++++++++++++++++++++
> .../mach-omap2/omap_hwmod_33xx_43xx_common_data.h | 18 -----
> .../omap_hwmod_33xx_43xx_interconnect_data.c | 64 ---------------
> .../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 84 --------------------
> arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 9 ---
> arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 54 -------------
> drivers/clk/ti/clk-33xx.c | 3 +
> drivers/clk/ti/clk-43xx.c | 6 ++
> drivers/pwm/pwm-tiecap.c | 7 ++
> drivers/pwm/pwm-tiehrpwm.c | 7 ++
> 16 files changed, 279 insertions(+), 282 deletions(-)
Thierry, do you want to pick the driver changes or ack them
and then I can queue the rest if no more comments?
Regards,
Tony
On Tue, Apr 26, 2016 at 05:36:42PM -0500, Franklin S Cooper Jr wrote:
> There are several SOC specific compatibles for ECAP, EHRPWM and PWMMS
> that are in use but aren't properly documented. Therefore, fix this
> by adding the compatibles to the appropriate binding documents.
>
> While at it make minor corrections to the binding document.
>
> Signed-off-by: Franklin S Cooper Jr <[email protected]>
> ---
> .../devicetree/bindings/pwm/pwm-tiecap.txt | 12 ++++++++++--
> .../devicetree/bindings/pwm/pwm-tiehrpwm.txt | 12 ++++++++++--
> .../devicetree/bindings/pwm/pwm-tipwmss.txt | 21 +++++++++++++++++++--
> 3 files changed, 39 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
> index fb81179..788da6c 100644
> --- a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
> +++ b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
> @@ -2,8 +2,9 @@ TI SOC ECAP based APWM controller
>
> Required properties:
> - compatible: Must be "ti,<soc>-ecap".
> - for am33xx - compatible = "ti,am33xx-ecap";
> - for da850 - compatible = "ti,da850-ecap", "ti,am33xx-ecap";
> + for am33xx - compatible = "ti,am33xx-ecap";
> + for am4372 - compatible = "ti,am4372-ecap", "ti,am33xx-ecap";
> + for da850 - compatible = "ti,da850-ecap", "ti,am33xx-ecap";
> - #pwm-cells: should be 3. See pwm.txt in this directory for a description of
> the cells format. The PWM channel index ranges from 0 to 4. The only third
> cell flag supported by this binding is PWM_POLARITY_INVERTED.
> @@ -22,6 +23,13 @@ ecap0: ecap@0 { /* ECAP on am33xx */
> ti,hwmods = "ecap0";
> };
>
> +ecap0: ecap@0 { /* ECAP on am4372 */
The unit address is wrong.
> + compatible = "ti,am4372-ecap", "ti,am33xx-ecap";
> + #pwm-cells = <3>;
> + reg = <0x48300100 0x80>;
> + ti,hwmods = "ecap0";
> +};
> +
> ecap0: ecap@0 { /* ECAP on da850 */
> compatible = "ti,da850-ecap", "ti,am33xx-ecap";
> #pwm-cells = <3>;
> diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
> index 9c100b2..99b544f 100644
> --- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
> +++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
> @@ -2,8 +2,9 @@ TI SOC EHRPWM based PWM controller
>
> Required properties:
> - compatible: Must be "ti,<soc>-ehrpwm".
> - for am33xx - compatible = "ti,am33xx-ehrpwm";
> - for da850 - compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
> + for am33xx - compatible = "ti,am33xx-ehrpwm";
> + for am4372 - compatible = "ti,am4372-ehrpwm", "ti,am33xx-ehrpwm";
> + for da850 - compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
> - #pwm-cells: should be 3. See pwm.txt in this directory for a description of
> the cells format. The only third cell flag supported by this binding is
> PWM_POLARITY_INVERTED.
> @@ -22,6 +23,13 @@ ehrpwm0: ehrpwm@0 { /* EHRPWM on am33xx */
> ti,hwmods = "ehrpwm0";
> };
>
> +ehrpwm0: ehrpwm@0 { /* EHRPWM on am4372 */
ditto
Otherwise,
Acked-by: Rob Herring <[email protected]>
Rob,
On 04/28/2016 04:07 PM, Rob Herring wrote:
> On Tue, Apr 26, 2016 at 05:36:42PM -0500, Franklin S Cooper Jr wrote:
>> There are several SOC specific compatibles for ECAP, EHRPWM and PWMMS
>> that are in use but aren't properly documented. Therefore, fix this
>> by adding the compatibles to the appropriate binding documents.
>>
>> While at it make minor corrections to the binding document.
>>
>> Signed-off-by: Franklin S Cooper Jr <[email protected]>
>> ---
>> .../devicetree/bindings/pwm/pwm-tiecap.txt | 12 ++++++++++--
>> .../devicetree/bindings/pwm/pwm-tiehrpwm.txt | 12 ++++++++++--
>> .../devicetree/bindings/pwm/pwm-tipwmss.txt | 21 +++++++++++++++++++--
>> 3 files changed, 39 insertions(+), 6 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
>> index fb81179..788da6c 100644
>> --- a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
>> +++ b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
>> @@ -2,8 +2,9 @@ TI SOC ECAP based APWM controller
>>
>> Required properties:
>> - compatible: Must be "ti,<soc>-ecap".
>> - for am33xx - compatible = "ti,am33xx-ecap";
>> - for da850 - compatible = "ti,da850-ecap", "ti,am33xx-ecap";
>> + for am33xx - compatible = "ti,am33xx-ecap";
>> + for am4372 - compatible = "ti,am4372-ecap", "ti,am33xx-ecap";
>> + for da850 - compatible = "ti,da850-ecap", "ti,am33xx-ecap";
>> - #pwm-cells: should be 3. See pwm.txt in this directory for a description of
>> the cells format. The PWM channel index ranges from 0 to 4. The only third
>> cell flag supported by this binding is PWM_POLARITY_INVERTED.
>> @@ -22,6 +23,13 @@ ecap0: ecap@0 { /* ECAP on am33xx */
>> ti,hwmods = "ecap0";
>> };
>>
>> +ecap0: ecap@0 { /* ECAP on am4372 */
>
> The unit address is wrong.
>
>> + compatible = "ti,am4372-ecap", "ti,am33xx-ecap";
>> + #pwm-cells = <3>;
>> + reg = <0x48300100 0x80>;
>> + ti,hwmods = "ecap0";
>> +};
>> +
>> ecap0: ecap@0 { /* ECAP on da850 */
>> compatible = "ti,da850-ecap", "ti,am33xx-ecap";
>> #pwm-cells = <3>;
>> diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
>> index 9c100b2..99b544f 100644
>> --- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
>> +++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
>> @@ -2,8 +2,9 @@ TI SOC EHRPWM based PWM controller
>>
>> Required properties:
>> - compatible: Must be "ti,<soc>-ehrpwm".
>> - for am33xx - compatible = "ti,am33xx-ehrpwm";
>> - for da850 - compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
>> + for am33xx - compatible = "ti,am33xx-ehrpwm";
>> + for am4372 - compatible = "ti,am4372-ehrpwm", "ti,am33xx-ehrpwm";
>> + for da850 - compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
>> - #pwm-cells: should be 3. See pwm.txt in this directory for a description of
>> the cells format. The only third cell flag supported by this binding is
>> PWM_POLARITY_INVERTED.
>> @@ -22,6 +23,13 @@ ehrpwm0: ehrpwm@0 { /* EHRPWM on am33xx */
>> ti,hwmods = "ehrpwm0";
>> };
>>
>> +ehrpwm0: ehrpwm@0 { /* EHRPWM on am4372 */
>
> ditto
>
> Otherwise,
>
> Acked-by: Rob Herring <[email protected]>
>
Yes, the unit address is wrong but it is wrong in several places. I
added it like that to match what the other bindings are doing. However,
patches 3 and 4 fixes these unit address problems for all the bindings
all together to make things clear.
On Tue, Apr 26, 2016 at 05:36:44PM -0500, Franklin S Cooper Jr wrote:
> Replace unit address from 0 to the proper physical address.
>
> Signed-off-by: Franklin S Cooper Jr <[email protected]>
> ---
> Documentation/devicetree/bindings/pwm/pwm-tiecap.txt | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
> index 788da6c..1b7eec5 100644
> --- a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
> +++ b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
> @@ -16,21 +16,21 @@ Optional properties:
>
> Example:
>
> -ecap0: ecap@0 { /* ECAP on am33xx */
> +ecap0: ecap@48300100 { /* ECAP on am33xx */
> compatible = "ti,am33xx-ecap";
> #pwm-cells = <3>;
> reg = <0x48300100 0x80>;
> ti,hwmods = "ecap0";
> };
>
> -ecap0: ecap@0 { /* ECAP on am4372 */
> +ecap0: ecap@48300100 { /* ECAP on am4372 */
> compatible = "ti,am4372-ecap", "ti,am33xx-ecap";
> #pwm-cells = <3>;
> reg = <0x48300100 0x80>;
> ti,hwmods = "ecap0";
> };
>
> -ecap0: ecap@0 { /* ECAP on da850 */
> +ecap0: ecap@1f06000 { /* ECAP on da850 */
> compatible = "ti,da850-ecap", "ti,am33xx-ecap";
> #pwm-cells = <3>;
> reg = <0x306000 0x80>;
These still don't match.
Rob
> --
> 2.7.0
>
On Tue, Apr 26, 2016 at 05:36:45PM -0500, Franklin S Cooper Jr wrote:
> Switch to a new ECAP and EPWM bindings that doesn't depend on hwmod to
> provide the various required clocks.
>
> For AM437 and AM335x, add the required clocks explicitly to DT. The
> hwmod entries for ECAP and EPWM will be removed and this will prevent
> anything from breaking.
>
> Signed-off-by: Franklin S Cooper Jr <[email protected]>
> ---
> .../devicetree/bindings/pwm/pwm-tiecap.txt | 18 +++++---
> .../devicetree/bindings/pwm/pwm-tiehrpwm.txt | 18 +++++---
> arch/arm/boot/dts/am33xx.dtsi | 30 +++++++++---
> arch/arm/boot/dts/am4372.dtsi | 54 ++++++++++++++++++----
> arch/arm/boot/dts/da850.dtsi | 15 ++++--
> 5 files changed, 103 insertions(+), 32 deletions(-)
Acked-by: Rob Herring <[email protected]>
On 04/28/2016 04:31 PM, Rob Herring wrote:
> On Tue, Apr 26, 2016 at 05:36:44PM -0500, Franklin S Cooper Jr wrote:
>> Replace unit address from 0 to the proper physical address.
>>
>> Signed-off-by: Franklin S Cooper Jr <[email protected]>
>> ---
>> Documentation/devicetree/bindings/pwm/pwm-tiecap.txt | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
>> index 788da6c..1b7eec5 100644
>> --- a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
>> +++ b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
>> @@ -16,21 +16,21 @@ Optional properties:
>>
>> Example:
>>
>> -ecap0: ecap@0 { /* ECAP on am33xx */
>> +ecap0: ecap@48300100 { /* ECAP on am33xx */
>> compatible = "ti,am33xx-ecap";
>> #pwm-cells = <3>;
>> reg = <0x48300100 0x80>;
>> ti,hwmods = "ecap0";
>> };
>>
>> -ecap0: ecap@0 { /* ECAP on am4372 */
>> +ecap0: ecap@48300100 { /* ECAP on am4372 */
>> compatible = "ti,am4372-ecap", "ti,am33xx-ecap";
>> #pwm-cells = <3>;
>> reg = <0x48300100 0x80>;
>> ti,hwmods = "ecap0";
>> };
>>
>> -ecap0: ecap@0 { /* ECAP on da850 */
>> +ecap0: ecap@1f06000 { /* ECAP on da850 */
>> compatible = "ti,da850-ecap", "ti,am33xx-ecap";
>> #pwm-cells = <3>;
>> reg = <0x306000 0x80>;
>
> These still don't match.
>
> Rob
I apologize you made a similar comment in the past but I misinterpreted
it recently which is why I made the same mistake again. I'll fix it.
Any issue with my response to your patch two comment for why I did
things the way I did? If so I can fix it when I send my new rev.
>
>> --
>> 2.7.0
>>
On Thu, Apr 28, 2016 at 4:11 PM, Franklin S Cooper Jr. <[email protected]> wrote:
>
> Rob,
> On 04/28/2016 04:07 PM, Rob Herring wrote:
>> On Tue, Apr 26, 2016 at 05:36:42PM -0500, Franklin S Cooper Jr wrote:
>>> There are several SOC specific compatibles for ECAP, EHRPWM and PWMMS
>>> that are in use but aren't properly documented. Therefore, fix this
>>> by adding the compatibles to the appropriate binding documents.
>>>
>>> While at it make minor corrections to the binding document.
>>>
>>> Signed-off-by: Franklin S Cooper Jr <[email protected]>
>>> ---
>>> .../devicetree/bindings/pwm/pwm-tiecap.txt | 12 ++++++++++--
>>> .../devicetree/bindings/pwm/pwm-tiehrpwm.txt | 12 ++++++++++--
>>> .../devicetree/bindings/pwm/pwm-tipwmss.txt | 21 +++++++++++++++++++--
>>> 3 files changed, 39 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
>>> index fb81179..788da6c 100644
>>> --- a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
>>> +++ b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
>>> @@ -2,8 +2,9 @@ TI SOC ECAP based APWM controller
>>>
>>> Required properties:
>>> - compatible: Must be "ti,<soc>-ecap".
>>> - for am33xx - compatible = "ti,am33xx-ecap";
>>> - for da850 - compatible = "ti,da850-ecap", "ti,am33xx-ecap";
>>> + for am33xx - compatible = "ti,am33xx-ecap";
>>> + for am4372 - compatible = "ti,am4372-ecap", "ti,am33xx-ecap";
>>> + for da850 - compatible = "ti,da850-ecap", "ti,am33xx-ecap";
>>> - #pwm-cells: should be 3. See pwm.txt in this directory for a description of
>>> the cells format. The PWM channel index ranges from 0 to 4. The only third
>>> cell flag supported by this binding is PWM_POLARITY_INVERTED.
>>> @@ -22,6 +23,13 @@ ecap0: ecap@0 { /* ECAP on am33xx */
>>> ti,hwmods = "ecap0";
>>> };
>>>
>>> +ecap0: ecap@0 { /* ECAP on am4372 */
>>
>> The unit address is wrong.
>>
>>> + compatible = "ti,am4372-ecap", "ti,am33xx-ecap";
>>> + #pwm-cells = <3>;
>>> + reg = <0x48300100 0x80>;
>>> + ti,hwmods = "ecap0";
>>> +};
>>> +
>>> ecap0: ecap@0 { /* ECAP on da850 */
>>> compatible = "ti,da850-ecap", "ti,am33xx-ecap";
>>> #pwm-cells = <3>;
>>> diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
>>> index 9c100b2..99b544f 100644
>>> --- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
>>> +++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
>>> @@ -2,8 +2,9 @@ TI SOC EHRPWM based PWM controller
>>>
>>> Required properties:
>>> - compatible: Must be "ti,<soc>-ehrpwm".
>>> - for am33xx - compatible = "ti,am33xx-ehrpwm";
>>> - for da850 - compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
>>> + for am33xx - compatible = "ti,am33xx-ehrpwm";
>>> + for am4372 - compatible = "ti,am4372-ehrpwm", "ti,am33xx-ehrpwm";
>>> + for da850 - compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
>>> - #pwm-cells: should be 3. See pwm.txt in this directory for a description of
>>> the cells format. The only third cell flag supported by this binding is
>>> PWM_POLARITY_INVERTED.
>>> @@ -22,6 +23,13 @@ ehrpwm0: ehrpwm@0 { /* EHRPWM on am33xx */
>>> ti,hwmods = "ehrpwm0";
>>> };
>>>
>>> +ehrpwm0: ehrpwm@0 { /* EHRPWM on am4372 */
>>
>> ditto
>>
>> Otherwise,
>>
>> Acked-by: Rob Herring <[email protected]>
>>
>
>
> Yes, the unit address is wrong but it is wrong in several places. I
> added it like that to match what the other bindings are doing. However,
> patches 3 and 4 fixes these unit address problems for all the bindings
> all together to make things clear.
Okay, that's fine.
Rob