diff --git a/src/arm/BONE-I2C1.dts b/src/arm/BONE-I2C1.dts new file mode 100644 index 00000000..095d8fb9 --- /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/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 */ + 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/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"; +}; \ 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..d3e65e3f --- /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/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 */ + 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/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"; +}; \ 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..f2b7c46c --- /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/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 */ + 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/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"; +}; \ 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..3694f19e --- /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/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 */ + 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/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"; +}; \ No newline at end of file