f79b100a5ed356d4c70c3cccf89ae4216f89eb80
[openwrt/staging/wigyori.git] / target / linux / oxnas / patches-4.14 / 500-oxnas-sata.patch
1 --- a/drivers/ata/Kconfig
2 +++ b/drivers/ata/Kconfig
3 @@ -492,6 +492,13 @@ config SATA_VITESSE
4
5 If unsure, say N.
6
7 +config SATA_OXNAS
8 + tristate "PLXTECH NAS782X SATA support"
9 + help
10 + This option enables support for Nas782x Serial ATA controller.
11 +
12 + If unsure, say N.
13 +
14 comment "PATA SFF controllers with BMDMA"
15
16 config PATA_ALI
17 --- a/drivers/ata/Makefile
18 +++ b/drivers/ata/Makefile
19 @@ -46,6 +46,7 @@ obj-$(CONFIG_SATA_SVW) += sata_svw.o
20 obj-$(CONFIG_SATA_ULI) += sata_uli.o
21 obj-$(CONFIG_SATA_VIA) += sata_via.o
22 obj-$(CONFIG_SATA_VITESSE) += sata_vsc.o
23 +obj-$(CONFIG_SATA_OXNAS) += sata_oxnas.o
24
25 # SFF PATA w/ BMDMA
26 obj-$(CONFIG_PATA_ALI) += pata_ali.o
27 --- a/arch/arm/boot/dts/ox820.dtsi
28 +++ b/arch/arm/boot/dts/ox820.dtsi
29 @@ -385,5 +385,20 @@
30 };
31
32 };
33 +
34 + sata: sata@45900000 {
35 + compatible = "plxtech,nas782x-sata";
36 + /* ports dmactl sgdma */
37 + reg = <0x45900000 0x20000>, <0x459A0000 0x40>, <0x459B0000 0x20>,
38 + /* core phy descriptors (optional) */
39 + <0x459E0000 0x2000>, <0x44900000 0x0C>, <0x50000000 0x1000>;
40 + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
41 + clocks = <&stdclk CLK_820_SATA>;
42 + resets = <&reset RESET_SATA>, <&reset RESET_SATA_LINK>, <&reset RESET_SATA_PHY>;
43 + reset-names = "sata", "link", "phy";
44 + nr-ports = <1>;
45 + status = "disabled";
46 + };
47 +
48 };
49 };