From patchwork Fri Feb 16 15:21:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 20493 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp598492dyb; Fri, 16 Feb 2024 07:41:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXBuPhMWcwpPUU4hteAB+mWOlwCRVhfW92bGbbBv/mt5Bk8bsddc9qqIwEVJTgPaYRi9M/TNUMotZ74/AqgJzjQ2rQdNw== X-Google-Smtp-Source: AGHT+IE7tHjB6eXto2Z7NxAH/v9HxxTWlSfYLLreK4pE85kYE7HMengAywXW9BmndgWbTsYrqgxJ X-Received: by 2002:a05:6402:4582:b0:55f:ce14:337a with SMTP id ig2-20020a056402458200b0055fce14337amr6892735edb.11.1708098115104; Fri, 16 Feb 2024 07:41:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708098115; cv=pass; d=google.com; s=arc-20160816; b=Vsne9T4oe+VNtk26eH2SakSMdt6xA4wd/IITWiyHI/R+FfEXxnNQjLBsdMop+8tu8S XbvgaeXaiKPZTSA0CX72rA1HT5XXafp+l8OlT2X9ohO9RqiNKT7V2q9lox6g5OVVgPM1 90vxSCz0VDOIcdmil288ko0TYqNVQwF1cvWQDSXY3GrNBtAkx1TuBw9m7G+5/AuCZa8H MWvWoqqFjy5H5/Gat5whcoxMRzl1tboQBQEqsTlEvFa7CdjmJw/fLXse0D9SnLGQe48+ UO/dF/b2VH7AwCk63qPi+fcJofvGHVID76FVGhWf1aG3vlmK0rr1WUSUqeCipbLf40c5 jkzA== 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68862-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t21-20020aa7d715000000b00563a2fae6e5si71266edq.141.2024.02.16.07.41.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:41:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68862-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68862-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id B5FDF1F26BDF for ; Fri, 16 Feb 2024 15:32:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8281F13249C; Fri, 16 Feb 2024 15:21:30 +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 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: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791070689243036661 X-GMAIL-MSGID: 1791070689243036661 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,