[PATCH 11/10] fixup! regulator: add driver for stpmic1-regulators

2019-11-05 Thread Ahmad Fatoum
Deletes uneeded left-over code. Some headers/structs were duplicate or unneeded. Signed-off-by: Ahmad Fatoum --- drivers/regulator/stpmic1_regulator.c | 18 +- include/linux/mfd/stpmic1.h | 13 - 2 files changed, 1 insertion(+), 30 deletions(-) diff --git

[PATCH 06/10] mfd: stpmic1: use dev_get_regmap instead of priv member

2019-11-05 Thread Ahmad Fatoum
When we call regmap_init, the regmap is associated with the device supplied and can be queried with dev_get_regmap. This is more natural than expecting cell drivers to cast dev->parent->priv. Do it. Signed-off-by: Ahmad Fatoum --- drivers/mfd/stpmic1.c | 1 -

[PATCH 03/10] regulator: copy upstream struct regulator_desc documentation

2019-11-05 Thread Ahmad Fatoum
This imports the regulator_desc documentation for the fields barebox uses out of Linux v5.4-rc1. Signed-off-by: Ahmad Fatoum --- include/regulator.h | 28 1 file changed, 28 insertions(+) diff --git a/include/regulator.h b/include/regulator.h index

[PATCH 10/10] Revert "ARM: dts: stm32mp157a-dk1: overwrite regulator for sdmmc node"

2019-11-05 Thread Ahmad Fatoum
We now have a regulator driver for the stpmic1, so no need to replace the stpmic1 v3v3 regulator with a fixed regulator. This reverts commit 911978ec7b7c05c6456e714edf1082785ab2191c. Signed-off-by: Ahmad Fatoum --- arch/arm/dts/stm32mp157a-dk1.dtsi | 13 - 1 file changed, 13

[PATCH 04/10] regulator: port Linux of_regulator_match

2019-11-05 Thread Ahmad Fatoum
Linux regulator drivers like the pfuze and the incoming stpmic make use of of_regulator_match to parse regulator init data from the device tree. Port the function over from Linux v5.3, so drivers depending on it can follow. As we have no use in barebox for power saving and suspend states, these

[PATCH 07/10] regulator: add driver for stpmic1-regulators

2019-11-05 Thread Ahmad Fatoum
This commit imports the Linux v5.3 state of the driver. This allows us to regulate at least the v3v3 voltage rail used by the DK1 and DK2 Ethernet PHY and SD-Card. Eventually, this driver should be used by the USB host driver to supply the vbus voltage as well. Signed-off-by: Oleksij Rempel

[PATCH 02/10] commands: regulator: add support for enabling/disabling regulators

2019-11-05 Thread Ahmad Fatoum
For testing regulator drivers, it can be handy to enable/disable them from the shell prompt. Extend the regulator command to support this. Signed-off-by: Ahmad Fatoum --- drivers/regulator/core.c | 67 +++- 1 file changed, 60 insertions(+), 7 deletions(-)

[PATCH 08/10] ARM: dts: stm32mp157a-dk1: remove unnecessary sram node

2019-11-05 Thread Ahmad Fatoum
This node has so far been unused and is a remnant from when the stm32mp device drivers weren't completely upstream yet. Drop the node. Signed-off-by: Ahmad Fatoum --- arch/arm/dts/stm32mp157a-dk1.dtsi | 13 - 1 file changed, 13 deletions(-) diff --git

[PATCH 09/10] ARM: stm32mp: enable STPMIC1 MFD and cell drivers

2019-11-05 Thread Ahmad Fatoum
The STPMIC1 is the ST Microelectronics PMIC designed for use with STM32MP. Enable it and its cell drivers by default in the defconfig. Signed-off-by: Ahmad Fatoum --- arch/arm/configs/stm32mp_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/configs/stm32mp_defconfig

[PATCH 01/10] commands: regulator: move implementation to regulator core

2019-11-05 Thread Ahmad Fatoum
In preparation for teaching the regulator command how to enable and disable regulators, move the regulator command implementation to the regulator core, so the internal interfaces for iterating through the list of available regulators can be more easily used. Signed-off-by: Ahmad Fatoum ---

[PATCH 05/10] regulator: import linear voltage range helpers

2019-11-05 Thread Ahmad Fatoum
The incoming stpmic1 regulator driver makes use of these helpers internally. Thus port them out of Linux v5.3. Signed-off-by: Oleksij Rempel Signed-off-by: Ahmad Fatoum --- drivers/regulator/helpers.c | 186 include/regulator.h | 46 + 2

[PATCH 1/7] misc: psci: translate PSCI error codes in smc command

2019-11-05 Thread Ahmad Fatoum
For more usability, translate CPU_ON error codes into the error descriptions found in the PSCI Platform Design Document[1]. [1]: http://infocenter.arm.com/help/topic/com.arm.doc.den0022d/Power_State_Coordination_Interface_PDD_v1_1_DEN0022D.pdf Signed-off-by: Ahmad Fatoum ---

[PATCH 6/7] ARM: stm32mp: select ARM_USE_COMPRESSED_DTB for the whole arch

