[RFC PATCH 39/50] ARM: at91/dt: move at91sam9g45 SoC to new at91 clk implem

From: Boris BREZILLON
Date: Fri Jun 07 2013 - 14:12:54 EST


Define at91sam9g45 clocks in at91sam9g45 device tree.
Add references to the appropriate clocks in each peripheral.

Signed-off-by: Boris BREZILLON <b.brezillon@xxxxxxxxxxx>
---
arch/arm/boot/dts/at91sam9g45.dtsi | 157 ++++++++++++++++++++++++++++++++++++
1 file changed, 157 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index faec17d..413c6cf 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -76,6 +76,119 @@
pmc: pmc@fffffc00 {
compatible = "atmel,at91rm9200-pmc";
reg = <0xfffffc00 0x100>;
+
+ clk32k: slck {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ };
+
+ main: mainck {
+ compatible = "atmel,at91rm9200-clk-main", "fixed-clock";
+ #clock-cells = <0>;
+ clocks = <&clk32k>;
+ };
+
+ plla: pllack {
+ compatible = "atmel,at91sam9g45-clk-pll";
+ #clock-cells = <0>;
+ clocks = <&main>;
+ id = <0>;
+ input = <2000000 32000000>;
+ output = <74500000 800000000
+ 69500000 750000000
+ 64500000 700000000
+ 59500000 650000000
+ 54500000 600000000
+ 49500000 550000000
+ 44500000 500000000
+ 40000000 450000000>;
+ out = <0 1 2 3 0 1 2 3>;
+ icpll = <0 0 0 0 1 1 1 1>;
+ };
+
+ plladiv: plladivck {
+ compatible = "atmel,at91sam9x5-clk-plldiv";
+ #clock-cells = <0>;
+ clocks = <&plla>;
+ };
+
+ utmi: utmick {
+ compatible = "atmel,at91sam9x5-clk-utmi";
+ #clock-cells = <0>;
+ clocks = <&main>;
+ };
+
+ mck: masterck {
+ compatible = "atmel,at91rm9200-clk-master";
+ #clock-cells = <0>;
+ clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>;
+ output = <0 133000000>;
+ divisors = <1 2 4 3>;
+ };
+
+ usb: usbck {
+ compatible = "atmel,at91sam9x5-clk-usb";
+ #clock-cells = <0>;
+ clocks = <&plladiv>, <&utmi>;
+ };
+
+ prog: progck {
+ compatible = "atmel,at91sam9g45-clk-programmable";
+ #clock-cells = <1>;
+ ids = <0 1>;
+ clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>, <&mck>;
+ clock-output-names = "prog0", "prog1";
+ };
+
+ system: systemck {
+ compatible = "atmel,at91rm9200-clk-system";
+ #clock-cells = <1>;
+ ids = <2 6 8 9>;
+ clocks = <&mck>, <&usb>, <&prog 0>, <&prog 1>;
+ clock-output-names = "ddrck", "uhpck", "pck0", "pck1";
+ };
+
+ periph: periphck {
+ compatible = "atmel,at91rm9200-clk-peripheral";
+ #clock-cells = <1>;
+ clocks = <&mck>;
+ ids = <2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ 17 18 19 20 21 22 23 24 25 26 27 29>;
+ clock-output-names = "pioA_clk",
+ "pioB_clk",
+ "pioC_clk",
+ "pioDE_clk",
+ "trng_clk",
+ "usart0_clk",
+ "usart1_clk",
+ "usart2_clk",
+ "usart3_clk",
+ "mci0_clk",
+ "twi0_clk",
+ "twi1_clk",
+ "spi0_clk",
+ "spi1_clk",
+ "ssc0_clk",
+ "ssc1_clk",
+ "tcb0_clk",
+ "pwm_clk",
+ "tsc_clk",
+ "dma_clk",
+ "uhphs_clk",
+ "lcdc_clk",
+ "ac97_clk",
+ "pclk",
+ "isi_clk",
+ "udphs_clk",
+ "mci1_clk";
+
+ adc_op_clk: adc_op_clk{
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <13200000>;
+ };
+ };
};

rstc@fffffd00 {
@@ -87,6 +200,7 @@
compatible = "atmel,at91sam9260-pit";
reg = <0xfffffd30 0xf>;
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+ clocks = <&mck>;
};


@@ -99,12 +213,16 @@
compatible = "atmel,at91rm9200-tcb";
reg = <0xfff7c000 0x100>;
interrupts = <18 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&periph 18>;
+ clock-names = "t0_clk";
};

tcb1: timer@fffd4000 {
compatible = "atmel,at91rm9200-tcb";
reg = <0xfffd4000 0x100>;
interrupts = <18 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&periph 18>;
+ clock-names = "t0_clk";
};

dma: dma-controller@ffffec00 {
@@ -112,6 +230,8 @@
reg = <0xffffec00 0x200>;
interrupts = <21 IRQ_TYPE_LEVEL_HIGH 0>;
#dma-cells = <2>;
+ clocks = <&periph 21>;
+ clock-names = "dma_clk";
};

