2019-07-05 15:13:37

by Grygorii Strashko

[permalink] [raw]
Subject: [RESEND PATCH next v2 0/6] ARM: keystone: update dt and enable cpts support

Hi Santosh,

This series is set of platform changes required to enable NETCP CPTS reference
clock selection and final patch to enable CPTS for Keystone 66AK2E/L/HK SoCs.

Those patches were posted already [1] together with driver's changes, so this
is re-send of DT/platform specific changes only, as driver's changes have
been merged already.

Patches 1-5: CPTS DT nodes update for TI Keystone 2 66AK2HK/E/L SoCs.
Patch 6: enables CPTS for TI Keystone 2 66AK2HK/E/L SoCs.

[1] https://patchwork.kernel.org/cover/10980037/

Grygorii Strashko (6):
ARM: dts: keystone-clocks: add input fixed clocks
ARM: dts: k2e-clocks: add input ext. fixed clocks tsipclka/b
ARM: dts: k2e-netcp: add cpts refclk_mux node
ARM: dts: k2hk-netcp: add cpts refclk_mux node
ARM: dts: k2l-netcp: add cpts refclk_mux node
ARM: configs: keystone: enable cpts

arch/arm/boot/dts/keystone-clocks.dtsi | 27 ++++++++++++++++++++++
arch/arm/boot/dts/keystone-k2e-clocks.dtsi | 20 ++++++++++++++++
arch/arm/boot/dts/keystone-k2e-netcp.dtsi | 21 +++++++++++++++--
arch/arm/boot/dts/keystone-k2hk-netcp.dtsi | 20 ++++++++++++++--
arch/arm/boot/dts/keystone-k2l-netcp.dtsi | 20 ++++++++++++++--
arch/arm/configs/keystone_defconfig | 1 +
6 files changed, 103 insertions(+), 6 deletions(-)

--
2.17.1


2019-07-05 15:13:52

by Grygorii Strashko

[permalink] [raw]
Subject: [RESEND PATCH next v2 1/6] ARM: dts: keystone-clocks: add input fixed clocks

Add set of fixed, external input clocks definitions for TIMI0, TIMI1,
TSREFCLK clocks. Such clocks can be used as reference clocks for some HW
modules (as cpts, for example) by configuring corresponding clock muxes.
For these clocks real frequencies have to be defined in board files.

Signed-off-by: Grygorii Strashko <[email protected]>
---
arch/arm/boot/dts/keystone-clocks.dtsi | 27 ++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

diff --git a/arch/arm/boot/dts/keystone-clocks.dtsi b/arch/arm/boot/dts/keystone-clocks.dtsi
index 457515b0736a..0397c3423d2d 100644
--- a/arch/arm/boot/dts/keystone-clocks.dtsi
+++ b/arch/arm/boot/dts/keystone-clocks.dtsi
@@ -408,4 +408,31 @@ clocks {
reg-names = "control", "domain";
domain-id = <0>;
};
+
+ /*
+ * Below are set of fixed, input clocks definitions,
+ * for which real frequencies have to be defined in board files.
+ * Those clocks can be used as reference clocks for some HW modules
+ * (as cpts, for example) by configuring corresponding clock muxes.
+ */
+ timi0: timi0 {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <0>;
+ clock-output-names = "timi0";
+ };
+
+ timi1: timi1 {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <0>;
+ clock-output-names = "timi1";
+ };
+
+ tsrefclk: tsrefclk {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <0>;
+ clock-output-names = "tsrefclk";
+ };
};
--
2.17.1

2019-07-05 15:14:01

by Grygorii Strashko

[permalink] [raw]
Subject: [RESEND PATCH next v2 2/6] ARM: dts: k2e-clocks: add input ext. fixed clocks tsipclka/b

Add set of fixed, external input clocks definitions for TSIPCLKA, TSIPCLKB
clocks. Such clocks can be used as reference clocks for some HW modules (as
cpts, for example) by configuring corresponding clock muxes. For these
clocks real frequencies have to be defined in board files.

