* [PATCH v2 1/2] arm64: dts: ti: k3-j722s-evm: Add support for multiple CAN instances
2024-08-27 10:56 [PATCH v2 0/2] Add support for multiple can instances as well as describe main_uart5 Bhavya Kapoor
@ 2024-08-27 10:56 ` Bhavya Kapoor
2024-08-27 10:56 ` [PATCH v2 2/2] arm64: dts: ti: k3-j722s-evm: Describe main_uart5 Bhavya Kapoor
2024-08-28 19:02 ` [PATCH v2 0/2] Add support for multiple can instances as well as describe main_uart5 Nishanth Menon
2 siblings, 0 replies; 4+ messages in thread
From: Bhavya Kapoor @ 2024-08-27 10:56 UTC (permalink / raw)
To: linux-kernel, devicetree
Cc: linux-arm-kernel, conor+dt, krzk+dt, robh, kristo, b-kapoor, jm,
vigneshr, nm
CAN instances 0 and 1 in the mcu domain and 0 in the main domain are
brought on the evm through headers J5, J8 and J10 respectively. Thus,
add their respective transceiver's 0, 1 and 2 dt nodes as well as
add the required pinmux to add support for these CAN instances.
Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com>
Reviewed-by: Judith Mendez <jm@ti.com>
---
Link to v1: https://lore.kernel.org/all/20240808082030.2812216-1-b-kapoor@ti.com/
changelog v1->v2:
Modified code to maintain proper dts coding style
arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 74 +++++++++++++++++++++++++
1 file changed, 74 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
index dd3b5f7039d7..8daa47a245aa 100644
--- a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
@@ -162,10 +162,39 @@ sound_master: simple-audio-card,codec {
clocks = <&audio_refclk1>;
};
};
+
+ transceiver0: can-phy0 {
+ compatible = "ti,tcan1042";
+ #phy-cells = <0>;
+ max-bitrate = <5000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_mcan0_gpio_pins_default>;
+ standby-gpios = <&mcu_gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ transceiver1: can-phy1 {
+ compatible = "ti,tcan1042";
+ #phy-cells = <0>;
+ max-bitrate = <5000000>;
+ };
+
+ transceiver2: can-phy2 {
+ compatible = "ti,tcan1042";
+ #phy-cells = <0>;
+ max-bitrate = <5000000>;
+ standby-gpios = <&exp1 17 GPIO_ACTIVE_HIGH>;
+ };
};
&main_pmx0 {
+ main_mcan0_pins_default: main-mcan0-default-pins {
+ pinctrl-single,pins = <
+ J722S_IOPAD(0x1dc, PIN_INPUT, 0) /* (C22) MCAN0_RX */
+ J722S_IOPAD(0x1d8, PIN_OUTPUT, 0) /*(D22) MCAN0_TX */
+ >;
+ };
+
main_i2c0_pins_default: main-i2c0-default-pins {
pinctrl-single,pins = <
J722S_IOPAD(0x01e0, PIN_INPUT_PULLUP, 0) /* (D23) I2C0_SCL */
@@ -303,6 +332,26 @@ &main_uart0 {
&mcu_pmx0 {
+ mcu_mcan0_pins_default: mcu-mcan0-default-pins {
+ pinctrl-single,pins = <
+ J722S_MCU_IOPAD(0x038, PIN_INPUT, 0) /* (D8) MCU_MCAN0_RX */
+ J722S_MCU_IOPAD(0x034, PIN_OUTPUT, 0) /* (B2) MCU_MCAN0_TX */
+ >;
+ };
+
+ mcu_mcan1_pins_default: mcu-mcan1-default-pins {
+ pinctrl-single,pins = <
+ J722S_MCU_IOPAD(0x040, PIN_INPUT, 0) /* (B1) MCU_MCAN1_RX */
+ J722S_MCU_IOPAD(0x03C, PIN_OUTPUT, 0) /*(C1) MCU_MCAN1_TX */
+ >;
+ };
+
+ mcu_mcan0_gpio_pins_default: mcu-mcan0-gpio-default-pins {
+ pinctrl-single,pins = <
+ J722S_MCU_IOPAD(0x0030, PIN_OUTPUT, 7) /* (C3) MCU_GPIO0_12 */
+ >;
+ };
+
wkup_uart0_pins_default: wkup-uart0-default-pins {
pinctrl-single,pins = <
J722S_MCU_IOPAD(0x02c, PIN_INPUT, 0) /* (C7) WKUP_UART0_CTSn */
@@ -566,3 +615,28 @@ &mcasp1 {
0 0 0 0
>;
};
+
+&mcu_mcan0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_mcan0_pins_default>;
+ phys = <&transceiver0>;
+ status = "okay";
+};
+
+&mcu_mcan1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_mcan1_pins_default>;
+ phys = <&transceiver1>;
+ status = "okay";
+};
+
+&main_mcan0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mcan0_pins_default>;
+ phys = <&transceiver2>;
+ status = "okay";
+};
+
+&mcu_gpio0 {
+ status = "okay";
+};
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH v2 2/2] arm64: dts: ti: k3-j722s-evm: Describe main_uart5
2024-08-27 10:56 [PATCH v2 0/2] Add support for multiple can instances as well as describe main_uart5 Bhavya Kapoor
2024-08-27 10:56 ` [PATCH v2 1/2] arm64: dts: ti: k3-j722s-evm: Add support for multiple CAN instances Bhavya Kapoor
@ 2024-08-27 10:56 ` Bhavya Kapoor
2024-08-28 19:02 ` [PATCH v2 0/2] Add support for multiple can instances as well as describe main_uart5 Nishanth Menon
2 siblings, 0 replies; 4+ messages in thread
From: Bhavya Kapoor @ 2024-08-27 10:56 UTC (permalink / raw)
To: linux-kernel, devicetree
Cc: linux-arm-kernel, conor+dt, krzk+dt, robh, kristo, b-kapoor, jm,
vigneshr, nm
System firmware uses main_uart5 in J722S EVM for trace data.
Thus, describe it in device tree for completeness,
adding the pinmux and mark it as reserved.
Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com>
---
Link to v1: https://lore.kernel.org/all/20240822053538.10475-1-b-kapoor@ti.com/
changelog v1->v2:
- Modified commit message to be more clear
- provide documentation on why main_uart5 is reserved
arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
index 8daa47a245aa..41c36f82a3c5 100644
--- a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
@@ -20,6 +20,7 @@ / {
aliases {
serial0 = &wkup_uart0;
serial2 = &main_uart0;
+ serial3 = &main_uart5;
mmc0 = &sdhci0;
mmc1 = &sdhci1;
};
@@ -211,6 +212,13 @@ J722S_IOPAD(0x01cc, PIN_OUTPUT, 0) /* (B22) UART0_TXD */
bootph-all;
};
+ main_uart5_pins_default: main-uart5-default-pins {
+ pinctrl-single,pins = <
+ J722S_IOPAD(0x0108, PIN_INPUT, 3) /* (J27) UART5_RXD */
+ J722S_IOPAD(0x010c, PIN_OUTPUT, 3) /* (H27) UART5_TXD */
+ >;
+ };
+
vdd_sd_dv_pins_default: vdd-sd-dv-default-pins {
pinctrl-single,pins = <
J722S_IOPAD(0x0120, PIN_INPUT, 7) /* (F27) MMC2_CMD.GPIO0_70 */
@@ -330,6 +338,13 @@ &main_uart0 {
bootph-all;
};
+&main_uart5 {
+ /* MAIN UART 5 is used by System firmware */
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_uart5_pins_default>;
+ status = "reserved";
+};
+
&mcu_pmx0 {
mcu_mcan0_pins_default: mcu-mcan0-default-pins {
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2 0/2] Add support for multiple can instances as well as describe main_uart5
2024-08-27 10:56 [PATCH v2 0/2] Add support for multiple can instances as well as describe main_uart5 Bhavya Kapoor
2024-08-27 10:56 ` [PATCH v2 1/2] arm64: dts: ti: k3-j722s-evm: Add support for multiple CAN instances Bhavya Kapoor
2024-08-27 10:56 ` [PATCH v2 2/2] arm64: dts: ti: k3-j722s-evm: Describe main_uart5 Bhavya Kapoor
@ 2024-08-28 19:02 ` Nishanth Menon
2 siblings, 0 replies; 4+ messages in thread
From: Nishanth Menon @ 2024-08-28 19:02 UTC (permalink / raw)
To: linux-kernel, devicetree, Bhavya Kapoor
Cc: Nishanth Menon, linux-arm-kernel, conor+dt, krzk+dt, robh,
kristo, jm, vigneshr
Hi Bhavya Kapoor,
On Tue, 27 Aug 2024 16:26:42 +0530, Bhavya Kapoor wrote:
> This series adds support for multiple can instances present on J722S
> EVM as well as describe the main_uart5 for J722S EVM.
>
> CAN instances 0 and 1 in the mcu domain and 0 in the main domain are
> brought on the evm through headers J5, J8 and J10 respectively. Thus,
> add their respective transceiver's 0, 1 and 2 dt nodes as well as
> add the required pinmux to add support for these CAN instances.
>
> [...]
I have applied the following to branch ti-k3-dts-next on [1].
Thank you!
[1/2] arm64: dts: ti: k3-j722s-evm: Add support for multiple CAN instances
commit: 46ca5c7207703b36025228a6b7a29198a1539d10
[2/2] arm64: dts: ti: k3-j722s-evm: Describe main_uart5
commit: 010b035ab4d7a1c4fd13936f42eef857ddbeede7
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 4+ messages in thread