Four board fixes, in mt7986a-glinet-gl-mt6000-guix.dtsi (appended to OpenWrt's DTS, replacing the FIT script's fdtput edits) and the system: - secmon: GL's BL31 uses 256 KiB, not mainline's 192 KiB. - WED off and mainline's wo-ilm/wo-dlm/wo-boot no-map regions removed: with them the kernel resets within seconds under GL's firmware. - eMMC partitions in mainline's binding (gpt-partitions under card@0): OpenWrt's card@0/block/partitions isn't read by 6.13+, so `factory' had no NVMEM cells -- no WiFi calibration, and mtk_eth_soc deferred forever for its MAC address. - clk_ignore_unused: mtk_eth_soc, a module, loads after unused clocks are turned off, and its MDIO bus timed out. ramoops is built in, with a console record, so a failed boot's kernel log survives a warm reset. docs/PITFALLS.md #49-#52: these, GL U-Boot's TFTP recovery, and the image system's root UUID. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
94 lines
2.6 KiB
Devicetree
94 lines
2.6 KiB
Devicetree
// 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>;
|
|
};
|
|
};
|
|
};
|