From b3e1cf9bff8f927e80b8d51362e80e99d09cbd7b Mon Sep 17 00:00:00 2001 From: David Bauer Date: Tue, 14 Jan 2020 09:29:07 +0100 Subject: [PATCH] ipq806x: add support for Aruba AP-315 --- .../ipq806x/base-files/etc/board.d/02_network | 3 + .../arch/arm/boot/dts/qcom-ipq8064-ap-315.dts | 380 ++++++++++++++++++ .../arch/arm/boot/dts/qcom-ipq8064-wpq864.dts | 2 +- target/linux/ipq806x/image/Makefile | 9 + .../0069-arm-boot-add-dts-files.patch | 3 +- 5 files changed, 395 insertions(+), 2 deletions(-) create mode 100644 target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap-315.dts diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network index a3aa0fce70..f37aa7447c 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -12,6 +12,9 @@ board_config_update board=$(board_name) case "$board" in +aruba,ap-315) + ucidef_set_interface_lan "eth0" + ;; buffalo,wxr-2533dhp |\ compex,wpq864 |\ netgear,d7800 |\ diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap-315.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap-315.dts new file mode 100644 index 0000000000..5ba164bd99 --- /dev/null +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap-315.dts @@ -0,0 +1,380 @@ +#include "qcom-ipq8064-v1.0.dtsi" + +/ { + model = "Aruba AP-315"; + compatible = "aruba,ap-315", "qcom,ipq8064"; + + memory@0 { + reg = <0x42000000 0x1e000000>; + device_type = "memory"; + }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + rsvd@41200000 { + reg = <0x41200000 0x300000>; + no-map; + }; + }; + + aliases { + serial0 = &gsbi4_serial; + mdio-gpio0 = &mdio0; + }; + + chosen { + stdout-path = "serial0:9600n8"; + }; + + soc { + mdio0: mdio { + compatible = "virtual,mdio-gpio"; + #address-cells = <1>; + #size-cells = <0>; + gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>, + <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&mdio0_pins>; + pinctrl-names = "default"; + + phy5: ethernet-phy@5 { + reg = <5>; + }; + }; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-0 = <&led_pins>; + pinctrl-names = "default"; + + status_green { + label = "ap-315:green:status"; + gpios = <&qcom_pinmux 28 GPIO_ACTIVE_HIGH>; + }; + + status_amber { + label = "ap-315:amber:status"; + gpios = <&qcom_pinmux 29 GPIO_ACTIVE_HIGH>; + }; + + status_red { + label = "ap-315:red:status"; + gpios = <&qcom_pinmux 30 GPIO_ACTIVE_HIGH>; + }; + + wlan_green { + label = "ap-315:green:wlan"; + gpios = <&qcom_pinmux 30 GPIO_ACTIVE_HIGH>; + }; + + wlan_red { + label = "ap-315:red:wlan"; + gpios = <&qcom_pinmux 30 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + pinctrl-0 = <&button_pins>; + pinctrl-names = "default"; + + reset { + label = "reset"; + gpios = <&qcom_pinmux 9 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&qcom_pinmux { + /* + * In addition to the Pins listed below, + * the following GPIOs have "features": + * + * 27 - out - active low to force HW reset + * 26 - out - active low to reset TPM + * 67 - out - active low to reset PHY0 + * 68 - out - active low to reset PHY1 (?) + * 3 - out - active low to reset PCIE1 + * 48 - out - active low to reset PCIE2 + * 62 - out - pulse to set warm reset status + * 52 - out - pulse to reset watchdog status flipflop + * 51 - out - active low to enable USB port power + * 2 - out - active low to reset BLE radio + * 7 - out - active high to disable external watchdog + * + * 59 - in - active high when PoE powered + * 8 - in - active high when DC powered + * 64 - in - active low when cold H/W reset + * 65 - in - active high when external watchdog reset + * 63 - in - active low when USB over-current + * 53 - in - phy0 interrupt line + * 54 - in - phy1 interrupt line (?) + * + * Note that these values originate from Aruba's documentation + */ + i2c2_pins: i2c2_pinmux { + pins = "gpio24", "gpio25"; + function = "gsbi2"; + drive-strength = <12>; + 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; + }; + }; + + button_pins: button_pins { + mux { + pins = "gpio9"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + }; + + led_pins: led_pins { + mux { + pins = "gpio28", "gpio29", "gpio30", "gpio31", "gpio32"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + }; +}; + +&adm_dma { + status = "okay"; +}; + +&gsbi2 { + i2c@124a0000 { + status = "okay"; + } +} + +&gsbi4 { + status = "okay"; + qcom,mode = ; +}; + +&gsbi4_serial { + status = "okay"; +}; + +&gsbi5 { + status = "okay"; + qcom,mode = ; + + spi4: spi@1a280000 { + status = "okay"; + + pinctrl-0 = <&spi_pins>; + pinctrl-names = "default"; + + cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>; + + flash@0 { + compatible = "jedec,spi-nor"; + #address-cells = <1>; + #size-cells = <1>; + spi-max-frequency = <50000000>; + reg = <0>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "sbl1"; + reg = <0x0 0x20000>; + read-only; + }; + + partition@20000 { + label = "mibib"; + reg = <0x20000 0x20000>; + read-only; + }; + + partition@40000 { + label = "sbl2"; + reg = <0x40000 0x40000>; + read-only; + }; + + partition@80000 { + label = "sbl3"; + reg = <0x80000 0x80000>; + read-only; + }; + + partition@100000 { + label = "ddrconfig"; + reg = <0x100000 0x10000>; + read-only; + }; + + partition@110000 { + label = "ssd"; + reg = <0x110000 0x10000>; + read-only; + }; + + partition@120000 { + label = "tz"; + reg = <0x120000 0x80000>; + read-only; + }; + + partition@1a0000 { + label = "rpm"; + reg = <0x1a0000 0x80000>; + read-only; + }; + + partition@780000 { + label = "appsbl"; + reg = <0x220000 0x100000>; + read-only; + }; + + partition@320000 { + label = "appsblenv"; + reg = <0x320000 0x10000>; + read-only; + }; + + partition@330000 { + label = "art"; + reg = <0x330000 0x40000>; + read-only; + }; + + partition@370000 { + label = "ap_pds"; + reg = <0x370000 0x10000>; + }; + + partition@380000 { + label = "ap_cd"; + reg = <0x380000 0x10000>; + }; + + partition@390000 { + label = "manu_info"; + reg = <0x390000 0x10000>; + }; + + partition@3a0000 { + label = "ap_fc"; + reg = <0x3a0000 0x10000>; + }; + + partition@3b0000 { + label = "ap_os_ss"; + reg = <0x3b0000 0x50000>; + }; + }; + }; + }; + }; +}; + +&usb3_0 { + status = "okay"; +}; + +&usb3_1 { + status = "okay"; +}; + +&pcie0 { + status = "okay"; +}; + +&pcie1 { + status = "okay"; + force_gen1 = <1>; +}; + +&nand { + status = "okay"; + + pinctrl-0 = <&nand_pins>; + pinctrl-names = "default"; + + cs0 { + reg = <0>; + compatible = "qcom,nandcs"; + + 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 { + /* 'aos0' in Aruba firmware */ + label = "aos0"; + reg = <0x0 0x2000000>; + read-only; + }; + + partition@2000000 { + /* 'aos1' in Aruba firmware */ + label = "ubi"; + reg = <0x2000000 0x2000000>; + }; + + partition@4000000 { + label = "aruba-ubifs"; + reg = <0x4000000 0x4000000>; + read-only; + }; + }; + }; +}; + +&gmac2 { + status = "okay"; + + phy-mode = "sgmii"; + phy-handle = <&phy5>; + + qcom,id = <1>; +}; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts index a1e7791d12..87445e5ea7 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts @@ -374,7 +374,7 @@ cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>; - s25fl256s1@0 { + flash@0 { compatible = "jedec,spi-nor"; #address-cells = <1>; #size-cells = <1>; diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index 33f68b7a60..4897bb385f 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -80,6 +80,15 @@ define Device/ZyXELImage IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to $$$${BLOCKSIZE} | sysupgrade-tar rootfs=$$$$@ | append-metadata endef +define Device/aruba_ap-315 + $(call Device/FitImageLzma) + SOC := qcom-ipq8064 + DEVICE_VENDOR := Aruba + DEVICE_MODEL := AP-315 + DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct ath10k-firmware-qca9984-ct +endef +TARGET_DEVICES += aruba_ap-315 + define Device/buffalo_wxr-2533dhp $(call Device/LegacyImage) SOC := qcom-ipq8064 diff --git a/target/linux/ipq806x/patches-4.19/0069-arm-boot-add-dts-files.patch b/target/linux/ipq806x/patches-4.19/0069-arm-boot-add-dts-files.patch index 77ce4c4245..d1c721d1b7 100644 --- a/target/linux/ipq806x/patches-4.19/0069-arm-boot-add-dts-files.patch +++ b/target/linux/ipq806x/patches-4.19/0069-arm-boot-add-dts-files.patch @@ -10,10 +10,11 @@ Signed-off-by: John Crispin --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -791,6 +791,18 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -791,6 +791,19 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-ipq4019-ap.dk07.1-c1.dtb \ qcom-ipq4019-ap.dk07.1-c2.dtb \ qcom-ipq8064-ap148.dtb \ ++ qcom-ipq8064-ap-315.dtb \ + qcom-ipq8064-c2600.dtb \ + qcom-ipq8064-d7800.dtb \ + qcom-ipq8064-db149.dtb \ -- 2.30.2