Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /dts-v1/;
- #include "mt7620a.dtsi"
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/input/input.h>
- / {
- compatible = "geva,batterypoe", "ralink,mt7620a-soc";
- model = "GEVA Battery POE";
- chosen {
- bootargs = "console=ttyS0,115200";
- };
- aliases {
- label-mac-device = ðernet;
- led-boot = &led_power;
- led-failsafe = &led_power;
- led-running = &led_power;
- led-upgrade = &led_power;
- };
- leds {
- compatible = "gpio-leds";
- led_power: power {
- label = "orange.power";
- gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
- };
- eth {
- label = "blue.eth";
- gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
- };
- wifi {
- label = "red.wifi";
- gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
- };
- };
- keys {
- compatible = "gpio-keys-polled";
- poll-interval = <20>;
- reset {
- label = "reset";
- gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_RESTART>;
- };
- };
- };
- &gpio0 {
- status = "okay";
- };
- &gpio2 {
- status = "okay";
- };
- &gpio3 {
- status = "okay";
- };
- //GPIO 9,14 are shared with UART Full, GPIO 72 - wlan LEDs (see datasheets)
- //GPIO 1,2 are share with I2C
- //so switch used gpio into gpio-mode:
- &state_default {
- gpio {
- groups = "i2c", "wled", "uartf", "ephy";
- function = "gpio";
- };
- };
- //Your device use spi nor-flash 16MB, so enable spi-controller
- //and describe your flash layout
- &spi0 {
- status = "okay";
- flash@0 {
- compatible = "jedec,spi-nor";
- reg = <0>;
- spi-max-frequency = <50000000>;
- partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
- 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 {
- compatible = "denx,uimage";
- label = "firmware";
- reg = <0x50000 0xfb0000>;
- };
- };
- };
- };
- //We known that your board use USB 2.0, so enable it (USB 1.1 too)
- &ehci {
- status = "okay";
- };
- &ohci {
- status = "okay";
- };
- //Enable eth and set MAC/switch defaults
- ðernet {
- status = "okay";
- //it's useless because your factory is empty and MAC is incorrect
- //but linux define random MAC if invalid
- mtd-mac-address = <&factory 0x4>;
- mediatek,portmap = "wllll";
- };
- //Enable build-in wifi
- &wmac {
- status = "okay";
- //your factory is empty and data is incorrect
- // ralink,mtd-eeprom = <&factory 0>;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement