Skip to contentSkip to conversation

arm64: dts: freescale: Add support for LX2162 SoM & Clearfog Board

PATCH Superseded Josua Mayer 2 participants 8 messages Jun 17, 2023

Subsystems (3)

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v2 cover arm64: dts: freescale: Add support for LX2162 SoM & Clearfog Board

Add support for the SolidRun LX2162A System on Module (SoM), and the Clearfog evaluation board.

This patch-set introduces:
- dt node for lx2160a serdes block #2
- dtsi for lx2162a system on module
- dts for lx2162 clearfog

Firstly Please note that checkpatch was complaining about the EEPROMS:
- DT compatible string "st,24c02" appears un-documented
- DT compatible string "st,24c2048" appears un-documented
- DT compatible string "atmel,24c2048" appears un-documented However to my eyes these *are* already documented in at24.yaml, and are also used in existing device-tree.

checkpatch is also complaining about various parts of lx2160a.dtsi, as well as the use of "sfp" property in dpmac nodes - which are common across layerscape based dts.

Secondly the MAINTAINERS file has not been modified. Is it required I add myself or *someone* for these new dts?

Changes since v1:
- fixed DT binding changes to not break existing boards
- explained new board / som DT binding in commit message
- added missing DT binding for dpaa2 mac "phys" property
- reordered "compatible" and "reg" properties: first "compatible", then "reg"
- replaced chip-specific DT node names with generic ones

Josua Mayer (4):
arm64: dts: lx2160a: describe the SerDes block #2
dt-bindings: net: dpaa2 mac: add phys property
dt-bindings: arm: Add SolidRun LX2162A SoM & Clearfog Board
arm64: dts: freescale: Add support for LX2162 SoM & Clearfog Board

 .../devicetree/bindings/arm/fsl.yaml          |   9 +-
 .../bindings/net/fsl,qoriq-mc-dpmac.yaml      |   4 +
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../arm64/boot/dts/freescale/fsl-lx2160a.dtsi |   6 +
 .../dts/freescale/fsl-lx2162a-clearfog.dts    | 371 ++++++++++++++++++
 .../dts/freescale/fsl-lx2162a-sr-som.dtsi     |  75 ++++
 6 files changed, 465 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/freescale/fsl-lx2162a-clearfog.dts
 create mode 100644 arch/arm64/boot/dts/freescale/fsl-lx2162a-sr-som.dtsi
Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Pengutronix Kernel Team <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc NXP Linux Team <[email protected]>
Cc Rob Herring <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Conor Dooley <[email protected]>
Cc Li Yang <[email protected]>
Signature · 1 line
2.35.3
#1 lore raw

PATCH v2 1/4 arm64: dts: lx2160a: describe the SerDes block #2

Add description for the LX2160A second SerDes block. It is functionally identical to the first one already added in:

3cbe93a "arch: arm64: dts: lx2160a: describe the SerDes block #1"

---
 arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi +6 -0
index ea6a94b57aeb..2e68c05181dd 100644
@@ -626,6 +626,12 @@ serdes_1: phy@1ea0000 {
 			#phy-cells = <1>;
 		};
 
