omap3_beagle: configs: improve BOOT_CMD options
cover omap3_beagle: configs: improve BOOT_CMD options
With the latest transition to device tree, there is a need to simplify the load of device tree depending on board type etc. While at it, simplify few other changes as well.
Testing:
with a uEnv.txt as:
bootdir=/
bootpart=0:1
The following were the boot results:
Beagle (rev C1D): http://pastebin.com/fMdsKkgr
Beagle XM (rev C1): http://pastebin.com/p1zp9AhG
Nishanth Menon (5):
omap3_beagle: remove JFFS2 support.
omap3_beagle: replace uImage.beagle with generic uImage
omap3_beagle: enable CMD_FS_GENERIC and simplify load of
image/ramdisk
omap3_beagle: support findfdt and loadfdt for devicetree support
omap3_beagle: support booting from zImage and device tree as last
option
include/configs/omap3_beagle.h | 46 ++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 13 deletions(-)
Regards,
Nishanth Menon
Signature · 1 line
1.7.9.5
PATCH 1/5 omap3_beagle: remove JFFS2 support.
We do not use JFFS2 by default and it conflicts with CONFIG_CMD_FS_GENERIC (ls command is the same). Since most of our BOOTCMD can be simplified by using the FS_GENERIC, dropping JFFS2
--- include/configs/omap3_beagle.h | 8 -------- 1 file changed, 8 deletions(-)
include/configs/omap3_beagle.h +0 -8
@@ -150,7 +150,6 @@#define CONFIG_CMD_CACHE #define CONFIG_CMD_EXT2 /* EXT2 Support */ #define CONFIG_CMD_FAT /* FAT support */ -#define CONFIG_CMD_JFFS2 /* JFFS2 Support */ #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define MTDIDS_DEFAULT "nand0=nand"
@@ -203,13 +202,6 @@#define CONFIG_SYS_MAX_NAND_DEVICE 1/* Max number of NAND */ /* devices */ -#define CONFIG_JFFS2_NAND -/* nand device jffs2 lives on */ -#define CONFIG_JFFS2_DEV "nand0" -/* start of jffs2 partition */ -#define CONFIG_JFFS2_PART_OFFSET 0x680000 -#define CONFIG_JFFS2_PART_SIZE 0xf980000/* size of jffs2 */ -/* partition */ /* Environment information */ #define CONFIG_BOOTDELAY 3
Signature · 1 line
1.7.9.5
PATCH 1/5 omap3_beagle: remove JFFS2 support.
Quoted 22 lines · Nishanth Menon
We do not use JFFS2 by default and it conflicts with
CONFIG_CMD_FS_GENERIC(ls command is the same). Since most of our BOOTCMD can be simplified by using theFS_GENERIC, dropping JFFS2Signed-off-by Nishanth Menon <[email protected]>--- include/configs/omap3_beagle.h | 8 -------- 1 file changed, 8 deletions(-)include/configs/omap3_beagle.h +0
-1@@ -150,7 +150,6 @@#define CONFIG_CMD_CACHE #define CONFIG_CMD_EXT2 /* EXT2 Support */ #define CONFIG_CMD_FAT /* FAT support */ -#define CONFIG_CMD_JFFS2 /* JFFS2 Support */ #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define MTDIDS_DEFAULT "nand0=nand"
include/configs/omap3_beagle.h line 205
Quoted 10 lines
include/configs/omap3_beagle.h +0
-6@@ -203,13 +202,6 @@#define CONFIG_SYS_MAX_NAND_DEVICE 1/* Max number of NAND */ /* devices */ -#define CONFIG_JFFS2_NAND -/* nand device jffs2 lives on */ -#define CONFIG_JFFS2_DEV "nand0" -/* start of jffs2 partition */ -#define CONFIG_JFFS2_PART_OFFSET 0x680000 -#define CONFIG_JFFS2_PART_SIZE 0xf980000/* size of jffs2 */
Minor nit, can we perhaps leave the JFFS configuration and only remove/comment CONFIG_CMD_JFFS. That way we wont lose these paritition offsets/size for folks who might need them.
Otherwise,
Thanks,
-Joel
PATCH 1/5 omap3_beagle: remove JFFS2 support.
Quoted 24 lines · Joel Fernandes
Quoted 23 lines · Nishanth Menon
We do not use JFFS2 by default and it conflicts with
CONFIG_CMD_FS_GENERIC(ls command is the same). Since most of our BOOTCMD can be simplified by using theFS_GENERIC, dropping JFFS2Signed-off-by Nishanth Menon <[email protected]>--- include/configs/omap3_beagle.h | 8 -------- 1 file changed, 8 deletions(-)include/configs/omap3_beagle.h +0
-1@@ -150,7 +150,6 @@#define CONFIG_CMD_CACHE #define CONFIG_CMD_EXT2 /* EXT2 Support */ #define CONFIG_CMD_FAT /* FAT support */ -#define CONFIG_CMD_JFFS2 /* JFFS2 Support */ #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define MTDIDS_DEFAULT "nand0=nand"@@ -203,13 +202,6 @@
Quoted 13 lines
include/configs/omap3_beagle.h line 205
Quoted 9 lines
include/configs/omap3_beagle.h +0
-6#define CONFIG_SYS_MAX_NAND_DEVICE 1/* Max number of NAND */ /* devices */ -#define CONFIG_JFFS2_NAND -/* nand device jffs2 lives on */ -#define CONFIG_JFFS2_DEV "nand0" -/* start of jffs2 partition */ -#define CONFIG_JFFS2_PART_OFFSET 0x680000 -#define CONFIG_JFFS2_PART_SIZE 0xf980000/* size of jffs2 */ Minor nit, can we perhaps leave the JFFS configuration and only remove/comment
CONFIG_CMD_JFFS. That way we wont lose these paritition offsets/size for folks who might need them.
then we have to drop the usage of FS_GENERIC. code wont build with both.
There is no point in keeping something as an option if it cant be used. dont you agree?
Signature · 2 lines
Regards, Nishanth Menon
PATCH 1/5 omap3_beagle: remove JFFS2 support.
Quoted 38 lines · Nishanth Menon
Quoted 24 lines · Joel Fernandes
Quoted 23 lines · Nishanth Menon
We do not use JFFS2 by default and it conflicts with
CONFIG_CMD_FS_GENERIC(ls command is the same). Since most of our BOOTCMD can be simplified by using theFS_GENERIC, dropping JFFS2Signed-off-by Nishanth Menon <[email protected]>--- include/configs/omap3_beagle.h | 8 -------- 1 file changed, 8 deletions(-)include/configs/omap3_beagle.h +0
-1@@ -150,7 +150,6 @@#define CONFIG_CMD_CACHE #define CONFIG_CMD_EXT2 /* EXT2 Support */ #define CONFIG_CMD_FAT /* FAT support */ -#define CONFIG_CMD_JFFS2 /* JFFS2 Support */ #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define MTDIDS_DEFAULT "nand0=nand"@@ -203,13 +202,6 @@Quoted 13 lines
include/configs/omap3_beagle.h line 205
Quoted 9 lines
include/configs/omap3_beagle.h +0
-6#define CONFIG_SYS_MAX_NAND_DEVICE 1/* Max number of NAND */ /* devices */ -#define CONFIG_JFFS2_NAND -/* nand device jffs2 lives on */ -#define CONFIG_JFFS2_DEV "nand0" -/* start of jffs2 partition */ -#define CONFIG_JFFS2_PART_OFFSET 0x680000 -#define CONFIG_JFFS2_PART_SIZE 0xf980000/* size of jffs2 */ Minor nit, can we perhaps leave the JFFS configuration and only remove/comment
CONFIG_CMD_JFFS. That way we wont lose these paritition offsets/size for folks who might need them.
Quoted 1 line
then we have to drop the usage of
FS_GENERIC. code wont build with both.
No I meant drop CMD_JFFS but not the other JFFS.
Quoted 2 lines
There is no point in keeping something as an option if it cant be used. dont you agree?
Either way is OK with me, you have a point too.
Thanks,
-Joel
PATCH 1/5 omap3_beagle: remove JFFS2 support.
Quoted 39 lines · Joel Fernandes
Quoted 38 lines · Nishanth Menon
Quoted 37 lines · Joel Fernandes
Quoted 22 lines · Nishanth Menon
We do not use JFFS2 by default and it conflicts with
CONFIG_CMD_FS_GENERIC(ls command is the same). Since most of our BOOTCMD can be simplified by using theFS_GENERIC, dropping JFFS2Signed-off-by Nishanth Menon <[email protected]>--- include/configs/omap3_beagle.h | 8 -------- 1 file changed, 8 deletions(-)include/configs/omap3_beagle.h +0
-1@@ -150,7 +150,6 @@#define CONFIG_CMD_CACHE #define CONFIG_CMD_EXT2 /* EXT2 Support */ #define CONFIG_CMD_FAT /* FAT support */ -#define CONFIG_CMD_JFFS2 /* JFFS2 Support */ #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define MTDIDS_DEFAULT "nand0=nand"include/configs/omap3_beagle.h line 205
Quoted 10 lines
include/configs/omap3_beagle.h +0
-6@@ -203,13 +202,6 @@#define CONFIG_SYS_MAX_NAND_DEVICE 1/* Max number of NAND */ /* devices */ -#define CONFIG_JFFS2_NAND -/* nand device jffs2 lives on */ -#define CONFIG_JFFS2_DEV "nand0" -/* start of jffs2 partition */ -#define CONFIG_JFFS2_PART_OFFSET 0x680000 -#define CONFIG_JFFS2_PART_SIZE 0xf980000/* size of jffs2 */ Minor nit, can we perhaps leave the JFFS configuration and only remove/comment
CONFIG_CMD_JFFS. That way we wont lose these paritition offsets/size for folks who might need them.
Quoted 3 lines
Quoted 1 line
then we have to drop the usage of
FS_GENERIC. code wont build with both.No I meant drop
CMD_JFFSbut not the other JFFS.
Those wont come into play unless CMD_JFFS2 is enabled, and as stated, makes no sense to keep the second part around and trick some poor bloke into thinking CMD_JFFS2 was left out by mistake..
Quoted 5 lines
Quoted 3 lines
There is no point in keeping something as an option if it cant be used. dont you agree?
Either way is OK with me, you have a point too.
OK, will take this to mean that you are ok with the patch as is. Thanks for the review.
Signature · 2 lines
Regards, Nishanth Menon
PATCH 2/5 omap3_beagle: replace uImage.beagle with generic uImage
In reply to Nishanth Menone682930867f7dfc4a01784fe452fad9e962d65a
(BeagleBoard: config: use uImage.beagle for tftp)
Introduced uImage.beagle which does not happen to be default output file of Linux kernel build make uImage (output is uImage).
So, replace uImage.beagle with uImage
--- include/configs/omap3_beagle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/omap3_beagle.h +1 -1
@@ -210,7 +210,7 @@"loadaddr=0x80200000\0" \"rdaddr=0x81000000\0" \"usbtty=cdc_acm\0" \ -"bootfile=uImage.beagle\0" \ +"bootfile=uImage\0" \"console=ttyO2,115200n8\0" \"mpurate=auto\0" \"buddy=none\0" \
Signature · 1 line
1.7.9.5
PATCH 3/5 omap3_beagle: enable CMD_FS_GENERIC and simplify load of image/ramdisk
In reply to Nishanth MenonCMD_FS_GENERIC allows us to simplify where we load up our image from either from ext2/fat etc. So, lets use that instead of cumbersome options we currently use. Sticking with existing conventions, defaults will be:
ramdisk=ramdisk.gz
bootpart=0:2 (second partition)
bootdir=/boot (/boot in second partition)
This matches with the default behavior, these can be overriden by env files as needed.
--- include/configs/omap3_beagle.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
include/configs/omap3_beagle.h +7 -4
@@ -150,6 +150,7 @@#define CONFIG_CMD_CACHE #define CONFIG_CMD_EXT2 /* EXT2 Support */ #define CONFIG_CMD_FAT /* FAT support */ +#define CONFIG_CMD_FS_GENERIC /* Generic FS support */ #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define MTDIDS_DEFAULT "nand0=nand"
@@ -211,6 +212,9 @@"rdaddr=0x81000000\0" \"usbtty=cdc_acm\0" \"bootfile=uImage\0" \ +"ramdisk=ramdisk.gz\0" \ +"bootdir=/boot\0" \ +"bootpart=0:2\0" \"console=ttyO2,115200n8\0" \"mpurate=auto\0" \"buddy=none\0" \
@@ -259,9 +263,8 @@"omapdss.def_disp=${defaultdisplay} " \"root=${ramroot} " \"rootfstype=${ramrootfstype}\0" \ -"loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ -"loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ -"loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage\0" \ +"loadramdisk=load mmc ${bootpart} ${rdaddr} ${bootdir}/${ramdisk}\0" \ +"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \"mmcboot=echo Booting from mmc ...; " \"run mmcargs; " \"bootm ${loadaddr}\0" \
@@ -293,7 +296,7 @@"echo Running uenvcmd ...;" \"run uenvcmd;" \"fi;" \ -"if run loaduimage; then " \ +"if run loadimage; then " \"run mmcboot;" \"fi;" \"fi;" \
Signature · 1 line
1.7.9.5
v2 cover omap3_beagle: configs: improve BOOT_CMD options
With the latest transition to device tree, there is a need to simplify the load of device tree depending on board type etc. While at it, simplify few other changes as well.
Testing:
with a uEnv.txt as:
bootdir=/
bootpart=0:1
The following were the boot results:
Beagle (rev C1D): http://pastebin.com/fMdsKkgr
Beagle XM (rev C1): http://pastebin.com/p1zp9AhG
Changes in V2 since v1:
- removed xMB version support based on review comments. http://marc.info/?t=137357970500004&r=1&w=2&n=5
V1: http://marc.info/?l=u-boot&m=137357963227510&w=2
Nishanth Menon (6):
omap3_beagle: remove JFFS2 support.
omap3_beagle: replace uImage.beagle with generic uImage
beagleboard: remove RevB support for BeagleBoard Xm
omap3_beagle: enable CMD_FS_GENERIC and simplify load of
image/ramdisk
omap3_beagle: support findfdt and loadfdt for devicetree support
omap3_beagle: support booting from zImage and device tree as last
option
board/ti/beagle/beagle.c | 28 ++++++------------------ board/ti/beagle/beagle.h | 3 +-- include/configs/omap3_beagle.h | 46 ++++++++++++++++++++++++++++------------ 3 files changed, 41 insertions(+), 36 deletions(-)
Regards,
Nishanth Menon
Signature · 1 line
1.7.9.5
PATCH v2 1/6 omap3_beagle: remove JFFS2 support.
We do not use JFFS2 by default and it conflicts with CONFIG_CMD_FS_GENERIC (ls command is the same). Since most of our BOOTCMD can be simplified by using the FS_GENERIC, dropping JFFS2
--- include/configs/omap3_beagle.h | 8 -------- 1 file changed, 8 deletions(-)
include/configs/omap3_beagle.h +0 -8
@@ -150,7 +150,6 @@#define CONFIG_CMD_CACHE #define CONFIG_CMD_EXT2 /* EXT2 Support */ #define CONFIG_CMD_FAT /* FAT support */ -#define CONFIG_CMD_JFFS2 /* JFFS2 Support */ #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define MTDIDS_DEFAULT "nand0=nand"
@@ -203,13 +202,6 @@#define CONFIG_SYS_MAX_NAND_DEVICE 1/* Max number of NAND */ /* devices */ -#define CONFIG_JFFS2_NAND -/* nand device jffs2 lives on */ -#define CONFIG_JFFS2_DEV "nand0" -/* start of jffs2 partition */ -#define CONFIG_JFFS2_PART_OFFSET 0x680000 -#define CONFIG_JFFS2_PART_SIZE 0xf980000/* size of jffs2 */ -/* partition */ /* Environment information */ #define CONFIG_BOOTDELAY 3
Signature · 1 line
1.7.9.5
PATCH v2 2/6 omap3_beagle: replace uImage.beagle with generic uImage
In reply to Nishanth Menone682930867f7dfc4a01784fe452fad9e962d65a
(BeagleBoard: config: use uImage.beagle for tftp)
Introduced uImage.beagle which does not happen to be default output file of Linux kernel build make uImage (output is uImage).
So, replace uImage.beagle with uImage
--- include/configs/omap3_beagle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/omap3_beagle.h +1 -1
@@ -210,7 +210,7 @@"loadaddr=0x80200000\0" \"rdaddr=0x81000000\0" \"usbtty=cdc_acm\0" \ -"bootfile=uImage.beagle\0" \ +"bootfile=uImage\0" \"console=ttyO2,115200n8\0" \"mpurate=auto\0" \"buddy=none\0" \
Signature · 1 line
1.7.9.5
PATCH v2 3/6 beagleboard: remove RevB support for BeagleBoard Xm
In reply to Nishanth MenonAs reported in http://marc.info/?l=u-boot&m=137358037827735&w=2
There is no need for the "xMB" variant, as the gpio pins used for identification where never changed from the xMA when the newer silcon was used for the xMB, So rename XM A revision as AB revision and report accordingly
--- board/ti/beagle/beagle.c | 28 +++++++--------------------- board/ti/beagle/beagle.h | 3 +-- 2 files changed, 8 insertions(+), 23 deletions(-)
board/ti/beagle/beagle.c +7 -21
@@ -182,8 +182,7 @@ void get_board_mem_timings(struct board_sdrc_timings *timings) timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;break ; } -case REVISION_XM_A : -case REVISION_XM_B : +case REVISION_XM_AB :case REVISION_XM_C :if (pop_mfr ==0 ) {/* 256MB DDR */
@@ -256,8 +255,7 @@ static void beagle_display_init(void)case REVISION_C4 :omap3_dss_panel_config (&dvid_cfg);break ; -case REVISION_XM_A : -case REVISION_XM_B : +case REVISION_XM_AB :case REVISION_XM_C :default :omap3_dss_panel_config (&dvid_cfg_xm);
@@ -276,12 +274,11 @@ static void beagle_dvi_pup(void)case REVISION_AXBX :case REVISION_CX :case REVISION_C4 : -case REVISION_XM_A : +case REVISION_XM_AB :gpio_request (170 ,"" );gpio_direction_output (170 ,0 );gpio_set_value (170 ,1 );break ; -case REVISION_XM_B :case REVISION_XM_C :default :#define GPIODATADIR1 (TWL4030_BASEADD_GPIO+3)
@@ -359,19 +356,9 @@ int misc_init_r(void)TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , TWL4030_PM_RECEIVER_DEV_GRP_P1);break ; -case REVISION_XM_A : -printf ("Beagle xM Rev A\n" ); -setenv ("beaglerev" ,"xMA" ); -MUX_BEAGLE_XM (); -/* Set VAUX2 to 1.8V for EHCI PHY */ -twl4030_pmrecv_vsel_cfg (TWL4030_PM_RECEIVER_VAUX2_DEDICATED , -TWL4030_PM_RECEIVER_VAUX2_VSEL_18 , -TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , -TWL4030_PM_RECEIVER_DEV_GRP_P1 ); -break ; -case REVISION_XM_B : -printf ("Beagle xM Rev B\n" ); -setenv ("beaglerev" ,"xMB" ); +case REVISION_XM_AB : +printf ("Beagle xM Rev A/B\n" ); +setenv ("beaglerev" ,"xMAB" );MUX_BEAGLE_XM ();/* Set VAUX2 to 1.8V for EHCI PHY */ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
@@ -484,8 +471,7 @@ int misc_init_r(void)twl4030_power_init ();switch (get_board_revision ()) { -case REVISION_XM_A : -case REVISION_XM_B : +case REVISION_XM_AB :twl4030_led_init (TWL4030_LED_LEDEN_LEDBON );break ;default :
board/ti/beagle/beagle.h +1 -2
@@ -39,8 +39,7 @@ const omap3_sysinfo sysinfo = {#define REVISION_AXBX 0x7#define REVISION_CX 0x6#define REVISION_C4 0x5 -#define REVISION_XM_A 0x0 -#define REVISION_XM_B 0x1 +#define REVISION_XM_AB 0x0#define REVISION_XM_C 0x2/*
Signature · 1 line
1.7.9.5
PATCH v2 4/6 omap3_beagle: enable CMD_FS_GENERIC and simplify load of image/ramdisk
In reply to Nishanth MenonCMD_FS_GENERIC allows us to simplify where we load up our image from either from ext2/fat etc. So, lets use that instead of cumbersome options we currently use. Sticking with existing conventions, defaults will be:
ramdisk=ramdisk.gz
bootpart=0:2 (second partition)
bootdir=/boot (/boot in second partition)
This matches with the default behavior, these can be overriden by env files as needed.
--- include/configs/omap3_beagle.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
include/configs/omap3_beagle.h +7 -4
@@ -150,6 +150,7 @@#define CONFIG_CMD_CACHE #define CONFIG_CMD_EXT2 /* EXT2 Support */ #define CONFIG_CMD_FAT /* FAT support */ +#define CONFIG_CMD_FS_GENERIC /* Generic FS support */ #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define MTDIDS_DEFAULT "nand0=nand"
@@ -211,6 +212,9 @@"rdaddr=0x81000000\0" \"usbtty=cdc_acm\0" \"bootfile=uImage\0" \ +"ramdisk=ramdisk.gz\0" \ +"bootdir=/boot\0" \ +"bootpart=0:2\0" \"console=ttyO2,115200n8\0" \"mpurate=auto\0" \"buddy=none\0" \
@@ -259,9 +263,8 @@"omapdss.def_disp=${defaultdisplay} " \"root=${ramroot} " \"rootfstype=${ramrootfstype}\0" \ -"loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ -"loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ -"loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage\0" \ +"loadramdisk=load mmc ${bootpart} ${rdaddr} ${bootdir}/${ramdisk}\0" \ +"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \"mmcboot=echo Booting from mmc ...; " \"run mmcargs; " \"bootm ${loadaddr}\0" \
@@ -293,7 +296,7 @@"echo Running uenvcmd ...;" \"run uenvcmd;" \"fi;" \ -"if run loaduimage; then " \ +"if run loadimage; then " \"run mmcboot;" \"fi;" \"fi;" \
Signature · 1 line
1.7.9.5
PATCH v2 5/6 omap3_beagle: support findfdt and loadfdt for devicetree support
In reply to Nishanth MenonFor folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
--- include/configs/omap3_beagle.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
include/configs/omap3_beagle.h +17 -0
@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \
@@ -250,6 +252,19 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMAB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $beaglerev = xMB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $beaglerev = xMC; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $fdtfile = undefined; then " \ +"echo WARNING: Could not determine device tree to use; fi; \0" \"bootenv=uEnv.txt\0" \"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \"importbootenv=echo Importing environment from mmc ...; " \
@@ -265,6 +280,7 @@"rootfstype=${ramrootfstype}\0" \"loadramdisk=load mmc ${bootpart} ${rdaddr} ${bootdir}/${ramdisk}\0" \"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ +"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \"mmcboot=echo Booting from mmc ...; " \"run mmcargs; " \"bootm ${loadaddr}\0" \
@@ -281,6 +297,7 @@"userbutton_nonxm=gpio input 7;\0" /* "run userbutton" will return 1 (false) if pressed and 0 (true) if not */ #define CONFIG_BOOTCOMMAND \ +"run findfdt; " \"mmc dev ${mmcdev}; if mmc rescan; then " \"if run userbutton; then " \"setenv bootenv uEnv.txt;" \
Signature · 1 line
1.7.9.5
PATCH v2 5/6 omap3_beagle: support findfdt and loadfdt for devicetree support
Quoted 27 lines · Nishanth Menon
For folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
Signed-off-by Nishanth Menon <[email protected]>--- include/configs/omap3_beagle.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/configs/omap3_beagle.h +2
-0@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \@@ -250,6 +252,19 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \
include/configs/omap3_beagle.h line 263
Quoted 10 lines
include/configs/omap3_beagle.h +9
-0"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMAB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $beaglerev = xMB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \
OK, this is embarrassing! I should have dropped this! Sigh.. will will wait for more comments and stop spamming list before a new rev.
[...]
Signature · 2 lines
Regards, Nishanth Menon
PATCH v2 6/6 omap3_beagle: support booting from zImage and device tree as last option
In reply to Nishanth MenonIf no other bootoption works, try loading up device tree and zImage.
This is selected as the last option to allow backward compatibility as well as support the recent trend in moving kernel boot to using zImage and device tree.
NOTE: if uImage is present in bootpart, it will try this first and will assume this is to be booted with bootm (so may be concatenated image or plain vanilla ATAG MACHINE_ID based image)
--- include/configs/omap3_beagle.h | 8 ++++++++ 1 file changed, 8 insertions(+)
include/configs/omap3_beagle.h +8 -0
@@ -284,6 +284,9 @@"mmcboot=echo Booting from mmc ...; " \"run mmcargs; " \"bootm ${loadaddr}\0" \ +"mmcbootz=echo Booting with DT from mmc${mmcdev} ...; " \ +"run mmcargs; " \ +"bootz ${loadaddr} - ${fdtaddr}\0" \"nandboot=echo Booting from nand ...; " \"run nandargs; " \"nand read ${loadaddr} 280000 400000; " \
@@ -318,6 +321,11 @@"fi;" \"fi;" \"run nandboot;" \ +"setenv bootfile zImage;" \ +"if run loadimage; then " \ +"run loadfdt;" \ +"run mmcbootz; " \ + "fi; " \#define CONFIG_AUTO_COMPLETE 1/*
Signature · 1 line
1.7.9.5
v2 cover omap3_beagle: configs: improve BOOT_CMD options
In reply to Nishanth MenonQuoted 14 lines · Nishanth Menon
With the latest transition to device tree, there is a need to simplify the load of device tree depending on board type etc. While at it, simplify few other changes as well.
Testing:
with a uEnv.txt as:
bootdir=/
bootpart=0:1The following were the boot results:
Beagle (rev C1D): http://pastebin.com/fMdsKkgr
Beagle XM (rev C1): http://pastebin.com/p1zp9AhG
Quoted 5 lines
Changes in V2 since v1:
- removed xMB version support based on review comments. http://marc.info/?t=137357970500004&r=1&w=2&n=5
I have no new comments on the series, awaiting V3 Monday'ish, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130712/66242f14/attachment.pgp>
v3 cover omap3_beagle: configs: improve BOOT_CMD options
With the latest transition to device tree, there is a need to simplify the load of device tree depending on board type etc. While at it, simplify few other changes as well.
Testing:
with a uEnv.txt as:
bootdir=/
bootpart=0:1
The following were the boot results:
Beagle (rev C1D): http://pastebin.com/fMdsKkgr
Beagle XM (rev C1): http://pastebin.com/p1zp9AhG
Changes in V3 since v2:
- Minor fixes for RevB beagleboard DVIpup handling
http://marc.info/?t=137357970500004&r=1&w=2
- Picked up acked-by from http://marc.info/?t=137357970700007&r=1&w=2
V2: http://marc.info/?l=u-boot&m=137358206228251&w=2
V1: http://marc.info/?l=u-boot&m=137357963227510&w=2
Nishanth Menon (6):
omap3_beagle: remove JFFS2 support.
omap3_beagle: replace uImage.beagle with generic uImage
beagleboard: remove RevB support for BeagleBoard Xm
omap3_beagle: enable CMD_FS_GENERIC and simplify load of
image/ramdisk
omap3_beagle: support findfdt and loadfdt for devicetree support
omap3_beagle: support booting from zImage and device tree as last
option
board/ti/beagle/beagle.c | 28 +++++++------------------ board/ti/beagle/beagle.h | 3 +-- include/configs/omap3_beagle.h | 44 ++++++++++++++++++++++++++++------------ 3 files changed, 39 insertions(+), 36 deletions(-)
Signature · 4 lines
1.7.9.5 Regards, Nishanth Menon
PATCH v3 1/6 omap3_beagle: remove JFFS2 support.
We do not use JFFS2 by default and it conflicts with CONFIG_CMD_FS_GENERIC (ls command is the same). Since most of our BOOTCMD can be simplified by using the FS_GENERIC, dropping JFFS2
--- include/configs/omap3_beagle.h | 8 -------- 1 file changed, 8 deletions(-)
include/configs/omap3_beagle.h +0 -8
@@ -150,7 +150,6 @@#define CONFIG_CMD_CACHE #define CONFIG_CMD_EXT2 /* EXT2 Support */ #define CONFIG_CMD_FAT /* FAT support */ -#define CONFIG_CMD_JFFS2 /* JFFS2 Support */ #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define MTDIDS_DEFAULT "nand0=nand"
@@ -203,13 +202,6 @@#define CONFIG_SYS_MAX_NAND_DEVICE 1/* Max number of NAND */ /* devices */ -#define CONFIG_JFFS2_NAND -/* nand device jffs2 lives on */ -#define CONFIG_JFFS2_DEV "nand0" -/* start of jffs2 partition */ -#define CONFIG_JFFS2_PART_OFFSET 0x680000 -#define CONFIG_JFFS2_PART_SIZE 0xf980000/* size of jffs2 */ -/* partition */ /* Environment information */ #define CONFIG_BOOTDELAY 3
Signature · 1 line
1.7.9.5
PATCH v3 2/6 omap3_beagle: replace uImage.beagle with generic uImage
In reply to Nishanth Menone682930867f7dfc4a01784fe452fad9e962d65a
(BeagleBoard: config: use uImage.beagle for tftp)
Introduced uImage.beagle which does not happen to be default output file of Linux kernel build make uImage (output is uImage).
So, replace uImage.beagle with uImage
--- include/configs/omap3_beagle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/omap3_beagle.h +1 -1
@@ -210,7 +210,7 @@"loadaddr=0x80200000\0" \"rdaddr=0x81000000\0" \"usbtty=cdc_acm\0" \ -"bootfile=uImage.beagle\0" \ +"bootfile=uImage\0" \"console=ttyO2,115200n8\0" \"mpurate=auto\0" \"buddy=none\0" \
Signature · 1 line
1.7.9.5
PATCH v3 3/6 beagleboard: remove RevB support for BeagleBoard Xm
In reply to Nishanth MenonAs reported in http://marc.info/?l=u-boot&m=137358037827735&w=2
There is no need for the "xMB" variant, as the gpio pins used for identification where never changed from the xMA when the newer silcon was used for the xMB, So rename XM A revision as AB revision and report accordingly
---
V3 updates based on http://marc.info/?t=137357970500004&r=1&w=2
board/ti/beagle/beagle.c | 28 +++++++--------------------- board/ti/beagle/beagle.h | 3 +-- 2 files changed, 8 insertions(+), 23 deletions(-)
board/ti/beagle/beagle.c +7 -21
@@ -182,8 +182,7 @@ void get_board_mem_timings(struct board_sdrc_timings *timings) timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;break ; } -case REVISION_XM_A : -case REVISION_XM_B : +case REVISION_XM_AB :case REVISION_XM_C :if (pop_mfr ==0 ) {/* 256MB DDR */
@@ -256,8 +255,7 @@ static void beagle_display_init(void)case REVISION_C4 :omap3_dss_panel_config (&dvid_cfg);break ; -case REVISION_XM_A : -case REVISION_XM_B : +case REVISION_XM_AB :case REVISION_XM_C :default :omap3_dss_panel_config (&dvid_cfg_xm);
@@ -276,12 +274,11 @@ static void beagle_dvi_pup(void)case REVISION_AXBX :case REVISION_CX :case REVISION_C4 : -case REVISION_XM_A :gpio_request (170 ,"" );gpio_direction_output (170 ,0 );gpio_set_value (170 ,1 );break ; -case REVISION_XM_B : +case REVISION_XM_AB :case REVISION_XM_C :default :#define GPIODATADIR1 (TWL4030_BASEADD_GPIO+3)
@@ -359,19 +356,9 @@ int misc_init_r(void)TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , TWL4030_PM_RECEIVER_DEV_GRP_P1);break ; -case REVISION_XM_A : -printf ("Beagle xM Rev A\n" ); -setenv ("beaglerev" ,"xMA" ); -MUX_BEAGLE_XM (); -/* Set VAUX2 to 1.8V for EHCI PHY */ -twl4030_pmrecv_vsel_cfg (TWL4030_PM_RECEIVER_VAUX2_DEDICATED , -TWL4030_PM_RECEIVER_VAUX2_VSEL_18 , -TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , -TWL4030_PM_RECEIVER_DEV_GRP_P1 ); -break ; -case REVISION_XM_B : -printf ("Beagle xM Rev B\n" ); -setenv ("beaglerev" ,"xMB" ); +case REVISION_XM_AB : +printf ("Beagle xM Rev A/B\n" ); +setenv ("beaglerev" ,"xMAB" );MUX_BEAGLE_XM ();/* Set VAUX2 to 1.8V for EHCI PHY */ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
@@ -484,8 +471,7 @@ int misc_init_r(void)twl4030_power_init ();switch (get_board_revision ()) { -case REVISION_XM_A : -case REVISION_XM_B : +case REVISION_XM_AB :twl4030_led_init (TWL4030_LED_LEDEN_LEDBON );break ;default :
board/ti/beagle/beagle.h +1 -2
@@ -39,8 +39,7 @@ const omap3_sysinfo sysinfo = {#define REVISION_AXBX 0x7#define REVISION_CX 0x6#define REVISION_C4 0x5 -#define REVISION_XM_A 0x0 -#define REVISION_XM_B 0x1 +#define REVISION_XM_AB 0x0#define REVISION_XM_C 0x2/*
Signature · 1 line
1.7.9.5
PATCH v3 4/6 omap3_beagle: enable CMD_FS_GENERIC and simplify load of image/ramdisk
In reply to Nishanth MenonCMD_FS_GENERIC allows us to simplify where we load up our image from either from ext2/fat etc. So, lets use that instead of cumbersome options we currently use. Sticking with existing conventions, defaults will be:
ramdisk=ramdisk.gz
bootpart=0:2 (second partition)
bootdir=/boot (/boot in second partition)
This matches with the default behavior, these can be overriden by env files as needed.
--- include/configs/omap3_beagle.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
include/configs/omap3_beagle.h +7 -4
@@ -150,6 +150,7 @@#define CONFIG_CMD_CACHE #define CONFIG_CMD_EXT2 /* EXT2 Support */ #define CONFIG_CMD_FAT /* FAT support */ +#define CONFIG_CMD_FS_GENERIC /* Generic FS support */ #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define MTDIDS_DEFAULT "nand0=nand"
@@ -211,6 +212,9 @@"rdaddr=0x81000000\0" \"usbtty=cdc_acm\0" \"bootfile=uImage\0" \ +"ramdisk=ramdisk.gz\0" \ +"bootdir=/boot\0" \ +"bootpart=0:2\0" \"console=ttyO2,115200n8\0" \"mpurate=auto\0" \"buddy=none\0" \
@@ -259,9 +263,8 @@"omapdss.def_disp=${defaultdisplay} " \"root=${ramroot} " \"rootfstype=${ramrootfstype}\0" \ -"loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ -"loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ -"loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage\0" \ +"loadramdisk=load mmc ${bootpart} ${rdaddr} ${bootdir}/${ramdisk}\0" \ +"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \"mmcboot=echo Booting from mmc ...; " \"run mmcargs; " \"bootm ${loadaddr}\0" \
@@ -293,7 +296,7 @@"echo Running uenvcmd ...;" \"run uenvcmd;" \"fi;" \ -"if run loaduimage; then " \ +"if run loadimage; then " \"run mmcboot;" \"fi;" \"fi;" \
Signature · 1 line
1.7.9.5
PATCH v3 5/6 omap3_beagle: support findfdt and loadfdt for devicetree support
In reply to Nishanth MenonFor folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
---
V3: Fixes typo mistake reported in http://marc.info/?t=137358212300006&r=1&w=2
include/configs/omap3_beagle.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
include/configs/omap3_beagle.h +15 -0
@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \
@@ -250,6 +252,17 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMAB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $beaglerev = xMC; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $fdtfile = undefined; then " \ +"echo WARNING: Could not determine device tree to use; fi; \0" \"bootenv=uEnv.txt\0" \"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \"importbootenv=echo Importing environment from mmc ...; " \
@@ -265,6 +278,7 @@"rootfstype=${ramrootfstype}\0" \"loadramdisk=load mmc ${bootpart} ${rdaddr} ${bootdir}/${ramdisk}\0" \"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ +"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \"mmcboot=echo Booting from mmc ...; " \"run mmcargs; " \"bootm ${loadaddr}\0" \
@@ -281,6 +295,7 @@"userbutton_nonxm=gpio input 7;\0" /* "run userbutton" will return 1 (false) if pressed and 0 (true) if not */ #define CONFIG_BOOTCOMMAND \ +"run findfdt; " \"mmc dev ${mmcdev}; if mmc rescan; then " \"if run userbutton; then " \"setenv bootenv uEnv.txt;" \
Signature · 1 line
1.7.9.5
PATCH v3 5/6 omap3_beagle: support findfdt and loadfdt for devicetree support
Op 15 jul. 2013, om 14:11 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 31 lines
For folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
Signed-off-by Nishanth Menon <[email protected]>---
V3: Fixes typo mistake reported in http://marc.info/?t=137358212300006&r=1&w=2
include/configs/omap3_beagle.h| 15 +++++++++++++++1 file changed, 15 insertions(+)include/configs/omap3_beagle.h +3
-0@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \@@ -250,6 +252,17 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \
include/configs/omap3_beagle.h line 265
Quoted 10 lines
include/configs/omap3_beagle.h +10
-0+"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMAB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $beaglerev = xMC; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $fdtfile = undefined; then " \ +"echo WARNING: Could not determine device tree to use; fi; \0" \
With the remote chance of a future xM rev D, can you make the fallthrough be 'omap3-beagle-xm.dtb' intead of 'undefined'?
PATCH v3 5/6 omap3_beagle: support findfdt and loadfdt for devicetree support
Quoted 38 lines · Koen Kooi
Op 15 jul. 2013, om 14:11 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 35 lines
For folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
Signed-off-by Nishanth Menon <[email protected]>---
V3: Fixes typo mistake reported in http://marc.info/?t=137358212300006&r=1&w=2
include/configs/omap3_beagle.h| 15 +++++++++++++++1 file changed, 15 insertions(+)include/configs/omap3_beagle.h +7
-0@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \@@ -250,6 +252,17 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \
Quoted 8 lines
include/configs/omap3_beagle.h line 265
Quoted 6 lines
include/configs/omap3_beagle.h +6
-0+"if test $beaglerev = xMAB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $beaglerev = xMC; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $fdtfile = undefined; then " \ +"echo WARNING: Could not determine device tree to use; fi; \0" \With the remote chance of a future xM rev D, can you make the fallthrough be 'omap3-beagle-xm.dtb' intead of 'undefined'?
Lets add the detection of xMD and along with that we add omap3-beagle-xm.dtb detection - makes sense? OR do we assume all un-matched devices default to beagle xMD? what if there was a vanilla beagle rev D?
Signature · 2 lines
Regards, Nishanth Menon
PATCH v3 5/6 omap3_beagle: support findfdt and loadfdt for devicetree support
Op 15 jul. 2013, om 14:25 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 47 lines · Koen Kooi
Quoted 38 lines
Op 15 jul. 2013, om 14:11 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 35 lines
For folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
Signed-off-by Nishanth Menon <[email protected]>---
V3: Fixes typo mistake reported in http://marc.info/?t=137358212300006&r=1&w=2
include/configs/omap3_beagle.h| 15 +++++++++++++++1 file changed, 15 insertions(+)include/configs/omap3_beagle.h +7
-0@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \@@ -250,6 +252,17 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \Quoted 8 lines
include/configs/omap3_beagle.h line 265
Quoted 6 lines
include/configs/omap3_beagle.h +6
-0+"if test $beaglerev = xMAB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $beaglerev = xMC; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $fdtfile = undefined; then " \ +"echo WARNING: Could not determine device tree to use; fi; \0" \With the remote chance of a future xM rev D, can you make the fallthrough be 'omap3-beagle-xm.dtb' intead of 'undefined'?
Quoted 4 lines
Lets add the detection of xMD and along with that we add omap3-beagle-xm.dtb detection - makes sense? OR do we assume all un-matched devices default to beagle xMD? what if there was a vanilla beagle rev D?
The fallthrough case should always be the most recent board rev, any other way will just make the HW guys spoof the ID in the design and we all know how that ends :(
PATCH v3 5/6 omap3_beagle: support findfdt and loadfdt for devicetree support
Quoted 4 lines · Koen Kooi
Op 15 jul. 2013, om 14:25 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 3 lines · Koen Kooi
Quoted 2 lines
Op 15 jul. 2013, om 14:11 heeft Nishanth Menon <[email protected]> het volgende geschreven:
[..]
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
include/configs/omap3_beagle.h line 265
Quoted 11 lines
include/configs/omap3_beagle.h +11
-0+"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMAB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $beaglerev = xMC; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $fdtfile = undefined; then " \ +"echo WARNING: Could not determine device tree to use; fi; \0" \With the remote chance of a future xM rev D, can you make the fallthrough be 'omap3-beagle-xm.dtb' intead of 'undefined'?
Quoted 6 lines
Quoted 4 lines
Lets add the detection of xMD and along with that we add omap3-beagle-xm.dtb detection - makes sense? OR do we assume all un-matched devices default to beagle xMD? what if there was a vanilla beagle rev D?
The fallthrough case should always be the most recent board rev, any other way will just make the HW guys spoof the ID in the design and we all know how that ends :(
Fair enough. Anyone else has a contrary opinion?
If none, the following is the replacement patch, wont repost unless a new series is needed:
PATCH v3 5/6 omap3_beagle: support findfdt and loadfdt for devicetree support
In reply to Koen KooiQuoted 39 lines · Koen Kooi
Op 15 jul. 2013, om 14:11 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 36 lines
For folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
Signed-off-by Nishanth Menon <[email protected]>---
V3: Fixes typo mistake reported in http://marc.info/?t=137358212300006&r=1&w=2
include/configs/omap3_beagle.h| 15 +++++++++++++++1 file changed, 15 insertions(+)include/configs/omap3_beagle.h +8
-0@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \@@ -250,6 +252,17 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMAB; then " \
Quoted 8 lines
include/configs/omap3_beagle.h line 265
Quoted 5 lines
include/configs/omap3_beagle.h +5
-0+"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $beaglerev = xMC; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $fdtfile = undefined; then " \ +"echo WARNING: Could not determine device tree to use; fi; \0" \With the remote chance of a future xM rev D, can you make the fallthrough be 'omap3-beagle-xm.dtb' intead of 'undefined'?
I don't like that idea. On am335x_evm configs we have undefined and then say "hey, it's undefined!" so it's clear that we don't know what to do. That in theory future xM rev D might need a different device tree for example.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130715/d00949c9/attachment.pgp>
PATCH v3 5/6 omap3_beagle: support findfdt and loadfdt for devicetree support
Op 15 jul. 2013, om 16:49 heeft Tom Rini <[email protected]> het volgende geschreven:
Quoted 49 lines · Koen Kooi
Quoted 39 lines
Op 15 jul. 2013, om 14:11 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 36 lines
For folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
Signed-off-by Nishanth Menon <[email protected]>---
V3: Fixes typo mistake reported in http://marc.info/?t=137358212300006&r=1&w=2
include/configs/omap3_beagle.h| 15 +++++++++++++++1 file changed, 15 insertions(+)include/configs/omap3_beagle.h +8
-0@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \@@ -250,6 +252,17 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMAB; then " \Quoted 8 lines
include/configs/omap3_beagle.h line 265
Quoted 5 lines
include/configs/omap3_beagle.h +5
-0+"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $beaglerev = xMC; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $fdtfile = undefined; then " \ +"echo WARNING: Could not determine device tree to use; fi; \0" \With the remote chance of a future xM rev D, can you make the fallthrough be 'omap3-beagle-xm.dtb' intead of 'undefined'?
Quoted 4 lines
I don't like that idea. On
am335x_evmconfigs we have undefined and then say "hey, it's undefined!" so it's clear that we don't know what to do. That in theory future xM rev D might need a different device tree for example.
And that's patched out on the build that actually ships with the beaglebone and beaglebone black so it will fall back to BBB when it can't ID the board. You'll see that the u-boot bits that need the ID for the xM also fallback to the latest rev. I don't see why the boardfile and script need to have different behaviour.
PATCH v3 5/6 omap3_beagle: support findfdt and loadfdt for devicetree support
Quoted 57 lines · Koen Kooi
Op 15 jul. 2013, om 16:49 heeft Tom Rini <[email protected]> het volgende geschreven:
Quoted 49 lines · Koen Kooi
Quoted 39 lines
Op 15 jul. 2013, om 14:11 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 36 lines
For folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
Signed-off-by Nishanth Menon <[email protected]>---
V3: Fixes typo mistake reported in http://marc.info/?t=137358212300006&r=1&w=2
include/configs/omap3_beagle.h| 15 +++++++++++++++1 file changed, 15 insertions(+)include/configs/omap3_beagle.h +8
-0@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \@@ -250,6 +252,17 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMAB; then " \Quoted 8 lines
include/configs/omap3_beagle.h line 265
Quoted 5 lines
include/configs/omap3_beagle.h +5
-0+"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $beaglerev = xMC; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $fdtfile = undefined; then " \ +"echo WARNING: Could not determine device tree to use; fi; \0" \With the remote chance of a future xM rev D, can you make the fallthrough be 'omap3-beagle-xm.dtb' intead of 'undefined'?
Quoted 4 lines
I don't like that idea. On
am335x_evmconfigs we have undefined and then say "hey, it's undefined!" so it's clear that we don't know what to do. That in theory future xM rev D might need a different device tree for example.
Quoted 5 lines
And that's patched out on the build that actually ships with the beaglebone and beaglebone black so it will fall back to BBB when it can't ID the board. You'll see that the u-boot bits that need the ID for the xM also fallback to the latest rev. I don't see why the boardfile and script need to have different behaviour.
Yes, I'm not terribly happy with what gets done for the shipping U-Boot on BBB, but I understand you're trying to not have too special of a binary used in programming versus distribution of the board. If the vendor wants to ship software that says "when in doubt, it's likely this board", that's OK for the vendor to do.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130718/4707a502/attachment.pgp>
PATCH v3 5/6 omap3_beagle: support findfdt and loadfdt for devicetree support
Quoted 6 lines · Tom Rini
Yes, I'm not terribly happy with what gets done for the shipping U-Boot on BBB, but I understand you're trying to not have too special of a binary used in programming versus distribution of the board. If the vendor wants to ship software that says "when in doubt, it's likely this board", that's OK for the vendor to do.
Alrite, so we go with V3(current version) of the patch then.
Regards,
Nishanth Menon
PATCH v3 6/6 omap3_beagle: support booting from zImage and device tree as last option
In reply to Nishanth MenonIf no other bootoption works, try loading up device tree and zImage.
This is selected as the last option to allow backward compatibility as well as support the recent trend in moving kernel boot to using zImage and device tree.
NOTE: if uImage is present in bootpart, it will try this first and will assume this is to be booted with bootm (so may be concatenated image or plain vanilla ATAG MACHINE_ID based image)
--- include/configs/omap3_beagle.h | 8 ++++++++ 1 file changed, 8 insertions(+)
include/configs/omap3_beagle.h +8 -0
@@ -282,6 +282,9 @@"mmcboot=echo Booting from mmc ...; " \"run mmcargs; " \"bootm ${loadaddr}\0" \ +"mmcbootz=echo Booting with DT from mmc${mmcdev} ...; " \ +"run mmcargs; " \ +"bootz ${loadaddr} - ${fdtaddr}\0" \"nandboot=echo Booting from nand ...; " \"run nandargs; " \"nand read ${loadaddr} 280000 400000; " \
@@ -316,6 +319,11 @@"fi;" \"fi;" \"run nandboot;" \ +"setenv bootfile zImage;" \ +"if run loadimage; then " \ +"run loadfdt;" \ +"run mmcbootz; " \ + "fi; " \#define CONFIG_AUTO_COMPLETE 1/*
Signature · 1 line
1.7.9.5
v3 cover omap3_beagle: configs: improve BOOT_CMD options
In reply to Nishanth MenonQuoted 31 lines · Nishanth Menon
With the latest transition to device tree, there is a need to simplify the load of device tree depending on board type etc. While at it, simplify few other changes as well.
Testing:
with a uEnv.txt as:
bootdir=/
bootpart=0:1The following were the boot results:
Beagle (rev C1D): http://pastebin.com/fMdsKkgr
Beagle XM (rev C1): http://pastebin.com/p1zp9AhGChanges in V3 since v2:
- Minor fixes for RevB beagleboard DVIpup handling
http://marc.info/?t=137357970500004&r=1&w=2
- Picked up acked-by from http://marc.info/?t=137357970700007&r=1&w=2V2: http://marc.info/?l=u-boot&m=137358206228251&w=2
V1: http://marc.info/?l=u-boot&m=137357963227510&w=2Nishanth Menon (6):
omap3_beagle: remove JFFS2 support.
omap3_beagle: replace uImage.beagle with generic uImage
beagleboard: remove RevB support for BeagleBoard Xm
omap3_beagle: enableCMD_FS_GENERICand simplify load of
image/ramdisk
omap3_beagle: support findfdt and loadfdt for devicetree support
omap3_beagle: support booting from zImage and device tree as last
option
Quoted 4 lines
board/ti/beagle/beagle.c | 28 +++++++------------------ board/ti/beagle/beagle.h | 3 +-- include/configs/omap3_beagle.h | 44 ++++++++++++++++++++++++++++------------ 3 files changed, 39 insertions(+), 36 deletions(-)
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130730/e43a05b9/attachment.pgp>
PATCH 4/5 omap3_beagle: support findfdt and loadfdt for devicetree support
In reply to Nishanth MenonFor folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
--- include/configs/omap3_beagle.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
include/configs/omap3_beagle.h +17 -0
@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \
@@ -250,6 +252,19 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMA; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $beaglerev = xMB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $beaglerev = xMC; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $fdtfile = undefined; then " \ +"echo WARNING: Could not determine device tree to use; fi; \0" \"bootenv=uEnv.txt\0" \"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \"importbootenv=echo Importing environment from mmc ...; " \
@@ -265,6 +280,7 @@"rootfstype=${ramrootfstype}\0" \"loadramdisk=load mmc ${bootpart} ${rdaddr} ${bootdir}/${ramdisk}\0" \"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ +"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \"mmcboot=echo Booting from mmc ...; " \"run mmcargs; " \"bootm ${loadaddr}\0" \
@@ -281,6 +297,7 @@"userbutton_nonxm=gpio input 7;\0" /* "run userbutton" will return 1 (false) if pressed and 0 (true) if not */ #define CONFIG_BOOTCOMMAND \ +"run findfdt; " \"mmc dev ${mmcdev}; if mmc rescan; then " \"if run userbutton; then " \"setenv bootenv uEnv.txt;" \
Signature · 1 line
1.7.9.5
PATCH 4/5 omap3_beagle: support findfdt and loadfdt for devicetree support
Quoted 27 lines · Nishanth Menon
For folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
Signed-off-by Nishanth Menon <[email protected]>--- include/configs/omap3_beagle.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/configs/omap3_beagle.h +2
-0@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \@@ -250,6 +252,19 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \
include/configs/omap3_beagle.h line 263
Quoted 10 lines
include/configs/omap3_beagle.h +9
-0"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMA; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $beaglerev = xMB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \
There is no need for the "xMB" variant, as the gpio pins used for identification where never changed from the xMA when the newer silcon was used for the xMB (i guess if we look at the omap's es revision, we could figure out which are xMB's, but right now that isn't done in u-boot....)
Quoted 16 lines
include/configs/omap3_beagle.h +5
-0+"if test $beaglerev = xMC; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \ +"if test $fdtfile = undefined; then " \ +"echo WARNING: Could not determine device tree to use; fi; \0" \"bootenv=uEnv.txt\0" \"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \"importbootenv=echo Importing environment from mmc ...; " \@@ -265,6 +280,7 @@"rootfstype=${ramrootfstype}\0" \"loadramdisk=load mmc ${bootpart} ${rdaddr} ${bootdir}/${ramdisk}\0" \"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ +"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \"mmcboot=echo Booting from mmc ...; " \"run mmcargs; " \"bootm ${loadaddr}\0" \
include/configs/omap3_beagle.h
Quoted 8 lines
include/configs/omap3_beagle.h +1
-1@@ -281,6 +297,7 @@"userbutton_nonxm=gpio input 7;\0" /* "run userbutton" will return 1 (false) if pressed and 0 (true) if not */ #define CONFIG_BOOTCOMMAND \ +"run findfdt; " \"mmc dev ${mmcdev}; if mmc rescan; then " \"if run userbutton; then " \"setenv bootenv uEnv.txt;" \ --
Regards,
Signature · 2 lines
Robert Nelson http://www.rcn-ee.com/
PATCH 4/5 omap3_beagle: support findfdt and loadfdt for devicetree support
Quoted 36 lines · Robert Nelson
Quoted 35 lines · Nishanth Menon
For folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
Signed-off-by Nishanth Menon <[email protected]>--- include/configs/omap3_beagle.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/configs/omap3_beagle.h +9
-0@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \@@ -250,6 +252,19 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMA; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \
Quoted 8 lines
include/configs/omap3_beagle.h line 263
Quoted 2 lines
include/configs/omap3_beagle.h +2
-0+"if test $beaglerev = xMB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \There is no need for the "xMB" variant, as the gpio pins used for identification where never changed from the xMA when the newer silcon was used for the xMB (i guess if we look at the omap's es revision, we could figure out which are xMB's, but right now that isn't done in u-boot....)
I suppose then the following is ok to do as well?
board/ti/beagle/beagle.c +0 -10
@@ -369,16 +369,6 @@ int misc_init_r(void)TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , TWL4030_PM_RECEIVER_DEV_GRP_P1);break ; -case REVISION_XM_B : -printf ("Beagle xM Rev B\n" ); -setenv ("beaglerev" ,"xMB" ); -MUX_BEAGLE_XM (); -/* Set VAUX2 to 1.8V for EHCI PHY */ -twl4030_pmrecv_vsel_cfg (TWL4030_PM_RECEIVER_VAUX2_DEDICATED , -TWL4030_PM_RECEIVER_VAUX2_VSEL_18 , -TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , -TWL4030_PM_RECEIVER_DEV_GRP_P1 ); -break ;case REVISION_XM_C :printf ("Beagle xM Rev C\n" );setenv ("beaglerev" ,"xMC" );
Signature · 2 lines
Regards, Nishanth Menon
PATCH 4/5 omap3_beagle: support findfdt and loadfdt for devicetree support
Quoted 57 lines · Nishanth Menon
Quoted 36 lines · Robert Nelson
Quoted 35 lines · Nishanth Menon
For folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
Signed-off-by Nishanth Menon <[email protected]>--- include/configs/omap3_beagle.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/configs/omap3_beagle.h +9
-0@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \@@ -250,6 +252,19 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMA; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \Quoted 8 lines
include/configs/omap3_beagle.h line 263
Quoted 2 lines
include/configs/omap3_beagle.h +2
-0+"if test $beaglerev = xMB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \There is no need for the "xMB" variant, as the gpio pins used for identification where never changed from the xMA when the newer silcon was used for the xMB (i guess if we look at the omap's es revision, we could figure out which are xMB's, but right now that isn't done in u-boot....)
I suppose then the following is ok to do as well?
board/ti/beagle/beagle.c +0
-3@@ -369,16 +369,6 @@ int misc_init_r(void)TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , TWL4030_PM_RECEIVER_DEV_GRP_P1);break ; -case REVISION_XM_B : -printf ("Beagle xM Rev B\n" ); -setenv ("beaglerev" ,"xMB" );
board/ti/beagle/beagle.c int misc_init_r(void) · line 374
Quoted 10 lines
board/ti/beagle/beagle.c +0
-7-MUX_BEAGLE_XM (); -/* Set VAUX2 to 1.8V for EHCI PHY */ -twl4030_pmrecv_vsel_cfg (TWL4030_PM_RECEIVER_VAUX2_DEDICATED , -TWL4030_PM_RECEIVER_VAUX2_VSEL_18 , -TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , -TWL4030_PM_RECEIVER_DEV_GRP_P1 ); -break ;case REVISION_XM_C :printf ("Beagle xM Rev C\n" );setenv ("beaglerev" ,"xMC" );
Correct, as a cleanup we can nuke that xMB section..
For some bike shed paining we could rename:
Beagle xM Rev A -> Beagle xM Rev A/B
Above that too. ;)
Regards,
Signature · 2 lines
Robert Nelson http://www.rcn-ee.com/
PATCH 4/5 omap3_beagle: support findfdt and loadfdt for devicetree support
Quoted 71 lines · Robert Nelson
Quoted 57 lines · Nishanth Menon
Quoted 36 lines · Robert Nelson
Quoted 35 lines · Nishanth Menon
For folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
Signed-off-by Nishanth Menon <[email protected]>--- include/configs/omap3_beagle.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/configs/omap3_beagle.h +9
-0@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \@@ -250,6 +252,19 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMA; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \Quoted 8 lines
include/configs/omap3_beagle.h line 263
Quoted 2 lines
include/configs/omap3_beagle.h +2
-0+"if test $beaglerev = xMB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \There is no need for the "xMB" variant, as the gpio pins used for identification where never changed from the xMA when the newer silcon was used for the xMB (i guess if we look at the omap's es revision, we could figure out which are xMB's, but right now that isn't done in u-boot....)
I suppose then the following is ok to do as well?
board/ti/beagle/beagle.c +0
-3@@ -369,16 +369,6 @@ int misc_init_r(void)TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , TWL4030_PM_RECEIVER_DEV_GRP_P1);break ; -case REVISION_XM_B : -printf ("Beagle xM Rev B\n" ); -setenv ("beaglerev" ,"xMB" );board/ti/beagle/beagle.c int misc_init_r(void) · line 374
Quoted 10 lines
board/ti/beagle/beagle.c +0
-7-MUX_BEAGLE_XM (); -/* Set VAUX2 to 1.8V for EHCI PHY */ -twl4030_pmrecv_vsel_cfg (TWL4030_PM_RECEIVER_VAUX2_DEDICATED , -TWL4030_PM_RECEIVER_VAUX2_VSEL_18 , -TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , -TWL4030_PM_RECEIVER_DEV_GRP_P1 ); -break ;case REVISION_XM_C :printf ("Beagle xM Rev C\n" );setenv ("beaglerev" ,"xMC" );Correct, as a cleanup we can nuke that xMB section..
Quoted 5 lines
For some bike shed paining we could rename:
Beagle xM Rev A -> Beagle xM Rev A/B
Above that too. ;)
OK - I suspect and am not sure how dvi_pup will get handled in the resultant diff, What do folks think of the following?
board/ti/beagle/beagle.c +7 -21
@@ -182,8 +182,7 @@ void get_board_mem_timings(struct board_sdrc_timings *timings) timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;break ; } -case REVISION_XM_A : -case REVISION_XM_B : +case REVISION_XM_AB :case REVISION_XM_C :if (pop_mfr ==0 ) {/* 256MB DDR */
@@ -256,8 +255,7 @@ static void beagle_display_init(void)case REVISION_C4 :omap3_dss_panel_config (&dvid_cfg);break ; -case REVISION_XM_A : -case REVISION_XM_B : +case REVISION_XM_AB :case REVISION_XM_C :default :omap3_dss_panel_config (&dvid_cfg_xm);
@@ -276,12 +274,11 @@ static void beagle_dvi_pup(void)case REVISION_AXBX :case REVISION_CX :case REVISION_C4 : -case REVISION_XM_A : +case REVISION_XM_AB :gpio_request (170 ,"" );gpio_direction_output (170 ,0 );gpio_set_value (170 ,1 );break ; -case REVISION_XM_B :case REVISION_XM_C :default :#define GPIODATADIR1 (TWL4030_BASEADD_GPIO+3)
@@ -359,19 +356,9 @@ int misc_init_r(void)TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , TWL4030_PM_RECEIVER_DEV_GRP_P1);break ; -case REVISION_XM_A : -printf ("Beagle xM Rev A\n" ); -setenv ("beaglerev" ,"xMA" ); -MUX_BEAGLE_XM (); -/* Set VAUX2 to 1.8V for EHCI PHY */ -twl4030_pmrecv_vsel_cfg (TWL4030_PM_RECEIVER_VAUX2_DEDICATED , -TWL4030_PM_RECEIVER_VAUX2_VSEL_18 , -TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , -TWL4030_PM_RECEIVER_DEV_GRP_P1 ); -break ; -case REVISION_XM_B : -printf ("Beagle xM Rev B\n" ); -setenv ("beaglerev" ,"xMB" ); +case REVISION_XM_AB : +printf ("Beagle xM Rev A/B\n" ); +setenv ("beaglerev" ,"xMA/xMB" );MUX_BEAGLE_XM ();/* Set VAUX2 to 1.8V for EHCI PHY */ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
@@ -484,8 +471,7 @@ int misc_init_r(void)twl4030_power_init ();switch (get_board_revision ()) { -case REVISION_XM_A : -case REVISION_XM_B : +case REVISION_XM_AB :twl4030_led_init (TWL4030_LED_LEDEN_LEDBON );break ;default :
board/ti/beagle/beagle.h +1 -2
@@ -39,8 +39,7 @@ const omap3_sysinfo sysinfo = {#define REVISION_AXBX 0x7#define REVISION_CX 0x6#define REVISION_C4 0x5 -#define REVISION_XM_A 0x0 -#define REVISION_XM_B 0x1 +#define REVISION_XM_AB 0x0#define REVISION_XM_C 0x2/*
Signature · 2 lines
Regards, Nishanth Menon
PATCH 4/5 omap3_beagle: support findfdt and loadfdt for devicetree support
Quoted 72 lines · Nishanth Menon
Quoted 71 lines · Robert Nelson
Quoted 57 lines · Nishanth Menon
Quoted 36 lines · Robert Nelson
Quoted 35 lines · Nishanth Menon
For folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
Signed-off-by Nishanth Menon <[email protected]>--- include/configs/omap3_beagle.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/configs/omap3_beagle.h +9
-0@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \@@ -250,6 +252,19 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMA; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \Quoted 8 lines
include/configs/omap3_beagle.h line 263
Quoted 2 lines
include/configs/omap3_beagle.h +2
-0+"if test $beaglerev = xMB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \There is no need for the "xMB" variant, as the gpio pins used for identification where never changed from the xMA when the newer silcon was used for the xMB (i guess if we look at the omap's es revision, we could figure out which are xMB's, but right now that isn't done in u-boot....)
I suppose then the following is ok to do as well?
board/ti/beagle/beagle.c +0
-3@@ -369,16 +369,6 @@ int misc_init_r(void)TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , TWL4030_PM_RECEIVER_DEV_GRP_P1);break ; -case REVISION_XM_B : -printf ("Beagle xM Rev B\n" ); -setenv ("beaglerev" ,"xMB" );board/ti/beagle/beagle.c int misc_init_r(void) · line 374
Quoted 10 lines
board/ti/beagle/beagle.c +0
-7-MUX_BEAGLE_XM (); -/* Set VAUX2 to 1.8V for EHCI PHY */ -twl4030_pmrecv_vsel_cfg (TWL4030_PM_RECEIVER_VAUX2_DEDICATED , -TWL4030_PM_RECEIVER_VAUX2_VSEL_18 , -TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , -TWL4030_PM_RECEIVER_DEV_GRP_P1 ); -break ;case REVISION_XM_C :printf ("Beagle xM Rev C\n" );setenv ("beaglerev" ,"xMC" );Correct, as a cleanup we can nuke that xMB section..
Quoted 7 lines
Quoted 5 lines
For some bike shed paining we could rename:
Beagle xM Rev A -> Beagle xM Rev A/B
Above that too. ;)
OK - I suspect and am not sure how
dvi_pupwill get handled in the resultant diff, What do folks think of the following?
A quick review of all my old xM schematics i have access to and the ones on https://github.com/CircuitCo/
For the "dvi_pup" function
GPIO_170 was only used on the pre-production xM's P8/P9, i doubt any of them still operate (mine died)..
It was then switched to GPIO_129 for the xMA, however there where MMC issues, so it was changed for xMA1 (and thus xMA2)
notes, top of this:
https://github.com/CircuitCo/BeagleBoard-xM-RevC/blob/master/BeagleBoard-xM_revC_SCH.pdf
TPS_GPIO_2: was then used on xMA3 -> and all later generations...
So also looking at:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/mach-omap2/board-omap3beagle.c#n161
Looks like the original beagle needs GPIO_170..
So I'd just set GPIO_170 for:
case REVISION_AXBX:
case REVISION_CX:
case REVISION_C4:
and ignore all the pre-production xM P8/P8's/xMA..
Side note, I think 'first' customers just got the xMA2 and newer.. As i was one of the first, and it's still running downstairs..
Regards,
Signature · 2 lines
Robert Nelson http://www.rcn-ee.com/
PATCH 4/5 omap3_beagle: support findfdt and loadfdt for devicetree support
Quoted 103 lines · Robert Nelson
Quoted 72 lines · Nishanth Menon
Quoted 71 lines · Robert Nelson
Quoted 57 lines · Nishanth Menon
Quoted 36 lines · Robert Nelson
Quoted 35 lines · Nishanth Menon
For folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
Signed-off-by Nishanth Menon <[email protected]>--- include/configs/omap3_beagle.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/configs/omap3_beagle.h +9
-0@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \@@ -250,6 +252,19 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMA; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \Quoted 8 lines
include/configs/omap3_beagle.h line 263
Quoted 2 lines
include/configs/omap3_beagle.h +2
-0+"if test $beaglerev = xMB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \There is no need for the "xMB" variant, as the gpio pins used for identification where never changed from the xMA when the newer silcon was used for the xMB (i guess if we look at the omap's es revision, we could figure out which are xMB's, but right now that isn't done in u-boot....)
I suppose then the following is ok to do as well?
board/ti/beagle/beagle.c +0
-3@@ -369,16 +369,6 @@ int misc_init_r(void)TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , TWL4030_PM_RECEIVER_DEV_GRP_P1);break ; -case REVISION_XM_B : -printf ("Beagle xM Rev B\n" ); -setenv ("beaglerev" ,"xMB" );board/ti/beagle/beagle.c int misc_init_r(void) · line 374
Quoted 10 lines
board/ti/beagle/beagle.c +0
-7-MUX_BEAGLE_XM (); -/* Set VAUX2 to 1.8V for EHCI PHY */ -twl4030_pmrecv_vsel_cfg (TWL4030_PM_RECEIVER_VAUX2_DEDICATED , -TWL4030_PM_RECEIVER_VAUX2_VSEL_18 , -TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , -TWL4030_PM_RECEIVER_DEV_GRP_P1 ); -break ;case REVISION_XM_C :printf ("Beagle xM Rev C\n" );setenv ("beaglerev" ,"xMC" );Correct, as a cleanup we can nuke that xMB section..
Quoted 7 lines
Quoted 5 lines
For some bike shed paining we could rename:
Beagle xM Rev A -> Beagle xM Rev A/B
Above that too. ;)
OK - I suspect and am not sure how
dvi_pupwill get handled in the resultant diff, What do folks think of the following?A quick review of all my old xM schematics i have access to and the ones on https://github.com/CircuitCo/
For the "
dvi_pup" function
GPIO_170was only used on the pre-production xM's P8/P9, i doubt any of them still operate (mine died)..It was then switched to
GPIO_129for the xMA, however there where MMC issues, so it was changed for xMA1 (and thus xMA2)
notes, top of this:
https://github.com/CircuitCo/BeagleBoard-xM-RevC/blob/master/BeagleBoard-xM_revC_SCH.pdf
TPS_GPIO_2: was then used on xMA3 -> and all later generations...So also looking at:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/mach-omap2/board-omap3beagle.c#n161Looks like the original beagle needs
GPIO_170..So I'd just set
GPIO_170for:
Quoted 8 lines
case
REVISION_AXBX:
caseREVISION_CX:
caseREVISION_C4:and ignore all the pre-production xM P8/P8's/xMA..
Side note, I think 'first' customers just got the xMA2 and newer.. As i was one of the first, and it's still running downstairs..
ok, here is how the code looks like with the V2 of my series:
Do we just default to none for XM_AB for dvi_pup?
static void beagle_dvi_pup(void)
{
uchar val;
switch (get_board_revision()) {
case REVISION_AXBX:
case REVISION_CX:
case REVISION_C4:
case REVISION_XM_AB:
gpio_request(170, "");
gpio_direction_output(170, 0);
gpio_set_value(170, 1);
break;
case REVISION_XM_C:
default:
#define GPIODATADIR1 (TWL4030_BASEADD_GPIO+3)
#define GPIODATAOUT1 (TWL4030_BASEADD_GPIO+6)
i2c_read(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1);
val |= 4;
i2c_write(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1);
i2c_read(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1);
val |= 4;
i2c_write(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1);
break;
}
}Signature · 2 lines
Regards, Nishanth Menon
PATCH 4/5 omap3_beagle: support findfdt and loadfdt for devicetree support
Quoted 137 lines · Nishanth Menon
Quoted 103 lines · Robert Nelson
Quoted 72 lines · Nishanth Menon
Quoted 71 lines · Robert Nelson
Quoted 57 lines · Nishanth Menon
Quoted 36 lines · Robert Nelson
Quoted 35 lines · Nishanth Menon
For folks not using concatenated device tree with uImage, having an handy function to find and load device tree is very handy.
So introduce findfdt and loadfdt and run findfdt by default to make it easier on user scripts.
Signed-off-by Nishanth Menon <[email protected]>--- include/configs/omap3_beagle.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/configs/omap3_beagle.h +9
-0@@ -210,6 +210,8 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ "rdaddr=0x81000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \@@ -250,6 +252,19 @@"omapdss.def_disp=${defaultdisplay} " \"root=${nandroot} " \"rootfstype=${nandrootfstype}\0" \ +"findfdt=" \ +"if test $beaglerev = AxBx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = Cx; then " \ +"setenv fdtfile omap3-beagle.dtb; fi; " \ +"if test $beaglerev = xMA; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \Quoted 8 lines
include/configs/omap3_beagle.h line 263
Quoted 2 lines
include/configs/omap3_beagle.h +2
-0+"if test $beaglerev = xMB; then " \ +"setenv fdtfile omap3-beagle-xm.dtb; fi; " \There is no need for the "xMB" variant, as the gpio pins used for identification where never changed from the xMA when the newer silcon was used for the xMB (i guess if we look at the omap's es revision, we could figure out which are xMB's, but right now that isn't done in u-boot....)
I suppose then the following is ok to do as well?
board/ti/beagle/beagle.c +0
-3@@ -369,16 +369,6 @@ int misc_init_r(void)TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , TWL4030_PM_RECEIVER_DEV_GRP_P1);break ; -case REVISION_XM_B : -printf ("Beagle xM Rev B\n" ); -setenv ("beaglerev" ,"xMB" );board/ti/beagle/beagle.c int misc_init_r(void) · line 374
Quoted 10 lines
board/ti/beagle/beagle.c +0
-7-MUX_BEAGLE_XM (); -/* Set VAUX2 to 1.8V for EHCI PHY */ -twl4030_pmrecv_vsel_cfg (TWL4030_PM_RECEIVER_VAUX2_DEDICATED , -TWL4030_PM_RECEIVER_VAUX2_VSEL_18 , -TWL4030_PM_RECEIVER_VAUX2_DEV_GRP , -TWL4030_PM_RECEIVER_DEV_GRP_P1 ); -break ;case REVISION_XM_C :printf ("Beagle xM Rev C\n" );setenv ("beaglerev" ,"xMC" );Correct, as a cleanup we can nuke that xMB section..
Quoted 7 lines
Quoted 5 lines
For some bike shed paining we could rename:
Beagle xM Rev A -> Beagle xM Rev A/B
Above that too. ;)
OK - I suspect and am not sure how
dvi_pupwill get handled in the resultant diff, What do folks think of the following?A quick review of all my old xM schematics i have access to and the ones on https://github.com/CircuitCo/
For the "
dvi_pup" function
GPIO_170was only used on the pre-production xM's P8/P9, i doubt any of them still operate (mine died)..It was then switched to
GPIO_129for the xMA, however there where MMC issues, so it was changed for xMA1 (and thus xMA2)
notes, top of this:
https://github.com/CircuitCo/BeagleBoard-xM-RevC/blob/master/BeagleBoard-xM_revC_SCH.pdf
TPS_GPIO_2: was then used on xMA3 -> and all later generations...So also looking at:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/mach-omap2/board-omap3beagle.c#n161Looks like the original beagle needs
GPIO_170..So I'd just set
GPIO_170for:Quoted 8 lines
case
REVISION_AXBX:
caseREVISION_CX:
caseREVISION_C4:and ignore all the pre-production xM P8/P8's/xMA..
Side note, I think 'first' customers just got the xMA2 and newer.. As i was one of the first, and it's still running downstairs..
ok, here is how the code looks like with the V2 of my series:
Do we just default to none for
XM_ABfordvi_pup?static void
beagle_dvi_pup(void){ uchar val; switch (get_board_revision()) { case REVISION_AXBX: case REVISION_CX: case REVISION_C4: case REVISION_XM_AB: gpio_request(170, ""); gpio_direction_output(170, 0); gpio_set_value(170, 1); break; case REVISION_XM_C: default: #define GPIODATADIR1 (TWL4030_BASEADD_GPIO+3) #define GPIODATAOUT1 (TWL4030_BASEADD_GPIO+6) i2c_read(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1); val |= 4;
Quoted 8 lines
i2c_write(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1);
i2c_read(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1);
val |= 4;
i2c_write(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1);
break;
}
}I'd do it like this, as...
On the xMA, xMA1, & xMA2: TPS_GPIO2 is not connected to anything... xMA3->xMC: TPS_GPIO2 is connected to dvi_pup
static void beagle_dvi_pup(void)
{
uchar val;
switch (get_board_revision()) {
case REVISION_AXBX:
case REVISION_CX:
case REVISION_C4:
gpio_request(170, "");
gpio_direction_output(170, 0);
gpio_set_value(170, 1);
break;
case REVISION_XM_AB:
case REVISION_XM_C:
default:
#define GPIODATADIR1 (TWL4030_BASEADD_GPIO+3)
#define GPIODATAOUT1 (TWL4030_BASEADD_GPIO+6)
i2c_read(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1);
val |= 4;
i2c_write(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1);
i2c_read(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1);
val |= 4;
i2c_write(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1);
break;
}
}Regards,
Signature · 2 lines
Robert Nelson http://www.rcn-ee.com/
PATCH 4/5 omap3_beagle: support findfdt and loadfdt for devicetree support
Quoted 59 lines · Robert Nelson
Quoted 24 lines · Nishanth Menon
ok, here is how the code looks like with the V2 of my series:
Do we just default to none for
XM_ABfordvi_pup?static void
beagle_dvi_pup(void){ uchar val; switch (get_board_revision()) { case REVISION_AXBX: case REVISION_CX: case REVISION_C4: case REVISION_XM_AB: gpio_request(170, ""); gpio_direction_output(170, 0); gpio_set_value(170, 1); break; case REVISION_XM_C: default: #define GPIODATADIR1 (TWL4030_BASEADD_GPIO+3) #define GPIODATAOUT1 (TWL4030_BASEADD_GPIO+6) i2c_read(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1); val |= 4;Quoted 8 lines
i2c_write(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1); i2c_read(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1); val |= 4; i2c_write(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1); break; } }I'd do it like this, as...
On the xMA, xMA1, & xMA2:
TPS_GPIO2is not connected to anything...xMA3->xMC:TPS_GPIO2is connected todvi_pupstatic void
beagle_dvi_pup(void){ uchar val; switch (get_board_revision()) { case REVISION_AXBX: case REVISION_CX: case REVISION_C4: gpio_request(170, ""); gpio_direction_output(170, 0); gpio_set_value(170, 1); break; case REVISION_XM_AB: case REVISION_XM_C: default: #define GPIODATADIR1 (TWL4030_BASEADD_GPIO+3) #define GPIODATAOUT1 (TWL4030_BASEADD_GPIO+6) i2c_read(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1); val |= 4;
Quoted 8 lines
i2c_write(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1);
i2c_read(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1);
val |= 4;
i2c_write(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1);
break;
}
}Thanks for the review. sounds good. I will update
http://patchwork.ozlabs.org/patch/258634/ accordingly for a rev3.
Will wait till Monday before posting a new series to accommodate any further comments.
Signature · 2 lines
Regards, Nishanth Menon
PATCH 5/5 omap3_beagle: support booting from zImage and device tree as last option
In reply to Nishanth MenonIf no other bootoption works, try loading up device tree and zImage.
This is selected as the last option to allow backward compatibility as well as support the recent trend in moving kernel boot to using zImage and device tree.
NOTE: if uImage is present in bootpart, it will try this first and will assume this is to be booted with bootm (so may be concatenated image or plain vanilla ATAG MACHINE_ID based image)
--- include/configs/omap3_beagle.h | 8 ++++++++ 1 file changed, 8 insertions(+)
include/configs/omap3_beagle.h +8 -0
@@ -284,6 +284,9 @@"mmcboot=echo Booting from mmc ...; " \"run mmcargs; " \"bootm ${loadaddr}\0" \ +"mmcbootz=echo Booting with DT from mmc${mmcdev} ...; " \ +"run mmcargs; " \ +"bootz ${loadaddr} - ${fdtaddr}\0" \"nandboot=echo Booting from nand ...; " \"run nandargs; " \"nand read ${loadaddr} 280000 400000; " \
@@ -318,6 +321,11 @@"fi;" \"fi;" \"run nandboot;" \ +"setenv bootfile zImage;" \ +"if run loadimage; then " \ +"run loadfdt;" \ +"run mmcbootz; " \ + "fi; " \#define CONFIG_AUTO_COMPLETE 1/*
Signature · 1 line
1.7.9.5