Skip to content

Commit

Permalink
imx8qm-var-som: dts: rework usb nodes for SOM/SPEAR-IMX8
Browse files Browse the repository at this point in the history
  - fix error message "Bus usbh3: probe failed, error -22" for SOM
  - move usb nodes from dts to dtsi like NXP device tree for SOM and SPEAR
  • Loading branch information
FrancescoFerraro committed Jan 2, 2021
1 parent 48b81b7 commit 777a7e3
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 40 deletions.
25 changes: 25 additions & 0 deletions arch/arm/dts/fsl-imx8qm-var-som-u-boot.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@
* Copyright 2018 NXP
* Copyright 2020 Variscite Ltd.
*/
/ {
aliases {
usbhost1 = &usbh3;
usbgadget0 = &usbg1;
};

usbh3: usbh3 {
compatible = "Cadence,usb3-host";
dr_mode = "host";
cdns3,usb = <&usbotg3>;
status = "okay";
};

usbg1: usbg1 {
compatible = "fsl,imx27-usb-gadget";
dr_mode = "peripheral";
chipidea,usb = <&usbotg1>;
status = "okay";
u-boot,dm-spl;
};
};

&{/imx8qm-pm} {
u-boot,dm-spl;
Expand Down Expand Up @@ -161,6 +182,10 @@
u-boot,dm-spl;
};

&usbotg1 {
u-boot,dm-spl;
};

&usbotg3 {
phys = <&usbphynop1>;
u-boot,dm-spl;
Expand Down
21 changes: 1 addition & 20 deletions arch/arm/dts/fsl-imx8qm-var-som.dts
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,6 @@
stdout-path = &lpuart0;
};

aliases {
usbhost1 = &usbh3;
usbgadget0 = &usbg1;
};

usbh3: usbh3 {
compatible = "fsl,imx27-usb";
dr_mode = "host";
chipidea,usb = <&usbotg1>;
status = "okay";
};

usbg1: usbg1 {
compatible = "Cadence,usb3-host";
cdns3,usb = <&usbotg3>;
dr_mode = "host";
status = "okay";
u-boot,dm-spl;
};

regulators {
compatible = "simple-bus";
#address-cells = <1>;
Expand Down Expand Up @@ -215,6 +195,7 @@
};

&usbotg1 {
dr_mode = "host";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg1>;
vbus-supply = <&reg_usb_otg1_vbus>;
Expand Down
25 changes: 25 additions & 0 deletions arch/arm/dts/fsl-imx8qm-var-spear-u-boot.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@
* Copyright 2018 NXP
* Copyright 2020 Variscite Ltd.
*/
/ {
aliases {
usbhost1 = &usbh3;
usbgadget0 = &usbg1;
};

usbh3: usbh3 {
compatible = "Cadence,usb3-host";
dr_mode = "host";
cdns3,usb = <&usbotg3>;
status = "okay";
};

usbg1: usbg1 {
compatible = "fsl,imx27-usb-gadget";
dr_mode = "peripheral";
chipidea,usb = <&usbotg1>;
status = "okay";
u-boot,dm-spl;
};
};

&{/imx8qm-pm} {
u-boot,dm-spl;
Expand Down Expand Up @@ -161,6 +182,10 @@
u-boot,dm-spl;
};

&usbotg1 {
u-boot,dm-spl;
};

&usbotg3 {
phys = <&usbphynop1>;
u-boot,dm-spl;
Expand Down
21 changes: 1 addition & 20 deletions arch/arm/dts/fsl-imx8qm-var-spear.dts
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,6 @@
stdout-path = &lpuart0;
};

aliases {
usbhost1 = &usbh3;
usbgadget1 = &usbg1;
};

usbh3: usbh3 {
compatible = "Cadence,usb3-host";
cdns3,usb = <&usbotg3>;
dr_mode = "host";
status = "okay";
u-boot,dm-spl;
};

usbg1: usbg1 {
compatible = "fsl,imx27-usb-gadget";
chipidea,usb = <&usbotg1>;
dr_mode = "peripheral";
status = "okay";
};

regulators {
compatible = "simple-bus";
#address-cells = <1>;
Expand Down Expand Up @@ -228,6 +208,7 @@
};

&usbotg1 {
dr_mode = "host";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg1>;
vbus-supply = <&reg_usb_otg1_vbus>;
Expand Down

0 comments on commit 777a7e3

Please sign in to comment.