diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index 6218ec994c8..7f9e627fdb4 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1739,6 +1739,7 @@ define KernelPackage/usb3 +TARGET_ramips_mt7621:kmod-usb-xhci-mtk \ +TARGET_mediatek:kmod-usb-xhci-mtk \ +TARGET_apm821xx_nand:kmod-usb-xhci-pci-renesas \ + +TARGET_lantiq_xrx200:kmod-usb-xhci-pci-renesas \ +TARGET_mvebu_cortexa9:kmod-usb-xhci-pci-renesas KCONFIG:= \ CONFIG_USB_PCI=y \ diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7490-micron.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7490-micron.dts new file mode 100644 index 00000000000..8d763788a04 --- /dev/null +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7490-micron.dts @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "vr9_avm_fritz7490.dtsi" + +/ { + compatible = "avm,fritz7490-micron", "lantiq,xway", "lantiq,vr9"; + model = "AVM FRITZ!Box 7490 (Micron NAND)"; +}; + +&nand1 { + nand-ecc-engine = <&nand1>; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7490.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7490.dts new file mode 100644 index 00000000000..cccefeaf41e --- /dev/null +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7490.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "vr9_avm_fritz7490.dtsi" + +/ { + compatible = "avm,fritz7490", "lantiq,xway", "lantiq,vr9"; + model = "AVM FRITZ!Box 7490"; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7490.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7490.dtsi new file mode 100644 index 00000000000..6488c574c29 --- /dev/null +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7490.dtsi @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "vr9_avm_fritzxx90.dtsi" + +/ { + compatible = "avm,fritz7490", "lantiq,xway", "lantiq,vr9"; + model = "AVM FRITZ!Box 7490"; +}; + +&aliases { + led-dsl = &led_info_green; + led-internet = &led_internet; + led-wifi = &led_wifi; +}; + +&leds { + led_internet: internet { + label = "green:internet"; + gpios = <&gpio 47 GPIO_ACTIVE_LOW>; + }; + + led_fon: fon { + label = "green:fon"; + gpios = <&gpio 36 GPIO_ACTIVE_LOW>; + }; + + led_wifi: wifi { + label = "green:wlan"; + gpios = <&gpio 35 GPIO_ACTIVE_LOW>; + }; +}; + +&gswip_mdio { + phy0: ethernet-phy@0 { + reg = <0x00>; + reset-gpios = <&gpio 32 GPIO_ACTIVE_LOW>; + }; + + phy1: ethernet-phy@1 { + reg = <0x01>; + reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + }; + + phy11: ethernet-phy@11 { + reg = <0x11>; + }; + + phy13: ethernet-phy@13 { + reg = <0x13>; + }; +}; + +&gswip_ports { + port@0 { + reg = <0>; + label = "lan3"; + phy-mode = "rgmii-rxid"; + phy-handle = <&phy0>; + }; + + port@1 { + reg = <1>; + label = "lan4"; + phy-mode = "rgmii-rxid"; + phy-handle = <&phy1>; + }; + + port@2 { + reg = <2>; + label = "lan2"; + phy-mode = "internal"; + phy-handle = <&phy11>; + }; + + port@4 { + reg = <4>; + label = "lan1"; + phy-mode = "internal"; + phy-handle = <&phy13>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritzxx90.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritzxx90.dtsi new file mode 100644 index 00000000000..4d138a58e66 --- /dev/null +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritzxx90.dtsi @@ -0,0 +1,174 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "vr9.dtsi" + +#include +#include + +/ { + chosen { + bootargs = "console=ttyLTQ0,115200"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x10000000>; + }; + + aliases: aliases { + led-boot = &led_power_green; + led-failsafe = &led_info_red; + led-running = &led_power_green; + led-upgrade = &led_info_red; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <100>; + + power { + label = "power"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wifi { + label = "wifi"; + gpios = <&gpio 29 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds: leds { + compatible = "gpio-leds"; + + led_power_green: power_green { + label = "green:power"; + gpios = <&gpio 45 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + + led_info_green: info_green { + label = "green:info"; + gpios = <&gpio 33 GPIO_ACTIVE_LOW>; + }; + + led_info_red: info_red { + label = "red:info"; + gpios = <&gpio 46 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&gphy0 { + lantiq,gphy-mode = ; +}; + +&gphy1 { + lantiq,gphy-mode = ; +}; + +&gpio { + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + gpio-ranges = <&gpio 0 0 56>; + + state_default: pinmux { + phy-rst { + lantiq,pins = "io32", "io44"; + lantiq,pull = <0>; + lantiq,open-drain; + lantiq,output = <1>; + }; + + pcie-rst { + lantiq,pins = "io21"; + lantiq,open-drain; + lantiq,output = <1>; + }; + }; + + usb-vbus { + gpio-hog; + line-name = "usb-vbus"; + gpios = <14 GPIO_ACTIVE_HIGH>; + output-high; + }; + + pcie-enable-dev { + gpio-hog; + line-name = "pcie-enable-dev"; + gpios = <22 GPIO_ACTIVE_LOW>; + output-low; + }; +}; + +&gswip { + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; +}; + +&spi { + status = "okay"; + + flash@4 { + compatible = "jedec,spi-nor"; + reg = <4>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + urlader: partition@0 { + reg = <0x0 0x40000>; + label = "urlader"; + read-only; + }; + + partition@40000 { + reg = <0x40000 0x60000>; + label = "tffs (1)"; + read-only; + }; + + partition@a0000 { + reg = <0xa0000 0x60000>; + label = "tffs (2)"; + read-only; + }; + }; + }; +}; + +&localbus { + nand1: nand@1 { + compatible = "lantiq,nand-xway"; + bank-width = <2>; + reg = <0x1 0x0 0x2000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "kernel"; + reg = <0x0 0x400000>; + }; + + partition@400000 { + label = "ubi"; + reg = <0x400000 0x1fc00000>; + }; + }; + }; +}; + +&pcie0 { + status = "okay"; + + gpio-reset = <&gpio 21 GPIO_ACTIVE_LOW>; + lantiq,switch-pcie-endianess; +}; diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk index 3c05636f563..6df679dad95 100644 --- a/target/linux/lantiq/image/vr9.mk +++ b/target/linux/lantiq/image/vr9.mk @@ -208,6 +208,30 @@ define Device/avm_fritz7430 endef TARGET_DEVICES += avm_fritz7430 +define Device/avm_fritz7490 + $(Device/dsa-migration) + $(Device/AVM) + $(Device/NAND) + DEVICE_MODEL := FRITZ!Box 7490 + DEVICE_VARIANT := Other NAND + KERNEL_SIZE := 4096k + IMAGE_SIZE := 49152k + DEVICE_PACKAGES := kmod-usb3 fritz-tffs -kmod-owl-loader +endef +TARGET_DEVICES += avm_fritz7490 + +define Device/avm_fritz7490-micron + $(Device/dsa-migration) + $(Device/AVM) + $(Device/NAND) + DEVICE_MODEL := FRITZ!Box 7490 + DEVICE_VARIANT := Micron NAND + KERNEL_SIZE := 4096k + IMAGE_SIZE := 49152k + DEVICE_PACKAGES := kmod-usb3 fritz-tffs -kmod-owl-loader +endef +TARGET_DEVICES += avm_fritz7490-micron + define Device/bt_homehub-v5a $(Device/dsa-migration) $(Device/NAND) diff --git a/target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds b/target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds index 0c80aaa3b84..d1b50172de3 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds @@ -41,7 +41,9 @@ arcadyan,vgv7519-brn) ;; avm,fritz3370-rev2-hynix|\ avm,fritz3370-rev2-micron|\ -avm,fritz3390) +avm,fritz3390|\ +avm,fritz7490|\ +avm,fritz7490-micron) ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x17" ;; bt,homehub-v5a) diff --git a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network index 3122d40c92c..4b5950c3471 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network @@ -36,6 +36,8 @@ lantiq_setup_interfaces() avm,fritz7360-v2|\ avm,fritz7362sl|\ avm,fritz7430|\ + avm,fritz7490|\ + avm,fritz7490-micron|\ buffalo,wbmr-300hpd|\ tplink,tdw8970|\ tplink,tdw8980|\ @@ -67,7 +69,9 @@ lantiq_setup_dsl() avm,fritz7360sl|\ avm,fritz7362sl|\ avm,fritz7412|\ - avm,fritz7430) + avm,fritz7430|\ + avm,fritz7490|\ + avm,fritz7490-micron) annex="b" ;; esac @@ -114,7 +118,9 @@ lantiq_setup_macs() wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 0xa91)" 1) ;; avm,fritz3390|\ - avm,fritz7362sl) + avm,fritz7362sl|\ + avm,fritz7490|\ + avm,fritz7490-micron) lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) wan_mac=$(fritz_tffs -n macdsl -i $(find_mtd_part "tffs (1)")) ;; diff --git a/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh index ab01d3bbf72..0764c0554d2 100755 --- a/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh +++ b/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh @@ -15,6 +15,8 @@ platform_do_upgrade() { avm,fritz7362sl|\ avm,fritz7412|\ avm,fritz7430|\ + avm,fritz7490|\ + avm,fritz7490-micron|\ bt,homehub-v5a|\ zyxel,p-2812hnu-f1|\ zyxel,p-2812hnu-f3)