Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

board: arm: add support for the teensy4 board #32285

Merged
merged 2 commits into from
Jul 19, 2021

Conversation

bdkrae
Copy link

@bdkrae bdkrae commented Feb 13, 2021

This branch adds support for the teensy4 board family (Teensy 4.0 and Teensy 4.1). The configuration is based on the mimxrt1060_evk, the teensy project documentation and the IMXRT1060 reference manual.

Code is successfully tested with the following sample code:
blinky
philosophers
hello_world
drivers/can
Zephyr spi loopback test also succeeds, config file is included in this PR.

Example applications using many peripherals can be found here:
https:/ufechner7/zephyr_teensy4_test
https:/bdkrae/zephyr_teensy4_test

Closes #30204.

@github-actions github-actions bot added area: Boards area: Devicetree area: Documentation area: Tests Issues related to a particular existing or missing test labels Feb 13, 2021
@bdkrae bdkrae force-pushed the teensy4-final branch 4 times, most recently from a58fbe0 to 8568765 Compare February 14, 2021 21:33
@bdkrae bdkrae force-pushed the teensy4-final branch 5 times, most recently from 60a4b94 to 48e1fc4 Compare March 13, 2021 21:54
@bdkrae
Copy link
Author

bdkrae commented Mar 13, 2021

Had to remove the config file for spi loopback test, caused errors in the tests.

@github-actions
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label May 13, 2021
Copy link
Member

@MaureenHelm MaureenHelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for your contribution, and apologies for the late review.

I'm not sure how to handle the alternative ethernet PHY yet, because the hal_nxp repo is for code imported from the MCUXpresso SDK. New code developed for zephyr should go into the main zephyr repo.

Comment on lines 15 to 18
# correct part no would be MIMXRT1062DVJ6A for TEENSY41, but this type does
# not exist in zephyr´s SOC definition. MIMXRT1062DVL6A type is used instead
# as the only difference is package pitch.
select SOC_PART_NUMBER_MIMXRT1062DVL6A
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please go ahead and add this part number to soc/arm/nxp_imx/rt/Kconfig.soc

boards/arm/teensy4/Kconfig.defconfig Outdated Show resolved Hide resolved
boards/arm/teensy4/dts_fixup.h Outdated Show resolved Hide resolved
boards/arm/teensy4/teensy41.dts Outdated Show resolved Hide resolved
@jukkar
Copy link
Member

jukkar commented May 18, 2021

The #34718 is proposing a generic PHY and MDIO driver. Could that PR utilized with this PR and mcux driver?

@bdkrae
Copy link
Author

bdkrae commented May 18, 2021

@jukkar Thanks for your advise, I will try. Using a generic driver would be great.

Copy link
Member

@MaureenHelm MaureenHelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks better, thank you!

Will you please split the PHY and SOC_PART_NUMBER_MIMXRT1062DVJ6A changes into separate commits?

@bdkrae bdkrae force-pushed the teensy4-final branch 5 times, most recently from 98cc904 to 5fb53fe Compare May 18, 2021 19:37
MIMXRT1062DVJ6A

Signed-off-by: Bernhard Krämer <[email protected]>
@bdkrae
Copy link
Author

bdkrae commented May 18, 2021

Current solution provides a workaround for the ethernet phy without needing zephyrproject-rtos/hal_nxp#71. Since this is a rather hacky solution, I would agree to rework to generic Phy driver as soon as #34718 is accepted.

@ld-cd
Copy link

ld-cd commented Jun 12, 2021

I'm interested in getting this merged, is there anything I can do to assist with this. I have a 4.0 and a 4.1 so I can do some testing (with the sdcard for example, etc), or I can take a stab at any refactoring that needs to be done.

@bdkrae
Copy link
Author

bdkrae commented Jun 13, 2021

The provided networking solution prevents this PR from being merged. Last weeks I hoped that #34718 will soon be accepted and also prepared a new networking solution based on this. But this seems to get a longer story and also deeply affects the mcux ethernet stack, which will make the things complicated.

So I will rewrite this PR next days and remove networking for the moment.

@ld-cd
SDcard is a good idea, its poorly tested from my side and still has some unsolved problems, see here. For me it not feels really stable at the moment. Maybe you could look for a solution on this and prepare a PR to fix.

@ld-cd
Copy link

ld-cd commented Jun 14, 2021

Alright, I'll do some testing with the SDCard and see if I encounter anything that can be improved

supports version 4.0 and 4.1

Signed-off-by: Bernhard Krämer <[email protected]>
@pfalcon pfalcon removed their request for review July 19, 2021 14:20
@MaureenHelm
Copy link
Member

@dleach02 will you please review?

@MaureenHelm MaureenHelm merged commit add49eb into zephyrproject-rtos:main Jul 19, 2021
@bdkrae bdkrae deleted the teensy4-final branch July 19, 2021 17:39
@galak
Copy link
Collaborator

galak commented Jul 20, 2021

@bdkrae looks like there are some CI failures on these boards:

ERROR   - teensy40                  samples/subsys/usb/dfu/sample.usb.dfu              FAILED: Cmake build failure
ERROR   - see: /home/galak/git/zephyr/twister-out/teensy40/samples/subsys/usb/dfu/sample.usb.dfu/build.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Teensy 4.0 and 4.1
6 participants