sunxi: driver refresh for 3.13
[openwrt.git] / target / linux / sunxi / patches-3.13 / 302-dt-sun4i-add-lime.patch
1 From 75e7218e107016a4baae26c70a81b1111fc8c70b Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Fri, 10 Jan 2014 23:23:06 +0100
4 Subject: [PATCH] ARM: sun4i: dt: Add sun4i-a10-olinuxino-lime.dtb
5
6 This add support for the A10-OLinuXino-LIME:
7 https://www.olimex.com/Products/OLinuXino/A10/A10-OLinuXino-LIME
8
9 A low cost Allwinner A10 based dev-board, with sata, ethernet, hdmi and 2x USB.
10
11 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
12 ---
13  arch/arm/boot/dts/Makefile                     |   1 +
14  arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 112 +++++++++++++++++++++++++
15  2 files changed, 113 insertions(+)
16  create mode 100644 arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
17
18 diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
19 index 0b127db..c576de8 100644
20 --- a/arch/arm/boot/dts/Makefile
21 +++ b/arch/arm/boot/dts/Makefile
22 @@ -283,6 +283,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += \
23         sun4i-a10-cubieboard.dtb \
24         sun4i-a10-mini-xplus.dtb \
25         sun4i-a10-hackberry.dtb \
26 +       sun4i-a10-olinuxino-lime.dtb \
27         sun4i-a10-pcduino.dtb \
28         sun5i-a10s-olinuxino-micro.dtb \
29         sun5i-a13-olinuxino.dtb \
30 diff --git a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
31 new file mode 100644
32 index 0000000..3c076f2
33 --- /dev/null
34 +++ b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
35 @@ -0,0 +1,112 @@
36 +/*
37 + * Copyright 2014 - Hans de Goede <hdegoede@redhat.com>
38 + *
39 + * The code contained herein is licensed under the GNU General Public
40 + * License. You may obtain a copy of the GNU General Public License
41 + * Version 2 or later at the following locations:
42 + *
43 + * http://www.opensource.org/licenses/gpl-license.html
44 + * http://www.gnu.org/copyleft/gpl.html
45 + */
46 +
47 +/dts-v1/;
48 +/include/ "sun4i-a10.dtsi"
49 +/include/ "sunxi-ahci-reg.dtsi"
50 +/include/ "sun4i-a10-usb-vbus-reg.dtsi"
51 +
52 +/ {
53 +       model = "Olimex A10-OLinuXino-LIME";
54 +       compatible = "olimex,a10-olinuxino-lime", "allwinner,sun4i-a10";
55 +
56 +       soc@01c00000 {
57 +               emac: ethernet@01c0b000 {
58 +                       pinctrl-names = "default";
59 +                       pinctrl-0 = <&emac_pins_a>;
60 +                       phy = <&phy1>;
61 +                       status = "okay";
62 +               };
63 +
64 +               mdio@01c0b080 {
65 +                       status = "okay";
66 +
67 +                       phy1: ethernet-phy@1 {
68 +                               reg = <1>;
69 +                       };
70 +               };
71 +
72 +               mmc0: mmc@01c0f000 {
73 +                       pinctrl-names = "default", "default";
74 +                       pinctrl-0 = <&mmc0_pins_a>;
75 +                       pinctrl-1 = <&mmc0_cd_pin_reference_design>;
76 +                       cd-gpios = <&pio 7 1 0>; /* PH1 */
77 +                       cd-mode = <1>;
78 +                       status = "okay";
79 +               };
80 +
81 +               usbphy: phy@01c13400 {
82 +                       usb1_vbus-supply = <&reg_usb1_vbus>;
83 +                       usb2_vbus-supply = <&reg_usb2_vbus>;
84 +                       status = "okay";
85 +               };
86 +
87 +               ehci0: usb@01c14000 {
88 +                       status = "okay";
89 +               };
90 +
91 +               ohci0: usb@01c14400 {
92 +                       status = "okay";
93 +               };
94 +
95 +               ahci: sata@01c18000 {
96 +                       target-supply = <&reg_ahci_5v>;
97 +                       status = "okay";
98 +               };
99 +
100 +               ehci1: usb@01c1c000 {
101 +                       status = "okay";
102 +               };
103 +
104 +               ohci1: usb@01c1c400 {
105 +                       status = "okay";
106 +               };
107 +
108 +               pinctrl@01c20800 {
109 +                       ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
110 +                               allwinner,pins = "PC3";
111 +                               allwinner,function = "gpio_out";
112 +                               allwinner,drive = <0>;
113 +                               allwinner,pull = <0>;
114 +                       };
115 +
116 +                       led_pins_olinuxinolime: led_pins@0 {
117 +                               allwinner,pins = "PH2";
118 +                               allwinner,function = "gpio_out";
119 +                               allwinner,drive = <1>;
120 +                               allwinner,pull = <0>;
121 +                       };
122 +               };
123 +
124 +               uart0: serial@01c28000 {
125 +                       pinctrl-names = "default";
126 +                       pinctrl-0 = <&uart0_pins_a>;
127 +                       status = "okay";
128 +               };
129 +       };
130 +
131 +       leds {
132 +               compatible = "gpio-leds";
133 +               pinctrl-names = "default";
134 +               pinctrl-0 = <&led_pins_olinuxinolime>;
135 +
136 +               green {
137 +                       label = "a10-olinuxino-lime:green:usr";
138 +                       gpios = <&pio 7 2 0>;
139 +                       default-state = "on";
140 +               };
141 +       };
142 +
143 +       reg_ahci_5v: ahci-5v {
144 +               pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>;
145 +               gpio = <&pio 2 3 0>;
146 +       };
147 +};
148 -- 
149 1.8.5.5
150