* [PATCH v2] arm64: dts: ti: k3-j784s4-evm: Add support for MCAN interfaces
@ 2023-08-17 8:49 Bhavya Kapoor
2023-08-20 6:37 ` Kumar, Udit
0 siblings, 1 reply; 2+ messages in thread
From: Bhavya Kapoor @ 2023-08-17 8:49 UTC (permalink / raw)
To: linux-kernel, devicetree
Cc: nm, vigneshr, kristo, robh+dt, krzysztof.kozlowski+dt, conor+dt,
linux-arm-kernel, b-kapoor, u-kumar1
There are 2 MCAN instances in the mcu domain and 4 MCAN instances in the
main domain. Add support for both MCAN nodes present in the mcu domain
and MCAN16 that is present in the main domain and isn't muxed.
Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com>
---
Changelog v1->v2:
- Fixed issue with referencing mcu_mcan0 node that was causeing errors
Link to v1 : https://lore.kernel.org/all/20230816193533.25722-1-b-kapoor@ti.com/
arch/arm64/boot/dts/ti/k3-j784s4-evm.dts | 87 ++++++++++++++++++++++++
1 file changed, 87 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
index 430b8a2c5df5..9fce3ce89507 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
@@ -249,6 +249,31 @@ vdd_sd_dv: regulator-TLV71033 {
states = <1800000 0x0>,
<3300000 0x1>;
};
+
+ transceiver1: can-phy0 {
+ compatible = "ti,tcan1042";
+ #phy-cells = <0>;
+ max-bitrate = <5000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_mcan0_gpio_pins_default>;
+ standby-gpios = <&wkup_gpio0 69 GPIO_ACTIVE_HIGH>;
+ };
+
+ transceiver2: can-phy1 {
+ compatible = "ti,tcan1042";
+ #phy-cells = <0>;
+ max-bitrate = <5000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_mcan1_gpio_pins_default>;
+ standby-gpios = <&wkup_gpio0 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ transceiver3: can-phy2 {
+ /* standby pin has been grounded by default */
+ compatible = "ti,tcan1042";
+ #phy-cells = <0>;
+ max-bitrate = <5000000>;
+ };
};
&main_pmx0 {
@@ -286,6 +311,13 @@ vdd_sd_dv_pins_default: vdd-sd-dv-default-pins {
J784S4_IOPAD(0x020, PIN_INPUT, 7) /* (AJ35) MCAN15_RX.GPIO0_8 */
>;
};
+
+ main_mcan16_pins_default: main-mcan16-default-pins {
+ pinctrl-single,pins = <
+ J784S4_IOPAD(0x028, PIN_INPUT, 0) /* (AE33) MCAN16_RX */
+ J784S4_IOPAD(0x024, PIN_OUTPUT, 0) /* (AH34) MCAN16_TX */
+ >;
+ };
};
&wkup_pmx2 {
@@ -363,6 +395,32 @@ J784S4_WKUP_IOPAD(0x16c, PIN_INPUT, 0) /* (U33) MCU_ADC1_AIN6 */
J784S4_WKUP_IOPAD(0x170, PIN_INPUT, 0) /* (Y36) MCU_ADC1_AIN7 */
>;
};
+
+ mcu_mcan0_pins_default: mcu-mcan0-default-pins {
+ pinctrl-single,pins = <
+ J784S4_WKUP_IOPAD(0x050, PIN_OUTPUT, 0) /* (K33) MCU_MCAN0_TX */
+ J784S4_WKUP_IOPAD(0x054, PIN_INPUT, 0) /* (F38) MCU_MCAN0_RX */
+ >;
+ };
+
+ mcu_mcan1_pins_default: mcu-mcan1-default-pins {
+ pinctrl-single,pins = <
+ J784S4_WKUP_IOPAD(0x068, PIN_OUTPUT, 0) /* (H35) WKUP_GPIO0_4.MCU_MCAN1_TX */
+ J784S4_WKUP_IOPAD(0x06c, PIN_INPUT, 0) /* (K36) WKUP_GPIO0_5.MCU_MCAN1_RX */
+ >;
+ };
+
+ mcu_mcan0_gpio_pins_default: mcu-mcan0-gpio-default-pins {
+ pinctrl-single,pins = <
+ J784S4_WKUP_IOPAD(0x040, PIN_INPUT, 7) /* (J38) MCU_SPI0_D1.WKUP_GPIO0_69 */
+ >;
+ };
+
+ mcu_mcan1_gpio_pins_default: mcu-mcan1-gpio-default-pins {
+ pinctrl-single,pins = <
+ J784S4_WKUP_IOPAD(0x060, PIN_INPUT, 7) /* (J35) WKUP_GPIO0_2 */
+ >;
+ };
};
&wkup_pmx0 {
@@ -827,3 +885,32 @@ adc {
ti,adc-channels = <0 1 2 3 4 5 6 7>;
};
};
+
+&wkup_gpio_intr {
+ status = "okay";
+};
+
+&wkup_gpio0 {
+ status = "okay";
+};
+
+&mcu_mcan0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_mcan0_pins_default>;
+ phys = <&transceiver1>;
+};
+
+&mcu_mcan1 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_mcan1_pins_default>;
+ phys = <&transceiver2>;
+};
+
+&main_mcan16 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mcan16_pins_default>;
+ phys = <&transceiver3>;
+};
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] arm64: dts: ti: k3-j784s4-evm: Add support for MCAN interfaces
2023-08-17 8:49 [PATCH v2] arm64: dts: ti: k3-j784s4-evm: Add support for MCAN interfaces Bhavya Kapoor
@ 2023-08-20 6:37 ` Kumar, Udit
0 siblings, 0 replies; 2+ messages in thread
From: Kumar, Udit @ 2023-08-20 6:37 UTC (permalink / raw)
To: Bhavya Kapoor, linux-kernel, devicetree
Cc: nm, vigneshr, kristo, robh+dt, krzysztof.kozlowski+dt, conor+dt,
linux-arm-kernel
Thank you for patch
On 8/17/2023 2:19 PM, Bhavya Kapoor wrote:
> There are 2 MCAN instances in the mcu domain and 4 MCAN instances in the
> main domain. Add support for both MCAN nodes present in the mcu domain
> and MCAN16 that is present in the main domain and isn't muxed.
Could you add description in commit message, why only 3 MCAN are
enabled in this patch
despite of 6 available.
>
> Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com>
> ---
>
> Changelog v1->v2:
> - Fixed issue with referencing mcu_mcan0 node that was causeing errors
>
> Link to v1 : https://lore.kernel.org/all/20230816193533.25722-1-b-kapoor@ti.com/
>
> arch/arm64/boot/dts/ti/k3-j784s4-evm.dts | 87 ++++++++++++++++++++++++
> 1 file changed, 87 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
> index 430b8a2c5df5..9fce3ce89507 100644
> [...]
> + mcu_mcan1_pins_default: mcu-mcan1-default-pins {
> + pinctrl-single,pins = <
> + J784S4_WKUP_IOPAD(0x068, PIN_OUTPUT, 0) /* (H35) WKUP_GPIO0_4.MCU_MCAN1_TX */
> + J784S4_WKUP_IOPAD(0x06c, PIN_INPUT, 0) /* (K36) WKUP_GPIO0_5.MCU_MCAN1_RX */
> + >;
You can consider to drop pre-fix in GPIO details through out the patch
eg WKUP_GPIO0_5.MCU_MCAN1_RX to MCU_MCAN1_RX
> + };
> +
> + mcu_mcan0_gpio_pins_default: mcu-mcan0-gpio-default-pins {
> + pinctrl-single,pins = <
> + J784S4_WKUP_IOPAD(0x040, PIN_INPUT, 7) /* (J38) MCU_SPI0_D1.WKUP_GPIO0_69 */
> + >;
> + };
> +
> + mcu_mcan1_gpio_pins_default: mcu-mcan1-gpio-default-pins {
> + pinctrl-single,pins = <
> + J784S4_WKUP_IOPAD(0x060, PIN_INPUT, 7) /* (J35) WKUP_GPIO0_2 */
> + >;
> + };
> };
>
> &wkup_pmx0 {
> @@ -827,3 +885,32 @@ adc {
> ti,adc-channels = <0 1 2 3 4 5 6 7>;
> };
> };
> +
> +&wkup_gpio_intr {
> + status = "okay";
> +};
> +
> +&wkup_gpio0 {
> + status = "okay";
> +};
> +
> +&mcu_mcan0 {
> + status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <&mcu_mcan0_pins_default>;
> + phys = <&transceiver1>;
> +};
> +
> +&mcu_mcan1 {
> + status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <&mcu_mcan1_pins_default>;
> + phys = <&transceiver2>;
> +};
> +
> +&main_mcan16 {
> + status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <&main_mcan16_pins_default>;
> + phys = <&transceiver3>;
> +};
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-20 7:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-17 8:49 [PATCH v2] arm64: dts: ti: k3-j784s4-evm: Add support for MCAN interfaces Bhavya Kapoor
2023-08-20 6:37 ` Kumar, Udit
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).