Skip to content

Commit 2a0a67c

Browse files
antoniprzybyliksamueldr
authored andcommitted
rockchip: Add setup_gpio_pins for board-specific early setup
Some boards require touching GPIOs in some ways to setup some hardware in a known state, which may not be the expected state during boot. This follows the logic used by `led_setup`. Either expected by U-Boot or the booted Operating System. Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com> (Originally part of commit 3e03219) Co-authored-by: Antoni Przybylik <antoni.przybylik@wp.pl> Originally added for the Pinephone Pro. Now needed for the Pinebook Pro too. Changes from Samuel Dionne-Riel <samuel@dionne-riel> adding setup_gpio_pins as a weak function, fixing unified tree build. (cherry picked from commit ac9c738)
1 parent 05aa651 commit 2a0a67c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

arch/arm/mach-rockchip/rk3399/rk3399.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,14 @@ void __weak led_setup(void)
254254
{
255255
}
256256

257+
void __weak setup_gpio_pins(void)
258+
{
259+
}
260+
257261
void spl_board_init(void)
258262
{
259263
led_setup();
264+
setup_gpio_pins();
260265

261266
if (IS_ENABLED(CONFIG_SPL_GPIO)) {
262267
struct rockchip_cru *cru = rockchip_get_cru();

0 commit comments

Comments
 (0)