ARM: dts: stm32: drop "st,button1" compatible
Subsystems (2)
PATCH v2 1/3 ARM: dts: stm32: drop "st,button1" compatible
It is pointless to use the custom compatible "st,button1" when stm32746g-eval.dts and stm32f769-disco.dts already contain the "gpio-keys" compatible, which is specifically used for button management.
---
Changes in v2:
- Drop gpio-keys node from stm32f746-disco-u-boot.dtsi
arch/arm/dts/stm32746g-eval-u-boot.dtsi | 5 ----- arch/arm/dts/stm32f746-disco-u-boot.dtsi | 5 ----- arch/arm/dts/stm32f769-disco-u-boot.dtsi | 5 ----- board/st/stm32f746-disco/stm32f746-disco.c | 15 --------------- 4 files changed, 30 deletions(-)
arch/arm/dts/stm32746g-eval-u-boot.dtsi +0 -5
@@ -23,11 +23,6 @@ spi0 = &qspi; }; - button1 { - compatible = "st,button1"; - button-gpio = <&gpioc 13 0>; - }; - led1 { compatible = "st,led1"; led-gpio = <&gpiof 10 0>;
arch/arm/dts/stm32f746-disco-u-boot.dtsi +0 -5
@@ -23,11 +23,6 @@ spi0 = &qspi; }; - button1 { - compatible = "st,button1"; - button-gpio = <&gpioi 11 0>; - }; - led1 { compatible = "st,led1"; led-gpio = <&gpioi 1 0>;
arch/arm/dts/stm32f769-disco-u-boot.dtsi +0 -5
@@ -23,11 +23,6 @@ spi0 = &qspi; }; - button1 { - compatible = "st,button1"; - button-gpio = <&gpioa 0 0>; - }; - led1 { compatible = "st,led1"; led-gpio = <&gpioj 5 0>;
board/st/stm32f746-disco/stm32f746-disco.c +0 -15
@@ -94,21 +94,6 @@ int board_late_init(void)dm_gpio_set_value (&gpio,1 ); } -/* read button 1*/ - node =fdt_node_offset_by_compatible (gd->fdt_blob,0 ,"st,button1" ); -if (node <0 ) -return -1 ; - -gpio_request_by_name_nodev (offset_to_ofnode (node),"button-gpio" ,0 , - &gpio,GPIOD_IS_IN ); - -if (dm_gpio_is_valid (&gpio)) { -if (dm_gpio_get_value (&gpio)) -puts ("usr button is at HIGH LEVEL\n" ); -else -puts ("usr button is at LOW LEVEL\n" ); - } -return 0 ; }
Signature · 1 line
2.43.0
PATCH v2 2/3 ARM: dts: stm32: drop "st,led1" compatible
It is pointless to use the custom compatible "st,led1" when stm32746g-eval.dts and stm32f769-disco.dts already contain the "gpio-leds" compatible, which is specifically used for GPIO LEDs management.
---
Changes in v2:
- Drop leds node from stm32f746-disco-u-boot.dtsi
arch/arm/dts/stm32746g-eval-u-boot.dtsi | 5 ----- arch/arm/dts/stm32f746-disco-u-boot.dtsi | 5 ----- arch/arm/dts/stm32f769-disco-u-boot.dtsi | 5 ----- board/st/stm32f746-disco/stm32f746-disco.c | 16 ---------------- 4 files changed, 31 deletions(-)
arch/arm/dts/stm32746g-eval-u-boot.dtsi +0 -5
@@ -22,11 +22,6 @@ mmc0 = &sdio1; spi0 = &qspi; }; - - led1 { - compatible = "st,led1"; - led-gpio = <&gpiof 10 0>; - }; }; &fmc {
arch/arm/dts/stm32f746-disco-u-boot.dtsi +0 -5
@@ -22,11 +22,6 @@ mmc0 = &sdio1; spi0 = &qspi; }; - - led1 { - compatible = "st,led1"; - led-gpio = <&gpioi 1 0>; - }; }; <dc {
arch/arm/dts/stm32f769-disco-u-boot.dtsi +0 -5
@@ -23,11 +23,6 @@ spi0 = &qspi; }; - led1 { - compatible = "st,led1"; - led-gpio = <&gpioj 5 0>; - }; - panel: panel { compatible = "orisetech,otm8009a"; reset-gpios = <&gpioj 15 1>;
board/st/stm32f746-disco/stm32f746-disco.c +0 -16
@@ -78,22 +78,6 @@ u32 spl_boot_device(void)int board_late_init (void ) { -struct gpio_desc gpio = {}; -int node; - - node =fdt_node_offset_by_compatible (gd->fdt_blob,0 ,"st,led1" ); -if (node <0 ) -return -1 ; - -gpio_request_by_name_nodev (offset_to_ofnode (node),"led-gpio" ,0 , &gpio, -GPIOD_IS_OUT ); - -if (dm_gpio_is_valid (&gpio)) { -dm_gpio_set_value (&gpio,0 ); -mdelay (10 ); -dm_gpio_set_value (&gpio,1 ); - } -return 0 ; }
Signature · 1 line
2.43.0
Re: [PATCH v2 2/3] ARM: dts: stm32: drop "st,led1" compatible
Quoted 83 lines · Dario Binacchi
It is pointless to use the custom compatible "st,led1" when
stm32746g-eval.dtsandstm32f769-disco.dtsalready contain the "gpio-leds" compatible, which is specifically used for GPIO LEDs management.Signed-off-by Dario Binacchi <[email protected]>---
Changes in v2:
- Drop leds node fromstm32f746-disco-u-boot.dtsiarch/arm/dts/stm32746g-eval-u-boot.dtsi | 5 ----- arch/arm/dts/stm32f746-disco-u-boot.dtsi | 5 ----- arch/arm/dts/stm32f769-disco-u-boot.dtsi | 5 ----- board/st/stm32f746-disco/stm32f746-disco.c | 16 ---------------- 4 files changed, 31 deletions(-)arch/arm/dts/stm32746g-eval-u-boot.dtsi +0
-5@@ -22,11 +22,6 @@ mmc0 = &sdio1; spi0 = &qspi; }; - - led1 { - compatible = "st,led1"; - led-gpio = <&gpiof 10 0>; - }; }; &fmc {arch/arm/dts/stm32f746-disco-u-boot.dtsi +0
-5@@ -22,11 +22,6 @@ mmc0 = &sdio1; spi0 = &qspi; }; - - led1 { - compatible = "st,led1"; - led-gpio = <&gpioi 1 0>; - }; }; <dc {arch/arm/dts/stm32f769-disco-u-boot.dtsi +0
-5@@ -23,11 +23,6 @@ spi0 = &qspi; }; - led1 { - compatible = "st,led1"; - led-gpio = <&gpioj 5 0>; - }; - panel: panel { compatible = "orisetech,otm8009a"; reset-gpios = <&gpioj 15 1>;board/st/stm32f746-disco/stm32f746-disco.c +0
-9@@ -78,22 +78,6 @@ u32 spl_boot_device(void)int board_late_init (void ) { -struct gpio_desc gpio = {}; -int node; - - node =fdt_node_offset_by_compatible (gd->fdt_blob,0 ,"st,led1" ); -if (node <0 ) -return -1 ; - -gpio_request_by_name_nodev (offset_to_ofnode (node),"led-gpio" ,0 , &gpio, -GPIOD_IS_OUT );
board/st/stm32f746-disco/stm32f746-disco.c u32 spl_boot_device(void) · line 83
Quoted 10 lines
board/st/stm32f746-disco/stm32f746-disco.c +0
-7- -if (dm_gpio_is_valid (&gpio)) { -dm_gpio_set_value (&gpio,0 ); -mdelay (10 ); -dm_gpio_set_value (&gpio,1 ); - } -return 0 ; }
Thanks
Patrice
Re: [PATCH v2 2/3] ARM: dts: stm32: drop "st,led1" compatible
Quoted 99 lines · Patrice CHOTARD
Quoted 83 lines · Dario Binacchi
It is pointless to use the custom compatible "st,led1" when
stm32746g-eval.dtsandstm32f769-disco.dtsalready contain the "gpio-leds" compatible, which is specifically used for GPIO LEDs management.Signed-off-by Dario Binacchi <[email protected]>---
Changes in v2:
- Drop leds node fromstm32f746-disco-u-boot.dtsiarch/arm/dts/stm32746g-eval-u-boot.dtsi | 5 ----- arch/arm/dts/stm32f746-disco-u-boot.dtsi | 5 ----- arch/arm/dts/stm32f769-disco-u-boot.dtsi | 5 ----- board/st/stm32f746-disco/stm32f746-disco.c | 16 ---------------- 4 files changed, 31 deletions(-)arch/arm/dts/stm32746g-eval-u-boot.dtsi +0
-5@@ -22,11 +22,6 @@ mmc0 = &sdio1; spi0 = &qspi; }; - - led1 { - compatible = "st,led1"; - led-gpio = <&gpiof 10 0>; - }; }; &fmc {arch/arm/dts/stm32f746-disco-u-boot.dtsi +0
-5@@ -22,11 +22,6 @@ mmc0 = &sdio1; spi0 = &qspi; }; - - led1 { - compatible = "st,led1"; - led-gpio = <&gpioi 1 0>; - }; }; <dc {arch/arm/dts/stm32f769-disco-u-boot.dtsi +0
-5@@ -23,11 +23,6 @@ spi0 = &qspi; }; - led1 { - compatible = "st,led1"; - led-gpio = <&gpioj 5 0>; - }; - panel: panel { compatible = "orisetech,otm8009a"; reset-gpios = <&gpioj 15 1>;board/st/stm32f746-disco/stm32f746-disco.c +0
-9@@ -78,22 +78,6 @@ u32 spl_boot_device(void)int board_late_init (void ) { -struct gpio_desc gpio = {}; -int node; - - node =fdt_node_offset_by_compatible (gd->fdt_blob,0 ,"st,led1" ); -if (node <0 ) -return -1 ; - -gpio_request_by_name_nodev (offset_to_ofnode (node),"led-gpio" ,0 , &gpio, -GPIOD_IS_OUT );board/st/stm32f746-disco/stm32f746-disco.c u32 spl_boot_device(void) · line 83
Quoted 10 lines
board/st/stm32f746-disco/stm32f746-disco.c +0
-7- -if (dm_gpio_is_valid (&gpio)) { -dm_gpio_set_value (&gpio,0 ); -mdelay (10 ); -dm_gpio_set_value (&gpio,1 ); - } -return 0 ; }Reviewed-by Patrice Chotard <[email protected]>
Quoted 2 lines
Thanks
Patrice
Applied to u-boot-stm32/next
Thanks
Patrice
PATCH v2 3/3 board: stm32f746-disco: drop board_late_init()
In reply to Dario BinacchiThe removal of the "st,button1" and "st,led1" compatibles has emptied the board_late_init(), so let's remove it along with the configuration that allows its invocation.
---
Changes in v2:
- Add Reviewed-by of Patrice Chotard
board/st/stm32f746-disco/stm32f746-disco.c | 5 ----- configs/stm32746g-eval_defconfig | 1 - configs/stm32746g-eval_spl_defconfig | 1 - configs/stm32f746-disco_defconfig | 1 - configs/stm32f746-disco_spl_defconfig | 1 - 5 files changed, 9 deletions(-)
board/st/stm32f746-disco/stm32f746-disco.c +0 -5
@@ -76,11 +76,6 @@ u32 spl_boot_device(void) }#endif -int board_late_init (void ) -{ -return 0 ; -} -int board_init (void ) {#ifdef CONFIG_ETH_DESIGNWARE
configs/stm32746g-eval_defconfig +0 -1
@@ -21,7 +21,6 @@ CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel" CONFIG_SYS_PBSIZE=1050 # CONFIG_DISPLAY_CPUINFO is not set -CONFIG_BOARD_LATE_INIT=y CONFIG_SYS_PROMPT="U-Boot > " CONFIG_CMD_GPT=y CONFIG_CMD_MMC=y
configs/stm32746g-eval_spl_defconfig +0 -1
@@ -30,7 +30,6 @@ CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel" CONFIG_SYS_PBSIZE=1050 # CONFIG_DISPLAY_CPUINFO is not set -CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_PAD_TO=0x9000 CONFIG_SPL_NO_BSS_LIMIT=y CONFIG_SPL_BOARD_INIT=y
configs/stm32f746-disco_defconfig +0 -1
@@ -21,7 +21,6 @@ CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel" CONFIG_SYS_PBSIZE=1050 # CONFIG_DISPLAY_CPUINFO is not set -CONFIG_BOARD_LATE_INIT=y CONFIG_SYS_PROMPT="U-Boot > " CONFIG_CMD_GPT=y CONFIG_CMD_MMC=y
configs/stm32f746-disco_spl_defconfig +0 -1
@@ -30,7 +30,6 @@ CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel" CONFIG_SYS_PBSIZE=1050 # CONFIG_DISPLAY_CPUINFO is not set -CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_PAD_TO=0x9000 CONFIG_SPL_NO_BSS_LIMIT=y CONFIG_SPL_BOARD_INIT=y
Signature · 1 line
2.43.0
Quoted 82 lines · Dario Binacchi
It is pointless to use the custom compatible "st,button1" when
stm32746g-eval.dtsandstm32f769-disco.dtsalready contain the "gpio-keys" compatible, which is specifically used for button management.Signed-off-by Dario Binacchi <[email protected]>---
Changes in v2:
- Drop gpio-keys node fromstm32f746-disco-u-boot.dtsiarch/arm/dts/stm32746g-eval-u-boot.dtsi | 5 ----- arch/arm/dts/stm32f746-disco-u-boot.dtsi | 5 ----- arch/arm/dts/stm32f769-disco-u-boot.dtsi | 5 ----- board/st/stm32f746-disco/stm32f746-disco.c | 15 --------------- 4 files changed, 30 deletions(-)arch/arm/dts/stm32746g-eval-u-boot.dtsi +0
-5@@ -23,11 +23,6 @@ spi0 = &qspi; }; - button1 { - compatible = "st,button1"; - button-gpio = <&gpioc 13 0>; - }; - led1 { compatible = "st,led1"; led-gpio = <&gpiof 10 0>;arch/arm/dts/stm32f746-disco-u-boot.dtsi +0
-5@@ -23,11 +23,6 @@ spi0 = &qspi; }; - button1 { - compatible = "st,button1"; - button-gpio = <&gpioi 11 0>; - }; - led1 { compatible = "st,led1"; led-gpio = <&gpioi 1 0>;arch/arm/dts/stm32f769-disco-u-boot.dtsi +0
-5@@ -23,11 +23,6 @@ spi0 = &qspi; }; - button1 { - compatible = "st,button1"; - button-gpio = <&gpioa 0 0>; - }; - led1 { compatible = "st,led1"; led-gpio = <&gpioj 5 0>;board/st/stm32f746-disco/stm32f746-disco.c +0
-8@@ -94,21 +94,6 @@ int board_late_init(void)dm_gpio_set_value (&gpio,1 ); } -/* read button 1*/ - node =fdt_node_offset_by_compatible (gd->fdt_blob,0 ,"st,button1" ); -if (node <0 ) -return -1 ; - -gpio_request_by_name_nodev (offset_to_ofnode (node),"button-gpio" ,0 , - &gpio,GPIOD_IS_IN ); -
board/st/stm32f746-disco/stm32f746-disco.c int board_late_init(void) · line 99
Quoted 10 lines
board/st/stm32f746-disco/stm32f746-disco.c +0
-7-if (dm_gpio_is_valid (&gpio)) { -if (dm_gpio_get_value (&gpio)) -puts ("usr button is at HIGH LEVEL\n" ); -else -puts ("usr button is at LOW LEVEL\n" ); - } -return 0 ; }
Thanks
Patrice
Quoted 97 lines · Patrice CHOTARD
Quoted 82 lines · Dario Binacchi
It is pointless to use the custom compatible "st,button1" when
stm32746g-eval.dtsandstm32f769-disco.dtsalready contain the "gpio-keys" compatible, which is specifically used for button management.Signed-off-by Dario Binacchi <[email protected]>---
Changes in v2:
- Drop gpio-keys node fromstm32f746-disco-u-boot.dtsiarch/arm/dts/stm32746g-eval-u-boot.dtsi | 5 ----- arch/arm/dts/stm32f746-disco-u-boot.dtsi | 5 ----- arch/arm/dts/stm32f769-disco-u-boot.dtsi | 5 ----- board/st/stm32f746-disco/stm32f746-disco.c | 15 --------------- 4 files changed, 30 deletions(-)arch/arm/dts/stm32746g-eval-u-boot.dtsi +0
-5@@ -23,11 +23,6 @@ spi0 = &qspi; }; - button1 { - compatible = "st,button1"; - button-gpio = <&gpioc 13 0>; - }; - led1 { compatible = "st,led1"; led-gpio = <&gpiof 10 0>;arch/arm/dts/stm32f746-disco-u-boot.dtsi +0
-5@@ -23,11 +23,6 @@ spi0 = &qspi; }; - button1 { - compatible = "st,button1"; - button-gpio = <&gpioi 11 0>; - }; - led1 { compatible = "st,led1"; led-gpio = <&gpioi 1 0>;arch/arm/dts/stm32f769-disco-u-boot.dtsi +0
-5@@ -23,11 +23,6 @@ spi0 = &qspi; }; - button1 { - compatible = "st,button1"; - button-gpio = <&gpioa 0 0>; - }; - led1 { compatible = "st,led1"; led-gpio = <&gpioj 5 0>;board/st/stm32f746-disco/stm32f746-disco.c +0
-8@@ -94,21 +94,6 @@ int board_late_init(void)dm_gpio_set_value (&gpio,1 ); } -/* read button 1*/ - node =fdt_node_offset_by_compatible (gd->fdt_blob,0 ,"st,button1" ); -if (node <0 ) -return -1 ; - -gpio_request_by_name_nodev (offset_to_ofnode (node),"button-gpio" ,0 , - &gpio,GPIOD_IS_IN ); -board/st/stm32f746-disco/stm32f746-disco.c int board_late_init(void) · line 99
Quoted 10 lines
board/st/stm32f746-disco/stm32f746-disco.c +0
-7-if (dm_gpio_is_valid (&gpio)) { -if (dm_gpio_get_value (&gpio)) -puts ("usr button is at HIGH LEVEL\n" ); -else -puts ("usr button is at LOW LEVEL\n" ); - } -return 0 ; }Reviewed-by Patrice Chotard <[email protected]>
Quoted 2 lines
Thanks
Patrice
Applied to u-boot-stm32/next
Thanks
Patrice
Quoted 100 lines · Patrice CHOTARD
Quoted 97 lines · Patrice CHOTARD
Quoted 82 lines · Dario Binacchi
It is pointless to use the custom compatible "st,button1" when
stm32746g-eval.dtsandstm32f769-disco.dtsalready contain the "gpio-keys" compatible, which is specifically used for button management.Signed-off-by Dario Binacchi <[email protected]>---
Changes in v2:
- Drop gpio-keys node fromstm32f746-disco-u-boot.dtsiarch/arm/dts/stm32746g-eval-u-boot.dtsi | 5 ----- arch/arm/dts/stm32f746-disco-u-boot.dtsi | 5 ----- arch/arm/dts/stm32f769-disco-u-boot.dtsi | 5 ----- board/st/stm32f746-disco/stm32f746-disco.c | 15 --------------- 4 files changed, 30 deletions(-)arch/arm/dts/stm32746g-eval-u-boot.dtsi +0
-5@@ -23,11 +23,6 @@ spi0 = &qspi; }; - button1 { - compatible = "st,button1"; - button-gpio = <&gpioc 13 0>; - }; - led1 { compatible = "st,led1"; led-gpio = <&gpiof 10 0>;arch/arm/dts/stm32f746-disco-u-boot.dtsi +0
-5@@ -23,11 +23,6 @@ spi0 = &qspi; }; - button1 { - compatible = "st,button1"; - button-gpio = <&gpioi 11 0>; - }; - led1 { compatible = "st,led1"; led-gpio = <&gpioi 1 0>;arch/arm/dts/stm32f769-disco-u-boot.dtsi +0
-5@@ -23,11 +23,6 @@ spi0 = &qspi; }; - button1 { - compatible = "st,button1"; - button-gpio = <&gpioa 0 0>; - }; - led1 { compatible = "st,led1"; led-gpio = <&gpioj 5 0>;board/st/stm32f746-disco/stm32f746-disco.c +0
-8@@ -94,21 +94,6 @@ int board_late_init(void)dm_gpio_set_value (&gpio,1 ); } -/* read button 1*/ - node =fdt_node_offset_by_compatible (gd->fdt_blob,0 ,"st,button1" ); -if (node <0 ) -return -1 ; - -gpio_request_by_name_nodev (offset_to_ofnode (node),"button-gpio" ,0 , - &gpio,GPIOD_IS_IN ); -board/st/stm32f746-disco/stm32f746-disco.c int board_late_init(void) · line 99
Quoted 10 lines
board/st/stm32f746-disco/stm32f746-disco.c +0
-7-if (dm_gpio_is_valid (&gpio)) { -if (dm_gpio_get_value (&gpio)) -puts ("usr button is at HIGH LEVEL\n" ); -else -puts ("usr button is at LOW LEVEL\n" ); - } -return 0 ; }Reviewed-by Patrice Chotard <[email protected]>
Quoted 6 lines
Quoted 2 lines
Thanks
PatriceApplied to u-boot-stm32/next
Thanks
Patrice
Applied to u-boot-stm32/next
Thanks
Patrice