From 65760ede8b46de2290221555557c241e3a72881e Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 6 May 2013 16:44:56 +0000 Subject: [PATCH] ramips: unbreak rt2880 support Signed-off-by: John Crsipin SVN-Revision: 36559 --- target/linux/ramips/dts/F5D8235_V1.dts | 99 +++++++++++++++++ target/linux/ramips/dts/V11STFE.dts | 93 ++++++++++++++++ target/linux/ramips/dts/WLI-TX4-AG300N.dts | 101 ++++++++++++++++++ target/linux/ramips/image/Makefile | 3 - ...MIPS-ralink-add-usb-platform-support.patch | 58 +++++++--- target/linux/ramips/rt288x/target.mk | 1 - 6 files changed, 336 insertions(+), 19 deletions(-) create mode 100644 target/linux/ramips/dts/F5D8235_V1.dts create mode 100644 target/linux/ramips/dts/V11STFE.dts create mode 100644 target/linux/ramips/dts/WLI-TX4-AG300N.dts diff --git a/target/linux/ramips/dts/F5D8235_V1.dts b/target/linux/ramips/dts/F5D8235_V1.dts new file mode 100644 index 0000000000..41a7f122c8 --- /dev/null +++ b/target/linux/ramips/dts/F5D8235_V1.dts @@ -0,0 +1,99 @@ +/dts-v1/; + +/include/ "rt2880.dtsi" + +/ { + #address-cells = <1>; + #size-cells = <1>; + compatible = "F5D8235_V1", "ralink,rt2880-soc"; + model = "Belkin F5D8235 v1"; + + palmbus@300000 { + sysc@0 { + ralink,pinmux = "uartlite"; + ralink,gpiomux = "i2c"; + ralink,uartmux = "gpio"; + ralink,wdtmux = <1>; + }; + + gpio0: gpio@600 { + status = "okay"; + }; + }; + + cfi@1f000000 { + compatible = "cfi-flash"; + reg = <0x1f000000 0x800000>; + + bank-width = <2>; + device-width = <2>; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "uboot"; + reg = <0x0 0x30000>; + read-only; + }; + partition@30000 { + label = "uboot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + partition@40000 { + label = "calibration"; + reg = <0x40000 0x10000>; + read-only; + }; + partition@50000 { + label = "linux"; + reg = <0x50000 0x3b0000>; + }; + }; + + ethernet@400000 { + status = "okay"; + + ralink,fixed-link = <1000 1 1 1>; + }; + + wmac@480000 { + status = "okay"; + }; + + rtl8367s { + compatible = "realtek,rtl8367s"; + gpio-sda = <&gpio0 1 0>; + gpio-sck = <&gpio0 2 0>; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + wps { + label = "wps"; + gpios = <&gpio0 0 1>; + linux,code = <0x211>; + }; + reset { + label = "reset"; + gpios = <&gpio0 9 1>; + linux,code = <0x198>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + storage { + label = "f5d8235-v1:blue:storage"; + gpios = <&gpio0 7 1>; + }; + storage2 { + label = "f5d8235-v1:orange:storage"; + gpios = <&gpio0 8 1>; + }; + }; +}; diff --git a/target/linux/ramips/dts/V11STFE.dts b/target/linux/ramips/dts/V11STFE.dts new file mode 100644 index 0000000000..20cbaea49c --- /dev/null +++ b/target/linux/ramips/dts/V11STFE.dts @@ -0,0 +1,93 @@ +/dts-v1/; + +/include/ "rt2880.dtsi" + +/ { + compatible = "V11ST-FE", "ralink,rt2880-soc"; + model = "Ralink V11ST-FE"; + + palmbus@300000 { + sysc@0 { + ralink,pinmux = "uartlite"; + ralink,gpiomux = "i2c", "jtag"; + ralink,uartmux = "gpio"; + ralink,pcimux = "pci-fnc"; + ralink,wdtmux = <0>; + }; + + gpio0: gpio@600 { + status = "okay"; + }; + }; + + ethernet@400000 { + status = "okay"; + }; + + wmac@480000 { + status = "okay"; + }; + + pci@10140000 { + status = "okay"; + + host-bridge { + pci-bridge@1 { + status = "okay"; + }; + }; + }; + + nor-flash@1c000000 { + compatible = "cfi-flash"; + reg = <0x1c000000 0x800000>; + + bank-width = <2>; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + reg = <0x0 0x0030000>; + label = "u-boot"; + read-only; + }; + + partition@30000 { + reg = <0x00030000 0x00010000>; + label = "u-boot-env"; + read-only; + }; + + partition@40000 { + reg = <0x00040000 0x00010000>; + label = "factory"; + read-only; + }; + + partition@50000 { + reg = <0x00050000 0x003b0000>; + label = "firmware"; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + wps { + label = "wps"; + gpios = <&gpio0 0 0>; + linux,code = <0x211>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + status { + label = "v11st-fe:green:status"; + gpios = <&gpio0 12 1>; + }; + }; +}; diff --git a/target/linux/ramips/dts/WLI-TX4-AG300N.dts b/target/linux/ramips/dts/WLI-TX4-AG300N.dts new file mode 100644 index 0000000000..ff33a8a4dc --- /dev/null +++ b/target/linux/ramips/dts/WLI-TX4-AG300N.dts @@ -0,0 +1,101 @@ +/dts-v1/; + +/include/ "rt2880.dtsi" + +/ { + #address-cells = <1>; + #size-cells = <1>; + compatible = "WLI-TX4-AG300N", "ralink,rt2880-soc"; + model = "Buffalo WLI-TX4-AG300N"; + + palmbus@300000 { + sysc@0 { + ralink,pinmux = "uartlite"; + ralink,uartmux = "gpio"; + ralink,wdtmux = <1>; + }; + + gpio0: gpio@600 { + status = "okay"; + }; + }; + + cfi@1f000000 { + compatible = "cfi-flash"; + reg = <0x1f000000 0x800000>; + + bank-width = <2>; + device-width = <2>; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "uboot"; + reg = <0x0 0x30000>; + read-only; + }; + partition@30000 { + label = "uboot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + partition@40000 { + label = "calibration"; + reg = <0x40000 0x10000>; + read-only; + }; + partition@50000 { + label = "linux"; + reg = <0x50000 0x3b0000>; + }; + }; + + ethernet@400000 { + status = "okay"; + + ralink,fixed-link = <100 1 1 1>; + }; + + wmac@480000 { + status = "okay"; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + wps { + label = "wps"; + gpios = <&gpio0 0 1>; + linux,code = <0x211>; + }; + bandwidth { + label = "bandwidth"; + gpios = <&gpio0 8 0>; + linux,code = <0x198>; + }; + reset { + label = "reset"; + gpios = <&gpio0 9 1>; + linux,code = <0x198>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + diag { + label = "buffalo:red:diag"; + gpios = <&gpio0 10 1>; + }; + power { + label = "buffalo:blue:power"; + gpios = <&gpio0 12 1>; + }; + security { + label = "buffalo:blue:security"; + gpios = <&gpio0 13 1>; + }; + }; +}; diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 621f23edb9..5e2d6b7762 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -221,8 +221,6 @@ BuildFirmware/dap1350/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3) belkin_f5d8235v1_mtd_size=7929856 Image/Build/Profile/F5D8235V1=$(call BuildFirmware/CustomFlash/$(1),$(1),f5d8235v1,F5D8235_V1,$(belkin_f5d8235v1_mtd_size)) -Image/Build/Profile/BR6524N=$(call BuildFirmware/Edimax/$(1),$(1),br6524n,BR6524N,$(ralink_default_fw_size_4M),CSYS,WNRA,0x50000,0xc0000) - Image/Build/Profile/RTN15=$(call BuildFirmware/Default4M/$(1),$(1),rt-n15,RT-N15) Image/Build/Profile/V11STFE=$(call BuildFirmware/Default4M/$(1),$(1),v11st-fe,V11STFE) @@ -232,7 +230,6 @@ Image/Build/Profile/WLITX4AG300N=$(call BuildFirmware/Default4M/$(1),$(1),wli-tx ifeq ($(SUBTARGET),rt288x) define Image/Build/Profile/Default $(call Image/Build/Profile/F5D8235V1,$(1)) - $(call Image/Build/Profile/BR6524N,$(1)) $(call Image/Build/Profile/RTN15,$(1)) $(call Image/Build/Profile/V11STFE,$(1)) $(call Image/Build/Profile/WLITX4AG300N,$(1)) diff --git a/target/linux/ramips/patches-3.8/0204-owrt-MIPS-ralink-add-usb-platform-support.patch b/target/linux/ramips/patches-3.8/0204-owrt-MIPS-ralink-add-usb-platform-support.patch index 88514008a7..30e1b87fe7 100644 --- a/target/linux/ramips/patches-3.8/0204-owrt-MIPS-ralink-add-usb-platform-support.patch +++ b/target/linux/ramips/patches-3.8/0204-owrt-MIPS-ralink-add-usb-platform-support.patch @@ -19,8 +19,10 @@ Signed-off-by: John Crispin create mode 100644 arch/mips/ralink/rt305x-usb.c create mode 100644 arch/mips/ralink/rt3883-usb.c ---- a/arch/mips/ralink/Makefile -+++ b/arch/mips/ralink/Makefile +Index: linux-3.8.11/arch/mips/ralink/Makefile +=================================================================== +--- linux-3.8.11.orig/arch/mips/ralink/Makefile 2013-05-06 09:58:57.772224085 +0200 ++++ linux-3.8.11/arch/mips/ralink/Makefile 2013-05-06 10:01:59.252231955 +0200 @@ -9,8 +9,8 @@ obj-y := prom.o of.o reset.o clk.o irq.o pinmux.o timer.o @@ -32,18 +34,22 @@ Signed-off-by: John Crispin obj-$(CONFIG_SOC_MT7620) += mt7620.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o ---- a/arch/mips/ralink/common.h -+++ b/arch/mips/ralink/common.h -@@ -51,5 +51,6 @@ extern void prom_soc_init(struct ralink_ +Index: linux-3.8.11/arch/mips/ralink/common.h +=================================================================== +--- linux-3.8.11.orig/arch/mips/ralink/common.h 2013-05-06 09:58:57.748224086 +0200 ++++ linux-3.8.11/arch/mips/ralink/common.h 2013-05-06 09:58:58.100224099 +0200 +@@ -51,5 +51,6 @@ __iomem void *plat_of_remap_node(const char *node); void ralink_pinmux(void); +void ralink_usb_platform(void); #endif /* _RALINK_COMMON_H__ */ ---- a/arch/mips/ralink/mt7620.c -+++ b/arch/mips/ralink/mt7620.c -@@ -140,6 +140,11 @@ struct ralink_pinmux rt_gpio_pinmux = { +Index: linux-3.8.11/arch/mips/ralink/mt7620.c +=================================================================== +--- linux-3.8.11.orig/arch/mips/ralink/mt7620.c 2013-05-06 09:58:57.696224079 +0200 ++++ linux-3.8.11/arch/mips/ralink/mt7620.c 2013-05-06 09:58:58.100224099 +0200 +@@ -140,6 +140,11 @@ .uart_mask = MT7620_GPIO_MODE_GPIO, }; @@ -55,9 +61,11 @@ Signed-off-by: John Crispin void __init ralink_clk_init(void) { unsigned long cpu_rate, sys_rate; ---- a/arch/mips/ralink/of.c -+++ b/arch/mips/ralink/of.c -@@ -111,6 +111,7 @@ static int __init plat_of_setup(void) +Index: linux-3.8.11/arch/mips/ralink/of.c +=================================================================== +--- linux-3.8.11.orig/arch/mips/ralink/of.c 2013-05-06 09:58:57.748224086 +0200 ++++ linux-3.8.11/arch/mips/ralink/of.c 2013-05-06 10:01:59.252231955 +0200 +@@ -111,6 +111,7 @@ panic("failed to populate DT\n"); ralink_pinmux(); @@ -65,8 +73,10 @@ Signed-off-by: John Crispin return 0; } ---- /dev/null -+++ b/arch/mips/ralink/rt305x-usb.c +Index: linux-3.8.11/arch/mips/ralink/rt305x-usb.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-3.8.11/arch/mips/ralink/rt305x-usb.c 2013-05-06 09:58:58.100224099 +0200 @@ -0,0 +1,120 @@ +/* + * This program is free software; you can redistribute it and/or modify it @@ -188,8 +198,10 @@ Signed-off-by: John Crispin + &rt3352_ehci_data, &rt3352_ehci_dmamask); + } +} ---- /dev/null -+++ b/arch/mips/ralink/rt3883-usb.c +Index: linux-3.8.11/arch/mips/ralink/rt3883-usb.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-3.8.11/arch/mips/ralink/rt3883-usb.c 2013-05-06 09:58:58.100224099 +0200 @@ -0,0 +1,118 @@ +/* + * This program is free software; you can redistribute it and/or modify it @@ -309,3 +321,19 @@ Signed-off-by: John Crispin + ralink_add_usb("ehci-platform", + &rt3883_ehci_data, &rt3883_ehci_dmamask); +} +Index: linux-3.8.11/arch/mips/ralink/rt288x.c +=================================================================== +--- linux-3.8.11.orig/arch/mips/ralink/rt288x.c 2013-05-06 09:58:57.644224079 +0200 ++++ linux-3.8.11/arch/mips/ralink/rt288x.c 2013-05-06 10:02:32.216233389 +0200 +@@ -74,6 +74,11 @@ + .wdt_reset = rt288x_wdt_reset, + }; + ++void ralink_usb_platform(void) ++{ ++ ++} ++ + void __init ralink_clk_init(void) + { + unsigned long cpu_rate; diff --git a/target/linux/ramips/rt288x/target.mk b/target/linux/ramips/rt288x/target.mk index d34c0298b9..f826eab88e 100644 --- a/target/linux/ramips/rt288x/target.mk +++ b/target/linux/ramips/rt288x/target.mk @@ -5,7 +5,6 @@ SUBTARGET:=rt288x BOARDNAME:=RT288x based boards CFLAGS+= -mips32r2 -mtune=mips32r2 -FEATURES:=broken define Target/Description Build firmware images for Ralink RT288x based boards. -- 2.25.1