diff mbox series

[2/4] dt-bindings: net: can: Make interrupt attributes optional for MCAN

Message ID 20230419223323.20384-3-jm@ti.com (mailing list archive)
State New, archived
Headers show
Series Enable multiple MCAN on AM62x | expand

Commit Message

Judith Mendez April 19, 2023, 10:33 p.m. UTC
For MCAN, remove interrupt and interrupt names from the required
section.

On AM62x SoC, MCANs on MCU domain do not have hardware interrupt
routed to A53 Linux, instead they will use software interrupt
by hrtimer. Make interrupt attributes optional in MCAN node
by removing from required section.

Signed-off-by: Judith Mendez <jm@ti.com>
---
 Documentation/devicetree/bindings/net/can/bosch,m_can.yaml | 2 --
 1 file changed, 2 deletions(-)

Comments

Marc Kleine-Budde April 20, 2023, 10:01 a.m. UTC | #1
On 19.04.2023 17:33:21, Judith Mendez wrote:
> For MCAN, remove interrupt and interrupt names from the required
> section.
> 
> On AM62x SoC, MCANs on MCU domain do not have hardware interrupt
> routed to A53 Linux, instead they will use software interrupt
> by hrtimer. Make interrupt attributes optional in MCAN node
> by removing from required section.
> 
> Signed-off-by: Judith Mendez <jm@ti.com>

This series basically adds polling support to the driver, which is
needed due to HW limitations.

The proposed logic in the driver is to use polling if
platform_get_irq_byname() fails (due to whatever reason) use polling
with a hard-coded interval.

In the kernel I've found the following properties that describe the
polling interval:

bindings/input/input.yaml:

|   poll-interval:
|     description: Poll interval time in milliseconds.
|     $ref: /schemas/types.yaml#/definitions/uint32


bindings/thermal/thermal-zones.yaml:

|       polling-delay:
|         $ref: /schemas/types.yaml#/definitions/uint32
|         description:
|           The maximum number of milliseconds to wait between polls when
|           checking this thermal zone. Setting this to 0 disables the polling
|           timers setup by the thermal framework and assumes that the thermal
|           sensors in this zone support interrupts.

bindings/regulator/dlg,da9121.yaml

|   dlg,irq-polling-delay-passive-ms:
|     minimum: 1000
|     maximum: 10000
|     description: |
|       Specify the polling period, measured in milliseconds, between interrupt status
|       update checks. Range 1000-10000 ms.

From my point of view the poll-interval from the input subsystem looks
good. Any objections to use it to specify the polling interval for
IRQ-less devices, too?

> ---
>  Documentation/devicetree/bindings/net/can/bosch,m_can.yaml | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
> index 67879aab623b..43f1aa9addc0 100644
> --- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
> +++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
> @@ -122,8 +122,6 @@ required:
>    - compatible
>    - reg
>    - reg-names
> -  - interrupts
> -  - interrupt-names
>    - clocks
>    - clock-names
>    - bosch,mram-cfg
> -- 
> 2.17.1
> 
> 

regards,
Marc
Krzysztof Kozlowski April 20, 2023, 3:47 p.m. UTC | #2
On 20/04/2023 12:01, Marc Kleine-Budde wrote:
> On 19.04.2023 17:33:21, Judith Mendez wrote:
>> For MCAN, remove interrupt and interrupt names from the required
>> section.
>>
>> On AM62x SoC, MCANs on MCU domain do not have hardware interrupt
>> routed to A53 Linux, instead they will use software interrupt
>> by hrtimer. Make interrupt attributes optional in MCAN node
>> by removing from required section.
>>
>> Signed-off-by: Judith Mendez <jm@ti.com>
> 
> This series basically adds polling support to the driver, which is
> needed due to HW limitations.
> 
> The proposed logic in the driver is to use polling if
> platform_get_irq_byname() fails (due to whatever reason) use polling
> with a hard-coded interval.
> 
> In the kernel I've found the following properties that describe the
> polling interval:
> 
> bindings/input/input.yaml:
> 
> |   poll-interval:
> |     description: Poll interval time in milliseconds.
> |     $ref: /schemas/types.yaml#/definitions/uint32
> 
> 
> bindings/thermal/thermal-zones.yaml:
> 
> |       polling-delay:
> |         $ref: /schemas/types.yaml#/definitions/uint32
> |         description:
> |           The maximum number of milliseconds to wait between polls when
> |           checking this thermal zone. Setting this to 0 disables the polling
> |           timers setup by the thermal framework and assumes that the thermal
> |           sensors in this zone support interrupts.
> 
> bindings/regulator/dlg,da9121.yaml
> 
> |   dlg,irq-polling-delay-passive-ms:
> |     minimum: 1000
> |     maximum: 10000
> |     description: |
> |       Specify the polling period, measured in milliseconds, between interrupt status
> |       update checks. Range 1000-10000 ms.
> 
> From my point of view the poll-interval from the input subsystem looks
> good. Any objections to use it to specify the polling interval for
> IRQ-less devices, too?

Better to skip it, if delay can be figured out by driver based on
something else (e.g. clocks).

Best regards,
Krzysztof
Krzysztof Kozlowski April 20, 2023, 3:47 p.m. UTC | #3
On 20/04/2023 00:33, Judith Mendez wrote:
> For MCAN, remove interrupt and interrupt names from the required
> section.
> 
> On AM62x SoC, MCANs on MCU domain do not have hardware interrupt
> routed to A53 Linux, instead they will use software interrupt
> by hrtimer. Make interrupt attributes optional in MCAN node
> by removing from required section.
> 
> Signed-off-by: Judith Mendez <jm@ti.com>
> ---


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
index 67879aab623b..43f1aa9addc0 100644
--- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
+++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
@@ -122,8 +122,6 @@  required:
   - compatible
   - reg
   - reg-names
-  - interrupts
-  - interrupt-names
   - clocks
   - clock-names
   - bosch,mram-cfg