From patchwork Tue Nov 19 08:26:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 892 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 7A48D3F1EA for ; Tue, 19 Nov 2019 09:26:46 +0100 (CET) Received: by mail-pg1-f197.google.com with SMTP id c10sf15133783pgm.14 for ; Tue, 19 Nov 2019 00:26:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1574152005; cv=pass; d=google.com; s=arc-20160816; b=wCw2fLi5Vo0oD6EyJSSovaWhktXR8iiB5YDlfxPetfRJYAADKYTCRO9swWoWnRNwgB PykknD5YKMFElhnydMHaYQg72QULGLA45Dl6DVBu+j0GvpM6SoW5IWwwzt4cO4tD9z4V EbgHkxj7vF+nnknOdLopdZve9ETmYTgfb+4aou50iRh4Bw/MjG2nG9uHaGPr4blxVIYn LaGeMFAtuLIlELrjzmTEBl97rEk5cQ8JN7SA27pJIXvR5K2Rz3+k6PiU7cFji19ojE/Y qidrW9xvhsXY3SP2OUQxzuuy4U6jy2HSEjrSbUTIrpJi2w0J0AmB39ljCDPn6c82w4Yg f0lw== 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=nVU9d530iAHG4iqnX/Dt4a5oCMObykSudu9yJz/swQg=; b=Y6HoKkXd8bWOTxZs5T/cD6GxuqrOcBq/hUxh5HEVvUmZ/1M8Afz93UwwgRkZxjMY2H 8JuqSHrB/7WZ7zSW95wszDef+qpUPW9hHS7Lc0kCH3H+bedir0dcTRvsNcex/csXrHXt 1WJnTUPuhGitB4/AqGH1GlrLubtmeCBbBy0J23dYENpUP7p8VSnVMoyCzcWymw+fng2K o+MG82sNVgdBNNClS34MWH4OK8HGjIUj7lir2fd4FybcJjiIH4RPcHNnIFvDGLGliWhs p4hjlTpha08ReG7xEohOdFP/QuwxO/Q3PjhSGYj6tr3jbgIXfTcWuVseR5J9NRP8h6lg qLvg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Lu6QovSs; 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=nVU9d530iAHG4iqnX/Dt4a5oCMObykSudu9yJz/swQg=; b=YdQZ/bh4eLwafByRgt1s7jSRkAOVCaGRPwXq0tXXz1vsak9MN7pBPWKvY2vQH2aM0z JDbC6H05awpMGWKRBX9H8sMBPTwYuEA2xgrGifiZHx101hVJe8B3JODdLOQu8fXTEIwo pIj6UClPGw+om6mC+iNNu7t7xE4QmXW67zll8= 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=nVU9d530iAHG4iqnX/Dt4a5oCMObykSudu9yJz/swQg=; b=Bx9BapcKr+ONyd0bec5vgGDQuckT/0H+RFX/AcB5fDEVp6H40jLbuZ31yo1b+iHNEE T0aBimDEzqNtz1YIsH4ERuhK88A1CgcVqNIIJo0mGF6p2475COo+INIrk6F+Jms2OXtk otEqTTl2rrZyrLjUKUOcpI9wyEM3HbaWMKY2gi22TG/pqkSRLc4pb0NgJAL5fTiVQ4uD 4bFFIekzl1f//LGHftChKwYfIIOusbKtqEfSMC4fjjkhwLmPqQuueliAi0ELYWd0X83K cDCd+V+US6XIyOmMsk8b38Fjz4Bny0Z7inW82H5vXEE7hnPq+SbUFdtZNVQjwAEA6Bae j4Hg== X-Gm-Message-State: APjAAAXHbeuaVMLNCUGRxTyDS9ByWVfbtNVFipd7GMz80bzozsmWL6nA jzZdSqj0kgNLKuPwqIT8F86B20w4 X-Google-Smtp-Source: APXvYqwcMtGREX7TlbSagYnktewv8ZGZjehk87ZKopN8OhPp+/wFz5otTn4a9djyVdsgIK4yAPZSyQ== X-Received: by 2002:a17:90a:c56:: with SMTP id u22mr4658493pje.24.1574152005244; Tue, 19 Nov 2019 00:26:45 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:e70a:: with SMTP id s10ls4801884pfh.6.gmail; Tue, 19 Nov 2019 00:26:43 -0800 (PST) X-Received: by 2002:a63:db15:: with SMTP id e21mr4193459pgg.21.1574152003175; Tue, 19 Nov 2019 00:26:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574152003; cv=none; d=google.com; s=arc-20160816; b=jzZX90EISbWABTjKqzencHrlRZ9/BjEXkMYEeRsoaWXCl3AFak2mgMOo7UmyBsdWsT 9i/HrPEm+gzFkD4R2GsvQHcYDOfB22gI2kdPEO9U21q9Fe9D6rIfEd36opt0yMJgPqNX AuTKYvwWOx9AzuT89KjV3yGJvYRL+XmhcTT6VJqjqhjVfQE6gFiWZo552WczRZoUErjq iYEkhp20OFdmxpDjLTdRmYnAH6ZzQG9CzI32+5zRVkuGO3eEXxgtGC1+7weRsNVY61Ll vAr5Hckqk23StwtVJfBvYC5jm5A5l9qYUrCFD4s6Si2Cc20dIF67TkQ4ALz98EJgz0fH qLbg== 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=qK78oWbHw4kKKjCqniOZnjPWnX/rx2hmJVVfTXaS4w0=; b=rvJ3SeqxZF4TXnW4QZ7yuKb6L90lvr1qLfsauD2y4PjnDOd0Rby/QbyN7OKDdQ1r9P JLsWajKMHaQppt9iVU2DzVIIkAadAsjFC/MWuhS84mLUox7a960HkcvzO9R+N5wjigST sOdRwLdpF+/H5eLgG4Bw09O02gZTLQ9gXjIbPbQfxA6GwQIwB3KpckUfmkK5NBATEidL kTLUuquht+pWDx702PXIdMyliOEMb0cPRbq+R57ah5O0/8twRcGztXWPpNdScWliyOT/ SQSw4nxxr8rO6M/8J2bAY/PHiB8uRaFPRSGIKyq0InV+c7CFX9Wi/mr/puSQ2sibc4M2 Ifnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Lu6QovSs; 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 t6sor24750589plj.15.2019.11.19.00.26.43 for (Google Transport Security); Tue, 19 Nov 2019 00:26:43 -0800 (PST) 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:a17:902:b58b:: with SMTP id a11mr17830730pls.175.1574152002728; Tue, 19 Nov 2019 00:26:42 -0800 (PST) Received: from localhost.localdomain ([115.97.180.31]) by smtp.gmail.com with ESMTPSA id u7sm2312221pjx.19.2019.11.19.00.26.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Nov 2019 00:26:42 -0800 (PST) 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 v2 03/10] gadget: rockchip: USB_GADGET_PRODUCT_NUM Date: Tue, 19 Nov 2019 13:56:16 +0530 Message-Id: <20191119082623.6165-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191119082623.6165-1-jagan@amarulasolutions.com> References: <20191119082623.6165-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=Lu6QovSs; 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. Tested-by: Levin Du Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- 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/tinker-s-rk3288_defconfig | 1 - configs/vyasa-rk3288_defconfig | 1 - drivers/usb/gadget/Kconfig | 3 +++ 14 files changed, 3 insertions(+), 13 deletions(-) diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig index bb3e2c8f7d..79e413145f 100644 --- a/configs/evb-rk3036_defconfig +++ b/configs/evb-rk3036_defconfig @@ -52,7 +52,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 7bf26f7497..8d7d11c3e8 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 8f2f13adae..db7e6fa7b1 100644 --- a/configs/evb-rk3288_defconfig +++ b/configs/evb-rk3288_defconfig @@ -71,7 +71,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 747089435d..0293546b04 100644 --- a/configs/evb-rk3328_defconfig +++ b/configs/evb-rk3328_defconfig @@ -86,7 +86,6 @@ CONFIG_USB_DWC2=y CONFIG_USB_DWC3=y # CONFIG_USB_DWC3_GADGET is not set 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 92eeffda01..6efc5735f9 100644 --- a/configs/firefly-rk3288_defconfig +++ b/configs/firefly-rk3288_defconfig @@ -75,7 +75,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 08b47c84ef..c1607e52fb 100644 --- a/configs/kylin-rk3036_defconfig +++ b/configs/kylin-rk3036_defconfig @@ -56,7 +56,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 b06175958e..4590e38ad3 100644 --- a/configs/miqi-rk3288_defconfig +++ b/configs/miqi-rk3288_defconfig @@ -71,7 +71,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 a86f689858..51bd8adcbc 100644 --- a/configs/phycore-rk3288_defconfig +++ b/configs/phycore-rk3288_defconfig @@ -75,7 +75,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 0cb67f33fe..8cc55bdbe0 100644 --- a/configs/popmetal-rk3288_defconfig +++ b/configs/popmetal-rk3288_defconfig @@ -71,7 +71,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 ec13a7710a..0dab5d7e54 100644 --- a/configs/rock64-rk3328_defconfig +++ b/configs/rock64-rk3328_defconfig @@ -87,7 +87,6 @@ CONFIG_USB_DWC2=y CONFIG_USB_DWC3=y # CONFIG_USB_DWC3_GADGET is not set 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 e46eb1cd91..c350c0d8ba 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-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/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index 3acb2ac5f5..c016a264b2 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -83,7 +83,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 997d9a3877..32c3502683 100644 --- a/configs/vyasa-rk3288_defconfig +++ b/configs/vyasa-rk3288_defconfig @@ -69,7 +69,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.