linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Enable flexcan support in LS1028A/LX2160A
@ 2021-01-11  7:38 Kuldeep Singh
  2021-01-11  7:38 ` [PATCH 1/3] arm64: dts: lx2160a: Add flexcan support Kuldeep Singh
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kuldeep Singh @ 2021-01-11  7:38 UTC (permalink / raw)
  To: Shawn Guo, devicetree, linux-kernel; +Cc: Joakim Zhang, Kuldeep Singh

This patch set adds device-tree support for LX2160A-RDB/QDS.

Also, update flexcan entry for LS1028A and enable support further for
LS1028A-RDB/QDS.

Patch1: Add dtsi and dts properties for LX2160A
Patch2: Update dtsi properties for LS1028A
Patch3: Add dts properties for LS1028A.

Kuldeep Singh (3):
  arm64: dts: lx2160a: Add flexcan support
  arm64: dtsi: ls1028a: Update flexcan properties
  arm64: dts: ls1028a: Enable flexcan support for LS1028A-RDB/QDS

 arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts |  8 ++++++++
 arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts | 16 ++++++++++++++++
 arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi    |  8 ++++----
 arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts |  8 ++++++++
 arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts | 16 ++++++++++++++++
 arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi    | 20 ++++++++++++++++++++
 6 files changed, 72 insertions(+), 4 deletions(-)

-- 
2.7.4


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

* [PATCH 1/3] arm64: dts: lx2160a: Add flexcan support
  2021-01-11  7:38 [PATCH 0/3] Enable flexcan support in LS1028A/LX2160A Kuldeep Singh
@ 2021-01-11  7:38 ` Kuldeep Singh
  2021-01-18  1:37   ` Shawn Guo
  2021-01-11  7:38 ` [PATCH 2/3] arm64: dtsi: ls1028a: Update flexcan properties Kuldeep Singh
  2021-01-11  7:38 ` [PATCH 3/3] arm64: dts: ls1028a: Enable flexcan support for LS1028A-RDB/QDS Kuldeep Singh
  2 siblings, 1 reply; 6+ messages in thread
From: Kuldeep Singh @ 2021-01-11  7:38 UTC (permalink / raw)
  To: Shawn Guo, devicetree, linux-kernel; +Cc: Joakim Zhang, Kuldeep Singh

LX2160A supports two flexcan controllers. Add the support.
Enable support further for LX2160A-RDB/QDS.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
---
 arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts |  8 ++++++++
 arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts | 16 ++++++++++++++++
 arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi    | 20 ++++++++++++++++++++
 3 files changed, 44 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts
index 16ae3b0..d858d9c 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts
@@ -33,6 +33,14 @@
 	};
 };
 
+&can0 {
+	status = "okay";
+};
+
+&can1 {
+	status = "okay";
+};
+
 &crypto {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
index 6f82759..5dbf274 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
@@ -89,6 +89,22 @@
 	};
 };
 
+&can0 {
+	status = "okay";
+
+	can-transceiver {
+		max-bitrate = <5000000>;
+	};
+};
+
+&can1 {
+	status = "okay";
+
+	can-transceiver {
+		max-bitrate = <5000000>;
+	};
+};
+
 &esdhc0 {
 	sd-uhs-sdr104;
 	sd-uhs-sdr50;
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
index 0d4bce1..63a3ef6 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
@@ -878,6 +878,26 @@
 			status = "disabled";
 		};
 
+		can0: can@2180000 {
+			compatible = "fsl,lx2160ar1-flexcan";
+			reg = <0x0 0x2180000 0x0 0x10000>;
+			interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clockgen 4 7>, <&sysclk>;
+			clock-names = "ipg", "per";
+			fsl,clk-source = <0>;
+			status = "disabled";
+		};
+
+		can1: can@2190000 {
+			compatible = "fsl,lx2160ar1-flexcan";
+			reg = <0x0 0x2190000 0x0 0x10000>;
+			interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clockgen 4 7>, <&sysclk>;
+			clock-names = "ipg", "per";
+			fsl,clk-source = <0>;
+			status = "disabled";
+		};
+
 		uart0: serial@21c0000 {
 			compatible = "arm,sbsa-uart","arm,pl011";
 			reg = <0x0 0x21c0000 0x0 0x1000>;
-- 
2.7.4


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

* [PATCH 2/3] arm64: dtsi: ls1028a: Update flexcan properties
  2021-01-11  7:38 [PATCH 0/3] Enable flexcan support in LS1028A/LX2160A Kuldeep Singh
  2021-01-11  7:38 ` [PATCH 1/3] arm64: dts: lx2160a: Add flexcan support Kuldeep Singh
