Re: [U-Boot] [PATCH] mx51evk: Add CONFIG_REVISION_TAG

Hi Greg, Fabio,
On Tuesday, September 18, 2012 3:00:58 PM, Greg Topmiller wrote:
Fabio/Benoit,
I tried the get_board_rev alone and it worked on my mx51evk.
In the FSL u-boot version I am using the set_board_rev is: static inline void set_board_rev(int rev) { system_rev |= (rev & 0xF) << 8; }
It is not called for the mx51evk but is used for mx35_3stack.
The set_board_rev code below doesn't make sense when looking at the FSL u-boot code or the main line and comparing to the mx51evk schematic. I don't see where either the FSL u-boot or the main line u-boot set up iomux for GPIO0_22. There are four pin possibilities, EIM_EB2, NANDF_CS6, CSPI1_MOSI, and UART3_RXD. On the schematic the UART3_RXD is tied low so that would be the only pin to make sense in this case. To make the "set_board_rev" code below work the mx51evk board specific code would have to set up the UART3_RXD to be GPIO0_22 by making its function ALT3. That being said the code below would not be a problem since the if logic would most likely be positive in any case and the system_rev would be or'd with board rev 2.
Let me know if you want the schematic I'm looking at. It's a PDF.
Best Regards,
Greg
-----Original Message----- From: Fabio Estevam [mailto:festevam@gmail.com] Sent: Monday, September 17, 2012 11:25 PM To: Benoît Thébaudeau Cc: U-Boot-Users ML; Greg Topmiller; Stefano Babic Subject: Re: [PATCH] mx51evk: Add CONFIG_REVISION_TAG
Hi Benoît ,
On Mon, Sep 17, 2012 at 4:04 PM, Benoît Thébaudeau benoit.thebaudeau@advansee.com wrote:
+u32 get_board_rev(void) +{
return get_cpu_rev();
+}
Is this enough? Looking at FSL U-boot there is also a:
static inline void set_board_rev(void) { if ((__REG(GPIO1_BASE_ADDR + 0x0) & (0x1 << 22)) == 0) system_rev |= BOARD_REV_2_0 << BOARD_VER_OFFSET;
}
On mx53loco I had very weird problems when kernel was running and it took me sometime to find out that it was due to wrong detection of the board revision, so I suggest to double check this to avoid this kind of problem on mx51evk too.
Regards,
Fabio Estevam
It looks like there is confusion between the 3stack and Babbage boards here: Fabio, the code you refer to in FSL U-Boot comes from the Babbage board, while AFAIK, the mx51evk mainline U-Boot board corresponds to the 3stack board (this is also FSL's naming for this board on their website).
Best regards, Benoît

On Tue, Sep 18, 2012 at 10:41 AM, Benoît Thébaudeau benoit.thebaudeau@advansee.com wrote:
It looks like there is confusion between the 3stack and Babbage boards here: Fabio, the code you refer to in FSL U-Boot comes from the Babbage board, while AFAIK, the mx51evk mainline U-Boot board corresponds to the 3stack board (this is also FSL's naming for this board on their website).
Not really,
mx51evk = mx51babbage
mx51_3stack is a different board.
Regards,
Fabio Estevam

On Tuesday, September 18, 2012 3:38:02 PM, Fabio Estevam wrote:
On Tue, Sep 18, 2012 at 10:41 AM, Benoît Thébaudeau benoit.thebaudeau@advansee.com wrote:
It looks like there is confusion between the 3stack and Babbage boards here: Fabio, the code you refer to in FSL U-Boot comes from the Babbage board, while AFAIK, the mx51evk mainline U-Boot board corresponds to the 3stack board (this is also FSL's naming for this board on their website).
Not really,
mx51evk = mx51babbage
mx51_3stack is a different board.
Now, I'm totally confused. FSL's website shows a board that really looks like a "3-stack" board for its i.MX51 EVK: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MCIMX51EVKJ&a...
Babbage here, different from i.MX51 EVK: http://ossguy.com/?p=317
So, do you mean that mainline U-Boot board naming is broken for mx51evk?
Best regards, Benoît

Hi Benoît,
On Tue, Sep 18, 2012 at 10:54 AM, Benoît Thébaudeau benoit.thebaudeau@advansee.com wrote:
Now, I'm totally confused. FSL's website shows a board that really looks like a "3-stack" board for its i.MX51 EVK: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MCIMX51EVKJ&a...
Yes, the board names are confusing indeed ;-)
Let me clarify: This is the official mx51 development board that Freescale makes available. The website calls it mx51evk, which is the name that we use in mainline U-boot.
Yes, you can attach a separate LCD and a daughter card to this mx51evk.
When the FSL development team started to work on kernel and bootloader for this board, they used the internal name for it: mx51 babbage.
The first mx51 board that was designed was called mx51 3stack and it is more of an internal board to the FSL development teams.
Looking at FSL u-boot source code, you will see mx51_bbg and mx51_3stack targets.
Babbage here, different from i.MX51 EVK: http://ossguy.com/?p=317
This is a mx51evk indeed, but without a WVGA LCD and the daughter card and put in a plastic shell.
So, do you mean that mainline U-Boot board naming is broken for mx51evk?
No, the name in U-boot mainline is fine and it matches the name in the website.
Hopefully I managed to clarify the board name confusion.
But back to the original patch: all you need to do is to pass set_board_rev(BOARD_REV2), so that the kernel can correctly identify the board revision correctly.
Regards,
Fabio Estevam

On Tue, Sep 18, 2012 at 11:02 AM, Fabio Estevam festevam@gmail.com wrote:
But back to the original patch: all you need to do is to pass set_board_rev(BOARD_REV2), so that the kernel can correctly identify the board revision correctly.
To make it clearer:
get_board_rev should return 0x51100 , where 0x51 is SoC type and the 8th bit (1 is the board revision).
Regards,
Fabio Estevam

On 18/09/2012 16:02, Fabio Estevam wrote:
So, do you mean that mainline U-Boot board naming is broken for mx51evk?
No, the name in U-boot mainline is fine and it matches the name in the website.
Right. I dislike if the name is different as the official name. As we can see, this generates a lot of confusion. IMHO we should also align some other boards, such as mx53loco that is officially called mx53qsb.
Best regards, Stefano Babic

On 18/09/2012 15:41, Benoît Thébaudeau wrote:
Hi Greg, Fabio,
On Tuesday, September 18, 2012 3:00:58 PM, Greg Topmiller wrote:
Fabio/Benoit,
I tried the get_board_rev alone and it worked on my mx51evk.
In the FSL u-boot version I am using the set_board_rev is: static inline void set_board_rev(int rev) { system_rev |= (rev & 0xF) << 8; }
It is not called for the mx51evk but is used for mx35_3stack.
The set_board_rev code below doesn't make sense when looking at the FSL u-boot code or the main line and comparing to the mx51evk schematic. I don't see where either the FSL u-boot or the main line u-boot set up iomux for GPIO0_22. There are four pin possibilities, EIM_EB2, NANDF_CS6, CSPI1_MOSI, and UART3_RXD. On the schematic the UART3_RXD is tied low so that would be the only pin to make sense in this case. To make the "set_board_rev" code below work the mx51evk board specific code would have to set up the UART3_RXD to be GPIO0_22 by making its function ALT3. That being said the code below would not be a problem since the if logic would most likely be positive in any case and the system_rev would be or'd with board rev 2.
Let me know if you want the schematic I'm looking at. It's a PDF.
Best Regards,
Greg
-----Original Message----- From: Fabio Estevam [mailto:festevam@gmail.com] Sent: Monday, September 17, 2012 11:25 PM To: Benoît Thébaudeau Cc: U-Boot-Users ML; Greg Topmiller; Stefano Babic Subject: Re: [PATCH] mx51evk: Add CONFIG_REVISION_TAG
Hi Benoît ,
On Mon, Sep 17, 2012 at 4:04 PM, Benoît Thébaudeau benoit.thebaudeau@advansee.com wrote:
+u32 get_board_rev(void) +{
return get_cpu_rev();
+}
Is this enough? Looking at FSL U-boot there is also a:
static inline void set_board_rev(void) { if ((__REG(GPIO1_BASE_ADDR + 0x0) & (0x1 << 22)) == 0) system_rev |= BOARD_REV_2_0 << BOARD_VER_OFFSET;
}
On mx53loco I had very weird problems when kernel was running and it took me sometime to find out that it was due to wrong detection of the board revision, so I suggest to double check this to avoid this kind of problem on mx51evk too.
Regards,
Fabio Estevam
It looks like there is confusion between the 3stack and Babbage boards here: Fabio, the code you refer to in FSL U-Boot comes from the Babbage board, while AFAIK, the mx51evk mainline U-Boot board corresponds to the 3stack board (this is also FSL's naming for this board on their website).
There has been always confusion about Freescale's names.
Babbage was the internal name for the first mx51 development board. When this board becomes available, it was referenced on Freescale's website as "mx51evk". So babbage = mx51evk.
Best regards, Stefano Babic
participants (3)
-
Benoît Thébaudeau
-
Fabio Estevam
-
Stefano Babic