# Re: \[PATCH v3 16/31\] dts: mpc512x: add clock related device tree specs

- From: Mike Turquette \<hidden\>
- Date: 2013-08-02 22:46:13 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2013/08/8075310
- Thread: https://ratatoskr.run/linuxppc-dev/2013/07/8074764/t.md

```text
Quoting Gerhard Sittig (2013-07-22 05:14:43)
> this addresses the clock driver aka provider's side of clocks
> - prepare for future '<&clks ID>' phandle references for device tree
>   based clock lookup in client drivers
> - introduce a 'clocks' subtree with an 'osc' node for the crystal
>   or oscillator SoC input (fixed frequency)
> - provide default values with 33MHz oscillator frequency in the
>   common include (the 66MHz IPS bus already was there), add
>   override values for the ifm AC14xx board which deviates from
>   the reference design (25MHz xtal, 80MHz IPS bus)
> =

> Signed-off-by: Gerhard Sittig <redacted>

Reviewed-by: Mike Turquette <redacted>

> ---
>  arch/powerpc/boot/dts/ac14xx.dts   |    7 +++++++
>  arch/powerpc/boot/dts/mpc5121.dtsi |   15 ++++++++++++++-
>  2 files changed, 21 insertions(+), 1 deletion(-)
> =

> diff --git a/arch/powerpc/boot/dts/ac14xx.dts b/arch/powerpc/boot/dts/ac1=
4xx.dts
> index a543c40..a1b8837 100644
> --- a/arch/powerpc/boot/dts/ac14xx.dts
> +++ b/arch/powerpc/boot/dts/ac14xx.dts
> @@ -139,7 +139,14 @@
>                 };
>         };
>  =

> +       clocks {
> +               osc {
> +                       clock-frequency =3D <25000000>;
> +               };
> +       };
> +
>         soc@80000000 {
> +               bus-frequency =3D <80000000>;     /* 80 MHz ips bus */
>  =

>                 clock@f00 {
>                         compatible =3D "fsl,mpc5121rev2-clock", "fsl,mpc5=
121-clock";
> diff --git a/arch/powerpc/boot/dts/mpc5121.dtsi b/arch/powerpc/boot/dts/m=
pc5121.dtsi
> index bd14c00..8f4cba0 100644
> --- a/arch/powerpc/boot/dts/mpc5121.dtsi
> +++ b/arch/powerpc/boot/dts/mpc5121.dtsi
> @@ -9,6 +9,8 @@
>   * option) any later version.
>   */
>  =

> +#include <dt-bindings/clock/mpc512x-clock.h>
> +
>  /dts-v1/;
>  =

>  / {
> @@ -73,6 +75,16 @@
>                 ranges =3D <0x0 0x0 0xfc000000 0x04000000>;
>         };
>  =

> +       clocks {
> +               #address-cells =3D <1>;
> +               #size-cells =3D <0>;
> +
> +               osc {
> +                       compatible =3D "fsl,mpc512x-osc", "fixed-clock";
> +                       clock-frequency =3D <33000000>;
> +               };
> +       };
> +
>         soc@80000000 {
>                 compatible =3D "fsl,mpc5121-immr";
>                 #address-cells =3D <1>;
> @@ -118,9 +130,10 @@
>                 };
>  =

>                 /* Clock control */
> -               clock@f00 {
> +               clks: clock@f00 {
>                         compatible =3D "fsl,mpc5121-clock";
>                         reg =3D <0xf00 0x100>;
> +                       #clock-cells =3D <1>;
>                 };
>  =

>                 /* Power Management Controller */
> -- =

> 1.7.10.4
```
