From patchwork Mon Jul 11 11:49:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Renner Berthing X-Patchwork-Id: 1654839 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=FCQGGkY5; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LhMdH6P0Dz9s1l for ; Mon, 11 Jul 2022 21:50:11 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1oArvM-0006aT-U4; Mon, 11 Jul 2022 11:50:00 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1oArvK-0006X4-Ii for kernel-team@lists.ubuntu.com; Mon, 11 Jul 2022 11:49:58 +0000 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id A72703F178 for ; Mon, 11 Jul 2022 11:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657540195; bh=ViNVAaCd3El0kMdOjRi4M+B84TEWJKL0cHJUzKMwufY=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FCQGGkY5f5OtIPL80qg2Ey8inYRox4RdLgN2pwBYEUhq9rxk/uZhGf0O+69IoVvTj 4WsAvjZEqTmeQwtiI25g6PAnLuBLrPskPVj/r7/YgROLA8TvozeSTiNAFqy7UawTHI bxMIjOEXtk3nG6fzxhAUm8eNkv0AljcTAO2RNHUPZOQ4hy8AQpoa0Zz7CLvAkBhDEQ NST+4YqhcnNLUzJELUoap7xOJaX7yPPlI7EFhqEZ4jmm8cWanlmRK8yKmyYMomzKL/ xz6uutFLd6VeqxNW4WRS+a4Wd/mm9Kxe/WVXrebCSlBHlIspbUW4ZDshgEuu75KV6w xfNftY345YYqw== Received: by mail-wr1-f72.google.com with SMTP id h29-20020adfaa9d000000b0021d67fc0b4aso563675wrc.9 for ; Mon, 11 Jul 2022 04:49:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ViNVAaCd3El0kMdOjRi4M+B84TEWJKL0cHJUzKMwufY=; b=Mkr8XzLW77d5S81ABNZCn5Ze1tzgdiM4rmZO9YIGNa5JbAMvXNVKFDX90GaFn6Wy4c WT40mFtWD8o6hizD65ZPM+8M/jOulhDofEQf3HMDl+LW/raVFGMi6ZBZbTGY2kM9P0PV XodK64sDRH/2y4OPjXzJ2W1T2Yqqkc1gH0eSDTpDswL1bL+d5IDaW6918DYntVzmgMOq cmjFTQy5TRbgpvjy8WsX255Fdlb9tTT1CVMFmxIRhRBafT3vokGDpJfQA5FX+6kZwHTI qqEtDhRnpaFXcFfN21Ab35+7d8b25+8xkCJw3GXuCpNC7+Ig/Kpk376i1lW4nnZPCRhg +3ow== X-Gm-Message-State: AJIora8heyeYHpKFzBSNjRFE5L8tlabcWr55vp8U0GJhx9mhxYUoSlxL 3V4kyMI1TZG8Q5O1yQbYKxQFGB4WgaJ+gEKe2s1TuwEZDTJ+mSz8rwnhwzE0x0jMknLQi5k7R34 LOeaaC2key9u3U3pHcRylUTvYrm1tnwKvLBiFNSTImA== X-Received: by 2002:a05:600c:4e8f:b0:3a1:8b21:ebbc with SMTP id f15-20020a05600c4e8f00b003a18b21ebbcmr15813512wmq.149.1657540194017; Mon, 11 Jul 2022 04:49:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t4GBkQu1VpErUylNXRVFhzDxxqmAXMESU2713TQQHwf/YUzfZZn+UTsk7IIKlOhdgulw1cuA== X-Received: by 2002:a05:600c:4e8f:b0:3a1:8b21:ebbc with SMTP id f15-20020a05600c4e8f00b003a18b21ebbcmr15813496wmq.149.1657540193778; Mon, 11 Jul 2022 04:49:53 -0700 (PDT) Received: from stitch.. (80.71.140.73.ipv4.parknet.dk. [80.71.140.73]) by smtp.gmail.com with ESMTPSA id t6-20020a5d4606000000b0021b866397a7sm5713951wrq.1.2022.07.11.04.49.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 04:49:53 -0700 (PDT) From: Emil Renner Berthing To: kernel-team@lists.ubuntu.com Subject: [SRU][J/allwinner-5.17][PATCH v3 2/4] UBUNTU: SAUCE: phy: sun4i-usb: Add D1 variant Date: Mon, 11 Jul 2022 13:49:49 +0200 Message-Id: <20220711114951.99949-3-emil.renner.berthing@canonical.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220711114951.99949-1-emil.renner.berthing@canonical.com> References: <20220711114951.99949-1-emil.renner.berthing@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Samuel Holland BugLink: https://bugs.launchpad.net/bugs/1981074 D1 has a register layout like A100 and H616, with the moved SIDDQ bit. Unlike H616 it does not have any dependencies between PHY instances. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20220203013558.11490-4-samuel@sholland.org Signed-off-by: Vinod Koul (cherry-pick from https://github.com/smaeul/linux.git riscv/d1-wip) Signed-off-by: Emil Renner Berthing --- drivers/phy/allwinner/phy-sun4i-usb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index 142f4cafdc78..997a5e5e8136 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -945,6 +945,15 @@ static const struct sun4i_usb_phy_cfg sun8i_v3s_cfg = { .phy0_dual_route = true, }; +static const struct sun4i_usb_phy_cfg sun20i_d1_cfg = { + .num_phys = 2, + .type = sun50i_h6_phy, + .phyctl_offset = REG_PHYCTL_A33, + .dedicated_clocks = true, + .hci_phy_ctl_clear = PHY_CTL_SIDDQ, + .phy0_dual_route = true, +}; + static const struct sun4i_usb_phy_cfg sun50i_a64_cfg = { .num_phys = 2, .type = sun50i_a64_phy, @@ -976,6 +985,7 @@ static const struct of_device_id sun4i_usb_phy_of_match[] = { { .compatible = "allwinner,sun8i-h3-usb-phy", .data = &sun8i_h3_cfg }, { .compatible = "allwinner,sun8i-r40-usb-phy", .data = &sun8i_r40_cfg }, { .compatible = "allwinner,sun8i-v3s-usb-phy", .data = &sun8i_v3s_cfg }, + { .compatible = "allwinner,sun20i-d1-usb-phy", .data = &sun20i_d1_cfg }, { .compatible = "allwinner,sun50i-a64-usb-phy", .data = &sun50i_a64_cfg}, { .compatible = "allwinner,sun50i-h6-usb-phy", .data = &sun50i_h6_cfg },