mvebu: make patches apply against 3.18.18 again
[openwrt/staging/chunkeey.git] / target / linux / mvebu / patches-3.18 / 017-define_and_use_common_armada_xp_spi_pinctrl_setting.patch
1 From 547c653b64022618250ca9c7c30151927509ae98 Mon Sep 17 00:00:00 2001
2 From: Arnaud Ebalard <arno@natisbad.org>
3 Date: Sat, 22 Nov 2014 00:46:39 +0100
4 Subject: arm: mvebu: define and use common Armada XP SPI pinctrl setting
5
6 This patch defines common Armada XP pinctrl settings in armada-xp.dtsi
7 for the supported SPI interface (MPP36-39) and use it as default
8 for Armada XP spi interface. That being done, it removes the now
9 redundant definitions in armada-xp-axpwifiap.dts.
10
11 Note: this patch has the potential to break out-of-tree users w/o
12 specific pinctrl settings for their spi interfaces if the default
13 above does not match their config (i.e. if they do not use CS0).
14
15 Acked-by: Andrew Lunn <andrew@lunn.ch>
16 Signed-off-by: Arnaud Ebalard <arno@natisbad.org>
17 Link: https://lkml.kernel.org/r/d404b7abd80ee5a0fd8e8d3586d33cd37740d589.1416613429.git.arno@natisbad.org
18 Signed-off-by: Jason Cooper <jason@lakedaemon.net>
19
20 --- a/arch/arm/boot/dts/armada-xp-axpwifiap.dts
21 +++ b/arch/arm/boot/dts/armada-xp-axpwifiap.dts
22 @@ -100,8 +100,6 @@
23
24 spi0: spi@10600 {
25 status = "okay";
26 - pinctrl-0 = <&pmx_spi>;
27 - pinctrl-names = "default";
28
29 spi-flash@0 {
30 #address-cells = <1>;
31 @@ -138,11 +136,6 @@
32 marvell,function = "gpio";
33 };
34
35 - pmx_spi: pmx-spi {
36 - marvell,pins = "mpp36", "mpp37", "mpp38", "mpp39";
37 - marvell,function = "spi";
38 - };
39 -
40 pmx_phy_int: pmx-phy-int {
41 marvell,pins = "mpp32";
42 marvell,function = "gpio";
43 --- a/arch/arm/boot/dts/armada-xp.dtsi
44 +++ b/arch/arm/boot/dts/armada-xp.dtsi
45 @@ -43,6 +43,11 @@
46 wt-override;
47 };
48
49 + spi0: spi@10600 {
50 + pinctrl-0 = <&spi0_pins>;
51 + pinctrl-names = "default";
52 + };
53 +
54 i2c0: i2c@11000 {
55 compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
56 reg = <0x11000 0x100>;
57 @@ -248,6 +253,12 @@
58 marvell,function = "sd0";
59 };
60
61 + spi0_pins: spi0-pins {
62 + marvell,pins = "mpp36", "mpp37",
63 + "mpp38", "mpp39";
64 + marvell,function = "spi";
65 + };
66 +
67 uart2_pins: uart2-pins {
68 marvell,pins = "mpp42", "mpp43";
69 marvell,function = "uart2";