That’s not what I want. I want to have an overlay file that I can apply with jetson-io.py tool. There’s some documentation about this in here: Configuring the Jetson Expansion Headers — Jetson Linux<br/>Developer Guide 34.1 documentation but information feels limited.
I already have an overlay that works with L4T 32.7.2 but not with L4T 35.1. What I want to know is what changes are necessary to get the overlay working with L4T 35.1.
Here’s the overlay file:
/dts-v1/;
/plugin/;
/ {
overlay-name = "MCP251x CAN Controller";
compatible = "nvidia,p3449-0000+p3668-0000\0nvidia,p3509-0000+p3668-0000\0nvidia,tegra194";
jetson-header-name = "Jetson 40pin Header";
fragment@0 {
target-path = "/";
__overlay__ {
clocks {
mcp251x_osc: mcp251x_osc{
status = "okay";
clock-output-names = "mcp251x_osc";
clock-accuracy = <0x64>;
clock-frequency = <0xb71b00>;
#clock-cells = <0x0>;
compatible = "fixed-clock";
};
};
};
};
fragment@1 {
target = <&pinmux>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = < &expheaderpinmux >;
expheaderpinmux: exp-header-pinmux {
hdr40-pin26 {
nvidia,lpdr = <0x00>;
nvidia,enable-input = <0x01>;
nvidia,tristate = <0x00>;
nvidia,pull = <0x02>;
nvidia,function = "spi1";
nvidia,pins = "spi1_cs1_pz7";
};
hdr40-pin24 {
nvidia,lpdr = <0x00>;
nvidia,enable-input = <0x01>;
nvidia,tristate = <0x00>;
nvidia,pull = <0x02>;
nvidia,function = "spi1";
nvidia,pins = "spi1_cs0_pz6";
};
hdr40-pin23 {
nvidia,lpdr = <0x00>;
nvidia,enable-input = <0x01>;
nvidia,tristate = <0x00>;
nvidia,pull = <0x01>;
nvidia,function = "spi1";
nvidia,pins = "spi1_sck_pz3";
};
hdr40-pin22 {
nvidia,lpdr = <0x00>;
nvidia,enable-input = <0x1>;
nvidia,tristate = <0x0>;
nvidia,pull = <0x2>;
nvidia,function = "rsvd1";
nvidia,pins = "spi3_miso_py1";
};
hdr40-pin21 {
nvidia,lpdr = <0x00>;
nvidia,enable-input = <0x01>;
nvidia,tristate = <0x00>;
nvidia,pull = <0x01>;
nvidia,function = "spi1";
nvidia,pins = "spi1_miso_pz4";
};
hdr40-pin19 {
nvidia,lpdr = <0x00>;
nvidia,enable-input = <0x01>;
nvidia,tristate = <0x00>;
nvidia,pull = <0x01>;
nvidia,function = "spi1";
nvidia,pins = "spi1_mosi_pz5";
};
};
};
};
fragment@2 {
target = <&spi0>;
__overlay__ {
nvidia,always-hw-cs;
#address-cells = <0x1>;
#size-cells = <0x0>;
can@0{
status = "okay";
compatible = "microchip,mcp2515";
reg = <0x0>;
spi-max-frequency = <0x1e8480>;
nvidia,rx-clk-tap-delay = <0x7>;
clocks = <&mcp251x_osc>;
interrupt-parent = <0x0c>;
/*interrupt-parent = < &tegra_main_gpio>;/*
interrupts = <0xc1 0x1>; /*gpio y1 pin 22 spi3_miso_py1> */
controller-data {
nvidia,tx-clk-tap-delay = <0x0>;
nvidia,rx-clk-tap-delay = <0x1f>;
nvidia,cs-hold-clk-count = <0x1e>;
nvidia,cs-setup-clk-count = <0x1e>;
nvidia,enable-hw-based-cs;
};
};
};
};
};
I know that hdr40-pin22 nvidia,function needs to be something else than “rsvd1” because jetson-io.py won’t accept that value. But I don’t know what values are accepted and I cannot find documentation for nvidia,function. Value “spi3” is accepted by jetson-io.py but I’m not sure if it can be used for interrupt pin
I also belive that can@0 interrupts needs to be changed from <0xc1 0x1> to <0x1e5 0x1> but I haven’t got confirmation for this.
When I try these changes I get error: “mcp251x spi0.0: failed to acquire irq 0” in dmesg when I try to bring up can interface, so there’s still some errors in the dts file, but I cannot figure out what those errors are.