Message ID | 20240828203721.2751904-18-quic_nkela@quicinc.com |
---|---|
State | New |
Headers | show |
Series | arm64: qcom: Introduce SA8255p Ride platform | expand |
On Wed, Aug 28, 2024 at 01:37:16PM -0700, Nikunj Kela wrote: > Add compatibles representing UART support on SA8255p. > > Clocks and interconnects are being configured in the firmware VM > on SA8255p platform, therefore making them optional. > > CC: Praveen Talari <quic_ptalari@quicinc.com> > Signed-off-by: Nikunj Kela <quic_nkela@quicinc.com> > --- > .../serial/qcom,serial-geni-qcom.yaml | 58 ++++++++++++++++--- > 1 file changed, 51 insertions(+), 7 deletions(-) > > diff --git a/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml b/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml > index dd33794b3534..dcd43e1353ec 100644 > --- a/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml > +++ b/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml > @@ -13,11 +13,42 @@ maintainers: > allOf: > - $ref: /schemas/serial/serial.yaml# Please move entire allOf: to the place after "required:" block. > > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,sa8255p-geni-uart > + - qcom,sa8255p-geni-debug-uart > + then: > + required: > + - power-domains > + - power-domain-names > + properties: > + power-domains: > + minItems: 2 > + maxItems: 2 > + else: > + required: > + - clocks > + - clock-names > + properties: > + power-domains: > + maxItems: 1 > + interconnects: > + maxItems: 2 > + interconnect-names: > + items: > + - const: qup-core > + - const: qup-config > + > properties: > compatible: > enum: > - qcom,geni-uart > - qcom,geni-debug-uart > + - qcom,sa8255p-geni-uart > + - qcom,sa8255p-geni-debug-uart Not compatible with the old ones? Well, it is impossible. Generic compatible like "qcom,geni-uart" means ALL DEVICES forever will be compatible, because otherwise it just does not make any sense. Of course "all devices forever will be compatible" is impossible as well, thus DT maintainers are suggesting SoC-specific compatibles all the time, but if developers decide that they know the future, you should keep it, right? > > clocks: > maxItems: 1 > @@ -26,12 +57,10 @@ properties: > const: se > > interconnects: > - maxItems: 2 > + description: phandles of interconnect bw provider Constraints must stay in top-level. Best regards, Krzysztof
On 8/29/2024 12:41 AM, Krzysztof Kozlowski wrote: > On Wed, Aug 28, 2024 at 01:37:16PM -0700, Nikunj Kela wrote: >> Add compatibles representing UART support on SA8255p. >> >> Clocks and interconnects are being configured in the firmware VM >> on SA8255p platform, therefore making them optional. >> >> CC: Praveen Talari <quic_ptalari@quicinc.com> >> Signed-off-by: Nikunj Kela <quic_nkela@quicinc.com> >> --- >> .../serial/qcom,serial-geni-qcom.yaml | 58 ++++++++++++++++--- >> 1 file changed, 51 insertions(+), 7 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml b/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml >> index dd33794b3534..dcd43e1353ec 100644 >> --- a/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml >> +++ b/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml >> @@ -13,11 +13,42 @@ maintainers: >> allOf: >> - $ref: /schemas/serial/serial.yaml# > Please move entire allOf: to the place after "required:" block. > >> >> + - if: >> + properties: >> + compatible: >> + contains: >> + enum: >> + - qcom,sa8255p-geni-uart >> + - qcom,sa8255p-geni-debug-uart >> + then: >> + required: >> + - power-domains >> + - power-domain-names >> + properties: >> + power-domains: >> + minItems: 2 >> + maxItems: 2 >> + else: >> + required: >> + - clocks >> + - clock-names >> + properties: >> + power-domains: >> + maxItems: 1 >> + interconnects: >> + maxItems: 2 >> + interconnect-names: >> + items: >> + - const: qup-core >> + - const: qup-config >> + >> properties: >> compatible: >> enum: >> - qcom,geni-uart >> - qcom,geni-debug-uart >> + - qcom,sa8255p-geni-uart >> + - qcom,sa8255p-geni-debug-uart > Not compatible with the old ones? Well, it is impossible. Generic > compatible like "qcom,geni-uart" means ALL DEVICES forever will be > compatible, because otherwise it just does not make any sense. Of > course "all devices forever will be compatible" is impossible as well, > thus DT maintainers are suggesting SoC-specific compatibles all the > time, but if developers decide that they know the future, you should > keep it, right? Hi Krzysztof, SA8255p uart is not compatible with generic ones. While I get your point, could you please advise how to proceed on this? Of course, no one could predict the future at the time generic compatibles were added but here we are now with the usecase! Thanks, -Nikunj >> >> clocks: >> maxItems: 1 >> @@ -26,12 +57,10 @@ properties: >> const: se >> >> interconnects: >> - maxItems: 2 >> + description: phandles of interconnect bw provider > Constraints must stay in top-level. > > Best regards, > Krzysztof >
diff --git a/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml b/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml index dd33794b3534..dcd43e1353ec 100644 --- a/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml +++ b/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml @@ -13,11 +13,42 @@ maintainers: allOf: - $ref: /schemas/serial/serial.yaml# + - if: + properties: + compatible: + contains: + enum: + - qcom,sa8255p-geni-uart + - qcom,sa8255p-geni-debug-uart + then: + required: + - power-domains + - power-domain-names + properties: + power-domains: + minItems: 2 + maxItems: 2 + else: + required: + - clocks + - clock-names + properties: + power-domains: + maxItems: 1 + interconnects: + maxItems: 2 + interconnect-names: + items: + - const: qup-core + - const: qup-config + properties: compatible: enum: - qcom,geni-uart - qcom,geni-debug-uart + - qcom,sa8255p-geni-uart + - qcom,sa8255p-geni-debug-uart clocks: maxItems: 1 @@ -26,12 +57,10 @@ properties: const: se interconnects: - maxItems: 2 + description: phandles of interconnect bw provider interconnect-names: - items: - - const: qup-core - - const: qup-config + description: names of interconnects interrupts: minItems: 1 @@ -51,15 +80,19 @@ properties: - const: sleep power-domains: - maxItems: 1 + minItems: 1 + maxItems: 2 + + power-domain-names: + items: + - const: power + - const: perf reg: maxItems: 1 required: - compatible - - clocks - - clock-names - interrupts - reg @@ -83,4 +116,15 @@ examples: <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_0 0>; interconnect-names = "qup-core", "qup-config"; }; + + - | + #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 = <&scmi11_pd 4>, <&scmi11_dvfs 4>; + power-domain-names = "power", "perf"; + }; ...
Add compatibles representing UART support on SA8255p. Clocks and interconnects are being configured in the firmware VM on SA8255p platform, therefore making them optional. CC: Praveen Talari <quic_ptalari@quicinc.com> Signed-off-by: Nikunj Kela <quic_nkela@quicinc.com> --- .../serial/qcom,serial-geni-qcom.yaml | 58 ++++++++++++++++--- 1 file changed, 51 insertions(+), 7 deletions(-)