[U-Boot] Add support for imxrt

Hello everybody,
I would like to port imxrt to u-boot and I would like to ask you: - do you have the interest on upstreaming it? if yes: I've seen how they've dealt with 'stm32' and 'stm32mp' that is similar to 'imxrt' and 'imx'. So should follow the same criterias for porting? I mean adding the new folder 'mach-imxrt'?
Also, do I find some of you in IRC sometimes?
Thanks in advance Best regards

Hi Giulio,
On Tue, Sep 10, 2019 at 3:32 PM Giulio Benetti giulio.benetti@benettiengineering.com wrote:
Hello everybody,
I would like to port imxrt to u-boot and I would like to ask you:
- do you have the interest on upstreaming it?
if yes: I've seen how they've dealt with 'stm32' and 'stm32mp' that is similar to 'imxrt' and 'imx'. So should follow the same criterias for porting? I mean adding the new folder 'mach-imxrt'?
Yes, please submit the patches to the U-Boot list for review.
Thanks

Hi Fabio,
On 9/11/19 12:23 AM, Fabio Estevam wrote:
Hi Giulio,
On Tue, Sep 10, 2019 at 3:32 PM Giulio Benetti giulio.benetti@benettiengineering.com wrote:
Hello everybody,
I would like to port imxrt to u-boot and I would like to ask you:
- do you have the interest on upstreaming it?
if yes: I've seen how they've dealt with 'stm32' and 'stm32mp' that is similar to 'imxrt' and 'imx'. So should follow the same criterias for porting? I mean adding the new folder 'mach-imxrt'?
Yes, please submit the patches to the U-Boot list for review.
Ok, going to work on it then.
Best regards

Hi Giulio,
On 10/09/19 20:32, Giulio Benetti wrote:
Hello everybody,
I would like to port imxrt to u-boot and I would like to ask you:
- do you have the interest on upstreaming it?
if yes: I've seen how they've dealt with 'stm32' and 'stm32mp' that is similar to 'imxrt' and 'imx'. So should follow the same criterias for porting? I mean adding the new folder 'mach-imxrt'?
Agree - we should follow the same schema.
Regards, Stefano
Also, do I find some of you in IRC sometimes?
Thanks in advance Best regards

Hi Stefano,
On 9/11/19 8:50 AM, Stefano Babic wrote:
Hi Giulio,
On 10/09/19 20:32, Giulio Benetti wrote:
Hello everybody,
I would like to port imxrt to u-boot and I would like to ask you:
- do you have the interest on upstreaming it?
if yes: I've seen how they've dealt with 'stm32' and 'stm32mp' that is similar to 'imxrt' and 'imx'. So should follow the same criterias for porting? I mean adding the new folder 'mach-imxrt'?
Agree - we should follow the same schema.
Well, thanks for clarifying that to me. Going to work on it soon.
Best regards

Hi Stefano and Fabio,
On 9/11/19 8:50 AM, Stefano Babic wrote:
Hi Giulio,
On 10/09/19 20:32, Giulio Benetti wrote:
Hello everybody,
I would like to port imxrt to u-boot and I would like to ask you:
- do you have the interest on upstreaming it?
if yes: I've seen how they've dealt with 'stm32' and 'stm32mp' that is similar to 'imxrt' and 'imx'. So should follow the same criterias for porting? I mean adding the new folder 'mach-imxrt'?
Agree - we should follow the same schema.
While porting IMXRT I'm realizing that things would fit better if adding to mach-imx folder. This is because IMXRT has a lot in common with imx on low level side, i.e. iomux, clock. So I would go for mach-imx instead of mach-imxrt, is it ok?
But then I can't understand if going on trying to initialize everything through dts, even on SPL, or trying to imitate how other imx work, i.e. imx6 where they directly call low-level functions(iomuxc etc.) in board init. Which approach would be better for you all?
I wait for your answer
Thanks in advance Kind regards

Hi Giulio,
On Fri, Sep 27, 2019 at 11:57 AM Giulio Benetti giulio.benetti@benettiengineering.com wrote:
While porting IMXRT I'm realizing that things would fit better if adding to mach-imx folder. This is because IMXRT has a lot in common with imx on low level side, i.e. iomux, clock. So I would go for mach-imx instead of mach-imxrt, is it ok?
Yes, that is fine.
But then I can't understand if going on trying to initialize everything through dts, even on SPL, or trying to imitate how other imx work, i.e. imx6 where they directly call low-level functions(iomuxc etc.) in board init. Which approach would be better for you all?
We try to use DM in U-Boot proper as much as possible, but using DM in SPL is currently not a requirement, especially due to internal RAM size constraints.
Regards,
Fabio Estevam

