ipq40xx: add MikroTik LHGG-60ad outdoor 802.11ad (60GHz) dish
LHGG-60ad is IPQ4019 + wil6210 based. Specification: - Qualcomm IPQ4019 (717 MHz) - 256 MB of RAM (DDR3L) - 16 MB (SPI NOR) of flash - 1x Gbit ethernet, 802.3af/at POE IN connected through AR8035. - WLAN: wil6210 802.11ad PCI card - No USB or SD card ports - UART disabled - 8x LEDs Biggest news is the wil6210 PCI card. Integration for its configuration and detection has already been taken care of when adding support for TP-Link Talon AD7200. However, signal quality is much lower than with stock firmware, so probably additional board-specific data has to be provided to the driver and is still missing at the moment. Signed-off-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Signed-off-by: Daniel Golle <daniel@makrotopia.org> [Fix Ethernet Interface] Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
		 Alexander Couzens
					Alexander Couzens
				
			
				
					committed by
					
						 Daniel Golle
						Daniel Golle
					
				
			
			
				
	
			
			
			 Daniel Golle
						Daniel Golle
					
				
			
						parent
						
							ab241e0937
						
					
				
				
					commit
					8d62304785
				
			| @@ -22,7 +22,8 @@ avm,fritzbox-4040) | |||||||
