/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ /dts-v1/; #include #include #include "ath79.dtsi" / { compatible = "qca,ap152_dual", "qca,ath79"; model = "QCA AP152 Dual Board"; aliases { serial0 = "/ahb/apb/uart@18020000"; eth0 = "/ahb/ethernet@19000000"; }; memory@0 { device_type = "memory"; reg = <0x0 0x2000000>; }; extosc: oscillator { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <25000000>; }; chosen { bootargs = "board=DTB console=ttyS0,115200 mtdparts=spi0.1:64m(rootfs),2m(kernel),62m(reserved2),66m@0x0(firmware) rootfstype=squashfs,jffs2 noinitrd crashkernel=10M@20M"; }; ahb { apb { uart@18020000 { status = "okay"; }; gpio@18040000 { val,gpio = < 33 3 32 4 >; }; pll-controller@18050000 { clocks = <&extosc>; }; ehci0: usb@1b000000 { compatible = "qca,ath79-ehci"; reg = <0x1b000000 0x200>; interrupt-parent = <&ip3_int>; interrupts = <0>; has-transaction-translator; qca_force_host_mode; qca_force_16bit_ptw; caps-offset = <0x100>; status = "okay"; }; ehci1: usb@1b400000 { compatible = "qca,ath79-ehci"; reg = <0x1b400000 0x200>; interrupt-parent = <&ip3_int>; interrupts = <1>; has-transaction-translator; qca_force_host_mode; qca_force_16bit_ptw; caps-offset = <0x100>; status = "okay"; }; pci: pci@0x16000000 { compatible = "qca,ar724x-pci"; reg = <0x16000000 0x1000>, <0x18280000 0x100>, <0x18250000 0x1000>, <0x12000000 0x02000000>, <1 1>; reg-names = "cfg_base","ctrl_base","crp_base", "mem_base","io_base"; interrupt-parent = <&ip3_int>; interrupts = <2>; status = "okay"; }; }; spi_0: spi@1f000000 { num-cs = <2>; status = "okay"; m25p80@0 { #address-cells = <1>; #size-cells = <1>; compatible = "n25q128a11"; linux,modalias = "m25p80", "n25q128a11"; reg = <0>; spi-max-frequency = <25000000>; partition@0 { label = "u-boot"; reg = <0x000000 0x040000>; }; partition@1 { label = "u-boot-env"; reg = <0x040000 0x050000>; }; partition@2 { label = "reserved1"; reg = <0x050000 0x1f0000>; }; partition@3 { label = "art"; reg = <0x1f0000 0x200000>; }; }; mt29f@1 { #address-cells = <1>; #size-cells = <1>; compatible = "spinand,mt29f"; reg = <1>; spi-max-frequency = <50000000>; status = "okay"; partition@0 { label = "rootfs"; reg = <0x0000000 0x4000000>; }; partition@1 { label = "kernel"; reg = <0x4000000 0x4200000>; }; partition@2 { label = "reserved2"; reg = <0x4200000 0x8000000>; }; partition@3 { label = "firmware"; reg = <0x0000000 0x4200000>; }; }; }; mdio0: mdio@19000000 { compatible = "qca,ag71xx-mdio"; reg = <0x19000000 0x200>; phy-mask = <0>; builtin-switch = <0>; ar934x-support = <0>; reset-bit = <0x400000>; phy0: ethernet-phy@0 { reg = <0>; qca,ar8327-initvals = < 0x00004 0x80080080 /* PAD0_MODE */ 0x0007c 0x7e /* PORT0_STATUS */ >; }; phy1: ethernet-phy@1 { reg = <1>; }; phy2: ethernet-phy@2 { reg = <2>; }; phy3: ethernet-phy@3 { reg = <3>; }; phy4: ethernet-phy@4 { reg = <4>; }; }; eth0: ethernet@19000000 { compatible = "qca,ag71xx-eth"; reg = <0x19000000 0x200>, <0x18070000 0x14>; reg-names = "mac_base", "cfg_base"; mdio-handle = <&mdio0>; eth-pll-data = <0x1919 0x101 0x3000000>; phy-mode = <3>; eth-cfg = <0x40>; phy-mask = <1>; force-speed = <1000>; force-duplex = <1>; max-frame-len = <1540>; desc-pktlen-mask = <0xfff>; reset-bit = <0x200>; has-gbit = <1>; ar724x-support = <1>; qca955x-support = <0>; fifo-cfg = <0x0010ffff 0x015500aa 0x01f00140>; interrupts = <4>; interrupt-names = "mac_irq"; local-mac-address = [ 00 00 00 00 00 00 ]; }; }; gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; #size-cells = <0>; poll-interval = <20>; button@0 { label = "reset"; linux,code = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; debounce-interval = <60>; }; button@1 { label = "WPS button"; linux,code = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; debounce-interval = <60>; }; }; leds { compatible = "gpio-leds"; led@0 { label = "ap152:green:usb0"; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; led@1 { label = "ap152:green:usb1"; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; }; };