[PATCH 09/33] ARM: at91/dt: sam9260: define clocks

2014-07-01 Thread Alexandre Belloni
Define the at91sam9260 clocks in the SoC dtsi file.

Signed-off-by: Alexandre Belloni 
---
 arch/arm/boot/dts/at91sam9260.dtsi | 314 -
 1 file changed, 313 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/at91sam9260.dtsi 
b/arch/arm/boot/dts/at91sam9260.dtsi
index c0e0eae16a27..0aa6679db4ab 100644
--- a/arch/arm/boot/dts/at91sam9260.dtsi
+++ b/arch/arm/boot/dts/at91sam9260.dtsi
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 
 / {
model = "Atmel AT91SAM9260 family SoC";
@@ -48,6 +49,26 @@
reg = <0x2000 0x0400>;
};
 
+   clocks {
+   slow_xtal: slow_xtal {
+   compatible = "fixed-clock";
+   #clock-cells = <0>;
+   clock-frequency = <0>;
+   };
+
+   main_xtal: main_xtal {
+   compatible = "fixed-clock";
+   #clock-cells = <0>;
+   clock-frequency = <0>;
+   };
+
+   adc_op_clk: adc_op_clk{
+   compatible = "fixed-clock";
+   #clock-cells = <0>;
+   clock-frequency = <500>;
+   };
+   };
+
ahb {
compatible = "simple-bus";
#address-cells = <1>;
@@ -74,8 +95,260 @@
};
 
