* [PATCH v6 0/5] arm64: dts: qcom: sdm845: Add UFS DT nodes
@ 2018-12-06 23:31 Evan Green
2018-12-06 23:32 ` [PATCH v6 1/5] dt-bindings: phy-qcom-qmp: Fix register underspecification Evan Green
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Evan Green @ 2018-12-06 23:31 UTC (permalink / raw)
To: Rob Herring, Andy Gross, Kishon Vijay Abraham I
Cc: Douglas Anderson, Stephen Boyd, Evan Green, devicetree,
Grygorii Strashko, linux-arm-msm, Can Guo, linux-kernel,
Vivek Gautam, Manu Gautam, Rob Herring, David Brown, Mark Rutland
Update the device tree bindings for the QMP PHY to properly
specify the registers for dual-lane PHYs. Update the driver to use
those new registers. Add the DT nodes for UFS on SDM845 and MTP.
Finally, fix up the USB3 PHY on SDM845, which also has a dual-lane phy
Andy/Kishon,
Just a heads up that these changes stack on top of each other,
and if taken through separate trees might break things a little until
they come back together.
Changes in v6:
- Removed resets and reset-names (Bjorn)
- Renamed nodes (Bjorn)
- Fix renamed nodes in MTP (Bjorn)
Changes in v5:
- Fix incorrect register value in example, copied from real life!
Changes in v4:
- Remove "status" from DT binding example (Rob)
Changes in v3:
- Removed erroneous fixup for USB UniPro PHY, which is not dual lane (Doug)
Changes in v2:
- Added dt bindings change, corresponding driver fixup, and USB PHY fixup
- Renamed ufsphy to phy (Vivek)
- Removed #clock-cells (Vivek)
Can Guo (1):
arm64: dts: qcom: sdm845: Add UFS nodes for sdm845-mtp
Evan Green (4):
dt-bindings: phy-qcom-qmp: Fix register underspecification
phy: qcom-qmp: Utilize fully-specified DT registers
arm64: dts: qcom: sdm845: add UFS controller
arm64: dts: qcom: sdm845: Add USB PHY lane two
.../devicetree/bindings/phy/qcom-qmp-phy.txt | 70 ++++++++++++++++---
arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 14 ++++
arch/arm64/boot/dts/qcom/sdm845.dtsi | 68 +++++++++++++++++-
drivers/phy/qualcomm/phy-qcom-qmp.c | 51 ++++++++++----
4 files changed, 181 insertions(+), 22 deletions(-)
--
2.18.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v6 1/5] dt-bindings: phy-qcom-qmp: Fix register underspecification
2018-12-06 23:31 [PATCH v6 0/5] arm64: dts: qcom: sdm845: Add UFS DT nodes Evan Green
@ 2018-12-06 23:32 ` Evan Green
2018-12-06 23:32 ` [PATCH v6 3/5] arm64: dts: qcom: sdm845: add UFS controller Evan Green
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Evan Green @ 2018-12-06 23:32 UTC (permalink / raw)
To: Rob Herring, Andy Gross, Kishon Vijay Abraham I
Cc: Douglas Anderson, Stephen Boyd, Evan Green, devicetree,
Mark Rutland, Rob Herring, linux-kernel
Add register regions for the second lane of dual-lane nodes.
This additional specification is needed so that the driver can stop
reaching beyond the tx and rx register allocations to get at the
second lane registers in a dual-lane PHY.
While in there, document #clock-cells as optional for PHYs that don't
provide a pipe clock. Also, document the pcs_misc register region, which
was being quietly supplied and used.
Signed-off-by: Evan Green <evgreen@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changes in v6: None
Changes in v5:
- Fix incorrect register value in example, copied from real life!
Changes in v4:
- Remove "status" from DT binding example (Rob)
Changes in v3: None
Changes in v2:
- Added dt bindings change, corresponding driver fixup, and USB PHY fixup
.../devicetree/bindings/phy/qcom-qmp-phy.txt | 70 ++++++++++++++++---
1 file changed, 62 insertions(+), 8 deletions(-)
diff --git a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt b/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
index fbc198d5dd39e..f7b532125a4d9 100644
--- a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
+++ b/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
@@ -25,7 +25,7 @@ Required properties:
- For all others:
- The reg-names property shouldn't be defined.
- - #clock-cells: must be 1
+ - #clock-cells: must be 1 (PCIe and USB3 PHYs only)
- Phy pll outputs a bunch of clocks for Tx, Rx and Pipe
interface (for pipe based PHYs). These clock are then gate-controlled
by gcc.
@@ -82,23 +82,26 @@ Required nodes:
- Each device node of QMP phy is required to have as many child nodes as
the number of lanes the PHY has.
-Required properties for child node:
+Required properties for child nodes of PCIe PHYs (one child per lane):
- reg: list of offset and length pairs of register sets for PHY blocks -
- - index 0: tx
- - index 1: rx
- - index 2: pcs
- - index 3: pcs_misc (optional)
+ tx, rx, pcs, and pcs_misc (optional).
+ - #phy-cells: must be 0
+Required properties for a single "lanes" child node of non-PCIe PHYs:
+ - reg: list of offset and length pairs of register sets for PHY blocks
+ For 1-lane devices:
+ tx, rx, pcs, and (optionally) pcs_misc
+ For 2-lane devices:
+ tx0, rx0, pcs, tx1, rx1, and (optionally) pcs_misc
- #phy-cells: must be 0
-Required properties child node of pcie and usb3 qmp phys:
+Required properties for child node of PCIe and USB3 qmp phys:
- clocks: a list of phandles and clock-specifier pairs,
one for each entry in clock-names.
- clock-names: Must contain following:
"pipe<lane-number>" for pipe clock specific to each lane.
- clock-output-names: Name of the PHY clock that will be the parent for
the above pipe clock.
-
For "qcom,ipq8074-qmp-pcie-phy":
- "pcie20_phy0_pipe_clk" Pipe Clock parent
(or)
@@ -150,3 +153,54 @@ Example:
...
...
};
+
+ phy@88eb000 {
+ compatible = "qcom,sdm845-qmp-usb3-uni-phy";
+ reg = <0x88eb000 0x18c>;
+ #clock-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>,
+ <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
+ <&gcc GCC_USB3_SEC_CLKREF_CLK>,
+ <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>;
+ clock-names = "aux", "cfg_ahb", "ref", "com_aux";
+
+ resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>,
+ <&gcc GCC_USB3_PHY_SEC_BCR>;
+ reset-names = "phy", "common";
+
+ lane@88eb200 {
+ reg = <0x88eb200 0x128>,
+ <0x88eb400 0x1fc>,
+ <0x88eb800 0x218>,
+ <0x88eb600 0x70>;
+ #phy-cells = <0>;
+ clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
+ clock-names = "pipe0";
+ clock-output-names = "usb3_uni_phy_pipe_clk_src";
+ };
+ };
+
+ phy@1d87000 {
+ compatible = "qcom,sdm845-qmp-ufs-phy";
+ reg = <0x1d87000 0x18c>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+ clock-names = "ref",
+ "ref_aux";
+ clocks = <&gcc GCC_UFS_MEM_CLKREF_CLK>,
+ <&gcc GCC_UFS_PHY_PHY_AUX_CLK>;
+
+ lanes@1d87400 {
+ reg = <0x1d87400 0x108>,
+ <0x1d87600 0x1e0>,
+ <0x1d87c00 0x1dc>,
+ <0x1d87800 0x108>,
+ <0x1d87a00 0x1e0>;
+ #phy-cells = <0>;
+ };
+ };
--
2.18.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v6 3/5] arm64: dts: qcom: sdm845: add UFS controller
2018-12-06 23:31 [PATCH v6 0/5] arm64: dts: qcom: sdm845: Add UFS DT nodes Evan Green
2018-12-06 23:32 ` [PATCH v6 1/5] dt-bindings: phy-qcom-qmp: Fix register underspecification Evan Green
@ 2018-12-06 23:32 ` Evan Green
2018-12-06 23:32 ` [PATCH v6 4/5] arm64: dts: qcom: sdm845: Add UFS nodes for sdm845-mtp Evan Green
2018-12-06 23:32 ` [PATCH v6 5/5] arm64: dts: qcom: sdm845: Add USB PHY lane two Evan Green
3 siblings, 0 replies; 5+ messages in thread
From: Evan Green @ 2018-12-06 23:32 UTC (permalink / raw)
To: Rob Herring, Andy Gross, Kishon Vijay Abraham I
Cc: Douglas Anderson, Stephen Boyd, Evan Green, devicetree,
linux-arm-msm, linux-kernel, Rob Herring, David Brown,
Mark Rutland
Add the UFS controller and PHY to SDM845.
Signed-off-by: Evan Green <evgreen@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
As Doug mentioned in v2, this should land after (or with) the driver fix
in this series.
Changes in v6:
- Removed resets and reset-names (Bjorn)
- Renamed nodes (Bjorn)
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Renamed ufsphy to phy (Vivek)
- Removed #clock-cells (Vivek)
arch/arm64/boot/dts/qcom/sdm845.dtsi | 64 ++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 1419b0098cb38..9e4ad805d2936 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -816,6 +816,70 @@
};
};
+ ufs_mem_hc: ufshc@1d84000 {
+ compatible = "qcom,sdm845-ufshc", "qcom,ufshc",
+ "jedec,ufs-2.0";
+ reg = <0x1d84000 0x2500>;
+ interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
+ phys = <&ufs_mem_phy_lanes>;
+ phy-names = "ufsphy";
+ lanes-per-direction = <2>;
+ power-domains = <&gcc UFS_PHY_GDSC>;
+
+ 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";
+ 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>;
+ freq-table-hz =
+ <50000000 200000000>,
+ <0 0>,
+ <0 0>,
+ <37500000 150000000>,
+ <0 0>,
+ <0 0>,
+ <0 0>,
+ <0 0>;
+
+ status = "disabled";
+ };
+
+ ufs_mem_phy: phy@1d87000 {
+ compatible = "qcom,sdm845-qmp-ufs-phy";
+ reg = <0x1d87000 0x18c>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+ clock-names = "ref",
+ "ref_aux";
+ clocks = <&gcc GCC_UFS_MEM_CLKREF_CLK>,
+ <&gcc GCC_UFS_PHY_PHY_AUX_CLK>;
+
+ status = "disabled";
+
+ ufs_mem_phy_lanes: lanes@1d87400 {
+ reg = <0x1d87400 0x108>,
+ <0x1d87600 0x1e0>,
+ <0x1d87c00 0x1dc>,
+ <0x1d87800 0x108>,
+ <0x1d87a00 0x1e0>;
+ #phy-cells = <0>;
+ };
+ };
+
tcsr_mutex_regs: syscon@1f40000 {
compatible = "syscon";
reg = <0x1f40000 0x40000>;
--
2.18.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v6 4/5] arm64: dts: qcom: sdm845: Add UFS nodes for sdm845-mtp
2018-12-06 23:31 [PATCH v6 0/5] arm64: dts: qcom: sdm845: Add UFS DT nodes Evan Green
2018-12-06 23:32 ` [PATCH v6 1/5] dt-bindings: phy-qcom-qmp: Fix register underspecification Evan Green
2018-12-06 23:32 ` [PATCH v6 3/5] arm64: dts: qcom: sdm845: add UFS controller Evan Green
@ 2018-12-06 23:32 ` Evan Green
2018-12-06 23:32 ` [PATCH v6 5/5] arm64: dts: qcom: sdm845: Add USB PHY lane two Evan Green
3 siblings, 0 replies; 5+ messages in thread
From: Evan Green @ 2018-12-06 23:32 UTC (permalink / raw)
To: Rob Herring, Andy Gross, Kishon Vijay Abraham I
Cc: Douglas Anderson, Stephen Boyd, Can Guo, Evan Green, devicetree,
linux-arm-msm, linux-kernel, Rob Herring, David Brown,
Mark Rutland
From: Can Guo <cang@codeaurora.org>
Enable the UFS host controller and PHY on sdm845-mtp.
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Evan Green <evgreen@chromium.org>
Reviewed-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
---
Changes in v6:
- Fix renamed nodes in MTP (Bjorn)
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
index b3def03581775..99b1eefef0ff2 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
@@ -366,6 +366,20 @@
status = "okay";
};
+&ufs_mem_hc {
+ status = "okay";
+
+ vcc-supply = <&vreg_l20a_2p95>;
+ vcc-max-microamp = <600000>;
+};
+
+&ufs_mem_phy {
+ status = "okay";
+
+ vdda-phy-supply = <&vdda_ufs1_core>;
+ vdda-pll-supply = <&vdda_ufs1_1p2>;
+};
+
&usb_1 {
status = "okay";
};
--
2.18.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v6 5/5] arm64: dts: qcom: sdm845: Add USB PHY lane two
2018-12-06 23:31 [PATCH v6 0/5] arm64: dts: qcom: sdm845: Add UFS DT nodes Evan Green
` (2 preceding siblings ...)
2018-12-06 23:32 ` [PATCH v6 4/5] arm64: dts: qcom: sdm845: Add UFS nodes for sdm845-mtp Evan Green
@ 2018-12-06 23:32 ` Evan Green
3 siblings, 0 replies; 5+ messages in thread
From: Evan Green @ 2018-12-06 23:32 UTC (permalink / raw)
To: Rob Herring, Andy Gross, Kishon Vijay Abraham I
Cc: Douglas Anderson, Stephen Boyd, Evan Green, devicetree,
linux-arm-msm, linux-kernel, Rob Herring, David Brown,
Mark Rutland
Add the second lane registers for the USB PHY, now that the
QMP phy bindings have been updated. This way the driver can stop
reaching beyond its register region to get at the second lane.
Signed-off-by: Evan Green <evgreen@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3:
- Removed erroneous fixup for USB UniPro PHY, which is not dual lane (Doug)
Changes in v2: None
arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 9e4ad805d2936..e2256953dac4c 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -1193,10 +1193,12 @@
<&gcc GCC_USB3_PHY_PRIM_BCR>;
reset-names = "phy", "common";
- usb_1_ssphy: lane@88e9200 {
+ usb_1_ssphy: lanes@88e9200 {
reg = <0x88e9200 0x128>,
<0x88e9400 0x200>,
<0x88e9c00 0x218>,
+ <0x88e9600 0x128>,
+ <0x88e9800 0x200>,
<0x88e9a00 0x100>;
#phy-cells = <0>;
clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
--
2.18.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-12-06 23:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-06 23:31 [PATCH v6 0/5] arm64: dts: qcom: sdm845: Add UFS DT nodes Evan Green
2018-12-06 23:32 ` [PATCH v6 1/5] dt-bindings: phy-qcom-qmp: Fix register underspecification Evan Green
2018-12-06 23:32 ` [PATCH v6 3/5] arm64: dts: qcom: sdm845: add UFS controller Evan Green
2018-12-06 23:32 ` [PATCH v6 4/5] arm64: dts: qcom: sdm845: Add UFS nodes for sdm845-mtp Evan Green
2018-12-06 23:32 ` [PATCH v6 5/5] arm64: dts: qcom: sdm845: Add USB PHY lane two Evan Green
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).