public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: mturquette@linaro.org (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] dts: add devicetree bindings for pxa27x clocks
Date: Thu, 03 Jul 2014 15:03:28 -0700	[thread overview]
Message-ID: <20140703220328.11380.22037@quantum> (raw)
In-Reply-To: <CAN1soZys4k6g5RgPLbreopOxTwDJ+bfPOq8XPwsNpyt5+YURjg@mail.gmail.com>

Quoting Haojian Zhuang (2014-07-02 23:14:33)
> On Mon, Jun 30, 2014 at 2:32 AM, Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> > Add the clock tree description for the PXA27x based boards.
> >
> > Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> > ---
> >  arch/arm/boot/dts/pxa27x.dtsi            | 134 ++++++++++++++++++++++++++++++-
> >  include/dt-bindings/clock/pxa2xx-clock.h |  45 +++++++++++
> >  2 files changed, 178 insertions(+), 1 deletion(-)
> >  create mode 100644 include/dt-bindings/clock/pxa2xx-clock.h
> >
> > diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi
> > index a705469..badaa71 100644
> > --- a/arch/arm/boot/dts/pxa27x.dtsi
> > +++ b/arch/arm/boot/dts/pxa27x.dtsi
> > @@ -1,5 +1,6 @@
> >  /* The pxa3xx skeleton simply augments the 2xx version */
> > -/include/ "pxa2xx.dtsi"
> > +#include "pxa2xx.dtsi"
> > +#include "dt-bindings/clock/pxa2xx-clock.h"
> >
> >  / {
> >         model = "Marvell PXA27x familiy SoC";
> > @@ -35,4 +36,135 @@
> >                         #pwm-cells = <1>;
> >                 };
> >         };
> > +
> > +       clocks {
> > +              /*
> > +               * The muxing of external clocks/internal dividers for osc* clock
> > +               * sources has been hidden under the carpet by now.
> > +               */
> > +               #address-cells = <1>;
> > +               #size-cells = <1>;
> > +               ranges;
> > +
> > +               osc13mhz:osc13mhz {
> > +                       compatible = "fixed-clock";
> > +                        #clock-cells = <0>;
> > +                       clock-frequency = <13000000>;
> > +               };
> > +
> > +               osc32_768khz:osc32_768khz {
> > +                       compatible = "fixed-clock";
> > +                        #clock-cells = <0>;
> > +                       clock-frequency = <32768>;
> > +               };
> > +
> > +               pll_312mhz:pll_312mhz {
> > +                       compatible = "fixed-factor-clock";
> > +                        #clock-cells = <0>;
> > +                       clocks = <&osc13mhz>;
> > +                       clock-div = <1>;
> > +                       clock-mult = <24>;
> > +               };
> > +
> > +               clk_48mhz:clk_48mhz {
> > +                       compatible = "fixed-factor-clock";
> > +                        #clock-cells = <0>;
> > +                       clocks = <&pll_312mhz>;
> > +                       clock-div = <13>;
> > +                       clock-mult = <2>;
> > +               };
> > +
> > +               clk_32_842mhz:clk_32_842mhz {
> > +                       compatible = "fixed-factor-clock";
> > +                        #clock-cells = <0>;
> > +                       clocks = <&pll_312mhz>;
> > +                       clock-div = <19>;
> > +                       clock-mult = <2>;
> > +               };
> > +
> > +               clk_19_5mhz:clk_19_5mhz {
> > +                       compatible = "fixed-factor-clock";
> > +                        #clock-cells = <0>;
> > +                       clocks = <&pll_312mhz>;
> > +                       clock-div = <32>;
> > +                       clock-mult = <2>;
> > +               };
> > +
> > +               clk_14_857mhz:clk_14_857mhz {
> > +                       compatible = "fixed-factor-clock";
> > +                        #clock-cells = <0>;
> > +                       clocks = <&pll_312mhz>;
> > +                       clock-div = <42>;
> > +                       clock-mult = <2>;
> > +               };
> > +
> > +               clk_14_682mhz:clk_14_682mhz {
> > +                       compatible = "fixed-factor-clock";
> > +                        #clock-cells = <0>;
> > +                       clocks = <&pll_312mhz>;
> > +                       clock-div = <51>;
> > +                       clock-mult = <2>;
> > +               };
> > +
> > +               clk_13mhz:clk_13mhz {
> > +                       compatible = "fixed-factor-clock";
> > +                        #clock-cells = <0>;
> > +                       clocks = <&osc13mhz>;
> > +                       clock-div = <1>;
> > +                       clock-mult = <1>;
> > +               };
> > +
> > +               clk_dummy:clk_dummy {
> > +                       compatible = "fixed-clock";
> > +                        #clock-cells = <0>;
> > +                       clock-frequency = <0>;
> > +               };
> > +
> > +               clk_ostimer:clk_ostimer {
> > +                       compatible = "fixed-factor-clock";
> > +                        #clock-cells = <0>;
> > +                       clocks = <&osc13mhz>;
> > +                       clock-div = <4>;
> > +                       clock-mult = <1>;
> > +               };
> > +
> > +               pxa27x_sysclks:pxa27x_sysclks {
> > +                       compatible = "marvell,pxa270-core-clocks";
> > +                       #clock-cells = <1>;
> > +                       clocks = <&osc13mhz>;
> > +                       clock-output-names = "run mode", "half-turbo mode",
> > +                               "turbo mode", "cpu core", "system bus", "memory", "lcd";
> > +               };
> > +
> > +               pxa2xx_clks: pxa2xx_clks at 41300004 {
> > +                       compatible = "marvell,pxa-clocks";
> > +                       reg = <0x41300004 0x4>;
> > +                       clocks =
> > +                               <&clk_13mhz>, <&clk_13mhz>, <&clk_dummy>, <&clk_13mhz>,
> > +                               <&clk_13mhz>, <&clk_14_857mhz>, <&clk_14_857mhz>, <&clk_14_857mhz>,
> > +                               <&clk_14_682mhz>, <&clk_ostimer>, <&clk_48mhz>, <&clk_48mhz>,
> > +                               <&clk_19_5mhz>, <&clk_48mhz>, <&clk_32_842mhz>, <&clk_13mhz>,
> > +                               <&pxa27x_sysclks 6>, <&clk_48mhz>, <&clk_48mhz>, <&osc32_768khz>,
> > +                               <&clk_dummy>, <&clk_19_5mhz>, <&pxa27x_sysclks 4>, <&clk_13mhz>,
> > +                               <&pxa27x_sysclks 6>, <&clk_dummy>;
> > +                       #clock-cells = <1>;
> > +                       clock-output-names =
> > +                               "pwm 0,2", "pwm 1,3", "ac97", "ssp2",
> > +                               "ssp3,hwuart", "stuart", "ffuart", "btuart",
> > +                               "i2s", "nssp,ostimer", "usb host,assp", "usb udc",
> > +                               "mmc", "ficp", "i2c", "pwri2c",
> > +                               "lcd", "msl", "usim", "keypad",
> > +                                "im", "memstk", "memc", "ssp1",
> > +                                "camera", "ac97conf";
> > +                       clock-indices = <
> > +                               CKEN_PWM0 CKEN_PWM1 CKEN_AC97 CKEN_SSP2
> > +                               CKEN_SSP3 CKEN_STUART CKEN_FFUART CKEN_BTUART
> > +                               CKEN_I2S CKEN_OSTIMER CKEN_USBHOST CKEN_USB
> > +                               CKEN_MMC CKEN_FICP CKEN_I2C CKEN_PWRI2C
> > +                               CKEN_LCD CKEN_MSL CKEN_USIM CKEN_KEYPAD
> > +                               CKEN_IM CKEN_MEMSTK 65 CKEN_SSP1
> > +                               CKEN_CAMERA CKEN_AC97CONF >;
> > +               };
> > +       };
> > +
> >  };
> 
> Maybe defining these clocks in pxa27x clock driver is better.

