Message ID | 20241231054900.2144961-2-quic_srichara@quicinc.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | mailbox: tmel-qmp: Introduce QCOM TMEL QMP mailbox driver | expand |
On Tue, Dec 31, 2024 at 11:18:59AM +0530, Sricharan R wrote: > From: Sricharan Ramabadhran <quic_srichara@quicinc.com> > > TMEL SS provides different kinds of services like secureboot, remote image > authentication, key management, crypto, OEM provisioning etc. This patch adds > support for remote image authentication. Support for rest of the services can > be added. > > The QMP mailbox is the primary means of communication between TMEL SS and other > subsystem on the SoC. A dedicated pair of inbound and outbound mailboxes is > implemented for each subsystem/external execution environment which needs to > communicate with TMEL for security services. The inbound mailboxes are used to > send IPC requests to TMEL, which are then processed by TMEL firmware and > accordingly the responses are sent to the requestor via outbound mailboxes. > > It is an IPC transport protocol which is light weight and supports a subset of > API's. It handles link initialization, negotiation, establishment and > communication across client(APPSS/BTSS/AUDIOSS) and server(TMEL SS). > > ----------------------------------------------- --------------------------------------------------- > | | | | > | SOC CLIENT | SOC | TMEL SS | Fix alignment for last character in above line. > | | AHB | | > | ---------- --------- --------- | | ------ ------- -------- ------------ | > | | | | | | | | WO | | | R | | | | |SERVICES | | > | | APPS |<-->| TMEL |<->| |------------->| | IN |-->| | | TMEL | |-------- | | > | | | | COM | | QMP | | RO | | | W | QMP |<--->| COM |<-->| a) ATTEST | | > | | | | | | |<-------------| | OUT |<--| | | | | b) CRYPTO | | > | | | | | | | | | | | | | | | | .. more | | > | --------- --------- --------- | | ------ ------- ------- ------------ | > | | | | > ----------------------------------------------- -------------------------------------------------- > > This binding describes the component responsible for communication between the > TMEL server based subsystems (Q6) and the TMEL client (APPSS/BTSS/AUDIOSS), > used for security services like secure image authentication, enable/disable > efuses, crypto services. Each client in the SoC has its own block of message > RAM and IRQ for communication with the TMEL SS. > > Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com> > --- > [V2] Added HW description as per comments. > Removed the fallback compatible. > Fixed naming convention to TME-L in all places. > Fixed indendation for example. > Removed the 'description' for some items. > > .../bindings/mailbox/qcom,tmel-qmp.yaml | 65 +++++++++++++++++++ > 1 file changed, 65 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml > > diff --git a/Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml b/Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml > new file mode 100644 > index 000000000000..a434359e0a2c > --- /dev/null > +++ b/Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml > @@ -0,0 +1,65 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mailbox/qcom,tmel-qmp.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm TMEL IPCC channel > + > +maintainers: > + - Sricharan Ramabadhran <quic_srichara@quicinc.com> > + > +description: > + TMEL SS provides different kinds of services like secureboot, remote image > + authentication, key management, crypto, OEM provisioning etc. This patch adds > + support for remote image authentication. Support for rest of the services can > + be added. > + > + The QMP mailbox is the primary means of communication between TMEL SS and > + other subsystem on the SoC. A dedicated pair of inbound and outbound mailboxes > + is implemented for each subsystem/external execution environment which needs to > + communicate with TMEL for security services. The inbound mailboxes are used to > + send IPC requests to TMEL, which are then processed by TMEL firmware and > + accordingly the responses are sent to the requestor via outbound mailboxes. > + > +properties: > + compatible: > + items: > + - enum: > + - qcom,ipq5424-tmel-qmp > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + mboxes: > + maxItems: 1 > + > + "#mbox-cells": > + const: 2 > + description: > + The first cell is the client-id, and the second cell is the signal-id. > + > +required: > + - compatible > + - reg > + - interrupts > + - mboxes Should 'mbox-cells' also be a required property? Since tmel_qmp_parse_devicetree -> mbox_request_channel seems to expect it. -Varada > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/arm-gic.h> > + > + tmel_qmp: mailbox@32090000 { > + compatible = "qcom,ipq5424-tmel-qmp"; > + reg = <0x32090000 0x2000>; > + interrupts = <GIC_SPI 126 IRQ_TYPE_EDGE_RISING>; > + mboxes = <&apcs_glb 20>; > + #mbox-cells = <2>; > + }; > + > +... > -- > 2.34.1 > >
On Tue, Dec 31, 2024 at 11:18:59AM +0530, Sricharan R wrote: > From: Sricharan Ramabadhran <quic_srichara@quicinc.com> > > TMEL SS provides different kinds of services like secureboot, remote image > authentication, key management, crypto, OEM provisioning etc. This patch adds > support for remote image authentication. Support for rest of the services can > be added. > > The QMP mailbox is the primary means of communication between TMEL SS and other > subsystem on the SoC. A dedicated pair of inbound and outbound mailboxes is > implemented for each subsystem/external execution environment which needs to > communicate with TMEL for security services. The inbound mailboxes are used to > send IPC requests to TMEL, which are then processed by TMEL firmware and > accordingly the responses are sent to the requestor via outbound mailboxes. > > It is an IPC transport protocol which is light weight and supports a subset of > API's. It handles link initialization, negotiation, establishment and > communication across client(APPSS/BTSS/AUDIOSS) and server(TMEL SS). You already got comment about wrapping, so implement it. ... > This binding describes the component responsible for communication between the > TMEL server based subsystems (Q6) and the TMEL client (APPSS/BTSS/AUDIOSS), APPSS? Applications Safe Software? Avoid using qcom terminology. Common name is "CPU" for example. Or explain qcom terminology... > used for security services like secure image authentication, enable/disable > efuses, crypto services. Each client in the SoC has its own block of message No need for double space " ". > RAM and IRQ for communication with the TMEL SS. > > Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com> > --- > [V2] Added HW description as per comments. > Removed the fallback compatible. > Fixed naming convention to TME-L in all places. > Fixed indendation for example. > Removed the 'description' for some items. > > .../bindings/mailbox/qcom,tmel-qmp.yaml | 65 +++++++++++++++++++ > 1 file changed, 65 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml > > diff --git a/Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml b/Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml > new file mode 100644 > index 000000000000..a434359e0a2c > --- /dev/null > +++ b/Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml No, use compatible as filename. > @@ -0,0 +1,65 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mailbox/qcom,tmel-qmp.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm TMEL IPCC channel > + > +maintainers: > + - Sricharan Ramabadhran <quic_srichara@quicinc.com> > + > +description: > + TMEL SS provides different kinds of services like secureboot, remote image > + authentication, key management, crypto, OEM provisioning etc. This patch adds > + support for remote image authentication. Support for rest of the services can > + be added. > + > + The QMP mailbox is the primary means of communication between TMEL SS and > + other subsystem on the SoC. A dedicated pair of inbound and outbound mailboxes > + is implemented for each subsystem/external execution environment which needs to > + communicate with TMEL for security services. The inbound mailboxes are used to > + send IPC requests to TMEL, which are then processed by TMEL firmware and > + accordingly the responses are sent to the requestor via outbound mailboxes. > + > +properties: > + compatible: > + items: > + - enum: > + - qcom,ipq5424-tmel-qmp Why qmp? Can TMEL on IPQ5424 be anything else? Can TMEL be SMEM or using any other remoteproc? > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + mboxes: > + maxItems: 1 > + > + "#mbox-cells": > + const: 2 > + description: > + The first cell is the client-id, and the second cell is the signal-id. > + > +required: > + - compatible > + - reg > + - interrupts > + - mboxes > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/arm-gic.h> > + > + tmel_qmp: mailbox@32090000 { Drop unused label. Best regards, Krzysztof
On 31.12.2024 6:48 AM, Sricharan R wrote: > From: Sricharan Ramabadhran <quic_srichara@quicinc.com> > > TMEL SS provides different kinds of services like secureboot, remote image Could you expand the TMEL acronym? Konrad
On 12/31/2024 11:27 AM, Varadarajan Narayanan wrote: > On Tue, Dec 31, 2024 at 11:18:59AM +0530, Sricharan R wrote: >> From: Sricharan Ramabadhran <quic_srichara@quicinc.com> >> >> TMEL SS provides different kinds of services like secureboot, remote image >> authentication, key management, crypto, OEM provisioning etc. This patch adds >> support for remote image authentication. Support for rest of the services can >> be added. >> >> The QMP mailbox is the primary means of communication between TMEL SS and other >> subsystem on the SoC. A dedicated pair of inbound and outbound mailboxes is >> implemented for each subsystem/external execution environment which needs to >> communicate with TMEL for security services. The inbound mailboxes are used to >> send IPC requests to TMEL, which are then processed by TMEL firmware and >> accordingly the responses are sent to the requestor via outbound mailboxes. >> >> It is an IPC transport protocol which is light weight and supports a subset of >> API's. It handles link initialization, negotiation, establishment and >> communication across client(APPSS/BTSS/AUDIOSS) and server(TMEL SS). >> >> ----------------------------------------------- --------------------------------------------------- >> | | | | >> | SOC CLIENT | SOC | TMEL SS | > > Fix alignment for last character in above line. > ok. >> | | AHB | | >> | ---------- --------- --------- | | ------ ------- -------- ------------ | >> | | | | | | | | WO | | | R | | | | |SERVICES | | >> | | APPS |<-->| TMEL |<->| |------------->| | IN |-->| | | TMEL | |-------- | | >> | | | | COM | | QMP | | RO | | | W | QMP |<--->| COM |<-->| a) ATTEST | | >> | | | | | | |<-------------| | OUT |<--| | | | | b) CRYPTO | | >> | | | | | | | | | | | | | | | | .. more | | >> | --------- --------- --------- | | ------ ------- ------- ------------ | >> | | | | >> ----------------------------------------------- -------------------------------------------------- >> >> This binding describes the component responsible for communication between the >> TMEL server based subsystems (Q6) and the TMEL client (APPSS/BTSS/AUDIOSS), >> used for security services like secure image authentication, enable/disable >> efuses, crypto services. Each client in the SoC has its own block of message >> RAM and IRQ for communication with the TMEL SS. >> >> Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com> >> --- >> [V2] Added HW description as per comments. >> Removed the fallback compatible. >> Fixed naming convention to TME-L in all places. >> Fixed indendation for example. >> Removed the 'description' for some items. >> >> .../bindings/mailbox/qcom,tmel-qmp.yaml | 65 +++++++++++++++++++ >> 1 file changed, 65 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml >> >> diff --git a/Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml b/Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml >> new file mode 100644 >> index 000000000000..a434359e0a2c >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml >> @@ -0,0 +1,65 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/mailbox/qcom,tmel-qmp.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Qualcomm TMEL IPCC channel >> + >> +maintainers: >> + - Sricharan Ramabadhran <quic_srichara@quicinc.com> >> + >> +description: >> + TMEL SS provides different kinds of services like secureboot, remote image >> + authentication, key management, crypto, OEM provisioning etc. This patch adds >> + support for remote image authentication. Support for rest of the services can >> + be added. >> + >> + The QMP mailbox is the primary means of communication between TMEL SS and >> + other subsystem on the SoC. A dedicated pair of inbound and outbound mailboxes >> + is implemented for each subsystem/external execution environment which needs to >> + communicate with TMEL for security services. The inbound mailboxes are used to >> + send IPC requests to TMEL, which are then processed by TMEL firmware and >> + accordingly the responses are sent to the requestor via outbound mailboxes. >> + >> +properties: >> + compatible: >> + items: >> + - enum: >> + - qcom,ipq5424-tmel-qmp >> + >> + reg: >> + maxItems: 1 >> + >> + interrupts: >> + maxItems: 1 >> + >> + mboxes: >> + maxItems: 1 >> + >> + "#mbox-cells": >> + const: 2 >> + description: >> + The first cell is the client-id, and the second cell is the signal-id. >> + >> +required: >> + - compatible >> + - reg >> + - interrupts >> + - mboxes > > Should 'mbox-cells' also be a required property? Since tmel_qmp_parse_devicetree -> mbox_request_channel seems to expect it. ok, will add. Regards, Sricharan
On 12/31/2024 2:02 PM, Krzysztof Kozlowski wrote: > On Tue, Dec 31, 2024 at 11:18:59AM +0530, Sricharan R wrote: >> From: Sricharan Ramabadhran <quic_srichara@quicinc.com> >> >> TMEL SS provides different kinds of services like secureboot, remote image >> authentication, key management, crypto, OEM provisioning etc. This patch adds >> support for remote image authentication. Support for rest of the services can >> be added. >> >> The QMP mailbox is the primary means of communication between TMEL SS and other >> subsystem on the SoC. A dedicated pair of inbound and outbound mailboxes is >> implemented for each subsystem/external execution environment which needs to >> communicate with TMEL for security services. The inbound mailboxes are used to >> send IPC requests to TMEL, which are then processed by TMEL firmware and >> accordingly the responses are sent to the requestor via outbound mailboxes. >> >> It is an IPC transport protocol which is light weight and supports a subset of >> API's. It handles link initialization, negotiation, establishment and >> communication across client(APPSS/BTSS/AUDIOSS) and server(TMEL SS). > > > You already got comment about wrapping, so implement it. > ok. > ... > > >> This binding describes the component responsible for communication between the >> TMEL server based subsystems (Q6) and the TMEL client (APPSS/BTSS/AUDIOSS), > > APPSS? Applications Safe Software? Avoid using qcom terminology. Common > name is "CPU" for example. Or explain qcom terminology... > > Ho, wanted to mention APSS (Application processor sub system). will fix. >> used for security services like secure image authentication, enable/disable >> efuses, crypto services. Each client in the SoC has its own block of message > > No need for double space " ". > ok. >> RAM and IRQ for communication with the TMEL SS. >> >> Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com> >> --- >> [V2] Added HW description as per comments. >> Removed the fallback compatible. >> Fixed naming convention to TME-L in all places. >> Fixed indendation for example. >> Removed the 'description' for some items. >> >> .../bindings/mailbox/qcom,tmel-qmp.yaml | 65 +++++++++++++++++++ >> 1 file changed, 65 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml >> >> diff --git a/Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml b/Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml >> new file mode 100644 >> index 000000000000..a434359e0a2c >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml > > No, use compatible as filename. > ok. >> @@ -0,0 +1,65 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/mailbox/qcom,tmel-qmp.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Qualcomm TMEL IPCC channel >> + >> +maintainers: >> + - Sricharan Ramabadhran <quic_srichara@quicinc.com> >> + >> +description: >> + TMEL SS provides different kinds of services like secureboot, remote image >> + authentication, key management, crypto, OEM provisioning etc. This patch adds >> + support for remote image authentication. Support for rest of the services can >> + be added. >> + >> + The QMP mailbox is the primary means of communication between TMEL SS and >> + other subsystem on the SoC. A dedicated pair of inbound and outbound mailboxes >> + is implemented for each subsystem/external execution environment which needs to >> + communicate with TMEL for security services. The inbound mailboxes are used to >> + send IPC requests to TMEL, which are then processed by TMEL firmware and >> + accordingly the responses are sent to the requestor via outbound mailboxes. >> + >> +properties: >> + compatible: >> + items: >> + - enum: >> + - qcom,ipq5424-tmel-qmp > > > Why qmp? Can TMEL on IPQ5424 be anything else? Can TMEL be SMEM or using > any other remoteproc? > TMEL on IPQ5424 uses only QMP protocol for communication. >> + >> + reg: >> + maxItems: 1 >> + >> + interrupts: >> + maxItems: 1 >> + >> + mboxes: >> + maxItems: 1 >> + >> + "#mbox-cells": >> + const: 2 >> + description: >> + The first cell is the client-id, and the second cell is the signal-id. >> + >> +required: >> + - compatible >> + - reg >> + - interrupts >> + - mboxes >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + #include <dt-bindings/interrupt-controller/arm-gic.h> >> + >> + tmel_qmp: mailbox@32090000 { > > Drop unused label. ok. Regards, Sricharan
On 12/31/2024 3:02 PM, Konrad Dybcio wrote: > On 31.12.2024 6:48 AM, Sricharan R wrote: >> From: Sricharan Ramabadhran <quic_srichara@quicinc.com> >> >> TMEL SS provides different kinds of services like secureboot, remote image > > Could you expand the TMEL acronym? > Trust Management Engine-Lite, will add. Regards, Sricharan
On 03/01/2025 19:34, Sricharan Ramabadhran wrote: >>> +description: >>> + TMEL SS provides different kinds of services like secureboot, remote image >>> + authentication, key management, crypto, OEM provisioning etc. This patch adds >>> + support for remote image authentication. Support for rest of the services can >>> + be added. >>> + >>> + The QMP mailbox is the primary means of communication between TMEL SS and >>> + other subsystem on the SoC. A dedicated pair of inbound and outbound mailboxes >>> + is implemented for each subsystem/external execution environment which needs to >>> + communicate with TMEL for security services. The inbound mailboxes are used to >>> + send IPC requests to TMEL, which are then processed by TMEL firmware and >>> + accordingly the responses are sent to the requestor via outbound mailboxes. >>> + >>> +properties: >>> + compatible: >>> + items: >>> + - enum: >>> + - qcom,ipq5424-tmel-qmp >> >> >> Why qmp? Can TMEL on IPQ5424 be anything else? Can TMEL be SMEM or using >> any other remoteproc? >> > TMEL on IPQ5424 uses only QMP protocol for communication. Then keep just "tmel". It completely defines this device. > Best regards, Krzysztof
On 1/4/2025 12:13 AM, Krzysztof Kozlowski wrote: > On 03/01/2025 19:34, Sricharan Ramabadhran wrote: >>>> +description: >>>> + TMEL SS provides different kinds of services like secureboot, remote image >>>> + authentication, key management, crypto, OEM provisioning etc. This patch adds >>>> + support for remote image authentication. Support for rest of the services can >>>> + be added. >>>> + >>>> + The QMP mailbox is the primary means of communication between TMEL SS and >>>> + other subsystem on the SoC. A dedicated pair of inbound and outbound mailboxes >>>> + is implemented for each subsystem/external execution environment which needs to >>>> + communicate with TMEL for security services. The inbound mailboxes are used to >>>> + send IPC requests to TMEL, which are then processed by TMEL firmware and >>>> + accordingly the responses are sent to the requestor via outbound mailboxes. >>>> + >>>> +properties: >>>> + compatible: >>>> + items: >>>> + - enum: >>>> + - qcom,ipq5424-tmel-qmp >>> >>> >>> Why qmp? Can TMEL on IPQ5424 be anything else? Can TMEL be SMEM or using >>> any other remoteproc? >>> >> TMEL on IPQ5424 uses only QMP protocol for communication. > > > Then keep just "tmel". It completely defines this device. ok. Regards, Sricharan
diff --git a/Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml b/Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml new file mode 100644 index 000000000000..a434359e0a2c --- /dev/null +++ b/Documentation/devicetree/bindings/mailbox/qcom,tmel-qmp.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mailbox/qcom,tmel-qmp.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm TMEL IPCC channel + +maintainers: + - Sricharan Ramabadhran <quic_srichara@quicinc.com> + +description: + TMEL SS provides different kinds of services like secureboot, remote image + authentication, key management, crypto, OEM provisioning etc. This patch adds + support for remote image authentication. Support for rest of the services can + be added. + + The QMP mailbox is the primary means of communication between TMEL SS and + other subsystem on the SoC. A dedicated pair of inbound and outbound mailboxes + is implemented for each subsystem/external execution environment which needs to + communicate with TMEL for security services. The inbound mailboxes are used to + send IPC requests to TMEL, which are then processed by TMEL firmware and + accordingly the responses are sent to the requestor via outbound mailboxes. + +properties: + compatible: + items: + - enum: + - qcom,ipq5424-tmel-qmp + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + mboxes: + maxItems: 1 + + "#mbox-cells": + const: 2 + description: + The first cell is the client-id, and the second cell is the signal-id. + +required: + - compatible + - reg + - interrupts + - mboxes + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + tmel_qmp: mailbox@32090000 { + compatible = "qcom,ipq5424-tmel-qmp"; + reg = <0x32090000 0x2000>; + interrupts = <GIC_SPI 126 IRQ_TYPE_EDGE_RISING>; + mboxes = <&apcs_glb 20>; + #mbox-cells = <2>; + }; + +...