@@ -237,64 +237,64 @@ through the Time Sync Router. The procedure to route the CPSWxG CPTS GENF0 outpu
237237input for example, involves modifying the device-tree node of the Time Sync Router, to map the
238238CPWSxG CPTS GENF0 output to HW4_TS_PUSH input.
239239
240- The following block shows the Time Sync Router device-tree node with the mapping from CPSWxG CPTS
241- GENF0 to HW4_TS_PUSH added.
242-
243240.. ifconfig :: CONFIG_part_variant in ('AM62AX','AM62X')
244241
245- .. code :: dts
242+ The following block shows the Time Sync Router device-tree node with the mapping from CPSW3G CPTS
243+ GENF0 to HW3_TS_PUSH added.
246244
247- #define TS_OFFSET(pa, val) (0x4+(pa)*4) (0x10000 | val)
248- ×ync_router {
249- pinctrl-names = "default";
250- pinctrl-0 = <&cpsw_cpts>;
245+ .. code :: dts
251246
252- /* Example of the timesync routing */
253- cpsw_cpts: cpsw-cpts {
254- pinctrl-single,pins = <
255- /* pps [cpsw cpts genf0] in16 -> out13 [cpsw cpts hw4_push] */
256- TS_OFFSET(13, 16)
257- >;
258- };
259- };
247+ /* Include following header file */
248+ #include <dt-bindings/timesync/k3-timesync-router.h>
249+
250+ ×ync_router {
251+ /* Use Time Sync Router to map CPTS GENF outputs to HW_TS_PUSH inputs */
252+ mux-reg-masks-state = <
253+ /* pps [cpsw cpts genf1] in17 -> out12 [cpsw cpts hw3_push] */
254+ K3_TS_OFFSET(12, 0x0001ffff, 17)
255+ >;
256+ status = "okay";
257+ };
260258
261259 .. ifconfig :: CONFIG_part_variant in ('AM64X')
262260
263- .. code :: dts
261+ The following block shows the Time Sync Router device-tree node with the mapping from CPSW3G CPTS
262+ GENF0 to HW4_TS_PUSH and GENF1 to HW8_TS_PUSH added.
264263
265- #define TS_OFFSET(pa, val) (0x4+(pa)*4) (0x10000 | val)
264+ .. code :: dts
266265
267- ×ync_router {
268- pinctrl-names = "default";
269- pinctrl-0 = <&cpsw_cpts>;
266+ /* Include following header file */
267+ #include <dt-bindings/timesync/k3-timesync-router.h>
270268
271- /* Example of the timesync routing */
272- cpsw_cpts: cpsw-cpts {
273- pinctrl-single,pins = <
274- /* pps [cpsw cpts genf0] in21 -> out33 [cpsw cpts hw4_push] */
275- TS_OFFSET(33, 21)
276- >;
277- };
278- };
269+ ×ync_router {
270+ /* Use Time Sync Router to map CPTS GENF outputs to HW_TS_PUSH inputs */
271+ mux-reg-masks-state = <
272+ /* pps [cpsw cpts genf0] in29 -> out23 [cpsw cpts hw4_push] */
273+ K3_TS_OFFSET(23, 0x0001ffff, 29)
274+ /* pps [cpsw cpts genf1] in22 -> out37 [cpsw cpts hw8_push] */
275+ K3_TS_OFFSET(37, 0x0001ffff, 22)
276+ >;
277+ status = "okay";
278+ };
279279
280280 .. ifconfig :: CONFIG_part_variant in ('J721E','J7200','J721S2','J784S4','J742S2')
281281
282- .. code :: dts
282+ The following block shows the Time Sync Router device-tree node with the mapping from CPSW2G CPTS
283+ GENF1 to HW4_TS_PUSH added.
283284
284- #define TS_OFFSET(pa, val) (0x4+(pa)*4) (0x10000 | val)
285+ .. code :: dts
285286
286- ×ync_router {
287- pinctrl-names = "default";
288- pinctrl-0 = <&cpsw_cpts>;
287+ /* Include following header file */
288+ #include <dt-bindings/timesync/k3-timesync-router.h>
289289
290- /* Example of the timesync routing */
291- cpsw_cpts: cpsw-cpts {
292- pinctrl-single,pins = <
293- /* pps [cpsw cpts genf0] in16 -> out25 [cpsw cpts hw4_push] */
294- TS_OFFSET (25, 16 )
295- >;
296- } ;
297- };
290+ ×ync_router {
291+ /* Use Time Sync Router to map CPTS GENF outputs to HW_TS_PUSH inputs */
292+ mux-reg-masks-state = <
293+ /* pps [cpsw cpts genf1] in17 -> out25 [cpsw cpts hw4_push] */
294+ K3_TS_OFFSET (25, 0x0001ffff, 17 )
295+ >;
296+ status = "okay" ;
297+ };
298298
299299 Similar approach can be used for routing the outputs of other timestamp generator functions (GENFy)
300300as inputs to other Hardware Timestamping push inputs (HWx_TS_PUSH).
@@ -387,78 +387,94 @@ The second command is used to specify that /dev/ptpN has to be used as the clock
387387
388388The PPS support for |__PART_FAMILY_DEVICE_NAMES__ | can be enabled with the following steps:
389389
390- 1. Route the output of the CPSWxG CPTS timestamp generator function (GENFy) to one of the
391- CPSWxG CPTS timestamp generator inputs (HWx_TS_PUSH) using the Time Sync Router, by
392- modifying the device-tree node corresponding to the Time Sync Router:
393-
394- For example, route CPSWxG CPTS GENF1 output to HW3_TS_PUSH input
395-
396390.. ifconfig :: CONFIG_part_variant in ('AM62AX','AM62X')
397391
398- .. code :: dts
392+ 1. Route the output of the CPSW3G CPTS timestamp generator function (GENFy) to one of the
393+ CPSW3G CPTS timestamp generator inputs (HWx_TS_PUSH) using the Time Sync Router, by
394+ modifying the device-tree node corresponding to the Time Sync Router:
395+
396+ For example, route CPSW3G CPTS GENF1 output to HW3_TS_PUSH input for PPS generation:
399397
400- #define TS_OFFSET(pa, val) (0x4+(pa)*4) (0x10000 | val)
398+ .. code :: dts
401399
402- ×ync_router {
403- pinctrl-names = "default";
404- pinctrl-0 = <&cpsw_cpts>;
400+ #include <dt-bindings/timesync/k3-timesync-router.h>
405401
406- /* Example of timesync routing */
407- cpsw_cpts: cpsw-cpts {
408- pinctrl-single,pins = <
402+ ×ync_router {
403+ /* Use Time Sync Router to map CPTS GENF1 to HW3_TS_PUSH for PPS */
404+ mux-reg-masks-state = <
409405 /* pps [cpsw cpts genf1] in17 -> out12 [cpsw cpts hw3_push] */
410- TS_OFFSET (12, 17)
406+ K3_TS_OFFSET (12, 0x0001ffff , 17)
411407 >;
408+ status = "okay";
412409 };
413- };
414410
415411 .. ifconfig :: CONFIG_part_variant in ('AM64X')
416412
417- .. code :: dts
413+ 1. Route the output of the CPSW3G CPTS timestamp generator function (GENFy) to one of the
414+ CPSW3G CPTS timestamp generator inputs (HWx_TS_PUSH) using the Time Sync Router, by
415+ modifying the device-tree node corresponding to the Time Sync Router:
416+
417+ For example, route CPSW3G CPTS GENF1 output to HW3_TS_PUSH input for PPS generation:
418+
419+ .. code :: dts
418420
419- #define TS_OFFSET(pa, val) (0x4+(pa)*4) (0x10000 | val)
420- ×ync_router {
421- pinctrl-names = "default";
422- pinctrl-0 = <&cpsw_cpts>;
421+ /* Include following header file */
422+ #include <dt-bindings/timesync/k3-timesync-router.h>
423423
424- /* Example of timesync routing */
425- cpsw_cpts: cpsw-cpts {
426- pinctrl-single,pins = <
427- /* pps [cpsw cpts genf1] in22 -> out32 [cpsw cpts hw3_push] */
428- TS_OFFSET (32, 22)
424+ ×ync_router {
425+ /* Use Time Sync Router to map CPTS GENF1 to HW3_TS_PUSH for PPS */
426+ mux-reg-masks-state = <
427+ /* pps [cpts genf1] in22 -> out32 [cpts hw3_push] */
428+ K3_TS_OFFSET (32, 0x0001ffff , 22)
429429 >;
430+ status = "okay";
431+ };
432+
433+ .. ifconfig :: CONFIG_part_variant in ('AM62AX','AM62X','AM64X')
434+
435+ 2. Inform the mapping to the CPSW3G driver, by using the "ti,pps" device-tree property
436+ in the cpts device-tree node present within the CPSW3G device-tree node:
437+
438+ .. code :: dts
439+
440+ &cpsw3g {
441+ cpts@3d000 {
442+ ti,pps = <2 1>;
443+ };
430444 };
431- };
432445
433446 .. ifconfig :: CONFIG_part_variant in ('J721E','J7200','J721S2','J784S4','J742S2')
434447
435- .. code :: dts
448+ 1. Route the output of the CPSW2G CPTS timestamp generator function (GENFy) to one of the
449+ CPSW2G CPTS timestamp generator inputs (HWx_TS_PUSH) using the Time Sync Router, by
450+ modifying the device-tree node corresponding to the Time Sync Router:
451+
452+ For example, route CPSW2G CPTS GENF1 output to HW4_TS_PUSH input for PPS generation:
436453
437- #define TS_OFFSET(pa, val) (0x4+(pa)*4) (0x10000 | val)
454+ .. code :: dts
438455
439- ×ync_router {
440- pinctrl-names = "default";
441- pinctrl-0 = <&cpsw_cpts>;
456+ /* Include following header file */
457+ #include <dt-bindings/timesync/k3-timesync-router.h>
442458
443- /* Example of timesync routing */
444- cpsw_cpts: cpsw-cpts {
445- pinctrl-single,pins = <
446- /* pps [cpsw cpts genf1] in17 -> out24 [ cpsw cpts hw3_push ] */
447- TS_OFFSET(24 , 17)
459+ ×ync_router {
460+ /* Use Time Sync Router to map CPTS GENF1 to HW4_TS_PUSH for PPS */
461+ mux-reg-masks-state = <
462+ /* pps [mcu cpsw cpts genf1] in17 -> out25 [mcu cpsw cpts hw4_push ] */
463+ K3_TS_OFFSET(25, 0x0001ffff , 17)
448464 >;
465+ status = "okay";
449466 };
450- };
451467
452- 2. Inform the mapping to the CPSWxG driver, by using the "ti,pps" device-tree property
453- in the cpts device-tree node present within the CPSWxG device-tree node:
468+ 2. Inform the mapping to the CPSW2G driver, by using the "ti,pps" device-tree property
469+ in the cpts device-tree node present within the CPSW2G device-tree node:
454470
455- .. code :: dts
471+ .. code :: dts
456472
457- &cpswx {
458- cpts@3d000 {
459- ti,pps = <2 1>;
460- };
461- };
473+ &mcu_cpsw {
474+ cpts@3d000 {
475+ ti,pps = <2 1>;
476+ };
477+ };
462478
463479 The property "ti,pps" is of the form <x-1 y>, where x and y correspond to the choice of
464480HWx_TS_PUSH and GENFy.
0 commit comments