Re: [PATCH v11 09/13] arm64: dts: ls1046a: Add serdes nodes

2023-03-17 Thread Sean Anderson
On 3/14/23 03:08, Shawn Guo wrote:
> On Mon, Mar 13, 2023 at 12:11:33PM -0400, Sean Anderson wrote:
>> This adds nodes for the SerDes devices. They are disabled by default
>> to prevent any breakage on existing boards.
>> 
>> Signed-off-by: Sean Anderson 
> 
> The DTS patches look good to me.  Let me know if they are ready to be
> applied.

The main holdup is driver approval from Vinod/Kishon.

--Sean


Re: [PATCH v11 09/13] arm64: dts: ls1046a: Add serdes nodes

2023-03-14 Thread Shawn Guo
On Mon, Mar 13, 2023 at 12:11:33PM -0400, Sean Anderson wrote:
> This adds nodes for the SerDes devices. They are disabled by default
> to prevent any breakage on existing boards.
> 
> Signed-off-by: Sean Anderson 

The DTS patches look good to me.  Let me know if they are ready to be
applied.

Shawn


[PATCH v11 09/13] arm64: dts: ls1046a: Add serdes nodes

2023-03-13 Thread Sean Anderson
This adds nodes for the SerDes devices. They are disabled by default
to prevent any breakage on existing boards.

Signed-off-by: Sean Anderson 
---

(no changes since v10)

Changes in v10:
- Move serdes bindings to SoC dtsi
- Add support for all (ethernet) serdes modes
- Refer to "nodes" instead of "bindings"
- Move compatible/reg first

Changes in v4:
- Convert to new bindings

Changes in v3:
- Describe modes in device tree

Changes in v2:
- Use one phy cell for SerDes1, since no lanes can be grouped
- Disable SerDes by default to prevent breaking boards inadvertently.

 .../arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 111 ++
 1 file changed, 111 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi 
b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
index a01e3cfec77f..f6361fafaef7 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 
 / {
compatible = "fsl,ls1046a";
@@ -424,6 +425,116 @@ sfp: efuse@1e8 {
clock-names = "sfp";
};
 
+   serdes1: serdes@1ea {
+   compatible = "fsl,ls1046a-serdes", "fsl,lynx-10g";
+   reg = <0x0 0x1ea 0x0 0x2000>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   #clock-cells = <1>;
+   status = "disabled";
+
+   /*
+* XXX: Lane A uses pins SD1_RX3_P/N! That is, the lane
+* numbers and pin numbers are _reversed_. In addition,
+* the PCCR documentation is _inconsistent_ in its
+* usage of these terms!
+*
+* PCCR "Lane 0" refers to...
+*  =
+*0 Lane A
+*2 Lane A
+*8 Lane A
+*9 Lane A
+*B Lane D!
+*/
+   serdes1_A: phy@0 {
+   #phy-cells = <0>;
+   reg = <0>;
+
+   /* SGMII.6 */
+   sgmii-0 {
+   fsl,pccr = <0x8>;
+   fsl,index = <0>;
+   fsl,cfg = <0x1>;
+   fsl,type = ;
+   };
+   };
+
+   serdes1_B: phy@1 {
+   #phy-cells = <0>;
+   reg = <1>;
+
+   /* SGMII.5 */
+   sgmii-1 {
+   fsl,pccr = <0x8>;
+   fsl,index = <1>;
+   fsl,cfg = <0x1>;
+   fsl,type = ;
+   };
+
+   /* QSGMII.6,5,10,1 */
+   qsgmii-1 {
+   fsl,pccr = <0x9>;
+   fsl,index = <1>;
+   fsl,cfg = <0x1>;
+   fsl,type = ;
+   };
+
+   /* TODO: PCIe.1 */
+   };
+
+   serdes1_C: phy@2 {
+   #phy-cells = <0>;
+   reg = <2>;
+
+   /* SGMII.10 */
+   sgmii-2 {
+   fsl,pccr = <0x8>;
+   fsl,index = <2>;
+   fsl,cfg = <0x1>;
+   fsl,type = ;
+   };
+
+   /* XFI.10 */
+   xfi-0 {
+   fsl,pccr = <0xb>;
+   fsl,index = <0>;
+   fsl,cfg = <0x2>;
+   fsl,type = ;
+   };
+   };
+
+   serdes1_D: phy@3 {
+   #phy-cells = <0>;
+   reg = <3>;
+
+   /* SGMII.9 */
+   sgmii-3 {
+   fsl,pccr = <0x8>;
+   fsl,index = <3>;
+   fsl,cfg = <0x1>;
+   fsl,type = ;
+   };
+
+