-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
devicetree: atmel sam0: Convert UART to DT_INST and full devicetree #24572
Conversation
All checks are passing now. Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages. |
Add support for the GCLK, MCLK, and PM clock controllers. Add bindings and devicetree nodes associated with these clock controllers. Also add clock references for the SERCOM peripheral set to allow those drivers (i2c, spi, uart) to utilize this information. Signed-off-by: Kumar Gala <[email protected]>
Move the atmel,sam0-dmac binding under the dma binding dir and add cell information for channel and trigger source. Update the associated dtsi files to match these changes. This is in prep of ATMEL SAM0 SERCOMM devices like UART, I2C, and SPI to user proper 'dmas' property to specify the dma info to use. Signed-off-by: Kumar Gala <[email protected]>
Add a common header for SAM0 drivers to use to extract data from devicetree. The initial set of macros are for get the MCLK A*MASK register address for clock enablement and a set of macros for use with DMA to get the channel and trigger source or 0xff if there is no dmas property. Signed-off-by: Kumar Gala <[email protected]>
Rework the devicetree to utilize new DT_INST macros and extract per instance data for clocks and dma from devicetree. We update the atmel,sam0-uart binding for dma to replace the rxdma and txdma properties with proper 'dmas' property. Signed-off-by: Kumar Gala <[email protected]>
Verified working on SAM E54. |
trigger source. | ||
|
||
For example dmas for TX, RX on SERCOM3 | ||
dmas = <&dmac 0 0xb>, <&dmac 0 0xa>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think important add MCU model when given example. For SAMR21 SERCOM3 triggers are 0x8 and 0x7.
Not sure about dma channels, but I believe should be 1 and 0, for instance.
For example the MCU xxxx dmas for TX, RX on SERCOM3
dmas = <&dmac 1 0xb>, <&dmac 0 0xa>;
I tested normal UART with SAMD20 and SAMR21 using shell. |
Add clock support for MCLK, GCLK, and PM to allow SAM0 drivers to be full devicetree based. Also move to proper dma devicetree support.