Skip to content

Commit

Permalink
Merge pull request #126 from maximschwalm/master
Browse files Browse the repository at this point in the history
P1801-T & grate_defconfig updates
  • Loading branch information
digetx authored Aug 14, 2022
2 parents 977c0fc + 6f402b8 commit 57f7aa8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 14 deletions.
39 changes: 27 additions & 12 deletions arch/arm/boot/dts/tegra30-asus-p1801-t.dts
Original file line number Diff line number Diff line change
Expand Up @@ -380,17 +380,6 @@
};
};

usb-touchscreen {
compatible = "usb457,817";
reset-gpios = <&gpio TEGRA_GPIO(H, 6) GPIO_ACTIVE_LOW>;
power-gpios = <&gpio TEGRA_GPIO(S, 0) GPIO_ACTIVE_HIGH>;
};

usb-webcam {
compatible = "usb4f2,b354";
power-gpios = <&gpio TEGRA_GPIO(BB, 4) GPIO_ACTIVE_HIGH>;
};

brcm_wifi_pwrseq: wifi-pwrseq {
compatible = "mmc-pwrseq-simple";

Expand Down Expand Up @@ -2096,9 +2085,35 @@
vbus-supply = <&usb2_vbus>;
};

/* TODO: model USB hub and devices */
&usb3 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;

/* Genesys Logic 4-port USB2.0 Hub */
hub@1 {
compatible = "usb5e3,610";
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;

/* USBest Technology SiS HID Touch Controller */
device@1 {
compatible = "usb457,817";
reg = <1>;
reset-gpios = <&gpio TEGRA_GPIO(H, 6) GPIO_ACTIVE_LOW>;
power-gpios = <&gpio TEGRA_GPIO(S, 0) GPIO_ACTIVE_HIGH>;
};

/* Chicony USB2.0 HD UVC WebCam */
device@2 {
compatible = "usb4f2,b354";
reg = <2>;
power-gpios = <&gpio TEGRA_GPIO(BB, 4) GPIO_ACTIVE_HIGH>;
};

/* One USB port is externally accessible on the docking station */
};
};

&usb3_phy {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/configs/grate_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ CONFIG_USB_CHIPIDEA_UDC=y
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_PWRSEQ=m
CONFIG_USB_ONBOARD_HUB=m
CONFIG_USB_CONFIGFS=y
CONFIG_USB_CONFIGFS_RNDIS=y
CONFIG_USB_CONFIGFS_EEM=y
Expand Down
6 changes: 4 additions & 2 deletions drivers/usb/misc/onboard_usb_hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ static int onboard_hub_probe(struct platform_device *pdev)
INIT_WORK(&hub->attach_usb_driver_work, onboard_hub_attach_usb_driver);
schedule_work(&hub->attach_usb_driver_work);

return 0;
return devm_of_platform_populate(dev);
}

static int onboard_hub_remove(struct platform_device *pdev)
Expand Down Expand Up @@ -309,7 +309,8 @@ static struct platform_driver onboard_hub_driver = {

/************************** USB driver **************************/

#define VENDOR_ID_REALTEK 0x0bda
#define VENDOR_ID_GENESYS_LOGIC 0x05e3
#define VENDOR_ID_REALTEK 0x0bda

/*
* Returns the onboard_hub platform device that is associated with the USB
Expand Down Expand Up @@ -383,6 +384,7 @@ static void onboard_hub_usbdev_disconnect(struct usb_device *udev)
}

static const struct usb_device_id onboard_hub_id_table[] = {
{ USB_DEVICE(VENDOR_ID_GENESYS_LOGIC, 0x0610) },
{ USB_DEVICE(VENDOR_ID_REALTEK, 0x0411) }, /* RTS5411 USB 3.1 */
{ USB_DEVICE(VENDOR_ID_REALTEK, 0x5411) }, /* RTS5411 USB 2.1 */
{ USB_DEVICE(VENDOR_ID_REALTEK, 0x0414) }, /* RTS5414 USB 3.2 */
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/misc/onboard_usb_hub.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define _USB_MISC_ONBOARD_USB_HUB_H

static const struct of_device_id onboard_hub_match[] = {
{ .compatible = "usb5e3,610" },
{ .compatible = "usbbda,411" },
{ .compatible = "usbbda,5411" },
{ .compatible = "usbbda,414" },
Expand Down

0 comments on commit 57f7aa8

Please sign in to comment.