| dbf9cc53 | 24-Mar-2021 |
Simon Glass <sjg@chromium.org> |
UPSTREAM: pinctrl: Return -ENOSYS when system call is not available
Update the code to use -ENOSYS, which is the correct error code for an unimplemented system call in U-Boot.
Also we should not ch
UPSTREAM: pinctrl: Return -ENOSYS when system call is not available
Update the code to use -ENOSYS, which is the correct error code for an unimplemented system call in U-Boot.
Also we should not check for a missing operations array as this is not permitted. For now this can be covered by an assert().
Change-Id: Ia554867bd25ece4ceb3214325768ac59dab1f66f Signed-off-by: Simon Glass <sjg@chromium.org> (cherry picked from commit bddac45d0422acbba5bf01406d27eedb429a1f42) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| 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 ...
|
| 0b1af3a5 | 21-Oct-2019 |
Patrick Delaunay <patrick.delaunay@st.com> |
UPSTREAM: dm: pinctrl: fix for introduce PINCONF_RECURSIVE option
Correct the name of the define used CONFIG_IS_ENABLED which is not aligned with Kconfig name: CONFIG_$(SPL_)PINCONF_RECURSIVE.
The
UPSTREAM: dm: pinctrl: fix for introduce PINCONF_RECURSIVE option
Correct the name of the define used CONFIG_IS_ENABLED which is not aligned with Kconfig name: CONFIG_$(SPL_)PINCONF_RECURSIVE.
The recursive calls is conditional only for UCLASS_PINCONFIG "pinconfig" driver. It is always needed to call pinctrl_post_bind for UCLASS_PINCTRL "pinctrl", the test CONFIG_IS_ENABLED(PINCONF_RECURSIVE) need to be removed for this driver.
This correct a regression introduced because the same patch is applied twice times in u-boot-dm branch: - commit e878b53a79d1 ("dm: pinctrl: introduce PINCONF_RECURSIVE option") - commit c20851b3d850 ("dm: pinctrl: introduce PINCONF_RECURSIVE option")
Change-Id: Ib9429aa92ffe851d54f7b107a8d91d98a0dd8c19 Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> (cherry picked from commit 44510daea4d07fee736dd90411c4b503340b449e) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| 9e0de476 | 21-Oct-2019 |
Patrick Delaunay <patrick.delaunay@st.com> |
UPSTREAM: pinctrl: Kconfig: remove duplicated nodes
Remove the duplicated configs introduced when the same patch is applied twice times: - commit e878b53a79d1 ("dm: pinctrl: introduce PINCONF_RECURS
UPSTREAM: pinctrl: Kconfig: remove duplicated nodes
Remove the duplicated configs introduced when the same patch is applied twice times: - commit e878b53a79d1 ("dm: pinctrl: introduce PINCONF_RECURSIVE option") - commit c20851b3d850 ("dm: pinctrl: introduce PINCONF_RECURSIVE option")
Change-Id: I18868408e662e72b6035519354f537a92473e811 Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> (cherry picked from commit ae799ffcae1109eaac243afe19ddf60ba728ce7c) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| 0202cbd2 | 02-Aug-2019 |
Patrick Delaunay <patrick.delaunay@st.com> |
UPSTREAM: dm: pinctrl: introduce PINCONF_RECURSIVE option
In the Linux pinctrl binding, the pin configuration nodes don't need to be direct children of the pin controller device (may be grandchildre
UPSTREAM: dm: pinctrl: introduce PINCONF_RECURSIVE option
In the Linux pinctrl binding, the pin configuration nodes don't need to be direct children of the pin controller device (may be grandchildren for example). This behavior is managed with the pinconfig u-class which recursively bind all the sub-node of the pin controller.
But for some binding (when pin configuration is only children of pin controller) that is not necessary. U-Boot can save memory and reduce the number of pinconf instance when this feature is deactivated (for arch stm32mp for example for SPL).
This patch allows to control this feature with a new option CONFIG_PINCONF_RECURSIVE when it is possible for each individual pin controller device.
Change-Id: I2c8a80186e9fda512e1e2c32c8cca104831e0da4 Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Fixed CONFIG_IF_ENABLED() condition, added __maybe_unused: Signed-off-by: Simon Glass <sjg@chromium.org> (cherry picked from commit e878b53a79d1a4f06c7c03d706da6b2993e8ff41) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| fab50c1f | 02-Aug-2019 |
Patrick Delaunay <patrick.delaunay@st.com> |
UPSTREAM: dm: pinctrl: introduce PINCONF_RECURSIVE option
In the Linux pinctrl binding, the pin configuration nodes don't need to be direct children of the pin controller device (may be grandchildre
UPSTREAM: dm: pinctrl: introduce PINCONF_RECURSIVE option
In the Linux pinctrl binding, the pin configuration nodes don't need to be direct children of the pin controller device (may be grandchildren for example). This behavior is managed with the pinconfig u-class which recursively bind all the sub-node of the pin controller.
But for some binding (when pin configuration is only children of pin controller) that is not necessary. U-Boot can save memory and reduce the number of pinconf instance when this feature is deactivated (for arch stm32mp for example for SPL).
This patch allows to control this feature with a new option CONFIG_PINCONF_RECURSIVE when it is possible for each individual pin controller device.
Change-Id: I0c8c362c14595cea95cc4e0f647df7f0451c4cab Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org> (cherry picked from commit c20851b3d850dd859f202d2395e8dde0fc81c1ce) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| a033e937 | 18-Jan-2023 |
Michael Walle <michael@walle.cc> |
UPSTREAM: pinctrl: don't fall back to pinctrl_select_state_simple()
If CONFIG_PINCTRL_FULL is enabled, never fall back to the simple implementation. pinctrl_select_state() is called for each device
UPSTREAM: pinctrl: don't fall back to pinctrl_select_state_simple()
If CONFIG_PINCTRL_FULL is enabled, never fall back to the simple implementation. pinctrl_select_state() is called for each device and it is expected to fail. A fallback to the simple imeplementation doesn't make much sense.
To keep the return code consistent, we need to change the -EINVAL (which was ignored before) to -ENOSYS.
Change-Id: I51b997c0e111736a37f6e22a4f6ad5f5b47a1eab Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> (cherry picked from commit 72b8c6d1ebfd40a6ee6be0345ff7abb30c9f9e3d) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| 26ad936d | 21-Apr-2019 |
Marek Vasut <marek.vasut+renesas@gmail.com> |
UPSTREAM: pinctrl: gpio: Add callback for configuring pin as GPIO
Add callback to configure, and de-configure, pin as a GPIO on the pin controller side. This matches similar functionality in Linux a
UPSTREAM: pinctrl: gpio: Add callback for configuring pin as GPIO
Add callback to configure, and de-configure, pin as a GPIO on the pin controller side. This matches similar functionality in Linux and aims to replace the ad-hoc implementations present in U-Boot.
Change-Id: Ic4c1e898c6c1054193e49bd011358008c1e4007e Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Alex Kiernan <alex.kiernan@gmail.com> Cc: Christoph Muellner <christoph.muellner@theobroma-systems.com> Cc: Eugeniu Rosca <roscaeugeniu@gmail.com> Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Patrick DELAUNAY <patrick.delaunay@st.com> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Simon Glass <sjg@chromium.org> (cherry picked from commit ae59d7ca59dbfc770531f51c717dc6f5d9a18f78) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| 6b9191d0 | 24-Oct-2018 |
Patrice Chotard <patrice.chotard@st.com> |
UPSTREAM: dm: pinctrl: Add get_pin_muxing() ops
Add get_pin_muxing() which allows to display the muxing of a given pin belonging to a pin-controller.
Change-Id: Icbc3b41ae38b695403f5757c1c0fb0a4155
UPSTREAM: dm: pinctrl: Add get_pin_muxing() ops
Add get_pin_muxing() which allows to display the muxing of a given pin belonging to a pin-controller.
Change-Id: Icbc3b41ae38b695403f5757c1c0fb0a4155e4dcd Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org> (cherry picked from commit f55a0c0a20cad56440ebe9a9b2999f21ae00f61a) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| 942638a9 | 24-Oct-2018 |
Patrice Chotard <patrice.chotard@st.com> |
UPSTREAM: dm: pinctrl: Add pinctrl_get_pin_name and pinctrl_get_pins_count
Add pinctrl_get_pin_name() and pinctrl_get_pins_count() methods to obtain pin's name and pin's muxing given a pin reference
UPSTREAM: dm: pinctrl: Add pinctrl_get_pin_name and pinctrl_get_pins_count
Add pinctrl_get_pin_name() and pinctrl_get_pins_count() methods to obtain pin's name and pin's muxing given a pin reference.
This will be used by the new pinmux command.
Change-Id: I478e164107a547fb7dc73743481d106c4c9ec533 Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org> (cherry picked from commit 8bbb5b20852aa81024eb7b2dcc3eb58275e83bb0) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| 93a53c85 | 22-Mar-2019 |
Urja Rannikko <urjaman@gmail.com> |
pinctrl: exit pinconfig_post_bind if there are no subnodes
This fixes RK3288 SPL hanging or hitting this assert: drivers/core/ofnode.c:183: ofnode_first_subnode: Assertion `ofnode_valid(node)' faile
pinctrl: exit pinconfig_post_bind if there are no subnodes
This fixes RK3288 SPL hanging or hitting this assert: drivers/core/ofnode.c:183: ofnode_first_subnode: Assertion `ofnode_valid(node)' failed.
Change-Id: I6e693d4d1505c2751f6ed023463127d8d25d0271 Signed-off-by: Urja Rannikko <urjaman@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> (cherry picked from commit 63402831e0b68ded49c054989fffdfd88b98953b) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| 5298c171 | 17-Sep-2019 |
Michael Trimarchi <michael@amarulasolutions.com> |
UPSTREAM: dm: pinctrl: Skip not associated gpio phandle and rise a warning message
Skip not associated gpio phandle let register the other gpios on a group. We need anyway to send out a warning to t
UPSTREAM: dm: pinctrl: Skip not associated gpio phandle and rise a warning message
Skip not associated gpio phandle let register the other gpios on a group. We need anyway to send out a warning to the user to fix their uboot-board.dtsi. Thhe handle id can be found inside the decompiled dtb
dtc -I dtb -O dts -o devicetree.dts spl/u-boot-spl.dtb
Change-Id: I4aa7f439dd459a7e6f6c00411eec85c94c656a0d Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org> (cherry picked from commit 36a90eda84dec49c2c850852d7e246c9a01bf59c) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| c992b662 | 18-Apr-2018 |
Kever Yang <kever.yang@rock-chips.com> |
UPSTREAM: pinctrl: do not set_state for device without valid ofnode
Not all the udevice have a available DT node, eg. rksdmmc@ff500000.blk which add by mmc_bind(), these device do not have/need set
UPSTREAM: pinctrl: do not set_state for device without valid ofnode
Not all the udevice have a available DT node, eg. rksdmmc@ff500000.blk which add by mmc_bind(), these device do not have/need set pinctrl state.
Change-Id: I00b3e04167232db1959605823c5a7424fee482c5 Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org> (cherry picked from commit f717b4c8e7fc871573755a05be96c8ef857eabce) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|