From df6bf2e9a72eb0e77febb15e85a08c5477f874d7 Mon Sep 17 00:00:00 2001 From: Valentin Longchamp Date: Mon, 27 May 2013 17:40:32 +0200 Subject: ARM: kirkwood: refactor dtsi to largest common nodes Some kirkwood variants (for instance present in the prestera SoCs) do not have all the peripherals whose nodes are declared in kirkwood.dtsi. These missing peripherals are SATA, SDIO, and RTC. As discussed in [1], to avoid that these missing peripherals get initialized which could result in system hangs when accessing undocumented/not present HW registers, their corresponding OF nodes should not get declared at all for some kirkwood variants. The corresponding OF nodes of these peripherals thus are moved from kirkwood.dtsi to the kirkwood-628x.dtsi files so that they still are initialized for these variants where they are present. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-May/167154.html Signed-off-by: Valentin Longchamp Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/kirkwood-6281.dtsi b/arch/arm/boot/dts/kirkwood-6281.dtsi index d6c9d65..0ed2f56 100644 --- a/arch/arm/boot/dts/kirkwood-6281.dtsi +++ b/arch/arm/boot/dts/kirkwood-6281.dtsi @@ -40,5 +40,33 @@ marvell,function = "sdio"; }; }; + + rtc@10300 { + compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc"; + reg = <0x10300 0x20>; + interrupts = <53>; + clocks = <&gate_clk 7>; + }; + + sata@80000 { + compatible = "marvell,orion-sata"; + reg = <0x80000 0x5000>; + interrupts = <21>; + clocks = <&gate_clk 14>, <&gate_clk 15>; + clock-names = "0", "1"; + status = "disabled"; + }; + + mvsdio@90000 { + compatible = "marvell,orion-sdio"; + reg = <0x90000 0x200>; + interrupts = <28>; + clocks = <&gate_clk 4>; + bus-width = <4>; + cap-sdio-irq; + cap-sd-highspeed; + cap-mmc-highspeed; + status = "disabled"; + }; }; }; diff --git a/arch/arm/boot/dts/kirkwood-6282.dtsi b/arch/arm/boot/dts/kirkwood-6282.dtsi index 23991e4..69b760d 100644 --- a/arch/arm/boot/dts/kirkwood-6282.dtsi +++ b/arch/arm/boot/dts/kirkwood-6282.dtsi @@ -49,6 +49,34 @@ }; }; + rtc@10300 { + compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc"; + reg = <0x10300 0x20>; + interrupts = <53>; + clocks = <&gate_clk 7>; + }; + + sata@80000 { + compatible = "marvell,orion-sata"; + reg = <0x80000 0x5000>; + interrupts = <21>; + clocks = <&gate_clk 14>, <&gate_clk 15>; + clock-names = "0", "1"; + status = "disabled"; + }; + + mvsdio@90000 { + compatible = "marvell,orion-sdio"; + reg = <0x90000 0x200>; + interrupts = <28>; + clocks = <&gate_clk 4>; + bus-width = <4>; + cap-sdio-irq; + cap-sd-highspeed; + cap-mmc-highspeed; + status = "disabled"; + }; + thermal@10078 { compatible = "marvell,kirkwood-thermal"; reg = <0x10078 0x4>; diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts index 79391ca..089024a 100644 --- a/arch/arm/boot/dts/kirkwood-nsa310.dts +++ b/arch/arm/boot/dts/kirkwood-nsa310.dts @@ -1,6 +1,7 @@ /dts-v1/; /include/ "kirkwood.dtsi" +/include/ "kirkwood-6281.dtsi" / { model = "ZyXEL NSA310"; diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index e2a28db..39f497e 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi @@ -71,13 +71,6 @@ status = "disabled"; }; - rtc@10300 { - compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc"; - reg = <0x10300 0x20>; - interrupts = <53>; - clocks = <&gate_clk 7>; - }; - spi@10600 { compatible = "marvell,orion-spi"; #address-cells = <1>; @@ -151,15 +144,6 @@ status = "okay"; }; - sata@80000 { - compatible = "marvell,orion-sata"; - reg = <0x80000 0x5000>; - interrupts = <21>; - clocks = <&gate_clk 14>, <&gate_clk 15>; - clock-names = "0", "1"; - status = "disabled"; - }; - nand@3000000 { #address-cells = <1>; #size-cells = <1>; @@ -194,17 +178,5 @@ clocks = <&gate_clk 17>; status = "okay"; }; - - mvsdio@90000 { - compatible = "marvell,orion-sdio"; - reg = <0x90000 0x200>; - interrupts = <28>; - clocks = <&gate_clk 4>; - bus-width = <4>; - cap-sdio-irq; - cap-sd-highspeed; - cap-mmc-highspeed; - status = "disabled"; - }; }; }; -- cgit v0.10.2 From e45498cb0490cf108a4b67ee761900c9179f663b Mon Sep 17 00:00:00 2001 From: Valentin Longchamp Date: Mon, 27 May 2013 17:55:26 +0200 Subject: ARM: kirkwood: add i2c-gpio controller for km_kirkwood This controller is used to access the reset management FPGA of the km_kirkwood boards. Signed-off-by: Valentin Longchamp Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts index 66b971b..5d9f5ea 100644 --- a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts +++ b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts @@ -42,4 +42,11 @@ chip-delay = <25>; }; }; + + i2c@0 { + compatible = "i2c-gpio"; + gpios = < &gpio0 8 0 /* sda */ + &gpio0 9 0 >; /* scl */ + i2c-gpio,delay-us = <2>; /* ~100 kHz */ + }; }; -- cgit v0.10.2 From 33a6675485f27adc182faa856944836e85520fa1 Mon Sep 17 00:00:00 2001 From: Adam Baker Date: Sun, 2 Jun 2013 22:59:50 +0100 Subject: ARM: Kirkwood add cpus definition needed by cpufreq driver to dtsi The Kirkwood CPU Freq driver needs a CPU definition in order for the probe routine to activate it. Add a suitable definition to kirkwood.dtsi This definition is only correct for single core SoCs. There is a dual core SoC in the kirkwood family (88F632X) but the rest of the Kirkwood drivers in the kernel don't currently support it. If they ever do the cpus definition would need to be duplicated in each of the SoC specific include files. Signed-off-by: Adam Baker Tested-by: Andrew Lunn Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index 39f497e..5d7b759 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi @@ -4,6 +4,18 @@ compatible = "marvell,kirkwood"; interrupt-parent = <&intc>; + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "marvell,feroceon"; + clocks = <&core_clk 1>, <&core_clk 3>, <&gate_clk 11>; + clock-names = "cpu_clk", "ddrclk", "powersave"; + }; + }; + aliases { gpio0 = &gpio0; gpio1 = &gpio1; -- cgit v0.10.2