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.
Changes since v1:
-Use clockgen constants instead of numeric numbers
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 | 16 +++++++++------
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 | 24 +++++++++++++++++++++++
6 files changed, 82 insertions(+), 6 deletions(-)
--
2.7.4
LX2160A supports two flexcan controllers. Add the support.
Enable support further for LX2160A-RDB/QDS.
Signed-off-by: Kuldeep Singh <[email protected]>
---
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 | 24 +++++++++++++++++++++++
3 files changed, 48 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 451e443..0551f6f 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
@@ -895,6 +895,30 @@
status = "disabled";
};
+ can0: can@2180000 {
+ compatible = "fsl,lx2160ar1-flexcan";
+ reg = <0x0 0x2180000 0x0 0x10000>;
+ interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
+ QORIQ_CLK_PLL_DIV(8)>,
+ <&clockgen QORIQ_CLK_SYSCLK 0>;
+ 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 QORIQ_CLK_PLATFORM_PLL
+ QORIQ_CLK_PLL_DIV(8)>,
+ <&clockgen QORIQ_CLK_SYSCLK 0>;
+ 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
LS1028A-RDB/QDS provides support for flexcan. Add the properties.
Signed-off-by: Kuldeep Singh <[email protected]>
---
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
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 <[email protected]>
---
Hi Shawn,
I would like to mention the motivation behind compatible string change.
There's no ls1028a compatible entry i.e " fsl,ls1028ar1-flexcan" in flexcan
driver. See below.
https://elixir.bootlin.com/linux/latest/source/drivers/net/can/flexcan.c#L1913
And the documentation says that ls1028a entry should be followed by lx2160a.
https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml#L42
Since ls1028a entry is not present, anyway lx2160a entry will be eventually used.
Please let me know your views.
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
index e00acad..d28bd52 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
@@ -408,21 +408,25 @@
};
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 QORIQ_CLK_PLATFORM_PLL
- QORIQ_CLK_PLL_DIV(2)>;
+ clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
+ QORIQ_CLK_PLL_DIV(2)>,
+ <&clockgen QORIQ_CLK_PLATFORM_PLL
+ QORIQ_CLK_PLL_DIV(2)>;
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 QORIQ_CLK_PLATFORM_PLL
- QORIQ_CLK_PLL_DIV(2)>;
+ clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
+ QORIQ_CLK_PLL_DIV(2)>,
+ <&clockgen QORIQ_CLK_PLATFORM_PLL
+ QORIQ_CLK_PLL_DIV(2)>;
clock-names = "ipg", "per";
status = "disabled";
};
--
2.7.4
On Thu, Jan 21, 2021 at 04:27:36PM +0530, Kuldeep Singh wrote:
> 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.
>
> Changes since v1:
> -Use clockgen constants instead of numeric numbers
>
> 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
Applied all, thanks.