Enable AXP209 battery supply
This commit is contained in:
		
							parent
							
								
									642f9ee90e
								
							
						
					
					
						commit
						3727df810a
					
				@ -83,3 +83,9 @@ Oct 19 06:11:32 nixos kernel: sunxi-mmc 1c10000.mmc: send stop command failed
 | 
				
			|||||||
Is not in currently in DTB at all.
 | 
					Is not in currently in DTB at all.
 | 
				
			||||||
Maybe use sun7i-a20 as example. It has a "codec" block.
 | 
					Maybe use sun7i-a20 as example. It has a "codec" block.
 | 
				
			||||||
See the S3 manual, grep for I2S/PCM.
 | 
					See the S3 manual, grep for I2S/PCM.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Power Supply
 | 
				
			||||||
 | 
					See `/sys/class/power_supply/axp20x-ac`.
 | 
				
			||||||
 | 
					See `/sys/class/power_supply/axp20x-battery/{status,capacity}`.
 | 
				
			||||||
 | 
					Green LED if power is on.
 | 
				
			||||||
 | 
					Red LED if battery is charging.
 | 
				
			||||||
 | 
				
			|||||||
@ -46,6 +46,7 @@ in
 | 
				
			|||||||
      '';
 | 
					      '';
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    { name = "pinecube-ir-leds"; patch = ./kernel/0001-ARM-dts-sun8i-s3l-fix-Pinecube-IR-LEDs.patch; }
 | 
					    { name = "pinecube-ir-leds"; patch = ./kernel/0001-ARM-dts-sun8i-s3l-fix-Pinecube-IR-LEDs.patch; }
 | 
				
			||||||
 | 
					    { name = "pinecube-add-battery"; patch = ./kernel/0002-ARM-dts-sun8i-s3l-add-battery-power-supply-to-pinecu.patch; }
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  boot.extraModulePackages = [ config.boot.kernelPackages.rtl8189es ];
 | 
					  boot.extraModulePackages = [ config.boot.kernelPackages.rtl8189es ];
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,29 @@
 | 
				
			|||||||
 | 
					From 08043145ab7046e85339a9bd3221cc8ee53e64e5 Mon Sep 17 00:00:00 2001
 | 
				
			||||||
 | 
					From: Daniel Fullmer <danielrf12@gmail.com>
 | 
				
			||||||
 | 
					Date: Fri, 23 Oct 2020 16:05:10 -0700
 | 
				
			||||||
 | 
					Subject: [PATCH 2/2] ARM: dts: sun8i: s3l: add battery power supply to
 | 
				
			||||||
 | 
					 pinecube
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Signed-off-by: Daniel Fullmer <danielrf12@gmail.com>
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					 arch/arm/boot/dts/sun8i-s3-pinecube.dts | 4 ++++
 | 
				
			||||||
 | 
					 1 file changed, 4 insertions(+)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					diff --git a/arch/arm/boot/dts/sun8i-s3-pinecube.dts b/arch/arm/boot/dts/sun8i-s3-pinecube.dts
 | 
				
			||||||
 | 
					index a4adf52ef406..0319327dea3c 100644
 | 
				
			||||||
 | 
					--- a/arch/arm/boot/dts/sun8i-s3-pinecube.dts
 | 
				
			||||||
 | 
					+++ b/arch/arm/boot/dts/sun8i-s3-pinecube.dts
 | 
				
			||||||
 | 
					@@ -169,6 +169,10 @@ &ac_power_supply {
 | 
				
			||||||
 | 
					 	status = "okay";
 | 
				
			||||||
 | 
					 };
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					+&battery_power_supply {
 | 
				
			||||||
 | 
					+	status = "okay";
 | 
				
			||||||
 | 
					+};
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					 ®_dcdc2 {
 | 
				
			||||||
 | 
					 	regulator-always-on;
 | 
				
			||||||
 | 
					 	regulator-min-microvolt = <1250000>;
 | 
				
			||||||
 | 
					-- 
 | 
				
			||||||
 | 
					2.28.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user