system LED: ipq9574:Update System LED changes in u-boot based on Qcom Paper design

Change-Id: I30e32cc118c7f2eca337050dca41cd8775371739
Signed-off-by: Srinivas Jagadam <quic_sjagadam@quicinc.com>
This commit is contained in:
Srinivas Jagadam 2023-11-14 17:21:14 +05:30
parent 01c2437e16
commit f507d38804
4 changed files with 56 additions and 0 deletions

View file

@ -155,4 +155,33 @@
};
};
};
sc_led {
LED_R {
gpio = <6>;
func = <0>;
pull = <GPIO_PULL_UP>;
oe = <GPIO_OD_ENABLE>;
od_en = <GPIO_OD_DISABLE>;
drvstr = <GPIO_8MA>;
out = <1>;
};
LED_G {
gpio = <16>;
func = <0>;
pull = <GPIO_PULL_UP>;
oe = <GPIO_OD_ENABLE>;
od_en = <GPIO_OD_DISABLE>;
drvstr = <GPIO_8MA>;
out = <0>;
};
LED_B {
gpio = <17>;
func = <0>;
pull = <GPIO_PULL_UP>;
oe = <GPIO_OD_ENABLE>;
od_en = <GPIO_OD_DISABLE>;
drvstr = <GPIO_8MA>;
out = <0>;
};
};
};

View file

@ -439,6 +439,21 @@ void board_pci_init(int id)
return;
}
void board_sc_led_init(void)
{
int node;
node = fdt_path_offset(gd->fdt_blob, "/sc_led");
if (node < 0) {
printf("Could not find sc_led in device tree\n");
return;
}
qca_gpio_init(node);
return;
}
static void pci_gpio_low(int offset)
{
struct qca_gpio_config gpio_config;

View file

@ -253,6 +253,8 @@ void board_pci_init(int id);
__weak void board_pcie_clock_init(int id) {}
#endif
void board_sc_led_init(void);
unsigned int __invoke_psci_fn_smc(unsigned int, unsigned int,
unsigned int, unsigned int);

View file

@ -71,6 +71,8 @@ DECLARE_GLOBAL_DATA_PTR;
extern int prom_init(void);
#endif
extern void board_sc_led_init(void);
ulong monitor_flash_len;
__weak int board_flash_wp_on(void)
@ -521,6 +523,13 @@ static int initr_malloc_bootparams(void)
}
#endif
static int initr_sc_led(void)
{
board_sc_led_init();
return 0;
}
static int initr_jumptable(void)
{
jumptable_init();
@ -865,6 +874,7 @@ init_fnc_t init_sequence_r[] = {
initr_pci,
#endif
stdio_add_devices,
initr_sc_led,
initr_jumptable,
#ifdef CONFIG_API
initr_api,