@@ -237,63 +237,63 @@ 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
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.
244+
245245 .. code :: dts
246246
247- #define TS_OFFSET(pa, val) (0x4+(pa)*4) (0x10000 | val)
247+ /* Include following header file */
248+ #include <dt-bindings/timesync/k3-timesync-router.h>
249+
248250 ×ync_router {
249- pinctrl-names = "default";
250- pinctrl-0 = <&cpsw_cpts>;
251-
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- };
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";
259257 };
260258
261259 .. ifconfig :: CONFIG_part_variant in ('AM64X')
262260
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.
263+
263264 .. code :: dts
264265
265- #define TS_OFFSET(pa, val) (0x4+(pa)*4) (0x10000 | val)
266+ /* Include following header file */
267+ #include <dt-bindings/timesync/k3-timesync-router.h>
266268
267269 ×ync_router {
268- pinctrl-names = "default";
269- pinctrl-0 = <&cpsw_cpts>;
270-
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- };
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";
278278 };
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.
284+
285+ .. code :: dts
283286
284- #define TS_OFFSET(pa, val) (0x4+(pa)*4) (0x10000 | val)
287+ /* Include following header file */
288+ #include <dt-bindings/timesync/k3-timesync-router.h>
285289
286290 ×ync_router {
287- pinctrl-names = "default";
288- pinctrl-0 = <&cpsw_cpts>;
289-
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- };
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";
297297 };
298298
299299 Similar approach can be used for routing the outputs of other timestamp generator functions (GENFy)
@@ -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:
390+ .. ifconfig :: CONFIG_part_variant in ('AM62AX','AM62X')
393391
394- For example, route CPSWxG CPTS GENF1 output to HW3_TS_PUSH input
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:
395395
396- .. ifconfig :: CONFIG_part_variant in ('AM62AX','AM62X')
396+ For example, route CPSW3G CPTS GENF1 output to HW3_TS_PUSH input for PPS generation:
397397
398- .. code :: dts
398+ .. code :: dts
399399
400- #define TS_OFFSET(pa, val) (0x4+(pa)*4) (0x10000 | val)
400+ #include <dt-bindings/timesync/k3-timesync-router.h>
401401
402402 ×ync_router {
403- pinctrl-names = "default";
404- pinctrl-0 = <&cpsw_cpts>;
405-
406- /* Example of timesync routing */
407- cpsw_cpts: cpsw-cpts {
408- pinctrl-single,pins = <
409- /* pps [cpsw cpts genf1] in17 -> out12 [cpsw cpts hw3_push] */
410- TS_OFFSET(12, 17)
411- >;
412- };
403+ /* Use Time Sync Router to map CPTS GENF1 to HW3_TS_PUSH for PPS */
404+ mux-reg-masks-state = <
405+ /* pps [cpsw cpts genf1] in17 -> out12 [cpsw cpts hw3_push] */
406+ (12, 0x0001ffff, 17)
407+ >;
408+ status = "okay";
413409 };
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
420+
421+ /* Include following header file */
422+ #include <dt-bindings/timesync/k3-timesync-router.h>
418423
419- #define TS_OFFSET(pa, val) (0x4+(pa)*4) (0x10000 | val)
420424 ×ync_router {
421- pinctrl-names = "default";
422- pinctrl-0 = <&cpsw_cpts>;
423-
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)
429- >;
430- };
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)
429+ >;
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+ };
431444 };
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
455+
456+ /* Include following header file */
457+ #include <dt-bindings/timesync/k3-timesync-router.h>
438458
439459 ×ync_router {
440- pinctrl-names = "default";
441- pinctrl-0 = <&cpsw_cpts>;
442-
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)
448- >;
449- };
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)
464+ >;
465+ status = "okay";
450466 };
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 CPSW3G driver, by using the "ti,pps" device-tree property
469+ in the cpts device-tree node present within the CPSW3G device-tree node:
454470
455- .. code :: dts
471+ .. code :: dts
456472
457- &cpswx {
458- cpts@3d000 {
459- ti,pps = <2 1>;
473+ &mcu_cpsw {
474+ cpts@3d000 {
475+ ti,pps = <2 1>;
476+ };
460477 };
461- };
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