@ 2021-01-11  7:38 ` Kuldeep Singh
  2021-01-11  7:38 ` [PATCH 3/3] arm64: dts: ls1028a: Enable flexcan support for LS1028A-RDB/QDS Kuldeep Singh
  2 siblings, 0 replies; 6+ messages in thread
From: Kuldeep Singh @ 2021-01-11  7:38 UTC (permalink / raw)
  To: Shawn Guo, devicetree, linux-kernel; +Cc: Joakim Zhang, Kuldeep Singh

LS1028A supports two flexcan controllers similar to LX2160A.

There's already a compatible entry defined i.e "fsl,lx2160ar1-flexcan"
which can be further reused for LS1028A.
Please note, "fsl,ls1028ar1-flexcan" compatible entry doesn't exists and
can be safely removed.

LS1028A has a single peripheral clock (i.e platform clock) source
connected to both "ipg" and "per" and therefore, remove "sysclk" as
clock source from device-tree.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
---
 arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
index 60ff19f..447d3b6 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
@@ -395,19 +395,19 @@
 		};
 
 		can0: can@2180000 {
-			compatible = "fsl,ls1028ar1-flexcan", "fsl,lx2160ar1-flexcan";
+			compatible = "fsl,lx2160ar1-flexcan";
 			reg = <0x0 0x2180000 0x0 0x10000>;
 			interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&sysclk>, <&clockgen 4 1>;
+			clocks = <&clockgen 4 1>, <&clockgen 4 1>;
 			clock-names = "ipg", "per";
 			status = "disabled";
 		};
 
 		can1: can@2190000 {
-			compatible = "fsl,ls1028ar1-flexcan", "fsl,lx2160ar1-flexcan";
+			compatible = "fsl,lx2160ar1-flexcan";
 			reg = <0x0 0x2190000 0x0 0x10000>;
 			interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&sysclk>, <&clockgen 4 1>;
+			clocks = <&clockgen 4 1>, <&clockgen 4 1>;
 			clock-names = "ipg", "per";
 			status = "disabled";
 		};
-- 
2.7.4


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

* [PATCH 3/3] arm64: dts: ls1028a: Enable flexcan support for LS1028A-RDB/QDS
  2021-01-11  7:38 [PATCH 0/3] Enable flexcan support in LS1028A/LX2160A Kuldeep Singh
  2021-01-11  7:38 ` [PATCH 1/3] arm64: dts: lx2160a: Add flexcan support Kuldeep Singh
  2021-01-11  7:38 ` [PATCH 2/3] arm64: dtsi: ls1028a: Update flexcan properties Kuldeep Singh
@ 2021-01-11  7:38 ` Kuldeep Singh
  2 siblings, 0 replies; 6+ messages in thread
From: Kuldeep Singh @ 2021-01-11  7:38 UTC (permalink / raw)
  To: Shawn Guo, devicetree, linux-kernel; +Cc: Joakim Zhang, Kuldeep Singh

LS1028A-RDB/QDS provides support for flexcan. Add the properties.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
---
 arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts |  8 ++++++++
 arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts | 16 ++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
index c0786b7..fbcba9c 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
@@ -109,6 +109,14 @@
 	};
 };
 
+&can0 {
+	status = "okay";
+};
+
+&can1 {
+	status = "okay";
+};
+
 &dspi0 {
 	bus-num = <0>;
 	status = "okay";
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts
index c1d1ba4..41ae6e76 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts
@@ -85,6 +85,22 @@
 	};
 };
 
+&can0 {
+	status = "okay";
+
+	can-transceiver {
+		max-bitrate = <5000000>;
+	};
+};
+
+&can1 {
+	status = "okay";
+
+	can-transceiver {
+		max-bitrate = <5000000>;
+	};
+};
+
 &esdhc {
 	sd-uhs-sdr104;
 	sd-uhs-sdr50;
-- 
2.7.4


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

* Re: [PATCH 1/3] arm64: dts: lx2160a: Add flexcan support
  2021-01-11  7:38 ` [PATCH 1/3] arm64: dts: lx2160a: Add flexcan support Kuldeep Singh
@ 2021-01-18  1:37   ` Shawn Guo
  2021-01-18  6:45     ` [EXT] " Kuldeep Singh
  0 siblings, 1 reply; 6+ messages in thread
