From 16e787db811fae3f9f46bf159e0b9a79d811dacd Mon Sep 17 00:00:00 2001 From: Chintan Vankar Date: Thu, 22 Oct 2026 15:15:48 +0530 Subject: [PATCH] fix(linux): Update CPSW-PTP timesync_router documentation with actual kernel definitions Update timesync_router device tree examples in CPSW-PTP documentation to match the actual kernel implementation. Add timesync_router documentation for AM62L. Signed-off-by: Chintan Vankar --- .../Kernel_Drivers/Network/CPSW-PTP.rst | 97 +++++++++++++++---- 1 file changed, 76 insertions(+), 21 deletions(-) diff --git a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-PTP.rst b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-PTP.rst index a0938975a..16e8714f5 100644 --- a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-PTP.rst +++ b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-PTP.rst @@ -240,40 +240,60 @@ CPWSxG CPTS GENF0 output to HW4_TS_PUSH input. .. ifconfig:: CONFIG_part_variant in ('AM62AX','AM62X') The following block shows the Time Sync Router device-tree node with the mapping from CPSW3G CPTS - GENF0 to HW3_TS_PUSH added. + GENF1 to HW3_TS_PUSH added. .. code:: dts /* Include following header file */ - #include + #include "k3-timesync-router.h" ×ync_router { /* Use Time Sync Router to map CPTS GENF outputs to HW_TS_PUSH inputs */ - mux-reg-masks-state = < + mux-reg-mask-val = < /* pps [cpsw cpts genf1] in17 -> out12 [cpsw cpts hw3_push] */ K3_TS_OFFSET(12, 0x0001ffff, 17) >; + idle-states = <0x1>; + status = "okay"; + }; + +.. ifconfig:: CONFIG_part_variant in ('AM62LX') + + The following block shows the Time Sync Router device-tree node with the mapping from CPSW3G CPTS + GENF1 to HW3_TS_PUSH added. + + .. code:: dts + + /* Include following header file */ + #include "k3-timesync-router.h" + + ×ync_router { + /* Use Time Sync Router to map CPTS GENF outputs to HW_TS_PUSH inputs */ + mux-reg-mask-val = < + /* pps [cpsw cpts genf1] in9 -> out2 [cpsw cpts hw3_push] */ + K3_TS_OFFSET(2, 0xff, 9) + >; + idle-states = <0x1>; status = "okay"; }; .. ifconfig:: CONFIG_part_variant in ('AM64X') The following block shows the Time Sync Router device-tree node with the mapping from CPSW3G CPTS - GENF0 to HW4_TS_PUSH and GENF1 to HW8_TS_PUSH added. + GENF1 to HW8_TS_PUSH added. .. code:: dts /* Include following header file */ - #include + #include "k3-timesync-router.h" ×ync_router { /* Use Time Sync Router to map CPTS GENF outputs to HW_TS_PUSH inputs */ - mux-reg-masks-state = < - /* pps [cpsw cpts genf0] in29 -> out23 [cpsw cpts hw4_push] */ - K3_TS_OFFSET(23, 0x0001ffff, 29) - /* pps [cpsw cpts genf1] in22 -> out37 [cpsw cpts hw8_push] */ + mux-reg-mask-val = < + /* pps [cpts genf1] in22 -> out37 [cpts hw8_push] */ K3_TS_OFFSET(37, 0x0001ffff, 22) >; + idle-states = <0x1>; status = "okay"; }; @@ -285,14 +305,15 @@ CPWSxG CPTS GENF0 output to HW4_TS_PUSH input. .. code:: dts /* Include following header file */ - #include + #include "k3-timesync-router.h" ×ync_router { /* Use Time Sync Router to map CPTS GENF outputs to HW_TS_PUSH inputs */ - mux-reg-masks-state = < - /* pps [cpsw cpts genf1] in17 -> out25 [cpsw cpts hw4_push] */ + mux-reg-mask-val = < + /* pps [mcu cpsw cpts genf1] in17 -> out25 [mcu cpsw cpts hw4_push] */ K3_TS_OFFSET(25, 0x0001ffff, 17) >; + idle-states = <0x1>; status = "okay"; }; @@ -308,6 +329,10 @@ The Input Sources for the Time Sync Router are documented at: `Time Sync Router Input Sources for AM62AX `_ +.. ifconfig:: CONFIG_part_variant in ('AM62LX') + + `Time Sync Router Input Sources for AM62L `_ + .. ifconfig:: CONFIG_part_variant in ('AM62X') `Time Sync Router Input Sources for AM62X `_ @@ -338,6 +363,10 @@ The Output Destinations for the Time Sync Router are documented at: `Time Sync Router Output Destinations for AM62AX `_ +.. ifconfig:: CONFIG_part_variant in ('AM62LX') + + `Time Sync Router Output Destinations for AM62L `_ + .. ifconfig:: CONFIG_part_variant in ('AM62X') `Time Sync Router Output Destinations for AM62X `_ @@ -397,19 +426,43 @@ The PPS support for |__PART_FAMILY_DEVICE_NAMES__| can be enabled with the follo .. code:: dts - #include + #include "k3-timesync-router.h" ×ync_router { /* Use Time Sync Router to map CPTS GENF1 to HW3_TS_PUSH for PPS */ - mux-reg-masks-state = < + mux-reg-mask-val = < /* pps [cpsw cpts genf1] in17 -> out12 [cpsw cpts hw3_push] */ K3_TS_OFFSET(12, 0x0001ffff, 17) >; + idle-states = <0x1>; status = "okay"; }; .. ifconfig:: CONFIG_part_variant in ('AM64X') + 1. Route the output of the CPSW3G CPTS timestamp generator function (GENFy) to one of the + CPSW3G CPTS timestamp generator inputs (HWx_TS_PUSH) using the Time Sync Router, by + modifying the device-tree node corresponding to the Time Sync Router: + + For example, route CPSW3G CPTS GENF1 output to HW8_TS_PUSH input for PPS generation: + + .. code:: dts + + /* Include following header file */ + #include "k3-timesync-router.h" + + ×ync_router { + /* Use Time Sync Router to map CPTS GENF1 to HW8_TS_PUSH for PPS */ + mux-reg-mask-val = < + /* pps [cpts genf1] in22 -> out37 [cpts hw8_push] */ + K3_TS_OFFSET(37, 0x0001ffff, 22) + >; + idle-states = <0x1>; + status = "okay"; + }; + +.. ifconfig:: CONFIG_part_variant in ('AM62LX') + 1. Route the output of the CPSW3G CPTS timestamp generator function (GENFy) to one of the CPSW3G CPTS timestamp generator inputs (HWx_TS_PUSH) using the Time Sync Router, by modifying the device-tree node corresponding to the Time Sync Router: @@ -419,18 +472,19 @@ The PPS support for |__PART_FAMILY_DEVICE_NAMES__| can be enabled with the follo .. code:: dts /* Include following header file */ - #include + #include "k3-timesync-router.h" ×ync_router { /* Use Time Sync Router to map CPTS GENF1 to HW3_TS_PUSH for PPS */ - mux-reg-masks-state = < - /* pps [cpts genf1] in22 -> out32 [cpts hw3_push] */ - K3_TS_OFFSET(32, 0x0001ffff, 22) + mux-reg-mask-val = < + /* pps [cpsw cpts genf1] in9 -> out2 [cpsw cpts hw3_push] */ + K3_TS_OFFSET(2, 0xff, 9) >; + idle-states = <0x1>; status = "okay"; }; -.. ifconfig:: CONFIG_part_variant in ('AM62AX','AM62X','AM64X') +.. ifconfig:: CONFIG_part_variant in ('AM62AX','AM62X','AM62LX','AM64X') 2. Inform the mapping to the CPSW3G driver, by using the "ti,pps" device-tree property in the cpts device-tree node present within the CPSW3G device-tree node: @@ -454,14 +508,15 @@ The PPS support for |__PART_FAMILY_DEVICE_NAMES__| can be enabled with the follo .. code:: dts /* Include following header file */ - #include + #include "k3-timesync-router.h" ×ync_router { /* Use Time Sync Router to map CPTS GENF1 to HW4_TS_PUSH for PPS */ - mux-reg-masks-state = < + mux-reg-mask-val = < /* pps [mcu cpsw cpts genf1] in17 -> out25 [mcu cpsw cpts hw4_push] */ K3_TS_OFFSET(25, 0x0001ffff, 17) >; + idle-states = <0x1>; status = "okay"; };