Skip to contentSkip to conversation

phy: zynqmp: Add dt bindings for ZynqMP PHY.

PATCH In review Subbaraya Sundeep Bhatta 3 participants 5 messages Jan 13, 2016 – Jan 18, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 2/3 phy: zynqmp: Add dt bindings for ZynqMP PHY.

This patch adds the document describing dt bindings for ZynqMP PHY. ZynqMP SOC has a High Speed Processing System Gigabit Transceiver which provides PHY capabilties to USB, SATA, PCIE, Display Port and Ehernet SGMII controllers.

---
v2:
modified to use phy cells as 2.

 .../devicetree/bindings/phy/phy-zynqmp.txt         | 103 +++++++++++++++++++++
 1 file changed, 103 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-zynqmp.txt
Documentation/devicetree/bindings/phy/phy-zynqmp.txt new file +103 -0
new file mode 100644
index 0000000..975cf21
@@ -0,0 +1,103 @@
+Xilinx ZynqMP PHY binding
+
+This binding describes a ZynqMP PHY device that is used to control ZynqMP
+High Speed Gigabit Transceiver(GT). ZynqMP PS GTR provides four lanes
+and are used by USB, SATA, PCIE, Display port and Ethernet SGMMI controllers.
+
+Required properties (controller (parent) node):
+- compatible    : Should be "xlnx,zynqmp-psgtr"
+
+- reg		: Address and length of register sets for each device in
+		  "reg-names"
+- reg-names     : The names of the register addresses corresponding to the
+		  registers filled in "reg":
+			- serdes: SERDES block register set
+			- siou: SIOU block register set
+			- lpd: Low power domain peripherals reset control
+			- fpd: Full power domain peripherals reset control
+
+-xlnx,tx_termination_fix: Include fix for a functional issue in the GT. The TX
+			  termination resistance can be out of spec due to a
+			  bug in the calibration logic. This issue will be fixed
+			  in silicon in future versions.
+
+Required nodes	:  A sub-node is required for each lane the controller
+		   provides.
+
+Required properties (port (child) nodes):
+lane0:
+- #phy-cells	: Should be 2
+		  Cell after port phandle is device type from:
+			- <PHY_TYPE_PCIE 0>
+			- <PHY_TYPE_SATA 0>
+			- <PHY_TYPE_USB3 0>
+			- <PHY_TYPE_DP 1>
+			- <PHY_TYPE_SGMII 0>
+lane1:
+- #phy-cells	: Should be 2
+		  Cell after port phandle is device type from:
+			- <PHY_TYPE_PCIE 1>
+			- <PHY_TYPE_SATA 1>
+			- <PHY_TYPE_USB3 0>
+			- <PHY_TYPE_DP 0>
+			- <PHY_TYPE_SGMII 1>
+lane2:
+- #phy-cells	: Should be 2
+		  Cell after port phandle is device type from:
+			- <PHY_TYPE_PCIE 2>
+			- <PHY_TYPE_SATA 0>
+			- <PHY_TYPE_USB3 0>
+			- <PHY_TYPE_DP 1>
+			- <PHY_TYPE_SGMII 2>
+lane3:
+- #phy-cells	: Should be 2
+		  Cell after port phandle is device type from:
+			- <PHY_TYPE_PCIE 3>
+			- <PHY_TYPE_SATA 1>
+			- <PHY_TYPE_USB3 1>
+			- <PHY_TYPE_DP 0>
+			- <PHY_TYPE_SGMII 3>
+
+Example:
+	zynqmp_phy@fd400000 {
+		compatible = "xlnx,zynqmp-psgtr";
+		status = "okay";
+		reg = <0x0 0xfd400000 0x40000>, <0x0 0xfd3d0000 0x1000>,
+			<0x0 0xfd1a0000 0x1000>, <0x0 0xff5e0000 0x1000>;
+		reg-names = "serdes", "siou", "fpd", "lpd";
+
+		lane0: lane@0 {
+			#phy-cells = <2>;
+		};
+		lane1: lane@1 {
+			#phy-cells = <2>;
+		};
+		lane2: lane@2 {
+			#phy-cells = <2>;
+		};
+		lane3: lane@3 {
+			#phy-cells = <2>;
+		};
+	};
+
+Specifying phy control of devices
+=================================
+
+Device nodes should specify the configuration required in their "phys"
+property, containing a phandle to the phy port node and a device type.
+
+Example:
+
+#include <dt-bindings/phy/phy.h>
+
+	usb@fe200000 {
+		...
+		phys	  = <&lane2 PHY_TYPE_USB3 0>;
+		...
+	};
+
+	ahci@fd0c0000 {
+		...
+		phys	  = <&lane3 PHY_TYPE_SATA 1>;
+		...
+	};
Signature · 6 lines
2.1.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw
Quoted 6 lines · Subbaraya Sundeep Bhatta

