Skip to contentSkip to conversation

dt-bindings: net: Convert fsl,fman related file to yaml format

PATCH Applied Frank Li 3 participants 6 messages Jun 18, 2024 – Jun 21, 2024

Subsystems (7)
lore
Share & tools
lore

Frank Li

author maintainer
#0 lore raw

v2 cover dt-bindings: net: Convert fsl,fman related file to yaml format

Passed dt_binding_check
Run dt_binding_check: fsl,fman-mdio.yaml

  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  CHKDT   Documentation/devicetree/bindings
  LINT    Documentation/devicetree/bindings
  DTEX    Documentation/devicetree/bindings/net/fsl,fman-mdio.example.dts
  DTC_CHK Documentation/devicetree/bindings/net/fsl,fman-mdio.example.dtb
Run dt_binding_check: fsl,fman-muram.yaml
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  CHKDT   Documentation/devicetree/bindings
  LINT    Documentation/devicetree/bindings
  DTEX    Documentation/devicetree/bindings/net/fsl,fman-muram.example.dts
  DTC_CHK Documentation/devicetree/bindings/net/fsl,fman-muram.example.dtb
Run dt_binding_check: fsl,fman-port.yaml
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  CHKDT   Documentation/devicetree/bindings
  LINT    Documentation/devicetree/bindings
  DTEX    Documentation/devicetree/bindings/net/fsl,fman-port.example.dts
  DTC_CHK Documentation/devicetree/bindings/net/fsl,fman-port.example.dtb
Run dt_binding_check: fsl,fman.yaml
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  CHKDT   Documentation/devicetree/bindings
  LINT    Documentation/devicetree/bindings
  DTEX    Documentation/devicetree/bindings/net/fsl,fman.example.dts
  DTC_CHK Documentation/devicetree/bindings/net/fsl,fman.example.dtb
Run dt_binding_check: ptp-qoriq.yaml
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  CHKDT   Documentation/devicetree/bindings
  LINT    Documentation/devicetree/bindings
  DTEX    Documentation/devicetree/bindings/ptp/ptp-qoriq.example.dts

DTC_CHK Documentation/devicetree/bindings/ptp/ptp-qoriq.example.dtb

To: Yangbo Lu <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: Richard Cochran <[email protected]>
To: David S. Miller <[email protected]>
To: Eric Dumazet <[email protected]>
To: Jakub Kicinski <[email protected]>
To: Paolo Abeni <[email protected]>
To: Madalin Bucur <[email protected]>
To: Sean Anderson <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
Changes in v2:
- see each patch
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Frank Li (2):
dt-bindings: ptp: Convert ptp-qoirq to yaml format
dt-bindings: net: Convert fsl-fman to yaml

 .../devicetree/bindings/net/fsl,fman-mdio.yaml     | 123 +++++
 .../devicetree/bindings/net/fsl,fman-muram.yaml    |  40 ++
 .../devicetree/bindings/net/fsl,fman-port.yaml     |  75 +++
 .../devicetree/bindings/net/fsl,fman.yaml          | 204 ++++++++
 Documentation/devicetree/bindings/net/fsl-fman.txt | 548 ---------------------
 .../devicetree/bindings/net/fsl-tsec-phy.txt       |   2 +-
 Documentation/devicetree/bindings/ptp/fsl,ptp.yaml | 144 ++++++
 .../devicetree/bindings/ptp/ptp-qoriq.txt          |  87 ----
 MAINTAINERS                                        |   4 +-
 9 files changed, 589 insertions(+), 638 deletions(-)

---
base-commit: d68948a900ea2e75266bbfee45fc2265c65687fa
change-id: 20240614-ls_fman-e0a705cdcf29

Best regards,
---
Frank Li <[email protected]>

author maintainer
#1 lore raw

PATCH v2 1/2 dt-bindings: ptp: Convert ptp-qoirq to yaml format

Convert ptp-qoirq from txt to yaml format.

Additional change:
- Fixed example interrupts proptery. Need only 1 irq by check MPC8313 spec.
- Move Reference clock context under clk,sel.
- Interrupts is not required property.
- Use low case for hex value.
- Check reference manual of MPC8313, p1010 and so on, which dts use more than 1 irqs. Only 1 irq for each ptp device. Check driver code (drivers/ptp/ptp_qoriq.c) and only 1 irq used. So original description is wrong.
- Remove comments for compatible string.

---
Change from v1 to v2:
- fix make refcheckdocs warning
- Use low case for hex value
- Remove comments for compatible string.
- Only 1 irq

