Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ properties:
const: thead,th1520-aon

mboxes:
maxItems: 1
maxItems: 2

mbox-names:
items:
- const: aon
- const: aon-for-sbi

resets:
maxItems: 1
Expand All @@ -54,7 +55,7 @@ examples:
- |
aon: aon {
compatible = "thead,th1520-aon";
mboxes = <&mbox_910t 1>;
mbox-names = "aon";
mboxes = <&mbox_910t 1>, <&mbox_910r 1>;
mbox-names = "aon", "aon-for-sbi";
#power-domain-cells = <1>;
};
49 changes: 36 additions & 13 deletions Documentation/devicetree/bindings/mailbox/thead,th1520-mbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ description:
through mailbox channels. It also allows one core to signal another processor
using interrupts via the Interrupt Controller Unit (ICU).

The SoC is divided to two worlds, REE and TEE, although it's currently unknown
how to enable the seperation between worlds so the seperation does not exist
yet. However each mailbox is assigned to a certain world, and register windows
for mailboxes are assigned to different worlds too. In a certain world's
register windows for mailboxes, only mailboxes assigned to this world will
have the local ICU part mapped (in addition to the remote ICU part of the
other same-world mailbox), and mailboxes assigned to the other world have
only the coressponding remote ICU part mapped to this world. Two mailboxes
(C910T and E902) are assigned to the TEE world and two mailboxes (C906 and
C910R) are assigned to the REE world.

maintainers:
- Michal Wilczynski <m.wilczynski@samsung.com>

Expand All @@ -22,9 +33,9 @@ properties:
clocks:
items:
- description: Clock for the local mailbox
- description: Clock for remote ICU 0
- description: Clock for remote ICU 1
- description: Clock for remote ICU 2
- description: Clock for the other mailbox in the same world
- description: Clock for the first mailbox in the other world
- description: Clock for the second mailbox in the other world

clock-names:
items:
Expand All @@ -35,10 +46,14 @@ properties:

reg:
items:
- description: Mailbox local base address
- description: Remote ICU 0 base address
- description: Remote ICU 1 base address
- description: Remote ICU 2 base address
- description: Base address of this specific mailbox
- description: Base address of the other mailbox in the same world
- description:
Base address of the register window in this world corresponding to the
first other-world mailbox.
- description:
Base address of the register window in this world corresponding to the
second other-world mailbox.

reg-names:
items:
Expand All @@ -50,10 +65,17 @@ properties:
interrupts:
maxItems: 1

thead,mbox-id:
$ref: /schemas/types.yaml#/definitions/uint32
description:
The ID of this specific mailbox that this device tree node describes. For
compatibility with old device trees, if missing, the ID is default to 0,
the C910T mailbox.

'#mbox-cells':
const: 1
description:
The one and only cell describes destination CPU ID.
The one and only cell describes destination mailbox ID.

required:
- compatible
Expand All @@ -72,18 +94,19 @@ examples:
soc {
#address-cells = <2>;
#size-cells = <2>;
mailbox@ffffc38000 {
mbox_c910t: mailbox@ffffc38000 {
compatible = "thead,th1520-mbox";
reg = <0xff 0xffc38000 0x0 0x4000>,
<0xff 0xffc44000 0x0 0x1000>,
<0xff 0xffc4c000 0x0 0x1000>,
<0xff 0xffc54000 0x0 0x1000>;
reg = <0xff 0xffc38000 0x0 0x6000>,
<0xff 0xffc44000 0x0 0x6000>,
<0xff 0xffc4c000 0x0 0x2000>,
<0xff 0xffc54000 0x0 0x2000>;
reg-names = "local", "remote-icu0", "remote-icu1", "remote-icu2";
clocks = <&clk CLK_MBOX0>, <&clk CLK_MBOX1>, <&clk CLK_MBOX2>,
<&clk CLK_MBOX3>;
clock-names = "clk-local", "clk-remote-icu0", "clk-remote-icu1",
"clk-remote-icu2";
interrupts = <28>;
#mbox-cells = <1>;
thead,mbox-id = <0>;
};
};
20 changes: 18 additions & 2 deletions arch/riscv/boot/dts/thead/th1520.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@

aon: aon {
compatible = "thead,th1520-aon";
mboxes = <&mbox_910t 1>;
mbox-names = "aon";
mboxes = <&mbox_910t 1>, <&mbox_910r 1>;
mbox-names = "aon", "aon-for-sbi";
resets = <&rst TH1520_RESET_ID_GPU_CLKGEN>;
reset-names = "gpu-clkgen";
#power-domain-cells = <1>;
Expand Down Expand Up @@ -565,6 +565,22 @@
status = "disabled";
};

mbox_910r: mbox@ffefc53000 {
compatible = "thead,th1520-mbox";
reg = <0xff 0xefc50000 0x0 0x6000>,
<0xff 0xefc48000 0x0 0x6000>,
<0xff 0xefc3e000 0x0 0x2000>,
<0xff 0xefc46000 0x0 0x2000>;
reg-names = "local", "remote-icu0", "remote-icu1", "remote-icu2";
clocks = <&clk CLK_MBOX3>, <&clk CLK_MBOX2>, <&clk CLK_MBOX0>,
<&clk CLK_MBOX1>;
clock-names = "clk-local", "clk-remote-icu0", "clk-remote-icu1",
"clk-remote-icu2";
thead,mbox-id = <3>;
#mbox-cells = <1>;
status = "reserved";
};

uart4: serial@fff7f08000 {
compatible = "snps,dw-apb-uart";
reg = <0xff 0xf7f08000 0x0 0x4000>;
Expand Down
Loading