openwrtv4/target/linux/apm821xx/dts/wndr4700.dts

407 lines
7.6 KiB
Text
Raw Normal View History

apm821xx: add support for the Netgear Centria N900 WNDR4700/WNDR4720 This patch adds support for Netgear Centria N900 WNDR4700/WNDR4720 hardware highlights: CPU: AMCC PowerPC APM82181 Rev. E at 1000 MHz (PLB=166, OPB=83, EBC=83 MHz) Security support, Boot ROM Location NAND wo/ECC 2k page (8 bits) 32 kB I-Cache 32 kB D-Cache, 256 kB L2-Cache, 32 kB OnChip Memory Board: AMCC APM82181 Evaluation Board, PCIE0/SATA1, 1*USB OTG DRAM: 256 MB (ECC not enabled, 500 Mb/s, 32-bit, CL3) NAND: 128 MiB (SLC, erase size: 128 KiB, page size: 2048, OOB size: 64) ETH: Atheros AR8327N Gigabit Switch (4 x LAN, 1 x WAN) USB: 2 x 3.0 (Renesas uPD720202K8-711-BAA-A, firmware not included) SATA: 1 x SATA-II 3.5" Hard Drive Bay for HDDs (DesignWare SATA). WLAN1: Atheros AR9380 5GHz 802.11an 3:3x3 WLAN2: Atheros AR9581 2.4GHz 802.11bgn 3:3x3 SDCARD: GL827L SD/MMC/MS Flash Card Reader (on internal dwc2 USB 2.0 host) I2C: GMT G781 (i2c-0 @ 0x4d - lm90 compatible temperature sensor) TC654 (i2c-0 @ 0x1b - Dual PWM fan Speed controller) WARNING: The serial port needs a TTL/RS-232 v3.3 level converter! INFO: Since this device only has a NAND chip. I opted for going with root.squashfs in a UBI volume. There's no squashfs/jffs2 image. This target produces three images. a. netgear factory image This image can be used to flash the Netgear WNDR4700 via the firmware recovery mechanism and the web admin site. The bootloader can be instructed to do a firmware recovery via the # fw_recovery command. It will start a tftp server and listen on 192.168.1.1 (the ipaddr variable in u-boot) for incoming, binary tftp clients. The firmware recovery mechanism is also started if any of the flash content which contains the kernel, device-tree definitions or the (fake)rootfs fails to verify or load. b. sysupgrade.tar image for sysupgrade An sysupgrade will replace the entire current LEDE installation with a newer version. This does include the kernel and the ubi rootfs partition. The configuration can be carried over automatically as well if desired. simply copy the sysupgrade.tar to a the WNDR4700 running LEDE and run: root@lede:~# sysupgrade sysupgrade.tar and let it reboot. Note: The devicetree flash area is NOT updated. Until the devicetree definition is stable, this can lead to all sorts of hardware detection problems! So make sure, if you experience issues: try the fw_recovery. If you are unsure whenever this affects you: test if you can reproduce your issue with the initramfs method. As it will always have up-to-date device-tree definitions. c. initramfs image for TFTP (for development and testing) To use the initramfs method, follow the following steps: 1) Move the "lede-apm821xx-netgear-WNDR4700-initramfs-kernel.bin" file to to the root directory of your TFTP server. 2) rename it to wndr4700.bin 3) On the WNDR4700 - Hit Enter during u-boot and insert: # tftp 400000 wndr4700.bin; run addtty; bootm 400000 - This will boot the LEDE image. Note: The default tftp server is 192.168.1.7, if you want to change it: # setenv serverip 192.168.8.7; Note2: The default address for the WNDR4700 is 192.168.1.1: # setenv ipaddr 192.168.8.8; Note: Connect you tftp server on the last LAN port (not the WAN) Note: The firmware for the USB 3.0 Host chip is not included anymore. Therefore the two USB 3.0 ports will not work without the uPD7070x-firmware package installed. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2016-07-20 13:44:57 +00:00
/*
* Device Tree Source for Netgear WNDR4700/WNDR4720 Series
*
* Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without
* any warranty of any kind, whether express or implied.
*/
/dts-v1/;
#include "apm82181.dtsi"
apm821xx: add support for the Netgear Centria N900 WNDR4700/WNDR4720 This patch adds support for Netgear Centria N900 WNDR4700/WNDR4720 hardware highlights: CPU: AMCC PowerPC APM82181 Rev. E at 1000 MHz (PLB=166, OPB=83, EBC=83 MHz) Security support, Boot ROM Location NAND wo/ECC 2k page (8 bits) 32 kB I-Cache 32 kB D-Cache, 256 kB L2-Cache, 32 kB OnChip Memory Board: AMCC APM82181 Evaluation Board, PCIE0/SATA1, 1*USB OTG DRAM: 256 MB (ECC not enabled, 500 Mb/s, 32-bit, CL3) NAND: 128 MiB (SLC, erase size: 128 KiB, page size: 2048, OOB size: 64) ETH: Atheros AR8327N Gigabit Switch (4 x LAN, 1 x WAN) USB: 2 x 3.0 (Renesas uPD720202K8-711-BAA-A, firmware not included) SATA: 1 x SATA-II 3.5" Hard Drive Bay for HDDs (DesignWare SATA). WLAN1: Atheros AR9380 5GHz 802.11an 3:3x3 WLAN2: Atheros AR9581 2.4GHz 802.11bgn 3:3x3 SDCARD: GL827L SD/MMC/MS Flash Card Reader (on internal dwc2 USB 2.0 host) I2C: GMT G781 (i2c-0 @ 0x4d - lm90 compatible temperature sensor) TC654 (i2c-0 @ 0x1b - Dual PWM fan Speed controller) WARNING: The serial port needs a TTL/RS-232 v3.3 level converter! INFO: Since this device only has a NAND chip. I opted for going with root.squashfs in a UBI volume. There's no squashfs/jffs2 image. This target produces three images. a. netgear factory image This image can be used to flash the Netgear WNDR4700 via the firmware recovery mechanism and the web admin site. The bootloader can be instructed to do a firmware recovery via the # fw_recovery command. It will start a tftp server and listen on 192.168.1.1 (the ipaddr variable in u-boot) for incoming, binary tftp clients. The firmware recovery mechanism is also started if any of the flash content which contains the kernel, device-tree definitions or the (fake)rootfs fails to verify or load. b. sysupgrade.tar image for sysupgrade An sysupgrade will replace the entire current LEDE installation with a newer version. This does include the kernel and the ubi rootfs partition. The configuration can be carried over automatically as well if desired. simply copy the sysupgrade.tar to a the WNDR4700 running LEDE and run: root@lede:~# sysupgrade sysupgrade.tar and let it reboot. Note: The devicetree flash area is NOT updated. Until the devicetree definition is stable, this can lead to all sorts of hardware detection problems! So make sure, if you experience issues: try the fw_recovery. If you are unsure whenever this affects you: test if you can reproduce your issue with the initramfs method. As it will always have up-to-date device-tree definitions. c. initramfs image for TFTP (for development and testing) To use the initramfs method, follow the following steps: 1) Move the "lede-apm821xx-netgear-WNDR4700-initramfs-kernel.bin" file to to the root directory of your TFTP server. 2) rename it to wndr4700.bin 3) On the WNDR4700 - Hit Enter during u-boot and insert: # tftp 400000 wndr4700.bin; run addtty; bootm 400000 - This will boot the LEDE image. Note: The default tftp server is 192.168.1.7, if you want to change it: # setenv serverip 192.168.8.7; Note2: The default address for the WNDR4700 is 192.168.1.1: # setenv ipaddr 192.168.8.8; Note: Connect you tftp server on the last LAN port (not the WAN) Note: The firmware for the USB 3.0 Host chip is not included anymore. Therefore the two USB 3.0 ports will not work without the uPD7070x-firmware package installed. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2016-07-20 13:44:57 +00:00
#include <dt-bindings/thermal/thermal.h>
/ {
model = "Netgear WNDR4700/WNDR4720 Series";
compatible = "netgear,wndr4700";
aliases {
serial0 = &UART0;
};
chosen {
linux,stdout-path = "/plb/opb/serial@ef600300";
};
thermal-zones {
cpu_thermal: cpu-thermal {
polling-delay-passive = <10000>; /* milliseconds */
polling-delay = <20000>; /* milliseconds */
thermal-sensors = <&temp0 1>;
trips {
/*
* Once the thermal governers are a bit smarter
* and do hysteresis properly, we can disable
* the fan when the HDD and CPU has < 39 C.
*/
cpu_alert0: cpu-alert0 {
temperature = <25000>;
hysteresis = <2000>;
type = "active";
};
cpu_alert1: cpu-alert1 {
temperature = <27000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "active";
};
cpu_alert2: cpu-alert2 {
temperature = <65000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "active";
};
cpu_alert3: cpu-alert3 {
temperature = <70000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "active";
};
cpu_alert4: cpu-alert4 {
temperature = <75000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "active";
};
cpu_alert5: cpu-alert5 {
temperature = <80000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "active";
};
cpu_alert6: cpu-alert6 {
temperature = <850000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "active";
};
cpu_crit: cpu-crit {
temperature = <90000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "critical";
};
};
cooling-maps {
map0 {
trip = <&cpu_alert0>;
cooling-device = <&fan0 THERMAL_NO_LIMIT 0>;
};
map1 {
trip = <&cpu_alert1>;
cooling-device = <&fan0 1 87>;
};
map2 {
trip = <&cpu_alert2>;
cooling-device = <&fan0 88 100>;
};
map3 {
trip = <&cpu_alert3>;
cooling-device = <&fan0 101 147>;
};
map4 {
trip = <&cpu_alert4>;
cooling-device = <&fan0 148 207>;
};
map5 {
trip = <&cpu_alert5>;
cooling-device = <&fan0 208 231>;
};
map6 {
trip = <&cpu_alert6>;
cooling-device =<&fan0 232 THERMAL_NO_LIMIT>;
};
};
};
};
};
&CRYPTO {
status = "okay";
};
&PKA {
status = "okay";
};
&TRNG {
status = "okay";
};
&SATA1 {
status = "okay";
};
&USBOTG0 {
status = "okay";
dr_mode = "host";
};
&EBC0 {
ndfc@1,0 {
status = "okay";
/* 128 MiB Nand Flash */
nand {
#address-cells = <1>;
#size-cells = <1>;
partition0,0@0x00000000 {
label = "NAND 128MiB 3,3V 8-bit";
reg = <0x00000000 0x08000000>;
read-only;
};
partition0,1@0x00000000 {
label = "uboot";
reg = <0x00000000 0x00180000>;
read-only;
};
partition0,2@0x00180000 {
label = "device-tree";
reg = <0x00180000 0x00020000>;
read-only;
};
partition0,3@0x001a0000 {
label = "kernel";
reg = <0x001a0000 0x001e0000>;
/*
* will also contain a fake/empty
* rootfs to fool Netgear's uboot
* rootfs integrety checks.
*/
};
partition0,4@0x00380000 {
label = "ubi";
reg = <0x00380000 0x01660000>;
};
partition0,5@0x019e0000 {
label = "config";
reg = <0x019e0000 0x00080000>;
read-only;
};
partition0,6@0x01a60000 {
label = "pot";
reg = <0x01a60000 0x00080000>;
read-only;
};
partition0,7@0x01ae0000 {
label = "traffic_meter";
reg = <0x01ae0000 0x00300000>;
read-only;
};
partition0,8@0x01de0000 {
label = "language";
reg = <0x01de0000 0x001c0000>;
read-only;
};
partition0,9@0x01fa0000 {
label = "ecos";
reg = <0x01fa0000 0x06020000>;
read-only;
};
partition0,10@0x07fc0000 {
label = "wifi_data";
reg = <0x07fc0000 0x00040000>;
read-only;
};
partition0,11@0x00180000 {
label = "firmware";
reg = <0x00180000 0x01860000>;
read-only;
};
};
};
};
&UART0 {
status = "okay";
};
&GPIO0 {
status = "okay";
#interrupt-cells = <2>;
interrupt-controller;
interrupts-extended = <&UIC1 0x14>,
<&UIC1 0x1e>,
<&UIC1 0x1f>,
<&UIC2 0x19>;
};
&IIC0 {
status = "okay";
fan0: fan@1b {
compatible = "microchip,tc654";
reg = <0x1b>;
cooling-min-level = <0>;
cooling-max-level = <255>;
#cooling-cells = <2>; /* min followed by max */
gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>; /* fan status */
alarm-gpios = <&GPIO0 5 GPIO_ACTIVE_LOW>; /* fault */
interrupt-parent = <&UIC3>;
interrupts = <0x16 IRQ_TYPE_EDGE_FALLING>; /* fault */
};
temp0: temp@4d {
compatible = "gmt,g781";
reg = <0x4d>;
#thermal-sensor-cells = <1>;
/*
* The LM90 has two sensors:
* temp0 -> internal to LM90
* temp1 -> external NTC near CPU
*/
};
};
&EMAC0 {
status = "okay";
phy-handle = <&phy0>;
mdio {
#address-cells = <1>;
#size-cells = <0>;
phy0: ethernet-phy@0 {
device_type = "ethernet-phy";
reg = <0>;
qca,ar8327-initvals = <
0x0010 0x40000000
0x0624 0x007f7f7f
0x0004 0x07a00000 /* PAD0_MODE */
0x000c 0x01000000 /* PAD6_MODE */
0x007c 0x0000007e /* PORT0_STATUS */
>;
};
};
};
&POB0 {
gpio_keys_polled {
compatible = "gpio-keys-polled";
#address-cells = <1>;
#size-cells = <0>;
#interrupt-cells = <2>;
autorepeat;
poll-interval = <60>; /* 3 * 20 = 60ms */
reset {
label = "Reset button";
linux,code = <KEY_RESTART>;
gpios = <&GPIO0 15 GPIO_ACTIVE_HIGH>;
interrupt-parent = <&UIC1>;
interrupts = <0x14 IRQ_TYPE_EDGE_FALLING>;
};
backup_hd {
label = "Backup HD button";
gpios = <&GPIO0 19 GPIO_ACTIVE_HIGH>;
linux,code = <BTN_0>;
interrupt-parent = <&UIC1>;
interrupts = <0x1e IRQ_TYPE_EDGE_FALLING>;
};
rfkill {
label = "RFKILL button";
gpios = <&GPIO0 20 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_RFKILL>;
interrupt-parent = <&UIC1>;
interrupts = <0x1f IRQ_TYPE_EDGE_FALLING>;
};
wps {
label = "WPS button";
gpios = <&GPIO0 23 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_WPS_BUTTON>;
interrupt-parent = <&UIC2>;
interrupts = <0x19 IRQ_TYPE_EDGE_FALLING>;
};
sdcard {
label = "SDCard inserted";
gpios = <&GPIO0 7 GPIO_ACTIVE_LOW>;
linux,code = <BTN_1>;
};
};
gpio-leds {
compatible = "gpio-leds";
power-green {
label = "wndr4700:green:power";
gpios = <&GPIO0 8 GPIO_ACTIVE_HIGH>;
};
power-orange {
label = "wndr4700:orange:power";
gpios = <&GPIO0 9 GPIO_ACTIVE_LOW>;
linux,default-trigger = "panic";
};
usb-blue {
label = "wndr4700:blue:usb";
gpios = <&GPIO0 10 GPIO_ACTIVE_HIGH>;
};
logo-white {
label = "wndr4700:white:logo";
gpios = <&GPIO0 11 GPIO_ACTIVE_HIGH>;
};
wan-yellow {
label = "wndr4700:yellow:wan";
gpios = <&GPIO0 3 GPIO_ACTIVE_HIGH>;
};
wan-green {
label = "wndr4700:green:wan";
gpios = <&GPIO0 12 GPIO_ACTIVE_HIGH>;
};
hd-green {
label = "wndr4700:green:hd";
gpios = <&GPIO0 14 GPIO_ACTIVE_HIGH>;
};
hd-red {
label = "wndr4700:red:hd";
gpios = <&GPIO0 17 GPIO_ACTIVE_HIGH>;
};
wlan-blue {
label = "wndr4700:blue:wlan";
gpios = <&GPIO0 18 GPIO_ACTIVE_HIGH>;
};
};
};
&PCIE0 {
status = "okay";
};
&MSI {
status = "okay";
};