Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1352532 > unrolled thread
| Started by | Franklin S Cooper Jr <fcooper@ti.com> |
|---|---|
| First post | 2016-03-08 02:30 +0100 |
| Last post | 2016-03-08 18:10 +0100 |
| Articles | 7 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v5 0/6] ARM: am335x/am437x/dra7: Add PWM support for DRA7 Franklin S Cooper Jr <fcooper@ti.com> - 2016-03-08 02:30 +0100
[PATCH v5 1/6] pwms: pwm-ti*: Get the clock from the PWMSS (parent) Franklin S Cooper Jr <fcooper@ti.com> - 2016-03-08 02:30 +0100
[PATCH v5 4/6] ARM: OMAP2+: DRA7: Add hwmod entries for PWMSS Franklin S Cooper Jr <fcooper@ti.com> - 2016-03-08 02:30 +0100
Re: [PATCH v5 4/6] ARM: OMAP2+: DRA7: Add hwmod entries for PWMSS Paul Walmsley <paul@pwsan.com> - 2016-03-08 07:50 +0100
[PATCH v5 2/6] ARM: dts: am437x/am33xx: Remove eCAP and ePWM hwmod properties Franklin S Cooper Jr <fcooper@ti.com> - 2016-03-08 02:30 +0100
Re: [PATCH v5 0/6] ARM: am335x/am437x/dra7: Add PWM support for DRA7 Paul Walmsley <paul@pwsan.com> - 2016-03-08 08:00 +0100
Re: [PATCH v5 0/6] ARM: am335x/am437x/dra7: Add PWM support for DRA7 "Franklin S Cooper Jr." <fcooper@ti.com> - 2016-03-08 18:10 +0100
| From | Franklin S Cooper Jr <fcooper@ti.com> |
|---|---|
| Date | 2016-03-08 02:30 +0100 |
| Subject | [PATCH v5 0/6] ARM: am335x/am437x/dra7: Add PWM support for DRA7 |
| Message-ID | <raeDf-2lj-3@gated-at.bofh.it> |
This patch series adds support for PWM for DRA7. The IP is same as that present in AM33XX and AM437XX. However, before doing so remove unnecessary hwmod entries for eCAP, ePWM and eQEP. This series is almost identical to v4. Only difference is the addition of eCAP DT nodes in the dra7.dtsi file. This series was tested on AM335x GP, AM437x GP and X15 + LCD screen for PWM based backlight. This series was also verified to be backwards compatible with old dtbs. This series depends on the below patch series for PWM bindings cleanup: https://patchwork.ozlabs.org/patch/593171/ https://patchwork.ozlabs.org/patch/593168/ https://patchwork.ozlabs.org/patch/593165/ https://patchwork.ozlabs.org/patch/593166/ https://patchwork.ozlabs.org/patch/593169/ V3 series: https://patchwork.ozlabs.org/patch/588432/ https://patchwork.ozlabs.org/patch/588434/ https://patchwork.ozlabs.org/patch/588433/ https://patchwork.ozlabs.org/patch/588429/ https://patchwork.ozlabs.org/patch/588431/ Franklin S Cooper Jr (3): pwms: pwm-ti*: Get the clock from the PWMSS (parent) ARM: dts: am437x/am33xx: Remove eCAP and ePWM hwmod properties ARM: AM335x/AM437x: hwmod: Remove eQEP, ePWM and eCAP hwmod entries Vignesh R (3): ARM: OMAP2+: DRA7: Add hwmod entries for PWMSS ARM: dts: DRA7: Add TBCLK for PWMSS ARM: dts: DRA7: Add dt nodes for PWMSS .../devicetree/bindings/pwm/pwm-tiecap.txt | 10 ++- .../devicetree/bindings/pwm/pwm-tiehrpwm.txt | 16 ++++- .../devicetree/bindings/pwm/pwm-tipwmss.txt | 15 +++- arch/arm/boot/dts/am33xx.dtsi | 12 ++-- arch/arm/boot/dts/am4372.dtsi | 21 +++--- arch/arm/boot/dts/dra7.dtsi | 84 ++++++++++++++++++++++ arch/arm/boot/dts/dra7xx-clocks.dtsi | 24 +++++++ .../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 -------------- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 83 +++++++++++++++++++++ drivers/pwm/pwm-tiecap.c | 2 +- drivers/pwm/pwm-tiehrpwm.c | 2 +- 15 files changed, 247 insertions(+), 251 deletions(-) -- 2.7.0
[toc] | [next] | [standalone]
| From | Franklin S Cooper Jr <fcooper@ti.com> |
|---|---|
| Date | 2016-03-08 02:30 +0100 |
| Subject | [PATCH v5 1/6] pwms: pwm-ti*: Get the clock from the PWMSS (parent) |
| Message-ID | <raeDi-2lj-49@gated-at.bofh.it> |
| In reply to | #1352532 |
The eCAP and ePWM doesn't have their own separate clocks. They simply
utilize the clock provided directly by the PWMSS. Therefore, they simply
need to grab a reference to their parent's clock.
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
---
drivers/pwm/pwm-tiecap.c | 2 +-
drivers/pwm/pwm-tiehrpwm.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c
index 616af76..9418159 100644
--- a/drivers/pwm/pwm-tiecap.c
+++ b/drivers/pwm/pwm-tiecap.c
@@ -212,7 +212,7 @@ static int ecap_pwm_probe(struct platform_device *pdev)
if (!pc)
return -ENOMEM;
- clk = devm_clk_get(&pdev->dev, "fck");
+ 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..09dc1bc 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -443,7 +443,7 @@ static int ehrpwm_pwm_probe(struct platform_device *pdev)
if (!pc)
return -ENOMEM;
- clk = devm_clk_get(&pdev->dev, "fck");
+ 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
[toc] | [prev] | [next] | [standalone]
| From | Franklin S Cooper Jr <fcooper@ti.com> |
|---|---|
| Date | 2016-03-08 02:30 +0100 |
| Subject | [PATCH v5 4/6] ARM: OMAP2+: DRA7: Add hwmod entries for PWMSS |
| Message-ID | <raeDj-2lj-63@gated-at.bofh.it> |
| In reply to | #1352532 |
From: Vignesh R <vigneshr@ti.com>
Add hwmod entries for the PWMSS on DRA7.
Set l4_root_clk_div as the main_clk of PWMSS. It is fixed-factored clock
equal to L4PER2_L3_GICLK/2(l3_iclk_div/2).
Signed-off-by: Vignesh R <vigneshr@ti.com>
[fcooper@ti.com: Do not add eQEP, ePWM and eCAP hwmod entries]
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
---
Version 5 changes:
None
Version 4 changes:
Do not include eQEP, ePWM and eCAP hwmod entries.
arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 83 +++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 848356e..f8f5aa2 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -383,6 +383,65 @@ static struct omap_hwmod dra7xx_dcan2_hwmod = {
},
};
+/* pwmss */
+static struct omap_hwmod_class_sysconfig dra7xx_epwmss_sysc = {
+ .rev_offs = 0x0,
+ .sysc_offs = 0x4,
+ .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET,
+ .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+ .sysc_fields = &omap_hwmod_sysc_type2,
+};
+
+struct omap_hwmod_class dra7xx_epwmss_hwmod_class = {
+ .name = "epwmss",
+ .sysc = &dra7xx_epwmss_sysc,
+};
+
+/* epwmss0 */
+struct omap_hwmod dra7xx_epwmss0_hwmod = {
+ .name = "epwmss0",
+ .class = &dra7xx_epwmss_hwmod_class,
+ .clkdm_name = "l4per2_clkdm",
+ .main_clk = "l4_root_clk_div",
+ .prcm = {
+ .omap4 = {
+ .modulemode = MODULEMODE_SWCTRL,
+ .clkctrl_offs = DRA7XX_CM_L4PER2_PWMSS1_CLKCTRL_OFFSET,
+ .context_offs = DRA7XX_RM_L4PER2_PWMSS1_CONTEXT_OFFSET,
+ },
+ },
+};
+
+/* epwmss1 */
+struct omap_hwmod dra7xx_epwmss1_hwmod = {
+ .name = "epwmss1",
+ .class = &dra7xx_epwmss_hwmod_class,
+ .clkdm_name = "l4per2_clkdm",
+ .main_clk = "l4_root_clk_div",
+ .prcm = {
+ .omap4 = {
+ .modulemode = MODULEMODE_SWCTRL,
+ .clkctrl_offs = DRA7XX_CM_L4PER2_PWMSS2_CLKCTRL_OFFSET,
+ .context_offs = DRA7XX_RM_L4PER2_PWMSS2_CONTEXT_OFFSET,
+ },
+ },
+};
+
+/* epwmss2 */
+struct omap_hwmod dra7xx_epwmss2_hwmod = {
+ .name = "epwmss2",
+ .class = &dra7xx_epwmss_hwmod_class,
+ .clkdm_name = "l4per2_clkdm",
+ .main_clk = "l4_root_clk_div",
+ .prcm = {
+ .omap4 = {
+ .modulemode = MODULEMODE_SWCTRL,
+ .clkctrl_offs = DRA7XX_CM_L4PER2_PWMSS3_CLKCTRL_OFFSET,
+ .context_offs = DRA7XX_RM_L4PER2_PWMSS3_CONTEXT_OFFSET,
+ },
+ },
+};
+
/*
* 'dma' class
*
@@ -2676,6 +2735,27 @@ static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio6 = {
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
+struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss0 = {
+ .master = &dra7xx_l4_per2_hwmod,
+ .slave = &dra7xx_epwmss0_hwmod,
+ .clk = "l4_root_clk_div",
+ .user = OCP_USER_MPU,
+};
+
+struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss1 = {
+ .master = &dra7xx_l4_per2_hwmod,
+ .slave = &dra7xx_epwmss1_hwmod,
+ .clk = "l4_root_clk_div",
+ .user = OCP_USER_MPU,
+};
+
+struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss2 = {
+ .master = &dra7xx_l4_per2_hwmod,
+ .slave = &dra7xx_epwmss2_hwmod,
+ .clk = "l4_root_clk_div",
+ .user = OCP_USER_MPU,
+};
+
/* l4_per1 -> gpio7 */
static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio7 = {
.master = &dra7xx_l4_per1_hwmod,
@@ -3452,6 +3532,9 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
&dra7xx_l3_main_1__vcp2,
&dra7xx_l4_per2__vcp2,
&dra7xx_l4_wkup__wd_timer2,
+ &dra7xx_l4_per2__epwmss0,
+ &dra7xx_l4_per2__epwmss1,
+ &dra7xx_l4_per2__epwmss2,
NULL,
};
--
2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Paul Walmsley <paul@pwsan.com> |
|---|---|
| Date | 2016-03-08 07:50 +0100 |
| Subject | Re: [PATCH v5 4/6] ARM: OMAP2+: DRA7: Add hwmod entries for PWMSS |
| Message-ID | <rajCV-5Gr-7@gated-at.bofh.it> |
| In reply to | #1352534 |
On Mon, 7 Mar 2016, Franklin S Cooper Jr wrote: > From: Vignesh R <vigneshr@ti.com> > > Add hwmod entries for the PWMSS on DRA7. > > Set l4_root_clk_div as the main_clk of PWMSS. It is fixed-factored clock > equal to L4PER2_L3_GICLK/2(l3_iclk_div/2). > > Signed-off-by: Vignesh R <vigneshr@ti.com> > [fcooper@ti.com: Do not add eQEP, ePWM and eCAP hwmod entries] > Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Thanks, queued for v4.7. - Paul
[toc] | [prev] | [next] | [standalone]
| From | Franklin S Cooper Jr <fcooper@ti.com> |
|---|---|
| Date | 2016-03-08 02:30 +0100 |
| Subject | [PATCH v5 2/6] ARM: dts: am437x/am33xx: Remove eCAP and ePWM hwmod properties |
| Message-ID | <raeDj-2lj-65@gated-at.bofh.it> |
| In reply to | #1352532 |
ECAP and ePWM do not have OCP integration registers, have L3/L4 ports, etc. Therefore, they shouldn't be using hwmod at all. Remove their hwmod properties. For ePWM add the tbclk to the node rather than depending on hwmod to do so. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> --- arch/arm/boot/dts/am33xx.dtsi | 12 ++++++------ arch/arm/boot/dts/am4372.dtsi | 21 ++++++++++++--------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 82c0976..1dd6c78 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -682,7 +682,6 @@ reg = <0x48300100 0x80>; interrupts = <31>; interrupt-names = "ecap0"; - ti,hwmods = "ecap0"; status = "disabled"; }; @@ -690,7 +689,8 @@ compatible = "ti,am33xx-ehrpwm"; #pwm-cells = <3>; reg = <0x48300200 0x80>; - ti,hwmods = "ehrpwm0"; + clocks = <&ehrpwm0_tbclk>; + clock-names = "tbclk"; status = "disabled"; }; }; @@ -710,7 +710,6 @@ reg = <0x48302100 0x80>; interrupts = <47>; interrupt-names = "ecap1"; - ti,hwmods = "ecap1"; status = "disabled"; }; @@ -718,7 +717,8 @@ compatible = "ti,am33xx-ehrpwm"; #pwm-cells = <3>; reg = <0x48302200 0x80>; - ti,hwmods = "ehrpwm1"; + clocks = <&ehrpwm1_tbclk>; + clock-names = "tbclk"; status = "disabled"; }; }; @@ -738,7 +738,6 @@ reg = <0x48304100 0x80>; interrupts = <61>; interrupt-names = "ecap2"; - ti,hwmods = "ecap2"; status = "disabled"; }; @@ -746,7 +745,8 @@ compatible = "ti,am33xx-ehrpwm"; #pwm-cells = <3>; reg = <0x48304200 0x80>; - ti,hwmods = "ehrpwm2"; + clocks = <&ehrpwm2_tbclk>; + clock-names = "tbclk"; status = "disabled"; }; }; diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi index 33f417c..685c8db 100644 --- a/arch/arm/boot/dts/am4372.dtsi +++ b/arch/arm/boot/dts/am4372.dtsi @@ -675,7 +675,6 @@ compatible = "ti,am4372-ecap","ti,am33xx-ecap"; #pwm-cells = <3>; reg = <0x48300100 0x80>; - ti,hwmods = "ecap0"; status = "disabled"; }; @@ -683,7 +682,8 @@ compatible = "ti,am4372-ehrpwm","ti,am33xx-ehrpwm"; #pwm-cells = <3>; reg = <0x48300200 0x80>; - ti,hwmods = "ehrpwm0"; + clocks = <&ehrpwm0_tbclk>; + clock-names = "tbclk"; status = "disabled"; }; }; @@ -701,7 +701,6 @@ compatible = "ti,am4372-ecap","ti,am33xx-ecap"; #pwm-cells = <3>; reg = <0x48302100 0x80>; - ti,hwmods = "ecap1"; status = "disabled"; }; @@ -709,7 +708,8 @@ compatible = "ti,am4372-ehrpwm","ti,am33xx-ehrpwm"; #pwm-cells = <3>; reg = <0x48302200 0x80>; - ti,hwmods = "ehrpwm1"; + clocks = <&ehrpwm1_tbclk>; + clock-names = "tbclk"; status = "disabled"; }; }; @@ -727,7 +727,6 @@ compatible = "ti,am4372-ecap","ti,am33xx-ecap"; #pwm-cells = <3>; reg = <0x48304100 0x80>; - ti,hwmods = "ecap2"; status = "disabled"; }; @@ -735,7 +734,8 @@ compatible = "ti,am4372-ehrpwm","ti,am33xx-ehrpwm"; #pwm-cells = <3>; reg = <0x48304200 0x80>; - ti,hwmods = "ehrpwm2"; + clocks = <&ehrpwm2_tbclk>; + clock-names = "tbclk"; status = "disabled"; }; }; @@ -753,7 +753,8 @@ compatible = "ti,am4372-ehrpwm","ti,am33xx-ehrpwm"; #pwm-cells = <3>; reg = <0x48306200 0x80>; - ti,hwmods = "ehrpwm3"; + clocks = <&ehrpwm3_tbclk>; + clock-names = "tbclk"; status = "disabled"; }; }; @@ -771,7 +772,8 @@ compatible = "ti,am4372-ehrpwm","ti,am33xx-ehrpwm"; #pwm-cells = <3>; reg = <0x48308200 0x80>; - ti,hwmods = "ehrpwm4"; + clocks = <&ehrpwm4_tbclk>; + clock-names = "tbclk"; status = "disabled"; }; }; @@ -789,7 +791,8 @@ compatible = "ti,am4372-ehrpwm","ti,am33xx-ehrpwm"; #pwm-cells = <3>; reg = <0x4830a200 0x80>; - ti,hwmods = "ehrpwm5"; + clocks = <&ehrpwm5_tbclk>; + clock-names = "tbclk"; status = "disabled"; }; }; -- 2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Paul Walmsley <paul@pwsan.com> |
|---|---|
| Date | 2016-03-08 08:00 +0100 |
| Subject | Re: [PATCH v5 0/6] ARM: am335x/am437x/dra7: Add PWM support for DRA7 |
| Message-ID | <rajMC-5JN-9@gated-at.bofh.it> |
| In reply to | #1352532 |
Hi Franklin On Mon, 7 Mar 2016, Franklin S Cooper Jr wrote: > This patch series adds support for PWM for DRA7. The IP is same as that > present in AM33XX and AM437XX. > > However, before doing so remove unnecessary hwmod entries for eCAP, ePWM > and eQEP. > > This series is almost identical to v4. Only difference is the addition of > eCAP DT nodes in the dra7.dtsi file. > > This series was tested on AM335x GP, AM437x GP and X15 + LCD screen for > PWM based backlight. > > This series was also verified to be backwards compatible with old dtbs. Looking at these to see what I can pick for v4.7, I'm curious about the dependencies. Can I take patches 2 and 3 before 1 is merged, or does 1 need to be merged first? - Paul
[toc] | [prev] | [next] | [standalone]
| From | "Franklin S Cooper Jr." <fcooper@ti.com> |
|---|---|
| Date | 2016-03-08 18:10 +0100 |
| Message-ID | <ratiW-3LD-19@gated-at.bofh.it> |
| In reply to | #1352675 |
On 03/08/2016 12:55 AM, Paul Walmsley wrote: > Hi Franklin > > On Mon, 7 Mar 2016, Franklin S Cooper Jr wrote: > >> This patch series adds support for PWM for DRA7. The IP is same as that >> present in AM33XX and AM437XX. >> >> However, before doing so remove unnecessary hwmod entries for eCAP, ePWM >> and eQEP. >> >> This series is almost identical to v4. Only difference is the addition of >> eCAP DT nodes in the dra7.dtsi file. >> >> This series was tested on AM335x GP, AM437x GP and X15 + LCD screen for >> PWM based backlight. >> >> This series was also verified to be backwards compatible with old dtbs. > Looking at these to see what I can pick for v4.7, I'm curious about the > dependencies. Can I take patches 2 and 3 before 1 is merged, or does 1 > need to be merged first? > > - Paul 1 needs to be merged first.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web