b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | #include "rt3883.dtsi" |
| 2 | |
| 3 | #include <dt-bindings/gpio/gpio.h> |
| 4 | #include <dt-bindings/input/input.h> |
| 5 | |
| 6 | / { |
| 7 | compatible = "omnima,hpm", "ralink,rt3662-soc", "ralink,rt3883-soc"; |
| 8 | model = "Omnima HPM"; |
| 9 | |
| 10 | aliases { |
| 11 | led-boot = &led_status; |
| 12 | led-failsafe = &led_status; |
| 13 | led-running = &led_status; |
| 14 | led-upgrade = &led_status; |
| 15 | }; |
| 16 | |
| 17 | chosen { |
| 18 | bootargs = "console=ttyS0,115200"; |
| 19 | }; |
| 20 | |
| 21 | keys { |
| 22 | compatible = "gpio-keys-polled"; |
| 23 | poll-interval = <100>; |
| 24 | |
| 25 | reset { |
| 26 | label = "reset"; |
| 27 | gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; |
| 28 | linux,code = <KEY_RESTART>; |
| 29 | }; |
| 30 | }; |
| 31 | |
| 32 | leds { |
| 33 | compatible = "gpio-leds"; |
| 34 | |
| 35 | power { |
| 36 | label = "orange:power"; |
| 37 | gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; |
| 38 | default-state = "on"; |
| 39 | }; |
| 40 | |
| 41 | led_status: status { |
| 42 | label = "green:status"; |
| 43 | gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; |
| 44 | default-state = "on"; |
| 45 | }; |
| 46 | |
| 47 | eth { |
| 48 | label = "green:eth"; |
| 49 | gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; |
| 50 | }; |
| 51 | |
| 52 | eth2 { |
| 53 | label = "red:eth"; |
| 54 | gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; |
| 55 | }; |
| 56 | |
| 57 | wifi { |
| 58 | label = "green:wifi"; |
| 59 | gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; |
| 60 | }; |
| 61 | |
| 62 | wifi2 { |
| 63 | label = "red:wifi"; |
| 64 | gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; |
| 65 | }; |
| 66 | }; |
| 67 | |
| 68 | gpio_export { |
| 69 | compatible = "gpio-export"; |
| 70 | #size-cells = <0>; |
| 71 | /* gpio 12 and 13 handle the OC input */ |
| 72 | |
| 73 | usb0 { |
| 74 | gpio-export,name = "usb0"; |
| 75 | gpio-export,output = <1>; |
| 76 | gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; |
| 77 | }; |
| 78 | |
| 79 | usb1 { |
| 80 | gpio-export,name = "usb1"; |
| 81 | gpio-export,output = <1>; |
| 82 | gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; |
| 83 | }; |
| 84 | }; |
| 85 | }; |
| 86 | |
| 87 | &spi0 { |
| 88 | status = "okay"; |
| 89 | |
| 90 | flash@0 { |
| 91 | compatible = "jedec,spi-nor"; |
| 92 | spi-max-frequency = <25000000>; |
| 93 | reg = <0>; |
| 94 | |
| 95 | partitions { |
| 96 | compatible = "fixed-partitions"; |
| 97 | #address-cells = <1>; |
| 98 | #size-cells = <1>; |
| 99 | |
| 100 | partition@0 { |
| 101 | reg = <0x0 0x0030000>; |
| 102 | label = "u-boot"; |
| 103 | read-only; |
| 104 | }; |
| 105 | |
| 106 | partition@30000 { |
| 107 | reg = <0x00030000 0x00010000>; |
| 108 | label = "config"; |
| 109 | read-only; |
| 110 | }; |
| 111 | |
| 112 | factory: partition@40000 { |
| 113 | reg = <0x00040000 0x00010000>; |
| 114 | label = "factory"; |
| 115 | read-only; |
| 116 | }; |
| 117 | |
| 118 | partition@50000 { |
| 119 | compatible = "denx,uimage"; |
| 120 | reg = <0x00050000 0x00fb0000>; |
| 121 | label = "firmware"; |
| 122 | }; |
| 123 | }; |
| 124 | }; |
| 125 | }; |
| 126 | |
| 127 | &state_default { |
| 128 | gpio { |
| 129 | groups = "i2c", "jtag", "uartf"; |
| 130 | function = "gpio"; |
| 131 | }; |
| 132 | }; |
| 133 | |
| 134 | ðernet { |
| 135 | phy-handle = <&phy0>; |
| 136 | phy-mode = "rgmii"; |
| 137 | mtd-mac-address = <&factory 0x28>; |
| 138 | |
| 139 | mdio-bus { |
| 140 | status = "okay"; |
| 141 | |
| 142 | phy0: ethernet-phy@4 { |
| 143 | reg = <4>; |
| 144 | }; |
| 145 | }; |
| 146 | }; |
| 147 | |
| 148 | &wmac { |
| 149 | ralink,mtd-eeprom = <&factory 0x0>; |
| 150 | }; |
| 151 | |
| 152 | &ehci { |
| 153 | status = "okay"; |
| 154 | }; |
| 155 | |
| 156 | &ohci { |
| 157 | status = "okay"; |
| 158 | }; |