From nobody Wed Nov 27 21:50:37 2024 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BA5B1D47D9 for ; Mon, 7 Oct 2024 13:55:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728309323; cv=none; b=XCjdqZ8QeiQmwDNWQIgBoVnM1qz3oioT2Y7P2G/T83SSLj7wPcbV0RL55Lk3mWkaJjGpG5ls+umbIcHHMh4c2HRIDoaSCLKgjUyLRrjgMoSt3dpsDjUogzYhEezJmhIBS5fUZcSX6MIpqXLk4UOeCYGLNIZ8a5yxX9UF6i9b0dE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728309323; c=relaxed/simple; bh=WkIFA3Bbn+M2B5VzgzqBsaRxhzbrBeYNIHEndslM8DI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=FiFcE4FJV74Y7uNB085O2KDJXDNk4cRTC+0/TWwwWvyUJoFuMZ9wfCv2m+yPSET5Zo4DF82xn7Y7znwhPtkYP4NE1JtuecVben9yIqO26V4Nm8KKagr1V1UxYeVtWPziLbhVMCFIgscdWMwhDA2P0IeVkJUSVZXSxUu/2Bk1Xng= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--joychakr.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=lS8ZamyX; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--joychakr.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="lS8ZamyX" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-e260b122770so6592936276.2 for ; Mon, 07 Oct 2024 06:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1728309320; x=1728914120; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=CblMzpCPNydZZpvacmjghKpdVLiy01vOQxnw0IUvqWY=; b=lS8ZamyXxnbKqpKuIf5E/mv6YmXlWu1PXd7stmV5YK6mPT1cpUsbGUNeh/1cvuhfZg Ii98egDa2o0NtsmB3+qqd36NXK2ZDI0hUXJ8NrxPljeMVBltr9CFsPN6gyvGozi9Pl6P +niv8NgHQJgPHT+7foJFoqKlc/Mm4WxYpF66j5TbLahdIofcVrXfDe4HLkEEkIPHHmjy XgtluDG0TO48R3OwQhJ+UgxleVRsOIREi9nZyXDSEQ60UpxmVPbz1dMnK2o/yxhMEK/O 7qzdNk3PSz6xb5/w3csMac79WYCnHXmQPOeeTfPxBAzAEQ7l/piXnIwwMZcAM41CsRjz CyEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728309320; x=1728914120; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CblMzpCPNydZZpvacmjghKpdVLiy01vOQxnw0IUvqWY=; b=UXXXDJXA9dQbhvzyvc+tCTZg1AYnQlXe9+7C5VHundrnQY/7ILExe6G/6k+IPcCwgU MwPG5NaFzQ/V1oQ16/W6Yw1iQGVSLCsuMD3NCw8mWqiPWdMmnYlbM2tumtVYB30TTvvj aaigAS8VB+cFVblFvY6hHiCdWRnrrk5JZfYU+JWA6NUvZ/ZT3BLDtJH4z7c44fmCJELP B7cCfGlcprqLHTmhUQxgl5u0B9T77UupUIxpc47tcgfo8X8/7QcbPmVzBHqCRv11JtNY +xVPm4LCbCgXU6xp6lElWzu53uxykJ0p2rrQtLjyf9WKv7U1F+eDanSJPjT4Md27CSUe NCKA== X-Forwarded-Encrypted: i=1; AJvYcCUhyKFUywJI5IbqVbHHX7E4eO0KvW/GmvXie0m2R6Ug+LrvWN9cDZtd/OiP889Gh+psdJPE59WoYyuXqAU=@vger.kernel.org X-Gm-Message-State: AOJu0YwEUFLnVJk52AL/HGrfda3BxETOVK8rziKcx0kzqYnxH/UDrWEk TWdSHxTJ8KOMIil0KxF2J7LHBE2qOvq0PrJCC6Q+dtCVUhyfG49fBZsWUl909h+dJ04EnzVogoC WkRSVRqOgCw== X-Google-Smtp-Source: AGHT+IHENiCfXeLIY8OuGdXiRZ0mZC1NUSLuuz9kZp63rvGsqpTXO15oaagthIfQlsuXinVnTY8fy8lvpJBe2w== X-Received: from joychakr.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:6ea]) (user=joychakr job=sendgmr) by 2002:a25:dc86:0:b0:e1a:6bf9:aa83 with SMTP id 3f1490d57ef6-e28936d0742mr52400276.3.1728309320208; Mon, 07 Oct 2024 06:55:20 -0700 (PDT) Date: Mon, 7 Oct 2024 13:55:05 +0000 In-Reply-To: <20241007135508.3143756-1-joychakr@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20241007135508.3143756-1-joychakr@google.com> X-Mailer: git-send-email 2.47.0.rc0.187.ge670bccf7e-goog Message-ID: <20241007135508.3143756-2-joychakr@google.com> Subject: [PATCH 1/2] dt-bindings: usb: dwc3: Add binding for USB Gen2 de-emphasis From: Joy Chakraborty To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thinh Nguyen , Felipe Balbi Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Joy Chakraborty Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" PIPE4 spec defines an 18bit de-emphasis setting to be passed from controller to the PHY. TxDeemph[17:0] is split as [5:0] C-1, [11:6] C0, [17:12] C+1 for 3 tap filter used for USB Gen2(10GT/s). Signed-off-by: Joy Chakraborty --- Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documen= tation/devicetree/bindings/usb/snps,dwc3.yaml index 1cd0ca90127d..a1f1bbcf1467 100644 --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml @@ -190,6 +190,18 @@ properties: - 1 # -3.5dB de-emphasis - 2 # No de-emphasis =20 + snps,tx_gen2_de_emphasis_quirk: + description: When set core will set Tx de-emphasis for USB Gen2 + type: boolean + + snps,tx_gen2_de_emphasis: + description: + The 18bit value of Tx deemphasis defined in PIPE4 spec driven to PHY + for normal operation. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 0x3ffff + snps,dis_u3_susphy_quirk: description: When set core will disable USB3 suspend phy type: boolean --=20 2.47.0.rc0.187.ge670bccf7e-goog From nobody Wed Nov 27 21:50:37 2024 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 223D31D5CDD for ; Mon, 7 Oct 2024 13:55:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728309326; cv=none; b=Gs7EK92WoEvvW+D60IAFD7yzTRcEoYlo3pQ9NjdPK4Guk467a1ou3dM+BdVjGk9pN7mTHk4pcVNmmrGEOiQxLySMUzpLi487q+5oUbytBEJnY9BPaID+9yhVGmrsVS3wHoc6ZCt0AXjM17QkdI5HDtX+3lE4o9DalsNNvPNxXCk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728309326; c=relaxed/simple; bh=WkIFA3Bbn+M2B5VzgzqBsaRxhzbrBeYNIHEndslM8DI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=XUcROdyXeVLGT4FhwcQn4n9s1thlveBIqXGtqCSkoK4meFevuYXVHUpXJP2i731vLVU4H192H4qxEnsC31fgXQwTHTJ1XQd+PEk0Nju4djFzQIWwabb2fothsTJg5jNRDot/xYkhqHSQIJr1GtMZhdCXiBSBT21tDB3zvwVgpkY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--joychakr.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=CwFtpwfR; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--joychakr.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="CwFtpwfR" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6e2555d3d0eso73438317b3.1 for ; Mon, 07 Oct 2024 06:55:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1728309324; x=1728914124; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=CblMzpCPNydZZpvacmjghKpdVLiy01vOQxnw0IUvqWY=; b=CwFtpwfRHMfxXmO55c0Lwx/LrOjH1eknvkF7swKeU1TQfAyX0wWjit2wBTctg7Wd/w /qr+uqc/fYpmY2N9k90Ot6CnQaPcmAXQJPktWTiVT34PSU3QI4uZWcMrKnZnS2zTk928 afmkzmQkDjLBHdd+ywWtMt3gX3RwgeVJcGAUA4y0aV8MNjNA0Ifq7GG8jk91dJ5KUIS/ /hRT1pBQ+nuL5t128PBIcsgGoOnyWa98VQRvWqp4lwcCJ8fOkBU9EUmzARp+IaAS5qnS UEhcQpruVLvZGnMWyxZtAY8aCyxR44LOTimFhttRR9cz4HCBkiSCIr0bwwihbDdhysMc Q/bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728309324; x=1728914124; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CblMzpCPNydZZpvacmjghKpdVLiy01vOQxnw0IUvqWY=; b=wv7SPQ70xmhMRpzq9qtNFqywVvB5SZQWIE68AjgL78sc4M+7C06ZP6QvS2LXBSfoOF HW40JxVbTVzdwgSTCwxMJ8x6eD/g2w+lqcZkXlZsNb0uEWzdGnVjStiU8un6Eg81xXxb JKGca3MIT114G/vy8F1zgffaWm40YXqFGXfjczI17Bhuukmj7riRaWJdM1ILuD67h7u+ n7ij0plyMJryTiQJF8skCgGLwu0ioizQPSOl+gRTiipPh+UhXgsPGvjfGEy01+87Q/NZ lG7b9HhhHN1BeFiFLvyiJZ8mSEbYLkAs6iygRTv28n0qkCNRXC2oKGos+QO0mJJCAP+v zf0A== X-Forwarded-Encrypted: i=1; AJvYcCWrIUXC3iA1DtZExRiozQwfXUiBjC03hOreU5JDmXOr5jjLoKk1LaOCQrTfytNEctIJf0UT6lJOLG0ww+0=@vger.kernel.org X-Gm-Message-State: AOJu0YxXO+lvif4S3LOoHj05vJo6VF+9Ry5ejuAGZn1C2enrcVlS1f1N QeieBC+nl+IVuw8KKL4NhhSTf9eY3tqmRF8k+iTRSFVQCBjCtmKyE3pR/aYod0JXCyKe+61je/Z gVNyrUWBzDw== X-Google-Smtp-Source: AGHT+IHEWUgCEIy7iPCOVn7Lb+x/YbYzsOzZFkYER6vlS8wHJBCQCEMmUmC8PeUdmvbDxuhxB58u1a4APwmNFA== X-Received: from joychakr.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:6ea]) (user=joychakr job=sendgmr) by 2002:a05:690c:d1d:b0:6e2:2c72:3abb with SMTP id 00721157ae682-6e2c72bbd5emr3753187b3.7.1728309324364; Mon, 07 Oct 2024 06:55:24 -0700 (PDT) Date: Mon, 7 Oct 2024 13:55:06 +0000 In-Reply-To: <20241007135508.3143756-1-joychakr@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20241007135508.3143756-1-joychakr@google.com> X-Mailer: git-send-email 2.47.0.rc0.187.ge670bccf7e-goog Message-ID: <20241007135508.3143756-3-joychakr@google.com> Subject: [PATCH 1/2] dt-bindings: usb: dwc3: Add binding for USB Gen2 De-emphasis From: Joy Chakraborty To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thinh Nguyen , Felipe Balbi Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Joy Chakraborty Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" PIPE4 spec defines an 18bit de-emphasis setting to be passed from controller to the PHY. TxDeemph[17:0] is split as [5:0] C-1, [11:6] C0, [17:12] C+1 for 3 tap filter used for USB Gen2(10GT/s). Signed-off-by: Joy Chakraborty --- Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documen= tation/devicetree/bindings/usb/snps,dwc3.yaml index 1cd0ca90127d..a1f1bbcf1467 100644 --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml @@ -190,6 +190,18 @@ properties: - 1 # -3.5dB de-emphasis - 2 # No de-emphasis =20 + snps,tx_gen2_de_emphasis_quirk: + description: When set core will set Tx de-emphasis for USB Gen2 + type: boolean + + snps,tx_gen2_de_emphasis: + description: + The 18bit value of Tx deemphasis defined in PIPE4 spec driven to PHY + for normal operation. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 0x3ffff + snps,dis_u3_susphy_quirk: description: When set core will disable USB3 suspend phy type: boolean --=20 2.47.0.rc0.187.ge670bccf7e-goog From nobody Wed Nov 27 21:50:37 2024 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 719BD1D6DB4 for ; Mon, 7 Oct 2024 13:55:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728309330; cv=none; b=qrHBF09ee8EgGNSxeIC588XoNoShzQ33Xe3Ade1J8LUCUgIo8RG5fyHfTLWLv/g8vH5te5N02ayKB3B5OaXhKBp/o0hD8YRkWX6sUH82i/DjCJp7Pr3d5BqYySJQIn0vqwY08h9AS1wL/HuwFfivbg8XfHE+5FcOdeZuqJG4Ux4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728309330; c=relaxed/simple; bh=hozD34R+1r+AOEtpIL+3KZ2W+shD6S4TBvGWV06zetk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=k7hKmlozMnkGReBg/1UdO7/187jAgk+YhBinXzyiEnclnibkaM8faOqIZe/c0ALVq5N0J0iU+Su08r4tVNibjBGu/s2I8h/iUUsKxiv/dNH+H4rSWhYvFLer3aJkO2Tg/1nYtkzvl6+76wYo+t86llYjgCYmrV1N+pv2icVMK2A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--joychakr.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=sgSTqS+I; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--joychakr.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="sgSTqS+I" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e165fc5d94fso6764132276.2 for ; Mon, 07 Oct 2024 06:55:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1728309328; x=1728914128; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=LUZWXIYmMgx7eQT8FX3UW0dYEBsjOxQkFr0vicKGH/A=; b=sgSTqS+IgzrDXaIf3EkBcrNqKuaY+jSihBNRra/QDZbzLAQN1cQ5y/MGVE2LC2mabH ccJafmHqBrWjmaN8xYqx4weiT4ibsCjBGucH7li/Eq63lW+bb2vs5ePz7QzLLbcjJ6FX 7c018ctgA+qch/cFLsS9dmh5WsnoogCEEAHsS6fvjUW5M1aICzikVeJU0RNmHyIWiWZV cSVqjgQ0deEXbOJp0nZe+r96DZykyHRk1dULf420ELNN6KL/Y1irffrqN6wnhacFgpha Li7WpU8BrO/Vjg/8zgiWoOYXaLgcUhw3yDhle0pb/lLjkV4P25wVLscacgEIVWomdstM J9XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728309328; x=1728914128; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LUZWXIYmMgx7eQT8FX3UW0dYEBsjOxQkFr0vicKGH/A=; b=VpyPvWtx1v7HGrVAKIu6v0HzYEFxpthWCAMrNjWwSs3vYnxin2XEhWZIhEEkprHPAq 5fz9GAsMA1S32il/filp8NnY96egBDC2xXWwjQbhvtKHC0rqnOEwhRN4PwfCBwvIq8Eu /iWjLPztYRSREzL1KpeS2ZA/t5DHmHsaKyt/Z3SMCsmFdM9Pd/jlJ/cV16/55dJBSj4Y cU60YJzqp0bdR/7tP99hCkpFb/NtTzSqVPm4Kkqe+vFM+pc6QrgRPml3coRp5RhDW1LE 2+YsfhloZl+LaE4phsxDjk8m2F0t20lP/+ZT4i15IdaI6LfI4LF749OGTG4+l+Y30aYK mCcA== X-Forwarded-Encrypted: i=1; AJvYcCUxPOI1KtSEqep+TiZThI8uSrOoGGw0NP3Wp+ex2uM8hKg4Gar8zJTQd/dnjwHYwv3KkAYfoB3jXkR5TLo=@vger.kernel.org X-Gm-Message-State: AOJu0YwaKlTaaTlMD5TxZQnKguAeDQNbXltSctsmo065oV0IVdLjBPG2 zaBzPGrZtfSeFbDflcCurM3tEiy0nSoIFex44EAfyS3gMKXv8YxImcLNwe1kNsSC3oS/yAs8MAH dDp3F5tayPw== X-Google-Smtp-Source: AGHT+IHAjKT4qNlRsQdqeZv5m+rXvrWxHJ+iDczfE+jTXAOP5PTHzUEVzRCM39ErLrwzhS0XlNSExa1A5e5xhQ== X-Received: from joychakr.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:6ea]) (user=joychakr job=sendgmr) by 2002:a05:6902:1817:b0:e24:9f58:dd17 with SMTP id 3f1490d57ef6-e28936bf5d1mr34659276.1.1728309328396; Mon, 07 Oct 2024 06:55:28 -0700 (PDT) Date: Mon, 7 Oct 2024 13:55:07 +0000 In-Reply-To: <20241007135508.3143756-1-joychakr@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20241007135508.3143756-1-joychakr@google.com> X-Mailer: git-send-email 2.47.0.rc0.187.ge670bccf7e-goog Message-ID: <20241007135508.3143756-4-joychakr@google.com> Subject: [PATCH 2/2] usb: dwc3: Program USB Gen2 de-emphasis defined in PIPE4 spec From: Joy Chakraborty To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thinh Nguyen , Felipe Balbi Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Joy Chakraborty Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Set 18bit TxDeemph[17:0] in LCSR_TX_DEEMPH(n) register for USB3 Gen2 Normal Operation as defined in PIPE4 spec based on dt quirk "snps,tx_gen2_de_emphasis_quirk" and "snps,tx_gen2_de_emphasis". Signed-off-by: Joy Chakraborty --- drivers/usb/dwc3/core.c | 13 +++++++++++++ drivers/usb/dwc3/core.h | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 9eb085f359ce..25e19aea364a 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -693,6 +693,11 @@ static int dwc3_ss_phy_setup(struct dwc3 *dwc, int ind= ex) =20 dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(index), reg); =20 + if (dwc->tx_gen2_de_emphasis_quirk) { + reg =3D dwc->tx_gen2_de_emphasis; + dwc3_writel(dwc->regs, DWC3_LCSR_TX_DEEMPH(index), reg); + } + return 0; } =20 @@ -1654,6 +1659,7 @@ static void dwc3_get_properties(struct dwc3 *dwc) u8 tx_thr_num_pkt_prd =3D 0; u8 tx_max_burst_prd =3D 0; u8 tx_fifo_resize_max_num; + u32 tx_gen2_de_emphasis =3D 0; const char *usb_psy_name; int ret; =20 @@ -1797,8 +1803,15 @@ static void dwc3_get_properties(struct dwc3 *dwc) dwc->dis_split_quirk =3D device_property_read_bool(dev, "snps,dis-split-quirk"); =20 + dwc->tx_gen2_de_emphasis_quirk =3D device_property_read_bool(dev, + "snps,tx_gen2_de_emphasis_quirk"); + if (dwc->tx_gen2_de_emphasis_quirk) + device_property_read_u32(dev, "snps,tx_gen2_de_emphasis", + &tx_gen2_de_emphasis); + dwc->lpm_nyet_threshold =3D lpm_nyet_threshold; dwc->tx_de_emphasis =3D tx_de_emphasis; + dwc->tx_gen2_de_emphasis =3D tx_gen2_de_emphasis; =20 dwc->hird_threshold =3D hird_threshold; =20 diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index c71240e8f7c7..fa9db38b7e15 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -179,7 +179,9 @@ #define DWC3_OEVTEN 0xcc0C #define DWC3_OSTS 0xcc10 =20 +/* Link Registers */ #define DWC3_LLUCTL 0xd024 +#define DWC3_LCSR_TX_DEEMPH(n) (0xd060 + ((n) * 0x80)) =20 /* Bit fields */ =20 @@ -1145,6 +1147,8 @@ struct dwc3_scratchpad_array { * 1 - -3.5dB de-emphasis * 2 - No de-emphasis * 3 - Reserved + * @tx_gen2_de_emphasis_quirk: set if we enable USB Gen2 Tx de-emphasis qu= irk + * @tx_gen2_de_emphasis: Tx de-emphasis value used in USB Gen2 with PIPE4 * @dis_metastability_quirk: set to disable metastability quirk. * @dis_split_quirk: set to disable split boundary. * @sys_wakeup: set if the device may do system wakeup. @@ -1374,6 +1378,8 @@ struct dwc3 { =20 unsigned tx_de_emphasis_quirk:1; unsigned tx_de_emphasis:2; + unsigned tx_gen2_de_emphasis_quirk:1; + unsigned tx_gen2_de_emphasis:18; =20 unsigned dis_metastability_quirk:1; =20 --=20 2.47.0.rc0.187.ge670bccf7e-goog From nobody Wed Nov 27 21:50:37 2024 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1A2B1D7999 for ; Mon, 7 Oct 2024 13:55:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728309335; cv=none; b=bjhzQPh0BONVEJinegTfOLag8nT7NftPt7NOU6/M7dCoUVf0yxkYiDY/UJ4o3OXZAqZxs4YjQwC8T1HAxW7RR89tC37w5wJw/ErhaA7MclhZqzQuoVCV5HEAZ0937SwG9CubFFGSUulmYKmx7wpRuuLuxbk6fFB3tqZ/Uxcnue0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728309335; c=relaxed/simple; bh=hozD34R+1r+AOEtpIL+3KZ2W+shD6S4TBvGWV06zetk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=r8dhqWFmeFx+2Xj2roUs1EUIWNafU9dvKJZEVMTZp1QNVwBRlxdjHSTgIOTiENQn0RjpEwv/v7RmomHgk0KzI1RqbbijTxoQOcYY3SjU2Lo2kyxrbYnL3rmzGeNCwN6GuwikReZDtrc99ALI/w+ycMSHK2Hm+yl3966SfAortFg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--joychakr.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=p5evg8+M; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--joychakr.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="p5evg8+M" Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6e26ba37314so14205447b3.0 for ; Mon, 07 Oct 2024 06:55:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1728309333; x=1728914133; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=LUZWXIYmMgx7eQT8FX3UW0dYEBsjOxQkFr0vicKGH/A=; b=p5evg8+MRSv5KkN7vv90IGdRQpXLMn9Y9F0I2CQu4ovN0sN76svBpHba1udyJM0tCV qJGgftQBwWe/zYSMpiBtlRo54MuksLoYGCG6ZrivMvOCx1E/KaSfFBub4q/TMFPgRJW1 jfIBd5+EUF7irkunOLSzAoyWgjCzSRFM7fGLPzAX9ib15GMWFKpMYXlRQAtbnirzbPRe DBvPwln6jvY+kZshT6fwSqkS3flhNF2HLvLl1FI1t36IlM/FCRVZkbV+JcWFeXJQ1Q4Y N5UTodH0k17tfL2fdnH+GOOjYqDham3F8Qwv9uEOQJJ/sQO7W4QyJcL7/qMml8rTtEUd J0pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728309333; x=1728914133; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LUZWXIYmMgx7eQT8FX3UW0dYEBsjOxQkFr0vicKGH/A=; b=QfzneiHwUltnDBkCw5/0wuB1dpbn0OXK96utkmYGrE/IfOoHi/WpSBsRb6Yjqny1DB rT1tWs0KsYbR303nj+8JeC26fB/8kS2svIdGLiSPOZukbfkJZSlwTpAYeteOXRaTEuxd OhLqKhL94NRfoFiTMiAisYyiC47272Rhu8HaUKzHpFEXmRn5y5R9GmKmjZzxbawzvZ6q Qlwfs8oQVwuftZ7XULk45zHkVdaQZ4O0BgFwDJ1D/oW9SP2lJFKzK19btcsvFPTLciJb a0A6hhBxQhW2bTqJTy8HkLUxE1G6j4j7HlyGD0owUXYLjbpUNA6z+DAtK3gmIj5b3fkx uByA== X-Forwarded-Encrypted: i=1; AJvYcCVi8hK8QdB/e3ITkFqEaXnPwsiUO8aIZtULcv8wyIYeJ5D9UYyjTri0GX+r1/GgpuJy0GyTwaHTu//qFWM=@vger.kernel.org X-Gm-Message-State: AOJu0Yy5ncMtCN++gFe3mwdAy9MjdT3cDjzG5+geJPO671f4fWdIjvKB LNhA3ErNkhynTHkZscAoKvkTlJAatN6d6TkiDHv25bs/noAVm0zjPPEIRok0ajsIjNVq/y9OM8n 2X4p8KrkIjg== X-Google-Smtp-Source: AGHT+IHfzB+j+raL3YfEPrA/7E6aJxT/LOBbbgaPT9rP/noUUvfUlHVKB44G7oC3F1FuusFkgKByAeWn9pVWWQ== X-Received: from joychakr.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:6ea]) (user=joychakr job=sendgmr) by 2002:a05:690c:d84:b0:6e2:371f:4aef with SMTP id 00721157ae682-6e2c7289a65mr408327b3.3.1728309332607; Mon, 07 Oct 2024 06:55:32 -0700 (PDT) Date: Mon, 7 Oct 2024 13:55:08 +0000 In-Reply-To: <20241007135508.3143756-1-joychakr@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20241007135508.3143756-1-joychakr@google.com> X-Mailer: git-send-email 2.47.0.rc0.187.ge670bccf7e-goog Message-ID: <20241007135508.3143756-5-joychakr@google.com> Subject: [PATCH 2/2] usb: dwc3: Program USB Gen2 De-emphasis defined in PIPE4 spec From: Joy Chakraborty To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thinh Nguyen , Felipe Balbi Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Joy Chakraborty Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Set 18bit TxDeemph[17:0] in LCSR_TX_DEEMPH(n) register for USB3 Gen2 Normal Operation as defined in PIPE4 spec based on dt quirk "snps,tx_gen2_de_emphasis_quirk" and "snps,tx_gen2_de_emphasis". Signed-off-by: Joy Chakraborty --- drivers/usb/dwc3/core.c | 13 +++++++++++++ drivers/usb/dwc3/core.h | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 9eb085f359ce..25e19aea364a 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -693,6 +693,11 @@ static int dwc3_ss_phy_setup(struct dwc3 *dwc, int ind= ex) =20 dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(index), reg); =20 + if (dwc->tx_gen2_de_emphasis_quirk) { + reg =3D dwc->tx_gen2_de_emphasis; + dwc3_writel(dwc->regs, DWC3_LCSR_TX_DEEMPH(index), reg); + } + return 0; } =20 @@ -1654,6 +1659,7 @@ static void dwc3_get_properties(struct dwc3 *dwc) u8 tx_thr_num_pkt_prd =3D 0; u8 tx_max_burst_prd =3D 0; u8 tx_fifo_resize_max_num; + u32 tx_gen2_de_emphasis =3D 0; const char *usb_psy_name; int ret; =20 @@ -1797,8 +1803,15 @@ static void dwc3_get_properties(struct dwc3 *dwc) dwc->dis_split_quirk =3D device_property_read_bool(dev, "snps,dis-split-quirk"); =20 + dwc->tx_gen2_de_emphasis_quirk =3D device_property_read_bool(dev, + "snps,tx_gen2_de_emphasis_quirk"); + if (dwc->tx_gen2_de_emphasis_quirk) + device_property_read_u32(dev, "snps,tx_gen2_de_emphasis", + &tx_gen2_de_emphasis); + dwc->lpm_nyet_threshold =3D lpm_nyet_threshold; dwc->tx_de_emphasis =3D tx_de_emphasis; + dwc->tx_gen2_de_emphasis =3D tx_gen2_de_emphasis; =20 dwc->hird_threshold =3D hird_threshold; =20 diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index c71240e8f7c7..fa9db38b7e15 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -179,7 +179,9 @@ #define DWC3_OEVTEN 0xcc0C #define DWC3_OSTS 0xcc10 =20 +/* Link Registers */ #define DWC3_LLUCTL 0xd024 +#define DWC3_LCSR_TX_DEEMPH(n) (0xd060 + ((n) * 0x80)) =20 /* Bit fields */ =20 @@ -1145,6 +1147,8 @@ struct dwc3_scratchpad_array { * 1 - -3.5dB de-emphasis * 2 - No de-emphasis * 3 - Reserved + * @tx_gen2_de_emphasis_quirk: set if we enable USB Gen2 Tx de-emphasis qu= irk + * @tx_gen2_de_emphasis: Tx de-emphasis value used in USB Gen2 with PIPE4 * @dis_metastability_quirk: set to disable metastability quirk. * @dis_split_quirk: set to disable split boundary. * @sys_wakeup: set if the device may do system wakeup. @@ -1374,6 +1378,8 @@ struct dwc3 { =20 unsigned tx_de_emphasis_quirk:1; unsigned tx_de_emphasis:2; + unsigned tx_gen2_de_emphasis_quirk:1; + unsigned tx_gen2_de_emphasis:18; =20 unsigned dis_metastability_quirk:1; =20 --=20 2.47.0.rc0.187.ge670bccf7e-goog