arm64: dts: qcom: db845c: Add support for MCP2517FD
PATCH 1/1 arm64: dts: qcom: db845c: Add support for MCP2517FD
Add support for onboard MCP2517FD SPI CAN transceiver attached to SPI0 of RB3.
--- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-db845c.dts +23 -0
@@ -28,6 +28,13 @@ chosen { stdout-path = "serial0:115200n8"; }; + /* Fixed crystal oscillator dedicated to MCP2517FD */ + clk40M: can_clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <40000000>; + }; + dc12v: dc12v-regulator { compatible = "regulator-fixed"; regulator-name = "DC12V";
@@ -746,6 +753,22 @@ codec { }; }; +&spi0 { + /* On Low speed expansion */ + status = "okay"; + + can@0 { + compatible = "microchip,mcp2517fd"; + reg = <0>; + clocks = <&clk40M>; + interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>; + spi-max-frequency = <10000000>; + vdd-supply = <&vdc_5v>; + xceiver-supply = <&vdc_5v>; + status = "okay"; + }; +}; + &spi2 { /* On Low speed expansion */ label = "LS-SPI0";
Signature · 1 line
2.34.1
Quoted 27 lines · Vinod Koul
Add support for onboard MCP2517FD SPI CAN transceiver attached to SPI0 of RB3.
Signed-off-by Vinod Koul <[email protected]>--- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)arch/arm64/boot/dts/qcom/sdm845-db845c.dts +7
-0@@ -28,6 +28,13 @@ chosen { stdout-path = "serial0:115200n8"; }; + /* Fixed crystal oscillator dedicated to MCP2517FD */ + clk40M: can_clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <40000000>; + }; + dc12v: dc12v-regulator { compatible = "regulator-fixed"; regulator-name = "DC12V";
arch/arm64/boot/dts/qcom/sdm845-db845c.dts codec { · line 757
Quoted 5 lines
arch/arm64/boot/dts/qcom/sdm845-db845c.dts +2
-0@@ -746,6 +753,22 @@ codec { }; }; +&spi0 { + /* On Low speed expansion */
Only SPI2 is exposed on the LS header. This one is dedicated to CAN controller.
arch/arm64/boot/dts/qcom/sdm845-db845c.dts codec { · line 758
Quoted 1 line
arch/arm64/boot/dts/qcom/sdm845-db845c.dts +1
-0+ status = "okay";
No chip select? Since CAN controller may operate at higher frequencies, it makes sense to increase the drive strength of the pins.
Thanks,
Mani
Quoted 19 lines
arch/arm64/boot/dts/qcom/sdm845-db845c.dts +13
-0+ + can@0 { + compatible = "microchip,mcp2517fd"; + reg = <0>; + clocks = <&clk40M>; + interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>; + spi-max-frequency = <10000000>; + vdd-supply = <&vdc_5v>; + xceiver-supply = <&vdc_5v>; + status = "okay"; + }; +}; + &spi2 { /* On Low speed expansion */ label = "LS-SPI0";Signature · 1 line
2.34.1
Quoted 31 lines · Manivannan Sadhasivam
Quoted 30 lines · Vinod Koul
Add support for onboard MCP2517FD SPI CAN transceiver attached to SPI0 of RB3.
Signed-off-by Vinod Koul <[email protected]>--- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)arch/arm64/boot/dts/qcom/sdm845-db845c.dts +7
-0@@ -28,6 +28,13 @@ chosen { stdout-path = "serial0:115200n8"; }; + /* Fixed crystal oscillator dedicated to MCP2517FD */ + clk40M: can_clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <40000000>; + }; + dc12v: dc12v-regulator { compatible = "regulator-fixed"; regulator-name = "DC12V";@@ -746,6 +753,22 @@ codec { }; };
Quoted 4 lines
arch/arm64/boot/dts/qcom/sdm845-db845c.dts codec { · line 757
Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845-db845c.dts +2
-0+&spi0 { + /* On Low speed expansion */Only SPI2 is exposed on the LS header. This one is dedicated to CAN controller.
ok
Quoted 5 lines
arch/arm64/boot/dts/qcom/sdm845-db845c.dts codec { · line 758
Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845-db845c.dts +1
-0+ status = "okay";No chip select? Since CAN controller may operate at higher frequencies, it makes sense to increase the drive strength of the pins.
Okay will add and send v2
Signature · 1 line
~Vinod