// SPDX-License-Identifier: GPL-2.0-only OR MIT /dts-v1/; #include "mt7981b.dtsi" #include #include #include "dt-bindings/pinctrl/mt65xx.h" / { compatible = "openwrt,one", "mediatek,mt7981b"; model = "OpenWrt One"; aliases { serial0 = &uart0; }; chosen { stdout-path = "serial0:115200n8"; }; memory@40000000 { reg = <0 0x40000000 0 0x40000000>; device_type = "memory"; }; pwm-leds { compatible = "pwm-leds"; led-0 { color = ; default-brightness = <0>; function = LED_FUNCTION_STATUS; max-brightness = <255>; pwms = <&pwm 0 10000>; }; led-1 { color = ; default-brightness = <0>; function = LED_FUNCTION_STATUS; max-brightness = <255>; pwms = <&pwm 1 10000>; }; }; gpio-leds { compatible = "gpio-leds"; led-0 { color = ; function = LED_FUNCTION_STATUS; gpios = <&pio 9 GPIO_ACTIVE_HIGH>; }; led-1 { color = ; function = LED_FUNCTION_LAN; gpios = <&pio 34 GPIO_ACTIVE_LOW>; linux,default-trigger = "netdev"; }; led-2 { color = ; function = LED_FUNCTION_LAN; gpios = <&pio 35 GPIO_ACTIVE_LOW>; linux,default-trigger = "netdev"; }; }; }; &pio { pwm_pins: pwm-pins { mux { function = "pwm"; groups = "pwm0_0", "pwm1_1"; }; }; spi2_flash_pins: spi2-pins { mux { function = "spi"; groups = "spi2"; }; conf-pu { bias-pull-up = ; drive-strength = <8>; pins = "SPI2_CS", "SPI2_WP"; }; conf-pd { bias-pull-down = ; drive-strength = <8>; pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; }; }; }; &pwm { pinctrl-names = "default"; pinctrl-0 = <&pwm_pins>; status = "okay"; }; &spi2 { pinctrl-names = "default"; pinctrl-0 = <&spi2_flash_pins>; status = "okay"; flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <40000000>; #address-cells = <1>; #size-cells = <1>; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { reg = <0x00000 0x40000>; label = "bl2-nor"; }; partition@40000 { reg = <0x40000 0xc0000>; label = "factory"; read-only; nvmem-layout { compatible = "fixed-layout"; #address-cells = <1>; #size-cells = <1>; wifi_factory_calibration: eeprom@0 { reg = <0x0 0x1000>; }; wan_factory_mac: macaddr@24 { reg = <0x24 0x6>; compatible = "mac-base"; #nvmem-cell-cells = <1>; }; }; }; partition@100000 { reg = <0x100000 0x80000>; label = "fip-nor"; }; partition@180000 { reg = <0x180000 0xc80000>; label = "recovery"; }; }; }; }; &uart0 { status = "okay"; };