Comments (13)
I was thinking something like
diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi
index 1a8ccd86c893..213d5baf2b90 100644
--- a/arch/arm/boot/dts/s5pv210-aries.dtsi
+++ b/arch/arm/boot/dts/s5pv210-aries.dtsi
@@ -415,3 +415,25 @@
&pwm {
samsung,pwm-outputs = <1>;
};
+
+&pmu_syscon {
+ compatible = "samsung-s5pv210-pmu", "simple-mfd", "syscon";
+
+ /* Write magic to INFORM5 to prevent charger on reboot */
+ reboot-mode {
+ compatible = "syscon-reboot-mode";
+ offset = <0x7014 /* INFORM5 */>;
+ mode-normal = <0x12345678>;
+ mode-recovery = <0x12345678>;
+ mode-bootloader = <0x12345678>;
+ };
+
+ /* Writes actual reboot code to INFORM6 */
+ reboot-mode {
+ compatible = "syscon-reboot-mode";
+ offset = <0x7018 /* INFORM6 */>;
+ mode-normal = <0x0>;
+ mode-recovery = <0x2>;
+ mode-bootloader = <0x4>;
+ };
+};
for the reboot mode notifier (don't know if you can stack up the reboot modes or not... this is totally untested)
from linux.
Rebooting functions by using xc-racer99@e94d34c
Still struggling with syscon-reboot-mode and syscon-poweroff to get parameters written to the INFORM registers/regular shutdown
from linux.
xc-racer99@b245a36 is functional for syscon poweroff support. Needs the following added to the defconfig
CONFIG_POWER_RESET=y
CONFIG_POWER_RESET_SYSCON_POWEROFF=y
I cannot seem to get syscon-reboot-mode to even probe, so I can't test if my code above works (yes, I have modified the defconfig for it)
from linux.
About syscon poweroff, i've applied it to for-upstream/aries-patches-v2 branch and when invoking shutdown, device is still showing logs on screen (last entry is "reboot: System halted").
Shouldn't power be turned off?
from linux.
Umm, what command are you using to shutdown? Running "shutdown now" on Debian gives the following
[ OK ] Reached target Shutdown.
systemd-shutdow: 19 output lines suppressed due to ratelimiting
systemd-shutdown[1]: Sending SIGTERM to remaining processes...
systemd-journald[1179]: Received SIGTERM from PID 1 (systemd-shutdow).
systemd-shutdown[1]: Sending SIGKILL to remaining processes...
systemd-shutdown[1]: Unmounting file systems.
systemd-shutdown[1]: Remounting '/' read-only with options ''.
EXT4-fs (mmcblk1p1): re-mounted. Opts:
systemd-shutdown[1]: Remounting '/' read-only with options ''.
EXT4-fs (mmcblk1p1): re-mounted. Opts:
systemd-shutdown[1]: All filesystems unmounted.
systemd-shutdown[1]: Deactivating swaps.
systemd-shutdown[1]: All swaps deactivated.
systemd-shutdown[1]: Detaching loop devices.
systemd-shutdown[1]: All loop devices detached.
rebo
when building from the for-upstream/aries-patches-v2 branch
from linux.
By just running shutdown. I can see in log message that board is halted, but screen is still working.
from linux.
Weird. Does just pushing the power button turn it on again?
Vendor kernel read from PS_HOLD_CONTROL and then writes it back, see https://github.com/xc-racer99/android_kernel_samsung_aries/blob/aosp-7.1/arch/arm/mach-s5pv210/mach-aries.c#L4326
For my variant, reading from PS_HOLD_CONTROL gave a value of 0x5301, but I used 0x5200 as that is what is in arch/arm/boot/dts/exynos-syscon-restart.dtsi - using the value of 0x5301 didn't work as the syscon driver won't write something to the register if it's already there.
You can play around with different values in u-boot using the command
mw.b 0xe010e81c 0x5301 1
from linux.
Without cable attached it's working fine (device/screen is powered off and booted by pressing button again after shutdown. Maybe it's related to unbrickable mod?
Sorry for problems.
from linux.
syscon poweroff was merged as part of Aries v2 patches; we still need to figure out why the S5P_SW_RESET doesn't work or else make adjusts to the watchdog driver so we can use it to reset as in the vendor kernel (and ported upstream in xc-racer99@e94d34c)
from linux.
It should be noted that when using the SD card SPL in u-boot, then S5P_SW_RESET works as one would expect.
from linux.
I think we can close this, the reason that the SW_RESET doesn't work is due to a mistake in the stock bootloader. For some reason it assumes that the memory will already be setup, while in fact it isn't.
from linux.
No dts changes needed? Till now only poweroff was merged.
from linux.
Yep, no DTS changes needed, it works as expected when using the WIP SPL branch of u-boot.
The SW_RESET hook is hard-coded in the s5pv210 common support at https://github.com/PabloPL/linux/blob/master/arch/arm/mach-s5pv210/s5pv210.c#L71
I suppose we could set the reboot-mode entries for configuring the bootloader, but there's no standard about this. We could either match the stock bootloader or else the midas config.
from linux.
Related Issues (20)
- Cpufreq support HOT 2
- Suspend to RAM HOT 11
- Aries patches v3 HOT 4
- gp2a HOT 9
- cpuidle support HOT 2
- Camera support HOT 4
- onenand support HOT 8
- max8998 RTC/interrupt issues HOT 2
- yas529 magnetometer
- DWC2 USB is broken HOT 5
- Branch with all known patches HOT 3
- Current kernel reboot once bcm firmware is in place. HOT 10
- SDHCI ADMA Error HOT 7
- PVR usabilty/stability on 5.9 HOT 5
- i9000b ISDB-T tuner HOT 7
- Display regression with 5.10 kernel HOT 3
- I porting mainline kernel found common clock framework is not work HOT 7
- when i select console on samsung soc serial port , it cant entry console HOT 6
- exynos7420 HOT 3
- exynos7580 - j7elte device request
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linux.