8000 powerpc: Add device tree support for serial configuration by shenki · Pull Request #9029 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

powerpc: Add device tree support for serial configuration #9029

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

shenki
Copy link
Contributor
@shenki shenki commented Aug 8, 2022

This adds the device tree compiler repository as a submodule to be used by the powerpc port to configure itself. Currently basic support for detecting the machine type is implemented, and this is used to apply hard coded serial port settings. In the future the port could use the device tree to dynamically configure the serial port, and other hardware.

shenki and others added 9 commits August 8, 2022 16:37
The dtc repository contains libfdt, which will be used by the powerpc
port.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Used by libfdt.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Used by libfdt.

Signed-off-by: Joel Stanley <joel@jms.id.au>
The powerpc port will use libfdt to handle machine specific settings,
starting with the UART.

Signed-off-by: Joel Stanley <joel@jms.id.au>
COPT is added to CFLAGS like other Makefiles, but it is never set.

Signed-off-by: Joel Stanley <joel@jms.id.au>
The headers come from the microwatt repository:

 https://github.com/antonblanchard/microwatt/tree/master/include

While the microwatt syscon may change in the future, it has been stable
for some time.

Signed-off-by: Joel Stanley <joel@jms.id.au>
When using standalone microwatt, use the syscon registers to detect the
UART type and clock. This also gets the correct frequency for the
processor timebase.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
It is no longer used.

Signed-off-by: Joel Stanley <joel@jms.id.au>
If the device tree pointer is non-zero, use the device tree to
select the correct uart based on the machine type.

Signed-off-by: Joel Stanley <joel@jms.id.au>
@shenki
Copy link
Contributor Author
shenki commented Aug 8, 2022

@ozbenh @mikey @antonblanchard FYI

@@ -229,6 +229,7 @@ function ci_powerpc_setup {
}

function ci_powerpc_build {
make ${MAKEOPTS} -C ports/powerpc submodules
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be adding the "submodules" target to a Makefile dependency rather than calling it here?

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.

4 participants
0