| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 5.9rc-1 dts update pulled in a change that broke all TI AM33xx
platforms. This fixes that.
Previously, when using pinctrl-single,pins, the value of
"#pinctrl-cells" was always 1, which indicates one data cell per pin,
which contains the value to to program into the pinctrl register.
In kernel v5.9-rc1, commit a13395418888 ("pinctrl: single: parse #pinctrl-cells
= 2"), added support for 2 data cells per pin. The two cells get ORed
together to produce one register value.
Then commit 27c90e5e48d0 ("ARM: dts: am33xx-l4: change #pinctrl-cells
from 1 to 2"), changed the dts files to use two cells for am33xx and
changed the AM33XX_PADCONF() macro to produce two data cells instead of
ORing the two values together. The pinctrl driver will now do the OR
to produce the same value that was in one cell before. I don't see what
this accomplishes, but there it is.
The dts update pulled in the latter change, but not the former, leaving
Barebox's pinctrl-single driver unable to correctly use the am33xx
pinctrl data. This commit adds support for the 2 cell format.
It would be easier to just change the dts files back, since this change
doesn't appear actually accomplish anything, but then the dts source
would be out of sync with the kernel.
Signed-off-by: Trent Piepho <tpiepho@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The CREDITS file was removed from barebox in 2015 by commit 6570288f2d97
("Remove the CREDITS file"). Remove references to it from several files.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
All these symbols are defined, but unused anywhere in the barebox tree.
Remove them.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Many clock source and GPIO controller drivers don't have a prompt, but
are instead default y if their respective platform is enabled. Maintain
this behavior, but add a prompt for when COMPILE_TEST is enabled, so
they can be included in test builds.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
| |
All of these drivers have a runtime dependency on SoC peripherals, but
can nevertheless be compile-tested. Add COMPILE_TEST as an alternate
dependency.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Linux has since migrated to a new lookup API that lacks the init_data
parameter. As it's unused in barebox, follow suit.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| | |
Just add the compatible string, nothing more to do.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
| |
According to dts/Bindings/pinctrl/pinctrl-single.txt:113 the correct order of
parameters is <offset, value, mask>.
Fixes: f7e0cae43 ('pinctrl-single: Handle "pinctrl-single,function-mask" dt property')
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implement linux behavior regarding "pinctrl-single,function-mask" and
"pinctrl-single,bits".
It allows multiple pins control per register.
(linux sha1: 4e7e8017a80e1810100c9b416b86e3baef900285)
Signed-off-by: Simeon Marijon <simeon@marijon.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
| |
Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Some of the selected options require OFDEVICE to be enabled. As the driver
is only used of DT probed systems it's okay to depend on OFDEVICE.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
If the driver is only built for one of the two supported SoCs we end
up with some unused structures.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
The driver also depends on PINCTRL, so we should only allow it to
be enabled if this option is selected. We can also drop the OFDEVICE
dependency then, as this is required for PINCTRL.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
The bindings allow the pinmux node to occur directly in the node under
the pin controller as well. Check for this and support both types of
pinctrl specification.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SoC's pin controller is virtually always built and probed, so
there's is little information to gain from the fact it was successfully
probed. Have the success message show up as debug message to reduce probe
clutter like this:
NOTICE: stm32-pinctrl soc:pin-controller@50002000.of: pinctrl/gpio driver registered
NOTICE: stm32-pinctrl soc:pin-controller-z@54004000.of: pinctrl/gpio driver registered
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
mode and alt are printed with the dev_dbg before they are initialized.
Remedy this by moving the dev_dbg after them.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The sama5d2 features a GPIO and pin controller different than the one
we support in barebox. The device tree bindings are different as well,
so it makes sense to have a separate driver for it.
Add the pin control and GPIO driver as well as some helpers usable
from PBL, should we want to do pinmuxing that early.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
| |
This adds the device tree compatible for the i.MX1 iomux.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far we have imx_gpio_mode() to configure a pinmux entry for the older
i.MX pinmuxes. For this to work imx_iomuxv1_init() must be called
beforehand to configure the base address. Simplify this by introducing
SoC specific variants of imx_gpio_mode() which also pass the base
address. This makes initialization of the base address unnecessary and
the functions usable for PBL. Consequently also compile the code for
PBL.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current error path has two issues:
- PTR_ERR is applied to a NULL pointer, so even error conditions return
zero, which is a valid successful return.
- The return value is stored into an unsigned integer which is checked
to be less than zero, so the error is never handled.
Fix both issues.
Fixes: f4f933a64 ("pinctrl: add driver for STM32 GPIO and pin multiplexer")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
There's already a debug output whenever a pin is configured, extend this
by printing a "header" with the node name and how many pins configurations
will follow.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds driver support for the 12 GPIO banks on the STM32MP157.
As they are accessible to both the Cortex-A cores as well as the Cortex-M
core, modifications to these are protected by a hardware spinlock
and clocks are enabled/disabled as required.
All register fiddling done by the driver is collected in <soc/stm32/gpio.h>,
so future PBL code may make use of it as well to chainload barebox proper.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the potentially endianness-changing readl, writel and siblings
directly. They looks prettier and are the correct thing to do, as
even if the CPU is in big-endian mode, the peripherals are little-endian.
Unlike Linux, barebox readl,writel are the same Linux'
{readl,writel}_relaxed (they don't imply memory barriers)
and thus there shouldn't be any functional change.
Patch was generated by a mass search and replace. I looked it over,
adjust some whitespace and further verified by reviewing the output of
git diff HEAD~1 --word-diff | \
perl -pe 's/\[-(.*?)__raw_/{+$1/; s/-\]\{\+/+}{+/;' \
-e 's/(\{\+.*?\+\})\1/__ALL_IS_WELL__/' | grep '+}{+'
which filters out the common case of lines where a single
__raw_{readT,writeT} had its __raw_ prefix stripped without any
further changes.
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Based on Linux commit 8636a1f9677db4f883f29a072f401303acfc2edd
This will be needed when you sync Kconfig with Linux 5.0 or later.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
This adds hooks for the pin controller driver to the existing
bcm2835_set_function().
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
The upstream discussion concluded on using the same binding as
on previous i.MX SoCs.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
mach/iomux.h provides prototypes for functions that the pinctrl driver
implements, so include it. With this we have a duplicate definition of
enum at91_mux so remove it from the pinctrl driver.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
| |
The code is correct but it takes more seconds for me to understand.
And static code analyzer do not understand it at all.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Turn registration messages into dev_dbg.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit 37e6bee7e5 ("gpiolib: Add support for GPIO "hog" nodes")
barebox can handle hog-gpios. To work correctly the pinctrl driver
must be initialised first. Reorder all pinctrl drivers so they will be
called first.
find drivers/pinctrl/ -type f -name *.c \
-exec sed -i 's/\bpostcore_initcall\b/core_initcall/' "{}" +;
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a warning while compiling with GCC 5.4.0 (OSELAS.Toolchain 2016.02):
drivers/pinctrl/imx-iomux-v3.c: In function 'imx_iomux_v3_set_state':
drivers/pinctrl/imx-iomux-v3.c:153:13: warning: 'share_conf_val' may be used uninitialized in this function [-Wmaybe-uninitialized]
conf_val &= ~IMX_PAD_SION;
we have the pattern:
if (share_conf)
share_conf_val = ...;
...
if (share_conf)
use(share_conf_val);
GCC 5.4.0 doesn't recognize this so explicitly initialize
share_conf_val.
Signed-off-by: Roland Hieber <rohieb@rohieb.name>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Add code to parse "input-enable" and intepret it as SION bit. This is
needed for I2C configuration on i.MX8MQ EVK board.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
| |
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
| |
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
Use of_get_property() rather than of_find_property() to avoid
dereferencing a struct property directly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
xzalloc() either returns memory or panics, so checking for NULL is useless.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
| |
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
Move initcalls to postcore_initcall() like all other pinctrl drivers.
This will init this driver earlier right after pinctrl driver.
No know bugs are fixed by this change.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Do not blindly assume that a device node has a atmel,pins property.
Instead, test it for being NULL before using it. This also silences
a compiler warning when the driver is compiled without OF support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
| |
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|