ARM: dts: aspeed: bletchley: Update fusb302 nodes
authorPotin Lai <potin.lai.pt@gmail.com>
Mon, 13 Jun 2022 09:51:50 +0000 (17:51 +0800)
committerJoel Stanley <joel@jms.id.au>
Sun, 20 Nov 2022 10:16:38 +0000 (20:46 +1030)
1. Add interrupt pin of fusb302 on each sled.
2. Add vbus-supply property in each fusb302 node.
3. Fix BMC power-role at source and data-role at host.
4. Disable PD to avoid "HARD Reset" due to incompatible PD ver.

Signed-off-by: Potin Lai <potin.lai.pt@gmail.com>
Reviewed-by: Patrick Williams <patrick@stwcx.xyz>
Link: https://lore.kernel.org/r/20220613095150.21917-5-potin.lai.pt@gmail.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts

index a535f80..1f72017 100644 (file)
                        linux,code = <ASPEED_GPIO(H, 7)>;
                };
        };
+
+       vbus_sled1: vbus_sled1 {
+               compatible = "regulator-fixed";
+               regulator-name = "vbus_sled1";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&sled1_ioexp 1 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       vbus_sled2: vbus_sled2 {
+               compatible = "regulator-fixed";
+               regulator-name = "vbus_sled2";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&sled2_ioexp 1 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       vbus_sled3: vbus_sled3 {
+               compatible = "regulator-fixed";
+               regulator-name = "vbus_sled3";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&sled3_ioexp 1 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       vbus_sled4: vbus_sled4 {
+               compatible = "regulator-fixed";
+               regulator-name = "vbus_sled4";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&sled4_ioexp 1 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       vbus_sled5: vbus_sled5 {
+               compatible = "regulator-fixed";
+               regulator-name = "vbus_sled5";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&sled5_ioexp 1 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       vbus_sled6: vbus_sled6 {
+               compatible = "regulator-fixed";
+               regulator-name = "vbus_sled6";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&sled6_ioexp 1 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
 };
 
 &mac2 {
                compatible = "fcs,fusb302";
                reg = <0x22>;
 
+               interrupt-parent = <&gpio0>;
+               interrupts = <ASPEED_GPIO(B, 0) IRQ_TYPE_LEVEL_LOW>;
+               vbus-supply = <&vbus_sled1>;
+
                connector {
                        compatible = "usb-c-connector";
                        label = "USB-C";
-                       power-role = "dual";
-                       try-power-role = "sink";
-                       data-role = "dual";
-                       source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
-                       sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
-                                       PDO_VAR(3000, 12000, 3000)
-                                       PDO_PPS_APDO(3000, 11000, 3000)>;
-                       op-sink-microwatt = <10000000>;
+                       power-role = "source";
+                       data-role = "host";
+                       pd-disable;
+                       typec-power-opmode = "default";
                };
        };
 
                compatible = "fcs,fusb302";
                reg = <0x22>;
 
+               interrupt-parent = <&gpio0>;
+               interrupts = <ASPEED_GPIO(B, 1) IRQ_TYPE_LEVEL_LOW>;
+               vbus-supply = <&vbus_sled2>;
+
                connector {
                        compatible = "usb-c-connector";
                        label = "USB-C";
-                       power-role = "dual";
-                       try-power-role = "sink";
-                       data-role = "dual";
-                       source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
-                       sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
-                                       PDO_VAR(3000, 12000, 3000)
-                                       PDO_PPS_APDO(3000, 11000, 3000)>;
-                       op-sink-microwatt = <10000000>;
+                       power-role = "source";
+                       data-role = "host";
+                       pd-disable;
+                       typec-power-opmode = "default";
                };
        };
 
                compatible = "fcs,fusb302";
                reg = <0x22>;
 
+               interrupt-parent = <&gpio0>;
+               interrupts = <ASPEED_GPIO(B, 7) IRQ_TYPE_LEVEL_LOW>;
+               vbus-supply = <&vbus_sled3>;
+
                connector {
                        compatible = "usb-c-connector";
                        label = "USB-C";
-                       power-role = "dual";
-                       try-power-role = "sink";
-                       data-role = "dual";
-                       source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
-                       sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
-                                       PDO_VAR(3000, 12000, 3000)
-                                       PDO_PPS_APDO(3000, 11000, 3000)>;
-                       op-sink-microwatt = <10000000>;
+                       power-role = "source";
+                       data-role = "host";
+                       pd-disable;
+                       typec-power-opmode = "default";
                };
        };
 
                compatible = "fcs,fusb302";
                reg = <0x22>;
 
+               interrupt-parent = <&gpio0>;
+               interrupts = <ASPEED_GPIO(S, 7) IRQ_TYPE_LEVEL_LOW>;
+               vbus-supply = <&vbus_sled4>;
+
                connector {
                        compatible = "usb-c-connector";
                        label = "USB-C";
-                       power-role = "dual";
-                       try-power-role = "sink";
-                       data-role = "dual";
-                       source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
-                       sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
-                                       PDO_VAR(3000, 12000, 3000)
-                                       PDO_PPS_APDO(3000, 11000, 3000)>;
-                       op-sink-microwatt = <10000000>;
+                       power-role = "source";
+                       data-role = "host";
+                       pd-disable;
+                       typec-power-opmode = "default";
                };
        };
 
                compatible = "fcs,fusb302";
                reg = <0x22>;
 
+               interrupt-parent = <&gpio0>;
+               interrupts = <ASPEED_GPIO(Y, 3) IRQ_TYPE_LEVEL_LOW>;
+               vbus-supply = <&vbus_sled5>;
+
                connector {
                        compatible = "usb-c-connector";
                        label = "USB-C";
-                       power-role = "dual";
-                       try-power-role = "sink";
-                       data-role = "dual";
-                       source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
-                       sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
-                                       PDO_VAR(3000, 12000, 3000)
-                                       PDO_PPS_APDO(3000, 11000, 3000)>;
-                       op-sink-microwatt = <10000000>;
+                       power-role = "source";
+                       data-role = "host";
+                       pd-disable;
+                       typec-power-opmode = "default";
                };
        };
 
                compatible = "fcs,fusb302";
                reg = <0x22>;
 
+               interrupt-parent = <&gpio0>;
+               interrupts = <ASPEED_GPIO(I, 7) IRQ_TYPE_LEVEL_LOW>;
+               vbus-supply = <&vbus_sled6>;
+
                connector {
                        compatible = "usb-c-connector";
                        label = "USB-C";
-                       power-role = "dual";
-                       try-power-role = "sink";
-                       data-role = "dual";
-                       source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
-                       sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
-                                       PDO_VAR(3000, 12000, 3000)
-                                       PDO_PPS_APDO(3000, 11000, 3000)>;
-                       op-sink-microwatt = <10000000>;
+                       power-role = "source";
+                       data-role = "host";
+                       pd-disable;
+                       typec-power-opmode = "default";
                };
        };