[OpenWrt-Devel] [PATCH 1/1] [RESEND] ramips: Add support for RT5350F-OLinuXino V2

2015-06-03 Thread gamishev
From: Dimitar Gamishev HeHoPMaJIeH 

Version 2 : White spaces and  alphabetical order problems
 fixed
Support for Olimex RT5350F-OLinuXino Boards, tested with RT5350F-OLinuXino and 
RT5350F-OLinuXino-EVB boards. More Info :
 
https://www.olimex.com/Products/OLinuXino/RT5350F/RT5350F-OLinuXino/open-source-hardware

Signed-off-by: Dimitar Gamishev HeHoPMaJIeH 
---
 target/linux/ramips/base-files/lib/ramips.sh   |   6 ++
 .../ramips/base-files/lib/upgrade/platform.sh  |   2 +
 target/linux/ramips/dts/OLINUXINO-RT5350F-EVB.dts  | 101 +
 target/linux/ramips/dts/OLINUXINO-RT5350F.dts  |  79 
 target/linux/ramips/image/Makefile |   8 ++
 .../rt305x/profiles/olinuxino-rt5350f-evb.mk   |  21 +
 .../ramips/rt305x/profiles/olinuxino-rt5350f.mk|  20 
 7 files changed, 237 insertions(+)
 create mode 100644 target/linux/ramips/dts/OLINUXINO-RT5350F-EVB.dts
 create mode 100644 target/linux/ramips/dts/OLINUXINO-RT5350F.dts
 create mode 100644 target/linux/ramips/rt305x/profiles/olinuxino-rt5350f-evb.mk
 create mode 100644 target/linux/ramips/rt305x/profiles/olinuxino-rt5350f.mk

diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index fd03423..eb3425e 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -190,6 +190,12 @@ ramips_board_detect() {
*"Omnima MiniPlug")
name="omni-plug"
;;
+   *"OLinuXino-RT5350F")
+   name="olinuxino-rt5350f"
+   ;;
+   *"OLinuXino-RT5350F-EVB")
+   name="olinuxino-rt5350f-evb"
+   ;;
*"Petatel PSR-680W"*)
name="psr-680w"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index ba69a89..0ee934d 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -66,6 +66,8 @@ platform_check_image() {
omni-emb | \
omni-emb-hpm | \
omni-plug | \
+   olinuxino-rt5350f | \
+   olinuxino-rt5350f-evb | \
psr-680w | \
px4885 | \
rp-n53 | \
diff --git a/target/linux/ramips/dts/OLINUXINO-RT5350F-EVB.dts 
b/target/linux/ramips/dts/OLINUXINO-RT5350F-EVB.dts
new file mode 100644
index 000..a644d4a
--- /dev/null
+++ b/target/linux/ramips/dts/OLINUXINO-RT5350F-EVB.dts
@@ -0,0 +1,101 @@
+/dts-v1/;
+
+/include/ "rt5350.dtsi"
+
+/ {
+compatible = "RT5350F-OLINUXINO", "ralink,rt5350-soc";
+model = "RT5350F-OLINUXINO";
+
+palmbus@1000 {
+spi@b00 {
+status = "okay";
+m25p80@0 {
+#address-cells = <1>;
+#size-cells = <1>;
+compatible = "s25fl064k";
+reg = <0 0>;
+linux,modalias = "m25p80", "s25fl064k";
+spi-max-frequency = <1000>;
+
+partition@0 {
+label = "u-boot";
+reg = <0x0 0x3>;
+read-only;
+};
+
+partition@3 {
+label = "u-boot-env";
+reg = <0x3 0x1>;
+read-only;
+};
+
+factory: partition@4 {
+label = "factory";
+reg = <0x4 0x1>;
+read-only;
+};
+
+partition@5 {
+label = "firmware";
+reg = <0x5 0x3b>;
+};
+};
+};
+gpio1: gpio@660 {
+status = "okay";
+};
+};
+
+pinctrl {
+state_default: pinctrl0 {
+gpio {
+ralink,group = "jtag", "rgmii", "mdio", 
"uartf";
+ralink,function = "gpio";
+};
+};
+};
+
+ethernet@101

[OpenWrt-Devel] [PATCH 1/1] ramips: Add support for RT5350F-OLinuXino

2015-06-03 Thread gamishev
From: Dimitar Gamishev HeHoPMaJIeH 

 Support for Olimex RT5350F-OLinuXino Boards, tested with RT5350F-OLinuXino and 
RT5350F-OLinuXino-EVB boards. More Info :
 
https://www.olimex.com/Products/OLinuXino/RT5350F/RT5350F-OLinuXino/open-source-hardware

Signed-off-by: Dimitar Gamishev HeHoPMaJIeH 
---
 target/linux/ramips/base-files/lib/ramips.sh   |   6 ++
 .../ramips/base-files/lib/upgrade/platform.sh  |   4 +-
 target/linux/ramips/dts/OLINUXINO-RT5350F-EVB.dts  | 101 +
 target/linux/ramips/dts/OLINUXINO-RT5350F.dts  |  79 
 target/linux/ramips/image/Makefile |   8 ++
 .../rt305x/profiles/olinuxino-rt5350f-evb.mk   |  21 +
 .../ramips/rt305x/profiles/olinuxino-rt5350f.mk|  20 
 7 files changed, 238 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ramips/dts/OLINUXINO-RT5350F-EVB.dts
 create mode 100644 target/linux/ramips/dts/OLINUXINO-RT5350F.dts
 create mode 100644 target/linux/ramips/rt305x/profiles/olinuxino-rt5350f-evb.mk
 create mode 100644 target/linux/ramips/rt305x/profiles/olinuxino-rt5350f.mk

diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index fd03423..ba50f1e 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -334,6 +334,12 @@ ramips_board_detect() {
*"Lenovo Y1S")
name="y1s"
;;
+   *"OLinuXino-RT5350F")
+name="olinuxino-rt5350f"
+;;
+*"OLinuXino-RT5350F-EVB")
+name="olinuxino-rt5350f-evb"
+;;
*)
name="generic"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index ba69a89..55ce6c9 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -100,7 +100,9 @@ platform_check_image() {
x8 |\
zbt-wa05 |\
y1 |\
-   y1s)
+   y1s|\
+   olinuxino-rt5350f | \
+   olinuxino-rt5350f-evb) 
[ "$magic" != "27051956" ] && {
echo "Invalid image type."
return 1
diff --git a/target/linux/ramips/dts/OLINUXINO-RT5350F-EVB.dts 
b/target/linux/ramips/dts/OLINUXINO-RT5350F-EVB.dts
new file mode 100644
index 000..a644d4a
--- /dev/null
+++ b/target/linux/ramips/dts/OLINUXINO-RT5350F-EVB.dts
@@ -0,0 +1,101 @@
+/dts-v1/;
+
+/include/ "rt5350.dtsi"
+
+/ {
+compatible = "RT5350F-OLINUXINO", "ralink,rt5350-soc";
+model = "RT5350F-OLINUXINO";
+
+palmbus@1000 {
+spi@b00 {
+status = "okay";
+m25p80@0 {
+#address-cells = <1>;
+#size-cells = <1>;
+compatible = "s25fl064k";
+reg = <0 0>;
+linux,modalias = "m25p80", "s25fl064k";
+spi-max-frequency = <1000>;
+
+partition@0 {
+label = "u-boot";
+reg = <0x0 0x3>;
+read-only;
+};
+
+partition@3 {
+label = "u-boot-env";
+reg = <0x3 0x1>;
+read-only;
+};
+
+factory: partition@4 {
+label = "factory";
+reg = <0x4 0x1>;
+read-only;
+};
+
+partition@5 {
+label = "firmware";
+reg = <0x5 0x3b>;
+};
+};
+};
+gpio1: gpio@660 {
+status = "okay";
+};
+};
+
+pinctrl {
+state_default: pinctrl0 {
+gpio {
+ralink,group = "jtag", "rgmii", "mdio", 
"uartf";
+ralink,function = "gpio";
+};
+};
+