-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Same LPUART as imx8qxp. Timers seem new and needs a new driver. For now, use ARM generic timer when KernelArmExportPCNTUser and KernelArmExportPTMRUser are enabled. Signed-off-by: Indan Zupancic <[email protected]>
- Loading branch information
Showing
8 changed files
with
119 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
libplatsupport/plat_include/imx93/platsupport/plat/clock.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright 2024, Indan Zupancic | ||
* | ||
* SPDX-License-Identifier: BSD-2-Clause | ||
*/ | ||
#pragma once | ||
|
||
enum clk_id { | ||
NCLOCKS, | ||
}; | ||
|
||
enum clock_gate { | ||
NCLKGATES | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* Copyright 2024, Indan Zupancic | ||
* | ||
* SPDX-License-Identifier: BSD-2-Clause | ||
*/ | ||
#pragma once | ||
|
||
enum i2c_id { | ||
NI2C | ||
}; |
21 changes: 21 additions & 0 deletions
21
libplatsupport/plat_include/imx93/platsupport/plat/serial.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright 2024, Indan Zupancic | ||
* | ||
* SPDX-License-Identifier: BSD-2-Clause | ||
*/ | ||
#pragma once | ||
|
||
enum chardev_id { | ||
PS_SERIAL0, | ||
PS_SERIAL1, | ||
PS_SERIAL2, | ||
PS_SERIAL3, | ||
PS_SERIAL4, | ||
PS_SERIAL5, | ||
PS_SERIAL6, | ||
PS_SERIAL7, | ||
|
||
NUM_CHARDEV, | ||
|
||
PS_SERIAL_DEFAULT = PS_SERIAL0 | ||
}; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* Copyright 2024, Indan Zupancic | ||
* | ||
* SPDX-License-Identifier: BSD-2-Clause | ||
*/ | ||
#include "../../chardev.h" | ||
|
||
static const struct dev_defn lpuart[NUM_CHARDEV] = { | ||
{ | ||
.id = PS_SERIAL0, | ||
.paddr = 0x44380000, | ||
.size = 4096, | ||
.init_fn = uart_init | ||
}, | ||
{ | ||
.id = PS_SERIAL1, | ||
.paddr = 0x44390000, | ||
.size = 4096, | ||
.init_fn = uart_init | ||
}, | ||
{ | ||
.id = PS_SERIAL2, | ||
.paddr = 0x42570000, | ||
.size = 4096, | ||
.init_fn = uart_init | ||
}, | ||
{ | ||
.id = PS_SERIAL3, | ||
.paddr = 0x42580000, | ||
.size = 4096, | ||
.init_fn = uart_init | ||
}, | ||
{ | ||
.id = PS_SERIAL4, | ||
.paddr = 0x42590000, | ||
.size = 4096, | ||
.init_fn = uart_init | ||
}, | ||
{ | ||
.id = PS_SERIAL5, | ||
.paddr = 0x425a0000, | ||
.size = 4096, | ||
.init_fn = uart_init | ||
}, | ||
{ | ||
.id = PS_SERIAL6, | ||
.paddr = 0x42690000, | ||
.size = 4096, | ||
.init_fn = uart_init, | ||
}, | ||
{ | ||
.id = PS_SERIAL7, | ||
.paddr = 0x426a0000, | ||
.size = 4096, | ||
.init_fn = uart_init, | ||
} | ||
}; | ||
|
||
struct ps_chardevice * | ||
ps_cdev_init(enum chardev_id id, const ps_io_ops_t *ops, struct ps_chardevice *dev) | ||
{ | ||
if (id < PS_SERIAL0 || id >= NUM_CHARDEV) { | ||
return NULL; | ||
} | ||
if (lpuart[id].init_fn(&lpuart[id], ops, dev)) { | ||
return NULL; | ||
} | ||
return dev; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../tqma8xqp1gb/serial.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters