-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'tags/sunxi-support-for-3.8' of git://github.com/mripard/li…
…nux into next/soc From Maxime Ripard: Allwinner SoC support for 3.8 * tag 'tags/sunxi-support-for-3.8' of git://github.com/mripard/linux: ARM: sunxi: Add entry to MAINTAINERS ARM: sunxi: Add device tree for the A13 and the Olinuxino board ARM: sunxi: Add earlyprintk support ARM: sunxi: Add basic support for Allwinner A1x SoCs irqchip: sunxi: Add irq controller driver clocksource: sunxi: Add Allwinner A1X Timer Driver clk: sunxi: Add dummy fixed rate clock for Allwinner A1X SoCs Signed-off-by: Olof Johansson <olof@lixom.net>
- Loading branch information
Showing
26 changed files
with
802 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
ARM Allwinner SoCs | ||
================== | ||
|
||
This document lists all the ARM Allwinner SoCs that are currently | ||
supported in mainline by the Linux kernel. This document will also | ||
provide links to documentation and or datasheet for these SoCs. | ||
|
||
SunXi family | ||
------------ | ||
|
||
Flavors: | ||
Allwinner A10 (sun4i) | ||
Datasheet : http://dl.linux-sunxi.org/A10/A10%20Datasheet%20-%20v1.21%20%282012-04-06%29.pdf | ||
|
||
Allwinner A13 (sun5i) | ||
Datasheet : http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf | ||
|
||
Core: Cortex A8 | ||
Linux kernel mach directory: arch/arm/mach-sunxi |
104 changes: 104 additions & 0 deletions
104
Documentation/devicetree/bindings/interrupt-controller/allwinner,sunxi-ic.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
Allwinner Sunxi Interrupt Controller | ||
|
||
Required properties: | ||
|
||
- compatible : should be "allwinner,sunxi-ic" | ||
- reg : Specifies base physical address and size of the registers. | ||
- interrupt-controller : Identifies the node as an interrupt controller | ||
- #interrupt-cells : Specifies the number of cells needed to encode an | ||
interrupt source. The value shall be 1. | ||
|
||
The interrupt sources are as follows: | ||
|
||
0: ENMI | ||
1: UART0 | ||
2: UART1 | ||
3: UART2 | ||
4: UART3 | ||
5: IR0 | ||
6: IR1 | ||
7: I2C0 | ||
8: I2C1 | ||
9: I2C2 | ||
10: SPI0 | ||
11: SPI1 | ||
12: SPI2 | ||
13: SPDIF | ||
14: AC97 | ||
15: TS | ||
16: I2S | ||
17: UART4 | ||
18: UART5 | ||
19: UART6 | ||
20: UART7 | ||
21: KEYPAD | ||
22: TIMER0 | ||
23: TIMER1 | ||
24: TIMER2 | ||
25: TIMER3 | ||
26: CAN | ||
27: DMA | ||
28: PIO | ||
29: TOUCH_PANEL | ||
30: AUDIO_CODEC | ||
31: LRADC | ||
32: SDMC0 | ||
33: SDMC1 | ||
34: SDMC2 | ||
35: SDMC3 | ||
36: MEMSTICK | ||
37: NAND | ||
38: USB0 | ||
39: USB1 | ||
40: USB2 | ||
41: SCR | ||
42: CSI0 | ||
43: CSI1 | ||
44: LCDCTRL0 | ||
45: LCDCTRL1 | ||
46: MP | ||
47: DEFEBE0 | ||
48: DEFEBE1 | ||
49: PMU | ||
50: SPI3 | ||
51: TZASC | ||
52: PATA | ||
53: VE | ||
54: SS | ||
55: EMAC | ||
56: SATA | ||
57: GPS | ||
58: HDMI | ||
59: TVE | ||
60: ACE | ||
61: TVD | ||
62: PS2_0 | ||
63: PS2_1 | ||
64: USB3 | ||
65: USB4 | ||
66: PLE_PFM | ||
67: TIMER4 | ||
68: TIMER5 | ||
69: GPU_GP | ||
70: GPU_GPMMU | ||
71: GPU_PP0 | ||
72: GPU_PPMMU0 | ||
73: GPU_PMU | ||
74: GPU_RSV0 | ||
75: GPU_RSV1 | ||
76: GPU_RSV2 | ||
77: GPU_RSV3 | ||
78: GPU_RSV4 | ||
79: GPU_RSV5 | ||
80: GPU_RSV6 | ||
82: SYNC_TIMER0 | ||
83: SYNC_TIMER1 | ||
|
||
Example: | ||
|
||
intc: interrupt-controller { | ||
compatible = "allwinner,sunxi-ic"; | ||
reg = <0x01c20400 0x400>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
}; |
17 changes: 17 additions & 0 deletions
17
Documentation/devicetree/bindings/timer/allwinner,sunxi-timer.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Allwinner A1X SoCs Timer Controller | ||
|
||
Required properties: | ||
|
||
- compatible : should be "allwinner,sunxi-timer" | ||
- reg : Specifies base physical address and size of the registers. | ||
- interrupts : The interrupt of the first timer | ||
- clocks: phandle to the source clock (usually a 24 MHz fixed clock) | ||
|
||
Example: | ||
|
||
timer { | ||
compatible = "allwinner,sunxi-timer"; | ||
reg = <0x01c20c00 0x400>; | ||
interrupts = <22>; | ||
clocks = <&osc>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright 2012 Maxime Ripard | ||
* | ||
* Maxime Ripard <maxime.ripard@free-electrons.com> | ||
* | ||
* 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/ "sun5i.dtsi" | ||
|
||
/ { | ||
model = "Olimex A13-Olinuxino"; | ||
compatible = "olimex,a13-olinuxino", "allwinner,sun5i"; | ||
|
||
soc { | ||
duart: uart@01c28400 { | ||
status = "okay"; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* Copyright 2012 Maxime Ripard | ||
* | ||
* Maxime Ripard <maxime.ripard@free-electrons.com> | ||
* | ||
* 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 | ||
*/ | ||
|
||
/include/ "skeleton.dtsi" | ||
|
||
/ { | ||
interrupt-parent = <&intc>; | ||
|
||
cpus { | ||
cpu@0 { | ||
compatible = "arm,cortex-a8"; | ||
}; | ||
}; | ||
|
||
chosen { | ||
bootargs = "earlyprintk console=ttyS0,115200"; | ||
}; | ||
|
||
memory { | ||
reg = <0x40000000 0x20000000>; | ||
}; | ||
|
||
clocks { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
osc: oscillator { | ||
#clock-cells = <0>; | ||
compatible = "fixed-clock"; | ||
clock-frequency = <24000000>; | ||
}; | ||
}; | ||
|
||
soc { | ||
compatible = "simple-bus"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
reg = <0x01c20000 0x300000>; | ||
ranges; | ||
|
||
timer@01c20c00 { | ||
compatible = "allwinner,sunxi-timer"; | ||
reg = <0x01c20c00 0x400>; | ||
interrupts = <22>; | ||
clocks = <&osc>; | ||
}; | ||
|
||
intc: interrupt-controller@01c20400 { | ||
compatible = "allwinner,sunxi-ic"; | ||
reg = <0x01c20400 0x400>; | ||
interrupt-controller; | ||
#interrupt-cells = <1>; | ||
}; | ||
|
||
uart1: uart@01c28400 { | ||
compatible = "ns8250"; | ||
reg = <0x01c28400 0x400>; | ||
interrupts = <2>; | ||
reg-shift = <2>; | ||
clock-frequency = <24000000>; | ||
status = "disabled"; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Early serial output macro for Allwinner A1X SoCs | ||
* | ||
* Copyright (C) 2012 Maxime Ripard | ||
* | ||
* Maxime Ripard <maxime.ripard@free-electrons.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifdef CONFIG_DEBUG_SUNXI_UART1 | ||
#define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28400 | ||
#define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28400 | ||
#endif | ||
|
||
.macro addruart, rp, rv, tmp | ||
ldr \rp, =SUNXI_UART_DEBUG_PHYS_BASE | ||
ldr \rv, =SUNXI_UART_DEBUG_VIRT_BASE | ||
.endm | ||
|
||
#define UART_SHIFT 2 | ||
#include <asm/hardware/debug-8250.S> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
config ARCH_SUNXI | ||
bool "Allwinner A1X SOCs" if ARCH_MULTI_V7 | ||
select CLKSRC_MMIO | ||
select COMMON_CLK | ||
select GENERIC_CLOCKEVENTS | ||
select GENERIC_IRQ_CHIP | ||
select PINCTRL | ||
select SPARSE_IRQ | ||
select SUNXI_TIMER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
obj-$(CONFIG_ARCH_SUNXI) += sunxi.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
zreladdr-$(CONFIG_ARCH_SUNXI) += 0x40008000 |
Oops, something went wrong.