Agreed. After a long time trying to figure out the best DT binding for
clocks it seems that defining the per-clock data in DTS is not the best
way. The qcom msm and samsung exynos clock bindings and DTS data are
good examples.

Regards,
Mike

> 
> Regards
> Haojian

  reply	other threads:[~2014-07-03 22:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-29 18:32 [PATCH 0/4] Migrate PXA27x platforms to clock framework Robert Jarzmik
2014-06-29 18:32 ` [PATCH 1/4] clk: add pxa27x clock drivers Robert Jarzmik
2014-07-03  6:12   ` Haojian Zhuang
2014-07-03 22:28     ` Robert Jarzmik
2014-06-29 18:32 ` [PATCH 2/4] dts: add devicetree bindings for pxa27x clocks Robert Jarzmik
2014-07-03  6:14   ` Haojian Zhuang
2014-07-03 22:03     ` Mike Turquette [this message]
2014-07-04 19:38       ` Robert Jarzmik
2014-06-29 18:32 ` [PATCH 3/4] arm: pxa: Transition pxa27x to clk framework Robert Jarzmik
2014-06-29 18:32 ` [PATCH 4/4] clk: dts: document pxa27x clock binding Robert Jarzmik
2014-06-30  6:55 ` [PATCH 0/4] Migrate PXA27x platforms to clock framework Arnd Bergmann
2014-06-30 18:38   ` Robert Jarzmik
2014-06-30 20:14     ` Arnd Bergmann
2014-07-03  6:21     ` Haojian Zhuang
2014-07-03 22:14       ` Robert Jarzmik
2014-07-04  2:39         ` Haojian Zhuang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140703220328.11380.22037@quantum \
    --to=mturquette@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox