Switch to generic syscon regmap based drivers
Alim Akhtar
reviewerv3 cover Switch to generic syscon regmap based drivers
Now we have a nice way to reboot/poweroff system using a generic syscon regmap based drivers, this series moves exynos SoCs to make use of the same.
Changes since v2:
* Merged patch 5 and 6 to keep git bisect happy
Changes since v1:
* Added a comment about the register information
* Droped defconfig changes as disscussed
* Collected various Reviewed-by, Tested-by and Acked-by tags
* Added SYSCON-{RESET, POWEROFF} to select from Kconfig
Alim Akhtar (5):
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
ARM: exynos: select POWER_RESET_SYSCON and
POWER_RESET_SYSCON_POWEROFF
arch/arm/boot/dts/exynos3250.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos4.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5410.dtsi | 14 ++++++++++++ arch/arm/mach-exynos/Kconfig | 3 +++ arch/arm/mach-exynos/pmu.c | 43 ------------------------------------- 6 files changed, 59 insertions(+), 43 deletions(-)
Signature · 1 line
1.7.10.4
Alim Akhtar
reviewerPATCH v3 1/5 arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
This patch adds syscon-{reboot, poweroff} nodes to allow the generic syscon-{reboot, poweroff} driver to reset/poweroff exynos3250 SoC.
--- arch/arm/boot/dts/exynos3250.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/exynos3250.dtsi +14 -0
@@ -152,6 +152,20 @@ interrupt-parent = <&gic>; }; + poweroff: syscon-poweroff { + compatible = "syscon-poweroff"; + regmap = <&pmu_system_controller>; + offset = <0x330C>; /* PS_HOLD_CONTROL */ + mask = <0x5200>; /* Reset value */ + }; + + reboot: syscon-reboot { + compatible = "syscon-reboot"; + regmap = <&pmu_system_controller>; + offset = <0x0400>; /* SWRESET */ + mask = <0x1>; + }; + mipi_phy: video-phy at 10020710 { compatible = "samsung,s5pv210-mipi-video-phy"; #phy-cells = <1>;
Signature · 1 line
1.7.10.4
Alim Akhtar
reviewerPATCH v3 2/5 arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
In reply to Alim AkhtarThis patch adds syscon-{reboot, poweroff} nodes to allow the generic syscon-{reboot, poweroff} driver to reset/poweroff exynos4 SoC.
--- arch/arm/boot/dts/exynos4.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/exynos4.dtsi +14 -0
@@ -158,6 +158,20 @@ interrupt-parent = <&gic>; }; + poweroff: syscon-poweroff { + compatible = "syscon-poweroff"; + regmap = <&pmu_system_controller>; + offset = <0x330C>; /* PS_HOLD_CONTROL */ + mask = <0x5200>; /* reset value */ + }; + + reboot: syscon-reboot { + compatible = "syscon-reboot"; + regmap = <&pmu_system_controller>; + offset = <0x0400>; /* SWRESET */ + mask = <0x1>; + }; + dsi_0: dsi at 11C80000 { compatible = "samsung,exynos4210-mipi-dsi"; reg = <0x11C80000 0x10000>;
Signature · 1 line
1.7.10.4
Alim Akhtar
reviewerPATCH v3 3/5 arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
In reply to Alim AkhtarThis patch adds syscon-{reboot, poweroff} nodes to allow the generic syscon-{reboot, poweroff} driver to reset/poweroff exynos5 SoCs.
--- arch/arm/boot/dts/exynos5.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/exynos5.dtsi +14 -0
@@ -88,6 +88,20 @@ status = "disabled"; }; + poweroff: syscon-poweroff { + compatible = "syscon-poweroff"; + regmap = <&pmu_system_controller>; + offset = <0x330C>; /* PS_HOLD_CONTROL */ + mask = <0x5200>; /* reset value */ + }; + + reboot: syscon-reboot { + compatible = "syscon-reboot"; + regmap = <&pmu_system_controller>; + offset = <0x0400>; /* SWRESET */ + mask = <0x1>; + }; + fimd: fimd at 14400000 { compatible = "samsung,exynos5250-fimd"; interrupt-parent = <&combiner>;
Signature · 1 line
1.7.10.4
Alim Akhtar
reviewerPATCH v3 4/5 arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
In reply to Alim AkhtarThis patch adds syscon-{reboot, poweroff} nodes to allow the generic syscon-{reboot, poweroff} driver to reset/poweroff exynos5410 SoC.
--- arch/arm/boot/dts/exynos5410.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/exynos5410.dtsi +14 -0
@@ -102,6 +102,20 @@ reg = <0x10040000 0x5000>; }; + poweroff: syscon-poweroff { + compatible = "syscon-poweroff"; + regmap = <&pmu_system_controller>; + offset = <0x330C>; /* PS_HOLD_CONTROL */ + mask = <0x5200>; /* reset value */ + }; + + reboot: syscon-reboot { + compatible = "syscon-reboot"; + regmap = <&pmu_system_controller>; + offset = <0x0400>; /* SWRESET */ + mask = <0x1>; + }; + mct: mct at 101C0000 { compatible = "samsung,exynos4210-mct"; reg = <0x101C0000 0xB00>;
Signature · 1 line
1.7.10.4
Alim Akhtar
reviewerPATCH v3 5/5 ARM: exynos: select POWER_RESET_SYSCON and POWER_RESET_SYSCON_POWEROFF
In reply to Alim AkhtarSince we switch to use generic syscon regmap based reset/poweroff driver for exynos SoC, lets select it from ARCH_EXYNOS instead of enabling it from various defconfigs. This also select POWER_RESET as SYSCON-{reset, poweroff} drivers depends on it.
Also because of the above changes we don't need special handling for reboot/poweroff in exynos pmu driver. This patch also removes the same from exynos pmu driver to keep git bisect working.
Note: This will break reboot/poweroff on boards with older dtbs with a newer kernel.
--- arch/arm/mach-exynos/Kconfig | 3 +++ arch/arm/mach-exynos/pmu.c | 43 ------------------------------------------ 2 files changed, 3 insertions(+), 43 deletions(-)
arch/arm/mach-exynos/Kconfig +3 -0
@@ -27,6 +27,9 @@ menuconfig ARCH_EXYNOS select SRAM select THERMAL select MFD_SYSCON + select POWER_RESET + select POWER_RESET_SYSCON + select POWER_RESET_SYSCON_POWEROFF help Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)
arch/arm/mach-exynos/pmu.c +0 -43
78 lines not on this page · raw message
Signature · 1 line
1.7.10.4
Krzysztof Kozlowski
AppliedPATCH v3 5/5 ARM: exynos: select POWER_RESET_SYSCON and POWER_RESET_SYSCON_POWEROFF
Quoted 12 lines · Alim Akhtar
Since we switch to use generic syscon regmap based reset/poweroff driver for exynos SoC, lets select it from
ARCH_EXYNOSinstead of enabling it from various defconfigs. This also selectPOWER_RESETas SYSCON-{reset, poweroff} drivers depends on it.Also because of the above changes we don't need special handling for reboot/poweroff in exynos pmu driver. This patch also removes the same from exynos pmu driver to keep git bisect working.
Note: This will break reboot/poweroff on boards with older dtbs with a newer kernel.
Quoted 8 lines
Signed-off-by Alim Akhtar <[email protected]>Reviewed-by Javier Martinez Canillas <[email protected]>Acked-by Moritz Fischer <[email protected]>--- arch/arm/mach-exynos/Kconfig | 3 +++ arch/arm/mach-exynos/pmu.c | 43 ------------------------------------------ 2 files changed, 3 insertions(+), 43 deletions(-)
Thanks, applied with different title:
"ARM: EXYNOS: Switch to syscon reboot and poweroff"
https://git.kernel.org/cgit/linux/kernel/git/krzk/linux.git/log/?h=next/soc
I'll be pushing this to Kukjin for v4.5 (unless he picks it by himself).
Best regards,
Krzysztof
PATCH v3 5/5 ARM: exynos: select POWER_RESET_SYSCON and POWER_RESET_SYSCON_POWEROFF
In reply to Alim AkhtarHello!
Tested it on top of 4.4-rc3.
arch/arm/mach-exynos/Kconfig menuconfig ARCH_EXYNOS · line 32
Quoted 11 lines
arch/arm/mach-exynos/Kconfig +3
-0@@ -27,6 +27,9 @@ menuconfig ARCH_EXYNOS select SRAM select THERMAL select MFD_SYSCON + select POWER_RESET + select POWER_RESET_SYSCON + select POWER_RESET_SYSCON_POWEROFF
"select POWER_SUPPLY" is missing here. Without is we get:
--- cut ---
warning: (ARCH_HISI && ARCH_INTEGRATOR && ARCH_EXYNOS && ARCH_VEXPRESS && REALVIEW_DT) selects POWER_RESET which has unmet direct dependencies (POWER_SUPPLY)
warning: (ARCH_EXYNOS) selects POWER_RESET_SYSCON which has unmet direct dependencies (POWER_SUPPLY && POWER_RESET && OF)
warning: (ARCH_EXYNOS) selects POWER_RESET_SYSCON_POWEROFF which has unmet direct dependencies (POWER_SUPPLY && POWER_RESET && OF) --- cut ---
arch/arm/mach-exynos/Kconfig menuconfig ARCH_EXYNOS · line 34
Quoted 2 lines
arch/arm/mach-exynos/Kconfig +0
-0help Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)
Otherwise works fine.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
PATCH v3 5/5 ARM: exynos: select POWER_RESET_SYSCON and POWER_RESET_SYSCON_POWEROFF
Quoted 24 lines · Pavel Fedin
Hello!
Tested it on top of 4.4-rc3.
arch/arm/mach-exynos/Kconfig menuconfig ARCH_EXYNOS · line 32
Quoted 11 lines
arch/arm/mach-exynos/Kconfig +3
-0@@ -27,6 +27,9 @@ menuconfig ARCH_EXYNOS select SRAM select THERMAL select MFD_SYSCON + select POWER_RESET + select POWER_RESET_SYSCON + select POWER_RESET_SYSCON_POWEROFF"select
POWER_SUPPLY" is missing here. Without is we get:
--- cut ---
warning: (ARCH_HISI&&ARCH_INTEGRATOR&&ARCH_EXYNOS&&ARCH_VEXPRESS&&REALVIEW_DT) selectsPOWER_RESETwhich has unmet direct dependencies (POWER_SUPPLY)
warning: (ARCH_EXYNOS) selectsPOWER_RESET_SYSCONwhich has unmet direct dependencies (POWER_SUPPLY&&POWER_RESET&& OF)
warning: (ARCH_EXYNOS) selectsPOWER_RESET_SYSCON_POWEROFFwhich has unmet direct dependencies (POWER_SUPPLY&&POWER_RESET&& OF) --- cut ---
Quoted 6 lines
arch/arm/mach-exynos/Kconfig menuconfig ARCH_EXYNOS · line 34
Quoted 2 lines
arch/arm/mach-exynos/Kconfig +0
-0help Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)Otherwise works fine.
Tested-by Pavel Fedin <[email protected]>
Testing was a little bit too late (late not only looking at date of v1 and v2 but even for v3)... I appreciate it but I applied it already and in fact I sent a pull request with it.
Actually the proper fix I think is to remove the dependency between POWER_RESET and POWER_SUPPLY.
Best regards,
Krzysztof