mailbox/omap: add support for parsing dt devices
Subsystems (2)
PATCH v3 2/8 mailbox/omap: add support for parsing dt devices
Logic has been added to the OMAP2+ mailbox code to parse the mailbox dt nodes and construct the different mailboxes associated with the instance. The design is based on gathering the same information that was being passed previously through the platform data, except for the interrupt type configuration information.
--- .../devicetree/bindings/mailbox/omap-mailbox.txt | 43 +++++++ drivers/mailbox/mailbox-omap2.c | 130 ++++++++++++++++++--- 2 files changed, 158 insertions(+), 15 deletions(-) create mode 100644 Documentation/devicetree/bindings/mailbox/omap-mailbox.txt
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +43 -0
@@ -0,0 +1,43 @@ +OMAP2+ Mailbox Driver + +Required properties: +- compatible: Should be one of the following, + "ti,omap2-mailbox" for + OMAP2420, OMAP2430, OMAP3430, OMAP3630 SoCs + "ti,omap4-mailbox" for + OMAP44xx, OMAP54xx, AM33xx, AM43xx, DRA7xx SoCs +- reg: Contains the mailbox register address range (base address + and length) +- interrupts: Contains the interrupt information for the mailbox + device. The format is dependent on which interrupt + controller the OMAP device uses +- ti,hwmods: Name of the hwmod associated with the mailbox +- ti,mbox-num-users: Number of targets (processor devices) that the mailbox device + can interrupt +- ti,mbox-num-fifos: Number of h/w fifos within the mailbox device +- ti,mbox-names: Array of the names of the mailboxes +- ti,mbox-data: Mailbox descriptor data private to each mailbox. The 4 + cells represent the following data, + Cell #1 (tx_id) - mailbox fifo id used for + transmitting messages + Cell #2 (rx_id) - mailbox fifo id on which messages + are received + Cell #3 (irq_id) - irq identifier index number to use + from the interrupts data + Cell #4 (usr_id) - mailbox user id for identifying the + interrupt into the MPU interrupt + controller. + +Example: + +/* OMAP4 */ +mailbox: mailbox at 4a0f4000 { + compatible = "ti,omap4-mailbox"; + reg = <0x4a0f4000 0x200>; + interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>; + ti,hwmods = "mailbox"; + ti,mbox-num-users = <3>; + ti,mbox-num-fifos = <8>; + ti,mbox-names = "mbox-ipu", "mbox-dsp"; + ti,mbox-data = <0 1 0 0>, <3 2 0 0>; +};
drivers/mailbox/mailbox-omap2.c +115 -15
207 lines not on this page · raw message
Signature · 1 line
1.8.3.3
PATCH v3 2/8 mailbox/omap: add support for parsing dt devices
Quoted 27 lines · Suman Anna
Logic has been added to the OMAP2+ mailbox code to parse the mailbox dt nodes and construct the different mailboxes associated with the instance. The design is based on gathering the same information that was being passed previously through the platform data, except for the interrupt type configuration information.
Signed-off-by Suman Anna <[email protected]>---
.../devicetree/bindings/mailbox/omap-mailbox.txt| 43 +++++++drivers/mailbox/mailbox-omap2.c| 130 ++++++++++++++++++---2 files changed, 158 insertions(+), 15 deletions(-)create mode 100644
Documentation/devicetree/bindings/mailbox/omap-mailbox.txtDocumentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +7
-0@@ -0,0 +1,43 @@ +OMAP2+ Mailbox Driver + +Required properties: +- compatible: Should be one of the following, + "ti,omap2-mailbox" for + OMAP2420, OMAP2430, OMAP3430, OMAP3630 SoCs + "ti,omap4-mailbox" for
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt line 17
Quoted 10 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +10
-0+ OMAP44xx, OMAP54xx, AM33xx, AM43xx, DRA7xx SoCs +- reg: Contains the mailbox register address range (base address + and length) +- interrupts: Contains the interrupt information for the mailbox + device. The format is dependent on which interrupt + controller the OMAP device uses +- ti,hwmods: Name of the hwmod associated with the mailbox +- ti,mbox-num-users: Number of targets (processor devices) that the mailbox device + can interrupt +- ti,mbox-num-fifos: Number of h/w fifos within the mailbox device
Isn't "ti,mbox-num-users", "ti,mbox-num-fifos" this SoC specific, why do we need to encode in the device tree. Can we not have a more SoC specific compatiable and encode such info in the driver as part of the .data field in of_device_id ?
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt line 30
Quoted 13 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +13
-0+- ti,mbox-names: Array of the names of the mailboxes +- ti,mbox-data: Mailbox descriptor data private to each mailbox. The 4 + cells represent the following data, + Cell #1 (tx_id) - mailbox fifo id used for + transmitting messages + Cell #2 (rx_id) - mailbox fifo id on which messages + are received + Cell #3 (irq_id) - irq identifier index number to use + from the interrupts data + Cell #4 (usr_id) - mailbox user id for identifying the + interrupt into the MPU interrupt + controller. +
ti,mbox-data really seems like it should be encoded in the driver and not in the device tree. Is it specific to the SoC?
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt line 43
Quoted 13 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +13
-0+Example: + +/* OMAP4 */ +mailbox: mailbox@4a0f4000 { + compatible = "ti,omap4-mailbox"; + reg = <0x4a0f4000 0x200>; + interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>; + ti,hwmods = "mailbox"; + ti,mbox-num-users = <3>; + ti,mbox-num-fifos = <8>; + ti,mbox-names = "mbox-ipu", "mbox-dsp"; + ti,mbox-data = <0 1 0 0>, <3 2 0 0>; +};
[snip]
- k
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
PATCH v3 2/8 mailbox/omap: add support for parsing dt devices
Kumar,
Quoted 31 lines
Quoted 31 lines
Logic has been added to the OMAP2+ mailbox code to parse the mailbox dt nodes and construct the different mailboxes associated with the instance. The design is based on gathering the same information that was being passed previously through the platform data, except for the interrupt type configuration information.
Signed-off-by Suman Anna <[email protected]>---
.../devicetree/bindings/mailbox/omap-mailbox.txt| 43 +++++++drivers/mailbox/mailbox-omap2.c| 130 ++++++++++++++++++---2 files changed, 158 insertions(+), 15 deletions(-)create mode 100644
Documentation/devicetree/bindings/mailbox/omap-mailbox.txtDocumentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +11
-0@@ -0,0 +1,43 @@ +OMAP2+ Mailbox Driver + +Required properties: +- compatible: Should be one of the following, + "ti,omap2-mailbox" for + OMAP2420, OMAP2430, OMAP3430, OMAP3630 SoCs + "ti,omap4-mailbox" for + OMAP44xx, OMAP54xx, AM33xx, AM43xx, DRA7xx SoCs +- reg: Contains the mailbox register address range (base address + and length) +- interrupts: Contains the interrupt information for the mailbox
Quoted 8 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt line 17
Quoted 6 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +6
-0+ device. The format is dependent on which interrupt + controller the OMAP device uses +- ti,hwmods: Name of the hwmod associated with the mailbox +- ti,mbox-num-users: Number of targets (processor devices) that the mailbox device + can interrupt +- ti,mbox-num-fifos: Number of h/w fifos within the mailbox deviceIsn't "ti,mbox-num-users", "ti,mbox-num-fifos" this SoC specific, why do we need to encode in the device tree. Can we not have a more SoC specific compatiable and encode such info in the driver as part of the .data field in
of_device_id?
They are IP design parameters for the number of h/w fifos and interrupts coming out of the IP block, with the functionality identical. This information could not be read from any registers. Until OMAP5, we always had a single IP in the SoC and so these could been encoded in the driver. But in DRA7xx, a new SoC, we have 13 mailboxes which have differing number of these properties even though the functional IP block is same.
Quoted 16 lines
Quoted 4 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +3
-0+- ti,mbox-names: Array of the names of the mailboxes +- ti,mbox-data: Mailbox descriptor data private to each mailbox. The 4 + cells represent the following data,Documentation/devicetree/bindings/mailbox/omap-mailbox.txt line 30
Quoted 10 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +10
-0+ Cell #1 (tx_id) - mailbox fifo id used for + transmitting messages + Cell #2 (rx_id) - mailbox fifo id on which messages + are received + Cell #3 (irq_id) - irq identifier index number to use + from the interrupts data + Cell #4 (usr_id) - mailbox user id for identifying the + interrupt into the MPU interrupt + controller. +ti,mbox-data really seems like it should be encoded in the driver and not in the device tree. Is it specific to the SoC?
The mbox-data represents the assignment of h/w fifos between a pair of processors on an SoC, so it is specific to a mailbox IP instance in an SoC. Also, this assignment makes it flexible for anyone wishing to use their own firmware/stack on the remote processor side if using different h/w fifo combination.
So, a single SoC-specific compatible string would not be enough to identify either of the above data in the driver.
regards
Suman
Quoted 23 lines
Quoted 4 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +3
-0+Example: + +/* OMAP4 */Documentation/devicetree/bindings/mailbox/omap-mailbox.txt line 43
Quoted 10 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +10
-0+mailbox: mailbox at 4a0f4000 { + compatible = "ti,omap4-mailbox"; + reg = <0x4a0f4000 0x200>; + interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>; + ti,hwmods = "mailbox"; + ti,mbox-num-users = <3>; + ti,mbox-num-fifos = <8>; + ti,mbox-names = "mbox-ipu", "mbox-dsp"; + ti,mbox-data = <0 1 0 0>, <3 2 0 0>; +};[snip]
- k
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
PATCH v3 2/8 mailbox/omap: add support for parsing dt devices
Quoted 42 lines · Suman Anna
Kumar,
Quoted 31 lines
Quoted 31 lines
Logic has been added to the OMAP2+ mailbox code to parse the mailbox dt nodes and construct the different mailboxes associated with the instance. The design is based on gathering the same information that was being passed previously through the platform data, except for the interrupt type configuration information.
Signed-off-by Suman Anna <[email protected]>---
.../devicetree/bindings/mailbox/omap-mailbox.txt| 43 +++++++drivers/mailbox/mailbox-omap2.c| 130 ++++++++++++++++++---2 files changed, 158 insertions(+), 15 deletions(-)create mode 100644
Documentation/devicetree/bindings/mailbox/omap-mailbox.txtDocumentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +11
-0@@ -0,0 +1,43 @@ +OMAP2+ Mailbox Driver + +Required properties: +- compatible: Should be one of the following, + "ti,omap2-mailbox" for + OMAP2420, OMAP2430, OMAP3430, OMAP3630 SoCs + "ti,omap4-mailbox" for + OMAP44xx, OMAP54xx, AM33xx, AM43xx, DRA7xx SoCs +- reg: Contains the mailbox register address range (base address + and length) +- interrupts: Contains the interrupt information for the mailboxQuoted 8 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt line 17
Quoted 6 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +6
-0+ device. The format is dependent on which interrupt + controller the OMAP device uses +- ti,hwmods: Name of the hwmod associated with the mailbox +- ti,mbox-num-users: Number of targets (processor devices) that the mailbox device + can interrupt +- ti,mbox-num-fifos: Number of h/w fifos within the mailbox deviceIsn't "ti,mbox-num-users", "ti,mbox-num-fifos" this SoC specific, why do we need to encode in the device tree. Can we not have a more SoC specific compatiable and encode such info in the driver as part of the .data field in
of_device_id?
Quoted 7 lines
They are IP design parameters for the number of h/w fifos and interrupts coming out of the IP block, with the functionality identical. This information could not be read from any registers. Until OMAP5, we always had a single IP in the SoC and so these could been encoded in the driver. But in DRA7xx, a new SoC, we have 13 mailboxes which have differing number of these properties even though the functional IP block is same.
Ah, I see. Since you've got examples of the same IP with different design params in a given SoC than this makes sense.
Is that true of ti,mbox-num-users?
Quoted 16 lines
Quoted 7 lines
Quoted 7 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +7
-0+- ti,mbox-names: Array of the names of the mailboxes +- ti,mbox-data: Mailbox descriptor data private to each mailbox. The 4 + cells represent the following data, + Cell #1 (tx_id) - mailbox fifo id used for + transmitting messages + Cell #2 (rx_id) - mailbox fifo id on which messages + are receivedQuoted 8 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt line 30
Quoted 6 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +6
-0+ Cell #3 (irq_id) - irq identifier index number to use + from the interrupts data + Cell #4 (usr_id) - mailbox user id for identifying the + interrupt into the MPU interrupt + controller. +ti,mbox-data really seems like it should be encoded in the driver and not in the device tree. Is it specific to the SoC?
Quoted 8 lines
The mbox-data represents the assignment of h/w fifos between a pair of processors on an SoC, so it is specific to a mailbox IP instance in an SoC. Also, this assignment makes it flexible for anyone wishing to use their own
firmware/stackon the remote processor side if using different h/w fifo combination.So, a single SoC-specific compatible string would not be enough to identify either of the above data in the driver.
ok
- k
Quoted 28 lines
regards
SumanQuoted 23 lines
Quoted 4 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +3
-0+Example: + +/* OMAP4 */Documentation/devicetree/bindings/mailbox/omap-mailbox.txt line 43
Quoted 10 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +10
-0+mailbox: mailbox@4a0f4000 { + compatible = "ti,omap4-mailbox"; + reg = <0x4a0f4000 0x200>; + interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>; + ti,hwmods = "mailbox"; + ti,mbox-num-users = <3>; + ti,mbox-num-fifos = <8>; + ti,mbox-names = "mbox-ipu", "mbox-dsp"; + ti,mbox-data = <0 1 0 0>, <3 2 0 0>; +};[snip]
- k
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
PATCH v3 2/8 mailbox/omap: add support for parsing dt devices
Quoted 53 lines · Kumar Gala
Quoted 42 lines · Suman Anna
Kumar,
Quoted 31 lines
Quoted 31 lines
Logic has been added to the OMAP2+ mailbox code to parse the mailbox dt nodes and construct the different mailboxes associated with the instance. The design is based on gathering the same information that was being passed previously through the platform data, except for the interrupt type configuration information.
Signed-off-by Suman Anna <[email protected]>---
.../devicetree/bindings/mailbox/omap-mailbox.txt| 43 +++++++drivers/mailbox/mailbox-omap2.c| 130 ++++++++++++++++++---2 files changed, 158 insertions(+), 15 deletions(-)create mode 100644
Documentation/devicetree/bindings/mailbox/omap-mailbox.txtDocumentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +11
-0@@ -0,0 +1,43 @@ +OMAP2+ Mailbox Driver + +Required properties: +- compatible: Should be one of the following, + "ti,omap2-mailbox" for + OMAP2420, OMAP2430, OMAP3430, OMAP3630 SoCs + "ti,omap4-mailbox" for + OMAP44xx, OMAP54xx, AM33xx, AM43xx, DRA7xx SoCs +- reg: Contains the mailbox register address range (base address + and length) +- interrupts: Contains the interrupt information for the mailboxQuoted 8 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt line 17
Quoted 6 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +6
-0+ device. The format is dependent on which interrupt + controller the OMAP device uses +- ti,hwmods: Name of the hwmod associated with the mailbox +- ti,mbox-num-users: Number of targets (processor devices) that the mailbox device + can interrupt +- ti,mbox-num-fifos: Number of h/w fifos within the mailbox deviceIsn't "ti,mbox-num-users", "ti,mbox-num-fifos" this SoC specific, why do we need to encode in the device tree. Can we not have a more SoC specific compatiable and encode such info in the driver as part of the .data field in
of_device_id?Quoted 7 lines
They are IP design parameters for the number of h/w fifos and interrupts coming out of the IP block, with the functionality identical. This information could not be read from any registers. Until OMAP5, we always had a single IP in the SoC and so these could been encoded in the driver. But in DRA7xx, a new SoC, we have 13 mailboxes which have differing number of these properties even though the functional IP block is same.
Quoted 3 lines
Ah, I see. Since you've got examples of the same IP with different design params in a given SoC than this makes sense.
Is that true of ti,mbox-num-users?
Yes, it is true of both "ti,mbox-num-users" and "ti,mbox-num-fifos".
regards
Suman
Quoted 63 lines
Quoted 17 lines
Quoted 16 lines
Quoted 4 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +3
-0+- ti,mbox-names: Array of the names of the mailboxes +- ti,mbox-data: Mailbox descriptor data private to each mailbox. The 4 + cells represent the following data,Documentation/devicetree/bindings/mailbox/omap-mailbox.txt line 30
Quoted 10 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +10
-0+ Cell #1 (tx_id) - mailbox fifo id used for + transmitting messages + Cell #2 (rx_id) - mailbox fifo id on which messages + are received + Cell #3 (irq_id) - irq identifier index number to use + from the interrupts data + Cell #4 (usr_id) - mailbox user id for identifying the + interrupt into the MPU interrupt + controller. +ti,mbox-data really seems like it should be encoded in the driver and not in the device tree. Is it specific to the SoC?
Quoted 8 lines
The mbox-data represents the assignment of h/w fifos between a pair of processors on an SoC, so it is specific to a mailbox IP instance in an SoC. Also, this assignment makes it flexible for anyone wishing to use their own
firmware/stackon the remote processor side if using different h/w fifo combination.So, a single SoC-specific compatible string would not be enough to identify either of the above data in the driver.
ok
- k
Quoted 28 lines
regards
SumanQuoted 23 lines
Quoted 4 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +3
-0+Example: + +/* OMAP4 */Documentation/devicetree/bindings/mailbox/omap-mailbox.txt line 43
Quoted 10 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +10
-0+mailbox: mailbox at 4a0f4000 { + compatible = "ti,omap4-mailbox"; + reg = <0x4a0f4000 0x200>; + interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>; + ti,hwmods = "mailbox"; + ti,mbox-num-users = <3>; + ti,mbox-num-fifos = <8>; + ti,mbox-names = "mbox-ipu", "mbox-dsp"; + ti,mbox-data = <0 1 0 0>, <3 2 0 0>; +};[snip]
- k
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
PATCH v3 2/8 mailbox/omap: add support for parsing dt devices
Quoted 54 lines · Suman Anna
Quoted 53 lines · Kumar Gala
Quoted 49 lines · Suman Anna
Kumar,
Quoted 31 lines
Quoted 31 lines
Logic has been added to the OMAP2+ mailbox code to parse the mailbox dt nodes and construct the different mailboxes associated with the instance. The design is based on gathering the same information that was being passed previously through the platform data, except for the interrupt type configuration information.
Signed-off-by Suman Anna <[email protected]>---
.../devicetree/bindings/mailbox/omap-mailbox.txt| 43 +++++++drivers/mailbox/mailbox-omap2.c| 130 ++++++++++++++++++---2 files changed, 158 insertions(+), 15 deletions(-)create mode 100644
Documentation/devicetree/bindings/mailbox/omap-mailbox.txtDocumentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +11
-0@@ -0,0 +1,43 @@ +OMAP2+ Mailbox Driver + +Required properties: +- compatible: Should be one of the following, + "ti,omap2-mailbox" for + OMAP2420, OMAP2430, OMAP3430, OMAP3630 SoCs + "ti,omap4-mailbox" for + OMAP44xx, OMAP54xx, AM33xx, AM43xx, DRA7xx SoCs +- reg: Contains the mailbox register address range (base address + and length) +- interrupts: Contains the interrupt information for the mailboxQuoted 8 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt line 17
Quoted 6 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +6
-0+ device. The format is dependent on which interrupt + controller the OMAP device uses +- ti,hwmods: Name of the hwmod associated with the mailbox +- ti,mbox-num-users: Number of targets (processor devices) that the mailbox device + can interrupt +- ti,mbox-num-fifos: Number of h/w fifos within the mailbox deviceIsn't "ti,mbox-num-users", "ti,mbox-num-fifos" this SoC specific, why do we need to encode in the device tree. Can we not have a more SoC specific compatiable and encode such info in the driver as part of the .data field in
of_device_id?They are IP design parameters for the number of h/w fifos and interrupts coming out of the IP block, with the functionality identical. This information could not be read from any registers. Until OMAP5, we always had a single IP in the SoC and so these could been encoded in the driver. But in DRA7xx, a new SoC, we have 13 mailboxes which have differing number of these properties even though the functional IP block is same.
Quoted 5 lines
Quoted 3 lines
Ah, I see. Since you've got examples of the same IP with different design params in a given SoC than this makes sense.
Is that true of ti,mbox-num-users?
Yes, it is true of both "ti,mbox-num-users" and "ti,mbox-num-fifos".
So I think it would be good to update the binding to convey that SoCs might have multiple mbox units w/different design pararms (maybe a short blurb as part of the intro).
- k
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
PATCH v3 2/8 mailbox/omap: add support for parsing dt devices
Quoted 57 lines · Kumar Gala
Quoted 54 lines · Suman Anna
Quoted 53 lines · Kumar Gala
Quoted 49 lines · Suman Anna
Kumar,
Quoted 31 lines
Quoted 31 lines
Logic has been added to the OMAP2+ mailbox code to parse the mailbox dt nodes and construct the different mailboxes associated with the instance. The design is based on gathering the same information that was being passed previously through the platform data, except for the interrupt type configuration information.
Signed-off-by Suman Anna <[email protected]>---
.../devicetree/bindings/mailbox/omap-mailbox.txt| 43 +++++++drivers/mailbox/mailbox-omap2.c| 130 ++++++++++++++++++---2 files changed, 158 insertions(+), 15 deletions(-)create mode 100644
Documentation/devicetree/bindings/mailbox/omap-mailbox.txtDocumentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +11
-0@@ -0,0 +1,43 @@ +OMAP2+ Mailbox Driver + +Required properties: +- compatible: Should be one of the following, + "ti,omap2-mailbox" for + OMAP2420, OMAP2430, OMAP3430, OMAP3630 SoCs + "ti,omap4-mailbox" for + OMAP44xx, OMAP54xx, AM33xx, AM43xx, DRA7xx SoCs +- reg: Contains the mailbox register address range (base address + and length) +- interrupts: Contains the interrupt information for the mailboxQuoted 8 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt line 17
Quoted 6 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +6
-0+ device. The format is dependent on which interrupt + controller the OMAP device uses +- ti,hwmods: Name of the hwmod associated with the mailbox +- ti,mbox-num-users: Number of targets (processor devices) that the mailbox device + can interrupt +- ti,mbox-num-fifos: Number of h/w fifos within the mailbox deviceIsn't "ti,mbox-num-users", "ti,mbox-num-fifos" this SoC specific, why do we need to encode in the device tree. Can we not have a more SoC specific compatiable and encode such info in the driver as part of the .data field in
of_device_id?They are IP design parameters for the number of h/w fifos and interrupts coming out of the IP block, with the functionality identical. This information could not be read from any registers. Until OMAP5, we always had a single IP in the SoC and so these could been encoded in the driver. But in DRA7xx, a new SoC, we have 13 mailboxes which have differing number of these properties even though the functional IP block is same.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Ah, I see. Since you've got examples of the same IP with different design params in a given SoC than this makes sense.
Is that true of ti,mbox-num-users?
Yes, it is true of both "ti,mbox-num-users" and "ti,mbox-num-fifos".
So I think it would be good to update the binding to convey that SoCs might have multiple mbox units w/different design pararms (maybe a short blurb as part of the intro).
Sure will do. Will wait for Benoit also to come back on this series if I need to address any further review comments.
regards
Suman
PATCH v3 2/8 mailbox/omap: add support for parsing dt devices
Hi Suman,
Quoted 60 lines · Suman Anna
Quoted 59 lines · Kumar Gala
Quoted 56 lines · Suman Anna
Quoted 55 lines · Kumar Gala
Quoted 42 lines · Suman Anna
Kumar,
Quoted 31 lines
Quoted 31 lines
Logic has been added to the OMAP2+ mailbox code to parse the mailbox dt nodes and construct the different mailboxes associated with the instance. The design is based on gathering the same information that was being passed previously through the platform data, except for the interrupt type configuration information.
Signed-off-by Suman Anna <[email protected]>---
.../devicetree/bindings/mailbox/omap-mailbox.txt| 43 +++++++drivers/mailbox/mailbox-omap2.c| 130 ++++++++++++++++++---2 files changed, 158 insertions(+), 15 deletions(-)create mode 100644
Documentation/devicetree/bindings/mailbox/omap-mailbox.txtDocumentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +11
-0@@ -0,0 +1,43 @@ +OMAP2+ Mailbox Driver + +Required properties: +- compatible: Should be one of the following, + "ti,omap2-mailbox" for + OMAP2420, OMAP2430, OMAP3430, OMAP3630 SoCs + "ti,omap4-mailbox" for + OMAP44xx, OMAP54xx, AM33xx, AM43xx, DRA7xx SoCs +- reg: Contains the mailbox register address range (base address + and length) +- interrupts: Contains the interrupt information for the mailboxQuoted 8 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt line 17
Quoted 6 lines
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +6
-0+ device. The format is dependent on which interrupt + controller the OMAP device uses +- ti,hwmods: Name of the hwmod associated with the mailbox +- ti,mbox-num-users: Number of targets (processor devices) that the mailbox device + can interrupt +- ti,mbox-num-fifos: Number of h/w fifos within the mailbox deviceIsn't "ti,mbox-num-users", "ti,mbox-num-fifos" this SoC specific, why do we need to encode in the device tree. Can we not have a more SoC specific compatiable and encode such info in the driver as part of the .data field in
of_device_id?Quoted 7 lines
They are IP design parameters for the number of h/w fifos and interrupts coming out of the IP block, with the functionality identical. This information could not be read from any registers. Until OMAP5, we always had a single IP in the SoC and so these could been encoded in the driver. But in DRA7xx, a new SoC, we have 13 mailboxes which have differing number of these properties even though the functional IP block is same.
Ah, I see. Since you've got examples of the same IP with different design params in a given SoC than this makes sense.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Is that true of ti,mbox-num-users?
Yes, it is true of both "ti,mbox-num-users" and "ti,mbox-num-fifos".
So I think it would be good to update the binding to convey that SoCs might have multiple mbox units w/different design pararms (maybe a short blurb as part of the intro).
Sure will do. Will wait for Benoit also to come back on this series if I need to address any further review comments.
I had the same concern than Kumar originally, so if nobody has anymore complain with this binding, that fine to me. At least for the DTS part.
Regards,
Benoit
PATCH v3 2/8 mailbox/omap: add support for parsing dt devices
Hi Benoit,
Quoted 84 lines · Suman Anna
Quoted 83 lines · Kumar Gala
Quoted 81 lines · Suman Anna
Quoted 69 lines · Kumar Gala
Quoted 67 lines · Suman Anna
Quoted 64 lines
Kumar,
Quoted 42 lines
Quoted 42 lines
Logic has been added to the OMAP2+ mailbox code to parse the mailbox dt nodes and construct the different mailboxes associated with the instance. The design is based on gathering the same information that was being passed previously through the platform data, except for the interrupt type configuration information.
Signed-off-by Suman Anna <[email protected]>---
.../devicetree/bindings/mailbox/omap-mailbox.txt| 43 +++++++drivers/mailbox/mailbox-omap2.c| 130
++++++++++++++++++---2 files changed, 158 insertions(+), 15 deletions(-)create mode 100644
Documentation/devicetree/bindings/mailbox/omap-mailbox.txtdiff --git
a/Documentation/devicetree/bindings/mailbox/omap-mailbox.txtb/Documentation/devicetree/bindings/mailbox/omap-mailbox.txtnew file mode 100644
index 0000000..8ffb08aDocumentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +9
-0@@ -0,0 +1,43 @@ +OMAP2+ Mailbox Driver + +Required properties: +- compatible: Should be one of the following, + "ti,omap2-mailbox" for + OMAP2420, OMAP2430, OMAP3430, OMAP3630 SoCs + "ti,omap4-mailbox" for + OMAP44xx, OMAP54xx, AM33xx, AM43xx, DRA7xx SoCs +- reg: Contains the mailbox register address range(base address
+ and length)
+- interrupts: Contains the interrupt information for
the mailboxDocumentation/devicetree/bindings/mailbox/omap-mailbox.txt new file +4
-0+ device. The format is dependent on which interrupt + controller the OMAP device uses +- ti,hwmods: Name of the hwmod associated with the mailbox +- ti,mbox-num-users: Number of targets (processor devices)that the mailbox device
Quoted 8 lines
Quoted 3 lines
+ can interrupt
+- ti,mbox-num-fifos: Number of h/w fifos within the mailbox
deviceIsn't "ti,mbox-num-users", "ti,mbox-num-fifos" this SoC specific, why do we need to encode in the device tree. Can we not have a more SoC specific compatiable and encode such info in the driver as part of the .data field in
of_device_id?They are IP design parameters for the number of h/w fifos and interrupts
coming out of the IP block, with the functionality identical. This information could not be read from any registers. Until OMAP5, we always
had a single IP in the SoC and so these could been encoded in the driver. But in DRA7xx, a new SoC, we have 13 mailboxes which have differing number of these properties even though the functional IP block
is same.Quoted 6 lines
Quoted 4 lines
Ah, I see. Since you've got examples of the same IP with different design params in a given SoC than this makes sense.
Is that true of ti,mbox-num-users?
Yes, it is true of both "ti,mbox-num-users" and "ti,mbox-num-fifos".
So I think it would be good to update the binding to convey that SoCs might have multiple mbox units w/different design pararms (maybe a short blurb as part of the intro).
Quoted 6 lines
Quoted 2 lines
Sure will do. Will wait for Benoit also to come back on this series if I need to address any further review comments.
I had the same concern than Kumar originally, so if nobody has anymore complain with this binding, that fine to me. At least for the DTS part.
Thanks for the review. I will be re-spinning the series soon to address comments from Kevin on a different patch in this series, so planning to make some DT binding changes as well as part of that.
regards
Suman