| #
386f9d4c |
| 14-Sep-2020 |
Sean Anderson <seanga2@gmail.com> |
UPSTREAM: pinctrl: Add pinmux property support to pinctrl-generic
The pinmux property allows for smaller and more compact device trees, especially when there are many pins which need to be assigned
UPSTREAM: pinctrl: Add pinmux property support to pinctrl-generic
The pinmux property allows for smaller and more compact device trees, especially when there are many pins which need to be assigned individually. Instead of specifying an array of strings to be parsed as pins and a function property, the pinmux property contains an array of integers representing pinmux groups. A pinmux group consists of the pin identifier and mux settings represented as a single integer or an array of integers. Each individual pin controller driver specifies the exact format of a pinmux group. As specified in the Linux documentation, a pinmux group may be multiple integers long. However, no existing drivers use multi-integer pinmux groups, so I have chosen to omit this feature. This makes the implementation easier, since there is no need to allocate a buffer to do endian conversions.
Support for the pinmux property is done differently than in Linux. As far as I can tell, inversion of control is used when implementing support for the pins and groups properties to avoid allocating. This results in some duplication of effort; every property in a config node is parsed once for each pin in that node. This is not such an overhead with pins and groups properties, since having multiple pins in one config node does not occur especially often. However, the semantics of the pinmux property make such a configuration much more appealing. A future patch could parse all config properties at once and store them in an array. This would make it easier to create drivers which do not function solely as callbacks from pinctrl-generic.
This commit increases the size of the sandbox build by approximately 48 bytes. However, it also decreases the size of the K210 device tree by 2 KiB from the previous version of this series.
The documentation has been updated from the last Linux commit before it was split off into yaml files.
Change-Id: I25c7920371f950c5fece54492d5eae8e013529d5 Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> (cherry picked from commit 9c08fbfc951fa90953b75462e5dff533c0031a4d) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| #
1e9979f7 |
| 13-Jan-2020 |
Patrick Delaunay <patrick.delaunay@st.com> |
BACKPORT: dm: pinctrl: migrate pinctrl-generic to livetree
Migrate pinctrl-generic to livetree: - dev_for_each_property - dev_read_prop_by_prop - dev_read_string_count - dev_read_string_index and ge
BACKPORT: dm: pinctrl: migrate pinctrl-generic to livetree
Migrate pinctrl-generic to livetree: - dev_for_each_property - dev_read_prop_by_prop - dev_read_string_count - dev_read_string_index and get rid of DECLARE_GLOBAL_DATA_PTR.
This patch solves the parsing issue during sandbox tests for pin configuration (OF_LIVE is activated in sandbox_defconfig and sub node are not correctly parsed in pinctrl_generic_set_state_subnode with fdt lib API).
Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Change-Id: I0ab7206e457d43af7e1d897d6c8281b026cfcbaa (cherry picked from commit e93f39213a3d614a33989878d85724cba30a9deb)
show more ...
|
| #
9d922450 |
| 17-May-2017 |
Simon Glass <sjg@chromium.org> |
dm: Use dm.h header when driver mode is used
This header includes things that are needed to make driver build. Adjust existing users to include that always, even if other dm/ includes are present
S
dm: Use dm.h header when driver mode is used
This header includes things that are needed to make driver build. Adjust existing users to include that always, even if other dm/ includes are present
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
21342d4a |
| 08-Feb-2017 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
e160f7d4 |
| 17-Jan-2017 |
Simon Glass <sjg@chromium.org> |
dm: core: Replace of_offset with accessor
At present devices use a simple integer offset to record the device tree node associated with the device. In preparation for supporting a live device tree,
dm: core: Replace of_offset with accessor
At present devices use a simple integer offset to record the device tree node associated with the device. In preparation for supporting a live device tree, which uses a node pointer instead, refactor existing code to access this field through an inline function.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
6e67f176 |
| 17-Oct-2016 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
Fix codying style broken by recent libfdt sync
Commit b02e4044ff8e ("libfdt: Bring in upstream stringlist functions") broke codying style in some places especially by inserting an extra whitespace b
Fix codying style broken by recent libfdt sync
Commit b02e4044ff8e ("libfdt: Bring in upstream stringlist functions") broke codying style in some places especially by inserting an extra whitespace before fdt_stringlist_count().
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
4504062b |
| 14-Oct-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-fdt
|
| #
b02e4044 |
| 02-Oct-2016 |
Simon Glass <sjg@chromium.org> |
libfdt: Bring in upstream stringlist functions
These have now landed upstream. The naming is different and in one case the function signature has changed. Update the code to match.
This applies the
libfdt: Bring in upstream stringlist functions
These have now landed upstream. The naming is different and in one case the function signature has changed. Update the code to match.
This applies the following upstream commits by Thierry Reding <treding@nvidia.com> :
604e61e fdt: Add functions to retrieve strings 8702bd1 fdt: Add a function to get the index of a string 2218387 fdt: Add a function to count strings
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
2c936374 |
| 16-Aug-2016 |
Beniamino Galvani <b.galvani@gmail.com> |
pinctrl: generic: scan for "pins" and "groups" properties in sub-nodes
In cases where the pins and groups definitions are in a sub-node, as:
uart_a { mux { groups = "uart_tx_a", "uart_rx_a";
pinctrl: generic: scan for "pins" and "groups" properties in sub-nodes
In cases where the pins and groups definitions are in a sub-node, as:
uart_a { mux { groups = "uart_tx_a", "uart_rx_a"; function = "uart_a"; }; };
pinctrl_generic_set_state_subnode() returns an error for the top-level node and pinctrl_generic_set_state() fails. Instead, return success so that the child nodes are tried.
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| #
80cd58b9 |
| 31-Aug-2015 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
d90a5a30 |
| 27-Aug-2015 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
pinctrl: add pin control uclass support
This creates a new framework for handling of pin control devices, i.e. devices that control different aspects of package pins.
This uclass handles pinmuxing
pinctrl: add pin control uclass support
This creates a new framework for handling of pin control devices, i.e. devices that control different aspects of package pins.
This uclass handles pinmuxing and pin configuration; pinmuxing controls switching among silicon blocks that share certain physical pins, pin configuration handles electronic properties such as pin- biasing, load capacitance etc.
This framework can support the same device tree bindings, but if you do not need full interface support, you can disable some features to reduce memory foot print. Typically around 1.5KB is necessary to include full-featured uclass support on ARM board (CONFIG_PINCTRL + CONFIG_PINCTRL_FULL + CONFIG_PINCTRL_GENERIC + CONFIG_PINCTRL_PINMUX), for example.
We are often limited on code size for SPL. Besides, we still have many boards that do not support device tree configuration. The full pinctrl, which requires OF_CONTROL, does not make sense for those boards. So, this framework also has a Do-It-Yourself (let's say simple pinctrl) interface. With CONFIG_PINCTRL_FULL disabled, the uclass itself provides no systematic mechanism for identifying the peripheral device, applying pinctrl settings, etc. They must be done in each low-level driver. In return, you can save much memory footprint and it might be useful especially for SPL.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|