---
 Documentation/devicetree/bindings/net/fsl-fman.txt |   2 +-
 .../devicetree/bindings/net/fsl-tsec-phy.txt       |   2 +-
 Documentation/devicetree/bindings/ptp/fsl,ptp.yaml | 144 +++++++++++++++++++++
 .../devicetree/bindings/ptp/ptp-qoriq.txt          |  87 -------------
 MAINTAINERS                                        |   2 +-
 5 files changed, 147 insertions(+), 90 deletions(-)
Documentation/devicetree/bindings/net/fsl-fman.txt +1 -1
index bda4b41af0748..5e02b4b286f67 100644
@@ -237,7 +237,7 @@ Refer to Documentation/devicetree/bindings/net/fsl,fman-dtsec.yaml
 ============================================================================
 FMan IEEE 1588 Node
 
-Refer to Documentation/devicetree/bindings/ptp/ptp-qoriq.txt
+Refer to Documentation/devicetree/bindings/ptp/fsl,ptp.yaml
 
 =============================================================================
 FMan MDIO Node
Documentation/devicetree/bindings/net/fsl-tsec-phy.txt +1 -1
index 047bdf7bdd2fa..9c9668c1b6a24 100644
@@ -86,4 +86,4 @@ Example:
 
 * Gianfar PTP clock nodes
 
-Refer to Documentation/devicetree/bindings/ptp/ptp-qoriq.txt
+Refer to Documentation/devicetree/bindings/ptp/fsl,ptp.yaml
Documentation/devicetree/bindings/ptp/fsl,ptp.yaml new file +144 -0

144 lines not on this page · raw message

Documentation/devicetree/bindings/ptp/ptp-qoriq.txt deleted +0 -87

87 lines not on this page · raw message

MAINTAINERS +1 -1
index 4f09bdb5657ef..322e89b13c843 100644
@@ -8869,7 +8869,7 @@ FREESCALE QORIQ PTP CLOCK DRIVER
 M:	Yangbo Lu <[email protected]>
 L:	[email protected]
 S:	Maintained
-F:	Documentation/devicetree/bindings/ptp/ptp-qoriq.txt
+F:	Documentation/devicetree/bindings/ptp/fsl,ptp.yaml
 F:	drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp*
 F:	drivers/net/ethernet/freescale/dpaa2/dprtc*
 F:	drivers/net/ethernet/freescale/enetc/enetc_ptp.c
Signature · 1 line
2.34.1
Reviewed-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] dt-bindings: ptp: Convert ptp-qoirq to yaml format

Quoted 13 lines · Frank Li

Convert ptp-qoirq from txt to yaml format.

Additional change:
- Fixed example interrupts proptery. Need only 1 irq by check MPC8313 spec.
- Move Reference clock context under clk,sel.
- Interrupts is not required property.
- Use low case for hex value.
- Check reference manual of MPC8313, p1010 and so on, which dts use more than 1 irqs. Only 1 irq for each ptp device. Check driver code (drivers/ptp/ptp_qoriq.c) and only 1 irq used. So original description is wrong.
- Remove comments for compatible string.

Quoted 8 lines

---
Change from v1 to v2:
- fix make refcheckdocs warning
- Use low case for hex value
- Remove comments for compatible string.
- Only 1 irq

Best regards,
Krzysztof

author maintainer
#3 lore raw

PATCH v2 2/2 dt-bindings: net: Convert fsl-fman to yaml

In reply to Frank Li

Convert fsl-fman from txt to yaml format and split it fsl,fman.yam, fsl,fman-port.yaml, fsl-muram.yaml, fsl-mdio.yaml.

Addition changes:
fsl,fman.yaml:
- Fixed interrupts in example.
- Fixed ethernet@e8000 miss } in example.
- ptp-timer add label in example.
- Ref to new fsl,fman*.yaml.
- Reorder property in example.
- Keep only one example.
- Add const for #address-cells and #size-cells.
- Use defined interrupt type.
- ptp example use node name phc.

fsl,fman-port:
- Keep only one example.

fsl,fman-mdio:
- Add little-endian property.
- Add ref to mdio.yaml.
- Remove suppress-preamble.
- Add #address-cells and #size-cells in example.
- Remove clock-frequency, which already describe in mmio.yaml.

fsl,muram.yaml:
- Add reg property.
- Remove range property.
- Use reg instead of range in example.

---
Change from v1 to v2
- Fix make refcheckdocs warning.
- remove ranges in fsl,muram.yaml and all examples.
- Only keep one example
- Add const for #address-cells and #size-cells.
- Compatible is always the first property. reg follows, third ranges.
- Using define interrupt type