| 	ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x1e" | 	ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x1e" | ||||||
| 	;; | 	;; | ||||||
| avm,fritzbox-7530 |\ | avm,fritzbox-7530 |\ | ||||||
| glinet,gl-b1300) | glinet,gl-b1300 |\ | ||||||
|  | mikrotik,lhgg-60ad) | ||||||
| 	ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt" | 	ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt" | ||||||
| 	;; | 	;; | ||||||
| edgecore,oap100) | edgecore,oap100) | ||||||
|   | |||||||
| @@ -29,6 +29,7 @@ ipq40xx_setup_interfaces() | |||||||
| 	engenius,eap1300|\ | 	engenius,eap1300|\ | ||||||
| 	engenius,emd1|\ | 	engenius,emd1|\ | ||||||
| 	meraki,mr33|\ | 	meraki,mr33|\ | ||||||
|  | 	mikrotik,lhgg-60ad|\ | ||||||
| 	mikrotik,sxtsq-5-ac|\ | 	mikrotik,sxtsq-5-ac|\ | ||||||
| 	netgear,ex6100v2|\ | 	netgear,ex6100v2|\ | ||||||
| 	netgear,ex6150v2|\ | 	netgear,ex6150v2|\ | ||||||
| @@ -190,6 +191,7 @@ ipq40xx_setup_macs() | |||||||
| 		lan_mac=$(macaddr_add $wan_mac 1) | 		lan_mac=$(macaddr_add $wan_mac 1) | ||||||
| 		label_mac="$wan_mac" | 		label_mac="$wan_mac" | ||||||
| 		;; | 		;; | ||||||
|  | 	mikrotik,lhgg-60ad|\ | ||||||
| 	mikrotik,sxtsq-5-ac) | 	mikrotik,sxtsq-5-ac) | ||||||
| 		lan_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base) | 		lan_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base) | ||||||
| 		label_mac="$lan_mac" | 		label_mac="$lan_mac" | ||||||
|   | |||||||
| @@ -133,6 +133,7 @@ platform_do_upgrade() { | |||||||
| 		nand_do_upgrade "$1" | 		nand_do_upgrade "$1" | ||||||
| 		;; | 		;; | ||||||
| 	mikrotik,hap-ac2|\ | 	mikrotik,hap-ac2|\ | ||||||
|  | 	mikrotik,lhgg-60ad|\ | ||||||
| 	mikrotik,sxtsq-5-ac) | 	mikrotik,sxtsq-5-ac) | ||||||
| 		[ "$(rootfs_type)" = "tmpfs" ] && mtd erase firmware | 		[ "$(rootfs_type)" = "tmpfs" ] && mtd erase firmware | ||||||
| 		default_do_upgrade "$1" | 		default_do_upgrade "$1" | ||||||
|   | |||||||
| @@ -0,0 +1,269 @@ | |||||||
|  | /* Copyright (c) 2015, The Linux Foundation. All rights reserved. | ||||||
|  |  * Copyright (c) 2019, Robert Marko <robimarko@gmail.com> | ||||||
|  |  * | ||||||
|  |  * 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. | ||||||
|  |  * | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | #include "qcom-ipq4019.dtsi" | ||||||
|  | #include <dt-bindings/gpio/gpio.h> | ||||||
|  | #include <dt-bindings/input/input.h> | ||||||
|  | #include <dt-bindings/soc/qcom,tcsr.h> | ||||||
|  |  | ||||||
|  | / { | ||||||
|  | 	model = "Mikrotik Wireless Wire Dish LHGG-60ad"; | ||||||
|  | 	compatible = "mikrotik,lhgg-60ad"; | ||||||
|  |  | ||||||
|  | 	memory { | ||||||
|  | 		device_type = "memory"; | ||||||
|  | 		reg = <0x80000000 0x10000000>; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	chosen { | ||||||
|  | 		stdout-path = "serial0:115200n8"; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	aliases { | ||||||
|  | 		led-boot = &user; | ||||||
|  | 		led-failsafe = &user; | ||||||
|  | 		led-running = &user; | ||||||
|  | 		led-upgrade = &user; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	soc { | ||||||
|  | 		rng@22000 { | ||||||
|  | 			status = "okay"; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		mdio@90000 { | ||||||
|  | 			status = "okay"; | ||||||
|  |  | ||||||
|  | 			/delete-node/ ethernet-phy@1; | ||||||
|  | 			/delete-node/ ethernet-phy@2; | ||||||
|  | 			/delete-node/ ethernet-phy@3; | ||||||
|  | 			/delete-node/ ethernet-phy@4; | ||||||
|  | 			/delete-node/ psgmii-phy@5; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		counter@4a1000 { | ||||||
|  | 			compatible = "qcom,qca-gcnt"; | ||||||
|  | 			reg = <0x4a1000 0x4>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		tcsr@1949000 { | ||||||
|  | 			compatible = "qcom,tcsr"; | ||||||
|  | 			reg = <0x1949000 0x100>; | ||||||
|  | 			qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		ess_tcsr@1953000 { | ||||||
|  | 			compatible = "qcom,tcsr"; | ||||||
|  | 			reg = <0x1953000 0x1000>; | ||||||
|  | 			qcom,ess-interface-select = <TCSR_ESS_PSGMII_RGMII5>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		tcsr@1957000 { | ||||||
|  | 			compatible = "qcom,tcsr"; | ||||||
|  | 			reg = <0x1957000 0x100>; | ||||||
|  | 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		crypto@8e3a000 { | ||||||
|  | 			status = "okay"; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		watchdog@b017000 { | ||||||
|  | 			status = "okay"; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		ess-switch@c000000 { | ||||||
|  | 			switch_mac_mode = <0x3>; /* mac mode for RGMII RMII */ | ||||||
|  | 			switch_lan_bmp = <0x0>; /* lan port bitmap */ | ||||||
|  | 			switch_wan_bmp = <0x10>; /* wan port bitmap */ | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		edma@c080000 { | ||||||
|  | 			status = "okay"; | ||||||
|  | 			phy-mode = "rgmii-id"; | ||||||
|  | 			qcom,num_gmac = <1>; | ||||||
|  | 			qcom,single-phy; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	keys { | ||||||
|  | 		compatible = "gpio-keys"; | ||||||
|  |  | ||||||
|  | 		reset { | ||||||
|  | 			label = "reset"; | ||||||
|  | 			gpios = <&tlmm 63 GPIO_ACTIVE_LOW>; | ||||||
|  | 			linux,code = <KEY_RESTART>; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	leds { | ||||||
|  | 		compatible = "gpio-leds"; | ||||||
|  |  | ||||||
|  | 		power: power { | ||||||
|  | 			label = "blue:power"; | ||||||
|  | 			gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; | ||||||
|  | 			default-state = "keep"; | ||||||
|  | 			panic-indicator; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		user: user { | ||||||
|  | 			label = "yellow:user"; | ||||||
|  | 			gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		wlan { | ||||||
|  | 			label = "green:wlan"; | ||||||
|  | 			gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		align-left { | ||||||
|  | 			label = "green:align-left"; | ||||||
|  | 			gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		align-right { | ||||||
|  | 			label = "green:align-right"; | ||||||
|  | 			gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		wlan-rx { | ||||||
|  | 			label = "green:align-down"; | ||||||
|  | 			gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		wlan-tx { | ||||||
|  | 			label = "green:align-up"; | ||||||
|  | 			gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &tlmm { | ||||||
|  | 	serial_pins: serial_pinmux { | ||||||
|  | 		mux { | ||||||
|  | 			pins = "gpio60", "gpio61"; | ||||||
|  | 			function = "blsp_uart0"; | ||||||
|  | 			bias-disable; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	spi_0_pins: spi-0-pinmux { | ||||||
|  | 		pinmux { | ||||||
|  | 			function = "blsp_spi0"; | ||||||
|  | 			pins = "gpio13", "gpio14", "gpio15"; | ||||||
|  | 			bias-disable; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		pinmux_cs { | ||||||
|  | 			function = "gpio"; | ||||||
|  | 			pins = "gpio12"; | ||||||
|  | 			bias-disable; | ||||||
|  | 			output-high; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &blsp_dma { | ||||||
|  | 	status = "okay"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &blsp1_spi1 { | ||||||
|  | 	pinctrl-0 = <&spi_0_pins>; | ||||||
|  | 	pinctrl-names = "default"; | ||||||
|  | 	cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>; | ||||||
|  | 	status = "okay"; | ||||||
|  |  | ||||||
|  | 	m25p80@0 { | ||||||
|  | 		reg = <0>; | ||||||
|  | 		compatible = "jedec,spi-nor"; | ||||||
|  | 		spi-max-frequency = <24000000>; | ||||||
|  |  | ||||||
|  | 		partitions { | ||||||
|  | 			compatible = "fixed-partitions"; | ||||||
|  | 			#address-cells = <1>; | ||||||
|  | 			#size-cells = <1>; | ||||||
|  |  | ||||||
|  | 			partition@0 { | ||||||
|  | 				label = "Qualcomm"; | ||||||
|  | 				reg = <0x0 0x80000>; | ||||||
|  | 				read-only; | ||||||
|  | 			}; | ||||||
|  |  | ||||||
|  | 			partition@80000 { | ||||||
|  | 				compatible = "mikrotik,routerboot-partitions"; | ||||||
|  | 				#address-cells = <1>; | ||||||
|  | 				#size-cells = <1>; | ||||||
|  | 				label = "RouterBoot"; | ||||||
|  | 				reg = <0x80000 0x80000>; | ||||||
|  | 				read-only; | ||||||
|  |  | ||||||
|  | 				hard_config { | ||||||
|  | 					read-only; | ||||||
|  | 					size = <0x2000>; | ||||||
|  | 				}; | ||||||
|  |  | ||||||
|  | 				dtb_config { | ||||||
|  | 					read-only; | ||||||
|  | 				}; | ||||||
|  |  | ||||||
|  | 				soft_config { | ||||||
|  | 				}; | ||||||
|  | 			}; | ||||||
|  |  | ||||||
|  | 			partition@100000 { | ||||||
|  | 				compatible = "mikrotik,minor"; | ||||||
|  | 				label = "firmware"; | ||||||
|  | 				reg = <0x100000 0xf00000>; | ||||||
|  | 			}; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &blsp1_uart1 { | ||||||
|  | 	pinctrl-0 = <&serial_pins>; | ||||||
|  | 	pinctrl-names = "default"; | ||||||
|  | 	status = "okay"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &cryptobam { | ||||||
|  | 	status = "okay"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &pcie0 { | ||||||
|  | 	status = "okay"; | ||||||
|  | 	perst-gpio = <&tlmm 42 GPIO_ACTIVE_HIGH>; | ||||||
|  |  | ||||||
|  | 	bridge@0,0 { | ||||||
|  | 		reg = <0x00000000 0 0 0 0>; | ||||||
|  | 		#address-cells = <3>; | ||||||
|  | 		#size-cells = <2>; | ||||||
|  | 		ranges; | ||||||
|  |  | ||||||
|  | 		/* wil6210 802.11ad card */ | ||||||
|  | 		wifi: wifi@1,0 { | ||||||
|  | 			status = "okay"; | ||||||
|  | 			/* wil6210 driver has no compatible */ | ||||||
|  | 			reg = <0x00010000 0 0 0 0>; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &gmac0 { | ||||||
|  | 	qcom,phy_mdio_addr = <0>; | ||||||
|  | 	qcom,poll_required = <1>; | ||||||
|  | 	vlan_tag = <0 0x20>; | ||||||
|  | }; | ||||||
| @@ -40,6 +40,14 @@ define Device/mikrotik_hap-ac3 | |||||||
| endef | endef | ||||||
| TARGET_DEVICES += mikrotik_hap-ac3 | TARGET_DEVICES += mikrotik_hap-ac3 | ||||||
|  |  | ||||||
|  | define Device/mikrotik_lhgg-60ad | ||||||
|  | 	$(call Device/mikrotik_nor) | ||||||
|  | 	DEVICE_MODEL := Wireless Wire Dish LHGG-60ad | ||||||
|  | 	DEVICE_DTS := qcom-ipq4019-lhgg-60ad | ||||||
|  | 	DEVICE_PACKAGES += -kmod-ath10k-ct -ath10k-firmware-qca4019-ct kmod-wil6210 | ||||||
|  | endef | ||||||
|  | TARGET_DEVICES += mikrotik_lhgg-60ad | ||||||
|  |  | ||||||
| define Device/mikrotik_sxtsq-5-ac | define Device/mikrotik_sxtsq-5-ac | ||||||
| 	$(call Device/mikrotik_nor) | 	$(call Device/mikrotik_nor) | ||||||
| 	DEVICE_MODEL := SXTsq 5 ac (RBSXTsqG-5acD) | 	DEVICE_MODEL := SXTsq 5 ac (RBSXTsqG-5acD) | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org> | |||||||
|  |  | ||||||
| --- a/arch/arm/boot/dts/Makefile | --- a/arch/arm/boot/dts/Makefile | ||||||
| +++ b/arch/arm/boot/dts/Makefile | +++ b/arch/arm/boot/dts/Makefile | ||||||
| @@ -902,11 +902,69 @@ dtb-$(CONFIG_ARCH_QCOM) += \ | @@ -902,11 +902,70 @@ dtb-$(CONFIG_ARCH_QCOM) += \ | ||||||
|  	qcom-apq8074-dragonboard.dtb \ |  	qcom-apq8074-dragonboard.dtb \ | ||||||
|  	qcom-apq8084-ifc6540.dtb \ |  	qcom-apq8084-ifc6540.dtb \ | ||||||
|  	qcom-apq8084-mtp.dtb \ |  	qcom-apq8084-mtp.dtb \ | ||||||
| @@ -58,6 +58,7 @@ Signed-off-by: John Crispin <john@phrozen.org> | |||||||
| +	qcom-ipq4019-habanero-dvk.dtb \ | +	qcom-ipq4019-habanero-dvk.dtb \ | ||||||
| +	qcom-ipq4019-hap-ac3.dtb \ | +	qcom-ipq4019-hap-ac3.dtb \ | ||||||
| +	qcom-ipq4019-map-ac2200.dtb \ | +	qcom-ipq4019-map-ac2200.dtb \ | ||||||
|  | +	qcom-ipq4019-lhgg-60ad.dtb \ | ||||||
| +	qcom-ipq4019-mr8300.dtb \ | +	qcom-ipq4019-mr8300.dtb \ | ||||||
| +	qcom-ipq4019-pa2200.dtb \ | +	qcom-ipq4019-pa2200.dtb \ | ||||||
| +	qcom-ipq4019-r619ac-64m.dtb \ | +	qcom-ipq4019-r619ac-64m.dtb \ | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org> | |||||||
|  |  | ||||||
| --- a/arch/arm/boot/dts/Makefile | --- a/arch/arm/boot/dts/Makefile | ||||||
| +++ b/arch/arm/boot/dts/Makefile | +++ b/arch/arm/boot/dts/Makefile | ||||||
| @@ -837,11 +837,67 @@ dtb-$(CONFIG_ARCH_QCOM) += \ | @@ -837,11 +837,68 @@ dtb-$(CONFIG_ARCH_QCOM) += \ | ||||||
|  	qcom-apq8074-dragonboard.dtb \ |  	qcom-apq8074-dragonboard.dtb \ | ||||||
|  	qcom-apq8084-ifc6540.dtb \ |  	qcom-apq8084-ifc6540.dtb \ | ||||||
|  	qcom-apq8084-mtp.dtb \ |  	qcom-apq8084-mtp.dtb \ | ||||||
| @@ -55,6 +55,7 @@ Signed-off-by: John Crispin <john@phrozen.org> | |||||||
| +	qcom-ipq4019-fritzrepeater-3000.dtb \ | +	qcom-ipq4019-fritzrepeater-3000.dtb \ | ||||||
| +	qcom-ipq4019-hap-ac3.dtb \ | +	qcom-ipq4019-hap-ac3.dtb \ | ||||||
| +	qcom-ipq4019-map-ac2200.dtb \ | +	qcom-ipq4019-map-ac2200.dtb \ | ||||||
|  | +	qcom-ipq4019-lhgg-60ad.dtb \ | ||||||
| +	qcom-ipq4019-mr8300.dtb \ | +	qcom-ipq4019-mr8300.dtb \ | ||||||
| +	qcom-ipq4019-e2600ac-c1.dtb \ | +	qcom-ipq4019-e2600ac-c1.dtb \ | ||||||
| +	qcom-ipq4019-e2600ac-c2.dtb \ | +	qcom-ipq4019-e2600ac-c2.dtb \ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user