* [PATCH v4 0/3] arm64: qcom: sa8775p: add support for UFS
@ 2023-05-15 9:53 Bartosz Golaszewski
2023-05-15 9:53 ` [PATCH v4 1/3] dt-bindings: ufs: qcom: add compatible for sa8775p Bartosz Golaszewski
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2023-05-15 9:53 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Vinod Koul,
Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-scsi,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Update relevant DT bindings, add new config to the driver and add UFS
and PHY nodes to the .dtsi and enable them in the board .dts for
sa8775p-ride.
v3 -> v4:
- drop applied patches
- mark the UFS as dma-coherent
v2 -> v3:
- fix DT bindings: move allOf: below required:
- collect review tags
v1 -> v2:
- order new compatibles alphabetically
- rework the UFS PHY bindings to accomodate more clocks
- add a comment in the .dts regarding a non-standard clock used
by the UFS PHY
Bartosz Golaszewski (3):
dt-bindings: ufs: qcom: add compatible for sa8775p
arm64: dts: qcom: sa8775p: add UFS nodes
arm64: dts: qcom: sa8775p-ride: enable UFS
.../devicetree/bindings/ufs/qcom,ufs.yaml | 2 +
arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 19 ++++++
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 59 +++++++++++++++++++
3 files changed, 80 insertions(+)
--
2.39.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v4 1/3] dt-bindings: ufs: qcom: add compatible for sa8775p
2023-05-15 9:53 [PATCH v4 0/3] arm64: qcom: sa8775p: add support for UFS Bartosz Golaszewski
@ 2023-05-15 9:53 ` Bartosz Golaszewski
2023-05-15 9:53 ` [PATCH v4 2/3] arm64: dts: qcom: sa8775p: add UFS nodes Bartosz Golaszewski
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2023-05-15 9:53 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Vinod Koul,
Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-scsi,
Bartosz Golaszewski, Krzysztof Kozlowski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Add the compatible string for the UFS on sa8775p platforms.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
index c5a06c048389..b1c00424c2b0 100644
--- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
@@ -26,6 +26,7 @@ properties:
- qcom,msm8994-ufshc
- qcom,msm8996-ufshc
- qcom,msm8998-ufshc
+ - qcom,sa8775p-ufshc
- qcom,sc8280xp-ufshc
- qcom,sdm845-ufshc
- qcom,sm6350-ufshc
@@ -105,6 +106,7 @@ allOf:
contains:
enum:
- qcom,msm8998-ufshc
+ - qcom,sa8775p-ufshc
- qcom,sc8280xp-ufshc
- qcom,sm8250-ufshc
- qcom,sm8350-ufshc
--
2.39.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v4 2/3] arm64: dts: qcom: sa8775p: add UFS nodes
2023-05-15 9:53 [PATCH v4 0/3] arm64: qcom: sa8775p: add support for UFS Bartosz Golaszewski
2023-05-15 9:53 ` [PATCH v4 1/3] dt-bindings: ufs: qcom: add compatible for sa8775p Bartosz Golaszewski
@ 2023-05-15 9:53 ` Bartosz Golaszewski
2023-05-15 9:53 ` [PATCH v4 3/3] arm64: dts: qcom: sa8775p-ride: enable UFS Bartosz Golaszewski
2023-05-15 9:57 ` [PATCH v4 0/3] arm64: qcom: sa8775p: add support for UFS Konrad Dybcio
3 siblings, 0 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2023-05-15 9:53 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Vinod Koul,
Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-scsi,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Add nodes for the UFS and its PHY on sa8775p platforms.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 59 +++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
index 92712d0c4100..3f1f374db54f 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
@@ -586,6 +586,65 @@ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
};
};
+ ufs_mem_hc: ufs@1d84000 {
+ compatible = "qcom,sa8775p-ufshc", "qcom,ufshc", "jedec,ufs-2.0";
+ reg = <0x0 0x01d84000 0x0 0x3000>;
+ interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
+ phys = <&ufs_mem_phy>;
+ phy-names = "ufsphy";
+ lanes-per-direction = <2>;
+ #reset-cells = <1>;
+ resets = <&gcc GCC_UFS_PHY_BCR>;
+ reset-names = "rst";
+ power-domains = <&gcc UFS_PHY_GDSC>;
+ required-opps = <&rpmhpd_opp_nom>;
+ iommus = <&apps_smmu 0x100 0x0>;
+ dma-coherent;
+ clocks = <&gcc GCC_UFS_PHY_AXI_CLK>,
+ <&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>,
+ <&gcc GCC_UFS_PHY_AHB_CLK>,
+ <&gcc GCC_UFS_PHY_UNIPRO_CORE_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>,
+ <&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>,
+ <&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>,
+ <&gcc GCC_UFS_PHY_RX_SYMBOL_1_CLK>;
+ clock-names = "core_clk",
+ "bus_aggr_clk",
+ "iface_clk",
+ "core_clk_unipro",
+ "ref_clk",
+ "tx_lane0_sync_clk",
+ "rx_lane0_sync_clk",
+ "rx_lane1_sync_clk";
+ freq-table-hz = <75000000 300000000>,
+ <0 0>,
+ <0 0>,
+ <75000000 300000000>,
+ <0 0>,
+ <0 0>,
+ <0 0>,
+ <0 0>;
+ status = "disabled";
+ };
+
+ ufs_mem_phy: phy@1d87000 {
+ compatible = "qcom,sa8775p-qmp-ufs-phy";
+ reg = <0x0 0x01d87000 0x0 0xe10>;
+ /*
+ * Yes, GCC_EDP_REF_CLKREF_EN is correct in qref. It
+ * enables the CXO clock to eDP *and* UFS PHY.
+ */
+ clocks = <&rpmhcc RPMH_CXO_CLK>,
+ <&gcc GCC_UFS_PHY_PHY_AUX_CLK>,
+ <&gcc GCC_EDP_REF_CLKREF_EN>;
+ clock-names = "ref", "ref_aux", "qref";
+ power-domains = <&gcc UFS_PHY_GDSC>;
+ resets = <&ufs_mem_hc 0>;
+ reset-names = "ufsphy";
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
tcsr_mutex: hwlock@1f40000 {
compatible = "qcom,tcsr-mutex";
reg = <0x0 0x01f40000 0x0 0x20000>;
--
2.39.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v4 3/3] arm64: dts: qcom: sa8775p-ride: enable UFS
2023-05-15 9:53 [PATCH v4 0/3] arm64: qcom: sa8775p: add support for UFS Bartosz Golaszewski
2023-05-15 9:53 ` [PATCH v4 1/3] dt-bindings: ufs: qcom: add compatible for sa8775p Bartosz Golaszewski
2023-05-15 9:53 ` [PATCH v4 2/3] arm64: dts: qcom: sa8775p: add UFS nodes Bartosz Golaszewski
@ 2023-05-15 9:53 ` Bartosz Golaszewski
2023-05-15 9:57 ` [PATCH v4 0/3] arm64: qcom: sa8775p: add support for UFS Konrad Dybcio
3 siblings, 0 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2023-05-15 9:53 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Vinod Koul,
Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-scsi,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Enable the UFS and its PHY on sa8775p-ride.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
index f238a02a5448..2bb001a3ea55 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
+++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
@@ -5,6 +5,7 @@
/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "sa8775p.dtsi"
@@ -20,6 +21,7 @@ aliases {
serial2 = &uart17;
i2c18 = &i2c18;
spi16 = &spi16;
+ ufshc1 = &ufs_mem_hc;
};
chosen {
@@ -426,6 +428,23 @@ &uart17 {
status = "okay";
};
+&ufs_mem_hc {
+ reset-gpios = <&tlmm 149 GPIO_ACTIVE_LOW>;
+ vcc-supply = <&vreg_l8a>;
+ vcc-max-microamp = <1100000>;
+ vccq-supply = <&vreg_l4c>;
+ vccq-max-microamp = <1200000>;
+
+ status = "okay";
+};
+
+&ufs_mem_phy {
+ vdda-phy-supply = <&vreg_l4a>;
+ vdda-pll-supply = <&vreg_l1c>;
+
+ status = "okay";
+};
+
&xo_board_clk {
clock-frequency = <38400000>;
};
--
2.39.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v4 0/3] arm64: qcom: sa8775p: add support for UFS
2023-05-15 9:53 [PATCH v4 0/3] arm64: qcom: sa8775p: add support for UFS Bartosz Golaszewski
` (2 preceding siblings ...)
2023-05-15 9:53 ` [PATCH v4 3/3] arm64: dts: qcom: sa8775p-ride: enable UFS Bartosz Golaszewski
@ 2023-05-15 9:57 ` Konrad Dybcio
2023-05-15 9:58 ` Bartosz Golaszewski
3 siblings, 1 reply; 6+ messages in thread
From: Konrad Dybcio @ 2023-05-15 9:57 UTC (permalink / raw)
To: Bartosz Golaszewski, Andy Gross, Bjorn Andersson, Vinod Koul,
Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-scsi,
Bartosz Golaszewski
On 15.05.2023 11:53, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Update relevant DT bindings, add new config to the driver and add UFS
> and PHY nodes to the .dtsi and enable them in the board .dts for
> sa8775p-ride.
>
> v3 -> v4:
> - drop applied patches
> - mark the UFS as dma-coherent
Bjorn picked all of these up, you need to send an incremental
patch now.
Konrad
>
> v2 -> v3:
> - fix DT bindings: move allOf: below required:
> - collect review tags
>
> v1 -> v2:
> - order new compatibles alphabetically
> - rework the UFS PHY bindings to accomodate more clocks
> - add a comment in the .dts regarding a non-standard clock used
> by the UFS PHY
>
> Bartosz Golaszewski (3):
> dt-bindings: ufs: qcom: add compatible for sa8775p
> arm64: dts: qcom: sa8775p: add UFS nodes
> arm64: dts: qcom: sa8775p-ride: enable UFS
>
> .../devicetree/bindings/ufs/qcom,ufs.yaml | 2 +
> arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 19 ++++++
> arch/arm64/boot/dts/qcom/sa8775p.dtsi | 59 +++++++++++++++++++
> 3 files changed, 80 insertions(+)
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 0/3] arm64: qcom: sa8775p: add support for UFS
2023-05-15 9:57 ` [PATCH v4 0/3] arm64: qcom: sa8775p: add support for UFS Konrad Dybcio
@ 2023-05-15 9:58 ` Bartosz Golaszewski
0 siblings, 0 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2023-05-15 9:58 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Andy Gross, Bjorn Andersson, Vinod Koul, Kishon Vijay Abraham I,
Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
Alim Akhtar, Avri Altman, Bart Van Assche, linux-arm-msm,
linux-phy, devicetree, linux-kernel, linux-scsi,
Bartosz Golaszewski
On Mon, May 15, 2023 at 11:57 AM Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
>
>
> On 15.05.2023 11:53, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >
> > Update relevant DT bindings, add new config to the driver and add UFS
> > and PHY nodes to the .dtsi and enable them in the board .dts for
> > sa8775p-ride.
> >
> > v3 -> v4:
> > - drop applied patches
> > - mark the UFS as dma-coherent
> Bjorn picked all of these up, you need to send an incremental
> patch now.
>
> Konrad
Ah cr*p just saw it too, they were not in next yet so didn't notice
when rebasing. Will send an incremental patch then.
Bart
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-05-15 9:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-15 9:53 [PATCH v4 0/3] arm64: qcom: sa8775p: add support for UFS Bartosz Golaszewski
2023-05-15 9:53 ` [PATCH v4 1/3] dt-bindings: ufs: qcom: add compatible for sa8775p Bartosz Golaszewski
2023-05-15 9:53 ` [PATCH v4 2/3] arm64: dts: qcom: sa8775p: add UFS nodes Bartosz Golaszewski
2023-05-15 9:53 ` [PATCH v4 3/3] arm64: dts: qcom: sa8775p-ride: enable UFS Bartosz Golaszewski
2023-05-15 9:57 ` [PATCH v4 0/3] arm64: qcom: sa8775p: add support for UFS Konrad Dybcio
2023-05-15 9:58 ` Bartosz Golaszewski
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).