From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 79959C433F5 for ; Fri, 29 Apr 2022 21:40:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7EDCE83EF5; Fri, 29 Apr 2022 23:40:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="oMtV7vco"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AB7BE83E3C; Fri, 29 Apr 2022 23:40:21 +0200 (CEST) Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A22D783DEF for ; Fri, 29 Apr 2022 23:40:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jbx6244@gmail.com Received: by mail-ej1-x630.google.com with SMTP id gh6so17832816ejb.0 for ; Fri, 29 Apr 2022 14:40:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1oNcTaS6ALW4s7KDMroF7kYSia38igElRPK4ptP2kds=; b=oMtV7vcomdbC9o462iG2yS3z/gb9zh0Jbnj/IPkBVblnJal/2q3MUCK1mfa+X9gMdW AxE2Dkotw6yAXtPbbVg7EHN4wqq8gDp3IhkkEp9WeBjuAI4bBa9SwLKuEHcY0oqKh9Ey pmLzJhs/Qwc9WCz17sgW12pS+V+cfepPY1v0b9Z7dEc8UMv+xQFfbfWoAcVeyoG7XVqu /IxdBq9H0Vl0eivdbCfK+PDeZoEChji+2Ur3huUrlLxrSehMrS/fA1+d5fT0HJnSqCsi Kbv3F5MVGATDGTu85mwKQCL0sjHBvMPzdWYy7PhyI+ut/FNVbDFbZf/apq/GF1rdxfIc Xazw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1oNcTaS6ALW4s7KDMroF7kYSia38igElRPK4ptP2kds=; b=LRLAYZfx4dGZDieXZSvWWs7Nt7llp/YIkQTa58RjF/rN4xkXTqp57ULPtg7jG7Uy/A p8UHXhS4KTH1djMOUbB06entLaQ1krOv/vc7bANRgP6pSqtoGxw3sxOIecpeO46REUwU NbOqPR6H62j8tfq4M61cIzX9nA4aQKqv+iZyGrDFqRhZESMHZ+KceEyUtXm4d9jt2SwU 5j0dmomfvS0o2HOto/0KcDkq6fP8FLoDzZqpeYB4ohy7NvqdE/g2ovD7RnMwwuRF3VEl u4tUmf9MLQE7drPE4bSOg8otDyGw3fPtcxbVutoijsNVJPu2Tm33+TQ9GaUt+Z1zEFRP NzJw== X-Gm-Message-State: AOAM532SIRPLtS6n9n6e8DZcp7YDbvw7+0bDHkbAP5K2/vWE36A1YTlF rcsPnrOXsx8AE+DgB+OIpik= X-Google-Smtp-Source: ABdhPJzEtLVtpgvyCnL5o2MbsiNNkBJ005rmYKIvm5HUbpTkxNiCF0J52SwDrSjT9OGACPxh8lXZSw== X-Received: by 2002:a17:907:7f1d:b0:6f3:b3e9:e484 with SMTP id qf29-20020a1709077f1d00b006f3b3e9e484mr1270312ejc.322.1651268416305; Fri, 29 Apr 2022 14:40:16 -0700 (PDT) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id r23-20020a056402019700b0042617ba637bsm3409167edv.5.2022.04.29.14.40.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 14:40:15 -0700 (PDT) From: Johan Jonker To: kever.yang@rock-chips.com Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, lukma@denx.de, marex@denx.de, u-boot@lists.denx.de Subject: [PATCH v1 2/4] rockchip: usb: phy: add rk3066/rk3188 support Date: Fri, 29 Apr 2022 23:40:06 +0200 Message-Id: <20220429214008.26977-2-jbx6244@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220429214008.26977-1-jbx6244@gmail.com> References: <20220429214008.26977-1-jbx6244@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Add rk3066a/rk3188 support to rockchip_usb2_phy.c They don't have completely identical usb phy registers, so separate comapatible strings and data. Signed-off-by: Johan Jonker --- drivers/usb/phy/rockchip_usb2_phy.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/usb/phy/rockchip_usb2_phy.c b/drivers/usb/phy/rockchip_usb2_phy.c index 93caa821..c46ad86d 100644 --- a/drivers/usb/phy/rockchip_usb2_phy.c +++ b/drivers/usb/phy/rockchip_usb2_phy.c @@ -42,6 +42,12 @@ struct rockchip_usb2_phy_dt_id { const void *data; }; +static const struct rockchip_usb2_phy_cfg rk3066a_pdata = { + .port_reset = {0x00, 12, 12, 0, 1}, + .soft_con = {0x08, 2, 2, 0, 1}, + .suspend = {0x08, 8, 3, (0x01 << 3), (0x2A << 3)}, +}; + static const struct rockchip_usb2_phy_cfg rk3288_pdata = { .port_reset = {0x00, 12, 12, 0, 1}, .soft_con = {0x08, 2, 2, 0, 1}, @@ -49,6 +55,8 @@ static const struct rockchip_usb2_phy_cfg rk3288_pdata = { }; static struct rockchip_usb2_phy_dt_id rockchip_usb2_phy_dt_ids[] = { + { .compatible = "rockchip,rk3066a-usb-phy", .data = &rk3066a_pdata }, + { .compatible = "rockchip,rk3188-usb-phy", .data = &rk3288_pdata }, { .compatible = "rockchip,rk3288-usb-phy", .data = &rk3288_pdata }, {} }; -- 2.20.1