From 9d026e1ae971da6786361d88a3a74a33d4bc448d Mon Sep 17 00:00:00 2001 From: Maxim Schwalm Date: Mon, 1 Aug 2022 18:19:51 +0200 Subject: [PATCH 1/6] usb: misc: onboard_hub: Register child devices Signed-off-by: Maxim Schwalm --- drivers/usb/misc/onboard_usb_hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c index 6b9b949d17d30..aed50ea34f014 100644 --- a/drivers/usb/misc/onboard_usb_hub.c +++ b/drivers/usb/misc/onboard_usb_hub.c @@ -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) From 1549b33945b05b7627119651d4152a738f4c5718 Mon Sep 17 00:00:00 2001 From: Maxim Schwalm Date: Mon, 1 Aug 2022 18:27:57 +0200 Subject: [PATCH 2/6] usb: misc: onboard_hub: Add support for Genesys Logic USB2.0 Hub Add support for the Genesys Logic USB2.0 Hub found on the Asus P1801-T. Signed-off-by: Maxim Schwalm --- drivers/usb/misc/onboard_usb_hub.c | 4 +++- drivers/usb/misc/onboard_usb_hub.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c index aed50ea34f014..a122e63c02a4d 100644 --- a/drivers/usb/misc/onboard_usb_hub.c +++ b/drivers/usb/misc/onboard_usb_hub.c @@ -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 @@ -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 */ diff --git a/drivers/usb/misc/onboard_usb_hub.h b/drivers/usb/misc/onboard_usb_hub.h index d3a5b6938582e..08d494356fca7 100644 --- a/drivers/usb/misc/onboard_usb_hub.h +++ b/drivers/usb/misc/onboard_usb_hub.h @@ -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" }, From d1f025982a0a2be941080485a989a9a50166c410 Mon Sep 17 00:00:00 2001 From: Maxim Schwalm Date: Mon, 1 Aug 2022 18:48:38 +0200 Subject: [PATCH 3/6] amend! ARM: tegra: p1801-t: Add USB devices ARM: tegra: p1801-t: Add on-board hub and devices to USB3 port Add the on-board hub and devices which are connected to the USB3 port. Signed-off-by: Maxim Schwalm --- arch/arm/boot/dts/tegra30-asus-p1801-t.dts | 39 +++++++++++++++------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/arch/arm/boot/dts/tegra30-asus-p1801-t.dts b/arch/arm/boot/dts/tegra30-asus-p1801-t.dts index 84c78ca2f2f6c..e70f2da937c89 100644 --- a/arch/arm/boot/dts/tegra30-asus-p1801-t.dts +++ b/arch/arm/boot/dts/tegra30-asus-p1801-t.dts @@ -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"; @@ -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 { From 842909f514b08aee950e751cf02be8c6ee675bf9 Mon Sep 17 00:00:00 2001 From: Maxim Schwalm Date: Mon, 1 Aug 2022 20:13:08 +0200 Subject: [PATCH 4/6] ARM: configs: Rebuild grate_defconfig Signed-off-by: Maxim Schwalm --- arch/arm/configs/grate_defconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/configs/grate_defconfig b/arch/arm/configs/grate_defconfig index 9c1e305bdd69b..20ab8cb2f6018 100644 --- a/arch/arm/configs/grate_defconfig +++ b/arch/arm/configs/grate_defconfig @@ -1,6 +1,5 @@ # CONFIG_LOCALVERSION_AUTO is not set CONFIG_KERNEL_XZ=y -# CONFIG_SWAP is not set CONFIG_SYSVIPC=y CONFIG_WATCH_QUEUE=y CONFIG_NO_HZ_IDLE=y @@ -25,7 +24,6 @@ CONFIG_BOOT_CONFIG=y # CONFIG_SYSFS_SYSCALL is not set CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y -CONFIG_SLOB=y CONFIG_ARCH_TEGRA=y # CONFIG_HARDEN_BRANCH_PREDICTOR is not set CONFIG_SMP=y @@ -56,6 +54,8 @@ CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_PARTITION_ADVANCED=y # CONFIG_MQ_IOSCHED_DEADLINE is not set # CONFIG_COREDUMP is not set +# CONFIG_SWAP is not set +CONFIG_SLOB=y CONFIG_CMA=y CONFIG_NET=y CONFIG_PACKET=y @@ -532,7 +532,6 @@ CONFIG_RTC_DRV_TPS65910=m CONFIG_RTC_DRV_EM3027=m CONFIG_RTC_DRV_TEGRA=y CONFIG_DMADEVICES=y -CONFIG_TEGRA20_APB_DMA=y # CONFIG_VIRTIO_MENU is not set # CONFIG_VHOST_MENU is not set CONFIG_STAGING=y From 2cf58e3bdf33651ca04004d10d09867962afa8fb Mon Sep 17 00:00:00 2001 From: Maxim Schwalm Date: Mon, 1 Aug 2022 20:16:35 +0200 Subject: [PATCH 5/6] ARM: grate_defconfig: Filter media drivers Signed-off-by: Maxim Schwalm --- arch/arm/configs/grate_defconfig | 162 +------------------------------ 1 file changed, 5 insertions(+), 157 deletions(-) diff --git a/arch/arm/configs/grate_defconfig b/arch/arm/configs/grate_defconfig index 20ab8cb2f6018..f2d95ccaaa2e8 100644 --- a/arch/arm/configs/grate_defconfig +++ b/arch/arm/configs/grate_defconfig @@ -264,167 +264,15 @@ CONFIG_REGULATOR_TPS62360=y CONFIG_REGULATOR_TPS65090=y CONFIG_REGULATOR_TPS6586X=y CONFIG_REGULATOR_TPS65910=y -# CONFIG_MEDIA_CEC_SUPPORT is not set -CONFIG_MEDIA_SUPPORT=y -CONFIG_VIDEO_DEV=m -# CONFIG_DVB_NET is not set -CONFIG_DVB_MAX_ADAPTERS=1 -# CONFIG_DVB_DYNAMIC_MINORS is not set +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_SUPPORT_FILTER=y +# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_PLATFORM_SUPPORT=y CONFIG_MEDIA_USB_SUPPORT=y CONFIG_USB_VIDEO_CLASS=m -# CONFIG_RADIO_ADAPTERS is not set CONFIG_V4L_MEM2MEM_DRIVERS=y CONFIG_VIDEO_TEGRA_VDE=m -# CONFIG_CXD2880_SPI_DRV is not set -# CONFIG_MEDIA_TUNER_E4000 is not set -# CONFIG_MEDIA_TUNER_FC0011 is not set -# CONFIG_MEDIA_TUNER_FC0012 is not set -# CONFIG_MEDIA_TUNER_FC0013 is not set -# CONFIG_MEDIA_TUNER_FC2580 is not set -# CONFIG_MEDIA_TUNER_IT913X is not set -# CONFIG_MEDIA_TUNER_M88RS6000T is not set -# CONFIG_MEDIA_TUNER_MAX2165 is not set -# CONFIG_MEDIA_TUNER_MC44S803 is not set -# CONFIG_MEDIA_TUNER_MSI001 is not set -# CONFIG_MEDIA_TUNER_MT2060 is not set -# CONFIG_MEDIA_TUNER_MT2063 is not set -# CONFIG_MEDIA_TUNER_MT20XX is not set -# CONFIG_MEDIA_TUNER_MT2131 is not set -# CONFIG_MEDIA_TUNER_MT2266 is not set -# CONFIG_MEDIA_TUNER_MXL301RF is not set -# CONFIG_MEDIA_TUNER_MXL5005S is not set -# CONFIG_MEDIA_TUNER_MXL5007T is not set -# CONFIG_MEDIA_TUNER_QM1D1B0004 is not set -# CONFIG_MEDIA_TUNER_QM1D1C0042 is not set -# CONFIG_MEDIA_TUNER_QT1010 is not set -# CONFIG_MEDIA_TUNER_R820T is not set -# CONFIG_MEDIA_TUNER_SI2157 is not set -# CONFIG_MEDIA_TUNER_SIMPLE is not set -# CONFIG_MEDIA_TUNER_TDA18212 is not set -# CONFIG_MEDIA_TUNER_TDA18218 is not set -# CONFIG_MEDIA_TUNER_TDA18250 is not set -# CONFIG_MEDIA_TUNER_TDA18271 is not set -# CONFIG_MEDIA_TUNER_TDA827X is not set -# CONFIG_MEDIA_TUNER_TDA8290 is not set -# CONFIG_MEDIA_TUNER_TDA9887 is not set -# CONFIG_MEDIA_TUNER_TEA5761 is not set -# CONFIG_MEDIA_TUNER_TEA5767 is not set -# CONFIG_MEDIA_TUNER_TUA9001 is not set -# CONFIG_MEDIA_TUNER_XC2028 is not set -# CONFIG_MEDIA_TUNER_XC4000 is not set -# CONFIG_MEDIA_TUNER_XC5000 is not set -# CONFIG_DVB_M88DS3103 is not set -# CONFIG_DVB_MXL5XX is not set -# CONFIG_DVB_STB0899 is not set -# CONFIG_DVB_STB6100 is not set -# CONFIG_DVB_STV090x is not set -# CONFIG_DVB_STV0910 is not set -# CONFIG_DVB_STV6110x is not set -# CONFIG_DVB_STV6111 is not set -# CONFIG_DVB_DRXK is not set -# CONFIG_DVB_MN88472 is not set -# CONFIG_DVB_MN88473 is not set -# CONFIG_DVB_SI2165 is not set -# CONFIG_DVB_TDA18271C2DD is not set -# CONFIG_DVB_CX24110 is not set -# CONFIG_DVB_CX24116 is not set -# CONFIG_DVB_CX24117 is not set -# CONFIG_DVB_CX24120 is not set -# CONFIG_DVB_CX24123 is not set -# CONFIG_DVB_DS3000 is not set -# CONFIG_DVB_MB86A16 is not set -# CONFIG_DVB_MT312 is not set -# CONFIG_DVB_S5H1420 is not set -# CONFIG_DVB_SI21XX is not set -# CONFIG_DVB_STB6000 is not set -# CONFIG_DVB_STV0288 is not set -# CONFIG_DVB_STV0299 is not set -# CONFIG_DVB_STV0900 is not set -# CONFIG_DVB_STV6110 is not set -# CONFIG_DVB_TDA10071 is not set -# CONFIG_DVB_TDA10086 is not set -# CONFIG_DVB_TDA8083 is not set -# CONFIG_DVB_TDA8261 is not set -# CONFIG_DVB_TDA826X is not set -# CONFIG_DVB_TS2020 is not set -# CONFIG_DVB_TUA6100 is not set -# CONFIG_DVB_TUNER_CX24113 is not set -# CONFIG_DVB_TUNER_ITD1000 is not set -# CONFIG_DVB_VES1X93 is not set -# CONFIG_DVB_ZL10036 is not set -# CONFIG_DVB_ZL10039 is not set -# CONFIG_DVB_AF9013 is not set -# CONFIG_DVB_CX22700 is not set -# CONFIG_DVB_CX22702 is not set -# CONFIG_DVB_CXD2820R is not set -# CONFIG_DVB_CXD2841ER is not set -# CONFIG_DVB_DIB3000MB is not set -# CONFIG_DVB_DIB3000MC is not set -# CONFIG_DVB_DIB7000M is not set -# CONFIG_DVB_DIB7000P is not set -# CONFIG_DVB_DIB9000 is not set -# CONFIG_DVB_DRXD is not set -# CONFIG_DVB_EC100 is not set -# CONFIG_DVB_L64781 is not set -# CONFIG_DVB_MT352 is not set -# CONFIG_DVB_NXT6000 is not set -# CONFIG_DVB_RTL2830 is not set -# CONFIG_DVB_RTL2832 is not set -# CONFIG_DVB_RTL2832_SDR is not set -# CONFIG_DVB_S5H1432 is not set -# CONFIG_DVB_SI2168 is not set -# CONFIG_DVB_SP887X is not set -# CONFIG_DVB_STV0367 is not set -# CONFIG_DVB_TDA10048 is not set -# CONFIG_DVB_TDA1004X is not set -# CONFIG_DVB_ZD1301_DEMOD is not set -# CONFIG_DVB_ZL10353 is not set -# CONFIG_DVB_CXD2880 is not set -# CONFIG_DVB_STV0297 is not set -# CONFIG_DVB_TDA10021 is not set -# CONFIG_DVB_TDA10023 is not set -# CONFIG_DVB_VES1820 is not set -# CONFIG_DVB_AU8522_DTV is not set -# CONFIG_DVB_AU8522_V4L is not set -# CONFIG_DVB_BCM3510 is not set -# CONFIG_DVB_LG2160 is not set -# CONFIG_DVB_LGDT3305 is not set -# CONFIG_DVB_LGDT3306A is not set -# CONFIG_DVB_LGDT330X is not set -# CONFIG_DVB_NXT200X is not set -# CONFIG_DVB_OR51132 is not set -# CONFIG_DVB_OR51211 is not set -# CONFIG_DVB_S5H1409 is not set -# CONFIG_DVB_S5H1411 is not set -# CONFIG_DVB_DIB8000 is not set -# CONFIG_DVB_MB86A20S is not set -# CONFIG_DVB_S921 is not set -# CONFIG_DVB_MN88443X is not set -# CONFIG_DVB_TC90522 is not set -# CONFIG_DVB_PLL is not set -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set -# CONFIG_DVB_A8293 is not set -# CONFIG_DVB_AF9033 is not set -# CONFIG_DVB_ASCOT2E is not set -# CONFIG_DVB_ATBM8830 is not set -# CONFIG_DVB_HELENE is not set -# CONFIG_DVB_HORUS3A is not set -# CONFIG_DVB_ISL6405 is not set -# CONFIG_DVB_ISL6421 is not set -# CONFIG_DVB_ISL6423 is not set -# CONFIG_DVB_IX2505V is not set -# CONFIG_DVB_LGS8GL5 is not set -# CONFIG_DVB_LGS8GXX is not set -# CONFIG_DVB_LNBH25 is not set -# CONFIG_DVB_LNBH29 is not set -# CONFIG_DVB_LNBP21 is not set -# CONFIG_DVB_LNBP22 is not set -# CONFIG_DVB_M88RS2000 is not set -# CONFIG_DVB_TDA665x is not set -# CONFIG_DVB_DRX39XYJ is not set -# CONFIG_DVB_CXD2099 is not set -# CONFIG_DVB_SP2 is not set CONFIG_DRM=y CONFIG_DRM_I2C_CH7006=m CONFIG_DRM_I2C_SIL164=m From 6f402b89633f3ddc17b6d886820981a4c81076de Mon Sep 17 00:00:00 2001 From: Maxim Schwalm Date: Mon, 1 Aug 2022 21:20:47 +0200 Subject: [PATCH 6/6] fixup! ARM: grate_defconfig: Enable options needed by Asus Portable AiO P1801-T Signed-off-by: Maxim Schwalm --- arch/arm/configs/grate_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/grate_defconfig b/arch/arm/configs/grate_defconfig index f2d95ccaaa2e8..0afc5df2e166a 100644 --- a/arch/arm/configs/grate_defconfig +++ b/arch/arm/configs/grate_defconfig @@ -349,6 +349,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