git: 0b7888108cc2 - main - rk_pinctrl: Limit the RK3568 drive strength to the 8 bits field
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 30 Oct 2026 07:05:19 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=0b7888108cc24b49386967826ecc6e6568e4aeb8
commit 0b7888108cc24b49386967826ecc6e6568e4aeb8
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2026-10-30 06:45:28 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2026-10-30 07:04:58 +0000
rk_pinctrl: Limit the RK3568 drive strength to the 8 bits field
A drive-strength above 7 made the value wider than the 8 bits field. On an
odd pin the extra bits set the write enable of the even pin next to it, which
was then cleared. Limit the level to 7, where the field is full, like Linux.
Reported by: markj
Fixes: e8f8b17c3018
---
sys/arm64/rockchip/rk_pinctrl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sys/arm64/rockchip/rk_pinctrl.c b/sys/arm64/rockchip/rk_pinctrl.c
index 4fefbd5766b9..c0412bbe0295 100644
--- a/sys/arm64/rockchip/rk_pinctrl.c
+++ b/sys/arm64/rockchip/rk_pinctrl.c
@@ -1191,6 +1191,9 @@ rk_pinctrl_configure_pin(struct rk_pinctrl_softc *sc, uint32_t *pindata)
/* Each pin has an 8 bits field, two pins per register */
bit = (pin % 2) * 8;
+ /* The field is full from level 7 */
+ if (value > 7)
+ value = 7;
drive = ((1 << (value + 1)) - 1) << bit;
mask = 0xff << bit;