This patch adds the document describing dt bindings for ZynqMP PHY. ZynqMP SOC has a High Speed Processing System Gigabit Transceiver which provides PHY capabilties to USB, SATA, PCIE, Display Port and Ehernet SGMII controllers.

I missed the v2 hence again.

Quoted 21 lines

---
v2:
modified to use phy cells as 2.

 .../devicetree/bindings/phy/phy-zynqmp.txt         | 103 +++++++++++++++++++++
 1 file changed, 103 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-zynqmp.txt
Documentation/devicetree/bindings/phy/phy-zynqmp.txt new file +7 -0
new file mode 100644
index 0000000..975cf21
@@ -0,0 +1,103 @@
+Xilinx ZynqMP PHY binding
+
+This binding describes a ZynqMP PHY device that is used to control ZynqMP
+High Speed Gigabit Transceiver(GT). ZynqMP PS GTR provides four lanes
+and are used by USB, SATA, PCIE, Display port and Ethernet SGMMI controllers.
+
+Required properties (controller (parent) node):

Documentation/devicetree/bindings/phy/phy-zynqmp.txt line 17

Quoted 10 lines
Documentation/devicetree/bindings/phy/phy-zynqmp.txt new file +10 -0
+- compatible    : Should be "xlnx,zynqmp-psgtr"
+
+- reg		: Address and length of register sets for each device in
+		  "reg-names"
+- reg-names     : The names of the register addresses corresponding to the
+		  registers filled in "reg":
+			- serdes: SERDES block register set
+			- siou: SIOU block register set
+			- lpd: Low power domain peripherals reset control
+			- fpd: Full power domain peripherals reset control

The reset registers should not be directly modified by Linux. Any access to resets is likely requiring a reset controller that uses platform FW to modify the resets.

Documentation/devicetree/bindings/phy/phy-zynqmp.txt line 22

Quoted 5 lines
Documentation/devicetree/bindings/phy/phy-zynqmp.txt new file +5 -0
+
+-xlnx,tx_termination_fix: Include fix for a functional issue in the GT. The TX
+			  termination resistance can be out of spec due to a
+			  bug in the calibration logic. This issue will be fixed
+			  in silicon in future versions.

The silicon version is run-time detectable. There should be a way to get away without this property.

Sören

#2 lore raw

