[v2,3/4] DO_NOT_MERGE arm64: dts: ti: Add AM62x MCAN MAIN domain transceiver overlay
Commit Message
Add an overlay for main domain MCAN on AM62x SK. The AM62x
SK board does not have on-board CAN transceiver so instead
of changing the DTB permanently, add an overlay to enable
MAIN domain MCAN and support for 1 CAN transceiver.
Signed-off-by: Judith Mendez <jm@ti.com>
---
arch/arm64/boot/dts/ti/Makefile | 2 ++
.../boot/dts/ti/k3-am625-sk-mcan-main.dtso | 35 +++++++++++++++++++
2 files changed, 37 insertions(+)
create mode 100644 arch/arm64/boot/dts/ti/k3-am625-sk-mcan-main.dtso
Comments
On 14:54-20230424, Judith Mendez wrote:
> Add an overlay for main domain MCAN on AM62x SK. The AM62x
> SK board does not have on-board CAN transceiver so instead
> of changing the DTB permanently, add an overlay to enable
> MAIN domain MCAN and support for 1 CAN transceiver.
>
> Signed-off-by: Judith Mendez <jm@ti.com>
> ---
> arch/arm64/boot/dts/ti/Makefile | 2 ++
> .../boot/dts/ti/k3-am625-sk-mcan-main.dtso | 35 +++++++++++++++++++
> 2 files changed, 37 insertions(+)
> create mode 100644 arch/arm64/boot/dts/ti/k3-am625-sk-mcan-main.dtso
>
Just a headsup - for a formal patch, for the overlay, please ensure we
provide link to the specific board. I dont want to end up with 1000s
of overlay files, each enabling one specific peripheral instance of a
small subgroup of peripheral instance. Overlays should be describing a
real platform with product link.
> diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
> index c83c9d772b81..abe15e76b614 100644
> --- a/arch/arm64/boot/dts/ti/Makefile
> +++ b/arch/arm64/boot/dts/ti/Makefile
> @@ -9,8 +9,10 @@
> # alphabetically.
>
> # Boards with AM62x SoC
> +k3-am625-sk-mcan-dtbs := k3-am625-sk.dtb k3-am625-sk-mcan-main.dtbo
> dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am625-sk.dtb
> +dtb-$(CONFIG_ARCH_K3) += k3-am625-sk-mcan.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am62-lp-sk.dtb
>
> # Boards with AM62Ax SoC
> diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk-mcan-main.dtso b/arch/arm64/boot/dts/ti/k3-am625-sk-mcan-main.dtso
> new file mode 100644
> index 000000000000..0a7b2f394f87
> --- /dev/null
> +++ b/arch/arm64/boot/dts/ti/k3-am625-sk-mcan-main.dtso
> @@ -0,0 +1,35 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/**
> + * DT overlay for MCAN transceiver in main domain on AM625 SK
> + *
> + * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
> + */
> +
> +/dts-v1/;
> +/plugin/;
> +
> +#include "k3-pinctrl.h"
> +
> +&{/} {
> + transceiver1: can-phy0 {
> + compatible = "ti,tcan1042";
> + #phy-cells = <0>;
> + max-bitrate = <5000000>;
> + };
> +};
> +
> +&main_pmx0 {
> + main_mcan0_pins_default: main-mcan0-pins-default {
> + pinctrl-single,pins = <
> + AM62X_IOPAD(0x1dc, PIN_INPUT, 0) /* (E15) MCAN0_RX */
> + AM62X_IOPAD(0x1d8, PIN_OUTPUT, 0) /* (C15) MCAN0_TX */
> + >;
> + };
> +};
> +
> +&main_mcan0 {
> + status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <&main_mcan0_pins_default>;
> + phys = <&transceiver1>;
> +};
> --
> 2.17.1
>
Hello Nishanth,
On 4/25/2023 7:47 AM, Nishanth Menon wrote:
> On 14:54-20230424, Judith Mendez wrote:
>> Add an overlay for main domain MCAN on AM62x SK. The AM62x
>> SK board does not have on-board CAN transceiver so instead
>> of changing the DTB permanently, add an overlay to enable
>> MAIN domain MCAN and support for 1 CAN transceiver.
>>
>> Signed-off-by: Judith Mendez <jm@ti.com>
>> ---
>> arch/arm64/boot/dts/ti/Makefile | 2 ++
>> .../boot/dts/ti/k3-am625-sk-mcan-main.dtso | 35 +++++++++++++++++++
>> 2 files changed, 37 insertions(+)
>> create mode 100644 arch/arm64/boot/dts/ti/k3-am625-sk-mcan-main.dtso
>>
>
> Just a headsup - for a formal patch, for the overlay, please ensure we
> provide link to the specific board. I dont want to end up with 1000s
> of overlay files, each enabling one specific peripheral instance of a
> small subgroup of peripheral instance. Overlays should be describing a
> real platform with product link.
Will add in the next submission, thanks.
regards,
Judith
@@ -9,8 +9,10 @@
# alphabetically.
# Boards with AM62x SoC
+k3-am625-sk-mcan-dtbs := k3-am625-sk.dtb k3-am625-sk-mcan-main.dtbo
dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am625-sk.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am625-sk-mcan.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am62-lp-sk.dtb
# Boards with AM62Ax SoC
new file mode 100644
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: GPL-2.0
+/**
+ * DT overlay for MCAN transceiver in main domain on AM625 SK
+ *
+ * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include "k3-pinctrl.h"
+
+&{/} {
+ transceiver1: can-phy0 {
+ compatible = "ti,tcan1042";
+ #phy-cells = <0>;
+ max-bitrate = <5000000>;
+ };
+};
+
+&main_pmx0 {
+ main_mcan0_pins_default: main-mcan0-pins-default {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x1dc, PIN_INPUT, 0) /* (E15) MCAN0_RX */
+ AM62X_IOPAD(0x1d8, PIN_OUTPUT, 0) /* (C15) MCAN0_TX */
+ >;
+ };
+};
+
+&main_mcan0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mcan0_pins_default>;
+ phys = <&transceiver1>;
+};