+		serdes_2: phy@1eb0000 {
+			compatible = "fsl,lynx-28g";
+			reg = <0x0 0x1eb0000 0x0 0x1e30>;
+			#phy-cells = <1>;
+		};
+
 		crypto: crypto@8000000 {
 			compatible = "fsl,sec-v5.0", "fsl,sec-v4.0";
 			fsl,sec-era = <10>;
Signature · 1 line
2.35.3
#2 lore raw

PATCH v2 2/4 dt-bindings: net: dpaa2 mac: add phys property

In reply to Josua Mayer

dpaa2 mac supports runtime configuration of network protocols on a generic phy object specified via the "phys" property. It is currently used with the SerDes28G driver to switch SerDes protocol between SGMII and USXGMII at runtime.

Support was introduced with:
f978fe8 "dpaa2-mac: configure the SerDes phy on a protocol change"

Add bindings description for the missing "phys" property, to fix dtc_chk errors present in various layerscape based dts:

'phys' does not match any of the regexes: 'pinctrl-[0-9]+'

---
V1 -> V2: this patch is newly added to patch-set

 Documentation/devicetree/bindings/net/fsl,qoriq-mc-dpmac.yaml | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/net/fsl,qoriq-mc-dpmac.yaml +4 -0
index a1b71b35319e..a40c7a84af2a 100644
@@ -24,6 +24,10 @@ properties:
     maxItems: 1
     description: The DPMAC number
 
+  phys:
+    maxItems: 1
+    description: Generic PHY for SerDes runtime configuration.
+
   phy-handle: true
 
   phy-connection-type: true
Signature · 1 line
2.35.3
Reviewed-by on v2 2/4
#3 lore raw

Re: [PATCH v2 2/4] dt-bindings: net: dpaa2 mac: add phys property

Quoted 8 lines · Josua Mayer

dpaa2 mac supports runtime configuration of network protocols on a generic phy object specified via the "phys" property. It is currently used with the SerDes28G driver to switch SerDes protocol between SGMII and USXGMII at runtime.

Support was introduced with:
f978fe8 "dpaa2-mac: configure the SerDes phy on a protocol change"

Quoted 6 lines

Add bindings description for the missing "phys" property, to fix dtc_chk errors present in various layerscape based dts:

'phys' does not match any of the regexes: 'pinctrl-[0-9]+'

This was sent:

https://lore.kernel.org/all/[email protected]/

And obviously will get lost because Sean for some reason decided to not Cc maintainers and lists... so sure, we can go with this one:

Best regards,
Krzysztof

#4 lore raw

PATCH v2 3/4 dt-bindings: arm: Add SolidRun LX2162A SoM & Clearfog Board

In reply to Josua Mayer

SolidRun now have 2 product lines around NXP Layerscape SoC:
- LX2160A COM Express 7
- LX2162A System on Module

LX2162 is a smaller package and reduced feature set to LX2160A; LX2162 SoM is also a smaller form factor and reduced feature set to CEX.

Since both product lines are physically incompatible,
the existing group "SolidRun LX2160A based Boards" has been renamed to include "CEX" in its name, meaning products based on LX2160A COM Express Module, following this pattern:
"solidrun,<board>", "solidrun,lx2160a-cex", "fsl,lx2160a"

Add DT compatible for both SolidRun LX2162A SoM, and LX2162 Clearfog boards to a new group based on LX2162A SoM, following this pattern:
"solidrun,<board>", "solidrun,lx2162a-som", "fsl,lx2160a"

---
V1 -> V2: fixed to not break existing boards
V1 -> V2: explained new board / som DT binding in commit message

 Documentation/devicetree/bindings/arm/fsl.yaml | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/fsl.yaml +8 -1
index 15d411084065..51911a89ebb4 100644
@@ -1370,7 +1370,7 @@ properties:
               - fsl,lx2162a-qds
           - const: fsl,lx2160a
 
-      - description: SolidRun LX2160A based Boards
+      - description: SolidRun LX2160A CEX-7 based Boards
         items:
           - enum:
               - solidrun,clearfog-cx
@@ -1378,6 +1378,13 @@ properties:
           - const: solidrun,lx2160a-cex7
           - const: fsl,lx2160a
 
+      - description: SolidRun LX2162A SoM based Boards
+        items:
+          - enum:
+              - solidrun,lx2162a-clearfog
+          - const: solidrun,lx2162a-som
+          - const: fsl,lx2160a
+
       - description: S32G2 based Boards
         items:
           - enum:
Signature · 1 line
2.35.3
Reviewed-by on v2 3/4
#5 lore raw

Re: [PATCH v2 3/4] dt-bindings: arm: Add SolidRun LX2162A SoM & Clearfog Board

Quoted 13 lines · Josua Mayer

SolidRun now have 2 product lines around NXP Layerscape SoC:
- LX2160A COM Express 7
- LX2162A System on Module

LX2162 is a smaller package and reduced feature set to LX2160A; LX2162 SoM is also a smaller form factor and reduced feature set to CEX.

Since both product lines are physically incompatible,
the existing group "SolidRun LX2160A based Boards" has been renamed to include "CEX" in its name, meaning products based on LX2160A COM Express Module, following this pattern:
"solidrun,<board>", "solidrun,lx2160a-cex", "fsl,lx2160a"

Quoted 9 lines

Add DT compatible for both SolidRun LX2162A SoM, and LX2162 Clearfog boards to a new group based on LX2162A SoM, following this pattern:
"solidrun,<board>", "solidrun,lx2162a-som", "fsl,lx2160a"

---
V1 -> V2: fixed to not break existing boards
V1 -> V2: explained new board / som DT binding in commit message

Best regards,
Krzysztof

#6 lore raw

PATCH v2 4/4 arm64: dts: freescale: Add support for LX2162 SoM & Clearfog Board

In reply to Josua Mayer

Add support for the SolidRun LX2162A System on Module (SoM), and the Clearfog evaluation board.

The SoM has few software-controllable features:
- AR8035 Ethernet PHY
- eMMC
- SPI Flash
- fan controller
- various eeproms

The Clearfog evaluation board provides:
- microSD connector
- USB-A
- 2x 10Gbps SFP+
- 2x 25Gbps SFP+ with a retimer
- 8x 2.5Gbps RJ45
- 2x mPCI (assembly option / disables 2xRJ45)

The 8x RJ45 ports are connected with an 8-port PHY: Marvell 88E2580 supporting up to 5Gbps, while SoC and magnetics are limited to 2.5Gbps.

However 2500 speed is untested due to documentation and drivier limitations. To avoid confusion the phy nodes have been explicitly limited to 1000 for now.

The PCI nodes are disabled, but explicitly added to mark that this board can have pci.
It is expected that the bootloader will patch the status property "okay" and disable 2x RJ45 ports, according to active serdes configuration.

---
V1 -> V2: reordered "compatible" and "reg" properties V1 -> V2: replaced chip-specific DT node names with generic ones

 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/fsl-lx2162a-clearfog.dts    | 371 ++++++++++++++++++
 .../dts/freescale/fsl-lx2162a-sr-som.dtsi     |  75 ++++
 3 files changed, 447 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/fsl-lx2162a-clearfog.dts
 create mode 100644 arch/arm64/boot/dts/freescale/fsl-lx2162a-sr-som.dtsi
arch/arm64/boot/dts/freescale/Makefile +1 -0
index ef7d17aef58f..b4fb5044d1c7 100644
@@ -34,6 +34,7 @@ dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-honeycomb.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-qds.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-rdb.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2162a-qds.dtb
+dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2162a-clearfog.dtb
 
 fsl-ls1028a-qds-13bb-dtbs := fsl-ls1028a-qds.dtb fsl-ls1028a-qds-13bb.dtbo
 fsl-ls1028a-qds-65bb-dtbs := fsl-ls1028a-qds.dtb fsl-ls1028a-qds-65bb.dtbo
arch/arm64/boot/dts/freescale/fsl-lx2162a-clearfog.dts new file +371 -0

371 lines not on this page · raw message

arch/arm64/boot/dts/freescale/fsl-lx2162a-sr-som.dtsi new file +75 -0

75 lines not on this page · raw message

Signature · 1 line
2.35.3
#7 lore raw
Quoted 52 lines · Josua Mayer

Add support for the SolidRun LX2162A System on Module (SoM), and the Clearfog evaluation board.

The SoM has few software-controllable features:
- AR8035 Ethernet PHY
- eMMC
- SPI Flash
- fan controller
- various eeproms

The Clearfog evaluation board provides:
- microSD connector
- USB-A
- 2x 10Gbps SFP+
- 2x 25Gbps SFP+ with a retimer
- 8x 2.5Gbps RJ45
- 2x mPCI (assembly option / disables 2xRJ45)

The 8x RJ45 ports are connected with an 8-port PHY: Marvell 88E2580 supporting up to 5Gbps, while SoC and magnetics are limited to 2.5Gbps.

However 2500 speed is untested due to documentation and drivier limitations. To avoid confusion the phy nodes have been explicitly limited to 1000 for now.

The PCI nodes are disabled, but explicitly added to mark that this board can have pci.
It is expected that the bootloader will patch the status property "okay" and disable 2x RJ45 ports, according to active serdes configuration.

---
V1 -> V2: reordered "compatible" and "reg" properties V1 -> V2: replaced chip-specific DT node names with generic ones

 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/fsl-lx2162a-clearfog.dts    | 371 ++++++++++++++++++
 .../dts/freescale/fsl-lx2162a-sr-som.dtsi     |  75 ++++
 3 files changed, 447 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/fsl-lx2162a-clearfog.dts
 create mode 100644 arch/arm64/boot/dts/freescale/fsl-lx2162a-sr-som.dtsi
arch/arm64/boot/dts/freescale/Makefile +1 -0
index ef7d17aef58f..b4fb5044d1c7 100644
@@ -34,6 +34,7 @@ dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-honeycomb.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-qds.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-rdb.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2162a-qds.dtb
+dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2162a-clearfog.dtb
 

...

arch/arm64/boot/dts/freescale/Makefile

Quoted 9 lines
arch/arm64/boot/dts/freescale/Makefile +9 -0
+
+&fspi {
+	status = "okay";
+
+	flash@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "jedec,spi-nor";
+		reg = <0>;

Still wrong order of properties. compatible is always first, then reg.

Best regards,
Krzysztof