SGkgU29yZW4sDQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS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d2lsbCBmaXggdGhp cyBhbmQgc2VuZCBuZXh0IGl0ZXJhdGlvbi4NCg0KPiA+ICsNCj4gPiArLXhsbngsdHhfdGVybWlu YXRpb25fZml4OiBJbmNsdWRlIGZpeCBmb3IgYSBmdW5jdGlvbmFsIGlzc3VlIGluIHRoZSBHVC4g VGhlIFRYDQo+ID4gKwkJCSAgdGVybWluYXRpb24gcmVzaXN0YW5jZSBjYW4gYmUgb3V0IG9mIHNw ZWMgZHVlIHRvIGENCj4gPiArCQkJICBidWcgaW4gdGhlIGNhbGlicmF0aW9uIGxvZ2ljLiBUaGlz IGlzc3VlIHdpbGwgYmUgZml4ZWQNCj4gPiArCQkJICBpbiBzaWxpY29uIGluIGZ1dHVyZSB2ZXJz aW9ucy4NCj4gDQo+IFRoZSBzaWxpY29uIHZlcnNpb24gaXMgcnVuLXRpbWUgZGV0ZWN0YWJsZS4g VGhlcmUgc2hvdWxkIGJlIGEgd2F5IHRvIGdldCBhd2F5DQo+IHdpdGhvdXQgdGhpcyBwcm9wZXJ0 eS4NCg0KT2sgSSB3aWxsIGZpeCB0aGlzIGFuZCBzZW5kIG5leHQgaXRlcmF0aW9uLg0KDQpUaGFu a3MsDQpTdW5kZWVwLg0KPiANCj4gCVPDtnJlbg0K
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#3 lore raw
In reply to Subbaraya Sundeep Bhatta
Quoted 20 lines · Subbaraya Sundeep Bhatta

This patch adds the document describing dt bindings for ZynqMP PHY. ZynqMP SOC has a High Speed Processing System Gigabit Transceiver which provides PHY capabilties to USB, SATA, PCIE, Display Port and Ehernet SGMII controllers.

---
v2:
modified to use phy cells as 2.

 .../devicetree/bindings/phy/phy-zynqmp.txt         | 103 +++++++++++++++++++++
 1 file changed, 103 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-zynqmp.txt
Documentation/devicetree/bindings/phy/phy-zynqmp.txt new file +0 -0
new file mode 100644
index 0000000..975cf21

Documentation/devicetree/bindings/phy/phy-zynqmp.txt line 5

Quoted 5 lines
Documentation/devicetree/bindings/phy/phy-zynqmp.txt new file +5 -0
@@ -0,0 +1,103 @@
+Xilinx ZynqMP PHY binding
+
+This binding describes a ZynqMP PHY device that is used to control ZynqMP
+High Speed Gigabit Transceiver(GT). ZynqMP PS GTR provides four lanes
+and are used by USB, SATA, PCIE, Display port and Ethernet SGMMI controllers.

s/SGMMI/SGMII/

Quoted 20 lines
Documentation/devicetree/bindings/phy/phy-zynqmp.txt new file +20 -0
+
+Required properties (controller (parent) node):
+- compatible    : Should be "xlnx,zynqmp-psgtr"
+
+- reg		: Address and length of register sets for each device in
+		  "reg-names"
+- reg-names     : The names of the register addresses corresponding to the
+		  registers filled in "reg":
+			- serdes: SERDES block register set
+			- siou: SIOU block register set
+			- lpd: Low power domain peripherals reset control
+			- fpd: Full power domain peripherals reset control
+
+-xlnx,tx_termination_fix: Include fix for a functional issue in the GT. The TX
+			  termination resistance can be out of spec due to a
+			  bug in the calibration logic. This issue will be fixed
+			  in silicon in future versions.
+
+Required nodes	:  A sub-node is required for each lane the controller
+		   provides.

Documentation/devicetree/bindings/phy/phy-zynqmp.txt line 35

Quoted 10 lines
Documentation/devicetree/bindings/phy/phy-zynqmp.txt new file +10 -0
+
+Required properties (port (child) nodes):
+lane0:
+- #phy-cells	: Should be 2
+		  Cell after port phandle is device type from:
+			- <PHY_TYPE_PCIE 0>
+			- <PHY_TYPE_SATA 0>
+			- <PHY_TYPE_USB3 0>
+			- <PHY_TYPE_DP 1>
+			- <PHY_TYPE_SGMII 0>

What is the 2nd cell for? The phandle doesn't count for the size.

However, I would simplify this to get rid of the sub nodes and set lane in the 1st cell and the type in the 2nd cell.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

Hi Rob,

Quoted 40 lines

-----Original Message-----
From: Rob Herring [mailto:[email protected]]
Sent: Friday, January 15, 2016 7:40 AM
To: Subbaraya Sundeep Bhatta
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Subbaraya Sundeep Bhatta
Subject: Re: [PATCH v2 2/3] phy: zynqmp: Add dt bindings for ZynqMP PHY.

