Message ID | 20250502171417.28856-2-quic_ptalari@quicinc.com |
---|---|
State | Superseded |
Headers | show |
Series | Enable QUPs and Serial on SA8255p Qualcomm platforms | expand |
On Fri, May 02, 2025 at 10:44:10PM GMT, Praveen Talari wrote: > +required: > + - compatible > + - reg > + - interrupts > + - power-domains > + - power-domain-names > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/arm-gic.h> > + > + serial@990000 { > + compatible = "qcom,sa8255p-geni-uart"; > + reg = <0x990000 0x4000>; > + interrupts = <GIC_SPI 531 IRQ_TYPE_LEVEL_HIGH>; Why isn't here wakeup interrupt? Commit msg also does not help me to understand why number of interrupts varies. Best regards, Krzysztof
Hi Krzysztof On 5/4/2025 10:39 PM, Krzysztof Kozlowski wrote: > On Fri, May 02, 2025 at 10:44:10PM GMT, Praveen Talari wrote: >> +required: >> + - compatible >> + - reg >> + - interrupts >> + - power-domains >> + - power-domain-names >> + >> +unevaluatedProperties: false >> + >> +examples: >> + - | >> + #include <dt-bindings/interrupt-controller/arm-gic.h> >> + >> + serial@990000 { >> + compatible = "qcom,sa8255p-geni-uart"; >> + reg = <0x990000 0x4000>; >> + interrupts = <GIC_SPI 531 IRQ_TYPE_LEVEL_HIGH>; > Why isn't here wakeup interrupt? Commit msg also does not help me to > understand why number of interrupts varies. Currently we are not using wake-irq because it is optional for our current implementation. this irq configuration is same as sa87750.dtsi. Thanks, Praveen talari > > Best regards, > Krzysztof >
On Mon, May 05, 2025 at 08:00:32AM GMT, Praveen Talari wrote: > Hi Krzysztof > > On 5/4/2025 10:39 PM, Krzysztof Kozlowski wrote: > > On Fri, May 02, 2025 at 10:44:10PM GMT, Praveen Talari wrote: > > > +required: > > > + - compatible > > > + - reg > > > + - interrupts > > > + - power-domains > > > + - power-domain-names > > > + > > > +unevaluatedProperties: false > > > + > > > +examples: > > > + - | > > > + #include <dt-bindings/interrupt-controller/arm-gic.h> > > > + > > > + serial@990000 { > > > + compatible = "qcom,sa8255p-geni-uart"; > > > + reg = <0x990000 0x4000>; > > > + interrupts = <GIC_SPI 531 IRQ_TYPE_LEVEL_HIGH>; > > Why isn't here wakeup interrupt? Commit msg also does not help me to > > understand why number of interrupts varies. > > Currently we are not using wake-irq because it is optional for our current > implementation. Great explanation. I asked why is it optional, answer because it is optional. What does it mean optional? This is part of the SoC, so how given one, fixed SoC can have it routed or not routed in the same time? Best regards, Krzysztof
Hi Krzysztof On 5/5/2025 12:01 PM, Krzysztof Kozlowski wrote: > On Mon, May 05, 2025 at 08:00:32AM GMT, Praveen Talari wrote: >> Hi Krzysztof >> >> On 5/4/2025 10:39 PM, Krzysztof Kozlowski wrote: >>> On Fri, May 02, 2025 at 10:44:10PM GMT, Praveen Talari wrote: >>>> +required: >>>> + - compatible >>>> + - reg >>>> + - interrupts >>>> + - power-domains >>>> + - power-domain-names >>>> + >>>> +unevaluatedProperties: false >>>> + >>>> +examples: >>>> + - | >>>> + #include <dt-bindings/interrupt-controller/arm-gic.h> >>>> + >>>> + serial@990000 { >>>> + compatible = "qcom,sa8255p-geni-uart"; >>>> + reg = <0x990000 0x4000>; >>>> + interrupts = <GIC_SPI 531 IRQ_TYPE_LEVEL_HIGH>; >>> Why isn't here wakeup interrupt? Commit msg also does not help me to >>> understand why number of interrupts varies. >> Currently we are not using wake-irq because it is optional for our current >> implementation. > Great explanation. I asked why is it optional, answer because it is > optional. sorry. > > What does it mean optional? This is part of the SoC, so how given one, > fixed SoC can have it routed or not routed in the same time? the serial driver doesn't enter runtime suspend mode until the port is closed. therefore, there is no need for a wake IRQ when the driver is in an active state Thanks, Praveen Talari > > Best regards, > Krzysztof >
On 05/05/2025 08:51, Praveen Talari wrote: >>>>> + serial@990000 { >>>>> + compatible = "qcom,sa8255p-geni-uart"; >>>>> + reg = <0x990000 0x4000>; >>>>> + interrupts = <GIC_SPI 531 IRQ_TYPE_LEVEL_HIGH>; >>>> Why isn't here wakeup interrupt? Commit msg also does not help me to >>>> understand why number of interrupts varies. >>> Currently we are not using wake-irq because it is optional for our current >>> implementation. >> Great explanation. I asked why is it optional, answer because it is >> optional. > sorry. >> >> What does it mean optional? This is part of the SoC, so how given one, >> fixed SoC can have it routed or not routed in the same time? > > the serial driver doesn't enter runtime suspend mode until the port is > closed. > > therefore, there is no need for a wake IRQ when the driver is in an > active state You described current Linux driver, so if we change Linux driver or we try for example FreeBSD, then bindings are different? Again, explain how SoC can have this interrupt not routed. Best regards, Krzysztof
Hi Krzysztof On 5/5/2025 3:29 PM, Krzysztof Kozlowski wrote: > On 05/05/2025 08:51, Praveen Talari wrote: >>>>>> + serial@990000 { >>>>>> + compatible = "qcom,sa8255p-geni-uart"; >>>>>> + reg = <0x990000 0x4000>; >>>>>> + interrupts = <GIC_SPI 531 IRQ_TYPE_LEVEL_HIGH>; >>>>> Why isn't here wakeup interrupt? Commit msg also does not help me to >>>>> understand why number of interrupts varies. >>>> Currently we are not using wake-irq because it is optional for our current >>>> implementation. >>> Great explanation. I asked why is it optional, answer because it is >>> optional. >> sorry. >>> What does it mean optional? This is part of the SoC, so how given one, >>> fixed SoC can have it routed or not routed in the same time? >> the serial driver doesn't enter runtime suspend mode until the port is >> closed. >> >> therefore, there is no need for a wake IRQ when the driver is in an >> active state > You described current Linux driver, so if we change Linux driver or we > try for example FreeBSD, then bindings are different? Currently, the driver includes code to register the device's wakeup capability but it lacks the necessary handler code for wakeup IRQ. According to the serial driver, the wake IRQ is meant to wake up the device but the device remains active because the serial driver does not enter runtime suspend mode until the port closed. So it is better to exclude the wake IRQ until the appropriate code is added. > > Again, explain how SoC can have this interrupt not routed. > > Best regards, > Krzysztof
On 5/5/25 3:42 PM, Praveen Talari wrote: > Hi Krzysztof > > On 5/5/2025 3:29 PM, Krzysztof Kozlowski wrote: >> On 05/05/2025 08:51, Praveen Talari wrote: >>>>>>> + serial@990000 { >>>>>>> + compatible = "qcom,sa8255p-geni-uart"; >>>>>>> + reg = <0x990000 0x4000>; >>>>>>> + interrupts = <GIC_SPI 531 IRQ_TYPE_LEVEL_HIGH>; >>>>>> Why isn't here wakeup interrupt? Commit msg also does not help me to >>>>>> understand why number of interrupts varies. >>>>> Currently we are not using wake-irq because it is optional for our current >>>>> implementation. >>>> Great explanation. I asked why is it optional, answer because it is >>>> optional. >>> sorry. >>>> What does it mean optional? This is part of the SoC, so how given one, >>>> fixed SoC can have it routed or not routed in the same time? >>> the serial driver doesn't enter runtime suspend mode until the port is >>> closed. >>> >>> therefore, there is no need for a wake IRQ when the driver is in an >>> active state >> You described current Linux driver, so if we change Linux driver or we >> try for example FreeBSD, then bindings are different? > > Currently, the driver includes code to register the device's wakeup capability > > but it lacks the necessary handler code for wakeup IRQ. According to the serial driver, > > the wake IRQ is meant to wake up the device but the device remains active because > > the serial driver does not enter runtime suspend mode until the port closed. > > So it is better to exclude the wake IRQ until the appropriate code is added. No, dt-bindings must describe the hardware in its entirety (to the extent that software differentiates it), to the best of our understanding, the drivers are free to exist or not, similarly they may not implement all the features DTB and kernel versions can be out of sync, so having a complete DT description saves us from having to add explicit backwards compatibility clauses in each driver and maintain them for the next 15 years, as well as letting the user update the kernel without worrying about a breakage Konrad
On 05/05/2025 15:42, Praveen Talari wrote: > Hi Krzysztof > > On 5/5/2025 3:29 PM, Krzysztof Kozlowski wrote: >> On 05/05/2025 08:51, Praveen Talari wrote: >>>>>>> + serial@990000 { >>>>>>> + compatible = "qcom,sa8255p-geni-uart"; >>>>>>> + reg = <0x990000 0x4000>; >>>>>>> + interrupts = <GIC_SPI 531 IRQ_TYPE_LEVEL_HIGH>; >>>>>> Why isn't here wakeup interrupt? Commit msg also does not help me to >>>>>> understand why number of interrupts varies. >>>>> Currently we are not using wake-irq because it is optional for our current >>>>> implementation. >>>> Great explanation. I asked why is it optional, answer because it is >>>> optional. >>> sorry. >>>> What does it mean optional? This is part of the SoC, so how given one, >>>> fixed SoC can have it routed or not routed in the same time? >>> the serial driver doesn't enter runtime suspend mode until the port is >>> closed. >>> >>> therefore, there is no need for a wake IRQ when the driver is in an >>> active state >> You described current Linux driver, so if we change Linux driver or we >> try for example FreeBSD, then bindings are different? > > Currently, the driver includes code to register the device's wakeup > capability > > but it lacks the necessary handler code for wakeup IRQ. According to the > serial driver, > > the wake IRQ is meant to wake up the device but the device remains > active because > > the serial driver does not enter runtime suspend mode until the port > closed. > > So it is better to exclude the wake IRQ until the appropriate code is added. But my driver on FreeBSD handles the wake IRQ, why you cannot add the IRQ for it? Best regards, Krzysztof
On 5/6/2025 11:45 AM, Krzysztof Kozlowski wrote: > On 05/05/2025 15:42, Praveen Talari wrote: >> Hi Krzysztof >> >> On 5/5/2025 3:29 PM, Krzysztof Kozlowski wrote: >>> On 05/05/2025 08:51, Praveen Talari wrote: >>>>>>>> + serial@990000 { >>>>>>>> + compatible = "qcom,sa8255p-geni-uart"; >>>>>>>> + reg = <0x990000 0x4000>; >>>>>>>> + interrupts = <GIC_SPI 531 IRQ_TYPE_LEVEL_HIGH>; >>>>>>> Why isn't here wakeup interrupt? Commit msg also does not help me to >>>>>>> understand why number of interrupts varies. >>>>>> Currently we are not using wake-irq because it is optional for our current >>>>>> implementation. >>>>> Great explanation. I asked why is it optional, answer because it is >>>>> optional. >>>> sorry. >>>>> What does it mean optional? This is part of the SoC, so how given one, >>>>> fixed SoC can have it routed or not routed in the same time? >>>> the serial driver doesn't enter runtime suspend mode until the port is >>>> closed. >>>> >>>> therefore, there is no need for a wake IRQ when the driver is in an >>>> active state >>> You described current Linux driver, so if we change Linux driver or we >>> try for example FreeBSD, then bindings are different? >> Currently, the driver includes code to register the device's wakeup >> capability >> >> but it lacks the necessary handler code for wakeup IRQ. According to the >> serial driver, >> >> the wake IRQ is meant to wake up the device but the device remains >> active because >> >> the serial driver does not enter runtime suspend mode until the port >> closed. >> >> So it is better to exclude the wake IRQ until the appropriate code is added. > But my driver on FreeBSD handles the wake IRQ, why you cannot add the > IRQ for it? Will update in next patch set. Thanks, Praveen Talari > > Best regards, > Krzysztof
diff --git a/Documentation/devicetree/bindings/serial/qcom,sa8255p-geni-uart.yaml b/Documentation/devicetree/bindings/serial/qcom,sa8255p-geni-uart.yaml new file mode 100644 index 000000000000..85b1d7c05079 --- /dev/null +++ b/Documentation/devicetree/bindings/serial/qcom,sa8255p-geni-uart.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/qcom,sa8255p-geni-uart.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Geni based QUP UART interface + +maintainers: + - Praveen Talari <quic_ptalari@quicinc.com> + +allOf: + - $ref: /schemas/serial/serial.yaml# + +properties: + compatible: + enum: + - qcom,sa8255p-geni-uart + - qcom,sa8255p-geni-debug-uart + + reg: + maxItems: 1 + + interrupts: + minItems: 1 + items: + - description: UART core irq + - description: Wakeup irq (RX GPIO) + + interrupt-names: + items: + - const: uart + - const: wakeup + + power-domains: + minItems: 2 + maxItems: 2 + + power-domain-names: + items: + - const: power + - const: perf + +required: + - compatible + - reg + - interrupts + - power-domains + - power-domain-names + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + serial@990000 { + compatible = "qcom,sa8255p-geni-uart"; + reg = <0x990000 0x4000>; + interrupts = <GIC_SPI 531 IRQ_TYPE_LEVEL_HIGH>; + power-domains = <&scmi0_pd 0>, <&scmi0_dvfs 0>; + power-domain-names = "power", "perf"; + }; +...