From patchwork Tue Oct 22 17:54:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 865 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 79D703F047 for ; Tue, 22 Oct 2019 19:55:32 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id a2sf13953482pfo.12 for ; Tue, 22 Oct 2019 10:55:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1571766931; cv=pass; d=google.com; s=arc-20160816; b=ws/QBE07E4FYVVS79K+1m1GCh/Ns4jsHtNYMWQaeMiYkSEhXywRw0ikEfQ+P2YLR5n qCvAKORKrANQi0k+WdLIffDHGi3Tj7NPzRIeD2EmUrHl1TLioSTJ6j2LhNnzAVOUS5f9 iN0kZ4qymdZVufQrq2VcOxajvM64FSMgTNPoefT8wsmrn4URuNcHuDZeVgTecoMS2hLN ++h5kl3179gdmp4/FD2mwZUVHzYRQtylU1L/abMh5PXD2g2/hv6hakJrb32UP01lVdpl 690Vmu6MWcatGtja6B0ZdsCMxd/gLLPs0g4v3ahq8l+ksfhGSIPZHVLcT3SABdCfyxOT o9Xg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FHwJiLF0OAWDfmSBryI6BjxdHJj/Fb68NVrZMtvC2ys=; b=e0hqOxZQBE684SduG9EGJrFUuTJ/xaMu56ENTHBiAtgDIYAUlHdqrvo9HhZflloe5c ZCloEfekdGjJlQcxa6YYp/6xJwSeuv9P1iO/HTx2m2HF4wj6fuEZyac4co3t09R0QlcD 2doDj0p85pOw2ZUng0LioH/CXQcJqUaCZv0PgKKykXX7lEfMjycjEe2gzHSsPCBSVjEl xvkBxWgI63oD60f/6AK4knTDP3CMADCFH54rX7w73EpYmVtonyx0Of7+sRlGfHfFqDxK 1QX+Eq8atwyALM0ibeVa087a3GIWPMgvjXosRaykTtXy7InDyJbSpB57DCYg+PpS30Kj DLWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="J6/6LjGD"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=FHwJiLF0OAWDfmSBryI6BjxdHJj/Fb68NVrZMtvC2ys=; b=dAjc5nCdBAZJem0X7zLXK2QkWVdBk8QUpgdYbSgMmwyDrhW0wM0cMdXLYEj1OZZnzn bU1dCwf2AvSd1AWMYyfEp83wuF2IJtM4OrolYBHVlblCq60x8zws4SXutvWtR9ijgS8J jSYAg8ViOhUhmYhcg7dg/r6uvt2pXPC90CDzw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=FHwJiLF0OAWDfmSBryI6BjxdHJj/Fb68NVrZMtvC2ys=; b=L4/z7ebU42HPst7Az0zS09TD6xpVoRUbvaQXtX+eAbZSp0mhypn9gKucXUmANScCVn 2OeGp4lIA7Ji5SRpNb/uR+NeqgZLSknLLv3mKGmtt7zPAAxmKhCRvyJbxxU3m2lzbZwT FDN8b25uJr7JW2GqbKILy/EQ6UJUXUiVke9IoAf5sIJODF4RqH/mChg1DptQMoffNUF2 1kJ/6LB0bv0Tj8WNxeYeYQkT8hlE/XZmer0wJerXCzsPmeIXfGzC9FU9rQTUBJvMnDvw /WwaMN4orabhbGvYfkRqFcUjOS6jUNdnOfJAFQkdswp/triRKoydkdbkAmL8NXkqyWYa +34A== X-Gm-Message-State: APjAAAXOgiT7RexNZqijxDdIVPr1CHUzoV9Hm5lfX6e1uBw/FaUX5Ni1 IkZbe7g61KF5WqyMmdMUvV7sOxIq X-Google-Smtp-Source: APXvYqzeeWLh9jF/bH/3of7iSjVH0p+xA5N0eMsoQzbRkBAVMJxx3FypWrc9WnQz4jH5okwTWsvKug== X-Received: by 2002:a63:2049:: with SMTP id r9mr5248364pgm.257.1571766931246; Tue, 22 Oct 2019 10:55:31 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:3265:: with SMTP id k92ls1119176pjb.1.canary-gmail; Tue, 22 Oct 2019 10:55:30 -0700 (PDT) X-Received: by 2002:a17:90a:ab0e:: with SMTP id m14mr6253407pjq.78.1571766930814; Tue, 22 Oct 2019 10:55:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571766930; cv=none; d=google.com; s=arc-20160816; b=wlTHBF/exHQRfxEqDUE1opp5umTpqebYet1s+mDRSWxd8DpKPBgpcjLVEICQWwSjjp +922DhGFV0JhvYuFgqxoATYhdVtiiPEs+UgDVxUaJrzMsZmTqXX1Sq9be4KUyn2rN1sA 9EkN3PosJoiUVw9M4eW9kpIppkQ9gqiO6i/THIjtVfOOthOebk5RoBBPY23aINkbxzn/ eTzN5hVkKrmDC+k3qvZScmfN5IY2owESwYfbD9ygEbY8ooizz0awWY8hRslIxtLaQ8p0 lx0L5tKyy0cl4VF59VOkX1nQCVmomMqWIYzUBzYSVSBUazZB7r87OxtDNdm3EMzOSvB1 itww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=PU65Icb8YUn9f9WvDCy00COMY0WEdsQYL0poK/xy3IQ=; b=eG6Dg8Lmn8IDXI4KuIej2+UC7exbdhKL7q3cTVuNyIT4P0kHn8dfJajBWsUlxaGE4w ONJaiqQumNUl8XOk8tBIsOXes1AsiZozrvviOd0r+FN2lGm3sqzDOhMxF1CmL8+jK07L p7P6ze/e3r/wfUDvdb8OigRaGU0++3C/0wUJXkQh498rCCGAUbyyEoQhDr0cwvzPtg1O Og6fyBb4Mujssy4px8oJQZZ8PkmRik+EXgLat/dF8QiGAECQzLxqfUGpLc+ZhFcZCx1Q 5I+rN/rAMirtRgrRwcxO1ZZh/Blm4gDLdQIr8Vw4AkVKsdo7cfBMHQ32zILE5KE8e/tK SD3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="J6/6LjGD"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id q198sor19722239pfq.55.2019.10.22.10.55.30 for (Google Transport Security); Tue, 22 Oct 2019 10:55:30 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a63:1214:: with SMTP id h20mr5196793pgl.202.1571766930291; Tue, 22 Oct 2019 10:55:30 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.31]) by smtp.gmail.com with ESMTPSA id b3sm20454775pfd.125.2019.10.22.10.55.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2019 10:55:29 -0700 (PDT) From: Jagan Teki To: Kever Yang , Simon Glass , Philipp Tomsich Cc: Levin Du , u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 3/9] gadget: rockchip: USB_GADGET_PRODUCT_NUM Date: Tue, 22 Oct 2019 23:24:52 +0530 Message-Id: <20191022175458.22604-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191022175458.22604-1-jagan@amarulasolutions.com> References: <20191022175458.22604-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="J6/6LjGD"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Rockchip support differnet or common gadget product number between Rockchip SoCs like, 0x310a - rk3036 0x320a - rk3229, rk3288 0x330a - rk3328 So, select them on Kconfig based on platform specific config defined.     This eventually drop the explicit configs defined in supporting board defconfig files. Signed-off-by: Jagan Teki --- configs/evb-rk3036_defconfig | 1 - configs/evb-rk3229_defconfig | 1 - configs/evb-rk3288_defconfig | 1 - configs/evb-rk3328_defconfig | 1 - configs/firefly-rk3288_defconfig | 1 - configs/kylin-rk3036_defconfig | 1 - configs/miqi-rk3288_defconfig | 1 - configs/phycore-rk3288_defconfig | 1 - configs/popmetal-rk3288_defconfig | 1 - configs/rock64-rk3328_defconfig | 1 - configs/tinker-rk3288_defconfig | 1 - configs/vyasa-rk3288_defconfig | 1 - drivers/usb/gadget/Kconfig | 3 +++ 13 files changed, 3 insertions(+), 12 deletions(-) diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig index a3720e6423..c02ef6af4e 100644 --- a/configs/evb-rk3036_defconfig +++ b/configs/evb-rk3036_defconfig @@ -54,7 +54,6 @@ CONFIG_SYSRESET=y # CONFIG_SPL_SYSRESET is not set CONFIG_USB=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_PRODUCT_NUM=0x310a CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_SPL_TINY_MEMSET=y CONFIG_CMD_DHRYSTONE=y diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig index 593d7559c7..e7b813d627 100644 --- a/configs/evb-rk3229_defconfig +++ b/configs/evb-rk3229_defconfig @@ -64,7 +64,6 @@ CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y CONFIG_USB=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_PRODUCT_NUM=0x320a CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_TPL_TINY_MEMSET=y CONFIG_ERRNO_STR=y diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig index 99d97de770..a6c57dfaa6 100644 --- a/configs/evb-rk3288_defconfig +++ b/configs/evb-rk3288_defconfig @@ -73,7 +73,6 @@ CONFIG_USB=y CONFIG_USB_DWC2=y CONFIG_ROCKCHIP_USB2_PHY=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_PRODUCT_NUM=0x320a CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_DM_VIDEO=y CONFIG_DISPLAY=y diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig index 3d9db4b8f5..c9d056b4b9 100644 --- a/configs/evb-rk3328_defconfig +++ b/configs/evb-rk3328_defconfig @@ -87,7 +87,6 @@ CONFIG_USB_OHCI_GENERIC=y CONFIG_USB_DWC2=y CONFIG_USB_DWC3=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_PRODUCT_NUM=0x330a CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_SPL_TINY_MEMSET=y CONFIG_TPL_TINY_MEMSET=y diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig index ea0bf9402c..2de166ae90 100644 --- a/configs/firefly-rk3288_defconfig +++ b/configs/firefly-rk3288_defconfig @@ -78,7 +78,6 @@ CONFIG_USB_DWC2=y CONFIG_ROCKCHIP_USB2_PHY=y CONFIG_USB_KEYBOARD=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_PRODUCT_NUM=0x320a CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig index 2393b8cf77..ff20dea0fc 100644 --- a/configs/kylin-rk3036_defconfig +++ b/configs/kylin-rk3036_defconfig @@ -58,7 +58,6 @@ CONFIG_SYSRESET=y CONFIG_USB=y CONFIG_USB_DWC2=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_PRODUCT_NUM=0x310a CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig index a0b82376c6..fbafbb857a 100644 --- a/configs/miqi-rk3288_defconfig +++ b/configs/miqi-rk3288_defconfig @@ -73,7 +73,6 @@ CONFIG_USB=y CONFIG_USB_DWC2=y CONFIG_ROCKCHIP_USB2_PHY=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_PRODUCT_NUM=0x320a CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig index b892e65c0a..70e3bdc621 100644 --- a/configs/phycore-rk3288_defconfig +++ b/configs/phycore-rk3288_defconfig @@ -77,7 +77,6 @@ CONFIG_USB=y CONFIG_USB_DWC2=y CONFIG_ROCKCHIP_USB2_PHY=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_PRODUCT_NUM=0x320a CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig index 45b48f64f3..611aff5e1d 100644 --- a/configs/popmetal-rk3288_defconfig +++ b/configs/popmetal-rk3288_defconfig @@ -73,7 +73,6 @@ CONFIG_USB=y CONFIG_USB_DWC2=y CONFIG_ROCKCHIP_USB2_PHY=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_PRODUCT_NUM=0x320a CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig index bf2c52ae20..5e64003dd3 100644 --- a/configs/rock64-rk3328_defconfig +++ b/configs/rock64-rk3328_defconfig @@ -89,7 +89,6 @@ CONFIG_USB_OHCI_GENERIC=y CONFIG_USB_DWC2=y CONFIG_USB_DWC3=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_PRODUCT_NUM=0x330a CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_SPL_TINY_MEMSET=y CONFIG_TPL_TINY_MEMSET=y diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index 03a36c1d24..467065e3ad 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -79,7 +79,6 @@ CONFIG_USB=y CONFIG_USB_DWC2=y CONFIG_ROCKCHIP_USB2_PHY=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_PRODUCT_NUM=0x320a CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig index d5ac57be0a..d623520017 100644 --- a/configs/vyasa-rk3288_defconfig +++ b/configs/vyasa-rk3288_defconfig @@ -71,7 +71,6 @@ CONFIG_USB_DWC2=y CONFIG_ROCKCHIP_USB2_PHY=y CONFIG_USB_KEYBOARD=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_PRODUCT_NUM=0x320a CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_FUNCTION_MASS_STORAGE=y CONFIG_USB_HOST_ETHER=y diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 844c3be16f..e120b48b33 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -58,6 +58,9 @@ config USB_GADGET_VENDOR_NUM config USB_GADGET_PRODUCT_NUM hex "Product ID of the USB device" default 0x1010 if ARCH_SUNXI + default 0x310a if ROCKCHIP_RK3036 + default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288 + default 0x330a if ROCKCHIP_RK3328 default 0x0 help Product ID of the USB device emulated, reported to the host device.