Last active
March 12, 2018 20:54
-
-
Save wilkinsw/14596abb75073acae392f7d9c29a7e8f to your computer and use it in GitHub Desktop.
Enabling MCP251x SPI CAN Controller Driver in Jetson TX1 (J23 SPI0)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, but WITHOUT | |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
* more details. | |
* | |
* You should have received a copy of the GNU General Public License | |
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |
*/ | |
/* | |
* Valid for Linux4Tegra v28.1 | |
* | |
* J21 Header SPI1 == bus_num 0 | |
* Expansion SPI0 == bus_num 3 | |
* Expansion SPI2 == bus_num 1 | |
*/ | |
/ { | |
clocks { | |
/* 16MHz external crystal oscillator */ | |
clk16m: mcp251x_osc { | |
#clock-cells = <0>; | |
compatible = "fixed-clock"; | |
clock-frequency = <16000000>; | |
}; | |
}; | |
pinmux@700008d4 { | |
common { | |
touch_rst_pv6 { | |
nvidia,pins = "touch_rst_pv6"; | |
nvidia,pull = <0x2>; | |
nvidia,tristate = <0x0>; | |
nvidia,enable-input = <TEGRA_PIN_ENABLE>; | |
}; | |
}; | |
}; | |
/* J23 Expansion Connector SPI0 */ | |
/* Note the difference in numbering between the connector and device */ | |
spi@7000da00 { | |
status = "okay"; | |
spi-max-frequency = <2000000>; | |
can@0 { | |
#address-cells = <0x1>; | |
#size-cells = <0x0>; | |
compatible = "microchip,mcp2515"; | |
reg = <0x0>; | |
clocks = <&clk16m>; | |
interrupt-parent = <&gpio>; | |
interrupts = <TEGRA_GPIO(V, 6) IRQ_TYPE_EDGE_FALLING>; | |
spi-max-frequency = <2000000>; | |
vdd-supply = <&max77620_ldo5>; | |
xceiver-supply = <&max77620_ldo5>; | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment