// SPDX-License-Identifier: GPL-2.0-or-later OR MIT // // Included at the end of OpenWrt's mt7986a-glinet-gl-mt6000.dts: what the // board needs under GL.iNet's stock BL2/ATF/U-Boot, which mainline's // mt7986a.dtsi does not assume, and under this (mainline 6.17) kernel. // The eMMC partitions in mainline's binding, which OpenWrt's other boards // use and which kernels since 6.13 look for: `partitions' compatible with // "gpt-partitions" right under the card. OpenWrt's DTS still nests them in // card@0/block, which nothing reads any more -- so the `factory' partition // had no NVMEM cells: WiFi fell back to default calibration and mtk_eth_soc // deferred forever waiting for its MAC addresses (no Ethernet at all). &mmc0 { card@0 { /delete-node/ block; partitions { compatible = "gpt-partitions"; block-partition-env { partname = "u-boot-env"; nvmem-layout { compatible = "u-boot,env"; }; }; block-partition-factory { partname = "factory"; nvmem-layout { compatible = "fixed-layout"; #address-cells = <1>; #size-cells = <1>; eeprom_factory_0: eeprom@0 { reg = <0x0 0x1000>; }; macaddr_factory_a: macaddr@a { compatible = "mac-base"; reg = <0xa 0x6>; #nvmem-cell-cells = <1>; }; }; }; }; }; }; // GL's ATF (BL31) uses 256 KiB, not mainline's 192 KiB. Unreserved, the top // 64 KiB is handed out as RAM and the kernel dies at the first allocation // there (zeroed: INIT_ON_ALLOC), before any console or network. &secmon_reserved { reg = <0 0x43000000 0 0x40000>; }; // WED (WiFi offload) off. With mainline's no-map wo-ilm/wo-dlm/wo-boot // reserved regions -- the WO MCU's SRAM, in MMIO space -- the kernel resets // within seconds of starting under GL's firmware; OpenWrt maps that SRAM as // syscons instead. Without those regions the WED driver would write the WO // boot registers through a NULL mapping, so the WED nodes go with them. &wed0 { status = "disabled"; memory-region = <&wo_emi0>, <&wo_data>; memory-region-names = "wo-emi", "wo-data"; }; &wed1 { status = "disabled"; memory-region = <&wo_emi1>, <&wo_data>; memory-region-names = "wo-emi", "wo-data"; }; /delete-node/ &wo_ilm0; /delete-node/ &wo_ilm1; /delete-node/ &wo_dlm0; /delete-node/ &wo_dlm1; /delete-node/ &wo_boot; / { reserved-memory { // Kernel log, oops and panic dumps across the (watchdog) reset, // for /sys/fs/pstore on the next boot: there is no serial console // to see them otherwise. Where OpenWrt keeps its ramoops. ramoops@42ff0000 { compatible = "ramoops"; reg = <0 0x42ff0000 0 0x10000>; console-size = <0x8000>; record-size = <0x1000>; }; }; };