Quantcast
Channel: banana pi single board computer open source project official forum BPI team - Latest topics
Viewing all articles
Browse latest Browse all 6451

BPI-R2 already has an on-board RTC

$
0
0

@wtolkien wrote:

… unfortunately without a battery. This means the RTC will run as long is power is applied to the board. It survives a software power-off or software reset, but when you pull the power plug it will stop. Not ideal, but better than nothing…

It’s part of the MT6323 PMIC (the voltage regulator). A few days ago Sean Wang from Mediatek posted a patchset which seems to work just fine even though it’s not yet part of the kernel. You can find his first version (all-in-on for kernel 4.14) as part of my Yocto repo here:

along with his patch to add poweroff support - which also works for me:

It requires an addition to the PMIC wrapper (‘pwrap’) section of the devicetree:

&pwrap {
	mt6323 {
		mt6323led: led {
			compatible = "mediatek,mt6323-led";
			#address-cells = <1>;
			#size-cells = <0>;

		led@0 {
			reg = <0>;
			label = "bpi-r2:isink:green";
			default-state = "off";
		};

		[...]

		};
	        mt6323rtc: rtc {
    			compatible = "mediatek,mt6323-rtc";

			power-off {
				compatible = "mediatek,mt6323-rtc-poweroff";
			};
	        };
	};
};

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6451

Latest Images

Trending Articles



Latest Images