linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] arm64: dts: qcom: db845c: Add support for MCP2517FD
@ 2022-04-21  7:34 Vinod Koul
  2022-04-21  7:38 ` Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vinod Koul @ 2022-04-21  7:34 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: linux-arm-msm, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	devicetree, linux-kernel, Manivannan Sadhasivam

Add support for onboard MCP2517FD SPI CAN transceiver attached to
SPI0 of RB3.

Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
Change in v3:
 - change underscore(_) to dash (-) in can-clock node name
 - remove superfluous status = okay in can node

Changes in v2:
 - add cs and pinctrl config
 - remove misleading comment

 arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
index 28fe45c5d516..d2ade684703d 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
@@ -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,23 @@ codec {
 	};
 };
 
+&spi0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&qup_spi0_default>;
+	cs-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>;
+
+	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>;
+	};
+};
+
 &spi2 {
 	/* On Low speed expansion */
 	label = "LS-SPI0";
@@ -1219,3 +1243,11 @@ ov7251_ep: endpoint {
 		};
 	};
 };
+
+/* PINCTRL - additions to nodes defined in sdm845.dtsi */
+&qup_spi0_default {
+	config {
+		drive-strength = <6>;
+		bias-disable;
+	};
+};
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] arm64: dts: qcom: db845c: Add support for MCP2517FD
  2022-04-21  7:34 [PATCH v3] arm64: dts: qcom: db845c: Add support for MCP2517FD Vinod Koul
@ 2022-04-21  7:38 ` Krzysztof Kozlowski
  2022-04-21 13:00 ` Manivannan Sadhasivam
  2022-04-23 16:03 ` (subset) " Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-21  7:38 UTC (permalink / raw)
  To: Vinod Koul, Bjorn Andersson
  Cc: linux-arm-msm, Rob Herring, Krzysztof Kozlowski, devicetree,
	linux-kernel, Manivannan Sadhasivam

On 21/04/2022 09:34, Vinod Koul wrote:
> Add support for onboard MCP2517FD SPI CAN transceiver attached to
> SPI0 of RB3.
> 
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> ---
> Change in v3:
>  - change underscore(_) to dash (-) in can-clock node name
>  - remove superfluous status = okay in can node

FWIW:
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] arm64: dts: qcom: db845c: Add support for MCP2517FD
  2022-04-21  7:34 [PATCH v3] arm64: dts: qcom: db845c: Add support for MCP2517FD Vinod Koul
  2022-04-21  7:38 ` Krzysztof Kozlowski
@ 2022-04-21 13:00 ` Manivannan Sadhasivam
  2022-04-23 16:03 ` (subset) " Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Manivannan Sadhasivam @ 2022-04-21 13:00 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Bjorn Andersson, linux-arm-msm, Rob Herring, Krzysztof Kozlowski,
	devicetree, linux-kernel

On Thu, Apr 21, 2022 at 01:04:38PM +0530, Vinod Koul wrote:
> Add support for onboard MCP2517FD SPI CAN transceiver attached to
> SPI0 of RB3.
> 
> Signed-off-by: Vinod Koul <vkoul@kernel.org>

One comment below but irrespective of that,

Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>

Thanks,
Mani

> ---
> Change in v3:
>  - change underscore(_) to dash (-) in can-clock node name
>  - remove superfluous status = okay in can node
> 
> Changes in v2:
>  - add cs and pinctrl config
>  - remove misleading comment
> 
>  arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 32 ++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> index 28fe45c5d516..d2ade684703d 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> @@ -28,6 +28,13 @@ chosen {
>  		stdout-path = "serial0:115200n8";
>  	};
>  
> +	/* Fixed crystal oscillator dedicated to MCP2517FD */
> +	clk40M: can-clock {

clock@?

> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +		clock-frequency = <40000000>;
> +	};
> +
>  	dc12v: dc12v-regulator {
>  		compatible = "regulator-fixed";
>  		regulator-name = "DC12V";
> @@ -746,6 +753,23 @@ codec {
>  	};
>  };
>  
> +&spi0 {
> +	status = "okay";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&qup_spi0_default>;
> +	cs-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>;
> +
> +	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>;
> +	};
> +};
> +
>  &spi2 {
>  	/* On Low speed expansion */
>  	label = "LS-SPI0";
> @@ -1219,3 +1243,11 @@ ov7251_ep: endpoint {
>  		};
>  	};
>  };
> +
> +/* PINCTRL - additions to nodes defined in sdm845.dtsi */
> +&qup_spi0_default {
> +	config {
> +		drive-strength = <6>;
> +		bias-disable;
> +	};
> +};
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (subset) [PATCH v3] arm64: dts: qcom: db845c: Add support for MCP2517FD
  2022-04-21  7:34 [PATCH v3] arm64: dts: qcom: db845c: Add support for MCP2517FD Vinod Koul
  2022-04-21  7:38 ` Krzysztof Kozlowski
  2022-04-21 13:00 ` Manivannan Sadhasivam
@ 2022-04-23 16:03 ` Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2022-04-23 16:03 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Manivannan Sadhasivam, Krzysztof Kozlowski, linux-kernel,
	devicetree, linux-arm-msm, Rob Herring

On Thu, 21 Apr 2022 13:04:38 +0530, Vinod Koul wrote:
> Add support for onboard MCP2517FD SPI CAN transceiver attached to
> SPI0 of RB3.
> 
> 

Applied, thanks!

[1/1] arm64: dts: qcom: db845c: Add support for MCP2517FD
      commit: cb29e7106d4ee7bc3860fc65d28b6d7d0b71c0f8

Best regards,
-- 
Bjorn Andersson <bjorn.andersson@linaro.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-23 16:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21  7:34 [PATCH v3] arm64: dts: qcom: db845c: Add support for MCP2517FD Vinod Koul
2022-04-21  7:38 ` Krzysztof Kozlowski
2022-04-21 13:00 ` Manivannan Sadhasivam
2022-04-23 16:03 ` (subset) " Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).