Hi Fabio and Stefano,
On 9/29/19 9:40 PM, Fabio Estevam wrote:
We try to use DM in U-Boot proper as much as possible, but using DM in SPL is currently not a requirement, especially due to internal RAM size constraints.
IOMUXC and LPUART(using 24Mhz clock) work correctly using DM.
About clk drivers, I've seen all around that they are very shrinked Linux's version drivers. Would it make sense to add complete clk driver in u-boot starting from Linux one(i.e. vf610) or it would only grow size? I mean, after adding initial support I would like to add Lcd controller driver etc. etc. so a complete driver would be useful. Instead what I see on IMX6 clk driver is only a subsection of all PLLs and ref_sel to start Linux up.
I wait for your answer before proceeding with clk.
In the meanwhile I clean up and rebase then I begin adding sdram driver for semc.
If you want you can take a look here: https://github.com/giuliobenetti/u-boot/commits/imxrt-dts
btw I need to clean up everything and rebase, so at the moment it's a mess. It's based on U-boot 2019.10
Best regards

Hi Giulio,
On Wed, Oct 9, 2019 at 12:59 PM Giulio Benetti giulio.benetti@benettiengineering.com wrote:
Hi Fabio and Stefano,
On 9/29/19 9:40 PM, Fabio Estevam wrote:
We try to use DM in U-Boot proper as much as possible, but using DM in SPL is currently not a requirement, especially due to internal RAM size constraints.
IOMUXC and LPUART(using 24Mhz clock) work correctly using DM.
About clk drivers, I've seen all around that they are very shrinked Linux's version drivers. Would it make sense to add complete clk driver in u-boot starting from Linux one(i.e. vf610) or it would only grow size? I mean, after adding initial support I would like to add Lcd controller driver etc. etc. so a complete driver would be useful. Instead what I see on IMX6 clk driver is only a subsection of all PLLs and ref_sel to start Linux up.
Yes, since you are adding this from scratch, I would suggest adding a complete clock driver, which is close to the Linux driver.
Regards,
Fabio Estevam

Hi Fabio,
On 10/9/19 6:03 PM, Fabio Estevam wrote:
Hi Giulio,
On Wed, Oct 9, 2019 at 12:59 PM Giulio Benetti giulio.benetti@benettiengineering.com wrote:
Hi Fabio and Stefano,
On 9/29/19 9:40 PM, Fabio Estevam wrote:
We try to use DM in U-Boot proper as much as possible, but using DM in SPL is currently not a requirement, especially due to internal RAM size constraints.
IOMUXC and LPUART(using 24Mhz clock) work correctly using DM.
About clk drivers, I've seen all around that they are very shrinked Linux's version drivers. Would it make sense to add complete clk driver in u-boot starting from Linux one(i.e. vf610) or it would only grow size? I mean, after adding initial support I would like to add Lcd controller driver etc. etc. so a complete driver would be useful. Instead what I see on IMX6 clk driver is only a subsection of all PLLs and ref_sel to start Linux up.
Yes, since you are adding this from scratch, I would suggest adding a complete clock driver, which is close to the Linux driver.
With this you mean adding every single mux, divider, gate, fixed_factor and pfd(i.e. linux/drivers/clk/imx/clk-imxq6.c)?
Or only a shrinked version of that? I mean, is it ok if I list everything during imxrt_clk_probe()?
Thanks in advance

Hi Giulio,
On Wed, Nov 6, 2019 at 7:50 PM Giulio Benetti giulio.benetti@benettiengineering.com wrote:
With this you mean adding every single mux, divider, gate, fixed_factor and pfd(i.e. linux/drivers/clk/imx/clk-imxq6.c)?
Or only a shrinked version of that? I mean, is it ok if I list everything during imxrt_clk_probe()?
I think a shrinked version would be fine.
Regards,
Fabio Estevam
participants (3)
-
Fabio Estevam
-
Giulio Benetti
-
Stefano Babic