Signed-off-by: Grygorii Strashko <[email protected]>
---
arch/arm/boot/dts/keystone-k2e-clocks.dtsi | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/keystone-k2e-clocks.dtsi b/arch/arm/boot/dts/keystone-k2e-clocks.dtsi
index f7592155a740..cf30e007fea3 100644
--- a/arch/arm/boot/dts/keystone-k2e-clocks.dtsi
+++ b/arch/arm/boot/dts/keystone-k2e-clocks.dtsi
@@ -71,4 +71,24 @@ clocks {
reg-names = "control", "domain";
domain-id = <29>;
};
+
+ /*
+ * Below are set of fixed, input clocks definitions,
+ * for which real frequencies have to be defined in board files.
+ * Those clocks can be used as reference clocks for some HW modules
+ * (as cpts, for example) by configuring corresponding clock muxes.
+ */
+ tsipclka: tsipclka {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <0>;
+ clock-output-names = "tsipclka";
+ };
+
+ tsipclkb: tsipclkb {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <0>;
+ clock-output-names = "tsipclkb";
+ };
};
--
2.17.1

2019-07-05 15:14:46

by Grygorii Strashko

[permalink] [raw]
Subject: [RESEND PATCH next v2 3/6] ARM: dts: k2e-netcp: add cpts refclk_mux node

KeyStone 66AK2E 1G Ethernet Switch Subsystems, can control an external
multiplexer that selects one of up to 32 clocks for time sync reference
(RFTCLK) clock. This feature can be configured through CPTS_RFTCLK_SEL
register (offset: x08) in CPTS module and modelled as multiplexer clock.

Hence, add cpts-refclk-mux clock node which allows to mux one of SYSCLK2,
SYSCLK3, TIMI0, TIMI1, TSIPCLKA, TSREFCLK, TSIPCLKB clocks as CPTS
reference clock [1] and group all CPTS properties under "cpts" subnode.

