Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp313287pxu; Fri, 11 Dec 2020 03:02:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwYYjOkTV1uyzkm19AEfYSZ7e/yqeipAoIJo4/J1038UsEkdCwH/p7ih9BhBhYA3ZiE5s8C X-Received: by 2002:a50:fd88:: with SMTP id o8mr11218386edt.386.1607684544974; Fri, 11 Dec 2020 03:02:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607684544; cv=none; d=google.com; s=arc-20160816; b=Xm8VUah6iA4I4icp5jnHFcDiiROgejsJMSiwq1bkDJQ3CY+OVBwgQiQN6UcueEEDea 9AdRCugN2Zvr0Cio52oW6TA24YlqeMAvnK7s4Map1Z0L4JhB1R5DtKAa5KC0UNhKHxWp zzvBPS1b5F66cNsjHghYqP3Y2jNvSl1uC8+eW1fE2v+JUW/SQk6nQFNN85Hd9kaK1EtV pYrpbq9GLw0ww3UR4aL48hkxgTrTtN1uAVIZgQPHZwLeS7EBlsV26fFhW1X+jllmwuB9 AldBBIg+DOURBVASSkjwD4IqCyYhnkMtpbMd7dQy9yZ6f+d+aa1CbJKCLE7eTtryoJPL N5fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=cN3D1xIRdVE/1rpTVxPkWbT/lVCLHV/TvZkf26NdFN8=; b=Fd98CyL1wpatHaIt+FqQyQWz1vbnm7iEMhFWQs+1Sr+LUzju+dZYL9kwQ+nwYI0JLw QdFnJPD3RmpislM0hDb2/noS9ibHldnmSqD9UpQsHgHodKQJ/gpYd48rmQuBpj2TDJP8 0ywocQMTUXY4Ey9WAdY/dw6oae+mxviGL2av5u5xtglkI4cX+nd2pt2IhZuor4HUtYZp PL61kLS3NbqUKqY5BXmEv31utLKbjgITcZS43FCBDhKP7nePTJ+s7EHmAVmByUHKQRHx VhuvLnfLvphepDHxECPdm4lUK27yY4wlrocS3/jGxKhF3Bvfaor8oHuMsksjmPq7ywFZ avlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b22si4055316eja.62.2020.12.11.03.02.00; Fri, 11 Dec 2020 03:02:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389122AbgLKBY1 (ORCPT + 99 others); Thu, 10 Dec 2020 20:24:27 -0500 Received: from foss.arm.com ([217.140.110.172]:49794 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394777AbgLKBV6 (ORCPT ); Thu, 10 Dec 2020 20:21:58 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1F331152B; Thu, 10 Dec 2020 17:20:30 -0800 (PST) Received: from localhost.localdomain (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EA6703F66B; Thu, 10 Dec 2020 17:20:27 -0800 (PST) From: Andre Przywara To: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec Cc: Icenowy Zheng , Linus Walleij , Rob Herring , =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= , Shuosheng Huang , Yangtao Li , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Kishon Vijay Abraham I , Vinod Koul Subject: [PATCH v2 15/21] phy: sun4i-usb: Add support for the H616 USB PHY Date: Fri, 11 Dec 2020 01:19:28 +0000 Message-Id: <20201211011934.6171-16-andre.przywara@arm.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20201211011934.6171-1-andre.przywara@arm.com> References: <20201211011934.6171-1-andre.przywara@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The USB PHY used in the Allwinner H616 SoC inherits some traits from its various predecessors: it has four full PHYs like the H3, needs some extra bits to be set like the H6, and clears a different bit in the PMU_UNK1 register like the A100. Name all those properties in a new config struct and assign a new compatible name to it. Signed-off-by: Andre Przywara --- drivers/phy/allwinner/phy-sun4i-usb.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index 4ba0699e0bb4..671c5cc59433 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -968,6 +968,16 @@ static const struct sun4i_usb_phy_cfg sun50i_h6_cfg = { .missing_phys = BIT(1) | BIT(2), }; +static const struct sun4i_usb_phy_cfg sun50i_h616_cfg = { + .num_phys = 4, + .type = sun50i_h6_phy, + .disc_thresh = 3, + .phyctl_offset = REG_PHYCTL_A33, + .dedicated_clocks = true, + .phy0_dual_route = true, + .pmu_unk1_clrbits = BIT(3), +}; + static const struct of_device_id sun4i_usb_phy_of_match[] = { { .compatible = "allwinner,sun4i-a10-usb-phy", .data = &sun4i_a10_cfg }, { .compatible = "allwinner,sun5i-a13-usb-phy", .data = &sun5i_a13_cfg }, @@ -982,6 +992,7 @@ static const struct of_device_id sun4i_usb_phy_of_match[] = { { .compatible = "allwinner,sun50i-a64-usb-phy", .data = &sun50i_a64_cfg}, { .compatible = "allwinner,sun50i-h6-usb-phy", .data = &sun50i_h6_cfg }, + { .compatible = "allwinner,sun50i-h616-usb-phy", .data = &sun50i_h616_cfg }, { }, }; MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match); -- 2.17.5