* [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings [not found] <20220402051206.6115-1-singh.kuldeep87k@gmail.com> @ 2022-04-02 5:12 ` Kuldeep Singh 2022-04-02 12:29 ` Krzysztof Kozlowski 2022-04-02 18:24 ` Krzysztof Kozlowski 0 siblings, 2 replies; 6+ messages in thread From: Kuldeep Singh @ 2022-04-02 5:12 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson Cc: linux-kernel, linux-arm-msm, linux-i2c, devicetree GENI(generic interface) based Qualcomm Universal Peripheral controller can support multiple serial interfaces like spi,uart and i2c. Unlike other i2c controllers, QUP i2c bindings are present in parent schema. Move it out from parent to an individual binding and let parent refer to child schema later on. Please note, current schema isn't complete as it misses out few properties and thus, add these missing properties along the process. Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com> --- .../bindings/i2c/qcom,i2c-geni-qcom.yaml | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml new file mode 100644 index 000000000000..01a02e680ea3 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml @@ -0,0 +1,110 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/i2c/qcom,i2c-geni-qcom.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm Geni based QUP I2C Controller + +maintainers: + - Andy Gross <agross@kernel.org> + - Bjorn Andersson <bjorn.andersson@linaro.org> + +allOf: + - $ref: /schemas/i2c/i2c-controller.yaml# + +properties: + compatible: + enum: + - qcom,geni-i2c + + clocks: + maxItems: 1 + + clock-names: + const: se + + clock-frequency: + description: Desired I2C bus clock frequency in Hz + default: 100000 + + interconnects: + maxItems: 3 + + interconnect-names: + items: + - const: qup-core + - const: qup-config + - const: qup-memory + + interrupts: + maxItems: 1 + + power-domains: + maxItems: 1 + + reg: + maxItems: 1 + + required-opps: + maxItems: 1 + + dmas: + maxItems: 2 + + dma-names: + items: + - const: tx + - const: rx + + pinctrl-0: true + pinctrl-1: true + + pinctrl-names: + minItems: 1 + items: + - const: default + - const: sleep + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +required: + - compatible + - interrupts + - clocks + - clock-names + - reg + - "#address-cells" + - "#size-cells" + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/qcom,gcc-sc7180.h> + #include <dt-bindings/interconnect/qcom,sc7180.h> + #include <dt-bindings/power/qcom-rpmpd.h> + + i2c@88000 { + compatible = "qcom,geni-i2c"; + reg = <0x00880000 0x4000>; + clock-names = "se"; + clocks = <&gcc GCC_QUPV3_WRAP0_S0_CLK>; + pinctrl-names = "default"; + pinctrl-0 = <&qup_i2c0_default>; + interrupts = <GIC_SPI 601 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>, + <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_0 0>, + <&aggre1_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI1 0>; + interconnect-names = "qup-core", "qup-config", "qup-memory"; + power-domains = <&rpmhpd SC7180_CX>; + required-opps = <&rpmhpd_opp_low_svs>; + }; +... -- 2.25.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings 2022-04-02 5:12 ` [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings Kuldeep Singh @ 2022-04-02 12:29 ` Krzysztof Kozlowski 2022-04-02 19:44 ` Kuldeep Singh 2022-04-02 18:24 ` Krzysztof Kozlowski 1 sibling, 1 reply; 6+ messages in thread From: Krzysztof Kozlowski @ 2022-04-02 12:29 UTC (permalink / raw) To: Kuldeep Singh, Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson Cc: linux-kernel, linux-arm-msm, linux-i2c, devicetree On 02/04/2022 07:12, Kuldeep Singh wrote: > GENI(generic interface) based Qualcomm Universal Peripheral controller > can support multiple serial interfaces like spi,uart and i2c. > > Unlike other i2c controllers, QUP i2c bindings are present in parent > schema. Move it out from parent to an individual binding and let parent > refer to child schema later on. > > Please note, current schema isn't complete as it misses out few > properties and thus, add these missing properties along the process. > > Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com> > --- > .../bindings/i2c/qcom,i2c-geni-qcom.yaml | 110 ++++++++++++++++++ > 1 file changed, 110 insertions(+) > create mode 100644 Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml > > diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml > new file mode 100644 > index 000000000000..01a02e680ea3 > --- /dev/null > +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml > @@ -0,0 +1,110 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/i2c/qcom,i2c-geni-qcom.yaml#" > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > + > +title: Qualcomm Geni based QUP I2C Controller > + > +maintainers: > + - Andy Gross <agross@kernel.org> > + - Bjorn Andersson <bjorn.andersson@linaro.org> > + > +allOf: > + - $ref: /schemas/i2c/i2c-controller.yaml# > + > +properties: > + compatible: > + enum: > + - qcom,geni-i2c Just const, no enum. There are no other flavors of this (unless you think there are?). > + > + clocks: > + maxItems: 1 > + > + clock-names: > + const: se > + > + clock-frequency: > + description: Desired I2C bus clock frequency in Hz > + default: 100000 > + > + interconnects: > + maxItems: 3 > + > + interconnect-names: > + items: > + - const: qup-core > + - const: qup-config > + - const: qup-memory > + > + interrupts: > + maxItems: 1 > + > + power-domains: > + maxItems: 1 > + > + reg: > + maxItems: 1 > + > + required-opps: > + maxItems: 1 I have doubts this is correct property. Usually it is part of the opp-table. I see sc7180 needs this, but I think it is a mistake. Do you know how it is supposed to work? Best regards, Krzysztof ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings 2022-04-02 12:29 ` Krzysztof Kozlowski @ 2022-04-02 19:44 ` Kuldeep Singh 2022-04-02 19:57 ` Krzysztof Kozlowski 0 siblings, 1 reply; 6+ messages in thread From: Kuldeep Singh @ 2022-04-02 19:44 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, linux-kernel, linux-arm-msm, linux-i2c, devicetree On Sat, Apr 02, 2022 at 02:29:59PM +0200, Krzysztof Kozlowski wrote: > On 02/04/2022 07:12, Kuldeep Singh wrote: > > GENI(generic interface) based Qualcomm Universal Peripheral controller > > can support multiple serial interfaces like spi,uart and i2c. > > > > Unlike other i2c controllers, QUP i2c bindings are present in parent > > schema. Move it out from parent to an individual binding and let parent > > refer to child schema later on. > > > > Please note, current schema isn't complete as it misses out few > > properties and thus, add these missing properties along the process. > > > > Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com> > > --- > > .../bindings/i2c/qcom,i2c-geni-qcom.yaml | 110 ++++++++++++++++++ > > 1 file changed, 110 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml > > > > diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml > > new file mode 100644 > > index 000000000000..01a02e680ea3 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml > > @@ -0,0 +1,110 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: "http://devicetree.org/schemas/i2c/qcom,i2c-geni-qcom.yaml#" > > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > > + > > +title: Qualcomm Geni based QUP I2C Controller > > + > > +maintainers: > > + - Andy Gross <agross@kernel.org> > > + - Bjorn Andersson <bjorn.andersson@linaro.org> > > + > > +allOf: > > + - $ref: /schemas/i2c/i2c-controller.yaml# > > + > > +properties: > > + compatible: > > + enum: > > + - qcom,geni-i2c > > Just const, no enum. There are no other flavors of this (unless you > think there are?). There are no other users. Will change it to const. > > > + > > + clocks: > > + maxItems: 1 > > + > > + clock-names: > > + const: se > > + > > + clock-frequency: > > + description: Desired I2C bus clock frequency in Hz > > + default: 100000 > > + > > + interconnects: > > + maxItems: 3 > > + > > + interconnect-names: > > + items: > > + - const: qup-core > > + - const: qup-config > > + - const: qup-memory > > + > > + interrupts: > > + maxItems: 1 > > + > > + power-domains: > > + maxItems: 1 > > + > > + reg: > > + maxItems: 1 > > + > > + required-opps: > > + maxItems: 1 > > I have doubts this is correct property. Usually it is part of the > opp-table. I see sc7180 needs this, but I think it is a mistake. Do you > know how it is supposed to work? Not sure how exactly it works. I took reference from Documentation/devicetree/bindings/clock/qcom,videocc.yaml on how to add required-opps. -Kuldeep ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings 2022-04-02 19:44 ` Kuldeep Singh @ 2022-04-02 19:57 ` Krzysztof Kozlowski 0 siblings, 0 replies; 6+ messages in thread From: Krzysztof Kozlowski @ 2022-04-02 19:57 UTC (permalink / raw) To: Kuldeep Singh Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, linux-kernel, linux-arm-msm, linux-i2c, devicetree On 02/04/2022 21:44, Kuldeep Singh wrote: > On Sat, Apr 02, 2022 at 02:29:59PM +0200, Krzysztof Kozlowski wrote: >> On 02/04/2022 07:12, Kuldeep Singh wrote: >>> GENI(generic interface) based Qualcomm Universal Peripheral controller >>> can support multiple serial interfaces like spi,uart and i2c. >>> >>> + >>> + power-domains: >>> + maxItems: 1 >>> + >>> + reg: >>> + maxItems: 1 >>> + >>> + required-opps: >>> + maxItems: 1 >> >> I have doubts this is correct property. Usually it is part of the >> opp-table. I see sc7180 needs this, but I think it is a mistake. Do you >> know how it is supposed to work? > > Not sure how exactly it works. I took reference from > Documentation/devicetree/bindings/clock/qcom,videocc.yaml on how to add > required-opps. > I see now that power domains consumer bindings also mention it: Documentation/devicetree/bindings/power/power_domain.txt and it might be actually used via __genpd_dev_pm_attach(). Let's keep it then. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings 2022-04-02 5:12 ` [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings Kuldeep Singh 2022-04-02 12:29 ` Krzysztof Kozlowski @ 2022-04-02 18:24 ` Krzysztof Kozlowski 2022-04-02 19:34 ` Kuldeep Singh 1 sibling, 1 reply; 6+ messages in thread From: Krzysztof Kozlowski @ 2022-04-02 18:24 UTC (permalink / raw) To: Kuldeep Singh, Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson Cc: linux-kernel, linux-arm-msm, linux-i2c, devicetree On 02/04/2022 07:12, Kuldeep Singh wrote: > GENI(generic interface) based Qualcomm Universal Peripheral controller > can support multiple serial interfaces like spi,uart and i2c. > Few more comments. (...) > + > + clock-frequency: > + description: Desired I2C bus clock frequency in Hz Skip description, it's common for I2C controllers. > + default: 100000 > + > + interconnects: > + maxItems: 3 > + > + interconnect-names: > + items: > + - const: qup-core > + - const: qup-config > + - const: qup-memory > + > + interrupts: > + maxItems: 1 > + > + power-domains: > + maxItems: 1 > + > + reg: > + maxItems: 1 > + > + required-opps: > + maxItems: 1 > + > + dmas: > + maxItems: 2 > + > + dma-names: > + items: > + - const: tx > + - const: rx > + > + pinctrl-0: true > + pinctrl-1: true > + > + pinctrl-names: > + minItems: 1 > + items: > + - const: default > + - const: sleep > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 These are not needed, they come from schema. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings 2022-04-02 18:24 ` Krzysztof Kozlowski @ 2022-04-02 19:34 ` Kuldeep Singh 0 siblings, 0 replies; 6+ messages in thread From: Kuldeep Singh @ 2022-04-02 19:34 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, linux-kernel, linux-arm-msm, linux-i2c, devicetree On Sat, Apr 02, 2022 at 08:24:25PM +0200, Krzysztof Kozlowski wrote: > On 02/04/2022 07:12, Kuldeep Singh wrote: > > GENI(generic interface) based Qualcomm Universal Peripheral controller > > can support multiple serial interfaces like spi,uart and i2c. > > > > Few more comments. > > (...) > > > + > > + clock-frequency: > > + description: Desired I2C bus clock frequency in Hz > > Skip description, it's common for I2C controllers. ok. > > > + default: 100000 > > + > > + interconnects: > > + maxItems: 3 > > + > > + interconnect-names: > > + items: > > + - const: qup-core > > + - const: qup-config > > + - const: qup-memory > > + > > + interrupts: > > + maxItems: 1 > > + > > + power-domains: > > + maxItems: 1 > > + > > + reg: > > + maxItems: 1 > > + > > + required-opps: > > + maxItems: 1 > > + > > + dmas: > > + maxItems: 2 > > + > > + dma-names: > > + items: > > + - const: tx > > + - const: rx > > + > > + pinctrl-0: true > > + pinctrl-1: true > > + > > + pinctrl-names: > > + minItems: 1 > > + items: > > + - const: default > > + - const: sleep > > + > > + "#address-cells": > > + const: 1 > > + > > + "#size-cells": > > + const: 0 > > These are not needed, they come from schema. Yes. I will update in v2. Thanks! -Kuldeep ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-04-02 19:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220402051206.6115-1-singh.kuldeep87k@gmail.com>
2022-04-02 5:12 ` [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings Kuldeep Singh
2022-04-02 12:29 ` Krzysztof Kozlowski
2022-04-02 19:44 ` Kuldeep Singh
2022-04-02 19:57 ` Krzysztof Kozlowski
2022-04-02 18:24 ` Krzysztof Kozlowski
2022-04-02 19:34 ` Kuldeep Singh
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox