Skip to content

Commit

Permalink
Merge tag 'sunxi-dt-for-3.12-4' of https://github.com/mripard/linux i…
Browse files Browse the repository at this point in the history
…nto late/all

From Maxime Ripard:
Allwinner DT changes for 3.12, take 3 and 4

These patches add support for:
  - The cubieboard2 board
  - The pinctrl driver that got merged for the A20 and A31
  - The associated muxing for the A20 and A31 boards already supported
  - Enables the gated clocks on the A10s, A20 and A31 DTSI.

* tag 'sunxi-dt-for-3.12-4' of https://github.com/mripard/linux:
  ARM: sun7i: Enable the A20 clocks in the DTSI
  ARM: sun6i: Enable clock support in the DTSI
  ARM: sun5i: dt: Use the A10s gates in the DTSI
  ARM: sun7i: Add Cubieboard2 Device Tree
  ARM: sun7i: a20-olinuxino: Enable the user LED
  ARM: sun7i: a20-olinuxino: Enable UARTs muxing
  ARM: sun7i: DT: Add UART muxing options to the DTSI
  ARM: sun7i: Add the PIO controller node to the DTSI
  ARM: sun6i: colombus: Add uart0 muxing
  ARM: sun6i: Add UART0 muxing options
  ARM: sunxi: dt: Add PIO controller to A31 DTSI

Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Olof Johansson committed Aug 29, 2013
2 parents 6229f0f + de7dc93 commit ef2fd3b
Show file tree
Hide file tree
Showing 15 changed files with 965 additions and 36 deletions.
6 changes: 5 additions & 1 deletion arch/arm/boot/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,15 @@ dtb-$(CONFIG_ARCH_STI)+= stih415-b2000.dtb \
stih415-b2020.dtb \
stih416-b2020.dtb
dtb-$(CONFIG_ARCH_SUNXI) += \
sun4i-a10-a1000.dtb \
sun4i-a10-cubieboard.dtb \
sun4i-a10-mini-xplus.dtb \
sun4i-a10-hackberry.dtb \
sun5i-a10s-olinuxino-micro.dtb \
sun5i-a13-olinuxino.dtb
sun5i-a13-olinuxino.dtb \
sun6i-a31-colombus.dtb \
sun7i-a20-cubieboard2.dtb \
sun7i-a20-olinuxino-micro.dtb
dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
tegra20-iris-512.dtb \
tegra20-medcom-wide.dtb \
Expand Down
101 changes: 101 additions & 0 deletions arch/arm/boot/dts/sun4i-a10-a1000.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/*
* Copyright 2013 Emilio López
*
* Emilio López <emilio@elopez.com.ar>
*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
* http://www.gnu.org/copyleft/gpl.html
*/

/dts-v1/;
/include/ "sun4i-a10.dtsi"

/ {
model = "Mele A1000";
compatible = "mele,a1000", "allwinner,sun4i-a10";

aliases {
serial0 = &uart0;
};

soc@01c00000 {
emac: ethernet@01c0b000 {
pinctrl-names = "default";
pinctrl-0 = <&emac_pins_a>;
phy = <&phy1>;
status = "okay";
};

mdio@01c0b080 {
phy-supply = <&reg_emac_3v3>;
status = "okay";

phy1: ethernet-phy@1 {
reg = <1>;
};
};

pinctrl@01c20800 {
emac_power_pin_a1000: emac_power_pin@0 {
allwinner,pins = "PH15";
allwinner,function = "gpio_out";
allwinner,drive = <0>;
allwinner,pull = <0>;
};

led_pins_a1000: led_pins@0 {
allwinner,pins = "PH10", "PH20";
allwinner,function = "gpio_out";
allwinner,drive = <0>;
allwinner,pull = <0>;
};
};

uart0: serial@01c28000 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};

i2c0: i2c@01c2ac00 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins_a>;
status = "okay";
};
};

leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&led_pins_a1000>;

red {
label = "a1000:red:usr";
gpios = <&pio 7 10 0>;
};

blue {
label = "a1000:blue:usr";
gpios = <&pio 7 20 0>;
};
};

