arm64: dts: qcom: qrb5165-rb5: Add support for MCP2518FD
diff mbox series

Message ID 20201127173044.55144-1-manivannan.sadhasivam@linaro.org
State Accepted
Commit 5c44c564e4491758124050643f00c6bad9bfbea8
Headers show
Series
  • arm64: dts: qcom: qrb5165-rb5: Add support for MCP2518FD
Related show

Commit Message

Manivannan Sadhasivam Nov. 27, 2020, 5:30 p.m. UTC
Add support for onboard MCP2518FD SPI CAN transceiver attached to SPI0
of RB5.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Dmitry Baryshkov Nov. 28, 2020, 10:54 p.m. UTC | #1
On 27/11/2020 20:30, Manivannan Sadhasivam wrote:
> Add support for onboard MCP2518FD SPI CAN transceiver attached to SPI0
> of RB5.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> ---
>   arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 17 +++++++++++++++++
>   1 file changed, 17 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
> index d9f52703ba2a..ce22d4fa383e 100644
> --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
> +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
> @@ -25,6 +25,13 @@ chosen {
>   		stdout-path = "serial0:115200n8";
>   	};
>   
> +	/* Fixed crystal oscillator dedicated to MCP2518FD */
> +	clk40M: can_clock {
> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +		clock-frequency = <40000000>;
> +	};
> +
>   	dc12v: dc12v-regulator {
>   		compatible = "regulator-fixed";
>   		regulator-name = "DC12V";
> @@ -493,6 +500,16 @@ &sdhc_2 {
>   /* CAN */
>   &spi0 {
>   	status = "okay";
> +
> +	can@0 {
> +		compatible = "microchip,mcp2518fd";
> +		reg = <0>;
> +		clocks = <&clk40M>;
> +		interrupts-extended = <&tlmm 15 IRQ_TYPE_LEVEL_LOW>;
> +		spi-max-frequency = <10000000>;
> +		vdd-supply = <&vdc_5v>;
> +		xceiver-supply = <&vdc_5v>;
> +	};
>   };
>   
>   &tlmm {
>

Patch
diff mbox series

diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
index d9f52703ba2a..ce22d4fa383e 100644
--- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
+++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
@@ -25,6 +25,13 @@  chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
+	/* Fixed crystal oscillator dedicated to MCP2518FD */
+	clk40M: can_clock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <40000000>;
+	};
+
 	dc12v: dc12v-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "DC12V";
@@ -493,6 +500,16 @@  &sdhc_2 {
 /* CAN */
 &spi0 {
 	status = "okay";
+
+	can@0 {
+		compatible = "microchip,mcp2518fd";
+		reg = <0>;
+		clocks = <&clk40M>;
+		interrupts-extended = <&tlmm 15 IRQ_TYPE_LEVEL_LOW>;
+		spi-max-frequency = <10000000>;
+		vdd-supply = <&vdc_5v>;
+		xceiver-supply = <&vdc_5v>;
+	};
 };
 
 &tlmm {