MLK-16606-4 arm64: dts: imx8qm-mek: add flexcan support
authorDong Aisheng <aisheng.dong@nxp.com>
Wed, 18 Oct 2017 12:54:16 +0000 (20:54 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:38:55 +0000 (15:38 -0500)
CAN0 and CAN1 share the same transceiver STBY and EN signals while
CAN2 uses a separated one.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
arch/arm64/boot/dts/freescale/fsl-imx8qm-mek.dts

index 74bd8dd..50695de 100644 (file)
                #address-cells = <1>;
                #size-cells = <0>;
 
+               reg_can01_en: regulator-can01-gen {
+                       compatible = "regulator-fixed";
+                       regulator-name = "can01-en";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       gpio = <&pca6416 3 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+
+               reg_can2_en: regulator-can2-gen {
+                       compatible = "regulator-fixed";
+                       regulator-name = "can01-en";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       gpio = <&pca6416 4 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+
+
+               reg_can01_stby: regulator-can01-stby {
+                       compatible = "regulator-fixed";
+                       regulator-name = "can01-stby";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       gpio = <&pca6416 5 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+                       vin-supply = <&reg_can01_en>;
+               };
+
+               reg_can2_stby: regulator-can2-stby {
+                       compatible = "regulator-fixed";
+                       regulator-name = "can01-stby";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       gpio = <&pca6416 6 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+                       vin-supply = <&reg_can2_en>;
+               };
+
                epdev_on: fixedregulator@100 {
                        compatible = "regulator-fixed";
                        regulator-min-microvolt = <3300000>;
                        >;
                };
 
+               pinctrl_flexcan1: flexcan0grp {
+                       fsl,pins = <
+                               SC_P_FLEXCAN0_TX_DMA_FLEXCAN0_TX        0x21
+                               SC_P_FLEXCAN0_RX_DMA_FLEXCAN0_RX        0x21
+                       >;
+               };
+
+               pinctrl_flexcan2: flexcan1grp {
+                       fsl,pins = <
+                               SC_P_FLEXCAN1_TX_DMA_FLEXCAN1_TX        0x21
+                               SC_P_FLEXCAN1_RX_DMA_FLEXCAN1_RX        0x21
+                       >;
+               };
+
+               pinctrl_flexcan3: flexcan2grp {
+                       fsl,pins = <
+                               SC_P_FLEXCAN2_TX_DMA_FLEXCAN2_TX        0x21
+                               SC_P_FLEXCAN2_RX_DMA_FLEXCAN2_RX        0x21
+                       >;
+               };
+
                pinctrl_lpuart0: lpuart0grp {
                        fsl,pins = <
                                SC_P_UART0_RX_DMA_UART0_RX              0x06000020
        };
 };
 
+&flexcan1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan1>;
+       xceiver-supply = <&reg_can01_stby>;
+       status = "okay";
+};
+
+&flexcan2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan2>;
+       xceiver-supply = <&reg_can01_stby>;
+       status = "okay";
+};
+
+&flexcan3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan3>;
+       xceiver-supply = <&reg_can2_stby>;
+       status = "okay";
+};
+
 &i2c1 {
        #address-cells = <1>;
        #size-cells = <0>;