]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: imx8mp-phyboard-pollux: Add flexcan support
authorTeresa Remmet <t.remmet@phytec.de>
Wed, 6 Sep 2023 10:08:53 +0000 (12:08 +0200)
committerShawn Guo <shawnguo@kernel.org>
Mon, 25 Sep 2023 01:35:21 +0000 (09:35 +0800)
Add flexcan1 and flexcan2 support for CAN FD on phyBOARD-Pollux.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Cem Tenruh <c.tenruh@phytec.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts

index 1e14c4cd31282a310883485d6dcbbb7ab727df65..1750fadb64c32cf61fe910175d28fabd8e6072ad 100644 (file)
                stdout-path = &uart1;
        };
 
+       reg_can1_stby: regulator-can1-stby {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_flexcan1_reg>;
+               gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;
+               regulator-max-microvolt = <3300000>;
+               regulator-min-microvolt = <3300000>;
+               regulator-name = "can1-stby";
+       };
+
+       reg_can2_stby: regulator-can2-stby {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_flexcan2_reg>;
+               gpio = <&gpio3 21 GPIO_ACTIVE_LOW>;
+               regulator-max-microvolt = <3300000>;
+               regulator-min-microvolt = <3300000>;
+               regulator-name = "can2-stby";
+       };
+
        reg_usdhc2_vmmc: regulator-usdhc2 {
                compatible = "regulator-fixed";
                pinctrl-names = "default";
        };
 };
 
+/* CAN FD */
+&flexcan1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan1>;
+       xceiver-supply = <&reg_can1_stby>;
+       status = "okay";
+};
+
+&flexcan2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan2>;
+       xceiver-supply = <&reg_can2_stby>;
+       status = "okay";
+};
+
 &i2c2 {
        clock-frequency = <400000>;
        pinctrl-names = "default", "gpio";
                >;
        };
 
+       pinctrl_flexcan1: flexcan1grp {
+               fsl,pins = <
+                       MX8MP_IOMUXC_SAI5_RXD2__CAN1_RX         0x154
+                       MX8MP_IOMUXC_SAI5_RXD1__CAN1_TX         0x154
+               >;
+       };
+
+       pinctrl_flexcan2: flexcan2grp {
+               fsl,pins = <
+                       MX8MP_IOMUXC_SAI5_MCLK__CAN2_RX         0x154
+                       MX8MP_IOMUXC_SAI5_RXD3__CAN2_TX         0x154
+               >;
+       };
+
+       pinctrl_flexcan1_reg: flexcan1reggrp {
+               fsl,pins = <
+                       MX8MP_IOMUXC_SAI5_RXC__GPIO3_IO20       0x154
+               >;
+       };
+
+       pinctrl_flexcan2_reg: flexcan2reggrp {
+               fsl,pins = <
+                       MX8MP_IOMUXC_SAI5_RXD0__GPIO3_IO21      0x154
+               >;
+       };
+
        pinctrl_i2c2: i2c2grp {
                fsl,pins = <
                        MX8MP_IOMUXC_I2C2_SCL__I2C2_SCL         0x400001c2