[PATCH v3 0/2] [PATCH v3 0/2] Add pinctrl support adsp bypass platforms
This patch set is to make clock voting optinal for adsp bypass sc7280 platforms.
Changes Since V2: -- Remove redundant lpi pincontrol variant data structure and compatible entry. -- Add adsp bypass mode boolean param check. -- Remove compatible name in dt bindings. -- Update dt binding bypass mode boolean param. Changes Since V1: -- Update commit message.
Srinivasa Rao Mandadapu (2): dt-bindings: pinctrl: qcom: sc7280: Add boolean param for ADSP bypass platforms pinctrl: qcom: sc7280: Add clock optional check for ADSP bypass targets
.../bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml | 9 ++++++++- drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 3 +++ drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-)
Add boolean param qcom,adsp-bypass-mode to support adsp bypassed sc7280 platforms. Which is required to make clock voting as optional for ADSP bypass platforms.
Signed-off-by: Srinivasa Rao Mandadapu quic_srivasam@quicinc.com --- .../bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml index d32ee32..ea9920c 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml @@ -17,7 +17,14 @@ description: |
properties: compatible: - const: qcom,sc7280-lpass-lpi-pinctrl + enum: + - qcom,sc7280-lpass-lpi-pinctrl + + qcom,adsp-bypass-mode: + description: + Tells pin controllers want to make clocks optional for ADSP bypass + targets. + type: boolean
reg: minItems: 2
Quoting Srinivasa Rao Mandadapu (2022-06-10 07:45:34)
Add boolean param qcom,adsp-bypass-mode to support adsp bypassed sc7280 platforms. Which is required to make clock voting as optional for ADSP bypass platforms.
Signed-off-by: Srinivasa Rao Mandadapu quic_srivasam@quicinc.com
.../bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml index d32ee32..ea9920c 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml @@ -17,7 +17,14 @@ description: |
properties: compatible:
- const: qcom,sc7280-lpass-lpi-pinctrl
- enum:
- qcom,sc7280-lpass-lpi-pinctrl
Drop this part.
- qcom,adsp-bypass-mode:
- description:
Tells pin controllers want to make clocks optional for ADSP bypass
targets.
How about "ADSP is in bypass mode"?
On 6/11/2022 1:34 AM, Stephen Boyd wrote: Thanks for Your time Stephen!!!
Quoting Srinivasa Rao Mandadapu (2022-06-10 07:45:34)
Add boolean param qcom,adsp-bypass-mode to support adsp bypassed sc7280 platforms. Which is required to make clock voting as optional for ADSP bypass platforms.
Signed-off-by: Srinivasa Rao Mandadapu quic_srivasam@quicinc.com
.../bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml index d32ee32..ea9920c 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml @@ -17,7 +17,14 @@ description: |
properties: compatible:
- const: qcom,sc7280-lpass-lpi-pinctrl
- enum:
- qcom,sc7280-lpass-lpi-pinctrl
Drop this part.
Okay. Will revert this change.
- qcom,adsp-bypass-mode:
- description:
Tells pin controllers want to make clocks optional for ADSP bypass
targets.
How about "ADSP is in bypass mode"?
You mean, description like below?
qcom,adsp-bypass-mode: description: ADSP is in bypass mode.
Update lpass lpi pin control driver, with clock optional check for ADSP disabled platforms. This check required for distingushing ADSP based platforms and ADSP bypass platforms. In case of ADSP enabled platforms, where audio is routed through ADSP macro and decodec GDSC Switches are triggered as clocks by pinctrl driver and ADSP firmware controls them. So It's mandatory to enable them in ADSP based solutions. In case of ADSP bypass platforms clock voting is optional as these macro and dcodec GDSC switches are maintained as power domains and operated from lpass clock drivers.
Signed-off-by: Srinivasa Rao Mandadapu quic_srivasam@quicinc.com --- drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 3 +++ drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c index 74810ec..6e03529 100644 --- a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c +++ b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c @@ -388,6 +388,9 @@ int lpi_pinctrl_probe(struct platform_device *pdev) pctrl->data = data; pctrl->dev = &pdev->dev;
+ if (of_property_read_bool(np, "qcom,adsp-bypass-mode")) + data->is_clk_optional = true; + pctrl->clks[0].id = "core"; pctrl->clks[1].id = "audio";
diff --git a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c index 2add9a4..3fc7de1 100644 --- a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c +++ b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c @@ -141,7 +141,7 @@ static const struct lpi_pinctrl_variant_data sc7280_lpi_data = { .ngroups = ARRAY_SIZE(sc7280_groups), .functions = sc7280_functions, .nfunctions = ARRAY_SIZE(sc7280_functions), - .is_clk_optional = true, + .is_clk_optional = false, };
static const struct of_device_id lpi_pinctrl_of_match[] = {
Quoting Srinivasa Rao Mandadapu (2022-06-10 07:45:35)
diff --git a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c index 74810ec..6e03529 100644 --- a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c +++ b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c @@ -388,6 +388,9 @@ int lpi_pinctrl_probe(struct platform_device *pdev) pctrl->data = data; pctrl->dev = &pdev->dev;
if (of_property_read_bool(np, "qcom,adsp-bypass-mode"))
data->is_clk_optional = true;
Or just
data->is_clk_optional = of_property_read_bool(np, "qcom,adsp-bypass-mode");
pctrl->clks[0].id = "core"; pctrl->clks[1].id = "audio";
diff --git a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c index 2add9a4..3fc7de1 100644 --- a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c +++ b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c @@ -141,7 +141,7 @@ static const struct lpi_pinctrl_variant_data sc7280_lpi_data = { .ngroups = ARRAY_SIZE(sc7280_groups), .functions = sc7280_functions, .nfunctions = ARRAY_SIZE(sc7280_functions),
.is_clk_optional = true,
.is_clk_optional = false,
Just drop it as 'false' is the default.
Otherwise
Reviewed-by: Stephen Boyd swboyd@chromium.org
participants (2)
-
Srinivasa Rao Mandadapu
-
Stephen Boyd