2019-11-05 Thread Ahmad Fatoum
We'll probably be using compressed DTBs for all new boards as well, thus move the ARM_USE_COMPRESSED_DTB, so it's always selected for STM32MP. Signed-off-by: Ahmad Fatoum --- arch/arm/Kconfig | 1 + arch/arm/mach-stm32mp/Kconfig | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)

[PATCH 2/7] ARM: psci: use CONFIG_ARM_PSCI_DEBUG for smc command

2019-11-05 Thread Ahmad Fatoum
There's already an option to use when debugging PSCI. Instead of requiring users to #define DEBUG 1 as well, have the smc command be usable when CONFIG_ARM_PSCI_DEBUG, not DEBUG is defined. Signed-off-by: Ahmad Fatoum --- arch/arm/cpu/psci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 7/7] ARM: dts: stm32mp: report psci v0.2 at least

2019-11-05 Thread Ahmad Fatoum
ARM TF-A reports compatibility with PSCI v1.1 since v1.5. Upstream ARM TF-A support for STM32MP was introduced with v1.6. It's thus safe to assume that the STM32MP barebox will never have to interact with a secure monitor implementing PSCI v0.1. Overwrite the psci device tree compatible to

[PATCH 3/7] psci: wire in smc command help

2019-11-05 Thread Ahmad Fatoum
The smc command has a help defined, but unused. Wire it in, so help smc and smc -invalidoption work as expected. While at it, remove the unimplemented -z option. It's unneeded, because -c turns off the CPU after starting it again already. Also it seems it's not implementable without

[PATCH 5/7] misc: implement PSCI system reset driver

2019-11-05 Thread Ahmad Fatoum
In cases where firmware provides PSCI >0.1, it may be prudent to use it as backend for reset and poweroff. This driver accomplishes this. Signed-off-by: Ahmad Fatoum --- drivers/misc/Kconfig | 5 +++ drivers/misc/Makefile| 1 + drivers/misc/psci-sysreset.c | 62

Re: [PATCH v2 2/4] watchdog: implement generic support for .running device parameter

2019-11-05 Thread Sascha Hauer
On Tue, Nov 05, 2019 at 12:10:51PM +0100, Ahmad Fatoum wrote: > On 11/5/19 11:46 AM, Ahmad Fatoum wrote: > > Hi, > > > > On 11/5/19 11:40 AM, Sascha Hauer wrote: > >> When we just started the watchdog we actually know that it is running, > >> so we could support the parameter for all watchdogs

Re: [PATCH v2 2/4] watchdog: implement generic support for .running device parameter

2019-11-05 Thread Ahmad Fatoum
On 11/5/19 11:46 AM, Ahmad Fatoum wrote: > Hi, > > On 11/5/19 11:40 AM, Sascha Hauer wrote: >> When we just started the watchdog we actually know that it is running, >> so we could support the parameter for all watchdogs once it's started. I'll do this. >> Casting p->value to (struct watchdog

Re: [PATCH v2 2/4] watchdog: implement generic support for .running device parameter

2019-11-05 Thread Sascha Hauer
On Tue, Nov 05, 2019 at 11:46:18AM +0100, Ahmad Fatoum wrote: > Hi, > > On 11/5/19 11:40 AM, Sascha Hauer wrote: > > Hi Ahmad, > > > > On Mon, Nov 04, 2019 at 11:14:05PM +0100, Ahmad Fatoum wrote: > >> Linux watchdog have an optional WDOG_HW_RUNNING bit that is used in > >> conjunction with

Re: [PATCH v2 2/4] watchdog: implement generic support for .running device parameter

2019-11-05 Thread Ahmad Fatoum
Hi, On 11/5/19 11:40 AM, Sascha Hauer wrote: > Hi Ahmad, > > On Mon, Nov 04, 2019 at 11:14:05PM +0100, Ahmad Fatoum wrote: >> Linux watchdog have an optional WDOG_HW_RUNNING bit that is used in >> conjunction with CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED to automatically >> ping running watchdogs

Re: [PATCH v2 2/4] watchdog: implement generic support for .running device parameter

2019-11-05 Thread Sascha Hauer
Hi Ahmad, On Mon, Nov 04, 2019 at 11:14:05PM +0100, Ahmad Fatoum wrote: > Linux watchdog have an optional WDOG_HW_RUNNING bit that is used in > conjunction with CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED to automatically > ping running watchdogs until userspace takes over. > > So far, when we ported

Re: [PATCH] param: drop unused parameters in helpers

2019-11-05 Thread Sascha Hauer
On Mon, Nov 04, 2019 at 06:04:18PM +0100, Ahmad Fatoum wrote: > These parameters aren't currently used anywhere, but are still useful to > have nonetheless. Keep them but drop the unused parameters. > > Signed-off-by: Ahmad Fatoum > --- > include/param.h | 6 +- > 1 file changed, 1

Re: [PATCH v2 2/2] mfd: da9063: fix watchdog ping execution

2019-11-05 Thread Sascha Hauer
On Mon, Nov 04, 2019 at 11:28:06AM +0100, Marco Felsch wrote: > The watchdog resets the system if the watchdog gets pinged to fast. > Between each watchdog ping must be a pause of at least 200ms. This > commit fixes that by rejecting two fast requests. > > Signed-off-by: Marco Felsch > --- > @@