GE Board cleanups
Subsystems (2)
cover GE Board cleanups
Hi,
This series contains a collection of cleanups and fixes for the GE boards. They are mostly independent patches, but all of them just touch the GE boards so I grouped them together:
PATCH 1-3: Update/Create MAINTAINERS files for all GE boards PATCH 4: Fix regression due to recent device tree change PATCH 5: Fix NFS config bug for Bx50v3
PATCH 6-7: simple cleanups without functional change PATCH 8: slightly reduce the valid VPD size in the EEPROM PATCH 9: support b850v3 watchdog reboot detection
Thanks,
-- Sebastian
Ian Ray (3):
board: ge: bx50v3: correct CONFIG_CMD_NFS
board: ge: reduce VPD EEPROM partition size
board: ge: bx50v3: check b850v3 power management watchdog
Sebastian Reichel (6):
board: ge: bx50v3: Update MAINTAINERS
board: ge: ppd: Update MAINTAINERS
board: ge: b1x5v2: Add MAINTAINERS
board: ge: common: vpd: fix name
board: ge: bx50v3: drop unused pinmux defines
board: ge: bx50v3: reduce magic numbers
arch/arm/dts/imx53-ppd-uboot.dtsi | 2 +- arch/arm/dts/imx6q-bx50v3-uboot.dtsi | 2 +- board/ge/b1x5v2/MAINTAINERS | 9 +++++ board/ge/bx50v3/MAINTAINERS | 11 +++-- board/ge/bx50v3/bx50v3.c | 60 +++++++++++----------------- board/ge/common/vpd_reader.c | 2 +- board/ge/mx53ppd/MAINTAINERS | 10 +++-- include/configs/ge_bx50v3.h | 8 ++-- 8 files changed, 53 insertions(+), 51 deletions(-) create mode 100644 board/ge/b1x5v2/MAINTAINERS
Signature · 1 line
2.28.0
PATCH 1/9 board: ge: bx50v3: Update MAINTAINERS
This updates the Bx50v3 MAINTAINERS file, so that it also catches changes to the related device tree files. Additionally the list of files has been sorted alphabetically and I added myself as maintainer.
--- board/ge/bx50v3/MAINTAINERS | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
board/ge/bx50v3/MAINTAINERS +8 -3
@@ -1,9 +1,14 @@ -GE_BX50V3 BOARD +GE BX50V3 BOARD M: Ian Ray <[email protected]> +M: Sebastian Reichel <[email protected]> S: Maintained +F: arch/arm/dts/imx6q-b450v3.dts +F: arch/arm/dts/imx6q-b650v3.dts +F: arch/arm/dts/imx6q-b850v3.dts +F: arch/arm/dts/imx6q-bx50v3* F: board/ge/bx50v3/ -F: include/configs/ge_bx50v3.h -F: configs/ge_bx50v3_defconfig F: configs/ge_b450v3_defconfig F: configs/ge_b650v3_defconfig F: configs/ge_b850v3_defconfig +F: configs/ge_bx50v3_defconfig +F: include/configs/ge_bx50v3.h
Signature · 1 line
2.28.0
PATCH 2/9 board: ge: ppd: Update MAINTAINERS
In reply to Sebastian ReichelThis updates the PPD MAINTAINERS file doing a couple of changes:
* Replace Martyn with myself, since he no longer has the hardware available and add Ian Ray as maintainer
* Fix the board directory path, which was still listing freescale/ instead of ge/
* Order the list of files alphabetically
* Add board specific device tree files to the file list
--- board/ge/mx53ppd/MAINTAINERS | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
board/ge/mx53ppd/MAINTAINERS +6 -4
@@ -1,7 +1,9 @@ -MX53PPD BOARD +GE PPD BOARD M: Antti M?entausta <[email protected]> -M: Martyn Welch <[email protected]> +M: Ian Ray <[email protected]> +M: Sebastian Reichel <[email protected]> S: Maintained -F: board/freescale/mx53ppd/ -F: include/configs/mx53ppd.h +F: arch/arm/dts/imx53-ppd* +F: board/ge/mx53ppd/ F: configs/mx53ppd_defconfig +F: include/configs/mx53ppd.h
Signature · 1 line
2.28.0
PATCH 2/9 board: ge: ppd: Update MAINTAINERS
Quoted 9 lines · Sebastian Reichel
This updates the PPD
MAINTAINERSfile doing a couple of changes:* Replace Martyn with myself, since he no longer has the hardware available and add Ian Ray as maintainer
* Fix the board directory path, which was still listing freescale/ instead of ge/
* Order the list of files alphabetically
* Add board specific device tree files to the file list
Quoted 3 lines
Cc Martyn Welch <[email protected]>Cc Ian Ray <[email protected]>Signed-off-by Sebastian Reichel <[email protected]>
Quoted 23 lines
--- board/ge/mx53ppd/MAINTAINERS | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)board/ge/mx53ppd/MAINTAINERS +6
-4@@ -1,7 +1,9 @@ -MX53PPD BOARD +GE PPD BOARD M: Antti M?entausta <[email protected]> -M: Martyn Welch <[email protected]> +M: Ian Ray <[email protected]> +M: Sebastian Reichel <[email protected]> S: Maintained -F: board/freescale/mx53ppd/ -F: include/configs/mx53ppd.h +F: arch/arm/dts/imx53-ppd* +F: board/ge/mx53ppd/ F: configs/mx53ppd_defconfig +F: include/configs/mx53ppd.h
PATCH 3/9 board: ge: b1x5v2: Add MAINTAINERS
In reply to Sebastian ReichelIntroduce maintainers file for the GE B1x5 board.
--- board/ge/b1x5v2/MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 board/ge/b1x5v2/MAINTAINERS
board/ge/b1x5v2/MAINTAINERS new file +9 -0
@@ -0,0 +1,9 @@ +GE B1X5V2 BOARD +M: Huan 'Kitty' Wang <[email protected]> +M: Ian Ray <[email protected]> +M: Sebastian Reichel <[email protected]> +S: Maintained +F: arch/arm/dts/imx6dl-b1x5v2.dts +F: board/ge/b1x5v2/ +F: configs/ge_b1x5v2_defconfig +F: include/configs/ge_b1x5v2.h
Signature · 1 line
2.28.0
PATCH 4/9 board: ge: common: vpd: fix name
In reply to Sebastian ReichelCommit f692b479f02d changed the VPD partition name from "vpd" to "vpd at 0". Fix the VPD reader code to use the new name, so that the VPD code keeps working.
--- board/ge/common/vpd_reader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/ge/common/vpd_reader.c +1 -1
@@ -209,7 +209,7 @@ int read_i2c_vpd(struct vpd_cache *cache,u8 *data;int size; - ret =uclass_get_device_by_name (UCLASS_I2C_EEPROM ,"vpd" , &dev); + ret =uclass_get_device_by_name (UCLASS_I2C_EEPROM ,"vpd at 0" , &dev);if (ret)return ret;
Signature · 1 line
2.28.0
PATCH 4/9 board: ge: common: vpd: fix name
Quoted 5 lines
Commit
f692b479f02dchanged the VPD partition name from "vpd" to "vpd at 0". Fix the VPD reader code to use the new name, so that the VPD code keeps working.Fixes f692b479f02d ("i2c: eeprom: Use reg property instead of offset and size")Signed-off-by Sebastian Reichel <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 5/9 board: ge: bx50v3: correct CONFIG_CMD_NFS
In reply to Sebastian ReichelFrom: Ian Ray <[email protected]>
Fix typo in NFS command configuration check.
--- include/configs/ge_bx50v3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/ge_bx50v3.h +2 -2
@@ -48,7 +48,7 @@#define CONFIG_LOADADDR 0x12000000 -#ifdef CONFIG_NFS_CMD +#ifdef CONFIG_CMD_NFS #define NETWORKBOOT \ "setnetworkboot=" \ "setenv ipaddr 172.16.2.10; setenv serverip 172.16.2.20; " \
@@ -130,7 +130,7 @@#define CONFIG_USBBOOTCOMMAND \ "echo Unsupported; " \ -#ifdef CONFIG_NFS_CMD +#ifdef CONFIG_CMD_NFS #define CONFIG_BOOTCOMMAND CONFIG_NETWORKBOOTCOMMAND#elif CONFIG_CMD_USB #define CONFIG_BOOTCOMMAND CONFIG_USBBOOTCOMMAND
Signature · 1 line
2.28.0
PATCH 5/9 board: ge: bx50v3: correct CONFIG_CMD_NFS
Quoted 4 lines
From: Ian Ray <[email protected]>
Fix typo in NFS command configuration check.Signed-off-by Ian Ray <[email protected]>Signed-off-by Sebastian Reichel <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 6/9 board: ge: bx50v3: drop unused pinmux defines
In reply to Sebastian ReichelRemove pinmux defines, that are no longer used after converting the code to devicetree.
--- board/ge/bx50v3/bx50v3.c | 15 --------------- 1 file changed, 15 deletions(-)
board/ge/bx50v3/bx50v3.c +0 -15
@@ -50,21 +50,6 @@ static struct vpd_cache vpd; PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | \ PAD_CTL_HYS) -#define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | PAD_CTL_PUE | \ - PAD_CTL_SPEED_HIGH | PAD_CTL_DSE_48ohm | PAD_CTL_SRE_FAST) - -#define ENET_CLK_PAD_CTRL (PAD_CTL_SPEED_MED | \ - PAD_CTL_DSE_120ohm | PAD_CTL_SRE_FAST) - -#define ENET_RX_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ - PAD_CTL_SPEED_HIGH | PAD_CTL_SRE_FAST) - -#define I2C_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ - PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ - PAD_CTL_ODE | PAD_CTL_SRE_FAST) - -#define I2C_PAD MUX_PAD_CTRL(I2C_PAD_CTRL) -int dram_init (void ) { gd->ram_size =imx_ddr_size ();
Signature · 1 line
2.28.0
PATCH 6/9 board: ge: bx50v3: drop unused pinmux defines
Quoted 3 lines
Remove pinmux defines, that are no longer used after converting the code to devicetree.
Signed-off-by Sebastian Reichel <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 7/9 board: ge: bx50v3: reduce magic numbers
In reply to Sebastian ReichelUse VPD product ID instead of confidx, so that we can easily reuse the product ID defines and avoid some magic numbers.
--- board/ge/bx50v3/bx50v3.c | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-)
board/ge/bx50v3/bx50v3.c +7 -21
@@ -43,7 +43,11 @@DECLARE_GLOBAL_DATA_PTR ; -static int confidx;/* Default to generic. */ +#define VPD_PRODUCT_B850 1 +#define VPD_PRODUCT_B650 2 +#define VPD_PRODUCT_B450 3 + +static int productid;/* Default to generic. */ static struct vpd_cache vpd;#define NC_PAD_CTRL (PAD_CTL_PUS_100K_UP | \
@@ -112,7 +116,7 @@ static void do_enable_hdmi(struct display_info_t const *dev)static int is_b850v3 (void ) { -return confidx ==3 ; +return productid ==VPD_PRODUCT_B850 ; }static int detect_lcd (struct display_info_t const *dev)
@@ -299,9 +303,6 @@ int overwrite_console(void)#define VPD_TYPE_INVALID 0x00#define VPD_BLOCK_NETWORK 0x20#define VPD_BLOCK_HWID 0x44 -#define VPD_PRODUCT_B850 1 -#define VPD_PRODUCT_B650 2 -#define VPD_PRODUCT_B450 3#define VPD_HAS_MAC1 0x1#define VPD_HAS_MAC2 0x2#define VPD_MAC_ADDRESS_LENGTH 6
@@ -397,28 +398,13 @@ int board_early_init_f(void)return 0 ; } -static void set_confidx (const struct vpd_cache * vpd) -{ -switch (vpd->product_id) { -case VPD_PRODUCT_B450 : - confidx =1 ; -break ; -case VPD_PRODUCT_B650 : - confidx =2 ; -break ; -case VPD_PRODUCT_B850 : - confidx =3 ; -break ; - } -} -int board_init (void ) {if (!read_i2c_vpd (&vpd, vpd_callback)) {int ret, rescan; vpd.is_read = true; -set_confidx (&vpd); + productid = vpd.product_id; ret =fdtdec_resetup (&rescan);if (!ret && rescan) {
Signature · 1 line
2.28.0
PATCH 7/9 board: ge: bx50v3: reduce magic numbers
Quoted 3 lines
Use VPD product ID instead of confidx, so that we can easily reuse the product ID defines and avoid some magic numbers.
Signed-off-by Sebastian Reichel <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 8/9 board: ge: reduce VPD EEPROM partition size
In reply to Sebastian ReichelFrom: Ian Ray <[email protected]>
Reduce vital product data size to match the latest specification.
--- arch/arm/dts/imx53-ppd-uboot.dtsi | 2 +- arch/arm/dts/imx6q-bx50v3-uboot.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/dts/imx53-ppd-uboot.dtsi +1 -1
@@ -28,7 +28,7 @@ #size-cells = <1>; vpd at 0 { - reg = <0 1022>; + reg = <0 800>; }; bootcount: bootcount at 1022 {
arch/arm/dts/imx6q-bx50v3-uboot.dtsi +1 -1
@@ -27,7 +27,7 @@ #size-cells = <1>; vpd at 0 { - reg = <0 1022>; + reg = <0 800>; }; bootcount: bootcount {
Signature · 1 line
2.28.0
PATCH 8/9 board: ge: reduce VPD EEPROM partition size
Quoted 4 lines
From: Ian Ray <[email protected]>
Reduce vital product data size to match the latest specification.Signed-off-by Ian Ray <[email protected]>Signed-off-by Sebastian Reichel <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 9/9 board: ge: bx50v3: check b850v3 power management watchdog
In reply to Sebastian ReichelFrom: Ian Ray <[email protected]>
Set `bootcause' from b850v3 power management watchdog status.
Boot cause "REVERT" is no longer used, remove it.
--- board/ge/bx50v3/bx50v3.c | 17 +++++++++++++++++ include/configs/ge_bx50v3.h | 4 +--- 2 files changed, 18 insertions(+), 3 deletions(-)
board/ge/bx50v3/bx50v3.c +17 -0
@@ -384,6 +384,7 @@ static iomux_v3_cfg_t const misc_pads[] = { MX6_PAD_GPIO_9__WDOG1_B | MUX_PAD_CTRL(NC_PAD_CTRL), };#define SUS_S3_OUT IMX_GPIO_NR(4, 11) +#define PWGIN_IN IMX_GPIO_NR(4, 14)#define WIFI_EN IMX_GPIO_NR(6, 14)int board_early_init_f (void )
@@ -416,6 +417,9 @@ int board_init(void)gpio_request (SUS_S3_OUT ,"sus_s3_out" );gpio_direction_output (SUS_S3_OUT ,1 ); +gpio_request (PWGIN_IN ,"pwgin_in" ); +gpio_direction_input (PWGIN_IN ); +gpio_request (WIFI_EN ,"wifi_en" );gpio_direction_output (WIFI_EN ,1 );
@@ -465,6 +469,17 @@ void pmic_init(void) } } +static void detect_boot_cause (void ) +{ +const char *cause ="POR" ; + +if (is_b850v3 ()) +if (!gpio_get_value (PWGIN_IN )) + cause ="PM_WDOG" ; + +env_set ("bootcause" , cause); +} +int board_late_init (void ) {process_vpd (&vpd);
@@ -478,6 +493,8 @@ int board_late_init(void)else env_set ("videoargs" ,"video=LVDS-1:1024x768 at 65" ); +detect_boot_cause (); +/* board specific pmic init */ pmic_init ();
include/configs/ge_bx50v3.h +1 -3
@@ -56,7 +56,7 @@"setenv netmask 255.255.255.0; setenv ethaddr ca:fe:de:ca:f0:11; " \"setenv bootargs root=/dev/nfs nfsroot=${nfsserver}:/srv/nfs/,v3,tcp rw rootwait" \"setenv bootargs $bootargs ip=${ipaddr}:${nfsserver}:${gatewayip}:${netmask}::eth0:off " \ -"setenv bootargs $bootargs cma=128M bootcause=POR ${videoargs} " \ +"setenv bootargs $bootargs cma=128M bootcause=${bootcause} ${videoargs} " \"setenv bootargs $bootargs systemd.mask=helix-network-defaults.service " \"setenv bootargs $bootargs watchdog.handle_boot_enabled=1\0" \"networkboot=" \
@@ -74,7 +74,6 @@#define CONFIG_EXTRA_ENV_SETTINGS \ NETWORKBOOT \ - "bootcause=POR\0" \ "image=/boot/fitImage\0" \ "dev=mmc\0" \ "devnum=2\0" \
@@ -104,7 +103,6 @@"setenv partnum 1; run hasfirstboot || setenv partnum 2; " \"run hasfirstboot || setenv partnum 0; " \"if test ${partnum} != 0; then " \ -"setenv bootcause REVERT; " \"run swappartitions loadimage doboot; " \"fi; " \"run failbootcmd\0" \
Signature · 1 line
2.28.0
PATCH 9/9 board: ge: bx50v3: check b850v3 power management watchdog
Quoted 5 lines
From: Ian Ray <[email protected]>
Set `bootcause' from b850v3 power management watchdog status. Boot cause "REVERT" is no longer used, remove it.Signed-off-by Ian Ray <[email protected]>Signed-off-by Sebastian Reichel <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================