Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P1801-T & grate_defconfig updates #126

Merged
merged 6 commits into from
Aug 14, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>;
};
Comment on lines +2102 to +2113
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use gpio hogs for these USB devices?

In general we shouldn't amend changes that aren't upstreamable right now, such changes should be kept in a separate patches on top of the more ready patches. Hence there should be the basic tegra30-asus-p1801-t.dts that we can send to upstream today and everything else should be made on top of it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can improve this later on.


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

&usb3_phy {
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