From patchwork Thu Sep 17 06:59:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 297617 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE888C43461 for ; Thu, 17 Sep 2020 07:00:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 98CCA21D24 for ; Thu, 17 Sep 2020 07:00:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="v5O1H2h6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726200AbgIQHAe (ORCPT ); Thu, 17 Sep 2020 03:00:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726186AbgIQHAF (ORCPT ); Thu, 17 Sep 2020 03:00:05 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 644B6C06178A for ; Thu, 17 Sep 2020 00:00:01 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id g4so785830wrs.5 for ; Thu, 17 Sep 2020 00:00:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Oigsqv0xbxJDh4+eGFiginHqxJGGsS0Gt9+VPZlYuXQ=; b=v5O1H2h6BVXGNsYCO40bSXSDq67Ti1aqleKcmx7yLpmjrNUwAbQuoh6o8SY7NiN6Ft OTMp+x4/0+h9qtLiuvKerU6ydbeqLUn/q3JooBmjEDxIEHcpxK6Aet6cn+uRwln7C3j0 bCXqKgHuHIclcZrWk9oT8sn7MA7VxhHNOx7qUvz5WLxySxpVeUsKLBaKAu1FLEoqAj2N ZaSlaSbfSrxGQ0dYtT+FPhRtJjbZKVdWQZUC/72l7sdEYyhtngTNzjj/cqY1jzubnC18 Wjex2HPwO377L8EMzV3EF3c682H7VQeqlxWtDICzkqMbV/ZGqk5STrvVBkxsqoSdgrKh 6QfA== 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; bh=Oigsqv0xbxJDh4+eGFiginHqxJGGsS0Gt9+VPZlYuXQ=; b=S7mS6xeGLLhgZbABLp4sLnRZ9nyHQj1wXTy5dmAM5ijccll4D2IVRzrd/ioUH2ONV9 XIFJTT3XZgYPmvzGemVvmLVt6NySek/d3ozaRra4vsiu0R+7ihIXx1rmVvlRE05xe0em DGCJgi4u3f7R46O5Gc/WBod75fi771p7+FO0xA8CxsukJaUHRyHlc7Z8TL2v+hG8q7GN N01QybyuEHlhFkxZ84oRYCVFJQIXxCjrBGqLbiAyq4ODRmTQmsNup29Pf30kGMdeCibK pdQ8/iIyi2c2tjMfqqCatyG8pQw6lUL2vJBQcLCBjTOa4AIsC65wQfMMRl2Lo9f1jU7X oFyQ== X-Gm-Message-State: AOAM533b1IEdaw8c/Ued9uowa1TS981po4yNftWWcULFlwYCwTCMM16G z4H+0XZgX9BzjTY/XXlhnDFWUm+wHKLlL+sB X-Google-Smtp-Source: ABdhPJwdpYaxpEzla+mW1BFwvftTJkMtrrj8tK9SVmXuIkteWyr7bm3xB0VQlP2vXnpLyQHxtJaVGA== X-Received: by 2002:adf:efc9:: with SMTP id i9mr31792797wrp.187.1600325999780; Wed, 16 Sep 2020 23:59:59 -0700 (PDT) Received: from bender.baylibre.local (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id z14sm35709055wrh.14.2020.09.16.23.59.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2020 23:59:58 -0700 (PDT) From: Neil Armstrong To: khilman@baylibre.com, kishon@ti.com, martin.blumenstingl@googlemail.com Cc: linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong , linux-usb@vger.kernel.org Subject: [PATCH v2 1/5] phy: amlogic: phy-meson-gxl-usb2: keep ID pull-up even in Host mode Date: Thu, 17 Sep 2020 08:59:45 +0200 Message-Id: <20200917065949.3476-2-narmstrong@baylibre.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20200917065949.3476-1-narmstrong@baylibre.com> References: <20200917065949.3476-1-narmstrong@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org In order to keep OTG ID detection even when in Host mode, the ID line of the PHY (if the current phy is an OTG one) pull-up should be kept enable in both modes. This fixes OTG switch on GXL, GXM & AXG platforms, otherwise once switched to Host, the ID detection doesn't work anymore to switch back to Device. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Reviewed-by: Martin Blumenstingl --- drivers/phy/amlogic/phy-meson-gxl-usb2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/phy/amlogic/phy-meson-gxl-usb2.c b/drivers/phy/amlogic/phy-meson-gxl-usb2.c index 43ec9bf24abf..6e862ea60d8f 100644 --- a/drivers/phy/amlogic/phy-meson-gxl-usb2.c +++ b/drivers/phy/amlogic/phy-meson-gxl-usb2.c @@ -158,7 +158,8 @@ static int phy_meson_gxl_usb2_set_mode(struct phy *phy, U2P_R0_DM_PULLDOWN); regmap_update_bits(priv->regmap, U2P_R0, U2P_R0_DP_PULLDOWN, U2P_R0_DP_PULLDOWN); - regmap_update_bits(priv->regmap, U2P_R0, U2P_R0_ID_PULLUP, 0); + regmap_update_bits(priv->regmap, U2P_R0, U2P_R0_ID_PULLUP, + U2P_R0_ID_PULLUP); break; case PHY_MODE_USB_DEVICE: From patchwork Thu Sep 17 06:59:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 297616 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BBD8C2BBD1 for ; Thu, 17 Sep 2020 07:03:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 271FA21974 for ; Thu, 17 Sep 2020 07:03:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="zAxziCPI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726186AbgIQHA5 (ORCPT ); Thu, 17 Sep 2020 03:00:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgIQHAK (ORCPT ); Thu, 17 Sep 2020 03:00:10 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70185C061797 for ; Thu, 17 Sep 2020 00:00:03 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id x14so766355wrl.12 for ; Thu, 17 Sep 2020 00:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+Sr8oVzKvyD/zquOuBfsibXPcOOdCUHxve0EXAZkgxo=; b=zAxziCPISkzSXUnEHDjswb1aWbCu/F/BgQ37nODlVtfT7XQxc3p+BB7uTBkX6ifJzF y9u7LKoOphxoUm60u1XcFt1Gj8Ck+ohOzAU86JxyEPPurTfDqxhGtDl4ZF2G3pruZvWQ gDqeZa6RlXly7ApknGR4IA26N9gUADNnyDgxf6wiYzts2Ef4WKHPU9v/RQLJrMA0YwHS RlKwbBuy193Irpy25bB++7/APngy9hCbRTEkl2Y7uryqPB9MDloSuc/m/3iNTRNkNNF3 tmyF3fpRfqXLWUFpb2SOVIVV2OmqNEyehJg6BOgIGHrabOk4PhfDTt9qakpbly9ayxeM jHNQ== 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; bh=+Sr8oVzKvyD/zquOuBfsibXPcOOdCUHxve0EXAZkgxo=; b=jyzAAZ3J79ncH33lyR5P+AF+si6Aizif/XT1AhYGRiG1R3Swflgkzv6ZHoUyp6oMZV GcU3pksOaiicBpyMRZlxXaqoho1ZptBS6AsaEvSDWVLhhrg/+8AK3AT1m/sT+fALv8H5 sYcDM5u22H1/wJVawFQZvHbYAO+X0H0wDOx7HjLXlg1e78pyVL8lzvfMX5UBHj+CLTkB TnjJrzrTWiv0bf+DqXqeedFFhpfFTwicUP+Em/0fWJzALUBTdalW2lirtkX7RUjjTyQx HdYecL/oFfBt6Dfnd8ZgAYJGD329zCb0iZDl8RNYVi+5AS9RYjBd34c7Gv2lnnB63LC8 KT/Q== X-Gm-Message-State: AOAM530akX/aMjTwvnT64PaZhULosUkk6RnvusGolPudOt947GWNdec/ T/J5O4IkmFG6v+wFJek9vYijXg== X-Google-Smtp-Source: ABdhPJxZcc1dB/8PenT4vG8pyjqgyZKjF4FfZZo+k5kkR1VqWS7d/qJLCfVQ1jjZVVPcRSk9o9jyiA== X-Received: by 2002:adf:9c93:: with SMTP id d19mr31158974wre.275.1600326001840; Thu, 17 Sep 2020 00:00:01 -0700 (PDT) Received: from bender.baylibre.local (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id z14sm35709055wrh.14.2020.09.16.23.59.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2020 00:00:00 -0700 (PDT) From: Neil Armstrong To: khilman@baylibre.com, martin.blumenstingl@googlemail.com, devicetree@vger.kernel.org Cc: linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong , linux-usb@vger.kernel.org Subject: [PATCH v2 2/5] dt-bindings: usb: amlogic, meson-g12a-usb-ctrl: add the Amlogic AXG Families USB Glue Bindings Date: Thu, 17 Sep 2020 08:59:46 +0200 Message-Id: <20200917065949.3476-3-narmstrong@baylibre.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20200917065949.3476-1-narmstrong@baylibre.com> References: <20200917065949.3476-1-narmstrong@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The Amlogic AXG is close to the GXL Glue but with a single OTG PHY. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Acked-by: Martin Blumenstingl Reviewed-by: Rob Herring --- .../usb/amlogic,meson-g12a-usb-ctrl.yaml | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml b/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml index 5b04a7dfa018..c0058332b967 100644 --- a/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml +++ b/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml @@ -25,13 +25,14 @@ description: | The Amlogic A1 embeds a DWC3 USB IP Core configured for USB2 in host-only mode. - The Amlogic GXL & GXM SoCs doesn't embed an USB3 PHY. + The Amlogic GXL, GXM & AXG SoCs doesn't embed an USB3 PHY. properties: compatible: enum: - amlogic,meson-gxl-usb-ctrl - amlogic,meson-gxm-usb-ctrl + - amlogic,meson-axg-usb-ctrl - amlogic,meson-g12a-usb-ctrl - amlogic,meson-a1-usb-ctrl @@ -151,6 +152,25 @@ allOf: required: - clock-names + - if: + properties: + compatible: + enum: + - amlogic,meson-axg-usb-ctrl + + then: + properties: + phy-names: + items: + - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used + clocks: + minItems: 2 + clock-names: + items: + - const: usb_ctrl + - const: ddr + required: + - clock-names - if: properties: compatible: From patchwork Thu Sep 17 06:59:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 258527 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D828CC43461 for ; Thu, 17 Sep 2020 07:07:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E1F921D7F for ; Thu, 17 Sep 2020 07:07:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="GVoDkghg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726250AbgIQHH0 (ORCPT ); Thu, 17 Sep 2020 03:07:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgIQHAO (ORCPT ); Thu, 17 Sep 2020 03:00:14 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D3B2C061351 for ; Thu, 17 Sep 2020 00:00:05 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id e16so797316wrm.2 for ; Thu, 17 Sep 2020 00:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZG6N/rhNc2zEd0OmlssDRFgV4b5KjiPy9hIEmRV9zOc=; b=GVoDkghgcAlUKt8WnZ0zuyGHxFOF6iJbX0CkdJ7VSuHnfyB0eSkmYBJmJvknoWmN16 W67hTuQ48S68jHaxzPwVVIfNmpEwkoQSUT+VWRyQEX4g+RDNfoS+wJ7nHegZ838E6JKO RO4T9m2u9wQybkMXV0I+cZUqNZ/lCmsSgyWOSiF45JI8c6fQffCao9QuIdIhrRoGTOkP 7PiyoG3oz1C7hBbcp4POtOnEWC44Ptmtzb4RXImlH2Jov0oKcidiEN+TOIU9FV+AaiCk 4BmiXKy7ZPY5P8V2hDihIKzLqvG0Sp2INBAqC72OYYVBlZ7oduR9EMFdVsgzA2rUGSsF fHcA== 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; bh=ZG6N/rhNc2zEd0OmlssDRFgV4b5KjiPy9hIEmRV9zOc=; b=I7jmbTPCixTKWCP6r1eZfk8cTNVukgytazM+WaKNy1q7gkkVIb6KFsxq6yShQ6+U/y 2zFOz4GDoV/U/lWA+5dgSmkOyXaBQs+a0Xtlng0qc6vlfzagflreEU7+tVtOzGyDdkCw dDd/7fwWu8ZNcbrjxcP/QbN59I7Pag1CjZJqBU4dY1XD8UwA3awkAC2zZRjO/xTXA0Ds MYBysOo8gdGD6bVK2uGGrBXR0CjX3+Jp3fwchUawTEp3FzyFnTYG9RryiPAvJ5uyGXjc E7pqLdyLG07Zi2xy/Q5D/BXj4FEKYCNwUE0miql0294gzuQGa05PNmaGVBsE33BMqPVA dVRQ== X-Gm-Message-State: AOAM531RZl34i554SVWOdzrtk/zumc6Da943c5Km3K/vEdTR9gDRwxIS ddXcJCjh/Ju1ZnXKQ0xgucUQgQ== X-Google-Smtp-Source: ABdhPJyKfXYnIS4ErZB/cswC92sAGdSNdhniNnIBWbPAMUoVrHd/CFYke/iib87+7iJgpTBeQrIDnA== X-Received: by 2002:adf:e989:: with SMTP id h9mr32555878wrm.38.1600326003291; Thu, 17 Sep 2020 00:00:03 -0700 (PDT) Received: from bender.baylibre.local (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id z14sm35709055wrh.14.2020.09.17.00.00.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2020 00:00:02 -0700 (PDT) From: Neil Armstrong To: khilman@baylibre.com, balbi@kernel.org, martin.blumenstingl@googlemail.com Cc: linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong , linux-usb@vger.kernel.org Subject: [PATCH v2 3/5] usb: dwc-meson-g12a: Add support for USB on AXG SoCs Date: Thu, 17 Sep 2020 08:59:47 +0200 Message-Id: <20200917065949.3476-4-narmstrong@baylibre.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20200917065949.3476-1-narmstrong@baylibre.com> References: <20200917065949.3476-1-narmstrong@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The Amlogic AXG is close to the GXL Glue but with a single OTG PHY. It needs the same init sequence as GXL & GXM, but it seems it doesn't need the host disconnect bit. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Reviewed-by: Martin Blumenstingl --- drivers/usb/dwc3/dwc3-meson-g12a.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index 1f7f4d88ed9d..784e7eafc9ce 100644 --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -127,6 +127,7 @@ static const char *meson_g12a_phy_names[] = { /* * Amlogic A1 has a single physical PHY, in slot 1, but still has the * two U2 PHY controls register blocks like G12A. + * AXG has the similar scheme, thus needs the same tweak. * Handling the first PHY on slot 1 would need a large amount of code * changes, and the current management is generic enough to handle it * correctly when only the "usb2-phy1" phy is specified on-par with the @@ -215,6 +216,19 @@ static struct dwc3_meson_g12a_drvdata gxm_drvdata = { .usb_post_init = dwc3_meson_gxl_usb_post_init, }; +static struct dwc3_meson_g12a_drvdata axg_drvdata = { + .otg_switch_supported = true, + .clks = meson_gxl_clocks, + .num_clks = ARRAY_SIZE(meson_gxl_clocks), + .phy_names = meson_a1_phy_names, + .num_phys = ARRAY_SIZE(meson_a1_phy_names), + .setup_regmaps = dwc3_meson_gxl_setup_regmaps, + .usb2_init_phy = dwc3_meson_gxl_usb2_init_phy, + .set_phy_mode = dwc3_meson_gxl_set_phy_mode, + .usb_init = dwc3_meson_g12a_usb_init, + .usb_post_init = dwc3_meson_gxl_usb_post_init, +}; + static struct dwc3_meson_g12a_drvdata g12a_drvdata = { .otg_switch_supported = true, .clks = meson_g12a_clocks, @@ -930,6 +944,10 @@ static const struct of_device_id dwc3_meson_g12a_match[] = { .compatible = "amlogic,meson-gxm-usb-ctrl", .data = &gxm_drvdata, }, + { + .compatible = "amlogic,meson-axg-usb-ctrl", + .data = &axg_drvdata, + }, { .compatible = "amlogic,meson-g12a-usb-ctrl", .data = &g12a_drvdata,