u-boot/drivers/pinctrl
Jonas Karlman d7009faa09 pinctrl: rockchip: Fix drive and input schmitt on RK3568
On RK3568 most pins have a configurable drive strength of level 0-5 and
some pins level 0-11. When rk3568_set_drive is called with a strength
value above 7 the drv value written to reg may overflow into the write
enable bits, resulting in a bad configuration.

This cause e.g. ethernet PHY on Radxa CM3-IO board not to work after
drive is configured according to the device tree.

  Could not get PHY for ethernet@fe010000: addr 0

Level 6-11 can be configured using a second reg for some pins, however
the drv value is reused resulting in lower 6 bits being written to reg.

Input schmitt is configured in 2-bit fields on RK3568 compared to
earlier generation and 2'b10 should be used to enable input schmitt.

Change to use regmap_update_bits with a rmask to fix the overflow issue
and closer match the linux driver. Bit shift the drv value used for the
second reg to configure drive strength level 6-11. Also write correct
values for input schmitt setting.

Fixes: 1977d746aa ("rockchip: rk3568: add rk3568 pinctrl driver")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-14 11:07:27 +08:00
..
aspeed pinctrl: aspeed: FWSPICS1 and SPI1CS1 pin support 2022-09-13 12:08:40 -04:00
ath79 common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
broadcom Correct SPL uses of OF_BOARD 2023-02-10 07:41:41 -05:00
exynos exynos: fix header inclusion guard 2023-05-31 12:31:47 -04:00
intel doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
mediatek pinctrl: mediatek: add pinctrl driver for MT7988 SoC 2023-08-03 09:40:50 -04:00
meson pinctrl: meson: add pinctrl driver for Amlogic A1 2023-06-28 10:05:34 +02:00
mscc pinctrl: mscc: Fix multiple definition error 2021-07-07 10:17:54 -04:00
mtmips pinctrl: mtmips: add support for MediaTek MT7621 SoC 2022-07-13 23:03:37 +02:00
mvebu arm64: a37xx: pinctrl: probe after binding 2023-03-01 11:22:27 -07:00
nexell global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
nuvoton pinctrl: nuvoton: fix reset reason error for poweron 2023-07-14 12:52:18 -04:00
nxp imx: move imx8 sci header file to include/firmware/imx 2023-05-21 16:54:32 +02:00
renesas pinctrl: renesas: r8a779a0: Remove incorrect AVB[01] pinmux configuration 2023-06-08 22:22:38 +02:00
rockchip pinctrl: rockchip: Fix drive and input schmitt on RK3568 2023-08-14 11:07:27 +08:00
starfive pinctrl: starfive: Add StarFive JH7110 driver 2023-04-20 16:08:44 +08:00
sunxi pinctrl: sunxi: Add NAND pinmuxes 2023-04-28 01:06:57 +01:00
uniphier pinctrl: uniphier: add ethernet TX pin data for PXs3 2023-01-02 14:10:23 -05:00
Kconfig pinctrl: starfive: Add StarFive JH7110 driver 2023-04-20 16:08:44 +08:00
Makefile pinctrl: renesas: add R906G032 driver 2023-05-13 04:01:30 +02:00
pinctrl-apple.c pinctrl: Add Apple pinctrl driver 2021-11-17 17:04:58 -05:00
pinctrl-at91-pio4.c Correct SPL use of ATMEL_PIO4 2023-02-10 08:22:52 -05:00
pinctrl-at91.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pinctrl-generic.c pinctrl: fix buffer size for pinctrl_generic_set_state_prefix() 2022-10-11 15:40:48 -04:00
pinctrl-k210.c pinctrl: k210: Fix bias-pull-up 2022-03-15 17:43:11 +08:00
pinctrl-qe-io.c treewide: Simply conditions with the new OF_REAL 2021-09-25 09:46:15 -06:00
pinctrl-sandbox.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
pinctrl-single.c Correct SPL use of SANDBOX 2023-02-10 07:41:40 -05:00
pinctrl-sti.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pinctrl-stmfx.c pinctrl: stmfx: define LOG_CATEGORY 2021-11-30 11:20:34 +01:00
pinctrl-uclass.c pinctrl: fix pinctrl_gpio_get_pinctrl_and_offset for gpio-ranges array 2023-04-03 06:53:53 +12:00
pinctrl-zynqmp.c arm64: zynqmp: Switch to amd.com emails 2023-07-21 09:00:38 +02:00
pinctrl_pic32.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pinctrl_stm32.c pinctrl: pinctrl_stm32: Add slew rate support for stm32_pinctrl_get_pin_muxing() 2023-04-19 09:50:32 +02:00