The following series fixes som issues in the STM32 gpio driver
---
Benjamin Tietz (3):
stm32: gpio: fix otype access
stm32: gpio_direction_output: make sure, output is set to push-pull
stm32: gpio_get_value: always return 0 or 1
drivers/gpio/stm32_gpio.c |5 +++--
1 file
otherwise, the output type is uninitialized
---
drivers/gpio/stm32_gpio.c |1 +
1 file changed, 1 insertion(+)
otherwise, the output type is uninitialized
---
drivers/gpio/stm32_gpio.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/stm32_gpio.c b/drivers/gpio/stm32_gpio.c
the GPIOx_OTYPER register has only one bit for every pin.
---
drivers/gpio/stm32_gpio.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
the GPIOx_OTYPER register has only one bit for every pin.
---
drivers/gpio/stm32_gpio.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -
Previously, a set gpio had returned any power of 2. Some function check for 1
explicitly.
---
drivers/gpio/stm32_gpio.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Previously, a set gpio had returned any power of 2. Some function check for 1
explicitly.
---
drivers/gpio/stm32_gpio.
otherwise, the output type is uninitialized
---
drivers/gpio/stm32_gpio.c |1 +
1 file changed, 1 insertion(+)
otherwise, the output type is uninitialized
---
drivers/gpio/stm32_gpio.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/stm32_gpio.c b/drivers/gpio/stm32_gpio.c
mmand gets rewritten and extended for device-tree LEDs
on the way. These changes are architecture indipendent.
To accomplish these changes the led-uclass driver had to be extended, too.
The first three (bugfix-)patches had already been sent to list, but hadn't
received any reply, yet.
---
Benj
the GPIOx_OTYPER register has only one bit for every pin.
---
drivers/gpio/stm32_gpio.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
the GPIOx_OTYPER register has only one bit for every pin.
---
drivers/gpio/stm32_gpio.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -
Previously, a set gpio had returned any power of 2. Some function check for 1
explicitly.
---
drivers/gpio/stm32_gpio.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Previously, a set gpio had returned any power of 2. Some function check for 1
explicitly.
---
drivers/gpio/stm32_gpio.
From: Benjamin Tietz
---
include/configs/stm32f429-discovery.h |8
1 file changed, 8 insertions(+)
From: Benjamin Tietz
---
include/configs/stm32f429-discovery.h |8
1 file changed, 8 insertions(+)
diff --git a/include/configs/stm32f429-discovery.h
b/include
From: Benjamin Tietz
---
arch/arm/dts/Makefile|2
arch/arm/dts/armv7-m.dtsi| 24 +
arch/arm/dts/stm32429i-eval.dts | 75 +++
arch/arm/dts/stm32f429-disco.dts | 75 +++
arch/arm/dts/stm32f429.dtsi | 190
From: Benjamin Tietz
---
drivers/clk/clk-uclass.c | 10 ++
include/clk.h| 18 ++
2 files changed, 28 insertions(+)
From: Benjamin Tietz
---
drivers/clk/clk-uclass.c | 10 ++
include/clk.h| 18 ++
2 files
From: Benjamin Tietz
---
cmd/Kconfig |4
1 file changed, 4 insertions(+)
From: Benjamin Tietz
---
cmd/Kconfig |4
1 file changed, 4 insertions(+)
diff --git a/cmd/Kconfig b/cmd/Kconfig
index d51645c..f49ff47 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -421,6 +421,10
From: Benjamin Tietz
---
cmd/Kconfig |5 +
1 file changed, 5 insertions(+)
From: Benjamin Tietz
---
cmd/Kconfig |5 +
1 file changed, 5 insertions(+)
diff --git a/cmd/Kconfig b/cmd/Kconfig
index f49ff47..ec9d6ed 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -124,6 +124,11
From: Benjamin Tietz
---
drivers/clk/Kconfig |4 ++
drivers/clk/Makefile|1
drivers/clk/clk_stm32.c | 112 +++
3 files changed, 117 insertions(+)
create mode 100644 drivers/clk/clk_stm32.c
From: Benjamin Tietz
---
drivers/clk
From: Benjamin Tietz
---
drivers/gpio/stm32_gpio.c | 66 +++--
1 file changed, 34 insertions(+), 32 deletions(-)
From: Benjamin Tietz
---
drivers/gpio/stm32_gpio.c | 66 +++--
1 file changed, 34 insertions
From: Benjamin Tietz
---
arch/arm/dts/stm32f429.dtsi | 92 +++
1 file changed, 92 insertions(+)
From: Benjamin Tietz
---
arch/arm/dts/stm32f429.dtsi | 92 +++
1 file changed, 92 insertions(+)
diff --git a
From: Benjamin Tietz
will bind as a gpio-driver, if DM_GPIO was selected. Defaults to the old
behaviour.
---
drivers/gpio/stm32_gpio.c | 133 +
1 file changed, 133 insertions(+)
From: Benjamin Tietz
will bind as a gpio-driver, if DM_GPIO was
From: Benjamin Tietz
---
drivers/misc/gpio_led.c |4
drivers/misc/status_led.c |2 ++
include/status_led.h |4
3 files changed, 10 insertions(+)
From: Benjamin Tietz
---
drivers/misc/gpio_led.c |4
drivers/misc/status_led.c |2 ++
include
From: Benjamin Tietz
If the device-tree gpio selection is selected, the board-specific
led-initialization will fail.
---
board/st/stm32f429-discovery/Makefile |3 +++
include/configs/stm32f429-discovery.h | 10 +++---
2 files changed, 10 insertions(+), 3 deletions(-)
From: Benjamin
From: Benjamin Tietz
Previously, all knwon LED were hold in a single array and computed at
compile-time.
With the new variant, if all LEDs are known, these will also be computed at
compile-time.
Using functions will allow additional dynamic (eg. DM-based) LED allocation.
Apart from that, the
From: Benjamin Tietz
---
drivers/led/led-uclass.c | 10 ++
include/led.h| 18 ++
2 files changed, 28 insertions(+)
From: Benjamin Tietz
---
drivers/led/led-uclass.c | 10 ++
include/led.h| 18 ++
2 files
From: Benjamin Tietz
---
drivers/led/led-uclass.c | 53 ++
include/led.h| 18
2 files changed, 71 insertions(+)
From: Benjamin Tietz
---
drivers/led/led-uclass.c | 53
From: Benjamin Tietz
---
cmd/led.c | 53 -
1 file changed, 52 insertions(+), 1 deletion(-)
From: Benjamin Tietz
---
cmd/led.c | 53 -
1 file changed, 52 insertions(+), 1 deletion
From: Benjamin Tietz
---
arch/arm/dts/stm32f429-disco.dts | 22 ++
1 file changed, 22 insertions(+)
From: Benjamin Tietz
---
arch/arm/dts/stm32f429-disco.dts | 22 ++
1 file changed, 22 insertions(+)
diff --git a/arch/arm/dts/stm32f429-disco.dts
From: Benjamin Tietz
---
drivers/led/led-uclass.c |6 ++
include/led.h|8
2 files changed, 14 insertions(+)
From: Benjamin Tietz
---
drivers/led/led-uclass.c |6 ++
include/led.h|8
2 files changed, 14 insertions(+)
diff
From: Benjamin Tietz
---
drivers/led/led_gpio.c | 11 +++
1 file changed, 11 insertions(+)
From: Benjamin Tietz
---
drivers/led/led_gpio.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/drivers/led/led_gpio.c b/drivers/led/led_gpio.c
index cb6e996..80e0f72
From: Benjamin Tietz
if not supported directly by the driver, the led will be toggled by calling
led_set_on(!led_get_on()), transparently.
---
drivers/led/led-uclass.c | 14 ++
include/led.h| 21 +
2 files changed, 35 insertions(+)
From: Benjamin
From: Benjamin Tietz
---
cmd/led.c | 10 ++
1 file changed, 10 insertions(+)
From: Benjamin Tietz
---
cmd/led.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/cmd/led.c b/cmd/led.c
index 99358c6..3728d30 100644
--- a/cmd/led.c
+++ b/cmd/led.c
@@ -195,11 +195,21
ments
---
Benjamin Tietz (22):
stm32: gpio: fix otype access
stm32: gpio_direction_output: make sure, output is set to push-pull
stm32: gpio_get_value: always return 0 or 1
stm32f429-discovery: config: enable status leds
Cmd: led: provide a selector in kconfig
DTS: stm3
Previously the bit for settting the pin-behaviour was left undefined, which may
result in an open-drain behaviour for the affected pin.
Now it is correctly initialized, always.
---
drivers/gpio/stm32_gpio.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/stm32_gpio.c b/drivers
Since the GPIOx_OTYPER register has only one bit for every pin, the width and
shift has to be corrected.
---
drivers/gpio/stm32_gpio.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/stm32_gpio.c b/drivers/gpio/stm32_gpio.c
index 50f86d3..2457211 100644
--- a/d
Some functions using the GPIO-interface depend on gpio_get_value to
return 0 or 1, while the stm32 driver returned 0 or "something not zero".
This patch corrects this behaviour.
---
drivers/gpio/stm32_gpio.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/stm32_
From: Benjamin Tietz
This patch creates an entry for selecting the led command from
kconfig configuration.
---
cmd/Kconfig |4
1 file changed, 4 insertions(+)
diff --git a/cmd/Kconfig b/cmd/Kconfig
index d51645c..f49ff47 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -421,6 +421,10
From: Benjamin Tietz
This enables and adds configuration for status-leds on the
STM32F429 discovery board.
---
include/configs/stm32f429-discovery.h |8
1 file changed, 8 insertions(+)
diff --git a/include/configs/stm32f429-discovery.h
b/include/configs/stm32f429-discovery.h
From: Benjamin Tietz
Currently, clocks can be enabled, only. To be feature-complete - and allow
a bit of power-saving in applications - disabling a clock should be
possible, too.
This extend the API of the DM clock driver to allow a clock to be disabled.
The corresponding operation is optional
From: Benjamin Tietz
This implements an basic clock driver for the RCC-part of STM32 MCUs.
Currently, only enabling and disabling of peripheral clocks and retrieving main
frequency is implemented.
---
drivers/clk/Kconfig |4 ++
drivers/clk/Makefile|1
drivers/clk/clk_stm32.c
From: Benjamin Tietz
This patch adds the DTS configuration files needed for the
STM32F429-Discovery board, as they can be found in a current
Linux Kernel.
---
arch/arm/dts/Makefile|2
arch/arm/dts/armv7-m.dtsi| 24 +
arch/arm/dts/stm32429i-eval.dts | 75
From: Benjamin Tietz
If CONFIG_DM_GPIO is enabled, the STM32 SOC GPIO driver will switch it's
behaviour
from implementing the gpio_*() interface directly to provide a gpio-device.
---
drivers/gpio/stm32_gpio.c | 133 +
1 file changed, 133 inser
From: Benjamin Tietz
This adds all GPIO-banks known by the STM32F4 MCU to the corresponding
.dts-file. Those not available in the the TQFP-package are currently
disabled.
---
arch/arm/dts/stm32f429.dtsi | 92 +++
1 file changed, 92 insertions(+)
diff
From: Benjamin Tietz
In the STM32 gpio driver, multiple family-dependent sections existed.
All but one just statically filled a datastructure. The following patch
creates these structure const-static within a single family-dependent
section.
This seperation improves the maintainability for
From: Benjamin Tietz
If STATUS_LED isn't selected, neither led_id_t is selected, nor STATUS_LED_ON.
The following will set led_id_t to a reasonable default and define
STATUS_LED_ON for that case.
---
drivers/misc/gpio_led.c |4
drivers/misc/status_led.c |2 ++
in
From: Benjamin Tietz
The following adds the configuration of the user-leds to the device tree for
STM32F429 discovery board.
---
arch/arm/dts/stm32f429-disco.dts | 22 ++
1 file changed, 22 insertions(+)
diff --git a/arch/arm/dts/stm32f429-disco.dts b/arch/arm/dts
From: Benjamin Tietz
This extends the API of the led-driver to retrieve the label of and led-device.
---
drivers/led/led-uclass.c |6 ++
include/led.h|8
2 files changed, 14 insertions(+)
diff --git a/drivers/led/led-uclass.c b/drivers/led/led-uclass.c
index
From: Benjamin Tietz
This extends the API of the LED-driver to count the number
of configured LEDs and retrieving an array of them.
---
drivers/led/led-uclass.c | 53 ++
include/led.h| 18
2 files changed, 71
From: Benjamin Tietz
Make the LED command aware of device-tree configured LEDs, using the new
LED API calls.
---
cmd/led.c | 53 -
1 file changed, 52 insertions(+), 1 deletion(-)
diff --git a/cmd/led.c b/cmd/led.c
index 5295a6e..7632074
From: Benjamin Tietz
Previously, all knwon LED were hold in a single array and computed at
compile-time.
With the new variant, if all LEDs are known, these will also be computed at
compile-time.
Using functions will allow additional dynamic (eg. DM-based) LED allocation.
Apart from that, the
From: Benjamin Tietz
This extends the LED-API for retrieving the current state a LED is in.
This needs corresponding support by the underlying device, but provides a way
to check, wether an LED is on or off.
---
drivers/led/led-uclass.c | 10 ++
include/led.h| 18
From: Benjamin Tietz
Add the code needed for retrieving the led-status to the generic led-gpio
driver.
---
drivers/led/led_gpio.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/drivers/led/led_gpio.c b/drivers/led/led_gpio.c
index cb6e996..80e0f72 100644
--- a/drivers/led
From: Benjamin Tietz
Support toggling of LEDs in the led command for device-tree configured LEDs.
---
cmd/led.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/cmd/led.c b/cmd/led.c
index 7632074..217ec5a 100644
--- a/cmd/led.c
+++ b/cmd/led.c
@@ -198,11 +198,21 @@ static void
From: Benjamin Tietz
Extend the LED API to support toggling an LED. If the device provides a
direct way for this, it can implement the corresponding op.
If not supported directly by the driver, the led will be toggled by calling
led_set_on(!led_get_on()), transparently.
---
drivers/led/led
From: Benjamin Tietz
If the device-tree gpio selection is selected, the hardcoded board-specific
led-initialization will fail.
This will disable that code, if CONFIG_DM_GPIO is enabled.
---
board/st/stm32f429-discovery/Makefile |3 +++
include/configs/stm32f429-discovery.h | 10
e-bus class, /clocks is
ignored completely, Because of that, the crystal isn't detected, too.
If I move the crystal into the /soc branch, it is found and can be
referenced.
Poking through the code I haven't yet found the reason, why soc is
initialized as simple-bus and cloc
Hi Simon,
On Tue, Jun 21, 2016 at 08:50:11PM -0600, Simon Glass wrote:
> Hi Benjamin,
>
> On 20 June 2016 at 12:42, Benjamin Tietz wrote:
> >
> > Hello,
> >
> > in my device-tree (for stm32f429 - as found in the linux kernel) exist
> > two branches /s
ce for stm32.
>
> Cheers,
> Vikas
>
> > -Original Message-
> > From: Vikas MANOCHA
> > Sent: Friday, July 01, 2016 4:35 PM
> > To: 'Benjamin Tietz' ; u-
> > b...@lists.denx.de
> > Subject: RE: [U-Boot] [PATCH 2 00/22] DM: Cmd: GP
Hi Simon,
On Tue, Jul 12, 2016 at 10:02:43AM -0600, Simon Glass wrote:
> +Stephen
>
> Hi Benjamin,
>
> On 20 June 2016 at 12:26, Benjamin Tietz wrote:
> > From: Benjamin Tietz
> >
> > Currently, clocks can be enabled, only. To be feature-complete - and a
Hello Vikas, hello Simon,
the new clk-API leaves me with a problem. Previously there was a
seperate way to access the clock-device itself (using clk_[gs]et_rate) and
the peripherals connected (clk_[gs]et_periph_rate). The former case now isn't
available no more. But the system clock in STM32 doesn
17 than could represent the individual PLLs directly.
regards
Benjamin
On Thu, Jul 28, 2016 at 09:28:09PM +0200, Benjamin Tietz wrote:
> Hello Vikas, hello Simon,
>
> the new clk-API leaves me with a problem. Previously there was a
> seperate way to access the clock-device itself (using
Hello Stephen,
On Fri, Jul 29, 2016 at 10:04:56AM -0600, Stephen Warren wrote:
> On 07/28/2016 01:28 PM, Benjamin Tietz wrote:
> >Hello Vikas, hello Simon,
> >
> >the new clk-API leaves me with a problem. Previously there was a
> >seperate way to access the clock-d
Hello Stephen,
On Fri, Jul 29, 2016 at 12:02:02PM -0600, Stephen Warren wrote:
> On 07/29/2016 11:26 AM, Benjamin Tietz wrote:
> >Hello Stephen,
[snip]
> >>>Using a special high number looks unintuitive. And often result in
> >>>additional work-arounds in t
59 matches
Mail list logo