-
Notifications
You must be signed in to change notification settings - Fork 238
QCLINUX: arm64: dts: qcom: lemans and monaco: Rework RTSS Mailbox DT to use syscon and staging overlays #1768
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
base: tech/overlay/dt
Are you sure you want to change the base?
Changes from all commits
96bae66
280fb67
acaad01
1cc19d2
09e0ccc
7547cfe
215e02f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| # SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause | ||
| %YAML 1.2 | ||
| --- | ||
| $id: http://devicetree.org/schemas/mailbox/qcom,rtss-mailbox.yaml# | ||
| $schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
|
||
| title: Qualcomm Technologies, Inc. RTSS Mailbox | ||
|
|
||
| maintainers: | ||
| - Ram Sargar <rsargar@qti.qualcomm.com> | ||
|
|
||
| description: | ||
| The RTSS mailbox exposes a shared-memory and IPCC doorbell channel between | ||
| the application processor and the RTSS subsystem, and manages handshake | ||
| with the RTSS subsystem to handle different milestones in mission mode. | ||
|
|
||
| properties: | ||
| compatible: | ||
| items: | ||
| - enum: | ||
| - qcom,sa8775p-rtss-mailbox | ||
| - qcom,qcs8300-rtss-mailbox | ||
| - const: qcom,rtss-mailbox | ||
|
|
||
| qcom,syscon-tcsr-req: | ||
| $ref: /schemas/types.yaml#/definitions/phandle-array | ||
| items: | ||
| - items: | ||
| - description: phandle to the TCSR syscon node | ||
| - description: offset of the RTSS request register from the syscon base | ||
| description: | ||
| Reference to the TCSR syscon node and register offset used to write | ||
| the boot/suspend handshake magic that RTSS reads. | ||
|
|
||
| qcom,syscon-tcsr-resp: | ||
| $ref: /schemas/types.yaml#/definitions/phandle-array | ||
| items: | ||
| - items: | ||
| - description: phandle to the TCSR syscon node | ||
| - description: offset of the RTSS response register from the syscon base | ||
| description: | ||
| Reference to the TCSR syscon node and register offset used to read | ||
| back the handshake magic RTSS acknowledges with. | ||
|
|
||
| qcom,syscon-ipc: | ||
| $ref: /schemas/types.yaml#/definitions/phandle-array | ||
| items: | ||
| - items: | ||
| - description: phandle to the APSS shared IPC syscon node | ||
| - description: offset of the IPC trigger register from the syscon base | ||
| description: | ||
| Reference to the syscon node and register offset used to trigger the | ||
| IPC interrupt that notifies RTSS a TCSR handshake register was updated. | ||
|
|
||
| mboxes: | ||
| description: | ||
| IPCC mailbox channels used to send interrupts to the RTSS-facing IPCC | ||
| client/signal pairs. | ||
|
|
||
| interrupts-extended: | ||
| description: | ||
| IPCC channels used to receive interrupts from the RTSS-facing IPCC | ||
| client/signal pairs. | ||
|
|
||
| memory-region: | ||
| items: | ||
| - description: reserved-memory carveout for the RTSS mailbox descriptor region | ||
| - description: reserved-memory carveout for the OTA region | ||
| description: | ||
| Reference to the reserved-memory regions used for the mailbox | ||
| descriptor and for OTA. | ||
|
|
||
| required: | ||
| - compatible | ||
| - qcom,syscon-tcsr-req | ||
| - qcom,syscon-tcsr-resp | ||
| - qcom,syscon-ipc | ||
| - mboxes | ||
| - interrupts-extended | ||
| - memory-region | ||
|
|
||
| additionalProperties: false | ||
|
|
||
| examples: | ||
| - | | ||
| #include <dt-bindings/interrupt-controller/irq.h> | ||
| #include <dt-bindings/mailbox/qcom-ipcc.h> | ||
|
|
||
| rtss-ipcc-mailbox { | ||
| compatible = "qcom,sa8775p-rtss-mailbox", "qcom,rtss-mailbox"; | ||
| qcom,syscon-tcsr-req = <&tcsr 0x3e02c>; | ||
| qcom,syscon-tcsr-resp = <&tcsr 0x3d018>; | ||
| qcom,syscon-ipc = <&apss_shared_ipc 0x0>; | ||
| mboxes = <&ipcc1 IPCC_CLIENT_RTSS0 0x2>, | ||
| <&ipcc1 IPCC_CLIENT_RTSS1 0x3>; | ||
| interrupts-extended = <&ipcc1 IPCC_CLIENT_RTSS0 0x2 IRQ_TYPE_EDGE_RISING>, | ||
| <&ipcc1 IPCC_CLIENT_RTSS1 0x3 IRQ_TYPE_EDGE_RISING>; | ||
| memory-region = <&sail_mailbox_mem>, <&sail_ota_mem>; | ||
| }; | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1018,6 +1018,42 @@ | |
| #mbox-cells = <2>; | ||
| }; | ||
|
|
||
| ipcc1: mailbox@488000 { | ||
| compatible = "qcom,sa8775p-ipcc", "qcom,ipcc"; | ||
| reg = <0x0 0x00488000 0x0 0x1000>; | ||
| interrupts = <GIC_SPI 231 IRQ_TYPE_LEVEL_HIGH>; | ||
| interrupt-controller; | ||
| #interrupt-cells = <3>; | ||
| #mbox-cells = <2>; | ||
| }; | ||
|
|
||
| ipcc2: mailbox@4a1000 { | ||
| compatible = "qcom,sa8775p-ipcc", "qcom,ipcc"; | ||
| reg = <0x0 0x004a1000 0x0 0x1000>; | ||
| interrupts = <GIC_SPI 553 IRQ_TYPE_LEVEL_HIGH>; | ||
| interrupt-controller; | ||
| #interrupt-cells = <3>; | ||
| #mbox-cells = <2>; | ||
| }; | ||
|
|
||
| ipcc3: mailbox@4a2000 { | ||
| compatible = "qcom,sa8775p-ipcc", "qcom,ipcc"; | ||
| reg = <0x0 0x004a2000 0x0 0x1000>; | ||
| interrupts = <GIC_SPI 554 IRQ_TYPE_LEVEL_HIGH>; | ||
| interrupt-controller; | ||
| #interrupt-cells = <3>; | ||
| #mbox-cells = <2>; | ||
| }; | ||
|
|
||
| ipcc4: mailbox@4a3000 { | ||
| compatible = "qcom,sa8775p-ipcc", "qcom,ipcc"; | ||
| reg = <0x0 0x004a3000 0x0 0x1000>; | ||
| interrupts = <GIC_SPI 555 IRQ_TYPE_LEVEL_HIGH>; | ||
| interrupt-controller; | ||
| #interrupt-cells = <3>; | ||
| #mbox-cells = <2>; | ||
| }; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have consumers for ipcc2-4 at this point?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, these channels are required for RTSS communication. While the current consumer is qcom-ipcc, the actual end user is rtss-mailbox. This change addresses the existing RTSS channel limitation. The newly added channels have already been allocated from ipcc1 by Qualcomm and are intended to support:
Without reserving these channels, RTSS scalability is constrained and future clients cannot be integrated without further IPCC channel rework. This update is intended to close that gap and provide sufficient channel capacity for upcoming RTSS consumers. |
||
|
|
||
| qfprom: efuse@784000 { | ||
| compatible = "qcom,sa8775p-qfprom", "qcom,qfprom"; | ||
| reg = <0x0 0x00784000 0x0 0x3000>; | ||
|
|
@@ -4635,7 +4671,7 @@ | |
|
|
||
| tcsr: syscon@1fc0000 { | ||
| compatible = "qcom,sa8775p-tcsr", "syscon"; | ||
| reg = <0x0 0x1fc0000 0x0 0x30000>; | ||
| reg = <0x0 0x1fc0000 0x0 0x40000>; | ||
| }; | ||
|
|
||
| gpu: gpu@3d00000 { | ||
|
|
@@ -7058,6 +7094,11 @@ | |
| redistributor-stride = <0x0 0x20000>; | ||
| }; | ||
|
|
||
| apss_shared_ipc: syscon@17c0000c { | ||
| compatible = "qcom,sa8775p-tcsr", "syscon"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What exactly is behind this address? TCSR is at the other address, so it can't be TCSR.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 0x17C0000C is SoC level top router APSS HM CSR register used for special event notifications such as boot milestones and runtime events. If syscon is not preferred, would it be acceptable to keep the register local to the driver and map it through platform resources (devm_ioremap_resource()) instead? This would keep the implementation self-contained while avoiding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you going to upstream at least this patch? It is changing a common dtsi, so not really isolated.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have plan in 3 phases: phase 1, 2 will have downstream + overlay patches, after phase 2 commit work will be starting on upstreaming work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will be a pure downstream change affecting a generic dtsi, not something I would recommend doing, but up to Dmitry Baryshkov (@lumag) and Shiraz Hashim (@shashim-quic). Remember that downstream changes to the generic files can break systemready (dt check).
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dmitry Baryshkov (@lumag) , Shiraz Hashim (@shashim-quic) could please review this open point.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, you can't describe this as a TCSR. Also, I don't think that this register space is not page aligned. If you don't want to describe the hardware properly, it might be better to follow PDC example. Other option would be to describe this register space correctly and make PDC use it.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can't have just a syscon. It needs a hardware-defining compatible in front. Also this resource definition will conflict with the PDC definitions. |
||
| reg = <0x0 0x17c0000c 0x0 0x4>; | ||
| }; | ||
|
|
||
| watchdog@17c10000 { | ||
| compatible = "qcom,apss-wdt-sa8775p", "qcom,kpss-wdt"; | ||
| reg = <0x0 0x17c10000 0x0 0x1000>; | ||
|
|
||
This file was deleted.
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.
Binding should should come before it is used by another patch.
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.
expecting separate PR ?
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.
Change the order of the commits.
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.
done