---
 .../devicetree/bindings/net/fsl,fman-mdio.yaml     | 123 +++++
 .../devicetree/bindings/net/fsl,fman-muram.yaml    |  40 ++
 .../devicetree/bindings/net/fsl,fman-port.yaml     |  75 +++
 .../devicetree/bindings/net/fsl,fman.yaml          | 204 ++++++++
 Documentation/devicetree/bindings/net/fsl-fman.txt | 548 ---------------------
 MAINTAINERS                                        |   2 +-
 6 files changed, 443 insertions(+), 549 deletions(-)
Documentation/devicetree/bindings/net/fsl,fman-mdio.yaml new file +123 -0
new file mode 100644
index 0000000000000..6b2c0aa407a23
@@ -0,0 +1,123 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/fsl,fman-mdio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale Frame Manager MDIO Device
+
+maintainers:
+  - Frank Li <[email protected]>
+
+description: FMan MDIO Node.
+  The MDIO is a bus to which the PHY devices are connected.
+
+properties:
+  compatible:
+    enum:
+      - fsl,fman-mdio
+      - fsl,fman-xmdio
+      - fsl,fman-memac-mdio
+    description:
+      Must include "fsl,fman-mdio" for 1 Gb/s MDIO from FMan v2.
+      Must include "fsl,fman-xmdio" for 10 Gb/s MDIO from FMan v2.
+      Must include "fsl,fman-memac-mdio" for 1/10 Gb/s MDIO from
+      FMan v3.
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: A reference to the input clock of the controller
+          from which the MDC frequency is derived.
+
+  interrupts:
+    maxItems: 1
+
+  fsl,fman-internal-mdio:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      Fman has internal MDIO for internal PCS(Physical
+      Coding Sublayer) PHYs and external MDIO for external PHYs.
+      The settings and programming routines for internal/external
+      MDIO are different. Must be included for internal MDIO.
+
+  fsl,erratum-a009885:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description: Indicates the presence of the A009885
+      erratum describing that the contents of MDIO_DATA may
+      become corrupt unless it is read within 16 MDC cycles
+      of MDIO_CFG[BSY] being cleared, when performing an
+      MDIO read operation.
+
+  fsl,erratum-a011043:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      Indicates the presence of the A011043 erratum
+      describing that the MDIO_CFG[MDIO_RD_ER] bit may be falsely
+      set when reading internal PCS registers. MDIO reads to
+      internal PCS registers may result in having the
+      MDIO_CFG[MDIO_RD_ER] bit set, even when there is no error and
+      read data (MDIO_DATA[MDIO_DATA]) is correct.
+      Software may get false read error when reading internal
+      PCS registers through MDIO. As a workaround, all internal
+      MDIO accesses should ignore the MDIO_CFG[MDIO_RD_ER] bit.
+
+      For internal PHY device on internal mdio bus, a PHY node should be created.
+      See the definition of the PHY node in booting-without-of.txt for an
+      example of how to define a PHY (Internal PHY has no interrupt line).
+      - For "fsl,fman-mdio" compatible internal mdio bus, the PHY is TBI PHY.
+      - For "fsl,fman-memac-mdio" compatible internal mdio bus, the PHY is PCS PHY.
+        The PCS PHY address should correspond to the value of the appropriate
+        MDEV_PORT.
+
+  little-endian:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      IP block is little-endian mode. The default endian mode is big-endian.
+
+required:
+  - compatible
+  - reg
+
+allOf:
+  - $ref: mdio.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    mdio@f1000 {
+        compatible = "fsl,fman-xmdio";
+        reg = <0xf1000 0x1000>;
+        interrupts = <101 2 0 0>;
+    };
+
+  - |
+    mdio@e3120 {
+        compatible = "fsl,fman-mdio";
+        reg = <0xe3120 0xee0>;
+        fsl,fman-internal-mdio;
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        tbi-phy@8 {
+            reg = <0x8>;
+            device_type = "tbi-phy";
+        };
+    };
+
+  - |
+    mdio@f1000 {
+        compatible = "fsl,fman-memac-mdio";
+        reg = <0xf1000 0x1000>;
+        fsl,fman-internal-mdio;
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        pcsphy6: ethernet-phy@0 {
+            reg = <0x0>;
+        };
+    };
+
Documentation/devicetree/bindings/net/fsl,fman-muram.yaml new file +40 -0
new file mode 100644
index 0000000000000..aa71acc7fa5b5
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/fsl,fman-muram.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale Frame Manager MURAM Device
+
+maintainers:
+  - Frank Li <[email protected]>
+
+description: |
+  FMan Internal memory - shared between all the FMan modules.
+  It contains data structures that are common and written to or read by
+  the modules.
+
+  FMan internal memory is split into the following parts:
+    Packet buffering (Tx/Rx FIFOs)
+    Frames internal context
+
+properties:
+  compatible:
+    enum:
+      - fsl,fman-muram
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    muram@0 {
+        compatible = "fsl,fman-muram";
+        reg = <0x0 0x28000>;
+    };
Documentation/devicetree/bindings/net/fsl,fman-port.yaml new file +75 -0