regulators {
compatible = "simple-bus";

reg_emac_3v3: emac-3v3 {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&emac_power_pin_a1000>;
regulator-name = "emac-3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-high;
gpio = <&pio 7 15 0>;
};
};
};
6 changes: 3 additions & 3 deletions arch/arm/boot/dts/sun4i-a10-cubieboard.dts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
bootargs = "earlyprintk console=ttyS0,115200";
};

soc@01c20000 {
soc@01c00000 {
emac: ethernet@01c0b000 {
pinctrl-names = "default";
pinctrl-0 = <&emac_pins_a>;
Expand Down Expand Up @@ -76,12 +76,12 @@
pinctrl-0 = <&led_pins_cubieboard>;

blue {
label = "cubieboard::blue";
label = "cubieboard:blue:usr";
gpios = <&pio 7 21 0>; /* LED1 */
};

green {
label = "cubieboard::green";
label = "cubieboard:green:usr";
gpios = <&pio 7 20 0>; /* LED2 */
linux,default-trigger = "heartbeat";
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/sun4i-a10-hackberry.dts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
bootargs = "earlyprintk console=ttyS0,115200";
};

soc@01c20000 {
soc@01c00000 {
emac: ethernet@01c0b000 {
pinctrl-names = "default";
pinctrl-0 = <&emac_pins_a>;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
bootargs = "earlyprintk console=ttyS0,115200";
};

soc@01c20000 {
soc@01c00000 {
uart0: serial@01c28000 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/boot/dts/sun4i-a10.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,10 @@
};
};

soc@01c20000 {
soc@01c00000 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x01c20000 0x300000>;
ranges;

emac: ethernet@01c0b000 {
Expand Down
27 changes: 26 additions & 1 deletion arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
model = "Olimex A10s-Olinuxino Micro";
compatible = "olimex,a10s-olinuxino-micro", "allwinner,sun5i-a10s";

soc@01c20000 {
soc@01c00000 {
emac: ethernet@01c0b000 {
pinctrl-names = "default";
pinctrl-0 = <&emac_pins_a>;
Expand Down Expand Up @@ -60,6 +60,31 @@
pinctrl-0 = <&uart3_pins_a>;
status = "okay";
};

i2c0: i2c@01c2ac00 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins_a>;
status = "okay";
};

i2c1: i2c@01c2b000 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins_a>;
status = "okay";

at24@50 {
compatible = "at,24c16";
pagesize = <16>;
reg = <0x50>;
read-only;
};
};

i2c2: i2c@01c2b400 {
pinctrl-names = "default";
pinctrl-0 = <&i2c2_pins_a>;
status = "okay";
};
};

leds {
Expand Down
93 changes: 69 additions & 24 deletions arch/arm/boot/dts/sun5i-a10s.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,16 @@

ahb_gates: ahb_gates@01c20060 {
#clock-cells = <1>;
compatible = "allwinner,sun4i-ahb-gates-clk";
compatible = "allwinner,sun5i-a10s-ahb-gates-clk";
reg = <0x01c20060 0x8>;
clocks = <&ahb>;
clock-output-names = "ahb_usb0", "ahb_ehci0",
"ahb_ohci0", "ahb_ehci1", "ahb_ohci1", "ahb_ss",
"ahb_dma", "ahb_bist", "ahb_mmc0", "ahb_mmc1",
"ahb_mmc2", "ahb_mmc3", "ahb_ms", "ahb_nand",
"ahb_sdram", "ahb_ace", "ahb_emac", "ahb_ts",
"ahb_spi0", "ahb_spi1", "ahb_spi2", "ahb_spi3",
"ahb_pata", "ahb_sata", "ahb_gps", "ahb_ve",
"ahb_tvd", "ahb_tve0", "ahb_tve1", "ahb_lcd0",
"ahb_lcd1", "ahb_csi0", "ahb_csi1", "ahb_hdmi",
"ahb_de_be0", "ahb_de_be1", "ahb_de_fe0",
"ahb_de_fe1", "ahb_mp", "ahb_mali400";
clock-output-names = "ahb_usbotg", "ahb_ehci", "ahb_ohci",
"ahb_ss", "ahb_dma", "ahb_bist", "ahb_mmc0",
"ahb_mmc1", "ahb_mmc2", "ahb_nand", "ahb_sdram",
"ahb_emac", "ahb_ts", "ahb_spi0", "ahb_spi1",
"ahb_spi2", "ahb_gps", "ahb_stimer", "ahb_ve",
"ahb_tve", "ahb_lcd", "ahb_csi", "ahb_hdmi",
"ahb_de_be", "ahb_de_fe", "ahb_iep", "ahb_mali400";
};

apb0: apb0@01c20054 {
Expand All @@ -120,12 +116,11 @@

apb0_gates: apb0_gates@01c20068 {
#clock-cells = <1>;
compatible = "allwinner,sun4i-apb0-gates-clk";
compatible = "allwinner,sun5i-a10s-apb0-gates-clk";
reg = <0x01c20068 0x4>;
clocks = <&apb0>;
clock-output-names = "apb0_codec", "apb0_spdif",
"apb0_ac97", "apb0_iis", "apb0_pio", "apb0_ir0",
"apb0_ir1", "apb0_keypad";
clock-output-names = "apb0_codec", "apb0_iis", "apb0_pio",
"apb0_ir", "apb0_keypad";
};

/* dummy is pll62 */
Expand All @@ -145,23 +140,19 @@

apb1_gates: apb1_gates@01c2006c {
#clock-cells = <1>;
compatible = "allwinner,sun4i-apb1-gates-clk";
compatible = "allwinner,sun5i-a10s-apb1-gates-clk";
reg = <0x01c2006c 0x4>;
clocks = <&apb1>;
clock-output-names = "apb1_i2c0", "apb1_i2c1",
"apb1_i2c2", "apb1_can", "apb1_scr",
"apb1_ps20", "apb1_ps21", "apb1_uart0",
"apb1_uart1", "apb1_uart2", "apb1_uart3",
"apb1_uart4", "apb1_uart5", "apb1_uart6",
"apb1_uart7";
"apb1_i2c2", "apb1_uart0", "apb1_uart1",
"apb1_uart2", "apb1_uart3";
};
};

soc@01c20000 {
soc@01c00000 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x01c20000 0x300000>;
ranges;

emac: ethernet@01c0b000 {
Expand Down Expand Up @@ -229,6 +220,27 @@
allwinner,drive = <0>;
allwinner,pull = <0>;
};

i2c0_pins_a: i2c0@0 {
allwinner,pins = "PB0", "PB1";
allwinner,function = "i2c0";
allwinner,drive = <0>;
allwinner,pull = <0>;
};

i2c1_pins_a: i2c1@0 {
allwinner,pins = "PB15", "PB16";
allwinner,function = "i2c1";
allwinner,drive = <0>;
allwinner,pull = <0>;
};

i2c2_pins_a: i2c2@0 {
allwinner,pins = "PB17", "PB18";
allwinner,function = "i2c2";
allwinner,drive = <0>;
allwinner,pull = <0>;
};
};

timer@01c20c00 {
Expand Down Expand Up @@ -282,5 +294,38 @@
clocks = <&apb1_gates 19>;
status = "disabled";
};

i2c0: i2c@01c2ac00 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "allwinner,sun4i-i2c";
reg = <0x01c2ac00 0x400>;
interrupts = <7>;
clocks = <&apb1_gates 0>;
clock-frequency = <100000>;
status = "disabled";
};

i2c1: i2c@01c2b000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "allwinner,sun4i-i2c";
reg = <0x01c2b000 0x400>;
interrupts = <8>;
clocks = <&apb1_gates 1>;
clock-frequency = <100000>;
status = "disabled";
};

i2c2: i2c@01c2b400 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "allwinner,sun4i-i2c";
reg = <0x01c2b400 0x400>;
interrupts = <9>;
clocks = <&apb1_gates 2>;
clock-frequency = <100000>;
status = "disabled";
};
};
};
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/sun5i-a13-olinuxino.dts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
bootargs = "earlyprintk console=ttyS0,115200";
};

soc@01c20000 {
soc@01c00000 {
pinctrl@01c20800 {
led_pins_olinuxino: led_pins@0 {
allwinner,pins = "PG9";
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/boot/dts/sun5i-a13.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,10 @@
};
};

soc@01c20000 {
soc@01c00000 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x01c20000 0x300000>;
ranges;

intc: interrupt-controller@01c20400 {
Expand Down
Loading

0 comments on commit ef2fd3b

Please sign in to comment.