Steve Weinreich schrieb:
> Added support for Teltonika RUT5XX hardware.
>
> Signed-off-by: Steffen Weinreich <st...@weinreich.org>
Please don't mess up alphabetic order more than it already is. Pointed out 
below:
> ---
>  target/linux/ramips/base-files/etc/diag.sh         |  3 +
>  .../etc/hotplug.d/firmware/10-rt2x00-eeprom        |  1 +
>  target/linux/ramips/base-files/lib/ramips.sh       |  3 +
>  .../ramips/base-files/lib/upgrade/platform.sh      |  1 +
>  target/linux/ramips/dts/RUT5XX.dts                 | 86 
> ++++++++++++++++++++++
>  target/linux/ramips/image/Makefile                 |  3 +
>  6 files changed, 97 insertions(+)
>  create mode 100644 target/linux/ramips/dts/RUT5XX.dts
>
> diff --git a/target/linux/ramips/base-files/etc/diag.sh 
> b/target/linux/ramips/base-files/etc/diag.sh
> index 075562a..ad9bbd7 100755
> --- a/target/linux/ramips/base-files/etc/diag.sh
> +++ b/target/linux/ramips/base-files/etc/diag.sh
> @@ -170,6 +170,9 @@ get_status_led() {
>       na930)
>               status_led="na930:blue:power"
>               ;;
> +     rut5xx)
> +             status_led="rut5xx:green:status"
> +             ;;
>       esac
>  }
>  
> diff --git 
> a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom 
> b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
> index 341fd5f..dd8c0f7 100644
> --- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
> +++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
> @@ -119,6 +119,7 @@ case "$FIRMWARE" in
>       ur-326n4g | \
>       ur-336un | \
>       xdxrn502j | \
> +     rut5xx | \
Here.
>       hg255d)
>               rt2x00_eeprom_extract "factory" 0 512
>               ;;
> diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
> b/target/linux/ramips/base-files/lib/ramips.sh
> index 7f221f8..4619bef 100755
> --- a/target/linux/ramips/base-files/lib/ramips.sh
> +++ b/target/linux/ramips/base-files/lib/ramips.sh
> @@ -211,6 +211,9 @@ ramips_board_detect() {
>       *"RT-N56U")
>               name="rt-n56u"
>               ;;
> +     *"RUT5XX")
> +             name="rut5xx"
> +             ;;
>       *"Skyline SL-R7205"*)
>               name="sl-r7205"
>               ;;
> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
> b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> index d8098b2..c85ee0f 100755
> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> @@ -69,6 +69,7 @@ platform_check_image() {
>       rt-n14u | \
>       rt-n15 | \
>       rt-n56u | \
> +     rut5xx | \
>       sl-r7205 | \
>       tew-691gr | \
>       tew-692gr | \
> diff --git a/target/linux/ramips/dts/RUT5XX.dts 
> b/target/linux/ramips/dts/RUT5XX.dts
> new file mode 100644
> index 0000000..530b8b1
> --- /dev/null
> +++ b/target/linux/ramips/dts/RUT5XX.dts
> @@ -0,0 +1,86 @@
> +/dts-v1/;
> +
> +/include/ "rt3050.dtsi"
> +
> +/ {
> +     compatible = "RUT5XX", "ralink,rt3050-soc";
> +     model = "Teltonika RUT5XX";
> +
> +     palmbus@10000000 {
> +             spi@b00 {
> +                     status = "okay";
> +                     m25p80@0 {
> +                             #address-cells = <1>;
> +                             #size-cells = <1>;
> +                             compatible = "n25q128a13";
> +                             reg = <0 0>;
> +                             linux,modalias = "m25p80", "n25q128a13";
> +                             spi-max-frequency = <10000000>;
> +
> +                             partition@0 {
> +                                     label = "u-boot";
> +                                     reg = <0x0 0x30000>;
> +                                     read-only;
> +                             };
> +
> +                             partition@30000 {
> +                                     label = "u-boot-env";
> +                                     reg = <0x30000 0x10000>;
> +                                     read-only;
> +                             };
> +
> +                             factory: partition@40000 {
> +                                     label = "factory";
> +                                     reg = <0x40000 0x10000>;
> +                                     read-only;
> +                             };
> +
> +                             partition@50000 {
> +                                     label = "firmware";
> +                                     reg = <0x50000 0xfb0000>;
> +                             };
> +                     };
> +             };
> +     };
> +
> +     pinctrl {
> +             state_default: pinctrl0 {
> +                     gpio {
> +                             ralink,group = "i2c", "jtag", "rgmii", "mdio", 
> "uartf";
> +                             ralink,function = "gpio";
> +                     };
> +             };
> +     };
> +
> +        ethernet@10100000 {
> +                mtd-mac-address = <&factory 0x28>;
> +        };
> +
> +     esw@10110000 {
> +             ralink,portmap = <0x3e>;
> +     };
> +
> +     gpio-leds {
> +             compatible = "gpio-leds";
> +             status {
> +                     label = "rut5xx:green:status";
> +                     gpios = <&gpio0 14 1>;
> +             };
> +     };
> +
> +     gpio-keys-polled {
> +             compatible = "gpio-keys-polled";
> +             #address-cells = <1>;
> +             #size-cells = <0>;
> +             poll-interval = <20>;
> +             reset {
> +                     label = "reset";
> +                     gpios = <&gpio0 10 1>;
> +                     linux,code = <0x198>;
> +             };
> +     };
> +
> +     otg@101c0000 {
> +             status = "okay";
> +     };
> +};
> diff --git a/target/linux/ramips/image/Makefile 
> b/target/linux/ramips/image/Makefile
> index 19932f6..9b2dcce 100644
> --- a/target/linux/ramips/image/Makefile
> +++ b/target/linux/ramips/image/Makefile
> @@ -398,6 +398,8 @@ Image/Build/Profile/ESR-9753=$(call 
> BuildFirmware/Default4M/$(1),$(1),esr-9753,E
>  
>  Image/Build/Profile/HW550-3G=$(call 
> BuildFirmware/Default8M/$(1),$(1),hw550-3g,HW550-3G)
>  
> +Image/Build/Profile/RUT5XX=$(call 
> BuildFirmware/Default8M/$(1),$(1),rut5xx,RUT5XX)
> +
Here. Seems to be primarily ordered by vendor name, secondarily by product name.
>  belkin_f5d8235v2_mtd_size=7929856
>  Image/Build/Profile/F5D8235V2=$(call 
> BuildFirmware/CustomFlash/$(1),$(1),f5d8235v2,F5D8235_V2,$(belkin_f5d8235v2_mtd_size))
>  
> @@ -576,6 +578,7 @@ define Image/Build/Profile/Default
>  #    $(call Image/Build/Profile/HG255D,$(1))
>       $(call Image/Build/Profile/HLKRM04,$(1))
>       $(call Image/Build/Profile/HW550-3G,$(1))
> +     $(call Image/Build/Profile/RUT5XX,$(1))
And here.
>       $(call Image/Build/Profile/IP2202,$(1))
>       $(call Image/Build/Profile/M3,$(1))
>       $(call Image/Build/Profile/M4,$(1))
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to