75 lines not on this page · raw message

Documentation/devicetree/bindings/net/fsl,fman.yaml new file +204 -0

204 lines not on this page · raw message

Documentation/devicetree/bindings/net/fsl-fman.txt deleted +0 -548

548 lines not on this page · raw message

MAINTAINERS +1 -1
index 322e89b13c843..7204a81b86930 100644
@@ -8862,7 +8862,7 @@ M:	Madalin Bucur <[email protected]>
 R:	Sean Anderson <[email protected]>
 L:	[email protected]
 S:	Maintained
-F:	Documentation/devicetree/bindings/net/fsl-fman.txt
+F:	Documentation/devicetree/bindings/net/fsl-fman.yaml
 F:	drivers/net/ethernet/freescale/fman
 
 FREESCALE QORIQ PTP CLOCK DRIVER
Signature · 1 line
2.34.1
Reviewed-by on v2 2/2
#4 lore raw

Re: [PATCH v2 2/2] dt-bindings: net: Convert fsl-fman to yaml

Quoted 15 lines · Frank Li

Convert fsl-fman from txt to yaml format and split it fsl,fman.yam, fsl,fman-port.yaml, fsl-muram.yaml, fsl-mdio.yaml.

Addition changes:
fsl,fman.yaml:
- Fixed interrupts in example.
- Fixed ethernet@e8000 miss } in example.
- ptp-timer add label in example.
- Ref to new fsl,fman*.yaml.
- Reorder property in example.
- Keep only one example.
- Add const for #address-cells and #size-cells.
- Use defined interrupt type.
- ptp example use node name phc.

Best regards,
Krzysztof

#5 lore raw
In reply to Frank Li
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 30 lines · On Tue, 18 Jun 2024 17:53:44 -0400 you wrote:

Passed dt_binding_check
Run dt_binding_check: fsl,fman-mdio.yaml

  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  CHKDT   Documentation/devicetree/bindings
  LINT    Documentation/devicetree/bindings
  DTEX    Documentation/devicetree/bindings/net/fsl,fman-mdio.example.dts
  DTC_CHK Documentation/devicetree/bindings/net/fsl,fman-mdio.example.dtb
Run dt_binding_check: fsl,fman-muram.yaml
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  CHKDT   Documentation/devicetree/bindings
  LINT    Documentation/devicetree/bindings
  DTEX    Documentation/devicetree/bindings/net/fsl,fman-muram.example.dts
  DTC_CHK Documentation/devicetree/bindings/net/fsl,fman-muram.example.dtb
Run dt_binding_check: fsl,fman-port.yaml
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  CHKDT   Documentation/devicetree/bindings
  LINT    Documentation/devicetree/bindings
  DTEX    Documentation/devicetree/bindings/net/fsl,fman-port.example.dts
  DTC_CHK Documentation/devicetree/bindings/net/fsl,fman-port.example.dtb
Run dt_binding_check: fsl,fman.yaml
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  CHKDT   Documentation/devicetree/bindings
  LINT    Documentation/devicetree/bindings
  DTEX    Documentation/devicetree/bindings/net/fsl,fman.example.dts
  DTC_CHK Documentation/devicetree/bindings/net/fsl,fman.example.dtb
Run dt_binding_check: ptp-qoriq.yaml
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  CHKDT   Documentation/devicetree/bindings
  LINT    Documentation/devicetree/bindings
  DTEX    Documentation/devicetree/bindings/ptp/ptp-qoriq.example.dts
Quoted 3 lines

DTC_CHK Documentation/devicetree/bindings/ptp/ptp-qoriq.example.dtb

[...]

Here is the summary with links:
- [v2,1/2] dt-bindings: ptp: Convert ptp-qoirq to yaml format

    https://git.kernel.org/netdev/net-next/c/01479f1b912a
  - [v2,2/2] dt-bindings: net: Convert fsl-fman to yaml
    https://git.kernel.org/netdev/net-next/c/243996d172a6

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html