Message ID | 20201126184559.3052375-1-angelogioacchino.delregno@somainline.org |
---|---|
Headers | show |
Series | Enable CPRh/3/4, CPU Scaling on various QCOM SoCs | expand |
On Thu, 26 Nov 2020 19:45:53 +0100, AngeloGioacchino Del Regno wrote: > Convert the qcom,cpr.txt document to YAML schema and place it in the > appropriate directory, since commit a7305e684fc moves this driver > from power/avs to soc/qcom, but forgets to move the documentation. > > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org> > --- > .../bindings/power/avs/qcom,cpr.txt | 131 +----------------- > .../bindings/soc/qcom/qcom,cpr.yaml | 115 +++++++++++++++ > MAINTAINERS | 2 +- > 3 files changed, 117 insertions(+), 131 deletions(-) > create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,cpr.yaml > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/qcom,cpr.yaml: properties:clock-names: [{'const': 'ref'}] is not of type 'object', 'boolean' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/qcom,cpr.yaml: ignoring, error in schema: properties: clock-names warning: no schema found in file: ./Documentation/devicetree/bindings/soc/qcom/qcom,cpr.yaml See https://patchwork.ozlabs.org/patch/1406855 The base for the patch is generally the last rc1. Any dependencies should be noted. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit.
On Thu, 26 Nov 2020 19:45:57 +0100, AngeloGioacchino Del Regno wrote: > Convert the qcom-cpufreq-hw documentation to YAML binding as > qcom,cpufreq-hw.yaml. > > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org> > --- > .../bindings/cpufreq/cpufreq-qcom-hw.txt | 173 +--------------- > .../bindings/cpufreq/qcom,cpufreq-hw.yaml | 196 ++++++++++++++++++ > 2 files changed, 197 insertions(+), 172 deletions(-) > create mode 100644 Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml: properties:clock-names: [{'const': 'xo'}, {'const': 'ref'}] is not of type 'object', 'boolean' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml: maintainers:0: 'TBD' is not a 'email' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml: ignoring, error in schema: properties: clock-names warning: no schema found in file: ./Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml Error: Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.example.dts:150.3-151.1 syntax error FATAL ERROR: Unable to parse input tree make[1]: *** [scripts/Makefile.lib:342: Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.example.dt.yaml] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1364: dt_binding_check] Error 2 See https://patchwork.ozlabs.org/patch/1406857 The base for the patch is generally the last rc1. Any dependencies should be noted. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit.
Il 30/11/20 18:23, Rob Herring ha scritto: > On Thu, 26 Nov 2020 19:45:57 +0100, AngeloGioacchino Del Regno wrote: >> Convert the qcom-cpufreq-hw documentation to YAML binding as >> qcom,cpufreq-hw.yaml. >> >> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org> >> --- >> .../bindings/cpufreq/cpufreq-qcom-hw.txt | 173 +--------------- >> .../bindings/cpufreq/qcom,cpufreq-hw.yaml | 196 ++++++++++++++++++ >> 2 files changed, 197 insertions(+), 172 deletions(-) >> create mode 100644 Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml >> > > > My bot found errors running 'make dt_binding_check' on your patch: > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml: properties:clock-names: [{'const': 'xo'}, {'const': 'ref'}] is not of type 'object', 'boolean' > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml: maintainers:0: 'TBD' is not a 'email' > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml: ignoring, error in schema: properties: clock-names > warning: no schema found in file: ./Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml > Error: Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.example.dts:150.3-151.1 syntax error > FATAL ERROR: Unable to parse input tree > make[1]: *** [scripts/Makefile.lib:342: Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.example.dt.yaml] Error 1 > make[1]: *** Waiting for unfinished jobs.... > make: *** [Makefile:1364: dt_binding_check] Error 2 > > > See https://patchwork.ozlabs.org/patch/1406857 > > The base for the patch is generally the last rc1. Any dependencies > should be noted. > > If you already ran 'make dt_binding_check' and didn't see the above > error(s), then make sure 'yamllint' is installed and dt-schema is up to > date: > > pip3 install dtschema --upgrade > > Please check and re-submit. > Hello! All the errors that you've pointed out have been fixed on both the CPR, CPR3 and cpufreq-hw, but before pushing a V2 of this patch series... Well, I have a question: the qcom-cpufreq-hw driver has no MAINTAINERS entry and there was no maintainer for this driver specified in the old txt format binding. What should I write in the "maintainers" field of the YAML binding for this driver? Should I assign it to the subsystem maintainer? Thanks, - Angelo
Hi, On Mon, Nov 30, 2020 at 10:23:05AM -0700, Rob Herring wrote: > On Thu, 26 Nov 2020 19:45:57 +0100, AngeloGioacchino Del Regno wrote: > > Convert the qcom-cpufreq-hw documentation to YAML binding as > > qcom,cpufreq-hw.yaml. > > > > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org> There is already a patch floating for this. Please see: https://lkml.org/lkml/2020/10/20/676 Thanks, Mani > > --- > > .../bindings/cpufreq/cpufreq-qcom-hw.txt | 173 +--------------- > > .../bindings/cpufreq/qcom,cpufreq-hw.yaml | 196 ++++++++++++++++++ > > 2 files changed, 197 insertions(+), 172 deletions(-) > > create mode 100644 Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml > > > > > My bot found errors running 'make dt_binding_check' on your patch: > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml: properties:clock-names: [{'const': 'xo'}, {'const': 'ref'}] is not of type 'object', 'boolean' > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml: maintainers:0: 'TBD' is not a 'email' > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml: ignoring, error in schema: properties: clock-names > warning: no schema found in file: ./Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml > Error: Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.example.dts:150.3-151.1 syntax error > FATAL ERROR: Unable to parse input tree > make[1]: *** [scripts/Makefile.lib:342: Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.example.dt.yaml] Error 1 > make[1]: *** Waiting for unfinished jobs.... > make: *** [Makefile:1364: dt_binding_check] Error 2 > > > See https://patchwork.ozlabs.org/patch/1406857 > > The base for the patch is generally the last rc1. Any dependencies > should be noted. > > If you already ran 'make dt_binding_check' and didn't see the above > error(s), then make sure 'yamllint' is installed and dt-schema is up to > date: > > pip3 install dtschema --upgrade > > Please check and re-submit. >
Il 03/12/20 12:14, Manivannan Sadhasivam ha scritto: > Hi, > > On Mon, Nov 30, 2020 at 10:23:05AM -0700, Rob Herring wrote: >> On Thu, 26 Nov 2020 19:45:57 +0100, AngeloGioacchino Del Regno wrote: >>> Convert the qcom-cpufreq-hw documentation to YAML binding as >>> qcom,cpufreq-hw.yaml. >>> >>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org> > > There is already a patch floating for this. Please see: > https://lkml.org/lkml/2020/10/20/676 > > Thanks, > Mani > Oh, I'm sorry, I wasn't aware of that, didn't want to step on you. Should I rebase patch 1345789 (patch 13/13 of this series) on top of the one that you pointed out and drop this one? - Angelo >>> --- >>> .../bindings/cpufreq/cpufreq-qcom-hw.txt | 173 +--------------- >>> .../bindings/cpufreq/qcom,cpufreq-hw.yaml | 196 ++++++++++++++++++ >>> 2 files changed, 197 insertions(+), 172 deletions(-) >>> create mode 100644 Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml >>> >> >> >> My bot found errors running 'make dt_binding_check' on your patch: >> >> yamllint warnings/errors: >> >> dtschema/dtc warnings/errors: >> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml: properties:clock-names: [{'const': 'xo'}, {'const': 'ref'}] is not of type 'object', 'boolean' >> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml: maintainers:0: 'TBD' is not a 'email' >> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml: ignoring, error in schema: properties: clock-names >> warning: no schema found in file: ./Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml >> Error: Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.example.dts:150.3-151.1 syntax error >> FATAL ERROR: Unable to parse input tree >> make[1]: *** [scripts/Makefile.lib:342: Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.example.dt.yaml] Error 1 >> make[1]: *** Waiting for unfinished jobs.... >> make: *** [Makefile:1364: dt_binding_check] Error 2 >> >> >> See https://patchwork.ozlabs.org/patch/1406857 >> >> The base for the patch is generally the last rc1. Any dependencies >> should be noted. >> >> If you already ran 'make dt_binding_check' and didn't see the above >> error(s), then make sure 'yamllint' is installed and dt-schema is up to >> date: >> >> pip3 install dtschema --upgrade >> >> Please check and re-submit. >>
On Fri, Dec 04, 2020 at 01:13:52AM +0100, AngeloGioacchino Del Regno wrote: > Il 03/12/20 12:14, Manivannan Sadhasivam ha scritto: > > Hi, > > > > On Mon, Nov 30, 2020 at 10:23:05AM -0700, Rob Herring wrote: > > > On Thu, 26 Nov 2020 19:45:57 +0100, AngeloGioacchino Del Regno wrote: > > > > Convert the qcom-cpufreq-hw documentation to YAML binding as > > > > qcom,cpufreq-hw.yaml. > > > > > > > > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org> > > > > There is already a patch floating for this. Please see: > > https://lkml.org/lkml/2020/10/20/676 > > > > Thanks, > > Mani > > > Oh, I'm sorry, I wasn't aware of that, didn't want to step on you. > > Should I rebase patch 1345789 (patch 13/13 of this series) on top of > the one that you pointed out and drop this one? Yes please. Thanks, Mani > > - Angelo > > > > > --- > > > > .../bindings/cpufreq/cpufreq-qcom-hw.txt | 173 +--------------- > > > > .../bindings/cpufreq/qcom,cpufreq-hw.yaml | 196 ++++++++++++++++++ > > > > 2 files changed, 197 insertions(+), 172 deletions(-) > > > > create mode 100644 Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml > > > > > > > > > > > > > My bot found errors running 'make dt_binding_check' on your patch: > > > > > > yamllint warnings/errors: > > > > > > dtschema/dtc warnings/errors: > > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml: properties:clock-names: [{'const': 'xo'}, {'const': 'ref'}] is not of type 'object', 'boolean' > > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml: maintainers:0: 'TBD' is not a 'email' > > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml: ignoring, error in schema: properties: clock-names > > > warning: no schema found in file: ./Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.yaml > > > Error: Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.example.dts:150.3-151.1 syntax error > > > FATAL ERROR: Unable to parse input tree > > > make[1]: *** [scripts/Makefile.lib:342: Documentation/devicetree/bindings/cpufreq/qcom,cpufreq-hw.example.dt.yaml] Error 1 > > > make[1]: *** Waiting for unfinished jobs.... > > > make: *** [Makefile:1364: dt_binding_check] Error 2 > > > > > > > > > See https://patchwork.ozlabs.org/patch/1406857 > > > > > > The base for the patch is generally the last rc1. Any dependencies > > > should be noted. > > > > > > If you already ran 'make dt_binding_check' and didn't see the above > > > error(s), then make sure 'yamllint' is installed and dt-schema is up to > > > date: > > > > > > pip3 install dtschema --upgrade > > > > > > Please check and re-submit. > > > >
On 26-11-20, 19:45, AngeloGioacchino Del Regno wrote: > On new SoCs (SDM845 onwards) the Operating State Manager (OSM) is > being programmed in the bootloader and write-protected by the > hypervisor, leaving to the OS read-only access to some of its > registers (in order to read the Lookup Tables and also some > status registers) and write access to the p-state register, for > for the OS to request a specific performance state to trigger a > DVFS switch on the CPU through the OSM hardware. > > On old SoCs though (MSM8998, SDM630/660 and variants), the > bootloader will *not* initialize the OSM (and the CPRh, as it > is a requirement for it) before booting the OS, making any > request to trigger a performance state change ineffective, as > the hardware doesn't have any Lookup Table, nor is storing any > parameter to trigger a DVFS switch. In this case, basically all > of the OSM registers are *not* write protected for the OS, even > though some are - but write access is granted through SCM calls. > > This commit introduces support for OSM programming, which has to > be done on these old SoCs that were distributed (almost?) always > with a bootloader that does not do any CPRh nor OSM init before > booting the kernel. > In order to program the OSM on these SoCs, it is necessary to > fullfill a "special" requirement: the Core Power Reduction > Hardened (CPRh) hardware block must be initialized, as the OSM > is "talking" to it in order to perform the Voltage part of DVFS; > here, we are calling initialization of this through Linux generic > power domains, specifically by requesting a genpd attach from the > qcom-cpufreq-hw driver, which will give back voltages associated > to each CPU frequency that has been declared in the OPPs, scaled > and interpolated with the previous one, and will also give us > parameters for the Array Power Mux (APM) and mem-acc, in order > for this driver to be then able to generate the Lookup Tables > that will be finally programmed to the OSM hardware. > > After writing the parameters to the OSM and enabling it, all the > programming work will never happen anymore until a OS reboot, so > all of the allocations and "the rest" will be disposed-of: this > is done mainly to leave the code that was referred only to the > new SoCs intact, as to also emphasize on the fact that the OSM > HW is, in the end, the exact same; apart some register offsets > that are slightly different, the entire logic is the same. > > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org> > --- > drivers/cpufreq/qcom-cpufreq-hw.c | 914 +++++++++++++++++++++++++++++- > 1 file changed, 884 insertions(+), 30 deletions(-) This is a lot of code, I need someone from Qcom's team to review it and make sure it doesn't break anything for the existing platforms.