* [PATCH] arm64: dts: k3-am654-idk: Add Support for MCAN
@ 2024-08-20 19:34 Judith Mendez
2024-08-21 11:01 ` Nishanth Menon
0 siblings, 1 reply; 3+ messages in thread
From: Judith Mendez @ 2024-08-20 19:34 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
linux-arm-kernel, devicetree, linux-kernel, Jan Kiszka,
Bhavya Kapoor
From: Faiz Abbas <faiz_abbas@ti.com>
There are two MCAN instances present on the am65x SoC [0].
Since there are two CAN transceivers on the IDK application
board for AM654 EVM [1], enable m_can0 and m_can1, add the
two corresponding CAN transceiver nodes, and set a maximum
data rate of 5 Mbps.
[0] https://www.ti.com/lit/ds/symlink/am6548.pdf
[1] https://www.ti.com/lit/zip/sprr382
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Judith Mendez <jm@ti.com>
---
arch/arm64/boot/dts/ti/k3-am654-idk.dtso | 61 ++++++++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-am654-idk.dtso b/arch/arm64/boot/dts/ti/k3-am654-idk.dtso
index 8bdb87fcbde00..39c96b7961881 100644
--- a/arch/arm64/boot/dts/ti/k3-am654-idk.dtso
+++ b/arch/arm64/boot/dts/ti/k3-am654-idk.dtso
@@ -8,6 +8,7 @@
/dts-v1/;
/plugin/;
+#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/net/ti-dp83867.h>
#include "k3-pinctrl.h"
@@ -154,6 +155,24 @@ icssg1_emac1: port@1 {
};
};
};
+
+ transceiver1: can-phy0 {
+ compatible = "ti,tcan1042";
+ #phy-cells = <0>;
+ max-bitrate = <5000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcan0_gpio_pins_default>;
+ standby-gpios = <&main_gpio1 47 GPIO_ACTIVE_LOW>;
+ };
+
+ transceiver2: can-phy1 {
+ compatible = "ti,tcan1042";
+ #phy-cells = <0>;
+ max-bitrate = <5000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcan1_gpio_pins_default>;
+ standby-gpios = <&main_gpio1 67 GPIO_ACTIVE_LOW>;
+ };
};
&main_pmx0 {
@@ -243,6 +262,34 @@ icssg1_iep0_pins_default: icssg1-iep0-default-pins {
AM65X_IOPAD(0x012c, PIN_INPUT, 2) /* (AG26) PRG1_PRU0_GPO19.PRG1_IEP0_EDC_SYNC_OUT0 */
>;
};
+
+ mcan0_gpio_pins_default: mcan0-gpio-default-pins {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x023c, PIN_INPUT, 7) /* (V25) PRG0_PRU0_GPIO18:GPIO1_47 */
+ >;
+ };
+
+ mcan1_gpio_pins_default: mcan1-gpio-default-pins {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x028c, PIN_INPUT, 7) /* (Y26) PRG0_PRU1_GPIO18.GPIO1_67 */
+ >;
+ };
+};
+
+&wkup_pmx0 {
+ mcu_mcan0_pins_default: mcu-mcan0-default-pins {
+ pinctrl-single,pins = <
+ AM65X_WKUP_IOPAD(0x00ac, PIN_INPUT_PULLUP, 0) /* (W2) MCU_MCAN0_RX */
+ AM65X_WKUP_IOPAD(0x00a8, PIN_OUTPUT_PULLUP, 0) /* (W1) MCU_MCAN0_TX */
+ >;
+ };
+
+ mcu_mcan1_pins_default: mcu-mcan1-default-pins {
+ pinctrl-single,pins = <
+ AM65X_WKUP_IOPAD(0x00c4, PIN_INPUT_PULLUP, 1) /* (AD3) WKUP_GPIO0_5.MCU_MCAN1_RX */
+ AM65X_WKUP_IOPAD(0x00c0, PIN_OUTPUT_PULLUP, 1) /* (AC3) WKUP_GPIO0_4.MCU_MCAN1_TX */
+ >;
+ };
};
&icssg0_mdio {
@@ -294,3 +341,17 @@ &icssg1_iep0 {
pinctrl-names = "default";
pinctrl-0 = <&icssg1_iep0_pins_default>;
};
+
+&m_can0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_mcan0_pins_default>;
+ phys = <&transceiver1>;
+};
+
+&m_can1 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_mcan1_pins_default>;
+ phys = <&transceiver2>;
+};
base-commit: e3cce1229c34b5c28f103361c4d6b3ef17302d5d
--
2.46.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: k3-am654-idk: Add Support for MCAN
2024-08-20 19:34 [PATCH] arm64: dts: k3-am654-idk: Add Support for MCAN Judith Mendez
@ 2024-08-21 11:01 ` Nishanth Menon
2024-08-21 17:24 ` Judith Mendez
0 siblings, 1 reply; 3+ messages in thread
From: Nishanth Menon @ 2024-08-21 11:01 UTC (permalink / raw)
To: Judith Mendez
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Vignesh Raghavendra, Tero Kristo, linux-arm-kernel, devicetree,
linux-kernel, Jan Kiszka, Bhavya Kapoor
On 14:34-20240820, Judith Mendez wrote:
[...]
> +&m_can1 {
> + status = "okay";
NAK!
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/dts-coding-style.rst#n117
> + pinctrl-names = "default";
> + pinctrl-0 = <&mcu_mcan1_pins_default>;
> + phys = <&transceiver2>;
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: k3-am654-idk: Add Support for MCAN
2024-08-21 11:01 ` Nishanth Menon
@ 2024-08-21 17:24 ` Judith Mendez
0 siblings, 0 replies; 3+ messages in thread
From: Judith Mendez @ 2024-08-21 17:24 UTC (permalink / raw)
To: Nishanth Menon
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Vignesh Raghavendra, Tero Kristo, linux-arm-kernel, devicetree,
linux-kernel, Jan Kiszka, Bhavya Kapoor
Hi Nishanth,
On 8/21/24 6:01 AM, Nishanth Menon wrote:
> On 14:34-20240820, Judith Mendez wrote:
> [...]
>
>> +&m_can1 {
>> + status = "okay";
>
> NAK!
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/dts-coding-style.rst#n117
Will fix in v2, thanks.
~ Judith
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&mcu_mcan1_pins_default>;
>> + phys = <&transceiver2>;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-21 17:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-20 19:34 [PATCH] arm64: dts: k3-am654-idk: Add Support for MCAN Judith Mendez
2024-08-21 11:01 ` Nishanth Menon
2024-08-21 17:24 ` Judith Mendez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox