Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'mailbox-v6.3' of git://git.linaro.org/landing-teams/working/fujitsu/integration

Pull mailbox updates from Jassi Brar:

- qcom: misc changes to bindings for sa8775p, QDU1000/QRU1000, IPQ5332,
SDX55, msm8976, glink-rpm-edge

- sti: convert to DT schema

- zynq: switch to flexible array to simplify code

* tag 'mailbox-v6.3' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
dt-bindings: mailbox: qcom-ipcc: Add compatible for QDU1000/QRU1000
mailbox: qcom-apcs-ipc: add IPQ5332 APSS clock support
dt-bindings: mailbox: qcom: add compatible for the IPQ5332 SoC
dt-bindings: remoteproc: qcom,glink-rpm-edge: convert to DT schema
mailbox: qcom-apcs-ipc: enable APCS clock device for MSM8996
dt-bindings: mailbox: qcom: add #clock-cells to msm8996 example
dt-bindings: mailbox: qcom: add missing platforms to conditional clauses
dt-bindings: mailbox: qcom: correct the list of platforms using clocks
dt-bindings: mailbox: qcom: enable syscon compatible for msm8976
dt-bindings: mailbox: qcom: add SDX55 compatible
dt-bindings: mailbox: qcom-ipcc: document the sa8775p platform
dt-bindings: mailbox: sti-mailbox: convert to DT schema
mailbox: zynq: Switch to flexible array to simplify code

+197 -164
+39 -14
Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
··· 18 18 oneOf: 19 19 - items: 20 20 - enum: 21 + - qcom,ipq5332-apcs-apps-global 22 + - const: qcom,ipq6018-apcs-apps-global 23 + - items: 24 + - enum: 21 25 - qcom,ipq6018-apcs-apps-global 22 26 - qcom,ipq8074-apcs-apps-global 23 - - qcom,msm8976-apcs-kpss-global 24 27 - qcom,msm8996-apcs-hmss-global 25 28 - qcom,msm8998-apcs-hmss-global 26 29 - qcom,qcm2290-apcs-hmss-global ··· 40 37 - qcom,msm8916-apcs-kpss-global 41 38 - qcom,msm8939-apcs-kpss-global 42 39 - qcom,msm8953-apcs-kpss-global 40 + - qcom,msm8976-apcs-kpss-global 43 41 - qcom,msm8994-apcs-kpss-global 44 42 - qcom,qcs404-apcs-apps-global 43 + - qcom,sdx55-apcs-gcc 45 44 - const: syscon 46 45 reg: 47 46 maxItems: 1 ··· 76 71 compatible: 77 72 enum: 78 73 - qcom,msm8916-apcs-kpss-global 79 - - qcom,msm8994-apcs-kpss-global 80 - - qcom,msm8996-apcs-hmss-global 81 - - qcom,msm8998-apcs-hmss-global 74 + - qcom,msm8939-apcs-kpss-global 82 75 - qcom,qcs404-apcs-apps-global 83 - - qcom,sc7180-apss-shared 84 - - qcom,sdm660-apcs-hmss-global 85 - - qcom,sdm845-apss-shared 86 - - qcom,sm6125-apcs-hmss-global 87 - - qcom,sm8150-apss-shared 88 76 then: 89 77 properties: 90 78 clocks: ··· 108 110 - if: 109 111 properties: 110 112 compatible: 111 - enum: 112 - - qcom,ipq6018-apcs-apps-global 113 - - qcom,ipq8074-apcs-apps-global 113 + contains: 114 + enum: 115 + - qcom,ipq6018-apcs-apps-global 116 + - qcom,ipq8074-apcs-apps-global 114 117 then: 115 118 properties: 116 119 clocks: ··· 122 123 items: 123 124 - const: pll 124 125 - const: xo 126 + 125 127 - if: 126 128 properties: 127 129 compatible: 128 130 enum: 129 - - qcom,ipq6018-apcs-apps-global 130 - - qcom,ipq8074-apcs-apps-global 131 + - qcom,msm8953-apcs-kpss-global 132 + - qcom,msm8976-apcs-kpss-global 133 + - qcom,msm8994-apcs-kpss-global 134 + - qcom,msm8996-apcs-hmss-global 135 + - qcom,msm8998-apcs-hmss-global 136 + - qcom,qcm2290-apcs-hmss-global 137 + - qcom,sc7180-apss-shared 138 + - qcom,sc8180x-apss-shared 139 + - qcom,sdm660-apcs-hmss-global 140 + - qcom,sdm845-apss-shared 141 + - qcom,sm4250-apcs-hmss-global 142 + - qcom,sm6115-apcs-hmss-global 143 + - qcom,sm6125-apcs-hmss-global 144 + - qcom,sm8150-apss-shared 145 + then: 146 + properties: 147 + clocks: false 148 + clock-names: false 149 + 150 + - if: 151 + properties: 152 + compatible: 153 + contains: 154 + enum: 155 + - qcom,ipq6018-apcs-apps-global 156 + - qcom,ipq8074-apcs-apps-global 131 157 then: 132 158 properties: 133 159 '#clock-cells': ··· 172 148 reg = <0x9820000 0x1000>; 173 149 174 150 #mbox-cells = <1>; 151 + #clock-cells = <0>; 175 152 }; 176 153 177 154 rpm-glink {
+2
Documentation/devicetree/bindings/mailbox/qcom-ipcc.yaml
··· 24 24 compatible: 25 25 items: 26 26 - enum: 27 + - qcom,qdu1000-ipcc 28 + - qcom,sa8775p-ipcc 27 29 - qcom,sc7280-ipcc 28 30 - qcom,sc8280xp-ipcc 29 31 - qcom,sm6350-ipcc
+53
Documentation/devicetree/bindings/mailbox/st,sti-mailbox.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mailbox/st,sti-mailbox.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: STMicroelectronics Mailbox Driver for STi platform 8 + 9 + description: 10 + Each ST Mailbox IP currently consists of 4 instances of 32 channels. 11 + Messages are passed between Application and Remote processors using 12 + shared memory. 13 + 14 + maintainers: 15 + - Patrice Chotard <patrice.chotard@foss.st.com> 16 + 17 + properties: 18 + compatible: 19 + const: st,stih407-mailbox 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + mbox-name: 25 + $ref: /schemas/types.yaml#/definitions/string 26 + description: name of the mailbox IP 27 + 28 + interrupts: 29 + description: the irq line for the RX mailbox 30 + maxItems: 1 31 + 32 + "#mbox-cells": 33 + const: 2 34 + 35 + required: 36 + - compatible 37 + - reg 38 + - "#mbox-cells" 39 + 40 + additionalProperties: false 41 + 42 + examples: 43 + - | 44 + #include <dt-bindings/interrupt-controller/arm-gic.h> 45 + mailbox0: mailbox@8f00000 { 46 + compatible = "st,stih407-mailbox"; 47 + reg = <0x8f00000 0x1000>; 48 + interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; 49 + #mbox-cells = <2>; 50 + mbox-name = "a9"; 51 + }; 52 + 53 + ...
-51
Documentation/devicetree/bindings/mailbox/sti-mailbox.txt
··· 1 - ST Microelectronics Mailbox Driver 2 - 3 - Each ST Mailbox IP currently consists of 4 instances of 32 channels. Messages 4 - are passed between Application and Remote processors using shared memory. 5 - 6 - Controller 7 - ---------- 8 - 9 - Required properties: 10 - - compatible : Should be "st,stih407-mailbox" 11 - - reg : Offset and length of the device's register set 12 - - mbox-name : Name of the mailbox 13 - - #mbox-cells: : Must be 2 14 - <&phandle instance channel direction> 15 - phandle : Label name of controller 16 - instance : Instance number 17 - channel : Channel number 18 - 19 - Optional properties 20 - - interrupts : Contains the IRQ line for a Rx mailbox 21 - 22 - Example: 23 - 24 - mailbox0: mailbox@0 { 25 - compatible = "st,stih407-mailbox"; 26 - reg = <0x08f00000 0x1000>; 27 - interrupts = <GIC_SPI 1 IRQ_TYPE_NONE>; 28 - #mbox-cells = <2>; 29 - mbox-name = "a9"; 30 - }; 31 - 32 - Client 33 - ------ 34 - 35 - Required properties: 36 - - compatible : Many (See the client docs) 37 - - reg : Shared (between Application and Remote) memory address 38 - - mboxes : Standard property to specify a Mailbox (See ./mailbox.txt) 39 - Cells must match 'mbox-cells' (See Controller docs above) 40 - 41 - Optional properties 42 - - mbox-names : Name given to channels seen in the 'mboxes' property. 43 - 44 - Example: 45 - 46 - mailbox_test { 47 - compatible = "mailbox-test"; 48 - reg = <0x[shared_memory_address], [shared_memory_size]>; 49 - mboxes = <&mailbox2 0 1>, <&mailbox0 2 1>; 50 - mbox-names = "tx", "rx"; 51 - };
-94
Documentation/devicetree/bindings/soc/qcom/qcom,glink.txt
··· 1 - Qualcomm GLINK edge binding 2 - 3 - This binding describes a Qualcomm GLINK edge, a fifo based mechanism for 4 - communication between subsystem-pairs on various Qualcomm platforms. Two types 5 - of edges can be described by the binding; the GLINK RPM edge and a SMEM based 6 - edge. 7 - 8 - - compatible: 9 - Usage: required for glink-rpm 10 - Value type: <stringlist> 11 - Definition: must be "qcom,glink-rpm" 12 - 13 - - label: 14 - Usage: optional 15 - Value type: <string> 16 - Definition: should specify the subsystem name this edge corresponds to. 17 - 18 - - interrupts: 19 - Usage: required 20 - Value type: <prop-encoded-array> 21 - Definition: should specify the IRQ used by the remote processor to 22 - signal this processor about communication related events 23 - 24 - - qcom,remote-pid: 25 - Usage: required for glink-smem 26 - Value type: <u32> 27 - Definition: specifies the identifier of the remote endpoint of this edge 28 - 29 - - qcom,rpm-msg-ram: 30 - Usage: required for glink-rpm 31 - Value type: <prop-encoded-array> 32 - Definition: handle to RPM message memory resource 33 - 34 - - mboxes: 35 - Usage: required 36 - Value type: <prop-encoded-array> 37 - Definition: reference to the "rpm_hlos" mailbox in APCS, as described 38 - in mailbox/mailbox.txt 39 - 40 - = GLINK DEVICES 41 - Each subnode of the GLINK node represent function tied to a virtual 42 - communication channel. The name of the nodes are not important. The properties 43 - of these nodes are defined by the individual bindings for the specific function 44 - - but must contain the following property: 45 - 46 - - qcom,glink-channels: 47 - Usage: required 48 - Value type: <stringlist> 49 - Definition: a list of channels tied to this function, used for matching 50 - the function to a set of virtual channels 51 - 52 - - qcom,intents: 53 - Usage: optional 54 - Value type: <prop-encoded-array> 55 - Definition: a list of size,amount pairs describing what intents should 56 - be preallocated for this virtual channel. This can be used 57 - to tweak the default intents available for the channel to 58 - meet expectations of the remote. 59 - 60 - = EXAMPLE 61 - The following example represents the GLINK RPM node on a MSM8996 device, with 62 - the function for the "rpm_request" channel defined, which is used for 63 - regulators and root clocks. 64 - 65 - apcs_glb: mailbox@9820000 { 66 - compatible = "qcom,msm8996-apcs-hmss-global"; 67 - reg = <0x9820000 0x1000>; 68 - 69 - #mbox-cells = <1>; 70 - }; 71 - 72 - rpm_msg_ram: memory@68000 { 73 - compatible = "qcom,rpm-msg-ram"; 74 - reg = <0x68000 0x6000>; 75 - }; 76 - 77 - rpm-glink { 78 - compatible = "qcom,glink-rpm"; 79 - 80 - interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>; 81 - 82 - qcom,rpm-msg-ram = <&rpm_msg_ram>; 83 - 84 - mboxes = <&apcs_glb 0>; 85 - 86 - rpm-requests { 87 - compatible = "qcom,rpm-msm8996"; 88 - qcom,glink-channels = "rpm_requests"; 89 - 90 - qcom,intents = <0x400 5 91 - 0x800 1>; 92 - ... 93 - }; 94 - };
+2 -1
drivers/mailbox/qcom-apcs-ipc-mailbox.c
··· 42 42 }; 43 43 44 44 static const struct qcom_apcs_ipc_data msm8996_apcs_data = { 45 - .offset = 16, .clk_name = NULL 45 + .offset = 16, .clk_name = "qcom-apcs-msm8996-clk" 46 46 }; 47 47 48 48 static const struct qcom_apcs_ipc_data apps_shared_apcs_data = { ··· 141 141 142 142 /* .data is the offset of the ipc register within the global block */ 143 143 static const struct of_device_id qcom_apcs_ipc_of_match[] = { 144 + { .compatible = "qcom,ipq5332-apcs-apps-global", .data = &ipq6018_apcs_data }, 144 145 { .compatible = "qcom,ipq6018-apcs-apps-global", .data = &ipq6018_apcs_data }, 145 146 { .compatible = "qcom,ipq8074-apcs-apps-global", .data = &ipq6018_apcs_data }, 146 147 { .compatible = "qcom,msm8916-apcs-kpss-global", .data = &msm8916_apcs_data },
+2 -4
drivers/mailbox/zynqmp-ipi-mailbox.c
··· 110 110 unsigned int method; 111 111 u32 local_id; 112 112 int num_mboxes; 113 - struct zynqmp_ipi_mbox *ipi_mboxes; 113 + struct zynqmp_ipi_mbox ipi_mboxes[]; 114 114 }; 115 115 116 116 static struct device_driver zynqmp_ipi_mbox_driver = { ··· 635 635 int num_mboxes, ret = -EINVAL; 636 636 637 637 num_mboxes = of_get_child_count(np); 638 - pdata = devm_kzalloc(dev, sizeof(*pdata) + (num_mboxes * sizeof(*mbox)), 638 + pdata = devm_kzalloc(dev, struct_size(pdata, ipi_mboxes, num_mboxes), 639 639 GFP_KERNEL); 640 640 if (!pdata) 641 641 return -ENOMEM; ··· 649 649 } 650 650 651 651 pdata->num_mboxes = num_mboxes; 652 - pdata->ipi_mboxes = (struct zynqmp_ipi_mbox *) 653 - ((char *)pdata + sizeof(*pdata)); 654 652 655 653 mbox = pdata->ipi_mboxes; 656 654 for_each_available_child_of_node(np, nc) {