From: Paul Wassi Date: Mon, 31 Dec 2018 12:45:29 +0000 (+0100) Subject: ath79: fix boardname of GL.iNet GL-AR300M X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=6e78d546d1197d7a3ec4cbc7aab22286ad49fb0f;p=openwrt%2Fstaging%2Faparcar.git ath79: fix boardname of GL.iNet GL-AR300M This device is called GL-AR300M, therefore rename the board(s) to 'gl-ar300m-nor' and 'gl-ar300m-nand' Signed-off-by: Paul Wassi [change boardname in uboot envtools as well, don't use wildcards for boardname] Signed-off-by: Mathias Kresin --- diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index a306f6733b..bf8ca2f7cd 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -17,7 +17,8 @@ buffalo,wzr-hp-ag300h) ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000" ;; buffalo,bhr-4grv2|\ -glinet,ar300m|\ +glinet,gl-ar300m-nand|\ +glinet,gl-ar300m-nor|\ ocedo,koala|\ ocedo,raccoon|\ openmesh,om5p-ac-v2) diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index 8e92c2f780..626fb2cb30 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -89,8 +89,9 @@ ath79_setup_interfaces() etactica,eg200) ucidef_set_interface_lan "eth0" "dhcp" ;; - glinet,ar300m|\ glinet,gl-ar150|\ + glinet,gl-ar300m-nand|\ + glinet,gl-ar300m-nor|\ glinet,gl-x750|\ tplink,tl-wr810n-v1|\ tplink,tl-wr810n-v2) diff --git a/target/linux/ath79/dts/qca9531_glinet_ar300m-nand.dts b/target/linux/ath79/dts/qca9531_glinet_ar300m-nand.dts deleted file mode 100644 index 82f8418b31..0000000000 --- a/target/linux/ath79/dts/qca9531_glinet_ar300m-nand.dts +++ /dev/null @@ -1,68 +0,0 @@ -/dts-v1/; - -#include "qca9531_glinet_ar300m.dtsi" - -/ { - compatible = "glinet,ar300m-nand", "qca,qca9531"; - model = "GL.iNet GL-AR300M (NAND)"; -}; - -&spi { - status = "okay"; - num-cs = <1>; - - flash@0 { - compatible = "winbond,w25q128", "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <25000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x000000 0x040000>; - read-only; - }; - - partition@1 { - label = "u-boot-env"; - reg = <0x040000 0x010000>; - }; - - partition@2 { - label = "reserved"; - reg = <0x050000 0xfa0000>; - }; - - art: partition@3 { - label = "art"; - reg = <0xff0000 0x010000>; - }; - }; - }; - - flash@1 { - compatible = "spinand,mt29f"; - reg = <1>; - spi-max-frequency = <25000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "kernel"; - reg = <0x000000 0x0200000>; - }; - - partition@1 { - label = "ubi"; - reg = <0x200000 0x7e00000>; - }; - }; - }; -}; diff --git a/target/linux/ath79/dts/qca9531_glinet_ar300m-nor.dts b/target/linux/ath79/dts/qca9531_glinet_ar300m-nor.dts deleted file mode 100644 index 36903bdb99..0000000000 --- a/target/linux/ath79/dts/qca9531_glinet_ar300m-nor.dts +++ /dev/null @@ -1,50 +0,0 @@ -/dts-v1/; - -#include -#include - -#include "qca9531_glinet_ar300m.dtsi" - -/ { - compatible = "glinet,ar300m-nor", "qca,qca9531"; - model = "GL.iNet GL-AR300M (NOR)"; -}; - -&spi { - status = "okay"; - num-cs = <0>; - - flash@0 { - compatible = "winbond,w25q128", "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <25000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x000000 0x040000>; - read-only; - }; - - partition@1 { - label = "u-boot-env"; - reg = <0x040000 0x010000>; - }; - - partition@2 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x050000 0xfa0000>; - }; - - art: partition@3 { - label = "art"; - reg = <0xff0000 0x010000>; - }; - }; - }; -}; diff --git a/target/linux/ath79/dts/qca9531_glinet_ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_ar300m.dtsi deleted file mode 100644 index 34fcfb32c3..0000000000 --- a/target/linux/ath79/dts/qca9531_glinet_ar300m.dtsi +++ /dev/null @@ -1,99 +0,0 @@ -/dts-v1/; - -#include -#include - -#include "qca953x.dtsi" - -/ { - keys { - compatible = "gpio-keys-polled"; - poll-interval = <20>; - pinctrl-names = "default"; - pinctrl-0 = <&jtag_disable_pins>; - - button0 { - label = "reset"; - linux,code = ; - gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - }; - - button1 { - label = "button right"; - linux,code = ; - gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; - }; - - button3 { - label = "button left"; - linux,code = ; - gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; - }; - }; - - leds { - compatible = "gpio-leds"; - - usb { - label = "gl-ar300m:green:usb"; - gpios = <&gpio 2 GPIO_ACTIVE_LOW>; - trigger-sources = <&hub_port>; - linux,default-trigger = "usbport"; - }; - - wlan { - label = "gl-ar300m:green:wlan"; - gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy0tpt"; - }; - - lan { - label = "gl-ar300m:green:lan"; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - }; - - status { - label = "gl-ar300m:green:status"; - gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&pcie0 { - status = "okay"; -}; - -&uart { - status = "okay"; -}; - -&usb0 { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; -}; - -&usb_phy { - status = "okay"; -}; - -ð0 { - status = "okay"; - mtd-mac-address = <&art 0x0>; - phy-handle = <&swphy4>; -}; - -ð1 { - mtd-mac-address = <&art 0x6>; -}; - -&wmac { - status = "okay"; - mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x1002>; -}; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-nand.dts b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-nand.dts new file mode 100644 index 0000000000..9e78f83a76 --- /dev/null +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-nand.dts @@ -0,0 +1,68 @@ +/dts-v1/; + +#include "qca9531_glinet_gl-ar300m.dtsi" + +/ { + compatible = "glinet,gl-ar300m-nand", "qca,qca9531"; + model = "GL.iNet GL-AR300M (NAND)"; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + compatible = "winbond,w25q128", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + partition@1 { + label = "u-boot-env"; + reg = <0x040000 0x010000>; + }; + + partition@2 { + label = "reserved"; + reg = <0x050000 0xfa0000>; + }; + + art: partition@3 { + label = "art"; + reg = <0xff0000 0x010000>; + }; + }; + }; + + flash@1 { + compatible = "spinand,mt29f"; + reg = <1>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "kernel"; + reg = <0x000000 0x0200000>; + }; + + partition@1 { + label = "ubi"; + reg = <0x200000 0x7e00000>; + }; + }; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-nor.dts b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-nor.dts new file mode 100644 index 0000000000..6b77af0401 --- /dev/null +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-nor.dts @@ -0,0 +1,50 @@ +/dts-v1/; + +#include +#include + +#include "qca9531_glinet_gl-ar300m.dtsi" + +/ { + compatible = "glinet,gl-ar300m-nor", "qca,qca9531"; + model = "GL.iNet GL-AR300M (NOR)"; +}; + +&spi { + status = "okay"; + num-cs = <0>; + + flash@0 { + compatible = "winbond,w25q128", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + partition@1 { + label = "u-boot-env"; + reg = <0x040000 0x010000>; + }; + + partition@2 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x050000 0xfa0000>; + }; + + art: partition@3 { + label = "art"; + reg = <0xff0000 0x010000>; + }; + }; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi new file mode 100644 index 0000000000..34fcfb32c3 --- /dev/null +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi @@ -0,0 +1,99 @@ +/dts-v1/; + +#include +#include + +#include "qca953x.dtsi" + +/ { + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + pinctrl-names = "default"; + pinctrl-0 = <&jtag_disable_pins>; + + button0 { + label = "reset"; + linux,code = ; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + + button1 { + label = "button right"; + linux,code = ; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + }; + + button3 { + label = "button left"; + linux,code = ; + gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + }; + }; + + leds { + compatible = "gpio-leds"; + + usb { + label = "gl-ar300m:green:usb"; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + trigger-sources = <&hub_port>; + linux,default-trigger = "usbport"; + }; + + wlan { + label = "gl-ar300m:green:wlan"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + lan { + label = "gl-ar300m:green:lan"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + status { + label = "gl-ar300m:green:status"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&pcie0 { + status = "okay"; +}; + +&uart { + status = "okay"; +}; + +&usb0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy { + status = "okay"; +}; + +ð0 { + status = "okay"; + mtd-mac-address = <&art 0x0>; + phy-handle = <&swphy4>; +}; + +ð1 { + mtd-mac-address = <&art 0x6>; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&art 0x1002>; +}; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 600ab43e7f..774695b8b4 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -268,14 +268,14 @@ define Device/glinet_gl-ar150 endef TARGET_DEVICES += glinet_gl-ar150 -define Device/glinet_ar300m-nor +define Device/glinet_gl-ar300m-nor ATH_SOC := qca9531 DEVICE_TITLE := GL.iNet GL-AR300M DEVICE_PACKAGES := kmod-usb-core kmod-usb2 IMAGE_SIZE := 16000k SUPPORTED_DEVICES += gl-ar300m endef -TARGET_DEVICES += glinet_ar300m-nor +TARGET_DEVICES += glinet_gl-ar300m-nor define Device/glinet_ar750s ATH_SOC := qca9563 diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index 5c7712308f..eee419194b 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -1,4 +1,4 @@ -define Device/glinet_ar300m-nand +define Device/glinet_gl-ar300m-nand ATH_SOC := qca9531 DEVICE_TITLE := GL-AR300M (NAND) DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage kmod-usb-ledtrig-usbport @@ -10,4 +10,4 @@ define Device/glinet_ar300m-nand IMAGE/sysupgrade.bin := sysupgrade-tar IMAGE/factory.ubi := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi endef -TARGET_DEVICES += glinet_ar300m-nand +TARGET_DEVICES += glinet_gl-ar300m-nand