From 00c902c07c86f1fcddd06901162ebddcef0029b0 Mon Sep 17 00:00:00 2001 From: Deepak Khatri Date: Mon, 20 Jul 2020 22:47:56 +0530 Subject: [PATCH 1/6] Compatible bone bus CAN0 overlay --- src/arm/BONE-CAN0-00A0.dts | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/arm/BONE-CAN0-00A0.dts diff --git a/src/arm/BONE-CAN0-00A0.dts b/src/arm/BONE-CAN0-00A0.dts new file mode 100644 index 00000000..a6f8fb9f --- /dev/null +++ b/src/arm/BONE-CAN0-00A0.dts @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2020 Deepak Khatri + * + * Virtual cape for /dev/bone/can/0 (only on BBB) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/dts-v1/; +/plugin/; + +/* +* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/ +*/ +&{/chosen} { + overlays { + BONE-CAN0-00A0.dts = __TIMESTAMP__; + }; +}; + +/* +* Update the default pinmux of the pins. +*/ +&ocp { + P9_19_pinmux { pinctrl-0 = <&P9_19_can_pin>;}; /* can rx */ + P9_20_pinmux { pinctrl-0 = <&P9_20_can_pin>;}; /* can tx */ +}; + +&bone_can_0 { + // See these files for the definition + // https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi + // https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi + status = "okay"; +}; \ No newline at end of file From c2d8b1798ca2e6ad492399514d2baa0fa3011088 Mon Sep 17 00:00:00 2001 From: Deepak Khatri Date: Mon, 20 Jul 2020 22:48:02 +0530 Subject: [PATCH 2/6] Compatible bone bus CAN1 overlay --- src/arm/BONE-CAN1-00A0.dts | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/arm/BONE-CAN1-00A0.dts diff --git a/src/arm/BONE-CAN1-00A0.dts b/src/arm/BONE-CAN1-00A0.dts new file mode 100644 index 00000000..03392192 --- /dev/null +++ b/src/arm/BONE-CAN1-00A0.dts @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2020 Deepak Khatri + * + * Virtual cape for /dev/bone/can/1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/dts-v1/; +/plugin/; + +/* +* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/ +*/ +&{/chosen} { + overlays { + BONE-CAN1-00A0.dts = __TIMESTAMP__; + }; +}; + +/* +* Update the default pinmux of the pins. +*/ +&ocp { + P9_24_pinmux { pinctrl-0 = <&P9_24_can_pin>;}; /* can rx */ + P9_26_pinmux { pinctrl-0 = <&P9_26_can_pin>;}; /* can tx */ +}; + +&bone_can_1 { + // See these files for the definition + // https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi + // https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi + status = "okay"; +}; \ No newline at end of file From 3ae49d635acc6d323afcfb0d8472e106292e1645 Mon Sep 17 00:00:00 2001 From: Deepak Khatri Date: Tue, 21 Jul 2020 23:22:14 +0530 Subject: [PATCH 3/6] update comments --- src/arm/BONE-CAN0-00A0.dts | 15 ++++++++++----- src/arm/BONE-CAN1-00A0.dts | 15 ++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/arm/BONE-CAN0-00A0.dts b/src/arm/BONE-CAN0-00A0.dts index a6f8fb9f..0bef9ddb 100644 --- a/src/arm/BONE-CAN0-00A0.dts +++ b/src/arm/BONE-CAN0-00A0.dts @@ -21,16 +21,21 @@ }; /* -* Update the default pinmux of the pins. -*/ + * Update the default pinmux of the pins. + * See these files for the phandles (&P9_* & &P8_*) + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am335x-bone-common-univ.dtsi + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am572x-bone-common-univ.dtsi + */ &ocp { P9_19_pinmux { pinctrl-0 = <&P9_19_can_pin>;}; /* can rx */ P9_20_pinmux { pinctrl-0 = <&P9_20_can_pin>;}; /* can tx */ }; +/* + * See these files for the phandles (&bone_*) and other bone bus nodes + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi + */ &bone_can_0 { - // See these files for the definition - // https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi - // https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi status = "okay"; }; \ No newline at end of file diff --git a/src/arm/BONE-CAN1-00A0.dts b/src/arm/BONE-CAN1-00A0.dts index 03392192..09c09078 100644 --- a/src/arm/BONE-CAN1-00A0.dts +++ b/src/arm/BONE-CAN1-00A0.dts @@ -21,16 +21,21 @@ }; /* -* Update the default pinmux of the pins. -*/ + * Update the default pinmux of the pins. + * See these files for the phandles (&P9_* & &P8_*) + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am335x-bone-common-univ.dtsi + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am572x-bone-common-univ.dtsi + */ &ocp { P9_24_pinmux { pinctrl-0 = <&P9_24_can_pin>;}; /* can rx */ P9_26_pinmux { pinctrl-0 = <&P9_26_can_pin>;}; /* can tx */ }; +/* + * See these files for the phandles (&bone_*) and other bone bus nodes + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi + */ &bone_can_1 { - // See these files for the definition - // https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi - // https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi status = "okay"; }; \ No newline at end of file From 0e506f191a1cdc6b055a5ee0d454514261242d05 Mon Sep 17 00:00:00 2001 From: Deepak Khatri Date: Wed, 22 Jul 2020 22:49:57 +0530 Subject: [PATCH 4/6] Rename overlays --- src/arm/BONE-CAN0-00A0.dts | 41 -------------------------------------- src/arm/BONE-CAN1-00A0.dts | 41 -------------------------------------- 2 files changed, 82 deletions(-) delete mode 100644 src/arm/BONE-CAN0-00A0.dts delete mode 100644 src/arm/BONE-CAN1-00A0.dts diff --git a/src/arm/BONE-CAN0-00A0.dts b/src/arm/BONE-CAN0-00A0.dts deleted file mode 100644 index 0bef9ddb..00000000 --- a/src/arm/BONE-CAN0-00A0.dts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2020 Deepak Khatri - * - * Virtual cape for /dev/bone/can/0 (only on BBB) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -/dts-v1/; -/plugin/; - -/* -* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/ -*/ -&{/chosen} { - overlays { - BONE-CAN0-00A0.dts = __TIMESTAMP__; - }; -}; - -/* - * Update the default pinmux of the pins. - * See these files for the phandles (&P9_* & &P8_*) - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am335x-bone-common-univ.dtsi - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am572x-bone-common-univ.dtsi - */ -&ocp { - P9_19_pinmux { pinctrl-0 = <&P9_19_can_pin>;}; /* can rx */ - P9_20_pinmux { pinctrl-0 = <&P9_20_can_pin>;}; /* can tx */ -}; - -/* - * See these files for the phandles (&bone_*) and other bone bus nodes - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi - */ -&bone_can_0 { - status = "okay"; -}; \ No newline at end of file diff --git a/src/arm/BONE-CAN1-00A0.dts b/src/arm/BONE-CAN1-00A0.dts deleted file mode 100644 index 09c09078..00000000 --- a/src/arm/BONE-CAN1-00A0.dts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2020 Deepak Khatri - * - * Virtual cape for /dev/bone/can/1 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -/dts-v1/; -/plugin/; - -/* -* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/ -*/ -&{/chosen} { - overlays { - BONE-CAN1-00A0.dts = __TIMESTAMP__; - }; -}; - -/* - * Update the default pinmux of the pins. - * See these files for the phandles (&P9_* & &P8_*) - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am335x-bone-common-univ.dtsi - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am572x-bone-common-univ.dtsi - */ -&ocp { - P9_24_pinmux { pinctrl-0 = <&P9_24_can_pin>;}; /* can rx */ - P9_26_pinmux { pinctrl-0 = <&P9_26_can_pin>;}; /* can tx */ -}; - -/* - * See these files for the phandles (&bone_*) and other bone bus nodes - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi - */ -&bone_can_1 { - status = "okay"; -}; \ No newline at end of file From f1b899eab634ed69b568b43373a2abc2db98413c Mon Sep 17 00:00:00 2001 From: Deepak Khatri Date: Wed, 22 Jul 2020 22:50:39 +0530 Subject: [PATCH 5/6] updated bone bus CAN DT overlays --- src/arm/BONE-CAN0.dts | 41 +++++++++++++++++++++++++++++++++++++++++ src/arm/BONE-CAN1.dts | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 src/arm/BONE-CAN0.dts create mode 100644 src/arm/BONE-CAN1.dts diff --git a/src/arm/BONE-CAN0.dts b/src/arm/BONE-CAN0.dts new file mode 100644 index 00000000..9ee1700f --- /dev/null +++ b/src/arm/BONE-CAN0.dts @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2020 Deepak Khatri + * + * Virtual cape for /dev/bone/can/0 (only on BBB) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/dts-v1/; +/plugin/; + +/* +* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/ +*/ +&{/chosen} { + overlays { + BONE-CAN0 = __TIMESTAMP__; + }; +}; + +/* + * Update the default pinmux of the pins. + * See these files for the phandles (&P9_* & &P8_*) + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am335x-bone-common-univ.dtsi + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am572x-bone-common-univ.dtsi + */ +&ocp { + P9_19_pinmux { pinctrl-0 = <&P9_19_can_pin>;}; /* can rx */ + P9_20_pinmux { pinctrl-0 = <&P9_20_can_pin>;}; /* can tx */ +}; + +/* + * See these files for the phandles (&bone_*) and other bone bus nodes + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi + */ +&bone_can_0 { + status = "okay"; +}; \ No newline at end of file diff --git a/src/arm/BONE-CAN1.dts b/src/arm/BONE-CAN1.dts new file mode 100644 index 00000000..a4cafcd9 --- /dev/null +++ b/src/arm/BONE-CAN1.dts @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2020 Deepak Khatri + * + * Virtual cape for /dev/bone/can/1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/dts-v1/; +/plugin/; + +/* +* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/ +*/ +&{/chosen} { + overlays { + BONE-CAN1 = __TIMESTAMP__; + }; +}; + +/* + * Update the default pinmux of the pins. + * See these files for the phandles (&P9_* & &P8_*) + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am335x-bone-common-univ.dtsi + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am572x-bone-common-univ.dtsi + */ +&ocp { + P9_24_pinmux { pinctrl-0 = <&P9_24_can_pin>;}; /* can rx */ + P9_26_pinmux { pinctrl-0 = <&P9_26_can_pin>;}; /* can tx */ +}; + +/* + * See these files for the phandles (&bone_*) and other bone bus nodes + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi + * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi + */ +&bone_can_1 { + status = "okay"; +}; \ No newline at end of file From 744dfe8dc6e23472429dc0f694e140cb376a019d Mon Sep 17 00:00:00 2001 From: Deepak Khatri Date: Wed, 29 Jul 2020 18:30:35 +0530 Subject: [PATCH 6/6] update links (bone bus can) --- src/arm/BONE-CAN0.dts | 8 ++++---- src/arm/BONE-CAN1.dts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/arm/BONE-CAN0.dts b/src/arm/BONE-CAN0.dts index 9ee1700f..20f372da 100644 --- a/src/arm/BONE-CAN0.dts +++ b/src/arm/BONE-CAN0.dts @@ -23,8 +23,8 @@ /* * Update the default pinmux of the pins. * See these files for the phandles (&P9_* & &P8_*) - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am335x-bone-common-univ.dtsi - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am572x-bone-common-univ.dtsi + * https://github.com/lorforlinux/BeagleBoard-DeviceTrees/blob/compatibility/src/arm/am335x-bone-common-univ.dtsi + * https://github.com/lorforlinux/BeagleBoard-DeviceTrees/blob/compatibility/src/arm/am572x-bone-common-univ.dtsi */ &ocp { P9_19_pinmux { pinctrl-0 = <&P9_19_can_pin>;}; /* can rx */ @@ -33,8 +33,8 @@ /* * See these files for the phandles (&bone_*) and other bone bus nodes - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi + * https://github.com/lorforlinux/BeagleBoard-DeviceTrees/blob/compatibility/src/arm/bbai-bone-buses.dtsi + * https://github.com/lorforlinux/BeagleBoard-DeviceTrees/blob/compatibility/src/arm/bbb-bone-buses.dtsi */ &bone_can_0 { status = "okay"; diff --git a/src/arm/BONE-CAN1.dts b/src/arm/BONE-CAN1.dts index a4cafcd9..c2dee4db 100644 --- a/src/arm/BONE-CAN1.dts +++ b/src/arm/BONE-CAN1.dts @@ -23,8 +23,8 @@ /* * Update the default pinmux of the pins. * See these files for the phandles (&P9_* & &P8_*) - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am335x-bone-common-univ.dtsi - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am572x-bone-common-univ.dtsi + * https://github.com/lorforlinux/BeagleBoard-DeviceTrees/blob/compatibility/src/arm/am335x-bone-common-univ.dtsi + * https://github.com/lorforlinux/BeagleBoard-DeviceTrees/blob/compatibility/src/arm/am572x-bone-common-univ.dtsi */ &ocp { P9_24_pinmux { pinctrl-0 = <&P9_24_can_pin>;}; /* can rx */ @@ -33,8 +33,8 @@ /* * See these files for the phandles (&bone_*) and other bone bus nodes - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi - * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi + * https://github.com/lorforlinux/BeagleBoard-DeviceTrees/blob/compatibility/src/arm/bbai-bone-buses.dtsi + * https://github.com/lorforlinux/BeagleBoard-DeviceTrees/blob/compatibility/src/arm/bbb-bone-buses.dtsi */ &bone_can_1 { status = "okay";