<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/drivers/pinctrl/aspeed, branch dev-5.2</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-5.2</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-5.2'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2019-08-29T07:24:08+00:00</updated>
<entry>
<title>pinctrl: aspeed: Fix spurious mux failures on the AST2500</title>
<updated>2019-08-29T07:24:08+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2019-08-28T11:41:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=d55dfaa1bda3fd80aa4d3943fd6b18c37833c624'/>
<id>urn:sha1:d55dfaa1bda3fd80aa4d3943fd6b18c37833c624</id>
<content type='text'>
Commit 674fa8daa8c9 ("pinctrl: aspeed-g5: Delay acquisition of regmaps")
was determined to be a partial fix to the problem of acquiring the LPC
Host Controller and GFX regmaps: The AST2500 pin controller may need to
fetch syscon regmaps during expression evaluation as well as when
setting mux state. For example, this case is hit by attempting to export
pins exposing the LPC Host Controller as GPIOs.

An optional eval() hook is added to the Aspeed pinmux operation struct
and called from aspeed_sig_expr_eval() if the pointer is set by the
SoC-specific driver. This enables the AST2500 to perform the custom
action of acquiring its regmap dependencies as required.

John Wang tested the fix on an Inspur FP5280G2 machine (AST2500-based)
where the issue was found, and I've booted the fix on Witherspoon
(AST2500) and Palmetto (AST2400) machines, and poked at relevant pins
under QEMU by forcing mux configurations via devmem before exporting
GPIOs to exercise the driver.

OpenBMC-Staging-Count: 1
Fixes: 7d29ed88acbb ("pinctrl: aspeed: Read and write bits in LPC and GFX controllers")
Fixes: 674fa8daa8c9 ("pinctrl: aspeed-g5: Delay acquisition of regmaps")
Reported-by: John Wang &lt;wangzqbj@inspur.com&gt;
Tested-by: John Wang &lt;wangzqbj@inspur.com&gt;
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>pinctrl: aspeed-g6: Add EMMC pin group</title>
<updated>2019-08-22T13:39:13+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2019-08-22T06:34:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=4ed23a9b3e73fc152974e41d5900a7df056cb000'/>
<id>urn:sha1:4ed23a9b3e73fc152974e41d5900a7df056cb000</id>
<content type='text'>
The EMMC group enables the 8-bit data bus for eMMC flashes. To enable,
use the following node:

    pinctrl_emmc_default: pinctrl_emmc {
        function = "SD3";
        groups = "EMMC";
    };

The replaced functions and groups escaped refactoring I did to other areas
before I sent out the initial series for the binding and driver.

Removed functions and groups:

* SD3DAT4
* SD3DAT5
* SD3DAT6
* SD3DAT7

Added group:

* EMMC

OpenBMC-Staging-Count: 1
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>pinctrl: aspeed-g6: Fix mislabeled PWM groups and functions</title>
<updated>2019-08-22T13:39:13+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2019-08-22T03:45:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=9e6df9b3acf6acef9ddb5b29f92cd21fa5f61d01'/>
<id>urn:sha1:9e6df9b3acf6acef9ddb5b29f92cd21fa5f61d01</id>
<content type='text'>
Initial revisions of the datasheet incorrectly described the PWM groups
and functions. Particularly, PWM8 only has one pin group associated with
it and PWM16 exists.

OpenBMC-Staging-Count: 1
Reported-by: Johnny Huang &lt;johnny_huang@aspeedtech.com&gt;
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>pinctrl: aspeed-g6: Fix I2C14 function name typo</title>
<updated>2019-08-22T13:39:12+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2019-08-22T03:41:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=b153dbed49a501167500728ea13fff9dc5a8c4b4'/>
<id>urn:sha1:b153dbed49a501167500728ea13fff9dc5a8c4b4</id>
<content type='text'>
The pin function was accidentally named after the signal.

OpenBMC-Staging-Count: 1
Reported-by: Johnny Huang &lt;johnny_huang@aspeedtech.com&gt;
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>pinctrl: aspeed: Add AST2600 pinmux support</title>
<updated>2019-08-22T13:39:12+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2019-07-11T04:19:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=9446bdd36d95f3f9daa178a1c8fe0fab2760c6bf'/>
<id>urn:sha1:9446bdd36d95f3f9daa178a1c8fe0fab2760c6bf</id>
<content type='text'>
The AST2600 pinmux is fairly similar to the previous generations of
ASPEED BMC SoCs in terms of architecture, though differ in some of the
design details. The complexity of the pin expressions is largely reduced
(e.g. there are no-longer signals with multiple expressions muxing them
to the associated pin), and there are now signals and buses with
multiple pin groups.

The driver implements pinmux support for all 244 GPIO-capable pins plus
a further four pins that are not GPIO capable but which expose multiple
signals. pinconf will be implemented in a follow-up patch.

The implementation has been smoke-tested under qemu, and run on hardware
by ASPEED.

