Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1176681rdb; Fri, 16 Feb 2024 07:32:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUqO1ONmpznfRNGREeIigU4voIE5luXkT8GnKGJMX1tZOtEctC6JIsUlZlJifTxq2jAjR30ev/FDZlFHdWPQKwceXaXMWlJBv3UIH6jyw== X-Google-Smtp-Source: AGHT+IGfKkvNVuzQNcyZgp+/Og++lu5B+9A4W9oAdzFlhH7inuiNExm6hqBg2XcrG/QtbAVrDpNd X-Received: by 2002:a05:6870:724c:b0:21e:2d74:110d with SMTP id y12-20020a056870724c00b0021e2d74110dmr5604699oaf.24.1708097527371; Fri, 16 Feb 2024 07:32:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708097527; cv=pass; d=google.com; s=arc-20160816; b=DSixzx3400xt7y6R07ySLvezYxR4IlgbT1rKTDWHxZzmmgKiem8eM+ru+Vx2RwjM+u paeVx6ufraaNDBepVbfruIFmOi7OSN3qFl8CAe0Stqn3jUB92xyNulcE/mw/Xye3F1Jd FK798a+J3VBnCzvsZZM5hT7/PhunzlId08mLKR9jJ9/4eMzo/fmGMZJV5V8laDFRtKsB vq7dBYqYl+/59BHENXIJJ66YdLI0mcKBMqaJYcHnJbIcHNlromwGKTHvAf4ruRX+bwyP 2NOmmaWxVvuc2sAmV6P3Eb+jNE3my4GXj6660L52F/9iDl2BgkNS03B/xKHu3VYm+PaE 4vvA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:from:dkim-signature; bh=oxQXuWkxt6E1YCb2Lydbjx3Zdn9kV8raEeyR7D7t5Q4=; fh=/wRwIHgmVsrLW9sRFYxTGxZ4FeMBZ7dOboqO3KP8JJ0=; b=Ue9xg0fZUn2NczbyAwd5KTmfRcsAj4PRoCtlsLa+F1ym7zkIwAvRkImiN6wVIXwuXm LtuhaaRPcA1UGiUX3DoF80BhQotFYO9oPkGGBVIQt0PYohktGhNtiRGLx8h4zN/81vHy GaeCPFNnKZ3UItL/Glz6CRfTM82sw1wYy7JAYgFY1MioN3tvG1jNAXzWShUICJYgIo71 tbMHzWmwk3/rXAxtSmrA4Atr1c2P6lvVDDaIF4SG+IgceECFAzoOtuLCE+fDPDUjiUw/ 8Z8I/qu+Kt4kT0QacPChK1L+0ka0QbZEFYYjCg5Y9gugPC2A4wwotG6HKjBYDHjIp1N/ dYDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="t8WSu/vW"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68862-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68862-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ch5-20020a056122318500b004c0af64823asi98677vkb.282.2024.02.16.07.32.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:32:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68862-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="t8WSu/vW"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68862-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68862-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1CFFC1C209F6 for ; Fri, 16 Feb 2024 15:32:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B036A130E35; Fri, 16 Feb 2024 15:21:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="t8WSu/vW" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BCD2212F588; Fri, 16 Feb 2024 15:21:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708096887; cv=none; b=lI0Vjzxse7dFaTUvTDnGB6Xj50ibck8zL/dCDuYT5cb884K27RI5l0Qw0/HmkyY+fh9mAH/sGwlXAjYBEb4H5rO0WQTOIq8QspGuIskSFeDLEZk+zDDzgtH9vMSABTjZbzG2X7ePrif/ck4R+nm2uJe1JVdYAnymm42IWaVgNdc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708096887; c=relaxed/simple; bh=IxnSWTB2sBXQF0390u8a976PN+j85jvd6/lGGofC8VY=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=durNq1Usy8ycXEIB5IyPqp8CBDhtm25OabWQ652YEgmKA+mooBCXQa4qp7HO/f+saKChORjlID/7mbxU3knRAJ60zWt3OfGg1iJNRG9gowP8EcD1xL/G7ahUlDcwnZbxsfdOTRWIKkGckf1KS8kEpqldJZ5vJbwphgAqn9b1AEI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=t8WSu/vW; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 46FDDC433C7; Fri, 16 Feb 2024 15:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708096887; bh=IxnSWTB2sBXQF0390u8a976PN+j85jvd6/lGGofC8VY=; h=From:Subject:Date:To:Cc:Reply-To:From; b=t8WSu/vWzA3RAuEKVApWeF6Dn0DnVniiHCrLWnfntoku88Vb4Y4mz6lsLI+iafxcj kWAwRes8UHJnyXfUA1go2QS5nTZP6X50jjefqD8QpTvzmWEXr8giiaAtac90S3vVZp Wa+71Tp7fjI90vI8iIOx0XTN102gI82qtTK7n7ca3hOE8BMkULDF6DCzlayADLyJ23 0Yaq1kP+aujvX1aonwgNiC1nUsySQ1ZSNfPMx/ehkd416Iks+baHt9zkSeABW39DzP xAB4c9ySq2sGW/c8sYuaE+4AHfA6gzFlifDdF9nkZQS+ALJiqtjWKFXcqjv0RfYuLI gkB1Qdkr4YqXQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CA8AC48260; Fri, 16 Feb 2024 15:21:27 +0000 (UTC) From: Yang Xiwen via B4 Relay Subject: [PATCH RFC 0/4] phy: hisi-inno-phy: add support for hi3798mv200-usb2-phy Date: Fri, 16 Feb 2024 23:21:00 +0800 Message-Id: <20240216-inno-phy-v1-0-1ab912f0533f@outlook.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAFx9z2UC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDI0Mz3cy8vHzdgoxK3USjFAtzozSzJHOTJCWg8oKi1LTMCrBR0UpBbs5 KsbW1AO6AnyJfAAAA To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jiancheng Xue , Pengcheng Li , Shawn Guo Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Kishon Vijay Abraham I , David Yang , Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708096886; l=1304; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=IxnSWTB2sBXQF0390u8a976PN+j85jvd6/lGGofC8VY=; b=jVZPCURmpgkvsGh4pmLptz411OscyhZfFOxAAmB4AKycoTJpCK24CwzaBAjfCCKBgjM8qYArr uVTzXRcqYHvCIgzGWjYN3cP73jcSNBzIRH0pfkqv/yg6MlQsD8aC2Eo X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen Reply-To: This should be considered a dirty hack. The proper solution would be extracting write_reg logic to a separate regmap driver. Leaving only "write BIT(2) to address 0x6" to the PHY driver. The initial commit is already doing things wrong. The following patches adding hi3798mv100 support is also very confusing. The name of the enumeration "PHY_TYPE_x" is very misleading as if it's the phy which is different across SoCs. But actually it's the bus (i.e. how to write to a given address) which is different, not the PHY. Signed-off-by: Yang Xiwen --- Yang Xiwen (4): dt-binding: phy: hisi-inno-usb2: convert to YAML phy: hisilicon: enable clocks for every ports phy: hisi-inno-usb2: add support for direct MMIO dt-binding: phy: hisi-inno-usb2: add compatible of hisilicon,hi3798mv200-usb2-phy .../bindings/phy/hisilicon,inno-usb2-phy.yaml | 125 +++++++++++++++++++++ .../devicetree/bindings/phy/phy-hisi-inno-usb2.txt | 71 ------------ drivers/phy/hisilicon/phy-hisi-inno-usb2.c | 57 ++++++---- 3 files changed, 161 insertions(+), 92 deletions(-) --- base-commit: 8d3dea210042f54b952b481838c1e7dfc4ec751d change-id: 20240216-inno-phy-a2d872f6b74b Best regards, -- Yang Xiwen