Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nest
Forks
U-Boot
Commits
7a11b0ae
Commit
7a11b0ae
authored
Jan 11, 2020
by
dhivael
Committed by
James T. Lee
Mar 02, 2021
Browse files
rk3399: light pinebook power and standby leds during early boot
this is a hack, but it works for now.
parent
9aa4c853
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
arch/arm/mach-rockchip/rk3399/rk3399.c
arch/arm/mach-rockchip/rk3399/rk3399.c
+11
-1
No files found.
arch/arm/mach-rockchip/rk3399/rk3399.c
View file @
7a11b0ae
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
#include <asm/arch-rockchip/hardware.h>
#include <asm/arch-rockchip/hardware.h>
#include <linux/bitops.h>
#include <linux/bitops.h>
#include <power/regulator.h>
#include <power/regulator.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>
DECLARE_GLOBAL_DATA_PTR
;
DECLARE_GLOBAL_DATA_PTR
;
...
@@ -119,8 +121,8 @@ void board_debug_uart_init(void)
...
@@ -119,8 +121,8 @@ void board_debug_uart_init(void)
struct
rk3399_grf_regs
*
const
grf
=
(
void
*
)
GRF_BASE
;
struct
rk3399_grf_regs
*
const
grf
=
(
void
*
)
GRF_BASE
;
#ifdef CONFIG_TARGET_CHROMEBOOK_BOB
#ifdef CONFIG_TARGET_CHROMEBOOK_BOB
struct
rk3399_pmugrf_regs
*
const
pmugrf
=
(
void
*
)
PMUGRF_BASE
;
struct
rk3399_pmugrf_regs
*
const
pmugrf
=
(
void
*
)
PMUGRF_BASE
;
struct
rockchip_gpio_regs
*
const
gpio
=
(
void
*
)
GPIO0_BASE
;
#endif
#endif
struct
rockchip_gpio_regs
*
const
gpio
=
(
void
*
)
GPIO0_BASE
;
#if defined(CONFIG_DEBUG_UART_BASE) && (CONFIG_DEBUG_UART_BASE == 0xff180000)
#if defined(CONFIG_DEBUG_UART_BASE) && (CONFIG_DEBUG_UART_BASE == 0xff180000)
/* Enable early UART0 on the RK3399 */
/* Enable early UART0 on the RK3399 */
...
@@ -153,6 +155,14 @@ void board_debug_uart_init(void)
...
@@ -153,6 +155,14 @@ void board_debug_uart_init(void)
spl_gpio_set_pull
(
&
pmugrf
->
gpio0_p
,
GPIO
(
BANK_B
,
4
),
GPIO_PULL_NORMAL
);
spl_gpio_set_pull
(
&
pmugrf
->
gpio0_p
,
GPIO
(
BANK_B
,
4
),
GPIO_PULL_NORMAL
);
#endif
/* CONFIG_TARGET_CHROMEBOOK_BOB */
#endif
/* CONFIG_TARGET_CHROMEBOOK_BOB */
{
// set GPIO0_A2/B3 to GPIO_ACTIVE_HIGH
// set GPIO0_A2/B3 to OUTPUT
int
mask
=
(
1UL
<<
RK_PA2
)
|
(
1UL
<<
RK_PB3
);
setbits_le32
(
&
gpio
->
swport_dr
,
mask
);
setbits_le32
(
&
gpio
->
swport_ddr
,
mask
);
}
/* Enable early UART2 channel C on the RK3399 */
/* Enable early UART2 channel C on the RK3399 */
rk_clrsetreg
(
&
grf
->
gpio4c_iomux
,
rk_clrsetreg
(
&
grf
->
gpio4c_iomux
,
GRF_GPIO4C3_SEL_MASK
,
GRF_GPIO4C3_SEL_MASK
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment