* [PATCH v4 0/4] arm64: dts: qcom: sm6125: Enable APPS SMMU
@ 2022-12-16 21:58 Marijn Suijten
2022-12-16 21:58 ` [PATCH v4 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125 Marijn Suijten
` (3 more replies)
0 siblings, 4 replies; 20+ messages in thread
From: Marijn Suijten @ 2022-12-16 21:58 UTC (permalink / raw)
To: phone-devel, Will Deacon, Joerg Roedel, Bjorn Andersson
Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
Lux Aliaga, Robin Murphy, Rob Herring, Krzysztof Kozlowski,
Andy Gross, Konrad Dybcio, Dmitry Baryshkov, Thierry Reding,
Melody Olvera, Greg Kroah-Hartman, Bhupesh Sharma,
Douglas Anderson, linux-arm-kernel, iommu, devicetree,
linux-kernel, linux-arm-msm
Add APPS SMMU to SM6125 dtsi and use it in SDHCI/USB nodes.
Changes since v3:
- Drop driver patch in favour of using generic qcom,smmu-500 compatible;
- Add patches that use apps_smmu in USB and SDHCI nodes, reconfiguring
their streamID which otherwise gets lost (from the bootloader) as soon
as SMMU probes, breaking their functionality;
- Rebased on next-20221216 to solve dt-bindings conflict.
v3: https://lore.kernel.org/linux-iommu/20210612094606.89576-2-martin.botka@somainline.org/T/#u
AngeloGioacchino Del Regno (1):
arm64: dts: qcom: sm6125: Add IOMMU context to DWC3
Marijn Suijten (1):
arm64: dts: qcom: sm6125: Add apps_smmu with streamID to SDHCI 1/2
nodes
Martin Botka (2):
dt-bindings: arm-smmu: Document smmu-500 binding for SM6125
arm64: dts: qcom: sm6125: Configure APPS SMMU
.../devicetree/bindings/iommu/arm,smmu.yaml | 1 +
arch/arm64/boot/dts/qcom/sm6125.dtsi | 76 +++++++++++++++++++
2 files changed, 77 insertions(+)
--
2.39.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v4 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125
2022-12-16 21:58 [PATCH v4 0/4] arm64: dts: qcom: sm6125: Enable APPS SMMU Marijn Suijten
@ 2022-12-16 21:58 ` Marijn Suijten
2022-12-19 9:07 ` Krzysztof Kozlowski
2022-12-16 21:58 ` [PATCH v4 2/4] arm64: dts: qcom: sm6125: Configure APPS SMMU Marijn Suijten
` (2 subsequent siblings)
3 siblings, 1 reply; 20+ messages in thread
From: Marijn Suijten @ 2022-12-16 21:58 UTC (permalink / raw)
To: phone-devel, Will Deacon, Joerg Roedel, Bjorn Andersson
Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
Lux Aliaga, Robin Murphy, Rob Herring, Krzysztof Kozlowski,
Andy Gross, Konrad Dybcio, Dmitry Baryshkov, Thierry Reding,
Melody Olvera, Greg Kroah-Hartman, Bhupesh Sharma,
Douglas Anderson, linux-arm-kernel, iommu, devicetree,
linux-kernel, linux-arm-msm
From: Martin Botka <martin.botka@somainline.org>
Document smmu-500 compatibility with the SM6125 SoC.
Signed-off-by: Martin Botka <martin.botka@somainline.org>
[Marijn: Move compatible to the new, generic, qcom,smmu-500 list]
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
index b28c5c2b0ff2..95b03fd86e18 100644
--- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
+++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
@@ -43,6 +43,7 @@ properties:
- qcom,sdm670-smmu-500
- qcom,sdm845-smmu-500
- qcom,sm6115-smmu-500
+ - qcom,sm6125-smmu-500
- qcom,sm6350-smmu-500
- qcom,sm6375-smmu-500
- qcom,sm8150-smmu-500
--
2.39.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v4 2/4] arm64: dts: qcom: sm6125: Configure APPS SMMU
2022-12-16 21:58 [PATCH v4 0/4] arm64: dts: qcom: sm6125: Enable APPS SMMU Marijn Suijten
2022-12-16 21:58 ` [PATCH v4 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125 Marijn Suijten
@ 2022-12-16 21:58 ` Marijn Suijten
2022-12-17 14:25 ` Konrad Dybcio
2022-12-16 21:58 ` [PATCH v4 3/4] arm64: dts: qcom: sm6125: Add apps_smmu with streamID to SDHCI 1/2 nodes Marijn Suijten
2022-12-16 21:58 ` [PATCH v4 4/4] arm64: dts: qcom: sm6125: Add IOMMU context to DWC3 Marijn Suijten
3 siblings, 1 reply; 20+ messages in thread
From: Marijn Suijten @ 2022-12-16 21:58 UTC (permalink / raw)
To: phone-devel, Will Deacon, Joerg Roedel, Bjorn Andersson
Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
Lux Aliaga, Robin Murphy, Rob Herring, Krzysztof Kozlowski,
Andy Gross, Konrad Dybcio, Dmitry Baryshkov, Thierry Reding,
Melody Olvera, Greg Kroah-Hartman, Bhupesh Sharma,
Douglas Anderson, linux-arm-kernel, iommu, devicetree,
linux-kernel, linux-arm-msm
From: Martin Botka <martin.botka@somainline.org>
Add a node for the APPS SMMU, to which various devices such as USB and
storage nodes are connected.
Signed-off-by: Martin Botka <martin.botka@somainline.org>
[Marijn: add the new, generic, "qcom,smmu-500" compatible, add patch
description, reorder # properties]
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
arch/arm64/boot/dts/qcom/sm6125.dtsi | 73 ++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi
index bf9e8d45ee44..347665c2067c 100644
--- a/arch/arm64/boot/dts/qcom/sm6125.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi
@@ -573,6 +573,79 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PE_LEVEL_HIGH>,
+ <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>;
+
+ #global-interrupts = <1>;
+ #iommu-cells = <2>;
+ };
+
apcs_glb: mailbox@f111000 {
compatible = "qcom,sm6125-apcs-hmss-global";
reg = <0x0f111000 0x1000>;
--
2.39.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v4 3/4] arm64: dts: qcom: sm6125: Add apps_smmu with streamID to SDHCI 1/2 nodes
2022-12-16 21:58 [PATCH v4 0/4] arm64: dts: qcom: sm6125: Enable APPS SMMU Marijn Suijten
2022-12-16 21:58 ` [PATCH v4 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125 Marijn Suijten
2022-12-16 21:58 ` [PATCH v4 2/4] arm64: dts: qcom: sm6125: Configure APPS SMMU Marijn Suijten
@ 2022-12-16 21:58 ` Marijn Suijten
2022-12-17 14:26 ` Konrad Dybcio
` (2 more replies)
2022-12-16 21:58 ` [PATCH v4 4/4] arm64: dts: qcom: sm6125: Add IOMMU context to DWC3 Marijn Suijten
3 siblings, 3 replies; 20+ messages in thread
From: Marijn Suijten @ 2022-12-16 21:58 UTC (permalink / raw)
To: phone-devel, Will Deacon, Joerg Roedel, Bjorn Andersson
Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
Lux Aliaga, Robin Murphy, Rob Herring, Krzysztof Kozlowski,
Andy Gross, Konrad Dybcio, Dmitry Baryshkov, Thierry Reding,
Melody Olvera, Greg Kroah-Hartman, Bhupesh Sharma,
Douglas Anderson, linux-arm-kernel, iommu, devicetree,
linux-kernel, linux-arm-msm
When enabling the APPS SMMU the mainline driver reconfigures the SMMU
from its bootloader configuration, loosing the stream mapping for (among
which) the SDHCI hardware and breaking its ADMA feature. This feature
can be disabled with:
sdhci.debug_quirks=0x40
But it is of course desired to have this feature enabled and working
through the SMMU.
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi
index 347665c2067c..f560499cc0ca 100644
--- a/arch/arm64/boot/dts/qcom/sm6125.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi
@@ -468,6 +468,7 @@ sdhc_1: mmc@4744000 {
<&gcc GCC_SDCC1_APPS_CLK>,
<&xo_board>;
clock-names = "iface", "core", "xo";
+ iommus = <&apps_smmu 0x160 0>;
power-domains = <&rpmpd SM6125_VDDCX>;
@@ -494,6 +495,7 @@ sdhc_2: mmc@4784000 {
<&gcc GCC_SDCC2_APPS_CLK>,
<&xo_board>;
clock-names = "iface", "core", "xo";
+ iommus = <&apps_smmu 0x180 0>;
pinctrl-0 = <&sdc2_on_state>;
pinctrl-1 = <&sdc2_off_state>;
--
2.39.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v4 4/4] arm64: dts: qcom: sm6125: Add IOMMU context to DWC3
2022-12-16 21:58 [PATCH v4 0/4] arm64: dts: qcom: sm6125: Enable APPS SMMU Marijn Suijten
` (2 preceding siblings ...)
2022-12-16 21:58 ` [PATCH v4 3/4] arm64: dts: qcom: sm6125: Add apps_smmu with streamID to SDHCI 1/2 nodes Marijn Suijten
@ 2022-12-16 21:58 ` Marijn Suijten
2022-12-17 14:26 ` Konrad Dybcio
2022-12-18 11:10 ` Martin Botka
3 siblings, 2 replies; 20+ messages in thread
From: Marijn Suijten @ 2022-12-16 21:58 UTC (permalink / raw)
To: phone-devel, Will Deacon, Joerg Roedel, Bjorn Andersson
Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
Lux Aliaga, Robin Murphy, Rob Herring, Krzysztof Kozlowski,
Andy Gross, Konrad Dybcio, Dmitry Baryshkov, Thierry Reding,
Melody Olvera, Greg Kroah-Hartman, Bhupesh Sharma,
Douglas Anderson, linux-arm-kernel, iommu, devicetree,
linux-kernel, linux-arm-msm
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Add an IOMMU context to the USB DWC3 controller, required to get USB
functionality upon enablement of apps_smmu.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
arch/arm64/boot/dts/qcom/sm6125.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi
index f560499cc0ca..a205121ab4a7 100644
--- a/arch/arm64/boot/dts/qcom/sm6125.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi
@@ -542,6 +542,7 @@ usb3_dwc3: usb@4e00000 {
compatible = "snps,dwc3";
reg = <0x04e00000 0xcd00>;
interrupts = <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>;
+ iommus = <&apps_smmu 0x100 0x0>;
phys = <&hsusb_phy1>;
phy-names = "usb2-phy";
snps,dis_u2_susphy_quirk;
--
2.39.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v4 2/4] arm64: dts: qcom: sm6125: Configure APPS SMMU
2022-12-16 21:58 ` [PATCH v4 2/4] arm64: dts: qcom: sm6125: Configure APPS SMMU Marijn Suijten
@ 2022-12-17 14:25 ` Konrad Dybcio
0 siblings, 0 replies; 20+ messages in thread
From: Konrad Dybcio @ 2022-12-17 14:25 UTC (permalink / raw)
To: Marijn Suijten, phone-devel, Will Deacon, Joerg Roedel,
Bjorn Andersson
Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Lux Aliaga,
Robin Murphy, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Dmitry Baryshkov, Thierry Reding, Melody Olvera,
Greg Kroah-Hartman, Bhupesh Sharma, Douglas Anderson,
linux-arm-kernel, iommu, devicetree, linux-kernel, linux-arm-msm
On 16.12.2022 22:58, Marijn Suijten wrote:
> From: Martin Botka <martin.botka@somainline.org>
>
> Add a node for the APPS SMMU, to which various devices such as USB and
> storage nodes are connected.
>
> Signed-off-by: Martin Botka <martin.botka@somainline.org>
> [Marijn: add the new, generic, "qcom,smmu-500" compatible, add patch
> description, reorder # properties]
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> arch/arm64/boot/dts/qcom/sm6125.dtsi | 73 ++++++++++++++++++++++++++++
> 1 file changed, 73 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi
> index bf9e8d45ee44..347665c2067c 100644
> --- a/arch/arm64/boot/dts/qcom/sm6125.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi
> @@ -573,6 +573,79 @@ spmi_bus: spmi@1c40000 {
> cell-index = <0>;
> };
>
> + apps_smmu: iommu@c600000 {
> + compatible = "qcom,sm6125-smmu-500", "qcom,smmu-500", "arm,mmu-500";
> + reg = <0xc600000 0x80000>;
> + interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_H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EL_HIGH>,
> + <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>;
> +
> + #global-interrupts = <1>;
> + #iommu-cells = <2>;
> + };
> +
> apcs_glb: mailbox@f111000 {
> compatible = "qcom,sm6125-apcs-hmss-global";
> reg = <0x0f111000 0x1000>;
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v4 3/4] arm64: dts: qcom: sm6125: Add apps_smmu with streamID to SDHCI 1/2 nodes
2022-12-16 21:58 ` [PATCH v4 3/4] arm64: dts: qcom: sm6125: Add apps_smmu with streamID to SDHCI 1/2 nodes Marijn Suijten
@ 2022-12-17 14:26 ` Konrad Dybcio
2022-12-18 10:26 ` Marijn Suijten
2022-12-18 11:10 ` Martin Botka
2 siblings, 0 replies; 20+ messages in thread
From: Konrad Dybcio @ 2022-12-17 14:26 UTC (permalink / raw)
To: Marijn Suijten, phone-devel, Will Deacon, Joerg Roedel,
Bjorn Andersson
Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Lux Aliaga,
Robin Murphy, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Dmitry Baryshkov, Thierry Reding, Melody Olvera,
Greg Kroah-Hartman, Bhupesh Sharma, Douglas Anderson,
linux-arm-kernel, iommu, devicetree, linux-kernel, linux-arm-msm
On 16.12.2022 22:58, Marijn Suijten wrote:
> When enabling the APPS SMMU the mainline driver reconfigures the SMMU
> from its bootloader configuration, loosing the stream mapping for (among
> which) the SDHCI hardware and breaking its ADMA feature. This feature
> can be disabled with:
>
> sdhci.debug_quirks=0x40
>
> But it is of course desired to have this feature enabled and working
> through the SMMU.
>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi
> index 347665c2067c..f560499cc0ca 100644
> --- a/arch/arm64/boot/dts/qcom/sm6125.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi
> @@ -468,6 +468,7 @@ sdhc_1: mmc@4744000 {
> <&gcc GCC_SDCC1_APPS_CLK>,
> <&xo_board>;
> clock-names = "iface", "core", "xo";
> + iommus = <&apps_smmu 0x160 0>;
>
> power-domains = <&rpmpd SM6125_VDDCX>;
>
> @@ -494,6 +495,7 @@ sdhc_2: mmc@4784000 {
> <&gcc GCC_SDCC2_APPS_CLK>,
> <&xo_board>;
> clock-names = "iface", "core", "xo";
> + iommus = <&apps_smmu 0x180 0>;
>
> pinctrl-0 = <&sdc2_on_state>;
> pinctrl-1 = <&sdc2_off_state>;
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v4 4/4] arm64: dts: qcom: sm6125: Add IOMMU context to DWC3
2022-12-16 21:58 ` [PATCH v4 4/4] arm64: dts: qcom: sm6125: Add IOMMU context to DWC3 Marijn Suijten
@ 2022-12-17 14:26 ` Konrad Dybcio
2022-12-18 11:10 ` Martin Botka
1 sibling, 0 replies; 20+ messages in thread
From: Konrad Dybcio @ 2022-12-17 14:26 UTC (permalink / raw)
To: Marijn Suijten, phone-devel, Will Deacon, Joerg Roedel,
Bjorn Andersson
Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Lux Aliaga,
Robin Murphy, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Dmitry Baryshkov, Thierry Reding, Melody Olvera,
Greg Kroah-Hartman, Bhupesh Sharma, Douglas Anderson,
linux-arm-kernel, iommu, devicetree, linux-kernel, linux-arm-msm
On 16.12.2022 22:58, Marijn Suijten wrote:
> From: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
>
> Add an IOMMU context to the USB DWC3 controller, required to get USB
> functionality upon enablement of apps_smmu.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> arch/arm64/boot/dts/qcom/sm6125.dtsi | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi
> index f560499cc0ca..a205121ab4a7 100644
> --- a/arch/arm64/boot/dts/qcom/sm6125.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi
> @@ -542,6 +542,7 @@ usb3_dwc3: usb@4e00000 {
> compatible = "snps,dwc3";
> reg = <0x04e00000 0xcd00>;
> interrupts = <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>;
> + iommus = <&apps_smmu 0x100 0x0>;
> phys = <&hsusb_phy1>;
> phy-names = "usb2-phy";
> snps,dis_u2_susphy_quirk;
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v4 3/4] arm64: dts: qcom: sm6125: Add apps_smmu with streamID to SDHCI 1/2 nodes
2022-12-16 21:58 ` [PATCH v4 3/4] arm64: dts: qcom: sm6125: Add apps_smmu with streamID to SDHCI 1/2 nodes Marijn Suijten
2022-12-17 14:26 ` Konrad Dybcio
@ 2022-12-18 10:26 ` Marijn Suijten
2022-12-18 11:10 ` Martin Botka
2 siblings, 0 replies; 20+ messages in thread
From: Marijn Suijten @ 2022-12-18 10:26 UTC (permalink / raw)
To: phone-devel, Will Deacon, Joerg Roedel, Bjorn Andersson
Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Lux Aliaga,
Robin Murphy, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Konrad Dybcio, Dmitry Baryshkov, Thierry Reding, Melody Olvera,
Greg Kroah-Hartman, Bhupesh Sharma, Douglas Anderson,
linux-arm-kernel, iommu, devicetree, linux-kernel, linux-arm-msm
On 2022-12-16 22:58:18, Marijn Suijten wrote:
> When enabling the APPS SMMU the mainline driver reconfigures the SMMU
> from its bootloader configuration, loosing the stream mapping for (among
> which) the SDHCI hardware and breaking its ADMA feature. This feature
> can be disabled with:
>
> sdhci.debug_quirks=0x40
>
> But it is of course desired to have this feature enabled and working
> through the SMMU.
>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
> arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi
> index 347665c2067c..f560499cc0ca 100644
> --- a/arch/arm64/boot/dts/qcom/sm6125.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi
> @@ -468,6 +468,7 @@ sdhc_1: mmc@4744000 {
> <&gcc GCC_SDCC1_APPS_CLK>,
> <&xo_board>;
> clock-names = "iface", "core", "xo";
> + iommus = <&apps_smmu 0x160 0>;
I'll make the mask 0x0 (same below) in the next revision, please do not
apply this patch.
- Marijn
> power-domains = <&rpmpd SM6125_VDDCX>;
>
> @@ -494,6 +495,7 @@ sdhc_2: mmc@4784000 {
> <&gcc GCC_SDCC2_APPS_CLK>,
> <&xo_board>;
> clock-names = "iface", "core", "xo";
> + iommus = <&apps_smmu 0x180 0>;
>
> pinctrl-0 = <&sdc2_on_state>;
> pinctrl-1 = <&sdc2_off_state>;
> --
> 2.39.0
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v4 3/4] arm64: dts: qcom: sm6125: Add apps_smmu with streamID to SDHCI 1/2 nodes
2022-12-16 21:58 ` [PATCH v4 3/4] arm64: dts: qcom: sm6125: Add apps_smmu with streamID to SDHCI 1/2 nodes Marijn Suijten
2022-12-17 14:26 ` Konrad Dybcio
2022-12-18 10:26 ` Marijn Suijten
@ 2022-12-18 11:10 ` Martin Botka
2 siblings, 0 replies; 20+ messages in thread
From: Martin Botka @ 2022-12-18 11:10 UTC (permalink / raw)
To: Marijn Suijten
Cc: phone-devel, Will Deacon, Joerg Roedel, Bjorn Andersson,
~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Jami Kettunen, Lux Aliaga, Robin Murphy,
Rob Herring, Krzysztof Kozlowski, Andy Gross, Konrad Dybcio,
Dmitry Baryshkov, Thierry Reding, Melody Olvera,
Greg Kroah-Hartman, Bhupesh Sharma, Douglas Anderson,
linux-arm-kernel, iommu, devicetree, linux-kernel, linux-arm-msm
On Fri, Dec 16 2022 at 10:58:18 PM +01:00:00, Marijn Suijten
<marijn.suijten@somainline.org> wrote:
> When enabling the APPS SMMU the mainline driver reconfigures the SMMU
> from its bootloader configuration, loosing the stream mapping for
> (among
> which) the SDHCI hardware and breaking its ADMA feature. This feature
> can be disabled with:
>
> sdhci.debug_quirks=0x40
>
> But it is of course desired to have this feature enabled and working
> through the SMMU.
>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
> arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi
> b/arch/arm64/boot/dts/qcom/sm6125.dtsi
> index 347665c2067c..f560499cc0ca 100644
> --- a/arch/arm64/boot/dts/qcom/sm6125.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi
> @@ -468,6 +468,7 @@ sdhc_1: mmc@4744000 {
> <&gcc GCC_SDCC1_APPS_CLK>,
> <&xo_board>;
> clock-names = "iface", "core", "xo";
> + iommus = <&apps_smmu 0x160 0>;
>
> power-domains = <&rpmpd SM6125_VDDCX>;
>
> @@ -494,6 +495,7 @@ sdhc_2: mmc@4784000 {
> <&gcc GCC_SDCC2_APPS_CLK>,
> <&xo_board>;
> clock-names = "iface", "core", "xo";
> + iommus = <&apps_smmu 0x180 0>;
>
> pinctrl-0 = <&sdc2_on_state>;
> pinctrl-1 = <&sdc2_off_state>;
> --
> 2.39.0
>
With 0x0 as mask
Reviewed-by: Martin Botka <martin.botka@somainline.org>
-Martin
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v4 4/4] arm64: dts: qcom: sm6125: Add IOMMU context to DWC3
2022-12-16 21:58 ` [PATCH v4 4/4] arm64: dts: qcom: sm6125: Add IOMMU context to DWC3 Marijn Suijten
2022-12-17 14:26 ` Konrad Dybcio
@ 2022-12-18 11:10 ` Martin Botka
1 sibling, 0 replies; 20+ messages in thread
From: Martin Botka @ 2022-12-18 11:10 UTC (permalink / raw)
To: Marijn Suijten
Cc: phone-devel, Will Deacon, Joerg Roedel, Bjorn Andersson,
~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Jami Kettunen, Lux Aliaga, Robin Murphy,
Rob Herring, Krzysztof Kozlowski, Andy Gross, Konrad Dybcio,
Dmitry Baryshkov, Thierry Reding, Melody Olvera,
Greg Kroah-Hartman, Bhupesh Sharma, Douglas Anderson,
linux-arm-kernel, iommu, devicetree, linux-kernel, linux-arm-msm
On Fri, Dec 16 2022 at 10:58:19 PM +01:00:00, Marijn Suijten
<marijn.suijten@somainline.org> wrote:
> From: AngeloGioacchino Del Regno
> <angelogioacchino.delregno@somainline.org>
>
> Add an IOMMU context to the USB DWC3 controller, required to get USB
> functionality upon enablement of apps_smmu.
>
> Signed-off-by: AngeloGioacchino Del Regno
> <angelogioacchino.delregno@somainline.org>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
> arch/arm64/boot/dts/qcom/sm6125.dtsi | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi
> b/arch/arm64/boot/dts/qcom/sm6125.dtsi
> index f560499cc0ca..a205121ab4a7 100644
> --- a/arch/arm64/boot/dts/qcom/sm6125.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi
> @@ -542,6 +542,7 @@ usb3_dwc3: usb@4e00000 {
> compatible = "snps,dwc3";
> reg = <0x04e00000 0xcd00>;
> interrupts = <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>;
> + iommus = <&apps_smmu 0x100 0x0>;
> phys = <&hsusb_phy1>;
> phy-names = "usb2-phy";
> snps,dis_u2_susphy_quirk;
> --
> 2.39.0
>
Reviewed-by: Martin Botka <martin.botka@somainline.org>
-Martin
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125
2022-12-16 21:58 ` [PATCH v4 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125 Marijn Suijten
@ 2022-12-19 9:07 ` Krzysztof Kozlowski
2022-12-19 9:09 ` Krzysztof Kozlowski
0 siblings, 1 reply; 20+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-19 9:07 UTC (permalink / raw)
To: Marijn Suijten, phone-devel, Will Deacon, Joerg Roedel,
Bjorn Andersson
Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Lux Aliaga,
Robin Murphy, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Konrad Dybcio, Dmitry Baryshkov, Thierry Reding, Melody Olvera,
Greg Kroah-Hartman, Bhupesh Sharma, Douglas Anderson,
linux-arm-kernel, iommu, devicetree, linux-kernel, linux-arm-msm
On 16/12/2022 22:58, Marijn Suijten wrote:
> From: Martin Botka <martin.botka@somainline.org>
>
> Document smmu-500 compatibility with the SM6125 SoC.
>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125
2022-12-19 9:07 ` Krzysztof Kozlowski
@ 2022-12-19 9:09 ` Krzysztof Kozlowski
2022-12-19 19:28 ` Marijn Suijten
0 siblings, 1 reply; 20+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-19 9:09 UTC (permalink / raw)
To: Marijn Suijten, phone-devel, Will Deacon, Joerg Roedel,
Bjorn Andersson
Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Lux Aliaga,
Robin Murphy, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Konrad Dybcio, Dmitry Baryshkov, Thierry Reding, Melody Olvera,
Greg Kroah-Hartman, Bhupesh Sharma, Douglas Anderson,
linux-arm-kernel, iommu, devicetree, linux-kernel, linux-arm-msm
On 19/12/2022 10:07, Krzysztof Kozlowski wrote:
> On 16/12/2022 22:58, Marijn Suijten wrote:
>> From: Martin Botka <martin.botka@somainline.org>
>>
>> Document smmu-500 compatibility with the SM6125 SoC.
>>
>
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Wait, not entirely... no constraints for clocks and regs?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125
2022-12-19 9:09 ` Krzysztof Kozlowski
@ 2022-12-19 19:28 ` Marijn Suijten
2022-12-20 9:52 ` Krzysztof Kozlowski
0 siblings, 1 reply; 20+ messages in thread
From: Marijn Suijten @ 2022-12-19 19:28 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: phone-devel, Will Deacon, Joerg Roedel, Bjorn Andersson,
~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Lux Aliaga,
Robin Murphy, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Konrad Dybcio, Dmitry Baryshkov, Thierry Reding, Melody Olvera,
Greg Kroah-Hartman, Bhupesh Sharma, Douglas Anderson,
linux-arm-kernel, iommu, devicetree, linux-kernel, linux-arm-msm
On 2022-12-19 10:09:03, Krzysztof Kozlowski wrote:
> On 19/12/2022 10:07, Krzysztof Kozlowski wrote:
> > On 16/12/2022 22:58, Marijn Suijten wrote:
> >> From: Martin Botka <martin.botka@somainline.org>
> >>
> >> Document smmu-500 compatibility with the SM6125 SoC.
> >>
> >
> > Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> Wait, not entirely... no constraints for clocks and regs?
Quite odd that there is no warning for my DT patch as it clearly
requires at least one clock...
Irrespective of that downstream doesn't define any (nor power domains).
How should we proceed?
- Marijn
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125
2022-12-19 19:28 ` Marijn Suijten
@ 2022-12-20 9:52 ` Krzysztof Kozlowski
2022-12-22 8:23 ` Marijn Suijten
0 siblings, 1 reply; 20+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-20 9:52 UTC (permalink / raw)
To: Marijn Suijten, phone-devel, Will Deacon, Joerg Roedel,
Bjorn Andersson, ~postmarketos/upstreaming,
AngeloGioacchino Del Regno, Konrad Dybcio, Martin Botka,
Jami Kettunen, Lux Aliaga, Robin Murphy, Rob Herring,
Krzysztof Kozlowski, Andy Gross, Konrad Dybcio, Dmitry Baryshkov,
Thierry Reding, Melody Olvera, Greg Kroah-Hartman, Bhupesh Sharma,
Douglas Anderson, linux-arm-kernel, iommu, devicetree,
linux-kernel, linux-arm-msm
On 19/12/2022 20:28, Marijn Suijten wrote:
> On 2022-12-19 10:09:03, Krzysztof Kozlowski wrote:
>> On 19/12/2022 10:07, Krzysztof Kozlowski wrote:
>>> On 16/12/2022 22:58, Marijn Suijten wrote:
>>>> From: Martin Botka <martin.botka@somainline.org>
>>>>
>>>> Document smmu-500 compatibility with the SM6125 SoC.
>>>>
>>>
>>> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>> Wait, not entirely... no constraints for clocks and regs?
>
> Quite odd that there is no warning for my DT patch as it clearly
> requires at least one clock...
>
> Irrespective of that downstream doesn't define any (nor power domains).
> How should we proceed?
Binding now has constraints for clocks so at least that should be added
to your variant.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125
2022-12-20 9:52 ` Krzysztof Kozlowski
@ 2022-12-22 8:23 ` Marijn Suijten
2022-12-22 9:29 ` Krzysztof Kozlowski
0 siblings, 1 reply; 20+ messages in thread
From: Marijn Suijten @ 2022-12-22 8:23 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: phone-devel, Will Deacon, Joerg Roedel, Bjorn Andersson,
~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Lux Aliaga,
Robin Murphy, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Konrad Dybcio, Dmitry Baryshkov, Thierry Reding, Melody Olvera,
Greg Kroah-Hartman, Bhupesh Sharma, Douglas Anderson,
linux-arm-kernel, iommu, devicetree, linux-kernel, linux-arm-msm
On 2022-12-20 10:52:49, Krzysztof Kozlowski wrote:
> On 19/12/2022 20:28, Marijn Suijten wrote:
> > On 2022-12-19 10:09:03, Krzysztof Kozlowski wrote:
> >> On 19/12/2022 10:07, Krzysztof Kozlowski wrote:
> >>> On 16/12/2022 22:58, Marijn Suijten wrote:
> >>>> From: Martin Botka <martin.botka@somainline.org>
> >>>>
> >>>> Document smmu-500 compatibility with the SM6125 SoC.
> >>>>
> >>>
> >>> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >>
> >> Wait, not entirely... no constraints for clocks and regs?
> >
> > Quite odd that there is no warning for my DT patch as it clearly
> > requires at least one clock...
Again, any idea why there's no warning for this DT mismatching minItems:
1 for clocks, clock-names and power-domains?
> > Irrespective of that downstream doesn't define any (nor power domains).
> > How should we proceed?
>
> Binding now has constraints for clocks so at least that should be added
> to your variant.
And that should be:
clock-names: false
clocks: false
power-domains: false
Because this board does declare have any, at least not when going off of
downstream DT?
- Marijn
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125
2022-12-22 8:23 ` Marijn Suijten
@ 2022-12-22 9:29 ` Krzysztof Kozlowski
2022-12-22 10:10 ` Marijn Suijten
0 siblings, 1 reply; 20+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-22 9:29 UTC (permalink / raw)
To: Marijn Suijten, phone-devel, Will Deacon, Joerg Roedel,
Bjorn Andersson, ~postmarketos/upstreaming,
AngeloGioacchino Del Regno, Konrad Dybcio, Martin Botka,
Jami Kettunen, Lux Aliaga, Robin Murphy, Rob Herring,
Krzysztof Kozlowski, Andy Gross, Konrad Dybcio, Dmitry Baryshkov,
Thierry Reding, Melody Olvera, Greg Kroah-Hartman, Bhupesh Sharma,
Douglas Anderson, linux-arm-kernel, iommu, devicetree,
linux-kernel, linux-arm-msm
On 22/12/2022 09:23, Marijn Suijten wrote:
> On 2022-12-20 10:52:49, Krzysztof Kozlowski wrote:
>> On 19/12/2022 20:28, Marijn Suijten wrote:
>>> On 2022-12-19 10:09:03, Krzysztof Kozlowski wrote:
>>>> On 19/12/2022 10:07, Krzysztof Kozlowski wrote:
>>>>> On 16/12/2022 22:58, Marijn Suijten wrote:
>>>>>> From: Martin Botka <martin.botka@somainline.org>
>>>>>>
>>>>>> Document smmu-500 compatibility with the SM6125 SoC.
>>>>>>
>>>>>
>>>>> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>>
>>>> Wait, not entirely... no constraints for clocks and regs?
>>>
>>> Quite odd that there is no warning for my DT patch as it clearly
>>> requires at least one clock...
>
> Again, any idea why there's no warning for this DT mismatching minItems:
> 1 for clocks, clock-names and power-domains?
I don't know what do you have in DT and what is mismatched. Why there
should be a warning?
>
>>> Irrespective of that downstream doesn't define any (nor power domains).
>>> How should we proceed?
>>
>> Binding now has constraints for clocks so at least that should be added
>> to your variant.
>
> And that should be:
>
> clock-names: false
> clocks: false
> power-domains: false
>
> Because this board does declare have any, at least not when going off of
> downstream DT?
I'll add it for existing platforms, so you can rebase on top.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125
2022-12-22 9:29 ` Krzysztof Kozlowski
@ 2022-12-22 10:10 ` Marijn Suijten
2022-12-22 10:36 ` Krzysztof Kozlowski
0 siblings, 1 reply; 20+ messages in thread
From: Marijn Suijten @ 2022-12-22 10:10 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: phone-devel, Will Deacon, Joerg Roedel, Bjorn Andersson,
~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Lux Aliaga,
Robin Murphy, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Konrad Dybcio, Dmitry Baryshkov, Thierry Reding, Melody Olvera,
Greg Kroah-Hartman, Bhupesh Sharma, Douglas Anderson,
linux-arm-kernel, iommu, devicetree, linux-kernel, linux-arm-msm
On 2022-12-22 10:29:40, Krzysztof Kozlowski wrote:
> On 22/12/2022 09:23, Marijn Suijten wrote:
> > On 2022-12-20 10:52:49, Krzysztof Kozlowski wrote:
> >> On 19/12/2022 20:28, Marijn Suijten wrote:
> >>> On 2022-12-19 10:09:03, Krzysztof Kozlowski wrote:
> >>>> On 19/12/2022 10:07, Krzysztof Kozlowski wrote:
> >>>>> On 16/12/2022 22:58, Marijn Suijten wrote:
> >>>>>> From: Martin Botka <martin.botka@somainline.org>
> >>>>>>
> >>>>>> Document smmu-500 compatibility with the SM6125 SoC.
> >>>>>>
> >>>>>
> >>>>> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >>>>
> >>>> Wait, not entirely... no constraints for clocks and regs?
> >>>
> >>> Quite odd that there is no warning for my DT patch as it clearly
> >>> requires at least one clock...
> >
> > Again, any idea why there's no warning for this DT mismatching minItems:
> > 1 for clocks, clock-names and power-domains?
>
> I don't know what do you have in DT and what is mismatched. Why there
> should be a warning?
There is:
clock-names:
minItems: 1
maxItems: 7
clocks:
minItems: 1
maxItems: 7
But I did not provide _any_ (see patch 2 of this series). Shouldn't
that trigger a warning?
> >>> Irrespective of that downstream doesn't define any (nor power domains).
> >>> How should we proceed?
> >>
> >> Binding now has constraints for clocks so at least that should be added
> >> to your variant.
> >
> > And that should be:
> >
> > clock-names: false
> > clocks: false
> > power-domains: false
> >
> > Because this board does declare have any, at least not when going off of
> > downstream DT?
>
> I'll add it for existing platforms, so you can rebase on top.
Thanks, will do!
- Marijn
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125
2022-12-22 10:10 ` Marijn Suijten
@ 2022-12-22 10:36 ` Krzysztof Kozlowski
2022-12-22 13:17 ` Marijn Suijten
0 siblings, 1 reply; 20+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-22 10:36 UTC (permalink / raw)
To: Marijn Suijten, phone-devel, Will Deacon, Joerg Roedel,
Bjorn Andersson, ~postmarketos/upstreaming,
AngeloGioacchino Del Regno, Konrad Dybcio, Martin Botka,
Jami Kettunen, Lux Aliaga, Robin Murphy, Rob Herring,
Krzysztof Kozlowski, Andy Gross, Konrad Dybcio, Dmitry Baryshkov,
Thierry Reding, Melody Olvera, Greg Kroah-Hartman, Bhupesh Sharma,
Douglas Anderson, linux-arm-kernel, iommu, devicetree,
linux-kernel, linux-arm-msm
On 22/12/2022 11:10, Marijn Suijten wrote:
> On 2022-12-22 10:29:40, Krzysztof Kozlowski wrote:
>> On 22/12/2022 09:23, Marijn Suijten wrote:
>>> On 2022-12-20 10:52:49, Krzysztof Kozlowski wrote:
>>>> On 19/12/2022 20:28, Marijn Suijten wrote:
>>>>> On 2022-12-19 10:09:03, Krzysztof Kozlowski wrote:
>>>>>> On 19/12/2022 10:07, Krzysztof Kozlowski wrote:
>>>>>>> On 16/12/2022 22:58, Marijn Suijten wrote:
>>>>>>>> From: Martin Botka <martin.botka@somainline.org>
>>>>>>>>
>>>>>>>> Document smmu-500 compatibility with the SM6125 SoC.
>>>>>>>>
>>>>>>>
>>>>>>> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>>>>
>>>>>> Wait, not entirely... no constraints for clocks and regs?
>>>>>
>>>>> Quite odd that there is no warning for my DT patch as it clearly
>>>>> requires at least one clock...
>>>
>>> Again, any idea why there's no warning for this DT mismatching minItems:
>>> 1 for clocks, clock-names and power-domains?
>>
>> I don't know what do you have in DT and what is mismatched. Why there
>> should be a warning?
>
> There is:
>
> clock-names:
> minItems: 1
> maxItems: 7
>
> clocks:
> minItems: 1
> maxItems: 7
>
> But I did not provide _any_ (see patch 2 of this series). Shouldn't
> that trigger a warning?
No. Are these required properties?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125
2022-12-22 10:36 ` Krzysztof Kozlowski
@ 2022-12-22 13:17 ` Marijn Suijten
0 siblings, 0 replies; 20+ messages in thread
From: Marijn Suijten @ 2022-12-22 13:17 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: phone-devel, Will Deacon, Joerg Roedel, Bjorn Andersson,
~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Lux Aliaga,
Robin Murphy, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Konrad Dybcio, Dmitry Baryshkov, Thierry Reding, Melody Olvera,
Greg Kroah-Hartman, Bhupesh Sharma, Douglas Anderson,
linux-arm-kernel, iommu, devicetree, linux-kernel, linux-arm-msm
On 2022-12-22 11:36:49, Krzysztof Kozlowski wrote:
> [..]
> > There is:
> >
> > clock-names:
> > minItems: 1
> > maxItems: 7
> >
> > clocks:
> > minItems: 1
> > maxItems: 7
> >
> > But I did not provide _any_ (see patch 2 of this series). Shouldn't
> > that trigger a warning?
>
> No. Are these required properties?
Ah right, this has no effect if the property is not required. Only if
the property is set should it adhere to minItems; that is, `clocks;` or
`clock-names;` as boolean property isn't allowed, it has to have `clocks
= <between 1 and 7 items>`.
- Marijn
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2022-12-22 13:17 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-16 21:58 [PATCH v4 0/4] arm64: dts: qcom: sm6125: Enable APPS SMMU Marijn Suijten
2022-12-16 21:58 ` [PATCH v4 1/4] dt-bindings: arm-smmu: Document smmu-500 binding for SM6125 Marijn Suijten
2022-12-19 9:07 ` Krzysztof Kozlowski
2022-12-19 9:09 ` Krzysztof Kozlowski
2022-12-19 19:28 ` Marijn Suijten
2022-12-20 9:52 ` Krzysztof Kozlowski
2022-12-22 8:23 ` Marijn Suijten
2022-12-22 9:29 ` Krzysztof Kozlowski
2022-12-22 10:10 ` Marijn Suijten
2022-12-22 10:36 ` Krzysztof Kozlowski
2022-12-22 13:17 ` Marijn Suijten
2022-12-16 21:58 ` [PATCH v4 2/4] arm64: dts: qcom: sm6125: Configure APPS SMMU Marijn Suijten
2022-12-17 14:25 ` Konrad Dybcio
2022-12-16 21:58 ` [PATCH v4 3/4] arm64: dts: qcom: sm6125: Add apps_smmu with streamID to SDHCI 1/2 nodes Marijn Suijten
2022-12-17 14:26 ` Konrad Dybcio
2022-12-18 10:26 ` Marijn Suijten
2022-12-18 11:10 ` Martin Botka
2022-12-16 21:58 ` [PATCH v4 4/4] arm64: dts: qcom: sm6125: Add IOMMU context to DWC3 Marijn Suijten
2022-12-17 14:26 ` Konrad Dybcio
2022-12-18 11:10 ` Martin Botka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).