pinctrl@fffff200 {
@@ -428,6 +548,7 @@
gpio-controller;
interrupt-controller;
#interrupt-cells = <2>;
+ clocks = <&periph 2>;
};

pioB: gpio@fffff400 {
@@ -438,6 +559,7 @@
gpio-controller;
interrupt-controller;
#interrupt-cells = <2>;
+ clocks = <&periph 3>;
};

pioC: gpio@fffff600 {
@@ -448,6 +570,7 @@
gpio-controller;
interrupt-controller;
#interrupt-cells = <2>;
+ clocks = <&periph 4>;
};

pioD: gpio@fffff800 {
@@ -458,6 +581,7 @@
gpio-controller;
interrupt-controller;
#interrupt-cells = <2>;
+ clocks = <&periph 5>;
};

pioE: gpio@fffffa00 {
@@ -468,6 +592,7 @@
gpio-controller;
interrupt-controller;
#interrupt-cells = <2>;
+ clocks = <&periph 5>;
};
};

@@ -477,6 +602,8 @@
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_dbgu>;
+ clocks = <&mck>;
+ clock-names = "usart";
status = "disabled";
};

@@ -488,6 +615,8 @@
atmel,use-dma-tx;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usart0>;
+ clocks = <&periph 7>;
+ clock-names = "usart";
status = "disabled";
};

@@ -499,6 +628,8 @@
atmel,use-dma-tx;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usart1>;
+ clocks = <&periph 8>;
+ clock-names = "usart";
status = "disabled";
};

@@ -510,6 +641,8 @@
atmel,use-dma-tx;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usart2>;
+ clocks = <&periph 9>;
+ clock-names = "usart";
status = "disabled";
};

@@ -521,6 +654,8 @@
atmel,use-dma-tx;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usart3>;
+ clocks = <&periph 10>;
+ clock-names = "usart";
status = "disabled";
};

@@ -530,6 +665,8 @@
interrupts = <25 IRQ_TYPE_LEVEL_HIGH 3>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_macb_rmii>;
+ clocks = <&periph 25>, <&periph 25>;
+ clock-names = "hclk", "pclk";
status = "disabled";
};

@@ -539,6 +676,7 @@
interrupts = <12 IRQ_TYPE_LEVEL_HIGH 6>;
#address-cells = <1>;
#size-cells = <0>;
+ clocks = <&periph 12>;
status = "disabled";
};

@@ -548,6 +686,7 @@
interrupts = <13 IRQ_TYPE_LEVEL_HIGH 6>;
#address-cells = <1>;
#size-cells = <0>;
+ clocks = <&periph 13>;
status = "disabled";
};

@@ -557,6 +696,8 @@
interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
+ clocks = <&periph 16>;
+ clock-names = "pclk";
status = "disabled";
};

@@ -566,6 +707,8 @@
interrupts = <17 IRQ_TYPE_LEVEL_HIGH 5>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
+ clocks = <&periph 17>;
+ clock-names = "pclk";
status = "disabled";
};

@@ -573,6 +716,8 @@
compatible = "atmel,at91sam9260-adc";
reg = <0xfffb0000 0x100>;
interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&periph 20>, <&adc_op_clk>;
+ clock-names = "adc_clk", "adc_op_clk";
atmel,adc-use-external-triggers;
atmel,adc-channels-used = <0xff>;
atmel,adc-vref = <3300>;
@@ -617,6 +762,8 @@
dma-names = "rxtx";
#address-cells = <1>;
#size-cells = <0>;
+ clocks = <&periph 29>;
+ clock-names = "mci_clk";
status = "disabled";
};

@@ -628,6 +775,8 @@
dma-names = "rxtx";
#address-cells = <1>;
#size-cells = <0>;
+ clocks = <&periph 29>;
+ clock-names = "mci_clk";
status = "disabled";
};

@@ -645,6 +794,8 @@
interrupts = <14 4 3>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spi0>;
+ clocks = <&periph 14>;
+ clock-names = "spi_clk";
status = "disabled";
};

@@ -656,6 +807,8 @@
interrupts = <15 4 3>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spi1>;
+ clocks = <&periph 15>;
+ clock-names = "spi_clk";
status = "disabled";
};
};
@@ -682,6 +835,8 @@
compatible = "atmel,at91rm9200-ohci", "usb-ohci";
reg = <0x00700000 0x100000>;
interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
+ clocks = <&periph 22>, <&periph 22>, <&system 6>;
+ clock-names = "ohci_clk", "hclk", "uhpck";
status = "disabled";
};

@@ -689,6 +844,8 @@
compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
reg = <0x00800000 0x100000>;
interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
+ clocks = <&periph 22>, <&system 6>;
+ clock-names = "ehci_clk", "uhpck";
status = "disabled";
};
};
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/