Skip to content

Commit

Permalink
Merge branch 'DPAA-PTP-clock-and-timestamping'
Browse files Browse the repository at this point in the history
Yangbo Lu says:

====================
Support DPAA PTP clock and timestamping

This patchset is to support DPAA FMAN PTP clock and HW timestamping.
It had been verified on both ARM platform and PPC platform.
- The patch #1 to patch #5 are to support DPAA FMAN 1588 timer in
  ptp_qoriq driver.
- The patch #6 to patch #10 are to add HW timestamping support in
  DPAA ethernet driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jun 26, 2018
2 parents 651b451 + 17ae0b0 commit 1d7229d
Show file tree
Hide file tree
Showing 26 changed files with 361 additions and 115 deletions.
25 changes: 1 addition & 24 deletions Documentation/devicetree/bindings/net/fsl-fman.txt
Original file line number Diff line number Diff line change
Expand Up @@ -356,30 +356,7 @@ ethernet@e0000 {
============================================================================
FMan IEEE 1588 Node

DESCRIPTION

The FMan interface to support IEEE 1588


PROPERTIES

- compatible
Usage: required
Value type: <stringlist>
Definition: A standard property.
Must include "fsl,fman-ptp-timer".

- reg
Usage: required
Value type: <prop-encoded-array>
Definition: A standard property.

EXAMPLE

ptp-timer@fe000 {
compatible = "fsl,fman-ptp-timer";
reg = <0xfe000 0x1000>;
};
Refer to Documentation/devicetree/bindings/ptp/ptp-qoriq.txt

=============================================================================
FMan MDIO Node
Expand Down
15 changes: 12 additions & 3 deletions Documentation/devicetree/bindings/ptp/ptp-qoriq.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

General Properties:

- compatible Should be "fsl,etsec-ptp"
- compatible Should be "fsl,etsec-ptp" for eTSEC
Should be "fsl,fman-ptp-timer" for DPAA FMan
- reg Offset and length of the register set for the device
- interrupts There should be at least two interrupts. Some devices
have as many as four PTP related interrupts.
Expand Down Expand Up @@ -43,14 +44,22 @@ Clock Properties:
value, which will be directly written in those bits, that is why,
according to reference manual, the next clock sources can be used:

For eTSEC,
<0> - external high precision timer reference clock (TSEC_TMR_CLK
input is used for this purpose);
<1> - eTSEC system clock;
<2> - eTSEC1 transmit clock;
<3> - RTC clock input.

When this attribute is not used, eTSEC system clock will serve as
IEEE 1588 timer reference clock.
For DPAA FMan,
<0> - external high precision timer reference clock (TMR_1588_CLK)
<1> - MAC system clock (1/2 FMan clock)
<2> - reserved
<3> - RTC clock oscillator

When this attribute is not used, the IEEE 1588 timer reference clock
will use the eTSEC system clock (for Gianfar) or the MAC system
clock (for DPAA).

Example:

Expand Down
14 changes: 8 additions & 6 deletions arch/arm64/boot/dts/freescale/qoriq-fman3-0.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ fman0: fman@1a00000 {
#size-cells = <1>;
cell-index = <0>;
compatible = "fsl,fman";
ranges = <0x0 0x0 0x1a00000 0x100000>;
reg = <0x0 0x1a00000 0x0 0x100000>;
ranges = <0x0 0x0 0x1a00000 0xfe000>;
reg = <0x0 0x1a00000 0x0 0xfe000>;
interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clockgen 3 0>;
clock-names = "fmanclk";
fsl,qman-channel-range = <0x800 0x10>;
ptimer-handle = <&ptp_timer0>;

muram@0 {
compatible = "fsl,fman-muram";
Expand Down Expand Up @@ -73,9 +74,10 @@ fman0: fman@1a00000 {
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xfd000 0x1000>;
};
};

ptp_timer0: ptp-timer@fe000 {
compatible = "fsl,fman-ptp-timer";
reg = <0xfe000 0x1000>;
};
ptp_timer0: ptp-timer@1afe000 {
compatible = "fsl,fman-ptp-timer";
reg = <0x0 0x1afe000 0x0 0x1000>;
interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
};
14 changes: 8 additions & 6 deletions arch/powerpc/boot/dts/fsl/qoriq-fman-0.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ fman0: fman@400000 {
#size-cells = <1>;
cell-index = <0>;
compatible = "fsl,fman";
ranges = <0 0x400000 0x100000>;
reg = <0x400000 0x100000>;
ranges = <0 0x400000 0xfe000>;
reg = <0x400000 0xfe000>;
interrupts = <96 2 0 0>, <16 2 1 1>;
clocks = <&clockgen 3 0>;
clock-names = "fmanclk";
fsl,qman-channel-range = <0x40 0xc>;
ptimer-handle = <&ptp_timer0>;

muram@0 {
compatible = "fsl,fman-muram";
Expand Down Expand Up @@ -93,9 +94,10 @@ fman0: fman@400000 {
reg = <0x87000 0x1000>;
status = "disabled";
};
};

ptp_timer0: ptp-timer@fe000 {
compatible = "fsl,fman-ptp-timer";
reg = <0xfe000 0x1000>;
};
ptp_timer0: ptp-timer@4fe000 {
compatible = "fsl,fman-ptp-timer";
reg = <0x4fe000 0x1000>;
interrupts = <96 2 0 0>;
};
14 changes: 8 additions & 6 deletions arch/powerpc/boot/dts/fsl/qoriq-fman-1.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ fman1: fman@500000 {
#size-cells = <1>;
cell-index = <1>;
compatible = "fsl,fman";
ranges = <0 0x500000 0x100000>;
reg = <0x500000 0x100000>;
ranges = <0 0x500000 0xfe000>;
reg = <0x500000 0xfe000>;
interrupts = <97 2 0 0>, <16 2 1 0>;
clocks = <&clockgen 3 1>;
clock-names = "fmanclk";
fsl,qman-channel-range = <0x60 0xc>;
ptimer-handle = <&ptp_timer1>;

muram@0 {
compatible = "fsl,fman-muram";
Expand Down Expand Up @@ -93,9 +94,10 @@ fman1: fman@500000 {
reg = <0x87000 0x1000>;
status = "disabled";
};
};

ptp_timer1: ptp-timer@fe000 {
compatible = "fsl,fman-ptp-timer";
reg = <0xfe000 0x1000>;
};
ptp_timer1: ptp-timer@5fe000 {
compatible = "fsl,fman-ptp-timer";
reg = <0x5fe000 0x1000>;
interrupts = <97 2 0 0>;
};
14 changes: 8 additions & 6 deletions arch/powerpc/boot/dts/fsl/qoriq-fman3-0.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ fman0: fman@400000 {
#size-cells = <1>;
cell-index = <0>;
compatible = "fsl,fman";
ranges = <0 0x400000 0x100000>;
reg = <0x400000 0x100000>;
ranges = <0 0x400000 0xfe000>;
reg = <0x400000 0xfe000>;
interrupts = <96 2 0 0>, <16 2 1 1>;
clocks = <&clockgen 3 0>;
clock-names = "fmanclk";
fsl,qman-channel-range = <0x800 0x10>;
ptimer-handle = <&ptp_timer0>;

muram@0 {
compatible = "fsl,fman-muram";
Expand Down Expand Up @@ -98,9 +99,10 @@ fman0: fman@400000 {
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xfd000 0x1000>;
};
};

ptp_timer0: ptp-timer@fe000 {
compatible = "fsl,fman-ptp-timer";
reg = <0xfe000 0x1000>;
};
ptp_timer0: ptp-timer@4fe000 {
compatible = "fsl,fman-ptp-timer";
reg = <0x4fe000 0x1000>;
interrupts = <96 2 0 0>;
};
14 changes: 8 additions & 6 deletions arch/powerpc/boot/dts/fsl/qoriq-fman3-1.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ fman1: fman@500000 {
#size-cells = <1>;
cell-index = <1>;
compatible = "fsl,fman";
ranges = <0 0x500000 0x100000>;
reg = <0x500000 0x100000>;
ranges = <0 0x500000 0xfe000>;
reg = <0x500000 0xfe000>;
interrupts = <97 2 0 0>, <16 2 1 0>;
clocks = <&clockgen 3 1>;
clock-names = "fmanclk";
fsl,qman-channel-range = <0x820 0x10>;
ptimer-handle = <&ptp_timer1>;

muram@0 {
compatible = "fsl,fman-muram";
Expand Down Expand Up @@ -98,9 +99,10 @@ fman1: fman@500000 {
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xfd000 0x1000>;
};
};

ptp_timer1: ptp-timer@fe000 {
compatible = "fsl,fman-ptp-timer";
reg = <0xfe000 0x1000>;
};
ptp_timer1: ptp-timer@5fe000 {
compatible = "fsl,fman-ptp-timer";
reg = <0x5fe000 0x1000>;
interrupts = <97 2 0 0>;
};
14 changes: 8 additions & 6 deletions arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ fman0: fman@400000 {
#size-cells = <1>;
cell-index = <0>;
compatible = "fsl,fman";
ranges = <0 0x400000 0x100000>;
reg = <0x400000 0x100000>;
ranges = <0 0x400000 0xfe000>;
reg = <0x400000 0xfe000>;
interrupts = <96 2 0 0>, <16 2 1 1>;
clocks = <&clockgen 3 0>;
clock-names = "fmanclk";
fsl,qman-channel-range = <0x800 0x10>;
ptimer-handle = <&ptp_timer0>;

muram@0 {
compatible = "fsl,fman-muram";
Expand Down Expand Up @@ -86,9 +87,10 @@ fman0: fman@400000 {
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xfd000 0x1000>;
};
};

ptp_timer0: ptp-timer@fe000 {
compatible = "fsl,fman-ptp-timer";
reg = <0xfe000 0x1000>;
};
ptp_timer0: ptp-timer@4fe000 {
compatible = "fsl,fman-ptp-timer";
reg = <0x4fe000 0x1000>;
interrupts = <96 2 0 0>;
};
Loading

0 comments on commit 1d7229d

Please sign in to comment.