ath79: add support for MikroTik RouterBOARD 912UAG-2HPnD
This board has been supported in the ar71xx.
Links:
* https://mikrotik.com/product/RB912UAG-2HPnD
* https://openwrt.org/toh/hwdata/mikrotik/mikrotik_rb912uag-2hpnd
This also supports the 5GHz flavour of the board.
Hardware:
* SoC: Atheros AR9342,
* RAM: DDR 64MB,
* SPI NOR: 64KB,
* NAND: 128MB,
* Ethernet: x1 10/100/1000 port with passive POE in,
* Wi-Fi: 802.11 b/g/n,
* PCIe,
* USB: 2.0 EHCI controller, connected to mPCIe slot and a Type-A
port -- both can be used for LTE modem, but only one can be
used at any time.
* LEDs: 5 general purpose LEDs (led1..led5), power LED, user LED,
Ethernet phy LED,
* Button,
* Beeper.
Not working:
* Button: it shares gpio line 15 with NAND ALE and NAND IO7,
and current drivers doesn't easily support this configuration,
* Beeper: it is connected to bit 5 of a serial shift register
(tested with sysfs led trigger timer). But kmod-gpio-beeper
doesn't work -- we left this as is for now.
Flashing:
* Use the RouterBOARD Reset button to enable TFTP netboot,
boot kernel and initramfs and then perform sysupgrade.
* From ar71xx OpenWrt firmware run:
$ sysupgrade -F /tmp/<sysupgrade.bin>
For more info see: https://openwrt.org/toh/mikrotik/common.
Co-Developed-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: Denis Kalashnikov <denis281089@gmail.com>
2021-05-27 08:16:46 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
#include "ar9344.dtsi"
|
|
|
|
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
|
|
#include <dt-bindings/input/input.h>
|
|
|
|
|
|
|
|
/ {
|
|
|
|
compatible = "mikrotik,routerboard-912uag-2hpnd", "qca,ar9342";
|
|
|
|
model = "MikroTik RouterBOARD 912UAG-2HPnD";
|
|
|
|
|
|
|
|
aliases {
|
|
|
|
led-boot = &led_power;
|
|
|
|
led-failsafe = &led_power;
|
|
|
|
led-running = &led_power;
|
|
|
|
led-upgrade = &led_power;
|
|
|
|
};
|
|
|
|
|
|
|
|
gpio_latch: gpio_latch {
|
|
|
|
compatible = "gpio-latch";
|
|
|
|
gpio-controller;
|
|
|
|
#gpio-cells = <2>;
|
|
|
|
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>,
|
|
|
|
<&gpio 1 GPIO_ACTIVE_HIGH>,
|
|
|
|
<&gpio 2 GPIO_ACTIVE_HIGH>,
|
|
|
|
<&gpio 3 GPIO_ACTIVE_HIGH>,
|
|
|
|
<0>, /* Not connected */
|
|
|
|
<&gpio 13 GPIO_ACTIVE_HIGH>,
|
|
|
|
<&gpio 14 GPIO_ACTIVE_HIGH>,
|
|
|
|
<&gpio 15 GPIO_ACTIVE_HIGH>,
|
|
|
|
<&gpio 11 GPIO_ACTIVE_LOW>; /* Latch Enable */
|
|
|
|
};
|
|
|
|
|
|
|
|
nand_gpio {
|
|
|
|
compatible = "mikrotik,rb91x-nand";
|
|
|
|
|
|
|
|
gpios = <&gpio_latch 3 GPIO_ACTIVE_HIGH>, /* Read */
|
|
|
|
<&gpio 4 GPIO_ACTIVE_HIGH>, /* Ready (RDY) */
|
|
|
|
<&gpio_latch 5 GPIO_ACTIVE_LOW>, /* Chip Enable (nCE) */
|
|
|
|
<&gpio_latch 6 GPIO_ACTIVE_HIGH>, /* Command Latch Enable (CLE) */
|
|
|
|
<&gpio_latch 7 GPIO_ACTIVE_HIGH>, /* Address Latch Enable (ALE) */
|
|
|
|
<&gpio 12 GPIO_ACTIVE_LOW>, /* Read/Write Enable (nRW) */
|
|
|
|
<&gpio_latch 8 GPIO_ACTIVE_LOW>; /* Latch Enable (nLE) */
|
|
|
|
|
|
|
|
partitions {
|
|
|
|
compatible = "fixed-partitions";
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
partition@0 {
|
|
|
|
label = "booter";
|
|
|
|
reg = <0x0 0x0040000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
partition@40000 {
|
|
|
|
label = "kernel";
|
|
|
|
reg = <0x0040000 0x03c0000>;
|
|
|
|
};
|
|
|
|
|
|
|
|
partition@400000 {
|
|
|
|
label = "ubi";
|
|
|
|
reg = <0x0400000 0x7c00000>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
leds {
|
|
|
|
compatible = "gpio-leds";
|
|
|
|
|
|
|
|
led_power: power {
|
|
|
|
label = "green:power";
|
|
|
|
gpios = <&gpio_latch 1 GPIO_ACTIVE_HIGH>;
|
|
|
|
default-state = "on";
|
|
|
|
};
|
|
|
|
|
|
|
|
user {
|
|
|
|
label = "green:user";
|
|
|
|
gpios = <&gpio_latch 2 GPIO_ACTIVE_HIGH>;
|
|
|
|
};
|
|
|
|
|
|
|
|
led1 {
|
|
|
|
label = "green:led1";
|
|
|
|
gpios = <&ssr 0 GPIO_ACTIVE_HIGH>;
|
|
|
|
};
|
|
|
|
|
|
|
|
led2 {
|
|
|
|
label = "green:led2";
|
|
|
|
gpios = <&ssr 1 GPIO_ACTIVE_HIGH>;
|
|
|
|
};
|
|
|
|
|
|
|
|
led3 {
|
|
|
|
label = "green:led3";
|
|
|
|
gpios = <&ssr 2 GPIO_ACTIVE_HIGH>;
|
|
|
|
};
|
|
|
|
|
|
|
|
led4 {
|
|
|
|
label = "green:led4";
|
|
|
|
gpios = <&ssr 3 GPIO_ACTIVE_HIGH>;
|
|
|
|
};
|
|
|
|
|
|
|
|
led5 {
|
|
|
|
label = "green:led5";
|
|
|
|
gpios = <&ssr 4 GPIO_ACTIVE_HIGH>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
gpio-export {
|
|
|
|
compatible = "gpio-export";
|
|
|
|
|
ath79: mikrotik: fix beeper phantom noise on RB912
Analysis done by Denis Kalashnikov:
It seems that some ROS versions on some routerboard models have this bug:
after silence boot (no output to uart, no beeps) beeper clicks when wireless traffic is.
https://forum.mikrotik.com/viewtopic.php?f=3&t=92269
https://forum.mikrotik.com/viewtopic.php?t=63399
From these links:
1)
Hello, I have RB951G-2HnD and I noticed strange thing
when I loaded the device with some wireless traffic it
produced strange sound - like hissing, fizzing etc.
2)
Same problem still on 6.33, with silent boot enabled
I hear buzzing noise on wireless load.
3)
The sound is fixed in v5.19, it was a bug that caused beeper to make clicks.
It also got fixed in RouterOS:
* What's new in 5.19 (2012-Jul-16 10:51):
fix ticking sound on RB411UAHL;
* What's new in 6.38.3 (2017-Feb-07 09:52):
rb3011 - fixed noise from buzzer after silent boot;
I've checked with an oscilloscope that:
* When on the ssr beeper pin is 0,
on the beeper itself is 1 (~5V),
and when on the ssr beeper pin is 1,
on the beeper is 0
The beeper doesn't consume power,
so 1 should be a default/idle value for the ssr beeper pin).
* When there is wireless traffic (ping packets)
in the background and the beeper clicks, I see
pulses on the beeper itself,
but no pulses on the ssr beeper pin (Q5 pin of 74hc595).
When I manually toggle the ssr beeper pin I see pulses on both.
So, it is likely that the phantom beeper clicks are caused by the EMI.
Suggested-by: Denis Kalashnikov <denis281089@gmail.com>
Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-06-28 08:57:21 +00:00
|
|
|
beeper {
|
|
|
|
gpio-export,name = "beeper";
|
|
|
|
gpio-export,output = <1>; /* Must be 1 to avoid EMI induced clicking noise */
|
|
|
|
gpios = <&ssr 5 GPIO_ACTIVE_HIGH>;
|
|
|
|
};
|
|
|
|
|
ath79: add support for MikroTik RouterBOARD 912UAG-2HPnD
This board has been supported in the ar71xx.
Links:
* https://mikrotik.com/product/RB912UAG-2HPnD
* https://openwrt.org/toh/hwdata/mikrotik/mikrotik_rb912uag-2hpnd
This also supports the 5GHz flavour of the board.
Hardware:
* SoC: Atheros AR9342,
* RAM: DDR 64MB,
* SPI NOR: 64KB,
* NAND: 128MB,
* Ethernet: x1 10/100/1000 port with passive POE in,
* Wi-Fi: 802.11 b/g/n,
* PCIe,
* USB: 2.0 EHCI controller, connected to mPCIe slot and a Type-A
port -- both can be used for LTE modem, but only one can be
used at any time.
* LEDs: 5 general purpose LEDs (led1..led5), power LED, user LED,
Ethernet phy LED,
* Button,
* Beeper.
Not working:
* Button: it shares gpio line 15 with NAND ALE and NAND IO7,
and current drivers doesn't easily support this configuration,
* Beeper: it is connected to bit 5 of a serial shift register
(tested with sysfs led trigger timer). But kmod-gpio-beeper
doesn't work -- we left this as is for now.
Flashing:
* Use the RouterBOARD Reset button to enable TFTP netboot,
boot kernel and initramfs and then perform sysupgrade.
* From ar71xx OpenWrt firmware run:
$ sysupgrade -F /tmp/<sysupgrade.bin>
For more info see: https://openwrt.org/toh/mikrotik/common.
Co-Developed-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: Denis Kalashnikov <denis281089@gmail.com>
2021-05-27 08:16:46 +00:00
|
|
|
usb_power {
|
|
|
|
gpio-export,name = "power-usb";
|
|
|
|
gpio-export,output = <1>;
|
|
|
|
gpios = <&ssr 6 GPIO_ACTIVE_HIGH>;
|
|
|
|
};
|
|
|
|
|
|
|
|
pcie_power {
|
|
|
|
gpio-export,name = "power-pcie";
|
|
|
|
gpio-export,output = <0>;
|
|
|
|
gpios = <&ssr 7 GPIO_ACTIVE_HIGH>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-01-12 15:11:15 +00:00
|
|
|
&ref {
|
|
|
|
clock-frequency = <25000000>;
|
|
|
|
};
|
|
|
|
|
ath79: add support for MikroTik RouterBOARD 912UAG-2HPnD
This board has been supported in the ar71xx.
Links:
* https://mikrotik.com/product/RB912UAG-2HPnD
* https://openwrt.org/toh/hwdata/mikrotik/mikrotik_rb912uag-2hpnd
This also supports the 5GHz flavour of the board.
Hardware:
* SoC: Atheros AR9342,
* RAM: DDR 64MB,
* SPI NOR: 64KB,
* NAND: 128MB,
* Ethernet: x1 10/100/1000 port with passive POE in,
* Wi-Fi: 802.11 b/g/n,
* PCIe,
* USB: 2.0 EHCI controller, connected to mPCIe slot and a Type-A
port -- both can be used for LTE modem, but only one can be
used at any time.
* LEDs: 5 general purpose LEDs (led1..led5), power LED, user LED,
Ethernet phy LED,
* Button,
* Beeper.
Not working:
* Button: it shares gpio line 15 with NAND ALE and NAND IO7,
and current drivers doesn't easily support this configuration,
* Beeper: it is connected to bit 5 of a serial shift register
(tested with sysfs led trigger timer). But kmod-gpio-beeper
doesn't work -- we left this as is for now.
Flashing:
* Use the RouterBOARD Reset button to enable TFTP netboot,
boot kernel and initramfs and then perform sysupgrade.
* From ar71xx OpenWrt firmware run:
$ sysupgrade -F /tmp/<sysupgrade.bin>
For more info see: https://openwrt.org/toh/mikrotik/common.
Co-Developed-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: Denis Kalashnikov <denis281089@gmail.com>
2021-05-27 08:16:46 +00:00
|
|
|
&spi {
|
|
|
|
status = "okay";
|
|
|
|
|
|
|
|
compatible = "qca,ar7100-spi";
|
|
|
|
|
|
|
|
cs-gpios = <0>, <&gpio_latch 0 GPIO_ACTIVE_LOW>;
|
|
|
|
|
|
|
|
flash@0 {
|
|
|
|
compatible = "jedec,spi-nor";
|
|
|
|
reg = <0>;
|
|
|
|
spi-max-frequency = <50000000>;
|
|
|
|
|
|
|
|
partitions {
|
|
|
|
compatible = "mikrotik,routerboot-partitions";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
partition@0 {
|
|
|
|
label = "routerboot";
|
|
|
|
reg = <0x0 0x0>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
hard_config: hard_config {
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
bios {
|
|
|
|
size = <0x1000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
soft_config {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
ssr: ssr@1 {
|
|
|
|
compatible = "fairchild,74hc595";
|
|
|
|
gpio-controller;
|
|
|
|
#gpio-cells = <2>;
|
|
|
|
registers-number = <1>;
|
|
|
|
reg = <1>;
|
|
|
|
spi-max-frequency = <50000000>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&mdio0 {
|
|
|
|
status = "okay";
|
|
|
|
|
|
|
|
phy-mask = <0>;
|
|
|
|
|
|
|
|
phy0: ethernet-phy@0 {
|
|
|
|
reg = <0>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
ð0 {
|
|
|
|
status = "okay";
|
|
|
|
|
|
|
|
phy-mode = "rgmii-id";
|
|
|
|
phy-handle = <&phy0>;
|
|
|
|
pll-data = <0x02000000 0x00000101 0x00001313>;
|
|
|
|
|
|
|
|
gmac-config {
|
|
|
|
device = <&gmac>;
|
|
|
|
rgmii-gmac0 = <1>;
|
|
|
|
rxd-delay = <1>;
|
|
|
|
txd-delay = <1>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&wmac {
|
|
|
|
status = "okay";
|
|
|
|
qca,no-eeprom;
|
|
|
|
};
|
|
|
|
|
|
|
|
&pcie {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&usb {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&usb_phy {
|
|
|
|
status = "okay";
|
|
|
|
};
|