@ -14,51 +14,107 @@
*
*/
#include "qcom-ipq4019-ap.dk01.1 .dtsi"
#include "qcom-ipq4019.dtsi"
#include "qcom-ipq4019-bus.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/soc/qcom,tcsr.h>
/ {
model = "AVM FRITZ!Box 4040";
compatible = "avm,fritzbox-4040", "qcom,ipq4019";
aliases {
led-boot = &power;
led-failsafe = &flash;
led-running = &power;
led-upgrade = &flash;
};
reserved-memory {
#address-cells = <0x1>;
#size-cells = <0x1>;
ranges;
rsvd1@87000000 {
reg = <0x87000000 0x500000>;
no-map ;
tz_apps@87b8 0000 {
reg = <0x87b80000 0x28 0000>;
reusable ;
};
wifi_dump@875 00000 {
reg = <0x87500000 0x60 0000>;
smem@87e 00000 {
reg = <0x87e00000 0x08 0000>;
no-map;
};
rsvd2@87B0 0000 {
reg = <0x87b00000 0x50 0000>;
tz@87e8 0000 {
reg = <0x87e80000 0x18 0000>;
no-map;
};
};
/*
This also works. Maybe it could be smaller still.
reserved-memory {
#address-cells = <0x1>;
#size-cells = <0x1> ;
ranges ;
soc {
mdio@90000 {
status = "okay" ;
} ;
rsvd1@87E00000 {
reg = <0x87e00000 0x200000>;
no-map;
ess-psgmii@98000 {
status = "okay";
};
tcsr@1949000 {
compatible = "qcom,tcsr";
reg = <0x1949000 0x100>;
qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
};
tcsr@194b000 {
compatible = "qcom,tcsr";
reg = <0x194b000 0x100>;
qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
};
ess_tcsr@1953000 {
compatible = "qcom,tcsr";
reg = <0x1953000 0x1000>;
qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
};
tcsr@1957000 {
compatible = "qcom,tcsr";
reg = <0x1957000 0x100>;
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
};
usb2@60f8800 {
status = "ok";
};
serial@78af000 {
pinctrl-0 = <&serial_pins>;
pinctrl-names = "default";
status = "ok";
};
usb3@8af8800 {
status = "ok";
};
crypto@8e3a000 {
status = "ok";
};
wifi@a000000 {
status = "okay";
};
wifi@a800000 {
status = "okay";
};
watchdog@b017000 {
status = "ok";
};
};
*/
soc {
qca8075: ess-switch@c000000 {
status = "okay";
@ -68,10 +124,14 @@
enable-usb-power {
gpio-hog;
line-name = "enable USB3 power";
gpios = <0x 7 GPIO_ACTIVE_HIGH>;
gpios = <7 GPIO_ACTIVE_HIGH>;
output-high;
};
};
edma@c080000 {
status = "okay";
};
};
gpio-keys {
@ -79,7 +139,7 @@
wlan {
label = "wlan";
gpios = <&tlmm 0x3a GPIO_ACTIVE_LOW>;
gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
};
@ -90,52 +150,85 @@
};
};
aliases {
led-boot = &power;
led-failsafe = &flash;
led-running = &power;
led-upgrade = &flash;
};
gpio-leds {
compatible = "gpio-leds";
wlan {
label = "fritz4040:green:wlan";
gpios = <&qca8075 0x 1 GPIO_ACTIVE_HIGH>;
gpios = <&qca8075 1 GPIO_ACTIVE_HIGH>;
};
panic: info_red {
label = "fritz4040:red:info";
gpios = <&qca8075 0x 3 GPIO_ACTIVE_HIGH>;
gpios = <&qca8075 3 GPIO_ACTIVE_HIGH>;
panic-indicator;
};
wan {
label = "fritz4040:green:wan";
gpios = <&qca8075 0x 5 GPIO_ACTIVE_HIGH>;
gpios = <&qca8075 5 GPIO_ACTIVE_HIGH>;
};
power: power {
label = "fritz4040:green:power";
gpios = <&qca8075 0xb GPIO_ACTIVE_HIGH>;
gpios = <&qca8075 11 GPIO_ACTIVE_HIGH>;
};
lan {
label = "fritz4040:green:lan";
gpios = <&qca8075 0xd GPIO_ACTIVE_HIGH>;
gpios = <&qca8075 13 GPIO_ACTIVE_HIGH>;
};
flash: info_amber {
label = "fritz4040:amber:info";
gpios = <&qca8075 0xf GPIO_ACTIVE_HIGH>;
gpios = <&qca8075 15 GPIO_ACTIVE_HIGH>;
};
};
};
&tlmm {
serial_pins: serial_pinmux {
mux {
pins = "gpio60", "gpio61";
function = "blsp_uart0";
bias-disable;
};
};
spi_0_pins: spi_0_pinmux {
mux {
function = "blsp_spi0";
pins = "gpio55", "gpio56", "gpio57";
drive-strength = <12>;
bias-disable;
};
mux_cs {
function = "gpio";
pins = "gpio54";
drive-strength = <2>;
bias-disable;
output-high;
};
};
};
&cryptobam {
status = "ok";
};
&blsp_dma {
status = "ok";
};
&spi_0 { /* BLSP1 QUP1 */
pinctrl-0 = <&spi_0_pins>;
pinctrl-names = "default";
status = "ok";
cs-gpios = <&tlmm 54 0>;
mx25l25635f@0 {
compatible = "mx25l25635f", "jedec,spi-nor";
compatible = "jedec,spi-nor";
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
@ -206,12 +299,24 @@
};
partition11@2A0000 {
label = "firmware";
reg = <0x002A0000 0x01C 60000>;
reg = <0x002a0000 0x01c 60000>;
};
partition12@1f00000 {
label = "jffs2";
reg = <0x01F 00000 0x00100000>;
reg = <0x01f 00000 0x00100000>;
};
};
};
};
&usb3_ss_phy {
status = "ok";
};
&usb3_hs_phy {
status = "ok";
};
&usb2_hs_phy {
status = "ok";
};