|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT |
| 2 | + |
| 3 | +#include "mt7621.dtsi" |
| 4 | + |
| 5 | +#include <dt-bindings/gpio/gpio.h> |
| 6 | +#include <dt-bindings/input/input.h> |
| 7 | + |
| 8 | +/ { |
| 9 | + compatible = "c-life,xg1", "mediatek,mt7621-soc"; |
| 10 | + model = "C-Life XG1"; |
| 11 | + |
| 12 | + aliases { |
| 13 | + led-boot = &led_status_red; |
| 14 | + led-failsafe = &led_status_red; |
| 15 | + led-running = &led_status_blue; |
| 16 | + led-upgrade = &led_status_blue; |
| 17 | + label-mac-device = &gmac0; |
| 18 | + }; |
| 19 | + |
| 20 | + chosen { |
| 21 | + bootargs = "console=ttyS0,115200"; |
| 22 | + }; |
| 23 | + |
| 24 | + leds { |
| 25 | + compatible = "gpio-leds"; |
| 26 | + |
| 27 | + led_status_red: status_red { |
| 28 | + label = "red:status"; |
| 29 | + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; |
| 30 | + }; |
| 31 | + |
| 32 | + led_status_blue: status_blue { |
| 33 | + label = "blue:status"; |
| 34 | + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; |
| 35 | + }; |
| 36 | + }; |
| 37 | + |
| 38 | + keys { |
| 39 | + compatible = "gpio-keys"; |
| 40 | + |
| 41 | + reset { |
| 42 | + label = "reset"; |
| 43 | + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; |
| 44 | + linux,code = <KEY_RESTART>; |
| 45 | + }; |
| 46 | + |
| 47 | + wps { |
| 48 | + label = "wps"; |
| 49 | + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; |
| 50 | + linux,code = <KEY_WPS_BUTTON>; |
| 51 | + }; |
| 52 | + }; |
| 53 | +}; |
| 54 | + |
| 55 | +&nand { |
| 56 | + status = "okay"; |
| 57 | + |
| 58 | + partitions { |
| 59 | + compatible = "fixed-partitions"; |
| 60 | + #address-cells = <1>; |
| 61 | + #size-cells = <1>; |
| 62 | + |
| 63 | + partition@0 { |
| 64 | + label = "Bootloader"; |
| 65 | + reg = <0x0 0x80000>; |
| 66 | + }; |
| 67 | + |
| 68 | + partition@80000 { |
| 69 | + label = "Nvram"; |
| 70 | + reg = <0x80000 0x40000>; |
| 71 | + read-only; |
| 72 | + }; |
| 73 | + |
| 74 | + partition@c0000 { |
| 75 | + label = "Bdata"; |
| 76 | + reg = <0xc0000 0x40000>; |
| 77 | + read-only; |
| 78 | + }; |
| 79 | + |
| 80 | + factory: partition@100000 { |
| 81 | + label = "Factory"; |
| 82 | + reg = <0x100000 0x80000>; |
| 83 | + read-only; |
| 84 | + }; |
| 85 | + |
| 86 | + partition@180000 { |
| 87 | + label = "crash"; |
| 88 | + reg = <0x180000 0x40000>; |
| 89 | + read-only; |
| 90 | + }; |
| 91 | + |
| 92 | + partition@1c0000 { |
| 93 | + label = "crash_log"; |
| 94 | + reg = <0x1c0000 0x40000>; |
| 95 | + read-only; |
| 96 | + }; |
| 97 | + |
| 98 | + partition@200000 { |
| 99 | + label = "kernel"; |
| 100 | + reg = <0x200000 0x400000>; |
| 101 | + }; |
| 102 | + |
| 103 | + partition@600000 { |
| 104 | + label = "ubi"; |
| 105 | + reg = <0x600000 0x7980000>; |
| 106 | + }; |
| 107 | + }; |
| 108 | +}; |
| 109 | + |
| 110 | +&pcie { |
| 111 | + status = "okay"; |
| 112 | +}; |
| 113 | + |
| 114 | +&pcie1 { |
| 115 | + wifi@0,0 { |
| 116 | + compatible = "mediatek,mt76"; |
| 117 | + reg = <0x0000 0 0 0 0>; |
| 118 | + mediatek,mtd-eeprom = <&factory 0x0>; |
| 119 | + }; |
| 120 | +}; |
| 121 | + |
| 122 | +&gmac0 { |
| 123 | + mtd-mac-address = <&factory 0x04>; |
| 124 | +}; |
| 125 | + |
| 126 | +&gmac1 { |
| 127 | + mtd-mac-address = <&factory 0x0a>; |
| 128 | + phy-mode = "rgmii"; |
| 129 | + status = "okay"; |
| 130 | + |
| 131 | + fixed-link { |
| 132 | + speed = <1000>; |
| 133 | + full-duplex; |
| 134 | + pause; |
| 135 | + }; |
| 136 | +}; |
| 137 | + |
| 138 | +&gsw { |
| 139 | + mediatek,portmap = "llllw"; |
| 140 | + status = "okay"; |
| 141 | +}; |
| 142 | + |
| 143 | +&hnat { |
| 144 | + mtketh-wan = "eth1"; |
| 145 | + mtketh-ppd = "eth0"; |
| 146 | + mtketh-lan = "eth0"; |
| 147 | + mtketh-max-gmac = <2>; |
| 148 | + /delete-property/ mtkdsa-wan-port; |
| 149 | +}; |
| 150 | + |
| 151 | +&switch0 { |
| 152 | + status = "disabled"; |
| 153 | +}; |
| 154 | + |
| 155 | +&state_default { |
| 156 | + gpio { |
| 157 | + groups = "jtag", "wdt"; |
| 158 | + function = "gpio"; |
| 159 | + }; |
| 160 | +}; |
0 commit comments