ARM: dts: imx6qdl-gw53xx: add CAN regulator
authorTim Harvey <tharvey@gateworks.com>
Fri, 16 Sep 2022 15:30:02 +0000 (08:30 -0700)
committerShawn Guo <shawnguo@kernel.org>
Sat, 17 Sep 2022 04:21:30 +0000 (12:21 +0800)
The GW53xx has a transceiver with a STBY pin connected to an IMX6 GPIO.
Configure this as a regulator to drive it low when CAN is in use.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/boot/dts/imx6qdl-gw53xx.dtsi

index a0710d562766e18d97f46e7245d80a97eb18e071..6c0c109046d80989c1a0da25978867787dbf6222 100644 (file)
                regulator-always-on;
        };
 
+       reg_can1_stby: regulator-can1-stby {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_reg_can1>;
+               regulator-name = "can1_stby";
+               gpio = <&gpio1 2 GPIO_ACTIVE_LOW>;
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
        reg_usb_h1_vbus: regulator-usb-h1-vbus {
                compatible = "regulator-fixed";
                regulator-name = "usb_h1_vbus";
 &can1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_flexcan1>;
+       xceiver-supply = <&reg_can1_stby>;
        status = "okay";
 };
 
                fsl,pins = <
                        MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX        0x1b0b1
                        MX6QDL_PAD_KEY_COL2__FLEXCAN1_TX        0x1b0b1
-                       MX6QDL_PAD_GPIO_2__GPIO1_IO02           0x4001b0b0 /* CAN_STBY */
                >;
        };
 
                >;
        };
 
+       pinctrl_reg_can1: regcan1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_2__GPIO1_IO02           0x4001b0b0 /* CAN_STBY */
+               >;
+       };
+
        pinctrl_uart1: uart1grp {
                fsl,pins = <
                        MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA      0x1b0b1