[1] http://www.ti.com/lit/gpn/66ak2e05
Signed-off-by: Grygorii Strashko <[email protected]>
---
arch/arm/boot/dts/keystone-k2e-netcp.dtsi | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/keystone-k2e-netcp.dtsi b/arch/arm/boot/dts/keystone-k2e-netcp.dtsi
index 1db17ec744b1..ad15e77874b1 100644
--- a/arch/arm/boot/dts/keystone-k2e-netcp.dtsi
+++ b/arch/arm/boot/dts/keystone-k2e-netcp.dtsi
@@ -135,8 +135,8 @@ netcp: netcp@24000000 {
/* NetCP address range */
ranges = <0 0x24000000 0x1000000>;

- clocks = <&clkpa>, <&clkcpgmac>, <&chipclk12>;
- clock-names = "pa_clk", "ethss_clk", "cpts";
+ clocks = <&clkpa>, <&clkcpgmac>;
+ clock-names = "pa_clk", "ethss_clk";
dma-coherent;

ti,navigator-dmas = <&dma_gbe 0>,
@@ -156,6 +156,23 @@ netcp: netcp@24000000 {
tx-queue = <896>;
tx-channel = "nettx";

+ cpts {
+ clocks = <&cpts_refclk_mux>;
+ clock-names = "cpts";
+
+ cpts_refclk_mux: cpts-refclk-mux {
+ #clock-cells = <0>;
+ clocks = <&chipclk12>, <&chipclk13>,
+ <&timi0>, <&timi1>,
+ <&tsipclka>, <&tsrefclk>,
+ <&tsipclkb>;
+ ti,mux-tbl = <0x0>, <0x1>, <0x2>,
+ <0x3>, <0x4>, <0x8>, <0xC>;
+ assigned-clocks = <&cpts_refclk_mux>;
+ assigned-clock-parents = <&chipclk12>;
+ };
+ };
+
interfaces {
gbe0: interface-0 {
slave-port = <0>;
--
2.17.1

2019-07-05 15:14:47

by Grygorii Strashko

[permalink] [raw]
Subject: [RESEND PATCH next v2 4/6] ARM: dts: k2hk-netcp: add cpts refclk_mux node

KeyStone 66AK2H/K 1G Ethernet Switch Subsystems, can control an external
multiplexer that selects one of up to 32 clocks for time sync reference
(RFTCLK) clock. This feature can be configured through CPTS_RFTCLK_SEL
register (offset: x08) in CPTS module and modelled as multiplexer clock.

Hence, add cpts-refclk-mux clock node which allows to mux one of SYSCLK2,
SYSCLK3, TIMI0, TIMI1, TSREFCLK clocks as CPTS reference clock [1] and
group all CPTS properties under "cpts" subnode.

[1] http://www.ti.com/lit/gpn/66ak2h14
Signed-off-by: Grygorii Strashko <[email protected]>
---
arch/arm/boot/dts/keystone-k2hk-netcp.dtsi | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/keystone-k2hk-netcp.dtsi b/arch/arm/boot/dts/keystone-k2hk-netcp.dtsi
index e203145acbea..d5a6c1f5633c 100644
--- a/arch/arm/boot/dts/keystone-k2hk-netcp.dtsi
+++ b/arch/arm/boot/dts/keystone-k2hk-netcp.dtsi
@@ -152,8 +152,8 @@ netcp: netcp@2000000 {
/* NetCP address range */
ranges = <0 0x2000000 0x100000>;

- clocks = <&clkpa>, <&clkcpgmac>, <&chipclk12>;
- clock-names = "pa_clk", "ethss_clk", "cpts";
+ clocks = <&clkpa>, <&clkcpgmac>;
+ clock-names = "pa_clk", "ethss_clk";
dma-coherent;

ti,navigator-dmas = <&dma_gbe 22>,
@@ -175,6 +175,22 @@ netcp: netcp@2000000 {
tx-queue = <648>;
tx-channel = "nettx";

+ cpts {
+ clocks = <&cpts_refclk_mux>;
+ clock-names = "cpts";
+
+ cpts_refclk_mux: cpts-refclk-mux {
+ #clock-cells = <0>;
+ clocks = <&chipclk12>, <&chipclk13>,
+ <&timi0>, <&timi1>,
+ <&tsrefclk>;
+ ti,mux-tbl = <0x0>, <0x1>, <0x2>,
+ <0x3>, <0x8>;
+ assigned-clocks = <&cpts_refclk_mux>;
+ assigned-clock-parents = <&chipclk12>;
+ };
+ };
+
interfaces {
gbe0: interface-0 {
slave-port = <0>;
--
2.17.1

2019-07-05 15:16:14

by Grygorii Strashko

[permalink] [raw]
Subject: [RESEND PATCH next v2 5/6] ARM: dts: k2l-netcp: add cpts refclk_mux node

KeyStone 66AK2L 1G Ethernet Switch Subsystems, can control an external
multiplexer that selects one of up to 32 clocks for time sync reference
(RFTCLK) clock. This feature can be configured through CPTS_RFTCLK_SEL
register (offset: x08) in CPTS module and modelled as multiplexer clock.

Hence, add cpts-refclk-mux clock node which allows to mux one of SYSCLK2,
SYSCLK3, TIMI0, TIMI1, TSREFCLK clocks as CPTS
reference clock [1] and group all CPTS properties under "cpts" subnode.

[1] http://www.ti.com/lit/gpn/66ak2l06
Signed-off-by: Grygorii Strashko <[email protected]>
---
arch/arm/boot/dts/keystone-k2l-netcp.dtsi | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/keystone-k2l-netcp.dtsi b/arch/arm/boot/dts/keystone-k2l-netcp.dtsi
index a2e47bad3307..c1f982604145 100644
--- a/arch/arm/boot/dts/keystone-k2l-netcp.dtsi
+++ b/arch/arm/boot/dts/keystone-k2l-netcp.dtsi
@@ -134,8 +134,8 @@ netcp: netcp@26000000 {
/* NetCP address range */
ranges = <0 0x26000000 0x1000000>;

- clocks = <&clkpa>, <&clkcpgmac>, <&chipclk12>;
- clock-names = "pa_clk", "ethss_clk", "cpts";
+ clocks = <&clkpa>, <&clkcpgmac>;
+ clock-names = "pa_clk", "ethss_clk";
dma-coherent;

ti,navigator-dmas = <&dma_gbe 0>,
@@ -155,6 +155,22 @@ netcp: netcp@26000000 {
tx-queue = <896>;
tx-channel = "nettx";

+ cpts {
+ clocks = <&cpts_refclk_mux>;
+ clock-names = "cpts";
+
+ cpts_refclk_mux: cpts-refclk-mux {
+ #clock-cells = <0>;
+ clocks = <&chipclk12>, <&chipclk13>,
+ <&timi0>, <&timi1>,
+ <&tsrefclk>;
+ ti,mux-tbl = <0x0>, <0x1>, <0x2>,
+ <0x3>, <0x8>;
+ assigned-clocks = <&cpts_refclk_mux>;
+ assigned-clock-parents = <&chipclk12>;
+ };
+ };
+
interfaces {
gbe0: interface-0 {
slave-port = <0>;
--
2.17.1

2019-07-05 15:16:23

by Grygorii Strashko

[permalink] [raw]
Subject: [RESEND PATCH next v2 6/6] ARM: configs: keystone: enable cpts

Enable CPTS support which is present in Network Coprocessor Gigabit
Ethernet (GbE) Switch Subsystem.

Signed-off-by: Grygorii Strashko <[email protected]>
---
arch/arm/configs/keystone_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/keystone_defconfig b/arch/arm/configs/keystone_defconfig
index 72fee57aad2f..0b2281407ecf 100644
--- a/arch/arm/configs/keystone_defconfig
+++ b/arch/arm/configs/keystone_defconfig
@@ -136,6 +136,7 @@ CONFIG_BLK_DEV_SD=y
CONFIG_NETDEVICES=y
CONFIG_TI_KEYSTONE_NETCP=y
CONFIG_TI_KEYSTONE_NETCP_ETHSS=y
+CONFIG_TI_CPTS=y
CONFIG_MARVELL_PHY=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
--
2.17.1

2019-07-05 23:50:18

by Santosh Shilimkar

[permalink] [raw]
Subject: Re: [RESEND PATCH next v2 0/6] ARM: keystone: update dt and enable cpts support

On 7/5/19 8:12 AM, Grygorii Strashko wrote:
> Hi Santosh,
>
> This series is set of platform changes required to enable NETCP CPTS reference
> clock selection and final patch to enable CPTS for Keystone 66AK2E/L/HK SoCs.
>
> Those patches were posted already [1] together with driver's changes, so this
> is re-send of DT/platform specific changes only, as driver's changes have
> been merged already.
>
> Patches 1-5: CPTS DT nodes update for TI Keystone 2 66AK2HK/E/L SoCs.
> Patch 6: enables CPTS for TI Keystone 2 66AK2HK/E/L SoCs.
>
> [1] https://patchwork.kernel.org/cover/10980037/
>
> Grygorii Strashko (6):
> ARM: dts: keystone-clocks: add input fixed clocks
> ARM: dts: k2e-clocks: add input ext. fixed clocks tsipclka/b
> ARM: dts: k2e-netcp: add cpts refclk_mux node
> ARM: dts: k2hk-netcp: add cpts refclk_mux node
> ARM: dts: k2l-netcp: add cpts refclk_mux node
> ARM: configs: keystone: enable cpts
>
Will add these for 5.4 queue. Thanks !!

Regards,
Santosh

2019-07-16 10:45:58

by Grygorii Strashko

[permalink] [raw]
Subject: Re: [RESEND PATCH next v2 0/6] ARM: keystone: update dt and enable cpts support



On 06/07/2019 05:18, [email protected] wrote:
> On 7/5/19 8:12 AM, Grygorii Strashko wrote:
>> Hi Santosh,
>>
>> This series is set of platform changes required to enable NETCP CPTS reference
>> clock selection and final patch to enable CPTS for Keystone 66AK2E/L/HK SoCs.
>>
>> Those patches were posted already [1] together with driver's changes, so this
>> is re-send of DT/platform specific changes only, as driver's changes have
>> been merged already.
>>
>> Patches 1-5: CPTS DT nodes update for TI Keystone 2 66AK2HK/E/L SoCs.
>> Patch 6: enables CPTS for TI Keystone 2 66AK2HK/E/L SoCs.
>>
>> [1] https://patchwork.kernel.org/cover/10980037/
>>
>> Grygorii Strashko (6):
>>    ARM: dts: keystone-clocks: add input fixed clocks
>>    ARM: dts: k2e-clocks: add input ext. fixed clocks tsipclka/b
>>    ARM: dts: k2e-netcp: add cpts refclk_mux node
>>    ARM: dts: k2hk-netcp: add cpts refclk_mux node
>>    ARM: dts: k2l-netcp: add cpts refclk_mux node
>>    ARM: configs: keystone: enable cpts
>>
> Will add these for 5.4 queue. Thanks !!

Thank you

--
Best regards,
grygorii

2019-09-05 23:02:47

by Grygorii Strashko

[permalink] [raw]
Subject: Re: [RESEND PATCH next v2 0/6] ARM: keystone: update dt and enable cpts support

Hi Santosh,

On 06/07/2019 02:48, [email protected] wrote:
> On 7/5/19 8:12 AM, Grygorii Strashko wrote:
>> Hi Santosh,
>>
>> This series is set of platform changes required to enable NETCP CPTS reference
>> clock selection and final patch to enable CPTS for Keystone 66AK2E/L/HK SoCs.
>>
>> Those patches were posted already [1] together with driver's changes, so this
>> is re-send of DT/platform specific changes only, as driver's changes have
>> been merged already.
>>
>> Patches 1-5: CPTS DT nodes update for TI Keystone 2 66AK2HK/E/L SoCs.
>> Patch 6: enables CPTS for TI Keystone 2 66AK2HK/E/L SoCs.
>>
>> [1] https://patchwork.kernel.org/cover/10980037/
>>
>> Grygorii Strashko (6):
>>    ARM: dts: keystone-clocks: add input fixed clocks
>>    ARM: dts: k2e-clocks: add input ext. fixed clocks tsipclka/b
>>    ARM: dts: k2e-netcp: add cpts refclk_mux node
>>    ARM: dts: k2hk-netcp: add cpts refclk_mux node
>>    ARM: dts: k2l-netcp: add cpts refclk_mux node
>>    ARM: configs: keystone: enable cpts
>>
> Will add these for 5.4 queue. Thanks !!

Sry, that I'm disturbing you, but I do not see those patches applied?



--
Best regards,
grygorii

2019-09-06 13:22:23

by Santosh Shilimkar

[permalink] [raw]
Subject: Re: [RESEND PATCH next v2 0/6] ARM: keystone: update dt and enable cpts support

On 9/5/19 12:33 PM, Grygorii Strashko wrote:
> Hi Santosh,
>
> On 06/07/2019 02:48, [email protected] wrote:
>> On 7/5/19 8:12 AM, Grygorii Strashko wrote:
>>> Hi Santosh,
>>>
>>> This series is set of platform changes required to enable NETCP CPTS
>>> reference
>>> clock selection and final patch to enable CPTS for Keystone
>>> 66AK2E/L/HK SoCs.
>>>
>>> Those patches were posted already [1] together with driver's changes,
>>> so this
>>> is re-send of DT/platform specific changes only, as driver's changes
>>> have
>>> been merged already.
>>>
>>> Patches 1-5: CPTS DT nodes update for TI Keystone 2 66AK2HK/E/L SoCs.
>>> Patch 6: enables CPTS for TI Keystone 2 66AK2HK/E/L SoCs.
>>>
>>> [1] https://patchwork.kernel.org/cover/10980037/
>>>
>>> Grygorii Strashko (6):
>>>    ARM: dts: keystone-clocks: add input fixed clocks
>>>    ARM: dts: k2e-clocks: add input ext. fixed clocks tsipclka/b
>>>    ARM: dts: k2e-netcp: add cpts refclk_mux node
>>>    ARM: dts: k2hk-netcp: add cpts refclk_mux node
>>>    ARM: dts: k2l-netcp: add cpts refclk_mux node
>>>    ARM: configs: keystone: enable cpts
>>>
>> Will add these for 5.4 queue. Thanks !!
>
> Sry, that I'm disturbing you, but I do not see those patches applied?
>
Sorry I missed this one. Will queue this up for next merge window.
Will push this out to next early once rc1 is out. If you don't
see it, please ping me.


Regards,
Santosh