ALLWIFIBOARDS:= \
8dev_habanero-dvk \
aruba_ap-303 \
+ asrock_g10 \
avm_fritzrepeater-1200 \
cellc_rtl30vw \
dlink_dap2610 \
SUBMENU:=ath10k Board-Specific Overrides
SECTION:=firmware
CATEGORY:=Firmware
- DEPENDS:=@TARGET_ipq40xx
+ DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x)
TITLE:=Custom Board
endef
$(call ipq-wifi-install-one-to,$(1),$(2),QCA4019/hw1.0),\
$(if $(filter $(suffix $(1)),.QCA9888 .qca9888),\
$(call ipq-wifi-install-one-to,$(1),$(2),QCA9888/hw2.0),\
+ $(if $(filter $(suffix $(1)),.QCA9980 .qca9980),\
+ $(call ipq-wifi-install-one-to,$(1),$(2),QCA9980/hw2.0),\
$(if $(filter $(suffix $(1)),.QCA9984 .qca9984),\
$(call ipq-wifi-install-one-to,$(1),$(2),QCA9984/hw1.0),\
$(error Unrecognized board-file suffix '$(suffix $(1))' for '$(1)')\
- )))
+ ))))
endef
# Blank line required at end of above define due to foreach context
$(eval $(call generate-ipq-wifi-package,8dev_habanero-dvk,8devices Habanero DVK))
$(eval $(call generate-ipq-wifi-package,aruba_ap-303,Aruba AP-303))
+$(eval $(call generate-ipq-wifi-package,asrock_g10,ASRock G10))
$(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater 1200))
$(eval $(call generate-ipq-wifi-package,cellc_rtl30vw, Cell C RTL30VW))
$(eval $(call generate-ipq-wifi-package,dlink_dap2610,D-Link DAP-2610))
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+#include "qcom-ipq8064-v1.0.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/soc/qcom,tcsr.h>
+
+/ {
+ compatible = "asrock,g10", "qcom,ipq8064";
+ model = "ASRock G10";
+
+ aliases {
+ mdio-gpio0 = &mdio0;
+ serial0 = &gsbi4_serial;
+ ethernet0 = &gmac1;
+ ethernet1 = &gmac0;
+
+ led-boot = &led_blue;
+ led-failsafe = &led_fail;
+ led-running = &led_blue;
+ led-upgrade = &led_blue;
+ };
+
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ rsvd@41200000 {
+ reg = <0x41200000 0x300000>;
+ no-map;
+ };
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ soc {
+ rpm@108000 {
+ pinctrl-0 = <&rpm_pins>;
+ pinctrl-names = "default";
+ };
+
+ nand@1ac00000 {
+ status = "okay";
+
+ pinctrl-0 = <&nand_pins>;
+ pinctrl-names = "default";
+
+ nand0@0 {
+ compatible = "qcom,nandcs";
+
+ reg = <0>;
+
+ nand-ecc-strength = <4>;
+ nand-bus-width = <8>;
+ nand-ecc-step-size = <512>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "SBL1";
+ reg = <0x0000000 0x0040000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "MIBIB";
+ reg = <0x0040000 0x0140000>;
+ read-only;
+ };
+
+ partition@180000 {
+ label = "SBL2";
+ reg = <0x0180000 0x0140000>;
+ read-only;
+ };
+
+ partition@2c0000 {
+ label = "SBL3";
+ reg = <0x02c0000 0x0280000>;
+ read-only;
+ };
+
+ partition@540000 {
+ label = "DDRCONFIG";
+ reg = <0x0540000 0x0120000>;
+ read-only;
+ };
+
+ partition@660000 {
+ label = "SSD";
+ reg = <0x0660000 0x0120000>;
+ read-only;
+ };
+
+ partition@780000 {
+ label = "TZ";
+ reg = <0x0780000 0x0280000>;
+ read-only;
+ };
+
+ partition@a00000 {
+ label = "RPM";
+ reg = <0x0a00000 0x0280000>;
+ read-only;
+ };
+
+ partition@c80000 {
+ label = "APPSBL";
+ reg = <0x0c80000 0x0500000>;
+ read-only;
+ };
+
+ partition@1180000 {
+ label = "APPSBLENV";
+ reg = <0x1180000 0x0080000>;
+ read-only;
+ };
+
+ partition@1200000 {
+ label = "ART";
+ reg = <0x1200000 0x0140000>;
+ read-only;
+ };
+
+ partition@1340000 {
+ label = "ubi";
+ reg = <0x1340000 0x3000000>;
+ };
+
+ partition@4340000 {
+ label = "BOOTCONFIG";
+ reg = <0x4340000 0x0060000>;
+ read-only;
+ };
+
+ partition@43a0000 {
+ label = "APPSBL1";
+ reg = <0x43a0000 0x0500000>;
+ read-only;
+ };
+
+ partition@48a0000 {
+ label = "ubi1";
+ reg = <0x48a0000 0x3000000>;
+ };
+
+ partition@78a0000 {
+ label = "hwconfig";
+ reg = <0x78a0000 0x0040000>;
+ read-only;
+ };
+
+ partition@7e80000 {
+ label = "nvram";
+ reg = <0x78e0000 0x0040000>;
+ read-only;
+ };
+ };
+ };
+ };
+ };
+
+ mdio0: mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ compatible = "virtual,mdio-gpio";
+
+ pinctrl-0 = <&mdio0_pins>;
+ pinctrl-names = "default";
+
+ gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>,
+ <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
+
+ ethernet-phy@0 {
+ reg = <0>;
+ qca,ar8327-initvals = <
+ 0x00004 0x7600000 /* PAD0_MODE */
+ 0x00008 0x1000000 /* PAD5_MODE */
+ 0x0000c 0x80 /* PAD6_MODE */
+ 0x000e4 0x6a545 /* MAC_POWER_SEL */
+ 0x000e0 0xc74164de /* SGMII_CTRL */
+ 0x0007c 0x4e /* PORT0_STATUS */
+ 0x00094 0x4e /* PORT6_STATUS */
+ >;
+ };
+
+ ethernet-phy@4 {
+ reg = <4>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ pinctrl-0 = <&led_pins>;
+ pinctrl-names = "default";
+
+ /*
+ * this is a bit misleading. Because there are about seven
+ * multicolor LEDs connected all wired together in parallel.
+ */
+
+ led_yellow: yellow {
+ label = "g10:yellow:status";
+ gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_fail: fail {
+ label = "g10:amber:status";
+ gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_blue: blue {
+ label = "g10:blue:status";
+ gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ /*
+ * LED is declared in vendors boardfile but it's not
+ * working and the manual doesn't mention anything
+ * about the LED being white.
+
+ white {
+ label = "g10:white:status";
+ gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
+ };
+ */
+ };
+
+ i2c-gpio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ compatible = "i2c-gpio";
+ gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>, /* sda */
+ <&qcom_pinmux 54 GPIO_ACTIVE_HIGH>; /* scl */
+ i2c-gpio,delay-us = <5>;
+ i2c-gpio,scl-output-only;
+
+ mcu@50 {
+ reg = <0x50>;
+ compatible = "sonix,sn8f25e21";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ pinctrl-0 = <&button_pins>;
+ pinctrl-names = "default";
+
+ ir-remote {
+ label = "ir-remote";
+ gpios = <&qcom_pinmux 15 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps5g {
+ label = "reset";
+ gpios = <&qcom_pinmux 64 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ wps2g {
+ label = "reset";
+ gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&adm_dma {
+ status = "okay";
+};
+
+&gmac1 {
+ status = "okay";
+
+ pinctrl-0 = <&rgmii2_pins>;
+ pinctrl-names = "default";
+
+ phy-mode = "rgmii";
+ qcom,id = <1>;
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+};
+
+&gmac2 {
+ status = "okay";
+
+ phy-mode = "sgmii";
+ qcom,id = <2>;
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+};
+
+&gsbi4 {
+ status = "okay";
+ qcom,mode = <GSBI_PROT_I2C_UART>;
+};
+
+&gsbi4_serial {
+ status = "okay";
+
+ pinctrl-0 = <&uart0_pins>;
+ pinctrl-names = "default";
+};
+
+&ss_phy_0 { /* USB3 port 0 SS phy */
+ rx_eq = <2>;
+ tx_deamp_3_5db = <32>;
+ mpll = <160>;
+};
+
+&ss_phy_1 { /* USB3 port 1 SS phy */
+ rx_eq = <2>;
+ tx_deamp_3_5db = <32>;
+ mpll = <160>;
+};
+
+&pcie0 {
+ status = "okay";
+
+ bridge@0,0 {
+ reg = <0x00000000 0 0 0 0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+
+ wifi5g: wifi@1,0 {
+ reg = <0x00010000 0 0 0 0>;
+ compatible = "qcom,ath10k";
+ qcom,ath10k-calibration-variant = "ASRock-G10";
+ };
+ };
+};
+
+&pcie1 {
+ status = "okay";
+
+ bridge@0,0 {
+ reg = <0x00000000 0 0 0 0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+
+ wifi2g: wifi@1,0 {
+ reg = <0x00010000 0 0 0 0>;
+ compatible = "qcom,ath10k";
+ qcom,ath10k-calibration-variant = "ASRock-G10";
+ };
+ };
+};
+
+&qcom_pinmux {
+ led_pins: led_pins {
+ mux {
+ pins = "gpio7", "gpio8", "gpio9", "gpio26";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+
+ button_pins: button_pins {
+ mux {
+ pins = "gpio15", "gpio16", "gpio64", "gpio65";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+
+ rpm_pins: rpm_pins {
+ mux {
+ pins = "gpio12", "gpio13";
+ function = "gsbi4";
+ drive-strength = <10>;
+ bias-disable;
+ };
+ };
+
+ uart0_pins: uart0_pins {
+ mux {
+ pins = "gpio10", "gpio11";
+ function = "gsbi4";
+ drive-strength = <10>;
+ bias-disable;
+ };
+ };
+
+ nand_pins: nand_pins {
+ mux {
+ pins = "gpio34", "gpio35", "gpio36", "gpio37",
+ "gpio38", "gpio39", "gpio40", "gpio41",
+ "gpio42", "gpio43", "gpio44", "gpio45",
+ "gpio46", "gpio47";
+ function = "nand";
+ drive-strength = <10>;
+ bias-disable;
+ };
+
+ pullups {
+ pins = "gpio39";
+ bias-pull-up;
+ };
+
+ hold {
+ pins = "gpio40", "gpio41", "gpio42", "gpio43",
+ "gpio44", "gpio45", "gpio46", "gpio47";
+ bias-bus-hold;
+ };
+ };
+
+ mdio0_pins: mdio0_pins {
+ mux {
+ pins = "gpio0", "gpio1";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-disable;
+ };
+ };
+
+ rgmii2_pins: rgmii2_pins {
+ mux {
+ pins = "gpio27", "gpio28", "gpio29", "gpio30",
+ "gpio31", "gpio32", "gpio51", "gpio52",
+ "gpio59", "gpio60", "gpio61", "gpio62";
+ function = "rgmii2";
+ drive-strength = <8>;
+ bias-disable;
+ };
+ };
+};
+
+&usb3_0 {
+ status = "okay";
+};
+
+
+&usb3_1 {
+ status = "okay";
+};
+
+&tcsr {
+ qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>;
+};
+
+/delete-node/ &pcie2_pins;
+/delete-node/ &pcie2;