// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Local additions shared by both Banana Pi M2 boards (marlena, banana-backup), * included after the mainline board file by the two board DTS files here. */ / { aliases { /* * The battery-backed DS1307 must be rtc0: RTC_HCTOSYS and * RTC_SYSTOHC use rtc0, and so do hwclock and chrony's rtcsync. * Without the aliases the SoC RTC (needed anyway, it provides the * 32 kHz clock) may register first. */ rtc0 = &ds1307; rtc1 = &rtc; /* * Linux numbers MMC hosts in probe order without aliases. The * environment boots root=/dev/mmcblk0p2, so the SD slot must * stay mmc0 whatever probes first (mmc1 is the SDIO Wi-Fi). */ mmc0 = &mmc0; mmc1 = &mmc1; }; leds { /* * Labels for marlena's U-Boot overlay * (sun8i-r40-bananapi-m2-ultra-led.dtbo targets &pwr_led and * &user_led_green), and the same triggers set here, so the * overlay is no longer needed. The Berry's green LED node is * "user-led", the Ultra's "user-led-green", see the board files. */ pwr_led: pwr-led { linux,default-trigger = "heartbeat"; }; }; }; /* * CPU core voltage floor. The old 4.18/5.4 kernels had no cpufreq, so the CPU * ran at U-Boot's 1008 MHz with U-Boot's CONFIG_AXP_DCDC2_VOLT=1100 mV, below * the vendor's 1160 mV for 1008 MHz; both boards locked up silently under * sustained multi-core load (2026-11-18/19). The mainline board files include * sun8i-r40-cpu-opp.dtsi (720-1200 MHz, the vendor's dvfs_table voltages), so * with cpufreq-dt this floor only matters until cpufreq takes over and lifts * the 720/912 MHz points slightly (1.00/1.10 -> 1.16 V): a margin, kept on * purpose. The regulator core raises a voltage below the minimum at boot * (machine_constraints_voltage, apply_uV). */ ®_dcdc2 { regulator-min-microvolt = <1160000>; }; /* DS1307 at 0x68 on TWI2 (PB20/PB21, the mainline default pins). */ &i2c2 { status = "okay"; ds1307: rtc@68 { compatible = "dallas,ds1307"; reg = <0x68>; }; };