From ec7a586e5a50421719fa9bc6add9e6cab04a7ced Mon Sep 17 00:00:00 2001 From: Deepak Khatri Date: Sat, 27 Jun 2020 12:08:08 +0530 Subject: [PATCH 1/9] add virtual cape ovelray for /bone/i2c/1 --- src/arm/BONE-I2C1-00A0.dts | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/arm/BONE-I2C1-00A0.dts diff --git a/src/arm/BONE-I2C1-00A0.dts b/src/arm/BONE-I2C1-00A0.dts new file mode 100644 index 00000000..64c7a2cb --- /dev/null +++ b/src/arm/BONE-I2C1-00A0.dts @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2020 Deepak Khatri + * + * Virtual cape for /bone/i2c/1 + * + * Note: This can not be used along with BONE-I2C3-00A0 on BBB as + * both uses i2c1 internally and only one can be used at a time. + * + * 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-I2C1-00A0 = __TIMESTAMP__; + }; +}; + +/* +* Free up the pins used by the cape from the pinmux helpers. +*/ +&ocp { + P9_18_pinmux { status = "disabled"; }; + P9_17_pinmux { status = "disabled"; }; +}; + +&bone_i2c_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 7c640b69d1621195255db218cddc58b4deae0109 Mon Sep 17 00:00:00 2001 From: Deepak Khatri Date: Sat, 27 Jun 2020 12:08:16 +0530 Subject: [PATCH 2/9] add virtual cape ovelray for /bone/i2c/2 --- src/arm/BONE-I2C2-00A0.dts | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/arm/BONE-I2C2-00A0.dts diff --git a/src/arm/BONE-I2C2-00A0.dts b/src/arm/BONE-I2C2-00A0.dts new file mode 100644 index 00000000..64dde1aa --- /dev/null +++ b/src/arm/BONE-I2C2-00A0.dts @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2020 Deepak Khatri + * + * Virtual cape for /bone/i2c/2 + * + * Note: This can not be used along with BONE-I2C2A-00A0 on BBB as + * both uses i2c2 internally and only one can be used at a time. + * + * 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-I2C2-00A0 = __TIMESTAMP__; + }; +}; + +/* +* Free up the pins used by the cape from the pinmux helpers. +*/ +&ocp { + P9_20_pinmux { status = "disabled"; }; + P9_19_pinmux { status = "disabled"; }; +}; + +&bone_i2c_2 { + // 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 27edc6461ce329fec0d6256f206ce88842578cf5 Mon Sep 17 00:00:00 2001 From: Deepak Khatri Date: Sat, 27 Jun 2020 12:08:27 +0530 Subject: [PATCH 3/9] add virtual cape ovelray for /bone/i2c/2a --- src/arm/BONE-I2C2A-00A0.dts | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/arm/BONE-I2C2A-00A0.dts diff --git a/src/arm/BONE-I2C2A-00A0.dts b/src/arm/BONE-I2C2A-00A0.dts new file mode 100644 index 00000000..104eca92 --- /dev/null +++ b/src/arm/BONE-I2C2A-00A0.dts @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2020 Deepak Khatri + * + * Virtual cape for /bone/i2c/2a (only on BBB) + * + * Note: This can not be used along with BONE-I2C2-00A0 on BBB as + * both uses i2c2 internally and only one can be used at a time. + * you have to edit the bbb-bone-buses.dtsi file to enable this! + * + * 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-I2C2A-00A0 = __TIMESTAMP__; + }; +}; + +/* +* Free up the pins used by the cape from the pinmux helpers. +*/ +&ocp { + P9_22_pinmux { status = "disabled"; }; + P9_21_pinmux { status = "disabled"; }; +}; + +&bone_i2c_2a { + // 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 fea9afccbbd86a3f59ee8b63404c69fe83d8b587 Mon Sep 17 00:00:00 2001 From: Deepak Khatri Date: Sat, 27 Jun 2020 12:08:37 +0530 Subject: [PATCH 4/9] add virtual cape ovelray for /bone/i2c/3 --- src/arm/BONE-I2C3-00A0.dts | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/arm/BONE-I2C3-00A0.dts diff --git a/src/arm/BONE-I2C3-00A0.dts b/src/arm/BONE-I2C3-00A0.dts new file mode 100644 index 00000000..72e9bd4c --- /dev/null +++ b/src/arm/BONE-I2C3-00A0.dts @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2020 Deepak Khatri + * + * Virtual cape for /bone/i2c/3 + * + * Note: This can not be used along with BONE-I2C1-00A0 on BBB as + * both uses i2c1 internally and only one can be used at a time. + * you have to edit the bbb-bone-buses.dtsi file to enable this! + * + * 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-I2C3-00A0 = __TIMESTAMP__; + }; +}; + +/* +* Free up the pins used by the cape from the pinmux helpers. +*/ +&ocp { + P9_26_pinmux { status = "disabled"; }; + P9_24_pinmux { status = "disabled"; }; +}; + +&bone_i2c_3 { + // 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 69ef2c985caf4817a9e7d2e9944b838a72a70199 Mon Sep 17 00:00:00 2001 From: Deepak Khatri Date: Mon, 20 Jul 2020 10:53:45 +0530 Subject: [PATCH 5/9] update bone bus i2c overlays These changes enable flexible pin muxing from within the overlay! --- src/arm/BONE-I2C1-00A0.dts | 6 +++--- src/arm/BONE-I2C2-00A0.dts | 6 +++--- src/arm/BONE-I2C2A-00A0.dts | 7 +++---- src/arm/BONE-I2C3-00A0.dts | 7 +++---- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/arm/BONE-I2C1-00A0.dts b/src/arm/BONE-I2C1-00A0.dts index 64c7a2cb..f4241ea2 100644 --- a/src/arm/BONE-I2C1-00A0.dts +++ b/src/arm/BONE-I2C1-00A0.dts @@ -24,11 +24,11 @@ }; /* -* Free up the pins used by the cape from the pinmux helpers. +* Update the default pinmux of the pins */ &ocp { - P9_18_pinmux { status = "disabled"; }; - P9_17_pinmux { status = "disabled"; }; + P9_18_pinmux { pinctrl-0 = <&P9_18_i2c_pin>; }; /* i2c sda */ + P9_17_pinmux { pinctrl-0 = <&P9_17_i2c_pin>; }; /* i2c scl */ }; &bone_i2c_1 { diff --git a/src/arm/BONE-I2C2-00A0.dts b/src/arm/BONE-I2C2-00A0.dts index 64dde1aa..b8e97f69 100644 --- a/src/arm/BONE-I2C2-00A0.dts +++ b/src/arm/BONE-I2C2-00A0.dts @@ -24,11 +24,11 @@ }; /* -* Free up the pins used by the cape from the pinmux helpers. +* Update the default pinmux of the pins. */ &ocp { - P9_20_pinmux { status = "disabled"; }; - P9_19_pinmux { status = "disabled"; }; + P9_20_pinmux { pinctrl-0 = <&P9_20_i2c_pin>; }; /* i2c sda */ + P9_19_pinmux { pinctrl-0 = <&P9_19_i2c_pin>; }; /* i2c scl */ }; &bone_i2c_2 { diff --git a/src/arm/BONE-I2C2A-00A0.dts b/src/arm/BONE-I2C2A-00A0.dts index 104eca92..66253f64 100644 --- a/src/arm/BONE-I2C2A-00A0.dts +++ b/src/arm/BONE-I2C2A-00A0.dts @@ -5,7 +5,6 @@ * * Note: This can not be used along with BONE-I2C2-00A0 on BBB as * both uses i2c2 internally and only one can be used at a time. - * you have to edit the bbb-bone-buses.dtsi file to enable this! * * 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 @@ -25,11 +24,11 @@ }; /* -* Free up the pins used by the cape from the pinmux helpers. +* Update the default pinmux of the pins. */ &ocp { - P9_22_pinmux { status = "disabled"; }; - P9_21_pinmux { status = "disabled"; }; + P9_22_pinmux { pinctrl-0 = <&P9_22_i2c_pin>; }; /* i2c sda */ + P9_21_pinmux { pinctrl-0 = <&P9_21_i2c_pin>; }; /* i2c scl */ }; &bone_i2c_2a { diff --git a/src/arm/BONE-I2C3-00A0.dts b/src/arm/BONE-I2C3-00A0.dts index 72e9bd4c..c74cbe4b 100644 --- a/src/arm/BONE-I2C3-00A0.dts +++ b/src/arm/BONE-I2C3-00A0.dts @@ -5,7 +5,6 @@ * * Note: This can not be used along with BONE-I2C1-00A0 on BBB as * both uses i2c1 internally and only one can be used at a time. - * you have to edit the bbb-bone-buses.dtsi file to enable this! * * 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 @@ -25,11 +24,11 @@ }; /* -* Free up the pins used by the cape from the pinmux helpers. +* Update the default pinmux of the pins. */ &ocp { - P9_26_pinmux { status = "disabled"; }; - P9_24_pinmux { status = "disabled"; }; + P9_26_pinmux { pinctrl-0 = <&P9_26_i2c_pin>;}; /* i2c sda */ + P9_24_pinmux { pinctrl-0 = <&P9_24_i2c_pin>;}; /* i2c scl */ }; &bone_i2c_3 { From e1e2081e07a796baa63f8ed27cbf83c5cff7376b Mon Sep 17 00:00:00 2001 From: Deepak Khatri Date: Tue, 21 Jul 2020 23:20:07 +0530 Subject: [PATCH 6/9] update comments --- src/arm/BONE-I2C1-00A0.dts | 15 ++++++++++----- src/arm/BONE-I2C2-00A0.dts | 15 ++++++++++----- src/arm/BONE-I2C2A-00A0.dts | 15 ++++++++++----- src/arm/BONE-I2C3-00A0.dts | 15 ++++++++++----- 4 files changed, 40 insertions(+), 20 deletions(-) diff --git a/src/arm/BONE-I2C1-00A0.dts b/src/arm/BONE-I2C1-00A0.dts index f4241ea2..f71c8248 100644 --- a/src/arm/BONE-I2C1-00A0.dts +++ b/src/arm/BONE-I2C1-00A0.dts @@ -24,16 +24,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_18_pinmux { pinctrl-0 = <&P9_18_i2c_pin>; }; /* i2c sda */ P9_17_pinmux { pinctrl-0 = <&P9_17_i2c_pin>; }; /* i2c scl */ }; +/* + * 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_i2c_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 diff --git a/src/arm/BONE-I2C2-00A0.dts b/src/arm/BONE-I2C2-00A0.dts index b8e97f69..02b1833b 100644 --- a/src/arm/BONE-I2C2-00A0.dts +++ b/src/arm/BONE-I2C2-00A0.dts @@ -24,16 +24,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_20_pinmux { pinctrl-0 = <&P9_20_i2c_pin>; }; /* i2c sda */ P9_19_pinmux { pinctrl-0 = <&P9_19_i2c_pin>; }; /* i2c scl */ }; +/* + * 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_i2c_2 { - // 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-I2C2A-00A0.dts b/src/arm/BONE-I2C2A-00A0.dts index 66253f64..25be4ffc 100644 --- a/src/arm/BONE-I2C2A-00A0.dts +++ b/src/arm/BONE-I2C2A-00A0.dts @@ -24,16 +24,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_22_pinmux { pinctrl-0 = <&P9_22_i2c_pin>; }; /* i2c sda */ P9_21_pinmux { pinctrl-0 = <&P9_21_i2c_pin>; }; /* i2c scl */ }; +/* + * 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_i2c_2a { - // 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-I2C3-00A0.dts b/src/arm/BONE-I2C3-00A0.dts index c74cbe4b..57dfb847 100644 --- a/src/arm/BONE-I2C3-00A0.dts +++ b/src/arm/BONE-I2C3-00A0.dts @@ -24,16 +24,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_26_pinmux { pinctrl-0 = <&P9_26_i2c_pin>;}; /* i2c sda */ P9_24_pinmux { pinctrl-0 = <&P9_24_i2c_pin>;}; /* i2c scl */ }; +/* + * 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_i2c_3 { - // 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 09ec99b1e6655f84660d028fe94e7c36b82e9a2f Mon Sep 17 00:00:00 2001 From: Deepak Khatri Date: Wed, 22 Jul 2020 22:52:30 +0530 Subject: [PATCH 7/9] Renaming overlays --- src/arm/BONE-I2C1-00A0.dts | 44 ------------------------------------- src/arm/BONE-I2C2-00A0.dts | 44 ------------------------------------- src/arm/BONE-I2C2A-00A0.dts | 44 ------------------------------------- src/arm/BONE-I2C3-00A0.dts | 44 ------------------------------------- 4 files changed, 176 deletions(-) delete mode 100644 src/arm/BONE-I2C1-00A0.dts delete mode 100644 src/arm/BONE-I2C2-00A0.dts delete mode 100644 src/arm/BONE-I2C2A-00A0.dts delete mode 100644 src/arm/BONE-I2C3-00A0.dts diff --git a/src/arm/BONE-I2C1-00A0.dts b/src/arm/BONE-I2C1-00A0.dts deleted file mode 100644 index f71c8248..00000000 --- a/src/arm/BONE-I2C1-00A0.dts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2020 Deepak Khatri - * - * Virtual cape for /bone/i2c/1 - * - * Note: This can not be used along with BONE-I2C3-00A0 on BBB as - * both uses i2c1 internally and only one can be used at a time. - * - * 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-I2C1-00A0 = __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_18_pinmux { pinctrl-0 = <&P9_18_i2c_pin>; }; /* i2c sda */ - P9_17_pinmux { pinctrl-0 = <&P9_17_i2c_pin>; }; /* i2c scl */ -}; - -/* - * 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_i2c_1 { - status = "okay"; -}; \ No newline at end of file diff --git a/src/arm/BONE-I2C2-00A0.dts b/src/arm/BONE-I2C2-00A0.dts deleted file mode 100644 index 02b1833b..00000000 --- a/src/arm/BONE-I2C2-00A0.dts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2020 Deepak Khatri - * - * Virtual cape for /bone/i2c/2 - * - * Note: This can not be used along with BONE-I2C2A-00A0 on BBB as - * both uses i2c2 internally and only one can be used at a time. - * - * 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-I2C2-00A0 = __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_20_pinmux { pinctrl-0 = <&P9_20_i2c_pin>; }; /* i2c sda */ - P9_19_pinmux { pinctrl-0 = <&P9_19_i2c_pin>; }; /* i2c scl */ -}; - -/* - * 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_i2c_2 { - status = "okay"; -}; \ No newline at end of file diff --git a/src/arm/BONE-I2C2A-00A0.dts b/src/arm/BONE-I2C2A-00A0.dts deleted file mode 100644 index 25be4ffc..00000000 --- a/src/arm/BONE-I2C2A-00A0.dts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2020 Deepak Khatri - * - * Virtual cape for /bone/i2c/2a (only on BBB) - * - * Note: This can not be used along with BONE-I2C2-00A0 on BBB as - * both uses i2c2 internally and only one can be used at a time. - * - * 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-I2C2A-00A0 = __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_22_pinmux { pinctrl-0 = <&P9_22_i2c_pin>; }; /* i2c sda */ - P9_21_pinmux { pinctrl-0 = <&P9_21_i2c_pin>; }; /* i2c scl */ -}; - -/* - * 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_i2c_2a { - status = "okay"; -}; \ No newline at end of file diff --git a/src/arm/BONE-I2C3-00A0.dts b/src/arm/BONE-I2C3-00A0.dts deleted file mode 100644 index 57dfb847..00000000 --- a/src/arm/BONE-I2C3-00A0.dts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2020 Deepak Khatri - * - * Virtual cape for /bone/i2c/3 - * - * Note: This can not be used along with BONE-I2C1-00A0 on BBB as - * both uses i2c1 internally and only one can be used at a time. - * - * 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-I2C3-00A0 = __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_26_pinmux { pinctrl-0 = <&P9_26_i2c_pin>;}; /* i2c sda */ - P9_24_pinmux { pinctrl-0 = <&P9_24_i2c_pin>;}; /* i2c scl */ -}; - -/* - * 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_i2c_3 { - status = "okay"; -}; \ No newline at end of file From 67240678b181316bbe7747f239faf5f9fceeb6d7 Mon Sep 17 00:00:00 2001 From: Deepak Khatri Date: Wed, 22 Jul 2020 22:52:47 +0530 Subject: [PATCH 8/9] Updated bone bust I2C DT overlays --- src/arm/BONE-I2C1.dts | 44 ++++++++++++++++++++++++++++++++++++++++++ src/arm/BONE-I2C2.dts | 44 ++++++++++++++++++++++++++++++++++++++++++ src/arm/BONE-I2C2A.dts | 44 ++++++++++++++++++++++++++++++++++++++++++ src/arm/BONE-I2C3.dts | 44 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 176 insertions(+) create mode 100644 src/arm/BONE-I2C1.dts create mode 100644 src/arm/BONE-I2C2.dts create mode 100644 src/arm/BONE-I2C2A.dts create mode 100644 src/arm/BONE-I2C3.dts diff --git a/src/arm/BONE-I2C1.dts b/src/arm/BONE-I2C1.dts new file mode 100644 index 00000000..bf2ef23d --- /dev/null +++ b/src/arm/BONE-I2C1.dts @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2020 Deepak Khatri + * + * Virtual cape for /bone/i2c/1 + * + * Note: This can not be used along with BONE-I2C3-00A0 on BBB as + * both uses i2c1 internally and only one can be used at a time. + * + * 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-I2C1 = __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_18_pinmux { pinctrl-0 = <&P9_18_i2c_pin>; }; /* i2c sda */ + P9_17_pinmux { pinctrl-0 = <&P9_17_i2c_pin>; }; /* i2c scl */ +}; + +/* + * 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_i2c_1 { + status = "okay"; +}; \ No newline at end of file diff --git a/src/arm/BONE-I2C2.dts b/src/arm/BONE-I2C2.dts new file mode 100644 index 00000000..0c337e5d --- /dev/null +++ b/src/arm/BONE-I2C2.dts @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2020 Deepak Khatri + * + * Virtual cape for /bone/i2c/2 + * + * Note: This can not be used along with BONE-I2C2A-00A0 on BBB as + * both uses i2c2 internally and only one can be used at a time. + * + * 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-I2C2 = __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_20_pinmux { pinctrl-0 = <&P9_20_i2c_pin>; }; /* i2c sda */ + P9_19_pinmux { pinctrl-0 = <&P9_19_i2c_pin>; }; /* i2c scl */ +}; + +/* + * 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_i2c_2 { + status = "okay"; +}; \ No newline at end of file diff --git a/src/arm/BONE-I2C2A.dts b/src/arm/BONE-I2C2A.dts new file mode 100644 index 00000000..b92d84ab --- /dev/null +++ b/src/arm/BONE-I2C2A.dts @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2020 Deepak Khatri + * + * Virtual cape for /bone/i2c/2a (only on BBB) + * + * Note: This can not be used along with BONE-I2C2-00A0 on BBB as + * both uses i2c2 internally and only one can be used at a time. + * + * 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-I2C2A = __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_22_pinmux { pinctrl-0 = <&P9_22_i2c_pin>; }; /* i2c sda */ + P9_21_pinmux { pinctrl-0 = <&P9_21_i2c_pin>; }; /* i2c scl */ +}; + +/* + * 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_i2c_2a { + status = "okay"; +}; \ No newline at end of file diff --git a/src/arm/BONE-I2C3.dts b/src/arm/BONE-I2C3.dts new file mode 100644 index 00000000..72a1e3f7 --- /dev/null +++ b/src/arm/BONE-I2C3.dts @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2020 Deepak Khatri + * + * Virtual cape for /bone/i2c/3 + * + * Note: This can not be used along with BONE-I2C1-00A0 on BBB as + * both uses i2c1 internally and only one can be used at a time. + * + * 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-I2C3 = __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_26_pinmux { pinctrl-0 = <&P9_26_i2c_pin>;}; /* i2c sda */ + P9_24_pinmux { pinctrl-0 = <&P9_24_i2c_pin>;}; /* i2c scl */ +}; + +/* + * 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_i2c_3 { + status = "okay"; +}; \ No newline at end of file From 2a25b1ad579ed530a5f7b346f8a20edace3c1876 Mon Sep 17 00:00:00 2001 From: Deepak Khatri Date: Wed, 29 Jul 2020 18:28:49 +0530 Subject: [PATCH 9/9] update links (Bone bus I2C) --- src/arm/BONE-I2C1.dts | 8 ++++---- src/arm/BONE-I2C2.dts | 8 ++++---- src/arm/BONE-I2C2A.dts | 8 ++++---- src/arm/BONE-I2C3.dts | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/arm/BONE-I2C1.dts b/src/arm/BONE-I2C1.dts index bf2ef23d..095d8fb9 100644 --- a/src/arm/BONE-I2C1.dts +++ b/src/arm/BONE-I2C1.dts @@ -26,8 +26,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_18_pinmux { pinctrl-0 = <&P9_18_i2c_pin>; }; /* i2c sda */ @@ -36,8 +36,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_i2c_1 { status = "okay"; diff --git a/src/arm/BONE-I2C2.dts b/src/arm/BONE-I2C2.dts index 0c337e5d..d3e65e3f 100644 --- a/src/arm/BONE-I2C2.dts +++ b/src/arm/BONE-I2C2.dts @@ -26,8 +26,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_20_pinmux { pinctrl-0 = <&P9_20_i2c_pin>; }; /* i2c sda */ @@ -36,8 +36,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_i2c_2 { status = "okay"; diff --git a/src/arm/BONE-I2C2A.dts b/src/arm/BONE-I2C2A.dts index b92d84ab..f2b7c46c 100644 --- a/src/arm/BONE-I2C2A.dts +++ b/src/arm/BONE-I2C2A.dts @@ -26,8 +26,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_22_pinmux { pinctrl-0 = <&P9_22_i2c_pin>; }; /* i2c sda */ @@ -36,8 +36,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_i2c_2a { status = "okay"; diff --git a/src/arm/BONE-I2C3.dts b/src/arm/BONE-I2C3.dts index 72a1e3f7..3694f19e 100644 --- a/src/arm/BONE-I2C3.dts +++ b/src/arm/BONE-I2C3.dts @@ -26,8 +26,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_26_pinmux { pinctrl-0 = <&P9_26_i2c_pin>;}; /* i2c sda */ @@ -36,8 +36,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_i2c_3 { status = "okay";