Debugged-by: Johnny Huang &lt;johnny_huang@aspeedtech.com&gt;
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Link: https://lore.kernel.org/r/20190711041942.23202-7-andrew@aj.id.au
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
(cherry picked from commit 2eda1cdec49f8ae7878e60d1b06bd8157a95424f)
[arj: squash in patch 21b2920fb587 ("pinctrl: aspeed: g6: Remove
const specifier from aspeed_g6_sig_expr_set's ctx parameter")]
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>pinctrl: aspeed: Add SIG_DESC_CLEAR() helper</title>
<updated>2019-08-22T13:39:12+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2019-07-29T05:56:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=30cefa972d9a81cd69a5c2583ab7cfcda4f3f9fc'/>
<id>urn:sha1:30cefa972d9a81cd69a5c2583ab7cfcda4f3f9fc</id>
<content type='text'>
The complement of SIG_DESC_SET().

Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Link: https://lore.kernel.org/r/20190729055604.13239-6-andrew@aj.id.au
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
(cherry picked from commit 86392fac9a9c92f36c0a422a3075865a0fe959f9)
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>pinctrl: aspeed: Add multiple pin group support for functions</title>
<updated>2019-08-22T13:39:12+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2019-07-29T05:56:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=564e964729f23a48c8881541c116bf3f096931bb'/>
<id>urn:sha1:564e964729f23a48c8881541c116bf3f096931bb</id>
<content type='text'>
The AST2400 and AST2500 SoCs only exposed one pin group per function.
Lone pin groups drove some implementation simplifications in the ASPEED
pinmux infrastructure that is now invalid for the AST2600, which
supports multiple groups per function for some functions on the chip
(SMBus Alert pins and UARTs among others).

This patch reworks the macro jungle to enable support for multiple pin
groups. In the process we inflict some collateral damage on the existing
AST2400 and AST2500 drivers, but the rework is mostly a relatively
straight-forward, automated transform of adding the pin name as an
argument to some macro calls and implementing wrappers to paper over
groups in the cases where there aren't multiple.

As previously documented, the macro infrastructure exposes mux
configuration as symbols in the source file which are used to detect
accidental duplication. Previously these symbols were named in terms of
the signal for a given expression. As the AST2600 supports multiple pin
groups for a function, the signal name on its own is no-longer unique,
and we must switch to the (signal, group) tuple. However, this means
that we can no-longer derive the signal expression symbol name from the
signal name alone, which among other cases, impacts the operation of the
PIN_DECL_x() macros.

To fix that and avoid requiring we awkwardly provide the associated
group name for every signal for every PIN_DECL_x() invocation, instead
opportunistically alias the name of the signal expression symbol from
the unique (signal, group) tuple to the also unique (pin, signal) tuple,
then reference the alias symbol in the tables generated by PIN_DECL_x().
This way we do not require extra group parameters for PIN_DECL_x() as
the pin name was already provided as an argument, and instead simply
require that the pin name be provided to the expression declaration
macros in order to generate the alias symbol.

The patch implements the alias strategy and fixes up all the expression
definition macro calls in the AST2400 and AST2500 drivers to account for
pin groups. Given the implementation strategy has the property that
compilation either fails or loudly warns for bad pin descriptions, this
patch is theoretically tested by successfully compiling both affected
drivers. For a more practical test I've inspected the diff of the
content of the pinctrl debugfs entries before and after the patch under
qemu; all pins, functions and groups match.

Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Link: https://lore.kernel.org/r/20190729055604.13239-5-andrew@aj.id.au
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
(cherry picked from commit e7a96b0b7d1669e95aa77c007e71e3c88c531cc4)
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>pinctrl: aspeed: Add PIN_DECL_3() helper</title>
<updated>2019-08-22T13:39:12+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2019-07-29T05:56:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=d5bd2e73c7a4d0bd96ee9db2eb11ca1214434873'/>
<id>urn:sha1:d5bd2e73c7a4d0bd96ee9db2eb11ca1214434873</id>
<content type='text'>
This case is common in the AST2600, so add to the collection.

Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Link: https://lore.kernel.org/r/20190729055604.13239-4-andrew@aj.id.au
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
(cherry picked from commit 27d1f73670774e3ea3e304f989f0e1176b57cd7c)
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>pinctrl: aspeed: Rename pin declaration macros</title>
<updated>2019-08-22T13:39:12+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2019-07-29T05:56:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=6206d69b989e3eec841e01705f0cdc2977d356f5'/>
<id>urn:sha1:6206d69b989e3eec841e01705f0cdc2977d356f5</id>
<content type='text'>
Rename macros as follows:

* s/SS_PIN_DECL()/PIN_DECL_1()/
* s/MS_PIN_DECL()/PIN_DECL_2()/
* s/MS_PIN_DECL_()/PIN_DECL_()/

This is in preparation for adding PIN_DECL_3(). We could clean this up
with e.g. CPPMAGIC_MAP() from ccan, but that might be a bridge too far
given how much of a macro jungle we already have.

Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Link: https://lore.kernel.org/r/20190729055604.13239-3-andrew@aj.id.au
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
(cherry picked from commit 7b38897081666532b434e067bdfa85789f42fa4e)
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>pinctrl: aspeed: Make aspeed_pinmux_ips static</title>
<updated>2019-08-22T13:39:12+00:00</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-07-11T14:24:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=ede67d2c2e8c5767d060109dc5511fe41a480a52'/>
<id>urn:sha1:ede67d2c2e8c5767d060109dc5511fe41a480a52</id>
<content type='text'>
Fix sparse warning:

drivers/pinctrl/aspeed/pinmux-aspeed.c:8:12: warning:
 symbol 'aspeed_pinmux_ips' was not declared. Should it be static?

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Link: https://lore.kernel.org/r/20190711142457.37028-1-yuehaibing@huawei.com
Reviewed-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
(cherry picked from commit 8c4407de3be44c2a0ec3e316cd3e4a711bc2aaba)
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
</feed>