Quoted 11 lines · Subbaraya Sundeep Bhatta

This patch adds the document describing dt bindings for ZynqMP PHY. ZynqMP SOC has a High Speed Processing System Gigabit Transceiver which provides PHY capabilties to USB, SATA, PCIE, Display Port and Ehernet SGMII controllers.

---
v2:
modified to use phy cells as 2.

 .../devicetree/bindings/phy/phy-zynqmp.txt         | 103

+++++++++++++++++++++

Quoted 11 lines
 1 file changed, 103 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/phy/phy-zynqmp.txt

Documentation/devicetree/bindings/phy/phy-zynqmp.txt new file +0 -0
new file mode 100644
index 0000000..975cf21

Documentation/devicetree/bindings/phy/phy-zynqmp.txt line 5

Quoted 5 lines
Documentation/devicetree/bindings/phy/phy-zynqmp.txt new file +5 -0
@@ -0,0 +1,103 @@
+Xilinx ZynqMP PHY binding
+
+This binding describes a ZynqMP PHY device that is used to control
+ZynqMP High Speed Gigabit Transceiver(GT). ZynqMP PS GTR provides
+four lanes and are used by USB, SATA, PCIE, Display port and Ethernet

SGMMI controllers.

Quoted 1 line

s/SGMMI/SGMII/

Yeah, I will change it.

Quoted 25 lines
Quoted 25 lines
Documentation/devicetree/bindings/phy/phy-zynqmp.txt new file +24 -0
+
+Required properties (controller (parent) node):
+- compatible    : Should be "xlnx,zynqmp-psgtr"
+
+- reg		: Address and length of register sets for each device in
+		  "reg-names"
+- reg-names     : The names of the register addresses corresponding to the
+		  registers filled in "reg":
+			- serdes: SERDES block register set
+			- siou: SIOU block register set
+			- lpd: Low power domain peripherals reset control
+			- fpd: Full power domain peripherals reset control
+
+-xlnx,tx_termination_fix: Include fix for a functional issue in the GT. The TX
+			  termination resistance can be out of spec due to a
+			  bug in the calibration logic. This issue will be fixed
+			  in silicon in future versions.
+
+Required nodes	:  A sub-node is required for each lane the controller
+		   provides.
+
+Required properties (port (child) nodes):
+lane0:
+- #phy-cells	: Should be 2
Quoted 8 lines

Documentation/devicetree/bindings/phy/phy-zynqmp.txt line 35

Quoted 6 lines
Documentation/devicetree/bindings/phy/phy-zynqmp.txt new file +6 -0
+		  Cell after port phandle is device type from:
+			- <PHY_TYPE_PCIE 0>
+			- <PHY_TYPE_SATA 0>
+			- <PHY_TYPE_USB3 0>
+			- <PHY_TYPE_DP 1>
+			- <PHY_TYPE_SGMII 0>

What is the 2nd cell for? The phandle doesn't count for the size.

ZynMP SoC has 2 USB controllers, 1 SATA controller with 2 lanes,
1 PCIe controller with 4 lanes, 1 Display port with 2 lanes and
4 SGMII controllers. PHY provides 4 output lanes only for 14(PIPE) inputs (as mentioned above: 2 + 2 + 4 + 2+ 4 = 14). All the inputs are routed to PHY output lanes with a Mux (Interconnect matrix). Only some combinations are valid i.e, one cannot set mux to use USB1 on lane 0 as such. Here second cell is input number.
<PHY_TYPE_PCIE 0> derives to PCIe's lane 0 input in driver for which lane 0 of
PHY can be used. The valid inputs of each PHY output lane are mentioned here.

Quoted 3 lines

However, I would simplify this to get rid of the sub nodes and set lane in the 1st cell and the type in the 2nd cell.

Sorry I did not get you on how to get rid of sub nodes. Could you please explain?

Thanks,
Sundeep

Quoted 2 lines

Rob

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html