From: Shawn Guo @ 2021-01-18  1:37 UTC (permalink / raw)
  To: Kuldeep Singh; +Cc: devicetree, linux-kernel, Joakim Zhang

On Mon, Jan 11, 2021 at 01:08:47PM +0530, Kuldeep Singh wrote:
> LX2160A supports two flexcan controllers. Add the support.
> Enable support further for LX2160A-RDB/QDS.
> 
> Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
> ---
>  arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts |  8 ++++++++
>  arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts | 16 ++++++++++++++++
>  arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi    | 20 ++++++++++++++++++++
>  3 files changed, 44 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts
> index 16ae3b0..d858d9c 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts
> +++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts
> @@ -33,6 +33,14 @@
>  	};
>  };
>  
> +&can0 {
> +	status = "okay";
> +};
> +
> +&can1 {
> +	status = "okay";
> +};
> +
>  &crypto {
>  	status = "okay";
>  };
> diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
> index 6f82759..5dbf274 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
> +++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
> @@ -89,6 +89,22 @@
>  	};
>  };
>  
> +&can0 {
> +	status = "okay";
> +
> +	can-transceiver {
> +		max-bitrate = <5000000>;
> +	};
> +};
> +
> +&can1 {
> +	status = "okay";
> +
> +	can-transceiver {
> +		max-bitrate = <5000000>;
> +	};
> +};
> +
>  &esdhc0 {
>  	sd-uhs-sdr104;
>  	sd-uhs-sdr50;
> diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
> index 0d4bce1..63a3ef6 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
> +++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
> @@ -878,6 +878,26 @@
>  			status = "disabled";
>  		};
>  
> +		can0: can@2180000 {
> +			compatible = "fsl,lx2160ar1-flexcan";
> +			reg = <0x0 0x2180000 0x0 0x10000>;
> +			interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clockgen 4 7>, <&sysclk>;

Can defines in dt-bindings/clock/fsl,qoriq-clockgen.h be useful?

Shawn

> +			clock-names = "ipg", "per";
> +			fsl,clk-source = <0>;
> +			status = "disabled";
> +		};
> +
> +		can1: can@2190000 {
> +			compatible = "fsl,lx2160ar1-flexcan";
> +			reg = <0x0 0x2190000 0x0 0x10000>;
> +			interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clockgen 4 7>, <&sysclk>;
> +			clock-names = "ipg", "per";
> +			fsl,clk-source = <0>;
> +			status = "disabled";
> +		};
> +
>  		uart0: serial@21c0000 {
>  			compatible = "arm,sbsa-uart","arm,pl011";
>  			reg = <0x0 0x21c0000 0x0 0x1000>;
> -- 
> 2.7.4
> 

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

* RE: [EXT] Re: [PATCH 1/3] arm64: dts: lx2160a: Add flexcan support
  2021-01-18  1:37   ` Shawn Guo
@ 2021-01-18  6:45     ` Kuldeep Singh
  0 siblings, 0 replies; 6+ messages in thread
From: Kuldeep Singh @ 2021-01-18  6:45 UTC (permalink / raw)
  To: Shawn Guo; +Cc: devicetree, linux-kernel, Joakim Zhang

Hi Shawn,

> > +             can0: can@2180000 {
> > +                     compatible = "fsl,lx2160ar1-flexcan";
> > +                     reg = <0x0 0x2180000 0x0 0x10000>;
> > +                     interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
> > +                     clocks = <&clockgen 4 7>, <&sysclk>;
> 
> Can defines in dt-bindings/clock/fsl,qoriq-clockgen.h be useful?

Sure, I will update the constants with qoriq-clockgen defines.
Actually, the time I posted the patch, those series of patches were not accepted.
I will update and resend the series.

Thanks
Kuldeep

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

end of thread, other threads:[~2021-01-18  6:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11  7:38 [PATCH 0/3] Enable flexcan support in LS1028A/LX2160A Kuldeep Singh
2021-01-11  7:38 ` [PATCH 1/3] arm64: dts: lx2160a: Add flexcan support Kuldeep Singh
2021-01-18  1:37   ` Shawn Guo
2021-01-18  6:45     ` [EXT] " Kuldeep Singh
2021-01-11  7:38 ` [PATCH 2/3] arm64: dtsi: ls1028a: Update flexcan properties Kuldeep Singh
2021-01-11  7:38 ` [PATCH 3/3] arm64: dts: ls1028a: Enable flexcan support for LS1028A-RDB/QDS Kuldeep Singh

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).