diff options
author | Jonas Karlman <jonas@kwiboo.se> | 2023-08-14 00:28:26 +0000 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2023-08-14 11:07:27 +0800 |
commit | d7009faa098169abd7ff0e4b41af89b17896a7da (patch) | |
tree | 2920bb606a1d9c4c310f6721f017c86933e47260 /drivers/i2c/meson_i2c.c | |
parent | a73a28b3298dacea3a39f97c6da50fe7cd10e7df (diff) |
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: 1977d746aa54 ("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>
Diffstat (limited to 'drivers/i2c/meson_i2c.c')
0 files changed, 0 insertions, 0 deletions