pmc: pmc@fc00 {
-   compatible = "atmel,at91rm9200-pmc";
+   compatible = "atmel,at91sam9260-pmc";
reg = <0xfc00 0x100>;
+   interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+   interrupt-controller;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   #interrupt-cells = <1>;
+
+   main_osc: main_osc {
+   compatible = 
"atmel,at91rm9200-clk-main-osc";
+   #clock-cells = <0>;
+   interrupts-extended = < 
AT91_PMC_MOSCS>;
+   clocks = <_xtal>;
+   };
+
+   main: mainck {
+   compatible = 
"atmel,at91rm9200-clk-main";
+   #clock-cells = <0>;
+   clocks = <_osc>;
+   };
+
+   slow_rc_osc: slow_rc_osc {
+   compatible = "fixed-clock";
+   #clock-cells = <0>;
+   clock-frequency = <32768>;
+   clock-accuracy = <5000>;
+   };
+
+   clk32k: slck {
+   compatible = 
"atmel,at91sam9260-clk-slow";
+   #clock-cells = <0>;
+   clocks = <_rc_osc>, <_xtal>;
+   };
+
+   plla: pllack {
+   compatible = "atmel,at91rm9200-clk-pll";
+   #clock-cells = <0>;
+   interrupts-extended = < 
AT91_PMC_LOCKA>;
+   clocks = <>;
+   reg = <0>;
+   atmel,clk-input-range = <100 
3200>;
+   #atmel,pll-clk-output-range-cells = <4>;
+   atmel,pll-clk-output-ranges = <8000 
16000 0 1>,
+   <15000 
24000 2 1>;
+   };
+
+   pllb: pllbck {
+   compatible = "atmel,at91rm9200-clk-pll";
+   #clock-cells = <0>;
+   interrupts-extended = < 
AT91_PMC_LOCKB>;
+   clocks = <>;
+   reg = <1>;
+   atmel,clk-input-range = <100 
500>;
+   #atmel,pll-clk-output-range-cells = <4>;
+   atmel,pll-clk-output-ranges = <7000 
13000 1 1>;
+   };
+
+   mck: masterck {
+   compatible = 
"atmel,at91rm9200-clk-master";
+   #clock-cells = <0>;
+   interrupts-extended = < 
AT91_PMC_MCKRDY>;
+ 

[PATCH 09/33] ARM: at91/dt: sam9260: define clocks

2014-07-01 Thread Alexandre Belloni
Define the at91sam9260 clocks in the SoC dtsi file.

Signed-off-by: Alexandre Belloni alexandre.bell...@free-electrons.com
---
 arch/arm/boot/dts/at91sam9260.dtsi | 314 -
 1 file changed, 313 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/at91sam9260.dtsi 
b/arch/arm/boot/dts/at91sam9260.dtsi
index c0e0eae16a27..0aa6679db4ab 100644
--- a/arch/arm/boot/dts/at91sam9260.dtsi
+++ b/arch/arm/boot/dts/at91sam9260.dtsi
@@ -12,6 +12,7 @@
 #include dt-bindings/pinctrl/at91.h
 #include dt-bindings/interrupt-controller/irq.h
 #include dt-bindings/gpio/gpio.h
+#include dt-bindings/clock/at91.h
 
 / {
model = Atmel AT91SAM9260 family SoC;
@@ -48,6 +49,26 @@
reg = 0x2000 0x0400;
};
 
+   clocks {
+   slow_xtal: slow_xtal {
+   compatible = fixed-clock;
+   #clock-cells = 0;
+   clock-frequency = 0;
+   };
+
+   main_xtal: main_xtal {
+   compatible = fixed-clock;
+   #clock-cells = 0;
+   clock-frequency = 0;
+   };
+
+   adc_op_clk: adc_op_clk{
+   compatible = fixed-clock;
+   #clock-cells = 0;
+   clock-frequency = 500;
+   };
+   };
+
ahb {
compatible = simple-bus;
#address-cells = 1;
@@ -74,8 +95,260 @@
};
 
pmc: pmc@fc00 {
-   compatible = atmel,at91rm9200-pmc;
+   compatible = atmel,at91sam9260-pmc;
reg = 0xfc00 0x100;
+   interrupts = 1 IRQ_TYPE_LEVEL_HIGH 7;
+   interrupt-controller;
+   #address-cells = 1;
+   #size-cells = 0;
+   #interrupt-cells = 1;
+
+   main_osc: main_osc {
+   compatible = 
atmel,at91rm9200-clk-main-osc;
+   #clock-cells = 0;
+   interrupts-extended = pmc 
AT91_PMC_MOSCS;
+   clocks = main_xtal;
+   };
+
+   main: mainck {
+   compatible = 
atmel,at91rm9200-clk-main;
+   #clock-cells = 0;
+   clocks = main_osc;
+   };
+
+   slow_rc_osc: slow_rc_osc {
+   compatible = fixed-clock;
+   #clock-cells = 0;
+   clock-frequency = 32768;
+   clock-accuracy = 5000;
+   };
+
+   clk32k: slck {
+   compatible = 
atmel,at91sam9260-clk-slow;
+   #clock-cells = 0;
+   clocks = slow_rc_osc, slow_xtal;
+   };
+
+   plla: pllack {
+   compatible = atmel,at91rm9200-clk-pll;
+   #clock-cells = 0;
+   interrupts-extended = pmc 
AT91_PMC_LOCKA;
+   clocks = main;
+   reg = 0;
+   atmel,clk-input-range = 100 
3200;
+   #atmel,pll-clk-output-range-cells = 4;
+   atmel,pll-clk-output-ranges = 8000 
16000 0 1,
+   15000 
24000 2 1;
+   };
+
+   pllb: pllbck {
+   compatible = atmel,at91rm9200-clk-pll;
+   #clock-cells = 0;
+   interrupts-extended = pmc 
AT91_PMC_LOCKB;
+   clocks = main;
+   reg = 1;
+   atmel,clk-input-range = 100 
500;
+   #atmel,pll-clk-output-range-cells = 4;
+   atmel,pll-clk-output-ranges = 7000 
13000 1 1;
+   };
+
+   mck: masterck {
+   compatible = 
atmel,at91rm9200-clk-master;
+   #clock-cells = 0;
+